From fddf85fe5a16e8289d2b56126e354e2e797213e3 Mon Sep 17 00:00:00 2001
From: Federico Leo Redi <federico.redi@cern.ch>
Date: Thu, 19 Aug 2021 10:12:28 +0000
Subject: [PATCH 01/22] Prepared testing scripts for v28r2p1

---
 .../tests/liaisons/TestMyWGfromSettings.py    |   17 +-
 .../tests/users/TestMyStrippingLine.py        |   23 +-
 .../LineConfigDictionaries_B2CC.py            |  219 +
 .../LineConfigDictionaries_B2OC.py            |  605 +++
 .../LineConfigDictionaries_BandQ.py           |  485 +++
 .../LineConfigDictionaries_Calib.py           |  114 +
 .../LineConfigDictionaries_Charm.py           |  981 +++++
 .../LineConfigDictionaries_Charmless.py       |  192 +
 .../LineConfigDictionaries_IFT.py             |  145 +
 .../LineConfigDictionaries_QEE.py             |  501 +++
 .../LineConfigDictionaries_RD.py              | 3844 +++++++++++++++++
 .../LineConfigDictionaries_Semileptonic.py    |  461 ++
 .../Stripping28r2p1/__init__.py               |   21 +
 13 files changed, 7597 insertions(+), 11 deletions(-)
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2OC.py
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_BandQ.py
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Calib.py
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charm.py
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charmless.py
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_IFT.py
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_QEE.py
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_RD.py
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py
 create mode 100644 Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/__init__.py

diff --git a/Phys/StrippingSelections/tests/liaisons/TestMyWGfromSettings.py b/Phys/StrippingSelections/tests/liaisons/TestMyWGfromSettings.py
index b6af23d5e..25fc33fb2 100755
--- a/Phys/StrippingSelections/tests/liaisons/TestMyWGfromSettings.py
+++ b/Phys/StrippingSelections/tests/liaisons/TestMyWGfromSettings.py
@@ -10,7 +10,7 @@
 ###############################################################################
 # $Id: $
 # Test your line(s) of the stripping by taking the dictionaries from StrippingSettings
-#  
+#
 # NOTE: Please make a copy of this file for your testing, and do NOT change this one!
 #
 
@@ -20,7 +20,7 @@ from StrippingConf.Configuration import StrippingConf
 
 # Specify the name of your configuration
 my_wg='B2OC' #FOR LIAISONS
-stripping='stripping34r0p2'
+stripping='stripping28r2p1'
 
 from Configurables import RootCnvSvc
 RootCnvSvc().GlobalCompression = "ZLIB:1"
@@ -139,6 +139,15 @@ sr = StrippingReport(Selections = sc.selections())
 from Configurables import AlgorithmCorrelationsAlg
 ac = AlgorithmCorrelationsAlg(Algorithms = list(set(sc.selections())))
 
+# The CALO reprocessing options file is available in AppConfig, so it is taken from here instead of saving it in Stripping
+importOptions(
+        "$APPCONFIGOPTS/DaVinci/DV-RedoCaloPID-Stripping_28_24.py"
+        )
+# Items that might get lost when running the CALO+PROTO ReProcessing in DV
+caloProtoReprocessLocs = ["/Event/pRec/ProtoP#99", "/Event/pRec/Calo#99"]
+# Make sure they are present on full DST streams
+SelDSTWriterConf['default'].extraItems += caloProtoReprocessLocs
+
 DaVinci().HistogramFile = 'DV_stripping_histos.root'
 DaVinci().EvtMax = 10000
 DaVinci().PrintFreq = 1000
@@ -163,5 +172,5 @@ TimingAuditor().TIMER.NameSize = 60
 #importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco15aLead15_Run168665_PbAr_DV.py")
 
 # pp
-importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco18_DataType2018_Run214741.py")
-importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco18_DataType2018_Run214741_DV.py")
+importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco16_DataType2016_Run174858.py")
+importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco16_DataType2016_Run174858_DV.py")
diff --git a/Phys/StrippingSelections/tests/users/TestMyStrippingLine.py b/Phys/StrippingSelections/tests/users/TestMyStrippingLine.py
index 24bbec1e8..cbe0b9077 100755
--- a/Phys/StrippingSelections/tests/users/TestMyStrippingLine.py
+++ b/Phys/StrippingSelections/tests/users/TestMyStrippingLine.py
@@ -10,7 +10,7 @@
 ###############################################################################
 # $Id: $
 # Test your line(s) of the stripping
-#  
+#
 # NOTE: Please make a copy of this file for your testing, and do NOT change this one!
 #
 
@@ -19,8 +19,8 @@ from Configurables import DaVinci
 from StrippingConf.Configuration import StrippingConf
 
 # Specify the name of your configuration
-confname='Beauty2Charm' #FOR USERS 
-   
+confname='Beauty2Charm' #FOR USERS
+
 from Configurables import RootCnvSvc
 RootCnvSvc().GlobalCompression = "ZLIB:1"
 
@@ -30,8 +30,8 @@ RootCnvSvc().GlobalCompression = "ZLIB:1"
 from Configurables import TrackStateProvider
 TrackStateProvider().CacheStatesOnDemand = False
 
-# NOTE: this will work only if you inserted correctly the 
-# default_config dictionary in the code where your LineBuilder 
+# NOTE: this will work only if you inserted correctly the
+# default_config dictionary in the code where your LineBuilder
 # is defined.
 from StrippingSelections import buildersConf
 confs = buildersConf()
@@ -137,6 +137,15 @@ sr = StrippingReport(Selections = sc.selections(),ReportFrequency = 5000)
 from Configurables import AlgorithmCorrelationsAlg
 ac = AlgorithmCorrelationsAlg(Algorithms = list(set(sc.selections())))
 
+# The CALO reprocessing options file is available in AppConfig, so it is taken from here instead of saving it in Stripping
+importOptions(
+        "$APPCONFIGOPTS/DaVinci/DV-RedoCaloPID-Stripping_28_24.py"
+        )
+# Items that might get lost when running the CALO+PROTO ReProcessing in DV
+caloProtoReprocessLocs = ["/Event/pRec/ProtoP#99", "/Event/pRec/Calo#99"]
+# Make sure they are present on full DST streams
+SelDSTWriterConf['default'].extraItems += caloProtoReprocessLocs
+
 #Configure DaVinci
 DaVinci().HistogramFile = 'DV_stripping_histos.root'
 DaVinci().EvtMax = 10000
@@ -159,5 +168,5 @@ MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
 #importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco18Lead18_217952_PbNe_DV.py")
 
 ## pp
-importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco18_DataType2018_Run214741.py")
-importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco18_DataType2018_Run214741_DV.py")
+importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco16_DataType2016_Run174858.py")
+importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco16_DataType2016_Run174858_DV.py")
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py
new file mode 100644
index 000000000..05e5c6ed6
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py
@@ -0,0 +1,219 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+################################################################################
+##                          S T R I P P I N G  3 4 r 0 p 2                    ##
+##                                                                            ##
+##  Configuration for B2CC WG                                                 ##
+##  Contact person: Jie Wu               (j.wu@cern.ch)                       ##
+################################################################################
+
+from GaudiKernel.SystemOfUnits import *
+
+######################################################################
+## StrippingB2JpsiHHBs2Jpsif0PrescaledLine (MicroDST)
+## StrippingB2JpsiHHBs2JpsiKstarLine(MicroDST)
+## StrippingB2JpsiHHLb2JpsipHLine(MicroDST)
+## StrippingB2JpsiHHBs2Jpsif0Line (FullDST)
+## StrippingB2JpsiHHBs2Jpsif0KaonLine(FullDST)
+## StrippingB2JpsiHHBs2Jpsif0wsLine(FullDST)
+## -------------------------------------------------------------------
+## Lines defined in StrippingB2JpsiHH.py
+## Authors: Liming Zhang, Xuesong Liu
+## Last changes made by Piera Muzzetto
+######################################################################
+
+B2JpsiHH = {
+    "BUILDERTYPE": "B2JpsiHHConf",
+    "CONFIG": {
+        "Bs2Jpsif0Prescale": 0.3,
+        "DTF_CTAU": 0.0598,
+        "HLTCuts": "HLT_PASS_RE('Hlt2DiMuonJPsiDecision')",
+        "JpsiMassWindow": 80,
+        "MVACut": "-0.1",
+        "PIDKforKaon": 0.0,
+        "PIDKforPion": 10.0,
+        "PIDKpforKaon": -10.0,
+        "PIDpKforProton": -10.0,
+        "PIDpforProton": 0.0,
+        "PROBNNk": 0.05,
+        "PROBNNp": 0.05,
+        "PROBNNpi": 0.05,
+        "TRCHI2DOF": 5,
+        "VCHI2PDOF": 10,
+        "XmlFile": "$TMVAWEIGHTSROOT/data/Bs2Jpsif0_BDT_v1r1.xml"
+    },
+    "STREAMS": {
+        "Dimuon": [
+            "StrippingB2JpsiHHBs2Jpsif0Line",
+            "StrippingB2JpsiHHBs2Jpsif0KaonLine",
+            "StrippingB2JpsiHHBs2Jpsif0wsLine"
+        ],
+        "Leptonic": [
+            "StrippingB2JpsiHHBs2Jpsif0PrescaledLine",
+            "StrippingB2JpsiHHBs2JpsiKstarLine",
+            "StrippingB2JpsiHHLb2JpsipHLine"
+        ]
+    },
+    "WGs": [ "B2CC" ]
+}
+
+#############################################################################################
+## BhadronCompleteEvent (FullDST) :
+##    StrippingBetaSBs2DsPiDetachedLine
+## Dimuon (FullDST) :
+##    StrippingBetaSBu2JpsiKDetachedLine
+##    StrippingBetaSBd2JpsiKstarDetachedLine
+##    StrippingBetaSBs2JpsiPhiDetachedLine
+##    StrippingBetaSJpsi2MuMuLine
+##    StrippingBetaSBd2JpsiKsDetachedLine
+## Leptonic (MicroDST) :
+##    StrippingBetaSBu2JpsiKPrescaledLine
+##    StrippingBetaSBs2JpsiPhiPrescaledLine
+##    StrippingBetaSBd2JpsiKstarPrescaledLine
+##    StrippingBetaSBd2JpsiKsPrescaledLine
+##    StrippingBetaSBd2JpsiKsLDDetachedLine
+##    StrippingBetaSBs2JpsiKstarWideLine
+##    StrippingBetaSLambdab2JpsiLambdaUnbiasedLine
+## ----------------------------------------------------------------------------
+## Lines defined in StrippingB2JpsiXforBeta_s.py
+## Authors: Greig Cowan, Juan Palacios, Francesca Dordei, Carlos Vazquez Sierra, Xuesong Liu
+## Last changes made by Piera Muzzetto
+#############################################################################################
+
+BetaS = {
+    "BUILDERTYPE": "B2JpsiXforBeta_sConf",
+    "CONFIG": {
+        "Bd2JpsiKsPrescale": 1.0,
+        "Bd2JpsiKstarPrescale": 1.0,
+        "Bs2JpsiPhiPrescale": 1.0,
+        "Bu2JpsiKPrescale": 1.0,
+        "DTF_CTAU": 0.0598,
+        "DaughterPT": 1000,
+        "HLTCuts": "HLT_PASS_RE('Hlt2DiMuonJPsiDecision')",
+        "Jpsi2MuMuPrescale": 0.04,
+        "JpsiMassWindow": 80,
+        "PIDKCuts": 0.0,
+        "PIDpiCuts": 0.0,
+        "TRCHI2DOF": 5,
+        "VCHI2PDOF": 10
+    },
+    "STREAMS": {
+        "BhadronCompleteEvent": [ "StrippingBetaSBs2DsPiDetachedLine" ],
+        "Dimuon": [
+            "StrippingBetaSBu2JpsiKDetachedLine",
+            "StrippingBetaSBd2JpsiKstarDetachedLine",
+            "StrippingBetaSBs2JpsiPhiDetachedLine",
+            "StrippingBetaSJpsi2MuMuLine",
+            "StrippingBetaSBd2JpsiKsDetachedLine"
+        ],
+        "Leptonic": [
+            "StrippingBetaSBu2JpsiKPrescaledLine",
+            "StrippingBetaSBs2JpsiPhiPrescaledLine",
+            "StrippingBetaSBd2JpsiKstarPrescaledLine",
+            "StrippingBetaSBd2JpsiKsPrescaledLine",
+            "StrippingBetaSBd2JpsiKsLDDetachedLine",
+            "StrippingBetaSBs2JpsiKstarWideLine",
+            "StrippingBetaSLambdab2JpsiLambdaUnbiasedLine"
+        ]
+    },
+    "WGs": [ "B2CC" ]
+}
+
+#############################################################################################
+## Dimuon (FullDST) :
+##    StrippingBd2JpsieeKSFullDSTBd2JpsieeKSFullDSTDetachedLine
+## ----------------------------------------------------------------------------
+## Lines defined in StrippingBd2JpsieeKSFullDST.py
+## Authors: Gerwin Meier
+## Last changes made by Gerwin Meier
+#############################################################################################
+
+Bd2JpsieeKSFullDST = {
+    "BUILDERTYPE": "Bd2JpsieeKSFullDSTConf",
+    "CONFIG": {
+        "B0_BPV_DIRA": 0.995,
+        "B0_BPV_IP": 1.0,
+        "B0_DOCA": 3.0,
+        "B0_DOCA_chi2": 13.0,
+        "BM_DTF_Jpsi_Const_max": 5900.0,
+        "BM_DTF_Jpsi_Const_min": 4600.0,
+        "BPVLTIME": 0.2,
+        "BdMassMax": 6000.0,
+        "BdMassMin": 4400.0,
+        "BdVertexCHI2pDOF": 6.0,
+        "EProbNNe": 0.01,
+        "ElectronPID": 0.0,
+        "ElectronPT": 500.0,
+        "ElectronTrackCHI2pDOF": 5.0,
+        "JpsiMassMax": 3300.0,
+        "JpsiMassMin": 2300.0,
+        "JpsiVertexCHI2pDOF": 13.0,
+        "KSBPVDLS": 5.0,
+        "KSMassMax": 535.0,
+        "KSMassMin": 460.0,
+        "KSTau": 1.0,
+        "KSVCHI2": 20.0,
+        "TRCHI2DOF": 3.0
+    },
+    "STREAMS": {
+        "Dimuon": [ "StrippingBd2JpsieeKSFullDSTBd2JpsieeKSFullDSTDetachedLine" ]
+    },
+    "WGs": [ "B2CC" ]
+}
+
+#############################################################################################
+## Dimuon (FullDST) :
+##    StrippingBd2JpsieeKSBu2JpsieeKFromTracksDetachedLine
+## Leptonic (MicroDST) :
+##    StrippingBd2JpsieeKSBd2JpsieeKSFromTracksPrescaledLine
+##    StrippingBd2JpsieeKSBd2JpsieeKSFromTracksDetachedLine
+##    StrippingBd2JpsieeKSBd2JpsieeKSDetachedLine
+## ----------------------------------------------------------------------------
+## Lines defined in StrippingBd2JpsieeKS.py
+## Authors: Ramon Niet
+## Last changes made by Gerwin Meier
+#############################################################################################
+Bd2JpsieeKS = {
+    "BUILDERTYPE": "Bd2JpsieeKSConf",
+    "CONFIG": {
+        "BPVLTIME": 0.2,
+        "BdMassMax": 6000.0,
+        "BdMassMin": 4400.0,
+        "BdVertexCHI2pDOF": 7.0,
+        "ElectronPID": 0.0,
+        "ElectronPT": 500.0,
+        "ElectronTrackCHI2pDOF": 5.0,
+        "JpsiMassMax": 3300.0,
+        "JpsiMassMin": 2300.0,
+        "JpsiVertexCHI2pDOF": 15.0,
+        "KSBPVDLS": 5.0,
+        "KSVCHI2": 20.0,
+        "KaonPID": 0.0,
+        "KplusIP": 9.0,
+        "KplusPT": 800.0,
+        "Prescale": 0.1,
+        "TRCHI2DOF": 3.0
+    },
+    "STREAMS": {
+        "Dimuon": [ "StrippingBd2JpsieeKSBu2JpsieeKFromTracksDetachedLine" ],
+        "Leptonic": [
+            "StrippingBd2JpsieeKSBd2JpsieeKSFromTracksPrescaledLine",
+            "StrippingBd2JpsieeKSBd2JpsieeKSFromTracksDetachedLine",
+            "StrippingBd2JpsieeKSBd2JpsieeKSDetachedLine"
+        ]
+    },
+    "WGs": [ "B2CC" ]
+}
+
+
+
+
+
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2OC.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2OC.py
new file mode 100644
index 000000000..b7d0e91a1
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2OC.py
@@ -0,0 +1,605 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+#########################################################################################################
+##                          S T R I P P I N G  3 4 r 0 p 2                                             ##
+##                                                                                                     ##
+##  Configuration for B2OC WG                                                                          ##
+##  Contact person: Shunan Zhang (shunan.zhang@cern.ch)                                                ##
+#########################################################################################################
+
+from GaudiKernel.SystemOfUnits import *
+
+Beauty2Charm = {
+    'BUILDERTYPE': 'Beauty2CharmConf',
+    'CONFIG': {
+        "ALL":
+        {  # Cuts made on all charged input particles in all lines (expt. upstream)
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'TRGHP_MAX': 0.4
+        },
+        "PIDPION": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDK_MAX': 20.,
+            'TRGHP_MAX': 0.4
+        },
+        "PIDKAON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDK_MIN': -10.,
+            'TRGHP_MAX': 0.4
+        },
+        "PIDPROTON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDp_MIN': -10.,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xc_PION": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 1.0,
+            'PIDK_MAX': 10.,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xc_KAON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '150*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 1.0,
+            'PIDK_MIN': -5.0,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xc_PROTON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '400*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 1.0,
+            'PIDp_MIN': -5.0,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xb_PION": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '300*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDK_MAX': 10.,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xb_KAON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '300*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDK_MIN': -5.0,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xb_PROTON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '300*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDp_MIN': -5.0,
+            'TRGHP_MAX': 0.4
+        },
+        "UPSTREAM": {  # Cuts made on all upstream particles
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.
+        },
+        "KS0": {  # Cuts made on all K shorts
+            'PT_MIN': '250*MeV',
+            'BPVVDCHI2_MIN': 36,
+            'MM_MIN': '467.*MeV',
+            'MM_MAX': '527.*MeV'
+        },
+        "VLKS0_LL": {  # cuts for StdVeryLooseKsLL
+            'PT_MIN': '0*MeV',
+            'BPVVDCHI2_MIN': 36,
+            'MM_MIN': '467.*MeV',
+            'MM_MAX': '527.*MeV'
+        },
+        "Lambda0": {  # Cuts made on all Lambda0's
+            'PT_MIN': '250*MeV',
+            'BPVVDCHI2_MIN': 36,
+            'MM_MIN': '1086.*MeV',
+            'MM_MAX': '1146.*MeV'
+        },
+        "Pi0": {  # Cuts made on all pi0's
+            'PT_MIN': '500*MeV',
+            'P_MIN': '1000*MeV',
+            'CHILDCL1_MIN': 0.25,
+            'CHILDCL2_MIN': 0.25,
+            'FROM_B_P_MIN': '2000*MeV',
+            'TIGHT_PT_MIN': '1500*MeV'
+        },
+        "gamma": {  # Cuts made on all photons
+            'PT_MIN': '400*MeV',
+            'CL_MIN': 0.25,
+            'ISNOTE_MIN': -999.0,
+            'PT_VLAPH': '145*MeV'
+        },
+        "D2X": {  # Cuts made on all D's and Lc's used in all lines
+            'ASUMPT_MIN': '1800*MeV',
+            'ADOCA12_MAX': '0.5*mm',
+            'ADOCA13_MAX': '0.5*mm',
+            'ADOCA23_MAX': '0.5*mm',
+            'ADOCA14_MAX': '0.5*mm',
+            'ADOCA24_MAX': '0.5*mm',
+            'ADOCA34_MAX': '0.5*mm',
+            'ADOCA15_MAX': '0.5*mm',
+            'ADOCA25_MAX': '0.5*mm',
+            'ADOCA35_MAX': '0.5*mm',
+            'ADOCA45_MAX': '0.5*mm',
+            'VCHI2DOF_MAX': 10,
+            'BPVVDCHI2_MIN': 36,
+            'BPVDIRA_MIN': 0,
+            'MASS_WINDOW': '100*MeV'
+        },
+        "LC_FOR_XIBC": {  # Cuts made on Lc's/Xic(0) used in Xibc lines
+            'ASUMPT_MIN': '1800*MeV',
+            'ADOCA12_MAX': '0.5*mm',
+            'ADOCA13_MAX': '0.5*mm',
+            'ADOCA23_MAX': '0.5*mm',
+            'ADOCA14_MAX': '0.5*mm',
+            'ADOCA24_MAX': '0.5*mm',
+            'ADOCA34_MAX': '0.5*mm',
+            'ADOCA15_MAX': '0.5*mm',
+            'ADOCA25_MAX': '0.5*mm',
+            'ADOCA35_MAX': '0.5*mm',
+            'ADOCA45_MAX': '0.5*mm',
+            'VCHI2DOF_MAX': 8,
+            'BPVVDCHI2_MIN': 36,
+            'BPVDIRA_MIN': 0,
+            'MASS_WINDOW': '50*MeV'
+        },
+        "D2X_FOR_DDX": {  # Cuts made on all D's and Lc's used in B->DDX lines
+            'ASUMPT_MIN': '1800*MeV',
+            'ADOCA12_MAX': '0.5*mm',
+            'ADOCA13_MAX': '0.5*mm',
+            'ADOCA23_MAX': '0.5*mm',
+            'ADOCA14_MAX': '0.5*mm',
+            'ADOCA24_MAX': '0.5*mm',
+            'ADOCA34_MAX': '0.5*mm',
+            'ADOCA15_MAX': '0.5*mm',
+            'ADOCA25_MAX': '0.5*mm',
+            'ADOCA35_MAX': '0.5*mm',
+            'ADOCA45_MAX': '0.5*mm',
+            'VCHI2DOF_MAX': 8,
+            'BPVVDCHI2_MIN': 50,
+            'BPVDIRA_MIN': 0,
+            'MASS_WINDOW': '100*MeV'
+        },
+        "B2X": {  # Cuts made on all B's and Lb's used in all lines
+            'SUMPT_MIN': '5000*MeV',
+            'VCHI2DOF_MAX': 10,
+            'BPVIPCHI2_MAX': 25,
+            'BPVLTIME_MIN': '0.2*ps',
+            'BPVDIRA_MIN': 0.999,
+            'AM_MIN': '4750*MeV',  # Lb->X sets this to 5200*MeV
+            'AM_MAX': '7000*MeV',  # B->Dh+-h0 sets this to 5800*MeV
+            'B2CBBDT_MIN': 0.05
+        },
+        "Bc2DD": {  # Cuts made on Bc -> DD lines
+            'SUMPT_MIN': '5000*MeV',
+            'VCHI2DOF_MAX': 10,
+            'BPVIPCHI2_MAX': 20,
+            'BPVLTIME_MIN': '0.05*ps',
+            'BPVDIRA_MIN': 0.999,
+            'AM_MIN': '4800*MeV',
+            'AM_MAX': '6800*MeV',
+            'B2CBBDT_MIN': -999.9
+        },
+        "Xibc": {  # Cuts made on Xibc -> Xc hh, LcD0, Xicc h lines
+            'SUMPT_MIN': '5000*MeV',
+            'VCHI2DOF_MAX': 8,
+            'BPVIPCHI2_MAX': 20,
+            'BPVLTIME_MIN': '0.05*ps',
+            'BPVDIRA_MIN': 0.99,
+            'AM_MIN': '5500*MeV',
+            'AM_MAX': '9000*MeV',
+            'B2CBBDT_MIN': -999.9
+        },
+        "XiccMu": {  # Cuts made on Xibc -> Xc hh, LcD0, Xicc h lines
+            'SUMPT_MIN': '4000*MeV',
+            'VCHI2DOF_MAX': 10,
+            'BPVIPCHI2_MAX': 200,
+            'BPVLTIME_MIN': '0.0*ps',
+            'BPVDIRA_MIN': 0.99,
+            'AM_MIN': '3000*MeV',
+            'AM_MAX': '8000*MeV',
+            'B2CBBDT_MIN': -999.9
+        },
+        "Bc2BX": {  # Cuts made on Bc -> BHH lines
+            'SUMPT_MIN': '1000*MeV',
+            'VCHI2DOF_MAX': 10,
+            'BPVIPCHI2_MAX': 25,
+            'BPVLTIME_MIN': '0.05*ps',
+            'BPVDIRA_MIN': 0.999,
+            'AM_MIN': '6000*MeV',
+            'AM_MAX': '7200*MeV',
+            'DZ1_MIN': '-1.5*mm',
+            'B2CBBDT_MIN': -999.9
+        },
+        "Bc2DX": {  # Cuts made on Bc -> DX lines
+            'SUMPT_MIN': '5000*MeV',
+            'VCHI2DOF_MAX': 10,
+            'BPVIPCHI2_MAX': 25,
+            'BPVLTIME_MIN': '0.05*ps',
+            'BPVDIRA_MIN': 0.999,
+            'AM_MIN': '5800*MeV',
+            'AM_MAX': '6800*MeV',
+            'B2CBBDT_MIN': -999.9
+        },
+        "Dstar": {  # Cuts made on all D*'s used in all lines
+            'ADOCA12_MAX': '0.5*mm',
+            'VCHI2DOF_MAX': 10,
+            'BPVVDCHI2_MIN': 36,
+            'BPVDIRA_MIN': 0,
+            'MASS_WINDOW': '600*MeV',  # was 50MeV
+            'DELTAMASS_MAX': '200*MeV',
+            'DELTAMASSLOOSE_MAX': '250*MeV',
+            'DM_DSPH_MAX': '250*MeV',
+            'DM_DSPH_MIN': '80*MeV'
+        },
+        "HH": {  # Cuts for rho, K*, phi, XHH Dalitz analyese, etc.
+            'MASS_WINDOW': {
+                'KST': '150*MeV',
+                'RHO': '150*MeV',
+                'PHI': '150*MeV'
+            },
+            'DAUGHTERS': {
+                'PT_MIN': '100*MeV',
+                'P_MIN': '2000*MeV'
+            },
+            'ADOCA12_MAX': '0.5*mm',
+            'VCHI2DOF_MAX': 16,
+            'BPVVDCHI2_MIN': 16,
+            'BPVDIRA_MIN': 0,
+            'ASUMPT_MIN': '1000*MeV',
+            'pP_MIN': '5000*MeV'  # for pH only (obviously)
+        },
+        "HHH": {  # Cuts for PiPiPi, KPiPi analyese, etc.
+            'MASS_WINDOW': {
+                'A1': '3500*MeV',
+                'K1': '4000*MeV',
+                'PPH': '3600*MeV',
+                'PHH': '4000*MeV'
+            },
+            'KDAUGHTERS': {
+                'PT_MIN': '100*MeV',
+                'P_MIN': '2000*MeV',
+                'PIDK_MIN': '-2'
+            },
+            'PiDAUGHTERS': {
+                'PT_MIN': '100*MeV',
+                'P_MIN': '2000*MeV',
+                'PIDK_MAX': '10'
+            },
+            'pDAUGHTERS': {
+                'PT_MIN': '100*MeV',
+                'P_MIN': '2000*MeV',
+                'PIDp_MIN': '-2'
+            },
+            'ADOCA12_MAX': '0.40*mm',
+            'ADOCA13_MAX': '0.40*mm',
+            'ADOCA23_MAX': '0.40*mm',
+            'ADOCA14_MAX': '0.40*mm',
+            'ADOCA24_MAX': '0.40*mm',
+            'ADOCA34_MAX': '0.40*mm',
+            'VCHI2DOF_MAX': 8,
+            'BPVVDCHI2_MIN': 16,
+            'BPVDIRA_MIN': 0.98,
+            'ASUMPT_MIN': '1250*MeV',
+            'MIPCHI2DV_MIN': 0.0,
+            'BPVVDRHO_MIN': '0.1*mm',
+            'BPVVDZ_MIN': '2.0*mm',
+            'PTMIN1': '300*MeV',
+            'PID': {
+                'TIGHTERPI': {
+                    'P': {
+                        'PIDp_MIN': -10
+                    },
+                    'PI': {
+                        'PIDK_MAX': 8
+                    },
+                    'K': {
+                        'PIDK_MIN': -10
+                    }
+                },
+                'REALTIGHTK': {
+                    'P': {
+                        'PIDp_MIN': -10
+                    },
+                    'PI': {
+                        'PIDK_MAX': 10
+                    },
+                    'K': {
+                        'PIDK_MIN': 4
+                    }
+                }
+            }
+        },
+        'PID': {
+            'P': {
+                'PIDp_MIN': -10
+            },
+            'PI': {
+                'PIDK_MAX': 20
+            },
+            'K': {
+                'PIDK_MIN': -10
+            },
+            'TIGHT': {
+                'P': {
+                    'PIDp_MIN': -5
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': -5
+                }
+            },
+            'TIGHTER': {
+                'P': {
+                    'PIDp_MIN': 0
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': 0
+                }
+            },
+            'TIGHTPI': {
+                'P': {
+                    'PIDp_MIN': -10
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': -10
+                }
+            },
+            'TIGHTER1': {
+                'P': {
+                    'PIDp_MIN': 0
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': -1
+                }
+            },
+            'TIGHTER2': {
+                'P': {
+                    'PIDp_MIN': 5
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': 0
+                }
+            },
+            'TIGHTER3': {
+                'P': {
+                    'PIDp_MIN': 0
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': -10
+                }
+            },
+            'SPECIAL': {
+                'P': {
+                    'PIDp_MIN': -5
+                },
+                'PI': {
+                    'PIDK_MAX': 5
+                },
+                'K': {
+                    'PIDK_MIN': 5
+                }
+            },
+            'SPECIALPI': {
+                'P': {
+                    'PIDp_MIN': -10
+                },
+                'PI': {
+                    'PIDK_MAX': 12
+                },
+                'K': {
+                    'PIDK_MIN': -10
+                }
+            }
+        },
+        'FlavourTagging': [
+        ],
+        'RawEvents': [
+        ],
+        'MDSTChannels': [],
+        'RelatedInfoTools': [
+            {
+                "Type": "RelInfoConeVariables",
+                "ConeAngle": 1.5,
+                "Variables": ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "Location": 'P2ConeVar1'
+            },
+            {
+                "Type": "RelInfoConeVariables",
+                "ConeAngle": 1.7,
+                "Variables": ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "Location": 'P2ConeVar2'
+            },
+            {
+                "Type": "RelInfoConeVariables",
+                "ConeAngle": 1.0,
+                "Variables": ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "Location": 'P2ConeVar3'
+            },
+        ],
+        "Prescales": {  # Prescales for individual lines
+            'RUN_BY_DEFAULT': True,  # False = lines off by default
+            'RUN_RE': ['.*'],
+            # Defaults are defined in, eg, Beauty2Charm_B2DXBuilder.py.  Put the full
+            # line name here to override. E.g. 'B2D0HD2HHBeauty2CharmTOSLine':0.5.
+        },
+        'GECNTrkMax':
+        500
+    },
+    'STREAMS': {
+        'BhadronCompleteEvent': [
+        ],
+        'Bhadron': [
+            'StrippingB02D0KKD2HHBeauty2CharmLine',
+            'StrippingB02DstarKDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarKWSDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarPiDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarPiWSDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarKDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarKWSDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarPiDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarPiWSDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarKDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarKWSDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarPiDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarPiWSDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarKDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarKWSDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarPiDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarPiWSDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB2D0KPiPiD2HHHHPIDBeauty2CharmLine',
+            'StrippingB2D0PiPiPiD2HHHHPIDBeauty2CharmLine',
+            'StrippingB02D0DKWSBeauty2CharmLine',
+            'StrippingB02D0DKWSD02K3PiBeauty2CharmLine',
+            'StrippingLb2DDLambdaDDBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02HHD02HHDDBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02HHD02K3PiDDBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02K3PiD02K3PiDDBeauty2CharmLine',
+            'StrippingLb2DstDLambdaDDBeauty2CharmLine',
+            'StrippingLb2DstDLambdaDDDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaDDBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaDDDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaDDDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DDLambdaLLBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02HHD02HHLLBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02HHD02K3PiLLBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02K3PiD02K3PiLLBeauty2CharmLine',
+            'StrippingLb2DstDLambdaLLBeauty2CharmLine',
+            'StrippingLb2DstDLambdaLLDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaLLBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaLLDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaLLDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DDpKD2HHHPIDBeauty2CharmLine',
+            'StrippingLb2LcKSKLLLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcKSKDDLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcSigmacppKSigmacpp2LcPiLc2PKPiBeauty2CharmLine',
+            'StrippingB2LcXicPiXic2PKPiLc2PKPiBeauty2CharmLine',
+            'StrippingB2XicpbarPiXic2PKPiBeauty2CharmLine',
+            'StrippingB02XicpbarPiPiXic2PKPiBeauty2CharmLine',
+            'StrippingB02XicpbarKPiXic2PKPiBeauty2CharmLine',
+            'StrippingB02DpbarLambdaDDD2HHHBeauty2CharmLine',
+            'StrippingB02DpbarLambdaLLD2HHHBeauty2CharmLine',
+            'StrippingB02DstpbarLambdaDDDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstpbarLambdaLLDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstpbarLambdaDDDst2D0PiD02K3PiBeauty2CharmLine',
+            'StrippingB02DstpbarLambdaLLDst2D0PiD02K3PiBeauty2CharmLine',
+            'StrippingB2D0pbarLambdaDDD02HHBeauty2CharmLine',
+            'StrippingB2D0pbarLambdaLLD02HHBeauty2CharmLine',
+            'StrippingB2D0pbarLambdaDDD02K3PiBeauty2CharmLine',
+            'StrippingB2D0pbarLambdaLLD02K3PiBeauty2CharmLine',
+            'StrippingB02D0pbarKLambdaDDD02HHBeauty2CharmLine',
+            'StrippingB02D0pbarKLambdaLLD02HHBeauty2CharmLine',
+            'StrippingB02D0pbarKLambdaDDD02K3PiBeauty2CharmLine',
+            'StrippingB02D0pbarKLambdaLLD02K3PiBeauty2CharmLine',
+            'StrippingXib2Xic0D0KD02KPiBeauty2CharmLine',
+            'StrippingXib2XicDKD2HHHBeauty2CharmLine',
+            'StrippingXib2XicDKDst2D0PiBeauty2CharmLine',
+            'StrippingXib02XicD0KD02KPiBeauty2CharmLine',
+            'StrippingXib02XicD0KD02K3PiBeauty2CharmLine',
+            'StrippingOmegab2Xic0KPiPiXic02PKKPiBeauty2CharmLine',
+            'StrippingXib02D0LambdaPiPiLLD02KPiBeauty2CharmLine',
+            'StrippingXib02D0LambdaPiPiLLD02K3PiBeauty2CharmLine',
+            'StrippingXib02D0LambdaPiPiDDD02KPiBeauty2CharmLine',
+            'StrippingXib02D0LambdaPiPiDDD02K3PiBeauty2CharmLine',
+            'StrippingXib2LcKHHHLc2PKPiBeauty2CharmLine',
+            'StrippingXib2XicHHHHXic2PKPiBeauty2CharmLine'
+        ]
+    },
+    'WGs': ['B2OC']
+}
+
+B2DXD2HMuNu = {
+   'WGs'         : ['B2OC'],
+   'BUILDERTYPE' : 'B2DXD2HMuNuBuilder',
+   'CONFIG'      :{
+          "PT_MIN"          :  200,  #MeV
+          "P_MIN"           :  3000, #MeV
+          "MIPCHI2DV_MIN"   :  4.,
+          "TRGHP_MAX"       :  0.4,
+          "MuonPIDK"            : 0.    ,#adimensional
+          "MuonPIDmu"           : 3.    ,#adimensional
+          "MuonPIDp"            : 0.    ,#adimensional
+          "KaonPIDK"            : 5.     ,#adimensional
+          "KaonPIDmu"           : 5.     ,#adimensional
+          "KaonPIDp"            : 5.     ,#adimensional
+          "PionPIDK"            : 0.     ,#adimensional
+          "PionPIDmu"           : 0.     ,#adimensional
+          "PionPIDp"            : 0.     ,#adimensional
+          "DMass_MAX"           : 1800, #MeV
+          "Cos_MAX"             : 0.99999,
+          "SUMPT_MIN"           : 1500, #MeV
+          "ADOCA_MAX"           : 0.2, #mm
+          "Plane_MAX"           : 0.02, #mm
+          "VCHI2DOF_MAX"        : 10,
+          "BPVVDCHI2_MIN"       : 36,
+          "HH_MAX"              : 3800, #MeV
+          "BMass_MAX"           : 5200, #MeV
+          "GEC_nLongTrk"        : 160.   #adimensional
+   },
+   'STREAMS'     : {
+      'Bhadron': [
+         'StrippingB02D0KKD02PiMuNuLine',
+         'StrippingB02D0KKD02KMuNuLine',
+         'StrippingB02D0PiPiD02PiMuNuLine',
+         'StrippingB02D0PiPiD02KMuNuLine',
+         'StrippingB02D0KKD02PiMuNuWSLine',
+         'StrippingB02D0KKD02KMuNuWSLine',
+         'StrippingB02D0PiPiD02PiMuNuWSLine',
+         'StrippingB02D0PiPiD02KMuNuWSLine'
+      ]
+   }
+}
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_BandQ.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_BandQ.py
new file mode 100644
index 000000000..04b71ae48
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_BandQ.py
@@ -0,0 +1,485 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+################################################################################
+##                          S T R I P P I N G  2 9 r 2 p 2                    ##
+##                                                                            ##
+##  Configuration for B&Q WG                                                  ##
+##  Contact person: valeriia.zhovkovska@cern.ch                               ##
+################################################################################
+
+from GaudiKernel.SystemOfUnits import *
+
+
+
+
+###############################################################################
+#                                                                             #
+#                                                                             #
+# Module for selecting B_c->eta_c l nu                                        #
+# with eta_c->ppbar, eta_c->KsKpi                                             #
+# with mu, tau->mu 2nu, tau-> 3pi                                             #
+# Provides functions to build B_c, eta_c, tau selections.                     #
+# Provides class Bc2EtacSLConf, which constructs the Selections and           #
+# StrippingLines given a configuration dictionary.                            #
+#                                                                             #
+# Author: Valeriia Zhovkovska                                                 #
+#                                                                             #
+#                                                                             #
+###############################################################################
+
+
+Bc2EtacSL = {
+    "BUILDERTYPE": "Bc2EtacSLConf", 
+    "CONFIG": {
+        "Bc4KsKpiMuMomCuts": "in_range(3.2*GeV, MM, 7.5*GeV)  & in_range(4.0*GeV, BPVCORRM, 12.0*GeV) & (VFASPF(VCHI2/VDOF) < 9.) & (PT > 5000)", 
+        "Bc4KsKpiTauMomCuts": "in_range(0.75*GeV, MM, 7.5*GeV) & in_range(1.0*GeV, BPVCORRM, 12.0*GeV) & (VFASPF(VCHI2/VDOF) < 9.) & (PT > 5000)", 
+        "Bc4PpbarMuMomCuts": "in_range(3.2*GeV, MM, 7.5*GeV)  & in_range(4.0*GeV, BPVCORRM, 12.0*GeV) & (VFASPF(VCHI2/VDOF) < 9.) & (PT > 3000)", 
+        "Bc4PpbarTauMomCuts": "in_range(0.75*GeV, MM, 7.5*GeV) & in_range(1.0*GeV, BPVCORRM, 12.0*GeV) & (VFASPF(VCHI2/VDOF) < 9.) & (PT > 3000)", 
+        "BcLooseCombCuts": "in_range(0.75*GeV, AM, 7.5*GeV)", 
+        "BcTightCombCuts": "in_range(3.2*GeV, AM, 7.5*GeV)", 
+        "CCCut": "", 
+        "EtacCombCuts": "in_range(2.7*GeV, AM, 3.3*GeV)", 
+        "EtacMomCuts": "in_range(2.7*GeV, MM, 3.3*GeV) & (VFASPF(VCHI2/VDOF) < 9.)", 
+        "FakeMuonCuts": "(PROBNNmu > 0.1) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5) & (MIPCHI2DV(PRIMARY) > 16)", 
+        "KaonCuts": "(PROBNNk > 0.65)  & (PT > 500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5) & (MIPCHI2DV(PRIMARY) > 4)", 
+        "KsCuts": "(ADMASS('KS0') < 30.*MeV) & (BPVDLS>5) & (PT > 500*MeV) & (MAXTREE('pi-'==ABSID, PROBNNpi) > 0.45) & (MAXTREE('pi-'==ABSID, TRGHOSTPROB) < 0.4) & (MAXTREE('pi-'==ABSID, TRCHI2DOF) < 5)", 
+        "LinePostscale": 1.0, 
+        "LinePrescale": 1.0, 
+        "MuonCuts": "(PROBNNmu > 0.1) & (PT > 500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5)", 
+        "Pion4TauCuts": "(PROBNNpi > 0.65) & (PT > 250*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5) & (MIPCHI2DV(PRIMARY) > 16)",
+        "PionCuts": "(PROBNNpi > 0.65) & (PT > 500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5) & (MIPCHI2DV(PRIMARY) > 4)", 
+        "ProtonCuts": "(PROBNNp > 0.2)   & (PT > 600*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5)", 
+        "SpdMult": 450.0, 
+        'TauCombCuts': "in_range(500.*MeV, AM, 2100.*MeV) & (APT > 800*MeV) & ((AM12<1670.*MeV) or (AM23<1670.*MeV)) & (ACUTDOCA(0.08*mm,''))",
+        'TauMomCuts': "in_range(600.*MeV, M, 2000.*MeV)  & (PT > 1000*MeV) & (VFASPF(VCHI2) < 9) & (BPVVDCHI2>16)"
+    }, 
+    "STREAMS": [ "CharmCompleteEvent" ], 
+    "WGs": [ "BandQ" ]
+}
+
+#################################################################################
+#                                                                               #
+#                                                                               #
+# Module for selecting                                                          #
+# Ds+-> pi+etap(mumupipi), and Bu->eta_prime(mumupipi)K+, and norm channels     #
+# Ds+-> phi(mumu)pipipi and Bu->J/PsiK+                                         #
+#                                                                               #
+# Author: Xabier Cid Vidal                                                      #
+#                                                                               #
+#                                                                               #
+#################################################################################
+
+
+Etap2pipimumu = {
+    "BUILDERTYPE": "StrippingEtap2pipimumuConf", 
+    "CONFIG": {
+        "Bu2Etap2PiPiMuMuLinePostscale": 0, 
+        "Bu2Etap2PiPiMuMuLinePrescale": 0, 
+        "Bu2JPsiKForEtapLinePostscale": 0, 
+        "Bu2JPsiKForEtapLinePrescale": 0, 
+        "BuKaonMINIPCHI2": 5, 
+        "BuKaonP": 2000.0, 
+        "BuKaonPIDk": -5, 
+        "BuKaonPT": 300.0, 
+        "Bu_FDCHI2": 36, 
+        "Bu_IPCHI2": 20, 
+        "Bu_MASSWIN": 100, 
+        "Bu_PT": 300, 
+        "Bu_VCHI2DOF": 8, 
+        "Ds2Eta2PiPiMuMuLinePostscale": 1, 
+        "Ds2Eta2PiPiMuMuLinePrescale": 1, 
+        "Ds2Etap2PiPiMuMuLinePostscale": 1, 
+        "Ds2Etap2PiPiMuMuLinePrescale": 1, 
+        "Ds2Phi3PiLineForEtapPostscale": 0, 
+        "Ds2Phi3PiLineForEtapPrescale": 0, 
+        "DsPionMINIPCHI2": 5, 
+        "DsPionP": 200.0, 
+        "DsPionPT": 25.0, 
+        "Ds_FDCHI2": 10, 
+        "Ds_IPCHI2": 10, 
+        "Ds_MAXMASS": 2070, 
+        "Ds_MINMASS": 1770, 
+        "Ds_PT": 300, 
+        "Ds_VCHI2DOF": 15, 
+        "Eta_FDCHI2": 2.5, 
+        "Eta_IPCHI2": 2.5, 
+        "Eta_MASSWIN": 100, 
+        "Eta_MAXDOCA": 2, 
+        "Eta_PT": 50, 
+        "Eta_VCHI2DOF": 20, 
+        "EtapMuonMINIPCHI2": 5, 
+        "EtapMuonP": 0.0, 
+        "EtapMuonPIDmu": -5, 
+        "EtapMuonPT": 0.0, 
+        "EtapPionMINIPCHI2": 5, 
+        "EtapPionP": 0.0, 
+        "EtapPionPT": 0.0, 
+        "Etap_FDCHI2": 5, 
+        "Etap_IPCHI2": 5, 
+        "Etap_MASSWIN": 50, 
+        "Etap_MAXDOCA": 1, 
+        "Etap_PT": 100, 
+        "Etap_VCHI2DOF": 10, 
+        "JPsi_FDCHI2": 5, 
+        "JPsi_IPCHI2": 5, 
+        "JPsi_MASSWIN": 75, 
+        "JPsi_MAXDOCA": 1, 
+        "JPsi_PT": 100, 
+        "JPsi_VCHI2DOF": 10, 
+        "Phi_FDCHI2": 5, 
+        "Phi_IPCHI2": 5, 
+        "Phi_MASSWIN": 75, 
+        "Phi_MAXDOCA": 1, 
+        "Phi_PT": 100, 
+        "Phi_VCHI2DOF": 10, 
+        "RelatedInfoTools": [
+            {
+                "Location": "RelInfoVertexIsolation", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[D_s+ -> ( X0 -> ^mu+ mu- pi+ pi- ) pi+ ]CC": "Muon1BDT", 
+                    "[D_s+ -> ( X0 -> mu+ ^mu- pi+ pi- ) pi+ ]CC": "Muon2BDT", 
+                    "[D_s+ -> ( X0 -> mu+ mu- ^pi+ pi- ) pi+ ]CC": "Pi1BDT", 
+                    "[D_s+ -> ( X0 -> mu+ mu- pi+ ^pi- ) pi+ ]CC": "Pi2BDT", 
+                    "[D_s+ -> ( X0 -> mu+ mu- pi+ pi- ) ^pi+ ]CC": "Pi3BDT"
+                }, 
+                "Type": "RelInfoMuonIDPlus", 
+                "Variables": [ "MU_BDT" ]
+            }, 
+            {
+                "Location": "RelInfoVertexIsolationBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "ConeAngle": 1.0, 
+                "Location": "RelInfoConeVariables_1.0", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeAngle": 1.5, 
+                "Location": "RelInfoConeVariables_1.5", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeAngle": 2.0, 
+                "Location": "RelInfoConeVariables_2.0", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "Location": "RelInfoTrackIsolationBDT", 
+                "Type": "RelInfoTrackIsolationBDT"
+            }, 
+            {
+                "Location": "RelInfoTrackIsolationBDT2", 
+                "Particles": [
+                    1, 
+                    2
+                ], 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }, 
+            {
+                "Location": "RelInfoBstautauCDFIso", 
+                "Type": "RelInfoBstautauCDFIso"
+            }
+        ]
+    }, 
+    "STREAMS": [ "Charm" ], 
+    "WGs": [ "BandQ" ]
+}
+
+
+###############################################################################
+#                                                                             #
+#                                                                             #
+# Module for selecting Heavy Baryon lines:                                    #
+# Xi_b -> J/psi Xi                                                            #
+# Xi_b0 -> J/psi Xi*                                                          #
+# Omega_b -> J/psi Omega                                                      #
+#                                                                             #
+# Author: Yasmine Amhis, updated by Vitalii Lisovskyi                         #
+#                                                                             #
+#                                                                             #
+###############################################################################
+
+
+HeavyBaryon = {
+    "BUILDERTYPE": "HeavyBaryonsConf", 
+    "CONFIG": {
+        "DLSForLongLived": 5.0, 
+        "JpsiMassWindow": 100.0, 
+        "KaonPIDK": -5.0, 
+        "OmegaMassWindow": 30.0, 
+        "OmegabminusMassWindow": 500.0, 
+        "PionPIDK": 5.0, 
+        "TRCHI2DOF": 4.0, 
+        "XiMassWindow": 30.0, 
+        "XibminusMassWindow": 300.0, 
+        "XibzeroMassWindow": 500.0
+    }, 
+    "STREAMS": [ "Dimuon" ], 
+    "WGs": [ "BandQ" ]
+}
+
+
+###############################################################################
+#                                                                             #
+#                                                                             #
+# Module for selecting Lambda_b0 -> Lambda0 X(3872)/psi(2S) line,             #
+#                                                                             #
+# Author: Xijun Wang                                                          #
+#                                                                             #
+#                                                                             #
+###############################################################################
+
+
+Lb2L0X3872 = {
+    "BUILDERTYPE": "Lb2L0X3872Conf", 
+    "CONFIG": {
+        "JpsiComCuts": "(in_range(2.5*GeV, AM, 4.0*GeV))", 
+        "JpsiMomCuts": "(VFASPF(VCHI2) < 25.)", 
+        "L0Cuts": "(MAXTREE('p+'==ABSID, PT) > 10.*MeV) & (MAXTREE('pi-'==ABSID, PT) > 10.*MeV) & (ADMASS('Lambda0') < 50.*MeV) & (VFASPF(VCHI2) < 25 )", 
+        "LbComCuts": "((AM > 5000.*MeV) & (AM < 6200.*MeV))", 
+        "LbMomCuts": "(VFASPF(VCHI2) < 25.)", 
+        "LooseJpsiCuts": "(MINTREE('mu+'==ABSID,PT) > 500.0 *MeV) & (MM > 2996.916) & (MM < 3196.916) & ((BPVDLS>2.5) | (BPVDLS<-2.5)) & (MINTREE('mu+'==ABSID,PIDmu) > 0.0)  & (VFASPF(VCHI2) < 25.)", 
+        "PionCuts_X": "(TRCHI2DOF < 4.0) & (PT > 10.*MeV) & (PROBNNpi > 0.2) & ( MIPCHI2DV(PRIMARY) >4)", 
+        "Prescale": 1.0, 
+        "XComCuts": "((AM > 3200*MeV) & (AM < 5000.*MeV))", 
+        "XMomCuts": "(VFASPF(VCHI2) < 100.)"
+    }, 
+    "STREAMS": [ "Dimuon" ], 
+    "WGs": [ "BandQ" ]
+}
+
+
+###############################################################################
+#                                                                             #
+#                                                                             #
+# Module for selecting                                                        #
+# Lambda_b -> Lambda K- D_s+                                                  #
+# Xi_b- -> Lambda K- D0                                                       #
+# Xi_b0 -> Lambda K- D+                                                       #
+#                                                                             #
+# Author: Marian Stahl                                                        #
+#                                                                             #
+#                                                                             #
+###############################################################################
+
+
+XbToLambdaKmX = {
+    "BUILDERTYPE": "XbToLambdaKmXConf", 
+    "CONFIG": {
+        "b_decays": {
+            "Lb2LKDs": {
+                "DD": {
+                    "comb12_cut": "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)", 
+                    "comb_cut": "(ADOCA(1,3)<2*mm) & (ADOCA(2,3)<2*mm) & (ASUM(PT)>4.8*GeV) & (AMASS()>5*GeV) & (AMASS()<6.1*GeV)", 
+                    "daughters": [
+                        "ds", 
+                        "bach_kaon", 
+                        "lambda_dd"
+                    ], 
+                    "descriptors": [
+                        "[Lambda_b0 -> D_s+ K- Lambda0]cc"
+                    ], 
+                    "mother_cut": "(in_range(5.1*GeV,M,6*GeV)) & (P>36*GeV) & (PT>4.5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.1*mm) & (BPVIPCHI2()<16) &\n                             (CHILDIP(1)<0.3*mm) & (CHILDIP(2)<0.2*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm)"
+                }, 
+                "LL": {
+                    "comb12_cut": "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)", 
+                    "comb_cut": "(ADOCA(1,3)<0.6*mm) & (ADOCA(2,3)<0.3*mm) & (ASUM(PT)>4.8*GeV) & (AMASS()>5*GeV) & (AMASS()<6.1*GeV)", 
+                    "daughters": [
+                        "ds", 
+                        "bach_kaon", 
+                        "lambda_ll"
+                    ], 
+                    "descriptors": [
+                        "[Lambda_b0 -> D_s+ K- Lambda0]cc"
+                    ], 
+                    "mother_cut": "(in_range(5.1*GeV,M,6*GeV)) & (P>36*GeV) & (PT>4.5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.2*mm) & (BPVIPCHI2()<16) & (CHILDIP(1)<0.3*mm) &\n                             (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.4*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm) & ((CHILD(VFASPF(VZ),3) - VFASPF(VZ))>10*mm)"
+                }
+            }, 
+            "Xib02LKD": {
+                "DD": {
+                    "comb12_cut": "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)", 
+                    "comb_cut": "(ADOCA(1,3)<2*mm) & (ADOCA(2,3)<2*mm) & (ASUM(PT)>5.2*GeV) & (AMASS()>5.3*GeV) & (AMASS()<6.2*GeV)", 
+                    "daughters": [
+                        "dp", 
+                        "bach_kaon", 
+                        "lambda_dd"
+                    ], 
+                    "descriptors": [
+                        "[Xi_b0 -> D+ K- Lambda0]cc"
+                    ], 
+                    "mother_cut": "(in_range(5.4*GeV,M,6.1*GeV)) & (P>36*GeV) & (PT>5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.1*mm) & (BPVIPCHI2()<16) &\n                             (CHILDIP(1)<0.3*mm) & (CHILDIP(2)<0.2*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm)"
+                }, 
+                "LL": {
+                    "comb12_cut": "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)", 
+                    "comb_cut": "(ADOCA(1,3)<0.6*mm) & (ADOCA(2,3)<0.3*mm) & (ASUM(PT)>5.2*GeV) & (AMASS()>5.3*GeV) & (AMASS()<6.2*GeV)", 
+                    "daughters": [
+                        "dp", 
+                        "bach_kaon", 
+                        "lambda_ll"
+                    ], 
+                    "descriptors": [
+                        "[Xi_b0 -> D+ K- Lambda0]cc"
+                    ], 
+                    "mother_cut": "(in_range(5.4*GeV,M,6.1*GeV)) & (P>36*GeV) & (PT>5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.2*mm) & (BPVIPCHI2()<16) & (CHILDIP(1)<0.3*mm) &\n                             (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.4*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm) & ((CHILD(VFASPF(VZ),3) - VFASPF(VZ))>10*mm)"
+                }
+            }, 
+            "Xib2LKD0": {
+                "DD": {
+                    "comb12_cut": "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)", 
+                    "comb_cut": "(ADOCA(1,3)<2*mm) & (ADOCA(2,3)<2*mm) & (ASUM(PT)>5.2*GeV) & (AMASS()>5.3*GeV) & (AMASS()<6.4*GeV)", 
+                    "daughters": [
+                        "dz", 
+                        "bach_kaon", 
+                        "lambda_dd"
+                    ], 
+                    "descriptors": [
+                        "[Xi_b- -> D0 K- Lambda0]cc"
+                    ], 
+                    "mother_cut": "(in_range(5.4*GeV,M,6.3*GeV)) & (P>36*GeV) & (PT>5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.1*mm) & (BPVIPCHI2()<16) &\n                             (CHILDIP(1)<0.3*mm) & (CHILDIP(2)<0.2*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm)"
+                }, 
+                "LL": {
+                    "comb12_cut": "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)", 
+                    "comb_cut": "(ADOCA(1,3)<0.6*mm) & (ADOCA(2,3)<0.3*mm) & (ASUM(PT)>5.2*GeV) & (AMASS()>5.3*GeV) & (AMASS()<6.4*GeV)", 
+                    "daughters": [
+                        "dz", 
+                        "bach_kaon", 
+                        "lambda_ll"
+                    ], 
+                    "descriptors": [
+                        "[Xi_b- -> D0 K- Lambda0]cc"
+                    ], 
+                    "mother_cut": "(in_range(5.4*GeV,M,6.3*GeV)) & (P>36*GeV) & (PT>5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.2*mm) & (BPVIPCHI2()<16) & (CHILDIP(1)<0.3*mm) &\n                             (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.4*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm) & ((CHILD(VFASPF(VZ),3) - VFASPF(VZ))>10*mm)"
+                }
+            }
+        }, 
+        "bach_kaon": {
+            "filter": "(P>4*GeV) & (PT>250*MeV) & (MIPCHI2DV(PRIMARY)>4) & (PROBNNk>0.03)", 
+            "tes": "Phys/StdAllNoPIDsKaons/Particles"
+        }, 
+        "bach_pion": {
+            "filter": "(P>2*GeV) & (PT>150*MeV) & (MIPCHI2DV(PRIMARY)>4) & (PROBNNpi>0.03)", 
+            "tes": "Phys/StdAllNoPIDsPions/Particles"
+        }, 
+        "dfb_kids": {
+            "D": {
+                "K": 1, 
+                "pi1": 2, 
+                "pi2": 3
+            }, 
+            "D0": {
+                "K": 1, 
+                "pi": 2
+            }, 
+            "Ds": {
+                "Km": 2, 
+                "Kp": 1, 
+                "pi": 3
+            }
+        }, 
+        "dfb_weights_path": "$TMVAWEIGHTSROOT/data/DfromB/{}Pi_2018_GBDT.weights.xml",
+        "dp": {
+            "comb12_cut": "(ADOCA(1,2)<0.2*mm) & (AMASS(1,2)<1840*MeV)", 
+            "comb_cut": "(ASUM(PT)>1.4*GeV) & (ADAMASS('D+')<120*MeV) & (ADOCA(1,3)<0.3*mm) & (ADOCA(2,3)<0.3*mm)", 
+            "descriptors": [
+                "[D+ -> K- pi+ pi+]cc"
+            ], 
+            "mother_cut": "(ADMASS('D+')<80*MeV) & (P>12*GeV) & (PT>1.2*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.4*mm) & (CHILDIP(1)<0.2*mm) &\n                         (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.3*mm) & (VALUE('LoKi::Hybrid::DictValue/D_BDT')>-0.9)"
+        }, 
+        "ds": {
+            "comb12_cut": "(ADOCA(1,2)<0.2*mm) & (AMASS(1,2)<1940*MeV)", 
+            "comb_cut": "(ASUM(PT)>1.4*GeV) & (ADAMASS('D_s+')<120*MeV) & (ADOCA(1,3)<0.3*mm) & (ADOCA(2,3)<0.3*mm)", 
+            "descriptors": [
+                "[D_s+ -> K+ K- pi+]cc"
+            ], 
+            "mother_cut": "(ADMASS('D_s+')<80*MeV) & (P>12*GeV) & (PT>1.3*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.4*mm) &\n                         (CHILDIP(1)<0.2*mm) & (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.3*mm) & (VALUE('LoKi::Hybrid::DictValue/Ds_BDT')>-0.9)"
+        }, 
+        "dz": {
+            "comb_cut": "(ASUM(PT)>1.4*GeV) & (ADAMASS('D0')<120*MeV) & (ADOCA(1,2)<0.3*mm)", 
+            "descriptors": [
+                "[D0 -> K- pi+]cc"
+            ], 
+            "mother_cut": "(ADMASS('D0')<80*MeV) & (P>12*GeV) & (PT>1.2*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.4*mm) &\n                         (CHILDIP(1)<0.3*mm) & (CHILDIP(2)<0.3*mm) & (VALUE('LoKi::Hybrid::DictValue/D0_BDT')>-0.8)"
+        }, 
+        "lambda_dd": {
+            "filter": "(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>1*GeV) & (CHILDIP(1)<2*mm) & (MAXTREE('p+'==ABSID,P)>9*GeV)", 
+            "tes": "Phys/StdLooseLambdaDD/Particles"
+        }, 
+        "lambda_ll": {
+            "filter": "(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>0.8*GeV) & (BPVVDZ>10*mm) & (BPVVDCHI2>32) &\n                    (DOCA(1,2)<0.5*mm) & (DOCACHI2(1,2)<16) & (MAXTREE('p+'==ABSID,P)>7.5*GeV) &\n                    (MAXTREE('p+'==ABSID,MIPCHI2DV(PRIMARY))>9) & (MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))>9)", 
+            "tes": "Phys/StdVeryLooseLambdaLL/Particles"
+        }
+    }, 
+    "STREAMS": {
+        "Bhadron": [
+            "StrippingXbToLambdaKmX_Xib2LKD0Line", 
+            "StrippingXbToLambdaKmX_Xib02LKDLine", 
+            "StrippingXbToLambdaKmX_Lb2LKDsLine"
+        ]
+    }, 
+    "WGs": [ "BandQ" ]
+}
+
+
+###############################################################################
+#                                                                             #
+#                                                                             #
+# Module for selecting Ccbar->LambdaLambda detached line,                     #
+# with loose PT, PID cuts.                                                    #
+# Updated for run2 re-stripping                                               #
+# A new line named 'Jpsi2LooseLambdaLambdaLine'                               #
+# which is made up by Lambda0 anti-Lambda0                                    #
+# from basic StdAllLoose and StdNoPIDsDown pion/proton combination            #
+# Apply very loose P/PT cuts on proton and pions                              #
+#                                                                             #
+# Authos: Andrii Usachov, Jinlin Fu, Ziyi Wang                                #
+#                                                                             #
+#                                                                             #
+###############################################################################
+
+Ccbar2LambdaLambda = {
+    'BUILDERTYPE' : 'Ccbar2LambdaLambdaConf',
+    'CONFIG' : {
+          'TRCHI2DOF'               :     5.
+        , 'TRIPCHI2'                :     4.
+        , 'ProtonProbNNp'           :     0.3
+        , 'ProtonPTSec'             :   250.  # MeV
+        , 'PionProbNNpi'            :     0.1 
+        , 'PionPTSec'               :   250.  # MeV
+        , 'LambdaMassW'             :    30   
+        , 'LambdaVCHI2DOF'          :     9   
+        , 'CombMaxMass'             : 15100.  # MeV, before Vtx fit
+        , 'CombMinMass'             :  2700.  # MeV, before Vtx fit
+        , 'MaxMass'                 : 15000.  # MeV, after Vtx fit
+        , 'MinMass'                 :  2750.  # MeV, after Vtx fit
+        , 'Lambda0_MassWindowLarge' :   180   #MeV
+        , 'Lambda0_APT'             :   700   #MeV
+        , 'Lambda0_ENDVERTEXCHI2'   :    10
+        , 'LambdaBPVDLSMAX'         :    20
+        , 'TRCHI2DOFMax'            :     3.0
+        , 'TrGhostProbMax'          :     0.5
+        , 'MINIPCHI2'               :     4.0
+        , 'PionP'                   :     2.0*GeV
+        , 'PionPT'                  :   100.0*MeV
+        , 'PionPIDK'                :    10.0
+        , 'ProtonP'                 :     2.0*GeV
+        , 'ProtonPT'                :   100.0*MeV
+        , 'Proton_PIDpPIDpi_Min'    :     5.0
+        , 'Proton_PIDpPIDK_Min'     :     0.0
+        , 'Jpsi_ENDVERTEX_Z'        :   200*mm
+        , 'Jpsi_BPVIPCHI2'          :    25.0
+        },
+    'STREAMS' : [ 'Charm'],
+    'WGs'     : [ 'BandQ']
+    }
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Calib.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Calib.py
new file mode 100644
index 000000000..8105e5b81
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Calib.py
@@ -0,0 +1,114 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+################################################################################
+##                          S T R I P P I N G  34r0p2                         ##
+##                                                                            ##
+##  Configuration for Calib WG                                                ##
+##  Contact person: Louis Henry      (louis.henry@cern.ch)                    ##
+################################################################################
+
+Dst2D0Pi = {
+    "BUILDERTYPE": "StrippingDst2D0PiConf", 
+    "CONFIG": {
+        "D0MaxIPChi2": 9, 
+        "D0MaxM": 2100, 
+        "D0MinDIRA": 0.9999, 
+        "D0MinM": 1600, 
+        "D0MinVVDChi2": 64, 
+        "D0MinVtxProb": 0.001, 
+        "Dst2D0PiLinePostscale": 1, 
+        "Dst2D0PiLinePrescale": 1, 
+        "Dst2D0etaPiLinePostscale": 1, 
+        "Dst2D0etaPiLinePrescale": 1, 
+        "Dst_PT_MIN": 4000, 
+        "Dst_VCHI2PDOF_MAX": 9, 
+        "Dst_VIPCHI2_MAX": 9, 
+        "Dst_VVDCHI2_MAX": 16, 
+        "Dst_dAM_MAX": 195.421, 
+        "Dst_dAM_MIN": 95.421, 
+        "Dst_dM_MAX": 155.421, 
+        "Dst_dM_MIN": 135.421, 
+        "EtaMassMax": 650, 
+        "EtaMassMin": 450, 
+        "EtaMinPT": 1500, 
+        "GammaMinPT": 2000, 
+        "SoftPionMaxIPChi2": 16, 
+        "TrackMaxGhostProb": 0.3, 
+        "TrackMinIPChi2": 16, 
+        "TrackMinPT": 300, 
+        "TrackMinTrackProb": 1e-06
+    }, 
+    "STREAMS": [ "CharmCompleteEvent" ], 
+    "WGs": [ "Calib" ]
+}
+
+Eta2MuMuGamma = {
+    "BUILDERTYPE": "StrippingEta2MuMuGammaConf",
+    "CONFIG": {
+        "EtaMassMax": 1000,
+        "EtaMassMin": 0,
+        "FDChi2": 45,
+        "GPT": 500,
+        "K0MassMax": 1000,
+        "K0MassMin": 0,
+        "K0_PT": 1000,
+        "MMG_LinePostscale": 1,
+        "MMG_LinePrescale": 1,
+        "MuIPChi2": 6,
+        "MuPT": 500,
+        "MuProbNNmu": 0.2
+    },
+    "STREAMS": [ "CharmCompleteEvent" ],
+    "WGs": [ "Calib" ]
+}
+
+ElectronIDCalib = {
+    "BUILDERTYPE": "ElectronIDConf", 
+    "CONFIG": {
+        "Both_MIPCHI2": 9.0, 
+        "Both_P": 3000.0, 
+        "Both_PT": 500.0, 
+        "Both_TRCHI2DOF": 5.0, 
+        "Bu2JpsieeKLine_BuComCut": "in_range(4.1*GeV,AM,6.1*GeV)", 
+        "Bu2JpsieeKLine_BuMomCut": "in_range(4.2*GeV,M, 6.0*GeV) & (VFASPF(VCHI2PDOF)<9)", 
+        "Bu2JpsieeKLine_HltFilter": None, 
+        "Bu2JpsieeKLine_JpsiCut": "(BPVDLS>4)", 
+        "Bu2JpsieeKLine_KaonCut": "(TRCHI2DOF<4) & (PT>1.0*GeV) & (P>3.0*GeV) & (PIDK>5) & (BPVIPCHI2()>9)", 
+        "Bu2JpsieeKLine_Prescale": 1, 
+        "Bu2JpsieeKLine_notagID_BuComCut": "in_range(3.6*GeV,AM,8.*GeV)", 
+        "Bu2JpsieeKLine_notagID_BuMomCut": "(PT>3200) & (VFASPF(VCHI2PDOF)<9) & in_range(4.5*GeV,DTF_FUN(M,True,'J/psi(1S)'),6.0*GeV)", 
+        "Bu2JpsieeKLine_notagID_HltFilter": None, 
+        "Bu2JpsieeKLine_notagID_JpsiCut": "(BPVDLS>4)", 
+        "Bu2JpsieeKLine_notagID_KaonCut": "(TRCHI2DOF<4) & (PT>1.0*GeV) & (P>3.0*GeV) & (PIDK>5) & (BPVIPCHI2()>9)", 
+        "Bu2JpsieeKLine_notagID_Prescale": 1, 
+        "JpsiLineCut": "(PT>2.*GeV) & (BPVDLS>50) ", 
+        "JpsiLineHltFilter": None, 
+        "JpsiLinePrescale": 0, 
+        "Probe_MIPCHI2": 9.0, 
+        "Probe_P": 3000.0, 
+        "Probe_PT": 500.0, 
+        "Tag_MIPCHI2": 9.0, 
+        "Tag_P": 6000.0, 
+        "Tag_PIDe": 5.0, 
+        "Tag_PT": 1500.0, 
+        "eeCombMaxMass": 4300.0, 
+        "eeCombMinMass": 2100.0, 
+        "eeMaxMass": 4200.0, 
+        "eeMinMass": 2200.0, 
+        "eeVCHI2PDOF": 9.0
+    }, 
+    "STREAMS": {
+        "BhadronCompleteEvent": [ "StrippingElectronIDCalibBu2JpsiKLine" ], 
+        "Leptonic": [ "StrippingElectronIDCalibBu2JpsiK_notagIDLine" ]
+    }, 
+    "WGs": [ "Calib" ]
+}
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charm.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charm.py
new file mode 100644
index 000000000..a87e316ce
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charm.py
@@ -0,0 +1,981 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+################################################################################
+##                          S T R I P P I N G  34r0p2                         ##
+##                                                                            ##
+##  Configuration for Charm WG                                                ##
+##  Contact person: Shantam Taneja   (shantam.taneja@cern.ch)                 ##
+################################################################################
+
+from GaudiKernel.SystemOfUnits import *
+
+######################################################################
+## StrippingBs2st2pKpipipiLine (DST.DST)
+## StrippingBs2st2pKpipipiSSLine (DST.DST)
+## StrippingBs2st2pKpipipiWSLine (DST.DST)
+## StrippingBs2st2pKpipipiWSSSLine (DST.DST)
+
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingBs2st2Kpipipi.py
+## Authors: Matt Rudolph
+######################################################################
+
+Bs2st2pKpipipi = {
+    "BUILDERTYPE": "Bs2st2pKpipipiConf",
+    "CONFIG": {
+        "BK_MaxDM": 700.0,
+        "BK_MaxPVDZ": 1.0,
+        "BK_MinPT": 50.0,
+        "B_MaxDOCAChi2": 20.0,
+        "B_MaxM_4body": 3000.0,
+        "B_MaxVtxChi2": 3.0,
+        "B_MinDira": 0.999,
+        "B_MinM_4body": 2400.0,
+        "B_MinPT_4body": 2000.0,
+        "B_MinSumPT_4body": 4000.0,
+        "B_MinVDChi2": 120.0,
+        "Km_MaxIPChi2": 4,
+        "Km_MaxPperp": 315.0,
+        "Km_MinPT": 600,
+        "Km_MinPperp": 70.0,
+        "Km_MinProbNNk": 0.2,
+        "Postscale": 1.0,
+        "Prescale": 1.0,
+        "Trk_MaxChi2Ndof": 4.0,
+        "Trk_MaxGhostProb": 0.4,
+        "Trk_MinIPChi2": 16.0,
+        "Trk_MinP": 1000.0,
+        "Trk_MinProbNNp": 0.1,
+        "Trk_MinProbNNpi": 0.1
+    },
+    "STREAMS": [ "CharmCompleteEvent" ],
+    "WGs": [ "Charm" ]
+}
+
+######################################################################
+## Secondary Charm decays from semiloptin B-decays
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingCharmFromBSemi.py
+## Authors: Tomasso Pajero + others from previous campaigns
+######################################################################
+
+
+CharmFromBSemi = {
+    "BUILDERTYPE": "CharmFromBSemiAllLinesConf", 
+    "CONFIG": {
+        "BDIRA": 0.999, 
+        "BVCHI2DOF": 6.0, 
+        "CombMassHigh_HH": 1820, 
+        "CombMassLow_HH": 0, 
+        "D02HHGammaAMassWin": 220, 
+        "D02HHGammaMassWin": 210, 
+        "D02HHHHPrescale": 1, 
+        "D02HHPi0AMassWin": 220, 
+        "D02HHPi0DocaCut": 6.0, 
+        "D02HHPi0MassWin": 210, 
+        "D02KSHHPi0AMassWin": 260, 
+        "D02KSHHPi0MassWin": 230, 
+        "D02KSHHPi0_D0PT": 1000, 
+        "D02KSHHPi0_D0PTComb": 1000, 
+        "D02KSHHPi0_PTSUMLoose": 1000, 
+        "D0decaysPrescale": 1, 
+        "D0radiativePrescale": 1, 
+        "DDocaChi2Max": 20, 
+        "DZ": 0, 
+        "Ds2HHHHPrescale": 1, 
+        "DsAMassWin": 100.0, 
+        "DsDIRA": 0.99, 
+        "DsFDCHI2": 100.0, 
+        "DsIP": 7.4, 
+        "DsMassWin": 80.0, 
+        "DsVCHI2DOF": 6.0, 
+        "DsdecaysPrescale": 1, 
+        "Dstar_Chi2": 8.0, 
+        "Dstar_SoftPion_PIDe": 2.0, 
+        "Dstar_SoftPion_PT": 80.0, 
+        "Dstar_wideDMCutLower": 0.0, 
+        "Dstar_wideDMCutUpper": 170.0, 
+        "Dto4hADocaChi2Max": 7, 
+        "Dto4h_AMassWin": 65.0, 
+        "Dto4h_MassWin": 60.0, 
+        "DtoXgammaADocaChi2Max": 10, 
+        "GEC_nLongTrk": 250, 
+        "HLT2": "HLT_PASS_RE('Hlt2.*SingleMuon.*Decision') | HLT_PASS_RE('Hlt2Topo.*Decision')", 
+        "KPiPT": 250.0, 
+        "KSCutDIRA": 0.99, 
+        "KSCutZFDFromD": 10.0, 
+        "KSDDCutFDChi2": 100, 
+        "KSDDCutMass": 35, 
+        "KSDDPMin": 2000, 
+        "KSDDPTMin": 200, 
+        "KSDaugTrackChi2": 4, 
+        "KSLLCutFDChi2": 100, 
+        "KSLLCutMass": 35, 
+        "KSLLPMin": 2000, 
+        "KSLLPTMin": 200, 
+        "KSVertexChi2": 6, 
+        "KaonPIDK": 4.0, 
+        "KaonPIDKloose": -5, 
+        "LambdaCutDIRA": 0.99, 
+        "LambdaDDCutFDChi2": 100, 
+        "LambdaDDCutMass": 30, 
+        "LambdaDDPMin": 3000, 
+        "LambdaDDPTMin": 800, 
+        "LambdaDaugTrackChi2": 4, 
+        "LambdaLLCutFDChi2": 100, 
+        "LambdaLLCutMass": 30, 
+        "LambdaLLPMin": 2000, 
+        "LambdaLLPTMin": 500, 
+        "LambdaVertexChi2": 6, 
+        "Lc2HHHPrescale": 1, 
+        "Lc2HHPrescale": 1, 
+        "MINIPCHI2": 9.0, 
+        "MINIPCHI2Loose": 4.0, 
+        "MassHigh_HH": 1810, 
+        "MassLow_HH": 0, 
+        "MaxBMass": 7500, 
+        "MaxConvPhDDChi": 9, 
+        "MaxConvPhDDMass": 100, 
+        "MaxConvPhLLChi": 9, 
+        "MaxConvPhLLMass": 100, 
+        "MaxVCHI2NDOF_HH": 10.0, 
+        "MinBMass": 2500, 
+        "MinConvPhDDPT": 800, 
+        "MinConvPhLLPT": 800, 
+        "MinVDCHI2_HH": 1000.0, 
+        "MuonIPCHI2": 4.0, 
+        "MuonPT": 600.0, 
+        "PIDmu": -0.0, 
+        "PTSUM": 1800.0, 
+        "PTSUMLoose": 1400.0, 
+        "PTSUM_HHGamma": 1800.0, 
+        "PTSUM_HHPi0": 1800.0, 
+        "PhotonCL": 0.25, 
+        "PhotonPT": 1500, 
+        "Pi0PMin": 2000, 
+        "Pi0PtMin": 1000, 
+        "PionPIDK": 10.0, 
+        "PionPIDKTight": 4.0, 
+        "TRCHI2": 4.0, 
+        "TTSpecs": {
+            "Hlt1.*Track.*Decision%TOS": 0, 
+            "Hlt2.*SingleMuon.*Decision%TOS": 0, 
+            "Hlt2Global%TIS": 0, 
+            "Hlt2Topo.*Decision%TOS": 0
+        }, 
+        "TrGhostProbMax": 0.5, 
+        "b2DstarMuXPrescale": 1
+    }, 
+    "STREAMS": [ "Charm" ], 
+    "WGs": [ "Charm" ]
+}
+
+######################################################################
+## StrippingD2pimuLine
+## StrippingD2KmuLine
+## StrippingD2piELine
+## StrippingD2KELine
+## StrippingD2KmuSSLine
+## StrippingD2piESSLine
+## StrippingD2KESSLine
+
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingD2HMuNu.py
+## Authors: Liang Sun, Adam Davis
+######################################################################
+
+D2HMuNu = {
+    "BUILDERTYPE": "D2HLepNuBuilder",
+    "CONFIG": {
+        "BDIRA": 0.999,
+        "BFDCHI2HIGH": 100.0,
+        "BPVVDZcut": 0.0,
+        "BVCHI2DOF": 20,
+        "DELTA_MASS_MAX": 400,
+        "ElectronPIDe": 1.0,
+        "ElectronPT": 500,
+        "GEC_nLongTrk": 160.0,
+        "KLepMassHigh": 2000,
+        "KLepMassLow": 500,
+        "KaonMINIPCHI2": 9,
+        "KaonP": 3000.0,
+        "KaonPIDK": 5.0,
+        "KaonPIDmu": 5.0,
+        "KaonPIDp": 5.0,
+        "KaonPT": 800.0,
+        "MuonGHOSTPROB": 0.35,
+        "MuonPIDK": 0.0,
+        "MuonPIDmu": 3.0,
+        "MuonPIDp": 0.0,
+        "MuonPT": 500.0,
+        "Slowpion_P": 1000,
+        "Slowpion_PIDe": 5,
+        "Slowpion_PT": 300,
+        "Slowpion_TRGHOSTPROB": 0.35,
+        "TOSFilter": {
+            "Hlt2CharmHad.*HHX.*Decision%TOS": 0
+        },
+        "TRGHOSTPROB": 0.35,
+        "useTOS": True
+    },
+    "STREAMS": [ "Charm" ],
+    "WGs": [ "Charm" ]
+}
+
+
+######################################################################
+## StrippingD2KpipimuLine (DST.DST)
+## StrippingD2KpipiELine (DST.DST)
+## StrippingD2Kpipimu_KLepSSLine (DST.DST)
+## StrippingD2Kpipimu_SSLine (DST.DST)
+## StrippingD2KpipiE_KLepSSLine (DST.DST)
+## StrippingD2KpipiE_SSLine (DST.DST)
+
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingD2KPiPiMuNu.py
+## Authors: Liang Sun
+######################################################################
+
+D2KPiPiMuNu = {
+    "BUILDERTYPE": "D2KPiPiMuNuBuilder", 
+    "CONFIG": {
+        "BDIRA": 0.999, 
+        "BFDCHI2HIGH": 30.0, 
+        "BPVVDZcut": 0.0, 
+        "BVCHI2DOF": 10, 
+        "D0IPCHI2Max": 36.0, 
+        "DAUMINIPCHI2": 3, 
+        "DELTA_MASS_MAX": 200, 
+        "ElectronP": 3000.0, 
+        "ElectronPIDe": 2, 
+        "ElectronPT": 300, 
+        "GEC_nLongTrk": 160.0, 
+        "KPiPiMuMassHigh": 2000, 
+        "KPiPiMuMassLow": 800, 
+        "KaonP": 3000.0, 
+        "KaonPIDK": 5.0, 
+        "KaonPIDmu": 5.0, 
+        "KaonPIDp": 5.0, 
+        "KaonPT": 300.0, 
+        "KaonTRCHI2": 3.0, 
+        "MuonGHOSTPROB": 0.35, 
+        "MuonP": 3000.0, 
+        "MuonPIDK": 0.0, 
+        "MuonPIDmu": 3.0, 
+        "MuonPIDp": 0.0, 
+        "MuonPT": 300.0, 
+        "NoPIDK": False, 
+        "NoPIDmu": False, 
+        "NoPIDpi": False, 
+        "NoPIDpis": True, 
+        "PionPIDK": 0.0, 
+        "PionPIDmu": 0.0, 
+        "PionPIDp": 0.0, 
+        "SSonly": 2, 
+        "Slowpion_P": 1000, 
+        "Slowpion_PIDe": 5, 
+        "Slowpion_PT": 120, 
+        "Slowpion_TRGHOSTPROB": 0.35, 
+        "TOSFilter": {
+            "Hlt2CharmHad.*HHX.*Decision%TOS": 0
+        }, 
+        "TRGHOSTPROB": 0.35, 
+        "useTOS": False
+    }, 
+    "STREAMS": [ "CharmCompleteEvent" ], 
+    "WGs": [ "Charm" ]
+}
+
+######################################################################
+## StrippingDstarD2KSHHPi0DstarD2KKPi0KSLLLine (MDST.DST)
+## StrippingDstarD2KSHHPi0DstarD2KPiPi0KSDDLine (MDST.DST)
+## StrippingDstarD2KSHHPi0DstarD2KPiPi0KSLLLine (MDST.DST)
+## StrippingDstarD2KSHHPi0DstarD2PiPiPi0KSDDLine (MDST.DST)
+## StrippingDstarD2KSHHPi0DstarD2PiPiPi0KSLLLine (MDST.DST)
+
+
+
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingDstarD2KSHHPi0.py
+## Authors: Maurizio Martinelli, Tommaso Pajero
+######################################################################
+
+DstarD2KSHHPi0 = {
+    "BUILDERTYPE": "DstarD2KSHHPi0Lines", 
+    "CONFIG": {
+        "CombMassHigh": 2300.0, 
+        "CombMassLow": 1500.0, 
+        "Daug_TRCHI2DOF_MAX": 3, 
+        "Dstar_AMDiff_MAX": 190.0, 
+        "Dstar_MDiff_MAX": 170.0, 
+        "Dstar_VCHI2VDOF_MAX": 15.0, 
+        "HighPIDK": 0, 
+        "Hlt1Filter": None, 
+        "Hlt2Filter": None, 
+        "KSCutDIRA_DD": 0.99, 
+        "KSCutDIRA_LL": 0.99, 
+        "KSCutFDChi2_DD": 100, 
+        "KSCutFDChi2_LL": 100, 
+        "KSCutMass_DD": 50.0, 
+        "KSCutMass_LL": 35.0, 
+        "LowPIDK": 0, 
+        "MassHigh": 2100.0, 
+        "MassLow": 1650.0, 
+        "MaxADOCACHI2": 10.0, 
+        "MaxVCHI2NDOF": 12.0, 
+        "MaxZ_DD": 2275.0, 
+        "MaxZ_LL": 500.0, 
+        "MinBPVDIRA": 0.9998, 
+        "MinBPVTAU": 0.0001, 
+        "MinCombPT": 0.0, 
+        "MinFDCHI2": 15, 
+        "MinTrkIPChi2": 4, 
+        "MinTrkPT": 250.0, 
+        "MinZ_DD": 300.0, 
+        "MinZ_LL": -100.0, 
+        "PhotonCL": 0.25, 
+        "Pi0MassWin": 35.0, 
+        "Pi0PMin": 2000.0, 
+        "Pi0PtMin": 1000.0, 
+        "PrescaleDstarD2KKPi0KSDD": 1, 
+        "PrescaleDstarD2KKPi0KSLL": 1, 
+        "PrescaleDstarD2KPiPi0KSDD": 1, 
+        "PrescaleDstarD2KPiPi0KSLL": 1, 
+        "PrescaleDstarD2PiPiPi0KSDD": 1, 
+        "PrescaleDstarD2PiPiPi0KSLL": 1, 
+        "TrChi2": 4, 
+        "TrGhostProb": 0.5
+    }, 
+    "STREAMS": [ "Charm" ], 
+    "WGs": [ "Charm" ]
+}
+
+######################################################################
+## StrippingLambdac2V0HLambdac2Lambda0PiLLLine
+## StrippingLambdac2V0HLambdac2Lambda0PiDDLine
+## StrippingLambdac2V0HLambdac2Lambda0KLLLine
+## StrippingLambdac2V0HLambdac2Lambda0KDDLine
+## StrippingLambdac2V0HLambdac2pKS0LLLine
+## StrippingLambdac2V0HLambdac2pKS0DDLine
+## StrippingLambdac2V0HXic2pKS0LLLine
+## StrippingLambdac2V0HXic2pKS0DDLine
+
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingLambdac2V0H.py
+## Authors: Miroslav Saur
+######################################################################
+
+Lambdac2V0H = {
+    "BUILDERTYPE": "StrippingLambdac2V0HConf", 
+    "CONFIG": {
+        "Bach_All_BPVIPCHI2_MIN": 4.0, 
+        "Bach_All_PT_MIN": 750.0, 
+        "Bach_ETA_MAX": 5.0, 
+        "Bach_ETA_MIN": 2.0, 
+        "Bach_P_MAX": 100000.0, 
+        "Bach_P_MIN": 2000.0, 
+        "Comb_ADAMASS_WIN": 90.0, 
+        "Comb_ADOCAMAX_MAX": 0.5, 
+        "Comb_PT_MIN": 1000.0, 
+        "Comb_XicPlus_ADAMASS_WIN": 90.0, 
+        "Hlt1Filter": None, 
+        "Hlt2Filter": None, 
+        "KS0_FDCHI2_MIN": 100, 
+        "KS0_PT_MIN": 500.0, 
+        "KS0_P_MIN": 2000.0, 
+        "KS0_VCHI2VDOF_MAX": 10.0, 
+        "K_PIDK_MIN": 5.0, 
+        "Lambda0_FDCHI2_MIN": 100, 
+        "Lambda0_PT_MIN": 500.0, 
+        "Lambda0_P_MIN": 2000.0, 
+        "Lambda0_VCHI2VDOF_MAX": 10.0, 
+        "Lambdac_PVDispCut": "(BPVVDCHI2 > 16.0)", 
+        "Lambdac_VCHI2VDOF_MAX": 10.0, 
+        "Lambdac_acosBPVDIRA_MAX": 0.14, 
+        "Pi_PIDK_MAX": 3.0, 
+        "PostscaleLambdac2Lambda0KDD": 1.0, 
+        "PostscaleLambdac2Lambda0KLL": 1.0, 
+        "PostscaleLambdac2Lambda0PiDD": 1.0, 
+        "PostscaleLambdac2Lambda0PiLL": 1.0, 
+        "PostscaleLambdac2pKS0DD": 1.0, 
+        "PostscaleLambdac2pKS0LL": 1.0, 
+        "PostscaleXic2pKS0DD": 1.0, 
+        "PostscaleXic2pKS0LL": 1.0, 
+        "PrescaleLambdac2Lambda0KDD": 1.0, 
+        "PrescaleLambdac2Lambda0KLL": 1.0, 
+        "PrescaleLambdac2Lambda0PiDD": 1.0, 
+        "PrescaleLambdac2Lambda0PiLL": 1.0, 
+        "PrescaleLambdac2pKS0DD": 1.0, 
+        "PrescaleLambdac2pKS0LL": 1.0, 
+        "PrescaleXic2pKS0DD": 1.0, 
+        "PrescaleXic2pKS0LL": 1.0, 
+        "Proton_PIDpPIDK_MIN": 2.0, 
+        "Proton_PIDpPIDpi_MIN": 7.0
+    }, 
+    "STREAMS": [ "Charm" ], 
+    "WGs": [ "Charm" ]
+}
+
+######################################################################
+## StrippingLambdacForNeutronPIDSigmac02LcpiLine (MDST.DST)
+## StrippingLambdacForNeutronPIDSigmacpp2LcpiLine (MDST.DST)
+
+
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingLambdacForNeutronPID.py
+## Authors: Marco Pappagallo
+######################################################################
+
+LambdacForNeutronPID = {
+    "BUILDERTYPE": "LambdacForNeutronPIDConf", 
+    "CONFIG": {
+        "KaonPID": 5.0, 
+        "LambdacForNeutronPIDPostScale": 1.0, 
+        "LambdacForNeutronPIDPreScale": 1.0, 
+        "MaxLcMass": 2200, 
+        "MaxLcVertChi2DOF": 16, 
+        "MaxSigmacVertChi2DOF": 16, 
+        "MaxTrackIPchi2": 9, 
+        "MinLcMass": 1400, 
+        "MinLcPT": 4000, 
+        "MinNeutronPT": 400.0, 
+        "MinPionPT": 250, 
+        "MinTrackIPchi2": 9, 
+        "MinTrackPT": 400.0, 
+        "PionPID": 0.0, 
+        "QValueSigmacDecay": 120, 
+        "SigmacPT": 0, 
+        "TrGhostProb": 0.3, 
+        "ctau": 0.1
+    }, 
+    "STREAMS": [ "Charm" ], 
+    "WGs": [ "Charm" ]
+}
+
+######################################################################
+## StrippingNeutralCBaryonsXic02LambdaKS0Line (MDST.DST)
+## StrippingNeutralCBaryonsXic02LambdaKpiLine (MDST.DST)
+## StrippingNeutralCBaryonsXic02pKLine (MDST.DST)
+## StrippingNeutralCBaryonsXic02XipiLine (MDST.DST)
+## StrippingNeutralCBaryonsXic02XiKLine (MDST.DST)
+## StrippingNeutralCBaryonsOmegac02OmegapiLine (MDST.DST)
+## StrippingNeutralCBaryonsOmegac02pKLine (MDST.DST)
+## StrippingNeutralCBaryonsOmegac02LambdaKS0Line (MDST.DST)
+## StrippingNeutralCBaryonsOmegac02LambdaKpiLine (MDST.DST)
+
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingNeutralCbaryons.py
+## Authors: Xuesong Liu, Xiao-Rui Lyu, Zhenwei Yang', Miroslav Saur, Ziyi Wang
+######################################################################
+
+NeutralCBaryons = {
+    "BUILDERTYPE": "StrippingNeutralCBaryonsConf", 
+    "CONFIG": {
+        "Bachelor_PT_MIN": 50.0, 
+        "KaonPIDK": -5.0, 
+        "LambdaDDMassWin": 5.7, 
+        "LambdaDDMaxVZ": 2275.0, 
+        "LambdaDDMinVZ": 400.0, 
+        "LambdaDDVtxChi2Max": 5.0, 
+        "LambdaDeltaZ_MIN": 5.0, 
+        "LambdaLLMassWin": 5.7, 
+        "LambdaLLMaxVZ": 400.0, 
+        "LambdaLLMinDecayTime": 0.005, 
+        "LambdaLLMinVZ": -100.0, 
+        "LambdaLLVtxChi2Max": 5.0, 
+        "LambdaPi_PT_MIN": 100.0, 
+        "LambdaPr_PT_MIN": 500.0, 
+        "PionPIDK": 10.0, 
+        "ProbNNkMin": 0.1, 
+        "ProbNNpMinDD": 0.05, 
+        "ProbNNpMinLL": 0.1, 
+        "ProtonPIDp": 5, 
+        "ProtonPIDpK": -3, 
+        "TRCHI2DOFMax": 3.0, 
+        "TrGhostProbMax": 0.25, 
+        "tight_KaonPIDK": 0.0, 
+        "tight_KaonPIDpi": 5.0, 
+        "tight_ProtonPIDp": 7, 
+        "tight_ProtonPIDpK": 0.0, 
+        "tight_ProtonPIDppi": 5.0
+    }, 
+    "STREAMS": [ "Charm" ], 
+    "WGs": [ "Charm" ]
+}
+
+######################################################################
+## StrippingXcpToLambdaKSpipLine (MDST.DST)
+
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingXcpToLambdaKSHp.py
+## Authors: Marian Stahl
+######################################################################
+
+XcpToLambdaKSHp = {
+    "BUILDERTYPE": "XcpToLambdaKSHpConf",
+    "CONFIG": {
+        "bach_kaon": {
+            "filter": "(P>4.5*GeV) & (PT>300*MeV) & (MIPCHI2DV(PRIMARY)>1) & (PROBNNk>0.05)",
+            "tes": "Phys/StdAllNoPIDsKaons/Particles"
+        },
+        "bach_pion": {
+            "filter": "(P>2*GeV) & (PT>150*MeV) & (MIPCHI2DV(PRIMARY)>1.5) & (PROBNNpi>0.05)",
+            "tes": "Phys/StdAllNoPIDsPions/Particles"
+        },
+        "descriptor_kaon": [
+                            "[Xi_c+ -> Lambda0 KS0 K+]cc"
+                            ],
+        "descriptor_pion": [
+                        "[Xi_c+ -> Lambda0 KS0 pi+]cc"
+                        ],
+        "kshort_dd": {
+            "filter": "(ADMASS('KS0')<25*MeV) & (PT>400*MeV) & (CHI2VXNDF<24) & (CHILDIP(1)<3*mm) & (CHILDIP(2)<3*mm) & (MAXTREE('pi+'==ABSID,PT)>150*MeV)",
+            "tes": "Phys/StdLooseKsDD/Particles"
+        },
+        "kshort_ll": {
+            "filter": "(ADMASS('KS0')<25*MeV) & (PT>300*MeV) & (CHI2VXNDF<24) & (BPVVDZ>4*mm) & (BPVVDCHI2>12) & (CHILDIP(1)<0.8*mm) &\n                    (CHILDIP(2)<0.8*mm) & (DOCA(1,2)<0.8*mm) & (MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))>12) & (MAXTREE('pi+'==ABSID,PT)>100*MeV)",
+            "tes": "Phys/StdVeryLooseKsLL/Particles"
+        },
+        "lambda_dd": {
+            "filter": "(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>1*GeV) & (CHILDIP(1)<2*mm) & (MAXTREE('p+'==ABSID,P)>9*GeV) &\n                    (MAXTREE('p+'==ABSID,PT)>800*MeV) & (MAXTREE('pi+'==ABSID,PT)>150*MeV)",
+            "tes": "Phys/StdLooseLambdaDD/Particles"
+        },
+        "lambda_ll": {
+            "filter": "(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>800*MeV) & (BPVVDZ>8*mm) & (BPVVDCHI2>32) &\n                    (DOCA(1,2)<0.6*mm) & (DOCACHI2(1,2)<16) & (MAXTREE('p+'==ABSID,PT)>600*MeV) & (MAXTREE('p+'==ABSID,P)>7.5*GeV) &\n                    (MAXTREE('p+'==ABSID,MIPCHI2DV(PRIMARY))>16) & (MAXTREE('pi+'==ABSID,PT)>100*MeV) & (MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))>16)",
+            "tes": "Phys/StdVeryLooseLambdaLL/Particles"
+        },
+        "xcp_dl": {
+            "comb12_cut": "(ADOCA(1,2)<2*mm) & (ACHI2DOCA(1,2)<20) & (AMASS(1,2)<2470*MeV)",
+            "comb_cut": "(ADOCA(1,3)<1.4*mm) & (ADOCA(2,3)<0.3*mm) & (ACHI2DOCA(1,3)<16) & (ACHI2DOCA(2,3)<12) & (ASUM(PT)>2.2*GeV) & (in_range(2070*MeV,AMASS(),2610*MeV))",
+            "mother_cut": "(P>24*GeV) & (PT>1.5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0*mm) & (in_range(2120*MeV,M,2560*MeV)) & (CHILDIP(1)<2*mm) & (CHILDIP(2)<0.4*mm) &\n                             (CHILDIP(3)<0.2*mm) & (CHILDIPCHI2(1)<16) & (CHILDIPCHI2(2)<14) & (CHILDIPCHI2(3)<8) & ((CHILD(VFASPF(VZ),2) - VFASPF(VZ))>4*mm)"
+        },
+        "xcp_ld": {
+            "comb12_cut": "(ADOCA(1,2)<2*mm) & (ACHI2DOCA(1,2)<24) & (AMASS(1,2)<2470*MeV)",
+            "comb_cut": "(ADOCA(1,3)<0.3*mm) & (ADOCA(2,3)<1.6*mm) & (ACHI2DOCA(1,3)<12) & (ACHI2DOCA(2,3)<16) & (ASUM(PT)>2.1*GeV) & (in_range(2070*MeV,AMASS(),2610*MeV))",
+            "mother_cut": "(P>24*GeV) & (PT>1.5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0*mm) & (in_range(2120*MeV,M,2560*MeV)) & (CHILDIP(1)<0.25*mm) & (CHILDIP(2)<3*mm) &\n                             (CHILDIP(3)<0.2*mm) & (CHILDIPCHI2(1)<14) & (CHILDIPCHI2(2)<16) & (CHILDIPCHI2(3)<8) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>8*mm)"
+        },
+        "xcp_ll": {
+            "comb12_cut": "(ACHI2DOCA(1,2)<12) & (ADOCA(1,2)<0.4*mm) & (AMASS(1,2)<2470*MeV)",
+            "comb_cut": "(ADOCA(1,3)<0.25*mm) & (ADOCA(2,3)<0.3*mm) & (ACHI2DOCA(1,3)<12) & (ACHI2DOCA(1,3)<12) & (ASUM(PT)>2*GeV) & (in_range(2070*MeV,AMASS(),2610*MeV))",
+            "mother_cut": "(P>24*GeV) & (PT>1.5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0*mm) & (in_range(2120*MeV,M,2560*MeV)) &\n                             (CHILDIP(1)<0.25*mm) & (CHILDIP(2)<0.4*mm) & (CHILDIP(3)<0.2*mm) & (CHILDIPCHI2(1)<12) & (CHILDIPCHI2(2)<12) & (CHILDIPCHI2(3)<8) &\n                             ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>8*mm) & ((CHILD(VFASPF(VZ),2) - VFASPF(VZ))>4*mm)"
+}
+    },
+    "STREAMS": {
+        "Charm": [
+                  "StrippingXcpToLambdaKSHp_PiLine",
+                  "StrippingXcpToLambdaKSHp_KLine"
+                  ]
+    },
+    "WGs": [ "Charm" ]
+}
+
+
+
+######################################################################
+## StrippingXcpToXiPipHp_PiLLLLine (DST.DST)
+## StrippingXcpToXiPipHp_PiDDLLine (DST.DST)
+## StrippingXcpToXiPipHp_PiDDDLine (DST.DST)
+## StrippingXcpToXiPipHp_KLLLLine (DST.DST)
+## StrippingXcpToXiPipHp_KDDLLine (DST.DST)
+##  StrippingXcpToXiPipHp_KDDDLine (DST.DST)
+
+
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingXcpToXiPipHp.py
+## Authors: Marian Stahl, Laurent Dufour
+######################################################################
+
+XcpToXiPipHp = {
+    "BUILDERTYPE": "XcpToXiPipHpConf", 
+    "CONFIG": {
+        "RequiredRawEvents": [ "Velo" ], 
+        "amass_xikpi": "(in_range(2160*MeV,AMASS(),2580*MeV)) & ", 
+        "amass_xipipi": "(in_range(2360*MeV,AMASS(),2580*MeV)) & ", 
+        "bach_kaon": {
+            "filter": "(P>4.5*GeV) & (PT>300*MeV) & (MIPCHI2DV(PRIMARY)>1) & (PROBNNk>0.1)", 
+            "tes": "Phys/StdAllNoPIDsKaons/Particles"
+        }, 
+        "bach_pion": {
+            "filter": "(P>2*GeV) & (PT>100*MeV) & (MIPDV(PRIMARY)>0.01*mm) & (MIPCHI2DV(PRIMARY)>1) & (PROBNNpi>0.03)", 
+            "tes": "Phys/StdAllNoPIDsPions/Particles"
+        }, 
+        "descriptor_xi": [
+            "[Xi- -> Lambda0 pi-]cc"
+        ], 
+        "descriptor_xikpi": [
+            "[Xi_c+ -> Xi- K+ pi+]cc"
+        ], 
+        "descriptor_xipipi": [
+            "[Xi_c+ -> Xi- pi+ pi+]cc"
+        ], 
+        "down_pion": {
+            "filter": "(P>2*GeV) & (PT>150*MeV) & (PROBNNpi>0.03)", 
+            "tes": "Phys/StdNoPIDsDownPions/Particles"
+        }, 
+        "lambda_dd": {
+            "filter": "(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>1*GeV) & (CHILDIP(1)<2*mm) & (MAXTREE('p+'==ABSID,P)>9*GeV) & (CHI2VXNDF<24) &\n                    (MAXTREE('p+'==ABSID,PT)>800*MeV) & (MAXTREE('pi+'==ABSID,PT)>150*MeV)", 
+            "tes": "Phys/StdLooseLambdaDD/Particles"
+        }, 
+        "lambda_ll": {
+            "filter": "(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>800*MeV) & (BPVVDZ>8*mm) & (BPVVDCHI2>32) & (CHI2VXNDF<24) &\n                    (DOCA(1,2)<0.6*mm) & (DOCACHI2(1,2)<16) & (MAXTREE('p+'==ABSID,PT)>600*MeV) & (MAXTREE('p+'==ABSID,P)>7.5*GeV) &\n                    (MAXTREE('p+'==ABSID,MIPCHI2DV(PRIMARY))>9) & (MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))>9)", 
+            "tes": "Phys/StdVeryLooseLambdaLL/Particles"
+        }, 
+        "mass_xikpi": "(in_range(2220*MeV,M,2540*MeV)) & ", 
+        "mass_xipipi": "(in_range(2400*MeV,M,2540*MeV)) & ", 
+        "xc_ddd": {
+            "comb12_cut": "(AMASS(1,2)<2510*MeV) & (ADOCA(1,2)<2*mm) & (ACHI2DOCA(1,2)<16)", 
+            "comb_cut": "(APT>1.3*GeV) & (ASUM(PT)>1.9*GeV) & (ADOCA(1,3)<3*mm) & (ACHI2DOCA(1,3)<16) & (ADOCA(2,3)<1*mm) & (ACHI2DOCA(2,3)<16) &\n                        (AHASCHILD(ISBASIC & HASTRACK & (PT>300*MeV) & (P>3*GeV) & (MIPCHI2DV(PRIMARY)>2)))", 
+            "mother_cut": "(P>20*GeV) & (PT>1.5*GeV) & (BPVVDZ>0.25*mm) & (BPVVDZ<200*mm) & (CHI2VXNDF<9) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>12*mm) &\n                        (CHILDIP(1)<2*mm) & (CHILDIP(2)<0.3*mm) & (CHILDIP(3)<0.4*mm) & (CHILDIPCHI2(1)<16) & (CHILDIPCHI2(2)<12) & (CHILDIPCHI2(3)<12) &\n                        ((CHILD(2,PX)*CHILD(3,PX)+CHILD(2,PY)*CHILD(3,PY)+CHILD(2,PZ)*CHILD(3,PZ))/(CHILD(2,P)*CHILD(3,P))<0.99999998)"
+        }, 
+        "xc_ddl": {
+            "comb12_cut": "(AMASS(1,2)<2510*MeV) & (ADOCA(1,2)<1.5*mm) & (ACHI2DOCA(1,2)<12)", 
+            "comb_cut": "(APT>1.3*GeV) & (ASUM(PT)>1.8*GeV) & (ADOCA(1,3)<1.8*mm) & (ACHI2DOCA(1,3)<12) & (ADOCA(2,3)<0.5*mm) & (ACHI2DOCA(2,3)<12) &\n                        (AHASCHILD(ISBASIC & HASTRACK & (PT>300*MeV) & (P>3*GeV) & (MIPCHI2DV(PRIMARY)>2)))", 
+            "mother_cut": "(P>20*GeV) & (PT>1.5*GeV) & (BPVVDZ>0.25*mm) & (BPVVDZ<200*mm) & (CHI2VXNDF<9) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>12*mm) &\n                        (CHILDIP(1)<1.4*mm) & (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.4*mm) & (CHILDIPCHI2(1)<12) & (CHILDIPCHI2(2)<6) & (CHILDIPCHI2(3)<9) &\n                        ((CHILD(2,PX)*CHILD(3,PX)+CHILD(2,PY)*CHILD(3,PY)+CHILD(2,PZ)*CHILD(3,PZ))/(CHILD(2,P)*CHILD(3,P))<0.99999998)"
+        }, 
+        "xc_lll": {
+            "comb12_cut": "(AMASS(1,2)<2510*MeV) & (ADOCA(1,2)<0.24*mm) & (ACHI2DOCA(1,2)<12)", 
+            "comb_cut": "(APT>1.3*GeV) & (ASUM(PT)>1.75*GeV) & (ADOCA(1,3)<0.35*mm) & (ACHI2DOCA(1,3)<10) & (ADOCA(2,3)<0.35*mm) & (ACHI2DOCA(2,3)<9) &\n                        (AHASCHILD(ISBASIC & HASTRACK & (PT>300*MeV) & (P>3*GeV) & (MIPCHI2DV(PRIMARY)>2)))", 
+            "mother_cut": "(P>20*GeV) & (PT>1.5*GeV) & (BPVVDZ>0.25*mm) & (BPVVDZ<200*mm) & (CHI2VXNDF<9) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>12*mm) &\n                        (CHILDIP(1)<0.15*mm) & (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.45*mm) & (CHILDIPCHI2(1)<9) & (CHILDIPCHI2(2)<6) & (CHILDIPCHI2(3)<9) &\n                        ((CHILD(2,PX)*CHILD(3,PX)+CHILD(2,PY)*CHILD(3,PY)+CHILD(2,PZ)*CHILD(3,PZ))/(CHILD(2,P)*CHILD(3,P))<0.99999998)"
+        }, 
+        "xi_ddd": {
+            "comb_cut": "(ADOCA(1,2)<3*mm) & (ACHI2DOCA(1,2)<32) & (ASUM(PT)>1.2*GeV) & (ADAMASS('Xi-')<60*MeV)", 
+            "mother_cut": "(ADMASS('Xi-')<30*MeV) & (P>16*GeV) & (PT>800*MeV) & (CHI2VXNDF<16) & (CHILDIP(1)<3*mm) & (CHILDIP(2)<1*mm)"
+        }, 
+        "xi_ddl": {
+            "comb_cut": "(ADOCA(1,2)<2*mm) & (ACHI2DOCA(1,2)<24) & (ASUM(PT)>1.1*GeV) & (ADAMASS('Xi-')<60*MeV) & (ACHILD(2,MIPCHI2DV(PRIMARY))>9)", 
+            "mother_cut": "(ADMASS('Xi-')<30*MeV) & (P>15*GeV) & (PT>800*MeV) & (CHI2VXNDF<16) & (CHILDIP(1)<2.5*mm) & (CHILDIP(2)<0.35*mm)"
+        }, 
+        "xi_lll": {
+            "comb_cut": "(ADOCA(1,2)<0.3*mm) & (ACHI2DOCA(1,2)<16) & (ASUM(PT)>1*GeV) & (ADAMASS('Xi-')<60*MeV) & (ACHILD(2,MIPCHI2DV(PRIMARY))>9)", 
+            "mother_cut": "(ADMASS('Xi-')<30*MeV) & (P>10*GeV) & (PT>700*MeV) & (BPVVDCHI2>40) & (BPVVD>12*mm) & (CHI2VXNDF<16) &\n                         (CHILDIP(1)<0.16*mm) & (CHILDIP(2)<0.28*mm) & (CHILDIPCHI2(1)<8) & (CHILDIPCHI2(2)<8)"
+        }
+    }, 
+    "STREAMS": {
+        "CharmCompleteEvent": [
+            "StrippingXcpToXiPipHp_PiLLLLine", 
+            "StrippingXcpToXiPipHp_PiDDLLine", 
+            "StrippingXcpToXiPipHp_PiDDDLine", 
+            "StrippingXcpToXiPipHp_KLLLLine", 
+            "StrippingXcpToXiPipHp_KDDLLine", 
+            "StrippingXcpToXiPipHp_KDDDLine"
+        ]
+    }, 
+    "WGs": [ "Charm" ]
+}
+
+######################################################################
+## StrippingXiccSLNEWXicc2LambdacMuNuLine (DST.DST)
+##  StrippingXiccSLNEWXicc2XicPlusMuNuLine (DST.DST)
+##  StrippingXiccSLNEWXicc2XicZeroMuNuLine (DST.DST)
+##  StrippingXiccSLNEWXicc2LambdacMuNuWSLine (DST.DST)
+##  StrippingXiccSLNEWXicc2XicPlusMuNuWSLine (DST.DST)
+##  StrippingXiccSLNEWXicc2XicZeroMuNuWSLine (DST.DST)
+##  StrippingXiccSLNEWOmegacc2OmegacMuNuLine (DST.DST)
+##  StrippingXiccSLNEWOmegacc2XicMuNuLine (DST.DST)
+##  StrippingXiccSLNEWOmegacc2OmegacNCLine (DST.DST)
+##  StrippingXiccSLNEWOmegacc2XicNCLine (DST.DST)
+##  StrippingXiccSLNEWOmegacc2OmegacMuNuWSLine (DST.DST)
+##  StrippingXiccSLNEWOmegacc2XicMuNuWSLine (DST.DST)
+
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingXiccSL.py
+## Authors: Xiao-Rui Lyu, Miroslav Saur, Ziyi Wang
+######################################################################
+
+XiccSL = {
+    "BUILDERTYPE": "StrippingXiccSL", 
+    "CONFIG": {
+        'LcHlt2TisTosSpec' : { 'Hlt2CharmHadLcpToPpKmPip.*Decision%TOS' : 0, 'Hlt2Global%TIS' : 0 }
+        , 'controlPrescaleLc'           : 0.05
+        , 'controlPrescaleXic'          : 0.05
+        , 'signalPrescaleViaLc'         : 1.0
+        , 'signalPrescaleViaXicp'       : 1.0
+        , 'signalPrescaleViaXicz'       : 1.0
+        , 'signalPrescaleViaOmegaz'     : 0.5
+        , 'controlPrescaleViaOmegaczPi' : 0.03
+        , 'controlPrescaleViaXiczPi'    : 0.05
+        , 'signalPrescaleViaLcWS'       : 0.5
+        , 'TRCHI2DOFMax'            :   3.0
+        , 'Xicc_Daug_TRCHI2DOF_Max' :   5.0
+        , 'Xicc_Daug_P_Min'         :   2.0*GeV
+        , 'Xicc_Daug_PT_Min'        : 250.0*MeV
+        , 'Xicc_Daug_MIPCHI2DV_Min' :  -1.0
+        , 'TrGhostProbMax'          :   0.5 #can be tightened if needed.  < 0.3 -> same for all particles
+        , 'Xicc_P_PIDpPIDpi_Min'    :   5.0
+        , 'Xicc_P_PIDpPIDK_Min'     :   0.0
+        , 'Xicc_Pi_PIDpiPIDK_Min'   :   0.0
+        , 'Xicc_K_PIDKPIDpi_Min'    :   5.0
+        , 'PionPIDK'                :  10.0
+        , 'TRCHI2'                  :   3.0
+        , 'MuonP'                   :   6.0*GeV
+        , 'MuonPT'                  :  1000*MeV
+        , 'MuonIPCHI2'              :   5.0
+        , 'MuonPIDmu'               :   0.0
+        , 'GhostProb'               :   0.35
+        , 'Lc_Daug_TRCHI2DOF_Max'   :   5.0
+        , 'Lc_Daug_PT_Min'          : 200.0*MeV
+        , 'Lc_Daug_P_Min'           :   2.0*GeV
+        , 'Lc_K_PIDKPIDpi_Min'      :   5.0
+        , 'Lc_Pi_PIDpiPIDK_Min'     :   0.0
+        , 'Lc_P_PIDpPIDpi_Min'      :   5.0
+        , 'Lc_P_PIDpPIDK_Min'       :   0.0
+        , 'Lc_ADMASS_HalfWin'       :  75.0*MeV
+        , 'Lc_Daug_1of3_MIPCHI2DV_Min': 4.0
+        , 'Lc_ADOCAMAX_Max'         :   0.5*mm
+        , 'Lc_APT_Min'              :   1.0*GeV
+        , 'Lc_VCHI2_Max'            :  30.0
+        , 'Lc_BPVVDCHI2_Min'        :  16.0
+        , 'Lc_BPVDIRA_Min'          :   0.99
+        , 'Xicplus_ADAMASS_HalfWin' : 170.0*MeV
+        , 'Xicplus_ADMASS_HalfWin'  : 120.0*MeV
+        , 'Xicplus_BPVVDCHI2_Min'   :  25.0
+        , 'Xicplus_BPVDIRA_Min'     :   0.99
+        , 'Xic0_ADAMASS_HalfWin'    : 170.0*MeV
+        , 'Xic0_ADMASS_HalfWin'     : 120.0*MeV
+        , 'Xic0_BPVVDCHI2_Min'      :  25.0
+        , 'Xic0_BPVDIRA_Min'        :   0.9
+        , 'Omegac0_ADAMASS_HalfWin' : 170.0*MeV
+        , 'Omegac0_ADMASS_HalfWin'  : 120.0*MeV
+        , 'Omegac0_4Dau_VCHI2_Max'  :  60.0
+        , 'Omegac0_BPVVDCHI2_Min'   :  25.0
+        , 'Omegac0_BPVDIRA_Min'     :   0.9
+        , 'Xicc_AM_Min'             :   2.3*GeV #maybe 3.1 if rates too high
+        , 'Xicc_AM_Max'             :   5.0*GeV #maybe 4.0 if rates too high
+        , 'Xicc_APT_Min'            :   2.0*GeV
+        , 'Xicc_ADOCAMAX_Max'       :   2.0*mm #increase form 0.5 to 2
+        , 'Xicc_Lc_delta_VZ_Min'    :  -5.0*mm #increase to -5 from -2
+        , 'Xicc_BPVVDCHI2_Min'      :  -1.0
+        , 'Xicc_BPVDIRA_Min'        :   0.9
+        , 'Omegacc_AM_Min'          :   2.5*GeV
+        , 'Omegacc_AM_Max'          :   5.2*GeV
+        , 'Omegacc_APT_Min'         :   2.0*GeV
+        , 'Omegacc_ADOCAMAX_Max'    :   2.0*mm #increase form 0.5 to 2
+        , 'Omegacc_Lc_delta_VZ_Min' :  -5.0*mm #increase to -5 from -2
+        , 'Omegacc_BPVVDCHI2_Min'   :  -1.0
+        , 'Omegacc_BPVDIRA_Min'     :   0.9
+        , 'BVCHI2DOF'               :  20.0 #increase from 9 to 20
+        , 'Omegacc_2Dau_VCHI2_Max'  :  20.0
+        , 'Xicc_2Dau_VCHI2_Max'     :  60.0 #set to 60 from 20
+        , 'Xicc_3Dau_VCHI2_Max'     :  60.0 #set to 60 form 30
+        , 'Xicc_4Dau_VCHI2_Max'     :  60.0
+        , 'MINIPCHI2'               :   4.0  # adimensiional, orig. 9
+        , 'MINIPCHI2Loose'          :   4.0  # adimensiional
+        , 'Xicc_Zero_BPVDIRA_Min'   :   0.0 # Neutral
+        , 'Omegacc_Zero_BPVDIRA_Min':   0.0 # Neutral
+
+
+    },
+    "STREAMS": [ "CharmCompleteEvent" ],
+    "WGs": [ "Charm" ]
+}
+
+######################################################################
+
+## StrippingCharmedBaryonSLLambdac2LambdaMuNuLine (DST.DST)
+## StrippingCharmedBaryonSLLambdac2PKMuNuLine (DST.DST)
+## StrippingCharmedBaryonSLLambdac2PPiMuNuLine (DST.DST)
+## StrippingCharmedBaryonSLLambdac2LambdaPiNCLine (DST.DST)
+## StrippingCharmedBaryonSLLambdac2PKPiNCLine (DST.DST)
+## StrippingCharmedBaryonSLLambdac2PPiPiNCLine (DST.DST)
+## StrippingCharmedBaryonSLOmegac02OmegaMuNuLine (DST.DST)
+## StrippingCharmedBaryonSLOmegac02XiMuNuLine (DST.DST)
+## StrippingCharmedBaryonSLOmegac02OmegaPiNCLine (DST.DST)
+## StrippingCharmedBaryonSLOmegac02XiPiNCLine (DST.DST)
+## StrippingCharmedBaryonSLXic2LambdaMuNuLine (DST.DST)
+## StrippingCharmedBaryonSLXic02XiMuNuLine (DST.DST)
+## StrippingCharmedBaryonSLXic2LambdaPiNCLine (DST.DST)
+## StrippingCharmedBaryonSLXic02XiPiNCLine (DST.DST)
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingCharmedBaryonSL.py
+## Authors: Xiao-Rui Lyu, Miroslav Saur, Ziyi Wang
+######################################################################
+
+
+CharmedBaryonSL = {
+    "BUILDERTYPE": "StrippingCharmedBaryonSL",
+    "CONFIG": {
+        'GEC_nLongTrk' : 250    # adimensional
+        , 'signalPrescaleViaLc'         :   1.0
+        , 'signalPrescaleViaLcPPiMuNu'  :   0.4
+        , 'signalPrescaleViaOmegac0'    :   1.0
+        , 'signalPrescaleViaXic'        :   1.0
+        , 'signalPrescaleViaXicL0MuNu'  :   0.9
+        , 'controlPrescaleViaLcL0PiNC'  :   0.12
+        , 'controlPrescaleViaLcPKPiNC'  :   0.08
+        , 'controlPrescaleViaLcPPiPiNC' :   0.04
+        , 'controlPrescaleViaOmegac0NC' :   1.0
+        , 'controlPrescaleViaXicL0PiNC' :   0.12
+        , 'controlPrescaleViaXicXiPiNC' :   1.0
+        , 'TRCHI2DOFMax'            :   3.0
+        , 'GhostProb'               :   0.35
+        , 'TrGhostProbMax'          :   0.5 #can be tightened if needed.  < 0.3 -> same for all particles
+        , 'MINIPCHI2'               :   4.0  # adimensiional, orig. 9
+        , 'MuonP'                   :   2.0*GeV
+        , 'MuonPT'                  :   300*MeV
+        , 'MuonIPCHI2'              :   5.0
+        , 'MuonPIDmu'               :   0.0
+        , 'PionP'                   :   3.0*GeV
+        , 'PionPT'                  :   500*MeV
+        , 'PionPIDK'                :  10.0
+        , 'Pion_PIDpiPIDK_Min'      :   0.0
+        , 'KaonP'                   :   3.0*GeV
+        , 'KaonPT'                  :   500*MeV
+        , 'KaonPIDK'                :  10.0
+        , 'Kaon_PIDKPIDpi_Min'      :   5.0
+        , 'ProtonP'                 :   3.0*GeV
+        , 'ProtonPT'                :   500*MeV
+        , 'Proton_PIDpPIDpi_Min'    :   5.0
+        , 'Proton_PIDpPIDK_Min'     :   0.0
+        , 'LambdaLLPMin'            :2000.0*MeV
+        , 'LambdaLLPTMin'           : 500.0*MeV
+        , 'LambdaLLCutMass'         :  30.0*MeV
+        , 'LambdaLLCutFDChi2'       : 100.0 ## unitless
+        , 'LambdaDDPMin'            :3000.0*MeV
+        , 'LambdaDDPTMin'           : 800.0*MeV
+        , 'LambdaDDCutMass'         :  30.0*MeV
+        , 'LambdaDDCutFDChi2'       : 100.0## unitless
+        , 'LambdaLDPMin'            :3000.0*MeV
+        , 'LambdaLDPTMin'           : 800.0*MeV
+        , 'LambdaLDCutMass'         :  30.0*MeV
+        , 'LambdaLDCutFDChi2'       : 100.0## unitless
+        , 'LambdaDaugTrackChi2'     :   4.0## unitless
+        , 'LambdaVertexChi2'        :   6.0## max chi2/ndf for Lambda0 vertex
+        , 'LambdaCutDIRA'           :   0.99## unitless
+        , 'Lc_ADMASS_HalfWin'       :  80.0*MeV
+        , 'Lc_Daug_1of3_MIPCHI2DV_Min': 4.0
+        , 'Lc_ADOCAMAX_Max'         :   0.5*mm
+        , 'Lc_APT_Min'              :   1.0*GeV
+        , 'Lc_VCHI2_Max'            :  30.0
+        , 'Lc_BPVVDCHI2_Min'        :  16.0
+        , 'Lc_BPVDIRA_Min'          :   0.9
+        , 'Omegac0_ADAMASS_HalfWin' : 170.0*MeV
+        , 'Omegac0_ADMASS_HalfWin'  : 120.0*MeV
+        , 'Omegac0_4Dau_VCHI2_Max'  :  60.0
+        , 'Omegac0_BPVVDCHI2_Min'   :  25.0
+        , 'Omegac0_BPVDIRA_Min'     :   0.9
+        , 'Xicplus_ADAMASS_HalfWin' : 170.0*MeV
+        , 'Xicplus_ADMASS_HalfWin'  : 120.0*MeV
+        , 'Xicplus_BPVVDCHI2_Min'   :  25.0
+        , 'Xicplus_BPVDIRA_Min'     :   0.99
+        , 'Xic0_ADAMASS_HalfWin'    : 170.0*MeV
+        , 'Xic0_ADMASS_HalfWin'     : 120.0*MeV
+        , 'Xic0_BPVVDCHI2_Min'      :  25.0
+        , 'Xic0_BPVDIRA_Min'        :   0.9
+    },
+    "STREAMS": [ "CharmCompleteEvent" ],
+    "WGs": [ "Charm" ]
+}
+
+######################################################################
+## StrippingDstarD2XGammaDstarD2KKGammaLine  (DST.DST)
+## StrippingDstarD2XGammaDstarD2KKGamma_CNVDDLine (DST.DST)
+## StrippingDstarD2XGammaDstarD2KKGamma_CNVLLLine (DST.DST)
+## StrippingDstarD2XGammaDstarD2PiPiGammaLine (DST.DST)
+## StrippingDstarD2XGammaDstarD2PiPiGamma_CNVDDLine (DST.DST)
+## StrippingDstarD2XGammaDstarD2PiPiGamma_CNVLLLine (DST.DST)
+## StrippingDstarD2XGammaDstarD2KPiGammaLine (DST.DST)
+## StrippingDstarD2XGammaDstarD2KPiGamma_CNVDDLine (DST.DST)
+## StrippingDstarD2XGammaDstarD2KPiGamma_CNVLLLine (DST.DST)
+######################################################################
+
+## -------------------------------------------------------------------
+## Lines defined in StrippingDstarD2XGamma.py
+## Authors: Maurizio Martinelli, Jolanta Brodzicka
+######################################################################
+
+DstarD2XGamma = {
+    "BUILDERTYPE": "DstarD2XGammaLines",
+    "CONFIG": {
+        'PrescaleDstarD2PiPiGamma': 1,
+        'PrescaleDstarD2KPiGamma' : 1,
+        'PrescaleDstarD2KKGamma'  : 1,
+        'PrescaleDstarD2PiPiGamma_CNVLL': 1,
+        'PrescaleDstarD2KPiGamma_CNVLL' : 1,
+        'PrescaleDstarD2KKGamma_CNVLL'  : 1,
+        'PrescaleDstarD2PiPiGamma_CNVDD': 1,
+        'PrescaleDstarD2KPiGamma_CNVDD' : 1,
+        'PrescaleDstarD2KKGamma_CNVDD'  : 1,
+         # Gamma
+        'photonPT'                : 2.0 * GeV, #1.7->2 in 2021campaign for 2018
+        'MaxMass_CNV_LL'          : 100 * MeV,
+        'MaxVCHI2_CNV_LL'         : 9,
+        'MinPT_CNV_LL'            : 1000 * MeV,
+        'MaxMass_CNV_DD'          : 100 * MeV,
+        'MaxVCHI2_CNV_DD'         : 9,
+        'MinPT_CNV_DD'            : 1000 * MeV,
+        'MinPhotonCL'             : 0.25, #added in 2019 campaign
+        # X -> HH
+        'TrChi2'                  : 4,
+        'TrGhostProb'             : 0.5,
+        'MinTrkPT'                : 250 * MeV, #500->250 in 2019 campaign2 ##250 in Run1 Restrip
+        'MinTrkIPChi2'            : 3, #6->3 in 2019 campaign2 ##3 in Run1
+        'HighPIDK'                :-5, #pions #0->-5 in 2019 campaign2 #0 in Run1
+        'LowPIDK'                 : 5, #kaons #0->5 in 2019 campaign ##5 in Run1
+        'CombMassLow_HH'          : 0 * MeV,
+        'CombMassHigh_HH'         : 1300 * MeV, #1820 * MeV,
+        'MinCombPT'               : 0 * GeV,
+        'MaxADOCACHI2'            : 10.0,
+        'MinVDCHI2_HHComb'        : 10.0, #1000->100->10 (!!!) in 2019 campaign2 ##100 in Run1
+        'MassLow_HH'              : 0 * MeV,
+        'MassHigh_HH'             : 1050 * MeV, #1865 * MeV in Run1 and 2015/2016
+        'MaxVCHI2NDOF_HH'         : 16.0,
+        'MinVDCHI2_HH'            : 10.0, #1000->100->10 (!!!) in 2019 campaign2 ##100 in Run1
+        # D0 -> X Gamma
+        'CombMassLow'             : 1610 * MeV, #1665 * MeV,
+        'CombMassHigh'            : 2130 * MeV, #2075 * MeV,
+        'MassLow'                 : 1660 * MeV, #1685->1610 in 2019campaign2 ->1660 in 2021campaign for 2018 ##1610 in Run1
+        'MassHigh'                : 2100 * MeV, #2055 * MeV,
+        'MinPT'                   : 2.0 * GeV, #2.0 in Run1
+        'MaxVCHI2NDOF'            : 12.0,
+        'MinBPVDIRA'              : 0.99995, #0.99995->0.9995->0.99995 in 2019 campaign2, ##0.9995 in Run1
+        'MinBPVTAU'               : 0.5 * picosecond, ##0.1 in Run1
+        'MaxIPChi2'               : 35., #none->25.->35. in 2019 campaign2, ##35.in Run1
+        # D* -> D0 pi+
+        'Daug_TRCHI2DOF_MAX'      : 3,
+        'Dstar_AMDiff_MAX'        : 180 * MeV,
+        'Dstar_VCHI2VDOF_MAX'     : 15.0,
+        'Dstar_MDiff_MAX'         : 163 * MeV, #160 * MeV,
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None, #"HLT_PASS_RE('Hlt2CharmHadInclDst2PiD02HHXBDTDecision')", #jb
+        'Hlt1Tos': {'Hlt1.*Track.*Decision%TOS' : 0}, #jb
+        'Hlt2Tos': {'Hlt2CharmHadInclDst2PiD02HHXBDTDecision%TOS' : 0, 'Hlt2PhiIncPhiDecision%TOS' : 0, 'Hlt2CharmHadDst2PiD02.*Gamma.*Decision%TOS' : 0} #jb #including an exclusive line
+        #
+        #'Hlt2Tos': {'Hlt2CharmHadInclDst2PiD02HHXBDTDecision%TOS' : 0, 'Hlt2PhiIncPhiDecision%TOS' : 0} #jb #test for early 2017
+
+    
+    },
+    "STREAMS": [ "CharmCompleteEvent" ],
+    "WGs": [ "Charm" ]
+}
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charmless.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charmless.py
new file mode 100644
index 000000000..4199e6ba5
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charmless.py
@@ -0,0 +1,192 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+
+Bu2KSh = {
+    'WGs'  : ['BnoC'],
+    'BUILDERTYPE' : 'Bu2KShConf',
+    'CONFIG' : {'Trk_Chi2'                : 3.0,
+                'Trk_GhostProb'           : 0.5,
+                'KS_DD_MassWindow'        : 30.0,
+                'KS_DD_VtxChi2'           : 10.0,
+                'KS_DD_FDChi2'            : 50.0,
+                'KS_DD_Pmin'              : 8000.0,
+                'KS_DD_Ptmin'             : 1000.0,
+                'KS_LL_MassWindow'        : 15.0,
+                'KS_LL_VtxChi2'           : 10.0,
+                'KS_LL_FDChi2'            : 100.0,
+                'Bach_Ptmin'              : 1000.0,
+                'B_Mlow'                  : 500.0,
+                'B_Mhigh'                 : 1500.0,
+                'B_Pmin'                  : 25000.0,
+                'BDaug_MaxPT_IP'          : 0.05,
+                'BDaug_DD_PTsum'          : 4000.0,
+                'BDaug_LL_PTsum'          : 4000.0,
+                'B_VtxChi2'               : 6.0,
+                'B_Dira'                  : 0.9995,
+                'B_DD_IPCHI2wrtPV'        : 10.0,
+                'B_LL_IPCHI2wrtPV'        : 10.0,
+                'B_FDwrtPV'               : 1.0,
+                'B_DD_FDChi2'             : 50.0,
+                'B_LL_FDChi2'             : 50.0,
+                'GEC_MaxTracks'           : 250,
+                # 2012 Trigger                                                                                                                  
+                #'HLT1Dec'                  : 'Hlt1TrackAllL0Decision',                                                                          
+                #'HLT2Dec'                  : 'Hlt2Topo[234]Body.*Decision',                                                                     
+                # 2015 Triggers                                                                                                                 
+                'HLT1Dec'                  : 'Hlt1(Two)?TrackMVADecision',
+                'HLT2Dec'                  : 'Hlt2Topo[234]BodyDecision',
+                'Prescale'                 : 1.0,
+                'Postscale'                : 1.0,
+                'RelatedInfoTools' : [    { "Type" : "RelInfoConeVariables",
+                                            "ConeAngle" : 1.7,
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                            "Location"  : 'ConeVar17'
+                                            },
+                                          { "Type" : "RelInfoConeVariables",
+                                            "ConeAngle" : 1.5,
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                            "Location"  : 'ConeVar15'
+                                            },
+                                          { "Type" : "RelInfoConeVariables",
+                                            "ConeAngle" : 1.0,
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                            "Location"  : 'ConeVar10'
+                                            },
+                                          { "Type" : "RelInfoConeVariables",
+                                            "ConeAngle" : 0.8,
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                            "Location"  : 'ConeVar08'
+                                            },
+                                          { "Type" : "RelInfoVertexIsolation",
+                                            "Location" : "VtxIsolationVar"
+                                            }
+                                          ]
+                },
+    'STREAMS' : ['Bhadron']
+    }
+
+
+
+
+
+
+
+
+B2Lambdappp = {
+    'WGs'  : ['BnoC'],
+    'BUILDERTYPE' : 'B2LambdapppLinesConf',
+    'CONFIG' : {'Trk_Chi2'                 : 3.0,
+                'Trk_GhostProb'            : 0.5,
+                'Lambda_DD_MassWindow'     : 20.0,
+                'Lambda_DD_VtxChi2'        : 9.0,
+                'Lambda_DD_FDChi2'         : 50.0,
+                'Lambda_DD_FD'             : 300.0,
+                'Lambda_DD_Pmin'           : 5000.0,
+                'Lambda_LL_MassWindow'     : 20.0,
+                'Lambda_LL_VtxChi2'        : 9.0,
+                'Lambda_LL_FDChi2'         : 0.0,
+                'Lambda_LD_MassWindow'     : 25.0,
+                'Lambda_LD_VtxChi2'        : 16.0,
+                'Lambda_LD_FDChi2'         : 50.0,
+                'Lambda_LD_FD'             : 300.0,
+                'Lambda_LD_Pmin'           : 5000.0,
+                'B0_Mlow'                  : 779.0,
+                'B0_Mhigh'                 : 1921.0,
+                'B0_APTmin'                : 1000.0,
+                'B0_PTmin'                 : 1050,
+                'B0Daug_MedPT_PT'          : 450.0,
+                'B0Daug_MaxPT_IP'          : 0.05,
+                'B0Daug_DD_maxDocaChi2'    : 16.0,
+                'B0Daug_LL_maxDocaChi2'    : 5.0,
+                'B0Daug_LD_maxDocaChi2'    : 5.0,
+                'B0Daug_DD_PTsum'          : 2000.0,
+                'B0Daug_LL_PTsum'          : 3000.0,
+                'B0Daug_LD_PTsum'          : 4200.0,
+                'B0_VtxChi2'               : 16.0,
+                'B0_Dira'               : 0.9990,
+                'B0_DD_IPCHI2wrtPV'        : 25.0,
+                'B0_LL_IPCHI2wrtPV'        : 25.0,
+                'B0_LD_IPCHI2wrtPV'        : 15.0,
+                'B0_FDwrtPV'               : 0.8,
+                'B0_DD_FDChi2'             : 0.5,
+                'B0_LL_FDChi2'             : 0.5,
+                'B0_LD_FDChi2'             : 30.0,
+                'GEC_MaxTracks'            : 250,
+                # 2012 Triggers                                                                                                                  
+                #'HLT1Dec'                  : 'Hlt1TrackAllL0Decision',                                                                          
+                #'HLT2Dec'                  : 'Hlt2Topo[234]Body.*Decision',                                                                     
+                # 2015 Triggers                                                                                                                  
+                #'HLT1Dec'                  : 'Hlt1(Two)?TrackMVADecision',                                                                      
+                #'HLT2Dec'                  : 'Hlt2Topo[234]BodyDecision',                                                                       
+                'Prescale'                 : 1.0,
+                'Postscale'                : 1.0,
+                'RelatedInfoTools' : [    { "Type" : "RelInfoConeVariables",
+                                            "ConeAngle" : 1.7,
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                            "Location"  : 'ConeVar17'
+                                            },
+                                          { "Type" : "RelInfoConeVariables",
+                                            "ConeAngle" : 1.5,
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                            "Location"  : 'ConeVar15'
+                                            },
+                                          { "Type" : "RelInfoConeVariables",
+                                            "ConeAngle" : 1.0,
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                            "Location"  : 'ConeVar10'
+                                            },
+                                          { "Type" : "RelInfoConeVariables",
+                                            "ConeAngle" : 0.8,
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                            "Location"  : 'ConeVar08'
+                                            },
+                                          { "Type" : "RelInfoVertexIsolation",
+                                            "Location" : "VtxIsolationVar"
+                                            }
+                                          ]
+                },
+    'STREAMS' : ['Bhadron']
+    }
+
+
+
+
+
+
+Xb2phhh_raw = {
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Xb2phhhConf_raw',
+    'CONFIG'      : {'Trk_MaxChi2Ndof'   : 4.0,
+                     'Trk_MaxGhostProb'  : 0.4,
+                     'Trk_MinIPChi2'     : 16.0,
+                     'Trk_MinP'          : 1500.0,
+                     'Trk_MinProbNNp'    : 0.05,
+                     'Xb_MinSumPTppi'    : 1500.0,
+                     'Xb_MinSumPTppipi'  : 2500.0,
+                     'Xb_MinM_4body'     : 5195.0,
+                     'Xb_MaxM_4body'     : 6405.0,
+                     'Xb_MinSumPT_4body' : 3500.0,
+                     'Xb_MinPT_4body'    : 1500.0,
+                     'Xb_MaxDOCAChi2'    : 20.0,
+                     'Xb_MaxVtxChi2'     : 20.0,
+                     'Xb_MinFDChi2'      : 50.0,
+                     'Xb_MaxIPChi2'      : 16.0,
+                     'Xb_MinDira'        : 0.9999,
+                     'ConeAngles'        : [0.8,1.0,1.3,1.7],
+                     'ConeInputs'        : {'Displaced' : ['/Event/Phys/StdNoPIDsPions'], 'Long': ['/Event/Phys/StdAllNoPIDsPions'] },
+                     'ConeVariables'     : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                     'Prescale'          : 1.0,
+                     'Postscale'         : 1.0,
+                     'RequiredRawEvents' : ["Calo", "Rich", "Velo", "Tracker"]
+                     },
+    'STREAMS'     : ['Bhadron']
+    }
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_IFT.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_IFT.py
new file mode 100644
index 000000000..8368d36fd
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_IFT.py
@@ -0,0 +1,145 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+
+HeL2ppppi = {
+    'WGs'         : ['IFT'],
+    'BUILDERTYPE' : 'HeL2ppppiConf',
+    'CONFIG'      : {'Trk_MaxChi2Ndof'    : 3.0,
+                     'Trk_MaxGhostProb'   : 0.4,
+                     'Trk_MinIPChi2'      : 9.0,
+
+                     'Proton_MinP'        : 3000.0,
+                     'Proton_MinProbNNp'  : 0.10,
+                     'Pion_MinP'          : 1500.0,
+                     'Pion_MinProbNNpi'   : 0.05,
+
+                     'HeL_MaxM_4body'     : 5200.0,
+                     'HeL_MaxM'           : 5000.0,
+                     'HeL_MaxDOCAChi2'    : 20.0,
+                     'HeL_MaxVtxChi2Ndof' : 10.0,
+                     'HeL_MinFDChi2'      : 100.0,
+                     'HeL_MaxIPChi2'      : 25.0,
+                     'HeL_MinDira'        : 0.9995,
+                     'Prescale'          : 1.0,
+                     'Postscale'         : 1.0
+                     },
+    'STREAMS'     : ['BhadronCompleteEvent'],
+}
+
+HeMedian = {
+    'BUILDERTYPE': 'HeMedianConf',
+    'WGs': ['IFT'],
+    'STREAMS': ['BhadronCompleteEvent'],
+    'CONFIG': {
+         'Prescale': 1.0,
+         'HeliumMedian': 115.0,
+         'HeliumP': 2500,
+         'HeliumPT': 300,
+         'TrackGhostProb': 0.15,
+         'eta': 5.0,
+         'NumVeloClusters' : 12,
+         'TrackProbNNpi'    : 0.5,
+         'RequiredRawEvents' : ["Calo", "Rich", "Velo", "Tracker"],
+    },
+}
+
+HeNOverflows = {
+    'BUILDERTYPE': 'HeNOverflowsConf',
+    'WGs': ['IFT'],
+    'STREAMS': ['BhadronCompleteEvent'],
+    'CONFIG': {
+        'Prescale': 1.0,
+         'Trk_nOverflows': 3,
+         'RequiredRawEvents' : ["Calo", "Rich", "Velo", "Tracker"],
+    },
+}
+
+Lb2dpX = {
+    'BUILDERTYPE' : 'Lb2dpXConf',
+    'WGs'         : ['IFT'],
+    'STREAMS'     : ['BhadronCompleteEvent'],
+    'CONFIG'      : {
+        'Prescale_pi'          : 0.5 ,
+        'Prescale_pipi'        : 1.0 ,
+
+        'TrackChi2Ndof'        : 3.0,
+        'TrackGhostProb'       : 0.4,
+        'TrackIPChi2'          : 16.,
+
+        'PionPT'               : 500,
+        'PionP'                : 1500,
+        'PionPIDKpi'           : 0,
+
+        'ProtonPT'             : 500,
+        'ProtonP'              : 15000,
+        'ProtonPIDppi'         : 15,
+        'ProtonPIDpK'          : 10,
+
+        'DeuteronPT'           : 500,
+        'DeuteronP'            : 35000,
+
+        'LbMassMax'            : 7000. ,
+        'LbVtxChi2'            : 5. ,
+        'LbDIRA_pipi'          : 0.999,
+        'LbDIRA_pi'            : 0.9999,
+        'LbFDChi2'             : 150,
+        'LbPT'                 : 1500,
+        'LbIPChi2_pi'          : 25,
+        'LbIPChi2_pipi'        : 50,
+    },
+}
+
+Lb2V0pphh = {
+    'WGs': ['IFT'],
+    'BUILDERTYPE': 'Lb2V0pphhConf',
+    'STREAMS': ['BhadronCompleteEvent'],
+    'CONFIG': {
+        'Trk_Chi2'               : 3.0,
+        'Trk_GhostProb'          : 0.4,
+        'Trk_IPChi2'             :   9,
+
+        'ProtonP'                : 15000,
+        'ProtonPT'               : 500,
+        'ProtonProbNNp'          : 0.05,
+        'ProtonPIDppi'           : 5,
+        'ProtonPIDpK'            : 0,
+        'PionP'                  : 1500,
+        'PionPT'                 :  500,
+
+        'Lambda_LL_MassWindow'   : 20.0,
+        'Lambda_LL_VtxChi2'      : 15.0,
+        'Lambda_LL_FDChi2'       : 80.0,
+
+        'Lb_Mlow'                : 1319.0,
+        'Lb_Mhigh'               : 600.0,
+        'Lb_APTmin'              : 250.0,
+        'Lb_PTmin'               : 250.0,
+
+        'LbDaug_MedPT_PT'        : 800.0,
+        'LbDaug_MaxPT_IP'        : 0.05,
+        'LbDaug_LL_maxDocaChi2'  : 10.0,
+        'LbDaug_LL_PTsum'        : 1500.0,
+
+        'Lbh_LL_PTMin'           : 500.0,
+        'Lb_VtxChi2Ndof'         : 12.0,
+        'Lb_LL_Dira'             : 0.995,
+        'Lb_LL_IPCHI2wrtPV'      : 20.0,
+        'Lb_FDwrtPV'             : 1.0,
+        'Lb_LL_FDChi2'           : 40.0,
+
+        'GEC_MaxTracks'          : 250,
+        # 2015 Triggers
+        'HLT1Dec'                : 'Hlt1(Two)?TrackMVADecision',
+        'HLT2Dec'                : 'Hlt2Topo[234]BodyDecision',
+        'Prescale'               : 1.0,
+        'Postscale'              : 1.0,
+    },
+}
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_QEE.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_QEE.py
new file mode 100644
index 000000000..a91cbc760
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_QEE.py
@@ -0,0 +1,501 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+################################################################################
+##                          S T R I P P I N G  2 9 r 2 p 2                    ##
+##                                                                            ##
+##  Configuration for QEE WG                                                  ##
+##  Contact person: igor.kostiuk@cern.ch                                      ##
+################################################################################
+
+from GaudiKernel.SystemOfUnits import *
+
+B2EHNL = {
+    "BUILDERTYPE": "B2EHNLLines", 
+    "CONFIG"     : { "GEC_nLongTrk"          : 300.  ,#adimensional
+                      #Muons
+                      "MuonGHOSTPROB"         : 0.5   ,#adimensional
+                      "MuonTRCHI2"            : 4.    ,#adimensional
+                      "MuonP"                 : 3000. ,#MeV
+                      "MuonPT"                : 250.  ,#MeV
+                      "MuonPIDmu"             : 0.    ,#adimensional
+                      "MuonMINIPCHI2"         : 12    ,#adminensional
+
+                      "ElectronGHOSTPROB"         : 0.5   ,#adimensional
+                      "ElectronTRCHI2"            : 4.    ,#adimensional
+                      "ElectronP"                 : 3000. ,#MeV
+                      "ElectronPT"                : 250.  ,#MeV
+                      "ElectronPIDK"              : 3.0    ,#adimensional
+                      "ElectronPIDpi"             : 3.0    ,#adimensional
+                      "ElectronPIDp"              : 3.0    ,#adimensional
+                      "ElectronMINIPCHI2"         : 12    ,#adminensional
+
+                      #Lambda Daughter Cuts
+                      "ElectronPIDe"          : 3.    ,#adimensional
+                      "Lambda0DaugP"          : 2000. ,#MeV
+                      "Lambda0DaugPT"         : 250.  ,#MeV
+                      "Lambda0DaugTrackChi2"  : 4.    ,#adimensional
+                      "Lambda0DaugMIPChi2"    : 10.   ,#adimensional
+                      #Lambda cuts
+                      "MajoranaCutFDChi2"     : 100.  ,#adimensional
+                      "MajoranaCutBPVCORRMin"   : 1000. ,#MeV
+                      "MajoranaCutBPVCORRMax"   : 6500. ,#MeV
+
+                      "Lambda0VertexChi2"     : 16.   ,#adimensional
+                      "Lambda0PT"             : 500.  ,#adimensional
+                      #B Mother Cuts
+                      "LambdaMuMassLowTight"  : 1500. ,#MeV
+                      "BDIRA"                 : 0.99  ,#adminensional
+                      "BVCHI2DOF"             : 16.    ,#adminensional
+                      "XMuMassUpperHigh"      : 6500. ,#MeV
+                      'LambdaZ_prompt'        : -1.,     #mm
+                      'LambdaEPiOSZ_displ'   : 20.,     #mm
+                      'LambdaEPiSSZ_displ'   : 20.,     #mm
+                      'LambdaEEZ_displ'      : -1.,     #mm
+
+                      "HLT1"      : "HLT_PASS_RE('Hlt1.*SingleElectronNoIPDecision')", #Hlt1SingleElectronNoIPDecision
+                      "HLT2"      : "HLT_PASS_RE('Hlt2TopoE2BodyDecision')",
+                      } ,
+    "STREAMS": [ "Bhadron" ], 
+    "WGs": [ "QEE" ]
+}
+
+B2MuHNL = {
+    "BUILDERTYPE": "B2MuHNLLines", 
+    "CONFIG"     : { "GEC_nLongTrk"          : 300.  ,#adimensional
+                     #Muons
+                     "MuonGHOSTPROB"         : 0.5   ,#adimensional
+                     "MuonTRCHI2"            : 4.    ,#adimensional
+                     "MuonP"                 : 3000. ,#MeV
+                     "MuonPT"                : 250.  ,#MeV
+                     "MuonPIDmu"             : 0.    ,#adimensional
+                     "MuonMINIPCHI2"         : 12    ,#adminensional
+                     #Lambda Daughter Cuts
+                     "ElectronPIDe"          : 3.    ,#adimensional
+                     "Lambda0DaugP"          : 2000. ,#MeV
+                     "Lambda0DaugPT"         : 250.  ,#MeV
+                     "Lambda0DaugTrackChi2"  : 4.    ,#adimensional
+                     "Lambda0DaugMIPChi2"    : 10.   ,#adimensional
+                     #Lambda cuts
+                     "MajoranaCutFDChi2"     : 100.  ,#adimensional
+                     "MajoranaCutBPVCORRMin"   : 1000. ,#MeV
+                     "MajoranaCutBPVCORRMax"   : 6500. ,#MeV
+
+                     "Lambda0VertexChi2"     : 16.   ,#adimensional
+                     "Lambda0PT"             : 500.  ,#adimensional
+                     #B Mother Cuts
+                     "LambdaMuMassLowTight"  : 1500. ,#MeV
+                     "XMuMassUpperHigh"      : 6500. ,#MeV
+                     'LambdaZ_prompt'        : -1.,     #mm
+                     'LambdaMuPiOSZ_displ'   : 15.,     #mm
+                     'LambdaMuPiSSZ_displ'   : 15.,     #mm
+                     'LambdaMuEZ_displ'      : -1.,     #mm
+
+                      "HLT1"      : "HLT_PASS_RE('Hlt1.*TrackMuonDecision')",
+                      "HLT2"      : "HLT_PASS_RE('Hlt2TopoMu2BodyDecision')"\
+                                  "| HLT_PASS_RE('Hlt2Topo2BodyDecision')"\
+                                  "| HLT_PASS_RE('Hlt2MajoranaBLambdaMuDDDecision')"\
+                                  "| HLT_PASS_RE('Hlt2ExoticaRHNuDecision')", 
+                      } ,
+    
+    "STREAMS": [ "Bhadron" ], 
+    "WGs": [ "QEE" ]
+}
+
+LambdaDecaysDM = {
+    "BUILDERTYPE": "LambdaDecaysDMConf", 
+    'CONFIG'      : {
+    'Common': {
+              'checkPV'        : False
+              },
+    'StrippingDMLambda1520Line': {
+              'Prescale'            : 1.0,
+              'Postscale'           : 1.0,
+              'Prescale_control'    : 0.1,
+              'Postscale_control'   : 1.0,
+              'Lambda1520_PT'       : 1000*MeV,
+              'Lambda1520_iso'      : 0.85,
+              'Lambda1520_ProbNNK'  : 0.5,
+              'Lambda1520_ProbNNp'  : 0.8,
+              'Lambda1520_Daug_PT'  : 500*MeV,
+              'Lambda1520_GhostProb': 0.3,
+              'Lambda1520_IPChi2'   : 25,
+              'Lambda1520_VChi2'    :  2,
+              'Lambda1520_M_Min'    : 1460,
+              'Lambda1520_M_Max'    : 1580,
+              'Lambda1520_FDChi2'   : 45,
+              'Lambda1520_MaxDoca'  : 0.1*millimeter,
+              },
+    'StrippingDMLambdaToPiPiLine': {
+              'Prescale'            : 1.0,
+              'Postscale'           : 1.0,
+              'Prescale_control'    : 0.1,
+              'Postscale_control'   : 1.0,
+              'LambdaToPiPi_PT'          : 1000*MeV,
+              'LambdaToPiPi_iso'         : 0.6,
+              'LambdaToPiPi_ProbNNpi'    : 0.8,
+              'LambdaToPiPi_Daug_PT'     : 800*MeV,
+              'LambdaToPiPi_Daug_IP_min' : 0.1*millimeter,
+              'LambdaToPiPi_Daug_IP_max' : 3*millimeter,
+              'LambdaToPiPi_Daug_IPChi2' : 20,
+              'LambdaToPiPi_GhostProb'   : 0.2,
+              'LambdaToPiPi_IPChi2'      : 15,
+              'LambdaToPiPi_VChi2'       : 4,
+              'LambdaToPiPi_M_Min'       : 1100,
+              'LambdaToPiPi_M_Max'       : 5700,
+              'LambdaToPiPi_FDChi2'      : 40,
+              'LambdaToPiPi_MaxDoca'     : 0.3*millimeter,
+              'LambdaToPiPi_DOCAChi2'    : 7,
+              'LambdaToPiPi_FD'          : 5,
+              'LambdaToPiPi_IPdivFD'     : 0.1,
+              },
+    'StrippingDMLambdaToKPiLine': {
+              'Prescale'            : 1.0,
+              'Postscale'           : 1.0,
+              'Prescale_control'    : 0.1,
+              'Postscale_control'   : 1.0,
+              'LambdaToKPi_PT'          : 1000*MeV,
+              'LambdaToKPi_iso'         : 0.6,
+              'LambdaToKPi_ProbNNpi'    : 0.8,
+              'LambdaToKPi_Daug_PT'     : 800*MeV,
+              'LambdaToKPi_Daug_IP_min' : 0.1*millimeter,
+              'LambdaToKPi_Daug_IP_max' : 3*millimeter,
+              'LambdaToKPi_Daug_IPChi2' : 20,
+              'LambdaToKPi_GhostProb'   : 0.2,
+              'LambdaToKPi_ProbNNK'     : 0.8,
+              'LambdaToKPi_IPChi2'      : 15,
+              'LambdaToKPi_VChi2'       : 4,
+              'LambdaToKPi_M_Min'       : 1100,
+              'LambdaToKPi_M_Max'       : 5700,
+              'LambdaToKPi_FDChi2'      : 40,
+              'LambdaToKPi_MaxDoca'     : 0.3*millimeter,
+              'LambdaToKPi_DOCAChi2'    : 7,
+              'LambdaToKPi_FD'          : 5,
+              'LambdaToKPi_IPdivFD'     : 0.1,
+              },
+    'StrippingDMLambda2595Line': {
+              'Prescale'                  : 1.0,
+              'Postscale'                 : 1.0,
+              'Prescale_control'          : 0.6,
+              'Postscale_control'         : 1.0,
+              'K_ProbNNghost'             : 0.1,
+              'K_ProbNNk'                 : 0.5,
+              'K_PT'                      : 250*MeV,
+              'p_ProbNNghost'             : 0.1,
+              'p_ProbNNp'                 : 0.5,
+              'p_PT'                      : 250*MeV,
+              'pi_lambda2595_IPchi2'      : 0.5,
+              'pi_lambda2595_ProbNNghost' : 0.1,
+              'pi_lambda2595_PT'          : 100*MeV,
+              'pi_lambdac_ProbNNghost'    : 0.1,
+              'pi_lambdac_PT'             : 250*MeV,
+              'Lambda_DOCA'               : 1.0*millimeter,
+              'Lambda_FDCHI2'             : 50,
+              'Lambda_M_Min'              : 2236*MeV,
+              'Lambda_M_Max'              : 2336*MeV,
+              'Lambda_PT'                 : 1500*MeV,
+              'Lambda_VCHI2'              : 4,
+              'Lambda2595_DOCA'           : 1.0*millimeter,
+              'Lambda2595_FDCHI2'         : 5,
+              'Lambda2595_ISO'            : 0.6,
+              'Lambda2595_M_Min'          : 2545*MeV,
+              'Lambda2595_M_Max'          : 2645*MeV,
+              'Lambda2595_PT'             : 1500*MeV,
+              'Lambda2595_VCHI2'          : 4
+    },
+    'StrippingDMLambdaToDPiLine': {
+              'Prescale'                  : 1.0,
+              'Postscale'                 : 1.0,
+              'Prescale_control'          : 0.6,
+              'Postscale_control'         : 1.0,
+              'K_ProbNNghost'             : 0.1,
+              'K_ProbNNk'                 : 0.9,
+              'K_PT'                      : 800*MeV,
+              'piD_IPchi2'                : 20,
+              'piD_ProbNNghost'           : 0.2,
+              'piD_ProbNNpi'              : 0.8,
+              'piD_PT'                    : 400*MeV,
+              'pi_ProbNNghost'            : 0.1,
+              'pi_PT'                     : 800*MeV,
+              'pi_ProbNNpi'               : 0.8,
+              'D_DOCA'                    : 0.4*millimeter,
+              'D_FDCHI2'                  : 50,
+              'D_M_Min'                   : 1840*MeV,
+              'D_M_Max'                   : 1900*MeV,
+              'D_PT'                      : 2000*MeV,
+              'D_VCHI2'                   : 6,
+              'LambdaToDPi_DOCA'          : 0.3*millimeter,
+              'LambdaToDPi_DOCACHI2'      : 7,
+              'LambdaToDPi_FDCHI2'        : 30,
+              'LambdaToDPi_ISO'           : 0.6,
+              'LambdaToDPi_M_Min'         : 1100*MeV,
+              'LambdaToDPi_M_Max'         : 5700*MeV,
+              'LambdaToDPi_PT'            : 3000*MeV,
+              'LambdaToDPi_VCHI2'         : 8,
+              'LambdaToDPi_IPCHI2'        : 20
+    },
+    'StrippingDMLambdaToDKLine': {
+              'Prescale'                  : 1.0,
+              'Postscale'                 : 1.0,
+              'Prescale_control'          : 0.6,
+              'Postscale_control'         : 1.0,
+              'K_ProbNNghost'             : 0.1,
+              'K_ProbNNk'                 : 0.8,
+              'K_PT'                      : 800*MeV,
+              'KD_IPchi2'                 : 20,
+              'KD_ProbNNghost'            : 0.2,
+              'KD_ProbNNK'                : 0.7,
+              'KD_PT'                     : 250*MeV,
+              'pi_ProbNNghost'            : 0.1,
+              'pi_PT'                     : 800*MeV,
+              'pi_ProbNNpi'               : 0.8,
+              'D_DOCA'                    : 0.4*millimeter,
+              'D_FDCHI2'                  : 50,
+              'D_M_Min'                   : 1840*MeV,
+              'D_M_Max'                   : 1900*MeV,
+              'D_PT'                      : 2000*MeV,
+              'D_VCHI2'                   : 6,
+              'LambdaToDK_DOCA'           : 0.5*millimeter,
+              'LambdaToDK_DOCACHI2'       : 8,
+              'LambdaToDK_FDCHI2'         : 30,
+              'LambdaToDK_ISO'            : 0.6,
+              'LambdaToDK_M_Min'          : 1100*MeV,
+              'LambdaToDK_M_Max'          : 5700*MeV,
+              'LambdaToDK_PT'             : 2000*MeV,
+              'LambdaToDK_VCHI2'          : 8,
+              'LambdaToDK_IPCHI2'         : 25
+    },
+  },
+    
+    "STREAMS": [ "BhadronCompleteEvent" ], 
+    "WGs": [ "QEE" ]
+}
+
+ALP2TauTau = {
+    "BUILDERTYPE": "ALP2TauTauConf", 
+    'CONFIG'               : {
+                           'SpdMult'                   : '6000',
+                           # Leptons (e, mu) [tighter cuts with respect to arXiv:xxxx.xxxx - no max(e_ISO, mu_ISO) for emu mode]:
+                           'TAUE_PROBNN_EMU'           : 0.5,
+                           'TAUE_PT'                   : 3500 * MeV,
+                           'TAUE_P'                    : 10000 * MeV,
+                           'TAUE_IP'                   : 0.03 * mm,
+                           'TAUE_PROBNN'               : 0.25,
+                           'TAUE_ISO'                  : .99,
+                           'TAUMU_PT'                  : 3500 * MeV,
+                           'TAUMU_P'                   : 10000 * MeV,
+                           'TAUMU_IP'                  : 0.01 * mm,
+                           'TAUMU_PROBNN'              : 0.8,
+                           'TAUMU_ISO'                 : .99,
+                           # Tau leptons and pion daughters:
+                           'TAUCOMB_DOCA'              : 0.05*mm,
+                           'TAU_MASS_HIGH'             : 1700.*MeV,
+                           'TAU_MASS_LOW'              : 0.*MeV,
+                           'TAUPI_MINPT'               : 1000 * MeV,
+                           'TAUPI_MINP'                : 2000 * MeV,
+                           'TAUPI_MINIP'               : 0.01 * mm,
+                           'TAUPI_MINPID'              : 0.,
+                           'TAU_IPMAX'                 : 0.2* mm,
+                           'TAU_MCORR_MAX'             : 2500.*MeV,
+                           'TAU_MCORR_MIN'             : 1200.*MeV,
+                           'TAU_PT'                    : 10000.*MeV,
+                           'TAU_ISO'                   : .15, # this cut kills signal but also helps to reduce background.
+                           ## Specific cuts for full hadronic modes:
+                           'TAUPI_MINPT_FH'            : 500 * MeV,
+                           'TAU_IPMAX_FH'              : 0.1* mm,
+                           'TAU_RHO_MIN_FH'            : 0.1* mm,
+                           'TAU_RHO_MAX_FH'            : 5.* mm,
+                           'TAU_PT_FH'                 : 2500.*MeV,
+                           ## ALP combination:
+                           'HTAU_IPMAX'                : 0.2*mm,
+                           'HTAU_DOCA'                 : 0.4*mm,
+                           'HTAU_FDMAX'                : 1*mm,
+                           'HTAU_DOCA_FH'              : 0.1*mm,
+                           'HTAU_FDMAX_FH'             : 0.25*mm,
+                           'HTAU_IPMAX_FH'             : 0.1*mm,
+                           'HTAU_MASS_LOW'             : 0.*MeV,
+                           'HTAU_MASS_HIGH'            : 1e6*MeV,
+                           'HTAU_ETA_MIN'              : 2,
+                           'HTAU_ETA_MAX'              : 4.5,
+                           'HTAU_PT_MIN'               : 15*GeV,
+                           'HTAU_PT_MAX'               : 150*GeV,
+                           'HTAU_PT_DAUG_MIN'          : 5.*GeV,
+                           'HTAU_PT_DAUG_MAX'          : 7.5*GeV,
+                           'HTAU_ETA_DAUG_MIN'         : 1.5,
+                           'HTAU_ETA_DAUG_MAX'         : 5,
+                           ## Prescales and postscales:
+                           'HTau3HTau3H_LinePrescale'  : 1,
+                           'HTau3HTau3H_LinePostscale' : 1,
+                           'HTau3HTauMu_LinePrescale'  : 1,
+                           'HTau3HTauMu_LinePostscale' : 1,
+                           'HTau3HTauE_LinePrescale'   : 1,
+                           'HTau3HTauE_LinePostscale'  : 1,
+                           'HTauMuTauE_LinePrescale'   : 1,
+                           'HTauMuTauE_LinePostscale'  : 1
+                           },
+                           'STREAMS'     : ['BhadronCompleteEvent'],
+                           "WGs": [ "QEE" ]
+}
+
+LLP2Hadrons = {
+    "BUILDERTYPE": "LLP2HadronsConf", 
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : {
+    'BhadronCompleteEvent': [
+      'StrippingLLP2Hadrons_KstKst_LongLine',
+      'StrippingLLP2Hadrons_KsKpi_LL_LongLine',
+      'StrippingLLP2Hadrons_KsKpi_DD_LongLine',
+      'StrippingLLP2Hadrons_DpDm_LongLine',
+      'StrippingLLP2Hadrons_DpDz_LongLine',
+      'StrippingLLP2Hadrons_DpDp_LongLine',
+      'StrippingLLP2Hadrons_DzDz_LongLine',
+      'StrippingLLP2Hadrons_DzDzbar_LongLine',
+      'StrippingLLP2Hadrons_EtaPiPi_LongLine',
+      'StrippingLLP2Hadrons_KstKst_DownLine',
+      'StrippingLLP2Hadrons_KsKpi_DD_DownLine',
+      'StrippingLLP2Hadrons_DpDm_DownLine',
+      'StrippingLLP2Hadrons_DpDz_DownLine',
+      'StrippingLLP2Hadrons_DpDp_DownLine',
+      'StrippingLLP2Hadrons_DzDz_DownLine',
+      'StrippingLLP2Hadrons_DzDzbar_DownLine',
+      'StrippingLLP2Hadrons_EtaPiPi_DownLine',
+    ],
+  },
+  'CONFIG'      : {
+    'Common': {
+      'CommonTrackCuts': "(TRGHOSTPROB<0.3) & (P>3.*GeV) & (BPVIPCHI2() > 9.)",
+    },
+    'Prescales': {
+      'KstKst'        : 1.0,
+      'KsKpi'         : 1.0,
+      'DD'            : 1.0,
+      'EtaPiPi'       : 1.0,
+    },
+    'KstKst': {
+      'Long':{
+          'TrackCuts'     : "(PT>500*MeV)",
+          'K_id'          : "(PROBNNk  > 0.4)",
+          'Pi_id'         : "(PROBNNpi > 0.4)",
+          'KstCombCuts'   : "(ADAMASS('K*(892)0')<300*MeV)",
+          'KstMomCuts'    : "(VFASPF(VCHI2PDOF) < 9.) & (in_range( PDGM('K*(892)0') - 120*MeV , M , PDGM('K*(892)0') + 120*MeV ))",
+          'CombCuts'      : "AALL",
+          'MomCuts'       : "(VFASPF(VCHI2PDOF) < 9.) & (BPVDLS > 10) & (PT>2.*GeV) & (BPVIPCHI2() < 9.)"
+      },
+     'Down':{
+          'TrackCuts'     : "(PT>500*MeV)",
+          'KstCombCuts'   : "(ADAMASS('K*(892)0')<300*MeV)",
+          'KstMomCuts'    : "(VFASPF(VCHI2PDOF) < 9.) & (in_range( PDGM('K*(892)0') - 120*MeV , M , PDGM('K*(892)0') + 120*MeV ))",
+          'CombCuts'      : "AALL",
+          'MomCuts'       : "(VFASPF(VCHI2PDOF) < 9.) & (BPVDLS > 5)  & (VFASPF(VZ)>200*mm) & (PT>2.*GeV)"
+      },
+    },
+    'KsKpi_LL': {
+      'Long':{
+          'TrackCuts'    : "(PT > 700*MeV)", 
+          'K_id'         : "(PROBNNk  > 0.4)",
+          'Pi_id'        : "(PROBNNpi > 0.4)",
+          'Ks_PiCuts'    : "(MINTREE('pi-'==ABSID, PROBNNpi) > 0.4) & (MAXTREE('pi-'==ABSID, TRGHOSTPROB) < 0.3) & (MINTREE('pi-'==ABSID, MIPCHI2DV(PRIMARY)) > 9.) & (MINTREE('pi-'==ABSID, PT) > 500*MeV)",
+          'Ks_MomCuts'   : "(VFASPF(VCHI2PDOF) < 9.) & (BPVIPCHI2() > 9.) & (BPVDLS>5) & (ADMASS('KS0') < 30.*MeV)",
+          'CombCuts'     : "in_range(1.0*GeV, AM, 12.2*GeV)",
+          'MomCuts'      : "in_range(1.0*GeV, M, 12.0*GeV) & (VFASPF(VCHI2PDOF)<9.) & (BPVDLS>10) & (PT>2.*GeV) & (BPVIPCHI2()<9.) & (BPVLTIME()>1.5*picosecond)"
+      }
+    },
+    'KsKpi_DD': {
+        'Long':{
+          'TrackCuts'  : "(PT > 700*MeV)", 
+          'K_id'       : "(PROBNNk  > 0.4)",
+          'Pi_id'      : "(PROBNNpi > 0.4)",
+          'Ks_PiCuts'  : "(MAXTREE('pi-'==ABSID, TRGHOSTPROB) < 0.3) & (MINTREE('pi-'==ABSID, MIPCHI2DV(PRIMARY)) > 9.) & (MINTREE('pi-'==ABSID, PT) > 500*MeV)",
+          'Ks_MomCuts' : "(VFASPF(VCHI2PDOF) < 9.) & (ADMASS('KS0') < 30.*MeV) & (BPVIPCHI2() > 9.)",
+          'CombCuts'   : "in_range(1.0*GeV, AM, 12.2*GeV)",
+          'MomCuts'    : "in_range(1.0*GeV, M, 12.0*GeV) & (VFASPF(VCHI2PDOF) < 9.) & (BPVDLS>5) & (PT>2.*GeV) & (BPVIPCHI2() < 9.) & (BPVLTIME()>1.*picosecond)"
+        },
+        'Down':{
+          'TrackCuts'  : "(PT>700*MeV)", 
+          'Ks_PiCuts'  : "(MAXTREE('pi-'==ABSID, TRGHOSTPROB) < 0.3) & (MINTREE('pi-'==ABSID, PT) > 500*MeV)",
+          'Ks_MomCuts' : "(VFASPF(VCHI2PDOF) < 9.) & (ADMASS('KS0') < 50.*MeV) & (BPVIPCHI2() > 9.) & (MINTREE('pi-'==ABSID, PT) > 500*MeV)",
+          'CombCuts'   : "AM>1.*GeV",
+          'MomCuts'    : "(VFASPF(VCHI2PDOF) < 9.) & (BPVDLS>5)  & (VFASPF(VZ)>200*mm) & (BPVIPCHI2() < 9.)"
+        },      
+    },
+    'DD': {
+        'Long':{
+          'TrackCuts'  : "(PT > 500*MeV)", 
+          'K_id'       : "(PROBNNk  > 0.2)",
+          'Pi_id'      : "(PROBNNpi > 0.2)",
+          'DCombCuts'  : "in_range(1.0*GeV, AM, 3.*GeV)",
+          'DMomCuts'   : "(ADMASS('D+') < 80.*MeV) & (VFASPF(VCHI2PDOF) < 9.) & (BPVIPCHI2() > 4.)",
+          'CombCuts'   : "(AM>3.0*GeV)",
+          'MomCuts'    : "(M>3.0*GeV) & (VFASPF(VCHI2PDOF) < 9.) & (PT>1.*GeV) & (BPVDLS>5)"
+        },
+        'Down':{
+          'TrackCuts'  : "(PT>500*MeV)", 
+          'DCombCuts'  : "in_range(1.0*GeV, AM, 3.*GeV)",
+          'DMomCuts'   : "(ADMASS('D+') < 150.*MeV) & (VFASPF(VCHI2PDOF) < 9.) & (BPVIPCHI2() > 9.)",
+          'CombCuts'   : "(AM>3.0*GeV)",
+          'MomCuts'    : "(M>3.0*GeV) & (PT>1.*GeV) & (VFASPF(VCHI2PDOF) < 9.) & (BPVDLS>3) & (VFASPF(VZ)>200*mm)"        
+        },
+    },
+    'EtaPiPi': {
+        'Long':{
+          'TrackCuts'  : "(PT>500*MeV)",
+          'Pi_id'      : "(PROBNNpi > 0.4)",
+          'Pi0_cuts'   : "(PT>600*MeV)",
+          'EtaCombCuts': "(AM<1*GeV)",
+          'EtaMomCuts' : "(ADMASS('eta') < 100.*MeV) & (VFASPF(VCHI2PDOF) < 9.)",
+          'CombCuts'   : "AALL",
+          'MomCuts'    : "(VFASPF(VCHI2PDOF) < 9.) & (PT>2.*GeV) & (BPVDLS>5) & (BPVIPCHI2() < 9.) & (M<2.5*GeV) & (BPVLTIME()>1.5*picosecond)"
+        },
+        'Down':{
+          'TrackCuts'  : "(PT>500*MeV)",
+          'Pi0_cuts'   : "(PT > 600*MeV)",
+          'EtaCombCuts': "AALL",
+          'EtaMomCuts' : "(ADMASS('eta') < 100.*MeV) & (VFASPF(VCHI2PDOF) < 9.)",
+          'CombCuts'   : "AALL",
+          'MomCuts'    : "(VFASPF(VCHI2PDOF) < 9.) & (BPVDLS>5) & (VFASPF(VZ)>200*mm) & (M<2.5*GeV)"
+        },
+    },
+  },
+}
+
+LLPV0 = {
+    "BUILDERTYPE": "LLPV0_sConf", 
+    'CONFIG'    : {
+                         '2HHSinglePrescale'     :  0.0135 
+                 ,       '2HHMultiPrescale'      :  1.0
+                 ,       '2HHSingleKaonPrescale' :  0.045
+                 ,       '2HHDoubleKaonPrescale' :  1.0
+                 ,       '2mumuSinglePrescale'   :  0. # line removed
+                 ,       '2MixedPrescale'        :  1.0
+                 ,       'dimuProbNNmu'          :  0.
+                 ,       'dihProbNNmu'           :  0.
+                 ,       'dihProbNNk'            :  0.01
+                 ,       'dikProbNNk'            :  0.55
+                 ,       'dimuProbNNk'           :  0.5
+                 ,       'mixedProbNNk'          :  0.01
+                 ,       'dihhalt'               :  100
+                 ,       'dihHHSingle'           :  1
+                 ,       'dihHHMulti'            :  6
+                 ,       'dikHHSingleKaon'       :  1
+                 ,       'dikHHDoubleKaon'       :  2
+                 ,       'dimuMuonsSingle'       :  1
+                 ,       'dihMuons'              :  0
+                 ,       'dimuMixed'             :  1
+                 ,       'dihMixed'              :  2
+                 ,       'daugsP'                :  5.*GeV
+                 ,       'daugsPT'               :  1.*GeV
+                 ,       'daugsChi2dv'           :  25.
+                 ,       'combChi2'              :  25.
+                 ,       'motherChi2vx'          :  16.
+                 ,       'motherLifetime'        :  1.5*picosecond
+                  },
+    'STREAMS' : ['BhadronCompleteEvent'], 
+    "WGs": [ "QEE" ]
+}
\ No newline at end of file
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_RD.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_RD.py
new file mode 100644
index 000000000..64d999960
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_RD.py
@@ -0,0 +1,3844 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+B2DibaryonMuMu = {
+    "BUILDERTYPE": "B2DibaryonMuMuConf", 
+    "CONFIG": {
+        "BDIRA": 0.999, 
+        "BFlightCHI2": 36, 
+        "BIPCHI2": 25, 
+        "BMassWindow": 1500, 
+        "BVertexCHI2": 16, 
+        "Bu2mmLinePrescale": 1, 
+        "DiLeptonFDCHI2": 16, 
+        "DiLeptonIPCHI2": 0, 
+        "DiLeptonPT": 0, 
+        "K1_MassWindow_Hi": 6300, 
+        "K1_MassWindow_Lo": 0, 
+        "K1_SumIPChi2Had": 48.0, 
+        "K1_SumPTHad": 800, 
+        "K1_VtxChi2": 20, 
+        "KaonIPCHI2": 9, 
+        "KaonPT": 250, 
+        "LamLam_VtxChi2": 36, 
+        "LeptonIPCHI2": 9, 
+        "LeptonPT": 300, 
+        "Trk_Chi2": 3, 
+        "Trk_GhostProb": 0.3, 
+        "UpperMass": 5500, 
+        "V0TAU": 0.0005
+    }, 
+    "STREAMS": [ "Leptonic" ], 
+    "WGs": [ "RD" ]
+}
+
+B2KSKSMuMu = {
+    "BUILDERTYPE": "B2KSKSMuMuConf", 
+    "CONFIG": {
+        "BDIRA": 0.999, 
+        "BFlightCHI2": 36, 
+        "BIPCHI2": 25, 
+        "BMassWindow": 1500, 
+        "BVertexCHI2": 16, 
+        "Bu2mmLinePrescale": 1, 
+        "DiLeptonFDCHI2": 16, 
+        "DiLeptonIPCHI2": 0, 
+        "DiLeptonPT": 0, 
+        "K1_MassWindow_Hi": 6100, 
+        "K1_MassWindow_Lo": 0, 
+        "K1_VtxChi2": 20, 
+        "KSDIRA": 0.9, 
+        "KSMassWindow": 30, 
+        "KsKs_VtxChi2": 36, 
+        "LeptonIPCHI2": 9, 
+        "LeptonPT": 300, 
+        "UpperMass": 5500, 
+        "V0TAU": 0.0005
+    }, 
+    "STREAMS": [ "Dimuon" ], 
+    "WGs": [ "RD" ]
+}
+
+B2LLXBDTSS = {
+    "BUILDERTYPE": "B2LLXBDTSSConf", 
+    "CONFIG": {
+        "BComCuts": "(in_range(3.7*GeV, AM, 6.8*GeV))", 
+        "BMomCuts": "(in_range(4.0*GeV,  M, 6.5*GeV)) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVDIRA> 0.999) & (BPVDLS>0) & (BPVIPCHI2()<400)", 
+        "Bd2LLKsXmlFile": "$TMVAWEIGHTSROOT/data/Bd2eeKs_BDT_v1r0.xml", 
+        "Bd2LLKstarXmlFile": "$TMVAWEIGHTSROOT/data/Bd2eeKstar_BDT_v1r0.xml", 
+        "Bd2eeKsMVACut": "-0.07", 
+        "Bd2eeKstarMVACut": "0.", 
+        "Bd2mumuKsMVACut": "-0.07", 
+        "Bd2mumuKstarMVACut": "0.", 
+        "Bs2LLPhiXmlFile": "$TMVAWEIGHTSROOT/data/Bs2eePhi_BDT_v1r0.xml", 
+        "Bs2eePhiMVACut": "-0.06", 
+        "Bs2mumuPhiMVACut": "-0.08", 
+        "Bu2LLKXmlFile": "$TMVAWEIGHTSROOT/data/Bu2eeK_BDT_v1r0.xml", 
+        "Bu2eeKMVACut": "0.", 
+        "Bu2mumuKMVACut": "0.", 
+        "DiElectronMCuts": "\n                           (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)\n                           & (INTREE( (ID=='e-') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (PIDe>-2) & (TRGHOSTPROB<0.5) ))\n                          ", 
+        "DiElectronPCuts": "\n                           (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)\n                           & (INTREE( (ID=='e+') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (PIDe>-2) & (TRGHOSTPROB<0.5) ))\n                          ", 
+        "DiMuonMCuts": "\n                           (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)\n                           & (INTREE( (ID=='mu-') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) ))\n                          ", 
+        "DiMuonPCuts": "\n                           (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)\n                           & (INTREE( (ID=='mu+') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) ))\n                          ", 
+        "ElectronCuts": "(APT>100*MeV)", 
+        "ElectronMuonComCuts": "(APT>100*MeV) & (ADOCACHI2CUT(30, ''))", 
+        "ElectronMuonMCuts": "\n\t\t\t     (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)\n\t\t\t     & (INTREE( (ID=='e+') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) & (PIDe>-2) ))\n\t\t\t     & (INTREE( (ID=='mu-') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) ))\n\t\t\t     ", 
+        "ElectronMuonPCuts": "\n\t\t\t     (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)\n\t\t\t     & (INTREE( (ID=='e-') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) & (PIDe>-2) ))\n\t\t\t     & (INTREE( (ID=='mu+') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) ))\n\t\t\t     ", 
+        "KaonCuts": "(PROBNNk > 0.1) & (PT>300*MeV) & (TRGHOSTPROB<0.4)", 
+        "KsDDCuts": "(ADMASS('KS0') < 30.*MeV) & (BPVVDCHI2>25)", 
+        "KsLLComCuts": "(ADAMASS('KS0') < 50.*MeV) & (ADOCACHI2CUT(25, ''))", 
+        "KsLLCuts": "(ADMASS('KS0') < 30.*MeV) & (BPVVDCHI2>25) & (VFASPF(VCHI2) < 25.)", 
+        "KstarCuts": "(VFASPF(VCHI2/VDOF)<16) & (ADMASS('K*(892)0')< 300*MeV)", 
+        "LambdaDDCuts": "(ADMASS('Lambda0') < 30.*MeV) & (BPVVDCHI2>25)", 
+        "LambdaLLComCuts": "(ADAMASS('Lambda0')<50*MeV) & (ADOCACHI2CUT(30, ''))", 
+        "LambdaLLCuts": "(ADMASS('Lambda0') < 30.*MeV) & (BPVVDCHI2>25) & (VFASPF(VCHI2) < 25.)", 
+        "LambdastarComCuts": "(AM < 5.6*GeV)", 
+        "LambdastarCuts": "(VFASPF(VCHI2) < 25.)", 
+        "Lb2LLLambdaXmlFile": "$TMVAWEIGHTSROOT/data/Lb2eeLambda_BDT_v1r0.xml", 
+        "Lb2LLPKXmlFile": "$TMVAWEIGHTSROOT/data/Lb2eePK_BDT_v1r0.xml", 
+        "Lb2eeLambdaMVACut": "-0.11", 
+        "Lb2eePKMVACut": "-0.03", 
+        "Lb2mumuLambdaMVACut": "-0.15", 
+        "Lb2mumuPKMVACut": "-0.07", 
+        "LbComCuts": "(in_range(3.7*GeV, AM, 7.1*GeV))", 
+        "LbMomCuts": "(in_range(4.0*GeV,  M, 6.8*GeV)) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVDIRA> 0.999) & (BPVDLS>0) & (BPVIPCHI2()<400)", 
+        "PhiCuts": "\n                          (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<1.05*GeV) & (MIPCHI2DV(PRIMARY)>2.)\n                          & (INTREE( (ID=='K+') & (PT>200*MeV) & (TRGHOSTPROB<0.4) ))\n                          & (INTREE( (ID=='K-') & (PT>200*MeV) & (TRGHOSTPROB<0.4) ))\n                          ", 
+        "Pion4LPCuts": "(PROBNNpi> 0.2) & (PT>100*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>9.)", 
+        "PionCuts": "(PROBNNpi> 0.2) & (PT>250*MeV) & (TRGHOSTPROB<0.4)", 
+        "ProtonCuts": "(PROBNNp> 0.05) & (PT>300*MeV) & (TRGHOSTPROB<0.4)", 
+        "RelatedInfoTools": [
+            {
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  X+  X-) ^(X0 ->  l+  l+)]CC": "VertexIsoInfoLL", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l+)]CC": "VertexIsoInfoLL", 
+                    "[Beauty -> ^(X0 ->  X+  X-)  (X0 ->  l+  l+)]CC": "VertexIsoInfoHH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "VertexIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  X+  X-) ^(X0 ->  l+  l+)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l+)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty -> ^(X0 ->  X+  X-)  (X0 ->  l+  l+)]CC": "VertexIsoBDTInfoHH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "VertexIsoBDTInfo", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "ConeAngle": 0.5, 
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l+)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l+)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l+)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l+)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 ->  l+ ^l+)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 -> ^l+  l+)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X0 ->  l+  l+)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X0 ->  l+  l+)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 ->  l+ ^l+)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 -> ^l+  l+)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X0 ->  l+  l+)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X0 ->  l+  l+)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l+)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X0 ->  l+  l+)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X0 ->  l+  l+)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  X+  (X0 ->  l+ ^l+)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  X+  (X0 -> ^l+  l+)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l+)]CC": "TrackIsoInfoLL", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l+)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X0 ->  l+  l+)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X0 ->  l+  l+)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^X+  (X0 ->  l+  l+)]CC": "TrackIsoInfoH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "TrackIsoInfo05", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeSize": 0.5, 
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l+)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l+)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l+)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l+)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 ->  l+ ^l+)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 -> ^l+  l+)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X0 ->  l+  l+)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X0 ->  l+  l+)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 ->  l+ ^l+)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 -> ^l+  l+)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X0 ->  l+  l+)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X0 ->  l+  l+)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l+)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X0 ->  l+  l+)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X0 ->  l+  l+)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  X+  (X0 ->  l+ ^l+)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  X+  (X0 -> ^l+  l+)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l+)]CC": "ConeIsoInfoLL", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l+)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X0 ->  l+  l+)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X0 ->  l+  l+)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^X+  (X0 ->  l+  l+)]CC": "ConeIsoInfoH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "ConeIsoInfo05", 
+                "Type": "RelInfoConeIsolation"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l+)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l+)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 ->  l+ ^l+)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 -> ^l+  l+)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 ->  l+ ^l+)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 -> ^l+  l+)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  X+  (X0 ->  l+ ^l+)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  X+  (X0 -> ^l+  l+)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^X+  (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfoH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "TrackIsoBs2MMInfo", 
+                "Type": "RelInfoBs2MuMuTrackIsolations"
+            }, 
+            {
+                "ConeAngle": 1.0, 
+                "Location": "TrackIsoInfo10", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeAngle": 1.5, 
+                "Location": "TrackIsoInfo15", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeAngle": 2.0, 
+                "Location": "TrackIsoInfo20", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeSize": 1.0, 
+                "Location": "ConeIsoInfo10", 
+                "Type": "RelInfoConeIsolation"
+            }, 
+            {
+                "ConeSize": 1.5, 
+                "Location": "ConeIsoInfo15", 
+                "Type": "RelInfoConeIsolation"
+            }, 
+            {
+                "ConeSize": 2.0, 
+                "Location": "ConeIsoInfo20", 
+                "Type": "RelInfoConeIsolation"
+            }
+        ]
+    }, 
+    "STREAMS": [ "Leptonic" ], 
+    "WGs": [ "RD" ]
+}
+
+B2LLXBDT_Calib = {
+    "BUILDERTYPE": "B2LLXBDT_CalibConf", 
+    "CONFIG": {
+        "BComCuts": "(in_range(3.7*GeV, AM, 6.8*GeV))", 
+        "BMomCuts": "(in_range(4.0*GeV,  M, 6.5*GeV)) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVDIRA> 0.999) & (BPVDLS>0) & (BPVIPCHI2()<400)", 
+        "Bd2JpsieeKstarMVACut": "0.", 
+        "Bd2JpsimumuKstarMVACut": "0.", 
+        "Bd2LLKstarXmlFile": "$TMVAWEIGHTSROOT/data/Bd2eeKstar_BDT_v1r0.xml", 
+        "Bu2JpsieeKMVACut": "0.", 
+        "Bu2JpsimumuKMVACut": "0.", 
+        "Bu2LLKXmlFile": "$TMVAWEIGHTSROOT/data/Bu2eeK_BDT_v1r0.xml", 
+        "EEBothCuts": "\n\t\t\t   (in_range(2196.0*MeV, M, 3596.0*MeV))\n\t\t\t  ", 
+        "EEComCuts": "\n\t\t\t   (in_range(2096.0*MeV, AM, 3696.0*MeV)) & (ACHI2DOCA(1,2) <18)\t  \n\t\t\t  ", 
+        "EEProbe1Cuts": "\n\t\t\t   (CHILDCUT( (PT>200*MeV),1 )) & (CHILDCUT( (P>3.0*GeV),1 )) & (CHILDCUT( (MIPCHI2DV(PRIMARY)>1.),1 ))\n\t\t\t   & (CHILDCUT( ISLONG,1 )) & (CHILDCUT( (TRCHI2DOF<4.),1 ))\n\t\t\t  ", 
+        "EEProbe2Cuts": "\n\t\t\t   (CHILDCUT( (PT>200*MeV),2 )) & (CHILDCUT( (P>3.0*GeV),2 )) & (CHILDCUT( (MIPCHI2DV(PRIMARY)>1.),2 ))\n\t\t\t   & (CHILDCUT( ISLONG,2 )) & (CHILDCUT( (TRCHI2DOF<4.),2 ))\n\t\t\t  ", 
+        "EETag1Cuts": "\n\t\t\t   (CHILDCUT( (PT>1.5*GeV),1 )) & (CHILDCUT( (PIDe>5.),1 )) & (CHILDCUT( (P>6.0*GeV),1 ))\n\t\t\t   & (CHILDCUT( (MIPCHI2DV(PRIMARY)>25.),1 )) & (CHILDCUT( (TRGHOSTPROB<1.),1 )) & (CHILDCUT( (TRCHI2DOF<4.),1 ))\n\t\t\t   & (CHILDCUT( ISLONG,1 ))\n\t\t\t  ", 
+        "EETag2Cuts": "\n\t\t\t   (CHILDCUT( (PT>1.5*GeV),2 )) & (CHILDCUT( (PIDe>5.),2 )) & (CHILDCUT( (P>6.0*GeV),2 ))\n\t\t\t   & (CHILDCUT( (MIPCHI2DV(PRIMARY)>25.),2 )) & (CHILDCUT( (TRGHOSTPROB<1.),2 )) & (CHILDCUT( (TRCHI2DOF<4.),2 ))\n\t\t\t   & (CHILDCUT( ISLONG,2 ))\n\t\t\t  ", 
+        "KaonCuts": "(PROBNNk > 0.1) & (PT>300*MeV) & (TRGHOSTPROB<0.4)", 
+        "KstarCuts": "(VFASPF(VCHI2/VDOF)<16) & (ADMASS('K*(892)0')< 300*MeV)", 
+        "MMBothCuts": "\n\t\t\t   (in_range(2896.0*MeV, M, 3246.0*MeV))\n\t\t\t  ", 
+        "MMComCuts": "\n\t\t\t   (in_range(2796.0*MeV, AM, 3346.0*MeV)) & (ACHI2DOCA(1,2) < 5)\n\t\t\t  ", 
+        "MMProbe1Cuts": "\n\t\t\t   (CHILDCUT( (TRCHI2DOF<4.),1 )) & (CHILDCUT( ISLONG,1 )) & (CHILDCUT( (P>3.0*GeV),1 ))\n\t\t\t   & (CHILDCUT( (PT>200*MeV),1 )) & (CHILDCUT( (MIPCHI2DV(PRIMARY)>1.),1 ))\n\t\t\t  ", 
+        "MMProbe2Cuts": "\n\t\t\t   (CHILDCUT( (TRCHI2DOF<4.),2 )) & (CHILDCUT( ISLONG,2 )) & (CHILDCUT( (P>3.0*GeV),2 ))\n\t\t\t   & (CHILDCUT( (PT>200*MeV),2 )) & (CHILDCUT( (MIPCHI2DV(PRIMARY)>1.),2 ))\n\t\t\t  ", 
+        "MMTag1Cuts": "\n\t\t\t   (CHILDCUT( ISMUON,1 )) & (CHILDCUT( (P>3.0*GeV),1 )) & (CHILDCUT( (PT>1.2*GeV),1 ))\n\t\t\t   & (CHILDCUT( (TRCHI2DOF<4.),1 )) & (CHILDCUT( ISLONG,1 )) & (CHILDCUT( (TRGHOSTPROB<0.2),1 ))\n\t\t\t   & (CHILDCUT( (MIPCHI2DV(PRIMARY)>9.),1 ))\n\t\t\t  ", 
+        "MMTag2Cuts": "\n\t\t\t   (CHILDCUT( ISMUON,2 )) & (CHILDCUT( (P>3.0*GeV),2 )) & (CHILDCUT( (PT>1.2*GeV),2 ))\n\t\t\t   & (CHILDCUT( (TRCHI2DOF<4.),2 )) & (CHILDCUT( ISLONG,2 )) & (CHILDCUT( (TRGHOSTPROB<0.2),2 ))\n\t\t\t   & (CHILDCUT( (MIPCHI2DV(PRIMARY)>9.),2 ))\n\t\t\t  ", 
+        "RelatedInfoTools": [
+            {
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  X+  X-) ^(X0 ->  l+  l-)]CC": "VertexIsoInfoLL", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "VertexIsoInfoLL", 
+                    "[Beauty -> ^(X0 ->  X+  X-)  (X0 ->  l+  l-)]CC": "VertexIsoInfoHH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "VertexIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  X+  X-) ^(X0 ->  l+  l-)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty -> ^(X0 ->  X+  X-)  (X0 ->  l+  l-)]CC": "VertexIsoBDTInfoHH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "VertexIsoBDTInfo", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "ConeAngle": 0.5, 
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l-)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  X+  (X0 ->  l+ ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  X+  (X0 -> ^l+  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "TrackIsoInfoLL", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^X+  (X0 ->  l+  l-)]CC": "TrackIsoInfoH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "TrackIsoInfo05", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeSize": 0.5, 
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l-)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  X+  (X0 ->  l+ ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  X+  (X0 -> ^l+  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "ConeIsoInfoLL", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^X+  (X0 ->  l+  l-)]CC": "ConeIsoInfoH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "ConeIsoInfo05", 
+                "Type": "RelInfoConeIsolation"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  X+  (X0 ->  l+ ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  X+  (X0 -> ^l+  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^X+  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "TrackIsoBs2MMInfo", 
+                "Type": "RelInfoBs2MuMuTrackIsolations"
+            }, 
+            {
+                "ConeAngle": 1.0, 
+                "Location": "TrackIsoInfo10", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeAngle": 1.5, 
+                "Location": "TrackIsoInfo15", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeAngle": 2.0, 
+                "Location": "TrackIsoInfo20", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeSize": 1.0, 
+                "Location": "ConeIsoInfo10", 
+                "Type": "RelInfoConeIsolation"
+            }, 
+            {
+                "ConeSize": 1.5, 
+                "Location": "ConeIsoInfo15", 
+                "Type": "RelInfoConeIsolation"
+            }, 
+            {
+                "ConeSize": 2.0, 
+                "Location": "ConeIsoInfo20", 
+                "Type": "RelInfoConeIsolation"
+            }
+        ]
+    }, 
+    "STREAMS": [ "Leptonic" ], 
+    "WGs": [ "RD" ]
+}
+
+B2MuMuMuMu = {
+    "BUILDERTYPE": "B2MuMuMuMuLinesConf", 
+    "CONFIG": {
+        "B23MuPiLinePostscale": 1, 
+        "B23MuPiLinePrescale": 0, 
+        "B2DetachedDiMuons": {
+            "BPVDIRA_MIN": 0.0, 
+            "BPVIPCHI2_MAX": 16, 
+            "BPVVDCHI2_MIN": 50, 
+            "MASS_MAX": {
+                "B": "6000*MeV"
+            }, 
+            "MASS_MIN": {
+                "B": "4600*MeV"
+            }, 
+            "SUMPT_MIN": "2000*MeV", 
+            "VCHI2DOF_MAX": 6
+        }, 
+        "B2DetachedDimuonAndJpsiLinePostscale": 1, 
+        "B2DetachedDimuonAndJpsiLinePrescale": 1, 
+        "B2JpsiKmumuLinePostscale": 1, 
+        "B2JpsiKmumuLinePrescale": 1, 
+        "B2JpsiPhimumuLinePostscale": 1, 
+        "B2JpsiPhimumuLinePrescale": 1, 
+        "B2MuMuMuMuLinePostscale": 1, 
+        "B2MuMuMuMuLinePrescale": 0, 
+        "B2TwoDetachedDimuonLinePostscale": 1, 
+        "B2TwoDetachedDimuonLinePrescale": 0, 
+        "D2MuMuMuMuLinePostscale": 1, 
+        "D2MuMuMuMuLinePrescale": 0, 
+        "DetachedDiMuons": {
+            "AMAXDOCA_MAX": "0.5*mm", 
+            "ASUMPT_MIN": "1000*MeV", 
+            "BPVVDCHI2_MIN": 16, 
+            "VCHI2DOF_MAX": 16
+        }
+    }, 
+    "STREAMS": [ "Dimuon" ], 
+    "WGs": [ "RD" ]
+}
+
+B2OCMuMu = {
+    "BUILDERTYPE": "B2OCMuMuConf", 
+    "CONFIG": {
+        "BDIRA": 0.999, 
+        "BFlightCHI2": 50, 
+        "BIPCHI2": 25, 
+        "BMassWindow": 1500, 
+        "BVertexCHI2": 12, 
+        "BVertexCHI2Loose": 20, 
+        "B_MassWindow_Hi": 5200, 
+        "BcFlightCHI2": 25, 
+        "Bc_MassWindow_Hi": 6200, 
+        "Bu2mmLinePrescale": 1, 
+        "DiHadronADOCA": 0.75, 
+        "DiHadronADOCACHI2": 30, 
+        "DiHadronVtxCHI2": 10, 
+        "K1_SumIPChi2Had": 48.0, 
+        "KaonIPCHI2": 9, 
+        "KaonPT": 250, 
+        "Lb_MassWindow_Hi": 5600, 
+        "LeptonIPCHI2": 9, 
+        "MinProbNN": 0.02, 
+        "MinProbNNTight": 0.1, 
+        "PTHad": 1000, 
+        "Trk_Chi2": 3, 
+        "Trk_GhostProb": 0.3
+    }, 
+    "STREAMS": [ "Leptonic" ], 
+    "WGs": [ "RD" ]
+}
+
+B2XMuMu = {
+    "BUILDERTYPE": "B2XMuMuConf", 
+    "CONFIG": {
+        "A1_Comb_MassHigh": 4200.0, 
+        "A1_Comb_MassLow": 0.0, 
+        "A1_Dau_MaxIPCHI2": 16.0, 
+        "A1_FlightChi2": 36.0, 
+        "A1_MassHigh": 4000.0, 
+        "A1_MassLow": 0.0, 
+        "A1_MinIPCHI2": 4.0, 
+        "A1_VtxChi2": 8.0, 
+        "B_Comb_MassHigh": 7100.0, 
+        "B_Comb_MassLow": 4600.0, 
+        "B_DIRA": 0.9999, 
+        "B_Dau_MaxIPCHI2": 9.0, 
+        "B_FlightCHI2": 64.0, 
+        "B_IPCHI2": 16.0, 
+        "B_MassHigh": 7000.0, 
+        "B_MassLow": 4700.0, 
+        "B_VertexCHI2": 8.0, 
+        "DECAYS": [
+            "B0 -> J/psi(1S) phi(1020)", 
+            "[B0 -> J/psi(1S) K*(892)0]cc", 
+            "B0 -> J/psi(1S) rho(770)0", 
+            "[B+ -> J/psi(1S) rho(770)+]cc", 
+            "B0 -> J/psi(1S) f_2(1950)", 
+            "B0 -> J/psi(1S) KS0", 
+            "[B0 -> J/psi(1S) D~0]cc", 
+            "[B+ -> J/psi(1S) K+]cc", 
+            "[B+ -> J/psi(1S) pi+]cc", 
+            "[B+ -> J/psi(1S) K*(892)+]cc", 
+            "[B+ -> J/psi(1S) D+]cc", 
+            "[B+ -> J/psi(1S) D*(2010)+]cc", 
+            "[Lambda_b0 -> J/psi(1S) Lambda0]cc", 
+            "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc", 
+            "B0 -> J/psi(1S) pi0", 
+            "[B+ -> J/psi(1S) a_1(1260)+]cc", 
+            "[B+ -> J/psi(1S) K_1(1270)+]cc", 
+            "[B+ -> J/psi(1S) K_2(1770)+]cc", 
+            "B0 -> J/psi(1S) K_1(1270)0", 
+            "[B+ -> J/psi(1S) K_1(1400)+]cc", 
+            "B0 -> J/psi(1S) K_1(1400)0", 
+            "[Xi_b- -> J/psi(1S) Xi-]cc", 
+            "[Omega_b- -> J/psi(1S) Omega-]cc", 
+            "B0 -> J/psi(1S) f_1(1285)", 
+            "B0 -> J/psi(1S) omega(782)"
+        ], 
+        "Dau_DIRA": -0.9, 
+        "Dau_VertexCHI2": 12.0, 
+        "Dimu_Dau_MaxIPCHI2": 6.0, 
+        "Dimu_FlightChi2": 9.0, 
+        "DimuonUPPERMASS": 7100.0, 
+        "DimuonWS": True, 
+        "HLT1_FILTER": None, 
+        "HLT2_FILTER": None, 
+        "HadronWS": False, 
+        "Hadron_MinIPCHI2": 6.0, 
+        "HyperonCombWindow": 65.0, 
+        "HyperonMaxDocaChi2": 20.0, 
+        "HyperonWindow": 50.0, 
+        "K12OmegaK_CombMassHigh": 2000, 
+        "K12OmegaK_CombMassLow": 400, 
+        "K12OmegaK_MassHigh": 2100, 
+        "K12OmegaK_MassLow": 300, 
+        "K12OmegaK_VtxChi2": 8.0, 
+        "KpiVXCHI2NDOF": 8.0, 
+        "KsWINDOW": 30.0, 
+        "Kstar_Comb_MassHigh": 6200.0, 
+        "Kstar_Comb_MassLow": 0.0, 
+        "Kstar_Dau_MaxIPCHI2": 6.0, 
+        "Kstar_FlightChi2": 16.0, 
+        "Kstar_MassHigh": 6200.0, 
+        "Kstar_MassLow": 0.0, 
+        "Kstar_MinIPCHI2": 0.0, 
+        "KstarplusWINDOW": 300.0, 
+        "L0DU_FILTER": None, 
+        "LambdaWINDOW": 30.0, 
+        "LongLivedPT": 0.0, 
+        "LongLivedTau": 2, 
+        "MuonNoPIDs_PIDmu": 0.0, 
+        "MuonPID": -3.0, 
+        "Muon_IsMuon": True, 
+        "Muon_MinIPCHI2": 6.0, 
+        "OmegaChi2Prob": 1e-05, 
+        "Omega_CombMassWin": 400, 
+        "Omega_MassWin": 400, 
+        "Pi0ForOmegaMINPT": 800.0, 
+        "Pi0MINPT": 800.0, 
+        "RelatedInfoTools": [
+            {
+                "Location": "KSTARMUMUVARIABLES", 
+                "Type": "RelInfoBKstarMuMuBDT", 
+                "Variables": [
+                    "MU_SLL_ISO_1", 
+                    "MU_SLL_ISO_2"
+                ]
+            }, 
+            {
+                "Location": "KSTARMUMUVARIABLES2", 
+                "Type": "RelInfoBKstarMuMuHad", 
+                "Variables": [
+                    "K_SLL_ISO_HAD", 
+                    "PI_SLL_ISO_HAD"
+                ]
+            }, 
+            {
+                "Location": "ConeIsoInfo", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPTASYM", 
+                    "CONEPT", 
+                    "CONEP", 
+                    "CONEPASYM", 
+                    "CONEDELTAETA", 
+                    "CONEDELTAPHI"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation", 
+                "Variables": [
+                    "VTXISONUMVTX", 
+                    "VTXISODCHI2ONETRACK", 
+                    "VTXISODCHI2MASSONETRACK", 
+                    "VTXISODCHI2TWOTRACK", 
+                    "VTXISODCHI2MASSTWOTRACK"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoBDTInfo", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Particles": [
+                    1, 
+                    2
+                ], 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "SpdMult": 600, 
+        "Track_GhostProb": 0.5, 
+        "UseNoPIDsHadrons": True
+    }, 
+    "STREAMS": [ "Leptonic" ], 
+    "WGs": [ "RD" ]
+}
+
+B2XMuTauMuonic = {
+    "BUILDERTYPE": "B2XMuTauMuonicConf", 
+    "CONFIG": {
+        "B0_VertexCHI2": 50.0, 
+        "B_DIRA": 0.999, 
+        "Bd_Comb_MassHigh": 6750.0, 
+        "Bd_FlightChi2": 25, 
+        "Bs_Comb_MassHigh": 7250.0, 
+        "Bs_FlightChi2": 16, 
+        "Bs_VertexCHI2": 100.0, 
+        "HLT1_FILTER": None, 
+        "HLT2_FILTER": None, 
+        "Hadron_MinIPCHI2": 9.0, 
+        "Hadron_P": 3000, 
+        "KaonPID": 4.0, 
+        "Kaon_Pion_ProbNN_B2Kstar": 0.8, 
+        "KstarMu_Comb_MassHigh": 3550.0, 
+        "KstarMu_DOCA": 0.6, 
+        "KstarMu_DOCACHI2": 6, 
+        "KstarMu_VertexCHI2": 6, 
+        "Kstar_Comb_MassHigh": 3550.0, 
+        "Kstar_Comb_MassLow": 795.0, 
+        "Kstar_DOCA": 0.12, 
+        "Kstar_DOCACHI2": 3, 
+        "Kstar_FlightChi2": 150.0, 
+        "Kstar_PT": 1100, 
+        "Kstar_VertexCHI2": 3, 
+        "L0DU_FILTER": None, 
+        "LambdastarMu_Comb_MassHigh": 5000.0, 
+        "LambdastarMu_DOCA": 0.8, 
+        "LambdastarMu_DOCACHI2": 8, 
+        "LambdastarMu_VertexCHI2": 8, 
+        "Lambdastar_Comb_MassHigh": 5000.0, 
+        "Lambdastar_Comb_MassLow": 1400.0, 
+        "Lambdastar_DOCA": 0.15, 
+        "Lambdastar_DOCACHI2": 4, 
+        "Lambdastar_FlightChi2": 25, 
+        "Lambdastar_PT": 1250, 
+        "Lambdastar_VertexCHI2": 4, 
+        "Lb_Comb_MassHigh": 7750.0, 
+        "Lb_DIRA": 0.999, 
+        "Lb_FlightChi2": 16, 
+        "Lb_VertexCHI2": 100.0, 
+        "MuonPID": 0.0, 
+        "MuonPT": 500, 
+        "Muon_MinIPCHI2": 9.0, 
+        "PhiMu_Comb_MassHigh": 3600.0, 
+        "PhiMu_DOCA": 0.8, 
+        "PhiMu_DOCACHI2": 9, 
+        "PhiMu_VertexCHI2": 9, 
+        "Phi_Comb_MassHigh": 3600.0, 
+        "Phi_DOCA": 0.15, 
+        "Phi_DOCACHI2": 4, 
+        "Phi_FlightChi2": 25.0, 
+        "Phi_PT": 800, 
+        "Phi_VertexCHI2": 4, 
+        "Pion_ProbNN": 0.3, 
+        "Pion_ProbNN_B2Kstar": 0.8, 
+        "ProtonPID": 5.0, 
+        "SpdMult": 600, 
+        "Track_GhostProb": 0.3, 
+        "Track_TRCHI2": 3, 
+        "UseNoPIDsHadrons": False, 
+        "UseNoPIDsMuons": False
+    }, 
+    "STREAMS": [ "Dimuon" ], 
+    "WGs": [ "RD" ]
+}
+
+B2XTauTauMuonic = {
+    "BUILDERTYPE": "B2XTauTauMuonicConf", 
+    "CONFIG": {
+        "B0_VertexCHI2": 100.0, 
+        "B_DIRA": 0.999, 
+        "Bd_Comb_MassHigh": 6500.0, 
+        "Bd_VertDist": -5, 
+        "Bs_Comb_MassHigh": 7000.0, 
+        "Bs_VertDist": -24, 
+        "Bs_VertexCHI2": 150.0, 
+        "Dau_DIRA": 0.99, 
+        "DimuonUPPERMASS": 4350.0, 
+        "Dimuon_DIRA": 0.0, 
+        "Dimuon_VertexCHI2": 20, 
+        "HLT1_FILTER": None, 
+        "HLT2_FILTER": None, 
+        "Hadron_MinIPCHI2": 16.0, 
+        "Hadron_P": 3000, 
+        "KaonPID": 4.0, 
+        "KaonPID_B2Kstar": 5.0, 
+        "Kaon_Pion_ProbNN_B2Kstar": 0.8, 
+        "KstarKstar_Comb_MassHigh": 2250,
+        "KstarKstar_DOCACHI2": 25, 
+        "Kstar_for_B2KstarKstar_MassWindow": 100, 
+        "Kstar_for_B2KstarKstar_PT": 600, 
+        "Kstar_for_B2KstarKstar_VertexCHI2": 6, 
+        "Kstar_for_B2Kstar_Comb_MassHigh": 1750.0, 
+        "Kstar_for_B2Kstar_Comb_MassLow": 795.0, 
+        "Kstar_for_B2Kstar_FlightChi2": 150.0, 
+        "Kstar_for_B2Kstar_PT": 1500, 
+        "Kstar_for_B2Kstar_VertexCHI2": 3, 
+        "L0DU_FILTER": None, 
+        "Lambdastar_Comb_MassHigh": 5000.0, 
+        "Lambdastar_Comb_MassLow": 1400.0, 
+        "Lambdastar_FlightChi2": 25, 
+        "Lambdastar_PT": 1500, 
+        "Lambdastar_VertexCHI2": 3, 
+        "Lb_Comb_MassHigh": 7500.0, 
+        "Lb_DIRA": 0.999, 
+        "Lb_VertDist": -25, 
+        "Lb_VertexCHI2": 150.0, 
+        "MuonPID": 0.0, 
+        "Muon_MinIPCHI2": 9.0, 
+        "Phi_Comb_MassHigh": 1850.0, 
+        "Phi_FlightChi2": 16.0, 
+        "Phi_PT": 600, 
+        "Phi_VertexCHI2": 4, 
+        "Pion_ProbNN": 0.3, 
+        "Pion_ProbNN_B2Kstar": 0.8, 
+        "ProtonPID": 5.0, 
+        "SpdMult": 600, 
+        "Track_GhostProb": 0.3, 
+        "Track_TRCHI2": 3, 
+        "UseNoPIDsHadrons": False, 
+        "UseNoPIDsMuons": False
+    }, 
+    "STREAMS": [ "Dimuon" ], 
+    "WGs": [ "RD" ]
+}
+
+BaryonicLFV = {
+    "BUILDERTYPE": "BaryonicLFVConf", 
+    "CONFIG": {
+        "BaryLFVPostscale": 1.0, 
+        "BaryLFVPrescale": 1.0, 
+        "DiHadronADOCACHI2": 30, 
+        "DiHadronMassLoose": 6000, 
+        "DiHadronMassTight": 2600, 
+        "DiHadronVtxCHI2": 25, 
+        "HadronIPCHI2": 9, 
+        "PTCut": 250, 
+        "ProbNNCutTight": 0.1, 
+        "ProtonP": 5000, 
+        "TrackGhostProb": 0.4
+    }, 
+    "STREAMS": {
+        "Dimuon": [
+            "StrippingBaryonicLFVXib22MuTauLine", 
+            "StrippingBaryonicLFVXib22ETauLine", 
+            "StrippingBaryonicLFVXib2EMuTauLine", 
+            "StrippingBaryonicLFVXib23MuLine", 
+            "StrippingBaryonicLFVXib25MuLine", 
+            "StrippingBaryonicLFVXib22MuELine", 
+            "StrippingBaryonicLFVppmumuSSLine", 
+            "StrippingBaryonicLFV3p3muSSLine", 
+            "StrippingBaryonicLFVDelta3muSSLine", 
+            "StrippingBaryonicLFVpipi3muSSLine", 
+            "StrippingBaryonicLFVpipipi3muSSLine"
+        ], 
+        "Leptonic": [ "StrippingBaryonicLFVXib23MuLooseLine" ]
+    }, 
+    "WGs": [ "RD" ]
+}
+
+Beauty2MajoLep = {
+    "BUILDERTYPE": "Beauty2MajoLepConf", 
+    "CONFIG": {
+        "AM_Mhigh": 7200.0, 
+        "AM_Mlow": 0.0, 
+        "BVtxChi2": 10.0, 
+        "B_Bach_PT_DD": 1000.0, 
+        "B_DLS": 5.0, 
+        "B_IPCHI2wrtPV": 16.0, 
+        "B_Mhigh": 6800.0, 
+        "B_Mlow": 4800.0, 
+        "B_electron_pdg": 500.0, 
+        "B_pdg": 300.0, 
+        "B_pdg_Ks_DD": 200.0, 
+        "Bach_PTmin": 700.0, 
+        "D0_pdg": 100.0, 
+        "Jpsi_pdg": 100.0, 
+        "Ks_Bach_PT_DD": 800.0, 
+        "Ks_pdg": 100.0, 
+        "Ks_pdg_DD": 50.0, 
+        "Lep_IPChi2min": 25.0, 
+        "Lep_PTmin": 300.0, 
+        "Majo_AMhigh": 7000.0, 
+        "Majo_AMlow": 200.0, 
+        "Majo_Bach_PTmin": 500.0, 
+        "Majo_DocaChi2": 25.0, 
+        "Majo_PTmin": 700.0, 
+        "Majo_VtxChi2": 10.0, 
+        "Postscale": 1.0, 
+        "Prescale1": 0.05, 
+        "Prescale2": 0.1, 
+        "Prescale3": 0.2, 
+        "RequiredRawEvents": [
+            "Trigger", 
+            "Muon", 
+            "Calo", 
+            "Rich", 
+            "Velo", 
+            "Tracker"
+        ], 
+        "Trk_GhostProb": 0.5
+    }, 
+    "STREAMS": [ "BhadronCompleteEvent" ], 
+    "WGs": [ "RD" ]
+}
+
+Beauty2XGammaExclTDCPV = {
+    "BUILDERTYPE": "Beauty2XGammaExclTDCPVConf", 
+    "CONFIG": {
+        "B0PVIPchi2": 16.0, 
+        "B0VTXchi2": 16.0, 
+        "BMassMax": 7000.0, 
+        "BMassMin": 4000.0, 
+        "B_APT": 3000.0, 
+        "B_PT": 2500.0, 
+        "Bd2KspipiGammaPostScale": 1.0, 
+        "Bd2KspipiGammaPreScale": 0.0, 
+        "Bd2KstGammaPostScale": 1.0, 
+        "Bd2KstGammaPreScale": 0.0, 
+        "BdDIRA": 0.2, 
+        "Bs2KsKpiGammaPostScale": 1.0, 
+        "Bs2KsKpiGammaPreScale": 0.0, 
+        "Bs2PhiGammaPostScale": 1.0, 
+        "Bs2PhiGammaPreScale": 0.0, 
+        "BsPVIPchi2": 16.0, 
+        "BsVTXchi2": 16.0, 
+        "DTF_CL": 1e-10, 
+        "DTF_CL_tighter": 1e-05, 
+        "GhostProb_Max": 0.6, 
+        "Hlt1TISTOSLinesDict": {
+            "Hlt1(Two)?TrackMVA(Loose)?Decision%TOS": 0
+        }, 
+        "Hlt1TISTOSLinesDict_Phi": {
+            "Hlt1(Phi)?IncPhi.*Decision%TOS": 0, 
+            "Hlt1(Two)?TrackMVA(Loose)?Decision%TOS": 0, 
+            "Hlt1B2PhiGamma_LTUNBDecision%TOS": 0
+        }, 
+        "Hlt2TISTOSLinesDict": {
+            "Hlt2Radiative.*Decision%TOS": 0, 
+            "Hlt2Topo(2|3|4)Body.*Decision%TOS": 0
+        }, 
+        "Hlt2TISTOSLinesDict_Phi": {
+            "Hlt2(Phi)?IncPhi.*Decision%TOS": 0, 
+            "Hlt2Radiative.*Decision%TOS": 0, 
+            "Hlt2Topo(2|3|4)Body.*Decision%TOS": 0
+        }, 
+        "KsPT": 300.0, 
+        "KstMassWin": 100.0, 
+        "KstVCHI2": 25.0, 
+        "L1520MassWin": 200.0, 
+        "Lb2pKGammaPostScale": 1.0, 
+        "Lb2pKGammaPreScale": 1.0, 
+        "MinProton_P": 4000.0, 
+        "MinProton_PT": 300.0, 
+        "MinTrack_P": 3000.0, 
+        "MinTrack_PT": 250.0, 
+        "PhiMassWin": 15.0, 
+        "PhiVCHI2": 25.0, 
+        "ProbNNk": 0.05, 
+        "ProbNNk_tight": 0.1, 
+        "ProbNNp": 0.05, 
+        "ProbNNp_tight": 0.25, 
+        "ProbNNpi": 0.05, 
+        "ProbNNpi_tight": 0.4, 
+        "SumVec_PT": 500.0, 
+        "TrChi2": 4.0, 
+        "TrIPchi2": 9.0, 
+        "TrIPchi2_tight": 11.0, 
+        "mKPhiMax": 4000.0, 
+        "mKPhiMax_tight": 2950.0, 
+        "mKsKpiMax": 2300.0, 
+        "mKspipiMax": 2000.0, 
+        "mKsppiMax": 2750.0, 
+        "photonPT": 2500.0
+    }, 
+    "STREAMS": [ "BhadronCompleteEvent" ], 
+    "WGs": [ "RD" ]
+}
+
+Bu2LLK = {
+    "BUILDERTYPE": "Bu2LLKConf", 
+    "CONFIG": {
+        "B2K3pill_BFDChi2": 150, 
+        "B2K3pill_BFDIRA": 0.9999, 
+        "B2K3pill_BIPDChi2": 15, 
+        "B2K3pill_BVtxChi2": 40, 
+        "B2K3pill_DiLeptonFDChi2": 25, 
+        "B2K3pill_DiLeptonPT": 250, 
+        "B2K3pill_DiLeptonVtxChi2": 10, 
+        "B2K3pill_HadIPCHI2": 4.5, 
+        "B2K3pill_KaonPT": 250, 
+        "B2K3pill_LeptonIPCHI2": 1, 
+        "B2K3pill_LeptonIPCHI2_Max": 7, 
+        "B2K3pill_LeptonPT": 150, 
+        "B2K3pill_MassWindow_Hi": 6500, 
+        "B2K3pill_PionPT": 150, 
+        "B2K3pill_achi2doca": 30, 
+        "B2KpipipieeLinePrescale": 1, 
+        "B2KpipipimmLinePrescale": 1, 
+        "BDIRA": 0.9995, 
+        "BFlightCHI2": 100, 
+        "BIPCHI2": 25, 
+        "BMassWindow": 1500, 
+        "BMassWindowTau": 5000, 
+        "BVertexCHI2": 9, 
+        "Bu2eeLine2Prescale": 0, 
+        "Bu2eeLine3Prescale": 0, 
+        "Bu2eeLine4Prescale": 0, 
+        "Bu2eeLinePrescale": 0, 
+        "Bu2eeSSLine2Prescale": 1, 
+        "Bu2meLinePrescale": 0, 
+        "Bu2meSSLinePrescale": 1, 
+        "Bu2mmLinePrescale": 0, 
+        "Bu2mmSSLinePrescale": 1, 
+        "Bu2mtLinePrescale": 0, 
+        "Bu2mtSSLinePrescale": 1, 
+        "DiHadronADOCACHI2": 30, 
+        "DiHadronMass": 2600, 
+        "DiHadronVtxCHI2": 25, 
+        "DiLeptonFDCHI2": 16, 
+        "DiLeptonIPCHI2": 0, 
+        "DiLeptonPT": 0, 
+        "K1_MassWindow_Hi": 4200, 
+        "K1_MassWindow_Lo": 0, 
+        "K1_SumIPChi2Had": 48.0, 
+        "K1_SumPTHad": 1200, 
+        "K1_VtxChi2": 12, 
+        "KaonIPCHI2": 9, 
+        "KaonPT": 400, 
+        "KaonPTLoose": 250, 
+        "KstarPADOCACHI2": 30, 
+        "KstarPMassWindow": 300, 
+        "KstarPVertexCHI2": 25, 
+        "LeptonIPCHI2": 9, 
+        "LeptonPT": 350, 
+        "LeptonPTTight": 500, 
+        "PIDe": 0, 
+        "Pi0PT": 600, 
+        "PionPTRho": 350, 
+        "ProbNNCut": 0.05, 
+        "ProbNNCutTight": 0.1, 
+        "ProtonP": 2000, 
+        "RICHPIDe_Up": -5, 
+        "RelatedInfoTools": [
+            {
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  X+  X-) ^(X ->  l+  l+)]CC": "VertexIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  X+  X-) ^(X ->  l-  l-)]CC": "VertexIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  X+  X-) ^(X0 ->  l+  l-)]CC": "VertexIsoInfoLL", 
+                    "[Beauty ->  X  (X ->  l+  ^(l+ -> X+  X-  X+))]CC": "VertexIsoInfoL", 
+                    "[Beauty ->  X  (X ->  l-  ^(l- -> X-  X-  X+))]CC": "VertexIsoInfoL", 
+                    "[Beauty ->  X  (X0 ->  l+  ^(l- -> X-  X-  X+))]CC": "VertexIsoInfoL", 
+                    "[Beauty ->  X+ ^(X ->  l+  l+)]CC": "VertexIsoInfoLL", 
+                    "[Beauty ->  X+ ^(X ->  l-  l-)]CC": "VertexIsoInfoLL", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "VertexIsoInfoLL", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l+  l+)]CC": "VertexIsoInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l-  l-)]CC": "VertexIsoInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "VertexIsoInfoHH", 
+                    "[Beauty -> (X+ -> X+  X0) ^(X ->  l+  l+)]CC": "VertexIsoInfoLL", 
+                    "[Beauty -> (X+ -> X+  X0) ^(X ->  l-  l-)]CC": "VertexIsoInfoLL", 
+                    "[Beauty -> (X+ -> X+  X0) ^(X0 ->  l+  l-)]CC": "VertexIsoInfoLL", 
+                    "[Beauty -> K+ X- X+ X- ^(X0 ->  l+  l-)]CC": "VertexIsoInfoLL", 
+                    "[Beauty -> ^(X+ -> X+  (X0 ->  X+  X-)) (X ->  l+  l+)]CC": "VertexIsoInfoH", 
+                    "[Beauty -> ^(X+ -> X+  (X0 ->  X+  X-)) (X ->  l-  l-)]CC": "VertexIsoInfoH", 
+                    "[Beauty -> ^(X+ -> X+  (X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "VertexIsoInfoH", 
+                    "[Beauty -> ^(X+ -> X+  X+  X-) (X ->  l+  l+)]CC": "VertexIsoInfoH", 
+                    "[Beauty -> ^(X+ -> X+  X+  X-) (X ->  l-  l-)]CC": "VertexIsoInfoH", 
+                    "[Beauty -> ^(X+ -> X+  X+  X-) (X0 ->  l+  l-)]CC": "VertexIsoInfoH", 
+                    "[Beauty -> ^(X+ -> X+  X0) (X ->  l+  l+)]CC": "VertexIsoInfoHH", 
+                    "[Beauty -> ^(X+ -> X+  X0) (X ->  l-  l-)]CC": "VertexIsoInfoHH", 
+                    "[Beauty -> ^(X+ -> X+  X0) (X0 ->  l+  l-)]CC": "VertexIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  X+  X-)  (X ->  l+  l+)]CC": "VertexIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  X+  X-)  (X ->  l-  l-)]CC": "VertexIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  X+  X-)  (X0 ->  l+  l-)]CC": "VertexIsoInfoHH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "VertexIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  X+  X-) ^(X ->  l+  l+)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty ->  (X0 ->  X+  X-) ^(X ->  l-  l-)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty ->  (X0 ->  X+  X-) ^(X0 ->  l+  l-)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty ->  X  (X ->  l+  ^(l+ -> X+  X-  X+))]CC": "VertexIsoBDTInfoL", 
+                    "[Beauty ->  X  (X ->  l-  ^(l- -> X-  X-  X+))]CC": "VertexIsoBDTInfoL", 
+                    "[Beauty ->  X  (X0 ->  l+  ^(l- -> X-  X-  X+))]CC": "VertexIsoBDTInfoL", 
+                    "[Beauty ->  X+ ^(X ->  l+  l+)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty ->  X+ ^(X ->  l-  l-)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l+  l+)]CC": "VertexIsoBDTInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l-  l-)]CC": "VertexIsoBDTInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "VertexIsoBDTInfoHH", 
+                    "[Beauty -> (X+ -> X+  X0) ^(X ->  l+  l+)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty -> (X+ -> X+  X0) ^(X ->  l-  l-)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty -> (X+ -> X+  X0) ^(X0 ->  l+  l-)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty -> K+ X- X+ X- ^(X0 ->  l+  l-)]CC": "VertexIsoBDTInfoLL", 
+                    "[Beauty -> ^(X+ -> X+  (X0 ->  X+  X-)) (X ->  l+  l+)]CC": "VertexIsoBDTInfoH", 
+                    "[Beauty -> ^(X+ -> X+  (X0 ->  X+  X-)) (X ->  l-  l-)]CC": "VertexIsoBDTInfoH", 
+                    "[Beauty -> ^(X+ -> X+  (X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "VertexIsoBDTInfoH", 
+                    "[Beauty -> ^(X+ -> X+  X+  X-) (X ->  l+  l+)]CC": "VertexIsoBDTInfoH", 
+                    "[Beauty -> ^(X+ -> X+  X+  X-) (X ->  l-  l-)]CC": "VertexIsoBDTInfoH", 
+                    "[Beauty -> ^(X+ -> X+  X+  X-) (X0 ->  l+  l-)]CC": "VertexIsoBDTInfoH", 
+                    "[Beauty -> ^(X+ -> X+  X0) (X ->  l+  l+)]CC": "VertexIsoBDTInfoHH", 
+                    "[Beauty -> ^(X+ -> X+  X0) (X ->  l-  l-)]CC": "VertexIsoBDTInfoHH", 
+                    "[Beauty -> ^(X+ -> X+  X0) (X0 ->  l+  l-)]CC": "VertexIsoBDTInfoHH", 
+                    "[Beauty -> ^(X0 ->  X+  X-)  (X ->  l+  l+)]CC": "VertexIsoBDTInfoHH", 
+                    "[Beauty -> ^(X0 ->  X+  X-)  (X ->  l-  l-)]CC": "VertexIsoBDTInfoHH", 
+                    "[Beauty -> ^(X0 ->  X+  X-)  (X0 ->  l+  l-)]CC": "VertexIsoBDTInfoHH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "VertexIsoBDTInfo", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "ConeAngle": 0.5, 
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ ->  X+  X- ^X+))]CC": "TrackIsoInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ ->  X+ ^X-  X+))]CC": "TrackIsoInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ -> ^X+  X-  X+))]CC": "TrackIsoInfoL21", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- ->  X-  X- ^X+))]CC": "TrackIsoInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- ->  X- ^X-  X+))]CC": "TrackIsoInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- -> ^X-  X-  X+))]CC": "TrackIsoInfoL21", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- ->  X-  X- ^X+))]CC": "TrackIsoInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- ->  X- ^X-  X+))]CC": "TrackIsoInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- -> ^X-  X-  X+))]CC": "TrackIsoInfoL21", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X ->  l+ ^l+)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X ->  l- ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X -> ^l+  l+)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X -> ^l-  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X ->  l+  l+)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X ->  l-  l-)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l-)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X ->  l+  l+)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X ->  l-  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X ->  l+ ^l+)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X ->  l- ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X -> ^l+  l+)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X -> ^l-  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 ->  l+ ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 -> ^l+  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X ->  l+  l+)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X ->  l-  l-)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X0 ->  l+  l-)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X ->  l+  l+)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X ->  l-  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X ->  l+ ^l+)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X -> ^l+  l+)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 ->  l+ ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 -> ^l+  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X ->  l+  l+)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X0 ->  l+  l-)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X ->  l+  l+)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X ->  l+  l+)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X ->  l-  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X ->  l+  l+)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X ->  l-  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X ->  l+  l+)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty ->  X+  (X ->  l+ ^l+)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  X+  (X ->  l- ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  X+  (X -> ^l+  l+)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  X+  (X -> ^l-  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  X+  (X0 ->  l+ ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty ->  X+  (X0 -> ^l+  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty ->  X+ ^(X ->  l+  l+)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  X+ ^(X ->  l-  l-)]CC": "TrackIsoInfoLL", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "TrackIsoInfoLL", 
+                    "[Beauty -> (K*(892)+ -> K+  ^pi0) (X0 ->  l+  l+)]CC": "TrackIsoInfopi0H2", 
+                    "[Beauty -> (K*(892)+ -> K+  ^pi0) (X0 ->  l+  l-)]CC": "TrackIsoInfopi0H2", 
+                    "[Beauty -> (K*(892)+ -> K+  ^pi0) (X0 ->  l-  l-)]CC": "TrackIsoInfopi0H2", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l+  l+)]CC": "TrackIsoInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l+  l-)]CC": "TrackIsoInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l-  l-)]CC": "TrackIsoInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l+  ^l+)]CC": "TrackIsoInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l+  ^l-)]CC": "TrackIsoInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l-  ^l-)]CC": "TrackIsoInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l+  l+)]CC": "TrackIsoInfopi0H1", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l+  l-)]CC": "TrackIsoInfopi0H1", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l-  l-)]CC": "TrackIsoInfopi0H1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X ->  l+ ^l+)]CC": "TrackIsoInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X ->  l- ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X -> ^l+  l+)]CC": "TrackIsoInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X -> ^l-  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X0 ->  l+ ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X0 -> ^l+  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X ->  l+  l+)]CC": "TrackIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X ->  l-  l-)]CC": "TrackIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X0 ->  l+  l-)]CC": "TrackIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X ->  l+  l+)]CC": "TrackIsoInfoH2", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X ->  l-  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X0 ->  l+  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X ->  l+  l+)]CC": "TrackIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X ->  l-  l-)]CC": "TrackIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X0 ->  l+  l-)]CC": "TrackIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l+  l+)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l-  l-)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X ->  l+  l+)]CC": "TrackIsoInfoH2", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X ->  l-  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X0 ->  l+  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X ->  l+  l+)]CC": "TrackIsoInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X ->  l-  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X ->  l+  l+)]CC": "TrackIsoInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X ->  l-  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X0 ->  l+  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty -> K+ X- X+ X- (X0 ->  ^l+  l-)]CC": "TrackIsoInfoL1", 
+                    "[Beauty -> K+ X- X+ X- (X0 ->  l+  ^l-)]CC": "TrackIsoInfoL2", 
+                    "[Beauty -> K+ X- X+ ^X- (X0 ->  l+  l-)]CC": "TrackIsoInfoH4", 
+                    "[Beauty -> K+ X- ^X+ X- (X0 ->  l+  l-)]CC": "TrackIsoInfoH3", 
+                    "[Beauty -> K+ ^X- X+ X- (X0 ->  l+  l-)]CC": "TrackIsoInfoH2", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X ->  l+  l+)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X ->  l-  l-)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X ->  l+  l+)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X ->  l-  l-)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X ->  l+  l+)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoInfoHH", 
+                    "[Beauty -> ^K+ X- X+ X- (X0 ->  l+  l-)]CC": "TrackIsoInfoH1", 
+                    "[Beauty -> ^X+  (X ->  l+  l+)]CC": "TrackIsoInfoH", 
+                    "[Beauty -> ^X+  (X ->  l-  l-)]CC": "TrackIsoInfoH", 
+                    "[Beauty -> ^X+  (X0 ->  l+  l-)]CC": "TrackIsoInfoH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "TrackIsoInfo05", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeSize": 0.5, 
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ ->  X+  X- ^X+))]CC": "ConeIsoInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ ->  X+ ^X-  X+))]CC": "ConeIsoInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ -> ^X+  X-  X+))]CC": "ConeIsoInfoL21", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- ->  X-  X- ^X+))]CC": "ConeIsoInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- ->  X- ^X-  X+))]CC": "ConeIsoInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- -> ^X-  X-  X+))]CC": "ConeIsoInfoL21", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- ->  X-  X- ^X+))]CC": "ConeIsoInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- ->  X- ^X-  X+))]CC": "ConeIsoInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- -> ^X-  X-  X+))]CC": "ConeIsoInfoL21", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X ->  l+ ^l+)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X ->  l- ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X -> ^l+  l+)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X -> ^l-  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X ->  l+  l+)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X ->  l-  l-)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l-)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X ->  l+  l+)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X ->  l-  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X ->  l+ ^l+)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X ->  l- ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X -> ^l+  l+)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X -> ^l-  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 ->  l+ ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 -> ^l+  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X ->  l+  l+)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X ->  l-  l-)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X0 ->  l+  l-)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X ->  l+  l+)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X ->  l-  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X ->  l+ ^l+)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X -> ^l+  l+)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 ->  l+ ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 -> ^l+  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X ->  l+  l+)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X0 ->  l+  l-)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X ->  l+  l+)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X ->  l+  l+)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X ->  l-  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X ->  l+  l+)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X ->  l-  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X ->  l+  l+)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty ->  X+  (X ->  l+ ^l+)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  X+  (X ->  l- ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  X+  (X -> ^l+  l+)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  X+  (X -> ^l-  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  X+  (X0 ->  l+ ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty ->  X+  (X0 -> ^l+  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty ->  X+ ^(X ->  l+  l+)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  X+ ^(X ->  l-  l-)]CC": "ConeIsoInfoLL", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "ConeIsoInfoLL", 
+                    "[Beauty -> (K*(892)+ -> K+  ^pi0) (X0 ->  l+  l+)]CC": "ConeIsoInfopi0H2", 
+                    "[Beauty -> (K*(892)+ -> K+  ^pi0) (X0 ->  l+  l-)]CC": "ConeIsoInfopi0H2", 
+                    "[Beauty -> (K*(892)+ -> K+  ^pi0) (X0 ->  l-  l-)]CC": "ConeIsoInfopi0H2", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l+  l+)]CC": "ConeIsoInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l+  l-)]CC": "ConeIsoInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l-  l-)]CC": "ConeIsoInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l+  ^l+)]CC": "ConeIsoInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l+  ^l-)]CC": "ConeIsoInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l-  ^l-)]CC": "ConeIsoInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l+  l+)]CC": "ConeIsoInfopi0H1", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l+  l-)]CC": "ConeIsoInfopi0H1", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l-  l-)]CC": "ConeIsoInfopi0H1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X ->  l+ ^l+)]CC": "ConeIsoInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X ->  l- ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X -> ^l+  l+)]CC": "ConeIsoInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X -> ^l-  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X0 ->  l+ ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X0 -> ^l+  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X ->  l+  l+)]CC": "ConeIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X ->  l-  l-)]CC": "ConeIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X0 ->  l+  l-)]CC": "ConeIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X ->  l+  l+)]CC": "ConeIsoInfoH2", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X ->  l-  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X0 ->  l+  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X ->  l+  l+)]CC": "ConeIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X ->  l-  l-)]CC": "ConeIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X0 ->  l+  l-)]CC": "ConeIsoInfoH3", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l+  l+)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l-  l-)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X ->  l+  l+)]CC": "ConeIsoInfoH2", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X ->  l-  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X0 ->  l+  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X ->  l+  l+)]CC": "ConeIsoInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X ->  l-  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X ->  l+  l+)]CC": "ConeIsoInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X ->  l-  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X0 ->  l+  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty -> K+ X- X+ X- (X0 ->  ^l+  l-)]CC": "ConeIsoInfoL1", 
+                    "[Beauty -> K+ X- X+ X- (X0 ->  l+  ^l-)]CC": "ConeIsoInfoL2", 
+                    "[Beauty -> K+ X- X+ ^X- (X0 ->  l+  l-)]CC": "ConeIsoInfoH4", 
+                    "[Beauty -> K+ X- ^X+ X- (X0 ->  l+  l-)]CC": "ConeIsoInfoH3", 
+                    "[Beauty -> K+ ^X- X+ X- (X0 ->  l+  l-)]CC": "ConeIsoInfoH2", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X ->  l+  l+)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X ->  l-  l-)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X ->  l+  l+)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X ->  l-  l-)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X ->  l+  l+)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X0 ->  l+  l-)]CC": "ConeIsoInfoHH", 
+                    "[Beauty -> ^K+ X- X+ X- (X0 ->  l+  l-)]CC": "ConeIsoInfoH1", 
+                    "[Beauty -> ^X+  (X ->  l+  l+)]CC": "ConeIsoInfoH", 
+                    "[Beauty -> ^X+  (X ->  l-  l-)]CC": "ConeIsoInfoH", 
+                    "[Beauty -> ^X+  (X0 ->  l+  l-)]CC": "ConeIsoInfoH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "ConeIsoInfo05", 
+                "Type": "RelInfoConeIsolation"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ ->  X+  X- ^X+))]CC": "TrackIsoBDTInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ ->  X+ ^X-  X+))]CC": "TrackIsoBDTInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ -> ^X+  X-  X+))]CC": "TrackIsoBDTInfoL21", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- ->  X-  X- ^X+))]CC": "TrackIsoBDTInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- ->  X- ^X-  X+))]CC": "TrackIsoBDTInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- -> ^X-  X-  X+))]CC": "TrackIsoBDTInfoL21", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- ->  X-  X- ^X+))]CC": "TrackIsoBDTInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- ->  X- ^X-  X+))]CC": "TrackIsoBDTInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- -> ^X-  X-  X+))]CC": "TrackIsoBDTInfoL21", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X ->  l+ ^l+)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X ->  l- ^l-)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X -> ^l+  l+)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X -> ^l-  l-)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l-)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l-)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X ->  l+  l+)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X ->  l-  l-)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l-)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X ->  l+  l+)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X ->  l-  l-)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X ->  l+ ^l+)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X ->  l- ^l-)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X -> ^l+  l+)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X -> ^l-  l-)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 ->  l+ ^l-)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 -> ^l+  l-)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X ->  l+  l+)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X ->  l-  l-)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X0 ->  l+  l-)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X ->  l+  l+)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X ->  l-  l-)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X ->  l+ ^l+)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X -> ^l+  l+)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 ->  l+ ^l-)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 -> ^l+  l-)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X ->  l+  l+)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X0 ->  l+  l-)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X ->  l+  l+)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X ->  l+  l+)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X ->  l-  l-)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X ->  l+  l+)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X ->  l-  l-)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X ->  l+  l+)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty ->  X+  (X ->  l+ ^l+)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  X+  (X ->  l- ^l-)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  X+  (X -> ^l+  l+)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  X+  (X -> ^l-  l-)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  X+  (X0 ->  l+ ^l-)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty ->  X+  (X0 -> ^l+  l-)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty ->  X+ ^(X ->  l+  l+)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty ->  X+ ^(X ->  l-  l-)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "TrackIsoBDTInfoLL", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l+  l+)]CC": "TrackIsoBDTInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l+  l-)]CC": "TrackIsoBDTInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l-  l-)]CC": "TrackIsoBDTInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l+  ^l+)]CC": "TrackIsoBDTInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l+  ^l-)]CC": "TrackIsoBDTInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l-  ^l-)]CC": "TrackIsoBDTInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l+  l+)]CC": "TrackIsoBDTInfopi0H1", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l+  l-)]CC": "TrackIsoBDTInfopi0H1", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l-  l-)]CC": "TrackIsoBDTInfopi0H1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X ->  l+ ^l+)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X ->  l- ^l-)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X -> ^l+  l+)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X -> ^l-  l-)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X0 ->  l+ ^l-)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X0 -> ^l+  l-)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X ->  l+  l+)]CC": "TrackIsoBDTInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X ->  l-  l-)]CC": "TrackIsoBDTInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X ->  l+  l+)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X ->  l-  l-)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X ->  l+  l+)]CC": "TrackIsoBDTInfoH3", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X ->  l-  l-)]CC": "TrackIsoBDTInfoH3", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH3", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l+  l+)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l-  l-)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X ->  l+  l+)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X ->  l-  l-)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X ->  l+  l+)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X ->  l-  l-)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X ->  l+  l+)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X ->  l-  l-)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty -> K+ X- X+ X- (X0 ->  ^l+  l-)]CC": "TrackIsoBDTInfoL1", 
+                    "[Beauty -> K+ X- X+ X- (X0 ->  l+  ^l-)]CC": "TrackIsoBDTInfoL2", 
+                    "[Beauty -> K+ X- X+ ^X- (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH4", 
+                    "[Beauty -> K+ X- ^X+ X- (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH3", 
+                    "[Beauty -> K+ ^X- X+ X- (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH2", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X ->  l+  l+)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X ->  l-  l-)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X ->  l+  l+)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X ->  l-  l-)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X ->  l+  l+)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoHH", 
+                    "[Beauty -> ^K+ X- X+ X- (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH1", 
+                    "[Beauty -> ^X+  (X ->  l+  l+)]CC": "TrackIsoBDTInfoH", 
+                    "[Beauty -> ^X+  (X ->  l-  l-)]CC": "TrackIsoBDTInfoH", 
+                    "[Beauty -> ^X+  (X0 ->  l+  l-)]CC": "TrackIsoBDTInfoH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "TrackIsoBDTInfo", 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 2, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ ->  X+  X- ^X+))]CC": "TrackIsoBs2MMInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ ->  X+ ^X-  X+))]CC": "TrackIsoBs2MMInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ -> ^X+  X-  X+))]CC": "TrackIsoBs2MMInfoL21", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- ->  X-  X- ^X+))]CC": "TrackIsoBs2MMInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- ->  X- ^X-  X+))]CC": "TrackIsoBs2MMInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- -> ^X-  X-  X+))]CC": "TrackIsoBs2MMInfoL21", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- ->  X-  X- ^X+))]CC": "TrackIsoBs2MMInfoL23", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- ->  X- ^X-  X+))]CC": "TrackIsoBs2MMInfoL22", 
+                    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- -> ^X-  X-  X+))]CC": "TrackIsoBs2MMInfoL21", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X ->  l+ ^l+)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X ->  l- ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X -> ^l+  l+)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X -> ^l-  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X ->  l+  l+)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X ->  l-  l-)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X ->  l+ ^l+)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X ->  l- ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X -> ^l+  l+)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X -> ^l-  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 ->  l+ ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  p+  pi-)  (X0 -> ^l+  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X ->  l+  l+)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X ->  l-  l-)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  p+  pi-) ^(X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 ->  p+ ^pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X ->  l+ ^l+)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X -> ^l+  l+)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 ->  l+ ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 -> ^l+  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X ->  l+  l+)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+  pi-) ^(X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  (X0 -> ^p+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  (X0 -> ^pi+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty ->  X+  (X ->  l+ ^l+)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  X+  (X ->  l- ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  X+  (X -> ^l+  l+)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  X+  (X -> ^l-  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  X+  (X0 ->  l+ ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty ->  X+  (X0 -> ^l+  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty ->  X+ ^(X ->  l+  l+)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  X+ ^(X ->  l-  l-)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoLL", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l+  l+)]CC": "TrackIsoBs2MMInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l+  l-)]CC": "TrackIsoBs2MMInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l-  l-)]CC": "TrackIsoBs2MMInfopi0L1", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l+  ^l+)]CC": "TrackIsoBs2MMInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l+  ^l-)]CC": "TrackIsoBs2MMInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l-  ^l-)]CC": "TrackIsoBs2MMInfopi0L2", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l+  l+)]CC": "TrackIsoBs2MMInfopi0H1", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfopi0H1", 
+                    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l-  l-)]CC": "TrackIsoBs2MMInfopi0H1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X ->  l+ ^l+)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X ->  l- ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X -> ^l+  l+)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X -> ^l-  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X0 ->  l+ ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X0 -> ^l+  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH3", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH3", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH3", 
+                    "[Beauty -> (X+ ->  X+  X+ ^X-) (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH3", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty -> (X+ ->  X+ ^X+  X-) (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty -> (X+ -> ^X+  X+  X-) (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty -> K+ X- X+ X- (X0 ->  ^l+  l-)]CC": "TrackIsoBs2MMInfoL1", 
+                    "[Beauty -> K+ X- X+ X- (X0 ->  l+  ^l-)]CC": "TrackIsoBs2MMInfoL2", 
+                    "[Beauty -> K+ X- X+ ^X- (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH4", 
+                    "[Beauty -> K+ X- ^X+ X- (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH3", 
+                    "[Beauty -> K+ ^X- X+ X- (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH2", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^(X0 ->  p+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^(X0 ->  pi+  pi-)  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoHH", 
+                    "[Beauty -> ^K+ X- X+ X- (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH1", 
+                    "[Beauty -> ^X+  (X ->  l+  l+)]CC": "TrackIsoBs2MMInfoH", 
+                    "[Beauty -> ^X+  (X ->  l-  l-)]CC": "TrackIsoBs2MMInfoH", 
+                    "[Beauty -> ^X+  (X0 ->  l+  l-)]CC": "TrackIsoBs2MMInfoH"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Location": "TrackIsoBs2MMInfo", 
+                "Type": "RelInfoBs2MuMuTrackIsolations"
+            }, 
+            {
+                "ConeAngle": 1.0, 
+                "Location": "TrackIsoInfo10", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeAngle": 1.5, 
+                "Location": "TrackIsoInfo15", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeAngle": 2.0, 
+                "Location": "TrackIsoInfo20", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "ConeSize": 1.0, 
+                "Location": "ConeIsoInfo10", 
+                "Type": "RelInfoConeIsolation"
+            }, 
+            {
+                "ConeSize": 1.5, 
+                "Location": "ConeIsoInfo15", 
+                "Type": "RelInfoConeIsolation"
+            }, 
+            {
+                "ConeSize": 2.0, 
+                "Location": "ConeIsoInfo20", 
+                "Type": "RelInfoConeIsolation"
+            }
+        ], 
+        "TauPT": 0, 
+        "TauVCHI2DOF": 150, 
+        "Trk_Chi2": 3, 
+        "Trk_GhostProb": 0.35, 
+        "UpperBMass": 5280, 
+        "UpperBsMass": 5367, 
+        "UpperLbMass": 5620, 
+        "UpperMass": 5500
+    }, 
+    "STREAMS": [ "Leptonic" ], 
+    "WGs": [ "RD" ]
+}
+
+Kshort2Leptons = {
+    "BUILDERTYPE": "Kshort2LeptonsConf", 
+    "CONFIG": {
+        "2mu2e": {
+            "DD": {
+                "KsIP": 5.0, 
+                "KsLifetime": 0.8953, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LD": {
+                "KsIP": 5.0, 
+                "KsLifetime": 0.8953, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LL": {
+                "KsIP": 5.0, 
+                "KsLifetime": 0.8953, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LU": {
+                "KsDisChi2": 1500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LV": {
+                "KsDisChi2": 1500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 40, 
+                "MaxKsMass": 900.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UU": {
+                "KsDisChi2": 1500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UV": {
+                "KsDisChi2": 1000, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 25, 
+                "MaxKsMass": 878.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "VV": {
+                "KsDisChi2": 1500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 0.8, 
+                "KsVtxChi2": 30, 
+                "MaxKsMass": 900.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }
+        }, 
+        "2mu2pi": {
+            "DD": {
+                "KsDisChi2": 1500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LD": {
+                "KsDisChi2": 1500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LL": {
+                "KsDisChi2": 1500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LU": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 37, 
+                "MaxKsMass": 900.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UU": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UV": {
+                "KsDisChi2": 2000, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 19, 
+                "MaxKsMass": 878.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "VV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 0.8, 
+                "KsVtxChi2": 30, 
+                "MaxKsMass": 900.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }
+        }, 
+        "2pi2e": {
+            "DD": {
+                "KsIP": 5.0, 
+                "KsLifetime": 0.8953, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LD": {
+                "KsIP": 5.0, 
+                "KsLifetime": 0.8953, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LL": {
+                "KsIP": 5.0, 
+                "KsLifetime": 0.8953, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LU": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 37, 
+                "MaxKsMass": 900.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UU": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UV": {
+                "KsDisChi2": 2000, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 19, 
+                "MaxKsMass": 878.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "VV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 0.8, 
+                "KsVtxChi2": 30, 
+                "MaxKsMass": 900.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }
+        }, 
+        "3emu": {
+            "DD": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LD": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LL": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LU": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 35, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UU": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 35, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "VV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 0.8, 
+                "KsVtxChi2": 30, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }
+        }, 
+        "3mue": {
+            "DD": {
+                "KsDisChi2": 50, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LD": {
+                "KsDisChi2": 50, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LL": {
+                "KsDisChi2": 50, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LU": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 35, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UU": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 35, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "VV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 0.8, 
+                "KsVtxChi2": 30, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }
+        }, 
+        "4e": {
+            "DD": {
+                "KsIP": 5.0, 
+                "KsLifetime": 0.8953, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LD": {
+                "KsIP": 5.0, 
+                "KsLifetime": 0.8953, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LL": {
+                "KsIP": 5.0, 
+                "KsLifetime": 0.8953, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LU": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 37, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UU": {
+                "KsDisChi2": 2500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UV": {
+                "KsDisChi2": 2000, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 20, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "VV": {
+                "KsDisChi2": 2500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 0.8, 
+                "KsVtxChi2": 30.0, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }
+        }, 
+        "4mu": {
+            "DD": {
+                "KsDisChi2": 1500.0, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LD": {
+                "KsDisChi2": 1500.0, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 1000.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LL": {
+                "KsDisChi2": 1500.0, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LU": {
+                "KsDisChi2": 1500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "LV": {
+                "KsDisChi2": 1500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 35, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UU": {
+                "KsDisChi2": 1500, 
+                "KsIP": 5.0, 
+                "KsMAXDOCA": 3.0, 
+                "KsVtxChi2": 100, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "UV": {
+                "KsDisChi2": 1500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 1.0, 
+                "KsVtxChi2": 19, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }, 
+            "VV": {
+                "KsDisChi2": 1500, 
+                "KsIP": 1.0, 
+                "KsMAXDOCA": 0.8, 
+                "KsVtxChi2": 30, 
+                "MaxKsMass": 800.0, 
+                "Postscale": 1, 
+                "Prescale": 1
+            }
+        }, 
+        "TISTOSDict": {
+            "Hlt2RareStrangeKsLeptonsTOSDecision%TOS": 0
+        }, 
+        "e": {
+            "D": {
+                "GhostProb": 0.35, 
+                "MINIPCHI2": 16, 
+                "PIDe": -3.5, 
+                "PT": 50
+            }, 
+            "Di": {
+                "GhostProb": 0.5, 
+                "MINIPCHI2": 16, 
+                "PIDe": -4, 
+                "PT": 100.0
+            }, 
+            "L": {
+                "GhostProb": 0.35, 
+                "MINIPCHI2": 16, 
+                "PIDe": -1, 
+                "PT": 100.0
+            }, 
+            "U": {
+                "GhostProb": 0.35, 
+                "MINIPCHI2": 10, 
+                "PIDe": -3.5, 
+                "PT": 50
+            }, 
+            "V": {
+                "GhostProb": 0.5, 
+                "MINIPCHI2": 40, 
+                "PIDe": -1000, 
+                "PT": 0
+            }
+        }, 
+        "mu": {
+            "D": {
+                "GhostProb": 0.35, 
+                "MINIPCHI2": 10, 
+                "PIDmu": -5, 
+                "PT": 50
+            }, 
+            "L": {
+                "GhostProb": 0.5, 
+                "MINIPCHI2": 10, 
+                "PIDmu": -5, 
+                "PT": 50.0
+            }, 
+            "U": {
+                "GhostProb": 0.35, 
+                "MINIPCHI2": 10, 
+                "PIDmu": -5, 
+                "PT": 50
+            }, 
+            "V": {
+                "GhostProb": 0.35, 
+                "MINIPCHI2": 16, 
+                "PIDmu": -3, 
+                "PT": 50
+            }
+        }, 
+        "pi": {
+            "D": {
+                "GhostProb": 0.35, 
+                "MINIPCHI2": 16, 
+                "PIDK": 5, 
+                "PT": 50
+            }, 
+            "L": {
+                "GhostProb": 0.5, 
+                "MINIPCHI2": 16, 
+                "PIDK": 5, 
+                "PT": 100.0
+            }, 
+            "U": {
+                "GhostProb": 0.35, 
+                "MINIPCHI2": 10, 
+                "PIDK": 5, 
+                "PT": 50
+            }, 
+            "V": {
+                "GhostProb": 0.35, 
+                "MINIPCHI2": 10, 
+                "PIDK": 3, 
+                "PT": 50
+            }
+        }
+    }, 
+    "STREAMS": [ "Leptonic" ], 
+    "WGs": [ "RD" ]
+}
+
+LFV = {
+    "BUILDERTYPE": "LFVLinesConf", 
+    "CONFIG": {
+        "B2TauMuPrescale": 0, 
+        "B2eMuPrescale": 0, 
+        "B2eePrescale": 0, 
+        "B2hTauMuPrescale": 0, 
+        "B2heMuPrescale": 0, 
+        "B2pMuPrescale": 1, 
+        "Bu2KJPsieePrescale": 0, 
+        "D2piphi2MuMuPrescale": 0, 
+        "D2piphi2MuMuPromptPrescale": 0, 
+        "D2piphi2eMuPrescale": 0, 
+        "D2piphi2eMuPromptPrescale": 0., 
+        "D2piphi2eePrescale": 0, 
+        "D2piphi2eePromptPrescale": 0, 
+        "JPsi2MuMuControlPrescale": 0, 
+        "JPsi2eMuPrescale": 0, 
+        "JPsi2eeControlPrescale": 0., 
+        "Phi2MuMuControlPrescale": 0, 
+        "Phi2eMuPrescale": 0, 
+        "Phi2eeControlPrescale": 0, 
+        "Postscale": 1, 
+        "PromptJPsi2MuMuControlPrescale": 0., 
+        "PromptJPsi2eMuPrescale": 0, 
+        "PromptJPsi2eeControlPrescale": 0., 
+        "PromptPhi2MuMuControlPrescale": 0, 
+        "PromptPhi2eMuPrescale": 0, 
+        "PromptPhi2eeControlPrescale": 0., 
+        "RelatedInfoTools_B2eMu": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[B_s0 -> ^e+ [mu-]cc]CC": "Electron_ISO", 
+                    "[B_s0 -> e+ ^[mu-]cc]CC": "Muon_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "ConeIsoInfo", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[B_s0 -> ^e+ [mu-]cc]CC": "Electron_TrackIsoBDT", 
+                    "[B_s0 -> e+ ^[mu-]cc]CC": "Muon_TrackIsoBDT"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 0
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_B2ee": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[B_s0 -> ^e+ [e-]cc]CC": "Electron1_ISO", 
+                    "[B_s0 -> e+ ^[e-]cc]CC": "Electron2_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "ConeIsoInfo", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[B_s0 -> ^e+ [e-]cc]CC": "Electron2_TrackIsoBDT", 
+                    "[B_s0 -> e+ ^[e-]cc]CC": "Electron1_TrackIsoBDT"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 0
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_B2hemu": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[[B+]cc -> X [e+]cc ^[mu-]cc]CC": "Muon_ISO", 
+                    "[[B+]cc -> X ^[e+]cc [mu-]cc]CC": "Electron_ISO", 
+                    "[[B+]cc -> ^X [e+]cc [mu-]cc]CC": "Hadron_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[[B+]cc -> X [e+]cc ^[mu-]cc]CC": "Muon_TrackIso_BDT6vars", 
+                    "[[B+]cc -> X ^[e+]cc [mu-]cc]CC": "Electron_TrackIso_BDT6vars", 
+                    "[[B+]cc -> ^X [e+]cc [mu-]cc]CC": "Hadron_TrackIso_BDT6vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 1, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[[B+]cc -> X [e+]cc ^[mu-]cc]CC": "Muon_TrackIso_BDT9vars", 
+                    "[[B+]cc -> X ^[e+]cc [mu-]cc]CC": "Electron_TrackIso_BDT9vars", 
+                    "[[B+]cc -> ^X [e+]cc [mu-]cc]CC": "Hadron_TrackIso_BDT9vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 2, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+            }, 
+            {
+                "Location": "coneInfo", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Particles": [
+                    1, 
+                    2
+                ], 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_B2pmu": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[B_s0 -> X ^[mu-]cc]CC": "Muon_ISO", 
+                    "[B_s0 -> ^X [mu-]cc]CC": "Hadron_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "ConeIsoInfo", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[B_s0 -> X ^[mu-]cc]CC": "Muon_TrackIsoBDT", 
+                    "[B_s0 -> ^X [mu-]cc]CC": "Hadron_TrackIsoBDT"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 0
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_Bu2KJPsiee": [
+            {
+                "DaughterLocations": {
+                    "[B+ -> ^(J/psi(1S) -> e+ e-) K+]CC": "Jpsi_ISO"
+                }, 
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[B+ -> (J/psi(1S) -> ^e+ e-) K+]CC": "Electron1_ISO", 
+                    "[B+ -> (J/psi(1S) -> e+ ^e-) K+]CC": "Electron2_ISO", 
+                    "[B+ -> (J/psi(1S) -> e+ e-) ^K+]CC": "Kplus_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "ConeIsoInfo", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[B+ -> (J/psi(1S) -> ^e+ e-) K+]CC": "Electron1_TrackIsoBDT", 
+                    "[B+ -> (J/psi(1S) -> e+ ^e-) K+]CC": "Electron2_TrackIsoBDT"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 0
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Particles": [
+                    1, 
+                    2
+                ], 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_D2piphi": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Charm -> [(phi(1020) -> ^l+ [l-]CC)]CC pi+ ]CC": "lplus_ISO", 
+                    "[Charm -> [(phi(1020) -> l+ [^l-]CC)]CC pi+ ]CC": "lminus_ISO", 
+                    "[Charm -> [(phi(1020) -> l+ [l-]CC)]CC ^pi+ ]CC": "pi_ISO", 
+                    "[Charm -> [^(phi(1020) -> l+ [l-]CC)]CC pi+ ]CC": "phi_ISO"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Charm -> [(phi(1020) -> ^l+ [l-]CC)]CC pi+ ]CC": "lplus_TrackIso_BDT6vars", 
+                    "[Charm -> [(phi(1020) -> l+ [^l-]CC)]CC pi+ ]CC": "lminus_TrackIso_BDT6vars", 
+                    "[Charm -> [(phi(1020) -> l+ [l-]CC)]CC ^pi+ ]CC": "pi_TrackIso_BDT6vars", 
+                    "[Charm -> [^(phi(1020) -> l+ [l-]CC)]CC pi+ ]CC": "phi_TrackIso_BDT6vars"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 1, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Charm -> [(phi(1020) -> ^l+ [l-]CC)]CC pi+ ]CC": "lplus_TrackIso_BDT9vars", 
+                    "[Charm -> [(phi(1020) -> l+ [^l-]CC)]CC pi+ ]CC": "lminus_TrackIso_BDT9vars", 
+                    "[Charm -> [(phi(1020) -> l+ [l-]CC)]CC ^pi+ ]CC": "pi_TrackIso_BDT9vars", 
+                    "[Charm -> [^(phi(1020) -> l+ [l-]CC)]CC pi+ ]CC": "phi_TrackIso_BDT9vars"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 2, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+            }, 
+            {
+                "Location": "coneInfo", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }
+        ], 
+        "RelatedInfoTools_JPsi2MuMuControl": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[J/psi(1S) -> ^mu+ [mu-]cc]CC": "Electron_ISO", 
+                    "[J/psi(1S) -> mu+ ^[mu-]cc]CC": "Muon_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[J/psi(1S) -> ^mu+ [mu-]cc]CC": "Electron_TrackIso_BDT6vars", 
+                    "[J/psi(1S) -> mu+ ^[mu-]cc]CC": "Muon_TrackIso_BDT6vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 1, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[J/psi(1S) -> ^mu+ [mu-]cc]CC": "Electron_TrackIso_BDT9vars", 
+                    "[J/psi(1S) -> mu+ ^[mu-]cc]CC": "Muon_TrackIso_BDT9vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 2, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+            }, 
+            {
+                "Location": "coneInfo", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_JPsi2eMu": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[J/psi(1S) -> ^e+ [mu-]cc]CC": "Electron_ISO", 
+                    "[J/psi(1S) -> e+ ^[mu-]cc]CC": "Muon_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[J/psi(1S) -> ^e+ [mu-]cc]CC": "Electron_TrackIso_BDT6vars", 
+                    "[J/psi(1S) -> e+ ^[mu-]cc]CC": "Muon_TrackIso_BDT6vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 1, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[J/psi(1S) -> ^e+ [mu-]cc]CC": "Electron_TrackIso_BDT9vars", 
+                    "[J/psi(1S) -> e+ ^[mu-]cc]CC": "Muon_TrackIso_BDT9vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 2, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+            }, 
+            {
+                "Location": "coneInfo", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_JPsi2eeControl": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[J/psi(1S) -> ^e+ [e-]cc]CC": "Electron_ISO", 
+                    "[J/psi(1S) -> e+ ^[e-]cc]CC": "Muon_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[J/psi(1S) -> ^e+ [e-]cc]CC": "Electron_TrackIso_BDT6vars", 
+                    "[J/psi(1S) -> e+ ^[e-]cc]CC": "Muon_TrackIso_BDT6vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 1, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[J/psi(1S) -> ^e+ [e-]cc]CC": "Electron_TrackIso_BDT9vars", 
+                    "[J/psi(1S) -> e+ ^[e-]cc]CC": "Muon_TrackIso_BDT9vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 2, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+            }, 
+            {
+                "Location": "coneInfo", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_Phi2MuMuControl": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[phi(1020) -> ^mu+ [mu-]cc]CC": "Electron_ISO", 
+                    "[phi(1020) -> mu+ ^[mu-]cc]CC": "Muon_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[phi(1020) -> ^mu+ [mu-]cc]CC": "Electron_TrackIso_BDT6vars", 
+                    "[phi(1020) -> mu+ ^[mu-]cc]CC": "Muon_TrackIso_BDT6vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 1, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[phi(1020) -> ^mu+ [mu-]cc]CC": "Electron_TrackIso_BDT9vars", 
+                    "[phi(1020) -> mu+ ^[mu-]cc]CC": "Muon_TrackIso_BDT9vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 2, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+            }, 
+            {
+                "Location": "coneInfo", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_Phi2eMu": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[phi(1020) -> ^e+ [mu-]cc]CC": "Electron_ISO", 
+                    "[phi(1020) -> e+ ^[mu-]cc]CC": "Muon_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[phi(1020) -> ^e+ [mu-]cc]CC": "Electron_TrackIso_BDT6vars", 
+                    "[phi(1020) -> e+ ^[mu-]cc]CC": "Muon_TrackIso_BDT6vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 1, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[phi(1020) -> ^e+ [mu-]cc]CC": "Electron_TrackIso_BDT9vars", 
+                    "[phi(1020) -> e+ ^[mu-]cc]CC": "Muon_TrackIso_BDT9vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 2, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+            }, 
+            {
+                "Location": "coneInfo", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_Phi2eeControl": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[phi(1020) -> ^e+ [e-]cc]CC": "Electron_ISO", 
+                    "[phi(1020) -> e+ ^[e-]cc]CC": "Muon_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[phi(1020) -> ^e+ [e-]cc]CC": "Electron_TrackIso_BDT6vars", 
+                    "[phi(1020) -> e+ ^[e-]cc]CC": "Muon_TrackIso_BDT6vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 1, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[phi(1020) -> ^e+ [e-]cc]CC": "Electron_TrackIso_BDT9vars", 
+                    "[phi(1020) -> e+ ^[e-]cc]CC": "Muon_TrackIso_BDT9vars"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 2, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+            }, 
+            {
+                "Location": "coneInfo", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_Tau2MuEtaPrime": [
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }
+        ], 
+        "RelatedInfoTools_Tau2PhiMu": [
+            {
+                "ConeAngle": 0.5, 
+                "DaughterLocations": {
+                    "[tau+ -> (phi(1020)->K+ K-) ^mu+]CC": "coneInfoMu05", 
+                    "[tau+ -> (phi(1020)->K+ ^K-) mu+]CC": "coneInfoKminus05", 
+                    "[tau+ -> (phi(1020)->^K+ K-) mu+]CC": "coneInfoKplus05", 
+                    "[tau+ -> ^(phi(1020)->K+ K-) mu+]CC": "coneInfoPhi05"
+                }, 
+                "Location": "coneInfoTau05", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "ConeAngle": 0.8, 
+                "DaughterLocations": {
+                    "[tau+ -> (phi(1020)->K+ K-) ^mu+]CC": "coneInfoMu08", 
+                    "[tau+ -> (phi(1020)->K+ ^K-) mu+]CC": "coneInfoKminus08", 
+                    "[tau+ -> (phi(1020)->^K+ K-) mu+]CC": "coneInfoKplus08", 
+                    "[tau+ -> ^(phi(1020)->K+ K-) mu+]CC": "coneInfoPhi08"
+                }, 
+                "Location": "coneInfoTau08", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "ConeAngle": 1.0, 
+                "DaughterLocations": {
+                    "[tau+ -> (phi(1020)->K+ K-) ^mu+]CC": "coneInfoMu10", 
+                    "[tau+ -> (phi(1020)->K+ ^K-) mu+]CC": "coneInfoKminus10", 
+                    "[tau+ -> (phi(1020)->^K+ K-) mu+]CC": "coneInfoKplus10", 
+                    "[tau+ -> ^(phi(1020)->K+ K-) mu+]CC": "coneInfoPhi10"
+                }, 
+                "Location": "coneInfoTau10", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "ConeAngle": 1.2, 
+                "DaughterLocations": {
+                    "[tau+ -> (phi(1020)->K+ K-) ^mu+]CC": "coneInfoMu12", 
+                    "[tau+ -> (phi(1020)->K+ ^K-) mu+]CC": "coneInfoKminus12", 
+                    "[tau+ -> (phi(1020)->^K+ K-) mu+]CC": "coneInfoKplus12", 
+                    "[tau+ -> ^(phi(1020)->K+ K-) mu+]CC": "coneInfoPhi12"
+                }, 
+                "Location": "coneInfoTau12", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation", 
+                "Variables": [
+                    "VTXISONUMVTX", 
+                    "VTXISODCHI2ONETRACK", 
+                    "VTXISODCHI2MASSONETRACK", 
+                    "VTXISODCHI2TWOTRACK", 
+                    "VTXISODCHI2MASSTWOTRACK"
+                ]
+            }, 
+            {
+                "DaughterLocations": {
+                    "[tau+ -> (phi(1020)->K+ K-) ^mu+]CC": "MuonTrackIsoBDTInfo", 
+                    "[tau+ -> (phi(1020)->K+ ^K-) mu+]CC": "KminusTrackIsoBDTInfo", 
+                    "[tau+ -> (phi(1020)->^K+ K-) mu+]CC": "KplusTrackIsoBDTInfo"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT"
+            }
+        ], 
+        "RelatedInfoTools_Upsilon2eMu": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Upsilon(1S) -> ^e+ [mu-]cc]CC": "Electron_ISO", 
+                    "[Upsilon(1S) -> e+ ^[mu-]cc]CC": "Muon_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "ConeIsoInfo", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Upsilon(1S) -> ^e+ [mu-]cc]CC": "Electron_TrackIsoBDT", 
+                    "[Upsilon(1S) -> e+ ^[mu-]cc]CC": "Muon_TrackIsoBDT"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 0
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "RelatedInfoTools_Upsilon2ee": [
+            {
+                "Location": "BSMUMUVARIABLES", 
+                "Type": "RelInfoBs2MuMuBIsolations", 
+                "Variables": [
+                    "BSMUMUCDFISO", 
+                    "BSMUMUOTHERBMAG", 
+                    "BSMUMUOTHERBANGLE", 
+                    "BSMUMUOTHERBBOOSTMAG", 
+                    "BSMUMUOTHERBBOOSTANGLE", 
+                    "BSMUMUOTHERBTRACKS"
+                ], 
+                "makeTrackCuts": False, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Upsilon(1S) -> ^e+ [e-]cc]CC": "Electron1_ISO", 
+                    "[Upsilon(1S) -> e+ ^[e-]cc]CC": "Electron2_ISO"
+                }, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYQPLUS", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "Location": "VtxIsoInfo", 
+                "Type": "RelInfoVertexIsolation"
+            }, 
+            {
+                "Location": "ConeIsoInfo", 
+                "Type": "RelInfoConeVariables"
+            }, 
+            {
+                "Location": "VtxIsoInfoBDT", 
+                "Type": "RelInfoVertexIsolationBDT"
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Upsilon(1S) -> ^e+ [e-]cc]CC": "Electron1_TrackIsoBDT", 
+                    "[Upsilon(1S) -> e+ ^[e-]cc]CC": "Electron2_TrackIsoBDT"
+                }, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 0
+            }, 
+            {
+                "Location": "TrackIsolationBDT2", 
+                "Type": "RelInfoTrackIsolationBDT2"
+            }
+        ], 
+        "Tau2MuEtaPrimePrescale": 1, 
+        "Tau2MuMuePrescale": 1, 
+        "TauPrescale": 1, 
+        "Upsilon2eMuPrescale": 1, 
+        "Upsilon2eePrescale": 0.6, 
+        "config_B2eMu": {
+            "max_ADAMASS": 1200.0, 
+            "max_AMAXDOCA": 0.3, 
+            "max_BPVIPCHI2": 25.0, 
+            "max_TRCHI2DV": 3.0, 
+            "max_TRGHOSTPROB": 0.3, 
+            "min_BPVDIRA": 0.0, 
+            "min_BPVVDCHI2": 225.0, 
+            "min_MIPCHI2DV": 25.0
+        }, 
+        "config_D2piphi": {
+            "comb_cuts": "in_range(1300, AM, 2400) & (AMAXDOCA('') < .3*mm)", 
+            "comb_cuts_prompt": "in_range(1300, AM, 2400) & (AMAXDOCA('') < .3*mm)", 
+            "mother_cuts": "(VFASPF(VCHI2/VDOF) < 3) & (MM > 1300) & (MM < 2400)& (BPVDIRA > 0)", 
+            "mother_cuts_prompt": "(VFASPF(VCHI2/VDOF) < 2.5) & (MM > 1300) & (MM < 2400)& (BPVDIRA > 0) & (BPVVD > 0.3)", 
+            "pi_cuts": "(PT>250*MeV) & (TRCHI2DOF < 3.) & (TRGHOSTPROB<.3)", 
+            "pi_cuts_prompt": "(PT>250*MeV) & (TRCHI2DOF < 2.5) & (TRGHOSTPROB<.2) & (MIPDV(PRIMARY)>0.025) & (MIPCHI2DV(PRIMARY) < 9)"
+        }, 
+        "config_JPsi2eMu": {
+            "max_ADAMASS": 1000.0, 
+            "max_AMAXDOCA": 0.3, 
+            "max_JpsiMass": 4096.0, 
+            "max_Phi2mumuMass": 1220.0, 
+            "max_PhiMass": 2020.0, 
+            "max_TRCHI2DV": 3, 
+            "max_TRGHOSTPROB": 0.3, 
+            "max_VtxChi2DoF": 2.5, 
+            "max_VtxChi2DoF_phi": 3.0, 
+            "min_BPVDIRA": 0, 
+            "min_BPVVDCHI2": 324.0, 
+            "min_BPVVDCHI2_phi": 144.0, 
+            "min_JpsiMass": 2200.0, 
+            "min_MIPCHI2DV": 36.0, 
+            "min_MIPCHI2DV_phi": 25.0, 
+            "min_Phi2mumuMass": 820.0, 
+            "min_PhiMass": 300.0, 
+            "min_ProbNN": 0.3, 
+            "min_ProbNN_phi2ee": 0.05, 
+            "min_ProbNN_phi_e": 0.3, 
+            "min_ProbNN_phi_mu": 0.4, 
+            "min_Pt": 300.0
+        }, 
+        "config_Phi2ll_forD": {
+            "max_ADAMASS": 1000.0, 
+            "max_AMAXDOCA": 0.3, 
+            "max_Phi2mumuMass": 1220.0, 
+            "max_PhiMass": 2020.0, 
+            "max_TRCHI2DV": 3, 
+            "max_TRGHOSTPROB": 0.3, 
+            "max_VtxChi2DoF_phi": 3.0, 
+            "min_BPVDIRA": 0, 
+            "min_BPVVDCHI2_phi": 9.0, 
+            "min_MIPCHI2DV_phi": 9.0, 
+            "min_Phi2mumuMass": 820.0, 
+            "min_PhiMass": 150.0, 
+            "min_ProbNN": 0.3, 
+            "min_ProbNN_phi2ee": 0.05, 
+            "min_ProbNN_phi_e": 0.3, 
+            "min_ProbNN_phi_mu": 0.4, 
+            "min_Pt": 300.0
+        }, 
+        "config_PromptJPsi2eMu": {
+            "max_AMAXDOCA": 0.3, 
+            "max_BPVIPCHI2": 9.0, 
+            "max_BPVVDCHI2": 9.0, 
+            "max_JpsiMass": 4096.0, 
+            "max_MIPCHI2DV": 9.0, 
+            "max_Phi2mumuMass": 1220.0, 
+            "max_PhiMass": 2020.0, 
+            "max_SPD": 350, 
+            "max_TRCHI2DV": 3, 
+            "max_TRGHOSTPROB": 0.2, 
+            "max_VtxChi2DoF": 2.5, 
+            "max_VtxChi2DoF_phi": 3.0, 
+            "min_JpsiMass": 2200.0, 
+            "min_Phi2mumuMass": 820.0, 
+            "min_PhiMass": 300.0, 
+            "min_ProbNN": 0.8, 
+            "min_ProbNN_Control": 0.65, 
+            "min_ProbNN_phi": 0.8, 
+            "min_ProbNN_phi2mumu": 0.4, 
+            "min_Pt": 300.0
+        }, 
+        "config_Tau2MuEtaPrime": {
+            "config_EtaPrime2pipigamma": {
+                "etap_cuts": "(PT > 500*MeV) & (VFASPF(VCHI2/VDOF) < 6.0)", 
+                "etap_mass_window": "(ADAMASS('eta') < 80*MeV) | (ADAMASS('eta_prime') < 80*MeV)", 
+                "gamma_cuts": "(PT > 300*MeV) & (CL > 0.1)", 
+                "piminus_cuts": "(PROBNNpi > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB < 0.3) & (TRCHI2DOF < 3.0) & (MIPCHI2DV(PRIMARY) > 9.)", 
+                "pipi_cuts": "(ACHI2DOCA(1,2)<16)", 
+                "piplus_cuts": "(PROBNNpi > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB < 0.3) & (TRCHI2DOF < 3.0) & (MIPCHI2DV(PRIMARY) > 9.)"
+            }, 
+            "config_EtaPrime2pipipi": {
+                "etap_cuts": "(PT > 500*MeV) & (VFASPF(VCHI2/VDOF) < 6.0)", 
+                "etap_mass_window": "(ADAMASS('eta') < 80*MeV) | (ADAMASS('eta_prime') < 80*MeV)", 
+                "pi0_cuts": "(PT > 250*MeV)", 
+                "piminus_cuts": "(PROBNNpi > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB < 0.3) & (TRCHI2DOF < 3.0) & (MIPCHI2DV(PRIMARY) > 9.)", 
+                "pipi_cuts": "ACHI2DOCA(1,2)<16", 
+                "piplus_cuts": "(PROBNNpi > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB < 0.3) & (TRCHI2DOF < 3.0) & (MIPCHI2DV(PRIMARY) > 9.)"
+            }, 
+            "muplus_cuts": "(ISLONG) & (TRCHI2DOF < 3 )  & (MIPCHI2DV(PRIMARY) >  9.) & (PT > 300*MeV) & (TRGHOSTPROB < 0.3)", 
+            "tau_cuts": "(BPVIPCHI2()< 100) & (VFASPF(VCHI2/VDOF)<6.) & (BPVLTIME()*c_light > 50.*micrometer) & (BPVLTIME()*c_light < 400.*micrometer) & (PT>500*MeV) & (D2DVVD(2) < 80*micrometer)", 
+            "tau_mass_window": "(ADAMASS('tau+')<150*MeV)"
+        }, 
+        "config_Upsilon2eMu": {
+            "comb_cuts": "in_range(7250, AM, 11000) & ACUTDOCA(0.3*mm,'')", 
+            "e_cuts": "(PT > 1000.*MeV) & (P > 8000.*MeV) & (TRCHI2DOF < 3.) & (PIDe > 1)", 
+            "mu_cuts": "(PT > 1000.*MeV) & (P > 8000.*MeV) & (TRCHI2DOF < 3.) & (PIDmu > 0)", 
+            "upsilon_cuts": "(VFASPF(VCHI2) < 25) & (BPVIPCHI2() < 9) & (BPVVDCHI2 < 25)"
+        }, 
+        "config_Upsilon2ee": {
+            "comb_cuts": "in_range(6000, AM, 11000) & ACUTDOCA(0.3*mm,'')", 
+            "e_cuts": "(PT > 1000.*MeV) & (P > 8000.*MeV) & (TRCHI2DOF < 3.) & (PIDe > 1)", 
+            "upsilon_cuts": "(VFASPF(VCHI2) < 25) & (BPVIPCHI2() < 9) & (BPVVDCHI2 < 25)"
+        }
+    }, 
+    "STREAMS": {
+        "Leptonic": [
+            "StrippingLFVTau2PhiMuLine", 
+            "StrippingLFVTau2eMuMuLine", 
+            "StrippingLFVB2eMuLine", 
+            "StrippingLFVJPsi2eMuLine", 
+            "StrippingLFVPromptJPsi2eMuLine", 
+            "StrippingLFVJPsi2MuMuControlLine", 
+            "StrippingLFVJPsi2eeControlLine", 
+            "StrippingLFVPromptJPsi2MuMuControlLine", 
+            "StrippingLFVPromptJPsi2eeControlLine", 
+            "StrippingLFVPhi2eMuLine", 
+            "StrippingLFVPromptPhi2eMuLine", 
+            "StrippingLFVPhi2MuMuControlLine", 
+            "StrippingLFVPhi2eeControlLine", 
+            "StrippingLFVPromptPhi2MuMuControlLine", 
+            "StrippingLFVPromptPhi2eeControlLine", 
+            "StrippingLFVB2eeLine", 
+            "StrippingLFVB2heMuLine", 
+            "StrippingLFVB2hMuLine", 
+            "StrippingLFVBu2KJPsieeLine", 
+            "StrippingLFVB2hTauMuLine", 
+            "StrippingLFVTau2MuEtaP2pipigLine", 
+            "StrippingLFVTau2MuEtaP2pipipiLine", 
+            "StrippingLFVupsilon2eMuLine", 
+            "StrippingLFVupsilon2eeLine", 
+            "StrippingLFVD2piphi2eeLine", 
+            "StrippingLFVD2piphi2eMuLine", 
+            "StrippingLFVD2piphi2MuMuLine", 
+            "StrippingLFVD2piphi2eePromptLine", 
+            "StrippingLFVD2piphi2eMuPromptLine", 
+            "StrippingLFVD2piphi2MuMuPromptLine"
+        ]
+    }, 
+    "WGs": [ "RD" ]
+}
+
+MultiLepton = {
+    "BUILDERTYPE": "MultiLeptonConf", 
+    "CONFIG": {
+        "BDIRA": 0.999, 
+        "BFlightCHI2": 36, 
+        "BIPCHI2": 25, 
+        "BMassWindow": 1500, 
+        "BVertexCHI2": 16, 
+        "Bu2mmLinePrescale": 1, 
+        "DiHadronADOCA": 0.75, 
+        "DiLeptonFDCHI2": 10, 
+        "DiLeptonIPCHI2": 0, 
+        "DiLeptonPT": 0, 
+        "K1_MassWindow_Hi": 6300, 
+        "K1_MassWindow_Lo": 0, 
+        "K1_SumPTHad": 800, 
+        "K1_VtxChi2": 25, 
+        "KaonIPCHI2": 9, 
+        "KaonPT": 250, 
+        "KaonPTTight": 400, 
+        "LamLam_VtxChi2": 36, 
+        "LeptonIPCHI2": 9, 
+        "LeptonPT": 300, 
+        "Mu_SumIPChi2Had": 12.0, 
+        "Trk_Chi2": 3, 
+        "Trk_GhostProb": 0.3, 
+        "UpperMass": 5500, 
+        "V0TAU": 0.0005
+    }, 
+    "STREAMS": {
+        "Dimuon": [
+            "StrippingMultiLepton_B24muXTightLine", 
+            "StrippingMultiLepton_B22mu2eXTightLine", 
+            "StrippingMultiLepton_InclDet4muLine", 
+            "StrippingMultiLepton_InclDet2mu2muLine", 
+            "StrippingMultiLepton_InclDet6muLine", 
+            "StrippingMultiLepton_InclDet5muLine", 
+            "StrippingMultiLepton_InclPrompt6muLine", 
+            "StrippingMultiLepton_Incl8muLine", 
+            "StrippingMultiLepton_Incl8mu4bodyLine", 
+            "StrippingMultiLepton_InclDet6mu3bodyLine", 
+            "StrippingMultiLepton_Jpsi24MuPromptTightLine", 
+            "StrippingMultiLepton_Jpsi22Mu2EDetachedLine", 
+            "StrippingMultiLepton_Jpsi22E2EDetachedLine", 
+            "StrippingMultiLepton_Jpsi22Mu2ESSDetachedLine", 
+            "StrippingMultiLepton_Incl8mu4bodyLongLivedLine", 
+            "StrippingMultiLepton_InclDet6mu3bodyLongLivedLine"
+        ], 
+        "Leptonic": [
+            "StrippingMultiLepton_B24muXLine", 
+            "StrippingMultiLepton_B24muXUpLine", 
+            "StrippingMultiLepton_Jpsi22Mu2EPromptLine", 
+            "StrippingMultiLepton_Jpsi23MuEDetachedLine", 
+            "StrippingMultiLepton_Jpsi23MuEPromptLine", 
+            "StrippingMultiLepton_Jpsi2Mu3EDetachedLine", 
+            "StrippingMultiLepton_Jpsi2Mu3EPromptLine", 
+            "StrippingMultiLepton_InclDet4muLowMassLine", 
+            "StrippingMultiLepton_InclDet4muLowMassUpLine", 
+            "StrippingMultiLepton_Jpsi24MuPromptLine", 
+            "StrippingMultiLepton_B24muXLongLivedLine", 
+            "StrippingMultiLepton_B26muXLongLivedLine"
+        ]
+    }, 
+    "WGs": [ "RD" ]
+}
+
+RareBaryonicMuMu = {
+    "BUILDERTYPE": "RareBaryonicMuMuConf", 
+    "CONFIG": {
+        "BDIRA": 0.999, 
+        "BDIRA_PR": 0.999, 
+        "BFlightCHI2": 50, 
+        "BFlightCHI2Ch": 36, 
+        "BIPCHI2": 25, 
+        "BIPCHI2_PR": 36, 
+        "BMassWindow": 1600, 
+        "BVertexCHI2": 12, 
+        "BVertexCHI2Loose": 20, 
+        "BVtxCHI2_PR": 225, 
+        "Bu2mmLinePrescale": 1, 
+        "DiHadronADOCA": 0.75, 
+        "DiHadronADOCACHI2": 30, 
+        "DiHadronADOCACHI2_PR": 225, 
+        "DiHadronMass": 3000, 
+        "DiHadronVtxCHI2": 25, 
+        "DiHadronVtxCHI2_PR": 200, 
+        "DiLeptonFDCHI2": 10, 
+        "DiLeptonIPCHI2": 0, 
+        "DiLeptonPT": 0, 
+        "Hadron_MassWindow_Hi": 6300, 
+        "Hadron_MassWindow_Lo": 0, 
+        "Hadron_MinIPCHI2": 4.0, 
+        "Hadron_VtxChi2": 25, 
+        "HyperonCombWindow": 75.0, 
+        "HyperonMaxDocaChi2": 25.0, 
+        "HyperonWindow": 60.0, 
+        "KaonIPCHI2": 9, 
+        "KaonPT": 250, 
+        "KstarPMassWindow": 300, 
+        "KstarPVertexCHI2": 36, 
+        "Lambda_MassWindow_Hi": 1130, 
+        "Lambda_MassWindow_Lo": 1105, 
+        "LeptonIPCHI2": 9, 
+        "LeptonPT": 250, 
+        "MinDLLK": -0.5, 
+        "MinDLLp": -0.5, 
+        "MinProbNN": 0.02, 
+        "MinProbNNTight": 0.1, 
+        "OmDIRA_PR": 0.999, 
+        "OmegaPR_M_Hi_comb": 1700, 
+        "OmegaPR_M_Lo_comb": 1370, 
+        "ProtonP": 5000, 
+        "Trk_Chi2": 3, 
+        "Trk_GhostProb": 0.5, 
+        "UpperMass": 6500, 
+        "V0PT": 0, 
+        "V0TAU": 0.0005, 
+        "XiPR_M_Hi_comb": 1350, 
+        "XiPR_M_Lo_comb": 1000
+    }, 
+    "STREAMS": [ "Leptonic" ], 
+    "WGs": [ "RD" ]
+}
+
+Sb2PKMuXPi = {
+    "BUILDERTYPE": "Sb2PKMuXPiConf", 
+    "CONFIG": {
+        "DMpKJpsiPi": 739.57, 
+        "DMpKMuPi": 359.57, 
+        "DZBPV": 1.0, 
+        "DiHadronADOCACHI2": 30, 
+        "DiHadronVtxCHI2": 20, 
+        "JpsiMassWindow": 80.0, 
+        "KaonIPCHI2": 9.0, 
+        "KaonPT": 400.0, 
+        "KaonPTLoose": 250.0, 
+        "MuMinIPChi2": 9.0, 
+        "MuP": 3000.0, 
+        "MuPIDmu": 0.0, 
+        "MuPT": 1000.0, 
+        "PiMinIPChi2": 9.0, 
+        "PiPIDK": 16.0, 
+        "PiPIDmu": 0.0, 
+        "PiPIDp": 16.0, 
+        "PiPT": 500.0, 
+        "PiPTLoose": 250.0, 
+        "ProbNNCut": 0.25, 
+        "ProtonP": 2000.0, 
+        "RelatedInfoTools": [
+            {
+                "DaughterLocations": {
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l+) pi+]CC": "TrackIsoBs2MMInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l+) pi-]CC": "TrackIsoBs2MMInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l-) pi+]CC": "TrackIsoBs2MMInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l-) pi-]CC": "TrackIsoBs2MMInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) l+) ^pi+]CC": "TrackIsoBs2MMInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) l+) ^pi-]CC": "TrackIsoBs2MMInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) l-) ^pi+]CC": "TrackIsoBs2MMInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) l-) ^pi-]CC": "TrackIsoBs2MMInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l+) pi+]CC": "TrackIsoBs2MMInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l+) pi-]CC": "TrackIsoBs2MMInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l-) pi+]CC": "TrackIsoBs2MMInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l-) pi-]CC": "TrackIsoBs2MMInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l+) pi+]CC": "TrackIsoBs2MMInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l+) pi-]CC": "TrackIsoBs2MMInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l-) pi+]CC": "TrackIsoBs2MMInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l-) pi-]CC": "TrackIsoBs2MMInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) l+) ^pi+]CC": "TrackIsoBs2MMInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) l+) ^pi-]CC": "TrackIsoBs2MMInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) l-) ^pi+]CC": "TrackIsoBs2MMInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) l-) ^pi-]CC": "TrackIsoBs2MMInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l+) pi+]CC": "TrackIsoBs2MMInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l+) pi-]CC": "TrackIsoBs2MMInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l-) pi+]CC": "TrackIsoBs2MMInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l-) pi-]CC": "TrackIsoBs2MMInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l+) pi+]CC": "TrackIsoBs2MMInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l+) pi-]CC": "TrackIsoBs2MMInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l-) pi+]CC": "TrackIsoBs2MMInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l-) pi-]CC": "TrackIsoBs2MMInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l+) pi+]CC": "TrackIsoBs2MMInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l+) pi-]CC": "TrackIsoBs2MMInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l-) pi+]CC": "TrackIsoBs2MMInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l-) pi-]CC": "TrackIsoBs2MMInfo_p", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l+) pi+]CC": "TrackIsoBs2MMInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l+) pi-]CC": "TrackIsoBs2MMInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l-) pi+]CC": "TrackIsoBs2MMInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l-) pi-]CC": "TrackIsoBs2MMInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l+) pi+]CC": "TrackIsoBs2MMInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l+) pi-]CC": "TrackIsoBs2MMInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l-) pi+]CC": "TrackIsoBs2MMInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l-) pi-]CC": "TrackIsoBs2MMInfo_LStar"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "IsoTwoBody": True, 
+                "Type": "RelInfoBs2MuMuTrackIsolations", 
+                "Variables": [
+                    "BSMUMUTRACKPLUSISO", 
+                    "BSMUMUTRACKPLUSISOTWO", 
+                    "ISOTWOBODYMASSISOPLUS", 
+                    "ISOTWOBODYCHI2ISOPLUS", 
+                    "ISOTWOBODYISO5PLUS", 
+                    "BSMUMUTRACKID"
+                ], 
+                "angle": 0.27, 
+                "doca_iso": 0.13, 
+                "fc": 0.6, 
+                "ips": 3.0, 
+                "makeTrackCuts": False, 
+                "pvdis": 0.5, 
+                "pvdis_h": 40.0, 
+                "svdis": -0.15, 
+                "svdis_h": 30.0, 
+                "tracktype": 3
+            }, 
+            {
+                "DaughterLocations": {
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l+) pi+]CC": "TrackIsoBDTInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l+) pi-]CC": "TrackIsoBDTInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l-) pi+]CC": "TrackIsoBDTInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l-) pi-]CC": "TrackIsoBDTInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) l+) ^pi+]CC": "TrackIsoBDTInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) l+) ^pi-]CC": "TrackIsoBDTInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) l-) ^pi+]CC": "TrackIsoBDTInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ Xs) l-) ^pi-]CC": "TrackIsoBDTInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l+) pi+]CC": "TrackIsoBDTInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l+) pi-]CC": "TrackIsoBDTInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l-) pi+]CC": "TrackIsoBDTInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l-) pi-]CC": "TrackIsoBDTInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l+) pi+]CC": "TrackIsoBDTInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l+) pi-]CC": "TrackIsoBDTInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l-) pi+]CC": "TrackIsoBDTInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l-) pi-]CC": "TrackIsoBDTInfo_mu", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) l+) ^pi+]CC": "TrackIsoBDTInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) l+) ^pi-]CC": "TrackIsoBDTInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) l-) ^pi+]CC": "TrackIsoBDTInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X- Xs) l-) ^pi-]CC": "TrackIsoBDTInfo_Pi", 
+                    "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l+) pi+]CC": "TrackIsoBDTInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l+) pi-]CC": "TrackIsoBDTInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l-) pi+]CC": "TrackIsoBDTInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l-) pi-]CC": "TrackIsoBDTInfo_K", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l+) pi+]CC": "TrackIsoBDTInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l+) pi-]CC": "TrackIsoBDTInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l-) pi+]CC": "TrackIsoBDTInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l-) pi-]CC": "TrackIsoBDTInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l+) pi+]CC": "TrackIsoBDTInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l+) pi-]CC": "TrackIsoBDTInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l-) pi+]CC": "TrackIsoBDTInfo_p", 
+                    "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l-) pi-]CC": "TrackIsoBDTInfo_p", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l+) pi+]CC": "TrackIsoBDTInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l+) pi-]CC": "TrackIsoBDTInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l-) pi+]CC": "TrackIsoBDTInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l-) pi-]CC": "TrackIsoBDTInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l+) pi+]CC": "TrackIsoBDTInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l+) pi-]CC": "TrackIsoBDTInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l-) pi+]CC": "TrackIsoBDTInfo_LStar", 
+                    "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l-) pi-]CC": "TrackIsoBDTInfo_LStar"
+                }, 
+                "IgnoreUnmatchedDescriptors": True, 
+                "Type": "RelInfoTrackIsolationBDT", 
+                "Variables": 2, 
+                "WeightsFile": "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+            }
+        ], 
+        "Sb2PKJpsiPiLinePrescale": 1, 
+        "Sb2PKMuXPiLinePrescale": 1, 
+        "Sb2PKMuXPiSSLinePrescale": 1, 
+        "SbPT": 50.0, 
+        "Trk_GhostProb": 0.2, 
+        "UpperLbMass": 5620.0, 
+        "pKJpsiFdChi2": 25.0, 
+        "pKJpsiMassMax": 5850.0, 
+        "pKJpsiMassMin": 5400.0, 
+        "pKJpsiVChi2Dof": 3.0, 
+        "pKMuFdChi2": 100.0, 
+        "pKMuMassMax": 6000.0, 
+        "pKMuMassMin": 2300.0, 
+        "pKMuVChi2Dof": 4.0
+    }, 
+    "STREAMS": [ "Semileptonic" ], 
+    "WGs": [ "RD" ]
+}
+
+Tau23Mu = {
+    "BUILDERTYPE": "Tau23MuLinesConf", 
+    "CONFIG": {
+        "Ds23PiPrescale": 0.0, 
+        "Ds23PiTISPrescale": 0.0, 
+        "Ds2PhiPiPrescale": 1.0, 
+        "Tau25Prescale": 1.0, 
+        "Tau2PMuMuPrescale": 1.0, 
+        "TauPostscale": 1.0, 
+        "TauPrescale": 1.0, 
+        "TrackGhostProb": 0.45
+    }, 
+    "STREAMS": {
+        "Dimuon": [
+            "StrippingTau23MuTau23Mu_DSTLine", 
+            "StrippingTau23MuTau23Mu_DST_3muLine", 
+            "StrippingTau23MuDs2PhiPi_DSTLine"
+        ], 
+        "Leptonic": [
+            "StrippingTau23MuTau23MuLine", 
+            "StrippingTau23MuDs2PhiPiLine", 
+            "StrippingTau23MuTau2PMuMuLine", 
+            "StrippingTau23MuDs23PiLine", 
+            "StrippingTau23MuTau25MuLine"
+        ]
+    }, 
+    "WGs": [ "RD" ]
+}
+
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py
new file mode 100644
index 000000000..22c814282
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py
@@ -0,0 +1,461 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+ 
+################################################################################
+##                          S T R I P P I N G  34r0p2                         ##
+##                                                                            ##
+##  Configuration for SL WG                                                   ##
+##  Contact person: Lupato Anna (anna.lupato@cern.ch)                         ##
+################################################################################
+
+B23MuNu = {
+    "BUILDERTYPE": "B23MuNuConf", 
+    "CONFIG": {
+        "BPT": 2000.0, 
+        "CORRM_MAX": 10000.0, 
+        "CORRM_MIN": 2500.0, 
+        "DIRA": 0.99, 
+        "Electron_MinIPCHI2": 25.0, 
+        "Electron_PIDe": 2.0, 
+        "Electron_PIDeK": 0.0, 
+        "Electron_PT": 200.0, 
+        "FlightChi2": 30.0, 
+        "LOWERMASS": 0.0, 
+        "MisIDPrescale": 0.01, 
+        "Muon_MinIPCHI2": 9.0, 
+        "Muon_PIDmu": 0.0, 
+        "Muon_PIDmuK": 0.0, 
+        "Muon_PT": 0.0, 
+        "SpdMult": 900, 
+        "Track_CHI2nDOF": 3.0, 
+        "Track_GhostProb": 0.35, 
+        "UPPERMASS": 7500.0, 
+        "VertexCHI2": 4.0
+    }, 
+    "STREAMS": [ "Semileptonic" ], 
+    "WGs": [ "Semileptonic" ]
+}
+
+B2Invis = {
+    "BUILDERTYPE": "B2InvisAllLinesConf", 
+    "CONFIG": {
+        "BDIRA": 0.9995, 
+        "BFDCHI2HIGH": 150.0, 
+        "BVCHI2DOF": 4.0, 
+        "GEC_nSPDHits": 600.0, 
+        "PionMINIPCHI2": 16.0, 
+        "PionP": 3000.0, 
+        "PionPIDK": 0.0, 
+        "PionPT": 500.0, 
+        "PionTRCHI2": 3.0, 
+        "ProtonMINIPCHI2": 16.0, 
+        "ProtonP": 15000.0, 
+        "ProtonPIDK": 4.0, 
+        "ProtonPIDp": 4.0, 
+        "ProtonPT": 800.0, 
+        "ProtonTRCHI2": 3.0, 
+        "TRGHOSTPROB": 0.3, 
+        "XuDIRA": 0.9995, 
+        "XuFDCHI2HIGH": 150.0, 
+        "XuMassLower": 1230.0, 
+        "XuMassUpper": 2800, 
+        "XuPT": 1800.0, 
+        "XuPiConstrainMLower": 2300, 
+        "XuPiConstrainMUpper": 2700, 
+        "XuPiMassLower": 1800.0, 
+        "XuPiMassUpper": 2900, 
+        "XuPiP": 40000.0, 
+        "XuPiPT": 2500.0, 
+        "XuVCHI2DOF": 3.0, 
+        "massDiff": 400
+    }, 
+    "STREAMS": [ "Semileptonic" ], 
+    "WGs": [ "Semileptonic" ]
+}
+
+B2XTauNuAllLines = {
+    "BUILDERTYPE": "B2XTauNuAllLinesConf", 
+    "CONFIG": {
+        "B_BPVDIRA": 0.995, 
+        "B_DOCAMAX": 0.15, 
+        "B_DeltaM_high": 300.0, 
+        "B_DeltaM_low": -2979.0, 
+        "B_upperDeltaM_high": 1721.0, 
+        "B_upperDeltaM_low": 720.0, 
+        "D02K3pi_AMassW": 60.0, 
+        "D02K3pi_BPVVDCHI2": 36.0, 
+        "D02K3pi_DIRA": 0.997, 
+        "D02K3pi_DOCAMAX": 0.2, 
+        "D02K3pi_K_IPCHI2": 15.0, 
+        "D02K3pi_K_P": 4.0, 
+        "D02K3pi_K_PIDK": 1, 
+        "D02K3pi_K_PT": 800.0, 
+        "D02K3pi_K_TRCHI2DOF": 3.0, 
+        "D02K3pi_MIPCHI2": 10.0, 
+        "D02K3pi_MassW": 40.0, 
+        "D02K3pi_P": 20.0, 
+        "D02K3pi_PT": 2000.0, 
+        "D02K3pi_Pis_IPCHI2": 25.0, 
+        "D02K3pi_Pis_P": 2.0, 
+        "D02K3pi_Pis_PIDK": 8.0, 
+        "D02K3pi_Pis_PT": 400.0, 
+        "D02K3pi_Pis_TRCHI2": 3.0, 
+        "D02K3pi_VCHI2": 6.0, 
+        "D02K3pi_pi_MAXPT": 800.0, 
+        "D02K3pi_pi_SUMPT": 2000.0, 
+        "D02K3pi_slowPi_PT": 50.0, 
+        "D02K3pi_slowPi_TRCHI2DOF": 30.0, 
+        "D02K3pi_tauR_high": 6.0, 
+        "D0_BPVVDCHI2": 36.0, 
+        "D0_DIRA": 0.995, 
+        "D0_DOCAMAX": 0.5, 
+        "D0_MassW": 40.0, 
+        "D0_PT": 1200.0, 
+        "D0_VCHI2": 10.0, 
+        "DInvVertD": 1.0, 
+        "D_BPVVDCHI2": 50.0, 
+        "D_DIRA": 0.995, 
+        "D_K_IPCHI2": 10.0, 
+        "D_K_PIDK": -3, 
+        "D_K_PT": 150.0, 
+        "D_K_TRCHI2DOF": 30.0, 
+        "D_MIPCHI2": 10.0, 
+        "D_MassW": 40.0, 
+        "D_PT": 1600.0, 
+        "D_Pi_IPCHI2": 10.0, 
+        "D_Pi_PIDK": 50.0, 
+        "D_Pi_PT": 150.0, 
+        "D_Pi_TRCHI2": 3.0, 
+        "D_VCHI2": 10.0, 
+        "DdoubleStar0_DeltaM_high": 450.0, 
+        "DdoubleStar0_DeltaM_low": 350.0, 
+        "DdoubleStar0_MassW": 300.0, 
+        "DdoubleStar0_PT": 500.0, 
+        "DdoubleStar0_Pi_IPCHI2": 4.0, 
+        "DdoubleStar0_Pi_PIDK": 8.0, 
+        "DdoubleStar0_Pi_TRCHI2": 3.0, 
+        "DdoubleStar0_VCHI2": 25.0, 
+        "DdoubleStar2PiDstar02GammaD0_DeltaM_high": 450.0, 
+        "DdoubleStar2PiDstar02GammaD0_DeltaM_low": 350.0, 
+        "DdoubleStar2PiDstar02GammaD0_MassW": 300.0, 
+        "DdoubleStar2PiDstar02GammaD0_PT": 500.0, 
+        "DdoubleStar2PiDstar02GammaD0_Pi_IPCHI2": 4.0, 
+        "DdoubleStar2PiDstar02GammaD0_Pi_PIDK": 8.0, 
+        "DdoubleStar2PiDstar02GammaD0_Pi_TRCHI2": 3.0, 
+        "DdoubleStar2PiDstar02GammaD0_VCHI2": 25.0, 
+        "DdoubleStar2PiDstar02Pi0D0_DeltaM_high": 450.0, 
+        "DdoubleStar2PiDstar02Pi0D0_DeltaM_low": 350.0, 
+        "DdoubleStar2PiDstar02Pi0D0_MassW": 300.0, 
+        "DdoubleStar2PiDstar02Pi0D0_PT": 500.0, 
+        "DdoubleStar2PiDstar02Pi0D0_Pi_IPCHI2": 4.0, 
+        "DdoubleStar2PiDstar02Pi0D0_Pi_PIDK": 8.0, 
+        "DdoubleStar2PiDstar02Pi0D0_Pi_TRCHI2": 3.0, 
+        "DdoubleStar2PiDstar02Pi0D0_VCHI2": 25.0, 
+        "Dplus_K_PIDK": 3, 
+        "Dplus_K_PT": 1500.0, 
+        "Dplus_K_TRPCHI2": 1e-08, 
+        "Dplus_Pi_TRPCHI2": 1e-08, 
+        "Ds_BPVVDCHI2": 36.0, 
+        "Ds_K_PT": 1500.0, 
+        "DstD02K3pi_D0_K_PIDK": -3, 
+        "DstD02K3pi_D0_K_PT": 400.0, 
+        "DstD02K3pi_D0_MIPCHI2": 0, 
+        "DstD02K3pi_D0_Pis_IPCHI2": 15, 
+        "DstD02K3pi_D0_Pis_PT": 250.0, 
+        "DstD02K3pi_D0_VCHI2": 10.0, 
+        "DstD02K3pi_D0_pi_MAXPT": 250, 
+        "DstD02K3pi_D0_pi_SUMPT": 250, 
+        "DstD02K3pi_DeltaM": 160.0, 
+        "DstD02K3pi_MassW": 50.0, 
+        "DstD02K3pi_PT": 1250.0, 
+        "DstD02K3pi_VCHI2": 25.0, 
+        "Dstar02GammaD0_DeltaM_high": 250.0, 
+        "Dstar02GammaD0_DeltaM_low": 0.0, 
+        "Dstar02GammaD0_MassW": 50.0, 
+        "Dstar02GammaD0_PT": 1250.0, 
+        "Dstar02GammaD0_Pi_PT": 400.0, 
+        "Dstar02GammaD0_VCHI2": 25.0, 
+        "Dstar02Pi0D0_DeltaM_high": 200.0, 
+        "Dstar02Pi0D0_DeltaM_low": 120.0, 
+        "Dstar02Pi0D0_MassW": 50.0, 
+        "Dstar02Pi0D0_PT": 1250.0, 
+        "Dstar02Pi0D0_Pi_PT": 200.0, 
+        "Dstar02Pi0D0_VCHI2": 25.0, 
+        "Dstar_DeltaM_high": 160.0, 
+        "Dstar_DeltaM_low": 135.0, 
+        "Dstar_MassW": 50.0, 
+        "Dstar_PT": 1250.0, 
+        "Dstar_VCHI2": 25.0, 
+        "Jpsi_MassW": 80.0, 
+        "Jpsi_PT": 2000.0, 
+        "Jpsi_VCHI2": 9.0, 
+        "LbInvVertD": 1.0, 
+        "Lc_BPVVDCHI2": 50.0, 
+        "Lc_DIRA": 0.995, 
+        "Lc_K_IPCHI2": 10.0, 
+        "Lc_K_PIDK": 3.0, 
+        "Lc_K_PT": 150.0, 
+        "Lc_K_TRCHI2DOF": 3.0, 
+        "Lc_K_TRPCHI2": 1e-08, 
+        "Lc_MIPCHI2": 10.0, 
+        "Lc_MassW": 30.0, 
+        "Lc_PT": 1200.0, 
+        "Lc_Pi_IPCHI2": 10.0, 
+        "Lc_Pi_PIDK": 50.0, 
+        "Lc_Pi_PT": 150.0, 
+        "Lc_Pi_TRCHI2": 3.0, 
+        "Lc_Pi_TRPCHI2": 1e-08, 
+        "Lc_VCHI2": 10.0, 
+        "Lc_p_IPCHI2": 10.0, 
+        "Lc_p_PIDp": 5.0, 
+        "Lc_p_PT": 150.0, 
+        "Lc_p_TRCHI2DOF": 3.0, 
+        "Lc_p_TRPCHI2": 1e-08, 
+        "Muon_PT": 1000.0, 
+        "Muon_TRCHI2DOF": 3.0, 
+        "Postscale": 1.0, 
+        "Prescale_B0d2DTauNu": 1.0, 
+        "Prescale_B0d2DdoubleStar2PiDstar02GammaD0TauNu": 1.0, 
+        "Prescale_B0d2DdoubleStar2PiDstar02Pi0D0TauNu": 1.0, 
+        "Prescale_B0d2DstarD02K3piSlowWSTauNu": 1.0, 
+        "Prescale_B0d2DstarD02K3piTauNu": 1.0, 
+        "Prescale_B0d2DstarD02K3piTauNuWS": 1.0, 
+        "Prescale_B0d2DstarD02K3piWSSlowTauNu": 1.0, 
+        "Prescale_B0d2DstarSlowWSTauNu": 1.0, 
+        "Prescale_B0d2DstarTauNu": 1.0, 
+        "Prescale_B0d2DstarWSSlowTauNu": 1.0, 
+        "Prescale_B0s2DsTauNu": 1.0, 
+        "Prescale_Bc2JpsiTauNu": 1.0, 
+        "Prescale_Bu2D02K3piTauNu": 1.0, 
+        "Prescale_Bu2D02K3piTauNuWS": 1.0, 
+        "Prescale_Bu2D0TauNu": 1.0, 
+        "Prescale_Bu2DdoubleStar0TauNu": 1.0, 
+        "Prescale_Bu2Dstar02GammaD0TauNu": 1.0, 
+        "Prescale_Bu2Dstar02Pi0D0TauNu": 1.0, 
+        "Prescale_Lb2LcTauNu": 1.0, 
+        "Prescale_Lb2pTauNu": 1.0, 
+        "Prescale_NonPhys": 1.0, 
+        "TRGHP": 0.4, 
+        "TRGHP_slowPi": 0.6, 
+        "TisTosSpecs": {
+            "Hlt1.*Decision%TOS": 0
+        }, 
+        "p_IPCHI2": 35.0, 
+        "p_PE": 15000, 
+        "p_PIDp": 0.6, 
+        "p_PT": 1750.0, 
+        "p_TRCHI2DOF": 3.0, 
+        "slowPi_PT": 50.0, 
+        "slowPi_TRCHI2DOF": 30.0, 
+        "tau_BPVVDR": 0.2, 
+        "tau_pions_IPCHI2PV": 15.0
+    }, 
+    "STREAMS": [ "BhadronCompleteEvent" ], 
+    "WGs": [ "Semileptonic" ]
+}
+
+BXX = {
+    "BUILDERTYPE": "BXXLinesBuilderConf", 
+    "CONFIG": {
+        "DstarBPVIPCHI2Max": 25.0, 
+        "DstarBPVVDCHI2Max": 25.0, 
+        "DstarHLT2TOSSelection": "Hlt2Global", 
+        "DstarMassDiffDzeroPlusPionMax": 40.0, 
+        "DstarPTMin": 3000.0, 
+        "DstarPionMIPCHI2DVMax": 4.0, 
+        "DstarPionMIPDVMax": 0.3, 
+        "DstarPionPIDKMax": 10.0, 
+        "DstarPionPTMin": 250.0, 
+        "DstarPionTRCHI2DOFMax": 3.0, 
+        "DstarVCHI2DOFMax": 5.0, 
+        "DzeroADOCACHI2CUT": 20.0, 
+        "DzeroBPVDIRAMin": 0.9997, 
+        "DzeroBPVIPCHI2Max": 0.9997, 
+        "DzeroBPVVDCHI2Min": 120.0, 
+        "DzeroBPVVDMin": 4.0, 
+        "DzeroDaughterKaonPIDKMin": 4.0, 
+        "DzeroDaughterMIPCHI2DVMin": 4.0, 
+        "DzeroDaughterPMin": 2000.0, 
+        "DzeroDaughterPTMin": 400.0, 
+        "DzeroDaughterPionPIDKMax": 10.0, 
+        "DzeroDaughterPionPIDmuMax": 10.0, 
+        "DzeroDaughterTRCHI2DOFMax": 3.0, 
+        "DzeroMassMax": 1700.0, 
+        "DzeroMassMin": 1400.0, 
+        "DzeroPTMin": 3000.0, 
+        "DzeroPionPairMassMax": 975.5, 
+        "DzeroPionPairMassMin": 575.5, 
+        "DzeroVCHI2DOFMax": 6.0, 
+        "InputKaonsForDzeroLocation": "Phys/StdLooseKaons/Particles", 
+        "InputPionsForDstarLocation": "Phys/StdAllLoosePions/Particles", 
+        "InputPionsForDzeroLocation": "Phys/StdLoosePions/Particles", 
+        "prescaleRS": 1.0, 
+        "prescaleWS": 0.2
+    }, 
+    "STREAMS": {
+        "Semileptonic": [
+            "StrippingDstRSwD02K2PiD0forBXXLine", 
+            "StrippingDstWSwD02K2PiD0forBXXLine"
+        ]
+    }, 
+    "WGs": [
+        "Charm", 
+        "Semileptonic"
+    ]
+}
+
+Bc2Bs = {
+    "BUILDERTYPE": "Bc2BsBuilder", 
+    "CONFIG": {
+        "BachMuonMINIP": 0.02, 
+        "BachMuonP": 1000.0, 
+        "BachMuonPIDmu": 0, 
+        "BachMuonPT": 150.0, 
+        "BachMuonTRCHI2": 4.0, 
+        "BachPionMINIP": 0.02, 
+        "BachPionP": 1000.0, 
+        "BachPionPIDK": 2, 
+        "BachPionPT": 350.0, 
+        "BachPionTRCHI2": 4.0, 
+        "BcDIRA_Loose": 0.9, 
+        "BcDIRA_Tight": 0.99, 
+        "BcP": 30000.0, 
+        "BcPT": 3000.0, 
+        "BcPVVDZcut": 0.08, 
+        "Bc_CHI2DOF": 20.0, 
+        "BsDIRA": 0.9, 
+        "BsFDCHI2HIGH": 35.0, 
+        "BsMassWindowHigh": 6000.0, 
+        "BsMassWindowLow": 5000.0, 
+        "BsPVVDZcut": 2.0, 
+        "Bs_DsPi_CHI2DOF": 25.0, 
+        "Bs_JpsiPhi_CHI2DOF": 35.0, 
+        "DsMassWindow": 400.0, 
+        "Ds_BPVVDZcut": 0.0, 
+        "Ds_CHI2DOF": 10.0, 
+        "Ds_DIRA": 0.99, 
+        "Ds_FDCHI2HIGH": 100.0, 
+        "ElectronGHOSTPROB": 0.6, 
+        "ElectronMINIP": 0.05, 
+        "ElectronP": 3000.0, 
+        "ElectronPIDe": -0.2, 
+        "ElectronPT": 1000.0, 
+        "ElectronTRCHI2": 10, 
+        "GEC_nLongTrk": 250.0, 
+        "JpsiMassWindow": 200.0, 
+        "JpsiPT": 1000.0, 
+        "Jpsi_BPVVDZcut": 1.5, 
+        "Jpsi_CHI2DOF": 15.0, 
+        "Jpsi_DIRA": 0.9, 
+        "K_from_bc_MINIP": 0.05, 
+        "K_from_bc_P": 1000.0, 
+        "K_from_bc_PIDK": 0.0, 
+        "K_from_bc_PT": 150.0, 
+        "K_from_bc_TRCHI2": 4.0, 
+        "K_from_bs_MINIP": 0.05, 
+        "K_from_bs_P": 1000.0, 
+        "K_from_bs_PIDK": 0.0, 
+        "K_from_bs_PT": 150.0, 
+        "K_from_bs_TRCHI2": 4.0, 
+        "KaonMINIP": 0.05, 
+        "KaonMINIP_phi": 0.025, 
+        "KaonP": 3000.0, 
+        "KaonPIDK": 5.0, 
+        "KaonPIDK_phi": 0.0, 
+        "KaonPIDmu": 5.0, 
+        "KaonPIDmu_phi": -2.0, 
+        "KaonPIDp": 5.0, 
+        "KaonPIDp_phi": -2.0, 
+        "KaonPT": 400.0, 
+        "KaonPT_phi": 200.0, 
+        "KaonP_phi": 3000.0, 
+        "KaonTRCHI2": 4.0, 
+        "MuonGHOSTPROB": 0.35, 
+        "MuonMINIP": 0.025, 
+        "MuonP": 3000.0, 
+        "MuonPIDK": -2.0, 
+        "MuonPIDmu": 0.0, 
+        "MuonPT": 750.0, 
+        "MuonTRCHI2": 4.0, 
+        "PhiDIRA": 0.9, 
+        "PhiMINIP": 0.05, 
+        "PhiMassWindow": 200.0, 
+        "PhiPT": 600.0, 
+        "PhiVCHI2DOF": 6, 
+        "Phi_CHI2DOF": 35.0, 
+        "PionFromBsMINIP": 0.05, 
+        "PionFromBsP": 1000.0, 
+        "PionFromBsPIDK": 2, 
+        "PionFromBsPT": 500.0, 
+        "PionFromBsTRCHI2": 4.0, 
+        "PionMINIP": 0.05, 
+        "PionP": 3000.0, 
+        "PionPIDK": -2.0, 
+        "PionPT": 400.0, 
+        "PionTRCHI2": 4.0, 
+        "TRGHOSTPROB": 0.5
+    }, 
+    "STREAMS": [ "Leptonic" ], 
+    "WGs": [ "Semileptonic" ]
+}
+
+
+SemilepISR = {
+    "BUILDERTYPE": "SemilepISRAllLinesConf", 
+    "CONFIG": {
+        "B_DIRA": 0.99, 
+        "B_D_DZ": -2.0, 
+        "B_DocaChi2Max": 10, 
+        "B_MassMax": 8000.0, 
+        "B_MassMin": 2200.0, 
+        "B_VCHI2DOF": 9.0, 
+        "D_AMassWin": 90.0, 
+        "D_BPVDIRA": 0.99, 
+        "D_DocaChi2Max": 20, 
+        "D_FDCHI2": 25.0, 
+        "D_MassMax": 1700.0, 
+        "D_MassMin": 700.0, 
+        "D_MassWin": {
+            "Omegac": 60.0, 
+            "Xic0": 60.0, 
+            "default": 80.0
+        }, 
+        "D_VCHI2DOF": 6.0, 
+        "ElectronPIDe": 3.0, 
+        "ElectronPT": 300.0, 
+        "GEC_nLongTrk": 250, 
+        "HLT1": "HLT_PASS_RE('Hlt1.*Decision')", 
+        "HLT2": "HLT_PASS_RE('Hlt2.*Decision')", 
+        "HadronIPCHI2": 4.0, 
+        "HadronP": 2000.0, 
+        "HadronPT": 250.0, 
+        "KaonP": 2000.0, 
+        "KaonPIDK": -2.0, 
+        "Monitor": False, 
+        "MuonIPCHI2": 9.0, 
+        "MuonP": 6000.0, 
+        "MuonPIDmu": 0.0, 
+        "MuonPT": 1000.0, 
+        "PionPIDK": 10.0, 
+        "ProtonP": 8000.0, 
+        "ProtonPIDp": 0.0, 
+        "ProtonPIDpK": 0.0, 
+        "TRCHI2": 3.0, 
+        "TRGHOSTPROB": 0.35, 
+        "TTSpecs": {}, 
+        "UseNoPIDsInputs": False, 
+        "prescaleFakes": 0.05, 
+        "prescales": 1
+    }, 
+    "STREAMS": [ "Semileptonic" ], 
+    "WGs": [ "Semileptonic" ]
+}
+
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/__init__.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/__init__.py
new file mode 100644
index 000000000..9d7e15838
--- /dev/null
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/__init__.py
@@ -0,0 +1,21 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__all__ = ['LineConfigDictionaries_B2OC',
+           'LineConfigDictionaries_B2CC',
+           'LineConfigDictionaries_Semileptonic',
+           'LineConfigDictionaries_RD',
+           'LineConfigDictionaries_Charmless',
+           'LineConfigDictionaries_Calib',
+           'LineConfigDictionaries_Charm',
+           'LineConfigDictionaries_QEE',
+           'LineConfigDictionaries_BandQ',
+           'LineConfigDictionaries_IFT'
+           ]
-- 
GitLab


From 1822e11645a8777009393cde11c0c623e907e126 Mon Sep 17 00:00:00 2001
From: Marian Stahl <marian.stahl@cern.ch>
Date: Mon, 23 Aug 2021 08:48:10 +0000
Subject: [PATCH 02/22] [StrippingXbToLambdaKmX] use 2016 BDTs

---
 .../StrippingBandQ/StrippingXbToLambdaKmX.py                    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingXbToLambdaKmX.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingXbToLambdaKmX.py
index 6a2eba60b..d00c82376 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingXbToLambdaKmX.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingXbToLambdaKmX.py
@@ -73,7 +73,7 @@ default_config = {
       "D"  : OrderedDict({"K":1, "pi1":2, "pi2":3}),
       "Ds" : OrderedDict({"Kp":1, "Km":2, "pi":3}),
     },
-    "dfb_weights_path" : "$TMVAWEIGHTSROOT/data/DfromB/{}Pi_2018_GBDT.weights.xml",
+    "dfb_weights_path" : "$TMVAWEIGHTSROOT/data/DfromB/{}Pi_2016_GBDT.weights.xml",
     "b_decays" : {
       "Xib2LKD0" : {
         "LL" : {
-- 
GitLab


From 7fa242e4ef7e7e661821f2474d02abad9079a6c4 Mon Sep 17 00:00:00 2001
From: Hanae Tilquin <hanae.tilquin@cern.ch>
Date: Fri, 27 Aug 2021 17:39:53 +0200
Subject: [PATCH 03/22] Removed vertex cuts

---
 .../StrippingRD/StrippingB2XTauTauMuonic.py           | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingB2XTauTauMuonic.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingB2XTauTauMuonic.py
index 02eb22de6..00bf2848f 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingB2XTauTauMuonic.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingB2XTauTauMuonic.py
@@ -19,7 +19,7 @@ Same-sign combinations are included.
 
 __author__ = 'H. Tilquin'
 __date__ = '03/06/2021'
-__version__ = '$Revision: 0.1 $'
+__version__ = '$Revision: 0.2 $'
 
 __all__ = ('B2XTauTauMuonicConf', 'default_config')
 
@@ -40,9 +40,6 @@ default_config = {
             "Bs_Comb_MassHigh": 7000.0,
             "Bd_Comb_MassHigh": 6500.0,
             "Lb_Comb_MassHigh": 7500.0,
-            "Bs_VertDist": -24,
-            "Bd_VertDist": -5,
-            "Lb_VertDist": -25,
             "B_DIRA": 0.999,
             "Lb_DIRA": 0.999,
             "Bs_VertexCHI2": 150.0,
@@ -104,14 +101,14 @@ class B2XTauTauMuonicConf(LineBuilder):
         LineBuilder.__init__(self, name, config)
         self.name = name
 
-        self.BsCombCut = "(AM < %(Bs_Comb_MassHigh)s * MeV) & (ACHILD(VFASPF(VZ), 2) - ACHILD(VFASPF(VZ), 1) > %(Bs_VertDist)s * mm)" % config
+        self.BsCombCut = "(AM < %(Bs_Comb_MassHigh)s * MeV)" % config
         self.Bs_for_B2KstarKstarCombCut = "(AM < %(Bs_Comb_MassHigh)s * MeV)" % config
         self.BsCut = "(BPVDIRA > %(B_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(Bs_VertexCHI2)s)" % config
 
-        self.BdCombCut = "(AM < %(Bd_Comb_MassHigh)s * MeV) & (ACHILD(VFASPF(VZ), 2) - ACHILD(VFASPF(VZ), 1) > %(Bd_VertDist)s * mm)" % config
+        self.BdCombCut = "(AM < %(Bd_Comb_MassHigh)s * MeV)" % config
         self.BdCut = "(BPVDIRA > %(B_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(B0_VertexCHI2)s)" % config
 
-        self.LambdaBCombCut = "(AM < %(Lb_Comb_MassHigh)s * MeV) & (ACHILD(VFASPF(VZ), 2) - ACHILD(VFASPF(VZ), 1) > %(Lb_VertDist)s * mm)" % config
+        self.LambdaBCombCut = "(AM < %(Lb_Comb_MassHigh)s * MeV)" % config
         self.LambdaBCut = "(BPVDIRA> %(Lb_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(Lb_VertexCHI2)s)" % config
 
         DaughterCuts = "(BPVDIRA> %(Dau_DIRA)s)" % config
-- 
GitLab


From daff32b965532898c6af569b0a672d21799b4155 Mon Sep 17 00:00:00 2001
From: Francesco Polci <francesco.polci@cern.ch>
Date: Thu, 2 Sep 2021 16:33:46 +0200
Subject: [PATCH 04/22] Adding B2KstTauE and B2KstTauE_SameSign to
 StrippingB2KstTauTau.py

---
 .../StrippingRD/StrippingB2KstTauTau.py       | 310 +++++++++++++++++-
 1 file changed, 307 insertions(+), 3 deletions(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingB2KstTauTau.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingB2KstTauTau.py
index 67f109c62..5752d3ad4 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingB2KstTauTau.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingB2KstTauTau.py
@@ -8,7 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-__author__ = [' G. Mancinelli, J. Serrano']
+__author__ = [' G. Mancinelli, J. Serrano, F. Polci, T. Fulghesu']
 __date__ = '15/08/2014'
 __version__ = '$Revision: 0.1 $'
 # Stripping line for B->K*tautau
@@ -17,7 +17,7 @@ from GaudiKernel.SystemOfUnits import MeV
 from GaudiKernel.SystemOfUnits import mm
 
 """
-  B->K*TauTau, B->K*TauMu
+  B->K*TauTau, B->K*TauMu, B->K*TauE
   """
 __all__ = (
   'B2KstTauXConf'
@@ -31,7 +31,10 @@ default_config =  {
   'CONFIG'                        : {
   'SpdMult'                       : '600',
   'PT_MU'                         : '1000', # MeV
+  'PT_e'                          : '1000', # MeV
   'TRACKCHI2_MU'                  : '4',    # dimensionless
+  'TRACKCHI2_e'                   : '4',    # dimensionless
+  'ProbNN_e'                      : '0.05',
   #
   'FD_B_Max_KTM'                  : '70',
   'FD_B_Max_KTT'                  : '40',
@@ -39,8 +42,10 @@ default_config =  {
   'PT_B_KTT'                      : 3000 * MeV,
   'VCHI2_B'                       : '100', # dimensionless
   'VCHI2_B_Mu'                    : '150', # dimensionless
+  'VCHI2_B_E'                     : '150', # dimensionless
   'FDCHI2_B'                      : '80',
   'FD_B_Mu'                       : '3',
+  'FD_B_E'                        : '3',
   'MASS_LOW_B'                    : 2000 * MeV,  
   'MASS_HIGH_B'                   : 10000 * MeV,
   #
@@ -72,14 +77,19 @@ default_config =  {
   'MINIPCHI2_KST_KMM'	          : '3', #'9',
   'FDCHI2OWNPV_KST_KMM'	          : '120',
   'MINIPCHI2_MU_KMM'	          : '4', #'16',
+  'MINIPCHI2_e_KMM'	          : '4', #'16',
   'B_COSDIRA_KMM'  	          : '0.999',
   'VCHI2_B_Mu_KMM'                : '100', # dimensionless
+  'VCHI2_B_e_KMM'                : '100', # dimensionless
   'FD_B_Mu_KMM'                   : '3',
+  'FD_B_e_KMM'                   : '3',
   'FD_Kst_Mu_KMM'                 : '3',
+  'FD_Kst_e_KMM'                 : '3',
   'MASS_LOW_B_KMM'                : 1500 * MeV,  
   'MASS_HIGH_B_KMM'               : 10000 * MeV,  
   'PT_B_KMM'                      : 2000 * MeV,
   'PT_MU_KMM'                     : '800', #MeV,
+  'PT_e_KMM'                     : '800', #MeV,
   #
   'PT_HAD_ALL_FINAL_STATE'        : '250',  # MeV
   'P_HAD_ALL_FINAL_STATE'         : '2000', # MeV
@@ -91,10 +101,14 @@ default_config =  {
   'B2KstTauTau_LinePostscale'              : 1,
   'B2KstTauMu_LinePrescale'                : 1,
   'B2KstTauMu_LinePostscale'               : 1,
+  'B2KstTauE_LinePrescale'                : 1,
+  'B2KstTauE_LinePostscale'               : 1,
   'B2KstTauTau_SameSign_LinePrescale'      : 1,
   'B2KstTauTau_SameSign_LinePostscale'     : 1,
   'B2KstTauMu_SameSign_LinePrescale'       : 0.5,
   'B2KstTauMu_SameSign_LinePostscale'      : 1,
+  'B2KstTauE_SameSign_LinePrescale'       : 0.5,
+  'B2KstTauE_SameSign_LinePostscale'      : 1,
   'B2KstMuMu_LinePrescale'                 : 1,
   'B2KstMuMu_LinePostscale'                : 1,
   'B2KstMuMu_SameSign_LinePrescale'        : 1,
@@ -152,6 +166,7 @@ from PhysSelPython.Wrappers import Selection, DataOnDemand
 from StrippingConf.StrippingLine import StrippingLine
 from StrippingUtils.Utils import LineBuilder
 from StandardParticles import StdTightMuons
+from StandardParticles import StdTightElectrons
 from StandardParticles import StdLoosePions
 from StandardParticles import StdLooseKaons
 from StandardParticles import StdNoPIDsKaons
@@ -160,13 +175,15 @@ from StandardParticles import StdNoPIDsKaons
 class B2KstTauXConf(LineBuilder) :
   
   """
-    Builder for B->K*TauTau, B->K*TauMu
+    Builder for B->K*TauTau, B->K*TauMu, B->K*TauE
     """
 
   TauTau_Line    = None
   TauTau_SS_Line = None
   TauMu_Line     = None
   TauMu_SS_Line  = None
+  TauE_Line     = None
+  TauE_SS_Line  = None
   DDSL_Line    = None
   MuMu_Line     = None
   MuMu_SS_Line  = None
@@ -193,6 +210,9 @@ class B2KstTauXConf(LineBuilder) :
     
     rawTau          = DataOnDemand("Phys/StdTightDetachedTau3pi/Particles")
 
+    selElectrons        = self._makeElectrons(      name    = "ElectronsFor"+name,
+                                                    config  = config)
+
     selPionsForD        = self._makePionsForD(      name    = "PionsDFor"+name, 
                                       config  = config)
     selKaonsForD        = self._makeKaonsForD(      name    = "KaonsDFor"+name, 
@@ -223,12 +243,24 @@ class B2KstTauXConf(LineBuilder) :
                                          KstarSel  = selKstar, 
                                          config  = config)
     
+    selB2KstTauE    = self._makeB2XE(  name    = name,
+                                       tauSel  = rawTau,
+                                       electronSel = selElectrons, 
+                                       KstarSel  = selKstar, 
+                                       config  = config)
+    
     selB2KstTauMuSS = self._makeB2XMuSS(name    = name,
                                         tauSel  = rawTau,
                                         muonSel = selMuons,
                                         KstarSel  = selKstar, 
                                         config  = config)
 
+    selB2KstTauESS = self._makeB2XESS(name    = name,
+                                      tauSel  = rawTau,
+                                      electronSel = selElectrons, 
+                                      KstarSel  = selKstar, 
+                                      config  = config)
+
     selB2KstMuMu    = self._makeB2XMuMu(  name    = name+"twoMuons",
                                          muonSel_KMM = selMuons_KMM,
                                          KstarSel_KMM  = selKstar_KMM, 
@@ -533,6 +565,222 @@ class B2KstTauXConf(LineBuilder) :
                                         )
 
 
+    self.TauE_Line     = StrippingLine(name+"_TauE_Line",
+                                         #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                         prescale    = config['B2KstTauE_LinePrescale'],
+                                         postscale   = config['B2KstTauE_LinePostscale'],
+                                         MDSTFlag = False,
+                                         FILTER = self.FilterSPD,
+                                         #RelatedInfoTools = config['RelatedInfoTools'],
+                                         RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT",   "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso",              "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ e-]CC" : "KstarVars_VertexIsoInfo_0",
+                                                                    "[Beauty ->  X0 ^tau+ e-]CC" : "TauVars_VertexIsoInfo_0"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",               
+                                                                "ConeSize" : 0.5,
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ e-]CC" : "KstarVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> X0 ^tau+  e-]CC" : "TauVars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e-]CC" : "Pi1Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e-]CC" : "Pi2Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e-]CC" : "Pi3Vars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ e-]CC" : "KVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e-]CC" : "PiVars_ConeIsoInfo_0",
+                                                                },
+                                                  },
+
+                                                    {'Type'             : 'RelInfoVertexIsolationBDT',
+                                                     'Location'         : 'VertexIsoBDTInfo',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ e-]CC" : "KstarVars_VertexIsoBDTInfo",
+                                                                    "[Beauty -> X0 ^tau+  e-]CC" : "TauVars_VertexIsoBDTInfo_0",
+                                                    }
+                                                   },
+                                                    {'Type'             : 'RelInfoConeVariables',
+                                                     'ConeAngle'        : 0.5,
+                                                     'Location'         : 'ConeVarsInfo05',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ e-]CC" : "KstarVars_ConeVarsInfo",
+                                                                    "[Beauty -> X0 ^tau+  e-]CC" : "TauVars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e-]CC" : "Pi1Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e-]CC" : "Pi2Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e-]CC" : "Pi3Vars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC tau+ e-]CC" : "KVars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e-]CC" : "PiVars_ConeVarsInfo_0",
+                                                                }},
+                                                    {'Type'             : 'RelInfoTrackIsolationBDT',
+                                                     'Variables' : 2,
+                                                     'WeightsFile'  :  'BsMuMu_TrackIsolationBDT9vars_v1r4.xml',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  e-]CC" : "TauVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e-]CC" : "Pi1Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e-]CC" : "Pi2Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e-]CC" : "Pi3Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ e-]CC" : "KVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e-]CC" : "PiVars_TrackIsoBDTInfo_0",
+                                                  }},
+                                                    {'Type'             : 'RelInfoBs2MuMuTrackIsolations',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  e-]CC" : "TauVars_TrackIsoBsMMInfo_0",
+                                                  },
+                                                     'tracktype'        : 3,
+                                                     'angle'            : 0.27,
+                                                     'fc'               : 0.60,
+                                                     'doca_iso'         : 0.13,
+                                                     'ips'              : 3.0,
+                                                     'svdis'            : -0.15,
+                                                     'svdis_h'          : 30.,
+                                                     'pvdis'            : 0.5,
+                                                     'pvdis_h'          : 40.,
+                                                     'makeTrackCuts'    : False,
+                                                     'IsoTwoBody'       : False},
+
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 1.0,
+                                     'Location'          : 'ConeVarsInfo10'
+                                     },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                    'ConeAngle'         : 1.5,
+                                     'Location'          : 'ConeVarsInfo15'
+                                    },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 2.0,
+                                     'Location'          : 'ConeVarsInfo20'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.0,
+                                     'Location'          : 'ConeIsoInfo10'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.5,
+                                     'Location'          : 'ConeIsoInfo15'
+                                            },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 2.0,
+                                     'Location'          : 'ConeIsoInfo20'
+                                    },
+
+                                                  
+                                                  ],
+                                         selection   = selB2KstTauE,
+                                         MaxCandidates = 30 
+                                         )
+   
+    self.TauE_SS_Line  = StrippingLine(name+"_TauE_SameSign_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2KstTauE_SameSign_LinePrescale'],
+                                        postscale   = config['B2KstTauE_SameSign_LinePostscale'],
+                                        MDSTFlag = False,
+                                        FILTER = self.FilterSPD,
+                                        #RelatedInfoTools = config['RelatedInfoTools'],
+                                        RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT",   "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso",              "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ e+]CC" : "KstarVars_VertexIsoInfo",
+                                                                    "[Beauty ->  X0 ^tau+ e+]CC" : "TauVars_VertexIsoInfo_0"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",               
+                                                                "ConeSize" : 0.5,
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ e+]CC" : "KstarVars_ConeIsoInfo",
+                                                                    "[Beauty -> X0 ^tau+  e+]CC" : "TauVars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e+]CC" : "Pi1Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e+]CC" : "Pi2Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e+]CC" : "Pi3Vars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ e+]CC" : "KVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e+]CC" : "PiVars_ConeIsoInfo_0",
+                                                                }
+                                                  },
+                                          
+                                                    {'Type'             : 'RelInfoVertexIsolationBDT',
+                                                     'Location'         : 'VertexIsoBDTInfo',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ e+]CC" : "KstarVars_VertexIsoBDTInfo",
+                                                                    "[Beauty -> X0 ^tau+  e+]CC" : "TauVars_VertexIsoBDTInfo_0",
+                                                    }
+                                                   },
+                                                   {'Type'             : 'RelInfoConeVariables',
+                                                     'ConeAngle'        : 0.5,
+                                                    'Location'         : 'ConeVarsInfo05',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ e+]CC" : "KstarVars_ConeVarsInfo",
+                                                                    "[Beauty -> X0 ^tau+  e+]CC" : "TauVars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e+]CC" : "Pi1Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e+]CC" : "Pi2Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e+]CC" : "Pi3Vars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ e+]CC" : "KVars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e+]CC" : "PiVars_ConeVarsInfo_0",
+                                                                }},
+                                                    {'Type'             : 'RelInfoTrackIsolationBDT',
+                                                     'Variables' : 2,
+                                                     'WeightsFile'  :  'BsMuMu_TrackIsolationBDT9vars_v1r4.xml',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  e+]CC" : "TauVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e+]CC" : "Pi1Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e+]CC" : "Pi2Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e+]CC" : "Pi3Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ e+]CC" : "KVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e+]CC" : "PiVars_TrackIsoBDTInfo_0",
+                                                  }},
+                                                   {'Type'             : 'RelInfoBs2MuMuTrackIsolations',
+                                                    'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  e+]CC" : "TauVars_TrackIsoBsMMInfo_0",
+                                                  },
+                                                     'tracktype'        : 3,
+                                                     'angle'            : 0.27,
+                                                     'fc'               : 0.60,
+                                                     'doca_iso'         : 0.13,
+                                                     'ips'              : 3.0,
+                                                     'svdis'            : -0.15,
+                                                     'svdis_h'          : 30.,
+                                                     'pvdis'            : 0.5,
+                                                     'pvdis_h'          : 40.,
+                                                     'makeTrackCuts'    : False,
+                                                     'IsoTwoBody'       : False},
+                                  {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 1.0,
+                                     'Location'          : 'ConeVarsInfo10'
+                                     },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                    'ConeAngle'         : 1.5,
+                                     'Location'          : 'ConeVarsInfo15'
+                                    },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 2.0,
+                                     'Location'          : 'ConeVarsInfo20'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.0,
+                                     'Location'          : 'ConeIsoInfo10'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.5,
+                                     'Location'          : 'ConeIsoInfo15'
+                                            },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 2.0,
+                                     'Location'          : 'ConeIsoInfo20'
+                                    },
+
+                                                  ],
+                                        selection   = selB2KstTauESS,
+                                        MaxCandidates = 30 
+                                        )
+
+
+
     self.MuMu_Line     = StrippingLine(name+"_MuMu_Line",
                                         #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
                                         prescale    = config['B2KstMuMu_LinePrescale'],
@@ -629,9 +877,11 @@ class B2KstTauXConf(LineBuilder) :
 
     self.registerLine( self.TauTau_Line )
     self.registerLine( self.TauMu_Line )
+    self.registerLine( self.TauE_Line )
     self.registerLine( self.MuMu_Line )
     self.registerLine( self.TauTau_SS_Line )
     self.registerLine( self.TauMu_SS_Line )
+    self.registerLine( self.TauE_SS_Line )
     self.registerLine( self.MuMu_SS_Line )
     self.registerLine( self.DDSL_Line )
   
@@ -750,6 +1000,45 @@ class B2KstTauXConf(LineBuilder) :
                       RequiredSelections = [ tauSel, muonSel, KstarSel ] ))
 
 
+
+
+  #####################################################
+  def _makeB2XE(self, name, tauSel,  electronSel, KstarSel, config):
+  
+
+     _CombineTau = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 tau+ e-]cc","[B0 -> K*(892)0 tau- e+]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = " in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" %config,
+                   MotherCut = "( VFASPF(VCHI2) < %(VCHI2_B_E)s )"\
+                               "& ( BPVVD         > %(FD_B_E)s )"\
+                               "& ( BPVVD         < %(FD_B_Max_KTM)s )" %config
+                   )
+
+     return (Selection(name+"_TauE",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel, electronSel, KstarSel ] ))
+  
+    
+  #####################################################
+  def _makeB2XESS(self, name, tauSel, electronSel, KstarSel,config):
+        
+
+     _CombineTau = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 tau+ e+]cc","[B0 -> K*(892)0 tau- e-]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = "in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" %config,
+                   MotherCut = " ( VFASPF(VCHI2) < %(VCHI2_B_E)s )"\
+                               "& ( BPVVD         > %(FD_B_E)s )"\
+                               "& ( BPVVD         < %(FD_B_Max_KTM)s )" %config
+                   )
+    
+     return (Selection(name+"_TauESS",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel, electronSel, KstarSel ] ))
+
+
+
   #####################################################
   def _makeB2DXMu(self, name, DSel,  muonSel, KstarSel, config):
     
@@ -895,6 +1184,21 @@ class B2KstTauXConf(LineBuilder) :
                       RequiredSelections = [StdLoosePions,StdNoPIDsKaons]
                       )
 
+  #####################################################
+  def _makeElectrons(self, name, config) :
+    """
+    Electrons selection
+    """
+
+    _code =     "(PT > "        + config['PT_e']          + "*MeV) & "\
+                "(TRCHI2DOF < " + config['TRACKCHI2_e']   + ") & "\
+                "(PROBNNe < " + config['ProbNN_e']   + ")"
+    
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdTightElectrons ] )
 
   #####################################################
   def _makeMuons(self, name, config) :
-- 
GitLab


From 3e3d64817fd0479b33dd4c997e11f0616b520ae9 Mon Sep 17 00:00:00 2001
From: Shunan Zhang <shunan.zhang@cern.ch>
Date: Thu, 9 Sep 2021 04:49:14 +0200
Subject: [PATCH 05/22] B2OC Stripping Settings for S28r2p1

---
 .../LineConfigDictionaries_B2OC.py            | 22 +++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2OC.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2OC.py
index b7d0e91a1..80ab30f64 100644
--- a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2OC.py
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2OC.py
@@ -9,7 +9,7 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 #########################################################################################################
-##                          S T R I P P I N G  3 4 r 0 p 2                                             ##
+##                          S T R I P P I N G  2 8 r 2 p 1                                             ##
 ##                                                                                                     ##
 ##  Configuration for B2OC WG                                                                          ##
 ##  Contact person: Shunan Zhang (shunan.zhang@cern.ch)                                                ##
@@ -556,7 +556,25 @@ Beauty2Charm = {
             'StrippingXib02D0LambdaPiPiDDD02KPiBeauty2CharmLine',
             'StrippingXib02D0LambdaPiPiDDD02K3PiBeauty2CharmLine',
             'StrippingXib2LcKHHHLc2PKPiBeauty2CharmLine',
-            'StrippingXib2XicHHHHXic2PKPiBeauty2CharmLine'
+            'StrippingXib2XicHHHHXic2PKPiBeauty2CharmLine',
+
+            'StrippingLb2D0pKD02K3PiBeauty2CharmLine',
+            'StrippingLb2DD0pD2HHHD02K3PiBeauty2CharmLine',
+            'StrippingLb2DD0pD2HHHD2HHBeauty2CharmLine',
+
+            'StrippingLb2LcPiLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiLc2PPiPiBeauty2CharmLine',
+            'StrippingLb2LcPiWSLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiWSLc2PPiPiBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiLc2PPiPiBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiWSLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiWSLc2PPiPiBeauty2CharmLine',
+
+            'StrippingLb2D0pKD02KsDDHHBeauty2CharmLine',
+            'StrippingLb2D0pKD02KsLLHHBeauty2CharmLine',
+            'StrippingLb2D0pPiD02KsDDHHBeauty2CharmLine',
+            'StrippingLb2D0pPiD02KsLLHHBeauty2CharmLine'
         ]
     },
     'WGs': ['B2OC']
-- 
GitLab


From 1362fd0a69cc31b43131d11ddeb545f53713ef99 Mon Sep 17 00:00:00 2001
From: Jie Wu <j.wu@cern.ch>
Date: Fri, 10 Sep 2021 03:48:33 +0200
Subject: [PATCH 06/22] S28r2p1 B2CC with 2 lineBuilders(JpsiHH and Jpsi_betaS)

---
 .../StrippingB2CC/__init__.py                 |  4 +-
 .../LineConfigDictionaries_B2CC.py            | 86 -------------------
 2 files changed, 2 insertions(+), 88 deletions(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2CC/__init__.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2CC/__init__.py
index 359b9e595..fb134e749 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2CC/__init__.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2CC/__init__.py
@@ -9,8 +9,8 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
-#_selections = ('StrippingB2JpsiHH', 'StrippingB2JpsiXforBeta_s')
-_selections = ('StrippingB2JpsiHH','StrippingB2JpsiXforBeta_s', 'StrippingBd2JpsieeKSFullDST', 'StrippingBd2JpsieeKS')
+_selections = ('StrippingB2JpsiHH', 'StrippingB2JpsiXforBeta_s')
+#_selections = ('StrippingB2JpsiHH','StrippingB2JpsiXforBeta_s', 'StrippingBd2JpsieeKSFullDST', 'StrippingBd2JpsieeKS')
 
 for _sel in _selections :
     try :
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py
index 05e5c6ed6..a1b1a1c31 100644
--- a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py
@@ -127,92 +127,6 @@ BetaS = {
     "WGs": [ "B2CC" ]
 }
 
-#############################################################################################
-## Dimuon (FullDST) :
-##    StrippingBd2JpsieeKSFullDSTBd2JpsieeKSFullDSTDetachedLine
-## ----------------------------------------------------------------------------
-## Lines defined in StrippingBd2JpsieeKSFullDST.py
-## Authors: Gerwin Meier
-## Last changes made by Gerwin Meier
-#############################################################################################
-
-Bd2JpsieeKSFullDST = {
-    "BUILDERTYPE": "Bd2JpsieeKSFullDSTConf",
-    "CONFIG": {
-        "B0_BPV_DIRA": 0.995,
-        "B0_BPV_IP": 1.0,
-        "B0_DOCA": 3.0,
-        "B0_DOCA_chi2": 13.0,
-        "BM_DTF_Jpsi_Const_max": 5900.0,
-        "BM_DTF_Jpsi_Const_min": 4600.0,
-        "BPVLTIME": 0.2,
-        "BdMassMax": 6000.0,
-        "BdMassMin": 4400.0,
-        "BdVertexCHI2pDOF": 6.0,
-        "EProbNNe": 0.01,
-        "ElectronPID": 0.0,
-        "ElectronPT": 500.0,
-        "ElectronTrackCHI2pDOF": 5.0,
-        "JpsiMassMax": 3300.0,
-        "JpsiMassMin": 2300.0,
-        "JpsiVertexCHI2pDOF": 13.0,
-        "KSBPVDLS": 5.0,
-        "KSMassMax": 535.0,
-        "KSMassMin": 460.0,
-        "KSTau": 1.0,
-        "KSVCHI2": 20.0,
-        "TRCHI2DOF": 3.0
-    },
-    "STREAMS": {
-        "Dimuon": [ "StrippingBd2JpsieeKSFullDSTBd2JpsieeKSFullDSTDetachedLine" ]
-    },
-    "WGs": [ "B2CC" ]
-}
-
-#############################################################################################
-## Dimuon (FullDST) :
-##    StrippingBd2JpsieeKSBu2JpsieeKFromTracksDetachedLine
-## Leptonic (MicroDST) :
-##    StrippingBd2JpsieeKSBd2JpsieeKSFromTracksPrescaledLine
-##    StrippingBd2JpsieeKSBd2JpsieeKSFromTracksDetachedLine
-##    StrippingBd2JpsieeKSBd2JpsieeKSDetachedLine
-## ----------------------------------------------------------------------------
-## Lines defined in StrippingBd2JpsieeKS.py
-## Authors: Ramon Niet
-## Last changes made by Gerwin Meier
-#############################################################################################
-Bd2JpsieeKS = {
-    "BUILDERTYPE": "Bd2JpsieeKSConf",
-    "CONFIG": {
-        "BPVLTIME": 0.2,
-        "BdMassMax": 6000.0,
-        "BdMassMin": 4400.0,
-        "BdVertexCHI2pDOF": 7.0,
-        "ElectronPID": 0.0,
-        "ElectronPT": 500.0,
-        "ElectronTrackCHI2pDOF": 5.0,
-        "JpsiMassMax": 3300.0,
-        "JpsiMassMin": 2300.0,
-        "JpsiVertexCHI2pDOF": 15.0,
-        "KSBPVDLS": 5.0,
-        "KSVCHI2": 20.0,
-        "KaonPID": 0.0,
-        "KplusIP": 9.0,
-        "KplusPT": 800.0,
-        "Prescale": 0.1,
-        "TRCHI2DOF": 3.0
-    },
-    "STREAMS": {
-        "Dimuon": [ "StrippingBd2JpsieeKSBu2JpsieeKFromTracksDetachedLine" ],
-        "Leptonic": [
-            "StrippingBd2JpsieeKSBd2JpsieeKSFromTracksPrescaledLine",
-            "StrippingBd2JpsieeKSBd2JpsieeKSFromTracksDetachedLine",
-            "StrippingBd2JpsieeKSBd2JpsieeKSDetachedLine"
-        ]
-    },
-    "WGs": [ "B2CC" ]
-}
-
 
 
 
-- 
GitLab


From 09bb17df35a0db62cf79d2b45df40c0fdd6c5a03 Mon Sep 17 00:00:00 2001
From: Ziyi Wang <wangziyi181@mails.ucas.ac.cn>
Date: Fri, 10 Sep 2021 12:20:46 +0800
Subject: [PATCH 07/22] update XiccSL line

---
 .../StrippingCharm/StrippingXiccSL.py         | 63 +++++++++++++++----
 1 file changed, 51 insertions(+), 12 deletions(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingCharm/StrippingXiccSL.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingCharm/StrippingXiccSL.py
index e2ed08fd5..ff0a26899 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingCharm/StrippingXiccSL.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingCharm/StrippingXiccSL.py
@@ -28,12 +28,13 @@ Based on original stripping code done by Patrick Spradlin and Mat Charles and Xi
 
 2017: part of Charm stream, went to MDST
 2018: switched to CharmCompleteEvent, went to DST
+2016: Add Xicc++ -> Lc+ pi+ NC channel 
 '''
 
 
 __author__ = ['Xiao-Rui Lyu', 'Miroslav Saur', 'Ziyi Wang']
-__date__ = '2021/06/21'
-__version__ = '$Revision: 0.2 $'
+__date__ = '2021/09/02'
+__version__ = '$Revision: 0.3 $'
 __all__ = ('StrippingXiccSL'
            ,'default_config')
 
@@ -41,7 +42,7 @@ __all__ = ('StrippingXiccSL'
 from Gaudi.Configuration import *
 from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
 from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons
-from StandardParticles import  StdAllLoosePions, StdAllLooseKaons, StdLooseMuons, StdAllLooseProtons
+from StandardParticles import  StdAllLoosePions, StdAllLooseKaons, StdLooseMuons, StdAllLooseProtons, StdAllLooseMuons, StdAllVeryLooseMuons
 from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
 from PhysSelPython.Wrappers import MultiSelectionSequence
 from StrippingConf.StrippingLine import StrippingLine
@@ -60,13 +61,12 @@ default_config={
       'STREAMS'     : ['CharmCompleteEvent'],
       'CONFIG'      : {
         'LcHlt2TisTosSpec' : { 'Hlt2CharmHadLcpToPpKmPip.*Decision%TOS' : 0, 'Hlt2Global%TIS' : 0 }
-        , 'controlPrescaleLc'           : 0.05
-        , 'controlPrescaleXic'          : 0.05
         , 'signalPrescaleViaLc'         : 1.0
         , 'signalPrescaleViaXicp'       : 1.0
         , 'signalPrescaleViaXicz'       : 1.0
-        , 'signalPrescaleViaOmegaz'     : 0.5
-        , 'controlPrescaleViaOmegaczPi' : 0.03
+        , 'signalPrescaleViaOmegaz'     : 0.2
+        , 'controlPrescaleViaLcPi'      : 0.2
+        , 'controlPrescaleViaOmegaczPi' : 0.05
         , 'controlPrescaleViaXiczPi'    : 0.05
         , 'signalPrescaleViaLcWS'       : 0.5
         , 'TRCHI2DOFMax'            :   3.0
@@ -83,7 +83,7 @@ default_config={
         , 'TRCHI2'                  :   3.0
         , 'MuonP'                   :   6.0*GeV
         , 'MuonPT'                  :  1000*MeV
-        , 'MuonIPCHI2'              :   5.0 
+        , 'MuonIPCHI2'              :   0.0 
         , 'MuonPIDmu'               :   0.0
         , 'GhostProb'               :   0.35
         , 'Lc_Daug_TRCHI2DOF_Max'   :   5.0
@@ -105,11 +105,11 @@ default_config={
         , 'Xicplus_BPVVDCHI2_Min'   :  25.0
         , 'Xicplus_BPVDIRA_Min'     :   0.99
         , 'Xic0_ADAMASS_HalfWin'    : 170.0*MeV
-        , 'Xic0_ADMASS_HalfWin'     : 120.0*MeV
+        , 'Xic0_ADMASS_HalfWin'     :  50.0*MeV
         , 'Xic0_BPVVDCHI2_Min'      :  25.0
         , 'Xic0_BPVDIRA_Min'        :   0.9
         , 'Omegac0_ADAMASS_HalfWin' : 170.0*MeV
-        , 'Omegac0_ADMASS_HalfWin'  : 120.0*MeV
+        , 'Omegac0_ADMASS_HalfWin'  :  50.0*MeV
         , 'Omegac0_4Dau_VCHI2_Max'  :  60.0
         , 'Omegac0_BPVVDCHI2_Min'   :  25.0
         , 'Omegac0_BPVDIRA_Min'     :   0.9
@@ -162,7 +162,7 @@ class StrippingXiccSL(LineBuilder) :
 
             # Loose Muons
             self.LooseMuonsList = MergedSelection("LooseMuonsFor" + self.name,
-                    RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseMuons/Particles")])
+                    RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllVeryLooseMuons/Particles")])
 
             # Good tracks - All Loose Protons
             self.GoodAllLooseProtonsList = self.createSubSel( OutputList = "GoodAllLooseProtonsFor" + self.name,
@@ -417,6 +417,23 @@ class StrippingXiccSL(LineBuilder) :
                     EnableFlavourTagging = False,
                     RelatedInfoTools = self._getRelInfoXiccpD4BodyWS())
             self.registerLine (Xicc2XicZeroMuNuWSLine)
+            
+            ''' ---------------------- '''
+            ''' Normalization channels '''
+            ''' ---------------------- '''
+            ''' NC Stripping Xi_cc++ -> Lambda_c+ pi+ '''
+            Xicc2LambdacNC = self.createCombinationSel(OutputList = "Xicc2LambdacNC" + self.name,
+                    DecayDescriptor = "[Xi_cc++ -> Lambda_c+ pi+]cc",
+                    DaughterLists   = [self.LambdacList, self.GoodAllLoosePionsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2
+                    )
+            Xicc2LambdacNCLine = StrippingLine( self.name + "Xicc2LambdacNCLine", 
+                    prescale = self.config['controlPrescaleViaLcPi'],
+                    algos = [ Xicc2LambdacNC ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoXiccppD3BodyPi())
+            self.registerLine (Xicc2LambdacNCLine)
         ##  --------------------  end of makeXicc  ------------
         #------------------------------------------------------------------------------------------
 
@@ -642,6 +659,29 @@ class StrippingXiccSL(LineBuilder) :
                        "[Xi_cc++ -> ^(Charm -> p+ X- X+) mu-]CC" : 'VertexIsoInfo_CC'} } ]                        
             return relInfo 
 
+        def _getRelInfoXiccppD3BodyPi(self):
+            relInfo = []
+            for coneAngle in [0.8,1.0,1.3,1.5,1.7,2.0]:
+                conestr = str(coneAngle).replace('.','')
+                relInfo += [ { "Type"          : "RelInfoConeVariables",
+                  "ConeAngle"    : coneAngle,
+                  "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                  "IgnoreUnmatchedDescriptors" : True,
+                  "DaughterLocations" : {
+                       "^[Xi_cc++ -> (Charm -> p+ X- X+) pi+]CC" : 'P2ConeVar%s_DCB' % conestr,
+                       "[Xi_cc++ -> ^(Charm -> p+ X- X+) pi+]CC" : 'P2ConeVar%s_CB'  % conestr,
+                       "[Xi_cc++ -> (Charm -> ^p+ X- X+) pi+]CC" : 'P2ConeVar%s_P'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ ^X- X+) pi+]CC" : 'P2ConeVar%s_1'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ X- ^X+) pi+]CC" : 'P2ConeVar%s_2'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ X- X+) ^pi+]CC" : 'P2ConeVar%s_Mu'  % conestr } }
+                           ]
+            relInfo += [ { "Type" : "RelInfoVertexIsolation",
+                   "IgnoreUnmatchedDescriptors" : True,
+                   "DaughterLocations" : {
+                       "^[Xi_cc++ -> (Charm -> p+ X- X+) pi+]CC" : 'VertexIsoInfo_DCB',
+                       "[Xi_cc++ -> ^(Charm -> p+ X- X+) pi+]CC" : 'VertexIsoInfo_CC'} } ]                        
+            return relInfo 
+
         def _getRelInfoXiccpD4BodyWS(self):
             relInfo = []
             for coneAngle in [0.8,1.0,1.3,1.7]:
@@ -734,7 +774,6 @@ class StrippingXiccSL(LineBuilder) :
                     "[Omega_cc+ -> ^(Charm -> p+ X- X- X+) mu-]CC" : 'VertexIsoInfo_CB'} } ]
             return relInfo
 
-
         def _getRelInfoOmegaccpD4BodyPi(self):
             relInfo = []
             for coneAngle in [0.8,1.0,1.3,1.7]:
-- 
GitLab


From c0d8aeeefb445a8968733d0d31d8e4d2c174d947 Mon Sep 17 00:00:00 2001
From: Ziyi Wang <wangziyi181@mails.ucas.ac.cn>
Date: Fri, 10 Sep 2021 12:43:37 +0800
Subject: [PATCH 08/22] update CharmedBaryonSL line

---
 .../StrippingCharmedBaryonSL.py               | 358 ++++++++++++------
 1 file changed, 234 insertions(+), 124 deletions(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingCharm/StrippingCharmedBaryonSL.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingCharm/StrippingCharmedBaryonSL.py
index b7a18d5b1..f33ee8f84 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingCharm/StrippingCharmedBaryonSL.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingCharm/StrippingCharmedBaryonSL.py
@@ -25,7 +25,7 @@ The following channels are used as the normalization channels:
   Omega_c0  -> Omega-  pi+
   Omega_c0  -> Xi-     pi+
 where the daughter baryon is reconstructed via:
-  Lambda0 -> p pi- (from StdLooseLambdaLL/DD/LD)
+  Lambda0 -> p pi- (from StdLooseLambdaLL/DD)
   Xi-     -> Lambda0 pi-
   Oemga-  -> Lambda0 K-
 '''
@@ -41,7 +41,7 @@ __all__ = ('StrippingCharmedBaryonSL'
 from Gaudi.Configuration import *
 from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
 from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons
-from StandardParticles import  StdAllLoosePions, StdAllLooseKaons, StdLooseMuons, StdAllLooseProtons
+from StandardParticles import  StdAllLoosePions, StdAllLooseKaons, StdLooseMuons, StdAllLooseProtons, StdAllLooseMuons, StdAllVeryLooseMuons
 from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
 from PhysSelPython.Wrappers import MultiSelectionSequence
 from StrippingConf.StrippingLine import StrippingLine
@@ -59,24 +59,28 @@ default_config={
       'STREAMS'     : ['CharmCompleteEvent'],
       'CONFIG'      : {
           'GEC_nLongTrk' : 250    # adimensional
-        , 'signalPrescaleViaLc'         :   1.0
-        , 'signalPrescaleViaLcPPiMuNu'  :   0.4
-        , 'signalPrescaleViaOmegac0'    :   1.0
-        , 'signalPrescaleViaXic'        :   1.0
-        , 'signalPrescaleViaXicL0MuNu'  :   0.9
-        , 'controlPrescaleViaLcL0PiNC'  :   0.12
-        , 'controlPrescaleViaLcPKPiNC'  :   0.08
-        , 'controlPrescaleViaLcPPiPiNC' :   0.04
-        , 'controlPrescaleViaOmegac0NC' :   1.0
-        , 'controlPrescaleViaXicL0PiNC' :   0.12
-        , 'controlPrescaleViaXicXiPiNC' :   1.0
+        , 'signalPrescaleViaLc'           :   1.0
+        , 'signalPrescaleViaLcL0DDMuNu'   :   0.8
+        , 'signalPrescaleViaLcPPiMuNu'    :   0.2
+        , 'signalPrescaleViaOmegac0'      :   1.0
+        , 'signalPrescaleViaXic'          :   1.0
+        , 'signalPrescaleViaXicL0LLMuNu'  :   0.8
+        , 'signalPrescaleViaXicL0DDMuNu'  :   0.8
+        , 'controlPrescaleViaLcL0LLPiNC'  :   0.4 
+        , 'controlPrescaleViaLcL0DDPiNC'  :   0.8 
+        , 'controlPrescaleViaLcPKPiNC'    :   0.09
+        , 'controlPrescaleViaLcPPiPiNC'   :   0.06
+        , 'controlPrescaleViaOmegac0NC'   :   1.0
+        , 'controlPrescaleViaXicL0LLPiNC' :   0.4 
+        , 'controlPrescaleViaXicL0DDPiNC' :   0.8 
+        , 'controlPrescaleViaXicXiPiNC'   :   1.0
         , 'TRCHI2DOFMax'            :   3.0
-        , 'GhostProb'               :   0.35
-        , 'TrGhostProbMax'          :   0.5 #can be tightened if needed.  < 0.3 -> same for all particles
+        , 'GhostProb'               :   0.3
+        , 'TrGhostProbMax'          :   0.25 # same for all particles
         , 'MINIPCHI2'               :   4.0  # adimensiional, orig. 9 
-        , 'MuonP'                   :   2.0*GeV
-        , 'MuonPT'                  :   300*MeV
-        , 'MuonIPCHI2'              :   5.0 
+        , 'MuonP'                   :   3.0*GeV
+        , 'MuonPT'                  :   500*MeV
+        , 'MuonIPCHI2'              :   0.0 
         , 'MuonPIDmu'               :   0.0
         , 'PionP'                   :   3.0*GeV
         , 'PionPT'                  :   500*MeV
@@ -90,21 +94,32 @@ default_config={
         , 'ProtonPT'                :   500*MeV
         , 'Proton_PIDpPIDpi_Min'    :   5.0
         , 'Proton_PIDpPIDK_Min'     :   0.0
-        , 'LambdaLLPMin'            :2000.0*MeV
-        , 'LambdaLLPTMin'           : 500.0*MeV
-        , 'LambdaLLCutMass'         :  30.0*MeV
+        , 'ProbNNpMin'              :   0.2 #ProbNNp cut for proton in L0, to suppress the bkg of L0 
+        , 'ProbNNp'                 :   0.4
+        , 'ProbNNk'                 :   0.4
+        , 'ProbNNpi'                :   0.5
+        , 'ProbNNpiMax'             :   0.95
+        , 'LambdaLLPMin'            :5000.0*MeV
+        , 'LambdaLLPTMin'           : 800.0*MeV
+        , 'LambdaLLCutMass'         :  20.0*MeV
         , 'LambdaLLCutFDChi2'       : 100.0 ## unitless
-        , 'LambdaDDPMin'            :3000.0*MeV
+        , 'LambdaDDPMin'            :5000.0*MeV
         , 'LambdaDDPTMin'           : 800.0*MeV
-        , 'LambdaDDCutMass'         :  30.0*MeV
+        , 'LambdaDDCutMass'         :  20.0*MeV
         , 'LambdaDDCutFDChi2'       : 100.0## unitless
         , 'LambdaLDPMin'            :3000.0*MeV
         , 'LambdaLDPTMin'           : 800.0*MeV
-        , 'LambdaLDCutMass'         :  30.0*MeV
+        , 'LambdaLDCutMass'         :  20.0*MeV
         , 'LambdaLDCutFDChi2'       : 100.0## unitless
         , 'LambdaDaugTrackChi2'     :   4.0## unitless
-        , 'LambdaVertexChi2'        :   6.0## max chi2/ndf for Lambda0 vertex
+        , 'LambdaVertexChi2'        :   5.0## max chi2/ndf for Lambda0 vertex
         , 'LambdaCutDIRA'           :   0.99## unitless
+        , 'LambdaLLMinVZ'           :-100.0*mm
+        , 'LambdaLLMaxVZ'           : 400.0*mm
+        , 'LambdaDDMinVZ'           : 400.0*mm
+        , 'LambdaDDMaxVZ'           :2275.0*mm
+        , 'LambdaPr_PT_MIN'         : 500.0*MeV
+        , 'LambdaPi_PT_MIN'         : 100.0*MeV
         , 'Lc_ADMASS_HalfWin'       :  80.0*MeV
         , 'Lc_Daug_1of3_MIPCHI2DV_Min': 4.0
         , 'Lc_ADOCAMAX_Max'         :   0.5*mm
@@ -117,14 +132,18 @@ default_config={
         , 'Omegac0_4Dau_VCHI2_Max'  :  60.0
         , 'Omegac0_BPVVDCHI2_Min'   :  25.0
         , 'Omegac0_BPVDIRA_Min'     :   0.9
-        , 'Xicplus_ADAMASS_HalfWin' : 170.0*MeV
-        , 'Xicplus_ADMASS_HalfWin'  : 120.0*MeV
-        , 'Xicplus_BPVVDCHI2_Min'   :  25.0
-        , 'Xicplus_BPVDIRA_Min'     :   0.99
-        , 'Xic0_ADAMASS_HalfWin'    : 170.0*MeV
-        , 'Xic0_ADMASS_HalfWin'     : 120.0*MeV
-        , 'Xic0_BPVVDCHI2_Min'      :  25.0
-        , 'Xic0_BPVDIRA_Min'        :   0.9
+        , 'Xic_ADAMASS_HalfWin'     : 170.0*MeV
+        , 'Xic_ADMASS_HalfWin'      : 120.0*MeV
+        , 'Xic_BPVVDCHI2_Min'       :  25.0
+        , 'Xic_BPVDIRA_Min'         :   0.9
+        , 'L0Mu_AM_Min'             :  1250.0*MeV
+        , 'pKMu_AM_Min'             :  1550.0*MeV
+        , 'ppiMu_AM_Min'            :  1600.0*MeV#1200
+        , 'XiMu_AM_Min'             :  1430.0*MeV
+        , 'OmMu_AM_Min'             :  1780.0*MeV
+        , 'Lc_AM_Max'               :  2370.0*MeV
+        , 'Oc_AM_Max'               :  2780.0*MeV
+        , 'Xic_AM_Max'              :  2550.0*MeV
       } ## end of 'CONFIG' 
 }  ## end of default_config
 
@@ -145,7 +164,7 @@ class StrippingCharmedBaryonSL(LineBuilder) :
         ##########################################################################
         self.selMuon = Selection( "SelMufor" + name,
                 Algorithm = self._muonFilter("Mufor"+name),
-                RequiredSelections = [StdLooseMuons])
+                RequiredSelections = [StdAllVeryLooseMuons])
 
         self.selKaon = Selection( "SelKfor" + name,
                 Algorithm = self._kaonFilter("Kfor"+name),
@@ -179,7 +198,7 @@ class StrippingCharmedBaryonSL(LineBuilder) :
                 RequiredSelections = [_stdLooseLambdaLD])
 
         self.selAllLambda = MergedSelection("SelAllLambdaFor"+name,
-                RequiredSelections = [ self.selLambdaLL,self.selLambdaDD,self.selLambdaLD])
+                RequiredSelections = [ self.selLambdaLL,self.selLambdaDD])
 
         ##########################################################################
         ## Xi- -> Lambda0 pi- 
@@ -233,7 +252,7 @@ class StrippingCharmedBaryonSL(LineBuilder) :
                 "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
                 "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)"\
                 "& (PIDK< %(PionPIDK)s)"\
-                "& (HASRICH)&(PIDpi-PIDK>%(Pion_PIDpiPIDK_Min)s)" % self.config
+                "& (PROBNNpi > %(ProbNNpi)s)" % self.config
         _pi = FilterDesktop(Code = _code )
         return _pi
 
@@ -242,7 +261,8 @@ class StrippingCharmedBaryonSL(LineBuilder) :
                 "& (P>%(KaonP)s) & (PT > %(KaonPT)s)"\
                 "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
                 "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)"\
-                "& (PIDK> %(KaonPIDK)s)"\
+                "& (PIDK> %(KaonPIDK)s) & (PROBNNpi < %(ProbNNpiMax)s)"\
+                "& (PROBNNk > %(ProbNNk)s)"\
                 "& (HASRICH)&(PIDK-PIDpi>%(Kaon_PIDKPIDpi_Min)s)"% self.config
         _ka = FilterDesktop(Code = _code )
         return _ka
@@ -252,38 +272,53 @@ class StrippingCharmedBaryonSL(LineBuilder) :
                 "& (PT > %(ProtonPT)s) & (P>%(ProtonP)s)"\
                 "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
                 "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)"\
+                "& (PROBNNp > %(ProbNNp)s) & (PROBNNpi < %(ProbNNpiMax)s)"\
                 "& (HASRICH)&(PIDp-PIDpi>%(Proton_PIDpPIDpi_Min)s)"\
                 "& (HASRICH)&(PIDp-PIDK>%(Proton_PIDpPIDK_Min)s)"% self.config
         _pr = FilterDesktop(Code = _code)
         return _pr
 
     def _LambdaLLFilter( self, _name):
-        _code = " (P> %(LambdaLLPMin)s) & (PT> %(LambdaLLPTMin)s)" \
-                " & (ADMASS('Lambda0') < %(LambdaLLCutMass)s) & (BPVVDCHI2> %(LambdaLLCutFDChi2)s)" \
-                " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),1)" \
-                " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),2)" \
-                " & CHILDCUT((TRGHOSTPROB< %(TrGhostProbMax)s),1)"\
-                " & CHILDCUT((TRGHOSTPROB< %(TrGhostProbMax)s),2)"\
+        _code = " (P > %(LambdaLLPMin)s) & (PT > %(LambdaLLPTMin)s)" \
+                " &(ADMASS('Lambda0')<%(LambdaLLCutMass)s)"\
+                " &(BPVVDCHI2> %(LambdaLLCutFDChi2)s)" \
+                " & (MAXTREE( 'p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                " & (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                " & (MAXTREE( 'p+'==ABSID, PROBNNp) > %(ProbNNpMin)s ) "\
+                " & (MINTREE('pi-'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                " & (MINTREE( 'p+'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                " & (MINTREE('pi-'==ABSID, TRCHI2DOF) < %(LambdaDaugTrackChi2)s )"\
+                " & (MINTREE( 'p+'==ABSID, TRCHI2DOF) < %(LambdaDaugTrackChi2)s )"\
                 " & (VFASPF(VCHI2PDOF) < %(LambdaVertexChi2)s)" \
+                " & (VFASPF(VZ) > %(LambdaLLMinVZ)s ) " \
+                " & (VFASPF(VZ) < %(LambdaLLMaxVZ)s ) " \
                 " & (BPVDIRA > %(LambdaCutDIRA)s )" % self.config
         _l0LL = FilterDesktop(Code = _code)
         return _l0LL
 
     def _LambdaDDFilter( self , _name):
         _code = " (P> %(LambdaDDPMin)s) & (PT> %(LambdaDDPTMin)s)" \
-                " & (ADMASS('Lambda0') < %(LambdaDDCutMass)s) & (BPVVDCHI2> %(LambdaDDCutFDChi2)s)" \
-                " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),1)" \
-                " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),2)" \
+                " & (ADMASS('Lambda0') < %(LambdaDDCutMass)s) "\
+                " & (BPVVDCHI2> %(LambdaDDCutFDChi2)s)" \
+                " & (MAXTREE( 'p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                " & (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                " & (MAXTREE( 'p+'==ABSID, PROBNNp) > %(ProbNNpMin)s ) "\
+                " & (MINTREE('pi-'==ABSID, TRCHI2DOF) < %(LambdaDaugTrackChi2)s )"\
+                " & (MINTREE( 'p+'==ABSID, TRCHI2DOF) < %(LambdaDaugTrackChi2)s )"\
                 " & (VFASPF(VCHI2PDOF) < %(LambdaVertexChi2)s)" \
+                " & (VFASPF(VZ) < %(LambdaDDMaxVZ)s ) " \
+                " & (VFASPF(VZ) > %(LambdaDDMinVZ)s )" \
                 " & (BPVDIRA > %(LambdaCutDIRA)s )" % self.config
         _l0DD = FilterDesktop(Code = _code)
         return _l0DD
 
     def _LambdaLDFilter( self , _name):
         _code = " (P> %(LambdaLDPMin)s) & (PT> %(LambdaLDPTMin)s)" \
-                " & (ADMASS('Lambda0') < %(LambdaLDCutMass)s) & (BPVVDCHI2> %(LambdaLDCutFDChi2)s)" \
+                " & (ADMASS('Lambda0') < %(LambdaLDCutMass)s)"\
+                " & (BPVVDCHI2> %(LambdaLDCutFDChi2)s)" \
                 " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),1)" \
                 " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),2)" \
+                " & CHILDCUT(('p+'==ABSID)&(PROBNNp>%(ProbNNpMin)s),1)"\
                 " & (VFASPF(VCHI2PDOF) < %(LambdaVertexChi2)s)" \
                 " & (BPVDIRA > %(LambdaCutDIRA)s )" % self.config
         _l0LD = FilterDesktop(Code = _code)
@@ -292,34 +327,60 @@ class StrippingCharmedBaryonSL(LineBuilder) :
     ##------------------------------------------------------------------------------------------
     ##  -------------------- Begin to LambdacSL  ------------
     def makeLambdacSL( self ):
-        _strCutComb = "(ADAMASS('Lambda_c+')<1.1*%(Lc_ADMASS_HalfWin)s)" \
-                      "& (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
-                      "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
-                      "& (APT>%(Lc_APT_Min)s)" % self.config
 
-        _strCutMoth = "(VFASPF(VCHI2) < %(Lc_VCHI2_Max)s)" \
-                      "& (ADMASS('Lambda_c+')<%(Lc_ADMASS_HalfWin)s)" \
+        _strCutCombfor = "(AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                    "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+                    "& (APT>%(Lc_APT_Min)s)" % self.config
+
+        _strCutMothfor = "(VFASPF(VCHI2) < %(Lc_VCHI2_Max)s)" \
                       "& (BPVVDCHI2>%(Lc_BPVVDCHI2_Min)s)" \
                       "& (BPVDIRA>%(Lc_BPVDIRA_Min)s)" % self.config
 
-        ''' Stripping Lambda_c+ -> Lambda0 mu+ '''
-        Lambdac2LambdaMuNu = self.createCombinationSel(OutputList = "Lambdac2LambdaMuNu" + self.name,
+        _strCutComb_Mass   = "(ADAMASS('Lambda_c+')<1.1*%(Lc_ADMASS_HalfWin)s)" % self.config
+        _strCutMoth_Mass   = "(ADMASS('Lambda_c+')<%(Lc_ADMASS_HalfWin)s)" % self.config
+        
+        _strCutComb   = _strCutCombfor + '&' + _strCutComb_Mass
+        _strCutMoth   = _strCutMothfor + '&' + _strCutMoth_Mass
+        
+        _strCutComb_MassL0MuSL  = "(AM>%(L0Mu_AM_Min)s)  & (AM<%(Lc_AM_Max)s)" % self.config
+        _strCutComb_MasspKMuSL  = "(AM>%(pKMu_AM_Min)s)  & (AM<%(Lc_AM_Max)s)" % self.config
+        _strCutComb_MassppiMuSL = "(AM>%(ppiMu_AM_Min)s) & (AM<%(Lc_AM_Max)s)" % self.config
+
+        _strCutComb_L0MuSL  = _strCutCombfor + '&' + _strCutComb_MassL0MuSL 
+        _strCutComb_pKMuSL  = _strCutCombfor + '&' + _strCutComb_MasspKMuSL 
+        _strCutComb_ppiMuSL = _strCutCombfor + '&' + _strCutComb_MassppiMuSL
+        _strCutMothSL = _strCutMothfor
+
+        ''' Stripping Lambda_c+ -> Lambda0(LL) mu+ '''
+        Lambdac2LambdaLLMuNu = self.createCombinationSel(OutputList = "Lambdac2LambdaLLMuNu" + self.name,
                 DecayDescriptor = "[Lambda_c+ -> Lambda0 mu+]cc",
-                DaughterLists   = [self.selAllLambda, self.selMuon],
-                PreVertexCuts   = _strCutComb,
-                PostVertexCuts  = _strCutMoth )
-        Lambdac2LambdaMuNuLine = StrippingLine( self.name + "Lambdac2LambdaMuNuLine", 
+                DaughterLists   = [self.selLambdaLL, self.selMuon],
+                PreVertexCuts   = _strCutComb_L0MuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Lambdac2LambdaLLMuNuLine = StrippingLine( self.name + "Lambdac2LambdaLLMuNuLine", 
                 prescale = self.config['signalPrescaleViaLc'],
-                algos = [ Lambdac2LambdaMuNu ], 
+                algos = [ Lambdac2LambdaLLMuNu ], 
                 EnableFlavourTagging = False )
-        self.registerLine (Lambdac2LambdaMuNuLine)
+        self.registerLine (Lambdac2LambdaLLMuNuLine)
+
+        ''' Stripping Lambda_c+ -> Lambda0(DD) mu+ '''
+        Lambdac2LambdaDDMuNu = self.createCombinationSel(OutputList = "Lambdac2LambdaDDMuNu" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> Lambda0 mu+]cc",
+                DaughterLists   = [self.selLambdaDD, self.selMuon],
+                PreVertexCuts   = _strCutComb_L0MuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Lambdac2LambdaDDMuNuLine = StrippingLine( self.name + "Lambdac2LambdaDDMuNuLine", 
+                prescale = self.config['signalPrescaleViaLcL0DDMuNu'],
+                algos = [ Lambdac2LambdaDDMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Lambdac2LambdaDDMuNuLine)
 
         ''' Stripping Lambda_c+ -> p+ K- mu+ '''
         Lambdac2PKMuNu = self.createCombinationSel(OutputList = "Lambdac2PKMuNu" + self.name,
                 DecayDescriptor = "[Lambda_c+ -> p+ K- mu+]cc",
                 DaughterLists   = [self.selProton, self.selKaon, self.selMuon],
-                PreVertexCuts   = _strCutComb,
-                PostVertexCuts  = _strCutMoth )
+                PreVertexCuts   = _strCutComb_pKMuSL,
+                PostVertexCuts  = _strCutMothSL )
         Lambdac2PKMuNuLine = StrippingLine( self.name + "Lambdac2PKMuNuLine", 
                 prescale = self.config['signalPrescaleViaLc'],
                 algos = [ Lambdac2PKMuNu ], 
@@ -330,8 +391,8 @@ class StrippingCharmedBaryonSL(LineBuilder) :
         Lambdac2PPiMuNu = self.createCombinationSel(OutputList = "Lambdac2PPiMuNu" + self.name,
                 DecayDescriptor = "[Lambda_c+ -> p+ pi- mu+]cc",
                 DaughterLists   = [self.selProton, self.selPion, self.selMuon],
-                PreVertexCuts   = _strCutComb,
-                PostVertexCuts  = _strCutMoth )
+                PreVertexCuts   = _strCutComb_ppiMuSL,
+                PostVertexCuts  = _strCutMothSL )
         Lambdac2PPiMuNuLine = StrippingLine( self.name + "Lambdac2PPiMuNuLine", 
                 prescale = self.config['signalPrescaleViaLcPPiMuNu'],
                 algos = [ Lambdac2PPiMuNu ], 
@@ -341,17 +402,29 @@ class StrippingCharmedBaryonSL(LineBuilder) :
         ''' ---------------------- '''
         ''' Normalization channels '''
         ''' ---------------------- '''
-        ''' NC Stripping Lambda_c+ -> Lambda0 pi+ '''
-        Lambdac2LambdaPiNC = self.createCombinationSel(OutputList = "Lambdac2LambdaPiNC" + self.name,
+        ''' NC Stripping Lambda_c+ -> Lambda0(LL) pi+ '''
+        Lambdac2LambdaLLPiNC = self.createCombinationSel(OutputList = "Lambdac2LambdaLLPiNC" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> Lambda0 pi+]cc",
+                DaughterLists   = [self.selLambdaLL, self.selPion],
+                PreVertexCuts   = _strCutComb,
+                PostVertexCuts  = _strCutMoth )
+        Lambdac2LambdaLLPiNCLine = StrippingLine( self.name + "Lambdac2LambdaLLPiNCLine", 
+                prescale = self.config['controlPrescaleViaLcL0LLPiNC'],
+                algos = [ Lambdac2LambdaLLPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Lambdac2LambdaLLPiNCLine)
+
+        ''' NC Stripping Lambda_c+ -> Lambda0(DD) pi+ '''
+        Lambdac2LambdaDDPiNC = self.createCombinationSel(OutputList = "Lambdac2LambdaDDPiNC" + self.name,
                 DecayDescriptor = "[Lambda_c+ -> Lambda0 pi+]cc",
-                DaughterLists   = [self.selAllLambda, self.selPion],
+                DaughterLists   = [self.selLambdaDD, self.selPion],
                 PreVertexCuts   = _strCutComb,
                 PostVertexCuts  = _strCutMoth )
-        Lambdac2LambdaPiNCLine = StrippingLine( self.name + "Lambdac2LambdaPiNCLine", 
-                prescale = self.config['controlPrescaleViaLcL0PiNC'],
-                algos = [ Lambdac2LambdaPiNC ], 
+        Lambdac2LambdaDDPiNCLine = StrippingLine( self.name + "Lambdac2LambdaDDPiNCLine", 
+                prescale = self.config['controlPrescaleViaLcL0DDPiNC'],
+                algos = [ Lambdac2LambdaDDPiNC ], 
                 EnableFlavourTagging = False )
-        self.registerLine (Lambdac2LambdaPiNCLine)
+        self.registerLine (Lambdac2LambdaDDPiNCLine)
 
         ''' NC Stripping Lambda_c+ -> p+ K- pi+ '''
         Lambdac2PKPiNC = self.createCombinationSel(OutputList = "Lambdac2PKPiNC" + self.name,
@@ -383,27 +456,32 @@ class StrippingCharmedBaryonSL(LineBuilder) :
     ## --------------------  Begin to makeOmegac0SL  ------------
     def makeOmegac0SL( self ):
 
-        _strCutComb = "( (ADAMASS('Omega_c0') < %(Omegac0_ADAMASS_HalfWin)s )" \
-                    "& (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
-                    "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+        _strCutCombfor = "( (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                    "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)"\
                     "& (APT>%(Lc_APT_Min)s) )" % self.config
-        _strCutMoth = "( (VFASPF(VCHI2)<%(Omegac0_4Dau_VCHI2_Max)s)" \
-                    "& (ADMASS('Omega_c0') < %(Omegac0_ADMASS_HalfWin)s)" \
+        _strCutMothfor = "( (VFASPF(VCHI2)<%(Omegac0_4Dau_VCHI2_Max)s)" \
                     "& (BPVVDCHI2>%(Omegac0_BPVVDCHI2_Min)s)" \
                     "& (BPVDIRA>%(Omegac0_BPVDIRA_Min)s) )" % self.config
-                                                           
-        _strCutComb_Oc2OMuNu = "(ADAMASS('Omega_c0') < 200 *MeV)"
-        _strCutMoth_Oc2OMuNu = "(VFASPF(VCHI2/VDOF)< 12.)"\
-                            "& (BPVVDCHI2 > 16.0)"\
-                            "& (BPVDIRA >0.9)"\
-                            "& (ADMASS('Omega_c0') < 150 *MeV)"
+        
+        _strCutComb_Mass = "(ADAMASS('Omega_c0') < %(Omegac0_ADAMASS_HalfWin)s )" % self.config
+        _strCutMoth_Mass = "(ADMASS('Omega_c0') < %(Omegac0_ADMASS_HalfWin)s )" % self.config
+
+        _strCutComb   = _strCutCombfor + '&' + _strCutComb_Mass
+        _strCutMoth   = _strCutMothfor + '&' + _strCutMoth_Mass
+        
+        _strCutComb_MassXiMuSL = "(AM>%(XiMu_AM_Min)s) & (AM<%(Oc_AM_Max)s)" % self.config
+        _strCutComb_MassOmMuSL = "(AM>%(OmMu_AM_Min)s) & (AM<%(Oc_AM_Max)s)" % self.config
+
+        _strCutComb_XiMuSL = _strCutCombfor + '&' + _strCutComb_MassXiMuSL
+        _strCutComb_OmMuSL = _strCutCombfor + '&' + _strCutComb_MassOmMuSL
+        _strCutMothSL = _strCutMothfor
 
         ''' Stripping Omega_c0 -> Omega- mu+ '''
         Omegac02OmegaMuNu = self.createCombinationSel(OutputList = "Omegac02OmegaMuNu" + self.name,
                 DecayDescriptor = "[Omega_c0 -> Omega- mu+]cc",
                 DaughterLists   = [self.Omegaminus2LambdaK, self.selMuon],
-                PreVertexCuts   = _strCutComb_Oc2OMuNu,
-                PostVertexCuts  = _strCutMoth_Oc2OMuNu )
+                PreVertexCuts   = _strCutComb_OmMuSL,
+                PostVertexCuts  = _strCutMothSL )
         Omegac02OmegaMuNuLine = StrippingLine( self.name + "Omegac02OmegaMuNuLine", 
                 prescale = self.config['signalPrescaleViaOmegac0'],
                 algos = [ Omegac02OmegaMuNu ], 
@@ -414,8 +492,8 @@ class StrippingCharmedBaryonSL(LineBuilder) :
         Omegac02XiMuNu = self.createCombinationSel(OutputList = "Omegac02XiMuNu" + self.name,
                 DecayDescriptor = "[Omega_c0 -> Xi- mu+]cc",
                 DaughterLists   = [self.Ximinus2LambdaPi, self.selMuon],
-                PreVertexCuts   = _strCutComb_Oc2OMuNu,
-                PostVertexCuts  = _strCutMoth_Oc2OMuNu )
+                PreVertexCuts   = _strCutComb_XiMuSL,
+                PostVertexCuts  = _strCutMothSL )
         Omegac02XiMuNuLine = StrippingLine( self.name + "Omegac02XiMuNuLine", 
                 prescale = self.config['signalPrescaleViaOmegac0'],
                 algos = [ Omegac02XiMuNu ], 
@@ -454,43 +532,63 @@ class StrippingCharmedBaryonSL(LineBuilder) :
     ##------------------------------------------------------------------------------------------
     ## --------------------  Begin to makeXicSL  ------------
     def makeXicSL( self ):
-        #Cut for Xic+
-        _strCutCombforXicPlus = "( (ADAMASS('Xi_c+') < %(Xicplus_ADAMASS_HalfWin)s )" \
-                                "& (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
-                                "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
-                                "& (APT>%(Lc_APT_Min)s) )" % self.config
-        _strCutMothforXicPlus = "( (VFASPF(VCHI2)<%(Lc_VCHI2_Max)s)" \
-                                "& (ADMASS('Xi_c+') < %(Xicplus_ADMASS_HalfWin)s)" \
-                                "& (BPVVDCHI2>%(Xicplus_BPVVDCHI2_Min)s)" \
-                                "& (BPVDIRA>%(Xicplus_BPVDIRA_Min)s) )" % self.config
-        #Cut for Xic0
-        _strCutCombforXicZero = "( (ADAMASS('Xi_c0') < %(Xic0_ADAMASS_HalfWin)s )" \
-                                "& (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
-                                "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
-                                "& (APT>%(Lc_APT_Min)s) )" % self.config
-        _strCutMothforXicZero = "( (VFASPF(VCHI2)<%(Omegac0_4Dau_VCHI2_Max)s)" \
-                                "& (ADMASS('Xi_c0') < %(Xic0_ADMASS_HalfWin)s)" \
-                                "& (BPVVDCHI2>%(Xic0_BPVVDCHI2_Min)s)" \
-                                "& (BPVDIRA>%(Xic0_BPVDIRA_Min)s) )" % self.config
-
-        ''' Stripping Xi_c+ -> Lambda0 mu+ '''
-        Xic2LambdaMuNu = self.createCombinationSel(OutputList = "Xic2LambdaMuNu" + self.name,
+        #Cut for Basic 
+        _strCutCombfor = "( (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                         "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+                         "& (APT>%(Lc_APT_Min)s) )" % self.config
+        _strCutMothfor = "( (VFASPF(VCHI2)<%(Omegac0_4Dau_VCHI2_Max)s)" \
+                         "& (BPVVDCHI2>%(Xic_BPVVDCHI2_Min)s)" \
+                         "& (BPVDIRA>%(Xic_BPVDIRA_Min)s) )" % self.config
+
+        _strCutComb_XicpMass = "(ADAMASS('Xi_c+') < %(Xic_ADAMASS_HalfWin)s )" % self.config
+        _strCutMoth_XicpMass = "(ADMASS('Xi_c+') < %(Xic_ADMASS_HalfWin)s)" % self.config
+
+        _strCutComb_Xic0Mass = "(ADAMASS('Xi_c0') < %(Xic_ADAMASS_HalfWin)s )" % self.config
+        _strCutMoth_Xic0Mass = "(ADMASS('Xi_c0') < %(Xic_ADMASS_HalfWin)s)" % self.config
+        
+        _strCutCombforXicZero   = _strCutCombfor + '&' + _strCutComb_Xic0Mass
+        _strCutMothforXicZero   = _strCutMothfor + '&' + _strCutMoth_Xic0Mass
+        
+        _strCutCombforXicPlus   = _strCutCombfor + '&' + _strCutComb_XicpMass
+        _strCutMothforXicPlus   = _strCutMothfor + '&' + _strCutMoth_XicpMass
+
+        _strCutComb_MassXiMuSL = "(AM>%(XiMu_AM_Min)s) & (AM<%(Xic_AM_Max)s)" % self.config
+        _strCutComb_MassL0MuSL = "(AM>%(L0Mu_AM_Min)s) & (AM<%(Xic_AM_Max)s)" % self.config
+        
+        _strCutComb_XiMuSL = _strCutCombfor + '&' + _strCutComb_MassXiMuSL
+        _strCutComb_L0MuSL = _strCutCombfor + '&' + _strCutComb_MassL0MuSL
+        _strCutMothSL = _strCutMothfor
+
+        ''' Stripping Xi_c+ -> Lambda0(LL) mu+ '''
+        Xic2LambdaLLMuNu = self.createCombinationSel(OutputList = "Xic2LambdaLLMuNu" + self.name,
                 DecayDescriptor = "[Xi_c+ -> Lambda0 mu+]cc",
-                DaughterLists   = [self.selAllLambda, self.selMuon],
-                PreVertexCuts   = _strCutCombforXicPlus,
-                PostVertexCuts  = _strCutMothforXicPlus )
-        Xic2LambdaMuNuLine = StrippingLine( self.name + "Xic2LambdaMuNuLine", 
-                prescale = self.config['signalPrescaleViaXicL0MuNu'],
-                algos = [ Xic2LambdaMuNu ], 
+                DaughterLists   = [self.selLambdaLL, self.selMuon],
+                PreVertexCuts   = _strCutComb_L0MuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Xic2LambdaLLMuNuLine = StrippingLine( self.name + "Xic2LambdaLLMuNuLine", 
+                prescale = self.config['signalPrescaleViaXicL0LLMuNu'],
+                algos = [ Xic2LambdaLLMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Xic2LambdaLLMuNuLine)
+
+        ''' Stripping Xi_c+ -> Lambda0(DD) mu+ '''
+        Xic2LambdaDDMuNu = self.createCombinationSel(OutputList = "Xic2LambdaDDMuNu" + self.name,
+                DecayDescriptor = "[Xi_c+ -> Lambda0 mu+]cc",
+                DaughterLists   = [self.selLambdaDD, self.selMuon],
+                PreVertexCuts   = _strCutComb_L0MuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Xic2LambdaDDMuNuLine = StrippingLine( self.name + "Xic2LambdaDDMuNuLine", 
+                prescale = self.config['signalPrescaleViaXicL0DDMuNu'],
+                algos = [ Xic2LambdaDDMuNu ], 
                 EnableFlavourTagging = False )
-        self.registerLine (Xic2LambdaMuNuLine)
+        self.registerLine (Xic2LambdaDDMuNuLine)
 
         ''' Stripping Xi_c0 -> Xi- mu+ '''
         Xic02XiMuNu = self.createCombinationSel(OutputList = "Xic02XiMuNu" + self.name,
                 DecayDescriptor = "[Xi_c0 -> Xi- mu+]cc",
                 DaughterLists   = [self.Ximinus2LambdaPi, self.selMuon],
-                PreVertexCuts   = _strCutCombforXicZero,
-                PostVertexCuts  = _strCutMothforXicZero )
+                PreVertexCuts   = _strCutComb_XiMuSL,
+                PostVertexCuts  = _strCutMothSL )
         Xic02XiMuNuLine = StrippingLine( self.name + "Xic02XiMuNuLine", 
                 prescale = self.config['signalPrescaleViaXic'],
                 algos = [ Xic02XiMuNu ], 
@@ -500,17 +598,29 @@ class StrippingCharmedBaryonSL(LineBuilder) :
         ''' ---------------------- '''
         ''' Normalization channels '''
         ''' ---------------------- '''
-        ''' NC Stripping Xi_c+ -> Lambda0 pi+ '''
-        Xic2LambdaPiNC = self.createCombinationSel(OutputList = "Xic2LambdaPiNC" + self.name,
+        ''' NC Stripping Xi_c+ -> Lambda0(LL) pi+ '''
+        Xic2LambdaLLPiNC = self.createCombinationSel(OutputList = "Xic2LambdaLLPiNC" + self.name,
+                DecayDescriptor = "[Xi_c+ -> Lambda0 pi+]cc",
+                DaughterLists   = [self.selLambdaLL, self.selPion],
+                PreVertexCuts   = _strCutCombforXicPlus,
+                PostVertexCuts  = _strCutMothforXicPlus )
+        Xic2LambdaLLPiNCLine = StrippingLine( self.name + "Xic2LambdaLLPiNCLine", 
+                prescale = self.config['controlPrescaleViaXicL0LLPiNC'],
+                algos = [ Xic2LambdaLLPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Xic2LambdaLLPiNCLine)
+
+        ''' NC Stripping Xi_c+ -> Lambda0(DD) pi+ '''
+        Xic2LambdaDDPiNC = self.createCombinationSel(OutputList = "Xic2LambdaDDPiNC" + self.name,
                 DecayDescriptor = "[Xi_c+ -> Lambda0 pi+]cc",
-                DaughterLists   = [self.selAllLambda, self.selPion],
+                DaughterLists   = [self.selLambdaDD, self.selPion],
                 PreVertexCuts   = _strCutCombforXicPlus,
                 PostVertexCuts  = _strCutMothforXicPlus )
-        Xic2LambdaPiNCLine = StrippingLine( self.name + "Xic2LambdaPiNCLine", 
-                prescale = self.config['controlPrescaleViaXicL0PiNC'],
-                algos = [ Xic2LambdaPiNC ], 
+        Xic2LambdaDDPiNCLine = StrippingLine( self.name + "Xic2LambdaDDPiNCLine", 
+                prescale = self.config['controlPrescaleViaXicL0DDPiNC'],
+                algos = [ Xic2LambdaDDPiNC ], 
                 EnableFlavourTagging = False )
-        self.registerLine (Xic2LambdaPiNCLine)
+        self.registerLine (Xic2LambdaDDPiNCLine)
 
         ''' NC Stripping Xi_c0 -> Xi- pi+ '''
         Xic02XiPiNC = self.createCombinationSel(OutputList = "Xic02XiPiNC" + self.name,
-- 
GitLab


From 1cf04d5eec41825c3c767be48e4a34eef2b28818 Mon Sep 17 00:00:00 2001
From: Shantam Taneja <shantam.taneja@cern.ch>
Date: Fri, 10 Sep 2021 21:13:17 +0200
Subject: [PATCH 09/22] Update LineConfig for 2016 re-stripping

---
 .../LineConfigDictionaries_Charm.py           | 98 +++++++++++--------
 1 file changed, 59 insertions(+), 39 deletions(-)

diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charm.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charm.py
index a87e316ce..a408797b8 100644
--- a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charm.py
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charm.py
@@ -10,7 +10,7 @@
 ###############################################################################
 
 ################################################################################
-##                          S T R I P P I N G  34r0p2                         ##
+##                          S T R I P P I N G  28r2p1                         ##
 ##                                                                            ##
 ##  Configuration for Charm WG                                                ##
 ##  Contact person: Shantam Taneja   (shantam.taneja@cern.ch)                 ##
@@ -715,13 +715,12 @@ XiccSL = {
     "BUILDERTYPE": "StrippingXiccSL", 
     "CONFIG": {
         'LcHlt2TisTosSpec' : { 'Hlt2CharmHadLcpToPpKmPip.*Decision%TOS' : 0, 'Hlt2Global%TIS' : 0 }
-        , 'controlPrescaleLc'           : 0.05
-        , 'controlPrescaleXic'          : 0.05
         , 'signalPrescaleViaLc'         : 1.0
         , 'signalPrescaleViaXicp'       : 1.0
         , 'signalPrescaleViaXicz'       : 1.0
-        , 'signalPrescaleViaOmegaz'     : 0.5
-        , 'controlPrescaleViaOmegaczPi' : 0.03
+        , 'signalPrescaleViaOmegaz'     : 0.2
+        , 'controlPrescaleViaLcPi'      : 0.2
+        , 'controlPrescaleViaOmegaczPi' : 0.05
         , 'controlPrescaleViaXiczPi'    : 0.05
         , 'signalPrescaleViaLcWS'       : 0.5
         , 'TRCHI2DOFMax'            :   3.0
@@ -738,7 +737,7 @@ XiccSL = {
         , 'TRCHI2'                  :   3.0
         , 'MuonP'                   :   6.0*GeV
         , 'MuonPT'                  :  1000*MeV
-        , 'MuonIPCHI2'              :   5.0
+        , 'MuonIPCHI2'              :   0.0
         , 'MuonPIDmu'               :   0.0
         , 'GhostProb'               :   0.35
         , 'Lc_Daug_TRCHI2DOF_Max'   :   5.0
@@ -760,11 +759,11 @@ XiccSL = {
         , 'Xicplus_BPVVDCHI2_Min'   :  25.0
         , 'Xicplus_BPVDIRA_Min'     :   0.99
         , 'Xic0_ADAMASS_HalfWin'    : 170.0*MeV
-        , 'Xic0_ADMASS_HalfWin'     : 120.0*MeV
+        , 'Xic0_ADMASS_HalfWin'     :  50.0*MeV
         , 'Xic0_BPVVDCHI2_Min'      :  25.0
         , 'Xic0_BPVDIRA_Min'        :   0.9
         , 'Omegac0_ADAMASS_HalfWin' : 170.0*MeV
-        , 'Omegac0_ADMASS_HalfWin'  : 120.0*MeV
+        , 'Omegac0_ADMASS_HalfWin'  :  50.0*MeV
         , 'Omegac0_4Dau_VCHI2_Max'  :  60.0
         , 'Omegac0_BPVVDCHI2_Min'   :  25.0
         , 'Omegac0_BPVDIRA_Min'     :   0.9
@@ -793,6 +792,7 @@ XiccSL = {
         , 'Omegacc_Zero_BPVDIRA_Min':   0.0 # Neutral
 
 
+
     },
     "STREAMS": [ "CharmCompleteEvent" ],
     "WGs": [ "Charm" ]
@@ -826,24 +826,28 @@ CharmedBaryonSL = {
     "BUILDERTYPE": "StrippingCharmedBaryonSL",
     "CONFIG": {
         'GEC_nLongTrk' : 250    # adimensional
-        , 'signalPrescaleViaLc'         :   1.0
-        , 'signalPrescaleViaLcPPiMuNu'  :   0.4
-        , 'signalPrescaleViaOmegac0'    :   1.0
-        , 'signalPrescaleViaXic'        :   1.0
-        , 'signalPrescaleViaXicL0MuNu'  :   0.9
-        , 'controlPrescaleViaLcL0PiNC'  :   0.12
-        , 'controlPrescaleViaLcPKPiNC'  :   0.08
-        , 'controlPrescaleViaLcPPiPiNC' :   0.04
-        , 'controlPrescaleViaOmegac0NC' :   1.0
-        , 'controlPrescaleViaXicL0PiNC' :   0.12
-        , 'controlPrescaleViaXicXiPiNC' :   1.0
+        , 'signalPrescaleViaLc'           :   1.0
+        , 'signalPrescaleViaLcL0DDMuNu'   :   0.8
+        , 'signalPrescaleViaLcPPiMuNu'    :   0.2
+        , 'signalPrescaleViaOmegac0'      :   1.0
+        , 'signalPrescaleViaXic'          :   1.0
+        , 'signalPrescaleViaXicL0LLMuNu'  :   0.8
+        , 'signalPrescaleViaXicL0DDMuNu'  :   0.8
+        , 'controlPrescaleViaLcL0LLPiNC'  :   0.4
+        , 'controlPrescaleViaLcL0DDPiNC'  :   0.8
+        , 'controlPrescaleViaLcPKPiNC'    :   0.09
+        , 'controlPrescaleViaLcPPiPiNC'   :   0.06
+        , 'controlPrescaleViaOmegac0NC'   :   1.0
+        , 'controlPrescaleViaXicL0LLPiNC' :   0.4
+        , 'controlPrescaleViaXicL0DDPiNC' :   0.8
+        , 'controlPrescaleViaXicXiPiNC'   :   1.0
         , 'TRCHI2DOFMax'            :   3.0
-        , 'GhostProb'               :   0.35
-        , 'TrGhostProbMax'          :   0.5 #can be tightened if needed.  < 0.3 -> same for all particles
+        , 'GhostProb'               :   0.3
+        , 'TrGhostProbMax'          :   0.25 # same for all particles
         , 'MINIPCHI2'               :   4.0  # adimensiional, orig. 9
-        , 'MuonP'                   :   2.0*GeV
-        , 'MuonPT'                  :   300*MeV
-        , 'MuonIPCHI2'              :   5.0
+        , 'MuonP'                   :   3.0*GeV
+        , 'MuonPT'                  :   500*MeV
+        , 'MuonIPCHI2'              :   0.0
         , 'MuonPIDmu'               :   0.0
         , 'PionP'                   :   3.0*GeV
         , 'PionPT'                  :   500*MeV
@@ -857,21 +861,32 @@ CharmedBaryonSL = {
         , 'ProtonPT'                :   500*MeV
         , 'Proton_PIDpPIDpi_Min'    :   5.0
         , 'Proton_PIDpPIDK_Min'     :   0.0
-        , 'LambdaLLPMin'            :2000.0*MeV
-        , 'LambdaLLPTMin'           : 500.0*MeV
-        , 'LambdaLLCutMass'         :  30.0*MeV
+        , 'ProbNNpMin'              :   0.2 #ProbNNp cut for proton in L0, to suppress the bkg of L0
+        , 'ProbNNp'                 :   0.4
+        , 'ProbNNk'                 :   0.4
+        , 'ProbNNpi'                :   0.5
+        , 'ProbNNpiMax'             :   0.95
+        , 'LambdaLLPMin'            :5000.0*MeV
+        , 'LambdaLLPTMin'           : 800.0*MeV
+        , 'LambdaLLCutMass'         :  20.0*MeV
         , 'LambdaLLCutFDChi2'       : 100.0 ## unitless
-        , 'LambdaDDPMin'            :3000.0*MeV
+        , 'LambdaDDPMin'            :5000.0*MeV
         , 'LambdaDDPTMin'           : 800.0*MeV
-        , 'LambdaDDCutMass'         :  30.0*MeV
+        , 'LambdaDDCutMass'         :  20.0*MeV
         , 'LambdaDDCutFDChi2'       : 100.0## unitless
         , 'LambdaLDPMin'            :3000.0*MeV
         , 'LambdaLDPTMin'           : 800.0*MeV
-        , 'LambdaLDCutMass'         :  30.0*MeV
+        , 'LambdaLDCutMass'         :  20.0*MeV
         , 'LambdaLDCutFDChi2'       : 100.0## unitless
         , 'LambdaDaugTrackChi2'     :   4.0## unitless
-        , 'LambdaVertexChi2'        :   6.0## max chi2/ndf for Lambda0 vertex
+        , 'LambdaVertexChi2'        :   5.0## max chi2/ndf for Lambda0 vertex
         , 'LambdaCutDIRA'           :   0.99## unitless
+        , 'LambdaLLMinVZ'           :-100.0*mm
+        , 'LambdaLLMaxVZ'           : 400.0*mm
+        , 'LambdaDDMinVZ'           : 400.0*mm
+        , 'LambdaDDMaxVZ'           :2275.0*mm
+        , 'LambdaPr_PT_MIN'         : 500.0*MeV
+        , 'LambdaPi_PT_MIN'         : 100.0*MeV
         , 'Lc_ADMASS_HalfWin'       :  80.0*MeV
         , 'Lc_Daug_1of3_MIPCHI2DV_Min': 4.0
         , 'Lc_ADOCAMAX_Max'         :   0.5*mm
@@ -884,14 +899,19 @@ CharmedBaryonSL = {
         , 'Omegac0_4Dau_VCHI2_Max'  :  60.0
         , 'Omegac0_BPVVDCHI2_Min'   :  25.0
         , 'Omegac0_BPVDIRA_Min'     :   0.9
-        , 'Xicplus_ADAMASS_HalfWin' : 170.0*MeV
-        , 'Xicplus_ADMASS_HalfWin'  : 120.0*MeV
-        , 'Xicplus_BPVVDCHI2_Min'   :  25.0
-        , 'Xicplus_BPVDIRA_Min'     :   0.99
-        , 'Xic0_ADAMASS_HalfWin'    : 170.0*MeV
-        , 'Xic0_ADMASS_HalfWin'     : 120.0*MeV
-        , 'Xic0_BPVVDCHI2_Min'      :  25.0
-        , 'Xic0_BPVDIRA_Min'        :   0.9
+        , 'Xic_ADAMASS_HalfWin'     : 170.0*MeV
+        , 'Xic_ADMASS_HalfWin'      : 120.0*MeV
+        , 'Xic_BPVVDCHI2_Min'       :  25.0
+        , 'Xic_BPVDIRA_Min'         :   0.9
+        , 'L0Mu_AM_Min'             :  1250.0*MeV
+        , 'pKMu_AM_Min'             :  1550.0*MeV
+        , 'ppiMu_AM_Min'            :  1600.0*MeV#1200
+        , 'XiMu_AM_Min'             :  1430.0*MeV
+        , 'OmMu_AM_Min'             :  1780.0*MeV
+        , 'Lc_AM_Max'               :  2370.0*MeV
+        , 'Oc_AM_Max'               :  2780.0*MeV
+        , 'Xic_AM_Max'              :  2550.0*MeV
+
     },
     "STREAMS": [ "CharmCompleteEvent" ],
     "WGs": [ "Charm" ]
-- 
GitLab


From 54db3820b8956ecce7c8d939998e6239ab7c0b38 Mon Sep 17 00:00:00 2001
From: Jie Wu <j.wu@cern.ch>
Date: Sat, 11 Sep 2021 04:08:32 +0200
Subject: [PATCH 10/22] correct S T R I P P I N G 3 4 r 0 p 2 -> S T R I P P I
 N G 2 8 r 2 p 1 in the LineConfigDictionaries

---
 .../Stripping28r2p1/LineConfigDictionaries_B2CC.py              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py
index a1b1a1c31..37a679ed2 100644
--- a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_B2CC.py
@@ -9,7 +9,7 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 ################################################################################
-##                          S T R I P P I N G  3 4 r 0 p 2                    ##
+##                          S T R I P P I N G  2 8 r 2 p 1                    ##
 ##                                                                            ##
 ##  Configuration for B2CC WG                                                 ##
 ##  Contact person: Jie Wu               (j.wu@cern.ch)                       ##
-- 
GitLab


From c051baa4f3f6313a3e62bdcac78104bf027ae400 Mon Sep 17 00:00:00 2001
From: Valeriia Zhovkovska <valeriia.zhovkovska@cern.ch>
Date: Sat, 11 Sep 2021 15:59:50 +0200
Subject: [PATCH 11/22] LineConfig dictionary for incremental re-stripping
 S28r2p1 and QuarkoniaPhotoProduction lines

---
 .../StrippingOniaPhotoProduction.py           | 118 ++++++++++++
 .../StrippingOniaPhotoProductionPrescaled.py  | 106 +++++++++++
 .../StrippingBandQ/__init__.py                |   2 +-
 .../liaisons/BandQ/TestMyWGfromSelections.py  | 156 +++++++++++++++
 .../liaisons/BandQ/TestMyWGfromSettings.py    | 179 ++++++++++++++++++
 .../LineConfigDictionaries_BandQ.py           | 130 ++++++++++++-
 6 files changed, 687 insertions(+), 4 deletions(-)
 create mode 100644 Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingOniaPhotoProduction.py
 create mode 100644 Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingOniaPhotoProductionPrescaled.py
 create mode 100755 Phys/StrippingSelections/tests/liaisons/BandQ/TestMyWGfromSelections.py
 create mode 100755 Phys/StrippingSelections/tests/liaisons/BandQ/TestMyWGfromSettings.py

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingOniaPhotoProduction.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingOniaPhotoProduction.py
new file mode 100644
index 000000000..79dd7ec74
--- /dev/null
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingOniaPhotoProduction.py
@@ -0,0 +1,118 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Line for Jpsi+Jet production studies 
+#
+# R. McNulty with lots of help from D. Johnson and V. Zhovkovska
+#
+# Jpsi production to be as unbiased as possible.  Require 1 PV and low Herschel activity in the backwards direction
+#
+# Require following in the DaVinci configuration:                             
+# from Configurables import HCRawBankDecoderHlt                               
+# Hlt1LowMult_HCRawBankDecoderHlt = HCRawBankDecoderHlt('hcrawbankdecoder')   
+# DaVinci().appendToMainSequence([Hlt1LowMult_HCRawBankDecoderHlt])           
+
+__author__ = ['R. McNulty']
+
+__all__ = (
+  'OniaPhotoProductionConf',
+  'default_config',
+)
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons
+from GaudiKernel.SystemOfUnits import GeV
+from Configurables import HCRawBankDecoderHlt
+
+default_config = {
+  'JpsiPhotoProduction':
+  {  'BUILDERTYPE' : 'OniaPhotoProductionConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.5,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 2.977 * GeV,
+        'MMmax'     : 3.217 * GeV,
+        'MaxHRCADC' : 350,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+  'Psi2SPhotoProduction':
+  {  'BUILDERTYPE'  : 'OniaPhotoProductionConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 1.0,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 3.566 * GeV,
+        'MMmax'     : 3.806 * GeV,
+        'MaxHRCADC' : 350,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+  'UpsilonPhotoProduction':
+  {  'BUILDERTYPE'  : 'OniaPhotoProductionConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 1.0,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 9.300 * GeV,
+        'MMmax'     : 999.0 * GeV,
+        'MaxHRCADC' : 500,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+}
+
+class OniaPhotoProductionConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['JpsiPhotoProduction']['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    self.registerLine(StrippingLine( name + 'Line',
+      prescale          = config[ 'Prescale'  ],
+      postscale         = config[ 'Postscale' ],
+      RequiredRawEvents = config[ 'RawEvents' ],
+      checkPV           = (0,1),
+      FILTER ={
+        'Code':
+        "( ( HRCSUMADC('Raw/HC/Sums','B2') < %(MaxHRCADC)s ) & ( HRCSUMADC('Raw/HC/Sums','B1') < %(MaxHRCADC)s ) &    ( HRCSUMADC('Raw/HC/Sums','B0') < %(MaxHRCADC)s ) )"%config
+         },
+      selection         = makeCombination(name+'PhotoProduction', config),
+    ))
+
+
+
+def makeCombination( name, config):
+  # Define the cuts
+  dcut = '(PT>%(pT)s)'%config
+  mcut = '(MM>%(MMmin)s) & (MM<%(MMmax)s)'%config
+
+
+  return SimpleSelection(name, CombineParticles, [StdAllLooseMuons],
+    DecayDescriptor    = 'J/psi(1S) -> mu+ mu-',
+    DaughtersCuts      = { 'mu+' : dcut, 'mu-' : dcut },
+    MotherCut          = mcut,
+    WriteP2PVRelations = False
+  )
diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingOniaPhotoProductionPrescaled.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingOniaPhotoProductionPrescaled.py
new file mode 100644
index 000000000..42ec3d37f
--- /dev/null
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/StrippingOniaPhotoProductionPrescaled.py
@@ -0,0 +1,106 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Line for Jpsi+Jet production studies 
+#
+# R. McNulty with lots of help from D. Johnson and V. Zhovkovska
+#
+# Jpsi production to be as unbiased as possible.  Limit to one PV.  Heavy prescale to figure out what Herschel is doing in parallel line 
+
+__author__ = ['R. McNulty']
+
+__all__ = (
+  'OniaPhotoProductionPrescaledConf',
+  'default_config',
+)
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons
+from GaudiKernel.SystemOfUnits import GeV
+from Configurables import HCRawBankDecoderHlt
+
+default_config = {
+  'JpsiPhotoProductionPrescaled':
+  {  'BUILDERTYPE' : 'OniaPhotoProductionPrescaledConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.01,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 2.977 * GeV,
+        'MMmax'     : 3.217 * GeV,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+  'Psi2SPhotoProductionPrescaled':
+  {  'BUILDERTYPE'  : 'OniaPhotoProductionPrescaledConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.03,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 3.566 * GeV,
+        'MMmax'     : 3.806 * GeV,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+  'UpsilonPhotoProductionPrescaled':
+  {  'BUILDERTYPE'  : 'OniaPhotoProductionPrescaledConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.25,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 9.300 * GeV,
+        'MMmax'     : 999.0 * GeV,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+}
+
+class OniaPhotoProductionPrescaledConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['JpsiPhotoProductionPrescaled']['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    self.registerLine(StrippingLine( name + 'Line',
+      prescale          = config[ 'Prescale'  ],
+      postscale         = config[ 'Postscale' ],
+      RequiredRawEvents = config[ 'RawEvents' ],
+      checkPV           = (0,1),
+      selection         = makeCombination(name+'PhotoProduction', config),
+    ))
+
+
+
+def makeCombination( name, config):
+  # Define the cuts
+  dcut = '(PT>%(pT)s)'%config
+  mcut = '(MM>%(MMmin)s) & (MM<%(MMmax)s)'%config
+
+
+  return SimpleSelection(name, CombineParticles, [StdAllLooseMuons],
+    DecayDescriptor    = 'J/psi(1S) -> mu+ mu-',
+    DaughtersCuts      = { 'mu+' : dcut, 'mu-' : dcut },
+    MotherCut          = mcut,
+    WriteP2PVRelations = False
+  )
diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/__init__.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/__init__.py
index 7d10511eb..8718eba5c 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/__init__.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingBandQ/__init__.py
@@ -9,7 +9,7 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
-_selections = ( 'StrippingB2Chic0KPi', 'StrippingCcbar2KsKpi', 'StrippingCcbar2LambdaLambda', 'StrippingCcbar2PhiPhi', 'StrippingCcbar2PpbarNew', 'StrippingCcbar2PpbarNew', 'StrippingCcbar2PpbarNew', 'StrippingCcbar2PpbarNew', 'StrippingEtap2pipimumu', 'StrippingInclusiveCharmBaryons', 'StrippingInclusiveDoubleD', 'StrippingLb2EtacKp', 'StrippingOmegabDecays', 'StrippingXibcBDT', 'StrippingBc2EtacSL', 'StrippingXbToLambdaKmX', 'StrippingEtap2pipimumu', 'StrippingHeavyBaryons', 'StrippingLb2L0X3872')
+_selections = ( 'StrippingB2Chic0KPi', 'StrippingCcbar2KsKpi', 'StrippingCcbar2LambdaLambda', 'StrippingCcbar2PhiPhi', 'StrippingCcbar2PpbarNew', 'StrippingCcbar2PpbarNew', 'StrippingCcbar2PpbarNew', 'StrippingCcbar2PpbarNew', 'StrippingEtap2pipimumu', 'StrippingInclusiveCharmBaryons', 'StrippingInclusiveDoubleD', 'StrippingLb2EtacKp', 'StrippingOmegabDecays', 'StrippingXibcBDT', 'StrippingBc2EtacSL', 'StrippingXbToLambdaKmX', 'StrippingEtap2pipimumu', 'StrippingHeavyBaryons', 'StrippingLb2L0X3872', 'StrippingOniaPhotoProduction', 'StrippingOniaPhotoProductionPrescaled')
 
 for _sel in _selections :
     try :
diff --git a/Phys/StrippingSelections/tests/liaisons/BandQ/TestMyWGfromSelections.py b/Phys/StrippingSelections/tests/liaisons/BandQ/TestMyWGfromSelections.py
new file mode 100755
index 000000000..f93174a70
--- /dev/null
+++ b/Phys/StrippingSelections/tests/liaisons/BandQ/TestMyWGfromSelections.py
@@ -0,0 +1,156 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: $
+# Test your line(s) of the stripping
+#  
+# NOTE: Please make a copy of this file for your testing, and do NOT change this one!
+#
+
+from Gaudi.Configuration import *
+from Configurables import DaVinci
+from StrippingConf.Configuration import StrippingConf
+
+#
+#Fix for TrackEff lines
+#
+from Configurables import DecodeRawEvent
+DecodeRawEvent().setProp("OverrideInputs",4.2)
+
+# Specify the name of your configuration
+my_wg='BandQ' #FOR LIAISONS
+
+from Configurables import RootCnvSvc
+RootCnvSvc().GlobalCompression = "ZLIB:1"
+
+# NOTE: this will work only if you inserted correctly the 
+# default_config dictionary in the code where your LineBuilder 
+# is defined.
+from StrippingSelections import buildersConf
+confs = buildersConf()
+from StrippingSelections.Utils import lineBuilder, buildStreams
+streams = buildStreams( confs, WGs=my_wg )
+
+leptonicMicroDSTname   = 'Leptonic'
+charmMicroDSTname      = 'Charm'
+pidMicroDSTname        = 'PID'
+bhadronMicroDSTname    = 'Bhadron'
+mdstStreams = [ leptonicMicroDSTname,charmMicroDSTname,pidMicroDSTname,bhadronMicroDSTname ]
+dstStreams  = [ "BhadronCompleteEvent", "CharmCompleteEvent", "Dimuon",
+                "EW", "Semileptonic", "Calibration", "MiniBias", "Radiative" ]
+
+stripTESPrefix = 'Strip'
+
+from Configurables import ProcStatusCheck
+
+sc = StrippingConf( Streams = streams,
+                    MaxCandidates = 2000,
+                    AcceptBadEvents = False,
+                    BadEventSelection = ProcStatusCheck(),
+                    TESPrefix = stripTESPrefix,
+                    ActiveMDSTStream = True,
+                    Verbose = True,
+                    DSTStreams = dstStreams,
+                    MicroDSTStreams = mdstStreams )
+
+#
+# Configure the dst writers for the output
+#
+enablePacking = True
+
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import ( SelDSTWriter,
+                                       stripDSTStreamConf,
+                                       stripDSTElements,
+                                       stripMicroDSTStreamConf,
+                                       stripMicroDSTElements,
+                                       stripCalibMicroDSTStreamConf )
+
+#
+# Configuration of MicroDST
+# per-event an per-line selective writing of the raw event is active (selectiveRawEvent=True)
+#
+mdstStreamConf = stripMicroDSTStreamConf(pack=enablePacking, selectiveRawEvent=True)
+mdstElements   = stripMicroDSTElements(pack=enablePacking)
+
+#
+# Configuration of SelDSTWriter
+# per-event an per-line selective writing of the raw event is active (selectiveRawEvent=True)
+#
+SelDSTWriterElements = {
+    'default'               : stripDSTElements(pack=enablePacking),
+    charmMicroDSTname       : mdstElements,
+    leptonicMicroDSTname    : mdstElements,
+    pidMicroDSTname         : mdstElements,
+    bhadronMicroDSTname     : mdstElements
+    }
+
+SelDSTWriterConf = {
+    'default'                : stripDSTStreamConf(pack=enablePacking, selectiveRawEvent=True),
+    charmMicroDSTname        : mdstStreamConf,
+    leptonicMicroDSTname     : mdstStreamConf,
+    bhadronMicroDSTname      : mdstStreamConf,
+    pidMicroDSTname          : stripCalibMicroDSTStreamConf(pack=enablePacking, selectiveRawEvent=True)
+    }
+
+dstWriter = SelDSTWriter( "MyDSTWriter",
+                          StreamConf = SelDSTWriterConf,
+                          MicroDSTElements = SelDSTWriterElements,
+                          OutputFileSuffix ='000000',
+                          SelectionSequences = sc.activeStreams() )
+
+
+#
+# Add stripping TCK
+#
+#from Configurables import StrippingTCK
+#stck = StrippingTCK(HDRLocation = '/Event/Strip/Phys/DecReports', TCK=0x36112100)
+
+#
+#Configure DaVinci
+#
+
+# Change the column size of Timing table
+from Configurables import TimingAuditor, SequencerTimerTool
+TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
+TimingAuditor().TIMER.NameSize = 60
+
+from Configurables import AuditorSvc, ChronoAuditor
+AuditorSvc().Auditors.append( ChronoAuditor("Chrono") )
+
+from Configurables import StrippingReport
+sr = StrippingReport(Selections = sc.selections(),ReportFrequency = 5000)
+
+from Configurables import AlgorithmCorrelationsAlg
+ac = AlgorithmCorrelationsAlg(Algorithms = list(set(sc.selections())))
+
+from Configurables import HCRawBankDecoderHlt
+Hlt1LowMult_HCRawBankDecoderHlt = HCRawBankDecoderHlt('hcrawbankdecoder')
+
+DaVinci().HistogramFile = 'DV_stripping_histos.root'
+DaVinci().EvtMax = 100000
+DaVinci().PrintFreq = 1000
+DaVinci().appendToMainSequence([Hlt1LowMult_HCRawBankDecoderHlt])
+DaVinci().appendToMainSequence( [ sc.sequence() ] )
+DaVinci().appendToMainSequence( [ sr ] )
+#DaVinci().appendToMainSequence( [ ac ] )
+DaVinci().appendToMainSequence( [ dstWriter.sequence() ] )
+DaVinci().ProductionType = "Stripping"
+
+# change the column size of timing table
+from Configurables import TimingAuditor, SequencerTimerTool
+TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
+TimingAuditor().TIMER.NameSize = 60
+
+MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
+
+# Data
+importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco16_DataType2016_Run174858.py")
+importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco16_DataType2016_Run174858_DV.py")
diff --git a/Phys/StrippingSelections/tests/liaisons/BandQ/TestMyWGfromSettings.py b/Phys/StrippingSelections/tests/liaisons/BandQ/TestMyWGfromSettings.py
new file mode 100755
index 000000000..743286d7d
--- /dev/null
+++ b/Phys/StrippingSelections/tests/liaisons/BandQ/TestMyWGfromSettings.py
@@ -0,0 +1,179 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: $
+# Test your line(s) of the stripping by taking the dictionaries from StrippingSettings
+#
+# NOTE: Please make a copy of this file for your testing, and do NOT change this one!
+#
+
+from Gaudi.Configuration import *
+from Configurables import DaVinci
+from StrippingConf.Configuration import StrippingConf
+
+# Specify the name of your configuration
+my_wg='BandQ' #FOR LIAISONS
+stripping='stripping28r2p1'
+
+from Configurables import RootCnvSvc
+RootCnvSvc().GlobalCompression = "ZLIB:1"
+
+#
+# Disable the cache in Tr/TrackExtrapolators
+#
+from Configurables import TrackStateProvider
+TrackStateProvider().CacheStatesOnDemand = False
+
+
+# This loads the static database from Phys/StrippingSettings/dbase/<stripping>
+# If you've changed the python dicts but the database hasn't been updated then
+# use the config_from_modules method below instead.from StrippingSettings.Utils import strippingConfiguration
+# from StrippingSelections import buildersConf
+# conf = strippingConfiguration(stripping)
+
+# This loads the python dicts in Phys/StrippingSettings/python/StrippingSettings/<stripping>/*.py
+from StrippingSettings.Utils import config_from_modules
+conf = config_from_modules(stripping)
+
+from StrippingSelections.Utils import lineBuilder, buildStreams
+streams = buildStreams( conf, WGs=my_wg )
+
+leptonicMicroDSTname   = 'Leptonic'
+charmMicroDSTname      = 'Charm'
+pidMicroDSTname        = 'PID'
+bhadronMicroDSTname    = 'Bhadron'
+mdstStreams = [ leptonicMicroDSTname,charmMicroDSTname,pidMicroDSTname,bhadronMicroDSTname ]
+dstStreams  = [ "BhadronCompleteEvent", "CharmCompleteEvent", "Dimuon",
+                "EW", "Semileptonic", "Calibration", "MiniBias", "Radiative", "IFT" ]
+
+stripTESPrefix = 'Strip'
+
+from Configurables import ProcStatusCheck
+
+sc = StrippingConf( Streams = streams,
+                    MaxCandidates = 2000,
+                    #MaxCombinations = 10000000,
+                    AcceptBadEvents = False,
+                    BadEventSelection = ProcStatusCheck(),
+                    TESPrefix = stripTESPrefix,
+                    ActiveMDSTStream = True,
+                    Verbose = True,
+                    DSTStreams = dstStreams,
+                    MicroDSTStreams = mdstStreams )
+
+#
+# Configure the dst writers for the output
+#
+enablePacking = True
+
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import ( SelDSTWriter,
+                                       stripDSTStreamConf,
+                                       stripDSTElements,
+                                       stripMicroDSTStreamConf,
+                                       stripMicroDSTElements,
+                                       stripCalibMicroDSTStreamConf )
+
+#
+# Configuration of MicroDST
+# per-event an per-line selective writing of the raw event is active (selectiveRawEvent=True)
+#
+mdstStreamConf = stripMicroDSTStreamConf(pack=enablePacking, selectiveRawEvent=True)
+mdstElements   = stripMicroDSTElements(pack=enablePacking)
+
+#
+# Configuration of SelDSTWriter
+# per-event an per-line selective writing of the raw event is active (selectiveRawEvent=True)
+#
+SelDSTWriterElements = {
+    'default'               : stripDSTElements(pack=enablePacking),
+    charmMicroDSTname       : mdstElements,
+    leptonicMicroDSTname    : mdstElements,
+    pidMicroDSTname         : mdstElements,
+    bhadronMicroDSTname     : mdstElements
+    }
+
+SelDSTWriterConf = {
+    'default'                : stripDSTStreamConf(pack=enablePacking, selectiveRawEvent=True),
+    charmMicroDSTname        : mdstStreamConf,
+    leptonicMicroDSTname     : mdstStreamConf,
+    bhadronMicroDSTname      : mdstStreamConf,
+    pidMicroDSTname          : stripCalibMicroDSTStreamConf(pack=enablePacking, selectiveRawEvent=True)
+    }
+
+dstWriter = SelDSTWriter( "MyDSTWriter",
+                          StreamConf = SelDSTWriterConf,
+                          MicroDSTElements = SelDSTWriterElements,
+                          OutputFileSuffix ='000000',
+                          SelectionSequences = sc.activeStreams() )
+
+
+#
+# Add stripping TCK
+#
+#from Configurables import StrippingTCK
+#stck = StrippingTCK(HDRLocation = '/Event/Strip/Phys/DecReports', TCK=0x36112100)
+
+#
+#Configure DaVinci
+#
+
+# Change the column size of Timing table
+from Configurables import TimingAuditor, SequencerTimerTool
+TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
+TimingAuditor().TIMER.NameSize = 60
+
+from Configurables import AuditorSvc, ChronoAuditor
+AuditorSvc().Auditors.append( ChronoAuditor("Chrono") )
+
+from Configurables import StrippingReport
+sr = StrippingReport(Selections = sc.selections(),ReportFrequency = 5000)
+
+from Configurables import AlgorithmCorrelationsAlg
+ac = AlgorithmCorrelationsAlg(Algorithms = list(set(sc.selections())))
+
+from Configurables import HCRawBankDecoderHlt
+Hlt1LowMult_HCRawBankDecoderHlt = HCRawBankDecoderHlt('hcrawbankdecoder')
+
+# The CALO reprocessing options file is available in AppConfig, so it is taken from here instead of saving it in Stripping
+importOptions(
+        "$APPCONFIGOPTS/DaVinci/DV-RedoCaloPID-Stripping_28_24.py"
+        )
+# Items that might get lost when running the CALO+PROTO ReProcessing in DV
+caloProtoReprocessLocs = ["/Event/pRec/ProtoP#99", "/Event/pRec/Calo#99"]
+# Make sure they are present on full DST streams
+SelDSTWriterConf['default'].extraItems += caloProtoReprocessLocs
+
+DaVinci().HistogramFile = 'DV_stripping_histos.root'
+DaVinci().EvtMax = 100000
+DaVinci().PrintFreq = 1000
+DaVinci().appendToMainSequence([Hlt1LowMult_HCRawBankDecoderHlt])
+DaVinci().appendToMainSequence( [ sc.sequence() ] )
+DaVinci().appendToMainSequence( [ sr ] )
+#DaVinci().appendToMainSequence( [ ac ] )
+DaVinci().appendToMainSequence( [ dstWriter.sequence() ] )
+DaVinci().ProductionType = "Stripping"
+
+MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
+
+# change the column size of timing table
+from Configurables import TimingAuditor, SequencerTimerTool
+TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
+TimingAuditor().TIMER.NameSize = 60
+
+# SMOG
+#importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco18Lead18_217952_PbNe.py")
+#importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco18Lead18_217952_PbNe_DV.py")
+#importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco15aLead15_Run168665_PbAr.py")
+#importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco15aLead15_Run168665_PbAr_DV.py")
+
+# pp
+importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco16_DataType2016_Run174858.py")
+importOptions("$STRIPPINGSELECTIONSROOT/tests/data/Reco16_DataType2016_Run174858_DV.py")
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_BandQ.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_BandQ.py
index 04b71ae48..3d02be3ba 100644
--- a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_BandQ.py
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_BandQ.py
@@ -9,7 +9,7 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 ################################################################################
-##                          S T R I P P I N G  2 9 r 2 p 2                    ##
+##                          S T R I P P I N G  2 8 r 2 p 1                    ##
 ##                                                                            ##
 ##  Configuration for B&Q WG                                                  ##
 ##  Contact person: valeriia.zhovkovska@cern.ch                               ##
@@ -388,7 +388,7 @@ XbToLambdaKmX = {
                 "pi": 3
             }
         }, 
-        "dfb_weights_path": "$TMVAWEIGHTSROOT/data/DfromB/{}Pi_2018_GBDT.weights.xml",
+        "dfb_weights_path" : "$TMVAWEIGHTSROOT/data/DfromB/{}Pi_2016_GBDT.weights.xml",
         "dp": {
             "comb12_cut": "(ADOCA(1,2)<0.2*mm) & (AMASS(1,2)<1840*MeV)", 
             "comb_cut": "(ASUM(PT)>1.4*GeV) & (ADAMASS('D+')<120*MeV) & (ADOCA(1,3)<0.3*mm) & (ADOCA(2,3)<0.3*mm)", 
@@ -443,7 +443,7 @@ XbToLambdaKmX = {
 # from basic StdAllLoose and StdNoPIDsDown pion/proton combination            #
 # Apply very loose P/PT cuts on proton and pions                              #
 #                                                                             #
-# Authos: Andrii Usachov, Jinlin Fu, Ziyi Wang                                #
+# Authors: Andrii Usachov, Jinlin Fu, Ziyi Wang                               #
 #                                                                             #
 #                                                                             #
 ###############################################################################
@@ -483,3 +483,127 @@ Ccbar2LambdaLambda = {
     'STREAMS' : [ 'Charm'],
     'WGs'     : [ 'BandQ']
     }
+
+
+###############################################################################
+#                                                                             #
+#                                                                             #
+# Module for Qqbar+Jet production studies,                                    #
+# Production to be as unbiased as possible.                                   #
+# Require 1 PV and low Herschel activity in the backwards direction           #
+#                                                                             #
+# Require following in the DaVinci configuration:                             #
+# from Configurables import HCRawBankDecoderHlt                               #
+# Hlt1LowMult_HCRawBankDecoderHlt = HCRawBankDecoderHlt('hcrawbankdecoder')   #
+# DaVinci().appendToMainSequence([Hlt1LowMult_HCRawBankDecoderHlt])           #
+#                                                                             #
+# Author: Ronan McNulty                                                       #
+#                                                                             #
+#                                                                             #
+###############################################################################
+
+JpsiPhotoProduction = {  
+      'BUILDERTYPE' : 'OniaPhotoProductionConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.5,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 2.977 * GeV,
+        'MMmax'     : 3.217 * GeV,
+        'MaxHRCADC' : 350,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    }
+
+Psi2SPhotoProduction = {  
+      'BUILDERTYPE'  : 'OniaPhotoProductionConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 1.0,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 3.566 * GeV,
+        'MMmax'     : 3.806 * GeV,
+        'MaxHRCADC' : 350,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    }
+
+UpsilonPhotoProduction = {  
+      'BUILDERTYPE'  : 'OniaPhotoProductionConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 1.0,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 9.300 * GeV,
+        'MMmax'     : 999.0 * GeV,
+        'MaxHRCADC' : 500,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    }
+
+
+###############################################################################
+#                                                                             #
+#                                                                             #
+# Module for Qqbar+Jet production studies,                                    #
+# Production to be as unbiased as possible.                                   #
+# Require 1 PV.                                                               #
+# Heavy prescale to figure out what Herschel is doing in parallel line        #
+#                                                                             #
+# Authos: Ronan McNulty                                                       #
+#                                                                             #
+#                                                                             #
+###############################################################################
+
+
+JpsiPhotoProductionPrescaled = {
+      'BUILDERTYPE' : 'OniaPhotoProductionPrescaledConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.01,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 2.977 * GeV,
+        'MMmax'     : 3.217 * GeV,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    }
+Psi2SPhotoProductionPrescaled = {
+      'BUILDERTYPE'  : 'OniaPhotoProductionPrescaledConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.03,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 3.566 * GeV,
+        'MMmax'     : 3.806 * GeV,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    }
+UpsilonPhotoProductionPrescaled = {
+      'BUILDERTYPE'  : 'OniaPhotoProductionPrescaledConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.25,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 9.300 * GeV,
+        'MMmax'     : 999.0 * GeV,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    }
-- 
GitLab


From 3f4606b2ad58d905618754cab681c33545ccc284 Mon Sep 17 00:00:00 2001
From: Ganrong Wang <ganrong.wang@cern.ch>
Date: Sun, 12 Sep 2021 14:19:14 +0200
Subject: [PATCH 12/22] Bnoc new strippingline to the incremental restripping
 of 2016 data

---
 .../LineConfigDictionaries_Charmless.py       | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charmless.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charmless.py
index 4199e6ba5..50974326e 100644
--- a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charmless.py
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Charmless.py
@@ -190,3 +190,37 @@ Xb2phhh_raw = {
                      },
     'STREAMS'     : ['Bhadron']
     }
+
+Xib2LbXLb2ph = {
+    "WGs"         : ["BnoC"],
+    "BUILDERTYPE" : "Xib2LbXLb2phLines",
+    "CONFIG"      : { "PrescaleXib2LbX"  : 1,
+                      "MinPTLb2ph_h"     : 1000,
+                      "MinPTLb2ph_p"     : 1000,
+                      "MinPTXib2LbX_h"   : 100,
+                      "MinIPChi2Lb2ph"   : 8,
+                      "MinIPChi2Xib2LbX" : 4,
+                      "TrChi2"           : 4,
+                      "TrGhostProb"      : 0.5,
+                      "MaxPTLb2ph"       : 1500,
+                      "MaxIPChi2Lb2ph"   : 12,
+                      "DOCA"             : 0.08,
+                      "VCHI2"            : 10,
+                      "XibVCHI2"         : 25,
+                      "BVDCHI2"          : 100,
+                      "BPT"              : 1500,
+                      "XibPT"            : 1500,
+                      "BTAU"             : 0.0006,
+                      "LbCombMassLow"    : 4900,
+                      "LbCombMassHigh"   : 6200,
+                      "LbMassLow"        : 5000,
+                      "LbMassHigh"       : 6100,
+                      "XibCombMassLow"   : 5100,
+                      "XibCombMassHigh"  : 6300,
+                      "XibMassLow"       : 5200,
+                      "XibMassHigh"      : 6200,
+                      "ConeAngles"       : [ 1.0, 1.5, 1.7, 2.0 ] },
+    "STREAMS"     : [ "Bhadron" ]
+}
+
+
-- 
GitLab


From c23fb23afb80a33e1dc21c9e6940918b3eb2c020 Mon Sep 17 00:00:00 2001
From: Maximilien Chefdeville <maximilien.chefdeville@cern.ch>
Date: Mon, 13 Sep 2021 14:58:21 +0200
Subject: [PATCH 13/22] Duplicate and loosen cuts of an existing line for PID
 calibration purposes.

---
 .../StrippingD02KPiPi0ForPid.py               | 111 +++++++++++++++++
 .../StrippingCalib/StrippingDst2D0Pi.py       | 114 ++++++++++++++----
 2 files changed, 202 insertions(+), 23 deletions(-)
 create mode 100644 Phys/StrippingSelections/python/StrippingSelections/StrippingCalib/StrippingD02KPiPi0ForPid.py

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingCalib/StrippingD02KPiPi0ForPid.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingCalib/StrippingD02KPiPi0ForPid.py
new file mode 100644
index 000000000..d839753c3
--- /dev/null
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingCalib/StrippingD02KPiPi0ForPid.py
@@ -0,0 +1,111 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Max Chefdeville'
+__date__ = '03/09/2021'
+__version__ = '$Revision: 1.0 $'
+
+'''
+Stripping selection for D0 -> K pi pi0
+'''
+####################################################################
+# Stripping selection for D0 -> K pi pi0
+# copy of the module StrippingD02KPiPi0.py from Regis Lefevre
+# modif: remove photon PID cut, enlarge resolved pi0 sidebands,
+#        remove line for merged pi0s and prescale (0.5) on resolved pi0 line
+####################################################################
+
+__all__ = ('StrippingD02KPiPi0ForPidConf',
+           'makeD02KPiPi0R',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdTightPions,StdTightKaons,StdLoosePi02gg
+
+default_config = {
+    'NAME'        : 'D02KPiPi0ForPid',
+    'WGs'         : ['Calib'],
+    'BUILDERTYPE' : 'StrippingD02KPiPi0ForPidConf',
+    'CONFIG'      : {   'TrackMinPT_R'         : 600       # MeV
+                       ,'TrackMinTrackProb'    : 0.000001  # unitless
+                       ,'TrackMaxGhostProb'    : 0.3       # unitless
+                       ,'TrackMinIPChi2'       : 16        # unitless
+                       ,'Pi0MinPT_R'           : 1000      # MeV
+                       ,'ResPi0MinGamCL'       : 0.0       # unitless
+                       ,'D0MinM'               : 1600      # MeV
+                       ,'D0MaxM'               : 2100      # MeV
+                       ,'D0MinVtxProb'         : 0.001     # unitless
+                       ,'D0MaxIPChi2'          : 9         # unitless
+                       ,'D0MinDIRA'            : 0.9999    # unitless
+                       ,'D0MinVVDChi2'         : 64        # unitless
+                       ,'ResolvedLinePrescale' : 1.        # unitless
+                       ,'ResolvedLinePostscale': 1.        # unitless
+                      },
+    'STREAMS'     : ['CharmCompleteEvent']
+    }
+
+class StrippingD02KPiPi0ForPidConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        myPions       = StdTightPions
+        myKaons       = StdTightKaons
+        myResolvedPi0 = StdLoosePi02gg
+
+        #---------------------------------------
+        # B -> HHPi0 selections
+        self.selresolved = makeD02KPiPi0R( name + 'R',
+                                           config,
+                                           DecayDescriptor = '[D0 -> K- pi+ pi0]cc',
+                                           inputSel = [myKaons, myPions, myResolvedPi0]
+                                           )
+        #---------------------------------------
+        # Stripping lines
+        self.D02KPiPi0R_line = StrippingLine(name + "_R" %locals()['config'],
+                                             prescale = config['ResolvedLinePrescale'],
+                                             postscale = config['ResolvedLinePostscale'],
+                                             RequiredRawEvents = ["Calo"],
+                                             selection = self.selresolved
+                                             )
+        # register lines
+        self.registerLine(self.D02KPiPi0R_line)
+
+##############################################################
+def makeD02KPiPi0R( name,
+                  config,
+                  DecayDescriptor,
+                  inputSel
+                  ) :
+
+    _TrackCuts    = "(PT>%(TrackMinPT_R)s *MeV) & (TRPCHI2>%(TrackMinTrackProb)s) & (TRGHOSTPROB<%(TrackMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPChi2)s)" %locals()['config']    
+    _pi0Cuts      = "(PT>%(Pi0MinPT_R)s *MeV) & (CHILD(CL,1)>%(ResPi0MinGamCL)s) & (CHILD(CL,2)>%(ResPi0MinGamCL)s)" %locals()['config']
+    _daughterCuts = { 'K-' : _TrackCuts, 'pi+' : _TrackCuts, 'pi0' : _pi0Cuts }
+    _combCuts     = "(AM>%(D0MinM)s *MeV) & (AM<%(D0MaxM)s *MeV)" % locals()['config']
+    _motherCuts   = "(VFASPF(VPCHI2)>%(D0MinVtxProb)s) & (BPVVDCHI2>%(D0MinVVDChi2)s) & (BPVIPCHI2()<%(D0MaxIPChi2)s) & (BPVDIRA>%(D0MinDIRA)s)" % locals()['config']
+
+    _D = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _D,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingCalib/StrippingDst2D0Pi.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingCalib/StrippingDst2D0Pi.py
index 39d2f4c1d..bc830a2ab 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingCalib/StrippingDst2D0Pi.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingCalib/StrippingDst2D0Pi.py
@@ -9,12 +9,13 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 __author__ = 'Max Chefdeville'
-__date__ = '03/09/2019'
-__version__ = '$Revision: 1.1 $'
+__date__ = '06/09/2021'
+__version__ = '$Revision: 1.2 $'
 
 '''
 Stripping selection for D*+ -> [D0 -> K pi gamma] pi+
 + selection for D*+ -> [D0 -> K pi eta] pi+
++ selection for D*+ -> [D0 -> K pi pi0] pi+
 '''
 ####################################################################
 # Stripping selection for D*+ -> [D0 -> K pi gamma] pi+
@@ -26,11 +27,16 @@ Stripping selection for D*+ -> [D0 -> K pi gamma] pi+
 # Stripping selection for D*+ -> [D0 -> K pi [eta -> gamma gamma]] pi+
 # first PID sample of eta2gg in whole LHCb dataset
 # selections aligned with D02Kpipi0 from Regis Lefevre
+# +
+# Stripping selection for D*+ -> [D0 -> K pi [pi0 -> gamma gamma]] pi+
+# this improves on the D02Kpipi0 line from Regis Lefevre:
+# no photon PID cut, wider pi0 mass window, no prescale, slow-pion match
 ####################################################################
 
 __all__ = ('StrippingDst2D0PiConf',
            'makeD02KPiGamma',
            'makeD02KPiEta',
+           'makeD02KPiPi0',           
            'makeDst2D0Pi',
            'default_config')
 
@@ -39,32 +45,32 @@ from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticle
 from PhysSelPython.Wrappers import Selection, DataOnDemand
 from StrippingConf.StrippingLine import StrippingLine
 from StrippingUtils.Utils import LineBuilder
-from StandardParticles import StdTightPions,StdTightKaons,StdLooseAllPhotons,StdNoPIDsPions, StdLooseEta2gg
+from StandardParticles import StdTightPions,StdTightKaons,StdLooseAllPhotons,StdNoPIDsPions,StdLooseEta2gg,StdLoosePi02gg
 
 default_config = {
     'NAME'        : 'Dst2D0Pi',
     'WGs'         : ['Calib'],
     'BUILDERTYPE' : 'StrippingDst2D0PiConf',
-    'CONFIG'      : {    'TrackMinPT'         : 300       # MeV
-                        ,'TrackMinTrackProb'    : 0.000001  # unitless
-                        ,'TrackMaxGhostProb'    : 0.3       # unitless
-                        ,'TrackMinIPChi2'       : 16        # unitless
-                        ,'GammaMinPT'           : 2000      # MeV
-                        ,'D0MinM'               : 1600      # MeV
-                        ,'D0MaxM'               : 2100      # MeV
-                        ,'D0MinVtxProb'         : 0.001     # unitless
-                        ,'D0MaxIPChi2'          : 9         # unitless
-                        ,'D0MinDIRA'            : 0.9999    # unitless
-                        ,'D0MinVVDChi2'         : 64        # unitless
-                        ,'SoftPionMaxIPChi2'    : 16        # unitless
-                        ,'Dst_PT_MIN'           : 4000      # MeV
-                        ,'Dst_dAM_MIN'          : 95.421    # MeV
-                        ,'Dst_dAM_MAX'          : 195.421   # MeV
-                        ,'Dst_dM_MIN'           : 135.421   # MeV
-                        ,'Dst_dM_MAX'           : 155.421   # MeV
-                        ,'Dst_VCHI2PDOF_MAX'    : 9         # unitless
-                        ,'Dst_VVDCHI2_MAX'      : 16        # unitless
-                        ,'Dst_VIPCHI2_MAX'      : 9         # unitless
+    'CONFIG'      : {    'TrackMinPT'              : 300       # MeV
+                        ,'TrackMinTrackProb'       : 0.000001  # unitless
+                        ,'TrackMaxGhostProb'       : 0.3       # unitless
+                        ,'TrackMinIPChi2'          : 16        # unitless
+                        ,'GammaMinPT'              : 2000      # MeV
+                        ,'D0MinM'                  : 1600      # MeV
+                        ,'D0MaxM'                  : 2100      # MeV
+                        ,'D0MinVtxProb'            : 0.001     # unitless
+                        ,'D0MaxIPChi2'             : 9         # unitless
+                        ,'D0MinDIRA'               : 0.9999    # unitless
+                        ,'D0MinVVDChi2'            : 64        # unitless
+                        ,'SoftPionMaxIPChi2'       : 16        # unitless
+                        ,'Dst_PT_MIN'              : 4000      # MeV
+                        ,'Dst_dAM_MIN'             : 95.421    # MeV
+                        ,'Dst_dAM_MAX'             : 195.421   # MeV
+                        ,'Dst_dM_MIN'              : 135.421   # MeV
+                        ,'Dst_dM_MAX'              : 155.421   # MeV
+                        ,'Dst_VCHI2PDOF_MAX'       : 9         # unitless
+                        ,'Dst_VVDCHI2_MAX'         : 16        # unitless
+                        ,'Dst_VIPCHI2_MAX'         : 9         # unitless
                         ,'Dst2D0PiLinePrescale'    : 1      # unitless
                         ,'Dst2D0PiLinePostscale'   : 1      # unitless
 
@@ -73,6 +79,12 @@ default_config = {
                         ,'EtaMassMax'                 : 650    # MeV
                         ,'Dst2D0etaPiLinePrescale'    : 1      # unitless
                         ,'Dst2D0etaPiLinePostscale'   : 1      # unitless
+
+                        ,'Pi0MinPT'                   : 1000   # MeV
+                        ,'Pi0MassMin'                 : 70     # MeV (= nocut)
+                        ,'Pi0MassMax'                 : 200    # MeV (= nocut)
+                        ,'Dst2D0pi0PiLinePrescale'    : 1      # unitless
+                        ,'Dst2D0pi0PiLinePostscale'   : 1      # unitless
                       },
     'STREAMS'     : ['CharmCompleteEvent']
     }
@@ -106,6 +118,11 @@ class StrippingDst2D0PiConf(LineBuilder) :
                                ,'EtaMassMax'
                                ,'Dst2D0etaPiLinePrescale'
                                ,'Dst2D0etaPiLinePostscale'
+                               ,'Pi0MinPT'
+                               ,'Pi0MassMin'
+                               ,'Pi0MassMax'
+                               ,'Dst2D0pi0PiLinePrescale'
+                               ,'Dst2D0pi0PiLinePostscale'
                                )
 
 ##############################################################
@@ -118,6 +135,7 @@ class StrippingDst2D0PiConf(LineBuilder) :
         myKaons       = StdTightKaons
         myGammas      = StdLooseAllPhotons
         myEtas        = StdLooseEta2gg
+        myPi0s        = StdLoosePi02gg
 
         #---------------------------------------
         # D -> HHGamma selections
@@ -173,6 +191,33 @@ class StrippingDst2D0PiConf(LineBuilder) :
         # register lines
         self.registerLine(self.Dst2D0etaPi_line)
 
+        #---------------------------------------
+        # D -> HHPi0 selections
+        self.seld0pi0 = makeD02KPiPi0( 'D0pi0_' + name ,
+                                       config,
+                                       DecayDescriptor = '[D0 -> K- pi+ pi0]cc',
+                                       inputSel = [myKaons, myPions, myPi0s]
+                                       )
+
+        #---------------------------------------
+        # Dst -> DPi selections
+        self.seldstpi0 = makeDst2D0Pi( 'Dstpi0_' + name ,
+                                       config,
+                                       DecayDescriptor = '[D*(2010)+ -> D0 pi+]cc',
+                                       inputSel = [self.seld0pi0, mySoftPions]
+                                       )
+
+        #---------------------------------------
+        # Stripping lines
+        self.Dst2D0pi0Pi_line = StrippingLine(name %locals()['config'] + "_D02KPiPi0",
+                                              prescale = config['Dst2D0pi0PiLinePrescale'],
+                                              postscale = config['Dst2D0pi0PiLinePostscale'],
+                                              RequiredRawEvents = ["Calo"],
+                                              selection = self.seldstpi0
+                                              )
+        # register lines
+        self.registerLine(self.Dst2D0pi0Pi_line)
+
 ##############################################################
 def makeD02KPiGamma( name,
                      config,
@@ -220,6 +265,29 @@ def makeD02KPiEta( name,
                       RequiredSelections = inputSel
                       )
 ##############################################################
+def makeD02KPiPi0( name,
+                   config,
+                   DecayDescriptor,
+                   inputSel
+                   ) :
+
+    _TrackCuts    = "(PT>%(TrackMinPT)s *MeV) & (TRPCHI2>%(TrackMinTrackProb)s) & (TRGHOSTPROB<%(TrackMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPChi2)s)" %locals()['config']    
+    _etaCuts    = "(PT>%(Pi0MinPT)s *MeV) & (in_range(%(Pi0MassMin)s,M,%(Pi0MassMax)s))" %locals()['config']
+    _daughterCuts = { 'K-' : _TrackCuts, 'pi+' : _TrackCuts, 'eta' : _etaCuts }
+    _combCuts     = "(AM>%(D0MinM)s *MeV) & (AM<%(D0MaxM)s *MeV)" % locals()['config']
+    _motherCuts   = "(VFASPF(VPCHI2)>%(D0MinVtxProb)s) & (BPVVDCHI2>%(D0MinVVDChi2)s) & (BPVIPCHI2()<%(D0MaxIPChi2)s) & (BPVDIRA>%(D0MinDIRA)s)" % locals()['config']
+
+    _D = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _D,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
 def makeDst2D0Pi( name,
                   config,
                   DecayDescriptor,
-- 
GitLab


From 212e340d47f4fd5cce9f1e56952ee24da9c51935 Mon Sep 17 00:00:00 2001
From: Vitalii Lisovskyi <vitalii.lisovskyi@cern.ch>
Date: Mon, 13 Sep 2021 15:31:02 +0200
Subject: [PATCH 14/22] =?UTF-8?q?Add=20=CE=94S=3D2=20hyperons=20lines?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../StrippingRD/StrippingS2Hyperons.py        | 495 ++++++++++++++++++
 1 file changed, 495 insertions(+)
 create mode 100644 Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingS2Hyperons.py

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingS2Hyperons.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingS2Hyperons.py
new file mode 100644
index 000000000..6fbfd67b6
--- /dev/null
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/StrippingS2Hyperons.py
@@ -0,0 +1,495 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+'''
+Stripping line for Omega- --> Lambda pi-, Xi0 --> p pi-, Xi0 --> p K- and Xi-/Omega- --> p pi- pi- (Delta S >= 2 forbidden modes, dubbed in the PDG as "S2 modes").
+Adapted from the ChargedHyperons module (Mike Sokoloff, Laurence Carson).
+'''
+__author__ = ['Vitalii Lisovskyi']
+__date__ = '01/09/2021'
+__version__ = '$Revision: 1.0 $'
+__all__ = ('StrippingS2HyperonsConf'
+           ,'default_config')
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons
+from StandardParticles import  StdAllLoosePions, StdAllLooseKaons
+
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from PhysSelPython.Wrappers import MultiSelectionSequence
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, mm, picosecond
+
+
+default_name='S2Hyperons'
+    #### This is the dictionary of all tunable cuts ########
+default_config={
+      'NAME'        :   'S2Hyperons',
+      'WGs'         :   ['RD'],
+      'BUILDERTYPE' : 'StrippingS2HyperonsConf',
+      'STREAMS'     : ['Charm'],
+      'CONFIG'      : {
+                     'TRCHI2DOFMax'           : 3.0
+                   #, 'PionPIDK'               :  5.0
+                   , 'ProtonProbNNp'          :  0.3
+                   , 'XiMassWindow'           :  25 * MeV
+                   , 'OmegaMassWindow'        :  30 * MeV
+                   , 'LambdaLLMinDecayTime'   :  2.0 * picosecond
+                   , 'LambdaLLVtxChi2Max'     :   5.0
+                   , 'LambdaDDVtxChi2Max'     :   5.0
+                   , 'LambdaLLMassWin'        : 8 * MeV
+                   , 'LambdaDDMassWin'        : 8 * MeV
+                   , 'LambdaLLMinVZ'          : -100. * mm
+                   , 'LambdaLLMaxVZ'          :  400. * mm
+                   , 'LambdaDDMinVZ'          :  400. * mm
+                   , 'LambdaDDMaxVZ'          : 2275. * mm
+                   , 'TrGhostProbMax'         :  0.25
+                   , 'KaonPIDK'               :  0
+                   , 'ProbNNpMinLL'           :  0.20
+                   , 'ProbNNpMinDD'           :  0.05
+                   , 'Bachelor_PT_MIN'        : 100 * MeV
+                   , 'Proton_PT_MIN'          : 1000 * MeV
+                   , 'Proton_P_MIN'           : 3000 * MeV
+                   , 'Bachelor_BPVIPCHI2_MIN' : 40.
+                   , 'XiDaughter_BPVIPCHI2_MIN' : 50.
+                   , 'LooseDaughter_BPVIPCHI2_MIN' : 20.
+                   , 'LambdaDeltaZ_MIN'       :  5.0 * mm
+                   , 'Hyperon_BPVLTIME_MIN'   :  5.0 * picosecond
+                   , 'PostVertexChi2_MIN'     :  5.0
+                   , 'LambdaPr_PT_MIN'        : 500. * MeV
+                   , 'LambdaPi_PT_MIN'        : 100. * MeV
+      } ## end of 'CONFIG'
+}  ## end of default_config
+#-------------------------------------------------------------------------------------------------------------
+class StrippingS2HyperonsConf(LineBuilder) :
+
+       __configuration_keys__ = default_config['CONFIG'].keys()
+
+       def __init__(self, name, config) :
+           LineBuilder.__init__(self, name, config)
+           self.name = name
+           self.config = config
+
+
+
+           self.LongPionsList = MergedSelection("LongPionsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")])
+
+           self.DownstreamPionsList = MergedSelection("DownstreamPionsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")])
+
+           self.LongProtonsList = MergedSelection("LongProtonsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLooseProtons/Particles")])
+
+           self.DownstreamProtonsList = MergedSelection("DownstreamProtonsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdNoPIDsDownProtons/Particles")])
+
+           self.LongKaonsList = MergedSelection("LongKaonsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")])
+
+           self.DownstreamKaonsList = MergedSelection("DownstreamKaonsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdNoPIDsDownKaons/Particles")])
+
+           self.GoodLongPionsList = self.createSubSel( OutputList = "GoodLongPionsFor" + self.name,
+                                               InputList = self.LongPionsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                               " & (TRGHOSTPROB <%(TrGhostProbMax)s )"  % self.config ) #\
+                                              # " & (PIDK < %(PionPIDK)s )" % self.config )
+
+           self.GoodDownstreamPionsList = self.createSubSel( OutputList = "GoodDownstreamPionsFor" + self.name,
+                                               InputList = self.DownstreamPionsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s)"  % self.config ) #\
+                                               #" & (PIDK < %(PionPIDK)s )" % self.config )
+
+           self.GoodLongProtonsList = self.createSubSel( OutputList = "GoodLongProtonsFor" + self.name,
+                                               InputList = self.LongProtonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                               " & (TRGHOSTPROB <%(TrGhostProbMax)s )"  % self.config ) #\
+                                              # " & (PIDK < %(PionPIDK)s )" % self.config )
+
+           self.GoodDownstreamProtonsList = self.createSubSel( OutputList = "GoodDownstreamProtonsFor" + self.name,
+                                               InputList = self.DownstreamProtonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s)"  % self.config ) #\
+                                               #" & (PIDK < %(PionPIDK)s )" % self.config )
+
+           self.GoodLongKaonsList = self.createSubSel( OutputList = "GoodLongKaonsFor" + self.name,
+                                               InputList = self.LongKaonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                               " & (TRGHOSTPROB < %(TrGhostProbMax)s )" % self.config ) #\
+                                               #" & (PIDK > %(KaonPIDK)s )" % self.config )
+
+
+           self.GoodDownstreamKaonsList = self.createSubSel( OutputList = "GoodDownstreamKaonsFor" + self.name,
+                                               InputList = self.DownstreamKaonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"% self.config )#\
+                                              # " & (PIDK > %(KaonPIDK)s )" % self.config )
+
+
+
+
+
+           self.LambdaListLooseDD = MergedSelection("StdLooseDDLambdaFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")])
+
+           self.LambdaListLooseLL = MergedSelection("StdLooseLLLambdaFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")])
+
+           self.LambdaListLL =  self.createSubSel(OutputList = "LambdaLLFor" + self.name,
+                                                InputList = self.LambdaListLooseLL ,
+                                                Cuts = "(MAXTREE('p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                                                "& (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                                                "& (MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMinLL)s ) "\
+                                                "& (MINTREE('pi-'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                                                "& (MINTREE('p+'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                                                "& (ADMASS('Lambda0') < %(LambdaLLMassWin)s ) "
+                                                "& (VFASPF(VCHI2/VDOF) < %(LambdaLLVtxChi2Max)s ) "\
+                                                "& (VFASPF(VZ) > %(LambdaLLMinVZ)s ) " \
+                                                "& (VFASPF(VZ) < %(LambdaLLMaxVZ)s ) " \
+                                                "& (BPVLTIME() > %(LambdaLLMinDecayTime)s )" % self.config \
+                                                )
+
+           self.LambdaListDD =  self.createSubSel(OutputList = "LambdaDDFor" + self.name,
+                                                InputList = self.LambdaListLooseDD ,
+                                                Cuts = "(MAXTREE('p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                                                "& (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                                                "& (MAXTREE('p+'==ABSID, PROBNNp) > %(ProbNNpMinDD)s ) "\
+                                                "& (ADMASS('Lambda0') < %(LambdaDDMassWin)s ) " \
+                                                "& (VFASPF(VCHI2/VDOF) <  %(LambdaDDVtxChi2Max)s ) "\
+                                                "& (VFASPF(VZ) < %(LambdaDDMaxVZ)s ) " \
+                                                "& (VFASPF(VZ) > %(LambdaDDMinVZ)s )" % self.config \
+                                                )
+
+           self.LambdaList = MergedSelection("LambdaFor" + self.name,
+                                             RequiredSelections = [self.LambdaListLL, self.LambdaListDD]
+                                             )
+
+           self.XizeroList = self.makeXizero()
+           self.XiminusList = self.makeXiminus()
+           self.OmegaminusList = self.makeOmegaminus()
+           self.XizeroS3List = self.makeXizeroS3()
+           self.OmegaS3List = self.makeOmegaS3()
+
+       def createSubSel( self, OutputList, InputList, Cuts ) :
+           '''create a selection using a FilterDesktop'''
+           filter = FilterDesktop(Code = Cuts)
+           return Selection( OutputList,
+                             Algorithm = filter,
+                             RequiredSelections = [ InputList ] )
+       def createCombinationSel( self, OutputList,
+                                 DecayDescriptor,
+                                 DaughterLists,
+                                 DaughterCuts = {} ,
+                                 PreVertexCuts = "AALL",
+                                 PostVertexCuts = "ALL" ) :
+           '''create a selection using a ParticleCombiner with a single decay descriptor'''
+           combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                        DaughtersCuts = DaughterCuts,
+                                        MotherCut = PostVertexCuts,
+                                        CombinationCut = PreVertexCuts,
+                                        ReFitPVs = True)
+           return Selection ( OutputList,
+                              Algorithm = combiner,
+                              RequiredSelections = DaughterLists)
+
+
+
+#------------------------------------------------------------------------------------------
+
+       def makeXizero( self ):
+
+              ''' Make a Xi0 candidate from long tracks '''
+              Xi02PPiLL = self.createCombinationSel(OutputList = "Xi02PPiLL"+ self.name,
+                                                           DecayDescriptor = "[Xi0 -> p+ pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.GoodLongProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 1.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(XiDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s) & "\
+                                                                             " (BPVIPCHI2() > %(XiDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi0') < 2*%(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(PostVertexChi2_MIN)s ) & "\
+                                                                             " (BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s)  & "\
+                                                                             "(ADMASS('Xi0') < %(XiMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+                                                           )
+
+
+              ''' Make a Xi0 candidate  from downstream tracks'''
+              Xi02PPiDD = self.createCombinationSel(OutputList = "Xi02PPiDD"+ self.name,
+                                                           DecayDescriptor = "[Xi0 -> p+ pi-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamPionsList, self.GoodDownstreamProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 2.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(XiDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s ) & "\
+                                                                             " (BPVIPCHI2() > %(XiDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi0') < 2*%(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s ) &"\
+                                                                             "(BPVLTIME() >  %(Hyperon_BPVLTIME_MIN)s ) & "\
+                                                                             "(ADMASS('Xi0') < %(XiMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+
+                                                           )
+## Xi02PPi is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+              Xi02PPi = MergedSelection("Xi02PPi"+self.name,
+                                                 RequiredSelections = [Xi02PPiDD,Xi02PPiLL] )
+
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## this is *also* a Selection, but it is "more selective"
+## than  Xi02PPi in the sense that it passes only events when something
+## is in the output list
+              Xi02PPiSelection = Selection( "Xi02PPiSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Xi02PPi])
+              Xi02PPiLine = StrippingLine (self.name + "Xi02PPi",
+                                                         algos = [Xi02PPiSelection])
+              self.registerLine (Xi02PPiLine)
+
+##  --------------------  end of makeXizero  ------------
+#------------------------------------------------------------------------------------------
+
+       def makeOmegaminus( self ):
+
+              ''' Make an Omega minus candidate '''
+              Omegaminus2LambdaPiLLL = self.createCombinationSel(OutputList = "Omegaminus2LambdaPiLLL"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.LambdaListLL],
+                                                           DaughterCuts    = {"pi-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s) &"\
+                                                                             "(BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+                                                           )
+
+
+              ''' Make an Omega minus candidate '''
+              Omegaminus2LambdaPiDDL = self.createCombinationSel(OutputList = "Omegaminus2LambdaPiDDL"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.LambdaListDD],
+                                                           DaughterCuts    = {"pi-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s) &"\
+                                                                             "(BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+                                                           )
+
+              ''' Make an Omega minus candidate '''
+              Omegaminus2LambdaPiDDD = self.createCombinationSel(OutputList = "Omegaminus2LambdaPiDDD"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 pi-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamPionsList, self.LambdaListDD],
+                                                           DaughterCuts    = {"pi-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s) &"\
+                                                                             "(BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+                                                           )
+
+
+## Omegaminus2LambdaPi is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+
+
+              Omegaminus2LambdaPi = MergedSelection("Omegaminus2LambdaPi"+self.name,
+                                                 #RequiredSelections = [Omegaminus2LambdaPiLLL,Omegaminus2LambdaPiDDL,Omegaminus2LambdaPiDDD] )
+                                                 RequiredSelections = [Omegaminus2LambdaPiDDL,Omegaminus2LambdaPiDDD,Omegaminus2LambdaPiLLL] )
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## this is *also* a Selection, but it is "more selective"
+## than  Omegaminus2LambdaPi in the sense that it passes only events when something
+## is in the output list
+              Omegaminus2LambdaPiSelection = Selection( "Omegaminus2LambdaPiSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Omegaminus2LambdaPi])
+              Omegaminus2LambdaPiLine = StrippingLine (self.name + "Omegaminus2LambdaPi",
+                                                         algos = [Omegaminus2LambdaPiSelection])
+              self.registerLine (Omegaminus2LambdaPiLine)
+
+##  --------------------  end of makeOmegaminus  ------------
+#------------------------------------------------------------------------------------------
+
+       def makeXiminus( self ):
+
+              ''' Make a Xi minus candidate from long tracks '''
+              Xim2PPiPiLLL = self.createCombinationSel(OutputList = "Xim2PPiPiLLL"+ self.name,
+                                                           DecayDescriptor = "[Xi- -> p+ pi- pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.GoodLongProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 1.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi-') < 2*%(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(PostVertexChi2_MIN)s ) & "\
+                                                                             " (BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s)  & "\
+                                                                             "(ADMASS('Xi-') < %(XiMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+                                                           )
+
+
+              ''' Make a Xi minus candidate  from downstream tracks'''
+              Xim2PPiPiDDD = self.createCombinationSel(OutputList = "Xim2PPiPiDDD"+ self.name,
+                                                           DecayDescriptor = "[Xi- -> p+ pi- pi-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamPionsList, self.GoodDownstreamProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 2.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s ) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi-') < 2*%(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s ) &"\
+                                                                             "(BPVLTIME() >  %(Hyperon_BPVLTIME_MIN)s ) & "\
+                                                                             "(ADMASS('Xi-') < %(XiMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+
+                                                           )
+## Xim2PPiPi is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+              Xim2PPiPi = MergedSelection("Xim2PPiPi"+self.name,
+                                                 RequiredSelections = [Xim2PPiPiDDD,Xim2PPiPiLLL] )
+
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## this is *also* a Selection, but it is "more selective"
+## than  Xim2PPiPi in the sense that it passes only events when something
+## is in the output list
+              Xim2PPiPiSelection = Selection( "Xim2PPiPiSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Xim2PPiPi])
+              Xim2PPiPiLine = StrippingLine (self.name + "Xim2PPiPi",
+                                                         algos = [Xim2PPiPiSelection])
+              self.registerLine (Xim2PPiPiLine)
+
+##  --------------------  end of makeXiminus  ------------
+#------------------------------------------------------------------------------------------
+
+       def makeOmegaS3( self ):
+
+              ''' Make an Omega minus candidate from long tracks '''
+              Om2PPiPiLLL = self.createCombinationSel(OutputList = "Om2PPiPiLLL"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> p+ pi- pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.GoodLongProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 1.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < 2*%(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(PostVertexChi2_MIN)s ) & "\
+                                                                             " (BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s)  & "\
+                                                                             "(ADMASS('Omega-') < %(OmegaMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+                                                           )
+
+
+              ''' Make an Omega minus candidate  from downstream tracks'''
+              Om2PPiPiDDD = self.createCombinationSel(OutputList = "Om2PPiPiDDD"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> p+ pi- pi-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamPionsList, self.GoodDownstreamProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 2.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s ) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < 2*%(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s ) &"\
+                                                                             "(BPVLTIME() >  %(Hyperon_BPVLTIME_MIN)s ) & "\
+                                                                             "(ADMASS('Omega-') < %(OmegaMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+
+                                                           )
+## Om2PPiPi is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+              Om2PPiPi = MergedSelection("Om2PPiPi"+self.name,
+                                                 RequiredSelections = [Om2PPiPiDDD,Om2PPiPiLLL] )
+
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## Ximinus2Lambda2PiSelection is *also* a Selection, but it is "more selective"
+## than  Om2PPiPi in the sense that it passes only events when something
+## is in the output list
+              Om2PPiPiSelection = Selection( "Om2PPiPiSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Om2PPiPi])
+              Om2PPiPiLine = StrippingLine (self.name + "Om2PPiPi",
+                                                         algos = [Om2PPiPiSelection])
+              self.registerLine (Om2PPiPiLine)
+
+##  --------------------  end of makeOmegaS3  ------------
+#------------------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------------------
+
+       def makeXizeroS3( self ):
+
+              ''' Make a Xi0 candidate from long tracks '''
+              Xi02PKLL = self.createCombinationSel(OutputList = "Xi02PKLL"+ self.name,
+                                                           DecayDescriptor = "[Xi0 -> p+ K-]cc",
+                                                           DaughterLists   = [self.GoodLongKaonsList, self.GoodLongProtonsList],
+                                                           DaughterCuts    = {"K-"      : "(PT> %(Bachelor_PT_MIN)s ) & (PIDK > %(KaonPIDK)s ) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi0') < 2*%(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(PostVertexChi2_MIN)s ) & "\
+                                                                             " (BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s)  & "\
+                                                                             "(ADMASS('Xi0') < 1.5*%(OmegaMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+                                                           )
+
+
+              ''' Make a Xi0 candidate  from downstream tracks'''
+              Xi02PKDD = self.createCombinationSel(OutputList = "Xi02PKDD"+ self.name,
+                                                           DecayDescriptor = "[Xi0 -> p+ K-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamKaonsList, self.GoodDownstreamProtonsList],
+                                                           DaughterCuts    = {"K-"      : "(PT> %(Bachelor_PT_MIN)s ) & (PIDK > %(KaonPIDK)s ) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s ) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi0') < 3*%(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s ) &"\
+                                                                             "(BPVLTIME() >  %(Hyperon_BPVLTIME_MIN)s ) & "\
+                                                                             "(ADMASS('Xi0') < 1.5*%(OmegaMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+
+                                                           )
+## Xi02PK is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+              Xi02PK = MergedSelection("Xi02PK"+self.name,
+                                                 RequiredSelections = [Xi02PKDD,Xi02PKLL] )
+
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## this is *also* a Selection, but it is "more selective"
+## than  Xi02PK in the sense that it passes only events when something
+## is in the output list
+              Xi02PKSelection = Selection( "Xi02PKSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Xi02PK])
+              Xi02PKLine = StrippingLine (self.name + "Xi02PK",
+                                                         algos = [Xi02PKSelection])
+              self.registerLine (Xi02PKLine)
+
+##  --------------------  end of makeXizeroS3  ------------
+#------------------------------------------------------------------------------------------
-- 
GitLab


From aa1c9e1687e1529d412fdba14880ac01af9b0735 Mon Sep 17 00:00:00 2001
From: Alessandro Bertolin <alessandro.bertolin@pd.infn.it>
Date: Mon, 13 Sep 2021 15:48:02 +0200
Subject: [PATCH 15/22] B2OC Selections updates for the incremental restripping
 of 2016 data

---
 .../StrippingB2OC/Beauty2Charm_Lb2XBuilder.py | 96 +++++++++++++++----
 .../StrippingB2OC/StrippingBeauty2Charm.py    | 14 ++-
 2 files changed, 91 insertions(+), 19 deletions(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py
index a77758161..e13427945 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py
@@ -29,7 +29,9 @@ class LcBuilder(object):
         self.kaons = kaons
         self.protons = protons
         self.config = config
-        self.pkpi = [self._makeLc2pKpi()]
+        self.pkpi = [self._makeLc2phh()]
+        self.pkk = [self._makeLc2phh("PKK")]
+        self.ppipi = [self._makeLc2phh("PPiPi")]
         self.xic_pkpi = [self._makeXic2pKpi()]
         self.xic0_pkkpi = [self._makeXic02pKKpi()]
         self.omegac0_pkkpi = [self._makeOmegac02pKKpi()]
@@ -68,8 +70,23 @@ class LcBuilder(object):
                             self.omegac0_pkkpi_tight)
         ]
 
-    def _makeLc2pKpi(self):
-        '''Makes Lc -> p K pi + cc'''
+    def _makeLc2phh(self,mode="PKPi"):
+        '''Makes Lc -> p h h' + cc
+           mode:
+               "PKPi" : Lc -> p K pi
+               "PKK"  : Lc -> p K K
+               "PPiPi": Lc -> p pi pi
+        '''
+        decays = {
+            "PKPi" : "[Lambda_c+ -> p+ K- pi+]cc",
+            "PKK"  : "[Lambda_c+ -> p+ K- K+]cc",
+            "PPiPi": "[Lambda_c+ -> p+ pi- pi+]cc"
+        }
+        inputs = {
+            "PKPi" : [self.pions, self.kaons, self.protons],
+            "PKK"  : [self.kaons, self.protons],
+            "PPiPi": [self.pions, self.protons]
+        }
         dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
         comboCuts = [
             LoKiCuts(['ASUMPT'], self.config).code(),
@@ -90,11 +107,11 @@ class LcBuilder(object):
             Combination12Cut=comboCuts12,
             CombinationCut=comboCuts,
             MotherCut=momCuts,
-            DecayDescriptors=["[Lambda_c+ -> p+ K- pi+]cc"])
+            DecayDescriptors=[decays[mode]])
         return Selection(
-            'Lc2PKPiBeauty2Charm',
+            "Lc2%sBeauty2Charm" % mode,
             Algorithm=cp,
-            RequiredSelections=[self.pions, self.kaons, self.protons])
+            RequiredSelections=inputs[mode])
 
     def _makeXic2pKpi(self):
         '''Makes Xic -> p K pi + cc'''
@@ -750,6 +767,8 @@ class Lb2XBuilder(object):
                  hhh, dst, lambda0, config):
 
         self.lc = lc.pkpi
+        self.lc_pkk = lc.pkk
+        self.lc_ppipi = lc.ppipi
         self.xic = lc.xic_pkpi
         self.xic0 = lc.xic0_pkkpi
         self.omegac0 = lc.omegac0_pkkpi
@@ -764,6 +783,8 @@ class Lb2XBuilder(object):
         self.d0_pid = d.hh_pid
         self.d0_k3pi_pid = d.k3pi_pid
         self.d0_k3pi = d.k3pi_pid_tighter1_narrow  #Tight PID cuts, 60 MeV mass window
+        self.d0_kshh_dd = d.kshh_dd_pid
+        self.d0_kshh_ll = d.kshh_ll_pid
         self.hh = hh
         self.hhh = hhh
         self.dst = dst
@@ -815,7 +836,7 @@ class Lb2XBuilder(object):
         # Sb -> D-+(HHH) p+-
         self._makeSb02DP()
         # Lb -> D0(HH/K3Pi) p+- H-+
-        self._makeLb2D0PH()
+        self._makeLb2D0HHPH()
         # Lb -> D0(HH) p+- p-+ (+WS)
         self._makeLb2D0PPbar()
         # Lb -> Lc+- 3Pi, KPiPi, ppbarPi, ppbarK (+WS)
@@ -862,7 +883,7 @@ class Lb2XBuilder(object):
         self._makeX2LcLc()
         # Lb -> Lc 5pi
         self._makeLb2Lc5Pi()
-        # Lb -> D0 Lambda0
+        # Lb -> D0 Lambda0, D0(HH/K3Pi)
         self._makeLb2D0Lambda0()
 
         # Lb -> D+ p h- h-
@@ -888,8 +909,10 @@ class Lb2XBuilder(object):
         # B0 -> Lambdac+ Lambda0bar h-
         self._makeB2LcLambda0barH()
 
-        # Lb -> D0(K3pi) p K
-        self._makeLb2D0pk()
+        # Lb -> D0 p h (D02K3Pi/D02KsDDHH/D02KsLLHH)
+        self._makeLb2D0ph('D02K3Pi', self.d.k3pi_pid)
+        self._makeLb2D0ph('D02KsDDHH', self.d.kshh_dd_pid)
+        self._makeLb2D0ph('D02KsLLHH', self.d.kshh_ll_pid)
         # Lb -> D(s)- D0(K3Pi/HH) p
         self._makeLb2DD0p('D02K3Pi', self.d.k3pi_pid)
         self._makeLb2DD0p('D2HH', self.d.hh_pid)
@@ -984,10 +1007,26 @@ class Lb2XBuilder(object):
         #inputs = {'Lb2LcPiNoIPWS': self.lc+pions}
         inputs = {'Lb2LcPiNoIPWS': self.lc_tight + pions}
         noip_ws = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config, False)
+        decays = {'Lb2LcPi': ["[Lambda_b0 -> Lambda_c+ pi-]cc"] }
+        inputs = {'Lb2LcPi': self.lc_pkk + pions}
+        rs_pkk = makeB2XSels(decays, 'Lc2PKK', inputs, config)
+        decays = {'Lb2LcPiWS': ["[Lambda_b0 -> Lambda_c+ pi+]cc"] }
+        inputs = {'Lb2LcPiWS': self.lc_pkk + pions}
+        ws_pkk = makeB2XSels(decays, 'Lc2PKK', inputs, config)
+        decays = {'Lb2LcPi': ["[Lambda_b0 -> Lambda_c+ pi-]cc"] }
+        inputs = {'Lb2LcPi': self.lc_ppipi + pions}
+        rs_ppipi = makeB2XSels(decays, 'Lc2PPiPi', inputs, config)
+        decays = {'Lb2LcPiWS': ["[Lambda_b0 -> Lambda_c+ pi+]cc"] }
+        inputs = {'Lb2LcPiWS': self.lc_ppipi + pions}
+        ws_ppipi = makeB2XSels(decays, 'Lc2PPiPi', inputs, config)
         self.lines.append(ProtoLine(rs, 1.0))
         self.lines.append(ProtoLine(ws, 0.1))
         self.lines.append(ProtoLine(noip, 1.0))
         self.lines.append(ProtoLine(noip_ws, 0.1))
+        self.lines.append(ProtoLine(rs_pkk, 1.0))
+        self.lines.append(ProtoLine(ws_pkk, 0.1))
+        self.lines.append(ProtoLine(rs_ppipi, 1.0))
+        self.lines.append(ProtoLine(ws_ppipi, 0.1))
 
     def _makeB2Lcpbar(self):
         '''Make RS and WS B -> Lc pbar + cc.'''
@@ -1245,8 +1284,24 @@ class Lb2XBuilder(object):
             'Lb2LcKKPiWS': self.lc + kkpi
         }
         ws = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        decays = {'Lb2LcPiPiPi': ["[Lambda_b0 -> Lambda_c+ a_1(1260)-]cc"]}
+        inputs = {'Lb2LcPiPiPi': self.lc_pkk + pipipi}
+        rs_pkk = makeB2XSels(decays, 'Lc2PKK', inputs, config)
+        decays = {'Lb2LcPiPiPiWS': ["[Lambda_b0 -> Lambda_c+ a_1(1260)+]cc"]}
+        inputs = {'Lb2LcPiPiPiWS': self.lc_pkk + pipipi}
+        ws_pkk = makeB2XSels(decays, 'Lc2PKK', inputs, config)
+        decays = {'Lb2LcPiPiPi': ["[Lambda_b0 -> Lambda_c+ a_1(1260)-]cc"]}
+        inputs = {'Lb2LcPiPiPi': self.lc_ppipi + pipipi}
+        rs_ppipi = makeB2XSels(decays, 'Lc2PPiPi', inputs, config)
+        decays = {'Lb2LcPiPiPiWS': ["[Lambda_b0 -> Lambda_c+ a_1(1260)+]cc"]}
+        inputs = {'Lb2LcPiPiPiWS': self.lc_ppipi + pipipi}
+        ws_ppipi = makeB2XSels(decays, 'Lc2PPiPi', inputs, config)
         self.lines.append(ProtoLine(rs, 1.0))
         self.lines.append(ProtoLine(ws, 0.1))
+        self.lines.append(ProtoLine(rs_pkk, 1.0))
+        self.lines.append(ProtoLine(ws_pkk, 0.1))
+        self.lines.append(ProtoLine(rs_ppipi, 1.0))
+        self.lines.append(ProtoLine(ws_ppipi, 0.1))
 
         config = deepcopy(self.config)
         config['AM_MIN'] = '4750.*MeV'
@@ -1279,7 +1334,7 @@ class Lb2XBuilder(object):
         self.lines.append(ProtoLine(rs, 1.0))
         self.lines.append(ProtoLine(ws, 0.1))
 
-    def _makeLb2D0PH(self):
+    def _makeLb2D0HHPH(self):
         '''Makes RS Lb -> D0(HH/HHHH) p+- H-+ + c.c. and WS lines'''
         config = deepcopy(self.config)
         config['AM_MAX'] = '9000*MeV'
@@ -1864,18 +1919,23 @@ class Lb2XBuilder(object):
         rs = makeB2XSels(decays, 'D02HH', inputs, self.config)
         self.lines.append(ProtoLine(rs, 1.0))
 
-    def _makeLb2D0pk(self):
-        '''Make RS Lb -> D0(K3pi) p K + cc.'''
+    def _makeLb2D0ph(self, dname, d2x):
+        '''Make RS Lb -> D0(K3pi) p h + cc.'''
         protons_pid = self.protons_pid
         kaons_pid = self.topoKaons_pid
-        decays = {'Lb2D0pK': ["[Lambda_b0 -> D0 p+ K-]cc"]}
-        inputs = {'Lb2D0pK': self.d.k3pi_pid + protons_pid + kaons_pid}
-        rs = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
-        self.lines.append(ProtoLine(rs, 1.0))
+        pions_pid = self.topoPions_pid
+        decays_k = {'Lb2D0pK': ["Lambda_b0 -> D0 p+ K-", "Lambda_b0 -> D0 p~- K+"]}
+        inputs_k = {'Lb2D0pK': d2x + protons_pid + kaons_pid}
+        rs_k = makeB2XSels(decays_k, dname, inputs_k, self.config)
+        self.lines.append(ProtoLine(rs_k, 1.0))
+        decays_pi = {'Lb2D0pPi': ["Lambda_b0 -> D0 p+ pi-", "Lambda_b0 -> D0 p~- pi+"]}
+        inputs_pi = {'Lb2D0pPi': d2x + protons_pid + pions_pid}
+        rs_pi = makeB2XSels(decays_pi, dname, inputs_pi, self.config)
+        self.lines.append(ProtoLine(rs_pi, 1.0))
 
     def _makeLb2DD0p(self, dname, d2x):
         '''Make Lb -> D(s)- D0(K3pi) p + cc.'''
-        decays = {'Lb2DD0pD2HHH': ["[Lambda_b0 -> D- D0 p+]cc"]}
+        decays = {'Lb2DD0pD2HHH': ["Lambda_b0 -> D- D0 p+", "Lambda_b0 -> D+ D0 p~-"]}
         inputs = {'Lb2DD0pD2HHH': self.d.hhh_cf_pid + d2x + self.protons_pid}
         rs = makeB2XSels(decays, dname, inputs, self.config)
         self.lines.append(ProtoLine(rs, 1.0))
diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/StrippingBeauty2Charm.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/StrippingBeauty2Charm.py
index f4a0d975a..dea06de96 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/StrippingBeauty2Charm.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/StrippingBeauty2Charm.py
@@ -737,7 +737,7 @@ default_config = {
             'RUN_BY_DEFAULT': True,  # False = lines off by default
             'RUN_RE': ['.*'],
             # Defaults are defined in, eg, Beauty2Charm_B2DXBuilder.py.  Put the full
-            # line name here to override. E.g. 'B2D0HD2HHBeauty2CharmTOSLine':0.5.
+            # line name here to override. E.g. 'B2D0HD2HHBeauty2CharmTOSLine': 0.5.
             'B02DKLTUBD2HHHBeauty2CharmLine': 0.04,
             'B02DsKPiPiLTUBD2HHHBeauty2CharmLine': 0.004,
             'B02DsstarKLTUBDsstar2DGammaD2HHHBeauty2CharmLine': 0.19,
@@ -1345,8 +1345,12 @@ default_config = {
             #########################
             'StrippingLb2LcKLc2PKPiBeauty2CharmLine',
             'StrippingLb2LcPiLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiLc2PPiPiBeauty2CharmLine',
             'StrippingLb2LcKWSLc2PKPiBeauty2CharmLine',
             'StrippingLb2LcPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiWSLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiWSLc2PPiPiBeauty2CharmLine',
             'StrippingLb2LcPiNoIPWSLc2PKPiBeauty2CharmLine',
             'StrippingLb2XicPiXic2PKPiBeauty2CharmLine',
             'StrippingLb2XicKXic2PKPiBeauty2CharmLine',
@@ -1401,8 +1405,12 @@ default_config = {
             'StrippingLb2LcppbarPiLc2PKPiBeauty2CharmLine',
             'StrippingLb2LcKPiPiLc2PKPiBeauty2CharmLine',
             'StrippingLb2LcPiPiPiLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiLc2PPiPiBeauty2CharmLine',
             'StrippingLb2LcKPiPiWSLc2PKPiBeauty2CharmLine',
             'StrippingLb2LcPiPiPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiWSLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiWSLc2PPiPiBeauty2CharmLine',
             'StrippingLb2LcppbarKWSLc2PKPiBeauty2CharmLine',
             'StrippingLb2LcppbarPiWSLc2PKPiBeauty2CharmLine',
             'StrippingLb2LcKKPiWSLc2PKPiBeauty2CharmLine',
@@ -1468,6 +1476,10 @@ default_config = {
             'StrippingXib2D0pPiPiD02HHBeauty2CharmLine',
             'StrippingXib2D0pKPiD02HHBeauty2CharmLine',
             'StrippingLb2D0pKD02K3PiBeauty2CharmLine',
+            'StrippingLb2D0pKD02KsDDHHBeauty2CharmLine',
+            'StrippingLb2D0pKD02KsLLHHBeauty2CharmLine',
+            'StrippingLb2D0pPiD02KsDDHHBeauty2CharmLine',
+            'StrippingLb2D0pPiD02KsLLHHBeauty2CharmLine',
             'StrippingLb2DD0pD2HHHD02K3PiBeauty2CharmLine',
             'StrippingLb2DD0pD2HHHD2HHBeauty2CharmLine',
             'StrippingXibc2DpKD2HHHBeauty2CharmLine',
-- 
GitLab


From 62a088c9f38cba5cd6026c6abf6a7375fbfb5cfa Mon Sep 17 00:00:00 2001
From: Ao Xu <ao.xu@cern.ch>
Date: Mon, 13 Sep 2021 16:03:49 +0200
Subject: [PATCH 16/22] BnoC line Lb2ph for v28r2p1

---
 .../StrippingBnoC/StrippingXib2LbXLb2ph.py    | 211 ++++++++++++++++++
 .../StrippingBnoC/__init__.py                 |   2 +-
 2 files changed, 212 insertions(+), 1 deletion(-)
 create mode 100644 Phys/StrippingSelections/python/StrippingSelections/StrippingBnoC/StrippingXib2LbXLb2ph.py

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingBnoC/StrippingXib2LbXLb2ph.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingBnoC/StrippingXib2LbXLb2ph.py
new file mode 100644
index 000000000..836258945
--- /dev/null
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingBnoC/StrippingXib2LbXLb2ph.py
@@ -0,0 +1,211 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting Xib -> Lb pi/mu, Lb -> p h
+
+Authors: Ao Xu
+"""
+
+__author__ = ["Ao Xu"]
+__date__ = "06/09/2021"
+__version__ = "1.0"
+
+__all__ = ("Xib2LbXLb2phLines",
+           "default_config")
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+from StandardParticles import (StdAllNoPIDsPions,
+                               StdAllNoPIDsProtons,
+                               StdAllLooseMuons)
+
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder, checkConfig
+
+
+
+default_config = {
+    "NAME"        : "Xib2LbXLb2ph",
+    "WGs"         : ["BnoC"],
+    "BUILDERTYPE" : "Xib2LbXLb2phLines",
+    "CONFIG"      : { "PrescaleXib2LbX"  : 1,
+                      "MinPTLb2ph_h"     : 1000,
+                      "MinPTLb2ph_p"     : 1000,
+                      "MinPTXib2LbX_h"   : 100,
+                      "MinIPChi2Lb2ph"   : 8,
+                      "MinIPChi2Xib2LbX" : 4,
+                      "TrChi2"           : 4,
+                      "TrGhostProb"      : 0.5,
+                      "MaxPTLb2ph"       : 1500,
+                      "MaxIPChi2Lb2ph"   : 12,
+                      "DOCA"             : 0.08,
+                      "VCHI2"            : 10,
+                      "XibVCHI2"         : 25,
+                      "BVDCHI2"          : 100,
+                      "BPT"              : 1500,
+                      "XibPT"            : 1500,
+                      "BTAU"             : 0.0006,
+                      "LbCombMassLow"    : 4900,
+                      "LbCombMassHigh"   : 6200,
+                      "LbMassLow"        : 5000,
+                      "LbMassHigh"       : 6100,
+                      "XibCombMassLow"   : 5100,
+                      "XibCombMassHigh"  : 6300,
+                      "XibMassLow"       : 5200,
+                      "XibMassHigh"      : 6200,
+                      "ConeAngles"       : [ 1.0, 1.5, 1.7, 2.0 ] },
+    "STREAMS"     : [ "Bhadron" ]
+}
+
+
+
+class Xib2LbXLb2phLines( LineBuilder ) :
+    """Class defining the Xib -> Lb pi/mu, Lb -> ph stripping lines"""
+
+    __configuration_keys__ = default_config["CONFIG"].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        # inputs
+        pion_filter = FilterDesktop( Code = require_all(
+            "TRGHOSTPROB < {}".format(config["TrGhostProb"]),
+            "TRCHI2DOF < {}".format(config["TrChi2"]),
+            "PT > {} * MeV".format(config["MinPTLb2ph_h"]),
+            "MIPCHI2DV(PRIMARY) > {}".format(config["MinIPChi2Lb2ph"])) )
+        self.pions = Selection( "pions_for_"+name,
+                                 Algorithm = pion_filter,
+                                 RequiredSelections = [StdAllNoPIDsPions] )
+        proton_filter = FilterDesktop( Code = require_all(
+            "TRGHOSTPROB < {}".format(config["TrGhostProb"]),
+            "TRCHI2DOF < {}".format(config["TrChi2"]),
+            "PT > {} * MeV".format(config["MinPTLb2ph_p"]),
+            "MIPCHI2DV(PRIMARY) > {}".format(config["MinIPChi2Lb2ph"])) )
+        self.protons = Selection( "protons_for_"+name,
+                                  Algorithm = proton_filter,
+                                  RequiredSelections = [StdAllNoPIDsProtons] )
+        soft_pion_filter = FilterDesktop( Code = require_all(
+            "TRGHOSTPROB < {}".format(config["TrGhostProb"]),
+            "TRCHI2DOF < {}".format(config["TrChi2"]),
+            "PT > {} * MeV".format(config["MinPTXib2LbX_h"]),
+            "MIPCHI2DV(PRIMARY) > {}".format(config["MinIPChi2Xib2LbX"])) )
+        self.soft_pions = Selection( "soft_pions_for_"+name,
+                                     Algorithm = soft_pion_filter,
+                                     RequiredSelections = [StdAllNoPIDsPions] )
+        muon_filter = FilterDesktop( Code = require_all(
+            "TRGHOSTPROB < {}".format(config["TrGhostProb"]),
+            "TRCHI2DOF < {}".format(config["TrChi2"]),
+            "PT > {} * MeV".format(config["MinPTXib2LbX_h"]),
+            "MIPCHI2DV(PRIMARY) > {}".format(config["MinIPChi2Xib2LbX"])) )
+        self.muons = Selection( "muons_for_"+name,
+                                Algorithm = muon_filter,
+                                RequiredSelections = [StdAllLooseMuons] )
+
+        # Lb -> p h
+        Lb2phName = name + "Lb2ph"
+        self.lb = self._make_lb(Lb2phName,config)
+
+        # Xib- -> Lb pi-
+        decay = "[Xi_b- -> Lambda_b0 pi-]cc"
+        inputs = [self.lb,self.soft_pions]
+        line_name = name + "Xib2LbPiLb2ph"
+        xib2lbpi_rs = self._make_xib(line_name,decay,inputs,config)
+        self._make_line(line_name,xib2lbpi_rs,config["PrescaleXib2LbX"])
+
+        # (WS) Xib- -> Lb pi+
+        decay = "[Xi_b- -> Lambda_b0 pi+]cc"
+        inputs = [self.lb,self.soft_pions]
+        line_name = name + "Xib2LbPiWSLb2ph"
+        xib2lbpi_ws = self._make_xib(line_name,decay,inputs,config)
+        self._make_line(line_name,xib2lbpi_ws,config["PrescaleXib2LbX"])
+
+        # Xib- -> Lb mu- (nu)
+        decay = "[Xi_b- -> Lambda_b0 mu-]cc"
+        inputs = [self.lb,self.muons]
+        line_name = name + "Xib2LbMuLb2ph"
+        xib2lbmu_rs = self._make_xib(line_name,decay,inputs,config)
+        self._make_line(line_name,xib2lbmu_rs,config["PrescaleXib2LbX"])
+
+        # (WS) Xib- -> Lb mu+ (nu)
+        decay = "[Xi_b- -> Lambda_b0 mu+]cc"
+        inputs = [self.lb,self.muons]
+        line_name = name + "Xib2LbMuWSLb2ph"
+        xib2lbmu_ws = self._make_xib(line_name,decay,inputs,config)
+        self._make_line(line_name,xib2lbmu_ws,config["PrescaleXib2LbX"])
+
+
+    def _make_lb(self,name,config):
+        """make Lb -> p h decay
+        """
+        cc = require_all(
+                "AMAXDOCA('') < {}".format(config["DOCA"]),
+                "AM > {} * MeV".format(config["LbCombMassLow"]),
+                "AM < {} * MeV".format(config["LbCombMassHigh"]) )
+        mc = require_all(
+                "MAXTREE(((ABSID=='p+')|(ABSID=='pi+')),PT) > {} * MeV".format(config["MaxPTLb2ph"]),
+                "MAXTREE(((ABSID=='p+')|(ABSID=='pi+')),MIPCHI2DV(PRIMARY)) > {}".format(config["MaxIPChi2Lb2ph"]),
+                "PT > {} * MeV".format(config["BPT"]),
+                "VFASPF(VCHI2) < {}".format(config["VCHI2"]),
+                "BPVVDCHI2 > {}".format(config["BVDCHI2"]),
+                "BPVLTIME() > {}".format(config["BTAU"]),
+                "M > {} * MeV".format(config["LbMassLow"]),
+                "M < {} * MeV".format(config["LbMassHigh"]) )
+        combine_lb2ph = CombineParticles( DecayDescriptors = ["[Lambda_b0 -> p+ pi-]cc"],
+                CombinationCut = cc,
+                MotherCut = mc )
+
+        return Selection( name,
+                          Algorithm = combine_lb2ph,
+                          RequiredSelections = [ self.protons, self.pions ] )
+
+
+    def _make_xib(self,name,decay,inputs,config):
+        """make Xib -> Lb X decay
+        """
+        cc = require_all(
+                "AM > {} * MeV".format(config["XibCombMassLow"]),
+                "AM < {} * MeV".format(config["XibCombMassHigh"]) )
+        mc = require_all(
+                "PT > {} * MeV".format(config["XibPT"]),
+                "VFASPF(VCHI2) < {}".format(config["XibVCHI2"]),
+                "M > {} * MeV".format(config["XibMassLow"]),
+                "M < {} * MeV".format(config["XibMassHigh"]) )
+        combine_xib2lbx = CombineParticles( DecayDescriptors = [decay],
+                CombinationCut = cc,
+                MotherCut = mc )
+
+        return Selection( name,
+                          Algorithm = combine_xib2lbx,
+                          RequiredSelections = inputs )
+
+
+    def _make_line(self,name,selection,prescale):
+        """make the stripping line
+        """
+        line = StrippingLine( name+"Line",
+                              prescale  = prescale,
+                              selection = selection,
+                              EnableFlavourTagging = False,
+                              RequiredRawEvents = ["Velo"] )
+
+        self.registerLine(line)
+
+
+
+def require_all(*cuts):
+    """
+    return string of "and" of inputs
+    """
+    cuts = ["({})".format(c) for c in cuts]
+    return " & ".join(cuts)
diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingBnoC/__init__.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingBnoC/__init__.py
index 6f541f8b2..ca1df5fe5 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingBnoC/__init__.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingBnoC/__init__.py
@@ -9,7 +9,7 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
-_selections = ('StrippingB2CharmlessInclusive', 'StrippingB2HHPi0', 'StrippingB2KShh', 'StrippingB2hhpipiPhsSpcCut', 'StrippingLb2V0hh', 'StrippingLb2V0pp','StrippingBu2KSh','StrippingB2HHBDT','StrippingB2LambdapppLines','StrippingBs2Kst_0Kst_0', 'StrippingXb2p3h_raw')
+_selections = ('StrippingB2CharmlessInclusive', 'StrippingB2HHPi0', 'StrippingB2KShh', 'StrippingB2hhpipiPhsSpcCut', 'StrippingLb2V0hh', 'StrippingLb2V0pp','StrippingBu2KSh','StrippingB2HHBDT','StrippingB2LambdapppLines','StrippingBs2Kst_0Kst_0', 'StrippingXb2p3h_raw','StrippingXib2LbXLb2ph')
 
 for _sel in _selections :
     try :
-- 
GitLab


From 654cac7d065884cae35b7b4d6ef3329722948759 Mon Sep 17 00:00:00 2001
From: "sferrere@cern.ch" <sferrere@cern.ch>
Date: Tue, 14 Sep 2021 11:43:42 +0200
Subject: [PATCH 17/22] RD init and config dict for s28r2p1

---
 .../StrippingRD/__init__.py                   |   4 +-
 .../LineConfigDictionaries_RD.py              | 211 +++++++++++++++++-
 2 files changed, 204 insertions(+), 11 deletions(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/__init__.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/__init__.py
index 28a78e094..62f82fddd 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/__init__.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingRD/__init__.py
@@ -27,7 +27,9 @@ _selections = ('StrippingRareBaryonicMuMu',
         'StrippingBeauty2MajoLep',
         'StrippingB2KSKSMuMu',
         'StrippingB2XMuTauMuonic',
-        'StrippingB2LLXBDTSS'
+        'StrippingB2LLXBDTSS',
+        'StrippingB2KstTauTau', 
+        'StrippingS2Hyperons'
         )
 
 for _sel in _selections :
diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_RD.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_RD.py
index 64d999960..28717a10e 100644
--- a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_RD.py
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_RD.py
@@ -8,6 +8,13 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+################################################################################
+##                          S T R I P P I N G  2 8 r 2 p 1                    ##
+##                                                                            ##
+##  Configuration for RD WG                                                   ##
+##  Contact person: silvia.ferreres.sole@cern.ch                              ##
+################################################################################
+
 B2DibaryonMuMu = {
     "BUILDERTYPE": "B2DibaryonMuMuConf", 
     "CONFIG": {
@@ -66,6 +73,157 @@ B2KSKSMuMu = {
     "WGs": [ "RD" ]
 }
 
+B2KstTauTau = {
+    "BUILDERTYPE": "B2KstTauXConf", 
+    "CONFIG": {
+        "AMAXDOCA_D": 0.2, 
+        "APT_D": 800.0, 
+        "B2DDSL_LinePostscale": 1, 
+        "B2DDSL_LinePrescale": 0, 
+        "B2KstMuMu_LinePostscale": 1, 
+        "B2KstMuMu_LinePrescale": 0, 
+        "B2KstMuMu_SameSign_LinePostscale": 1, 
+        "B2KstMuMu_SameSign_LinePrescale": 0, 
+        "B2KstTauE_LinePostscale": 1, 
+        "B2KstTauE_LinePrescale": 1, 
+        "B2KstTauE_SameSign_LinePostscale": 1, 
+        "B2KstTauE_SameSign_LinePrescale": 0.5, 
+        "B2KstTauMu_LinePostscale": 1, 
+        "B2KstTauMu_LinePrescale": 0, 
+        "B2KstTauMu_SameSign_LinePostscale": 1, 
+        "B2KstTauMu_SameSign_LinePrescale": 0, 
+        "B2KstTauTau_LinePostscale": 1, 
+        "B2KstTauTau_LinePrescale": 0, 
+        "B2KstTauTau_SameSign_LinePostscale": 1, 
+        "B2KstTauTau_SameSign_LinePrescale": 0, 
+        "B_COSDIRA_KMM": "0.999", 
+        "DIRA_D": "0.99", 
+        "DOCAMAX_KST_KMM": "0.15", 
+        "FDCHI2OWNPV_KST_KMM": "120", 
+        "FDCHI2_B": "80", 
+        "FDCHI2_D": "16", 
+        "FD_B_E": "3", 
+        "FD_B_Max_KTM": "70", 
+        "FD_B_Max_KTT": "40", 
+        "FD_B_Mu": "3", 
+        "FD_B_Mu_KMM": "3", 
+        "FD_B_e_KMM": "3", 
+        "FD_Kst_Mu_KMM": "3", 
+        "FD_Kst_e_KMM": "3", 
+        "IPCHI2_HAD_ALL_FINAL_STATE": "16", 
+        "MASS_HIGH_B": 10000.0, 
+        "MASS_HIGH_B_KMM": 10000.0, 
+        "MASS_HIGH_D": 1900.0, 
+        "MASS_HIGH_Dmother": 2030.0, 
+        "MASS_HIGH_Ds": 1998.0, 
+        "MASS_HIGH_Kst": "1100", 
+        "MASS_LOW_B": 2000.0, 
+        "MASS_LOW_B_KMM": 1500.0, 
+        "MASS_LOW_D": 1840.0, 
+        "MASS_LOW_Dmother": 1800.0, 
+        "MASS_LOW_Ds": 1938.0, 
+        "MASS_LOW_Kst": "700", 
+        "MINIPCHI2_KST_KMM": "3", 
+        "MINIPCHI2_K_KMM": "4", 
+        "MINIPCHI2_MU_KMM": "4", 
+        "MINIPCHI2_PI_KMM": "4", 
+        "MINIPCHI2_e_KMM": "4", 
+        "MaxPT_D": 800.0, 
+        "PT_B_KMM": 2000.0, 
+        "PT_B_KTM": 3000.0, 
+        "PT_B_KTT": 3000.0, 
+        "PT_D": 1000.0, 
+        "PT_HAD_ALL_FINAL_STATE": "250", 
+        "PT_Kst": "1000", 
+        "PT_MU": "1000", 
+        "PT_MU_KMM": "800", 
+        "PT_e": "1000", 
+        "PT_e_KMM": "800", 
+        "P_HAD_ALL_FINAL_STATE": "2000", 
+        "ProbNN_e": "0.05", 
+        "RelatedInfoTools": [
+            {
+                "Location": "B2KstTauTau_MuonIsolationBDT", 
+                "Type": "RelInfoBKsttautauMuonIsolationBDT", 
+                "Variables": [
+                    "BKSTTAUTAUMUONISOBDTFIRSTVALUETAUP", 
+                    "BKSTTAUTAUMUONISOBDTSECONDVALUETAUP", 
+                    "BKSTTAUTAUMUONISOBDTTHIRDVALUETAUP", 
+                    "BKSTTAUTAUMUONISOBDTFIRSTVALUETAUM", 
+                    "BKSTTAUTAUMUONISOBDTSECONDVALUETAUM", 
+                    "BKSTTAUTAUMUONISOBDTTHIRDVALUETAUM"
+                ]
+            }, 
+            {
+                "Location": "B2KstTauTau_TauIsolationBDT", 
+                "Type": "RelInfoBKsttautauTauIsolationBDT", 
+                "Variables": [
+                    "BKSTTAUTAUTAUISOBDTFIRSTVALUETAUP", 
+                    "BKSTTAUTAUTAUISOBDTSECONDVALUETAUP", 
+                    "BKSTTAUTAUTAUISOBDTTHIRDVALUETAUP", 
+                    "BKSTTAUTAUTAUISOBDTFIRSTVALUETAUM", 
+                    "BKSTTAUTAUTAUISOBDTSECONDVALUETAUM", 
+                    "BKSTTAUTAUTAUISOBDTTHIRDVALUETAUM", 
+                    "BKSTTAUTAUTAUISOBDTFIRSTVALUEKST", 
+                    "BKSTTAUTAUTAUISOBDTSECONDVALUEKST", 
+                    "BKSTTAUTAUTAUISOBDTTHIRDVALUEKST"
+                ]
+            }, 
+            {
+                "Location": "B2KstTauTau_TrackIsolationBDT", 
+                "Type": "RelInfoBKsttautauTrackIsolationBDT", 
+                "Variables": [
+                    "BKSTTAUTAUTRKISOBDTFIRSTVALUETAUPPIM", 
+                    "BKSTTAUTAUTRKISOBDTSECONDVALUETAUPPIM", 
+                    "BKSTTAUTAUTRKISOBDTTHIRDVALUETAUPPIM", 
+                    "BKSTTAUTAUTRKISOBDTFIRSTVALUETAUPPIP1", 
+                    "BKSTTAUTAUTRKISOBDTSECONDVALUETAUPPIP1", 
+                    "BKSTTAUTAUTRKISOBDTTHIRDVALUETAUPPIP1", 
+                    "BKSTTAUTAUTRKISOBDTFIRSTVALUETAUPPIP2", 
+                    "BKSTTAUTAUTRKISOBDTSECONDVALUETAUPPIP2", 
+                    "BKSTTAUTAUTRKISOBDTTHIRDVALUETAUPPIP2", 
+                    "BKSTTAUTAUTRKISOBDTFIRSTVALUETAUMPIP", 
+                    "BKSTTAUTAUTRKISOBDTSECONDVALUETAUMPIP", 
+                    "BKSTTAUTAUTRKISOBDTTHIRDVALUETAUMPIP", 
+                    "BKSTTAUTAUTRKISOBDTFIRSTVALUETAUMPIM1", 
+                    "BKSTTAUTAUTRKISOBDTSECONDVALUETAUMPIM1", 
+                    "BKSTTAUTAUTRKISOBDTTHIRDVALUETAUMPIM1", 
+                    "BKSTTAUTAUTRKISOBDTFIRSTVALUETAUMPIM2", 
+                    "BKSTTAUTAUTRKISOBDTSECONDVALUETAUMPIM2", 
+                    "BKSTTAUTAUTRKISOBDTTHIRDVALUETAUMPIM2", 
+                    "BKSTTAUTAUTRKISOBDTFIRSTVALUEKSTK", 
+                    "BKSTTAUTAUTRKISOBDTSECONDVALUEKSTK", 
+                    "BKSTTAUTAUTRKISOBDTTHIRDVALUEKSTK", 
+                    "BKSTTAUTAUTRKISOBDTFIRSTVALUEKSTPI", 
+                    "BKSTTAUTAUTRKISOBDTSECONDVALUEKSTPI", 
+                    "BKSTTAUTAUTRKISOBDTTHIRDVALUEKSTPI"
+                ]
+            }, 
+            {
+                "Location": "B2KstTauTau_CDFIso", 
+                "Type": "RelInfoBstautauCDFIso"
+            }
+        ], 
+        "SpdMult": "600", 
+        "TRACKCHI2_HAD_ALL_FINAL_STATE": "4", 
+        "TRACKCHI2_MU": "4", 
+        "TRACKCHI2_e": "4", 
+        "TRGHOPROB_HAD_ALL_FINAL_STATE": "0.4", 
+        "VCHI2_B": "100", 
+        "VCHI2_B_E": "150", 
+        "VCHI2_B_Mu": "150", 
+        "VCHI2_B_Mu_KMM": "100", 
+        "VCHI2_B_e_KMM": "100", 
+        "VCHI2_D": "16", 
+        "VCHI2_Kst": "15", 
+        "VDRHOmax_D": 7.0, 
+        "VDRHOmin_D": 0.1, 
+        "VDZ_D": 5.0
+    }, 
+    "STREAMS": [ "Bhadron" ], 
+    "WGs": [ "RD" ]
+}
+
 B2LLXBDTSS = {
     "BUILDERTYPE": "B2LLXBDTSSConf", 
     "CONFIG": {
@@ -692,9 +850,7 @@ B2XTauTauMuonic = {
         "B0_VertexCHI2": 100.0, 
         "B_DIRA": 0.999, 
         "Bd_Comb_MassHigh": 6500.0, 
-        "Bd_VertDist": -5, 
         "Bs_Comb_MassHigh": 7000.0, 
-        "Bs_VertDist": -24, 
         "Bs_VertexCHI2": 150.0, 
         "Dau_DIRA": 0.99, 
         "DimuonUPPERMASS": 4350.0, 
@@ -707,7 +863,7 @@ B2XTauTauMuonic = {
         "KaonPID": 4.0, 
         "KaonPID_B2Kstar": 5.0, 
         "Kaon_Pion_ProbNN_B2Kstar": 0.8, 
-        "KstarKstar_Comb_MassHigh": 2250,
+        "KstarKstar_Comb_MassHigh": 2250, 
         "KstarKstar_DOCACHI2": 25, 
         "Kstar_for_B2KstarKstar_MassWindow": 100, 
         "Kstar_for_B2KstarKstar_PT": 600, 
@@ -725,7 +881,6 @@ B2XTauTauMuonic = {
         "Lambdastar_VertexCHI2": 3, 
         "Lb_Comb_MassHigh": 7500.0, 
         "Lb_DIRA": 0.999, 
-        "Lb_VertDist": -25, 
         "Lb_VertexCHI2": 150.0, 
         "MuonPID": 0.0, 
         "Muon_MinIPCHI2": 9.0, 
@@ -2188,20 +2343,20 @@ LFV = {
         "D2piphi2eMuPrescale": 0, 
         "D2piphi2eMuPromptPrescale": 0., 
         "D2piphi2eePrescale": 0, 
-        "D2piphi2eePromptPrescale": 0, 
-        "JPsi2MuMuControlPrescale": 0, 
+        "D2piphi2eePromptPrescale": 0.0, 
+        "JPsi2MuMuControlPrescale": 0.0, 
         "JPsi2eMuPrescale": 0, 
-        "JPsi2eeControlPrescale": 0., 
+        "JPsi2eeControlPrescale": 0.0, 
         "Phi2MuMuControlPrescale": 0, 
         "Phi2eMuPrescale": 0, 
         "Phi2eeControlPrescale": 0, 
         "Postscale": 1, 
-        "PromptJPsi2MuMuControlPrescale": 0., 
+        "PromptJPsi2MuMuControlPrescale": 0.0, 
         "PromptJPsi2eMuPrescale": 0, 
-        "PromptJPsi2eeControlPrescale": 0., 
+        "PromptJPsi2eeControlPrescale": 0.0, 
         "PromptPhi2MuMuControlPrescale": 0, 
         "PromptPhi2eMuPrescale": 0, 
-        "PromptPhi2eeControlPrescale": 0., 
+        "PromptPhi2eeControlPrescale": 0.0, 
         "RelatedInfoTools_B2eMu": [
             {
                 "Location": "BSMUMUVARIABLES", 
@@ -3655,6 +3810,42 @@ RareBaryonicMuMu = {
     "WGs": [ "RD" ]
 }
 
+S2Hyperons = {
+    "BUILDERTYPE": "StrippingS2HyperonsConf", 
+    "CONFIG": {
+        "Bachelor_BPVIPCHI2_MIN": 40.0, 
+        "Bachelor_PT_MIN": 100.0, 
+        "Hyperon_BPVLTIME_MIN": 0.005, 
+        "KaonPIDK": 0, 
+        "LambdaDDMassWin": 8.0, 
+        "LambdaDDMaxVZ": 2275.0, 
+        "LambdaDDMinVZ": 400.0, 
+        "LambdaDDVtxChi2Max": 5.0, 
+        "LambdaDeltaZ_MIN": 5.0, 
+        "LambdaLLMassWin": 8.0, 
+        "LambdaLLMaxVZ": 400.0, 
+        "LambdaLLMinDecayTime": 0.002, 
+        "LambdaLLMinVZ": -100.0, 
+        "LambdaLLVtxChi2Max": 5.0, 
+        "LambdaPi_PT_MIN": 100.0, 
+        "LambdaPr_PT_MIN": 500.0, 
+        "LooseDaughter_BPVIPCHI2_MIN": 20.0, 
+        "OmegaMassWindow": 30.0, 
+        "PostVertexChi2_MIN": 5.0, 
+        "ProbNNpMinDD": 0.05, 
+        "ProbNNpMinLL": 0.2, 
+        "ProtonProbNNp": 0.3, 
+        "Proton_PT_MIN": 1000.0, 
+        "Proton_P_MIN": 3000.0, 
+        "TRCHI2DOFMax": 3.0, 
+        "TrGhostProbMax": 0.25, 
+        "XiDaughter_BPVIPCHI2_MIN": 50.0, 
+        "XiMassWindow": 25.0
+    }, 
+    "STREAMS": [ "Charm" ], 
+    "WGs": [ "RD" ]
+}
+
 Sb2PKMuXPi = {
     "BUILDERTYPE": "Sb2PKMuXPiConf", 
     "CONFIG": {
-- 
GitLab


From 61d8cb11571c2148462349928fe3d9d7b809bd3b Mon Sep 17 00:00:00 2001
From: Louis Henry <louis.henry@cern.ch>
Date: Fri, 17 Sep 2021 09:15:26 +0200
Subject: [PATCH 18/22] Calib lines for 28r2p1

---
 .../LineConfigDictionaries_Calib.py           | 120 +++++++++++++-----
 1 file changed, 88 insertions(+), 32 deletions(-)

diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Calib.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Calib.py
index 8105e5b81..690b5f494 100644
--- a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Calib.py
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Calib.py
@@ -1,21 +1,11 @@
 ###############################################################################
-# (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2021 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.                                       #
+# or submit itself to any jurisdiction.                                       #                                                                                                                           
 ###############################################################################
-
-################################################################################
-##                          S T R I P P I N G  34r0p2                         ##
-##                                                                            ##
-##  Configuration for Calib WG                                                ##
-##  Contact person: Louis Henry      (louis.henry@cern.ch)                    ##
-################################################################################
-
 Dst2D0Pi = {
     "BUILDERTYPE": "StrippingDst2D0PiConf", 
     "CONFIG": {
@@ -29,6 +19,8 @@ Dst2D0Pi = {
         "Dst2D0PiLinePrescale": 1, 
         "Dst2D0etaPiLinePostscale": 1, 
         "Dst2D0etaPiLinePrescale": 1, 
+        "Dst2D0pi0PiLinePostscale": 1, 
+        "Dst2D0pi0PiLinePrescale": 1, 
         "Dst_PT_MIN": 4000, 
         "Dst_VCHI2PDOF_MAX": 9, 
         "Dst_VIPCHI2_MAX": 9, 
@@ -41,6 +33,9 @@ Dst2D0Pi = {
         "EtaMassMin": 450, 
         "EtaMinPT": 1500, 
         "GammaMinPT": 2000, 
+        "Pi0MassMax": 200, 
+        "Pi0MassMin": 70, 
+        "Pi0MinPT": 1000, 
         "SoftPionMaxIPChi2": 16, 
         "TrackMaxGhostProb": 0.3, 
         "TrackMinIPChi2": 16, 
@@ -51,26 +46,6 @@ Dst2D0Pi = {
     "WGs": [ "Calib" ]
 }
 
-Eta2MuMuGamma = {
-    "BUILDERTYPE": "StrippingEta2MuMuGammaConf",
-    "CONFIG": {
-        "EtaMassMax": 1000,
-        "EtaMassMin": 0,
-        "FDChi2": 45,
-        "GPT": 500,
-        "K0MassMax": 1000,
-        "K0MassMin": 0,
-        "K0_PT": 1000,
-        "MMG_LinePostscale": 1,
-        "MMG_LinePrescale": 1,
-        "MuIPChi2": 6,
-        "MuPT": 500,
-        "MuProbNNmu": 0.2
-    },
-    "STREAMS": [ "CharmCompleteEvent" ],
-    "WGs": [ "Calib" ]
-}
-
 ElectronIDCalib = {
     "BUILDERTYPE": "ElectronIDConf", 
     "CONFIG": {
@@ -112,3 +87,84 @@ ElectronIDCalib = {
     }, 
     "WGs": [ "Calib" ]
 }
+
+Eta2MuMuGamma = {
+    "BUILDERTYPE": "StrippingEta2MuMuGammaConf", 
+    "CONFIG": {
+        "EtaMassMax": 1000, 
+        "EtaMassMin": 0, 
+        "FDChi2": 45, 
+        "GPT": 500, 
+        "K0MassMax": 1000, 
+        "K0MassMin": 0, 
+        "K0_PT": 1000, 
+        "MMG_LinePostscale": 1, 
+        "MMG_LinePrescale": 1, 
+        "MuIPChi2": 6, 
+        "MuPT": 500, 
+        "MuProbNNmu": 0.2
+    }, 
+    "STREAMS": [ "CharmCompleteEvent" ], 
+    "WGs": [ "Calib" ]
+}
+
+noPIDDstar = {
+    "BUILDERTYPE": "NoPIDDstarWithD02RSKPiConf", 
+    "CONFIG": {
+        "D0BPVDira": 0.9999, 
+        "D0FDChi2": 49, 
+        "D0IPChi2": 30, 
+        "D0MassWin": 100.0, 
+        "D0Pt": 1600.0, 
+        "D0VtxChi2Ndof": 10, 
+        "DCS_WrongMass": 25.0, 
+        "DaugIPChi2": 16, 
+        "DaugP": 2000.0, 
+        "DaugPt": 250.0, 
+        "DaugTrkChi2": 4, 
+        "DeltaM_Max": 155.0, 
+        "DeltaM_Min": 130.0, 
+        "DstarPt": 2200.0, 
+        "DstarVtxChi2Ndof": 13, 
+        "KK_WrongMass": 25.0, 
+        "Monitor": False, 
+        "PiPi_WrongMass": 25.0, 
+        "Postscale": 1.0, 
+        "Prescale": 1.0, 
+        "SlowPiPt": 150.0, 
+        "SlowPiTrkChi2": 4
+    }, 
+    "STREAMS": [ "Charm" ], 
+    "WGs": [ "Calib" ]
+}
+
+noPIDDstar_brem = {
+    "BUILDERTYPE": "NoPIDDstarWithD02RSKPi_bremConf", 
+    "CONFIG": {
+        "D0BPVDira": 0.9999, 
+        "D0FDChi2": 49, 
+        "D0IPChi2": 30, 
+        "D0MassWin": 500.0, 
+        "D0Pt": 1600.0, 
+        "D0VtxChi2Ndof": 10, 
+        "DCS_WrongMass": 25.0, 
+        "DaugIPChi2": 16, 
+        "DaugP": 2000.0, 
+        "DaugPt": 250.0, 
+        "DaugTrkChi2": 4, 
+        "DeltaM_Max": 155.0, 
+        "DeltaM_Min": 130.0, 
+        "DstarPt": 2200.0, 
+        "DstarVtxChi2Ndof": 13, 
+        "KK_WrongMass": 25.0, 
+        "Monitor": False, 
+        "PiPi_WrongMass": 25.0, 
+        "Postscale": 1.0, 
+        "Prescale": 1, 
+        "SlowPiPt": 150.0, 
+        "SlowPiTrkChi2": 4
+    }, 
+    "STREAMS": [ "Charm" ], 
+    "WGs": [ "Calib" ]
+}
+
-- 
GitLab


From c596bad49ed829d3fc02a86b597b3185d333863a Mon Sep 17 00:00:00 2001
From: Federico Leo Redi <federico.redi@cern.ch>
Date: Fri, 24 Sep 2021 11:32:39 +0200
Subject: [PATCH 19/22] Stripping28r2p1 dbases and archives

---
 .../NoBremNoPIDsDownElectrons.py              |   58 +
 .../CommonParticles/NoBremNoPIDsElectrons.py  |   58 +
 .../NoBremNoPIDsTtrackElectrons.py            |   59 +
 .../NoBremNoPIDsUpElectrons.py                |   57 +
 .../NoBremNoPIDsVeloElectrons.py              |   56 +
 .../CommonParticles/StandardBasic.py          |   51 +
 .../CommonParticles/StandardBasicCharged.py   |   57 +
 .../CommonParticles/StandardBasicNeutral.py   |   54 +
 .../CommonParticles/StandardD0.py             |   49 +
 .../CommonParticles/StandardDiElectron.py     |   55 +
 .../CommonParticles/StandardDiMuon.py         |   58 +
 .../CommonParticles/StandardDipion.py         |   47 +
 .../CommonParticles/StandardDplus.py          |   51 +
 .../CommonParticles/StandardDstar.py          |   46 +
 .../CommonParticles/StandardElectrons.py      |   85 +
 .../CommonParticles/StandardEta.py            |   46 +
 .../CommonParticles/StandardIntermediate.py   |   74 +
 .../CommonParticles/StandardJets.py           |   54 +
 .../CommonParticles/StandardJpsi.py           |   58 +
 .../CommonParticles/StandardKaons.py          |   88 +
 .../CommonParticles/StandardKstar.py          |   55 +
 .../CommonParticles/StandardLambdac.py        |   46 +
 .../CommonParticles/StandardLambdastar.py     |   50 +
 .../CommonParticles/StandardMuPi.py           |   40 +
 .../CommonParticles/StandardMuons.py          |   79 +
 .../CommonParticles/StandardPhi.py            |   50 +
 .../CommonParticles/StandardPhotons.py        |   65 +
 .../CommonParticles/StandardPi0.py            |   55 +
 .../CommonParticles/StandardPions.py          |   88 +
 .../CommonParticles/StandardProtons.py        |   82 +
 .../CommonParticles/StandardRho.py            |   48 +
 .../CommonParticles/StandardTau.py            |   49 +
 .../CommonParticles/StandardTauNonPhys.py     |   47 +
 .../CommonParticles/StandardV0.py             |   58 +
 .../StdAllLooseANNElectrons.py                |   61 +
 .../CommonParticles/StdAllLooseANNKaons.py    |   59 +
 .../CommonParticles/StdAllLooseANNPions.py    |   61 +
 .../CommonParticles/StdAllLooseANNProtons.py  |   60 +
 .../CommonParticles/StdAllLooseElectrons.py   |   56 +
 .../StdAllLooseGammaConversion.py             |   83 +
 .../CommonParticles/StdAllLooseKaons.py       |   57 +
 .../CommonParticles/StdAllLooseMuons.py       |   61 +
 .../CommonParticles/StdAllLoosePions.py       |   61 +
 .../CommonParticles/StdAllLooseProtons.py     |   60 +
 .../CommonParticles/StdAllNoPIDsElectrons.py  |   56 +
 .../CommonParticles/StdAllNoPIDsKaons.py      |   55 +
 .../CommonParticles/StdAllNoPIDsMuons.py      |   55 +
 .../CommonParticles/StdAllNoPIDsPions.py      |   55 +
 .../CommonParticles/StdAllNoPIDsProtons.py    |   55 +
 .../CommonParticles/StdAllNoPIDsVeloPions.py  |   61 +
 .../StdAllTightGammaConversion.py             |   83 +
 .../StdAllTightSymGammaConversion.py          |   90 +
 .../CommonParticles/StdAllVeryLooseMuons.py   |   61 +
 .../CommonParticles/StdHltJets.py             |   57 +
 .../CommonParticles/StdJets.py                |   50 +
 .../CommonParticles/StdJetsR07.py             |   49 +
 .../CommonParticles/StdLTUnbiasedJpsi2MuMu.py |   51 +
 .../StdLooseANNDownElectrons.py               |   62 +
 .../CommonParticles/StdLooseANNDownKaons.py   |   62 +
 .../CommonParticles/StdLooseANNDownPions.py   |   62 +
 .../CommonParticles/StdLooseANNDownProtons.py |   62 +
 .../CommonParticles/StdLooseANNElectrons.py   |   52 +
 .../CommonParticles/StdLooseANNKaons.py       |   52 +
 .../CommonParticles/StdLooseANNPions.py       |   52 +
 .../CommonParticles/StdLooseANNProtons.py     |   52 +
 .../CommonParticles/StdLooseANNUpElectrons.py |   62 +
 .../CommonParticles/StdLooseANNUpKaons.py     |   62 +
 .../CommonParticles/StdLooseANNUpPions.py     |   62 +
 .../CommonParticles/StdLooseANNUpProtons.py   |   62 +
 .../CommonParticles/StdLooseAllPhotons.py     |   61 +
 .../CommonParticles/StdLooseCnvPhotons.py     |   63 +
 .../CommonParticles/StdLooseD02HH.py          |   89 +
 .../CommonParticles/StdLooseD02KsHH.py        |   83 +
 .../CommonParticles/StdLooseDalitzPi0.py      |   69 +
 .../StdLooseDetachedDiElectron.py             |   42 +
 .../CommonParticles/StdLooseDetachedKpi.py    |   38 +
 .../CommonParticles/StdLooseDetachedKstar.py  |   33 +
 .../CommonParticles/StdLooseDetachedPhi.py    |   50 +
 .../CommonParticles/StdLooseDetachedTau.py    |   51 +
 .../StdLooseDetachedTauNoPID.py               |   52 +
 .../StdLooseDetachedTauNonPhys.py             |   51 +
 .../CommonParticles/StdLooseDiElectron.py     |   83 +
 .../CommonParticles/StdLooseDiMuon.py         |   42 +
 .../CommonParticles/StdLooseDiMuonSameSign.py |   38 +
 .../CommonParticles/StdLooseDipion.py         |   63 +
 .../CommonParticles/StdLooseDownKaons.py      |   59 +
 .../CommonParticles/StdLooseDownMuons.py      |   61 +
 .../CommonParticles/StdLooseDplus.py          |  169 +
 .../CommonParticles/StdLooseDstarWithD2HH.py  |   89 +
 .../CommonParticles/StdLooseElectrons.py      |   52 +
 .../CommonParticles/StdLooseJpsi2MuMu.py      |   49 +
 .../CommonParticles/StdLooseJpsi2ee.py        |   54 +
 .../CommonParticles/StdLooseKaons.py          |   54 +
 .../CommonParticles/StdLooseKs.py             |  103 +
 .../CommonParticles/StdLooseKstar.py          |   52 +
 .../CommonParticles/StdLooseLambda.py         |  122 +
 .../CommonParticles/StdLooseLambdac.py        |   56 +
 .../CommonParticles/StdLooseMergedPi0.py      |   51 +
 .../CommonParticles/StdLooseMuons.py          |   54 +
 .../CommonParticles/StdLoosePhi.py            |   49 +
 .../CommonParticles/StdLoosePhotons.py        |   60 +
 .../CommonParticles/StdLoosePions.py          |   53 +
 .../CommonParticles/StdLooseProtons.py        |   52 +
 .../CommonParticles/StdLooseResolvedEta.py    |   75 +
 .../CommonParticles/StdLooseResolvedPi0.py    |   66 +
 .../CommonParticles/StdLooseRho0.py           |   55 +
 .../CommonParticles/StdLooseRhoPlus.py        |   64 +
 .../StdMassConstrainedJpsi2MuMu.py            |   49 +
 .../CommonParticles/StdNoPIDsDownElectrons.py |   57 +
 .../CommonParticles/StdNoPIDsDownKaons.py     |   59 +
 .../CommonParticles/StdNoPIDsDownPions.py     |   59 +
 .../CommonParticles/StdNoPIDsDownProtons.py   |   59 +
 .../CommonParticles/StdNoPIDsElectrons.py     |   56 +
 .../CommonParticles/StdNoPIDsKaons.py         |   56 +
 .../CommonParticles/StdNoPIDsMuons.py         |   56 +
 .../CommonParticles/StdNoPIDsPions.py         |   56 +
 .../CommonParticles/StdNoPIDsProtons.py       |   56 +
 .../CommonParticles/StdNoPIDsUpElectrons.py   |   56 +
 .../CommonParticles/StdNoPIDsUpKaons.py       |   55 +
 .../CommonParticles/StdNoPIDsUpMuons.py       |   52 +
 .../CommonParticles/StdNoPIDsUpPions.py       |   57 +
 .../CommonParticles/StdNoPIDsVeloElectrons.py |   56 +
 .../CommonParticles/StdParticleFlow.py        |   52 +
 .../StdTightANNDownElectrons.py               |   62 +
 .../CommonParticles/StdTightANNDownKaons.py   |   62 +
 .../CommonParticles/StdTightANNDownMuons.py   |   62 +
 .../CommonParticles/StdTightANNDownPions.py   |   62 +
 .../CommonParticles/StdTightANNDownProtons.py |   62 +
 .../CommonParticles/StdTightANNElectrons.py   |   62 +
 .../CommonParticles/StdTightANNKaons.py       |   60 +
 .../CommonParticles/StdTightANNMuons.py       |   62 +
 .../CommonParticles/StdTightANNPions.py       |   60 +
 .../CommonParticles/StdTightANNProtons.py     |   61 +
 .../CommonParticles/StdTightANNUpElectrons.py |   62 +
 .../CommonParticles/StdTightANNUpKaons.py     |   62 +
 .../CommonParticles/StdTightANNUpMuons.py     |   62 +
 .../CommonParticles/StdTightANNUpPions.py     |   62 +
 .../CommonParticles/StdTightANNUpProtons.py   |   62 +
 .../CommonParticles/StdTightDetachedTau.py    |   69 +
 .../CommonParticles/StdTightDplus.py          |   79 +
 .../CommonParticles/StdTightElectrons.py      |   66 +
 .../CommonParticles/StdTightKaons.py          |   59 +
 .../CommonParticles/StdTightMuons.py          |   62 +
 .../CommonParticles/StdTightPhi.py            |   45 +
 .../CommonParticles/StdTightPions.py          |   63 +
 .../CommonParticles/StdTightProtons.py        |   58 +
 .../CommonParticles/StdV0FromBrunel.py        |   59 +
 .../CommonParticles/StdVeryLooseAllPhotons.py |   61 +
 .../StdVeryLooseDetachedKstar.py              |   44 +
 .../CommonParticles/StdVeryLooseDiMuon.py     |   42 +
 .../CommonParticles/StdVeryLooseJpsi2MuMu.py  |   49 +
 .../CommonParticles/StdVeryLooseKs.py         |   51 +
 .../CommonParticles/StdVeryLooseLambda.py     |   64 +
 .../CommonParticles/StdVeryLooseMuons.py      |   56 +
 .../Stripping28r2p1/CommonParticles/Utils.py  |  152 +
 .../CommonParticles/__init__.py               |   16 +
 .../StrippingB2CC/StrippingB2JpsiHH.py        |  358 ++
 .../StrippingB2CC/StrippingB2JpsiPi0.py       |  134 +
 .../StrippingB2CC/StrippingB2JpsiPi0_Run1.py  |  135 +
 .../StrippingB2CC/StrippingB2JpsiX0.py        |  409 +++
 .../StrippingB2JpsiXforBeta_s.py              |  426 +++
 .../StrippingB2CC/StrippingBd2JpsieeKS.py     |  206 ++
 .../StrippingBd2JpsieeKSFullDST.py            |  156 +
 .../StrippingB2CC/StrippingBd2JpsieeKstar.py  |  215 ++
 .../StrippingB2CC/StrippingBs2EtacPhiBDT.py   |  307 ++
 .../StrippingB2CC/StrippingBs2JpsieePhi.py    |  215 ++
 .../Stripping28r2p1/StrippingB2CC/__init__.py |   26 +
 .../StrippingB2OC/Beauty2Charm_B2DXBuilder.py | 2000 +++++++++++
 .../Beauty2Charm_Bc2BXBuilder.py              |   77 +
 .../Beauty2Charm_Bc2DDBuilder.py              |  401 +++
 .../Beauty2Charm_Bc2DXBuilder.py              |  105 +
 .../StrippingB2OC/Beauty2Charm_DBuilder.py    | 2608 ++++++++++++++
 .../StrippingB2OC/Beauty2Charm_HHBuilder.py   |  468 +++
 .../StrippingB2OC/Beauty2Charm_HHHBuilder.py  |  217 ++
 .../StrippingB2OC/Beauty2Charm_LTUnbiased.py  |   77 +
 .../StrippingB2OC/Beauty2Charm_Lb2XBuilder.py | 2300 ++++++++++++
 .../StrippingB2OC/Beauty2Charm_LoKiCuts.py    |  129 +
 .../StrippingB2OC/Beauty2Charm_Utils.py       |  471 +++
 .../StrippingB2OC/StrippingB2DDphi.py         |  297 ++
 .../StrippingB2OC/StrippingB2DXD2HMuNu.py     |  338 ++
 .../StrippingB2OC/StrippingB2nbody.py         | 1098 ++++++
 .../StrippingB2OC/StrippingBeauty2Charm.py    | 1935 ++++++++++
 .../Stripping28r2p1/StrippingB2OC/__init__.py |   26 +
 .../StrippingBandQ/StrippingB2Chic0KPi.py     |  476 +++
 .../StrippingBandQ/StrippingB2JpsiXforEM_s.py |  275 ++
 .../StrippingBandQ/StrippingBbbar2PhiPhi.py   |  140 +
 .../StrippingBandQ/StrippingBc2Ds1Gamma.py    |  242 ++
 .../StrippingBandQ/StrippingBc2EtacMu.py      |  209 ++
 .../StrippingBandQ/StrippingBc2EtacSL.py      |  365 ++
 .../StrippingBandQ/StrippingBc2JpsiHBDT.py    |  176 +
 .../StrippingBandQ/StrippingBc2JpsiMuXNew.py  |  171 +
 .../StrippingBandQ/StrippingBc3h.py           |  577 +++
 .../StrippingBandQ/StrippingCC2DD.py          |  619 ++++
 .../StrippingBandQ/StrippingCcbar2Baryons.py  |  169 +
 .../StrippingBandQ/StrippingCcbar2KsKpi.py    |  152 +
 .../StrippingCcbar2LambdaLambda.py            |  254 ++
 .../StrippingCcbar2LstLambda.py               |  162 +
 .../StrippingBandQ/StrippingCcbar2LstLst.py   |  136 +
 .../StrippingBandQ/StrippingCcbar2PPPiPi.py   |  176 +
 .../StrippingBandQ/StrippingCcbar2PhiPhi.py   |  267 ++
 .../StrippingCcbar2PhiPhiDetached.py          |  133 +
 .../StrippingCcbar2PhiPhiPiPi.py              |  130 +
 .../StrippingBandQ/StrippingCcbar2PpbarNew.py |  210 ++
 .../StrippingCharmAssociative.py              |  645 ++++
 .../StrippingChiCJPsiGammaConv.py             |  273 ++
 .../StrippingDiMuonForXsection.py             |   79 +
 .../StrippingBandQ/StrippingDiMuonInherit.py  |  461 +++
 .../StrippingBandQ/StrippingDiMuonNew.py      | 1291 +++++++
 .../StrippingBandQ/StrippingEtap2pipimumu.py  |  453 +++
 .../StrippingBandQ/StrippingHeavyBaryons.py   |  195 +
 .../StrippingInclusiveCharmBaryons.py         |  218 ++
 .../StrippingInclusiveDoubleD.py              |  204 ++
 .../StrippingBandQ/StrippingLb2EtacKp.py      |  350 ++
 .../StrippingBandQ/StrippingLb2L0X3872.py     |  136 +
 .../StrippingBandQ/StrippingOmegab2XicKpi.py  |  209 ++
 .../StrippingBandQ/StrippingOmegabDecays.py   |  764 ++++
 .../StrippingOniaPhotoProduction.py           |  118 +
 .../StrippingOniaPhotoProductionPrescaled.py  |  106 +
 .../StrippingBandQ/StrippingPPMuMu.py         |  197 ++
 .../StrippingBandQ/StrippingPsiX0.py          | 2281 ++++++++++++
 .../StrippingBandQ/StrippingPsiXForBandQ.py   | 2393 +++++++++++++
 .../StrippingBandQ/StrippingUpsilonExotic.py  |  994 ++++++
 .../StrippingBandQ/StrippingXB2DPiP.py        |  255 ++
 .../StrippingBandQ/StrippingXbToLambdaKmX.py  |  228 ++
 .../StrippingBandQ/StrippingXibc.py           |  621 ++++
 .../StrippingBandQ/StrippingXibcBDT.py        |  836 +++++
 .../StrippingBandQ/StrippingXiccBDT.py        |  673 ++++
 .../StrippingBandQ/__init__.py                |   26 +
 .../StrippingBnoC/StrippingB24pLines.py       |  406 +++
 .../StrippingB2CharmlessInclusive.py          |  420 +++
 .../StrippingBnoC/StrippingB2HHBDT.py         |  175 +
 .../StrippingBnoC/StrippingB2HHPi0.py         |  197 ++
 .../StrippingBnoC/StrippingB2KShh.py          |  329 ++
 .../StrippingBnoC/StrippingB2KShhh.py         |  281 ++
 .../StrippingBnoC/StrippingB2Kpi0.py          |  238 ++
 .../StrippingBnoC/StrippingB2Ksthh.py         |  222 ++
 .../StrippingB2LambdapppLines.py              |  481 +++
 .../StrippingBnoC/StrippingB2TwoBaryons.py    |  555 +++
 .../StrippingBnoC/StrippingB2XEta.py          |  899 +++++
 .../StrippingBnoC/StrippingB2a1Pi.py          |  212 ++
 .../StrippingB2hhpipiPhsSpcCut.py             |  252 ++
 .../StrippingBnoC/StrippingB2pphh.py          |  207 ++
 .../StrippingBnoC/StrippingBc2hhh_BnoC.py     | 1109 ++++++
 .../StrippingBnoC/StrippingBs2KKhh.py         |  190 +
 .../StrippingBnoC/StrippingBs2KSKS_Run2.py    |  198 ++
 .../StrippingBnoC/StrippingBs2Kst_0Kst_0.py   |  237 ++
 .../StrippingBnoC/StrippingBs2PhiKst0.py      |  253 ++
 .../StrippingBnoC/StrippingBs2PhiPhi.py       |  239 ++
 .../StrippingBnoC/StrippingBu2KSh.py          |  333 ++
 .../StrippingBnoC/StrippingBu2Ksthh.py        |  404 +++
 .../StrippingBnoC/StrippingBu2hhh.py          |  639 ++++
 .../StrippingBnoC/StrippingBu2rho0rhoPlus.py  |  534 +++
 .../StrippingBnoC/StrippingButo5h.py          |  431 +++
 .../StrippingBnoC/StrippingD2HHBDT.py         |  177 +
 .../StrippingBnoC/StrippingHb2Charged2Body.py |  118 +
 .../StrippingBnoC/StrippingHb2V0V0h.py        |  413 +++
 .../StrippingBnoC/StrippingLb2V0hh.py         |  630 ++++
 .../StrippingBnoC/StrippingLb2V0pp.py         |  632 ++++
 .../StrippingBnoC/StrippingXb23ph.py          |  182 +
 .../StrippingBnoC/StrippingXb2p3h.py          |  182 +
 .../StrippingBnoC/StrippingXb2p3h_raw.py      |  190 +
 .../StrippingBnoC/StrippingXb2phh.py          |  172 +
 .../StrippingBnoC/StrippingXib2LbXLb2ph.py    |  211 ++
 .../Stripping28r2p1/StrippingBnoC/__init__.py |   26 +
 .../StrippingCharmFromBSemiForHadronAsy.py    |  423 +++
 .../StrippingCharmFromBSemiForProtonPID.py    |  129 +
 .../StrippingCalib/StrippingD02KPiPi0.py      |  150 +
 .../StrippingD02KPiPi0DalitzPartReco.py       |  241 ++
 .../StrippingD02KPiPi0ForPid.py               |  111 +
 .../StrippingCalib/StrippingD0ForBXX.py       |  196 ++
 .../StrippingCalib/StrippingDst2D0Pi.py       |  312 ++
 .../StrippingDstarD02KShhForTrackingEff.py    |  296 ++
 ...pingDstarD02hhPi0PartRecoForPhotonCalib.py |  348 ++
 .../StrippingCalib/StrippingElectronID.py     |  358 ++
 .../StrippingElectronRecoEff.py               |  976 +++++
 .../StrippingCalib/StrippingEta2MuMuGamma.py  |  151 +
 .../StrippingCalib/StrippingJPsiForSL.py      |  132 +
 .../StrippingK23PiForDownstreamTrackEff.py    |  477 +++
 .../StrippingCalib/StrippingLowPtMuID.py      |   90 +
 .../StrippingCalib/StrippingMuIDCalib.py      |  421 +++
 .../StrippingNoPIDDstarWithD02RSKPi.py        |  237 ++
 .../StrippingNoPIDDstarWithD02RSKPi_Brem.py   |  705 ++++
 .../StrippingCalib/StrippingPIDCalib.py       |  546 +++
 .../StrippingCalib/StrippingProtonAsym.py     |  735 ++++
 .../StrippingCalib/StrippingSigmacForPID.py   |  408 +++
 .../StrippingTrackEffD0ToK3Pi.py              |  392 +++
 .../StrippingTrackEffD0ToKPi.py               |  220 ++
 .../StrippingTrackEffDownMuon.py              |  602 ++++
 .../StrippingCalib/StrippingTrackEffMuonTT.py |  897 +++++
 .../StrippingTrackEffVeloMuon.py              |  449 +++
 .../StrippingCalib/StrippingV0ForPID.py       |  991 ++++++
 .../StrippingCalib/__init__.py                |   26 +
 .../StrippingB2ppipiSigmacmm_Lcpi.py          | 1089 ++++++
 .../StrippingCharm/StrippingBs2st2pKpipipi.py |  237 ++
 .../StrippingChargedHyperons.py               |  324 ++
 .../StrippingCharm/StrippingCharm2PPX.py      |  415 +++
 .../StrippingCharm/StrippingCharmForVub.py    |  484 +++
 .../StrippingCharm/StrippingCharmFromBSemi.py | 1329 +++++++
 .../StrippingCharmWeakDecays.py               |  203 ++
 .../StrippingCharmedBaryonSL.py               |  664 ++++
 .../StrippingCharm/StrippingD02HHForXSec.py   |  349 ++
 .../StrippingCharm/StrippingD02K3PiForXSec.py |  367 ++
 .../StrippingCharm/StrippingD02KSKS.py        |  705 ++++
 .../StrippingCharm/StrippingD2HHHForXSec.py   |  549 +++
 .../StrippingCharm/StrippingD2HHHKs.py        |  282 ++
 .../StrippingCharm/StrippingD2HHHPi0.py       |  231 ++
 .../StrippingCharm/StrippingD2HMuNu.py        |  361 ++
 .../StrippingCharm/StrippingD2KPiPiMuNu.py    |  381 ++
 .../StrippingCharm/StrippingD2KS0H_conf.py    |  795 +++++
 .../StrippingCharm/StrippingD2PhiPiForXSec.py |  429 +++
 .../StrippingCharm/StrippingD2PiPi0.py        | 1306 +++++++
 .../StrippingCharm/StrippingD2XMuMuSS.py      | 2969 ++++++++++++++++
 .../StrippingCharm/StrippingD2hh.py           |  708 ++++
 .../StrippingCharm/StrippingD2hhh_FTcalib.py  |  264 ++
 .../StrippingCharm/StrippingD2hhh_conf.py     |  723 ++++
 .../StrippingCharm/StrippingDstarD02xx.py     |  310 ++
 .../StrippingCharm/StrippingDstarD0ToHHPi0.py |  273 ++
 .../StrippingCharm/StrippingDstarD2HHHH.py    |  247 ++
 .../StrippingCharm/StrippingDstarD2KSHHPi0.py |  303 ++
 .../StrippingCharm/StrippingDstarD2KShh.py    |  279 ++
 .../StrippingCharm/StrippingDstarD2XGamma.py  |  393 +++
 .../StrippingDstarPromptWithD02HHHH.py        |  457 +++
 .../StrippingDstarPromptWithD02HHMuMu.py      |  702 ++++
 .../StrippingExcitedDsSpectroscopy.py         |  329 ++
 .../StrippingCharm/StrippingHc2V02H.py        |  490 +++
 .../StrippingCharm/StrippingHc2V03H.py        |  454 +++
 .../StrippingCharm/StrippingHc2V2H.py         |  572 +++
 .../StrippingCharm/StrippingHc2V3H.py         |  449 +++
 .../StrippingCharm/StrippingKKPiPi.py         |  114 +
 .../StrippingLambdac2PHHForXSec.py            |  435 +++
 .../StrippingCharm/StrippingLambdac2V03H.py   |  298 ++
 .../StrippingCharm/StrippingLambdac2V0H.py    |  465 +++
 .../StrippingCharm/StrippingLambdac2V2H.py    |  369 ++
 .../StrippingLambdacForNeutronPID.py          |  226 ++
 .../StrippingCharm/StrippingLc2L0DDpi.py      |  261 ++
 .../StrippingCharm/StrippingLc2L0LLpi.py      |  190 +
 .../StrippingNeutralCBaryons.py               |  456 +++
 .../StrippingCharm/StrippingPromptCharm.py    | 2477 +++++++++++++
 .../StrippingXcpToLambdaKSHp.py               |  128 +
 .../StrippingCharm/StrippingXcpToXiPipHp.py   |  154 +
 .../StrippingCharm/StrippingXic2HHH.py        |  597 ++++
 .../StrippingXic2PKKPiForXSec.py              |  259 ++
 .../StrippingXic2PKPiForXSec.py               |  253 ++
 .../StrippingCharm/StrippingXicToSigmaKPi.py  |  256 ++
 .../StrippingCharm/StrippingXicc.py           |  751 ++++
 .../StrippingCharm/StrippingXiccSL.py         |  798 +++++
 .../StrippingCharm/__init__.py                |   26 +
 .../StrippingIFT/StrippingHeL2ppppi.py        |  164 +
 .../StrippingIFT/StrippingHeMedian.py         |   79 +
 .../StrippingIFT/StrippingHeNOverflows.py     |   68 +
 .../StrippingHeavyIonConvertedPhoton.py       |  430 +++
 .../StrippingHeavyIonD02KPiPi0.py             |  170 +
 .../StrippingIFT/StrippingHeavyIonDiMuon.py   |  295 ++
 .../StrippingHeavyIonDst2D0KPiForPID.py       |  172 +
 .../StrippingHeavyIonGammaHadron.py           |  160 +
 .../StrippingIFT/StrippingHeavyIonMiniBias.py |  133 +
 .../StrippingHeavyIonOpenCharm.py             |  599 ++++
 .../StrippingIFT/StrippingHeavyIonOthercc.py  |  170 +
 .../StrippingIFT/StrippingHeavyIonPIDCalib.py |  485 +++
 .../StrippingHeavyIonSingleElectron.py        |  104 +
 .../StrippingIFT/StrippingHeavyIonTopology.py |  139 +
 .../StrippingHeavyIonTrackEffDownMuon.py      |  444 +++
 .../StrippingHeavyIonTrackEffMuonTT.py        |  883 +++++
 .../StrippingHeavyIonTrackEffVeloMuon.py      |  525 +++
 .../StrippingIFT/StrippingHeavyIonWMuNu.py    |  165 +
 .../StrippingIFT/StrippingLb2V0pphh.py        |  309 ++
 .../StrippingIFT/StrippingLb2dpX.py           |  202 ++
 .../StrippingIFT/StrippingV0ForPID_ForIFT.py  | 1734 +++++++++
 .../Stripping28r2p1/StrippingIFT/Utils.py     |  366 ++
 .../Stripping28r2p1/StrippingIFT/__init__.py  |   26 +
 .../StrippingMiniBias/StrippingBadEvents.py   |   57 +
 .../StrippingMiniBias/StrippingMiniBias.py    |   82 +
 .../StrippingMiniBias/__init__.py             |   26 +
 .../StrippingQEE/DisplVertices_Utils.py       |   99 +
 .../StrippingQEE/StrippingA1MuMu.py           |  123 +
 .../StrippingQEE/StrippingA2MuMu.py           |   88 +
 .../StrippingQEE/StrippingA2MuMuSameSign.py   |   88 +
 .../StrippingQEE/StrippingALP2TauTau.py       |  313 ++
 .../StrippingQEE/StrippingB2EHNLLines.py      |  262 ++
 .../StrippingQEE/StrippingB2LLP2HH.py         |  122 +
 .../StrippingQEE/StrippingB2MuHNLLines.py     |  238 ++
 .../StrippingQEE/StrippingB2SS.py             |  509 +++
 .../StrippingQEE/StrippingConvertedPhoton.py  |  174 +
 .../StrippingQEE/StrippingDY2MuMu.py          |  163 +
 .../StrippingQEE/StrippingDY2ee.py            |  122 +
 .../StrippingQEE/StrippingDisplVertices.py    |  850 +++++
 .../StrippingQEE/StrippingDitau.py            |  922 +++++
 .../StrippingQEE/StrippingExotica.py          |  522 +++
 .../StrippingQEE/StrippingFullDiJets.py       |   84 +
 .../StrippingQEE/StrippingGluinos.py          |  119 +
 .../StrippingQEE/StrippingH24Mu.py            |  344 ++
 .../StrippingQEE/StrippingHighPtMuons.py      |   99 +
 .../StrippingQEE/StrippingHltQEE.py           |  146 +
 .../StrippingQEE/StrippingInclQQ.py           |   86 +
 .../StrippingQEE/StrippingLFVExotica.py       |  608 ++++
 .../StrippingQEE/StrippingLLP2HH.py           |  183 +
 .../StrippingQEE/StrippingLLP2Hadrons.py      |  580 +++
 .../StrippingQEE/StrippingLLP2Jets.py         |  131 +
 .../StrippingQEE/StrippingLLP2MuX.py          |   63 +
 .../StrippingQEE/StrippingLambdaDecaysDM.py   |  633 ++++
 .../StrippingQEE/StrippingLb2dp.py            |  221 ++
 .../StrippingQEE/StrippingLowMultINC.py       |  571 +++
 .../StrippingQEE/StrippingMicroDiJets.py      |   93 +
 .../StrippingQEE/StrippingMuMuSS.py           |  114 +
 .../StrippingSbarSCorrelations.py             |  314 ++
 .../StrippingQEE/StrippingSingleTrackTIS.py   |  146 +
 .../StrippingQEE/StrippingStrangeBaryons.py   |  310 ++
 .../StrippingStrangeBaryonsNoPID.py           |  218 ++
 .../StrippingQEE/StrippingTaggedJets.py       |  132 +
 .../StrippingQEE/StrippingW2nH.py             |  109 +
 .../StrippingQEE/StrippingWJets.py            |  221 ++
 .../StrippingQEE/StrippingWMu.py              |  249 ++
 .../StrippingQEE/StrippingWRareDecay.py       |  564 +++
 .../StrippingQEE/StrippingWe.py               |   83 +
 .../StrippingQEE/StrippingZ02MuMu.py          |   73 +
 .../StrippingQEE/StrippingZ02ee.py            |   91 +
 .../StrippingQEE/StrippingZ02nH.py            |  117 +
 .../StrippingQEE/StrippingZ0RareDecay.py      |  607 ++++
 .../Stripping28r2p1/StrippingQEE/__init__.py  |   26 +
 .../depreciated/StrippingDijets.py            |  260 ++
 .../depreciated/StrippingHighPtTopoJets.py    |  186 +
 .../StrippingQEE/depreciated/StrippingJets.py |  368 ++
 .../StrippingRD/Beauty2Charm_LoKiCuts.py      |  119 +
 .../StrippingRD/StrippingB02Lcmu_pKpi.py      |  121 +
 .../StrippingRD/StrippingB23MuLines.py        |  368 ++
 .../StrippingRD/StrippingB2DibaryonMuMu.py    |  446 +++
 .../StrippingRD/StrippingB2EtaMuMu.py         |  278 ++
 .../StrippingRD/StrippingB2KLLXInclusive.py   |  355 ++
 .../StrippingRD/StrippingB2KSKSMuMu.py        |  254 ++
 .../StrippingRD/StrippingB2KstTauTau.py       | 1321 +++++++
 .../StrippingRD/StrippingB2LLXBDT.py          |  726 ++++
 .../StrippingRD/StrippingB2LLXBDTSS.py        |  777 ++++
 .../StrippingRD/StrippingB2LLXBDT_Calib.py    |  427 +++
 .../StrippingRD/StrippingB2Lambda0ELines.py   |  162 +
 .../StrippingRD/StrippingB2Lambda0MuLines.py  |  162 +
 .../StrippingB2Lambda0MuOSLines.py            |  162 +
 .../StrippingB2Lambda0SSMuMu3PiLines.py       |  162 +
 .../StrippingRD/StrippingB2MuMuMuMuLines.py   |  537 +++
 .../StrippingRD/StrippingB2OCMuMu.py          | 1240 +++++++
 .../StrippingRD/StrippingB2XLL.py             |  495 +++
 .../StrippingRD/StrippingB2XMuMu.py           | 1131 ++++++
 .../StrippingRD/StrippingB2XMuTauMuonic.py    |  489 +++
 .../StrippingRD/StrippingB2XTau.py            | 1481 ++++++++
 .../StrippingRD/StrippingB2XTauMu.py          |  982 ++++++
 .../StrippingRD/StrippingB2XTauTau.py         |  385 ++
 .../StrippingRD/StrippingB2XTauTauMuonic.py   |  481 +++
 .../StrippingRD/StrippingBLVLines.py          | 1141 ++++++
 .../StrippingRD/StrippingBaryonicLFV.py       |  904 +++++
 .../StrippingRD/StrippingBd2KSLLX.py          |  204 ++
 .../StrippingRD/StrippingBd2eeKstarBDT.py     |  351 ++
 .../StrippingRD/StrippingBeauty2MajoLep.py    | 1184 +++++++
 .../StrippingRD/StrippingBeauty2XGamma.py     | 1983 +++++++++++
 .../StrippingBeauty2XGammaExclTDCPV.py        |  808 +++++
 .../StrippingBeauty2XGammaExclusive.py        |  276 ++
 .../StrippingBeauty2XGammaNoBias.py           |  216 ++
 .../StrippingRD/StrippingBs2MuMuGamma.py      |  193 +
 .../StrippingRD/StrippingBs2MuMuLines.py      | 1725 +++++++++
 .../StrippingRD/StrippingBs2gammagamma.py     |  266 ++
 .../StrippingRD/StrippingBs2st2KKMuX.py       |  277 ++
 .../StrippingRD/StrippingBu2LLK.py            | 2172 ++++++++++++
 .../StrippingRD/StrippingBu2MajoLep.py        |  416 +++
 .../StrippingRD/StrippingBu2MuNu.py           |  257 ++
 .../StrippingRD/StrippingD23MuLines.py        |  362 ++
 .../StrippingRD/StrippingDarkBoson.py         |  941 +++++
 .../StrippingRD/StrippingDoubleSLForRX.py     |  316 ++
 .../StrippingRD/StrippingHypb2L0HGamma.py     |  525 +++
 .../StrippingRD/StrippingK0s2XXMuMu.py        |  270 ++
 .../StrippingRD/StrippingKshort2Leptons.py    | 1369 ++++++++
 .../StrippingRD/StrippingKshort2MuMuMuMu.py   |  233 ++
 .../StrippingRD/StrippingKshort2PiPiMuMu.py   |  295 ++
 .../StrippingRD/StrippingKshort2eePiPi.py     |  260 ++
 .../StrippingRD/StrippingLFVLines.py          | 2704 ++++++++++++++
 .../StrippingRD/StrippingLb2L0Gamma.py        |  407 +++
 .../StrippingRD/StrippingLc23MuLines.py       | 1708 +++++++++
 .../StrippingRD/StrippingMultiLepton.py       | 2314 ++++++++++++
 .../StrippingRD/StrippingPhiToKSKS.py         |  260 ++
 .../StrippingRD/StrippingRareBaryonicMuMu.py  | 2407 +++++++++++++
 .../StrippingRD/StrippingRareNStrange.py      |  636 ++++
 .../StrippingRD/StrippingRareStrange.py       | 2751 +++++++++++++++
 .../StrippingRD/StrippingS2Hyperons.py        |  495 +++
 .../StrippingRD/StrippingSb2PKMuXPi.py        |  451 +++
 .../StrippingRD/StrippingStrangeHadrons.py    |  358 ++
 .../StrippingRD/StrippingStrangeSL.py         |  543 +++
 .../StrippingRD/StrippingTau23MuLines.py      |  570 +++
 .../StrippingRD/StrippingTau2LambdaMuLines.py |  130 +
 .../StrippingRD/StrippingZVTOP.py             |  419 +++
 .../Stripping28r2p1/StrippingRD/__init__.py   |   26 +
 .../StrippingSL/StrippingB23MuNu.py           |  631 ++++
 .../StrippingSL/StrippingB2DMuForTauMu.py     |  362 ++
 .../StrippingSL/StrippingB2DMuNuX.py          |  343 ++
 .../StrippingSL/StrippingB2DMuNuXUtils.py     |  163 +
 .../StrippingSL/StrippingB2Dlnu.py            |  222 ++
 .../StrippingSL/StrippingB2Dst0MuNu.py        |  240 ++
 .../StrippingSL/StrippingB2DstMuNuIncl.py     |  106 +
 .../StrippingSL/StrippingB2Invis.py           |  340 ++
 .../StrippingSL/StrippingB2PPbarMuForTauMu.py |  568 +++
 .../StrippingSL/StrippingB2XTauNu.py          | 3128 +++++++++++++++++
 .../StrippingSL/StrippingB2XuENu.py           | 2211 ++++++++++++
 .../StrippingSL/StrippingB2XuMuNu.py          | 2214 ++++++++++++
 .../StrippingSL/StrippingBXX.py               |  214 ++
 .../StrippingSL/StrippingBc2Bs.py             |  714 ++++
 .../StrippingCharmFromBSemiForHadronAsy.py    |  423 +++
 .../StrippingLb2LcMuNuX_Lc2L0Pi.py            |  206 ++
 .../StrippingSL/StrippingLb2pMuNuVub.py       |  464 +++
 .../StrippingSL/StrippingSemilepISR.py        |  571 +++
 .../StrippingSL/StrippingTrackEffD0ToK3Pi.py  |  393 +++
 .../StrippingSL/Strippingbhad2PMuX.py         |  561 +++
 .../Stripping28r2p1/StrippingSL/__init__.py   |   26 +
 .../StrippingArchive/Stripping28r2p1/Utils.py |  412 +++
 .../Stripping28r2p1/__init__.py               |   86 +
 .../python/StrippingArchive/__init__.py       |    2 +
 .../tests/refs/instantiate-all-strip.ref      |   65 +-
 Phys/StrippingSettings/dbase/stripping28r2p1  |  Bin 0 -> 307200 bytes
 513 files changed, 177478 insertions(+), 1 deletion(-)
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsDownElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsTtrackElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsUpElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsVeloElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasic.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasicCharged.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasicNeutral.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardD0.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDiElectron.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDiMuon.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDipion.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDplus.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDstar.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardEta.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardIntermediate.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardJets.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardJpsi.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardKstar.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardLambdac.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardLambdastar.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardMuPi.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPhi.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPhotons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPi0.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardRho.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardTau.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardTauNonPhys.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardV0.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseElectrons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseGammaConversion.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLoosePions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsProtons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsVeloPions.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllTightGammaConversion.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllTightSymGammaConversion.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllVeryLooseMuons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdHltJets.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdJets.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdJetsR07.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLTUnbiasedJpsi2MuMu.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseAllPhotons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseCnvPhotons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseD02HH.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseD02KsHH.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDalitzPi0.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedDiElectron.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedKpi.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedKstar.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedPhi.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTau.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTauNoPID.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTauNonPhys.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiElectron.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiMuon.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiMuonSameSign.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDipion.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDownKaons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDownMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDplus.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDstarWithD2HH.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseElectrons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseJpsi2MuMu.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseJpsi2ee.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKs.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKstar.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseLambda.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseLambdac.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseMergedPi0.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePhi.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePhotons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseResolvedEta.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseResolvedPi0.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseRho0.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseRhoPlus.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdMassConstrainedJpsi2MuMu.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownElectrons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownKaons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownPions.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpKaons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpMuons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsVeloElectrons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdParticleFlow.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightDetachedTau.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightDplus.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightElectrons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightKaons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightPhi.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightPions.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightProtons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdV0FromBrunel.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseAllPhotons.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseDetachedKstar.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseDiMuon.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseJpsi2MuMu.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseKs.py
 create mode 100644 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseLambda.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseMuons.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/Utils.py
 create mode 100755 Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiHH.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiPi0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiPi0_Run1.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiX0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiXforBeta_s.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKS.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKSFullDST.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKstar.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBs2EtacPhiBDT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBs2JpsieePhi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_B2DXBuilder.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2BXBuilder.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2DDBuilder.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2DXBuilder.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_DBuilder.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_HHBuilder.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_HHHBuilder.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_LTUnbiased.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_LoKiCuts.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Utils.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2DDphi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2DXD2HMuNu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2nbody.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingBeauty2Charm.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingB2Chic0KPi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingB2JpsiXforEM_s.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBbbar2PhiPhi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2Ds1Gamma.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2EtacMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2EtacSL.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2JpsiHBDT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2JpsiMuXNew.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc3h.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCC2DD.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2Baryons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2KsKpi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LambdaLambda.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LstLambda.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LstLst.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PPPiPi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhiDetached.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhiPiPi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PpbarNew.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCharmAssociative.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingChiCJPsiGammaConv.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonForXsection.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonInherit.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonNew.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingEtap2pipimumu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingHeavyBaryons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingInclusiveCharmBaryons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingInclusiveDoubleD.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingLb2EtacKp.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingLb2L0X3872.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOmegab2XicKpi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOmegabDecays.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOniaPhotoProduction.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOniaPhotoProductionPrescaled.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPPMuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPsiX0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPsiXForBandQ.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingUpsilonExotic.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXB2DPiP.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXbToLambdaKmX.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXibc.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXibcBDT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXiccBDT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB24pLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2CharmlessInclusive.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2HHBDT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2HHPi0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2KShh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2KShhh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2Kpi0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2Ksthh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2LambdapppLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2TwoBaryons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2XEta.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2a1Pi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2hhpipiPhsSpcCut.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2pphh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBc2hhh_BnoC.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2KKhh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2KSKS_Run2.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2Kst_0Kst_0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2PhiKst0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2PhiPhi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2KSh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2Ksthh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2hhh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2rho0rhoPlus.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingButo5h.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingD2HHBDT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingHb2Charged2Body.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingHb2V0V0h.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingLb2V0hh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingLb2V0pp.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb23ph.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2p3h.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2p3h_raw.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2phh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXib2LbXLb2ph.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingCharmFromBSemiForHadronAsy.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingCharmFromBSemiForProtonPID.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0DalitzPartReco.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0ForPid.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD0ForBXX.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDst2D0Pi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDstarD02KShhForTrackingEff.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDstarD02hhPi0PartRecoForPhotonCalib.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingElectronID.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingElectronRecoEff.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingEta2MuMuGamma.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingJPsiForSL.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingK23PiForDownstreamTrackEff.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingLowPtMuID.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingMuIDCalib.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingNoPIDDstarWithD02RSKPi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingNoPIDDstarWithD02RSKPi_Brem.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingPIDCalib.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingProtonAsym.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingSigmacForPID.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffD0ToK3Pi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffD0ToKPi.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffDownMuon.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffMuonTT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffVeloMuon.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingV0ForPID.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingB2ppipiSigmacmm_Lcpi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingBs2st2pKpipipi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingChargedHyperons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharm2PPX.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmForVub.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmFromBSemi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmWeakDecays.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmedBaryonSL.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02HHForXSec.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02K3PiForXSec.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02KSKS.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHForXSec.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHKs.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHPi0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HMuNu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2KPiPiMuNu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2KS0H_conf.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2PhiPiForXSec.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2PiPi0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2XMuMuSS.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hhh_FTcalib.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hhh_conf.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD02xx.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD0ToHHPi0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2HHHH.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2KSHHPi0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2KShh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2XGamma.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarPromptWithD02HHHH.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarPromptWithD02HHMuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingExcitedDsSpectroscopy.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V02H.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V03H.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V2H.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V3H.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingKKPiPi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2PHHForXSec.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V03H.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V0H.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V2H.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdacForNeutronPID.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLc2L0DDpi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLc2L0LLpi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingNeutralCBaryons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingPromptCharm.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXcpToLambdaKSHp.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXcpToXiPipHp.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2HHH.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2PKKPiForXSec.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2PKPiForXSec.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXicToSigmaKPi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXicc.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXiccSL.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeL2ppppi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeMedian.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeNOverflows.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonConvertedPhoton.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonD02KPiPi0.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonDiMuon.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonDst2D0KPiForPID.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonGammaHadron.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonMiniBias.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonOpenCharm.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonOthercc.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonPIDCalib.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonSingleElectron.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTopology.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffDownMuon.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffMuonTT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffVeloMuon.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonWMuNu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingLb2V0pphh.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingLb2dpX.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingV0ForPID_ForIFT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/Utils.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/StrippingBadEvents.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/StrippingMiniBias.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/DisplVertices_Utils.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA1MuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA2MuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA2MuMuSameSign.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingALP2TauTau.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2EHNLLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2LLP2HH.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2MuHNLLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2SS.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingConvertedPhoton.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDY2MuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDY2ee.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDisplVertices.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDitau.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingExotica.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingFullDiJets.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingGluinos.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingH24Mu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingHighPtMuons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingHltQEE.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingInclQQ.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLFVExotica.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2HH.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2Hadrons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2Jets.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2MuX.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLambdaDecaysDM.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLb2dp.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLowMultINC.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingMicroDiJets.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingMuMuSS.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingSbarSCorrelations.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingSingleTrackTIS.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingStrangeBaryons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingStrangeBaryonsNoPID.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingTaggedJets.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingW2nH.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWJets.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWRareDecay.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWe.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02MuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02ee.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02nH.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ0RareDecay.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingDijets.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingHighPtTopoJets.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingJets.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/Beauty2Charm_LoKiCuts.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB02Lcmu_pKpi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB23MuLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2DibaryonMuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2EtaMuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KLLXInclusive.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KSKSMuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KstTauTau.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDTSS.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDT_Calib.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0ELines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0MuLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0MuOSLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0SSMuMu3PiLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2MuMuMuMuLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2OCMuMu.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XLL.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XMuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XMuTauMuonic.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTau.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauTau.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauTauMuonic.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBLVLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBaryonicLFV.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBd2KSLLX.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBd2eeKstarBDT.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2MajoLep.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGamma.py
 create mode 100755 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaExclTDCPV.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaExclusive.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaNoBias.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2MuMuGamma.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2MuMuLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2gammagamma.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2st2KKMuX.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2LLK.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2MajoLep.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2MuNu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingD23MuLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingDarkBoson.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingDoubleSLForRX.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingHypb2L0HGamma.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingK0s2XXMuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2Leptons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2MuMuMuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2PiPiMuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2eePiPi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLFVLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLb2L0Gamma.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLc23MuLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingMultiLepton.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingPhiToKSKS.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareBaryonicMuMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareNStrange.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareStrange.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingS2Hyperons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingSb2PKMuXPi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingStrangeHadrons.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingStrangeSL.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingTau23MuLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingTau2LambdaMuLines.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingZVTOP.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB23MuNu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuForTauMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuNuX.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuNuXUtils.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Dlnu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Dst0MuNu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DstMuNuIncl.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Invis.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2PPbarMuForTauMu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XTauNu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XuENu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XuMuNu.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingBXX.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingBc2Bs.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingCharmFromBSemiForHadronAsy.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingLb2LcMuNuX_Lc2L0Pi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingLb2pMuNuVub.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingSemilepISR.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingTrackEffD0ToK3Pi.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/Strippingbhad2PMuX.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/__init__.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/Utils.py
 create mode 100644 Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/__init__.py
 create mode 100644 Phys/StrippingSettings/dbase/stripping28r2p1

diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsDownElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsDownElectrons.py
new file mode 100755
index 000000000..9711e902e
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsDownElectrons.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'NoBrem NoPIDs Electrons with downstram tracks'
+"""
+__author__  = "Ulrich Kerzel Ulrich.Kerzel@cern.ch"
+# =============================================================================
+__all__ = (
+    'NoBremNoPIDsDownElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'NoBremNoPIDsDownElectrons'  ,
+                                   DecayDescriptor = 'Electron' ,
+                                   Particle = 'electron'  )
+
+algorithm.AddBremPhotonTo = [] 
+
+# configure the track selector
+selector = trackSelector ( algorithm , trackTypes = [ "Downstream" ]) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+NoBremNoPIDsDownElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsElectrons.py
new file mode 100755
index 000000000..02d43768e
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsElectrons.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Electrons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'No Brem NoPIDs Electrons wioth loose cuts'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'NoBremNoPIDsElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import NoPIDsParticleMaker 
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'NoBremNoPIDsElectrons'    ,
+                                   DecayDescriptor = 'Electron' ,
+                                   Particle = 'electron'  )
+
+selector = trackSelector ( algorithm , trackTypes = [ "Long" ])
+
+algorithm.AddBremPhotonTo = []
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+NoBremNoPIDsElectrons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsTtrackElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsTtrackElectrons.py
new file mode 100755
index 000000000..7bce50301
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsTtrackElectrons.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'NoBrem NoPIDs Electrons with Ttrack tracks'
+"""
+__author__  = "Ulrich Kerzel Ulrich.Kerzel@cern.ch"
+# =============================================================================
+__all__ = (
+    'NoBremNoPIDsTtrackElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'NoBremNoPIDsTtrackElectrons',
+                                   DecayDescriptor = 'Electron' ,
+                                   Particle = 'electron'  )
+
+algorithm.AddBremPhotonTo = [] 
+
+# configure the track selector
+selector = trackSelector ( algorithm,trackTypes = [ "Ttrack" ]  ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+NoBremNoPIDsTtrackElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsUpElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsUpElectrons.py
new file mode 100755
index 000000000..01fefe3b8
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsUpElectrons.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'NoBrem NoPIDs Electrons with Upstream tracks'
+"""
+__author__  = "Ulrich Kerzel Ulrich.Kerzel@cern.ch"
+# =============================================================================
+__all__ = (
+    'NoBremNoPIDsUpElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'NoBremNoPIDsUpElectrons'    ,
+                                   DecayDescriptor = 'Electron' ,
+                                   Particle = 'electron'  )
+algorithm.AddBremPhotonTo = [] 
+
+# configure the track selector
+selector = trackSelector ( algorithm, trackTypes = [ "Upstream" ] ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+NoBremNoPIDsUpElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsVeloElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsVeloElectrons.py
new file mode 100755
index 000000000..cab7eabe8
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/NoBremNoPIDsVeloElectrons.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Electrons with VELO tracks'
+"""
+__author__  = "Ulrich Kerzel Ulrich.Kerzel@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdNoPIDsElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdNoPIDsVeloElectrons'         ,
+                                DecayDescriptor = 'Electron' , Particle = 'electron'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm,trackTypes = [ "Velo" ]  ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsVeloElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasic.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasic.py
new file mode 100755
index 000000000..e575681c4
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasic.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardBasic.py
+#  configuration file for 'Standard Basic' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Basic' particles 
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StandardBasicCharged import *
+_locations.update ( locations )
+
+from CommonParticles.StandardBasicNeutral import *
+_locations.update ( locations )
+
+from CommonParticles.StandardJets import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasicCharged.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasicCharged.py
new file mode 100755
index 000000000..86020011c
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasicCharged.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardBasicCharged.py
+#  configuration file for 'Standard BasicCharged' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Basic Charged' particles 
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StandardPions     import *
+_locations.update ( locations )
+
+from CommonParticles.StandardKaons     import *
+_locations.update ( locations )
+
+from CommonParticles.StandardMuons     import *
+_locations.update ( locations )
+
+from CommonParticles.StandardElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StandardProtons   import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasicNeutral.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasicNeutral.py
new file mode 100755
index 000000000..419cb0c62
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardBasicNeutral.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardBasicNeutral.py
+#  configuration file for 'Standard Basic Neutral' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Basic Neutral' particles 
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StandardPhotons import *
+_locations.update ( locations )
+
+from CommonParticles.StandardPi0 import *
+_locations.update ( locations )
+
+from CommonParticles.StandardEta import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseDiElectron import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardD0.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardD0.py
new file mode 100755
index 000000000..86ef3ff8f
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardD0.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardD0.py
+#  configuration file for 'Standard D0' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-28
+# =============================================================================
+"""
+Configuration file for 'Standard D0'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseD02KsHH import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseD02HH import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDiElectron.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDiElectron.py
new file mode 100755
index 000000000..2f296d2fa
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDiElectron.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLoose.py
+#  configuration file for 'Standard Loose DiElectron' 
+#  @author Patrick Koppenburg
+#  @date 2009-12-08
+# =============================================================================
+"""
+Configuration file for 'Standard Loose DiElectron'
+"""
+__author__  = "Rob Lambert"
+# =============================================================================
+from Gaudi.Configuration import *
+
+## ============================================================================
+## create the algorithm 
+
+_locations = {} 
+
+from CommonParticles.StdLooseDiElectron import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseDetachedDiElectron import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## configure Data-On-Demand service 
+#locations = updateDoD ( StdLoose )
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDiMuon.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDiMuon.py
new file mode 100755
index 000000000..cd63dbb5c
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDiMuon.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLoose.py
+#  configuration file for 'Standard Loose DiMuon' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose DiMuon'
+"""
+__author__  = "Rob Lambert"
+# =============================================================================
+from Gaudi.Configuration import *
+
+## ============================================================================
+## create the algorithm 
+
+_locations = {} 
+
+from CommonParticles.StdLooseDiMuon import *
+_locations.update ( locations )
+
+from CommonParticles.StdVeryLooseDiMuon import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseDiMuonSameSign import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## configure Data-On-Demand service 
+#locations = updateDoD ( StdLoose )
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDipion.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDipion.py
new file mode 100755
index 000000000..cebde6736
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDipion.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardDipion.py
+#  configuration file for 'Standard Dipion' 
+#  @author Donal Hill, Conor Fitzpatrick, Christian Elsasser
+#  @date 2012-08-07
+# =============================================================================
+"""
+Configuration file for 'Standard Dipion'
+"""
+__author__  = "Donal Hill, Conor Fitzpatrick, Christian Elsasser"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseDipion import *
+_locations.update ( locations )
+
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDplus.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDplus.py
new file mode 100755
index 000000000..72b9f5a19
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDplus.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardDplus.py
+#  configuration file for 'Standard D+' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-28
+# =============================================================================
+"""
+Configuration file for 'Standard D+'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseDplus import *
+_locations.update ( locations )
+
+
+from CommonParticles.StdTightDplus import *
+_locations.update ( locations )
+
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDstar.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDstar.py
new file mode 100755
index 000000000..a7070c044
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardDstar.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardDstar.py
+#  configuration file for 'Standard D*' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-28
+# =============================================================================
+"""
+Configuration file for 'Standard D*'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+
+_locations = {}
+
+from CommonParticles.StdLooseDstarWithD2HH import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardElectrons.py
new file mode 100755
index 000000000..57e3c03b9
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardElectrons.py
@@ -0,0 +1,85 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardElectrons.py
+#  configuration file for 'Standard Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Electrons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdAllNoPIDsElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsDownElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsUpElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllLooseElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllLooseANNElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNDownElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNDownElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNUpElectrons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNUpElectrons import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardEta.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardEta.py
new file mode 100755
index 000000000..67360c320
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardEta.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardEta.py
+#  configuration file for 'Standard Eta' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Eta'
+"""
+__author__  = "Patrick Koppenburg Patrick.Koppenburg@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseResolvedEta import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardIntermediate.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardIntermediate.py
new file mode 100755
index 000000000..2b2da88b7
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardIntermediate.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardIntermediates.py
+#  configuration file for 'Standard Intermediate particles
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Intermediate' particles 
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StandardV0 import *
+_locations.update ( locations )
+from CommonParticles.StandardKstar import *
+_locations.update ( locations )
+from CommonParticles.StandardRho import *
+_locations.update ( locations )
+from CommonParticles.StandardPhi import *
+_locations.update ( locations )
+from CommonParticles.StandardD0 import *
+_locations.update ( locations )
+from CommonParticles.StandardDplus import *
+_locations.update ( locations )
+from CommonParticles.StandardDstar import *
+_locations.update ( locations )
+from CommonParticles.StandardJpsi import *
+_locations.update ( locations )
+from CommonParticles.StandardDiMuon import *
+_locations.update ( locations )
+from CommonParticles.StandardDiElectron import *
+_locations.update ( locations )
+from CommonParticles.StandardLambdac import *
+_locations.update ( locations )
+from CommonParticles.StandardTau import *
+_locations.update ( locations )
+from CommonParticles.StandardTauNonPhys import *
+_locations.update ( locations )
+from CommonParticles.StandardDipion import *
+_locations.update ( locations )
+from CommonParticles.StandardLambdastar import *
+_locations.update ( locations )
+from CommonParticles.StandardMuPi import *
+_locations.update ( locations )
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardJets.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardJets.py
new file mode 100644
index 000000000..88ef0d8c8
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardJets.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardBasic.py
+#  configuration file for 'Standard Basic' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Basic' particles 
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdParticleFlow import *
+_locations.update ( locations )
+
+from CommonParticles.StdJets import *
+_locations.update ( locations )
+
+from CommonParticles.StdJetsR07 import *
+_locations.update ( locations )
+
+from CommonParticles.StdHltJets import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardJpsi.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardJpsi.py
new file mode 100755
index 000000000..e68658575
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardJpsi.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardJpsi.py
+#  configuration file for 'Standard Jpsi' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-28
+# =============================================================================
+"""
+Configuration file for 'Standard Jpsi'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseJpsi2MuMu import *
+_locations.update ( locations )
+
+from CommonParticles.StdVeryLooseJpsi2MuMu import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseJpsi2ee import *
+_locations.update ( locations )
+
+from CommonParticles.StdLTUnbiasedJpsi2MuMu import *
+_locations.update ( locations )
+
+from CommonParticles.StdMassConstrainedJpsi2MuMu import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardKaons.py
new file mode 100755
index 000000000..3c6509e89
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardKaons.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardKaons.py
+#  configuration file for 'Standard Kaons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Kaons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdAllNoPIDsKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsUpKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsDownKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllLooseKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllLooseANNKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseDownKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNDownKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNDownKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNUpKaons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNUpKaons import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardKstar.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardKstar.py
new file mode 100755
index 000000000..ec73063cd
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardKstar.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardKstar.py
+#  configuration file for 'Standard K*' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-28
+# =============================================================================
+"""
+Configuration file for 'Standard K*'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseKstar import *
+_locations.update ( locations )
+
+from CommonParticles.StdVeryLooseDetachedKstar import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseDetachedKstar import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseDetachedKpi import *
+_locations.update ( locations )
+ 
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardLambdac.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardLambdac.py
new file mode 100755
index 000000000..2ba2cb581
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardLambdac.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardDplus.py
+#  configuration file for 'Standard Lambda_c' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-28
+# =============================================================================
+"""
+Configuration file for 'Standard Lambda_c'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseLambdac import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardLambdastar.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardLambdastar.py
new file mode 100755
index 000000000..95d2eda08
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardLambdastar.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseLambdastar.py
+#  configuration file for 'Standard Loose Lambdastar'
+#  @author Yasmine Amhis
+#  @date 2015-05-06
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Lambdastar'. Useful for R_Lambda(*)
+"""
+__author__  = "Yasmine Amhis"
+# =============================================================================
+__all__ = (
+    'StdLooseLambdastar2pK' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+## ============================================================================
+## create the algorithm
+StdLooseLambdastar2pK = CombineParticles ("StdLooseLambdastar2pK")
+StdLooseLambdastar2pK.Inputs = ["Phys/StdAllLooseKaons/Particles",
+                                "Phys/StdAllLooseProtons/Particles"]
+StdLooseLambdastar2pK.DecayDescriptor = "[Lambda(1520)0 -> p+ K-]cc"
+StdLooseLambdastar2pK.CombinationCut = "(AM < 2600.*MeV) &  (ADOCACHI2CUT(30, ''))"
+StdLooseLambdastar2pK.MotherCut = "(VFASPF(VCHI2) < 25.)"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdLooseLambdastar2pK )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardMuPi.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardMuPi.py
new file mode 100644
index 000000000..74fea1769
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardMuPi.py
@@ -0,0 +1,40 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""                                                                                                                                                                                                
+Configuration file for Standard All Loose Pi-Mu+ pair, potentially detached.                                                                                                                                          
+"""
+
+__author__ = 'Benoit VIAUD'
+__date__ = '13/05/2015'
+
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+import GaudiKernel.SystemOfUnits as Units
+
+##############################                                                                                                                                                                     
+# StdAllLooseMuPion #                                                                                                                                                                     
+##############################                                                                                                                                                                     
+StdAllLooseMuPion = CombineParticles("StdAllLooseMuPion")
+StdAllLooseMuPion.DecayDescriptor = "rho(770)0  -> mu+ pi-"
+StdAllLooseMuPion.Inputs = ["Phys/StdAllLooseMuons/Particles","Phys/StdAllLoosePions/Particles"]
+StdAllLooseMuPion.DaughtersCuts = { "mu+" : "(PT>200*MeV) & (MIPCHI2DV(PRIMARY)>0.)", "pi-" : "(PT>200*MeV) & (MIPCHI2DV(PRIMARY)>0.)"  }
+StdAllLooseMuPion.CombinationCut = "(ADOCACHI2CUT(30,''))"
+StdAllLooseMuPion.MotherCut = "(VFASPF(VCHI2)<25)"
+locations = updateDoD(StdAllLooseMuPion)
+
+## ============================================================================                                                                                                                    
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardMuons.py
new file mode 100755
index 000000000..2bab659f0
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardMuons.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardMuons.py
+#  configuration file for 'Standard Muons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Muons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdAllNoPIDsMuons import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsMuons import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllLooseMuons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseMuons import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllVeryLooseMuons import *
+_locations.update ( locations )
+
+from CommonParticles.StdVeryLooseMuons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightMuons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNMuons import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNDownMuons import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsUpMuons import *
+_locations.update(locations)
+
+from CommonParticles.StdTightANNUpMuons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseDownMuons import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPhi.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPhi.py
new file mode 100755
index 000000000..d082818d3
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPhi.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardPhi.py
+#  configuration file for 'Standard Phi' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-28
+# =============================================================================
+"""
+Configuration file for 'Standard Phi'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLoosePhi import *
+_locations.update ( locations )
+from CommonParticles.StdLooseDetachedPhi import *
+_locations.update ( locations )
+from CommonParticles.StdTightPhi import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPhotons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPhotons.py
new file mode 100755
index 000000000..fcb116b95
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPhotons.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardPhotons.py
+#  configuration file for 'Standard Photons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Photons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLoosePhotons    import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseCnvPhotons import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseAllPhotons import *
+_locations.update ( locations )
+
+from CommonParticles.StdVeryLooseAllPhotons import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllLooseGammaConversion import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllTightGammaConversion import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllTightSymGammaConversion import *
+_locations.update ( locations )
+
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPi0.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPi0.py
new file mode 100755
index 000000000..ab037cb44
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPi0.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardPi0.py
+#  configuration file for 'Standard Pi0' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Pi0'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseMergedPi0    import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseResolvedPi0 import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseDalitzPi0 import *
+_locations.update ( locations )
+
+
+
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPions.py
new file mode 100755
index 000000000..d27053961
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardPions.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardPions.py
+#  configuration file for 'Standard Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Pions'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdAllNoPIDsPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsDownPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsUpPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllLoosePions import *
+_locations.update ( locations )
+
+from CommonParticles.StdLoosePions import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllLooseANNPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNDownPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNDownPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNUpPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNUpPions import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllNoPIDsVeloPions import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardProtons.py
new file mode 100755
index 000000000..0e7ae48ef
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardProtons.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardProtons.py
+#  configuration file for 'Standard Protons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Protons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdAllNoPIDsProtons import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsProtons import *
+_locations.update ( locations )
+
+from CommonParticles.StdNoPIDsDownProtons import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllLooseProtons  import *
+_locations.update ( locations )
+
+from CommonParticles.StdAllLooseANNProtons  import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseProtons  import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNProtons  import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightProtons  import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNProtons  import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNDownProtons  import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNDownProtons  import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseANNUpProtons  import *
+_locations.update ( locations )
+
+from CommonParticles.StdTightANNUpProtons  import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardRho.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardRho.py
new file mode 100755
index 000000000..c6afa6a3c
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardRho.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardRho.py
+#  configuration file for 'Standard Rho' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-28
+# =============================================================================
+"""
+Configuration file for 'Standard Rho'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseRho0 import *
+_locations.update ( locations )
+from CommonParticles.StdLooseRhoPlus import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardTau.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardTau.py
new file mode 100755
index 000000000..1e400383c
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardTau.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardTau.py
+#  configuration file for 'Standard Tau' 
+#  @author Donal Hill, Conor Fitzpatrick, Christian Elsasser
+#  @date 2012-08-07
+# =============================================================================
+"""
+Configuration file for 'Standard Tau'
+"""
+__author__  = "Donal Hill, Conor Fitzpatrick, Christian Elsasser"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseDetachedTau import *
+_locations.update ( locations )
+from CommonParticles.StdTightDetachedTau import *
+_locations.update ( locations )
+
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardTauNonPhys.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardTauNonPhys.py
new file mode 100644
index 000000000..528fdcc50
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardTauNonPhys.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardTau.py
+#  configuration file for 'Standard Tau' 
+#  @author Donal Hill, Conor Fitzpatrick, Christian Elsasser
+#  @date 2012-08-07
+# =============================================================================
+"""
+Configuration file for 'Standard Tau Non Physical Tau'
+"""
+__author__  = "Donal Hill, Conor Fitzpatrick, Christian Elsasser"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseDetachedTauNonPhys import *
+_locations.update ( locations )
+
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardV0.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardV0.py
new file mode 100755
index 000000000..ec050f626
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StandardV0.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StandardV0.py
+#  configuration file for 'Standard V0' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-28
+# =============================================================================
+"""
+Configuration file for 'Standard V0'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+
+_locations = {} 
+
+from CommonParticles.StdLooseKs import *
+_locations.update ( locations )
+
+from CommonParticles.StdVeryLooseKs import *
+_locations.update ( locations )
+
+from CommonParticles.StdLooseLambda import *
+_locations.update ( locations )
+
+from CommonParticles.StdVeryLooseLambda import *
+_locations.update ( locations )
+
+from CommonParticles.StdV0FromBrunel import *
+_locations.update ( locations )
+
+# redefine the locations 
+locations = _locations
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    from CommonParticles.Utils import locationsDoD
+    print locationsDoD ( locations )
+    
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNElectrons.py
new file mode 100755
index 000000000..3b605ddf2
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNElectrons.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdAllLooseANNElectrons.py
+#  configuration file for 'Standard Loose ANN Electrons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Electrons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdAllLooseANNElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdAllLooseANNElectrons' ,
+                                     Particle = 'electron' )
+
+# configure the track selector
+selector = trackSelector ( algorithm )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter , 'Electron' )
+#fltr.Selection = [ "RequiresDet='CALO' ProbNNe>'0.09'" ]
+#fltr.Selection = [ "ProbNNe>'0.1'" ]
+fltr.Selection = [ "RequiresDet='RICHORCALO' ProbNNe>'0.03'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllLooseANNElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNKaons.py
new file mode 100755
index 000000000..663ab50af
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNKaons.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNKaons.py
+#  configuration file for 'Standard Loose ANN Kaons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose ANN Kaons'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdAllLooseANNKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import ProtoParticleCALOFilter, CombinedParticleMaker
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker( 'StdAllLooseANNKaons',
+                                   Particle = 'kaon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Kaon' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNk>'0.075'" ]
+fltr.Selection = [ "ProbNNk>'0.02'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllLooseANNKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNPions.py
new file mode 100755
index 000000000..7b6208647
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNPions.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdAllLooseANNPions.py
+#  configuration file for 'Standard AllLoose Pions' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard All Loose ANN Pions'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdAllLooseANNPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdAllLooseANNPions',
+                                    Particle = 'pion'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Pion' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNpi>'0.1'" ]
+fltr.Selection = [ "ProbNNpi>'0.05'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllLooseANNPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNProtons.py
new file mode 100755
index 000000000..e065f9ce5
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseANNProtons.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdALLLooseANNProtons.py
+#  configuration file for 'Standard Loose Protons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose ANN Protons'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdAllLooseANNProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdAllLooseANNProtons',
+                                    Particle = 'proton' )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Proton' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNp>'0.05'" ]
+fltr.Selection = [ "ProbNNp>'0.01'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllLooseANNProtons = algorithm
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseElectrons.py
new file mode 100755
index 000000000..ad5ffe899
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseElectrons.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseElectrons.py
+#  configuration file for 'Standard Loose Electrons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Electrons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdAllLooseElectrons',
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdAllLooseElectrons' ,Particle =  'electron'  )
+# configure the track selector
+selector = trackSelector ( algorithm )
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter , 'Electron' )
+fltr.Selection = [ "RequiresDet='CALO' CombDLL(e-pi)>'-2.0'" ]
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllLooseElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseGammaConversion.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseGammaConversion.py
new file mode 100644
index 000000000..1ace12fb4
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseGammaConversion.py
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard DiElectrons from gamma conversion'
+"""
+__author__  = "Olivier Deschamps : Olivier.Deschamps @cern.ch"
+# =============================================================================
+__all__ = (
+    'StdAllLooseGammaLL' ,
+    'StdAllLooseGammaDD' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from CommonParticles.Utils import *
+from GaudiKernel.SystemOfUnits import *
+from Configurables import ( DiElectronMaker, ProtoParticleCALOFilter,
+                            ParticleTransporter )
+from Configurables import LoKi__VertexFitter 
+
+###--- Long pair
+dieLL = DiElectronMaker('StdAllLooseGammaLL')
+dieLL.DecayDescriptor = "gamma -> e+ e-"
+selector = trackSelector ( dieLL , trackTypes = [ "Long"]) 
+dieLL.addTool( ProtoParticleCALOFilter, name='Electron' )
+dieLL.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'-2.0'"]
+dieLL.DeltaY = 3.
+dieLL.DeltaYmax = 200 * mm
+dieLL.DiElectronMassMax = 100.*MeV
+dieLL.DiElectronPtMin = 200.*MeV
+locations = updateDoD ( dieLL )
+StdAllLooseGammaLL=dieLL
+
+###--- Downstream pair
+dieDD = DiElectronMaker('StdAllLooseGammaDD')
+dieDD.DecayDescriptor = "gamma -> e+ e-"
+selector = trackSelector ( dieDD , trackTypes = [ "Downstream"]) 
+dieDD.addTool( ProtoParticleCALOFilter, name='Electron' )
+dieDD.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'-2.0'"]
+dieDD.DeltaY = 3.
+dieDD.DeltaYmax = 200 * mm
+dieDD.DiElectronMassMax = 100.*MeV
+dieDD.DiElectronPtMin = 200.*MeV
+#-- improved vertex fitter settings
+dieDD.UseCombinePair = True
+dieDD.addTool( ParticleTransporter, name='TransporterDie' )
+dieDD.TransporterDie.TrackExtrapolator = "TrackRungeKuttaExtrapolator"
+
+dieDD.ParticleCombiners.update( { "" : "LoKi::VertexFitter"} )
+dieDD.addTool( LoKi__VertexFitter )
+dieDD.LoKi__VertexFitter.addTool( ParticleTransporter, name='Transporter' )
+dieDD.LoKi__VertexFitter.Transporter.TrackExtrapolator = "TrackRungeKuttaExtrapolator"
+dieDD.LoKi__VertexFitter.DeltaDistance = 100 * mm
+
+locations.update( updateDoD ( dieDD ))
+StdAllLooseGammaDD=dieDD
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseKaons.py
new file mode 100755
index 000000000..0efbcb5c2
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseKaons.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseKaons.py
+#  configuration file for 'Standard Loose Kaons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Kaons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdAllLooseKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import ProtoParticleCALOFilter, CombinedParticleMaker
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker('StdAllLooseKaons',  Particle = 'kaon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Kaon' )
+fltr.Selection = [ "RequiresDet='RICH' CombDLL(k-pi)>'-5.0'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllLooseKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseMuons.py
new file mode 100755
index 000000000..5d7ce93e4
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseMuons.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseMuons.py
+#  configuration file for 'Standard Loose Muons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Muons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdAllLooseMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleMUONFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdAllLooseMuons',
+                                     Particle =  'muon'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleMUONFilter, 'Muon' )
+fltr.Selection = [ "RequiresDet='MUON' IsMuon=True" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllLooseMuons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLoosePions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLoosePions.py
new file mode 100755
index 000000000..74b9b9083
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLoosePions.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLoosePions.py
+#  configuration file for 'Standard Loose Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Pions'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdAllLoosePions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdAllLoosePions' ,
+                                     Particle = 'pion'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Pion' )
+fltr.Selection = [ "" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllLoosePions = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseProtons.py
new file mode 100755
index 000000000..aef8ce8cb
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllLooseProtons.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseProtons.py
+#  configuration file for 'Standard Loose Protons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Protons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdAllLooseProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdAllLooseProtons',
+                                    Particle =  'proton'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Proton' )
+fltr.Selection = [ "RequiresDet='RICH' CombDLL(p-pi)>'-5.0'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllLooseProtons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsElectrons.py
new file mode 100755
index 000000000..ca8cbc3d2
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsElectrons.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdAllNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Electrons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdAllNoPIDsElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdAllNoPIDsElectrons'      ,
+                                   DecayDescriptor = 'Electron' ,
+                                   Particle = 'electron'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllNoPIDsElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsKaons.py
new file mode 100755
index 000000000..b268d548a
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsKaons.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdAllNoPIDsKaons.py
+#  configuration file for 'Standard NoPIDs Kaons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Kaons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdAllNoPIDsKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdAllNoPIDsKaons' ,
+                                   Particle = 'kaon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllNoPIDsKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsMuons.py
new file mode 100755
index 000000000..1112f0b33
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsMuons.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdAllNoPIDsMuons.py
+#  configuration file for 'Standard NoPIDs Muons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Muons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdAllNoPIDsMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdAllNoPIDsMuons'  ,
+                                   Particle = 'muon'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllNoPIDsMuons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsPions.py
new file mode 100755
index 000000000..4b86c195b
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsPions.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdAllNoPIDsPions.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Pions'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdAllNoPIDsPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdAllNoPIDsPions' ,
+                                   Particle = 'pion'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllNoPIDsPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsProtons.py
new file mode 100755
index 000000000..2f45a56bf
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsProtons.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsProtons.py
+#  configuration file for 'Standard NoPIDs Protons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Protons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdAllNoPIDsProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdAllNoPIDsProtons'  ,
+                                   Particle = 'proton'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllNoPIDsProtons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsVeloPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsVeloPions.py
new file mode 100644
index 000000000..5e7b9000f
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllNoPIDsVeloPions.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdAllNoPIDsVeloPions.py
+#  configuration file for 'Standard NoPIDs Velo Pions' 
+#  @author Michel De Cian, michel.de.cian@cern.ch
+#  @date 2016-10-24
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs pions from velo tracks'
+"""
+__author__  = "Michel De Cian michel.de.cian@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdAllNoPIDsVeloPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker, ChargedProtoParticleMaker 
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithmPP = ChargedProtoParticleMaker( 'VeloPP', Output = "Rec/ProtoP/VeloCharged", TrackSelectorType = 'TrackSelector')
+
+algorithm =  NoPIDsParticleMaker ( 'StdAllNoPIDsVeloPions' ,
+                                   Particle = 'pion',
+                                   Input = "Rec/ProtoP/VeloCharged")
+
+# configure the track selector
+selectorPP = trackSelector ( algorithmPP, trackTypes = [ "Velo" ] ) 
+selector = trackSelector ( algorithm, trackTypes = [ "Velo" ] ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+DataOnDemandSvc().AlgMap.update({ 'Rec/ProtoP/VeloCharged' : algorithmPP.getFullName() })
+
+## finally: define the symbol 
+StdAllNoPIDsVeloPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# ============================================================================= 
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllTightGammaConversion.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllTightGammaConversion.py
new file mode 100644
index 000000000..72eb389ab
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllTightGammaConversion.py
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard DiElectrons from gamma conversion'
+"""
+__author__  = "Olivier Deschamps : Olivier.Deschamps @cern.ch"
+# =============================================================================
+__all__ = (
+    'StdAllTightGammaLL' ,
+    'StdAllTightGammaDD' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from CommonParticles.Utils import *
+from GaudiKernel.SystemOfUnits import *
+from Configurables import ( DiElectronMaker, ProtoParticleCALOFilter,
+                            ParticleTransporter )
+from Configurables import LoKi__VertexFitter 
+
+###--- Long pair
+dieLL = DiElectronMaker('StdAllTightGammaLL')
+dieLL.DecayDescriptor = "gamma -> e+ e-"
+selector = trackSelector ( dieLL , trackTypes = [ "Long"]) 
+dieLL.addTool( ProtoParticleCALOFilter, name='Electron' )
+dieLL.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'0.0'"]
+dieLL.DeltaY = 3.
+dieLL.DeltaYmax = 200 * mm
+dieLL.DiElectronMassMax = 100.*MeV
+dieLL.DiElectronPtMin = 200.*MeV
+locations = updateDoD ( dieLL )
+StdAllTightGammaLL=dieLL
+
+###--- Downstream pair
+dieDD = DiElectronMaker('StdAllTightGammaDD')
+dieDD.DecayDescriptor = "gamma -> e+ e-"
+selector = trackSelector ( dieDD , trackTypes = [ "Downstream"]) 
+dieDD.addTool( ProtoParticleCALOFilter, name='Electron' )
+dieDD.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'0.0'"]
+dieDD.DeltaY = 3.
+dieDD.DeltaYmax = 200 * mm
+dieDD.DiElectronMassMax = 100.*MeV
+dieDD.DiElectronPtMin = 200.*MeV
+#-- improved vertex fitter settings
+dieDD.UseCombinePair = True
+dieDD.addTool( ParticleTransporter, name='TransporterDie' )
+dieDD.TransporterDie.TrackExtrapolator = "TrackRungeKuttaExtrapolator"
+
+dieDD.ParticleCombiners.update( { "" : "LoKi::VertexFitter"} )
+dieDD.addTool( LoKi__VertexFitter )
+dieDD.LoKi__VertexFitter.addTool( ParticleTransporter, name='Transporter' )
+dieDD.LoKi__VertexFitter.Transporter.TrackExtrapolator = "TrackRungeKuttaExtrapolator"
+dieDD.LoKi__VertexFitter.DeltaDistance = 100 * mm
+
+locations.update( updateDoD ( dieDD ) )
+StdAllTightGammaDD=dieDD
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllTightSymGammaConversion.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllTightSymGammaConversion.py
new file mode 100644
index 000000000..bd6d7daa3
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllTightSymGammaConversion.py
@@ -0,0 +1,90 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard DiElectrons from gamma conversion with PT reversed for background studies'
+"""
+__author__  = "Olivier Deschamps : Olivier.Deschamps @cern.ch"
+# =============================================================================
+__all__ = (
+    'StdAllTightSymGammaLL' ,
+    'StdAllTightSymGammaDD' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from CommonParticles.Utils import *
+from GaudiKernel.SystemOfUnits import *
+from Configurables import ( DiElectronMaker, ProtoParticleCALOFilter,
+                            ParticleTransporter )
+from Configurables import LoKi__VertexFitter 
+
+
+###--- Long pair
+dieSymLL = DiElectronMaker('StdAllTightSymGammaLL')
+dieSymLL.DecayDescriptor = "gamma -> e+ e-"
+selector = trackSelector ( dieSymLL , trackTypes = [ "Long"]) 
+dieSymLL.addTool( ProtoParticleCALOFilter('Electron'))
+dieSymLL.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'0.0'"]
+dieSymLL.DeltaY = 3.
+dieSymLL.DeltaYmax = 200 * mm
+dieSymLL.DiElectronMassMax = 100.*MeV
+dieSymLL.DiElectronPtMin = 200.*MeV
+dieSymLL.SymetricPair = True
+
+locations = updateDoD ( dieSymLL )
+StdAllTightSymGammaLL=dieSymLL
+
+###--- Downstream pair
+dieSymDD = DiElectronMaker('StdAllTightSymGammaDD')
+dieSymDD.DecayDescriptor = "gamma -> e+ e-"
+selector = trackSelector ( dieSymDD , trackTypes = [ "Downstream"]) 
+dieSymDD.addTool( ProtoParticleCALOFilter('Electron'))
+dieSymDD.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'0.0'"]
+dieSymDD.DeltaY = 3.
+dieSymDD.DeltaYmax = 200 * mm
+dieSymDD.DiElectronMassMax = 100.*MeV
+dieSymDD.DiElectronPtMin = 200.*MeV
+dieSymDD.SymetricPair = True
+
+#-- improved vertex fitter settings
+dieSymDD.UseCombinePair = True
+dieSymDD.addTool( ParticleTransporter, name='TransporterDie' )
+dieSymDD.TransporterDie.TrackExtrapolator = "TrackRungeKuttaExtrapolator"
+
+dieSymDD.ParticleCombiners.update( { "" : "LoKi::VertexFitter"} )
+dieSymDD.addTool( LoKi__VertexFitter )
+dieSymDD.LoKi__VertexFitter.addTool( ParticleTransporter, name='Transporter' )
+dieSymDD.LoKi__VertexFitter.Transporter.TrackExtrapolator = "TrackRungeKuttaExtrapolator"
+dieSymDD.LoKi__VertexFitter.DeltaDistance = 100 * mm
+
+locations.update( updateDoD ( dieSymDD ) )
+StdAllTightSymGammaDD=dieSymDD
+
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllVeryLooseMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllVeryLooseMuons.py
new file mode 100755
index 000000000..307100318
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdAllVeryLooseMuons.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdAllVeryLooseMuons.py
+#  configuration file for 'Standard All Very Loose Muons' 
+#  @author Patrick Koppenburg patrick.koppenburg@cern.ch
+#  @date 2009-10-08
+# =============================================================================
+"""
+Configuration file for 'Standard AllVery Loose Muons'
+"""
+__author__  = "Patrick Koppenburg patrick.koppenburg@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdAllVeryLooseMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleMUONFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdAllVeryLooseMuons',
+                                     Particle =  'muon'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleMUONFilter, 'Muon' )
+fltr.Selection = [ "RequiresDet='MUON' IsMuonLoose=True" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdAllVeryLooseMuons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdHltJets.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdHltJets.py
new file mode 100644
index 000000000..75adda3d7
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdHltJets.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for 'StdHltJets'. Reconstructed jets produced by the HltJets algorithm.
+"""
+__author__  = "Carlos Vazquez Sierra"
+__date__    = "25/04/2018"
+
+# =============================================================================
+__all__ = (
+    'StdHltJets' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from CommonParticles.Utils import *
+
+from Configurables import HltJetBuilder, HltParticleFlow, GaudiSequencer
+from JetAccessories.HltJetConf import HltJetBuilderConf, HltParticleFlowConf
+from GaudiKernel.SystemOfUnits import GeV
+
+_defaultInputs = ['Photons', 'ResolvedPi0s', 'MergedPi0s',
+                  'Ks', 'Lambda', 'ChargedProtos', 'VeloProtos',
+                  'EcalClusters', 'HcalClusters', 'EcalMatch', 'HcalMatch', 'PrimaryVtxs']
+
+ParticleFlow = HltParticleFlowConf('StdHltPF', SprRecover = True, _inputs = _defaultInputs) # output location is Phys/StdHltParticleFlowSeq/Particles
+JetBuilder = HltJetBuilderConf('StdHltJets', ParticleFlow.getOutputLocation(), JetEcPath = '', JetPtMin = 5*GeV, JetVrt = False)
+
+algorithm = GaudiSequencer('StdHltJetsSeq')
+algorithm.Members += [ParticleFlow.getSeq()]
+algorithm.Members += [JetBuilder.getSeq()]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm , name = 'StdHltJets')
+
+## finally: define the symbol 
+StdHltJets = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdJets.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdJets.py
new file mode 100644
index 000000000..6c049bacb
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdJets.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdAllNoPIDsPions.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Pions'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdJets' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from CommonParticles.Utils import *
+
+from JetAccessories.JetMaker_Config import JetMakerConf
+algorithm = JetMakerConf("StdJets").algorithms[0]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdJets = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdJetsR07.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdJetsR07.py
new file mode 100644
index 000000000..d4bc34c86
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdJetsR07.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdAllNoPIDsPions.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Pions'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdJets' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from CommonParticles.Utils import *
+
+from JetAccessories.JetMaker_Config import JetMakerConf
+algorithm = JetMakerConf("StdJetsR07", R=0.7).algorithms[0]
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdJets = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLTUnbiasedJpsi2MuMu.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLTUnbiasedJpsi2MuMu.py
new file mode 100644
index 000000000..c2074c7b1
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLTUnbiasedJpsi2MuMu.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLTUnbiasedJpsi2MuMu.py
+#  configuration file for 'Standard lifetime unbiased Jpsi2MuMu' 
+#  @author Greig Cowan
+#  @date 2009-05-21
+# =============================================================================
+"""
+Configuration file for 'Standard lifetime unbiased Jpsi2MuMu'
+"""
+__author__  = "Greig Cowan"
+# =============================================================================
+__all__ = (
+    'StdLTUnbiasedJpsi2MuMu' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop 
+from CommonParticles.Utils import *
+
+## ============================================================================
+StdLTUnbiasedJpsi2MuMu = FilterDesktop("StdLTUnbiasedJpsi2MuMu")
+StdLTUnbiasedJpsi2MuMu.Inputs =["Phys/StdLooseJpsi2MuMu/Particles"]
+StdLTUnbiasedJpsi2MuMu.Code = "  (MINTREE('mu+'==ABSID, PT) > 500.*MeV)" \
+                              "& (MINTREE('mu+'==ABSID, PIDmu) > -10.0)" \
+                              "& (MAXTREE('mu+'==ABSID, PIDK) < 10.0)" \
+                              "& (ADMASS('J/psi(1S)') < 50.*MeV)" \
+                              "& (PT > 1000.*MeV)" \
+                              "& (VFASPF(VCHI2) < 6.0)"
+
+## configure Data-On-Demand service 
+locations = updateDoD ( StdLTUnbiasedJpsi2MuMu )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownElectrons.py
new file mode 100755
index 000000000..0f1f3a477
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownElectrons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNDownElectrons.py
+#  configuration file for 'Standard Loose ANN Downstream Electrons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Downstream Electrons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNDownElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdLooseANNDownElectrons' ,
+                                     Particle = 'electron' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter , 'Electron' )
+#fltr.Selection = [ "RequiresDet='CALO' ProbNNe>'0.1'" ]
+fltr.Selection = [ "RequiresDet='RICHORCALO' ProbNNe>'0.035'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNDownElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownKaons.py
new file mode 100755
index 000000000..570a2bd68
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownKaons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNDownKaons.py
+#  configuration file for 'Standard Loose ANN Downstream Kaons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Downstream Kaons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNDownKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdLooseANNDownKaons' ,
+                                    Particle = 'kaon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Kaon' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNk>'0.075'" ]
+fltr.Selection = [ "ProbNNk>'0.05'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNDownKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownPions.py
new file mode 100755
index 000000000..ac252e4f8
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownPions.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNDownPions.py
+#  configuration file for 'Standard Loose ANN Downstream Pions' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Downstream Pions using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNDownPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdLooseANNDownPions' ,
+                                     Particle = 'pion' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Pion' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNpi>'0.1'" ]
+fltr.Selection = [ "ProbNNpi>'0.03'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNDownPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownProtons.py
new file mode 100755
index 000000000..07cc16a98
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNDownProtons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNDownProtons.py
+#  configuration file for 'Standard Loose ANN Downstream Electrons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Downstream Protons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNDownProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdLooseANNDownProtons' ,
+                                    Particle = 'proton' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Proton' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNp>'0.1'" ]
+fltr.Selection = [ "ProbNNp>'0.04'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNDownProtons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNElectrons.py
new file mode 100755
index 000000000..307e2829e
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNElectrons.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNElectrons.py
+#  configuration file for 'Standard Loose ANN PID Electrons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Electrons using ANN PID'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'StdLooseANNElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = FilterDesktop( 'StdLooseANNElectrons',
+                           Inputs = ["Phys/StdAllLooseANNElectrons/Particles"],
+                           Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNKaons.py
new file mode 100755
index 000000000..c100313f3
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNKaons.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNKaons.py
+#  configuration file for 'Standard Loose Kaons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Kaons with loose ANN cuts'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = FilterDesktop( 'StdLooseANNKaons',
+                           Inputs = ["Phys/StdAllLooseANNKaons/Particles"],
+                           Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNPions.py
new file mode 100755
index 000000000..ecd01bac6
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNPions.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNPions.py
+#  configuration file for 'Standard Loose Pions' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose ANN Pions'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = FilterDesktop ( 'StdLooseANNPions',
+                            Inputs = ["Phys/StdAllLooseANNPions/Particles"],
+                            Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNProtons.py
new file mode 100755
index 000000000..7634280e0
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNProtons.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNProtons.py
+#  configuration file for 'Standard Loose Protons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Protons with loose ANN cuts'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  FilterDesktop( 'StdLooseANNProtons',
+                            Inputs = ["Phys/StdAllLooseANNProtons/Particles"],
+                            Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNProtons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpElectrons.py
new file mode 100755
index 000000000..0e5d24fe3
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpElectrons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNUpElectrons.py
+#  configuration file for 'Standard Loose ANN Upstream Electrons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Upstream Electrons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNUpElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdLooseANNUpElectrons' ,
+                                     Particle = 'electron' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Upstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter , 'Electron' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNe>'0.1'" ]
+fltr.Selection = [ "RequiresDet='RICHORCALO' ProbNNe>'0.03'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNUpElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpKaons.py
new file mode 100755
index 000000000..c96703fff
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpKaons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNUpKaons.py
+#  configuration file for 'Standard Loose ANN Upstream Kaons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Upstream Kaons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNUpKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdLooseANNUpKaons' ,
+                                    Particle = 'kaon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Upstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Kaon' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNk>'0.1'" ]
+fltr.Selection = [ "ProbNNk>'0.025'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNUpKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpPions.py
new file mode 100755
index 000000000..e51b208d8
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpPions.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNUpPions.py
+#  configuration file for 'Standard Loose ANN Upstream Electrons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Upstream Pions using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNUpPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdLooseANNUpPions' ,
+                                    Particle = 'pion' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Upstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Pion' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNpi>'0.1'" ]
+fltr.Selection = [ "ProbNNpi>'0.03'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNUpPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpProtons.py
new file mode 100755
index 000000000..5fd4dd478
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseANNUpProtons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseANNUpProtons.py
+#  configuration file for 'Standard Loose ANN Upstream Electrons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Upstream Protons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdLooseANNUpProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdLooseANNUpProtons' ,
+                                    Particle = 'proton' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Upstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Proton' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNp>'0.1'" ]
+fltr.Selection = [ "ProbNNp>'0.03'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseANNUpProtons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseAllPhotons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseAllPhotons.py
new file mode 100755
index 000000000..e0a835341
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseAllPhotons.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseAllPhotons.py
+#  configuration file for 'Standard Loose All Photons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Loose All Photons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdLooseAllPhotons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import PhotonMakerAlg 
+from Configurables       import PhotonMaker
+from GaudiKernel.SystemOfUnits import MeV
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  PhotonMakerAlg ( 'StdLooseAllPhotons'         ,
+                                DecayDescriptor = 'Gamma' )
+
+# configure desktop&particle maker: 
+algorithm.addTool ( PhotonMaker , name = 'PhotonMaker' )
+photon = algorithm.PhotonMaker
+photon.ConvertedPhotons   = True
+photon.UnconvertedPhotons = True 
+photon.PtCut              = 200 * MeV 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseAllPhotons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseCnvPhotons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseCnvPhotons.py
new file mode 100755
index 000000000..f9196da6d
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseCnvPhotons.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseCnvPhotons.py
+#  configuration file for 'Standard Loose Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Converted Photons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdLooseCnvPhotons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import PhotonMakerAlg
+from Configurables       import PhotonMaker
+
+from GaudiKernel.SystemOfUnits import MeV
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  PhotonMakerAlg ( 'StdLooseCnvPhotons',
+                              DecayDescriptor = 'Gamma' )
+
+# configure desktop&particle maker: 
+algorithm.addTool ( PhotonMaker , name = 'PhotonMaker' )
+photon = algorithm.PhotonMaker
+photon.ConvertedPhotons   = True
+photon.UnconvertedPhotons = False 
+photon.PtCut              = 200 * MeV 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseCnvPhotons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseD02HH.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseD02HH.py
new file mode 100755
index 000000000..05732229d
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseD02HH.py
@@ -0,0 +1,89 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseD02HH.py
+#  configuration file for 'Standard Loose D0 -> HH'
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose D0 -> HH'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseD02KPi' ,
+    'StdLooseD02PiPi' ,
+    'StdLooseD02KK' ,
+    'StdLooseD02KPiDCS' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm
+StdLooseD02KPi = CombineParticles ( 'StdLooseD02KPi' )
+
+StdLooseD02KPi.Inputs = [ "Phys/StdLooseKaons/Particles",
+                          "Phys/StdLoosePions/Particles" ]
+StdLooseD02KPi.DecayDescriptor = "[D0 -> K- pi+]cc"
+
+StdLooseD02KPi.DaughtersCuts = { "K+" : "(P>2*GeV)",
+                                 "pi+" : "(P>2*GeV)"}
+
+#for the mass window, need 100 MeV above the Ds mass for clean background estimation, but only need
+#~100 MeV below since the lower mass sideband will be for the crystal ball only.
+
+StdLooseD02KPi.CombinationCut = "(((APT>1*GeV) | (ASUM(PT)>1.2*GeV)) & (ADAMASS('D0')<110*MeV) & (ADOCA(1,2)<0.5*mm) & (ADOCACHI2CUT(15,'')))"
+StdLooseD02KPi.MotherCut = "((VFASPF(VCHI2)<10) & (ADMASS('D0')<100*MeV) & (BPVVDCHI2>36))"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdLooseD02KPi )
+
+## ============================================================================
+## PiPi
+StdLooseD02PiPi = StdLooseD02KPi.clone("StdLooseD02PiPi")
+StdLooseD02PiPi.DecayDescriptor = "[D0 -> pi- pi+]cc"
+
+## configure Data-On-Demand service
+locations.update( updateDoD ( StdLooseD02PiPi ) )
+
+## ============================================================================
+## KK
+StdLooseD02KK = StdLooseD02KPi.clone("StdLooseD02KK")
+StdLooseD02KK.DecayDescriptor = "[D0 -> K- K+]cc"
+
+## configure Data-On-Demand service
+locations.update( updateDoD ( StdLooseD02KK ) )
+
+## ============================================================================
+## Doubly Cabibbo suppressed
+StdLooseD02KPiDCS = StdLooseD02KPi.clone("StdLooseD02KPiDCS")
+StdLooseD02KPiDCS.DecayDescriptor = "[D0 -> K+ pi-]cc"
+
+## configure Data-On-Demand service
+locations.update( updateDoD ( StdLooseD02KPiDCS ) )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
+
+# =============================================================================
+# The END
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseD02KsHH.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseD02KsHH.py
new file mode 100755
index 000000000..2cd9b2143
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseD02KsHH.py
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseD02KsHH.py
+#  configuration file for 'Standard Loose D0 -> KsHH' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose D0 -> KsHH'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseD02KsPiPi' ,
+    'StdLooseD02KsKK' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+locations = {}
+
+## ============================================================================
+## create the algorithm 
+##########################################################################################
+# D0 -> Ks Pi Pi
+#
+StdLooseD02KsPiPi = CombineParticles("StdLooseD02KsPiPi")
+
+StdLooseD02KsPiPi.Inputs = [ "Phys/StdLoosePions/Particles",
+                             "Phys/StdLooseKsLL/Particles" ]
+
+StdLooseD02KsPiPi.DecayDescriptor = "[D0 -> KS0 pi+ pi-]cc" 
+
+StdLooseD02KsPiPi.DaughtersCuts = { "pi+" : "(PT>400*MeV)",
+                                      "KS0" : "(PT>1*GeV)"} 
+StdLooseD02KsPiPi.CombinationCut = "(ADAMASS('D0')<80*MeV) & (APT>1800*MeV)"
+StdLooseD02KsPiPi.MotherCut = "(VFASPF(VCHI2/VDOF)<10) & (MIPCHI2DV(PRIMARY)>1)"
+
+## configure Data-On-Demand service 
+locations.update(updateDoD ( StdLooseD02KsPiPi ))
+
+
+##########################################################################################
+# D0 -> Ks K K is a clone of Ks Pi Pi
+#
+StdLooseD02KsKK = StdLooseD02KsPiPi.clone("StdLooseD02KsKK")
+
+StdLooseD02KsKK.Inputs = [ "Phys/StdLooseKaons/Particles",
+                           "Phys/StdLooseKsLL/Particles" ]
+StdLooseD02KsKK.DecayDescriptor = "[D0 -> KS0 K+ K-]cc" 
+
+StdLooseD02KsKK.DaughtersCuts = { "K+" : "(PT>300*MeV)",
+                                   "KS0" : "(PT>800*MeV)" } 
+StdLooseD02KsKK.CombinationCut = "(ADAMASS('D0')<80) & (APT>1500*MeV)" 
+StdLooseD02KsKK.MotherCut = "(VFASPF(VCHI2/VDOF)<10) & (MIPCHI2DV(PRIMARY)>0.49)" 
+
+## configure Data-On-Demand service 
+locations.update(updateDoD ( StdLooseD02KsKK ))
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDalitzPi0.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDalitzPi0.py
new file mode 100644
index 000000000..e3af935bf
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDalitzPi0.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseDalitzPi0.py
+#  configuration file for 'Standard Loose Dalitz Pi0s and Pi0 with photon conversion' 
+#  @author Olivier Deschamps
+#  @date 2014-05-20
+# =============================================================================
+"""
+Configuration file for 'Standard Loose DalitzPi0'
+"""
+__author__  = "Olivier Deschamps"
+# =============================================================================
+__all__ = (
+    'StdLoosePi02gee'      ,
+    'StdLoosePi024e'      ,
+    'StdLooseDalitzPi0' ,
+    'locations'
+    )
+# =============================================================================
+from GaudiKernel.SystemOfUnits import MeV
+from CommonParticles.Utils     import *
+from Configurables import CombineParticles
+
+## create the algorithm  : pi0 -> gg(ee) (1 conversion)
+pi02gee =  CombineParticles( "StdLoosePi02gee", DecayDescriptor = 'pi0 -> gamma gamma' )
+pi02gee.Inputs = ["Phys/StdLooseAllPhotons/Particles","Phys/StdAllLooseGammaLL/Particles","Phys/StdAllLooseGammaDD/Particles"]
+pi02gee.ParticleCombiners.update( {"" : "ParticleAdder"} )
+pi02gee.Preambulo += ["cnv = switch(INTES('StdLooseAllPhotons',False),1,0)"]
+pi02gee.MotherCut = " (MM  < 170*MeV) & (MM  > 90*MeV) & (1 == CHILD(1,cnv)+CHILD(2,cnv) )" 
+locations      = updateDoD ( pi02gee )
+StdLoosePi02gee=pi02gee
+
+## create the algorithm :  pi0 -> g(ee)g(ee)  (2 conversions)
+pi024e =  CombineParticles( "StdLoosePi024e", DecayDescriptor = 'pi0 -> gamma gamma' )
+pi024e.Inputs = ["Phys/StdAllLooseGammaLL/Particles","Phys/StdAllLooseGammaDD/Particles"]
+pi024e.ParticleCombiners.update( {"" : "ParticleAdder"} )
+#pi024e.ParticleCombiners.update( {"" : "LoKi::VertexFitter"} )
+pi024e.MotherCut = " (MM  < 170*MeV) & (MM  > 90*MeV)"
+locations.update( updateDoD ( pi024e  ) )
+StdLoosePi024e=pi024e
+
+## create the algorithm :  pi0 -> gee (Dalitz decay)  - note : also contains Long-Long contribution to 1  conversion gg(ee) 
+from CommonParticles.StdLooseDiElectron    import *
+pi0Dalitz =  CombineParticles( "StdLooseDalitzPi0", DecayDescriptor = 'pi0 -> gamma gamma' )
+pi0Dalitz.Inputs = ["Phys/StdLooseAllPhotons/Particles","Phys/StdDiElectronGamma/Particles"]
+pi0Dalitz.CombinationCut = "(AM < 200*MeV) & (1 == ACHILD(1,cnv)+ACHILD(2,cnv) )"
+pi0Dalitz.Preambulo += ["cnv = switch(INTES('StdLooseAllPhotons',False),1,0)"]
+pi0Dalitz.MotherCut = " (MM  < 170*MeV) & (MM  > 90*MeV)" 
+locations.update( updateDoD ( pi0Dalitz        ) )
+StdLooseDalitzPi0=pi0Dalitz
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedDiElectron.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedDiElectron.py
new file mode 100644
index 000000000..0261f1cf0
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedDiElectron.py
@@ -0,0 +1,42 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for Standard Loose Detached DiElectron
+"""
+
+__author__ = 'Jibo He'
+__date__ = '20/01/2012'
+
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+import GaudiKernel.SystemOfUnits as Units
+
+##############################
+# StdLooseDetachedDiElectron #
+##############################
+StdLooseDetachedDiElectron = CombineParticles("StdLooseDetachedDiElectron")
+StdLooseDetachedDiElectron.DecayDescriptor = "J/psi(1S) -> e+ e-"
+StdLooseDetachedDiElectron.Inputs = ["Phys/StdAllLooseElectrons/Particles"]
+StdLooseDetachedDiElectron.DaughtersCuts = { "e+" : "(PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.)" }
+StdLooseDetachedDiElectron.CombinationCut = "(ADOCACHI2CUT(30,''))"
+StdLooseDetachedDiElectron.MotherCut = "(VFASPF(VCHI2)<25)"
+locations = updateDoD(StdLooseDetachedDiElectron)
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedKpi.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedKpi.py
new file mode 100644
index 000000000..15a07fe74
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedKpi.py
@@ -0,0 +1,38 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for Standard Loose Detached Kpi,
+with Kpi invariant mass up to 2.2 GeV
+"""
+
+__author__ = 'Jibo He'
+__date__ = '22/01/2012'
+
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles # , OfflineVertexFitter, OnOfflineTool
+from CommonParticles.Utils import *
+import GaudiKernel.SystemOfUnits as Units
+
+###########################
+# StdDetachetKst2Kpi      #
+###########################
+StdLooseDetachedKpi = CombineParticles("StdLooseDetachedKpi")
+StdLooseDetachedKpi.DecayDescriptor = "[K*(892)0 -> K+ pi-]cc"
+StdLooseDetachedKpi.Inputs = ["Phys/StdLooseKaons/Particles",
+                              "Phys/StdLoosePions/Particles"]
+
+StdLooseDetachedKpi.CombinationCut = "(AM<2.2*GeV) & (ADOCACHI2CUT(30, ''))"
+StdLooseDetachedKpi.MotherCut = "(VFASPF(VCHI2)<25)"
+
+locations = updateDoD(StdLooseDetachedKpi)
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedKstar.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedKstar.py
new file mode 100644
index 000000000..e51c1bed8
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedKstar.py
@@ -0,0 +1,33 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for Standard Loose Kstar2Kpi
+"""
+
+__author__ = 'Diego Martinez Santos, P. Koppenburg'
+__date__ = '29/06/2009'
+
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop
+from CommonParticles.Utils import *
+import GaudiKernel.SystemOfUnits as Units
+
+###########################
+# StdLooseDetachetKst2Kpi #
+###########################
+
+StdLooseDetachedKst2Kpi = FilterDesktop("StdLooseDetachedKst2Kpi")
+StdLooseDetachedKst2Kpi.Inputs = ["Phys/StdVeryLooseDetachedKst2Kpi/Particles"]
+StdLooseDetachedKst2Kpi.Code = "(MIPCHI2DV(PRIMARY)> 2.25)"
+locations = updateDoD(StdLooseDetachedKst2Kpi)
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedPhi.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedPhi.py
new file mode 100755
index 000000000..f4af5e5ea
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedPhi.py
@@ -0,0 +1,50 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+##!/usr/bin/env python
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseDetachedPhi2KK.py
+#  configuration file for 'Standard Loose Detached'
+#  @author Greig Cowan
+#  @date 2009-06-23
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Detached (i.e., cut on K IP) Phi2KK'
+"""
+__author__  = "Greig Cowan"
+# =============================================================================
+__all__ = (
+    'StdLooseDetachedPhi2KK' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm
+StdLooseDetachedPhi2KK = CombineParticles ("StdLooseDetachedPhi2KK")
+StdLooseDetachedPhi2KK.Inputs = ["Phys/StdLooseKaons/Particles"]
+StdLooseDetachedPhi2KK.DecayDescriptor = "phi(1020) -> K+ K-"
+StdLooseDetachedPhi2KK.DaughtersCuts = {"K+": "(MIPCHI2DV(PRIMARY) > 4.)"}
+StdLooseDetachedPhi2KK.CombinationCut = "(AM < 1100.*MeV) & (ADOCACHI2CUT(30,''))"
+StdLooseDetachedPhi2KK.MotherCut = "(VFASPF(VCHI2) < 25.0)"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdLooseDetachedPhi2KK )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTau.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTau.py
new file mode 100755
index 000000000..e6c65a922
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTau.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+## @file  CommonParticles/StdLooseDetachedTau.py
+#  configuration file for 'Standard Loose Detached Tau'
+#  @author Donal Hill, Conor Fitzpatrick, Christian Elsasser
+#  @date 2012-12-02
+# =============================================================================
+__all__ = ('StdLooseDetachedTau3pi', 'locations')
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm - physical tau+ -> pi+ pi- pi+
+StdLooseDetachedTau3pi = CombineParticles('StdLooseDetachedTau3pi')
+
+StdLooseDetachedTau3pi.Inputs = ["Phys/StdLoosePions/Particles"]
+
+StdLooseDetachedTau3pi.DecayDescriptors = ["[tau+ -> pi+ pi- pi+]cc"]
+StdLooseDetachedTau3pi.DaughtersCuts = {
+    "pi+":
+    "(PT>150.*MeV) & (MIPCHI2DV(PRIMARY) > 4.0) & (TRCHI2DOF<4) & (TRGHOSTPROB<0.4) & (PIDK < 8)",
+    "pi-":
+    "(PT>150.*MeV) & (MIPCHI2DV(PRIMARY) > 4.0) & (TRCHI2DOF<4) & (TRGHOSTPROB<0.4) & (PIDK < 8)"
+}
+
+StdLooseDetachedTau3pi.CombinationCut = "((AM>400.*MeV) & (AM<3500.*MeV)) & (ADOCAMAX('')<0.15*mm) & ((AM12<1670.*MeV) | (AM23<1670.*MeV)) & (ANUM(PT < 300*MeV) <= 1) & (1<ANUM( ('pi+'==ABSID) & (MIPCHI2DV(PRIMARY)>5)))"
+StdLooseDetachedTau3pi.MotherCut = "(M>400.*MeV) & (M < 3500.*MeV) & (BPVDIRA>0.99) & (VFASPF(VCHI2) < 25 )"
+
+## configure Data-On-Demand service
+locations = updateDoD(StdLooseDetachedTau3pi)
+
+## ============================================================================
+if '__main__' == __name__:
+
+    print __doc__
+    print locationsDoD(locations)
+
+# =============================================================================
+# The END
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTauNoPID.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTauNoPID.py
new file mode 100755
index 000000000..379f9b4cb
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTauNoPID.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+## @file  CommonParticles/StdLooseDetachedTauNoPID.py
+#  configuration file for 'Standard Loose Detached Tau No PID'
+#  @author Donal Hill
+#  @date 2021-08-03
+# =============================================================================
+
+__all__ = ('StdLooseDetachedTau3piNoPID', 'locations')
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm - physical tau+ -> pi+ pi- pi+
+StdLooseDetachedTau3piNoPID = CombineParticles('StdLooseDetachedTau3piNoPID')
+
+StdLooseDetachedTau3piNoPID.Inputs = ["Phys/StdAllNoPIDsPions/Particles"]
+
+StdLooseDetachedTau3piNoPID.DecayDescriptors = ["[tau+ -> pi+ pi- pi+]cc"]
+StdLooseDetachedTau3piNoPID.DaughtersCuts = {
+    "pi+":
+    "(PT>300.*MeV) & (MIPCHI2DV(PRIMARY) > 15) & (TRCHI2DOF<4) & (TRGHOSTPROB<0.4)",
+    "pi-":
+    "(PT>300.*MeV) & (MIPCHI2DV(PRIMARY) > 15) & (TRCHI2DOF<4) & (TRGHOSTPROB<0.4)"
+}
+
+StdLooseDetachedTau3piNoPID.CombinationCut = "(APT>1500.*MeV) & ((AM>400.*MeV) & (AM<3500.*MeV)) & (ADOCAMAX('')<0.15*mm) & ((AM12<1670.*MeV) | (AM23<1670.*MeV))"
+StdLooseDetachedTau3piNoPID.MotherCut = "(PT>1500.*MeV) & (M>400.*MeV) & (M < 3500.*MeV) & (BPVVDRHO>0.3*mm) & (BPVDIRA>0.996) & (VFASPF(VCHI2) < 16 )"
+
+## configure Data-On-Demand service
+locations = updateDoD(StdLooseDetachedTau3piNoPID)
+
+## ============================================================================
+if '__main__' == __name__:
+
+    print __doc__
+    print locationsDoD(locations)
+
+# =============================================================================
+# The END
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTauNonPhys.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTauNonPhys.py
new file mode 100644
index 000000000..c707177be
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDetachedTauNonPhys.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+## @file  CommonParticles/StdLooseDetachedTau.py
+#  configuration file for 'Standard Loose Detached Tau'
+#  @author Donal Hill, Conor Fitzpatrick, Christian Elsasser
+#  @date 2012-08-07
+# =============================================================================
+
+__all__ = ('StdLooseDetachedTau3piNonPhys', 'locations')
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm - non-physical tau+++ -> pi+ pi+ pi+
+StdLooseDetachedTau3piNonPhys = CombineParticles(
+    'StdLooseDetachedTau3piNonPhys')
+
+StdLooseDetachedTau3piNonPhys.Inputs = ["Phys/StdLoosePions/Particles"]
+
+StdLooseDetachedTau3piNonPhys.DecayDescriptors = ["[tau+ -> pi+ pi+ pi+]cc"]
+StdLooseDetachedTau3piNonPhys.DaughtersCuts = {
+    "pi+":
+    "(PT>150.*MeV) & (MIPCHI2DV(PRIMARY) > 4.0) & (TRCHI2DOF<4) & (TRGHOSTPROB<0.4) & (PIDK < 8)"
+}
+
+StdLooseDetachedTau3piNonPhys.CombinationCut = "((AM>400.*MeV) & (AM<3500.*MeV)) & (ADOCAMAX('')<0.15*mm) & ((AM12<1670.*MeV) | (AM23<1670.*MeV)) & (ANUM(PT < 300*MeV) <= 1) & (1<ANUM( ('pi+'==ABSID) & (MIPCHI2DV(PRIMARY)>5)))"
+StdLooseDetachedTau3piNonPhys.MotherCut = "(M>400.*MeV) & (M < 3500.*MeV) & (BPVDIRA>0.99) & (VFASPF(VCHI2) < 25 )"
+
+## configure Data-On-Demand service
+locations = updateDoD(StdLooseDetachedTau3piNonPhys)
+
+## ============================================================================
+if '__main__' == __name__:
+
+    print __doc__
+    print locationsDoD(locations)
+
+# =============================================================================
+# The END
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiElectron.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiElectron.py
new file mode 100644
index 000000000..39c67de76
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiElectron.py
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for Standard Loose DiElectron, very loose for penguins
+"""
+
+__author__ = 'Patrick Koppenburg'
+__date__ = '08/12/2009'
+
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+import GaudiKernel.SystemOfUnits as Units
+
+locations = { }
+
+###########################
+# StdLooseDiElectron #
+###########################
+"""
+Standard Di-Electron maker from 2 electrons
+"""
+StdLooseDiElectron = CombineParticles("StdLooseDiElectron")
+StdLooseDiElectron.DecayDescriptor = "J/psi(1S) -> e+ e-"
+StdLooseDiElectron.Inputs = ["Phys/StdAllLooseElectrons/Particles"]
+StdLooseDiElectron.DaughtersCuts = { "e+" : "(PT>500*MeV)" }
+StdLooseDiElectron.CombinationCut = "(AM>30*MeV) & (ADOCACHI2CUT(30,''))"
+StdLooseDiElectron.MotherCut = "(VFASPF(VCHI2)<25)"
+locations.update( updateDoD(StdLooseDiElectron) )
+
+"""
+Using Olivier's Di-Electron Particle Maker
+"""
+###--- From Olivier's ParticleMaker
+from Configurables import DiElectronMaker, ProtoParticleCALOFilter
+from GaudiKernel.SystemOfUnits import *
+dieLL = DiElectronMaker('StdDiElectronFromTracks')
+dieLL.Particle = "J/psi(1S)"
+selector = trackSelector ( dieLL , trackTypes = ["Long"] ) 
+dieLL.addTool( ProtoParticleCALOFilter, name='Electron' )
+dieLL.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'-2.0'"]
+dieLL.DiElectronMassMax = 5000.*MeV
+dieLL.DiElectronMassMin = 0.*MeV
+dieLL.DiElectronPtMin = 200.*MeV
+locations.update( updateDoD(dieLL) )
+StdDiElectronFromTracks = dieLL
+
+# gamma version (clone)
+StdDiElectronGamma =  DiElectronMaker('StdDiElectronFromTracks').clone("StdDiElectronGamma")
+StdDiElectronGamma.Particle = "gamma"
+locations.update(updateDoD( StdDiElectronGamma ))
+
+########################################################
+# Addendum: M.v.Veghel, M. Mulder, C. Vazquez Sierra
+# Clone from StdLooseDiElectron:
+## Add the track type 'Upstream'
+## No PID and CALO cuts on upstream, lower PT and add an IP chi2 cut.
+########################################################
+StdLooseDetachedDiElectronLU = CombineParticles("StdLooseDetachedDiElectronLU")
+StdLooseDetachedDiElectronLU.DecayDescriptor = "J/psi(1S) -> e+ e-"
+StdLooseDetachedDiElectronLU.Inputs = ["Phys/StdAllLooseElectrons/Particles","Phys/StdNoPIDsUpElectrons/Particles"]
+StdLooseDetachedDiElectronLU.DaughtersCuts = { "e+" : "(PT>250*MeV) & (MIPCHI2DV(PRIMARY) > 4)" }
+StdLooseDetachedDiElectronLU.CombinationCut = "(AM>30*MeV) & (ADOCACHI2CUT(30,''))"
+StdLooseDetachedDiElectronLU.MotherCut = "(VFASPF(VCHI2)<25)"
+locations.update( updateDoD(StdLooseDetachedDiElectronLU) )
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiMuon.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiMuon.py
new file mode 100644
index 000000000..1aa33131d
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiMuon.py
@@ -0,0 +1,42 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for Standard Loose DiMuon
+"""
+
+__author__ = 'Rob Lambert'
+__date__ = '07/07/2009'
+
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+import GaudiKernel.SystemOfUnits as Units
+
+###########################
+# StdLooseDiMuon #
+###########################
+
+StdLooseDiMuon = CombineParticles("StdLooseDiMuon")
+StdLooseDiMuon.DecayDescriptor = "J/psi(1S) -> mu+ mu-"
+StdLooseDiMuon.Inputs = ["Phys/StdAllLooseMuons/Particles"]
+StdLooseDiMuon.CombinationCut="(ADOCACHI2CUT(30, ''))"
+StdLooseDiMuon.MotherCut = "(VFASPF(VCHI2) < 25)"
+locations = updateDoD(StdLooseDiMuon)
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiMuonSameSign.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiMuonSameSign.py
new file mode 100644
index 000000000..9909d3cce
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDiMuonSameSign.py
@@ -0,0 +1,38 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for Standard Loose DiMuon
+"""
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+import GaudiKernel.SystemOfUnits as Units
+
+###########################
+# StdLooseDiMuonSameSign  #
+###########################
+
+StdLooseDiMuonSameSign = CombineParticles("StdLooseDiMuonSameSign")
+StdLooseDiMuonSameSign.DecayDescriptor = "[J/psi(1S) -> mu+ mu+]cc"
+StdLooseDiMuonSameSign.Inputs = ["Phys/StdAllLooseMuons/Particles"]
+StdLooseDiMuonSameSign.CombinationCut="(ADOCACHI2CUT(30,''))"
+StdLooseDiMuonSameSign.MotherCut = "(VFASPF(VCHI2) < 25)"
+locations = updateDoD(StdLooseDiMuonSameSign)
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDipion.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDipion.py
new file mode 100755
index 000000000..0dc68d73c
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDipion.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseDipion.py
+#  configuration file for 'Standard Loose Detached Tau' 
+#  @author Donal Hill, Conor Fitzpatrick, Christian Elsasser
+#  @date 2012-08-07
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Dipion'
+"""
+__author__  = "Donal Hill, Conor Fitzpatrick, Christian Elsasser"
+# =============================================================================
+__all__ = (
+    'StdLooseDetachedDipion',
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm 
+StdLooseDetachedDipion = CombineParticles ( 'StdLooseDetachedDipion' )
+
+StdLooseDetachedDipion.Inputs = [ "Phys/StdLoosePions/Particles" ]
+StdLooseDetachedDipion.DecayDescriptors = ["rho(770)0 -> pi+ pi-",
+                                           "[rho(770)+ -> pi+ pi+]cc"]
+StdLooseDetachedDipion.DaughtersCuts = {
+    "pi+"        : "(PT>150.*MeV) & (MIPCHI2DV(PRIMARY) > 4.0) & (TRCHI2DOF<4) & (TRGHOSTPROB<0.4) & (PIDK < 8)",
+    "pi-"        : "(PT>150.*MeV) & (MIPCHI2DV(PRIMARY) > 4.0) & (TRCHI2DOF<4) & (TRGHOSTPROB<0.4) & (PIDK < 8)"
+    }
+
+#Need an upper mass window of 100 MeV for background estimation
+#and a lower mass window of 200 to catch the D+ and Ds
+
+StdLooseDetachedDipion.CombinationCut = "(ANUM(PT < 300*MeV) <= 1) & (ADOCAMAX('') < 0.25*mm) & (AM<1670.*MeV)"
+StdLooseDetachedDipion.MotherCut = "(VFASPF(VCHI2) < 9.0) & (MIPCHI2DV(PRIMARY) > 5.0) & (VFASPF(VMINVDDV(PRIMARY)) > 2.0*mm)" 
+
+## configure Data-On-Demand service 
+locations = updateDoD (StdLooseDetachedDipion )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDownKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDownKaons.py
new file mode 100755
index 000000000..41373e332
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDownKaons.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseDownKaons.py
+#  configuration file for 'Standard  Loose Down Kaons' 
+#  @author Yasmine Amhis
+#  @date 2010-06-03
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Downstream Kaons'
+"""
+__author__  = "Yasmine Amhis <yasmine.amhis@epfl.ch> "
+# =============================================================================
+__all__ = (
+    'StdLooseDownKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import ProtoParticleCALOFilter, CombinedParticleMaker
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker('StdLooseDownKaons',  Particle = 'kaon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm , trackTypes = ['Downstream'] ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Kaon' )
+fltr.Selection = [ "RequiresDet='RICH' CombDLL(k-pi)>'-5.0'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseDownKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDownMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDownMuons.py
new file mode 100644
index 000000000..8d6135052
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDownMuons.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseMuons.py
+#  configuration file for 'Standard Loose Muons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Muons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdLooseDownMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleMUONFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdLooseDownMuons',
+                                     Particle =  'muon'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm, trackTypes = ['Downstream'] ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleMUONFilter, 'Muon' )
+fltr.Selection = [ "RequiresDet='MUON' IsMuon=True" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseDownMuons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDplus.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDplus.py
new file mode 100755
index 000000000..8dc0af348
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDplus.py
@@ -0,0 +1,169 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseDplus.py
+#  configuration file for 'Standard Loose Dplus' 
+#  @author Vladimir Gligorov
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Dplus'
+"""
+__author__  = "Vladimir Gligorov"
+# =============================================================================
+__all__ = (
+    'StdLooseDplus2KPiPi' ,
+    'StdLooseDplus2KKPi' ,
+    'StdLooseDplus2PiPiPi' ,
+    'StdLooseDplus2KPiPiOppSignPi' ,
+    'StdLooseDsplus2KKPi' ,
+    'StdLooseDplus2hhh',
+    'StdLooseDplus2KKK',
+    'StdLooseDsplus2KKPiOppSign',
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+locations = {}
+
+## ============================================================================
+## create the algorithm 
+StdLooseDplus2KPiPi = CombineParticles ( 'StdLooseDplus2KPiPi' )
+
+StdLooseDplus2KPiPi.Inputs = [ "Phys/StdLooseKaons/Particles",
+                               "Phys/StdLoosePions/Particles" ]
+StdLooseDplus2KPiPi.DecayDescriptor = "[D+ -> K- pi+ pi+]cc" 
+StdLooseDplus2KPiPi.DaughtersCuts = {
+    "K+"  : "(P > 2*GeV)",
+    "pi+" : "(P > 2*GeV)"
+    }
+
+#Need an upper mass window of 100 MeV for background estimation
+#and a lower mass window of 200 to catch the D+ and Ds
+
+StdLooseDplus2KPiPi.CombinationCut = "((AM>1760.*MeV) & (AM<2080.*MeV) & ((APT>1.*GeV) | (ASUM(PT)>1.*GeV)) & (ADOCAMAX('')<0.5*mm))"
+StdLooseDplus2KPiPi.MotherCut = "((VFASPF(VCHI2) < 30 ) & (M>1770.*MeV) & (M < 2070.*MeV) & (BPVVDCHI2>36) & (BPVDIRA>0.98))" 
+
+## configure Data-On-Demand service 
+locations.update(updateDoD ( StdLooseDplus2KPiPi ))
+##########################################################################################
+# D+ -> K K Pi is a clone of D+ -> K Pi Pi 
+#
+StdLooseDplus2KKPi = StdLooseDplus2KPiPi.clone("StdLooseDplus2KKPi")
+StdLooseDplus2KKPi.DecayDescriptor = "[D+ -> K- K+ pi+]cc"
+locations.update(updateDoD ( StdLooseDplus2KKPi ))
+##########################################################################################
+# D+ -> 3 pi is a clone of D+ -> K Pi Pi 
+#
+StdLooseDplus2PiPiPi = StdLooseDplus2KPiPi.clone("StdLooseDplus2PiPiPi")
+StdLooseDplus2PiPiPi.Inputs = [ "Phys/StdLoosePions/Particles" ]
+StdLooseDplus2PiPiPi.DecayDescriptor = "[D+ -> pi- pi+ pi+]cc"
+locations.update(updateDoD ( StdLooseDplus2PiPiPi ))
+##########################################################################################
+# D_s+ -> K K Pi is a clone of D+ -> K Pi Pi 
+#
+StdLooseDsplus2KKPi = StdLooseDplus2KPiPi.clone("StdLooseDsplus2KKPi")
+StdLooseDsplus2KKPi.DecayDescriptor = "[D_s+ -> K- K+ pi+]cc"
+locations.update(updateDoD ( StdLooseDsplus2KKPi ))
+##########################################################################################
+
+# Also need the opposite sign pions mode for the Ds 
+#
+StdLooseDplus2KPiPiOppSignPi = StdLooseDplus2KPiPi.clone("StdLooseDplus2KPiPiOppSignPi")
+StdLooseDplus2KPiPiOppSignPi.DecayDescriptor = "[D+ -> pi- pi+ K+]cc"
+locations.update(updateDoD ( StdLooseDplus2KPiPiOppSignPi ))
+
+########################################################################################
+
+StdLooseDplus2KKK = CombineParticles ( 'StdLooseDplus2KKK' )
+
+StdLooseDplus2KKK.Inputs = [ "Phys/StdLooseKaons/Particles" ]
+StdLooseDplus2KKK.DecayDescriptor = "[D+ -> K- K+ K+]cc" 
+StdLooseDplus2KKK.DaughtersCuts = {
+    "K+"  : "(PT > 250*MeV) & (P > 2000*MeV) &((MIPCHI2DV(PRIMARY)) > 2.0 ) & (PIDK-PIDpi > 3.0)"
+    }
+
+#Need an upper mass window of 100 MeV for background estimation
+#and a lower mass window of 200 to catch the D+ and Ds
+
+StdLooseDplus2KKK.CombinationCut =  "(AM>1760.*MeV) & (AM<2080.*MeV) & (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > 2500*MeV) & (ADOCACHI2CUT(50 , '' )) & (ANUM(MIPCHI2DV(PRIMARY) > 4.0 ) >= 2) & (AHASCHILD(MIPCHI2DV(PRIMARY) > 10.0)) & (ADOCAMAX('') < 0.5*mm)"
+StdLooseDplus2KKK.MotherCut = "(PT > 1000) & (VFASPF(VCHI2/VDOF) < 10.0) & (BPVDIRA > 0.98) & (BPVIPCHI2() < 15.0) & (VFASPF(VMINVDCHI2DV(PRIMARY)) > 100.0)"
+
+## configure Data-On-Demand service 
+locations.update(updateDoD ( StdLooseDplus2KKK ))
+
+
+
+
+########################################################################################
+StdLooseDsplus2KKPiOppSign = CombineParticles ( 'StdLooseDsplus2KKPiOppSign' )
+
+StdLooseDsplus2KKPiOppSign.Inputs = [ "Phys/StdLooseKaons/Particles",
+                               "Phys/StdLoosePions/Particles" ]
+StdLooseDsplus2KKPiOppSign.DecayDescriptor = "[D_s+ -> pi- K+ K+]cc" 
+StdLooseDsplus2KKPiOppSign.DaughtersCuts = {
+    "K+"  : "(PT > 250*MeV) & (P > 2000*MeV) &((MIPCHI2DV(PRIMARY)) > 2.5 ) & (PIDK-PIDpi > 3.0)",
+    "pi+" : "(PT > 250*MeV) & (P > 2000*MeV) &((MIPCHI2DV(PRIMARY)) > 2.5 ) & (PIDK-PIDpi < 10.0)"
+    }
+
+#Need an upper mass window of 100 MeV for background estimation
+#and a lower mass window of 200 to catch the D+ and Ds
+
+StdLooseDsplus2KKPiOppSign.CombinationCut = "(AM>1760.*MeV) & (AM<2080.*MeV) & (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > 2500*MeV) & (ADOCACHI2CUT(50 , '' )) & (ANUM(MIPCHI2DV(PRIMARY) > 4.0 ) >= 2) & (AHASCHILD(MIPCHI2DV(PRIMARY) > 10.0)) & (ADOCAMAX('') < 0.5*mm)"
+StdLooseDsplus2KKPiOppSign.MotherCut = "(PT > 1000) & (VFASPF(VCHI2/VDOF) < 10.0) & (BPVDIRA > 0.98) & (BPVIPCHI2() < 15.0) & (VFASPF(VMINVDCHI2DV(PRIMARY)) > 100.0)"
+
+## configure Data-On-Demand service 
+locations.update(updateDoD ( StdLooseDsplus2KKPiOppSign ))
+##########################################################################################
+
+
+
+StdLooseDplus2hhh = CombineParticles ( 'StdLooseDplus2hhh') 
+StdLooseDplus2hhh.Inputs = [ "Phys/StdLoosePions/Particles" ]
+StdLooseDplus2hhh.DecayDescriptor = "[D+ -> pi- pi+ pi+]cc"
+StdLooseDplus2hhh.DaughtersCuts = {
+    "pi+" : "((PT >250*MeV) & (P > 2*GeV) & (MIPCHI2DV(PRIMARY) > 4.))"
+    }
+
+StdLooseDplus2hhh.CombinationCut = """(APT>1.*GeV) & (ADOCACHI2CUT(50, '')) & (
+                                      in_range(1769*MeV, mpipipi    , 2069 * MeV) | 
+                                      in_range(1769*MeV, mKpipi     , 2069 * MeV) | 
+                                      in_range(1769*MeV, mKKpi1     , 2069 * MeV) | 
+                                      in_range(1769*MeV, mKKpi2     , 2069 * MeV) | 
+                                      in_range(1769*MeV, mKpipiDCS1 , 2069 * MeV) |
+                                      in_range(1769*MeV, mKpipiDCS2 , 2069 * MeV)
+                                      )
+                                    """
+StdLooseDplus2hhh.MotherCut = "(VFASPF(VCHI2) < 30 )"
+StdLooseDplus2hhh.Preambulo = [   "mpipipi = AWM ('pi-'  , 'pi+', 'pi+' ) " ,
+                                  "mKpipi  = AWM ('K-'   , 'pi+', 'pi+' ) " , 
+                                  "mKKpi1  = AWM ('K-'   , 'K+' , 'pi+' ) " , 
+                                  "mKKpi2  = AWM ('K-'   , 'pi+', 'K+'  ) " , 
+                                  "mKpipiDCS1 = AWM ( 'pi-' , 'K+' , 'pi+'  )",
+                                  "mKpipiDCS2 = AWM ( 'pi-' , 'pi+', 'K+'   )" ]
+## configure Data-On-Demand service
+locations.update(updateDoD (StdLooseDplus2hhh)  )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDstarWithD2HH.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDstarWithD2HH.py
new file mode 100755
index 000000000..8cc0fb7e5
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseDstarWithD2HH.py
@@ -0,0 +1,89 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseDstarWithD02HH.py
+#  configuration file for 'Standard Loose Dstar WithD02HH' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Dstar WithD02HH'. Lifetime unbiased at pion level
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseDstarWithD02KPi' ,
+    'StdLooseDstarWithD02KPiDCS' ,
+    'StdLooseDstarWithD02PiPi' ,
+    'StdLooseDstarWithD02KK' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm 
+StdLooseDstarWithD02KPi = CombineParticles ( 'StdLooseDstarWithD02KPi' )
+
+StdLooseDstarWithD02KPi.Inputs = [ "Phys/StdAllLoosePions/Particles",
+                                   "Phys/StdLooseD02KPi/Particles" ]
+StdLooseDstarWithD02KPi.DecayDescriptor = "[D*(2010)+ -> pi+ D0]cc" 
+
+StdLooseDstarWithD02KPi.CombinationCut = "(ADAMASS('D*(2010)+')<50*MeV) & (APT>1250*MeV)"
+StdLooseDstarWithD02KPi.MotherCut = "(VFASPF(VCHI2/VDOF)<25) & (M-MAXTREE('D0'==ABSID,M)<165.5)"
+
+## configure Data-On-Demand service 
+locations = updateDoD ( StdLooseDstarWithD02KPi )
+
+################################################################################
+# D* with Cabibbo-suppressed D0->K+Pi- is a clone of D* with D0->KPi
+#
+StdLooseDstarWithD02KPiDCS = StdLooseDstarWithD02KPi.clone("StdLooseDstarWithD02KPiDCS")
+GaudiSequencer("SeqStdLooseDstarWithD02KPiDCS").Members += [ StdLooseDstarWithD02KPiDCS ] 
+StdLooseDstarWithD02KPiDCS.Inputs = [ "Phys/StdAllLoosePions/Particles",
+                                      "Phys/StdLooseD02KPiDCS/Particles" ]
+## configure Data-On-Demand service 
+locations.update( updateDoD ( StdLooseDstarWithD02KPiDCS ) )
+
+################################################################################
+# D* with D0->KK is a clone of D* with D0->Kpi
+#
+StdLooseDstarWithD02KK = StdLooseDstarWithD02KPi.clone("StdLooseDstarWithD02KK")
+StdLooseDstarWithD02KK.DecayDescriptor = "[D*(2010)+ -> pi+ D0]cc"
+StdLooseDstarWithD02KK.Inputs = [ "Phys/StdAllLoosePions/Particles",
+                                  "Phys/StdLooseD02KK/Particles" ]
+## configure Data-On-Demand service 
+locations.update( updateDoD ( StdLooseDstarWithD02KK ) )
+
+################################################################################
+# D* with D0->PiPi is a clone of D* with D0->KK
+#
+StdLooseDstarWithD02PiPi = StdLooseDstarWithD02KK.clone("StdLooseDstarWithD02PiPi")
+GaudiSequencer("SeqStdLooseDstarWithD02PiPi").Members += [ StdLooseDstarWithD02PiPi ] 
+StdLooseDstarWithD02PiPi.Inputs = [ "Phys/StdAllLoosePions/Particles",
+                                    "Phys/StdLooseD02PiPi/Particles" ]
+## configure Data-On-Demand service 
+locations.update( updateDoD ( StdLooseDstarWithD02PiPi ) )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseElectrons.py
new file mode 100755
index 000000000..bc9661ed1
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseElectrons.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseElectrons.py
+#  configuration file for 'Standard Loose Electrons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Electrons with loose tracking cuts'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'StdLooseElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = FilterDesktop( 'StdLooseElectrons',
+                           Inputs = ["Phys/StdAllLooseElectrons/Particles"],
+                           Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseJpsi2MuMu.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseJpsi2MuMu.py
new file mode 100644
index 000000000..739b7dab4
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseJpsi2MuMu.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseJpsi2MuMu.py
+#  configuration file for 'Standard Loose Jpsi2MuMu'
+#  @author Greig Cowan
+#  @date 2009-06-23
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Jpsi2MuMu'. Lifetime unbiased.
+"""
+__author__  = "Greig Cowan"
+# =============================================================================
+__all__ = (
+    'StdLooseJpsi2MuMu' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm
+StdLooseJpsi2MuMu = CombineParticles ("StdLooseJpsi2MuMu")
+StdLooseJpsi2MuMu.Inputs = ["Phys/StdAllLooseMuons/Particles"]
+StdLooseJpsi2MuMu.DecayDescriptor = "J/psi(1S) -> mu+ mu-"
+StdLooseJpsi2MuMu.CombinationCut = "(ADAMASS('J/psi(1S)') < 100.*MeV) & (ADOCACHI2CUT(30,''))"
+StdLooseJpsi2MuMu.MotherCut = "(VFASPF(VCHI2) < 25.)"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdLooseJpsi2MuMu    )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseJpsi2ee.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseJpsi2ee.py
new file mode 100644
index 000000000..60434913e
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseJpsi2ee.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseJpsi2ee.py
+#  configuration file for 'Standard Loose Jpsi2ee'
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Jpsi2ee'. Lieftime unbiased.
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseJpsi2ee' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm
+StdLooseJpsi2ee = CombineParticles ( 'StdLooseJpsi2ee' )
+StdLooseJpsi2ee.Inputs = [ "Phys/StdAllLooseElectrons/Particles" ]
+StdLooseJpsi2ee.DecayDescriptor = "J/psi(1S) -> e+ e-"
+
+StdLooseJpsi2ee.CombinationCut = "(AM>2000*MeV) & (AM<3800*MeV) & (ADOCACHI2CUT(30,''))"
+StdLooseJpsi2ee.MotherCut = "(VFASPF(VCHI2)<25)"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdLooseJpsi2ee )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
+
+# =============================================================================
+# The END
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKaons.py
new file mode 100755
index 000000000..89b338fe9
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKaons.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseKaons.py
+#  configuration file for 'Standard Loose Kaons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Kaons'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = FilterDesktop( 'StdLooseKaons',
+                           Inputs = ["Phys/StdAllLooseKaons/Particles"],
+                           Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKs.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKs.py
new file mode 100755
index 000000000..e3e9e161c
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKs.py
@@ -0,0 +1,103 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseKs.py
+#  configuration file for 'Standard Loose ' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Ks'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseKsLL' ,
+    'StdLooseKsDD' ,
+    'StdLooseKsLD' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles, FilterDesktop
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm 
+StdLooseKsLL = CombineParticles ( 'StdLooseKsLL' )
+
+StdLooseKsLL.Inputs = [ "Phys/StdLoosePions/Particles" ]
+StdLooseKsLL.DecayDescriptor = "KS0 -> pi+ pi-" 
+
+StdLooseKsLL.DaughtersCuts = { "pi+" : "(P > 2.*GeV) & (MIPCHI2DV(PRIMARY) > 9.)" } 
+StdLooseKsLL.CombinationCut = "(ADAMASS('KS0') < 50.*MeV) & (ADOCACHI2CUT(25, '')) "
+StdLooseKsLL.MotherCut = "(ADMASS('KS0') < 35.*MeV) & (VFASPF(VCHI2) < 25.)"
+
+## configure Data-On-Demand service 
+locations = updateDoD ( StdLooseKsLL )
+
+## ============================================================================
+#  configuration file for 'Standard Loose Downstream ' 
+#  @author Greig Cowan
+#  @date 2009-04-27
+# ============================================================================= 
+StdLooseKsDD = CombineParticles ( 'StdLooseKsDD' )
+DDPionCuts = "(P > 2.*GeV) & (MIPCHI2DV(PRIMARY) > 4.)"
+StdLooseKsDD.Inputs = [ "Phys/StdNoPIDsDownPions/Particles" ]
+StdLooseKsDD.DecayDescriptor = "KS0 -> pi+ pi-" 
+
+StdLooseKsDD.DaughtersCuts = { "pi+" : DDPionCuts } 
+StdLooseKsDD.CombinationCut = "(ADAMASS('KS0') < 80.*MeV) & (ADOCACHI2CUT(25, ''))"
+StdLooseKsDD.MotherCut = "(ADMASS('KS0') < 64.*MeV) & (VFASPF(VCHI2) < 25.)"
+
+## configure Data-On-Demand service 
+locations.update( updateDoD ( StdLooseKsDD ))
+
+## ============================================================================
+#  configuration file for 'Standard Loose Long-Downstream '
+#  Please be aware that this is mostly background
+#  @author Patrick Koppenburg
+#  @date 2012-01-26
+# =============================================================================
+# The one with a long pi+
+StdLooseKsLD_PosLong = StdLooseKsDD.clone( 'StdLooseKsLD_PosLong' )
+
+StdLooseKsLD_PosLong.Inputs = [ "Phys/StdNoPIDsDownPions/Particles",
+                                "Phys/StdLoosePions/Particles" ]
+StdLooseKsLD_PosLong.DaughtersCuts = { "pi+" : "(ISLONG) & "+DDPionCuts,
+                                       "pi-" : "(ISDOWN) & "+DDPionCuts } 
+
+# The one with a long pi-
+StdLooseKsLD_NegLong = StdLooseKsLD_PosLong.clone( 'StdLooseKsLD_NegLong')
+StdLooseKsLD_NegLong.DaughtersCuts = { "pi-" : "(ISLONG) & "+DDPionCuts,
+                                       "pi+" : "(ISDOWN) & "+DDPionCuts } 
+# The combination of them
+StdLooseKsLD = FilterDesktop("StdLooseKsLD", Code = "ALL")
+StdLooseKsLD.Inputs = [ "Phys/StdLooseKsLD_PosLong/Particles",
+                        "Phys/StdLooseKsLD_NegLong/Particles" ]
+
+## configure Data-On-Demand service 
+locations.update( updateDoD ( StdLooseKsLD_PosLong ))
+locations.update( updateDoD ( StdLooseKsLD_NegLong ))
+locations.update( updateDoD ( StdLooseKsLD ))
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKstar.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKstar.py
new file mode 100755
index 000000000..eea51c81e
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseKstar.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseKstar.py
+#  configuration file for 'Standard Loose Kstar'
+#  (based on lifetime unbiased JpsiK* requirements)
+#  @author Greig Cowan
+#  @date 2009-06-23
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Kstar'. Lieftime unbiased.
+"""
+__author__  = "Greig Cowan"
+# =============================================================================
+__all__ = (
+    'StdLooseKstar2Kpi' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm
+StdLooseKstar2Kpi = CombineParticles ("StdLooseKstar2Kpi")
+StdLooseKstar2Kpi.Inputs = ["Phys/StdAllLooseKaons/Particles",
+                            "Phys/StdAllLoosePions/Particles"]
+StdLooseKstar2Kpi.DecayDescriptor = "[K*(892)0 -> K+ pi-]cc"
+StdLooseKstar2Kpi.CombinationCut = "(APT > 500.*MeV) & (ADAMASS('K*(892)0') < 300.*MeV) & (ADOCACHI2CUT(30, ''))"
+StdLooseKstar2Kpi.MotherCut = "(VFASPF(VCHI2) < 25.)"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdLooseKstar2Kpi )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseLambda.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseLambda.py
new file mode 100755
index 000000000..79dbcb029
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseLambda.py
@@ -0,0 +1,122 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseLambda.py
+#  configuration file for 'Standard Loose ' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Lambda'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseLambdaLL' ,
+    'StdLooseLambdaDD' ,
+    'StdLooseLambdaLD' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles, FilterDesktop
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm 
+StdLooseLambdaLL = CombineParticles ( 'StdLooseLambdaLL' )
+
+StdLooseLambdaLL.Inputs = [ "Phys/StdLoosePions/Particles",
+                            "Phys/StdLooseProtons/Particles" ]
+StdLooseLambdaLL.DecayDescriptor = "[Lambda0 -> p+ pi-]cc" 
+
+StdLooseLambdaLL.DaughtersCuts = {
+    "pi+" : "(P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)",
+    "p+" : "(P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)"
+    } 
+
+StdLooseLambdaLL.CombinationCut = "(ADAMASS('Lambda0')<50*MeV) & (ADOCACHI2CUT(30, ''))"
+StdLooseLambdaLL.MotherCut = "(ADMASS('Lambda0')<35*MeV) & (VFASPF(VCHI2)<30)"
+
+## configure Data-On-Demand service 
+locations = updateDoD ( StdLooseLambdaLL )
+
+## ============================================================================
+#  configuration file for 'Standard Loose Downstream ' 
+#  @author Greig Cowan
+#  @date 2009-04-27
+# ============================================================================= 
+StdLooseLambdaDD = StdLooseLambdaLL.clone( 'StdLooseLambdaDD' )
+
+StdLooseLambdaDD.Inputs = [ "Phys/StdNoPIDsDownPions/Particles",
+                            "Phys/StdNoPIDsDownProtons/Particles" ]
+
+StdLooseLambdaDD.DaughtersCuts = {
+    "pi+" : "(P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)",
+    "p+" : "(P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)"
+    } 
+
+StdLooseLambdaDD.CombinationCut = "(ADAMASS('Lambda0')<80*MeV) & (ADOCACHI2CUT(25, ''))"
+StdLooseLambdaDD.MotherCut = "(ADMASS('Lambda0')<64*MeV) & (VFASPF(VCHI2)<25)"
+
+## configure Data-On-Demand service 
+locations.update( updateDoD ( StdLooseLambdaDD ) )
+
+## ============================================================================
+#  configuration file for 'Standard Loose Long-Downstream ' 
+#  @author Daniel O'Hanlon
+#  @date 2014-08-18
+# ============================================================================= 
+
+# p +/- long
+
+StdLooseLambdaLDpLong = StdLooseLambdaDD.clone( 'StdLooseLambdaLDpLong' )
+
+StdLooseLambdaLDpLong.Inputs = [ "Phys/StdLooseProtons/Particles",
+                                 "Phys/StdNoPIDsDownPions/Particles"]
+
+StdLooseLambdaLDpLong.DaughtersCuts = { "p+"  : "(ISLONG) & (P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)",
+                                        "pi-" : "(ISDOWN) & (P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)"}
+
+# p +/- down
+
+StdLooseLambdaLDpDown = StdLooseLambdaDD.clone( 'StdLooseLambdaLDpDown' )
+
+StdLooseLambdaLDpDown.Inputs = [ "Phys/StdNoPIDsDownProtons/Particles",
+                                 "Phys/StdLoosePions/Particles" ]
+
+StdLooseLambdaLDpDown.DaughtersCuts = { "p+"  : "(ISDOWN) & (P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)",
+                                        "pi-" : "(ISLONG) & (P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)"}
+
+# Combination
+
+StdLooseLambdaLD = FilterDesktop("StdLooseLambdaLD", Code = "ALL")
+
+StdLooseLambdaLD.Inputs = [ "Phys/StdLooseLambdaLDpLong/Particles",
+                            "Phys/StdLooseLambdaLDpDown/Particles" ]
+
+locations.update( updateDoD (StdLooseLambdaLDpLong) )
+locations.update( updateDoD (StdLooseLambdaLDpDown) )
+
+locations.update( updateDoD (StdLooseLambdaLD) )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseLambdac.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseLambdac.py
new file mode 100755
index 000000000..5ce7c3b34
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseLambdac.py
@@ -0,0 +1,56 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for 'Standard Loose Lambda_c+'
+"""
+__author__  = "Liming Zhang"
+__date__ = '09/12/2009'
+# =============================================================================
+__all__ = (
+    'StdLooseLambdac2PKPi' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm 
+StdLooseLambdac2PKPi = CombineParticles ( 'StdLooseLambdac2PKPi' )
+
+StdLooseLambdac2PKPi.Inputs = [ "Phys/StdLooseKaons/Particles",
+                                "Phys/StdLoosePions/Particles",
+                                "Phys/StdLooseProtons/Particles" ]
+
+StdLooseLambdac2PKPi.DecayDescriptor = "[Lambda_c+ -> K- p+ pi+]cc" 
+StdLooseLambdac2PKPi.DaughtersCuts = {
+    "K+"  : "(P > 2*GeV)", 
+    "pi+" : "(P > 2*GeV)",
+    "p+"  : "(P > 2*GeV)"
+    }
+
+StdLooseLambdac2PKPi.CombinationCut = "((ADAMASS('Lambda_c+')<110*MeV) & (APT>1.*GeV) & (ADOCAMAX('')<0.5*mm))"
+StdLooseLambdac2PKPi.MotherCut = "((VFASPF(VCHI2) < 30) & (ADMASS('Lambda_c+')<100*MeV) & (BPVVDCHI2>36) & (BPVDIRA>0.98))" 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( StdLooseLambdac2PKPi )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseMergedPi0.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseMergedPi0.py
new file mode 100755
index 000000000..77c68eca8
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseMergedPi0.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseMergedPi0.py
+#  configuration file for 'Standard Loose Pions' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose MergedPi0'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseMergedPi0' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import MergedPi0Maker 
+from GaudiKernel.SystemOfUnits import MeV
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  MergedPi0Maker ( 'StdLooseMergedPi0'         ,
+                              DecayDescriptor = 'Pi0' ,
+                              MassWindow = 60.* MeV)
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseMergedPi0 = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseMuons.py
new file mode 100755
index 000000000..6f763e62c
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseMuons.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseMuons.py
+#  configuration file for 'Standard Loose Muons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Muons wioth loose cuts'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'StdLooseMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  FilterDesktop( 'StdLooseMuons',
+                            Inputs = ["Phys/StdAllLooseMuons/Particles"],
+                            Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseMuons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePhi.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePhi.py
new file mode 100755
index 000000000..c35f92c04
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePhi.py
@@ -0,0 +1,49 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+##!/usr/bin/env python
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLoosePhi2KK.py
+#  configuration file for 'Standard Loose Phi -> KK'
+#  @author Greig Cowan
+#  @date 2009-06-23
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Phi2KK'. Lieftime unbiased.
+"""
+__author__  = "Greig Cowan"
+# =============================================================================
+__all__ = (
+    'StdLoosePhi2KK' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm
+StdLoosePhi2KK = CombineParticles("StdLoosePhi2KK")
+StdLoosePhi2KK.Inputs = ["Phys/StdAllLooseKaons/Particles"]
+StdLoosePhi2KK.DecayDescriptor = "phi(1020) -> K+ K-"
+StdLoosePhi2KK.CombinationCut = "(AM < 1100.*MeV) & (ADOCACHI2CUT(30, ''))"
+StdLoosePhi2KK.MotherCut = "(VFASPF(VCHI2) < 25.0)"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdLoosePhi2KK )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePhotons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePhotons.py
new file mode 100755
index 000000000..226b59a09
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePhotons.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLoosePhotons.py
+#  configuration file for 'Standard Loose Photons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Photons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdLoosePhotons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import PhotonMakerAlg
+from Configurables       import PhotonMaker
+from GaudiKernel.SystemOfUnits import MeV
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  PhotonMakerAlg ( 'StdLoosePhotons'         ,
+                              DecayDescriptor = 'Gamma' )
+
+algorithm.addTool ( PhotonMaker , name = 'PhotonMaker' )
+photon = algorithm.PhotonMaker
+photon.ConvertedPhotons   = False
+photon.UnconvertedPhotons = True 
+photon.PtCut              = 200 * MeV 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLoosePhotons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePions.py
new file mode 100755
index 000000000..4f4d84b54
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLoosePions.py
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLoosePions.py
+#  configuration file for 'Standard Loose Pions' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Pions wioth loose cuts'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'StdLoosePions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = FilterDesktop( 'StdLoosePions',
+                           Inputs = ["Phys/StdAllLoosePions/Particles"],
+                           Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLoosePions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseProtons.py
new file mode 100755
index 000000000..7d893c4ef
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseProtons.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdLooseProtons.py
+#  configuration file for 'Standard Loose Protons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Protons with loose cuts'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  FilterDesktop( 'StdLooseProtons',
+                            Inputs = ["Phys/StdAllLooseProtons/Particles"],
+                            Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdLooseProtons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseResolvedEta.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseResolvedEta.py
new file mode 100755
index 000000000..5d384538b
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseResolvedEta.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseResolvedEta.py
+#  configuration file for 'Standard Loose Resolved Etas' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose ResolvedEta'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseEta2gg'      ,  
+    'StdLooseResolvedEta' ,
+    'locations'
+    )
+# =============================================================================
+from CommonParticles.Utils     import *
+from GaudiKernel.SystemOfUnits import MeV
+
+# ===========================================================
+## create the algorithm, eta in wide mass-window  
+from Configurables       import ResolvedPi0Maker, PhotonMaker
+wide =  ResolvedPi0Maker (
+    'StdLooseEta2gg'            ,
+    DecayDescriptor = 'Eta'     ,
+    MassWindow      = 105 * MeV ,
+    Particle        = 'eta'     )
+
+wide.addTool(PhotonMaker)
+wide.PhotonMaker.PtCut  = 200 * MeV
+
+## configure Data-On-Demand service 
+locations = updateDoD ( wide )
+## finally: define the symbol 
+StdLooseEta2gg          = wide 
+
+# ============================================================================
+## filter the ``standard''-mass window 
+from Configurables       import FilterDesktop 
+fltr       =  FilterDesktop (
+    'StdLooseResolvedEta'                   ,
+    Code   = "ADMASS('eta') < 50 * MeV "    ,
+    Inputs = [
+    'Phys/%s/Particles'  % wide.name() 
+    ]
+    )
+
+## finally: define the symbol 
+StdLooseResolvedEta = fltr
+## configure Data-On-Demand service 
+locations.update ( updateDoD ( fltr ) ) 
+
+## ============================================================================
+if '__main__' == __name__ :
+    
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseResolvedPi0.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseResolvedPi0.py
new file mode 100755
index 000000000..478e7e5b2
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseResolvedPi0.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseResolvedPi0.py
+#  configuration file for 'Standard Loose Resolved Pi0s' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose ResolvedPi0'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLoosePi02gg'      ,
+    'StdLooseResolvedPi0' ,
+    'locations'
+    )
+# =============================================================================
+from GaudiKernel.SystemOfUnits import MeV
+from CommonParticles.Utils     import *
+
+## create the algorithm 
+from Configurables       import ResolvedPi0Maker, PhotonMaker
+wide =  ResolvedPi0Maker ( 'StdLoosePi02gg'           ,
+                           DecayDescriptor = 'Pi0'    ,
+                           MassWindow      = 60.* MeV )
+wide.addTool(PhotonMaker)
+wide.PhotonMaker.PtCut = 200.*MeV
+
+## configure Data-On-Demand service 
+locations      = updateDoD ( wide  )
+## define the symbol:
+StdLoosePi02gg = wide 
+
+# ============================================================================
+## filter the ``standard''-mass window 
+from Configurables       import FilterDesktop 
+fltr       =  FilterDesktop (
+    'StdLooseResolvedPi0'                   ,
+    Code   = "ADMASS('pi0') < 30 * MeV "    ,
+    Inputs = [
+    'Phys/%s/Particles'  % wide.name() 
+    ]
+    )
+## configure Data-On-Demand service 
+locations.update ( updateDoD ( fltr ) ) 
+## finally: define the symbol 
+StdLooseResolvedPi0 = fltr 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseRho0.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseRho0.py
new file mode 100755
index 000000000..b2229b34b
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseRho0.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseRho0.py
+#  configuration file for 'Standard Loose Rho0'
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose '
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'StdLooseRho0' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm
+StdLooseRho0 = CombineParticles ( 'StdLooseRho0' )
+
+StdLooseRho0.Inputs  = [ "Phys/StdLoosePions/Particles" ]
+StdLooseRho0.DecayDescriptor = "rho(770)0 -> pi+ pi-"
+StdLooseRho0.CombinationCut = "(ADAMASS('rho(770)0')<100*MeV)& (ADOCACHI2CUT(15, ''))"
+StdLooseRho0.MotherCut = "(BPVVDZ>0) & (VFASPF(VCHI2)<9) & (BPVDIRA>0.95) & (BPVVDCHI2>25)"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdLooseRho0 )
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
+
+# =============================================================================
+# The END
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseRhoPlus.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseRhoPlus.py
new file mode 100755
index 000000000..2d3307a97
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdLooseRhoPlus.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseRhoPlus.py
+#  configuration file for 'Standard Loose RhoPlus' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose RhoPlus'
+"""
+__author__  = "Yasmine Amhis"
+# =============================================================================
+__all__ = (
+    'StdLooseRhoPlus' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm 
+StdLooseRhoPlus = CombineParticles ( 'StdLooseRhoPlus' )
+
+StdLooseRhoPlus = CombineParticles("StdLooseRhoPlus")
+StdLooseRhoPlus.Inputs = [ "Phys/StdLooseMergedPi0/Particles",
+                           "Phys/StdLooseResolvedPi0/Particles",
+                           "Phys/StdLoosePions/Particles",
+                           "Phys/StdLooseKaons/Particles"]		 
+StdLooseRhoPlus.DecayDescriptor = "[rho(770)- -> pi- pi0]cc"
+StdLooseRhoPlus.DaughtersCuts = {"pi+" : "ALL", "K+" : "ALL",
+                                 "pi0" :  "(PT>1000*MeV)  & (P> 1500*MeV)"}
+#Note
+#The cut of 550 MeV around the K*(892)+ is NOT a typo, is motivated
+#by the requirements of the B2DVec HLT2 selection
+StdLooseRhoPlus.CombinationCut = "(ADAMASS('K*(892)+')<550*MeV)"
+StdLooseRhoPlus.MotherCut =  "ALL"
+
+## configure Data-On-Demand service 
+locations = updateDoD ( StdLooseRhoPlus )
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdMassConstrainedJpsi2MuMu.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdMassConstrainedJpsi2MuMu.py
new file mode 100644
index 000000000..cd695d8f4
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdMassConstrainedJpsi2MuMu.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdMassConstrainedJpsi2MuMu.py
+#  configuration file for 'Standard mass constrained Jpsi2MuMu'
+#  @author Roel Aaij
+#  @date 2010-08-31
+# =============================================================================
+"""
+Configuration file for 'Standard mass constrained Jpsi2MuMu'
+"""
+__author__  = "Roel Aaij"
+# =============================================================================
+__all__ = (
+    'StdMassConstrainedJpsi2MuMu' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+StdMassConstrainedJpsi2MuMu = CombineParticles("StdMassConstrainedJpsi2MuMu")
+StdMassConstrainedJpsi2MuMu.Inputs = ["Phys/StdAllLooseMuons/Particles"]
+StdMassConstrainedJpsi2MuMu.DecayDescriptor = "J/psi(1S) -> mu+ mu-"
+StdMassConstrainedJpsi2MuMu.DaughtersCuts = { 'mu+' : '(PIDmu > 0) & (PT > 0.5*GeV)' }
+StdMassConstrainedJpsi2MuMu.CombinationCut = "(ADAMASS('J/psi(1S)') < 150.*MeV) & (ADOCACHI2CUT(20, ''))"
+StdMassConstrainedJpsi2MuMu.MotherCut = "(VFASPF(VCHI2) < 16.) & (MFIT)"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdMassConstrainedJpsi2MuMu )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownElectrons.py
new file mode 100755
index 000000000..f536c9790
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownElectrons.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Electrons with downstram tracks'
+"""
+__author__  = "Ulrich Kerzel Ulrich.Kerzel@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdNoPIDsDownElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdNoPIDsDownElectrons'  ,
+                                   DecayDescriptor = 'Electron' ,
+                                   Particle = 'electron'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm , trackTypes = [ "Downstream" ]) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsDownElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownKaons.py
new file mode 100644
index 000000000..a599ecb7f
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownKaons.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsDownKaons.py
+#  configuration file for 'Standard NoPIDs Downstream Kaons' 
+#  @author Olli LUPTON oliver.lupton@cern.ch
+#  @date 2016-11-03
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Downstream Kaons'
+"""
+__author__  = "Olli Lupton <oliver.lupton@cern.ch>"
+# =============================================================================
+__all__ = (
+    'StdNoPIDsDownKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdNoPIDsDownKaons'  ,
+                                DecayDescriptor = 'Kaon' ,
+                                Particle = 'kaon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsDownKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownPions.py
new file mode 100644
index 000000000..ef30087f3
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownPions.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsDownPions.py
+#  configuration file for 'Standard NoPIDs Downstream Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Downstream Pions'
+"""
+__author__  = "Alessio Sarti <Alessio.Sarti@lnf.infn.it>"
+# =============================================================================
+__all__ = (
+    'StdNoPIDsDownPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdNoPIDsDownPions'  ,
+                                DecayDescriptor = 'Pion' ,
+                                Particle = 'pion' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsDownPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownProtons.py
new file mode 100644
index 000000000..c46138a74
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsDownProtons.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsDownProtons.py
+#  configuration file for 'Standard NoPIDs Downstream Protons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Downstream Protons'
+"""
+__author__  = "Alessio Sarti <Alessio.Sarti@lnf.infn.it>"
+# =============================================================================
+__all__ = (
+    'StdNoPIDsDownProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdNoPIDsDownProtons'         ,
+                                   DecayDescriptor = 'Proton' ,
+                                   Particle = 'proton')
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsDownProtons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsElectrons.py
new file mode 100755
index 000000000..694d1e675
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsElectrons.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Electrons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Electrons with loose cuts'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'StdNoPIDsElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  FilterDesktop( 'StdNoPIDsElectrons',
+                            Inputs = ["Phys/StdAllNoPIDsElectrons/Particles"],
+                            Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsElectrons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsKaons.py
new file mode 100755
index 000000000..1cfb66565
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsKaons.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsKaons.py
+#  configuration file for 'Standard NoPIDs Kaons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Kaons with loose cuts'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'StdNoPIDsKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  FilterDesktop( 'StdNoPIDsKaons',
+                            Inputs = ["Phys/StdAllNoPIDsKaons/Particles"],
+                            Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsKaons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsMuons.py
new file mode 100755
index 000000000..56b184769
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsMuons.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsMuons.py
+#  configuration file for 'Standard NoPIDs Muons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Muons with loose cuts'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'StdNoPIDsMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  FilterDesktop( 'StdNoPIDsMuons',
+                            Inputs = ["Phys/StdAllNoPIDsMuons/Particles"],
+                            Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsMuons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsPions.py
new file mode 100755
index 000000000..ae0678a3d
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsPions.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsPions.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Pions with loose cuts'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'StdNoPIDsPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  FilterDesktop( 'StdNoPIDsPions',
+                            Inputs = ["Phys/StdAllNoPIDsPions/Particles"],
+                            Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsPions = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsProtons.py
new file mode 100755
index 000000000..f749625a2
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsProtons.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsProtons.py
+#  configuration file for 'Standard NoPIDs Protons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Protons wioth loose cuts'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'StdNoPIDsProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  FilterDesktop( 'StdNoPIDsProtons',
+                            Inputs = ["Phys/StdAllNoPIDsProtons/Particles"],
+                            Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsProtons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpElectrons.py
new file mode 100755
index 000000000..0cfac4e58
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpElectrons.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Electrons with Upstream tracks'
+"""
+__author__  = "Ulrich Kerzel Ulrich.Kerzel@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdNoPIDsUpElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdNoPIDsUpElectrons'         ,
+                                DecayDescriptor = 'Electron' , Particle = 'electron'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm, trackTypes = [ "Upstream" ] ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsUpElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpKaons.py
new file mode 100755
index 000000000..3fdc4e25b
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpKaons.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsUpKaons.py
+#  configuration file for No PID Upstream Kaons
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for No PID Upstream Kaons
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdNoPIDsUpKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = NoPIDsParticleMaker ( 'StdNoPIDsUpKaons',
+                                  DecayDescriptor = 'Kaon' ,
+                                  Particle = 'kaon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm, trackTypes = ['Upstream'] )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsUpKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpMuons.py
new file mode 100644
index 000000000..95ce4135b
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpMuons.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+from __future__ import print_function
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsUpMuons.py
+#  configuration file for 'Standard NoPIDs Upstream Muons'
+#  @author Vitalii Lisovskyi vitalii.lisovskyi@cern.ch
+#  @date 2021-02-23
+# =============================================================================
+__all__ = (
+    'StdNoPIDsUpMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker
+
+from CommonParticles.Utils import trackSelector, updateDoD
+
+## create the algorithm
+algorithm = NoPIDsParticleMaker ( 'StdNoPIDsUpMuons'       ,
+                                  DecayDescriptor = 'Muon' ,
+                                  Particle = 'muon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm, trackTypes = ['Upstream'] )
+
+## configure Data-On-Demand service
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol
+StdNoPIDsUpMuons = algorithm
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print (__doc__)
+    print (locationsDoD ( locations ))
+
+# =============================================================================
+# The END
+# =================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpPions.py
new file mode 100644
index 000000000..cafdb99af
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsUpPions.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsUpPions.py
+#  configuration file for 'Standard NoPIDs Upstream Pions' 
+#  @author Patrick Koppenburg patrick.koppenburg@cern.ch
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Upstream Pions'
+"""
+__author__  = "Patrick Koppenburg patrick.koppenburg@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdNoPIDsUpPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = NoPIDsParticleMaker ( 'StdNoPIDsUpPions'          ,
+                                  DecayDescriptor = 'Pion' ,
+                                  Particle = 'pion' )
+
+# configure the track selector
+selector = trackSelector ( algorithm, trackTypes = ['Upstream'] )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsUpPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsVeloElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsVeloElectrons.py
new file mode 100755
index 000000000..cab7eabe8
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdNoPIDsVeloElectrons.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdNoPIDsElectrons.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Electrons with VELO tracks'
+"""
+__author__  = "Ulrich Kerzel Ulrich.Kerzel@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdNoPIDsElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker 
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  NoPIDsParticleMaker ( 'StdNoPIDsVeloElectrons'         ,
+                                DecayDescriptor = 'Electron' , Particle = 'electron'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm,trackTypes = [ "Velo" ]  ) 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdNoPIDsVeloElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdParticleFlow.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdParticleFlow.py
new file mode 100644
index 000000000..cfb2b937f
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdParticleFlow.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdAllNoPIDsPions.py
+#  configuration file for 'Standard NoPIDs Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard NoPIDs Pions'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdParticleFlow' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from CommonParticles.Utils import *
+
+
+from JetAccessories.ParticleFlow_Config import ParticleFlowConf
+algorithm = ParticleFlowConf("PF" , _MCCor = False ).PFSeq
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+
+## finally: define the symbol 
+StdParticleFlow = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownElectrons.py
new file mode 100755
index 000000000..ed6e91513
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownElectrons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNDownElectrons.py
+#  configuration file for 'Standard Tight ANN Downstream Electrons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Downstream Electrons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNDownElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNDownElectrons' ,
+                                    Particle = 'electron' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter , 'Electron' )
+#fltr.Selection = [ "RequiresDet='CALO' ProbNNe>'0.2'" ]
+fltr.Selection = [ "RequiresDet='RICHORCALO' ProbNNe>'0.07'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNDownElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownKaons.py
new file mode 100755
index 000000000..991704d72
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownKaons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNDownKaons.py
+#  configuration file for 'Standard Tight ANN Downstream Kaons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Downstream Kaons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNDownKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNDownKaons' ,
+                                    Particle = 'kaon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Kaon' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNk>'0.2'" ]
+fltr.Selection = [ "ProbNNk>'0.15'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNDownKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownMuons.py
new file mode 100755
index 000000000..8ef6397f2
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownMuons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNDownMuons.py
+#  configuration file for 'Standard Tight ANN Downstream Muons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Downstream Muons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNDownMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleMUONFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNDownMuons' ,
+                                    Particle = 'muons' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleMUONFilter, 'Muon' )
+#fltr.Selection = [ "RequiresDet='MUON' IsMuon=True ProbNNmu>'0.1'" ]
+fltr.Selection = [ "ProbNNmu>'0.1'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNDownMuons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownPions.py
new file mode 100755
index 000000000..b0f789959
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownPions.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNDownPions.py
+#  configuration file for 'Standard Tight ANN Downstream Pions' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Downstream Pions using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNDownPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNDownPions' ,
+                                    Particle = 'pion' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Pion' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNpi>'0.2'" ]
+fltr.Selection = [ "ProbNNpi>'0.07'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNDownPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownProtons.py
new file mode 100755
index 000000000..61d2033a9
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNDownProtons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNDownProtons.py
+#  configuration file for 'Standard Tight ANN Downstream Protons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Downstream Protons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNDownProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNDownProtons' ,
+                                    Particle = 'proton' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Downstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Proton' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNp>'0.2'" ]
+fltr.Selection = [ "ProbNNp>'0.1'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNDownProtons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNElectrons.py
new file mode 100755
index 000000000..68f3421a6
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNElectrons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdTightANNElectrons.py
+#  configuration file for 'Standard Loose Electrons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight ANN Electrons'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNElectrons',
+                                    Particle = 'electron'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter , 'Electron' )
+#fltr.Selection = [ "RequiresDet='CALO' ProbNNe>'0.2'" ]
+#fltr.Selection = [ "ProbNNe>'0.2'" ]
+fltr.Selection = [ "RequiresDet='RICHORCALO' ProbNNe>'0.16'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+    
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNKaons.py
new file mode 100755
index 000000000..5f55309f5
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNKaons.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNKaons.py
+#  configuration file for 'Standard Tight Kaons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Kaons'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import ProtoParticleCALOFilter, CombinedParticleMaker
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdTightANNKaons',
+                                     Particle = 'kaon'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Kaon' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNk>'0.15'" ]
+fltr.Selection = [ "ProbNNk>'0.05'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNMuons.py
new file mode 100755
index 000000000..0a04c3fc9
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNMuons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdTightANNMuons.py
+#  configuration file for 'Standard Tight Muons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Muons'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleMUONFilter
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNMuons' ,
+                                    Particle = 'muon'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleMUONFilter, 'Muon' )
+#fltr.Selection = [ "RequiresDet='MUON' IsMuon=True ProbNNmu>'0.1'" ]
+fltr.Selection = [ "ProbNNmu>'0.01'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNMuons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNPions.py
new file mode 100755
index 000000000..4ae2fb547
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNPions.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNPions.py
+#  configuration file for 'Standard Tight Pions' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight ANN Pions'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNPions',
+                                    Particle = 'pion'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Pion' )
+fltr.Selection = [ "ProbNNpi>'0.6'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNProtons.py
new file mode 100755
index 000000000..829da5fc2
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNProtons.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdTightANNProtons.py
+#  configuration file for 'Standard Tight ANN Protons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight ANN Protons'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNProtons',
+                                    Particle = 'proton'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Proton' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNp>'0.125'" ]
+fltr.Selection = [ "ProbNNp>'0.02'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNProtons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpElectrons.py
new file mode 100755
index 000000000..1f5aed4f0
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpElectrons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNUpElectrons.py
+#  configuration file for 'Standard Tight ANN Upstream Electrons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Upstream Electrons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNUpElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNUpElectrons' ,
+                                    Particle = 'electron' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Upstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter , 'Electron' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNe>'0.2'" ]
+fltr.Selection = [ "RequiresDet='RICHORCALO' ProbNNe>'0.1'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNUpElectrons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpKaons.py
new file mode 100755
index 000000000..37c26475f
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpKaons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNUpKaons.py
+#  configuration file for 'Standard Tight ANN Upstream Kaons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Upstream Kaons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNUpKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNUpKaons' ,
+                                    Particle = 'kaon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Upstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Kaon' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNk>'0.2'" ]
+fltr.Selection = [ "ProbNNk>'0.09'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNUpKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpMuons.py
new file mode 100755
index 000000000..ca409dcbf
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpMuons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNUpMuons.py
+#  configuration file for 'Standard Loose ANN Upstream Muons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Upstream Muons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNUpMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleMUONFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNUpMuons' ,
+                                    Particle = 'muons' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Upstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleMUONFilter, 'Muon' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNmu>'0.1'" ]
+fltr.Selection = [ "ProbNNmu>'0.1'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNUpMuons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpPions.py
new file mode 100755
index 000000000..a10abbac7
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpPions.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNUpPions.py
+#  configuration file for 'Standard Tight ANN Upstream Pions' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Upstream Pions using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNUpPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNUpPions' ,
+                                    Particle = 'pion' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Upstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Pion' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNpi>'0.2'" ]
+fltr.Selection = [ "ProbNNpi>'0.1'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNUpPions = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpProtons.py
new file mode 100755
index 000000000..21a672a56
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightANNUpProtons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightANNUpProtons.py
+#  configuration file for 'Standard Tight ANN Upstream Protons' 
+#  @author Chris Jones christopher.rob.jones@cern.ch
+#  @date 20/01/2012
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Upstream Protons using ANN PID'
+"""
+__author__  = "Chris Jones christopher.rob.jones@cern.ch"
+# =============================================================================
+__all__ = (
+    'StdTightANNUpProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightANNUpProtons' ,
+                                    Particle = 'proton' )
+
+# configure the track selector
+selector = trackSelector ( algorithm,
+                           trackTypes = ['Upstream'],
+                           cuts = { "Chi2Cut" : [0,10] } )
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Proton' )
+#fltr.Selection = [ "RequiresDet='RICH' ProbNNp>'0.2'" ]
+fltr.Selection = [ "ProbNNp>'0.075'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightANNUpProtons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightDetachedTau.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightDetachedTau.py
new file mode 100755
index 000000000..a9e35aa05
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightDetachedTau.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdTightDetachedTau.py
+#  configuration file for 'Standard Tight Detached Tau' 
+#  @author Donal Hill, Conor Fitzpatrick, Christian Elsasser, Giampiero Mancinelli
+#  @date 2012-12-02
+# Strongly modified 2012-14-01 by Giampiero Mancinelli
+# Used to make the StdLooseDetachedTau3pi in Stripping20r0p3
+# Renamed tight afterward (in view of Stripping 21), in order to restore the
+# previous loose selection (Sept 9th 2014)
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Detached Tau'
+"""
+__author__  = "Donal Hill, Conor Fitzpatrick, Christian Elsasser"
+# =============================================================================
+__all__ = (
+           'StdTightDetachedTau3pi',
+           'locations'
+           
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm - physical tau+ -> pi+ pi- pi+
+StdTightDetachedTau3pi = CombineParticles ( 'StdTightDetachedTau3pi' )
+
+StdTightDetachedTau3pi.Inputs = [ "Phys/StdLoosePions/Particles" ]
+
+#Build physical tau and tau+++
+StdTightDetachedTau3pi.DecayDescriptors = ["[tau+ -> pi+ pi- pi+]cc"]
+StdTightDetachedTau3pi.DaughtersCuts = {
+    "pi+"        : "(PT>250.*MeV) & (P>2000.*MeV) & (MIPCHI2DV(PRIMARY) > 16.0) & (TRCHI2DOF<4) & (TRGHOSTPROB<0.4) & (PROBNNpi > 0.55)",
+    "pi-"        : "(PT>250.*MeV) & (P>2000.*MeV) & (MIPCHI2DV(PRIMARY) > 16.0) & (TRCHI2DOF<4) & (TRGHOSTPROB<0.4) & (PROBNNpi > 0.55)"
+    
+    }
+
+
+StdTightDetachedTau3pi.CombinationCut = "(APT>800.*MeV) & ((AM>400.*MeV) & (AM<2100.*MeV)) & (AMAXDOCA('')<0.2*mm) & (ANUM(PT > 800*MeV) >= 1) "
+StdTightDetachedTau3pi.MotherCut = "(PT>1000.*MeV) & (M>500.*MeV) & (M<2000.*MeV) & (BPVDIRA>0.99) & (VFASPF(VCHI2) < 16) & (BPVVDCHI2>16) & (BPVVDRHO>0.1*mm) & (BPVVDRHO<7.0*mm) & (BPVVDZ>5.0*mm)"
+
+## configure Data-On-Demand service 
+locations = updateDoD ( StdTightDetachedTau3pi )
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightDplus.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightDplus.py
new file mode 100644
index 000000000..bbaf27ab6
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightDplus.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+## @file  CommonParticles/StdTightDplus.py
+#  configuration file for 'Standard Tight Dplus' 
+#  @author Sandra Amato
+#  @date 2011-08-26# =============================================================================
+"""
+Configuration file for 'Standard Tight Dplus'"""
+__author__  = "Sandra Amato"
+# =============================================================================
+__all__ = ( 
+    'StdTightDplus2KPiPiOppSignPi' ,
+    'StdVeryTightDsplus2KKPi',
+    'locations'
+    )
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+locations = {}
+
+## ============================================================================
+StdTightDplus2KPiPiOppSignPi = CombineParticles ( 'StdTightDplus2KPiPiOppSignPi')
+StdTightDplus2KPiPiOppSignPi.Inputs = [ "Phys/StdLooseKaons/Particles",
+                               "Phys/StdLoosePions/Particles" ]
+
+StdTightDplus2KPiPiOppSignPi.DecayDescriptor = "[D+ -> pi- pi+ K+]cc"
+StdTightDplus2KPiPiOppSignPi.DaughtersCuts = {
+    "K+"  : "(P > 2*GeV) & ((PIDK-PIDpi) > 7.)",
+    "pi+" : "(P > 2*GeV)  & ((PIDK-PIDpi) < 3.)"
+    }
+StdTightDplus2KPiPiOppSignPi.CombinationCut = "((AM>1760.*MeV) & (AM<2080.*MeV) & ((APT>1.*GeV) | (ASUM(PT)>1.*GeV)) & (ADOCAMAX('')<0.5*mm))"
+StdTightDplus2KPiPiOppSignPi.MotherCut = "((VFASPF(VCHI2) < 30 ) & (M>1770.*MeV) & (M < 2070.*MeV) & (BPVVDCHI2>36) & (BPVDIRA>0.98))"
+
+locations.update(updateDoD ( StdTightDplus2KPiPiOppSignPi ))
+
+## ===========================================================================
+StdVeryTightDsplus2KKPi = CombineParticles( 'StdVeryTightDsplus2KKPi' )
+StdVeryTightDsplus2KKPi.Inputs = [ "Phys/StdLooseKaons/Particles", "Phys/StdLoosePions/Particles" ]
+StdVeryTightDsplus2KKPi.DecayDescriptor = "[D_s+ -> K- K+ pi+]cc"
+StdVeryTightDsplus2KKPi.DaughtersCuts = {
+    "K+"  : "(P > 2*GeV) & ((PIDK-PIDpi) > 5.)",
+    "pi+" : "(P > 2*GeV)  & ((PIDK-PIDpi) < 5.)"
+    }
+StdVeryTightDsplus2KKPi.CombinationCut = "((AM>1900.*MeV) & (AM<2040.*MeV) & ((APT>1.*GeV) | (ASUM(PT)>1.*GeV)) & (ADOCAMAX('')<0.5*mm))"
+StdVeryTightDsplus2KKPi.MotherCut = "((VFASPF(VCHI2) < 30 ) & (M>1920.*MeV) & (M < 2020.*MeV) & (BPVVDCHI2>36) & (BPVDIRA>0.98))" 
+locations.update(updateDoD ( StdVeryTightDsplus2KKPi ))
+
+##########################################################################################
+# D+ -> 3 pi is a clone of D+ -> K Pi Pi 
+#
+from StdLooseDplus import StdLooseDplus2KPiPi
+StdTightDplus2PiPiPi = StdLooseDplus2KPiPi.clone("StdTightDplus2PiPiPi")
+StdTightDplus2PiPiPi.Inputs = [ "Phys/StdLoosePions/Particles" ]
+StdTightDplus2PiPiPi.DecayDescriptor = "[D+ -> pi- pi+ pi+]cc"
+StdTightDplus2PiPiPi.DaughtersCuts = {"pi+" : "(P > 2*GeV)  & ((PIDK-PIDpi) < 3.) & ((MIPCHI2DV(PRIMARY)) > 6.0 )"}
+locations.update(updateDoD ( StdTightDplus2PiPiPi ))
+##########################################################################################
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
+
+# =============================================================================
+# The END 
+# =============================================================================
+                                                                                            
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightElectrons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightElectrons.py
new file mode 100755
index 000000000..0422627f7
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightElectrons.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightElectrons.py
+#  configuration file for 'Standard Loose Electrons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Electrons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdTightElectrons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from Configurables       import BremAdder
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdTightElectrons',
+                                     Particle =  'electron'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter , 'Electron' )
+fltr.Selection = [ "RequiresDet='CALO' CombDLL(e-pi)>'0.0'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightElectrons = algorithm 
+
+## temporary:
+#algorithm.addTool ( BremAdder )
+#brem = algorithm.BremAdder 
+#brem.BremCor = 1.0
+
+## ============================================================================
+if '__main__' == __name__ :
+    
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightKaons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightKaons.py
new file mode 100755
index 000000000..52877b3ca
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightKaons.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightKaons.py
+#  configuration file for 'Standard Tight Kaons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Kaons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdTightKaons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import ProtoParticleCALOFilter, CombinedParticleMaker
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdTightKaons',
+                                     Particle =  'kaon'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Kaon' )
+fltr.Selection = [ "RequiresDet='RICH' CombDLL(k-pi)>'0.0'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightKaons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightMuons.py
new file mode 100755
index 000000000..7326bd2c0
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightMuons.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdTightMuons.py
+#  configuration file for 'Standard Tight Muons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Muons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdTightMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleMUONFilter
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightMuons'   ,
+                                    Particle = 'muon' )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleMUONFilter, 'Muon' )
+fltr.Selection = [ "RequiresDet='MUON' IsMuon=True CombDLL(mu-pi)>'-3.0'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightMuons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightPhi.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightPhi.py
new file mode 100755
index 000000000..f424bf460
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightPhi.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for 'Standard Tight Phi2KK'. Lieftime unbiased.
+"""
+__author__  = "Jibo He"
+__date__ = "3/2/2012"
+
+# =============================================================================
+__all__ = (
+    'StdTightPhi2KK' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm
+StdTightPhi2KK = CombineParticles("StdTightPhi2KK")
+StdTightPhi2KK.Inputs = ["Phys/StdTightKaons/Particles"]
+StdTightPhi2KK.DecayDescriptor = "phi(1020) -> K+ K-"
+StdTightPhi2KK.DaughtersCuts = { "K+" : "(PT>500*MeV)" }
+StdTightPhi2KK.CombinationCut = "(ADAMASS('phi(1020)')<30*MeV) & (ADOCACHI2CUT(30, ''))"
+StdTightPhi2KK.MotherCut = "(VFASPF(VCHI2) < 25.0)"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdTightPhi2KK )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightPions.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightPions.py
new file mode 100755
index 000000000..5ad638f79
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightPions.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightPions.py
+#  configuration file for 'Standard Tight Pions' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Pions'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdTightPions' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm = CombinedParticleMaker ( 'StdTightPions',
+                                    Particle = 'pion' )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Pion' )
+fltr.Selection = [ "RequiresDet='RICH' CombDLL(pi-k)>'-5.0'" ]
+
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightPions = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightProtons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightProtons.py
new file mode 100755
index 000000000..621ea9d4b
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdTightProtons.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file  CommonParticles/StdTightProtons.py
+#  configuration file for 'Standard Tight Protons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Tight Protons'
+"""
+__author__  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    'StdTightProtons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombinedParticleMaker 
+from Configurables       import ProtoParticleCALOFilter
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  CombinedParticleMaker ( 'StdTightProtons', Particle = 'proton'  )
+
+# configure the track selector
+selector = trackSelector ( algorithm ) 
+
+# protoparticle filter:
+fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Proton' )
+fltr.Selection = [ "RequiresDet='RICH' CombDLL(p-pi)>'0.0'" ]
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdTightProtons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdV0FromBrunel.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdV0FromBrunel.py
new file mode 100755
index 000000000..58eabbdc1
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdV0FromBrunel.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdV0FromBrunel.py
+#  configuration file for 'Standard Loose ' 
+#  @author Patrick Koppenburg
+#  @date 2012-06-08
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Ks'
+"""
+__author__  = "Patrick Koppenburg"
+# =============================================================================
+__all__ = (
+    'V0Maker' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import DataOnDemandSvc, V0FromDstMaker
+from CommonParticles.Utils import *
+locations = {}
+
+# One algorithm does all V0
+v0locations = [ "StdKs2PiPiLL" ,
+                "StdKs2PiPiDD" ,
+                "StdLambda2PPiLL" ,
+                "StdLambda2PPiDD"  ]
+hat = "Phys/"
+V0Maker = V0FromDstMaker()
+
+dod = DataOnDemandSvc()
+
+for v0 in v0locations:
+    p1 = { hat + v0 + '/Particles' : V0Maker.getFullName() }
+    p2 = { hat + v0 + '/Particles' : V0Maker               }
+    dod.AlgMap.update( p1 )
+    locations.update ( p2 )
+        
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print  locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseAllPhotons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseAllPhotons.py
new file mode 100644
index 000000000..373576808
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseAllPhotons.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseAllPhotons.py
+#  configuration file for 'Standard Loose All Photons' 
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Configuration file for 'Standard Very Loose All Photons'
+"""
+__author__  = "Olivier Deschamps odescham@in2p3.fr"
+# =============================================================================
+__all__ = (
+    'StdVeryLooseAllPhotons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import PhotonMakerAlg 
+from Configurables       import PhotonMaker
+from GaudiKernel.SystemOfUnits import MeV
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  PhotonMakerAlg ( 'StdVeryLooseAllPhotons'         ,
+                                DecayDescriptor = 'Gamma' )
+
+# configure desktop&particle maker: 
+algorithm.addTool ( PhotonMaker , name = 'PhotonMaker' )
+photon = algorithm.PhotonMaker
+photon.ConvertedPhotons   = True
+photon.UnconvertedPhotons = True 
+photon.PtCut              = 75 * MeV 
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdVeryLooseAllPhotons = algorithm 
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseDetachedKstar.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseDetachedKstar.py
new file mode 100644
index 000000000..30f0aaf5d
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseDetachedKstar.py
@@ -0,0 +1,44 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for Standard Very Loose Kstar2Kpi
+"""
+
+__author__ = 'P. Koppenburg'
+__date__ = '22/01/2010'
+
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles # , OfflineVertexFitter, OnOfflineTool
+from CommonParticles.Utils import *
+import GaudiKernel.SystemOfUnits as Units
+
+###########################
+# StdVeryLooseDetachetKst2Kpi #
+###########################
+
+StdVeryLooseDetachedKst2Kpi = CombineParticles("StdVeryLooseDetachedKst2Kpi")
+StdVeryLooseDetachedKst2Kpi.DecayDescriptor = "[K*(892)0 -> K+ pi-]cc"
+StdVeryLooseDetachedKst2Kpi.Inputs = ["Phys/StdLooseKaons/Particles",
+                                      "Phys/StdLoosePions/Particles"]
+
+## # IPCHI2>4 already applied on StdLoose{Kaons,Pions} 
+## StdVeryLooseDetachedKst2Kpi.DaughtersCuts = {
+##     "K+" :"(MIPCHI2DV(PRIMARY)>2.25)",
+##     "pi-":"(MIPCHI2DV(PRIMARY)>2.25)"
+##     }
+
+StdVeryLooseDetachedKst2Kpi.CombinationCut = "(ADAMASS('K*(892)0')<300*MeV) & (ADOCACHI2CUT(30, ''))"
+StdVeryLooseDetachedKst2Kpi.MotherCut = "(VFASPF(VCHI2)<25)"
+
+locations = updateDoD(StdVeryLooseDetachedKst2Kpi)
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseDiMuon.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseDiMuon.py
new file mode 100644
index 000000000..832c6ebaf
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseDiMuon.py
@@ -0,0 +1,42 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for Standard Loose DiMuon, very loose for penguins (and other small animals).
+"""
+
+__author__ = 'Rob Lambert'
+__date__ = '07/07/2009'
+
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from CommonParticles.Utils import *
+import GaudiKernel.SystemOfUnits as Units
+
+###########################
+# StdLooseDiMuon #
+###########################
+
+StdVeryLooseDiMuon = CombineParticles("StdVeryLooseDiMuon")
+StdVeryLooseDiMuon.DecayDescriptor = "J/psi(1S) -> mu+ mu-"
+StdVeryLooseDiMuon.Inputs = ["Phys/StdAllVeryLooseMuons/Particles"]
+StdVeryLooseDiMuon.CombinationCut = "(ADAMASS('J/psi(1S)') < 3000.*MeV) & (ADOCACHI2CUT(30, ''))"
+StdVeryLooseDiMuon.MotherCut = "(VFASPF(VCHI2) < 25.)"
+locations = updateDoD(StdVeryLooseDiMuon)
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
+
+
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseJpsi2MuMu.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseJpsi2MuMu.py
new file mode 100644
index 000000000..e98fdc9da
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseJpsi2MuMu.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdVeryLooseJpsi2MuMu.py
+#  configuration file for 'Standard Very Loose Jpsi2MuMu'
+#  @author Greig Cowan
+#  @date 2009-06-23
+# =============================================================================
+"""
+Configuration file for 'Standard Very Loose Jpsi2MuMu'
+"""
+__author__  = "Greig Cowan"
+# =============================================================================
+__all__ = (
+    'StdVeryLooseJpsi2MuMu' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration   import *
+from Configurables         import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm
+StdVeryLooseJpsi2MuMu = CombineParticles ("StdVeryLooseJpsi2MuMu")
+StdVeryLooseJpsi2MuMu.Inputs = ["Phys/StdVeryLooseMuons/Particles"]
+StdVeryLooseJpsi2MuMu.DecayDescriptor = "J/psi(1S) -> mu+ mu-"
+StdVeryLooseJpsi2MuMu.CombinationCut = "(ADAMASS('J/psi(1S)') < 100.*MeV) & (ADOCACHI2CUT(30, ''))"
+StdVeryLooseJpsi2MuMu.MotherCut = "(VFASPF(VCHI2) < 25.)"
+
+## configure Data-On-Demand service
+locations = updateDoD ( StdVeryLooseJpsi2MuMu    )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations )
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseKs.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseKs.py
new file mode 100755
index 000000000..dbe75de44
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseKs.py
@@ -0,0 +1,51 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration file for 'Standard Very Loose Ks'
+These Very Loose Ks candidates do not have a cut on the pT of the pion
+by loading NoPIDsPions instead of LoosePions.
+This increases the yield of LL Ks's by about 20 to 30%.
+"""
+__author__  = "Mick Mulder"
+# =============================================================================
+__all__ = (
+    'StdVeryLooseKsLL' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles, FilterDesktop
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm 
+StdVeryLooseKsLL = CombineParticles ( 'StdVeryLooseKsLL' )
+
+StdVeryLooseKsLL.Inputs = [ "Phys/StdAllNoPIDsPions/Particles" ]
+StdVeryLooseKsLL.DecayDescriptor = "KS0 -> pi+ pi-" 
+
+StdVeryLooseKsLL.DaughtersCuts = { "pi+" : "(P > 2.*GeV) & (MIPCHI2DV(PRIMARY) > 9.)" } 
+StdVeryLooseKsLL.CombinationCut = "(ADAMASS('KS0') < 50.*MeV) & (ADOCACHI2CUT(30, '')) "
+StdVeryLooseKsLL.MotherCut = "(ADMASS('KS0') < 35.*MeV) & (CHI2VX < 30.) & (BPVVDCHI2>4.)"
+
+## configure Data-On-Demand service 
+locations = updateDoD ( StdVeryLooseKsLL )
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseLambda.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseLambda.py
new file mode 100644
index 000000000..005e857a3
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseLambda.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdLooseLambda.py
+#  configuration file for 'Standard Loose ' 
+#  @author Patrick Koppenburg
+#  @date 2009-02-18
+# =============================================================================
+"""
+Configuration file for 'Standard Very Loose Lambda'
+"""
+__author__  = "Thomas Blake"
+# =============================================================================
+__all__ = (
+    'StdVeryLooseLambdaLL' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import CombineParticles
+from CommonParticles.Utils import *
+
+## ============================================================================
+## create the algorithm 
+StdVeryLooseLambdaLL = CombineParticles ( 'StdVeryLooseLambdaLL' )
+
+
+StdVeryLooseLambdaLL.Inputs = [ "Phys/StdAllNoPIDsPions/Particles",
+                                "Phys/StdAllNoPIDsProtons/Particles" ]
+
+StdVeryLooseLambdaLL.DecayDescriptor = "[Lambda0 -> p+ pi-]cc" 
+
+StdVeryLooseLambdaLL.DaughtersCuts = {
+    "pi+" : "(P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)",
+    "p+"  : "(P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)"
+    } 
+
+StdVeryLooseLambdaLL.CombinationCut = "(ADAMASS('Lambda0')<50*MeV) & (ADOCACHI2CUT(30, ''))"
+StdVeryLooseLambdaLL.MotherCut      =  "(ADMASS('Lambda0')<35*MeV) & (VFASPF(VCHI2)<30) & (BPVVDCHI2 > 4.)"
+
+## configure Data-On-Demand service 
+locations = updateDoD ( StdVeryLooseLambdaLL )
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseMuons.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseMuons.py
new file mode 100755
index 000000000..24eeef4f8
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/StdVeryLooseMuons.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/StdVeryLooseMuons.py
+#  configuration file for 'Standard Very Loose Muons' 
+#  @author Patrick Koppenburg 
+#  @date 2011-07-18
+# =============================================================================
+"""
+Configuration file for 'Standard Loose Muons with very loose cuts'
+"""
+__author__  = "Patrick Koppenburg "
+# =============================================================================
+__all__ = (
+    'StdVeryLooseMuons' ,
+    'locations'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from Configurables       import FilterDesktop
+
+
+from CommonParticles.Utils import *
+
+## create the algorithm 
+algorithm =  FilterDesktop( 'StdVeryLooseMuons',
+                            Inputs = ["Phys/StdAllVeryLooseMuons/Particles"],
+                            Code = defaultCuts() )
+
+## configure Data-On-Demand service 
+locations = updateDoD ( algorithm )
+
+## finally: define the symbol 
+StdVeryLooseMuons = algorithm 
+
+
+## ============================================================================
+if '__main__' == __name__ :
+
+    print __doc__
+    print __author__
+    print locationsDoD ( locations ) 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/Utils.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/Utils.py
new file mode 100755
index 000000000..71bd9ca21
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/Utils.py
@@ -0,0 +1,152 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# =============================================================================
+## @file  CommonParticles/Utils.py
+#  helper file for configuration of "standard particles"
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2009-01-14
+# =============================================================================
+"""
+Helper file for configuration of 'standard particles'
+"""
+author  = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
+# =============================================================================
+__all__ = (
+    # general:
+    'updateDoD'     , ## update data-on-demand service  
+    'locationsDoD'  , ## print locations, known for data-on-demand service 
+    'particles'     , ## locations, known for data-on-demand service
+    'trackSelector' , ## get the track selector
+    'protoFilter'   , ## filter for (charged) protoparticles
+    'defaultCuts'   , ## Default PT and IP cuts
+    )
+# =============================================================================
+
+from Gaudi.Configuration      import *
+from Configurables            import DataOnDemandSvc
+from Configurables            import TrackSelector
+from Configurables            import LHCbConfigurableUser
+
+# local storage of data-on-demand actions 
+_particles = {}
+
+# Default cuts
+_defaultCuts = "(PT>250*MeV) & (MIPCHI2DV(PRIMARY) > 4.)"
+
+# =============================================================================
+#  Default Cuts
+def defaultCuts():
+    """
+    Return string with default cuts
+    """
+    return _defaultCuts
+
+# =============================================================================
+# =============================================================================
+## @class DefaultTrackingCuts
+#  Little class to hold default track selection criteria
+class DefaultTrackingCuts(LHCbConfigurableUser) :
+    ## Configuration slots
+    __slots__ = { "Cuts"  :  { "Chi2Cut" : [ 0, 5 ],
+                               "CloneDistCut" : [5000, 9e+99 ] }, ## The cuts to apply
+                  "Types" :  ["Long"]  ## The track types to include
+                  }
+
+# =============================================================================
+## Return the locations known for data-on-demand service 
+def particles () :
+    """
+    Return the locations known for data-oon-demand service 
+    """
+    return _particles
+
+
+# =============================================================================
+# Update Data-On-Demand Service 
+def updateDoD ( alg , hat = 'Phys/', name = None ) :
+    """
+    Update Data-On-Demand service
+    """
+    if name: _name = name
+    else:    _name = alg.name()
+
+    _parts = { hat+_name+'/Particles' : alg } 
+    _particles.update ( _parts ) 
+    
+    dod = DataOnDemandSvc()
+    dod.AlgMap.update(
+        { hat + _name + '/Particles' : alg.getFullName() }
+        )
+    return _parts 
+    
+## get the track selector 
+def trackSelector ( alg ,
+                    tracks     = TrackSelector,
+                    trackTypes = [],
+                    cuts       = {}
+                    ) :
+    """
+    Get the track selector for maker 
+    """
+    alg.addTool ( tracks )
+
+    selector = getattr ( alg , tracks.getType() )
+
+    # selection cuts
+    # Ugly but works ...
+    if 0 == len(trackTypes) :
+        trackTypes = DefaultTrackingCuts().Types
+    if 0 == len(cuts) :
+        cuts       = DefaultTrackingCuts().Cuts
+    selector.TrackTypes = trackTypes
+    for name,cut in cuts.iteritems() :
+        selector.setProp("Min"+name,cut[0])
+        selector.setProp("Max"+name,cut[1])
+        if ( "CloneDistCut"==name): selector.setProp("AcceptClones",False)
+#    selector.MinPtCut = 100000000
+        
+    return selector
+
+## get the protoparticle filter
+def protoFilter ( alg , fltr , name ) :
+    """
+    Get the protoparticle filter 
+    """
+    alg.addTool ( fltr , name )
+    return getattr ( alg , name )
+
+    
+# =============================================================================
+## nice prinout for the input locations, known for Data-On-Demand Service 
+def locationsDoD ( particles = _particles ) :
+    """
+    Nice printout of the known algorithm for 'standard particles'
+    """
+    line = ' +' + 100*'-' + '+ '
+    result  = line 
+    result += '\n | %-45.45s : %-50.50s |' % ( 'Input Location for DVAlgorithm' ,
+                                               'Data-On-Demand creator' )        
+    result += '\n' + line
+    locs = particles.keys()
+    locs.sort() 
+    for l in locs :
+        a = particles[l]
+        if a.name() == a.getType() : a = a.name()
+        else : a = a.getFullName()
+        result += '\n | %-45.45s : %-50.50s |' % ( l , a )        
+    result += '\n' + line 
+    return result 
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/__init__.py b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/__init__.py
new file mode 100755
index 000000000..6a3448311
--- /dev/null
+++ b/Phys/CommonParticlesArchive/python/CommonParticlesArchive/Stripping28r2p1/CommonParticles/__init__.py
@@ -0,0 +1,16 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiHH.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiHH.py
new file mode 100644
index 000000000..18a9b49ac
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiHH.py
@@ -0,0 +1,358 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+(1) Bd,s->Jpsi h+ h-, h=pi or K with biased selection
+(2) Bd->Jpsi K*(892) similar selection for decay time acceptance
+(3) prompt Jpsi h+h- for time resolution [prescaled]
+(4) Lb->Jpsi Lambda(1520)0 (p+ K-/pi-) for pentaquark 
+'''
+
+__author__ = ['Liming Zhang', 'Xuesong Liu']
+__date__ = '10/11/2016'
+
+__all__ = ('B2JpsiHHConf','default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from CommonParticles.Utils import updateDoD
+from StandardParticles import StdLoosePions
+from StandardParticles import StdLooseKaons
+from StandardParticles import StdLooseProtons
+from StandardParticles import StdAllLooseKaons
+from StandardParticles import StdAllLooseProtons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+default_config = {
+    'NAME'              : 'B2JpsiHH',
+    'WGs'               : ['B2CC'],
+    'BUILDERTYPE'       : 'B2JpsiHHConf',
+    'CONFIG'            : {
+                         'TRCHI2DOF'                 :       5
+		     ,	 'DTF_CTAU'			     :       0.2*0.299
+                 ,       'JpsiMassWindow'            :       80
+                 ,       'VCHI2PDOF'                 :       10
+                 ,       'HLTCuts'                   :       "HLT_PASS_RE('Hlt2DiMuonJPsiDecision')"
+                 ,       'Bs2Jpsif0Prescale'         :       0.30     #2015(S24r0p1) 2016(S28) 2017(S29) 0.30 # 2016(S26): 0.10, 2011: 0.13, 2012: 0.62
+		     ,	 'PROBNNk'			     :       0.05
+		     ,	 'PROBNNp'			     :       0.05
+		     ,	 'PROBNNpi'			     :       0.05
+		     ,	 'PIDKforKaon'		     :       0.
+		     ,	 'PIDKforPion'		     :       10.
+		     ,	 'PIDpforProton'		     :       0.
+		     ,	 'PIDKpforKaon'		     :       -10.
+		     ,	 'PIDpKforProton'		     :       -10.
+                 ,       'MVACut'                    :       "-0.1"
+                 ,       'XmlFile'                   :       "$TMVAWEIGHTSROOT/data/Bs2Jpsif0_BDT_v1r1.xml"
+                         },
+    'STREAMS'           : {
+            'Leptonic' : [
+            'StrippingB2JpsiHHBs2Jpsif0PrescaledLine',
+            'StrippingB2JpsiHHBs2JpsiKstarLine',
+            'StrippingB2JpsiHHLb2JpsipHLine'
+            ],
+            'Dimuon'   : [
+            'StrippingB2JpsiHHBs2Jpsif0Line',
+            'StrippingB2JpsiHHBs2Jpsif0KaonLine',
+            'StrippingB2JpsiHHBs2Jpsif0wsLine'
+            ]
+    } 
+    }
+
+### Lines stored in this file:
+
+class B2JpsiHHConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+      LineBuilder.__init__(self, name, config)
+      self.name = name
+      self.config = config
+    
+        #### Input selections:
+
+        # ------------------------------------------------------------ J/Psi:
+        
+      self.WideJpsiList = DataOnDemand(Location = "Phys/StdMassConstrainedJpsi2MuMu/Particles")
+
+      self.DetachedJpsiList = self.createSubSel( OutputList = 'NarrowDetachedJpsiForJpsiHH' + self.name,
+                                                 InputList  = self.WideJpsiList,
+                                                 Cuts       = "(PFUNA(ADAMASS('J/psi(1S)')) < %(JpsiMassWindow)s * MeV) " %self.config)
+
+        # ------------------------------------------------------------ Hardons:
+       
+      self.NoIPKaonList = self.createSubSel( OutputList = "PIDKaonsForJpsipK" + self.name,
+                                             InputList  = DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles"),
+                                             Cuts       = "(TRCHI2DOF < %(TRCHI2DOF)s ) & (((PIDK > %(PIDKforKaon)s ) & ((PIDK-PIDp) > %(PIDKpforKaon)s )) | (PROBNNk > %(PROBNNk)s ))  & (PT > 250.*MeV) & (TRGHOSTPROB < 0.5)" % self.config )
+      
+      self.NoIPProtonList = self.createSubSel( OutputList = "PIDprotonsForJpsipK" + self.name,
+                                               InputList  = DataOnDemand(Location = "Phys/StdAllLooseProtons/Particles"),
+                                               Cuts       = "(TRCHI2DOF < %(TRCHI2DOF)s ) &  ( ((PIDp > %(PIDpforProton)s ) & ((PIDp-PIDK) > %(PIDpKforProton)s )) | (PROBNNp > %(PROBNNp)s ) )  & (PT > 250.*MeV) & (TRGHOSTPROB < 0.5)" % self.config )
+      
+      self.NoIPPionList = self.createSubSel( OutputList = "PIDpionsForJpsippi" + self.name,
+                                             InputList  = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles"),
+                                             Cuts       = "(TRCHI2DOF < %(TRCHI2DOF)s ) & ( (PIDK < %(PIDKforPion)s ) | (PROBNNpi > %(PROBNNpi)s ) )  & (PT > 250.*MeV) & (TRGHOSTPROB < 0.5)" % self.config )
+
+      # -------------------------------------------------------------- Kstar:     
+
+      self.DetachedKstarList = self.createCombinationSel( OutputList      = "DetachedKstarListForJpsiHH" + self.name,
+                                                          DaughterLists   = [ self.NoIPKaonList, self.NoIPPionList ],
+                                                          DecayDescriptor =  "[K*(892)0 -> K+ pi-]cc" ,
+                                                          PreVertexCuts   = "(ACHILD(PT,1)+ACHILD(PT,2) > 900.*MeV) & (AM < 2700 *MeV) & (ADOCACHI2CUT(20., ''))",
+#                                                          PreVertexCuts   = "(ACHILD(PT,1)+ACHILD(PT,2) > 900.*MeV) & (ADAMASS('K*(892)0') < 200 *MeV) & (ADOCACHI2CUT(20., ''))",
+                                                          PostVertexCuts  = "(VFASPF(VCHI2) < 16)",   
+                                                          ReFitPVs         = False ) # Note that this is false to save CPU time, for the future check with Liming if the kaon list is fine
+
+      # -------------------------------------------------------------- f0:     
+
+      self.Detachedf0pipiList = self.createCombinationsSel( OutputList       = "Detachedf02pipiForJpsiHH" + self.name,
+                                                        DaughterLists    = [ self.NoIPKaonList, self.NoIPPionList ],
+                                                        DecayDescriptors = ["f_0(980) -> pi+ pi-"],
+                                                        DaughterCuts     = { "pi+" : " (MIPCHI2DV(PRIMARY)>4) " },
+#                                                  DaughterCuts = { "pi+" : " (MIPCHI2DV(PRIMARY)>9) " % self.config,
+#                                                                   "K+"  : " (MIPCHI2DV(PRIMARY)>9) " % self.config },
+                                                        PreVertexCuts    = "(ACHILD(PT,1)+ACHILD(PT,2) > 900.*MeV) & (AM < 2700 *MeV) & (ADOCACHI2CUT(20., ''))",
+                                                        PostVertexCuts   = "(VFASPF(VCHI2) < 16) ",
+                                                        ReFitPVs         = False ) 
+
+      # -------------------------------------------------------------- f0:     
+
+      self.Detachedf0KKList = self.createCombinationsSel( OutputList       = "Detachedf02KKForJpsiHH" + self.name,
+                                                        DaughterLists    = [ self.NoIPKaonList, self.NoIPPionList ],
+                                                        DecayDescriptors = [ "f_0(980) -> K+ K-"],
+                                                        PreVertexCuts    = "(ACHILD(PT,1)+ACHILD(PT,2) > 900.*MeV) & (AM < 2700 *MeV) & (ADOCACHI2CUT(20., ''))",
+                                                        PostVertexCuts   = "(VFASPF(VCHI2) < 16) ",
+                                                        ReFitPVs         = False ) 
+
+      # -------------------------------------------------------------- f0:     
+
+      self.Detachedf0wspipiList = self.createCombinationsSel( OutputList       = "Detachedf02wspipiForJpsiHH" + self.name,
+                                                        DaughterLists    = [ self.NoIPKaonList, self.NoIPPionList ],
+                                                        DecayDescriptors = [ "f_0(980) -> pi- pi-", "f_0(980) -> pi+ pi+"],
+                                                        DaughterCuts     = { "pi+" : " (MIPCHI2DV(PRIMARY)>4) " },
+                                                        PreVertexCuts    = "(ACHILD(PT,1)+ACHILD(PT,2) > 900.*MeV) & (AM < 2700 *MeV) & (ADOCACHI2CUT(20., ''))",
+                                                        PostVertexCuts   = "(VFASPF(VCHI2) < 16) ",
+                                                        ReFitPVs         = False ) 
+
+      self.Unbiasedf0List = self.createCombinationsSel( OutputList       = "Unbiasedf02HHForJpsiHH" + self.name,
+                                                        DaughterLists    = [ self.NoIPKaonList, self.NoIPPionList ],
+                                                        DecayDescriptors = ["f_0(980) -> pi+ pi-", "f_0(980) -> K+ K-"],
+                                                        PreVertexCuts    = "(ACHILD(PT,1)+ACHILD(PT,2) > 900.*MeV) & (AM < 2700 *MeV) & (ADOCACHI2CUT(20., ''))",
+                                                        PostVertexCuts   = "(VFASPF(VCHI2) < 16)",
+                                                        ReFitPVs         = False ) 
+
+      # -------------------------------------------------------------- Lambda0:     
+
+      self.Lambda0List = self.createCombinationsSel( OutputList       = "Lambda02pHForJpsiHH" + self.name,
+                                                     DaughterLists    = [ self.NoIPKaonList, self.NoIPPionList, self.NoIPProtonList ],
+                                                     DecayDescriptors = ["[Lambda(1520)0 -> p+ K-]cc", "[Lambda(1520)0 -> p+ K+]cc", "[Lambda(1520)0 -> p+ pi-]cc", "[Lambda(1520)0 -> p+ pi+]cc"],
+#                                                     DaughterCuts     = { "p+" : " (MIPCHI2DV(PRIMARY)>4) ", "K-" : " (MIPCHI2DV(PRIMARY)>4) " },
+                                                     DaughterCuts     = { "p+" : " (MIPCHI2DV(PRIMARY)>4) ", "K-" : " (MIPCHI2DV(PRIMARY)>4) ", "pi-" : " (MIPCHI2DV(PRIMARY)>4) " },
+                                                     PreVertexCuts    = "(ACHILD(PT,1)+ACHILD(PT,2) > 900.*MeV) & (AM < 3100 *MeV) & (ADOCACHI2CUT(20., ''))",
+                                                     PostVertexCuts   = "(VFASPF(VCHI2) < 16)",
+                                                     ReFitPVs         = False )  
+
+      # -------------------------------------------------------------- Training variables:
+
+      self.Vars = {
+            'BCHI2'               :    "VFASPF(VCHI2)",
+            'BPT'                 :    "PT",
+            'SumPT'               :    "CHILD(PT,2,1)+CHILD(PT,2,2)",
+            'DIRA'                :    "BPVDIRA",
+            'BIPCHI2'             :    "BPVIPCHI2()"
+        }
+
+      self.makeBs2Jpsif0()
+      self.makeBs2JpsiKstar()  
+      self.makeLb2JpsipH()
+
+    ### Stripping lines:
+
+    # ------------------------- Bs->J/Psif0:
+
+    def makeBs2Jpsif0( self ):
+      Bs2Jpsif0 = self.createCombinationSel( OutputList      = "Bs2Jpsif0" + self.name,
+                                             DecayDescriptor = "B_s0 -> J/psi(1S) f_0(980)",
+                                             DaughterLists   = [ self.DetachedJpsiList, self.Detachedf0pipiList],
+                                             PreVertexCuts   = "in_range(5100,AM,5720)",
+                                             PostVertexCuts  = "in_range(5150,M,5670) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s ) & (BPVIPCHI2()<25.0) & (DTF_CTAU(0,True) > %(DTF_CTAU)s ) & (BPVDIRA >0.999) " % self.config ) # for the other particles is 10.
+#                                             PostVertexCuts  = "in_range(5150,M,5670) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s ) & (BPVIPCHI2()<25.0) & (BPVLTIME() > 0.2*ps) & (BPVDIRA >0.999) & (BPVVD > 1.5 *mm)" % self.config ) # for the other particles is 10.
+      
+      MvaBs2Jpsif0 = self.applyMVA( "MvaBs2Jpsif0" + self.name,
+                                    SelB            = Bs2Jpsif0,
+                                    MVAVars         = self.Vars,
+                                    MVACutValue     = "%(MVACut)s" % self.config, 
+                                    MVAxmlFile      = "%(XmlFile)s" % self.config )
+
+      Bs2Jpsif0Line  = StrippingLine( self.name + "Bs2Jpsif0Line", algos = [ MvaBs2Jpsif0 ], RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"])
+        
+      Bs2Jpsif0KK = self.createCombinationSel( OutputList      = "Bs2Jpsif0KK" + self.name,
+                                             DecayDescriptor = "B_s0 -> J/psi(1S) f_0(980)",
+                                             DaughterLists   = [ self.DetachedJpsiList, self.Detachedf0KKList],
+                                             PreVertexCuts   = "in_range(5100,AM,5720)",
+                                             PostVertexCuts  = "in_range(5150,M,5670) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s ) & (BPVIPCHI2()<25.0) & (DTF_CTAU(0,True) > %(DTF_CTAU)s ) & (BPVDIRA >0.999)" % self.config ) # for the other particles is 10.
+      
+      MvaBs2Jpsif0KK = self.applyMVA( "MvaBs2Jpsif0KK" + self.name,
+                                    SelB            = Bs2Jpsif0KK,
+                                    MVAVars         = self.Vars,
+                                    MVACutValue     = "%(MVACut)s" % self.config, 
+                                    MVAxmlFile      = "%(XmlFile)s" % self.config )
+
+      Bs2Jpsif0KaonLine  = StrippingLine( self.name + "Bs2Jpsif0KaonLine", algos = [ MvaBs2Jpsif0KK ], RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"])
+        
+      Bs2Jpsif0ws = self.createCombinationSel( OutputList      = "Bs2Jpsif0ws" + self.name,
+                                             DecayDescriptor = "B_s0 -> J/psi(1S) f_0(980)",
+                                             DaughterLists   = [ self.DetachedJpsiList, self.Detachedf0wspipiList],
+                                             PreVertexCuts   = "in_range(5100,AM,5720)",
+                                             PostVertexCuts  = "in_range(5150,M,5670) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s ) & (BPVIPCHI2()<25.0) & (DTF_CTAU(0,True) > %(DTF_CTAU)s ) & (BPVDIRA >0.999) " % self.config ) # for the other particles is 10.
+#                                             PostVertexCuts  = "in_range(5150,M,5670) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s ) & (BPVIPCHI2()<25.0) & (BPVLTIME() > 0.2*ps) & (BPVDIRA >0.999) & (BPVVD > 1.5 *mm)" % self.config ) # for the other particles is 10.
+      
+      MvaBs2Jpsif0ws = self.applyMVA( "MvaBs2Jpsif0ws" + self.name,
+                                    SelB            = Bs2Jpsif0ws,
+                                    MVAVars         = self.Vars,
+                                    MVACutValue     = "%(MVACut)s" % self.config, 
+                                    MVAxmlFile      = "%(XmlFile)s" % self.config )
+
+      Bs2Jpsif0wsLine  = StrippingLine( self.name + "Bs2Jpsif0wsLine", algos = [ MvaBs2Jpsif0ws ], RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"])
+        
+      Bs2Jpsif0Prescaled = self.createCombinationSel( OutputList      = "Bs2Jpsif0Prescale" + self.name,
+                                                      DecayDescriptor = "B_s0 -> J/psi(1S) f_0(980)",
+                                                      DaughterLists   = [ self.WideJpsiList, self.Unbiasedf0List ],
+                                                      PreVertexCuts   = "in_range(5170,AM,5470)",
+                                                      PostVertexCuts  = "(VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s)" % self.config ) # for the other particles is 10.
+
+      Bs2Jpsif0PrescaledLine  = StrippingLine( self.name + "Bs2Jpsif0PrescaledLine", algos = [ Bs2Jpsif0Prescaled ], EnableFlavourTagging = False, HLT2 = self.config['HLTCuts'], prescale = self.config["Bs2Jpsif0Prescale"] ,RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )#, MDSTFlag = True )
+
+      self.registerLine(Bs2Jpsif0Line)
+      self.registerLine(Bs2Jpsif0KaonLine)
+      self.registerLine(Bs2Jpsif0wsLine)
+      self.registerLine(Bs2Jpsif0PrescaledLine)
+
+    # -------------------------- Bs->J/PsiK*:
+
+    def makeBs2JpsiKstar( self ):
+        Bs2JpsiKstar = self.createCombinationSel( OutputList      = "Bs2JpsiKstar" + self.name,
+                                                  DecayDescriptor = "[B_s~0 -> J/psi(1S) K*(892)0]cc",
+                                                  DaughterLists   = [ self.DetachedJpsiList, self.DetachedKstarList ],
+                                                  PreVertexCuts   = "in_range(4900,AM,5600)",
+                                                  PostVertexCuts  = "in_range(5000,M,5500) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s) & (BPVIPCHI2()<25.0) & (DTF_CTAU(0,True) > %(DTF_CTAU)s ) & (BPVDIRA >0.999)" %self.config )
+
+        MvaBs2JpsiKstar = self.applyMVA( "MvaBs2JpsiKstar" + self.name,
+                                         SelB            = Bs2JpsiKstar,
+                                         MVAVars         = self.Vars,
+                                         MVACutValue     = "%(MVACut)s" % self.config, 
+                                         MVAxmlFile      = "%(XmlFile)s" % self.config )
+
+        Bs2JpsiKstarLine = StrippingLine( self.name + "Bs2JpsiKstarLine", algos = [ MvaBs2JpsiKstar ], EnableFlavourTagging = True, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )
+
+        self.registerLine(Bs2JpsiKstarLine)
+
+    # -------------------------- Lb->J/PsipH:
+
+    def makeLb2JpsipH( self ):
+        Lb2JpsipH = self.createCombinationSel( OutputList      = "Lb2JpsipK" + self.name,
+                                                   DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda(1520)0 ]cc",
+                                                   DaughterLists   = [ self.DetachedJpsiList, self.Lambda0List ],
+                                                   PreVertexCuts   = "in_range(5020,AM,6220)",
+                                                   PostVertexCuts  = "in_range(5120,M,6120) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s) & (BPVIPCHI2()<25.0) & (DTF_CTAU(0,True) > %(DTF_CTAU)s ) & (BPVDIRA >0.999)" %self.config )
+
+        MvaLb2JpsipH = self.applyMVA( "MvaLb2JpsiLambda" + self.name,
+                                          SelB            = Lb2JpsipH,
+                                          MVAVars         = self.Vars,
+                                          MVACutValue     = "%(MVACut)s" % self.config, 
+                                          MVAxmlFile      = "%(XmlFile)s" % self.config )
+
+        Lb2JpsipHLine = StrippingLine( self.name + "Lb2JpsipHLine", algos = [ MvaLb2JpsipH ], EnableFlavourTagging = True, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )
+
+        self.registerLine(Lb2JpsipHLine)
+
+    ### Common tools:
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+        
+    def createCombinationsSel( self, OutputList,
+                          DecayDescriptors,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = True ) :
+        '''For taking in multiple decay descriptors'''
+        combiner = CombineParticles( DecayDescriptors = DecayDescriptors,
+                                 DaughtersCuts = DaughterCuts,
+                                 MotherCut = PostVertexCuts,
+                                 CombinationCut = PreVertexCuts,
+                                 ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+    def applyMVA(self, name,
+             SelB,
+             MVAVars,
+             MVAxmlFile,
+             MVACutValue) :
+      from MVADictHelpers import addTMVAclassifierValue
+      from Configurables import FilterDesktop as MVAFilterDesktop
+
+      _FilterB = MVAFilterDesktop( name + "Filter",
+                                   Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue )
+
+      addTMVAclassifierValue( Component  = _FilterB,
+                              XMLFile    = MVAxmlFile,
+                              Variables  = MVAVars,
+                              ToolName   = name )
+
+      return Selection( name,
+                  Algorithm = _FilterB,
+                  RequiredSelections = [ SelB ] )
+
+    def filterTisTos( self, name, DiMuonInput, myTisTosSpecs ) :
+        from Configurables import TisTosParticleTagger
+    
+        myTagger = TisTosParticleTagger(name + "_TisTosTagger")
+        myTagger.TisTosSpecs = myTisTosSpecs
+        
+        # To speed it up, TisTos only with tracking system:
+        myTagger.ProjectTracksToCalo = False
+        myTagger.CaloClustForCharged = False
+        myTagger.CaloClustForNeutral = False
+        myTagger.TOSFrac = { 4:0.0, 5:0.0 }
+        
+        return Selection(name + "_SelTisTos",
+                     Algorithm = myTagger,
+                     RequiredSelections = [ DiMuonInput ] )
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiPi0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiPi0.py
new file mode 100644
index 000000000..deb5a5e3d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiPi0.py
@@ -0,0 +1,134 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Maximilien Chefdeville']
+__date__ = '11/04/2016'
+__version__ = '$Revision: 1.1$'
+
+__all__ = ('B2JpsiPi0Conf','default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from CommonParticles.Utils import updateDoD
+from StandardParticles import StdLooseResolvedPi0
+from StandardParticles import StdLooseMergedPi0
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+default_config = {
+    'NAME'              : 'BetaSPi0', # The real name of the lines is BetaS, this is a reference this for the Settings.
+    'WGs'               : ['B2CC'],
+    'BUILDERTYPE'       : 'B2JpsiPi0Conf',
+    'CONFIG'            : { 'BPVLTIME'                  :       0.2
+                          , 'VCHI2PDOF'                 :       10
+                          , 'JpsiMassWindow'            :       80
+                          },
+    'STREAMS'          : { 'Dimuon' : [ 'StrippingBetaSBd2JpsiPi0DetachedLine' ] }
+                 }
+
+### Lines stored in this file:
+# StrippingBetaSBd2JpsiPi0DetachedLine
+
+class B2JpsiPi0Conf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = "BetaS" # To avoid confusion with line names.
+        self.config = config
+
+        ### Selections:
+
+        self.SelJpsi = self.createSubSel( OutputList = self.name + 'NarrowJpsiForBetaSPi0',
+                                          InputList = DataOnDemand(Location = "Phys/StdMassConstrainedJpsi2MuMu/Particles"),
+                                          Cuts = "(PFUNA(ADAMASS('J/psi(1S)')) < 80 * MeV) & (BPVLTIME() > 0.2 *ps)")
+
+        self.SelPi0R = self.createSubSel( OutputList = self.name + "ResolvedPi0ForBetaS",
+                                          InputList = DataOnDemand(Location = "Phys/StdLooseResolvedPi0/Particles"),
+                                          Cuts = "(PT > 1000.*MeV) & (MINTREE('gamma'==ABSID, CL) > 0.05 )")
+                  
+        self.SelBd2JpsiPi0R = self.createCombinationSel( OutputList = self.name + "Bd2JpsiPi0R",
+                                                         DecayDescriptor = "B0 -> J/psi(1S) pi0",
+                                                         DaughterLists  = [ self.SelJpsi, self.SelPi0R ],
+                                                         PreVertexCuts = "in_range(4500,AM,6000)",
+                                                         PostVertexCuts = "in_range(4700,M,5900) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s) & (BPVDIRA>0.99755) & (BPVIP()<0.2) & (BPVIPCHI2()<20)" % self.config )
+
+        self.Bd2JpsiPi0Vars = {
+            "log(pow(pi0_PT*1e-3,5)-1)"            : "log(pow( CHILD(PT,2) *1e-3,5)-1)",
+            "log(J_psi_1S_PT*1e-3)"                : "log( CHILD(PT,1) *1e-3)",
+            "-log(J_psi_1S_IP_OWNPV)"              : "-log(CHILD(MIPDV(PRIMARY),1))",
+            "log(1/B0_IP_OWNPV-5)"                 : "log(1/(CHILD(MIPDV(PRIMARY),0)) - 5)",
+            "log(1/(1-fabs(B0_DIRA_OWNPV))-400)"   : "log(1/(1-abs( CHILD(BPVDIRA,0)  ))-400)"            
+            }
+
+        self.MvaBd2JpsiPi0R = self.applyMVA(self.name + "MvaBd2JpsiPi0",
+                                            SelB        = self.SelBd2JpsiPi0R,
+                                            MVAVars     = self.Bd2JpsiPi0Vars,
+                                            MVACutValue = "-0.4",
+                                            MVAxmlFile  = "$TMVAWEIGHTSROOT/data/B2JpsiPi0_Fisher_v1r2.xml"
+                                            )
+
+        self.Bd2JpsiPi0DetachedLine  = StrippingLine( self.name + "Bd2JpsiPi0DetachedLine",
+                                                      algos = [ self.MvaBd2JpsiPi0R ] )
+        
+        self.registerLine(self.Bd2JpsiPi0DetachedLine)
+
+    ### Generic tools:
+
+    def createSubSel( self, OutputList, InputList, Cuts ):
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                      Algorithm = filter,
+                      RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                          DecayDescriptor,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = True ):
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists )
+
+
+    def applyMVA( self, name,
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+        
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+        
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiPi0_Run1.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiPi0_Run1.py
new file mode 100644
index 000000000..5bfb3538a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiPi0_Run1.py
@@ -0,0 +1,135 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Maximilien Chefdeville']
+__date__ = '06/12/2015'
+__version__ = '$Revision: 1.2$'
+
+__all__ = ('B2JpsiPi0Conf_RI','default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from CommonParticles.Utils import updateDoD
+from StandardParticles import StdLooseResolvedPi0
+from StandardParticles import StdLooseMergedPi0
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+default_config = {
+    'NAME'              : 'BetaSPi0_RI', # The real name of the lines is BetaS, this is a reference this for the Settings.
+    'WGs'               : ['B2CC'],
+    'BUILDERTYPE'       : 'B2JpsiPi0Conf_RI',
+    'CONFIG'            : { 'BPVLTIME'                  :       0.2
+                          , 'VCHI2PDOF'                 :       10
+                          , 'JpsiMassWindow'            :       80
+                          },
+    'STREAMS'          : { 'Leptonic' : [ 'StrippingBetaSBd2JpsiPi0DetachedLine' ] }
+                 }
+
+### Lines stored in this file:
+# StrippingBetaSBd2JpsiPi0DetachedLine
+
+class B2JpsiPi0Conf_RI(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = "BetaS" # To avoid confusion with line names.
+        self.config = config
+
+        ### Selections:
+
+        self.SelJpsi = self.createSubSel( OutputList = self.name + 'NarrowJpsiForBetaSPi0',
+                                          InputList = DataOnDemand(Location = "Phys/StdMassConstrainedJpsi2MuMu/Particles"),
+                                          Cuts = "(PFUNA(ADAMASS('J/psi(1S)')) < 80 * MeV) & (BPVLTIME() > 0.2 *ps)")
+
+        self.SelPi0R = self.createSubSel( OutputList = self.name + "ResolvedPi0ForBetaS",
+                                          InputList = DataOnDemand(Location = "Phys/StdLooseResolvedPi0/Particles"),
+                                          Cuts = "(PT > 1000.*MeV) & (MINTREE('gamma'==ABSID, CL) > 0.05 )")
+                  
+        self.SelBd2JpsiPi0R = self.createCombinationSel( OutputList = self.name + "Bd2JpsiPi0R",
+                                                         DecayDescriptor = "B0 -> J/psi(1S) pi0",
+                                                         DaughterLists  = [ self.SelJpsi, self.SelPi0R ],
+                                                         PreVertexCuts = "in_range(4500,AM,6000)",
+                                                         PostVertexCuts = "in_range(4700,M,5900) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s) & (BPVDIRA>0.99755) & (BPVIP()<0.2) & (BPVIPCHI2()<20)" % self.config )
+
+        self.Bd2JpsiPi0Vars = {
+            "log(pow(pi0_PT*1e-3,5)-1)"            : "log(pow( CHILD(PT,2) *1e-3,5)-1)",
+            "log(J_psi_1S_PT*1e-3)"                : "log( CHILD(PT,1) *1e-3)",
+            "-log(J_psi_1S_IP_OWNPV)"              : "-log(CHILD(MIPDV(PRIMARY),1))",
+            "log(1/B0_IP_OWNPV-5)"                 : "log(1/(CHILD(MIPDV(PRIMARY),0)) - 5)",
+            "log(1/(1-fabs(B0_DIRA_OWNPV))-400)"   : "log(1/(1-abs( CHILD(BPVDIRA,0)  ))-400)"            
+            }
+
+        self.MvaBd2JpsiPi0R = self.applyMVA(self.name + "MvaBd2JpsiPi0",
+                                            SelB        = self.SelBd2JpsiPi0R,
+                                            MVAVars     = self.Bd2JpsiPi0Vars,
+                                            MVACutValue = "-0.4",
+                                            MVAxmlFile  = "$TMVAWEIGHTSROOT/data/B2JpsiPi0_Fisher_v1r2.xml"
+                                            )
+
+        self.Bd2JpsiPi0DetachedLine  = StrippingLine( self.name + "Bd2JpsiPi0DetachedLine",
+                                                      algos = [ self.MvaBd2JpsiPi0R ],
+                                                      MDSTFlag = True,
+                                                      EnableFlavourTagging = True )
+        
+        self.registerLine(self.Bd2JpsiPi0DetachedLine)
+
+    ### Generic tools:
+
+    def createSubSel( self, OutputList, InputList, Cuts ):
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                      Algorithm = filter,
+                      RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                          DecayDescriptor,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = True ):
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists )
+
+
+    def applyMVA( self, name,
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+        
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+        
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiX0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiX0.py
new file mode 100644
index 000000000..85753f500
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiX0.py
@@ -0,0 +1,409 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Set of lines for beta and beta_s
+B0 -> Jpsi pi0
+Bs -> Jpsi eta/etap with different final states
+B+ -> Jpsi K*[Kpi0] for calibration
+'''
+
+__author__ = ['Max Chefdeville']
+__date__ = '22/01/2018'
+
+__all__ = ('B2JpsiX0Conf','default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from CommonParticles.Utils import updateDoD
+from StandardParticles import StdLoosePions
+from StandardParticles import StdLooseKaons
+from StandardParticles import StdLooseProtons
+from StandardParticles import StdAllLooseKaons
+from StandardParticles import StdAllLooseProtons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+default_config = {
+    'NAME'              : 'B2JpsiX0',
+    'WGs'               : ['B2CC'],
+    'BUILDERTYPE'       : 'B2JpsiX0Conf',
+    'CONFIG'            : {
+    'JpsiMassWindow'         : 80,
+    'LTimeCut'               : 0.2,
+
+    'DIRACut'                : 0.9995,
+    'IPCut'                  : 0.2,
+    'IPCHI2Cut'              : 20,
+    'VCHI2PDOFCut'           : 10,
+
+    'PrescaleB02JpsiPi0R'    : 1,
+    'PrescaleB02JpsiPi0M'    : 1,
+
+    'PrescaleBu2JpsiKstR'    : 1,
+    'PrescaleBu2JpsiKstM'    : 1,
+
+    'PrescaleBu2JpsiK'       : 0.1,
+
+    'PrescaleBs2JpsiEtaR'            : 1,
+    'PrescaleBs2JpsiEta2PiPiGamma'   : 1,
+    'PrescaleBs2JpsiEta2PiPiPi0R'    : 1,
+    'PrescaleBs2JpsiEta2PiPiPi0M'    : 1,
+
+    'PrescaleBs2JpsiEtap2RhoGamma'   : 1,
+    'PrescaleBs2JpsiEtap2EtaPiPi'    : 1,
+    
+    'B02JpsiPi0RMVACut'      : "-0.56",
+    'B02JpsiPi0RXmlFile'     :  "$TMVAWEIGHTSROOT/data/B2JpsiX0/B02JpsiPi0R_fisher_run2_v1r1.xml",
+
+    'Bu2JpsiKstRMVACut'      : "-1.19",
+    'Bu2JpsiKstRXmlFile'     :  "$TMVAWEIGHTSROOT/data/B2JpsiX0/Bu2JpsiKstR_fisher_run2_v1r1.xml",
+
+    'Bs2JpsiEtaRMVACut'      : "-0.73",
+    'Bs2JpsiEtaRXmlFile'     :  "$TMVAWEIGHTSROOT/data/B2JpsiX0/Bs2JpsiEtaR_fisher_run2_v1r1.xml",
+    },
+    'STREAMS'           : ['Dimuon']
+    }
+
+ ### Lines stored in this file:
+
+class B2JpsiX0Conf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+        
+        self.WideJpsiList = DataOnDemand(Location = "Phys/StdMassConstrainedJpsi2MuMu/Particles")
+        self.DetachedJpsiList = self.createSubSel( OutputList = 'DetachedJpsi' + self.name,
+                                                   InputList  = self.WideJpsiList,
+                                                   Cuts       = "(PFUNA(ADAMASS('J/psi(1S)')) < %(JpsiMassWindow)s * MeV) & (BPVLTIME() > %(LTimeCut)s *ps)" %self.config)
+        
+        self.GammaList = DataOnDemand(Location = "Phys/StdLooseAllPhotons/Particles")
+        self.Pi0RList = DataOnDemand(Location = "Phys/StdLooseResolvedPi0/Particles")
+        self.Pi0MList = DataOnDemand(Location = "Phys/StdLooseMergedPi0/Particles")
+        self.EtaRList = DataOnDemand(Location = "Phys/StdLooseEta2gg/Particles")
+        self.PionList = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+        self.KaonList = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")
+
+        #-------------
+
+        B02JpsiPi0R = self.createCombinationSel( OutputList      = "B02JpsiPi0R" + self.name,
+                                                 DecayDescriptor = "B0 -> J/psi(1S) pi0",
+                                                 DaughterLists   = [ self.DetachedJpsiList, self.Pi0RList],
+                                                 DaughterCuts    = {"pi0" : "(CHILD(CL,1) > 0.05) & (CHILD(CL,2) > 0.05) & (PT>1500*MeV)"},
+                                                 PreVertexCuts   = "in_range(4500,AM,6500)",
+                                                 PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        self.B02JpsiPi0RVars = {"log(B0_pi0_PT)"                  : "log(CHILD(PT,2))",
+                                "log(B0_Jpsi_PT)"                 : "log(CHILD(PT,1))",
+                                "log(1-fabs(B0_Jpsi_DIRA_OWNPV))" : "log(1-abs(CHILD(BPVDIRA,1)))",
+                                "log(B0_Jpsi_IP_OWNPV)"           : "log(CHILD(BPVIP(),1))",
+                                "log(1-fabs(B0_DIRA_OWNPV))"      : "log(1-abs(BPVDIRA))",
+                                "log(B0_IP_OWNPV)"                : "log(BPVIP())",
+                                "log(B0_ENDVERTEX_CHI2)"          : "log(VFASPF(VCHI2))"}
+
+        self.MvaB02JpsiPi0R = self.applyMVA(self.name + "MvaB02JpsiPi0R",
+                                            SelB = B02JpsiPi0R,
+                                            MVAVars = self.B02JpsiPi0RVars,
+                                            MVACutValue = config['B02JpsiPi0RMVACut'],
+                                            MVAxmlFile  = config['B02JpsiPi0RXmlFile'])
+        
+        B02JpsiPi0RLine  = StrippingLine( self.name + "B02JpsiPi0RLine",
+                                          prescale  = config['PrescaleB02JpsiPi0R'],
+                                          algos = [ self.MvaB02JpsiPi0R ],
+                                          RequiredRawEvents = ["Calo"])
+        
+        self.registerLine(B02JpsiPi0RLine)
+
+        #-------------
+
+        B02JpsiPi0M = self.createCombinationSel( OutputList      = "B02JpsiPi0M" + self.name,
+                                                 DecayDescriptor = "B0 -> J/psi(1S) pi0",
+                                                 DaughterLists   = [ self.DetachedJpsiList, self.Pi0MList],
+                                                 PreVertexCuts   = "in_range(4500,AM,6500)",
+                                                 PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        B02JpsiPi0MLine  = StrippingLine( self.name + "B02JpsiPi0MLine",
+                                          prescale  = config['PrescaleB02JpsiPi0M'],
+                                          algos = [ B02JpsiPi0M ],
+                                          RequiredRawEvents = ["Calo"])                                          
+
+        self.registerLine(B02JpsiPi0MLine)
+
+        #-------------
+        
+        self.Kst2KPi0R = self.createCombinationSel( OutputList      = "Kst2KPi0R" + self.name,
+                                                    DecayDescriptor = "[K*(892)+ -> K+ pi0]cc",
+                                                    DaughterLists   = [ self.KaonList, self.Pi0RList],
+                                                    DaughterCuts    = {"pi0" : "(CHILD(CL,1)>0.05) & (CHILD(CL,2)>0.05) & (PT>800*MeV)" , "K+" : "(PROBNNk>0.1)" },
+                                                    PreVertexCuts   = "(ADAMASS('K*(892)+')< 150*MeV)",
+                                                    PostVertexCuts  = "ALL" )
+
+        Bu2JpsiKstR = self.createCombinationSel( OutputList      = "Bu2JpsiKstR" + self.name,
+                                                 DecayDescriptor = "[B+ -> J/psi(1S) K*(892)+]cc",
+                                                 DaughterLists   = [ self.DetachedJpsiList, self.Kst2KPi0R],
+                                                 PreVertexCuts   = "in_range(4500,AM,6500)",
+                                                 PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        self.Bu2JpsiKstRVars = {"log(Bplus_pi0_PT)"                  : "log(CHILD(CHILD(PT,2),2))",
+                                "log(Bplus_Kst_PT)"                  : "log(CHILD(PT,2))",
+                                "log(Bplus_Jpsi_PT)"                 : "log(CHILD(PT,1))",
+                                "log(1-fabs(Bplus_Jpsi_DIRA_OWNPV))" : "log(1-abs(CHILD(BPVDIRA,1)))",
+                                "log(Bplus_Jpsi_IP_OWNPV)"           : "log(CHILD(BPVIP(),1))",
+                                "log(Bplus_Jpsi_ENDVERTEX_CHI2)"     : "log(CHILD(VFASPF(VCHI2),1))",
+                                "log(1-fabs(Bplus_DIRA_OWNPV))"      : "log(1-abs(BPVDIRA))",
+                                "log(Bplus_IP_OWNPV)"                : "log(BPVIP())",
+                                "log(Bplus_ENDVERTEX_CHI2)"          : "log(VFASPF(VCHI2))"}
+
+        self.MvaBu2JpsiKstR = self.applyMVA(self.name + "MvaBu2JpsiKstR",
+                                            SelB = Bu2JpsiKstR,
+                                            MVAVars = self.Bu2JpsiKstRVars,
+                                            MVACutValue = config['Bu2JpsiKstRMVACut'],
+                                            MVAxmlFile  = config['Bu2JpsiKstRXmlFile'])
+        
+        Bu2JpsiKstRLine  = StrippingLine(self.name + "Bu2JpsiKstRLine",
+                                         prescale  = config['PrescaleBu2JpsiKstR'],
+                                         algos = [ self.MvaBu2JpsiKstR ],
+                                         RequiredRawEvents = ["Calo"])
+        
+        self.registerLine(Bu2JpsiKstRLine)
+
+        #-------------
+
+        self.Kst2KPi0M = self.createCombinationSel( OutputList      = "Kst2KPi0M" + self.name,
+                                                    DecayDescriptor = "[K*(892)+ -> K+ pi0]cc",
+                                                    DaughterLists   = [ self.KaonList, self.Pi0MList],
+                                                    DaughterCuts    = {"K+" : "(PROBNNk>0.1)" },
+                                                    PreVertexCuts   = "(ADAMASS('K*(892)+')< 150*MeV)",
+                                                    PostVertexCuts  = "ALL" )
+
+        Bu2JpsiKstM = self.createCombinationSel( OutputList      = "Bu2JpsiKstM" + self.name,
+                                                 DecayDescriptor = "[B+ -> J/psi(1S) K*(892)+]cc",
+                                                 DaughterLists   = [ self.DetachedJpsiList, self.Kst2KPi0M],
+                                                 PreVertexCuts   = "in_range(4500,AM,6500)",
+                                                 PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        Bu2JpsiKstMLine  = StrippingLine( self.name + "Bu2JpsiKstMLine",
+                                          prescale  = config['PrescaleBu2JpsiKstM'],
+                                          algos = [ Bu2JpsiKstM ],
+                                          RequiredRawEvents = ["Calo"])
+
+        self.registerLine(Bu2JpsiKstMLine)
+
+        #-------------
+
+        Bu2JpsiK = self.createCombinationSel( OutputList      = "Bu2JpsiK" + self.name,
+                                              DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                              DaughterLists   = [ self.DetachedJpsiList, self.KaonList],
+                                              PreVertexCuts   = "in_range(5100,AM,5500)",
+                                              PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        Bu2JpsiKLine  = StrippingLine( self.name + "Bu2JpsiKLine",
+                                       prescale  = config['PrescaleBu2JpsiK'],
+                                       algos = [ Bu2JpsiK ])
+
+        self.registerLine(Bu2JpsiKLine)
+
+        #-------------
+
+        Bs2JpsiEtaR = self.createCombinationSel( OutputList      = "Bs2JpsiEtaR" + self.name,
+                                                 DecayDescriptor = "B_s0 -> J/psi(1S) eta",
+                                                 DaughterLists   = [ self.DetachedJpsiList, self.EtaRList],
+                                                 DaughterCuts    = {"eta" : "(CHILD(CL,1) > 0.05) & (CHILD(CL,2) > 0.05) & (PT>1500*MeV) & in_range(475,M,625)"},
+                                                 PreVertexCuts   = "in_range(4500,AM,6500)",
+                                                 PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        self.Bs2JpsiEtaRVars = {"log(Bs_eta_PT)"                  : "log(CHILD(PT,2))",
+                                "log(Bs_Jpsi_PT)"                 : "log(CHILD(PT,1))",
+                                "log(1-fabs(Bs_Jpsi_DIRA_OWNPV))" : "log(1-abs(CHILD(BPVDIRA,1)))",
+                                "log(Bs_Jpsi_IP_OWNPV)"           : "log(CHILD(BPVIP(),1))",
+                                "log(1-fabs(Bs_DIRA_OWNPV))"      : "log(1-abs(BPVDIRA))",
+                                "log(Bs_IP_OWNPV)"                : "log(BPVIP())",
+                                "log(Bs_ENDVERTEX_CHI2)"          : "log(VFASPF(VCHI2))"}
+        
+        self.MvaBs2JpsiEtaR = self.applyMVA(self.name + "MvaBs2JpsiEtaR",
+                                            SelB = Bs2JpsiEtaR,
+                                            MVAVars = self.Bs2JpsiEtaRVars,
+                                            MVACutValue = config['Bs2JpsiEtaRMVACut'],
+                                            MVAxmlFile  = config['Bs2JpsiEtaRXmlFile'])
+        
+        Bs2JpsiEtaRLine  = StrippingLine( self.name + "Bs2JpsiEtaRLine",
+                                          prescale  = config['PrescaleBs2JpsiEtaR'],
+                                          algos = [ self.MvaBs2JpsiEtaR ],
+                                          RequiredRawEvents = ["Calo"])
+
+        self.registerLine(Bs2JpsiEtaRLine)
+
+        #-------------
+
+        self.Eta2PiPiPi0R = self.createCombinationSel( OutputList      = "Eta2PiPiPi0R" + self.name,
+                                                       DecayDescriptor = "eta -> pi+ pi- pi0",
+                                                       DaughterLists   = [ self.PionList, self.Pi0RList],
+                                                       DaughterCuts    = {"pi0" : "(CHILD(CL,1)>0.05) & (CHILD(CL,2)>0.05)" },
+                                                       PreVertexCuts   = "(ADAMASS('eta')<100*MeV) & (APT>1500*MeV)",
+                                                       PostVertexCuts  = "(BPVVDZ>0) & (VFASPF(VCHI2)<9) & (BPVDIRA>0.95) & (BPVVDCHI2>25)")
+
+        Bs2JpsiEta2PiPiPi0R = self.createCombinationSel( OutputList      = "Bs2JpsiEta2PiPiPi0R" + self.name,
+                                                         DecayDescriptor = "B_s0 -> J/psi(1S) eta",
+                                                         DaughterLists   = [ self.DetachedJpsiList, self.Eta2PiPiPi0R],
+                                                         PreVertexCuts   = "in_range(4500,AM,6500)",
+                                                         PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        Bs2JpsiEta2PiPiPi0RLine  = StrippingLine( self.name + "Bs2JpsiEta2PiPiPi0RLine",
+                                                  prescale  = config['PrescaleBs2JpsiEta2PiPiPi0R'],
+                                                  algos = [ Bs2JpsiEta2PiPiPi0R ],
+                                                  RequiredRawEvents = ["Calo"])
+
+        self.registerLine(Bs2JpsiEta2PiPiPi0RLine)
+
+        #-------------
+
+        self.Eta2PiPiPi0M = self.createCombinationSel( OutputList      = "Eta2PiPiPi0M" + self.name,
+                                                       DecayDescriptor = "eta -> pi+ pi- pi0",
+                                                       DaughterLists   = [ self.PionList, self.Pi0MList],
+                                                       PreVertexCuts   = "(ADAMASS('eta')<100*MeV) & (APT>1500*MeV)",
+                                                       PostVertexCuts  = "(BPVVDZ>0) & (VFASPF(VCHI2)<9) & (BPVDIRA>0.95) & (BPVVDCHI2>25)" )
+
+        Bs2JpsiEta2PiPiPi0M = self.createCombinationSel( OutputList      = "Bs2JpsiEta2PiPiPi0M" + self.name,
+                                                         DecayDescriptor = "B_s0 -> J/psi(1S) eta",
+                                                         DaughterLists   = [ self.DetachedJpsiList, self.Eta2PiPiPi0M],
+                                                         PreVertexCuts   = "in_range(4500,AM,6500)",
+                                                         PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        Bs2JpsiEta2PiPiPi0MLine  = StrippingLine( self.name + "Bs2JpsiEta2PiPiPi0MLine",
+                                                  prescale  = config['PrescaleBs2JpsiEta2PiPiPi0M'],
+                                                  algos = [ Bs2JpsiEta2PiPiPi0M ],
+                                                  RequiredRawEvents = ["Calo"])
+
+        self.registerLine(Bs2JpsiEta2PiPiPi0MLine)
+
+        #-------------
+
+        self.Eta2PiPiGamma = self.createCombinationSel( OutputList      = "Eta2PiPiGamma" + self.name,
+                                                        DecayDescriptor = "eta -> pi+ pi- gamma",
+                                                        DaughterLists   = [ self.PionList, self.GammaList],
+                                                        DaughterCuts    = {"gamma" : "(CL>0.05)" },
+                                                        PreVertexCuts   = "(AM<650*MeV) & (ADAMASS('eta')<150*MeV) & (APT>1500*MeV)",
+                                                        PostVertexCuts  = "(BPVVDZ>0) & (VFASPF(VCHI2)<9) & (BPVDIRA>0.95) & (BPVVDCHI2>25)" )
+
+        Bs2JpsiEta2PiPiGamma = self.createCombinationSel( OutputList      = "Bs2JpsiEta2PiPiGamma" + self.name,
+                                                          DecayDescriptor = "B_s0 -> J/psi(1S) eta",
+                                                          DaughterLists   = [ self.DetachedJpsiList, self.Eta2PiPiGamma],
+                                                          PreVertexCuts   = "in_range(4500,AM,6500)",
+                                                          PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        Bs2JpsiEta2PiPiGammaLine  = StrippingLine( self.name + "Bs2JpsiEta2PiPiGammaLine",
+                                                   prescale  = config['PrescaleBs2JpsiEta2PiPiGamma'],
+                                                   algos = [ Bs2JpsiEta2PiPiGamma ],
+                                                   RequiredRawEvents = ["Calo"])
+
+        self.registerLine(Bs2JpsiEta2PiPiGammaLine)
+
+        #-------------
+
+        self.Rho2PiPi = self.createCombinationSel( OutputList      = "Rho2PiPi" + self.name,
+                                                   DecayDescriptor = "rho(770)0 -> pi+ pi-",
+                                                   DaughterLists   = [ self.PionList ],
+                                                   PreVertexCuts   = "(AM>600*MeV) & (AM<900*MeV) & (ADOCACHI2CUT(15, ''))",
+                                                   PostVertexCuts  = "(BPVVDZ>0) & (VFASPF(VCHI2)<9) & (BPVDIRA>0.95) & (BPVVDCHI2>25)")
+
+        self.Etap2RhoGamma = self.createCombinationSel( OutputList      = "Etap2RhoGamma" + self.name,
+                                                        DecayDescriptor = "eta_prime -> rho(770)0 gamma",
+                                                        DaughterLists   = [ self.Rho2PiPi, self.GammaList],
+                                                        DaughterCuts    = {"gamma" : "(CL>0.05)" },
+                                                        PreVertexCuts   = "(ADAMASS('eta_prime')<100*MeV) & (APT>1500*MeV)",
+                                                        PostVertexCuts  = "ALL" )
+
+        Bs2JpsiEtap2RhoGamma = self.createCombinationSel( OutputList      = "Bs2JpsiEtap2RhoGamma" + self.name,
+                                                          DecayDescriptor = "B_s0 -> J/psi(1S) eta_prime",
+                                                          DaughterLists   = [ self.DetachedJpsiList, self.Etap2RhoGamma],
+                                                          PreVertexCuts   = "in_range(4500,AM,6500)",
+                                                          PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        Bs2JpsiEtap2RhoGammaLine  = StrippingLine( self.name + "Bs2JpsiEtap2RhoGammaLine",
+                                                   prescale  = config['PrescaleBs2JpsiEtap2RhoGamma'],
+                                                   algos = [ Bs2JpsiEtap2RhoGamma ],
+                                                   RequiredRawEvents = ["Calo"])
+
+        self.registerLine(Bs2JpsiEtap2RhoGammaLine)
+
+        #-------------
+
+        self.Etap2EtaPiPi = self.createCombinationSel( OutputList      = "Etap2EtaPiPi" + self.name,
+                                                       DecayDescriptor = "eta_prime -> pi+ pi- eta",
+                                                       DaughterLists   = [ self.PionList, self.EtaRList],
+                                                       DaughterCuts    = { "eta" : "(CHILD(CL,1)>0.05) & (CHILD(CL,2)>0.05) & (PT>1000*MeV)" },
+                                                       PreVertexCuts   = "(ADAMASS('eta_prime')<100*MeV) & (APT>1500*MeV)",
+                                                       PostVertexCuts  = "(BPVVDZ>0) & (VFASPF(VCHI2)<9) & (BPVDIRA>0.95) & (BPVVDCHI2>25)" )
+        
+        Bs2JpsiEtap2EtaPiPi = self.createCombinationSel( OutputList      = "Bs2JpsiEtap2EtaPiPi" + self.name,
+                                                         DecayDescriptor = "B_s0 -> J/psi(1S) eta_prime",
+                                                         DaughterLists   = [ self.DetachedJpsiList, self.Etap2EtaPiPi],
+                                                         PreVertexCuts   = "in_range(4500,AM,6500)",
+                                                         PostVertexCuts  = "(BPVDIRA > %(DIRACut)s) & (BPVIP() < %(IPCut)s) & (BPVIPCHI2() < %(IPCHI2Cut)s) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOFCut)s )" % self.config )
+
+        Bs2JpsiEtap2EtaPiPiLine  = StrippingLine( self.name + "Bs2JpsiEtap2EtaPiPiLine",
+                                                  prescale  = config['PrescaleBs2JpsiEtap2EtaPiPi'],
+                                                  algos = [ Bs2JpsiEtap2EtaPiPi ],
+                                                  RequiredRawEvents = ["Calo"])
+
+        self.registerLine(Bs2JpsiEtap2EtaPiPiLine)
+
+        #-------------
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+        
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+        
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiXforBeta_s.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiXforBeta_s.py
new file mode 100644
index 000000000..de84fa03c
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingB2JpsiXforBeta_s.py
@@ -0,0 +1,426 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingB2JpsiXforBeta_s.py,v 1.3 2010-09-05 21:31:13 wouter Exp $
+'''
+Module for construction of B->JpsiX roadmap lifetime unbiased 
+stripping Selections and .
+Provides functions to build Bs, Jpsi, Phi selections.
+Provides class Bs2JpsiPhiConf, which constructs the Selections and 
+StrippingLines given a configuration dictionary.
+Exported symbols (use python help!):
+   B2JpsiXLines
+'''
+
+__author__ = ['Greig Cowan', 'Juan Palacios', 'Francesca Dordei', 'Carlos Vazquez Sierra', 'Xuesong Liu']
+__date__ = '26/05/2017'
+__version__ = '$Revision: 4.0$'
+
+__all__ = ('B2JpsiXforBeta_sConf','default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from CommonParticles.Utils import updateDoD
+from StandardParticles import StdLoosePions
+from StandardParticles import StdLooseKaons
+from StandardParticles import StdAllLooseKaons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+default_config = {
+    'NAME'              : 'BetaS',
+    'WGs'               : ['B2CC'],
+    'BUILDERTYPE'       : 'B2JpsiXforBeta_sConf',
+    'CONFIG'    : {
+                         'TRCHI2DOF'                 :       5
+                 ,       'DTF_CTAU'                  :       0.2*0.299
+                 ,       'JpsiMassWindow'            :       80
+                 ,       'DaughterPT'                :       1000
+                 ,       'VCHI2PDOF'                 :       10
+                 ,       'HLTCuts'                   :       "HLT_PASS_RE('Hlt2DiMuonJPsiDecision')"
+                 ,       'PIDKCuts'                  :       0.
+                 ,       'PIDpiCuts'                 :       0.
+                 ,       'Jpsi2MuMuPrescale'         :       0.04   # 2017: 0.04 2016: 0.074  2015: 0.3 2011: 0.014, 2012: 0.075
+                 ,       'Bd2JpsiKstarPrescale'      :       1.0     # 2017: 1.0 2016: 1.0 2015: 1.0 2011: 0.065, 2012: 0.29
+                 ,       'Bd2JpsiKsPrescale'         :       1.0     # 2017: 1.0 2016: 1.0 2015: 1.0 2011: 1.0, 2012: 1.0
+                 ,       'Bs2JpsiPhiPrescale'        :       1.0     # 2017: 1.0 2016: 1.0 2015: 1.0 2011: 0.13, 2012: 0.62
+                 ,       'Bu2JpsiKPrescale'          :       1.0     # 2017: 1.0 2016: 1.0 2015: 1.0 2011: 0.04, 2012: 0.2
+                         },
+    'STREAMS' : {
+        'Leptonic' : [
+         'StrippingBetaSBu2JpsiKPrescaledLine',
+         'StrippingBetaSBs2JpsiPhiPrescaledLine',
+         'StrippingBetaSBd2JpsiKstarPrescaledLine',
+         'StrippingBetaSBd2JpsiKsPrescaledLine',
+         'StrippingBetaSBd2JpsiKsLDDetachedLine',
+         'StrippingBetaSBs2JpsiKstarWideLine',
+         'StrippingBetaSLambdab2JpsiLambdaUnbiasedLine'
+        ],
+        'Dimuon' : [
+         'StrippingBetaSBu2JpsiKDetachedLine',
+         'StrippingBetaSBd2JpsiKstarDetachedLine',
+         'StrippingBetaSBs2JpsiPhiDetachedLine',
+         'StrippingBetaSJpsi2MuMuLine',
+         'StrippingBetaSBd2JpsiKsDetachedLine'
+        ],
+	  'BhadronCompleteEvent' : [
+         'StrippingBetaSBs2DsPiDetachedLine'
+	  ]
+    }
+    }
+
+### Lines stored in this file:
+# StrippingBetaSJpsi2MuMuLine
+# StrippingBetaSBu2JpsiKDetachedLine
+# StrippingBetaSBu2JpsiKPrescaledLine
+# StrippingBetaSBs2JpsiPhiPrescaledLine
+# StrippingBetaSBs2JpsiPhiDetachedLine
+# StrippingBetaSBd2JpsiKstarPrescaledLine
+# StrippingBetaSBd2JpsiKstarDetachedLine
+# StrippingBetaSBd2JpsiKsPrescaledLine
+# StrippingBetaSBd2JpsiKsDetachedLine
+# StrippingBetaSBd2JpsiKsLDDetachedLine
+# StrippingBetaSBs2JpsiKstarWideLine
+# StrippingBetaSLambdab2JpsiLambdaUnbiasedLine
+
+class B2JpsiXforBeta_sConf(LineBuilder) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+        #### Input selections:
+
+        # ------------------------------------------------------------ J/Psi:
+        
+        self.WideJpsiList = DataOnDemand(Location = "Phys/StdMassConstrainedJpsi2MuMu/Particles")
+
+        self.JpsiList = self.createSubSel( OutputList = 'NarrowJpsiForBetaS' + self.name,
+                                           InputList = self.WideJpsiList,
+                                           Cuts = "(PFUNA(ADAMASS('J/psi(1S)')) < %(JpsiMassWindow)s * MeV)" % self.config)
+
+        # ------------------------------------------------------------ Kaons:
+       
+        self.KaonList = self.createSubSel( OutputList = "KaonsForBetaS" + self.name,
+                                           InputList = DataOnDemand(Location = "Phys/StdLooseKaons/Particles"),
+                                           Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s ) & (PIDK > %(PIDKCuts)s )" % self.config )  
+
+        self.NoIPKaonList = self.createSubSel( OutputList = "NoIPKaonsForBetaS" + self.name,
+                                               InputList = DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles"),
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s ) & (PIDK > %(PIDKCuts)s )" % self.config )
+
+        # -------------------------------------------------------------- Phi:
+
+        self.PhiList = self.createSubSel( OutputList = "Phi2KKForBetaS" + self.name,
+                                          InputList = DataOnDemand(Location = "Phys/StdLoosePhi2KK/Particles"),
+                                          Cuts = "(in_range(980,M,1060))" \
+                                          "& (PT > 500.*MeV) " \
+                                          "& (VFASPF(VCHI2) < 25)" \
+                                          "& (MAXTREE('K+'==ABSID, TRCHI2DOF) < %(TRCHI2DOF)s )" \
+                                          "& (MINTREE('K+'==ABSID, PIDK) > %(PIDKCuts)s )" % self.config)
+
+        # ------------------------------------------------------------ Kstar:
+        
+        self.KstarList = self.createSubSel( OutputList = "Kstar2KpiForBetaS" + self.name,
+                                            InputList = DataOnDemand(Location = "Phys/StdLooseKstar2Kpi/Particles"),
+                                            Cuts = "(in_range(826,M,966))" \
+                                            "& (PT > 1300.*MeV) " \
+                                            "& (VFASPF(VCHI2) < 25)" \
+                                            "& (MAXTREE('K+'==ABSID,  TRCHI2DOF) < %(TRCHI2DOF)s )" \
+                                            "& (MAXTREE('pi-'==ABSID, TRCHI2DOF) < %(TRCHI2DOF)s )" \
+                                            "& (MINTREE('K+'==ABSID, PIDK) > %(PIDKCuts)s )" \
+                                            "& (MAXTREE('pi-'==ABSID, PIDK) < %(PIDpiCuts)s )" % self.config)
+
+        self.DetachedKstarWideList = self.createCombinationsSel( OutputList = "DetachedKstarWideListForBetaS" + self.name,
+                                                                 DaughterLists = [ StdLooseKaons, StdLoosePions ],
+                                                                 DecayDescriptors = [ "[K*(892)0 -> K+ pi-]cc", "[K*_0(1430)0 -> K+ pi-]cc"  ],
+                                                                 DaughterCuts = { "pi-" : " (PT > 500 *MeV) & (PIDK < %(PIDpiCuts)s ) & (TRGHOSTPROB < 0.8)" % self.config,
+                                                                                  "K+"  : " (PT > 500 *MeV) & (PIDK > %(PIDKCuts)s ) & (TRGHOSTPROB < 0.8)" % self.config},
+                                                                 PreVertexCuts = "(in_range(750,AM,1900))  & (ADOCACHI2CUT(30, ''))",
+                                                                 PostVertexCuts = "(VFASPF(VCHI2) < 25)",
+                                                                 ReFitPVs = False )
+
+        # --------------------------------------------------------------- KS:
+        
+        self.KsListLoose = MergedSelection("StdLooseKsMergedForBetaS" + self.name,
+                                           RequiredSelections = [DataOnDemand(Location = "Phys/StdLooseKsDD/Particles"),
+                                                                 DataOnDemand(Location = "Phys/StdLooseKsLL/Particles")] )
+
+        self.KsList = self.createSubSel(OutputList = "KsForBetaS" + self.name,
+                                        InputList = self.KsListLoose,
+                                        Cuts = "(VFASPF(VCHI2)<20) & (BPVDLS>5)")
+
+        self.KsLDList = self.createSubSel( OutputList =  "KsLDForBetaS" + self.name,
+                                           InputList = DataOnDemand(Location = "Phys/StdLooseKsLD/Particles"),
+                                           Cuts = "(VFASPF(VCHI2)<20) & (BPVDLS>5)")
+
+        # ----------------------------------------------------------- Lambda:
+
+        self.LambdaListLoose = MergedSelection("StdLooseLambdaMergedForBetaS" + self.name,
+                                               RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles"),
+                                                                      DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")])
+        self.LambdaList =  self.createSubSel(OutputList = "LambdaForBetaS" + self.name,
+                                             InputList = self.LambdaListLoose ,
+                                             Cuts = "(MAXTREE('p+'==ABSID, PT) > 500.*MeV) & (MAXTREE('pi-'==ABSID, PT) > 100.*MeV) & (ADMASS('Lambda0') < 15.*MeV) & (VFASPF(VCHI2) < 20)")
+
+        # ----------------------------------------------------Ds: Kaon/Pions:
+
+        self.DsKaonList = self.createSubSel( OutputList = "DsKaonsForBetaS" + self.name,
+                                               InputList = DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles"),
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s ) & (PT > 100.*MeV) & (P > 1000.*MeV) & (MIPCHI2DV(PRIMARY) > 4.0) " % self.config )
+
+        self.DsPionList = self.createSubSel( OutputList = "DsPionsForBetaS" + self.name,
+                                               InputList = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles"),
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s ) & (PT > 100.*MeV) & (P > 1000.*MeV) & (MIPCHI2DV(PRIMARY) > 4.0) " % self.config )
+
+        # --------------------------------------------------------------- Ds:
+
+        self.DsList = self.createCombinationsSel( OutputList = "D2HHHForBetaS" + self.name,
+                                          DaughterLists = [ self.DsKaonList, self.DsPionList ],
+                                          DecayDescriptors = ["[D_s- -> K- pi- K+]cc"],
+                                          DaughterCuts = { "pi-" : " (PT > 500 *MeV) & (PIDK < %(PIDpiCuts)s ) & (TRGHOSTPROB < 0.8)" % self.config,
+                                                           "K+"  : " (PT > 500 *MeV) & (PIDK > %(PIDKCuts)s ) & (TRGHOSTPROB < 0.8)" % self.config},
+                                          PreVertexCuts = " (in_range(1900.*MeV,AWM('K+','pi+','K-'),2050*MeV)) & (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))|((ABSID=='KS0') & (PT > 500*MeV) & (P > 5000*MeV) & (BPVVDCHI2 > 1000)))) & (ADOCA(1,3)<0.5*mm) & (ADOCA(2,3)<0.5*mm)",
+                                          PostVertexCuts = "(VFASPF(VCHI2/VDOF)<10) & (BPVVDCHI2>36) & (BPVDIRA>0) & (VFASPF(VCHI2) < 25)",
+                                          ReFitPVs = False )# 
+
+        # -------------------------------------------------------------------
+
+        self.makeInclJpsi()
+        self.makeBd2JpsiKsLD()
+        self.makeBu2JpsiK()
+        self.makeBs2JpsiPhi()
+        self.makeBs2JpsiKstarWide()
+        self.makeBd2JpsiKstar()
+        self.makeBd2JpsiKs()
+        self.makeLambdab2JpsiLambda()
+        self.makeBs2DsPi()
+
+    ### Stripping lines:
+
+    # ---------------------- Inclusive J/Psi:
+
+    def makeInclJpsi( self ):
+        '''Inclusive J/psi. We keep it for as long as we can.'''
+        Jpsi2MuMuForBetasLine = StrippingLine( self.name + "Jpsi2MuMuLine", algos = [ self.WideJpsiList ], HLT2 = self.config['HLTCuts'], prescale = self.config["Jpsi2MuMuPrescale"], RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )
+        self.registerLine(Jpsi2MuMuForBetasLine)
+
+    # --------------------------- Bu->J/PsiK:
+
+    def makeBu2JpsiK( self ):
+        Bu2JpsiK = self.createCombinationSel( OutputList = "Bu2JpsiK" + self.name,
+                                 DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                 DaughterLists = [ self.WideJpsiList, self.NoIPKaonList ],
+                                 DaughterCuts  = {"K+": "(PT > 500.*MeV)" },
+                                 PreVertexCuts = "in_range(5050,AM,5550)",
+                                 PostVertexCuts = "in_range(5150,M,5450) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s)" % self.config )
+
+        Bu2JpsiKPrescaledLine = StrippingLine( self.name + "Bu2JpsiKPrescaledLine", algos = [ Bu2JpsiK ] , HLT2 = self.config['HLTCuts'], prescale = self.config["Bu2JpsiKPrescale"], EnableFlavourTagging = True, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )#, MDSTFlag = True )
+
+        Bu2JpsiKDetached = self.createSubSel( InputList = Bu2JpsiK, OutputList = Bu2JpsiK.name() + "Detached" + self.name,
+                                              Cuts = "(CHILD('Beauty -> ^J/psi(1S) X', PFUNA(ADAMASS('J/psi(1S)'))) < %(JpsiMassWindow)s * MeV) & "\
+                                              "(DTF_CTAU(0,True) > %(DTF_CTAU)s ) & "\
+                                              "(MINTREE('K+'==ABSID, PT) > 500.*MeV)" % self.config )
+
+        Bu2JpsiKDetachedLine  = StrippingLine( self.name + "Bu2JpsiKDetachedLine", algos = [ Bu2JpsiKDetached ], EnableFlavourTagging = False ,RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )
+    
+        self.registerLine(Bu2JpsiKDetachedLine)
+        self.registerLine(Bu2JpsiKPrescaledLine)
+
+    # ------------------------- Bs->J/PsiPhi:
+
+    def makeBs2JpsiPhi( self ):
+        Bs2JpsiPhi = self.createCombinationSel( OutputList = "Bs2JpsiPhi" + self.name,
+                                   DecayDescriptor = "B_s0 -> J/psi(1S) phi(1020)",
+                                   DaughterLists  = [ self.WideJpsiList, self.PhiList ],
+                                   PreVertexCuts = "in_range(5050,AM,5650)",
+                                   PostVertexCuts = "in_range(5150,M,5550) & (VFASPF(VCHI2PDOF) < 20)" % self.config ) # for the other particles is 10.
+  
+        Bs2JpsiPhiPrescaledLine = StrippingLine( self.name + "Bs2JpsiPhiPrescaledLine", algos = [ Bs2JpsiPhi ] , HLT2 = self.config['HLTCuts'], prescale = self.config['Bs2JpsiPhiPrescale'], EnableFlavourTagging = True, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )#, MDSTFlag = True )
+
+        Bs2JpsiPhiDetached = self.createSubSel( InputList = Bs2JpsiPhi,
+                                                OutputList = Bs2JpsiPhi.name() + "Detached" + self.name,
+                                                Cuts = "(CHILD('Beauty -> ^J/psi(1S) X', PFUNA(ADAMASS('J/psi(1S)'))) < %(JpsiMassWindow)s * MeV) & "\
+                                                "(DTF_CTAU(0,True) > %(DTF_CTAU)s )" % self.config )
+
+        Bs2JpsiPhiDetachedLine  = StrippingLine( self.name + "Bs2JpsiPhiDetachedLine", algos = [ Bs2JpsiPhiDetached ], EnableFlavourTagging = False, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )
+        
+        self.registerLine(Bs2JpsiPhiPrescaledLine)
+        self.registerLine(Bs2JpsiPhiDetachedLine)
+
+    # -------------------------- Bd->J/PsiK*:
+
+    def makeBd2JpsiKstar( self ):
+        Bd2JpsiKstar = self.createCombinationSel( OutputList = "Bd2JpsiKstar" + self.name,
+                                     DecayDescriptor = "[B0 -> J/psi(1S) K*(892)0]cc",
+                                     DaughterLists  = [ self.WideJpsiList, self.KstarList ],
+                                     PreVertexCuts = "in_range(5050,AM,5550)",
+                                     PostVertexCuts = "in_range(5150,M,5450) & (VFASPF(VCHI2PDOF) < 20)" % self.config) # for the other particles is 10.
+
+        Bd2JpsiKstarPrescaledLine = StrippingLine( self.name + "Bd2JpsiKstarPrescaledLine", algos = [ Bd2JpsiKstar ] , HLT2 = self.config['HLTCuts'], prescale = self.config['Bd2JpsiKstarPrescale'], EnableFlavourTagging = True, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )#, MDSTFlag = True )
+
+
+        Bd2JpsiKstarDetached = self.createSubSel( InputList = Bd2JpsiKstar,
+                                                  OutputList = Bd2JpsiKstar.name() + "Detached" + self.name,
+                                                  Cuts = "(CHILD('Beauty -> ^J/psi(1S) X', PFUNA(ADAMASS('J/psi(1S)'))) < %(JpsiMassWindow)s * MeV) & "\
+                                                  "(DTF_CTAU(0,True) > %(DTF_CTAU)s )" % self.config )
+
+        Bd2JpsiKstarDetachedLine  = StrippingLine( self.name + "Bd2JpsiKstarDetachedLine",
+                                          algos = [ Bd2JpsiKstarDetached ], EnableFlavourTagging = False, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )
+
+        self.registerLine(Bd2JpsiKstarPrescaledLine)
+        self.registerLine(Bd2JpsiKstarDetachedLine)
+
+    # -------------------------- Bd->J/PsiKS:
+
+    def makeBd2JpsiKs( self ):
+        Bd2JpsiKs = self.createCombinationSel( OutputList = "Bd2JpsiKS" + self.name,
+                                  DecayDescriptor = "B0 -> J/psi(1S) KS0",
+                                  DaughterLists  = [ self.WideJpsiList, self.KsList ],
+                                  PreVertexCuts = "in_range(5000,AM,5650)",
+                                  PostVertexCuts = "in_range(5150,M,5550) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s)" % self.config
+                                  )
+
+        Bd2JpsiKsPrescaledLine = StrippingLine( self.name + "Bd2JpsiKsPrescaledLine", algos = [ Bd2JpsiKs ] , HLT2 = self.config['HLTCuts'], prescale = self.config['Bd2JpsiKsPrescale'], EnableFlavourTagging = True, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )#, MDSTFlag = True )
+
+        Bd2JpsiKsDetached = self.createSubSel( InputList = Bd2JpsiKs,
+                                               OutputList = Bd2JpsiKs.name() + "Detached" + self.name,
+                                               Cuts = "(CHILD('Beauty -> ^J/psi(1S) X', PFUNA(ADAMASS('J/psi(1S)'))) < %(JpsiMassWindow)s * MeV) & "\
+                                               "(DTF_CTAU(0,True) > %(DTF_CTAU)s )" % self.config)
+
+        Bd2JpsiKsDetachedLine = StrippingLine( self.name + "Bd2JpsiKsDetachedLine",
+                                        algos = [ Bd2JpsiKsDetached ], EnableFlavourTagging = False, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )#, MDSTFlag = True )
+
+        self.registerLine(Bd2JpsiKsPrescaledLine)
+        self.registerLine(Bd2JpsiKsDetachedLine)
+
+    def makeBd2JpsiKsLD( self ):
+        Bd2JpsiKsLD = self.createCombinationSel( OutputList = "Bd2JpsiKSLD" + self.name,
+                                  DecayDescriptor = "B0 -> J/psi(1S) KS0",
+                                  DaughterLists  = [ self.JpsiList, self.KsLDList ],
+                                  PreVertexCuts = "in_range(5000,AM,5650)",
+                                  PostVertexCuts = "in_range(5150,M,5550) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s)" % self.config
+                                  )
+        
+
+        Bd2JpsiKsLDDetached = self.createSubSel( InputList = Bd2JpsiKsLD,
+                                    OutputList = Bd2JpsiKsLD.name() + "Detached" + self.name,
+                                                 Cuts = "(DTF_CTAU(0,True) > %(DTF_CTAU)s )" % self.config)
+
+        Bd2JpsiKsLDDetachedLine = StrippingLine( self.name + "Bd2JpsiKsLDDetachedLine",
+                                                 algos = [ Bd2JpsiKsLDDetached ], EnableFlavourTagging = True, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )#, MDSTFlag = True )
+
+        self.registerLine(Bd2JpsiKsLDDetachedLine)
+
+    # -------------------------- Bs->J/PsiK*:
+   
+    def makeBs2JpsiKstarWide( self ):
+        Bs2JpsiKstarWide      = self.createCombinationSel( OutputList = "Bs2JpsiKstarWide" + self.name,
+                                DecayDescriptor = "[B_s~0 -> J/psi(1S) K*(892)0]cc",
+                                DaughterLists  = [ self.JpsiList, self.DetachedKstarWideList ],
+                                PreVertexCuts = "in_range(5100,AM,5700)",
+                                PostVertexCuts = "(VFASPF(VCHI2PDOF) < 10) & (BPVDIRA >0.999) & (BPVVD > 1.5 *mm)" )
+
+        Bs2JpsiKstarWideLine = StrippingLine( self.name + "Bs2JpsiKstarWideLine", algos = [ Bs2JpsiKstarWide ], EnableFlavourTagging = True, RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )#, MDSTFlag = True )
+
+        self.registerLine(Bs2JpsiKstarWideLine)
+
+    # -------------------------- Lb->J/PsiLb:
+        
+    def makeLambdab2JpsiLambda( self ):
+        Lambdab2JpsiLambda = self.createCombinationSel( OutputList = "Lambdab2JpsiLambda" + self.name,
+                                    DecayDescriptor = "[Lambda_b0 -> Lambda0 J/psi(1S) ]cc",
+                                    DaughterLists  = [ self.JpsiList, self.LambdaList ],
+                                    PreVertexCuts = "in_range(5020,AM,6220)",
+                                    PostVertexCuts = "in_range(5120,M,6120) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s)" % self.config
+                                    )
+
+        Lambdab2JpsiLambdaUnbiasedLine = StrippingLine( self.name + "Lambdab2JpsiLambdaUnbiasedLine", algos = [ Lambdab2JpsiLambda ], RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )
+    
+        self.registerLine(Lambdab2JpsiLambdaUnbiasedLine)
+
+    # ------------------------- Bs->DsPi:
+
+    def makeBs2DsPi( self ):
+        Bs2DsPi = self.createCombinationSel( OutputList = "Bs2DsPi" + self.name,
+                                   DecayDescriptor = "[B_s0 -> D_s- pi+]cc",
+                                   DaughterLists  = [ self.DsList, self.DsPionList ],
+                                   PreVertexCuts = "in_range(5000,AM,6000) &  (ASUM(SUMTREE(PT,(ISBASIC | (ID=='gamma')),0.0))>5000*MeV)",
+                                   PostVertexCuts = "(VFASPF(VCHI2/VDOF)<10) & (INTREE(HASTRACK & (TRCHI2DOF<4.) & (MIPCHI2DV(PRIMARY)>16) & (MIPDV(PRIMARY)>0.1*mm))) & (NINTREE((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))|((ABSID=='KS0') & (PT > 500*MeV) & (P > 5000*MeV) & (BPVVDCHI2 > 1000))) > 1) & (DTF_CTAU(0,True) > %(DTF_CTAU)s ) & (BPVIPCHI2()<25) & (BPVDIRA>0.999)" % self.config )
+
+        Bs2DsPiDetachedLine = StrippingLine( self.name + "Bs2DsPiDetachedLine", algos = [ Bs2DsPi ], EnableFlavourTagging = False , RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker","HC"] )
+
+        self.registerLine(Bs2DsPiDetachedLine)
+
+    # --------------------------------------
+
+    ### Common tools:
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                      Algorithm = filter,
+                      RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                          DecayDescriptor,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+        
+    def createCombinationsSel( self, OutputList,
+                          DecayDescriptors,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = True ) :
+        '''For taking in multiple decay descriptors'''
+        combiner = CombineParticles( DecayDescriptors = DecayDescriptors,
+                                 DaughtersCuts = DaughterCuts,
+                                 MotherCut = PostVertexCuts,
+                                 CombinationCut = PreVertexCuts,
+                                 ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                       Algorithm = combiner,
+                       RequiredSelections = DaughterLists)
+
+    def filterTisTos( self, name, DiMuonInput, myTisTosSpecs ) :
+        from Configurables import TisTosParticleTagger
+    
+        myTagger = TisTosParticleTagger(name + "_TisTosTagger")
+        myTagger.TisTosSpecs = myTisTosSpecs
+        
+        # To speed it up, TisTos only with tracking system:
+        myTagger.ProjectTracksToCalo = False
+        myTagger.CaloClustForCharged = False
+        myTagger.CaloClustForNeutral = False
+        myTagger.TOSFrac = { 4:0.0, 5:0.0 }
+        
+        return Selection(name + "_SelTisTos",
+                     Algorithm = myTagger,
+                     RequiredSelections = [ DiMuonInput ] )
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKS.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKS.py
new file mode 100644
index 000000000..098c3d92a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKS.py
@@ -0,0 +1,206 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Ramon Niet'
+__date__ = '2014/10/23'
+
+'''
+Bd->JpsieeKS stripping selection
+
+Exports the following stripping lines
+- Bd2JpsieeKSBd2JpsieeKSFromTracksPrescaledLine
+- Bd2JpsieeKSBd2JpsieeKSFromTracksDetachedLine
+- Bd2JpsieeKSBd2JpsieeKSDetachedLine
+- Bd2JpsieeKSBu2JpsieeKFromTracksDetachedLine
+'''
+
+__all__ = (
+    'Bd2JpsieeKSConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              : 'Bd2JpsieeKS',
+    'BUILDERTYPE'       : 'Bd2JpsieeKSConf',
+    'CONFIG'    : {
+          'BPVLTIME'              :     0.2   # ps
+        , 'ElectronPT'            :   500.    # MeV
+        , 'ElectronPID'           :     0.    # adimensional
+        , 'ElectronTrackCHI2pDOF' :     5.    # adimensional
+        , 'KaonPID'               :     0.    # adimensional
+        , 'TRCHI2DOF'             :     3.    # adimensional
+        , 'JpsiVertexCHI2pDOF'    :    15.    # adimensional
+        , 'JpsiMassMin'           :  2300.    # MeV
+        , 'JpsiMassMax'           :  3300.    # MeV
+        , 'KplusPT'               :   800.    # MeV
+        , 'KplusIP'               :     9.    # adimensional
+        , 'KSVCHI2'               :    20.    # adimensional
+        , 'KSBPVDLS'              :     5.    # adimensional
+        , 'BdVertexCHI2pDOF'      :     7.    # adimensional
+        , 'BdMassMin'             :  4400.    # MeV
+        , 'BdMassMax'             :  6000.    # MeV
+        , 'Prescale'              :     0.1   # adamenssional
+        },
+    'STREAMS' : { 'Dimuon'   : ['StrippingBd2JpsieeKSBu2JpsieeKFromTracksDetachedLine'],
+                  'Leptonic' : ['StrippingBd2JpsieeKSBd2JpsieeKSFromTracksPrescaledLine',
+                                'StrippingBd2JpsieeKSBd2JpsieeKSFromTracksDetachedLine',
+                                'StrippingBd2JpsieeKSBd2JpsieeKSDetachedLine'] },
+    'WGs'    : [ 'B2CC' ]
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from CommonParticles.Utils import updateDoD
+from StandardParticles import StdLoosePions
+from StandardParticles import StdLooseKaons
+from StandardParticles import StdAllLooseKaons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+
+class Bd2JpsieeKSConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+
+        # if name not set outside, set it to empty
+        if name == None:
+            name = ""
+
+        self.name   = name
+        self.config = config
+
+        DiElectrons           = DataOnDemand( Location = "Phys/StdLooseDiElectron/Particles" )
+        DiElectronsFromTracks = DataOnDemand( Location = "Phys/StdDiElectronFromTracks/Particles" )
+
+        self.KaonList = self.createSubSel( OutputList = "KaonsForBetaS" + self.name,
+                                           InputList = DataOnDemand(Location = "Phys/StdLooseKaons/Particles"),
+                                           Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s ) & (PIDK > %(KaonPID)s )" \
+                                                  "& (INTREE((ABSID=='K+') & (MIPCHI2DV(PRIMARY) > %(KplusIP)s ))) " % self.config )
+
+        self.KsListLoose = MergedSelection( "StdLooseKsMergedForBetaS" + self.name,
+                                            RequiredSelections = [DataOnDemand(Location = "Phys/StdLooseKsDD/Particles"),
+                                                                  DataOnDemand(Location = "Phys/StdLooseKsLL/Particles")] )
+        self.KSList = self.createSubSel( OutputList = "KsForBetaS" + self.name,
+                                InputList = self.KsListLoose,
+                                Cuts = "(VFASPF(VCHI2) < %(KSVCHI2)s) & (BPVDLS > %(KSBPVDLS)s)" % self.config )
+
+        self._jpsi = FilterDesktop( Code = "   (MM > %(JpsiMassMin)s *MeV)" \
+                                           " & (MM < %(JpsiMassMax)s *MeV)" \
+                                           " & (MINTREE('e+'==ABSID,PIDe-PIDpi) > %(ElectronPID)s )" \
+                                           " & (MINTREE('e+'==ABSID,PT) > %(ElectronPT)s *MeV)" \
+                                           " & (MAXTREE('e+'==ABSID,TRCHI2DOF) < %(ElectronTrackCHI2pDOF)s)" \
+                                           " & (VFASPF(VCHI2/VDOF) < %(JpsiVertexCHI2pDOF)s)" % self.config )
+
+        self.Jpsi = Selection( "SelJpsi2eeFor" + self.name,
+                               Algorithm = self._jpsi,
+                               RequiredSelections = [DiElectrons] )
+
+
+        self.JpsiFromTracks = Selection( "SelJpsi2eeFromTracksFor" + self.name,
+                                         Algorithm = self._jpsi,
+                                         RequiredSelections = [DiElectronsFromTracks] )
+
+        self.makeBd2JpsieeKS()
+        self.makeBu2JpsieeK()
+
+        # Tests CPU time required for construction of StdLooseDiElectron
+        # self.DielectronTestLine      = self._DielectronTestLine( DiElectrons, "DielectronTest", config )
+        # self.registerLine( self.DielectronTestLine )
+
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                      Algorithm = filter,
+                      RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                          DecayDescriptor,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+
+    def makeBd2JpsieeKS( self ) :
+        Bd2JpsieeKS = self.createCombinationSel( OutputList = self.name + "Bd2JpsiKS",
+                                                 DecayDescriptor = "B0 -> J/psi(1S) KS0",
+                                                 DaughterLists  = [ self.Jpsi, self.KSList ],
+                                                 PreVertexCuts = "in_range(%(BdMassMin)s,AM,%(BdMassMax)s)" % self.config,
+                                                 PostVertexCuts = "(VFASPF(VCHI2/VDOF) < %(BdVertexCHI2pDOF)s)" % self.config )
+
+        Bd2JpsieeKSFromTracks = self.createCombinationSel( OutputList = self.name + "Bd2JpsiKSFromTracks",
+                                                           DecayDescriptor = "B0 -> J/psi(1S) KS0",
+                                                           DaughterLists  = [ self.JpsiFromTracks, self.KSList ],
+                                                           PreVertexCuts = "in_range(%(BdMassMin)s,AM,%(BdMassMax)s)" % self.config,
+                                                           PostVertexCuts = "(VFASPF(VCHI2/VDOF) < %(BdVertexCHI2pDOF)s)" % self.config )
+
+        Bd2JpsieeKSFromTracksPrescaledLine = StrippingLine( self.name + "Bd2JpsieeKSFromTracksPrescaledLine",
+                                                            prescale = self.config['Prescale'],
+                                                            algos = [ Bd2JpsieeKSFromTracks ],
+                                                            EnableFlavourTagging = True )#, MDSTFlag = True )
+
+        Bd2JpsieeKSFromTracksDetached = self.createSubSel( InputList = Bd2JpsieeKSFromTracks,
+                                                           OutputList = Bd2JpsieeKSFromTracks.name() + "Detached",
+                                                           Cuts = "(BPVLTIME() > %(BPVLTIME)s*ps)" % self.config )
+
+        Bd2JpsieeKSFromTracksDetachedLine = StrippingLine( self.name + "Bd2JpsieeKSFromTracksDetachedLine",
+                                                           algos = [ Bd2JpsieeKSFromTracksDetached ],
+                                                           EnableFlavourTagging = True )#, MDSTFlag = True )
+
+        Bd2JpsieeKSDetached = self.createSubSel( InputList = Bd2JpsieeKS,
+                                                 OutputList = Bd2JpsieeKS.name() + "Detached",
+                                                 Cuts = "(BPVLTIME() > %(BPVLTIME)s*ps)" % self.config )
+
+        Bd2JpsieeKSDetachedLine = StrippingLine( self.name + "Bd2JpsieeKSDetachedLine",
+                                                 algos = [ Bd2JpsieeKSDetached ],
+                                                 EnableFlavourTagging = True )#, MDSTFlag = True )
+
+        self.registerLine(Bd2JpsieeKSFromTracksPrescaledLine)
+        self.registerLine(Bd2JpsieeKSFromTracksDetachedLine)
+        self.registerLine(Bd2JpsieeKSDetachedLine)
+
+
+    def makeBu2JpsieeK( self ):
+        Bu2JpsieeKFromTracks = self.createCombinationSel( OutputList = "Bu2JpsieeKFromTracks" + self.name,
+                                                          DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                                          DaughterLists = [ self.JpsiFromTracks, self.KaonList ],
+                                                          DaughterCuts  = {"K+": "(PT > %(KplusPT)s *MeV)" % self.config },
+                                                          PreVertexCuts   = "in_range(%(BdMassMin)s,AM,%(BdMassMax)s)" % self.config,
+                                                          PostVertexCuts = "(VFASPF(VCHI2PDOF) < %(BdVertexCHI2pDOF)s)" % self.config )
+
+
+        Bu2JpsieeKFromTracksDetached = self.createSubSel( InputList = Bu2JpsieeKFromTracks,
+                                                          OutputList = Bu2JpsieeKFromTracks.name() + "Detached" + self.name,
+                                                          Cuts = "(BPVLTIME() > %(BPVLTIME)s*ps) & "\
+                                                                 "(MINTREE('K+'==ABSID, PT) > %(KplusPT)s *MeV)" % self.config )
+
+        Bu2JpsieeKFromTracksDetachedLine  = StrippingLine( self.name + "Bu2JpsieeKFromTracksDetachedLine",
+                                                          algos = [ Bu2JpsieeKFromTracksDetached ],
+                                                          prescale = 0.18 )
+                                                          #, EnableFlavourTagging = True )#, MDSTFlag = True )
+
+        self.registerLine(Bu2JpsieeKFromTracksDetachedLine)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKSFullDST.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKSFullDST.py
new file mode 100644
index 000000000..01e1c21f4
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKSFullDST.py
@@ -0,0 +1,156 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Gerwin Meier'
+__date__ = '2019/08/12'
+
+'''
+Based on the work of the stripping line StrippingBd2JpsieeKSBd2JpsieeKS from Ramon Niet
+Bd->JpsieeKS stripping selection
+
+Exports the following stripping line
+- Bd2JpsieeKSFullDSTBd2JpsieeKSFullDSTDetachedLine
+'''
+
+__all__ = (
+    'Bd2JpsieeKSFullDSTConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              : 'Bd2JpsieeKSFullDST',
+    'BUILDERTYPE'       : 'Bd2JpsieeKSFullDSTConf',
+    'CONFIG'    : {
+          'BPVLTIME'              :     0.2   # ps
+        , 'B0_BPV_DIRA'           :   0.995   # adimensional
+        , 'B0_BPV_IP'             :      1.   # mm
+        , 'B0_DOCA_chi2'          :     13.   # adimensional
+        , 'B0_DOCA'               :      3.   # adimensional
+        , 'BM_DTF_Jpsi_Const_max' :   5900.   # MeV
+        , 'BM_DTF_Jpsi_Const_min' :   4600.   # MeV
+        , 'ElectronPT'            :   500.    # MeV
+        , 'ElectronPID'           :     0.    # adimensional
+        , 'ElectronTrackCHI2pDOF' :     5.    # adimensional
+        , 'EProbNNe'              :     0.01  # adimensional
+        , 'TRCHI2DOF'             :     3.    # adimensional
+        , 'JpsiVertexCHI2pDOF'    :    13.    # adimensional
+        , 'JpsiMassMin'           :  2300.    # MeV
+        , 'JpsiMassMax'           :  3300.    # MeV
+        , 'KSVCHI2'               :    20.    # adimensional
+        , 'KSBPVDLS'              :     5.    # adimensional
+        , 'KSTau'                 :     1.    # ps
+        , 'KSMassMin'             :   460.    # MeV
+        , 'KSMassMax'             :   535.    # MeV
+        , 'BdVertexCHI2pDOF'      :     6.    # adimensional
+        , 'BdMassMin'             :  4400.    # MeV
+        , 'BdMassMax'             :  6000.    # MeV
+        },
+    'STREAMS' : { 'Dimuon'   : ['StrippingBd2JpsieeKSFullDSTBd2JpsieeKSFullDSTDetachedLine'] },
+    'WGs'    : [ 'B2CC' ]
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from CommonParticles.Utils import updateDoD
+from StandardParticles import StdLoosePions
+from StandardParticles import StdLooseKaons
+from StandardParticles import StdAllLooseKaons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+
+class Bd2JpsieeKSFullDSTConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+
+        # if name not set outside, set it to empty
+        if name == None:
+            name = ""
+
+        self.name   = name
+        self.config = config
+
+        DiElectrons           = DataOnDemand( Location = "Phys/StdLooseDiElectron/Particles" )
+
+        self.KsListLoose = MergedSelection( "StdLooseKsMergedForBetaS" + self.name,
+                                            RequiredSelections = [DataOnDemand(Location = "Phys/StdLooseKsDD/Particles"),
+                                                                  DataOnDemand(Location = "Phys/StdLooseKsLL/Particles")] )
+        self.KSList = self.createSubSel( OutputList = "KsForBetaS" + self.name,
+                                InputList = self.KsListLoose,
+                                Cuts = "(VFASPF(VCHI2) < %(KSVCHI2)s) & (in_range(%(KSMassMin)s,MM,%(KSMassMax)s)) & (BPVDLS > %(KSBPVDLS)s)" % self.config )
+
+
+
+        self._jpsi = FilterDesktop( Code = "   (MM > %(JpsiMassMin)s *MeV)" \
+                                           " & (MM < %(JpsiMassMax)s *MeV)" \
+                                           " & (MINTREE('e+'==ABSID,PIDe-PIDpi) > %(ElectronPID)s )" \
+                                           " & (MINTREE('e+'==ABSID,PT) > %(ElectronPT)s *MeV)" \
+                                           " & (MINTREE('e+'==ABSID,PROBNNe) > %(EProbNNe)s)" \
+                                           " & (MAXTREE('e+'==ABSID,TRCHI2DOF) < %(ElectronTrackCHI2pDOF)s)" \
+                                           " & (VFASPF(VCHI2/VDOF) < %(JpsiVertexCHI2pDOF)s)" % self.config )
+
+        self.Jpsi = Selection( "SelJpsi2eeFor" + self.name,
+                               Algorithm = self._jpsi,
+                               RequiredSelections = [DiElectrons] )
+
+
+        self.makeBd2JpsieeKSFullDST()
+
+        # Tests CPU time required for construction of StdLooseDiElectron
+        # self.DielectronTestLine      = self._DielectronTestLine( DiElectrons, "DielectronTest", config )
+        # self.registerLine( self.DielectronTestLine )
+
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                      Algorithm = filter,
+                      RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                          DecayDescriptor,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+
+    def makeBd2JpsieeKSFullDST( self ) :
+        Bd2JpsieeKSFullDST = self.createCombinationSel( OutputList = self.name + "Bd2JpsiKSFullDST",
+                                                 DecayDescriptor = "B0 -> J/psi(1S) KS0",
+                                                 DaughterLists  = [ self.Jpsi, self.KSList ],
+                                                 PreVertexCuts = "in_range(%(BdMassMin)s,AM,%(BdMassMax)s) & (ADOCA(1,2) < %(B0_DOCA)s) & (ACHI2DOCA(1,2) < %(B0_DOCA_chi2)s)" % self.config,
+                                                 PostVertexCuts = "(BPVDIRA> %(B0_BPV_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(BdVertexCHI2pDOF)s) &  ( BPVIP() < %(B0_BPV_IP)s *mm ) & (DTF_CTAU('KS0'==ABSID, False) > %(KSTau)s *ps/c_light) & (DTF_CUT(4600*MeV < M < 5900*MeV, False , 'J/psi(1S)' ))" % self.config )
+
+        Bd2JpsieeKSFullDSTDetached = self.createSubSel( InputList = Bd2JpsieeKSFullDST,
+                                                 OutputList = Bd2JpsieeKSFullDST.name() + "Detached",
+                                                 Cuts = "(BPVLTIME() > %(BPVLTIME)s*ps)" % self.config )
+
+        Bd2JpsieeKSFullDSTDetachedLine = StrippingLine( self.name + "Bd2JpsieeKSFullDSTDetachedLine",
+                                                 algos = [ Bd2JpsieeKSFullDSTDetached ],
+                                                 EnableFlavourTagging = True )#, MDSTFlag = True )
+
+        self.registerLine(Bd2JpsieeKSFullDSTDetachedLine)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKstar.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKstar.py
new file mode 100644
index 000000000..c8376b95a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBd2JpsieeKstar.py
@@ -0,0 +1,215 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Artur Ukleja, Jibo He, Konrad Klimaszewski, Varvara Batozskaya'
+__date__ = '2019/01/22'
+
+'''
+Bd->JpsieeKstar stripping selection
+
+Exports the following stripping lines
+- BetaSBd2JpsieeKstarLine           - Line _without_ Bd lifetime cut, prescaled by 0.1
+- BetaSBd2JpsieeKstarDetachedLine   - Line _with_ Bd lifetime cut based on StdLooseDielectron
+'''
+
+__all__ = (
+    'Bd2JpsieeKstarConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              : 'BetaSBd2JpsieeKstar',
+    'BUILDERTYPE'       : 'Bd2JpsieeKstarConf',
+    'CONFIG'    : {
+        # BetaSBd2JpsieeKstarDetachedLine (Very tight cuts)
+          'ElectronPTLoose'            :   500.    # MeV
+        , 'ElectronPIDLoose'           :     1.    # adimensional
+        , 'ElectronTrackCHI2pDOFLoose' :     3.    # adimensional
+        , 'JpsiVertexCHI2pDOFLoose'    :    11.    # adimensional
+        , 'JpsiPTLoose'                :   400.    # MeV
+        , 'JpsiMassMinLoose'           :  2200.    # MeV
+        , 'JpsiMassMaxLoose'           :  3500.    # MeV
+        , 'KaonTrackCHI2pDOFLoose'     :     3.    # adimensional
+        , 'KaonPIDLoose'               :     0.    # adimensional
+        , 'PionTrackCHI2pDOFLoose'     :     3.    # adimensional
+        , 'PionPIDLoose'               :     5.    # adimensional
+        , 'KstPTLoose'                 :  1000.    # MeV
+        , 'KstVertexCHI2pDOFLoose'     :    10.    # adimensional
+        , 'KstMassWindowLoose'         :   100.    # MeV
+        , 'BdVertexCHI2pDOFLoose'      :    10.    # adimensional
+        , 'BdMassMinLoose'             :  4300.    # MeV
+        , 'BdMassMaxLoose'             :  6000.    # MeV
+        , 'LifetimeCut'                : " & (BPVLTIME()>0.3*ps)"
+        , 'PrescaleLoose'              :     1.    # adamenssional
+        # BetaSBd2JpsieeKstarLine
+        , 'ElectronPT'            :   500.    # MeV
+        , 'ElectronPID'           :     0.    # adimensional
+        , 'ElectronTrackCHI2pDOF' :     5.    # adimensional
+        , 'JpsiVertexCHI2pDOF'    :    15.    # adimensional
+        , 'JpsiMassMin'           :  1900.    # MeV
+        , 'JpsiMassMax'           :  3600.    # MeV
+        , 'JpsiPT'                :   400.    # MeV
+        , 'KaonTrackCHI2pDOF'     :     5.    # adimensional
+        , 'KaonPID'               :    -3.    # adimensional
+        , 'PionTrackCHI2pDOF'     :     5.    # adimensional
+        , 'PionPID'               :    10.    # adimensional
+        , 'KstPT'                 :  1000.    # MeV
+        , 'KstVertexCHI2pDOF'     :    15.    # adimensional
+        , 'KstMassWindow'         :   150.    # MeV
+        , 'BdVertexCHI2pDOF'      :    10.    # adimensional
+        , 'BdMassMin'             :  4000.    # MeV
+        , 'BdMassMax'             :  6000.    # MeV
+        , 'BdDIRA'                :     0.99  # adimensional
+        , 'Prescale'              :     0.1   # adamenssional
+        },
+    'STREAMS' : [ 'Leptonic' ],
+    'WGs'    : [ 'B2CC' ]
+    }
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class Bd2JpsieeKstarConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+
+        # if name not set outside, set it to empty 
+        if name == None:
+            name = ""        
+        self.name = name
+        DiElectrons           = DataOnDemand(Location = "Phys/StdLooseDiElectron/Particles")
+        self.Bd2JpsieeKstarLine      = self._Bd2JpsieeKstarLine( DiElectrons, name, config )
+        self.Bd2JpsieeKstarDetachedLine = self._Bd2JpsieeKstarDetachedLine( DiElectrons, name+"Detached", config )
+
+        # Tests CPU time required for construction of StdLooseDiElectron
+        # self.DielectronTestLine      = self._DielectronTestLine( DiElectrons, "DielectronTest", config )
+        # self.registerLine( self.DielectronTestLine )
+
+        self.registerLine( self.Bd2JpsieeKstarDetachedLine )
+        self.registerLine( self.Bd2JpsieeKstarLine )
+
+
+    def _Bd2JpsieeKstarLine( self, dielectron, name, config ) :
+
+        _jpsi = FilterDesktop("FilterJpsi2eeFor"+name,
+                              Code = "   (MM > %(JpsiMassMin)s *MeV)" \
+                                     " & (MM < %(JpsiMassMax)s *MeV)" \
+                                     " & (PT > %(JpsiPT)s *MeV)" \
+                                     " & (MINTREE('e+'==ABSID,PIDe-PIDpi) > %(ElectronPID)s )" \
+                                     " & (MINTREE('e+'==ABSID,PT) > %(ElectronPT)s *MeV)" \
+                                     " & (MAXTREE('e+'==ABSID,TRCHI2DOF) < %(ElectronTrackCHI2pDOF)s)" \
+                                     " & (VFASPF(VCHI2/VDOF) < %(JpsiVertexCHI2pDOF)s)" % config
+                             )
+        Jpsi = Selection("SelJpsi2eeFor"+name,
+                         Algorithm = _jpsi,
+                         RequiredSelections = [dielectron])
+
+        _stdKst = DataOnDemand(Location="Phys/StdLooseKstar2Kpi/Particles")
+        _kst = FilterDesktop("FilterKst2KpiFor"+name,
+                             Code = \
+                                    "   (PFUNA(ADAMASS('K*(892)0')) < %(KstMassWindow)s * MeV)" \
+                                    " & (PT > %(KstPT)s *MeV)" \
+                                    " & (MINTREE('K+'==ABSID,PIDK-PIDpi) > %(KaonPID)s )" \
+                                    " & (MAXTREE('K+'==ABSID,TRCHI2DOF) < %(KaonTrackCHI2pDOF)s)" \
+                                    " & (MINTREE('pi+'==ABSID,PIDK-PIDpi) < %(PionPID)s )" \
+                                    " & (MAXTREE('pi+'==ABSID,TRCHI2DOF) < %(PionTrackCHI2pDOF)s)" \
+                                    " & (VFASPF(VCHI2/VDOF) < %(KstVertexCHI2pDOF)s)" % config
+                            )
+        Kst = Selection("SelKst2KpiFor"+name,
+                        Algorithm = _kst,
+                        RequiredSelections = [_stdKst])
+
+        CC = "(AM > %(BdMassMin)s *MeV) & (AM < %(BdMassMax)s *MeV)" % config
+        MC = "(VFASPF(VCHI2/VDOF) < %(BdVertexCHI2pDOF)s) & (BPVDIRA > %(BdDIRA)s)" % config
+        _Bd = CombineParticles("CombineBdFor"+name,
+                               DecayDescriptor = "B0 -> J/psi(1S) K*(892)0",
+                               CombinationCut = CC ,
+                               MotherCut = MC,
+                               ReFitPVs = False
+                               )
+        # Select Kstar first (we throw away less at the first state but
+        # StdLooseKstar2Kpi is a bit quicker than StdLooseDiElectron and co)
+        Bd = Selection(name,
+                       Algorithm = _Bd,
+                       #RequiredSelections = [Jpsi, Kst])
+                       RequiredSelections = [Kst, Jpsi])
+
+        return StrippingLine(name+"Line"
+              , prescale = config['Prescale']
+              , postscale = 1
+              , selection = Bd
+              , EnableFlavourTagging = True )#, MDSTFlag = True )
+
+
+    def _Bd2JpsieeKstarDetachedLine( self, dielectron, name, config ) :
+        
+        _jpsi = FilterDesktop("FilterJpsi2eeFor"+name,
+                              Code = "   (MM > %(JpsiMassMinLoose)s *MeV)" \
+                                     " & (MM < %(JpsiMassMaxLoose)s *MeV)" \
+                                     " & (PT > %(JpsiPTLoose)s *MeV)" \
+                                     " & (MINTREE('e+'==ABSID,PIDe-PIDpi) > %(ElectronPIDLoose)s )" \
+                                     " & (MINTREE('e+'==ABSID,PT) > %(ElectronPTLoose)s *MeV)" \
+                                     " & (MAXTREE('e+'==ABSID,TRCHI2DOF) < %(ElectronTrackCHI2pDOFLoose)s)" \
+                                     " & (VFASPF(VCHI2/VDOF) < %(JpsiVertexCHI2pDOFLoose)s)" % config
+                             )
+        Jpsi = Selection("SelJpsi2eeFor"+name,
+                         Algorithm = _jpsi,
+                         RequiredSelections = [dielectron])
+    
+        _stdKst = DataOnDemand(Location="Phys/StdLooseKstar2Kpi/Particles")
+        _kst = FilterDesktop("FilterKst2KpiFor"+name,
+                             Code = \
+                                    "   (PFUNA(ADAMASS('K*(892)0')) < %(KstMassWindowLoose)s * MeV)" \
+                                    " & (PT > %(KstPTLoose)s *MeV)" \
+                                    " & (MINTREE('K+'==ABSID,PIDK-PIDpi) > %(KaonPIDLoose)s )" \
+                                    " & (MAXTREE('K+'==ABSID,TRCHI2DOF) < %(KaonTrackCHI2pDOFLoose)s)" \
+                                    " & (MINTREE('pi+'==ABSID,PIDK-PIDpi) < %(PionPIDLoose)s )" \
+                                    " & (MAXTREE('pi+'==ABSID,TRCHI2DOF) < %(PionTrackCHI2pDOFLoose)s)" \
+                                    " & (VFASPF(VCHI2/VDOF) < %(KstVertexCHI2pDOFLoose)s)" % config
+                            )
+        Kst = Selection("SelKst2KpiFor"+name,
+                        Algorithm = _kst,
+                        RequiredSelections = [_stdKst])
+
+        CC = "(AM > %(BdMassMinLoose)s *MeV) & (AM < %(BdMassMaxLoose)s *MeV)" % config
+        MC = "(VFASPF(VCHI2/VDOF) < %(BdVertexCHI2pDOFLoose)s)" % config
+        _Bd = CombineParticles("CombineBdFor"+name,
+                               DecayDescriptor = "B0 -> J/psi(1S) K*(892)0",
+                               CombinationCut = CC , 
+                               MotherCut = MC + config['LifetimeCut'],
+                               ReFitPVs = True
+                               )
+        # Select Kstar first (we throw away less at the first state but
+        # StdLooseKstar2Kpi is a bit quicker than StdLooseDiElectron and co)
+        Bd = Selection(name,
+                       Algorithm = _Bd,
+                       #RequiredSelections = [Jpsi, Kst])
+                       RequiredSelections = [Kst, Jpsi])
+
+
+        return StrippingLine(name+"Line"
+              , prescale = config['PrescaleLoose']
+              , postscale = 1
+              , selection = Bd
+              , EnableFlavourTagging = True )#, MDSTFlag = True )
+
+    def _DielectronTestLine( self, dielectron, name, config ) :
+        return StrippingLine(name+"Line"
+              , prescale = 1
+              , postscale = 1
+              , selection = dielectron
+              )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBs2EtacPhiBDT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBs2EtacPhiBDT.py
new file mode 100644
index 000000000..5d74c12c9
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBs2EtacPhiBDT.py
@@ -0,0 +1,307 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Bs->eta_c phi
+'''
+
+__author__=['Morgan Martin, Jibo He']
+__date__ = '20/08/2014'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'Bs2EtacPhiBDTConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              :  'Bs2EtacPhiBDT',
+    'BUILDERTYPE'       :  'Bs2EtacPhiBDTConf',
+    'CONFIG'    : {
+        'HLTCuts'       : "(HLT_PASS_RE('Hlt2Topo.*Decision') | HLT_PASS_RE('Hlt2(Phi)?IncPhi.*Decision'))",
+        'KaonCuts'      : "(PROBNNk > 0.13) & (PT > 300*MeV) & (TRGHOSTPROB<0.4)",
+        'PionCuts'      : "(PROBNNpi > 0.2) & (PT > 250*MeV) & (TRGHOSTPROB<0.4)",
+        'EtacComAMCuts' : "(AM<3.25*GeV)",
+        'EtacComN4Cuts' : """
+                          (in_range(2.75*GeV, AM, 3.25*GeV))
+                          & ( (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3)+ACHILD(PT,4) ) > 2.5 *GeV)
+                          & ( (ACHILD(MIPCHI2DV(), 1) + ACHILD(MIPCHI2DV(), 2) + ACHILD(MIPCHI2DV(), 3) + ACHILD(MIPCHI2DV(), 4))>30)
+                          """,
+        'EtacMomN4Cuts' : "(VFASPF(VCHI2/VDOF) < 9.) & (in_range(2.8*GeV, MM, 3.2*GeV)) & (MIPCHI2DV(PRIMARY) > 2.)" ,
+        'EtacComCuts'   : "(in_range(2.75*GeV, AM, 3.25*GeV))",
+        'PhiCuts'       : """
+                          (MAXTREE(ABSID=='K+',TRGHOSTPROB) < 0.4)
+                          & (MM<1.05*GeV)
+                          & (PT> 800*MeV)
+                          & (MIPCHI2DV(PRIMARY) > 2.)
+                          & (VFASPF(VCHI2) < 9.)
+                          """ ,
+        'KsCuts'        : "(ADMASS('KS0') < 30.*MeV) & (BPVDLS>5)",
+        'BsComCuts'     : "(ADAMASS('B_s0') < 500 *MeV)",
+        'BsMomCuts'     : "(VFASPF(VCHI2/VDOF) < 25.) & (BPVDIRA> 0.99) & (BPVIPCHI2()<25) & (BPVDLS>0)",
+
+        'Bs2EtacPhiMVACut'   :  "-0.1",
+        'Bs2EtacPhiXmlFile'  :  "$TMVAWEIGHTSROOT/data/Bs2EtacPhi_BDT_v1r0.xml", 
+        
+        'Prescale'      : 1.
+        },
+    'STREAMS'           : ['Bhadron' ],
+    'WGs'               : ['B2CC'],
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+class Bs2EtacPhiBDTConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        self.SelKaons = self.createSubSel( OutputList = self.name + "SelKaons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLooseKaons/Particles' ), 
+                                           Cuts = config['KaonCuts']
+                                           )
+
+        self.SelPions = self.createSubSel( OutputList = self.name + "SelPions",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLoosePions/Particles' ), 
+                                           Cuts = config['PionCuts']
+                                           )
+
+        """
+        Etac-> K K Pi Pi
+        """
+        self.SelEtac2KKPiPi = self.createN4BodySel( OutputList = self.name + "SelEtac2KKPiPi",
+                                                    DaughterLists = [ self.SelKaons, self.SelPions ],
+                                                    DecayDescriptor = "eta_c(1S) -> K+ K- pi+ pi-",
+                                                    ComAMCuts      = config['EtacComAMCuts'],
+                                                    PreVertexCuts  = config['EtacComN4Cuts'], 
+                                                    PostVertexCuts = config['EtacMomN4Cuts']
+                                                    )
+
+        """
+        Etac-> K K K K
+        """
+        self.SelEtac2KKKK = self.createN4BodySel( OutputList = self.name + "SelEtac2KKKK",
+                                                  DaughterLists = [ self.SelKaons ],
+                                                  DecayDescriptor = "eta_c(1S) -> K+ K- K+ K-",
+                                                  ComAMCuts      = config['EtacComAMCuts'],
+                                                  PreVertexCuts  = config['EtacComN4Cuts'], 
+                                                  PostVertexCuts = config['EtacMomN4Cuts']
+                                                  )
+
+        
+        """
+        Etac-> Pi Pi Pi Pi
+        """
+        self.SelEtac2PiPiPiPi = self.createN4BodySel( OutputList = self.name + "SelEtac2PiPiPiPi",
+                                                      DaughterLists = [ self.SelPions ],
+                                                      DecayDescriptor = "eta_c(1S) -> pi+ pi- pi+ pi-",
+                                                      ComAMCuts      = config['EtacComAMCuts'],
+                                                      PreVertexCuts  = config['EtacComN4Cuts'], 
+                                                      PostVertexCuts = config['EtacMomN4Cuts']
+                                                      )
+
+        """
+        Eta_c
+        """
+        from PhysSelPython.Wrappers import MergedSelection
+
+        self.SelEtac = MergedSelection( self.name + "SelEtac",
+                                        RequiredSelections =  [ self.SelEtac2KKPiPi, 
+                                                                self.SelEtac2KKKK,
+                                                                self.SelEtac2PiPiPiPi
+                                                                ])
+        
+        
+        """
+        Phi 
+        """
+        self.SelPhi = self.createSubSel( OutputList = self.name + "SelPhi",
+                                         InputList =  DataOnDemand(Location = 'Phys/StdTightPhi2KK/Particles' ), 
+                                         Cuts = config['PhiCuts']
+                                         )
+
+        """
+        Kshort 
+        """
+        # Both LL and DD 
+        self.InputKs = MergedSelection( self.name + "InputKs",
+                                        RequiredSelections = [DataOnDemand(Location = "Phys/StdLooseKsDD/Particles"),
+                                                              DataOnDemand(Location = "Phys/StdLooseKsLL/Particles")] )
+
+        self.SelKs = self.createSubSel( OutputList = self.name + "SelKs",
+                                        InputList = self.InputKs,
+                                        Cuts = config['KsCuts'] ) 
+
+        # Eta_c -> KS0 K Pi 
+        self.SelEtac2KsKPi = self.createCombinationSel( OutputList = self.name + "SelEtac2KsKPi",
+                                                        DecayDescriptor = "[eta_c(1S) -> KS0 K+ pi-]cc",
+                                                        DaughterLists = [ self.SelKs, self.SelKaons, self.SelPions ],                                                        
+                                                        PreVertexCuts  = config['EtacComCuts'], 
+                                                        PostVertexCuts = config['EtacMomN4Cuts']
+                                                        )
+
+        """
+        Bs->Eta_c(KsKPi) Phi 
+        """
+        self.SelBs2EtacPhi_KsKPi = self.createCombinationSel( OutputList = self.name + "SelBs2EtacPhi_KsKPi",
+                                                              DecayDescriptor = "B_s0 -> eta_c(1S) phi(1020)",
+                                                              DaughterLists = [ self.SelPhi, self.SelEtac2KsKPi ],                    
+                                                              PreVertexCuts  = config['BsComCuts'],
+                                                              PostVertexCuts = config['BsMomCuts'] )
+
+        self.Bs2EtacPhi_KsKPiLine = StrippingLine( self.name + '_KsKPiLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                   HLT2      = config['HLTCuts'],
+                                                   algos     = [ self.SelBs2EtacPhi_KsKPi ],
+                                                   EnableFlavourTagging = True )#, MDSTFlag = True )
+
+        self.registerLine( self.Bs2EtacPhi_KsKPiLine )
+        
+
+
+        """
+        Bs->Eta_c Phi 
+        """
+        self.SelBs2EtacPhi = self.createCombinationSel( OutputList = self.name + "SelBs2EtacPhi",
+                                                        DecayDescriptor = "B_s0 -> eta_c(1S) phi(1020)",
+                                                        DaughterLists = [ self.SelPhi, self.SelEtac ],                    
+                                                        PreVertexCuts  = config['BsComCuts'],
+                                                        PostVertexCuts = config['BsMomCuts'] )
+
+        """
+        Apply MVA
+        """
+        self.Bs2EtacPhiVars = {
+            'sqrt(Kp_Etac_IPCHI2_OWNPV)'     : "sqrt( CHILD(MIPCHI2DV(), 1, 1) )",
+            'sqrt(Km_Etac_IPCHI2_OWNPV)'     : "sqrt( CHILD(MIPCHI2DV(), 1, 2) )",
+            'sqrt(Pip_Etac_IPCHI2_OWNPV)'    : "sqrt( CHILD(MIPCHI2DV(), 1, 3) )",
+            'sqrt(Pim_Etac_IPCHI2_OWNPV)'    : "sqrt( CHILD(MIPCHI2DV(), 1, 4) )",           
+            'sqrt(Kp_Phi_IPCHI2_OWNPV)'      : "sqrt( CHILD(MIPCHI2DV(), 2, 1) )",
+            'sqrt(Km_Phi_IPCHI2_OWNPV)'      : "sqrt( CHILD(MIPCHI2DV(), 2, 2) )",
+
+            'sqrt(Kp_Etac_IPCHI2_OWNPV+Km_Etac_IPCHI2_OWNPV+Pip_Etac_IPCHI2_OWNPV+Pim_Etac_IPCHI2_OWNPV)'  : "sqrt( CHILD(MIPCHI2DV(), 1, 1)+CHILD(MIPCHI2DV(), 1, 2)+CHILD(MIPCHI2DV(), 1, 3)+CHILD(MIPCHI2DV(), 1, 4))",
+            'sqrt(Etac_IPCHI2_OWNPV)'        : "sqrt( CHILD(MIPCHI2DV(), 1 ) )",
+            'sqrt(Phi_IPCHI2_OWNPV)'         : "sqrt( CHILD(MIPCHI2DV(), 2 ) )",
+            
+
+            'log(Kp_Etac_PT)'      : "log( CHILD(PT, 1, 1) )",
+            'log(Km_Etac_PT)'      : "log( CHILD(PT, 1, 2) )",
+            'log(Pip_Etac_PT)'     : "log( CHILD(PT, 1, 3) )",
+            'log(Pim_Etac_PT)'     : "log( CHILD(PT, 1, 4) )",
+            'log(Kp_Phi_PT)'       : "log( CHILD(PT, 2, 1) )",
+            'log(Km_Phi_PT)'       : "log( CHILD(PT, 2, 2) )",            
+            'log(Etac_PT)'         : "log( CHILD(PT, 1 ) )",
+            'log(Phi_PT)'          : "log( CHILD(PT, 2 ) )",
+            
+            'Etac_ENDVERTEX_CHI2'   :   "CHILD(VFASPF(VCHI2), 1)",
+            'Phi_ENDVERTEX_CHI2'    :   "CHILD(VFASPF(VCHI2), 2)", 
+
+            'sqrt(B_IPCHI2_OWNPV)'  :   "sqrt( BPVIPCHI2() )", 
+            'B_DIRA_OWNPV'          :   "BPVDIRA",
+            'B_LOKI_FDS'            :   "BPVDLS",
+            'B_PVFit_chi2[0]'       :   "DTF_CHI2 ( True  )"
+            }
+
+
+        self.MvaBs2EtacPhi = self.applyMVA( self.name + "MvaBs2EtacPhi",
+                                             SelB        = self.SelBs2EtacPhi,
+                                             MVAVars     = self.Bs2EtacPhiVars,
+                                             MVACutValue = config['Bs2EtacPhiMVACut'], 
+                                             MVAxmlFile  = config['Bs2EtacPhiXmlFile']
+                                             )
+        
+                
+        self.Bs2EtacPhiBDTLine = StrippingLine( self.name + 'Line',                                                
+                                                prescale  = config['Prescale'],
+                                                HLT2      = config['HLTCuts'],
+                                                algos     = [ self.MvaBs2EtacPhi ],
+                                                EnableFlavourTagging = True )#, MDSTFlag = True )
+
+        self.registerLine( self.Bs2EtacPhiBDTLine )
+        
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+
+    def createN4BodySel( self, OutputList,
+                         DecayDescriptor,
+                         DaughterLists,
+                         DaughterCuts = {} ,
+                         ComAMCuts      = "AALL",
+                         PreVertexCuts  = "AALL",
+                         PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = DaVinci__N4BodyDecays ( DecayDescriptor = DecayDescriptor,      
+                                           DaughtersCuts = DaughterCuts,
+                                           Combination12Cut  = ComAMCuts + "&" + "( ACHI2DOCA(1,2)<20 )",
+                                           Combination123Cut = ComAMCuts + "&" + "( ACHI2DOCA(1,3)<20 ) & ( ACHI2DOCA(2,3)<20 )",
+                                           CombinationCut = "( ACHI2DOCA(1,4)<20 ) & ( ACHI2DOCA(2,4)<20 ) & ( ACHI2DOCA(3,4)<20 )" + " & " + PreVertexCuts,
+                                           MotherCut = PostVertexCuts,
+                                           ReFitPVs = False )
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+    
+
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBs2JpsieePhi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBs2JpsieePhi.py
new file mode 100644
index 000000000..716a09f23
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/StrippingBs2JpsieePhi.py
@@ -0,0 +1,215 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Artur Ukleja, Jibo He, Konrad Klimaszewski'
+__date__ = '2011/03/01'
+
+'''
+Bs->JpsieePhi stripping selection
+
+Exports the following stripping lines
+- BetaSBs2JpsieePhiLine           - Line _without_ Bs lifetime cut, prescaled by 0.1
+- BetaSBs2JpsieePhiDetachedLine   - Line _with_ Bs lifetime cut based on StdLooseDielectron
+- BetaSBs2JpsieePhiFromTracksLine - Line _with_ Bs lifetime cut based on DielectronMaker
+'''
+
+__all__ = (
+    'Bs2JpsieePhiConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              : 'BetaSBs2JpsieePhi',
+    'BUILDERTYPE'       : 'Bs2JpsieePhiConf',
+    'CONFIG'    : {
+        # BetaSBs2JpsieePhiDetachedLine and BetaSBs2JpsieePhiFromTracksLine
+          'ElectronPTLoose'            :   500.    # MeV
+        , 'ElectronPIDLoose'           :     0.    # adimensional
+        , 'ElectronTrackCHI2pDOFLoose' :     5.    # adimensional
+        , 'JpsiVertexCHI2pDOFLoose'    :    15.    # adimensional
+        , 'JpsiMassMinLoose'           :  1700.    # MeV
+        , 'JpsiMassMaxLoose'           :  3600.    # MeV
+        , 'JpsiPTLoose'                :   400.    # MeV
+        , 'KaonTrackCHI2pDOFLoose'     :     5.    # adimensional
+        , 'KaonPIDLoose'               :    -3.    # adimensional
+        , 'PhiPTLoose'                 :  1000.    # MeV
+        , 'PhiVertexCHI2pDOFLoose'     :    15.    # adimensional
+        , 'PhiMassMinLoose'            :   990.    # MeV
+        , 'PhiMassMaxLoose'            :  1050.    # MeV
+        , 'BsVertexCHI2pDOFLoose'      :    10.    # adimensional
+        , 'BsMassMinLoose'             :  3600.    # MeV
+        , 'BsMassMaxLoose'             :  6000.    # MeV
+        , 'LifetimeCut'                : " & (BPVLTIME()>0.3*ps)"
+        , 'PrescaleLoose'              :     1.    # adamenssional
+        # BetaSBs2JpsieePhiLine
+        , 'ElectronPT'            :   500.    # MeV
+        , 'ElectronPID'           :     0.    # adimensional
+        , 'ElectronTrackCHI2pDOF' :     5.    # adimensional
+        , 'JpsiVertexCHI2pDOF'    :    15.    # adimensional
+        , 'JpsiMassMin'           :  1700.    # MeV
+        , 'JpsiMassMax'           :  3600.    # MeV
+        , 'JpsiPT'                :   400.    # MeV
+        , 'KaonTrackCHI2pDOF'     :     5.    # adimensional
+        , 'KaonPID'               :    -3.    # adimensional
+        , 'PhiPT'                 :  1000.    # MeV
+        , 'PhiVertexCHI2pDOF'     :    15.    # adimensional
+        , 'PhiMassMin'            :   990.    # MeV
+        , 'PhiMassMax'            :  1050.    # MeV
+        , 'BsVertexCHI2pDOF'      :    10.    # adimensional
+        , 'BsMassMin'             :  3600.    # MeV
+        , 'BsMassMax'             :  6000.    # MeV
+        , 'BsDIRA'                :     0.99  # adimensional
+        , 'Prescale'              :     0.1   # adamenssional
+        },
+    'STREAMS' : [ 'Leptonic' ],
+    'WGs'    : [ 'B2CC' ]
+    }
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class Bs2JpsieePhiConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+
+        # if name not set outside, set it to empty 
+        if name == None:
+            name = ""        
+        self.name = name
+        DiElectrons           = DataOnDemand(Location = "Phys/StdLooseDiElectron/Particles")
+        DiElectronsFromTracks = DataOnDemand(Location = "Phys/StdDiElectronFromTracks/Particles")
+        self.Bs2JpsieePhiLine      = self._Bs2JpsieePhiLine( DiElectrons, name, config )
+        self.Bs2JpsieePhiDetachedLine = self._Bs2JpsieePhiDetachedLine( DiElectrons, name+"Detached", config )
+        self.Bs2JpsieePhiFromTracksLine = self._Bs2JpsieePhiDetachedLine( DiElectronsFromTracks, name+"FromTracks", config )
+
+        # Tests CPU time required for construction of StdLooseDiElectron
+        # self.DielectronTestLine      = self._DielectronTestLine( DiElectrons, "DielectronTest", config )
+        # self.registerLine( self.DielectronTestLine )
+
+        self.registerLine( self.Bs2JpsieePhiDetachedLine )
+        self.registerLine( self.Bs2JpsieePhiFromTracksLine )
+        self.registerLine( self.Bs2JpsieePhiLine )
+
+
+    def _Bs2JpsieePhiLine( self, dielectron, name, config ) :
+
+        _jpsi = FilterDesktop("FilterJpsi2eeFor"+name,
+                              Code = "   (MM > %(JpsiMassMin)s *MeV)" \
+                                     " & (MM < %(JpsiMassMax)s *MeV)" \
+                                     " & (PT > %(JpsiPT)s *MeV)" \
+                                     " & (MINTREE('e+'==ABSID,PIDe-PIDpi) > %(ElectronPID)s )" \
+                                     " & (MINTREE('e+'==ABSID,PT) > %(ElectronPT)s *MeV)" \
+                                     " & (MAXTREE('e+'==ABSID,TRCHI2DOF) < %(ElectronTrackCHI2pDOF)s)" \
+                                     " & (VFASPF(VCHI2/VDOF) < %(JpsiVertexCHI2pDOF)s)" % config
+                             )
+        Jpsi = Selection("SelJpsi2eeFor"+name,
+                         Algorithm = _jpsi,
+                         RequiredSelections = [dielectron])
+
+        _stdPhi = DataOnDemand(Location="Phys/StdLoosePhi2KK/Particles")
+        _phi = FilterDesktop("FilterPhi2KKFor"+name,
+                             Code = \
+                                    "   (MM > %(PhiMassMin)s *MeV)" \
+                                    " & (MM < %(PhiMassMax)s *MeV)" \
+                                    " & (PT > %(PhiPT)s *MeV)" \
+                                    " & (MINTREE('K+'==ABSID,PIDK-PIDpi) > %(KaonPID)s )" \
+                                    " & (MAXTREE('K+'==ABSID,TRCHI2DOF) < %(KaonTrackCHI2pDOF)s)" \
+                                    " & (VFASPF(VCHI2/VDOF) < %(PhiVertexCHI2pDOF)s)" % config
+                            )
+        Phi = Selection("SelPhi2KKFor"+name,
+                        Algorithm = _phi,
+                        RequiredSelections = [_stdPhi])
+
+        CC = "(AM > %(BsMassMin)s *MeV) & (AM < %(BsMassMax)s *MeV)" % config
+        MC = "(VFASPF(VCHI2/VDOF) < %(BsVertexCHI2pDOF)s) & (BPVDIRA > %(BsDIRA)s)" % config
+        _Bs = CombineParticles("CombineBsFor"+name,
+                               DecayDescriptor = "B_s0 -> J/psi(1S) phi(1020)",
+                               CombinationCut = CC ,
+                               MotherCut = MC,
+                               ReFitPVs = False
+                               )
+        # Select Phi first (we throw away less at the first state but
+        # StdLoosePhi2KK is a bit quicker than StdLooseDiElectron and co)
+        Bs = Selection(name,
+                       Algorithm = _Bs,
+                       #RequiredSelections = [Jpsi, Phi])
+                       RequiredSelections = [Phi, Jpsi])
+
+        return StrippingLine(name+"Line"
+              , prescale = config['Prescale']
+              , postscale = 1
+              , selection = Bs
+              , EnableFlavourTagging = True )#, MDSTFlag = True )
+
+
+    def _Bs2JpsieePhiDetachedLine( self, dielectron, name, config ) :
+        
+        _jpsi = FilterDesktop("FilterJpsi2eeFor"+name,
+                              Code = "   (MM > %(JpsiMassMinLoose)s *MeV)" \
+                                     " & (MM < %(JpsiMassMaxLoose)s *MeV)" \
+                                     " & (PT > %(JpsiPTLoose)s *MeV)" \
+                                     " & (MINTREE('e+'==ABSID,PIDe-PIDpi) > %(ElectronPIDLoose)s )" \
+                                     " & (MINTREE('e+'==ABSID,PT) > %(ElectronPTLoose)s *MeV)" \
+                                     " & (MAXTREE('e+'==ABSID,TRCHI2DOF) < %(ElectronTrackCHI2pDOFLoose)s)" \
+                                     " & (VFASPF(VCHI2/VDOF) < %(JpsiVertexCHI2pDOFLoose)s)" % config
+                             )
+        Jpsi = Selection("SelJpsi2eeFor"+name,
+                         Algorithm = _jpsi,
+                         RequiredSelections = [dielectron])
+    
+        _stdPhi = DataOnDemand(Location="Phys/StdLoosePhi2KK/Particles")
+        _phi = FilterDesktop("FilterPhi2KKFor"+name,
+                             Code = \
+                                    "   (MM > %(PhiMassMinLoose)s *MeV)" \
+                                    " & (MM < %(PhiMassMaxLoose)s *MeV)" \
+                                    " & (PT > %(PhiPTLoose)s *MeV)" \
+                                    " & (MINTREE('K+'==ABSID,PIDK-PIDpi) > %(KaonPIDLoose)s )" \
+                                    " & (MAXTREE('K+'==ABSID,TRCHI2DOF) < %(KaonTrackCHI2pDOFLoose)s)" \
+                                    " & (VFASPF(VCHI2/VDOF) < %(PhiVertexCHI2pDOFLoose)s)" % config
+                            )
+        Phi = Selection("SelPhi2KKFor"+name,
+                        Algorithm = _phi,
+                        RequiredSelections = [_stdPhi])
+
+        CC = "(AM > %(BsMassMinLoose)s *MeV) & (AM < %(BsMassMaxLoose)s *MeV)" % config
+        MC = "(VFASPF(VCHI2/VDOF) < %(BsVertexCHI2pDOFLoose)s)" % config
+        _Bs = CombineParticles("CombineBsFor"+name,
+                               DecayDescriptor = "B_s0 -> J/psi(1S) phi(1020)",
+                               CombinationCut = CC , 
+                               MotherCut = MC + config['LifetimeCut'],
+                               ReFitPVs = True
+                               )
+        # Select Phi first (we throw away less at the first state but
+        # StdLoosePhi2KK is a bit quicker than StdLooseDiElectron and co)
+        Bs = Selection(name,
+                       Algorithm = _Bs,
+                       #RequiredSelections = [Jpsi, Phi])
+                       RequiredSelections = [Phi, Jpsi])
+
+
+        return StrippingLine(name+"Line"
+              , prescale = config['PrescaleLoose']
+              , postscale = 1
+              , selection = Bs
+              , EnableFlavourTagging = True )#, MDSTFlag = True )
+
+    def _DielectronTestLine( self, dielectron, name, config ) :
+        return StrippingLine(name+"Line"
+              , prescale = 1
+              , postscale = 1
+              , selection = dielectron
+              )
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/__init__.py
new file mode 100644
index 000000000..883e7fd12
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2CC/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ('StrippingB2JpsiHH', 'StrippingB2JpsiXforBeta_s')
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_B2DXBuilder.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_B2DXBuilder.py
new file mode 100644
index 000000000..618daf1c5
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_B2DXBuilder.py
@@ -0,0 +1,2000 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 copy import deepcopy
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from Beauty2Charm_Utils import *
+from Configurables import SubstitutePID
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class B2DXBuilder(object):
+    '''Makes all B->DX decays for the Beauty2Charm module.'''
+
+    def __init__(self, d, dst, topoPions, topoPionsLoose, topoKaons,
+                 topoKaons_PID, topoPions_PID, muons, ks, pi0, hh, hhh,
+                 config):
+        self.config = config
+        self.topoPions = [topoPions]
+        self.topoPionsLoose = [topoPionsLoose]
+        self.topoKaons = [topoKaons]
+        self.topoKaons_PID = [topoKaons_PID]
+        self.topoPions_PID = [topoPions_PID]
+        self.muons = muons
+        self.d = d
+        self.dst = dst
+        self.hh = hh
+        self.hhh = hhh
+        self.ks = ks
+        self.pi0 = pi0
+        self.lines = []
+
+        # B -> D0(HH) X
+        self.b2dhd2hh = self._makeB2D0H('D2HH',
+                                        self.d.hh_pid)  # B+- -> D0(HH)  H+-
+        self._makeB2D0H('D2HHWS', self.d.hh_ws)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        self._makeB2D0H('D2HHmuDST', self.d.hh_pid)
+        self._makeB2D0H('D2HHUP', self.d.hh_up)  # B+- -> D0(HH)  H+-
+        # self._makeB2D0H('D2KPIPID',d.kpi_pid,False) # No IP line!
+        mCutD0 = "(ADMASS('D0') < 60.0)"
+        kCut = "(NINGENERATION(('K+'==ABSID) & (PIDK > -5) & (PT>300), 1) == 1)"
+        piCut = "(NINGENERATION(('pi+'==ABSID) & (PIDK < 5) & (PT>300), 1) == 1)"
+        cutAll = mCutD0 + "&" + kCut + "&" + piCut
+        self.kpi_pid_tightcut = [
+            filterSelection('D02PKPITIGHTERCUT', cutAll, d.kpi_pid)
+        ]
+        self._makeB2D0PiTightCuts('D2KPIPID', self.kpi_pid_tightcut,
+                                  False)  # No IP line!
+        self._makeB02D0HH('D2HH', self.d.hh_pid)  # B0  -> D0(HH)  H+ H-
+        self._makeB02D0KKDST('D2HH', self.d.hh_pid)  # B0 -> D0(HH) K+ K- DST
+        self._makeB02D0PPbar('D2HH', self.d.hh_pid)  # B0  -> D0(HH)  H+ H-
+
+        self._makeB02D0HH('D2HHWS', self.d.hh_ws)  # B0  -> D0(HH)WS  H+ H-
+        self.lines[-2].pre = 0.1  # WS D line
+        self._makeB02D0KS('D2HH', self.d.hh_pid, 'DD')  # B0  -> D0(HH)  KS
+        self._makeB02D0KS('D2HH', self.d.hh_pid, 'LL')  # B0  -> D0(HH)  KS
+        self._makeB2D0HH('D2HH', self.d.hh_pid)  # B+- -> D0(HH) H+- H0
+        self._makeB2D0HH('D2KSHHLL',
+                         self.d.kshh_ll_pid)  # B+- -> D0(Kshh,LL) H+- H0
+        self._makeB2D0HH('D2KSHHDD',
+                         self.d.kshh_dd_pid)  # B+- -> D0(Kshh,DD) H+- H0
+
+        self._makeB2D0HH('D2HHWS', self.d.hh_ws)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        self._makeB2D0HH('D2KSHHLLWS', self.d.kshh_ll_ws)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        self._makeB2D0HH('D2KSHHDDWS', self.d.kshh_dd_ws)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+
+        self._makeB2D0HH('D2HHHH', self.d.hhhh_pid)  # B+- -> D0(HHHH) H+- H0
+        self._makeB2D0HH('D2HHHHWS',
+                         self.d.hhhh_ws)  # B+- -> D0(HHHH,WS) H+- H0
+        self.lines[-1].pre = 0.1  # last line is WS D line
+
+        self._makeB02Dst0HH(
+            'Dst02D0Pi0D2HHResolved',
+            self.dst.d0pi0_resolved_pid)  # B0  -> Dst0(HH)  H+ H-
+        self._makeB02Dst0HH('Dst02D0GammaD2HH',
+                            self.dst.d0gamma_hh_pid)  # B0  -> Dst0(HH)  H+ H-
+        self.lines[-1].pre = 0.1  # last line is WS D line
+
+        self._makeB02DHD2PhiMu('D2PhiMuNu',
+                               self.d.phimu)  # B0 -> D( phi mu nu) H+-
+        # B -> D+-(HHH) X
+        self.b02dhd2hhh = self._makeB02DH(
+            'D2HHH', self.d.hhh)  # B0  -> D+-(HHH) H-+   (+WS)
+        self._makeB02DH('D2HHHUP',
+                        self.d.hhh_up)  # B0  -> D+-(HHH) H-+   (+WS)
+        self._makeB02DH('D2HHHCFPID', self.d.hhh_cf_pid, False)  # No IP line!
+        self._makeB02DH('Ds2HHHPID', self.d.ds_hhh_pid_tight,
+                        False)  # No IP line!
+        self._makeB02DHH('D2HHHCFPID',
+                         self.d.hhh_cf_pid)  # B0 -> D+- H-+ H0 (+WS)
+        self.b2dhhd2hhhcfpid = self._makeB2DHH(
+            'D2HHHCFPID', self.d.hhh_cf_pid)  #B+- ->D+-(HHH)H+H-(+WS)
+        self._makeB2DV('D2HHHPID', self.d.hhh_pid)  #B+- ->D+-(HHH) V(HH)
+        self._makeB2DKS('D2HHH', self.d.hhh, 'DD')  # B+-  -> D+-(HHH)  KS
+        self._makeB2DKS('D2HHH', self.d.hhh, 'LL')  # B+-  -> D+-(HHH)  KS
+        self._makeB02DV('D2HHHCFPID', self.d.hhh_cf_pid)
+        # B -> D(KSH[H]) X (LL & DD)
+        self._makeB02DH('D2KSHLL',
+                        self.d.ksh_ll)  # B0  -> D+-(KSLLH) H-+ (+WS)
+        self._makeB02DH('D2KSHDD',
+                        self.d.ksh_dd)  # B0  -> D+-(KSDDH) H-+ (+WS)
+        self._makeB2D0H('D2KSHHLL',
+                        self.d.kshh_ll_pid)  # B+- -> D0(KSLLHH) H+-
+        self._makeB2D0H('D2KSHHDD',
+                        self.d.kshh_dd_pid)  # B+- -> D0(KSDDHH) H+-
+        self._makeB2D0MuNu('D2KSHHLL',
+                           self.d.kshh_ll_pid)  # B+- -> D0(KSLLHH) Mu+- Nu
+        self._makeB2D0MuNu('D2KSHHDD',
+                           self.d.kshh_dd_pid)  # B+- -> D0(KSDDHH) Mu+- Nu
+        self._makeB2D0H('D2KSMuMuLL',
+                        self.d.ksmumu_ll)  # B+- -> D0(KSLLMuMu) H+-
+        self._makeB2D0H('D2KSMuMuDD',
+                        self.d.ksmumu_dd)  # B+- -> D0(KSDDMuMu) H+-
+        # partially reco D0
+        self._makeB2D0H('D2KSHHLLPartialD',
+                        self.d.kshh_ll_pid_part)  # B+- -> D0(KSLLHH) H+-
+        self._makeB2D0H('D2KSHHDDPartialD',
+                        self.d.kshh_dd_pid_part)  # B+- -> D0(KSDDHH) H+-
+
+        #self._makeB02DH('D2KSHLLUP',self.d.ksh_ll_up) # B0  -> D+-(KSLLH) H-+ (+WS)
+        #self._makeB02DH('D2KSHDDUP',self.d.ksh_dd_up) # B0  -> D+-(KSDDH) H-+ (+WS)
+        #self._makeB2D0H('D2KSHHLLUP',self.d.kshh_ll_up)# B+- -> D0(KSLLHH) H+-
+        #self._makeB2D0H('D2KSHHDDUP',self.d.kshh_dd_up)# B+- -> D0(KSDDHH) H+-
+        self._makeB02D0HH('D2KSHHLL',
+                          self.d.kshh_ll_pid)  # B0  -> D0(KSLLHH)H+H-
+        self._makeB02D0HH('D2KSHHDD',
+                          self.d.kshh_dd_pid)  # B0  -> D0(KSDDHH)H+H-
+        self._makeB02D0HH('D2KSHHLLWS', self.d.kshh_ll_ws,
+                          0.1)  # B0  -> D0(KSLLHH)H+H- (WS D daughters)
+        self._makeB02D0HH('D2KSHHDDWS', self.d.kshh_dd_ws,
+                          0.1)  # B0  -> D0(KSDDHH)H+H- (WS D daughters)
+
+        self._makeB2D0H('D2KSHHLLWS', self.d.kshh_ll_ws)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        self._makeB2D0H('D2KSHHDDWS', self.d.kshh_dd_ws)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        self._makeB2D0H('D2KSMuMuLLWS', self.d.ksmumu_ll_ws)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        self._makeB2D0H('D2KSMuMuDDWS', self.d.ksmumu_dd_ws)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        self._makeB02DstH('Dst2D0Pi_D2KSPi0HHLLResolved', self.dst.d0pi_kspi0hh_ll_resolved)
+        self._makeB02DstH('Dst2D0Pi_D2KSPi0HHLLMerged', self.dst.d0pi_kspi0hh_ll_merged)
+        self._makeB02DstH('Dst2D0Pi_D2KSPi0HHDDResolved', self.dst.d0pi_kspi0hh_dd_resolved)
+        self._makeB02DstH('Dst2D0Pi_D2KSPi0HHDDMerged', self.dst.d0pi_kspi0hh_dd_merged)
+        self._makeB02DstMuNu('Dst2D0Pi_D2KSPi0HHLLResolved', self.dst.d0pi_kspi0hh_ll_resolved)
+        self._makeB02DstMuNu('Dst2D0Pi_D2KSPi0HHLLMerged', self.dst.d0pi_kspi0hh_ll_merged)
+        self._makeB02DstMuNu('Dst2D0Pi_D2KSPi0HHDDResolved', self.dst.d0pi_kspi0hh_dd_resolved)
+        self._makeB02DstMuNu('Dst2D0Pi_D2KSPi0HHDDMerged', self.dst.d0pi_kspi0hh_dd_merged)
+        self._makeB02DstH('Dst2D0Pi_D2KSHHLL', self.dst.d0pi_kshh_ll)
+        self._makeB02DstH('Dst2D0Pi_D2KSHHDD', self.dst.d0pi_kshh_dd)
+        self._makeB02DstMuNu('Dst2D0Pi_D2KSHHLL', self.dst.d0pi_kshh_ll)
+        self._makeB02DstMuNu('Dst2D0Pi_D2KSHHDD', self.dst.d0pi_kshh_dd)
+        self._makeB02DstMuNu('Dst2D0Pi_D2HHHH', self.dst.d0pi_hhhh)
+        self._makeB02DstMuNu('Dst2D0Pi_D2HHHHWS', self.dst.d0pi_hhhh_ws)
+
+        self._makeB02DstKsH('Dst2D0Pi', self.dst.d0pi)
+        # B -> D0(HHHH) X
+        self.b2dhd2hhhh = self._makeB2D0H(
+            'D2HHHH', self.d.hhhh_pid)  # B+- -> D0(HHHH) H+-
+        self._makeB2D0H('D2HHHHWS', self.d.hhhh_ws)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        self._makeB2D0H('D2HHHHUP', self.d.hhhh_up)  # B+- -> D0(HHHH) H+-
+        self._makeB02D0HH('D2HHHH', self.d.hhhh_pid)  # B0  -> D0(K3Pi)  H+ H-
+        self._makeB02D0HH('D2HHHHWS',
+                          self.d.hhhh_ws)  # B0  -> D0(HHHH)WS  H+ H-
+        self.lines[-2].pre = 0.1  # WS D line
+        self._makeB02D0KS('D2K3Pi', self.d.k3pi, 'DD')  # B0  -> D0(K3Pi)  KS
+        self._makeB02D0KS('D2K3Pi', self.d.k3pi, 'LL')  # B0  -> D0(K3Pi)  KS
+        # B+- -> D0(Pi0HH) X (resolved & merged)
+        self._makeB2D0H('D2Pi0HHResolved', self.d.pi0hh_resolved_pid)
+        self._makeB2D0H('D2Pi0HHWSResolved', self.d.pi0hh_resolved_ws)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        #self._makeB2D0H('D2Pi0HHResolvedUP',self.d.pi0hh_resolved_up)
+        # self._makeB2D0H('D2Pi0HHMerged',self.d.pi0hh_merged_pid)
+        # self._makeB2D0H('D2Pi0HHWSMerged',self.d.pi0hh_merged_ws)
+        # self.lines[-1].pre = 0.1 # last line is WS D line
+        #self._makeB2D0H('D2Pi0HHMergedUP',self.d.pi0hh_merged_up)
+
+        # B+- -> D0(KSPi0HH) X (resolved & merged & LL & DD)
+        self._makeB2D0H('D2KSPi0HHLLResolved', self.d.kspi0hh_ll_resolved)
+        self._makeB2D0H('D2KSPi0HHLLMerged', self.d.kspi0hh_ll_merged)
+        self._makeB2D0H('D2KSPi0HHDDResolved', self.d.kspi0hh_dd_resolved)
+        self._makeB2D0H('D2KSPi0HHDDMerged', self.d.kspi0hh_dd_merged)
+        # D0(Kspi0)
+        self._makeB2D0H('D02KSPi0LLResolved', self.d.kspi0_ll_resolved)
+        self._makeB2D0H('D02KSPi0LLMerged', self.d.kspi0_ll_merged)
+        self._makeB2D0H('D02KSPi0DDResolved', self.d.kspi0_dd_resolved)
+        self._makeB2D0H('D02KSPi0DDMerged', self.d.kspi0_dd_merged)
+
+        pi0Cut = "(NINGENERATION(('pi0'==ABSID) & (PT>1000), 1) == 1)"
+        self.d2pi0hh_tight = [
+            filterSelection('GammaSelection', pi0Cut, d.pi0hh_resolved_pid)
+        ]
+        self._makeB02D0HH('D2Pi0HHResolved',
+                          self.d2pi0hh_tight)  # self.d.pi0hh_resolved_pid
+        #self._makeB02D0HH('D2Pi0HHMerged',self.d.pi0hh_merged_pid)
+        #self._makeB02D0KS('D2Pi0KPiResolved',self.d.pi0kpi_resolved,'DD')
+        #self._makeB02D0KS('D2Pi0KPiMerged',self.d.pi0kpi_merged,'LL')
+        # B0 -> D+-(Pi0HHH) H-+  (resolved & merged) (+WS)
+        self._makeB02DH('D2Pi0HHHResolved', self.d.pi0hhh_resolved)
+        self._makeB02DH('D2Pi0HHHMerged', self.d.pi0hhh_merged)
+        #self._makeB02DH('D2Pi0HHHResolvedUP',self.d.pi0hhh_resolved_up)
+        #self._makeB02DH('D2Pi0HHHMergedUP',self.d.pi0hhh_merged_up)
+        # B -> D0(HH) 3h
+        self.b2dhhhd2hhpid = self._makeB2D0HHH(
+            'D2HHPID', self.d.hh_pid)  # B+- -> D0(HH)  H+H-H+
+        self._makeB2D0HHH('D2HHHHPID', self.d.hhhh_pid)
+        self._makeB2D0HHH('D2KSHHDD', self.d.kshh_dd_pid)
+        self._makeB2D0HHH('D2KSHHLL', self.d.kshh_ll_pid)
+        self._makeB2D0HHH('D2KSHHDDWS', self.d.kshh_dd_ws_pid)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        self._makeB2D0HHH('D2KSHHLLWS', self.d.kshh_ll_ws_pid)
+        self.lines[-1].pre = 0.1  # last line is WS D line
+        #lines going to full dst: B+- -> D0(Kpi)3pi and B+- -> D0(K3pi)pi
+        self._makeB2D0HHH_FULLDST('D2HHTIGHT', self.d.kpi_pid_tighter1_narrow)
+        self._makeB2D0Pi('D2HHHHTIGHT', self.d.k3pi_pid_tighter1_narrow)
+
+        # B -> D(HHH) 3h
+        self._makeB02DHHH('D2HHHPID', self.d.hhh_pid)  # B+- -> D(HHH)  H+H-H+
+        #Tighter selection Full DST lines
+        #self._makeB02DHHH_FULLDST('D2HHHFULLDST',self.d.ds_hhh_pid_custom)
+
+        self._makeB2D0ppbarH('D2HH', self.d.hh_pid)
+        self._makeB02DppbarH('D2HHH', self.d.hhh)
+
+        # B+- -> D0(HH)  H+H-H+
+        self._makeB02DstHHH('Dstar2D0PiPID', self.dst.d0pi_pid)
+
+        # B+ -> D(_s)+ mu+ mu- / D(_s)- mu+ mu+ / D(_s)+ mu+ mu+
+        self._makeB2DMuMu()
+
+        # B -> D*H, D*(Dgamma), D(HHH) CPV
+        self._makeB02DsstH('Dsstar2DGammaD2HHH', self.dst.dsgammacpv_hhh)
+        # D*K without K PID (only for MC)
+        self._makeB02DsstKMC('Dsstar2DGammaD2HHH', self.dst.dsgammacpv_hhh)
+        # B -> D*K*, D*(Dgamma), D(HHH) CPV, K*(K0S Pi)
+        self._makeB02DsstKst('Dsst2DGammaD2HHH', self.dst.dsgammacpv_hhh)
+
+        # Jordi: make [ B -> D*0 ( D0 pi0 ) h ] and [ B -> D*0 ( D0 gamma ) h ] lines for LL and DD.
+        self._makeB2Dst0H('Dst02D0Pi0D2KSHHLL', self.dst.d0pi0_loose_kshh_ll,
+                          self.topoPions, self.topoKaons)
+        self._makeB2Dst0H('Dst02D0Pi0D2KSHHDD', self.dst.d0pi0_loose_kshh_dd,
+                          self.topoPions, self.topoKaons)
+        self._makeB2Dst0H('Dst02D0Pi0D2KSHHLLWS', self.dst.d0pi0_kshh_ll_ws,
+                          self.topoPions, self.topoKaons)  # added by A.B.
+        self._makeB2Dst0H('Dst02D0Pi0D2KSHHDDWS', self.dst.d0pi0_kshh_dd_ws,
+                          self.topoPions, self.topoKaons)  # added by A.B.
+        self._makeB2Dst0H('Dst02D0GammaD2KSHHLL',
+                          self.dst.d0gamma_loose_kshh_ll, self.topoPions,
+                          self.topoKaons)
+        self._makeB2Dst0H('Dst02D0GammaD2KSHHDD',
+                          self.dst.d0gamma_loose_kshh_dd, self.topoPions,
+                          self.topoKaons)
+        self._makeB2Dst0H('Dst02D0GammaD2KSHHLLWS',
+                          self.dst.d0gamma_kshh_ll_ws, self.topoPions,
+                          self.topoKaons)  # added by A.B.
+        self._makeB2Dst0H('Dst02D0GammaD2KSHHDDWS',
+                          self.dst.d0gamma_kshh_dd_ws, self.topoPions,
+                          self.topoKaons)  # added by A.B.
+
+        self._makeB2Dst0H('Dst02D0Pi0D2HHHHMerged', self.dst.d0pi0_hhhh_merged,
+                          self.topoPions, self.topoKaons)
+        self._makeB2Dst0H('Dst02D0Pi0D2HHHHResolved',
+                          self.dst.d0pi0_hhhh_resolved, self.topoPions,
+                          self.topoKaons)
+        # self._makeB2Dst0H('Dst02D0GammaD2HHHH',self.dst.d0gamma_hhhh,self.topoPions,self.topoKaons ) see dst.d0gamma_loose_hhhh below
+
+        self._makeB2Dst0H('Dst02D0Pi0D2HHResolved',
+                          self.dst.d0pi0_resolved_pid, self.topoPions_PID,
+                          self.topoKaons_PID)
+        # self._makeB2Dst0H('Dst02D0GammaD2HH',self.dst.d0gamma_hh_pid,self.topoPions_PID,self.topoKaons_PID ) see dst.d0gamma_loose_hh_pid below
+
+        # Donal: make [ B -> D*0 ( D0 gamma ) h ] lines for HH and HHHH with looser upper delta mass cut
+        self._makeB2Dst0H('Dst02D0GammaD2HH', self.dst.d0gamma_loose_hh_pid,
+                          self.topoPions_PID, self.topoKaons_PID)
+        self._makeB2Dst0H('Dst02D0GammaD2HHHH', self.dst.d0gamma_loose_hhhh,
+                          self.topoPions, self.topoKaons)
+
+        self._makeB2DstHH('D0Pi', self.dst.d0pi_pid)
+        self._makeB2DstHH('D2HHHHPi', self.dst.d0pi_hhhh_pid)
+
+        # B -> D D
+        self._makeB02DD()
+        self.b2dd = self._makeB2D0D()
+        self._makeB02DstD()
+        self._makeB02DstDD02K3Pi()
+        self._makeB02D0D0()
+        self._makeB2DstD0()
+        self._makeB02DstDst()
+
+        # B -> D D H
+        self._makeB2DDH()
+        self._makeB02D0DH()
+        self._makeB2DstDH()
+        self._makeB2D0D0H()
+        self._makeB02DstD0H()
+        self._makeB2DstDstH()
+        self._makeB2Dst2460DH()
+        self._makeB2D0st2460D0H()
+        self._makeB2Dst0D0K()
+        # B -> D D K*
+        self._makeB02D0D0Kst()
+        self._makeB02DDKst()
+        self._makeB02DstDKst()
+        self._makeB02DstDstKst()
+        self._makeB2DD0Kst()
+        self._makeB2DstD0Kst()
+        # B -> D D KS
+        self._makeB02DDKS('DD')
+        self._makeB2D0DKS('DD')
+        self._makeB02DstDKS('DD')
+        self._makeB02D0D0KS('DD')
+        self._makeB2DstD0KS('DD')
+        self._makeB02DstDstKS('DD')
+        self._makeB02DDKS('LL')
+        self._makeB2D0DKS('LL')
+        self._makeB02DstDKS('LL')
+        self._makeB02D0D0KS('LL')
+        self._makeB2DstD0KS('LL')
+        self._makeB02DstDstKS('LL')
+        # B->DDKK
+        self._makeB2D0DKK()
+        self._makeB2D0DKPi()
+        self._makeB02DDKK()
+        self._makeB02DstDKK()
+        self._makeB02DstDstKK()
+
+    def _makeB02DH(self, dname, d2x, useIP=True):
+        '''Makes RS and WS B0 -> D + h- + c.c.'''
+        tag = 'B02D%s'
+        if not useIP: tag += 'NoIP'
+        pions = self.topoPions
+        kaons = self.topoKaons
+        decays = {tag % 'Pi': ["[B0 -> D- pi+]cc"]}
+        inputs = {tag % 'Pi': d2x + pions}
+        if useIP:
+            decays[tag % 'K'] = ["[B0 -> D- K+]cc"]
+            inputs[tag % 'K'] = d2x + kaons
+        b02dh_rs = makeB2XSels(decays, dname, inputs, self.config, useIP)
+        decays = {tag % 'PiWS': ["[B0 -> D- pi-]cc"]}
+        inputs = {tag % 'PiWS': d2x + pions}
+        if useIP:
+            decays[tag % 'KWS'] = ["[B0 -> D- K-]cc"]
+            inputs[tag % 'KWS'] = d2x + kaons
+        b02dh_ws = makeB2XSels(decays, dname, inputs, self.config, useIP)
+        self.lines.append(ProtoLine(b02dh_rs, 1.0))
+        self.lines.append(ProtoLine(b02dh_ws, 0.1))
+        return [
+            MergedSelection('B02DHForBc' + dname, RequiredSelections=b02dh_rs)
+        ]
+
+    def _makeB02DHH(self, dname, d2x):
+        '''Makes RS and WS B0 -> D + h- h0 + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '5800*MeV'
+        decays = {
+            'B02DPiPi0Merged': ["[B0 -> D- pi+ pi0]cc"],
+            'B02DPiPi0Resolved': ["[B0 -> D- pi+ pi0]cc"],
+            'B02DKsPiDD': ["[B0 -> D- pi+ KS0]cc"],
+            'B02DKsPiLL': ["[B0 -> D- pi+ KS0]cc"],
+            'B02DKsKDD': ["[B0 -> D- K+ KS0]cc"],
+            'B02DKsKLL': ["[B0 -> D- K+ KS0]cc"],
+            'B02DKPi0Merged': ["[B0 -> D- K+ pi0]cc"],
+            'B02DKPi0Resolved': ["[B0 -> D- K+ pi0]cc"]
+        }
+        inputs = {
+            'B02DPiPi0Merged': d2x + self.topoPions + self.pi0['Merged'],
+            'B02DPiPi0Resolved': d2x + self.topoPions + self.pi0['Resolved'],
+            'B02DKsPiDD': d2x + self.topoPions + self.ks['DD'],
+            'B02DKsPiLL': d2x + self.topoPions + self.ks['LL'],
+            'B02DKsKDD': d2x + self.topoKaons + self.ks['DD'],
+            'B02DKsKLL': d2x + self.topoKaons + self.ks['LL'],
+            'B02DKPi0Merged': d2x + self.topoKaons + self.pi0['Merged'],
+            'B02DKPi0Resolved': d2x + self.topoKaons + self.pi0['Resolved']
+        }
+        b02dhh_rs = makeB2XSels(decays, dname, inputs, config)
+        decays = {
+            'B02DPiPi0MergedWS': ["[B0 -> D- pi- pi0]cc"],
+            'B02DPiPi0ResolvedWS': ["[B0 -> D- pi- pi0]cc"],
+            'B02DKsPiDDWS': ["[B0 -> D- pi- KS0]cc"],
+            'B02DKsPiLLWS': ["[B0 -> D- pi- KS0]cc"],
+            'B02DKsKDDWS': ["[B0 -> D- K- KS0]cc"],
+            'B02DKsKLLWS': ["[B0 -> D- K- KS0]cc"],
+            'B02DKPi0MergedWS': ["[B0 -> D- K- pi0]cc"],
+            'B02DKPi0ResolvedWS': ["[B0 -> D- K- pi0]cc"]
+        }
+        inputs = {'B02DPiPi0MergedWS': d2x+self.topoPions+self.pi0['Merged'],
+                  'B02DPiPi0ResolvedWS':d2x+self.topoPions\
+                  +self.pi0['Resolved'],
+                  'B02DKsPiDDWS' : d2x+self.topoPions+self.ks['DD'],
+                  'B02DKsPiLLWS' : d2x+self.topoPions+self.ks['LL'],
+                  'B02DKsKDDWS' : d2x+self.topoKaons+self.ks['DD'],
+                  'B02DKsKLLWS' : d2x+self.topoKaons+self.ks['LL'],
+                  'B02DKPi0MergedWS' : d2x+self.topoKaons+self.pi0['Merged'],
+                  'B02DKPi0ResolvedWS' : d2x+self.topoKaons\
+                  +self.pi0['Resolved']}
+        b02dhh_ws = makeB2XSels(decays, dname, inputs, config)
+        self.lines.append(ProtoLine(b02dhh_rs, 1.0))
+        self.lines.append(ProtoLine(b02dhh_ws, 0.1))
+
+    def _makeB2D0HH(self, dname, d2x):
+        '''Makes B+- -> D0 h+- h0'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '5800*MeV'
+        decays = {
+            'B2D0PiPi0Resolved': ["B+ -> D0 pi+ pi0", "B- -> D0 pi- pi0"],
+            'B2D0KsPiDD': ["B+ -> D0 pi+ KS0", "B- -> D0 pi- KS0"],
+            'B2D0KsPiLL': ["B+ -> D0 pi+ KS0", "B- -> D0 pi- KS0"],
+            'B2D0KPi0Resolved': ["B+ -> D0 K+ pi0", "B- -> D0 K- pi0"]
+        }
+        inputs = {
+            'B2D0PiPi0Resolved': d2x + self.topoPions + self.pi0['Resolved'],
+            'B2D0KsPiDD': d2x + self.topoPionsLoose + self.ks['DD'],
+            'B2D0KsPiLL': d2x + self.topoPionsLoose + self.ks['LL'],
+            'B2D0KPi0Resolved': d2x + self.topoKaons + self.pi0['Resolved']
+        }
+        b2d0hh = makeB2XSels(decays, dname, inputs, config)
+        self.lines.append(ProtoLine(b2d0hh, 1.0))
+
+    #def _makeB02DHH(self,dname,d2x):
+    #    '''Makes RS and WS B0 -> D + h- h0 + c.c.'''
+    #    config = deepcopy(self.config)
+    #    config['AM_MAX' ] = '5800*MeV'
+    #    decays = {'B02DPiPi0': ["[B0 -> D- rho(770)+]cc"],
+    #              'B02DKsPi' : ["[B0 -> D- K*(892)+]cc"],
+    #              'B02DKPi0' : ["[B0 -> D- K*(892)+]cc"]}
+    #    inputs = {'B02DPiPi0': d2x+self.hh.pipi0,
+    #              'B02DKsPi' : d2x+self.hh.kspi,
+    #              'B02DKPi0' : d2x+self.hh.kpi0}
+    #    b02dhh_rs = makeB2XSels(decays,dname,inputs,config,True,False)
+    #    decays = {'B02DPiPi0WS': ["[B0 -> D- rho(770)-]cc"],
+    #              'B02DKsPiWS' : ["[B0 -> D- K*(892)-]cc"],
+    #              'B02DKPi0WS' : ["[B0 -> D- K*(892)-]cc"]}
+    #    inputs = {'B02DPiPi0WS': d2x+self.hh.pipi0,
+    #              'B02DKsPiWS' : d2x+self.hh.kspi,
+    #              'B02DKPi0WS' : d2x+self.hh.kpi0}
+    #    b02dhh_ws = makeB2XSels(decays,dname,inputs,config,True,False)
+    #    self.lines.append(ProtoLine(b02dhh_rs,1.0))
+    #    self.lines.append(ProtoLine(b02dhh_ws,0.1))
+
+    #def _makeB2D0HH(self,dname,d2x):
+    #    '''Makes B+- -> D0 h+- h0'''
+    #    config = deepcopy(self.config)
+    #    config['AM_MAX' ] = '5800*MeV'
+    #    decays = {'B2D0PiPi0': ["B+ -> D0 rho(770)+","B- -> D0 rho(770)-"],
+    #              'B2D0KsPi' : ["B+ -> D0 K*(892)+","B- -> D0 K*(892)-"],
+    #              'B2D0KPi0' : ["B+ -> D0 K*(892)+","B- -> D0 K*(892)-"]}
+    #    inputs = {'B2D0PiPi0': d2x+self.hh.pipi0,
+    #              'B2D0KsPi' : d2x+self.hh.kspi,
+    #              'B2D0KPi0' : d2x+self.hh.kpi0}
+    #    b2d0hh = makeB2XSels(decays,dname,inputs,config,True,False)
+    #    self.lines.append(ProtoLine(b2d0hh,1.0))
+
+    def _makeB2DHH(self, dname, d2x):
+        '''Makes RS and WS B+ -> D+ h+ h- + c.c.'''
+        decays = {
+            'B2DPiPi': ["B+ -> D+ rho(770)0", "B- -> D- rho(770)0"],
+            'B2DKPi': ["[B- -> D- K*(892)0]cc", "[B+ -> D+ K*(892)0]cc"],
+            'B2DKK': ["B+ -> D+ phi(1020)", "B- -> D- phi(1020)"]
+        }
+        inputs = {
+            'B2DPiPi': d2x + self.hh.pipi_pid,
+            'B2DKPi': d2x + self.hh.kpi_pid,
+            'B2DKK': d2x + self.hh.kk_pid
+        }
+        b2dhh = makeB2XSels(decays, dname, inputs, self.config)
+        decays = {'B2DHHOS': ["B- -> D+ rho(770)-", "B+ -> D- rho(770)+"]}
+        inputs = {'B2DHHOS': d2x + self.hh.hh_ws_pid}
+        b2dhh_os = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2dhh, 1.0))
+        self.lines.append(ProtoLine(b2dhh_os, 1.0))
+        return [
+            MergedSelection('B2DHHForBc' + dname, RequiredSelections=b2dhh)
+        ]
+
+    def _makeB2DV(self, dname, d2x):
+        '''Makes B+ -> D+ V(h+h-) + c.c.'''
+        decays = {
+            'B2DRho0': ["B+ -> D+ rho(770)0", "B- -> D- rho(770)0"],
+            'B2DKstar0': ["[B- -> D- K*(892)0]cc", "[B+ -> D+ K*(892)0]cc"],
+            'B2DPhi': ["B+ -> D+ phi(1020)", "B- -> D- phi(1020)"]
+        }
+        inputs = {
+            'B2DRho0': d2x + self.hh.rho0_pid,
+            'B2DKstar0': d2x + self.hh.kstar0_pid,
+            'B2DPhi': d2x + self.hh.phi_pid
+        }
+        b2dv = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2dv, 1.0))
+
+    def _makeB02DV(self, dname, d2x):
+        '''Makes B+ -> D+ V(h0h-) + c.c.'''
+        decays = {
+            'B02DRhoPM': ["[B0 -> D+ rho(770)-]cc"],
+            'B02DKstarPM': ["[B0 -> D- K*(892)+]cc"]
+        }
+        inputs = {
+            'B02DRhoPM': d2x + self.hh.rhopm,
+            'B02DKstarPM': d2x + self.hh.kstarpm
+        }
+        b2dv = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2dv, 1.0))
+
+    def _makeB2D0H(self, dname, d2x, useIP=True):
+        '''Makes RS B+ -> D0 h+ (h=pi,K) + c.c.'''
+        tag = 'B2D0%s'
+        if not useIP: tag += 'NoIP'
+        decays = {tag % 'Pi': ["B+ -> D0 pi+", "B- -> D0 pi-"]}
+        inputs = {tag % 'Pi': d2x + self.topoPions}
+        if useIP:
+            decays[tag % 'K'] = ["B+ -> D0 K+", "B- -> D0 K-"]
+            inputs[tag % 'K'] = d2x + self.topoKaons
+        b2d0h = makeB2XSels(decays, dname, inputs, self.config, useIP)
+        self.lines.append(ProtoLine(b2d0h, 1.0))
+        return [
+            MergedSelection('B2D0HForBc' + dname, RequiredSelections=b2d0h)
+        ]
+
+    def _makeB2D0MuNu(self, dname, d2x):
+        '''Makes RS B+ -> D0 mu nu + c.c.'''
+        decays = {'B2D0MuNu': ["B+ -> D0 mu+", "B- -> D0 mu-"]}
+        inputs = {'B2D0MuNu': d2x + [self.muons]}
+        #        config = deepcopy(self.config)
+        config = {}
+        config['B2CBBDT_MIN'] = self.config['B2CBBDT_MIN']
+        config['AM_MIN'] = '2500*MeV'
+        config['AM_MAX'] = '5200*MeV'
+        config['VCHI2DOF_MAX'] = '6'
+        config['BPVDIRA_MIN'] = '0.999'
+        config['BPVCORRM_MIN'] = '4000*MeV'
+        config['BPVCORRM_MAX'] = '6000*MeV'
+        b2d0munu = makeB2XSels(decays, dname, inputs, config, True)
+        self.lines.append(ProtoLine(b2d0munu, 1.0))
+
+    def _makeB2D0Pi(self, dname, d2x, useIP=True):
+        '''Makes RS B+ -> D0 h+ (h=pi,K) + c.c.'''
+        tag = 'B2D0%s'
+        if not useIP: tag += 'NoIP'
+        decays = {tag % 'Pi': ["B+ -> D0 pi+", "B- -> D0 pi-"]}
+        inputs = {tag % 'Pi': d2x + self.topoPions}
+        b2d0h = makeB2XSels(decays, dname, inputs, self.config, useIP)
+        self.lines.append(ProtoLine(b2d0h, 1.0))
+
+    def _makeB02D0KS(self, dname, d2x, ks):
+        '''Makes B0 -> D0 KS'''
+        decays = {'B02D0KS' + ks: ["B0 -> D0 KS0"]}
+        inputs = {'B02D0KS' + ks: d2x + self.ks[ks]}
+        b2d0ks = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2d0ks, 1.0))
+
+    def _makeB2DKS(self, dname, d2x, ks):
+        '''Makes B+- -> D+- KS'''
+        decays = {'B2DKS' + ks: ["[B+ -> D+ KS0]cc"]}
+        inputs = {'B2DKS' + ks: d2x + self.ks[ks]}
+        b2dks = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2dks, 1.0))
+
+    def _makeB2Dst0H(self, dname, d2x, bacpions, backaons):
+        '''Makes B+- -> D*0 H+-'''
+        decays = {
+            'B2Dstar0Pi': ["B+ -> D*(2007)0 pi+", "B- -> D*(2007)0 pi-"],
+            'B2Dstar0K': ["B+ -> D*(2007)0 K+", "B- -> D*(2007)0 K-"]
+        }
+        inputs = {'B2Dstar0Pi': d2x + bacpions, 'B2Dstar0K': d2x + backaons}
+        b2d0h = makeB2XSels(decays, dname, inputs, self.config, True, False)
+        self.lines.append(ProtoLine(b2d0h, 1.0))
+
+    def _makeB02DstH(self, dname, d2x):
+        '''Makes B0 -> D*+- H-+'''
+        decays = {
+            'B02DstarPi': ["B0 -> D*(2010)- pi+", "B0 -> D*(2010)+ pi-"],
+            'B02DstarK': ["B0 -> D*(2010)- K+", "B0 -> D*(2010)+ K-"]
+        }
+        inputs = {
+            'B02DstarPi': d2x + self.topoPions,
+            'B02DstarK': d2x + self.topoKaons
+        }
+        b2dsth = makeB2XSels(decays, dname, inputs, self.config, True, False)
+        self.lines.append(ProtoLine(b2dsth, 1.0))
+
+        add_wrong_sign = dname in ['Dst2D0Pi_D2KSPi0HHLLResolved',
+                                   'Dst2D0Pi_D2KSPi0HHLLMerged',
+                                   'Dst2D0Pi_D2KSPi0HHDDResolved',
+                                   'Dst2D0Pi_D2KSPi0HHDDMerged']
+        if add_wrong_sign:
+            decays = {
+                'B02DstarPiWS': ["B0 -> D*(2010)- pi-", "B0 -> D*(2010)+ pi+"],
+                'B02DstarKWS': ["B0 -> D*(2010)- K-", "B0 -> D*(2010)+ K+"]
+            }
+            inputs = {
+                'B02DstarPiWS': d2x + self.topoPions,
+                'B02DstarKWS': d2x + self.topoKaons
+            }
+            b2dsth = makeB2XSels(decays, dname, inputs, self.config, True, False)
+            self.lines.append(ProtoLine(b2dsth, 1.0))
+
+    def _makeB02DstMuNu(self, dname, d2x):
+        '''Makes B0 -> D*+- H-+'''
+        use_loose_B_M_cuts = dname in ['Dst2D0Pi_D2KSPi0HHLLResolved',
+                                       'Dst2D0Pi_D2KSPi0HHLLMerged',
+                                       'Dst2D0Pi_D2KSPi0HHDDResolved',
+                                       'Dst2D0Pi_D2KSPi0HHDDMerged']
+        decays = {
+            'B02DstarMuNu': ["B0 -> D*(2010)- mu+", "B0 -> D*(2010)+ mu-"]
+        }
+        inputs = {'B02DstarMuNu': d2x + [self.muons]}
+        #        config = deepcopy(self.config)
+        config = {}
+        config['B2CBBDT_MIN'] = self.config['B2CBBDT_MIN']
+        config['AM_MIN'] = '2500*MeV'
+        config['AM_MAX'] = '6500*MeV' if use_loose_B_M_cuts else '5200*MeV'
+        config['VCHI2DOF_MAX'] = '6'
+        config['BPVDIRA_MIN'] = '0.999'
+        config['BPVCORRM_MIN'] = '3000*MeV' if use_loose_B_M_cuts else '4000*MeV'
+        config['BPVCORRM_MAX'] = '8000*MeV' if use_loose_B_M_cuts else '6000*MeV'
+        b2dstmunu = makeB2XSels(decays, dname, inputs, config, True, False)
+        self.lines.append(ProtoLine(b2dstmunu, 1.0))
+
+        decays = {
+            'B02DstarMuNuWS': ["B0 -> D*(2010)- mu-", "B0 -> D*(2010)+ mu+"]
+        }
+        inputs = {'B02DstarMuNuWS': d2x + [self.muons]}
+        b2dstmunu = makeB2XSels(decays, dname, inputs, config, True, False)
+        self.lines.append(ProtoLine(b2dstmunu, 1.))
+
+    def _makeB02DstKsH(self, dname, d2x):
+        '''Makes B0 -> D*+- H-+ Ks0'''
+        decays = {
+            'B02DstarKsPiDD':
+            ["B0 -> D*(2010)- KS0 pi+", "B0 -> D*(2010)+ KS0 pi-"],
+            'B02DstarKsKDD':
+            ["B0 -> D*(2010)- KS0 K+", "B0 -> D*(2010)+ KS0 K-"],
+            'B02DstarKsPiLL':
+            ["B0 -> D*(2010)- KS0 pi+", "B0 -> D*(2010)+ KS0 pi-"],
+            'B02DstarKsKLL': [
+                "B0 -> D*(2010)- KS0 K+", "B0 -> D*(2010)+ KS0 K-"
+            ]
+        }
+        inputs = {
+            'B02DstarKsPiDD': d2x + self.topoPions + self.ks['DD'],
+            'B02DstarKsKDD': d2x + self.topoKaons + self.ks['DD'],
+            'B02DstarKsPiLL': d2x + self.topoPions + self.ks['LL'],
+            'B02DstarKsKLL': d2x + self.topoKaons + self.ks['LL']
+        }
+        b2dstksh_rs = makeB2XSels(decays, dname, inputs, self.config, True,
+                                  False)
+        self.lines.append(ProtoLine(b2dstksh_rs, 1.0))
+
+        decays = {
+            'B02DstarKsPiDDWS':
+            ["B0 -> D*(2010)- KS0 pi-", "B0 -> D*(2010)+ KS0 pi+"],
+            'B02DstarKsKDDWS':
+            ["B0 -> D*(2010)- KS0 K-", "B0 -> D*(2010)+ KS0 K+"],
+            'B02DstarKsPiLLWS':
+            ["B0 -> D*(2010)- KS0 pi-", "B0 -> D*(2010)+ KS0 pi+"],
+            'B02DstarKsKLLWS': [
+                "B0 -> D*(2010)- KS0 K-", "B0 -> D*(2010)+ KS0 K+"
+            ]
+        }
+        inputs = {
+            'B02DstarKsPiDDWS': d2x + self.topoPions + self.ks['DD'],
+            'B02DstarKsKDDWS': d2x + self.topoKaons + self.ks['DD'],
+            'B02DstarKsPiLLWS': d2x + self.topoPions + self.ks['LL'],
+            'B02DstarKsKLLWS': d2x + self.topoKaons + self.ks['LL']
+        }
+        b2dstksh_ws = makeB2XSels(decays, dname, inputs, self.config, True,
+                                  False)
+        self.lines.append(ProtoLine(b2dstksh_ws, 0.1))
+
+    def _makeB02D0HH(self, dname, d2x, presc=1.0):
+        '''Makes RS B0 -> D0 h+h- (h=pi,K) + c.c.'''
+
+        if dname == 'D2HH':  # improved selection for D2HH only
+            config = deepcopy(self.config)
+            config['BPVDIRA_MIN'] = '0.99995'
+            config['BPVIPCHI2_MAX'] = '9'
+
+        decays = {
+            'B02D0PiPi': ["B0 -> D0 rho(770)0"],
+            'B02D0KPi': ["B0 -> D0 K*(892)0", "B0 -> D0 K*(892)~0"],
+            'B02D0KK': ["B0 -> D0 phi(1020)"]
+        }
+        inputs = {
+            'B02D0PiPi': d2x + self.hh.pipi,
+            'B02D0KPi': d2x + self.hh.kpi,
+            'B02D0KK': d2x + self.hh.kk
+        }
+        if dname == 'D2HH':
+            b2d0hh = makeB2XSels(decays, dname, inputs, config)
+        else:
+            b2d0hh = makeB2XSels(decays, dname, inputs, self.config)
+
+        decays = {'B02DHHWS': ["B0 -> D0 rho(770)-", "B0 -> D0 rho(770)+"]}
+        inputs = {'B02DHHWS': d2x + self.hh.hh_ws}
+        b2d0hh_ws = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2d0hh, presc))
+        self.lines.append(ProtoLine(b2d0hh_ws, 0.1))
+
+    def _makeB02Dst0HH(self, dname, d2x, presc=1.0):
+        '''Makes RS B0 -> Dst0 h+h- (h=pi,K) + c.c.'''
+
+        if dname == 'Dst02D0Pi0D2HHResolved' or dname == 'Dst02D0GammaD2HH':  # improved selection for D2HH only
+            config = deepcopy(self.config)
+            config['AM_MIN'] = '5000*MeV'
+            config['BPVDIRA_MIN'] = '0.99995'
+            config['BPVIPCHI2_MAX'] = '9'
+
+        decays = {
+            'B02Dst0PiPi': ["B0 -> D*(2007)0 rho(770)0"],
+            'B02Dst0KPi':
+            ["B0 -> D*(2007)0 K*(892)0", "B0 -> D*(2007)0 K*(892)~0"],
+            'B02Dst0KK': ["B0 -> D*(2007)0 phi(1020)"]
+        }
+        inputs = {
+            'B02Dst0PiPi': d2x + self.hh.pipi,
+            'B02Dst0KPi': d2x + self.hh.kpi,
+            'B02Dst0KK': d2x + self.hh.kk
+        }
+        if dname == 'Dst02D0Pi0D2HHResolved' or dname == 'Dst02D0GammaD2HH':
+            b2dst0hh = makeB2XSels(decays, dname, inputs, config)
+        else:
+            b2dst0hh = makeB2XSels(decays, dname, inputs, self.config)
+
+        decays = {
+            'B02Dst0HHWS':
+            ["B0 -> D*(2007)0 rho(770)-", "B0 -> D*(2007)0 rho(770)+"]
+        }
+        inputs = {'B02Dst0HHWS': d2x + self.hh.hh_ws}
+        b2dst0hh_ws = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2dst0hh, presc))
+        self.lines.append(ProtoLine(b2dst0hh_ws, 0.1))
+
+    def _makeB02D0PPbar(self, dname, d2x):
+        '''Makes RS B0 -> D0 p+p~- + c.c.'''
+        decays = {'B02D0PPbar': ["B0 -> D0 rho(770)0"]}
+        inputs = {'B02D0PPbar': d2x + self.hh.ppbar_pid}
+        b2d0ppbar = makeB2XSels(decays, dname, inputs, self.config)
+        decays = {'B02D0PPbarWS': ["B0 -> D0 rho(770)-", "B0 -> D0 rho(770)+"]}
+        inputs = {'B02D0PPbarWS': d2x + self.hh.ppbar_ws_pid}
+        b2d0ppbar_ws = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2d0ppbar, 1.0))
+        self.lines.append(ProtoLine(b2d0ppbar_ws, 0.1))
+
+    def _makeB02D0PPbar_FULLDST(self, dname, d2x):
+        '''Makes RS B0 -> D0 p+p~- + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4950*MeV'
+        config['AM_MAX'] = '5800*MeV'
+        config['B2CBBDT_MIN'] = '0.3'
+        config['DZ1_MIN'] = '-1.5*mm'
+        decays = {'B02D0PPbar': ["B0 -> D0 rho(770)0"]}
+        inputs = {'B02D0PPbar': d2x + self.hh.ppbar_Mcut_pid_tighter2}
+        b2d0ppbar = makeB2XSels(decays, dname, inputs, self.config)
+        #decays = {'B02D0PPbarWS': ["B0 -> D0 rho(770)-","B0 -> D0 rho(770)+"]}
+        #inputs = {'B02D0PPbarWS': d2x+self.hh.ppbar_ws_pid_tighter}
+        #b2d0ppbar_ws = makeB2XSels(decays,dname,inputs,self.config)
+        self.lines.append(ProtoLine(b2d0ppbar, 1.0))
+        #self.lines.append(ProtoLine(b2d0ppbar_ws,0.1))
+
+    def _makeB02DHHH(self, dname, d2x):
+        '''Makes RS and WS B0 -> D + h- + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5050*MeV'
+        config['AM_MAX'] = '6000*MeV'
+        config['VCHI2DOF_MAX'] = '8'
+        config['BPVIPCHI2_MAX'] = '20'
+        config['BPVDIRA_MIN'] = '0.99994'
+        pipipi = [
+            filterSelection('PiPiPi4B02DHHH', "(MM > 0*MeV) & (MM < 3500*MeV)",
+                            self.hhh.pipipi_tighterpi)
+        ]
+        kpipi = [
+            filterSelection('KPiPi4B02DHHH', "(MM > 0*MeV) & (MM < 3500*MeV)",
+                            self.hhh.kpipi_realtightk)
+        ]
+        kpipi_ss = self.hhh.kpipiSS
+        kkpi = [
+            filterSelection('KKPi4B02DHHH', "(MM > 0*MeV) & (MM < 3500*MeV)",
+                            self.hhh.kkpi_pid)
+        ]
+        d_sel = [
+            filterSelection('D4B02DHHH', "(MM > 1788*MeV) & (MM < 2048*MeV)",
+                            d2x)
+        ]
+        decays = {
+            'B02DPiPiPi': ["[B0 -> D- a_1(1260)+]cc"],
+            'B02DKPiPi': ["[B0 -> D- K_1(1270)+]cc"],
+            'B02DKPiPiSS': ["[B0 -> D- K_1(1270)+]cc"],
+            'B02DKKPi': ["[B0 -> D- a_1(1260)+]cc"]
+        }
+        inputs = {
+            'B02DPiPiPi': d_sel + pipipi,
+            'B02DKPiPi': d_sel + kpipi,
+            'B02DKPiPiSS': d_sel + kpipi_ss,
+            'B02DKKPi': d_sel + kkpi
+        }
+        b02dhhh_rs = makeB2XSels(decays, dname, inputs, config)
+        decays = {
+            'B02DPiPiPiWS': ["[B0 -> D- a_1(1260)-]cc"],
+            'B02DKPiPiWS': ["[B0 -> D- K_1(1270)-]cc"],
+            'B02DKPiPiSSWS': ["[B0 -> D- K_1(1270)-]cc"],
+            'B02DKKPiWS': ["[B0 -> D- a_1(1260)-]cc"]
+        }
+        inputs = {
+            'B02DPiPiPiWS': d_sel + pipipi,
+            'B02DKPiPiSSWS': d_sel + kpipi_ss,
+            'B02DKPiPiWS': d_sel + kpipi,
+            'B02DKKPiWS': d_sel + kkpi
+        }
+        b02dhhh_ws = makeB2XSels(decays, dname, inputs, config)
+        self.lines.append(ProtoLine(b02dhhh_rs, 1.0))
+        self.lines.append(ProtoLine(b02dhhh_ws, 0.1))
+
+    def _makeB02DHHH_FULLDST(self, dname, d2x):
+        '''Makes RS and WS B0 -> D + h- + c.c.  (Tighter selection for Full DST)'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4950*MeV'
+        config['AM_MAX'] = '6000*MeV'
+        config['B2CBBDT_MIN'] = '0.3'
+        config['DZ1_MIN'] = '-1.5*mm'
+
+        kpipi_realtightk = self.hhh.kpipi_realtightk
+        pipipi_tighterpi = self.hhh.pipipi_tighterpi
+        decays = {
+            'B02DKPiPi': ["[B0 -> D- K_1(1270)+]cc"],
+            'B02DPiPiPi': ["[B0 -> D- a_1(1260)+]cc"]
+        }
+        inputs = {
+            'B02DKPiPi': d2x + kpipi_realtightk,
+            'B02DPiPiPi': d2x + pipipi_tighterpi
+        }
+        b02dhhh_rs = makeB2XSels(decays, dname, inputs, config)
+        self.lines.append(ProtoLine(b02dhhh_rs, 1.0))
+
+    def _makeB02DstHHH(self, dname, dstar):
+        '''Makes RS and WS B0 -> D + h- + c.c.'''
+        pipipi = self.hhh.pipipi
+        kpipi = self.hhh.kpipi
+        kkpi = self.hhh.kkpi
+        decays = {
+            'B02DstPiPiPi': ["[B0 -> D*(2010)- a_1(1260)+]cc"],
+            'B02DstKPiPi': ["[B0 -> D*(2010)- K_1(1270)+]cc"],
+            'B02DstKKPi': ["[B0 -> D*(2010)- a_1(1260)+]cc"]
+        }
+        inputs = {
+            'B02DstPiPiPi': dstar + pipipi,
+            'B02DstKPiPi': dstar + kpipi,
+            'B02DstKKPi': dstar + kkpi
+        }
+        b02dsthhh_rs = makeB2XSels(decays, dname, inputs, self.config)
+        decays = {
+            'B02DstPiPiPiWS': ["[B0 -> D*(2010)+ a_1(1260)+]cc"],
+            'B02DstKPiPiWS': ["[B0 -> D*(2010)+ K_1(1270)+]cc"],
+            'B02DstKKPiWS': ["[B0 -> D*(2010)+ a_1(1260)+]cc"]
+        }
+        inputs = {
+            'B02DstPiPiPiWS': dstar + pipipi,
+            'B02DstKPiPiWS': dstar + kpipi,
+            'B02DstKKPiWS': dstar + kkpi
+        }
+        b02dsthhh_ws = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b02dsthhh_rs, 1.0))
+        self.lines.append(ProtoLine(b02dsthhh_ws, 0.1))
+
+#
+#    def _makeB02DstHHH(self,dname,d2x):
+#        '''Makes RS and WS B0 -> D*+ h-h+h- + c.c.'''
+#        pipipi = self.hhh.pipipi
+#        kpipi = self.hhh.kpipi
+#        kkpi = self.hhh.kkpi
+#        decays = {'B02DstPiPiPi': ["[B0 -> D*(2010)- a_1(1260)+]cc"],
+#                  'B02DstKPiPi' : ["[B0 -> D*(2010)- K_1(1270)+]cc"],
+#                  'B02DstKKPi':   ["[B0 -> D*(2010)- a_1(1260)+]cc"]}
+#        inputs = {'B02DstPiPiPi': d2x+pipipi, 'B02DstKPiPi': d2x+kpipi, 'B02DstKKPi': d2x+kkpi}
+#        b02dsthhh_rs = makeB2XSels(decays,dname,inputs,self.config)
+#        decays = {'B02DstPiPiPiWS': ["[B0 -> D*(2010)- a_1(1260)-]cc"],
+#                  'B02DstKPiPiWS' : ["[B0 -> D*(2010)- K_1(1270)-]cc"],
+#                  'B02DstKKPi'    : ["[B0 -> D*(2010)- a_1(1260)-]cc"]}
+#        inputs = {'B02DstPiPiPiWS': d2x+pipipi, 'B02DstKPiPiWS': d2x+kpipi, 'B02DstKKPiWS': d2x+kkpi}
+#        b02dsthhh_ws = makeB2XSels(decays,dname,inputs,self.config)
+#        self.lines.append(ProtoLine(b02dsthhh_rs,1.0))
+#        self.lines.append(ProtoLine(b02dsthhh_ws,0.1))
+#
+
+    def _makeB2D0HHH(self, dname, d2x):
+        '''Makes RS B+ -> D0 h+h-h+ (h=pi,K) + c.c.'''
+        pipipi = self.hhh.pipipi
+        kpipi = self.hhh.kpipi
+        kkpi = self.hhh.kkpi
+        decays = {
+            'B2D0PiPiPi': ["B+ -> D0 a_1(1260)+", "B- -> D0 a_1(1260)-"],
+            'B2D0KPiPi': ["B+ -> D0 K_1(1270)+", "B- -> D0 K_1(1270)-"],
+            'B2D0KKPi': ["B+ -> D0 a_1(1260)+", "B- -> D0 a_1(1260)-"]
+        }
+        inputs = {
+            'B2D0PiPiPi': d2x + pipipi,
+            'B2D0KPiPi': d2x + kpipi,
+            'B2D0KKPi': d2x + kkpi
+        }
+        b2d03h = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2d03h, 1.0))
+        return [
+            MergedSelection('B2D0HHHForBc' + dname, RequiredSelections=b2d03h)
+        ]
+
+    def _makeB2D0ppbarH(self, dname, d2x):
+        '''Makes B+ -> D0 p pbar h+ (h=pi,K) + c.c.'''
+        ppbarpi = self.hhh.ppbarpi
+        ppbark = self.hhh.ppbark
+        decays = {
+            'B2D0ppbarPi': ["B+ -> D0 a_1(1260)+", "B- -> D0 a_1(1260)-"],
+            'B2D0ppbarK': ["B+ -> D0 a_1(1260)+", "B- -> D0 a_1(1260)-"]
+        }
+        inputs = {'B2D0ppbarPi': d2x + ppbarpi, 'B2D0ppbarK': d2x + ppbark}
+        b2d0ppbarh = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2d0ppbarh, 1.0))
+
+    def _makeB02DppbarH(self, dname, d2x):
+        '''Makes B0 -> D- p pbar h+ (h=pi,K) + c.c.'''
+        ppbarpi = self.hhh.ppbarpi
+        ppbark = self.hhh.ppbark
+        decays = {
+            'B02DppbarPi': ["[B0 -> D- a_1(1260)+]cc"],
+            'B02DppbarK': ["[B0 -> D- a_1(1260)+]cc"]
+        }
+        inputs = {'B02DppbarPi': d2x + ppbarpi, 'B02DppbarK': d2x + ppbark}
+        b02dppbarh = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b02dppbarh, 1.0))
+
+    def _makeB2D0HHH_FULLDST(self, dname, d2x):
+        '''Makes RS B+ -> D0 h+h-h+ (h=pi,K) + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '5500*MeV'
+        config['AM_MIN'] = '5000*MeV'
+        pipipi = self.hhh.pipipi_tighterpi
+        decays = {'B2D0PiPiPi': ["B+ -> D0 a_1(1260)+", "B- -> D0 a_1(1260)-"]}
+        inputs = {'B2D0PiPiPi': d2x + pipipi}
+        b2d03h = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2d03h, 1.0))
+
+    def _makeB02DD(self):
+        '''Makes RS and WS B0 -> D+D- + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4950*MeV'
+        config['DZ1_MIN'] = '-1.5*mm'
+        config['DZ2_MIN'] = '-1.5*mm'
+        d4b2dd = [
+            filterSelection('D4B2DD', "(MM>1789.62*MeV) & (MM < 2048.49*MeV)",
+                            self.d.hhh_pid_tight)
+        ]
+        decays = {'B02DD': ["B0 -> D- D+"]}
+        inputs = {'B02DD': d4b2dd}
+        b2dd_rs = makeB2XSels(decays, '', inputs, config)
+        decays = {'B02DDWS': ["[B0 -> D+ D+]cc"]}
+        inputs = {'B02DDWS': d4b2dd}
+        b2dd_ws = makeB2XSels(decays, '', inputs, config)
+        self.lines.append(ProtoLine(b2dd_rs, 1.0))
+        self.lines.append(ProtoLine(b2dd_ws, 0.1))
+
+    def _makeB2D0D(self):
+        '''Makes B+ -> D+ D0'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4900*MeV'
+        decays = {'B2D0D': ["B- -> D0 D-", "B+ -> D0 D+"]}
+        inputs = {'B2D0D': self.d.hhh_pid_tight + self.d.hh_pid_tight}
+        b2d0dd02hh = makeB2XSels(decays, '', inputs, config)
+        self.lines.append(ProtoLine(b2d0dd02hh, 1.0))
+        inputs = {'B2D0D': self.d.hhh_pid + self.d.k3pi_pid}
+        b2d0dd02hhhh = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dd02hhhh, 1.0))
+        inputs = {'B2D0D': self.d.hhh_cf_pid + self.d.hh_pid}
+        b2d0dd2hhhcfpid = makeB2XSels(decays, 'D2HHHCFPID', inputs,
+                                      self.config)
+        return [
+            MergedSelection('B2D0DForBc', RequiredSelections=b2d0dd2hhhcfpid)
+        ]
+
+    def _makeB02D0D0(self):
+        '''Makes B0 -> D0 D0'''
+        dec = ["B0 -> D0 D0"]
+        decays = {
+            'B02D0D0D02HHD02HH': dec,
+            'B02D0D0D02HHD02K3Pi': dec,
+            'B02D0D0D02K3PiD02K3Pi': dec
+        }
+        inputs = {
+            'B02D0D0D02HHD02HH': self.d.hh_pid,
+            'B02D0D0D02HHD02K3Pi': self.d.hh_pid + self.d.k3pi_pid,
+            'B02D0D0D02K3PiD02K3Pi': self.d.k3pi_pid
+        }
+        b2d0d0 = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0d0, 1.0))
+
+    def _makeB02DstD(self):
+        '''Makes the RS and WS B+ -> D*+- D-+ + c.c.'''
+        decays = {'B02DstD': ["[B0 -> D*(2010)- D+]cc"]}
+        inputs = {'B02DstD': self.d.hhh_pid + self.dst.d0pi_pid}
+        b2dstd_rs = makeB2XSels(decays, '', inputs, self.config)
+        decays = {'B02DstDWS': ["[B0 -> D*(2010)- D-]cc"]}
+        inputs = {'B02DstDWS': self.d.hhh_pid + self.dst.d0pi_pid}
+        b2dstd_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd_rs, 1.0))
+        self.lines.append(ProtoLine(b2dstd_ws, 0.1))
+
+    def _makeB02DstDD02K3Pi(self):
+        '''Makes the B0 -> D*+- D-+ '''
+        decays = {'B02DstDD02K3Pi': ["[B0 -> D*(2010)- D+]cc"]}
+        inputs = {'B02DstDD02K3Pi': self.dst.d0pi_k3pi + self.d.hhh_pid}
+        b2dstdd02k3pi = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdd02k3pi, 1.0))
+
+    def _makeB2DstD0(self):
+        '''Makes B+- -> D*+- D0'''
+        decays = {'B2DstD0': ["B+ -> D*(2010)+ D0", "B- -> D*(2010)- D0"]}
+        inputs = {'B2DstD0': self.dst.d0pi_pid + self.d.hh_pid}
+        b2dstd0 = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0, 1.0))
+        inputs = {'B2DstD0': self.dst.d0pi_pid + self.d.k3pi_pid}
+        b2dstd0 = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0, 1.0))
+
+    def _makeB02DstDst(self):
+        '''Makes the RS and WS B+ -> D*+- D*-+ + c.c.'''
+        decays = {'B02DstDst': ["B0 -> D*(2010)- D*(2010)+"]}
+        inputs = {'B02DstDst': self.dst.d0pi_pid}
+        b2dstdst_rs = makeB2XSels(decays, '', inputs, self.config)
+        decays = {'B02DstDstWS': ["[B0 -> D*(2010)- D*(2010)-]cc"]}
+        inputs = {'B02DstDstWS': self.dst.d0pi_pid}
+        b2dstdst_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdst_rs, 1.0))
+        self.lines.append(ProtoLine(b2dstdst_ws, 0.1))
+
+    # DDX builders
+
+    def _makeB2DDH(self):
+        '''Makes RS and WS B+ -> D+D-H+ + c.c.'''
+        decays = {
+            'B2DDK': ["[B+ -> D- D+ K+]cc", "[B+ -> D+ D+ K-]cc"],
+            'B2DDPi': ["[B+ -> D- D+ pi+]cc", "[B+ -> D+ D+ pi-]cc"]
+        }
+        inputs = {
+            'B2DDK': self.d.d_and_ds_cf_pid + self.topoKaons_PID,
+            'B2DDPi': self.d.d_and_ds_cf_pid + self.topoPions_PID
+        }
+        b2ddh_rs = makeB2XSels(decays, '', inputs, self.config)
+        decays = {
+            'B2DDKWS': ["[B+ -> D+ D+ K+]cc"],
+            'B2DDPiWS': ["[B+ -> D+ D+ pi+]cc"]
+        }
+        inputs = {
+            'B2DDKWS': self.d.d_and_ds_cf_pid + self.topoKaons_PID,
+            'B2DDPiWS': self.d.d_and_ds_cf_pid + self.topoPions_PID
+        }
+        b2ddh_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2ddh_rs, 1.0))
+        self.lines.append(ProtoLine(b2ddh_ws, 0.1))
+
+    def _makeB02D0DH(self):
+        '''Makes RS and WS B0 -> D+ D0 H-'''
+        decays = {
+            'B02D0DK': ["B0 -> D0 D- K+", "B0 -> D0 D+ K-"],
+            'B02D0DPi': ["B0 -> D0 D- pi+", "B0 -> D0 D+ pi-"]
+        }
+        inputs = {
+            'B02D0DK':
+            self.d.d_and_ds_cf_pid + self.d.hh_pid_tight + self.topoKaons_PID,
+            'B02D0DPi':
+            self.d.d_and_ds_cf_pid + self.d.hh_pid_tight + self.topoPions_PID
+        }
+        b2d0dh_rs = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dh_rs, 1.0))
+        inputs = {
+            'B02D0DK':
+            self.d.d_and_ds_cf_pid + self.d.k3pi_pid_tight +
+            self.topoKaons_PID,
+            'B02D0DPi':
+            self.d.d_and_ds_cf_pid + self.d.k3pi_pid_tight + self.topoPions_PID
+        }
+        b2d0dh_rs = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dh_rs, 1.0))
+
+
+        decays = { 'B02D0DKWS': ["B0 -> D0 D- K-", "B0 -> D0 D+ K+"] }
+        inputs = {
+            'B02D0DKWS':
+            self.d.d_and_ds_cf_pid + self.d.hh_pid_tight + self.topoKaons_PID
+        }
+        b2d0dk_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dk_ws, 1.0))
+        inputs = {
+            'B02D0DKWS':
+            self.d.d_and_ds_cf_pid + self.d.k3pi_pid_tight + self.topoKaons_PID
+        }
+        b2d0dk_ws = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dk_ws, 1.0))
+
+
+        decays = { 'B02D0DPiWS': ["B0 -> D0 D- pi-", "B0 -> D0 D+ pi+"] }
+        inputs = {
+            'B02D0DPiWS':
+            self.d.d_and_ds_cf_pid + self.d.hh_pid_tight + self.topoPions_PID
+        }
+        b2d0dpi_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dpi_ws, 0.1))
+        inputs = {
+            'B02D0DPiWS':
+            self.d.d_and_ds_cf_pid + self.d.k3pi_pid_tight + self.topoPions_PID
+        }
+        b2d0dpi_ws = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dpi_ws, 0.1))
+
+    def _makeB2D0D0H(self):
+        '''Makes B+- -> D0 D0 H+-'''
+        dec = {
+            'B2D0D0K': ["B+ -> D0 D0 K+", "B- -> D0 D0 K-"],
+            'B2D0D0Pi': ["B+ -> D0 D0 pi+", "B- -> D0 D0 pi-"]
+        }
+        decays = {
+            'B2D0D0KD02HHD02HH': dec['B2D0D0K'],
+            'B2D0D0KD02HHD02K3Pi': dec['B2D0D0K'],
+            'B2D0D0KD02K3PiD02K3Pi': dec['B2D0D0K'],
+            'B2D0D0PiD02HHD02HH': dec['B2D0D0Pi'],
+            'B2D0D0PiD02HHD02K3Pi': dec['B2D0D0Pi'],
+            'B2D0D0PiD02K3PiD02K3Pi': dec['B2D0D0Pi']
+        }
+        inputs = {
+            'B2D0D0KD02HHD02HH':
+            self.d.hh_pid_tight + self.topoKaons_PID,
+            'B2D0D0KD02HHD02K3Pi':
+            self.d.hh_pid_tight + self.d.k3pi_pid_tight + self.topoKaons_PID,
+            'B2D0D0KD02K3PiD02K3Pi':
+            self.d.k3pi_pid_tight + self.topoKaons_PID,
+            'B2D0D0PiD02HHD02HH':
+            self.d.hh_pid_tight + self.topoPions_PID,
+            'B2D0D0PiD02HHD02K3Pi':
+            self.d.hh_pid_tight + self.d.k3pi_pid_tight + self.topoPions_PID,
+            'B2D0D0PiD02K3PiD02K3Pi':
+            self.d.k3pi_pid_tight + self.topoPions_PID
+        }
+        b2d0d0h = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0d0h, 1.0))
+
+    def _makeB2DstDH(self):
+        '''Makes the RS and WS B+- -> D*+- D-+ H+- + c.c.'''
+        decays = {
+            'B2DstDK': [
+                "[B+ -> D*(2010)- D+ K+]cc", "[B+ -> D*(2010)+ D- K+]cc",
+                "[B+ -> D*(2010)+ D+ K-]cc"
+            ],
+            'B2DstDPi': [
+                "[B+ -> D*(2010)- D+ pi+]cc", "[B+ -> D*(2010)+ D- pi+]cc",
+                "[B+ -> D*(2010)+ D+ pi-]cc"
+            ]
+        }
+        inputs = {
+            'B2DstDK':
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_pid + self.topoKaons_PID,
+            'B2DstDPi':
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_pid + self.topoPions_PID
+        }
+        b2dstdh_rs = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdh_rs, 1.0))
+        inputs = {
+            'B2DstDK':
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_k3pi_pid +
+            self.topoKaons_PID,
+            'B2DstDPi':
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_k3pi_pid +
+            self.topoPions_PID
+        }
+        b2dstdh_rs = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdh_rs, 1.0))
+        decays = {
+            'B2DstDKWS': ["[B- -> D*(2010)- D- K-]cc"],
+            'B2DstDPiWS': ["[B- -> D*(2010)- D- pi-]cc"]
+        }
+        inputs = {
+            'B2DstDKWS':
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_pid + self.topoKaons_PID,
+            'B2DstDPiWS':
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_pid + self.topoPions_PID
+        }
+        b2dstdh_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdh_ws, 0.1))
+        inputs = {
+            'B2DstDKWS':
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_k3pi_pid +
+            self.topoKaons_PID,
+            'B2DstDPiWS':
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_k3pi_pid +
+            self.topoPions_PID
+        }
+        b2dstdh_ws = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdh_ws, 0.1))
+
+    def _makeB02DstD0H(self):
+        '''Makes RS and WS B0 -> D*+- D0 H-+'''
+        decays = {
+            'B02DstD0K': ["B0 -> D*(2010)+ D0 K-", "B0 -> D*(2010)- D0 K+"],
+            'B02DstD0Pi': ["B0 -> D*(2010)+ D0 pi-", "B0 -> D*(2010)- D0 pi+"]
+        }
+        inputs = {
+            'B02DstD0K':
+            self.dst.d0pi_pid + self.d.hh_pid_tight + self.topoKaons_PID,
+            'B02DstD0Pi':
+            self.dst.d0pi_pid + self.d.hh_pid_tight + self.topoPions_PID
+        }
+        b2dstd0h_rs = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0h_rs, 1.0))
+        inputs = {
+            'B02DstD0K':
+            self.dst.d0pi_pid + self.d.k3pi_pid_tight + self.topoKaons_PID,
+            'B02DstD0Pi':
+            self.dst.d0pi_pid + self.d.k3pi_pid_tight + self.topoPions_PID
+        }
+        b2dstd0h_rs = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0h_rs, 1.0))
+        inputs = {
+            'B02DstD0K':
+            self.dst.d0pi_k3pi_pid + self.d.hh_pid_tight + self.topoKaons_PID,
+            'B02DstD0Pi':
+            self.dst.d0pi_k3pi_pid + self.d.hh_pid_tight + self.topoPions_PID
+        }
+        b2dstd0h_rs = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0h_rs, 1.0))
+        inputs = {
+            'B02DstD0K':
+            self.dst.d0pi_k3pi_pid + self.d.k3pi_pid_tight +
+            self.topoKaons_PID,
+            'B02DstD0Pi':
+            self.dst.d0pi_k3pi_pid + self.d.k3pi_pid_tight + self.topoPions_PID
+        }
+        b2dstd0h_rs = makeB2XSels(decays, 'DstarD02K3PiD02K3Pi', inputs,
+                                  self.config)
+        self.lines.append(ProtoLine(b2dstd0h_rs, 1.0))
+        decays = {
+            'B02DstD0KWS': ["B0 -> D*(2010)+ D0 K+", "B0 -> D*(2010)- D0 K-"],
+            'B02DstD0PiWS':
+            ["B0 -> D*(2010)+ D0 pi+", "B0 -> D*(2010)- D0 pi-"]
+        }
+        inputs = {
+            'B02DstD0KWS':
+            self.dst.d0pi_pid + self.d.hh_pid_tight + self.topoKaons_PID,
+            'B02DstD0PiWS':
+            self.dst.d0pi_pid + self.d.hh_pid_tight + self.topoPions_PID
+        }
+        b2dstd0h_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0h_ws, 0.1))
+        inputs = {
+            'B02DstD0KWS':
+            self.dst.d0pi_pid + self.d.k3pi_pid_tight + self.topoKaons_PID,
+            'B02DstD0PiWS':
+            self.dst.d0pi_pid + self.d.k3pi_pid_tight + self.topoPions_PID
+        }
+        b2dstd0h_ws = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0h_ws, 0.1))
+        inputs = {
+            'B02DstD0KWS':
+            self.dst.d0pi_k3pi_pid + self.d.hh_pid_tight + self.topoKaons_PID,
+            'B02DstD0PiWS':
+            self.dst.d0pi_k3pi_pid + self.d.hh_pid_tight + self.topoPions_PID
+        }
+        b2dstd0h_ws = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0h_ws, 0.1))
+        inputs = {
+            'B02DstD0KWS':
+            self.dst.d0pi_k3pi_pid + self.d.k3pi_pid_tight +
+            self.topoKaons_PID,
+            'B02DstD0PiWS':
+            self.dst.d0pi_k3pi_pid + self.d.k3pi_pid_tight + self.topoPions_PID
+        }
+        b2dstd0h_ws = makeB2XSels(decays, 'DstarD02K3PiD02K3Pi', inputs,
+                                  self.config)
+        self.lines.append(ProtoLine(b2dstd0h_ws, 0.1))
+
+    def _makeB2DstDstH(self):
+        '''Makes the RS and WS B+ -> D*+- D*-+ H+ + c.c.'''
+        decays = {
+            'B2DstDstK': [
+                "[B+ -> D*(2010)- D*(2010)+ K+]cc",
+                "[B+ -> D*(2010)+ D*(2010)+ K-]cc"
+            ],
+            'B2DstDstPi': [
+                "[B+ -> D*(2010)- D*(2010)+ pi+]cc",
+                "[B+ -> D*(2010)+ D*(2010)+ pi-]cc"
+            ]
+        }
+        inputs = {
+            'B2DstDstK': self.dst.d0pi_pid + self.topoKaons_PID,
+            'B2DstDstPi': self.dst.d0pi_pid + self.topoPions_PID
+        }
+        b2dstdsth_rs = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdsth_rs, 1.0))
+        inputs = {
+            'B2DstDstK':
+            self.dst.d0pi_pid + self.dst.d0pi_k3pi_pid + self.topoKaons_PID,
+            'B2DstDstPi':
+            self.dst.d0pi_pid + self.dst.d0pi_k3pi_pid + self.topoPions_PID
+        }
+        b2dstdsth_rs = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdsth_rs, 1.0))
+        inputs = {
+            'B2DstDstK': self.dst.d0pi_k3pi_pid + self.topoKaons_PID,
+            'B2DstDstPi': self.dst.d0pi_k3pi_pid + self.topoPions_PID
+        }
+        b2dstdsth_rs = makeB2XSels(decays, 'DstarD02K3PiDstarD02K3Pi', inputs,
+                                   self.config)
+        self.lines.append(ProtoLine(b2dstdsth_rs, 1.0))
+        decays = {
+            'B2DstDstKWS': ["[B- -> D*(2010)- D*(2010)- K-]cc"],
+            'B2DstDstPiWS': ["[B- -> D*(2010)- D*(2010)- pi-]cc"]
+        }
+        inputs = {
+            'B2DstDstKWS': self.dst.d0pi_pid + self.topoKaons_PID,
+            'B2DstDstPiWS': self.dst.d0pi_pid + self.topoPions_PID
+        }
+        b2dstdsth_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdsth_ws, 0.1))
+        inputs = {
+            'B2DstDstKWS':
+            self.dst.d0pi_pid + self.dst.d0pi_k3pi_pid + self.topoKaons_PID,
+            'B2DstDstPiWS':
+            self.dst.d0pi_pid + self.dst.d0pi_k3pi_pid + self.topoPions_PID
+        }
+        b2dstdsth_ws = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdsth_ws, 0.1))
+        inputs = {
+            'B2DstDstKWS': self.dst.d0pi_k3pi_pid + self.topoKaons_PID,
+            'B2DstDstPiWS': self.dst.d0pi_k3pi_pid + self.topoPions_PID
+        }
+        b2dstdsth_ws = makeB2XSels(decays, 'DstarD02K3PiDstarD02K3Pi', inputs,
+                                   self.config)
+        self.lines.append(ProtoLine(b2dstdsth_ws, 0.1))
+
+    def _makeB2Dst2460DH(self):
+        '''Makes RS and WS B -> D*2(2460)+- D-+ H+-'''
+        decays = {
+            'B2Dst2460DK':
+            ["[B+ -> D*_2(2460)+ D- K+]cc", "[B+ -> D*_2(2460)- D+ K+]cc"],
+            'B2Dst2460DPi':
+            ["[B+ -> D*_2(2460)+ D- pi+]cc", "[B+ -> D*_2(2460)- D+ pi+]cc"]
+        }
+        inputs = {
+            'B2Dst2460DK':
+            self.dst.d0pi_2460_pid + self.d.d_and_ds_cf_pid +
+            self.topoKaons_PID,
+            'B2Dst2460DPi':
+            self.dst.d0pi_2460_pid + self.d.d_and_ds_cf_pid +
+            self.topoPions_PID
+        }
+        rs = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {
+            'B2Dst2460DKWS': ["[B+ -> D*_2(2460)+ D+ K+]cc"],
+            'B2Dst2460DPiWS': ["[B+ -> D*_2(2460)+ D+ pi+]cc"]
+        }
+        inputs = {
+            'B2Dst2460DKWS':
+            self.dst.d0pi_2460_pid + self.d.d_and_ds_cf_pid +
+            self.topoKaons_PID,
+            'B2Dst2460DPiWS':
+            self.dst.d0pi_2460_pid + self.d.d_and_ds_cf_pid +
+            self.topoPions_PID
+        }
+        ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeB2D0st2460D0H(self):
+        '''Makes B -> D*2(2460)0 D0 H+-'''
+        decays = {
+            'B2D0st2460D0K':
+            ["B+ -> D*_2(2460)0 D0 K+", "B- -> D*_2(2460)0 D0 K-"],
+            'B2D0st2460D0Pi':
+            ["B+ -> D*_2(2460)0 D0 pi+", "B- -> D*_2(2460)0 D0 pi-"]
+        }
+        input = self.dst.dpi_2460_pid + self.d.kpi_pid + self.topoKaons_PID
+        inputs = {
+            'B2D0st2460D0K':
+            self.dst.dpi_2460_pid + self.d.kpi_pid + self.topoKaons_PID,
+            'B2D0st2460D0Pi':
+            self.dst.dpi_2460_pid + self.d.kpi_pid + self.topoPions_PID
+        }
+        rs = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeB02D0D0Kst(self):
+        '''Makes the RS B0 -> D0 D0 K*'''
+        dec = ["B0 -> D0 D0 K*(892)0", "B0 -> D0 D0 K*(892)~0"]
+        decays = {
+            'B02D0D0KstD02HHD02HH': dec,
+            'B02D0D0KstD02HHD02K3Pi': dec,
+            'B02D0D0KstD02K3PiD02K3Pi': dec
+        }
+        inputs = {
+            'B02D0D0KstD02HHD02HH':
+            self.d.hh_pid_tight + self.hh.kpi,
+            'B02D0D0KstD02HHD02K3Pi':
+            self.d.hh_pid_tight + self.d.k3pi_pid_tight + self.hh.kpi,
+            'B02D0D0KstD02K3PiD02K3Pi':
+            self.d.k3pi_pid_tight + self.hh.kpi
+        }
+        b2ddkst = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2ddkst, 1.0))
+
+    def _makeB02DDKst(self):
+        '''Makes the RS B0 -> D+ D- K*'''
+        decays = {
+            'B02DDKst': ["B0 -> D+ D- K*(892)0", "B0 -> D+ D- K*(892)~0"]
+        }
+        inputs = {'B02DDKst': self.d.d_and_ds_cf_pid + self.hh.kpi}
+        b2ddkst = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2ddkst, 1.0))
+
+    def _makeB02DstDKst(self):
+        '''Makes the RS B0 -> D*+ D- K*'''
+        decays = {
+            'B02DstDKst': [
+                "B0 -> D*(2010)+ D- K*(892)0", "B0 -> D+ D*(2010)- K*(892)~0",
+                "B0 -> D- D*(2010)+ K*(892)~0", "B0 -> D*(2010)- D+ K*(892)0"
+            ]
+        }
+        inputs = {
+            'B02DstDKst':
+            self.dst.d0pi_pid + self.d.d_and_ds_cf_pid + self.hh.kpi
+        }
+        b2dstdkst = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdkst, 1.0))
+        inputs = {
+            'B02DstDKst':
+            self.dst.d0pi_k3pi_pid + self.d.d_and_ds_cf_pid + self.hh.kpi
+        }
+        b2dstdkst = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdkst, 1.0))
+
+    def _makeB02DstDstKst(self):
+        '''Makes the RS B0 -> D*+ D*- K*'''
+        decays = {
+            'B02DstDstKst': [
+                "B0 -> D*(2010)+ D*(2010)- K*(892)0",
+                "B0 -> D*(2010)- D*(2010)+ K*(892)~0"
+            ]
+        }
+        inputs = {'B02DstDstKst': self.dst.d0pi_pid + self.hh.kpi}
+        b2dstdstkst = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdstkst, 1.0))
+        inputs = {
+            'B02DstDstKst':
+            self.dst.d0pi_pid + self.dst.d0pi_k3pi_pid + self.hh.kpi
+        }
+        b2dstdstkst = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdstkst, 1.0))
+        inputs = {'B02DstDstKst': self.dst.d0pi_k3pi_pid + self.hh.kpi}
+        b2dstdstkst = makeB2XSels(decays, 'DstarD02K3PiDstarD02K3Pi', inputs,
+                                  self.config)
+        self.lines.append(ProtoLine(b2dstdstkst, 1.0))
+
+    def _makeB2DD0Kst(self):
+        '''Makes the RS B+ -> D+ D~0 K*'''
+        decays = {
+            'B2DD0Kst': ["B- -> D- D0 K*(892)~0", "B+ -> D+ D0 K*(892)0"]
+        }
+        inputs = {
+            'B2DD0Kst':
+            self.d.d_and_ds_cf_pid + self.d.hh_pid_tight + self.hh.kpi
+        }
+        b2dd0kst = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dd0kst, 1.0))
+        inputs = {
+            'B2DD0Kst':
+            self.d.d_and_ds_cf_pid + self.d.k3pi_pid_tight + self.hh.kpi
+        }
+        b2dd0kst = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dd0kst, 1.0))
+
+    def _makeB2DstD0Kst(self):
+        '''Makes the RS B+ -> D*(2010)+ D~0 K*'''
+        decays = {
+            'B2DstD0Kst':
+            ["B- -> D*(2010)- D0 K*(892)~0", "B+ -> D*(2010)+ D0 K*(892)0"]
+        }
+        inputs = {
+            'B2DstD0Kst': self.dst.d0pi_pid + self.d.hh_pid_tight + self.hh.kpi
+        }
+        b2dstd0kst = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0kst, 1.0))
+        inputs = {
+            'B2DstD0Kst':
+            self.dst.d0pi_k3pi_pid + self.d.hh_pid_tight + self.hh.kpi
+        }
+        b2dstd0kst = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0kst, 1.0))
+        inputs = {
+            'B2DstD0Kst':
+            self.dst.d0pi_pid + self.d.k3pi_pid_tight + self.hh.kpi
+        }
+        b2dstd0kst = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0kst, 1.0))
+        inputs = {
+            'B2DstD0Kst':
+            self.dst.d0pi_k3pi_pid + self.d.k3pi_pid_tight + self.hh.kpi
+        }
+        b2dstd0kst = makeB2XSels(decays, 'DstarD02K3PiD02K3Pi', inputs,
+                                 self.config)
+        self.lines.append(ProtoLine(b2dstd0kst, 1.0))
+
+    def _makeB02DDKS(self, ks):
+        '''Makes RS and WS B0 -> D+D-KS'''
+        decays = {'B02DDKS' + ks: ["B0 -> D- D+ KS0"]}
+        inputs = {'B02DDKS' + ks: self.d.d_and_ds_cf_pid + self.ks[ks]}
+        b2ddks_rs = makeB2XSels(decays, '', inputs, self.config)
+        decays = {'B02DDKSWS' + ks: ["[B+ -> D+ D+ KS0]cc"]}
+        inputs = {'B02DDKSWS' + ks: self.d.d_and_ds_cf_pid + self.ks[ks]}
+        b2ddks_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2ddks_rs, 1.0))
+        self.lines.append(ProtoLine(b2ddks_ws, 0.1))
+
+    def _makeB2D0DKS(self, ks):
+        '''Makes B+ -> D+ D0 KS + c.c.'''
+        decays = {'B2D0DKS' + ks: ["B+ -> D0 D+ KS0", "B- -> D0 D- KS0"]}
+        inputs = {
+            'B2D0DKS' + ks:
+            self.d.d_and_ds_cf_pid + self.d.hh_pid_tight + self.ks[ks]
+        }
+        b2d0dks = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dks, 1.0))
+        inputs = {
+            'B2D0DKS' + ks:
+            self.d.d_and_ds_cf_pid + self.d.k3pi_pid_tight + self.ks[ks]
+        }
+        b2d0dks = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dks, 1.0))
+
+    def _makeB02D0D0KS(self, ks):
+        '''Makes B0 -> D0 D0 KS'''
+        dec = ["B0 -> D0 D0 KS0"]
+        decays = {
+            'B02D0D0KSD02HHD02HH' + ks: dec,
+            'B02D0D0KSD02HHD02K3Pi' + ks: dec,
+            'B02D0D0KSD02K3PiD02K3Pi' + ks: dec
+        }
+        inputs = {
+            'B02D0D0KSD02HHD02HH' + ks:
+            self.d.hh_pid_tight + self.ks[ks],
+            'B02D0D0KSD02HHD02K3Pi' + ks:
+            self.d.hh_pid_tight + self.d.k3pi_pid_tight + self.ks[ks],
+            'B02D0D0KSD02K3PiD02K3Pi' + ks:
+            self.d.k3pi_pid_tight + self.ks[ks]
+        }
+        b2d0d0ks = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0d0ks, 1.0))
+
+    def _makeB02DstDKS(self, ks):
+        '''Makes the RS and WS B0 -> D*+- D-+ KS + c.c.'''
+        decays = {'B02DstDKS' + ks: ["[B0 -> D*(2010)- D+ KS0]cc"]}
+        inputs = {
+            'B02DstDKS' + ks:
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_pid + self.ks[ks]
+        }
+        b2dstdks_rs = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdks_rs, 1.0))
+        inputs = {
+            'B02DstDKS' + ks:
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_k3pi_pid + self.ks[ks]
+        }
+        b2dstdks_rs = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdks_rs, 1.0))
+        decays = {'B02DstDKSWS' + ks: ["[B0 -> D*(2010)- D- KS0]cc"]}
+        inputs = {
+            'B02DstDKSWS' + ks:
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_pid + self.ks[ks]
+        }
+        b2dstdks_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdks_ws, 0.1))
+        inputs = {
+            'B02DstDKSWS' + ks:
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_k3pi_pid + self.ks[ks]
+        }
+        b2dstdks_ws = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdks_ws, 0.1))
+
+    def _makeB2DstD0KS(self, ks):
+        '''Makes B+- -> D*+- D0 KS'''
+        decays = {
+            'B2DstD0KS' + ks:
+            ["B+ -> D*(2010)+ D0 KS0", "B- -> D*(2010)- D0 KS0"]
+        }
+        inputs = {
+            'B2DstD0KS' + ks:
+            self.dst.d0pi_pid + self.d.hh_pid_tight + self.ks[ks]
+        }
+        b2dstd0ks = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0ks, 1.0))
+        inputs = {
+            'B2DstD0KS' + ks:
+            self.dst.d0pi_pid + self.d.k3pi_pid_tight + self.ks[ks]
+        }
+        b2dstd0ks = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0ks, 1.0))
+        inputs = {
+            'B2DstD0KS' + ks:
+            self.dst.d0pi_k3pi_pid + self.d.hh_pid_tight + self.ks[ks]
+        }
+        b2dstd0ks = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstd0ks, 1.0))
+        inputs = {
+            'B2DstD0KS' + ks:
+            self.dst.d0pi_k3pi_pid + self.d.k3pi_pid_tight + self.ks[ks]
+        }
+        b2dstd0ks = makeB2XSels(decays, 'DstarD02K3PiD02K3Pi', inputs,
+                                self.config)
+        self.lines.append(ProtoLine(b2dstd0ks, 1.0))
+
+    def _makeB02DstDstKS(self, ks):
+        '''Makes the RS and WS B0 -> D*+- D*-+ KS'''
+        decays = {'B02DstDstKS' + ks: ["B0 -> D*(2010)- D*(2010)+ KS0"]}
+        inputs = {'B02DstDstKS' + ks: self.dst.d0pi_pid + self.ks[ks]}
+        b2dstdstks_rs = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdstks_rs, 1.0))
+        inputs = {
+            'B02DstDstKS' + ks:
+            self.dst.d0pi_pid + self.dst.d0pi_k3pi_pid + self.ks[ks]
+        }
+        b2dstdstks_rs = makeB2XSels(decays, 'DstarD02K3Pi', inputs,
+                                    self.config)
+        self.lines.append(ProtoLine(b2dstdstks_rs, 1.0))
+        inputs = {'B02DstDstKS' + ks: self.dst.d0pi_k3pi_pid + self.ks[ks]}
+        b2dstdstks_rs = makeB2XSels(decays, 'DstarD02K3PiDstarD02K3Pi', inputs,
+                                    self.config)
+        self.lines.append(ProtoLine(b2dstdstks_rs, 1.0))
+        decays = {'B02DstDstKSWS' + ks: ["[B0 -> D*(2010)- D*(2010)- KS0]cc"]}
+        inputs = {'B02DstDstKSWS' + ks: self.dst.d0pi_pid + self.ks[ks]}
+        b2dstdstks_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dstdstks_ws, 0.1))
+        inputs = {
+            'B02DstDstKSWS' + ks:
+            self.dst.d0pi_pid + self.dst.d0pi_k3pi_pid + self.ks[ks]
+        }
+        b2dstdstks_ws = makeB2XSels(decays, 'DstarD02K3Pi', inputs,
+                                    self.config)
+        self.lines.append(ProtoLine(b2dstdstks_ws, 0.1))
+        inputs = {'B02DstDstKSWS' + ks: self.dst.d0pi_k3pi_pid + self.ks[ks]}
+        b2dstdstks_ws = makeB2XSels(decays, 'DstarD02K3PiDstarD02K3Pi', inputs,
+                                    self.config)
+        self.lines.append(ProtoLine(b2dstdstks_ws, 0.1))
+
+    def _makeB2D0DKK(self):
+        '''Makes RS B- -> D0D-K+K- + c.c. B- ->Ds- D0 K+ K+ + cc'''
+        decays = {
+            'B2D0DKK': [
+                "B- -> D0 D- K+ K-", "B+ -> D- D0 K+ K+", "B+ -> D0 D+ K+ K-",
+                "B- -> D+ D0 K- K-"
+            ]
+        }
+        inputs = {
+            'B2D0DKK':
+            self.d.d_and_ds_cf_pid + self.d.hh_pid_tight + self.topoKaons_PID
+        }
+        b2d0dkk = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dkk, 1.0))
+        inputs = {
+            'B2D0DKK':
+            self.d.d_and_ds_cf_pid + self.d.k3pi_pid_tight + self.topoKaons_PID
+        }
+        b2d0dkk = makeB2XSels(decays, 'D2K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dkk, 1.0))
+
+    def _makeB2D0DKPi(self):
+        '''Makes RS B+ -> D0D-K+pi+ + c.c.'''
+        decays = {'B2D0DKPi': ["B+ -> D- D0 K+ pi+", "B- -> D+ D0 K- pi-"]}
+        inputs = {
+            'B2D0DKPi':
+            self.d.d_and_ds_cf_pid + self.d.hh_pid_tight + self.topoKaons_PID +
+            self.topoPions
+        }
+        b2d0dkpi = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dkpi, 1.0))
+        inputs = {
+            'B2D0DKPi':
+            self.d.d_and_ds_cf_pid + self.d.k3pi_pid_tight + self.topoKaons_PID
+            + self.topoPions
+        }
+        b2d0dkpi = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0dkpi, 1.0))
+
+    def _makeB02DDKK(self):
+        '''Makes RS B0 -> D+D-K+K- + c.c.'''
+        decays = {'B02DDKK': ["B0 -> D+ D- K+ K-"]}
+        inputs = {'B02DDKK': self.d.d_and_ds_cf_pid + self.topoKaons_PID}
+        b02ddkk = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b02ddkk, 1.0))
+
+    def _makeB02DstDKK(self):
+        '''Makes RS B0 -> Dst+D-K+K- + c.c.'''
+        decays = {'B02DstDKK': ["[B0 -> D*(2010)+ D- K+ K-]cc"]}
+        inputs = {
+            'B02DstDKK':
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_pid + self.topoKaons_PID
+        }
+        b02dstdkk = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b02dstdkk, 1.0))
+        inputs = {
+            'B02DstDKK':
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_k3pi_pid +
+            self.topoKaons_PID
+        }
+        b02dstdkk = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b02dstdkk, 1.0))
+
+    def _makeB02DstDstKK(self):
+        '''Makes RS B0 -> Dst+Dst-K+K- + c.c.'''
+        decays = {'B02DstDstKK': ["B0 -> D*(2010)+ D*(2010)- K+ K-"]}
+        inputs = {'B02DstDstKK': self.dst.d0pi_pid + self.topoKaons_PID}
+        b02dstdstkk = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b02dstdstkk, 1.0))
+        inputs = {
+            'B02DstDstKK':
+            self.dst.d0pi_pid + self.dst.d0pi_k3pi_pid + self.topoKaons_PID
+        }
+        b02dstdstkk = makeB2XSels(decays, 'DstarD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(b02dstdstkk, 1.0))
+        inputs = {'B02DstDstKK': self.dst.d0pi_k3pi_pid + self.topoKaons_PID}
+        b02dstdstkk = makeB2XSels(decays, 'DstarD02K3PiDstarD02K3Pi', inputs,
+                                  self.config)
+        self.lines.append(ProtoLine(b02dstdstkk, 1.0))
+
+    def _makeB02D0D0KK(self):
+        '''Makes RS B0 -> D0D~0K+K- + c.c.'''
+        dec = ["B0 -> D0 D0 K+ K-"]
+        decays = {
+            'B02D0D0KKD02HHD02HH': dec,
+            'B02D0D0KKD02HHD02K3Pi': dec,
+            'B02D0D0KKD02K3PiD02K3Pi': dec
+        }
+        inputs = {
+            'B02D0D0KKD02HHD02HH':
+            self.d.hh_pid_tight + self.topoKaons_PID,
+            'B02D0D0KKD02HHD02K3Pi':
+            self.d.hh_pid_tight + self.d.k3pi_pid_tight + self.topoKaons_PID,
+            'B02D0D0KKD02K3PiD02K3Pi':
+            self.d.k3pi_pid_tight + self.topoKaons_PID
+        }
+        b02d0d0kk_rs = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b02d0d0kk_rs, 1.0))
+        dec = ["B0 -> D0 D0 K+ K+", "B0 -> D0 D0 K- K-"]
+        decays = {
+            'B02D0D0KKWSD02HHD02HH': dec,
+            'B02D0D0KKWSD02HHD02K3Pi': dec,
+            'B02D0D0KKWSD02K3PiD02K3Pi': dec
+        }
+        inputs = {
+            'B02D0D0KKWSD02HHD02HH':
+            self.d.hh_pid_tight + self.topoKaons,
+            'B02D0D0KKWSD02HHD02K3Pi':
+            self.d.hh_pid_tight + self.d.k3pi_pid_tight + self.topoKaons,
+            'B02D0D0KKWSD02K3PiD02K3Pi':
+            self.d.k3pi_pid_tight + self.topoKaons
+        }
+        b02d0d0kk_ws = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b02d0d0kk_ws, 1.0))
+
+    def _makeB2Dst0D0K(self):
+        '''Makes B+ -> D*0 D0 K+ and B0 -> D*0 D- K+'''
+        decays = {
+            'B2Dst0D0KDst02D0Pi0ResolvedD02HH': ["[B+ -> D*(2007)0 D0 K+]cc"],
+            'B2Dst0D0KDst02D0GammaD02HH': ["[B+ -> D*(2007)0 D0 K+]cc"],
+            'B02Dst0DKDst02D0Pi0ResolvedD2HHH': ["[B0 -> D*(2007)0 D- K+]cc"],
+            'B02Dst0DKDst02D0GammaD2HHH': ["[B0 -> D*(2007)0 D- K+]cc"]
+        }
+        inputs = {
+            'B2Dst0D0KDst02D0Pi0ResolvedD02HH':
+            self.dst.d0pi0_resolved_pid + self.d.hh_pid_tight +
+            self.topoKaons_PID,
+            'B2Dst0D0KDst02D0GammaD02HH':
+            self.dst.d0gamma_hh_pid + self.d.hh_pid_tight + self.topoKaons_PID,
+            'B02Dst0DKDst02D0Pi0ResolvedD2HHH':
+            self.dst.d0pi0_resolved_pid + self.d.hhh_pid + self.topoKaons_PID,
+            'B02Dst0DKDst02D0GammaD2HHH':
+            self.dst.d0gamma_hh_pid + self.d.hhh_pid + self.topoKaons_PID
+        }
+        b2dst0d0k = makeB2XSels(decays, '', inputs, self.config)
+        self.lines.append(ProtoLine(b2dst0d0k, 1.0))
+
+    # End of DDX builders
+
+    def _makeB02DHD2PhiMu(self, dname, d2x, useIP=True):
+        '''Makes RS and WS B0 -> D + h- + c.c.'''
+        config = deepcopy(self.config)
+        #config{ # Cuts made on all B's and Lb's used in all lines
+        config['SUMPT_MIN'] = '4000*MeV'
+        config['AM_MIN'] = '4000*MeV'
+        config.pop('BPVIPCHI2_MAX')
+
+        tag = 'B02D%s'
+        if not useIP: tag += 'NoIP'
+        pions = self.topoPions
+        kaons = self.topoKaons
+        decays = {tag % 'Pi': ["[B0 -> D- pi+]cc"]}
+        inputs = {tag % 'Pi': d2x + pions}
+        if useIP:
+            decays[tag % 'K'] = ["[B0 -> D- K+]cc"]
+            inputs[tag % 'K'] = d2x + kaons
+        b02dh_rs = makeB2XSels(decays, dname, inputs, config, useIP)
+        decays = {tag % 'PiWS': ["[B0 -> D- pi-]cc"]}
+        inputs = {tag % 'PiWS': d2x + pions}
+        if useIP:
+            decays[tag % 'KWS'] = ["[B0 -> D- K-]cc"]
+            inputs[tag % 'KWS'] = d2x + kaons
+        b02dh_ws = makeB2XSels(decays, dname, inputs, config, useIP)
+        self.lines.append(ProtoLine(b02dh_rs, 1.0))
+        self.lines.append(ProtoLine(b02dh_ws, 0.1))
+
+    def _makeB02DsstH(self, dname, d2x):
+        '''Makes B0 -> D*_s-+ H+-'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5000*MeV'
+        decays = {
+            'B02DsstarPi': ["B0 -> D*_s- pi+", "B0 -> D*_s+ pi-"],
+            'B02DsstarK': ["B0 -> D*_s- K+", "B0 -> D*_s+ K-"]
+        }
+        inputs = {
+            'B02DsstarPi': d2x + self.topoPions_PID,
+            'B02DsstarK': d2x + self.topoKaons_PID
+        }
+        b02dssth = makeB2XSels(decays, dname, inputs, config, True)
+        self.lines.append(ProtoLine(b02dssth, 1.0))
+
+    def _makeB02DsstKMC(self, dname, d2x):
+        '''Makes B0 -> D*_s-+ K+- without K PID (only for MC)'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5000*MeV'
+        decays = {'B02DsstarKMCwNoPID': ["B0 -> D*_s- K+", "B0 -> D*_s+ K-"]}
+        inputs = {'B02DsstarKMCwNoPID': d2x + self.topoKaons}
+        b02dsstk = makeB2XSels(decays, dname, inputs, config, True)
+        self.lines.append(ProtoLine(b02dsstk, 1.0))
+
+    def _makeB02DsstKst(self, dname, d2x):
+        '''Makes B0 -> D*_s-+ K*+-[(KS0_LL || KS0_DD)Pi+-]'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5000*MeV'
+        decays = {
+            'B02DsstKsPiLL': ["B0 -> D*_s- KS0 pi+", "B0 -> D*_s+ KS0 pi-"],
+            'B02DsstKsPiDD': ["B0 -> D*_s- KS0 pi+", "B0 -> D*_s+ KS0 pi-"]
+        }
+        inputs = {
+            'B02DsstKsPiLL': d2x + self.topoPions_PID + self.ks['LL'],
+            'B02DsstKsPiDD': d2x + self.topoPions_PID + self.ks['DD']
+        }
+        b02dsstkst = makeB2XSels(decays, dname, inputs, config, True)
+        self.lines.append(ProtoLine(b02dsstkst, 1.0))
+
+    def _makeB2DMuMu(self):
+        '''Makes B+ -> D(_s)+ mu+ mu- / D(_s)- mu+ mu+ / D(_s)+ mu+ mu+'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4900*MeV'
+        config['BPVLTIME_MIN'] = '0.05*ps'
+        config['B2CBBDT_MIN'] = '-999.9'
+        decays_b2d = {
+            'B2DMuMu': ["[B+ -> D+ mu+ mu-]cc"],
+            'B2DMuMuWS': ["[B+ -> D- mu+ mu+]cc"],
+            'B2DMuMuNP': ["[B+ -> D+ mu+ mu+]cc"]
+        }
+        inputs_b2d_3h = {
+            'B2DMuMu': self.d.hhh_pid + [self.muons],
+            'B2DMuMuWS': self.d.hhh_pid + [self.muons],
+            'B2DMuMuNP': self.d.hhh_pid + [self.muons]
+        }
+        b2dmumu_3h = makeB2XSels(decays_b2d, 'D2HHH', inputs_b2d_3h, config)
+        self.lines.append(ProtoLine(b2dmumu_3h, 1.0))
+        inputs_b2d_ksh_ll = {
+            'B2DMuMu': self.d.ksh_ll + [self.muons],
+            'B2DMuMuWS': self.d.ksh_ll + [self.muons],
+            'B2DMuMuNP': self.d.ksh_ll + [self.muons]
+        }
+        b2dmumu_ksh_ll = makeB2XSels(decays_b2d, 'D2KSHLL', inputs_b2d_ksh_ll,
+                                     config)
+        self.lines.append(ProtoLine(b2dmumu_ksh_ll, 1.0))
+        inputs_b2d_ksh_dd = {
+            'B2DMuMu': self.d.ksh_dd + [self.muons],
+            'B2DMuMuWS': self.d.ksh_dd + [self.muons],
+            'B2DMuMuNP': self.d.ksh_dd + [self.muons]
+        }
+        b2dmumu_ksh_dd = makeB2XSels(decays_b2d, 'D2KSHDD', inputs_b2d_ksh_dd,
+                                     config)
+        self.lines.append(ProtoLine(b2dmumu_ksh_dd, 1.0))
+        decays_b2dstar = {
+            'B2DstarMuMu': ["[B+ -> D*(2010)+ mu+ mu-]cc"],
+            'B2DstarMuMuWS': ["[B+ -> D*(2010)- mu+ mu+]cc"],
+            'B2DstarMuMuNP': ["[B+ -> D*(2010)+ mu+ mu+]cc"]
+        }
+        inputs_b2dstar = {
+            'B2DstarMuMu': self.dst.d0pi_pid + [self.muons],
+            'B2DstarMuMuWS': self.dst.d0pi_pid + [self.muons],
+            'B2DstarMuMuNP': self.dst.d0pi_pid + [self.muons]
+        }
+        b2dstarmumu = makeB2XSels(decays_b2dstar, 'D0Pi', inputs_b2dstar,
+                                  config)
+        self.lines.append(ProtoLine(b2dstarmumu, 1.0))
+        inputs_b2dstar_4h = {
+            'B2DstarMuMu': self.dst.d0pi_hhhh_pid + [self.muons],
+            'B2DstarMuMuWS': self.dst.d0pi_hhhh_pid + [self.muons],
+            'B2DstarMuMuNP': self.dst.d0pi_hhhh_pid + [self.muons]
+        }
+        b2dstarmumu_4h = makeB2XSels(decays_b2dstar, 'D2HHHHPi',
+                                     inputs_b2dstar_4h, config)
+        self.lines.append(ProtoLine(b2dstarmumu_4h, 1.0))
+        decays_b2d0 = {
+            'B02D0MuMu': ["B0 -> D0 mu+ mu-"],
+            'B02D0MuMuWS': ["B0 -> D0 mu+ mu+", "B0 -> D0 mu- mu-"]
+        }
+        '''AM_MAX of B02D0MuMu raised to 7000*MeV in  makeB2X/Beauty2Charm_Utils'''
+        inputs_b2d0hh = {
+            'B02D0MuMu': self.d.hh_pid + [self.muons],
+            'B02D0MuMuWS': self.d.hh_pid + [self.muons]
+        }
+        b2d0hh = makeB2XSels(decays_b2d0, 'D2HH', inputs_b2d0hh, config)
+        self.lines.append(ProtoLine(b2d0hh, 1.0))
+        inputs_b2d04h = {
+            'B02D0MuMu': self.d.hhhh_pid + [self.muons],
+            'B02D0MuMuWS': self.d.hhhh_pid + [self.muons]
+        }
+        b2d04h = makeB2XSels(decays_b2d0, 'D2HHHH', inputs_b2d04h, config)
+        self.lines.append(ProtoLine(b2d04h, 1.0))
+        inputs_b2d0kshh_ll = {
+            'B02D0MuMu': self.d.kshh_ll + [self.muons],
+            'B02D0MuMuWS': self.d.kshh_ll + [self.muons]
+        }
+        b2d0kshh_ll = makeB2XSels(decays_b2d0, 'D2KSHHLL', inputs_b2d0kshh_ll,
+                                  config)
+        self.lines.append(ProtoLine(b2d0kshh_ll, 1.0))
+        inputs_b2d0kshh_dd = {
+            'B02D0MuMu': self.d.kshh_dd + [self.muons],
+            'B02D0MuMuWS': self.d.kshh_dd + [self.muons]
+        }
+        b2d0kshh_dd = makeB2XSels(decays_b2d0, 'D2KSHHDD', inputs_b2d0kshh_dd,
+                                  config)
+        self.lines.append(ProtoLine(b2d0kshh_dd, 1.0))
+
+    def _makeB2DstHH(self, dname, d2x):
+        '''Makes B+ -> D*(2010)+ pi- K+ (favoured) D*(2010)- pi+ K+ (suppressed)'''
+        decays = {
+            'B2DstPiKFav': ["[B+ -> D*(2010)- pi+ K+]cc"],
+            'B2DstPiKSup': ["[B+ -> D*(2010)+ pi- K+]cc"],
+            'B2DstPipPip': ["[B+ -> D*(2010)- pi+ pi+]cc"],
+            'B2DstPimPip': ["[B+ -> D*(2010)+ pi- pi+]cc"],
+            'B2DstPiKWS': ["[B+ -> D*(2010)+ pi+ K+]cc"],
+            'B2DstPiPiWS': ["[B+ -> D*(2010)+ pi+ pi+]cc"]
+        }
+        inputs = {
+            'B2DstPiKFav': d2x + self.topoPions_PID + self.topoKaons_PID,
+            'B2DstPiKSup': d2x + self.topoPions_PID + self.topoKaons_PID,
+            'B2DstPipPip': d2x + self.topoPions_PID,
+            'B2DstPimPip': d2x + self.topoPions_PID,
+            'B2DstPiKWS': d2x + self.topoPions_PID + self.topoKaons_PID,
+            'B2DstPiPiWS': d2x + self.topoPions_PID
+        }
+        b2dsthh = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(b2dsthh, 1.0))
+
+    def _makeB2D0PiTightCuts(self, dname, d2x, useIP=True):
+        '''Makes RS B+ -> D0 pi + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5150*MeV'
+        config['AM_MAX'] = '5550*MeV'
+        tag = 'B2D0%s'
+        if not useIP: tag += 'NoIP'
+        decays = {tag % 'Pi': ["B+ -> D0 pi+", "B- -> D0 pi-"]}
+        inputs = {tag % 'Pi': d2x + self.topoPions_PID}
+        b2d0h = makeB2XSels(decays, dname, inputs, self.config, useIP)
+        self.lines.append(ProtoLine(b2d0h, 1.0))
+
+    def _makeB02D0KKDST(self, dname, d2x, presc=1.0):
+        '''Makes RS B0 -> D0 h+h- (h=pi,K) + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4600*MeV'
+        config['BPVDIRA_MIN'] = '0.99995'
+        config['BPVIPCHI2_MAX'] = '9'
+
+        decays = {'B02D0KKDST': ["B0 -> D0 phi(1020)"]}
+        inputs = {'B02D0KKDST': d2x + self.hh.kk_pid}
+        b2d0kk = makeB2XSels(decays, dname, inputs, config)
+        self.lines.append(ProtoLine(b2d0kk, presc))
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2BXBuilder.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2BXBuilder.py
new file mode 100644
index 000000000..33303e92b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2BXBuilder.py
@@ -0,0 +1,77 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 copy import deepcopy
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from Beauty2Charm_Utils import *
+
+class Bc2BXBuilder(object):
+     
+    def __init__(self,b,pions,kaons,config):
+   
+        self.config = config
+        self.b      = b
+        self.pions   = [pions]
+        self.kaons   = [kaons]
+        self.lines  = []
+
+        b2dhd2hh = [filterSelection('B2D0HD02HH',"(MM > 5150*MeV) & (MM < 5400*MeV)",self.b.b2dhd2hh)]
+        b2dhd2hhhh = [filterSelection('B2D0HD02HHHH',"(MM > 5150*MeV) & (MM < 5400*MeV)",self.b.b2dhd2hhhh)]
+        b2dhhd2hhhcfpid = [filterSelection('B2DHHD2HHHCFPID',"(MM > 5150*MeV) & (MM < 5400*MeV)",self.b.b2dhhd2hhhcfpid)]
+        b2dhhhd2hhpid = [filterSelection('B2D0HHHD02HHPID',"(MM > 5150*MeV) & (MM < 5400*MeV)",self.b.b2dhhhd2hhpid)]
+        b2dd = [filterSelection('B2D0D',"(MM > 5150*MeV) & (MM < 5400*MeV)",self.b.b2dd)]
+        bmodes = [MergedSelection('AllB', RequiredSelections = b2dhd2hh + b2dhd2hhhh + b2dhhd2hhhcfpid + b2dhhhd2hhpid + b2dd)]
+
+        self._makeBc2BHH("B2D0HD02HH",b2dhd2hh,self.config)
+        #self._makeBc2BHH("B02D0HHD02HH",b02dhhd2hh,self.config)
+        #self._makeBc2BHH("B02DHD2HHH",b02dhd2hhh,self.config)      
+        self._makeBc2BHH("B2D0HD02HHHH",b2dhd2hhhh,self.config)
+        self._makeBc2BHH("B2DHHD2HHHCFPID",b2dhhd2hhhcfpid,self.config)
+        self._makeBc2BHH("B2D0HHHD02HHPID",b2dhhhd2hhpid,self.config)
+        self._makeBc2BHH("B2D0D",b2dd,self.config)
+
+        self._makeUpsilon2BB(bmodes)
+
+    def _makeBc2BHH(self,bname, b2dx,config):
+        decays = {'Bc2BPiPi':   ["[B_c+ -> B+ pi+ pi-]cc"],
+                  'Bc2BPiPiWS': ["[B_c+ -> B+ pi+ pi+]cc"],
+                  'Bc2BPiK':    ["[B_c+ -> B+ pi+ K-]cc"],
+                  'Bc2BPiKWS':  ["[B_c+ -> B+ pi+ K+]cc"],
+                  'Bc2BKPi':    ["[B_c+ -> B+ K+  pi-]cc"],
+                  'Bc2BKK':     ["[B_c+ -> B+ K+ K-]cc"],
+                  'Bc2BKKWS':   ["[B_c+ -> B+ K+ K+]cc"]
+                   }
+        inputs = {'Bc2BPiPi': b2dx+self.pions,
+                  'Bc2BPiPiWS': b2dx+self.pions,
+                  'Bc2BPiK':  b2dx+self.pions+self.kaons,
+                  'Bc2BPiKWS':  b2dx+self.pions+self.kaons,
+                  'Bc2BKPi':   b2dx+self.pions+self.kaons,
+                  'Bc2BKK':     b2dx+self.kaons,
+                  'Bc2BKKWS':   b2dx+self.kaons}
+         
+        bc2bhh = makeBc2BXSels(decays,bname,inputs,config)
+        self.lines.append(ProtoLine(bc2bhh,1.0))   
+
+    def _makeUpsilon2BB(self,bmodes):
+        comboCuts = "( (ACHILD(PT,1) +ACHILD(PT,2)) > 500*MeV) & (AM > 10000*MeV) & (AM < 12000*MeV)"
+        momCuts = "(VFASPF(VCHI2/VDOF) < 20) & ( (CHILD(VFASPF(VZ),1) - VFASPF(VZ)) > -1.5*mm) & ((CHILD(VFASPF(VZ),2) - VFASPF(VZ)) > -1.5*mm)"
+        u2bb = CombineParticles(DecayDescriptor= "Upsilon(4S) -> B+ B-",
+                                CombinationCut=comboCuts, 
+                                MotherCut=momCuts)
+        u2bbws = CombineParticles(DecayDescriptors=["[Upsilon(4S) -> B+ B+]cc"],
+                                  CombinationCut=comboCuts,
+                                  MotherCut=momCuts)
+        u2bbsel = [Selection('Upsilon2BB'+'Beauty2Charm',Algorithm=u2bb,RequiredSelections=bmodes)] 
+        u2bbselws = [Selection('Upsilon2BBWS'+'Beauty2Charm',Algorithm=u2bbws,RequiredSelections=bmodes)]                   
+        self.lines.append(ProtoLine(u2bbsel,1.0))
+        self.lines.append(ProtoLine(u2bbselws,1.0))
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2DDBuilder.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2DDBuilder.py
new file mode 100644
index 000000000..0c577a6bd
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2DDBuilder.py
@@ -0,0 +1,401 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 copy import deepcopy
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from Beauty2Charm_Utils import *
+#from Configurables import SubstitutePID
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+class Bc2DDBuilder(object):
+    '''Makes all Bc->DD decays for the Beauty2Charm module.'''
+
+    def __init__(self,d,dst,config):
+        
+        self.config = config
+        self.d      = d
+        self.dst    = dst
+        
+        self.lines  = []
+
+        self.d0modes     = { }
+        self.dpmodes     = { }
+        self.dstarpmodes = { }
+        self.dstar0modes = { }
+
+        # Build the merged D selections
+        self._createD0Modes()
+        self._createDpModes()
+        self._createDstarPlusModes()
+        self._createDstar0Modes()
+
+        # Define the Bc lines
+        self._makeBc2DD0()
+        self._makeBc2DstarD0()
+        self._makeBc2DDstar0()
+        self._makeBc2DstarDstar0()
+
+    def _buildSel(self,dmodes,name,map):
+        if 1 == len(dmodes) :
+            map[name] = dmodes[0]
+        else :
+            map[name] = MergedSelection("BC2DD-"+name+"-Beauty2Charm",RequiredSelections=dmodes)
+
+    def _createD0Modes(self):
+
+        # ( D->hh )
+        name = "D02HH"
+        #dmodes = self.d.hh
+        dmodes = self.d.hh_pid_tight
+        # With Upstream tracks as well
+        #dmodes += self.d.hh_up
+        self._buildSel(dmodes,name,self.d0modes)
+
+        ## # ( D->hhhh )
+        ## name = "D02HHHH"
+        ## #dmodes = self.d.hhhh
+        ## dmodes = self.d.hhhh_pid
+        ## # With Upstream tracks as well
+        ## #dmodes += self.d.hhhh_up
+        ## self._buildSel(dmodes,name,self.d0modes)
+
+        # ( D->khhh )
+        name = "D02KHHH"
+        #dmodes = self.d.k3h
+        #dmodes = self.d.k3h_pid
+        dmodes = self.d.k3pi_pid_tight
+        self._buildSel(dmodes,name,self.d0modes)
+
+        # ( D->Kshh )
+        name = "D02KSHH"
+        #dmodes = self.d.kshh_ll  + self.d.kshh_dd
+        dmodes = self.d.kshh_ll_pid  + self.d.kshh_dd_pid
+        # With Upstream tracks as well
+        #dmodes += self.d.kshh_ll_up + self.d.kshh_dd_up
+        self._buildSel(dmodes,name,self.d0modes)
+
+        # ( D->hhpi0 )
+        name = "D02HHPI0"
+        #dmodes = self.d.pi0hh_merged  + self.d.pi0hh_resolved
+        #dmodes = self.d.pi0hh_merged_pid  + self.d.pi0hh_resolved_pid
+        dmodes = self.d.pi0hh_tightpi0_merged_pid + self.d.pi0hh_tightpi0_resolved_pid
+        # With Upstream tracks as well
+        #dmodes += self.d.pi0hh_merged_up + self.d.pi0hh_resolved_up
+        self._buildSel(dmodes,name,self.d0modes)
+
+        ## # ( D->hhhhpi0 )
+        ## name = "D02HHHHPI0"
+        ## dmodes = self.d.pi0hhhh_merged + self.d.pi0hhhh_resolved
+        ## # With Upstream tracks as well
+        ## #dmodes += self.d.pi0hhhh_merged_up + self.d.pi0hhhh_resolved_up
+        ## self._buildSel(dmodes,name,self.d0modes)
+         
+        ## # ( D0->Kshhpi0 )
+        ## name = "D02KSHHPI0"
+        ## #dmodes  = self.d.kspi0hh_ll_merged + self.d.kspi0hh_ll_resolved
+        ## #dmodes += self.d.kspi0hh_dd_merged + self.d.kspi0hh_dd_resolved
+        ## dmodes  = self.d.kspi0hh_ll_merged_pid + self.d.kspi0hh_ll_resolved_pid
+        ## dmodes += self.d.kspi0hh_dd_merged_pid + self.d.kspi0hh_dd_resolved_pid
+        ## # With Upstream
+        ## #dmodes += self.d.kspi0hh_ll_merged_up + self.d.kspi0hh_ll_resolved_up
+        ## #dmodes += self.d.kspi0hh_dd_merged_up + self.d.kspi0hh_dd_resolved_up
+        ## self._buildSel(dmodes,name,self.d0modes)
+
+    def _createDpModes(self):
+        
+        ## # ( D->hhh )
+        ## name = "D2HHH"
+        ## dmodes = self.d.hhh
+        ## #dmodes = self.d.hhh_pid
+        ## # With Upstream tracks as well
+        ## #dmodes += self.d.hhh_up
+        ## self._buildSel(dmodes,name,self.dpmodes)
+
+        ## # ( D->khh )
+        ## name = "D2KHH"
+        ## #dmodes = self.d.k2h
+        ## dmodes = self.d.k2h_pid
+        ## self._buildSel(dmodes,name,self.dpmodes)
+
+        # ( D->hhh )
+        name = "D2HHH"
+        #dmodes = self.d.hhh
+        #dmodes = self.d.hhh_pid
+        #dmodes = self.d.hhh_pid_nossK
+        dmodes = self.d.hhh_pid_tight_nossK
+        self._buildSel(dmodes,name,self.dpmodes)
+
+        # ( D->Ksh )
+        name = "D2KSH"
+        #dmodes = self.d.ksh_ll   + self.d.ksh_dd
+        dmodes = self.d.ksh_ll_pid   + self.d.ksh_dd_pid
+        # With Upstream tracks as well
+        #dmodes += self.d.ksh_ll_up + self.d.ksh_dd_up
+        self._buildSel(dmodes,name,self.dpmodes)
+
+        # ( D->Kshhh )
+        name = "D2KSHHH"
+        #dmodes = self.d.kshhh_ll + self.d.kshhh_dd
+        #dmodes = self.d.kshhh_ll_pid + self.d.kshhh_dd_pid
+        dmodes = self.d.kshhh_ll_pid_nossK + self.d.kshhh_dd_pid_nossK
+        # With Upstream tracks as well
+        #dmodes += self.d.kshhh_ll_up + self.d.kshhh_dd_up
+        self._buildSel(dmodes,name,self.dpmodes)
+
+        ## # ( D->KsKhh )
+        ## name = "D2KSKHH"
+        ## dmodes = self.d.kskhh_ll_pid + self.d.kskhh_dd_pid
+        ## self._buildSel(dmodes,name,self.dpmodes)
+
+        ## # ( D->hhhpi0 )
+        ## name = "D2HHHPI0"
+        ## #dmodes = self.d.pi0hhh_merged + self.d.pi0hhh_resolved
+        ## dmodes = self.d.pi0hhh_merged_pid + self.d.pi0hhh_resolved_pid
+        ## # With Upstream tracks as well
+        ## #dmodes += self.d.pi0hhh_merged_up + self.d.pi0hhh_resolved_up
+        ## self._buildSel(dmodes,name,self.dpmodes)
+
+        ## # ( D->Khhpi0 )
+        ## name = "D2KHHPI0"
+        ## dmodes = self.d.pi0khh_merged_pid + self.d.pi0khh_resolved_pid 
+        ## self._buildSel(dmodes,name,self.dpmodes)
+
+        ## # ( D->Kshpi0 )
+        ## name = "D2KSHPI0"
+        ## dmodes  = self.d.kspi0h_ll_merged + self.d.kspi0h_ll_resolved
+        ## dmodes += self.d.kspi0h_dd_merged + self.d.kspi0h_dd_resolved
+        ## # With Upstream
+        ## #dmodes += self.d.kspi0h_ll_merged_up + self.d.kspi0h_ll_resolved_up
+        ## #dmodes += self.d.kspi0h_dd_merged_up + self.d.kspi0h_dd_resolved_up
+        ## self._buildSel(dmodes,name,self.dpmodes)
+
+        ## # ( D -> K*+hh )
+        ## name = "D2KstHH"
+        ## dmodes = self.d.kstarhh
+        ## self._buildSel(dmodes,name,self.dpmodes)
+
+        ## # ( D -> K*+K*0 )
+        ## name = "D2KstKst0"
+        ## dmodes = self.d.kstarkstar0
+        ## self._buildSel(dmodes,name,self.dpmodes)
+
+        ## # ( D -> K*+Ks )
+        ## name = "D2KstKS"
+        ## dmodes = self.d.kstarks_ll + self.d.kstarks_dd
+        ## self._buildSel(dmodes,name,self.dpmodes)
+  
+    def _createDstarPlusModes(self):
+
+        # D*+ modes ( D0 -> hh )
+        name = "Dst2D0PID02HH"
+        #dmodes = self.dst.d0pi
+        dmodes = self.dst.d0pi_pid
+        #dmodes += self.dst.d0pi_dup + self.dst.d0pi_hup + self.dst.d0pi_dup_hup
+        self._buildSel(dmodes,name,self.dstarpmodes)
+
+        ## # D*+ modes ( D0 -> hhhh )
+        ## name = "Dst2D0PID02HHHH"
+        ## #dmodes = self.dst.d0pi_hhhh
+        ## dmodes = self.dst.d0pi_hhhh_pid
+        ## #dmodes += self.dst.d0pi_hhhh_dup + self.dst.d0pi_hhhh_hup + self.dst.d0pi_hhhh_dup_hup
+        ## self._buildSel(dmodes,name,self.dstarpmodes)
+
+        # D*+ modes ( D0 -> Khhh )
+        name = "Dst2D0PID02KHHH"
+        dmodes = self.dst.d0pi_k3h_pid
+        self._buildSel(dmodes,name,self.dstarpmodes)
+
+        # D*+ modes ( D0 -> Kshh )
+        name = "Dst2D0PID02KSHH"
+        #dmodes = self.dst.d0pi_kshh_ll + self.dst.d0pi_kshh_dd
+        dmodes = self.dst.d0pi_kshh_ll_pid + self.dst.d0pi_kshh_dd_pid
+        #dmodes += self.dst.d0pi_kshh_ll_dup + self.dst.d0pi_kshh_dd_dup
+        #dmodes += self.dst.d0pi_kshh_ll_hup + self.dst.d0pi_kshh_dd_hup
+        self._buildSel(dmodes,name,self.dstarpmodes)
+
+        ## # D*+ modes ( D0 -> KsPi0hh )
+        ## name = "Dst2D0PID02KSPI0HH"
+        ## #dmodes  = self.dst.d0pi_kspi0hh_ll_merged + self.dst.d0pi_kspi0hh_dd_merged
+        ## #dmodes += self.dst.d0pi_kspi0hh_ll_resolved + self.dst.d0pi_kspi0hh_dd_resolved
+        ## dmodes  = self.dst.d0pi_kspi0hh_ll_merged_pid + self.dst.d0pi_kspi0hh_dd_merged_pid
+        ## dmodes += self.dst.d0pi_kspi0hh_ll_resolved_pid + self.dst.d0pi_kspi0hh_dd_resolved_pid
+        ## #dmodes += self.dst.d0pi_kspi0hh_ll_merged_dup + self.dst.d0pi_kspi0hh_dd_merged_dup
+        ## #dmodes += self.dst.d0pi_kspi0hh_ll_resolved_dup + self.dst.d0pi_kspi0hh_dd_resolved_dup
+        ## #dmodes += self.dst.d0pi_kspi0hh_ll_merged_hup + self.dst.d0pi_kspi0hh_dd_merged_hup
+        ## #dmodes += self.dst.d0pi_kspi0hh_ll_resolved_hup + self.dst.d0pi_kspi0hh_dd_resolved_hup
+        ## self._buildSel(dmodes,name,self.dstarpmodes)
+
+        # Ds*+ pi0 modes ( Ds+ -> hhh )
+        name = "Dst2DPI0D2HHH"
+        #dmodes = self.dst.dpi0_merged + self.dst.dpi0_resolved
+        dmodes = self.dst.dpi0_merged_pid + self.dst.dpi0_resolved_pid
+        #dmodes += self.dst.dpi0_merged_dup + self.dst.dpi0_resolved_dup
+        self._buildSel(dmodes,name,self.dstarpmodes)
+
+        ## # Ds*+ pi0 modes ( Ds+ -> khh )
+        ## name = "Dst2DPI0D2KHH"
+        ## dmodes = self.dst.dpi0_khh_merged_pid + self.dst.dpi0_khh_resolved_pid
+        ## self._buildSel(dmodes,name,self.dstarpmodes)
+        
+        # Ds*+ pi0 modes ( Ds+ -> Ksh )
+        name = "Dst2DPI0D2KSH"
+        dmodes  = self.dst.dpi0_merged_ksh_ll + self.dst.dpi0_resolved_ksh_ll
+        dmodes += self.dst.dpi0_merged_ksh_dd + self.dst.dpi0_resolved_ksh_dd
+        #dmodes += self.dst.dpi0_merged_ksh_ll_dup + self.dst.dpi0_resolved_ksh_ll_dup
+        #dmodes += self.dst.dpi0_merged_ksh_dd_dup + self.dst.dpi0_resolved_ksh_dd_dup
+        self._buildSel(dmodes,name,self.dstarpmodes)
+
+        # Ds*+ pi0 modes ( Ds+ -> Kshhh )
+        name = "Dst2DPI0D2KSHHH"
+        #dmodes  = self.dst.dpi0_merged_kshhh_ll + self.dst.dpi0_resolved_kshhh_ll
+        #dmodes += self.dst.dpi0_merged_kshhh_dd + self.dst.dpi0_resolved_kshhh_dd
+        dmodes  = self.dst.dpi0_merged_kshhh_ll_pid + self.dst.dpi0_resolved_kshhh_ll_pid
+        dmodes += self.dst.dpi0_merged_kshhh_dd_pid + self.dst.dpi0_resolved_kshhh_dd_pid
+        #dmodes += self.dst.dpi0_merged_kshhh_ll_dup + self.dst.dpi0_resolved_kshhh_ll_dup
+        #dmodes += self.dst.dpi0_merged_kshhh_dd_dup + self.dst.dpi0_resolved_kshhh_dd_dup
+        self._buildSel(dmodes,name,self.dstarpmodes)
+
+        ## # Ds*+ pi0 modes ( Ds+ -> KsKhh )
+        ## name = "Dst2DPI0D2KSHHH"
+        ## dmodes  = self.dst.dpi0_merged_kskhh_ll_pid + self.dst.dpi0_resolved_kskhh_ll_pid
+        ## dmodes += self.dst.dpi0_merged_kskhh_dd_pid + self.dst.dpi0_resolved_kskhh_dd_pid
+        ## self._buildSel(dmodes,name,self.dstarpmodes)
+
+        ## # Ds*+ pi0 modes ( Ds+ -> KsPi0h )
+        ## name = "Dst2DPI0D2KSPI0H"
+        ## dmodes  = self.dst.dpi0_merged_kspi0h_ll + self.dst.dpi0_merged_kspi0h_dd
+        ## dmodes += self.dst.dpi0_resolved_kspi0h_ll + self.dst.dpi0_resolved_kspi0h_dd
+        ## #dmodes += self.dst.dpi0_merged_kspi0h_ll_dup + self.dst.dpi0_merged_kspi0h_dd_dup
+        ## #dmodes += self.dst.dpi0_resolved_kspi0h_ll_dup + self.dst.dpi0_resolved_kspi0h_dd_dup
+        ## self._buildSel(dmodes,name,self.dstarpmodes)
+
+        # Ds*+ gamma modes ( Ds+ -> hhh )
+        name = "Dst2DGammaD2HHH"
+        #dmodes = self.dst.dgamma_hhh
+        dmodes = self.dst.dgamma_hhh_pid
+        #dmodes += self.dst.dgamma_hhh_dup
+        self._buildSel(dmodes,name,self.dstarpmodes)
+
+        ## # Ds*+ gamma modes ( Ds+ -> Khh )
+        ## name = "Dst2DGammaD2KHH"
+        ## dmodes = self.dst.dgamma_khh_pid
+        ## self._buildSel(dmodes,name,self.dstarpmodes)
+
+        # Ds*+ gamma modes ( Ds+ -> Ksh )
+        name = "Dst2DGammaD2KSH"
+        dmodes = self.dst.dgamma_ksh_ll + self.dst.dgamma_ksh_dd
+        #dmodes += self.dst.dgamma_ksh_ll_dup + self.dst.dgamma_ksh_dd_dup
+        self._buildSel(dmodes,name,self.dstarpmodes)
+
+        # Ds*+ gamma modes ( Ds+ -> Kshhh )
+        name = "Dst2DGammaD2KSHHH"
+        #dmodes = self.dst.dgamma_kshhh_ll + self.dst.dgamma_kshhh_dd
+        dmodes = self.dst.dgamma_kshhh_ll_pid + self.dst.dgamma_kshhh_dd_pid
+        #dmodes = self.dst.dgamma_kskhh_ll_pid + self.dst.dgamma_kskhh_dd_pid
+        #dmodes += self.dst.dgamma_kshhh_ll_dup + self.dst.dgamma_kshhh_dd_dup
+        self._buildSel(dmodes,name,self.dstarpmodes)
+
+        ## # Ds*+ gamma modes ( Ds+ -> KsPi0h )
+        ## name = "Dst2DGammaD2KSPI0H"
+        ## dmodes = self.dst.dgamma_kspi0h_ll + self.dst.dgamma_kspi0h_dd
+        ## #dmodes += self.dst.dgamma_kspi0h_ll_dup + self.dst.dgamma_kspi0h_dd_dup
+        ## self._buildSel(dmodes,name,self.dstarpmodes)
+
+    def _createDstar0Modes(self):
+
+        # D0* pi0 ( D0 -> hh )
+        name = "Dst02D0PI0D02HH"
+        #dmodes  = self.dst.d0pi0_merged      + self.dst.d0pi0_resolved
+        dmodes  = self.dst.d0pi0_merged_pid   + self.dst.d0pi0_resolved_pid
+        #dmodes += self.dst.d0pi0_merged_dup  + self.dst.d0pi0_resolved_dup
+        self._buildSel(dmodes,name,self.dstar0modes)
+
+        ## # D0* pi0 ( D0 -> hhhh )
+        ## name = "Dst02D0PI0D02HHHH"
+        ## #dmodes = self.dst.d0pi0_hhhh_merged + self.dst.d0pi0_hhhh_resolved
+        ## dmodes = self.dst.d0pi0_hhhh_merged_pid + self.dst.d0pi0_hhhh_resolved_pid
+        ## #dmodes += self.dst.d0pi0_hhhh_merged_dup + self.dst.d0pi0_hhhh_resolved_dup
+        ## self._buildSel(dmodes,name,self.dstar0modes)
+
+        # D0* pi0 ( D0 -> Khhh )
+        name = "Dst02D0PI0D02KHHH"
+        dmodes = self.dst.d0pi0_k3h_merged_pid + self.dst.d0pi0_k3h_resolved_pid
+        self._buildSel(dmodes,name,self.dstar0modes)
+
+        # D0* pi0 ( D0 -> Kshh )
+        name = "Dst02D0PI0D02KSHH"
+        #dmodes = self.dst.d0pi0_kshh_ll     + self.dst.d0pi0_kshh_dd
+        dmodes = self.dst.d0pi0_kshh_ll_pid  + self.dst.d0pi0_kshh_dd_pid
+        #dmodes += self.dst.d0pi0_kshh_ll_dup + self.dst.d0pi0_kshh_dd_dup
+        self._buildSel(dmodes,name,self.dstar0modes)
+
+        # D0* gamma ( D0 -> hh )
+        name = "Dst02D0GammaD02HH"
+        dmodes  = self.dst.d0gamma_hh_pid
+        self._buildSel(dmodes,name,self.dstar0modes)
+
+        # D0* gamma ( D0 -> khhh )
+        name = "Dst02D0GammaD02KHHH"
+        dmodes  = self.dst.d0gamma_k3h_pid
+        self._buildSel(dmodes,name,self.dstar0modes)
+
+        # D0* gamma ( D0 -> Kshh )
+        name = "Dst02D0GammaD02KSHH"
+        #dmodes = self.dst.d0gamma_kshh_ll   + self.dst.d0gamma_kshh_dd
+        dmodes = self.dst.d0gamma_kshh_ll_pid   + self.dst.d0gamma_kshh_dd_pid
+        #dmodes += self.dst.d0gamma_kshh_ll_dup + self.dst.d0gamma_kshh_dd_dup
+        self._buildSel(dmodes,name,self.dstar0modes)
+
+    def _createLines(self,name,modes0,modes1,descr,prescale=1.0):
+
+        # Loop over all combinations and build the lines
+        for d0name,d0mode in modes0.iteritems():
+            for d1name,d1mode in modes1.iteritems():
+                tag = d0name + d1name
+                # Useful for producing the list of all lines created ...
+                #print "'Stripping" + name + tag + "Beauty2CharmLine',"
+                decays = { name : descr }
+                inputs = { name : [ d0mode, d1mode ] }
+                bc2dd = makeB2XSels( decays, tag, inputs, self.config )
+                self.lines.append( ProtoLine(bc2dd,prescale) )
+
+    def _makeBc2DD0(self):
+        '''Makes Bc+ -> D+ D0 + c.c.'''
+        self._createLines( 'Bc2DD0', self.dpmodes, self.d0modes, 
+                           ["B_c+ -> D+ D0",
+                            "B_c- -> D- D0"] )
+
+    def _makeBc2DstarD0(self):
+        '''Makes Bc+ -> D*+ D0 + c.c.'''
+        self._createLines( "Bc2DstD0", self.dstarpmodes, self.d0modes,
+                           ["B_c+ -> D*(2010)+ D0",
+                            "B_c- -> D*(2010)- D0",
+                            "B_c+ -> D*_s+ D0",
+                            "B_c- -> D*_s- D0"] )
+
+    def _makeBc2DDstar0(self):
+        '''Makes Bc+ -> D+ D*0 + c.c.'''
+        self._createLines( "Bc2DDst0", self.dpmodes, self.dstar0modes,
+                           ["B_c+ -> D+ D*(2007)0",
+                            "B_c- -> D- D*(2007)0"] )
+
+    def _makeBc2DstarDstar0(self):
+        '''Makes Bc+ -> D*+ D*0 + c.c.'''
+        self._createLines( "Bc2DstDst0", self.dstarpmodes, self.dstar0modes,
+                           ["B_c+ -> D*(2010)+ D*(2007)0",
+                            "B_c- -> D*(2010)- D*(2007)0",
+                            "B_c+ -> D*_s+ D*(2007)0",
+                            "B_c- -> D*_s- D*(2007)0"] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2DXBuilder.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2DXBuilder.py
new file mode 100644
index 000000000..af663b759
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Bc2DXBuilder.py
@@ -0,0 +1,105 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 copy import deepcopy
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from Beauty2Charm_Utils import *
+
+
+class Bc2DXBuilder(object):
+    def __init__(self, d, dst, hh, pions, kaons, config):
+
+        self.config = config
+        self.d = d
+        self.dst = dst
+        self.hh = hh
+        self.pions = [pions]
+        self.kaons = [kaons]
+        self.lines = []
+
+        d_hh_pid = self.d.hh_pid
+        d_hhhh_pid = self.d.hhhh_pid
+        d_hhh_pid_tight = [
+            filterSelection('Bc2DXD2HHH', "(MM > 1810*MeV) & (MM < 2030*MeV)",
+                            self.d.hhh_pid_tight)
+        ]
+        dst_hh_pid = self.dst.d0pi
+        dst_hhhh_pid = self.dst.d0pi_hhhh_pid
+
+        self._makeBc2D0X("D02HHPID", d_hh_pid, self.config)
+        self._makeBc2D0X("D02HHHHPID", d_hhhh_pid, self.config)
+        self._makeBc2DX("D2HHHPID", d_hhh_pid_tight, self.config)
+        self._makeBc2DstX("Dstar2D0PiD02HHPID", dst_hh_pid, self.config)
+        self._makeBc2DstX("Dstar2D0PiD02HHHHPID", dst_hhhh_pid, self.config)
+
+    def _makeBc2D0X(self, bname, d, config):
+        decays = {
+            'Bc2D0Pi': ["B_c+ -> D0 pi+", "B_c- -> D0 pi-"],
+            'Bc2D0K': ["B_c+ -> D0 K+", "B_c- -> D0 K-"]
+        }
+        inputs = {'Bc2D0Pi': d + self.pions, 'Bc2D0K': d + self.kaons}
+        bc2d0x = makeBc2D0XSels(decays, bname, inputs, config)
+        self.lines.append(ProtoLine(bc2d0x, 1.0))
+
+    def _makeBc2DX(self, bname, d, config):
+        config = deepcopy(self.config)
+        config['BPVIPCHI2_MAX'] = '20'
+        config['AM_MIN'] = '5850*MeV'
+        config['SUMPT_MIN'] = '5850*MeV'
+        decays = {
+            'Bc2DPiPi': ["B_c+ -> D+ rho(770)0", "B_c- -> D- rho(770)0"],
+            'Bc2DHHWS': ["B_c+ -> D- rho(770)+", "B_c- -> D+ rho(770)-"],
+            'Bc2DHHNP': ["B_c+ -> D+ rho(770)+", "B_c- -> D- rho(770)-"],
+            'Bc2DKPi': ["[B_c+ -> D+ K*(892)0]cc", "[B_c- -> D- K*(892)0]cc"],
+            'Bc2DKK': ["B_c+ -> D+ phi(1020)", "B_c- -> D- phi(1020)"]
+        }
+        inputs = {
+            'Bc2DPiPi': d + self.hh.pipi_pid,
+            'Bc2DHHWS': d + self.hh.hh_ws_pid,
+            'Bc2DHHNP': d + self.hh.hh_ws_pid,
+            'Bc2DKPi': d + self.hh.kpi_pid_narrow,
+            'Bc2DKK': d + self.hh.kk_pid
+        }
+        bc2dx = makeBc2DXSels(decays, bname, inputs, config)
+        self.lines.append(ProtoLine(bc2dx, 1.0))
+
+    def _makeBc2DstX(self, bname, dst, config):
+        decays = {
+            'Bc2DstarPiPi':
+            ["B_c+ -> D*(2010)+ rho(770)0", "B_c- -> D*(2010)- rho(770)0"],
+            'Bc2DstarHHWS':
+            ["B_c+ -> D*(2010)- rho(770)+", "B_c- -> D*(2010)+ rho(770)-"],
+            'Bc2DstarHHNP':
+            ["B_c+ -> D*(2010)+ rho(770)+", "B_c- -> D*(2010)- rho(770)-"],
+            'Bc2DstarKPi': [
+                "[B_c+ -> D*(2010)+ K*(892)0]cc",
+                "[B_c- -> D*(2010)- K*(892)0]cc"
+            ],
+            'Bc2DstarKK': [
+                "B_c+ -> D*(2010)+ phi(1020)", "B_c- -> D*(2010)- phi(1020)"
+            ],
+            'Bc2DstarPiK': [
+                "[B_c+ -> D*(2010)+ K*(892)~0]cc",
+                "[B_c- -> D*(2010)- K*(892)~0]cc"
+            ]
+        }
+        inputs = {
+            'Bc2DstarPiPi': dst + self.hh.pipi_pid,
+            'Bc2DstarHHWS': dst + self.hh.hh_ws_pid,
+            'Bc2DstarHHNP': dst + self.hh.hh_ws_pid,
+            'Bc2DstarKPi': dst + self.hh.kpi_pid,
+            'Bc2DstarKK': dst + self.hh.kk_pid,
+            'Bc2DstarPiK': dst + self.hh.kpi_pid
+        }
+        bc2dstx = makeBc2DstXSels(decays, bname, inputs, config)
+        self.lines.append(ProtoLine(bc2dstx, 1.0))
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_DBuilder.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_DBuilder.py
new file mode 100644
index 000000000..f64abfc36
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_DBuilder.py
@@ -0,0 +1,2608 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 copy import deepcopy
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import (
+    DaVinci__N3BodyDecays, DaVinci__N4BodyDecays, DaVinci__N5BodyDecays)
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from Beauty2Charm_Utils import *
+from Configurables import SubPIDMMFilter
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+def awmFunctor(decays, min, max):
+    wm = []
+    for daughters in decays:
+        pids = ','.join(["'%s'" % d for d in daughters])
+        wm.append("in_range(%s,AWM(%s),%s)" % (min, pids, max))
+    return '(' + ('|'.join(wm)) + ')'
+
+
+def getCC(decay):
+    cc = []
+    for d in decay:
+        if d.find('+') >= 0: cc.append(d.replace('+', '-'))
+        elif d.find('-') >= 0: cc.append(d.replace('-', '+'))
+        else: cc.append(d)
+    return cc
+
+
+def getCCs(decays):
+    return [getCC(d) for d in decays]
+
+
+def subPIDSels(decays, prefix, suffix, min, max, inputs):
+    min = float(min.split('*')[0])
+    max = float(max.split('*')[0])
+    filter = SubPIDMMFilter(
+        prefix + 'SubPIDBeauty2Charm' + suffix,
+        Code='ALL',
+        MinMM=min,
+        MaxMM=max,
+        PIDs=decays)
+    presel = Selection(
+        prefix + 'SubPIDSelBeauty2Charm' + suffix,
+        Algorithm=filter,
+        RequiredSelections=inputs)
+    mm = "in_range(%s,MM,%s)" % (min, max)
+    return filterSelection(prefix + suffix, mm, [presel])
+
+
+def makeSelName(pre, dec, post=''):
+    name = pre + '2'
+    for d in dec:
+        if d == 'K*(892)+': name += 'Kst+'
+        elif d == 'K*(892)-': name += 'Kst-'
+        else: name += d
+    name += post
+    #print name
+    return name
+
+
+def makeSel(parent, dec):
+    sel = parent + ' ->'
+    for d in dec:
+        sel += ' ' + d
+    #print sel
+    return sel
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class DBuilder(object):
+    '''Produces all D mesons for the Beauty2Charm module.'''
+
+    def __init__(self, pions, kaons, ks, pi0, uppions, upkaons, muons, hh,
+                 config, config_for_ddx, config_pid, config_pi0):
+
+        self.pions = pions
+        self.kaons = kaons
+        self.ks = ks
+        self.pi0 = pi0
+        self.uppions = uppions
+        self.upkaons = upkaons
+        self.muons = muons
+        self.hhBuilder = hh
+        self.config = config
+        self.config_for_ddx = config_for_ddx
+        self.config_pid = config_pid
+        self.config_pi0 = config_pi0
+        self.hh = self._makeD2hh()
+        self.hhh = self._makeD2hhh()
+        self.hhhh = self._makeD2hhhh()
+
+        self.ksh_ll = self._makeD2KSh("LL")
+        self.ksh_dd = self._makeD2KSh("DD")
+        self.kshh_ll = self._makeD2KShh("LL")
+        self.kshh_dd = self._makeD2KShh("DD")
+        self.kshhh_ll = self._makeD2KShhh("LL")
+        self.kshhh_dd = self._makeD2KShhh("DD")
+        self.kshh_ll_part = self._makeD2KShh("LLPartialD")
+        self.kshh_dd_part = self._makeD2KShh("DDPartialD")
+
+        self.ksmumu_ll = self._makeD2KSmumu("LL")
+        self.ksmumu_dd = self._makeD2KSmumu("DD")
+        self.kspi0_ll_merged = self._makeD02KSPi0('LL', 'Merged')
+        self.kspi0_dd_merged = self._makeD02KSPi0('DD', 'Merged')
+        self.kspi0_ll_resolved = self._makeD02KSPi0('LL', 'Resolved')
+        self.kspi0_dd_resolved = self._makeD02KSPi0('DD', 'Resolved')
+
+        self.pi0hh_merged = self._makeD2Pi0hh("Merged")
+        self.pi0hh_resolved = self._makeD2Pi0hh("Resolved")
+        self.pi0hhh_merged = self._makeD2Pi0hhh("Merged")
+        self.pi0hhh_resolved = self._makeD2Pi0hhh("Resolved")
+        #self.pi0hhhh_merged = self._makeD2Pi0hhhh("Merged")
+        #self.pi0hhhh_resolved = self._makeD2Pi0hhhh("Resolved")
+
+        self.kspi0h_ll_merged = self._makeD2KSPi0h("LL", "Merged")
+        self.kspi0h_ll_resolved = self._makeD2KSPi0h("LL", "Resolved")
+        self.kspi0h_dd_merged = self._makeD2KSPi0h("DD", "Merged")
+        self.kspi0h_dd_resolved = self._makeD2KSPi0h("DD", "Resolved")
+
+        self.kspi0hh_ll_merged = self._makeD2KSPi0hh("LL", "Merged")
+        self.kspi0hh_ll_resolved = self._makeD2KSPi0hh("LL", "Resolved")
+        self.kspi0hh_dd_merged = self._makeD2KSPi0hh("DD", "Merged")
+        self.kspi0hh_dd_resolved = self._makeD2KSPi0hh("DD", "Resolved")
+
+        self.kspi0hh_ll_merged_pid = [
+            filterPID('D2KsLLMergedPi0HHPID', self.kspi0hh_ll_merged,
+                      config_pid)
+        ]
+        self.kspi0hh_ll_resolved_pid = [
+            filterPID('D2KsLLResolvedPi0HHPID', self.kspi0hh_ll_resolved,
+                      config_pid)
+        ]
+        self.kspi0hh_dd_merged_pid = [
+            filterPID('D2KsDDMergedPi0HHPID', self.kspi0hh_dd_merged,
+                      config_pid)
+        ]
+        self.kspi0hh_dd_resolved_pid = [
+            filterPID('D2KsDDResolvedPi0HHPID', self.kspi0hh_dd_resolved,
+                      config_pid)
+        ]
+
+        self.kstarhh = self._makeD2Kstarhh()
+        self.kstarkstar0 = self._makeD2KstarKstar0()
+        self.kstarks_ll = self._makeD2KstarKs("LL")
+        self.kstarks_dd = self._makeD2KstarKs("DD")
+
+        # UP tracks in D
+        self.hh_up = self._makeD2hh(True)
+        self.hhh_up = self._makeD2hhh(True)
+        self.hhhh_up = self._makeD2hhhh(True)
+        self.ksh_ll_up = self._makeD2KSh("LL", True)
+        self.ksh_dd_up = self._makeD2KSh("DD", True)
+        self.kshh_ll_up = self._makeD2KShh("LL", True)
+        self.kshh_dd_up = self._makeD2KShh("DD", True)
+        self.kshhh_ll_up = self._makeD2KShhh("LL", True)
+        self.kshhh_dd_up = self._makeD2KShhh("DD", True)
+        self.pi0hh_merged_up = self._makeD2Pi0hh("Merged", True)
+        self.pi0hh_resolved_up = self._makeD2Pi0hh("Resolved", True)
+        self.pi0hhh_merged_up = self._makeD2Pi0hhh("Merged", True)
+        self.pi0hhh_resolved_up = self._makeD2Pi0hhh("Resolved", True)
+        #self.pi0hhhh_merged_up = self._makeD2Pi0hhhh("Merged",True)
+        #self.pi0hhhh_resolved_up = self._makeD2Pi0hhhh("Resolved",True)
+
+        self.kspi0h_ll_merged_up = self._makeD2KSPi0h("LL", "Merged", True)
+        self.kspi0h_ll_resolved_up = self._makeD2KSPi0h("LL", "Resolved", True)
+        self.kspi0h_dd_merged_up = self._makeD2KSPi0h("DD", "Merged", True)
+        self.kspi0h_dd_resolved_up = self._makeD2KSPi0h("DD", "Resolved", True)
+
+        self.kspi0hh_ll_merged_up = self._makeD2KSPi0hh("LL", "Merged", True)
+        self.kspi0hh_ll_resolved_up = self._makeD2KSPi0hh(
+            "LL", "Resolved", True)
+        self.kspi0hh_dd_merged_up = self._makeD2KSPi0hh("DD", "Merged", True)
+        self.kspi0hh_dd_resolved_up = self._makeD2KSPi0hh(
+            "DD", "Resolved", True)
+
+        # PID filtered selections
+        self.hh_pid = [filterPID('D2HHPID', self.hh, config_pid)]
+        self.hh_pid_tight = [
+            filterPID('D2HHTIGHTPID', self.hh_pid, config_pid['TIGHT'])
+        ]
+        self.hhh_pid = [filterPID('D2HHHPID', self.hhh, config_pid)]
+        self.hhh_pid_tight = [
+            filterPID('D2HHHPIDTIGHT', self.hhh_pid, config_pid['TIGHT'])
+        ]
+        self.hhhh_pid = [filterPID('D2HHHHPID', self.hhhh, config_pid)]
+        ''' self.hhhh_pid_tight = [filterPID('D2HHHHPIDTIGHT',self.hhhh_pid,
+                                           config_pid['TIGHT'])] '''
+        self.hh_pid_tight_up = [
+            filterPID('D2HHPIDTIGHTUP', self.hh_up, config_pid['TIGHT'])
+        ]
+
+        self.ksh_ll_pid = [filterPID('D2KsHLLPID', self.ksh_ll, config_pid)]
+        self.ksh_dd_pid = [filterPID('D2KsHDDPID', self.ksh_dd, config_pid)]
+        self.kshh_ll_pid = [filterPID('D2KsHHLLPID', self.kshh_ll, config_pid)]
+        self.kshh_dd_pid = [filterPID('D2KsHHDDPID', self.kshh_dd, config_pid)]
+        self.kshhh_ll_pid = [
+            filterPID('D2KsHHHLLPID', self.kshhh_ll, config_pid)
+        ]
+        self.kshhh_dd_pid = [
+            filterPID('D2KsHHHDDPID', self.kshhh_dd, config_pid)
+        ]
+        self.kshh_ll_pid_part = [
+            filterPID('D2KsHHLLPIDPartialD', self.kshh_ll_part, config_pid)
+        ]
+        self.kshh_dd_pid_part = [
+            filterPID('D2KsHHDDPIDPartialD', self.kshh_dd_part, config_pid)
+        ]
+
+        self.ksmumu_ll_pid = [
+            filterPID('D2KsMuMuLLPID', self.ksmumu_ll, config_pid)
+        ]
+        self.ksmumu_dd_pid = [
+            filterPID('D2KsMuMuDDPID', self.ksmumu_dd, config_pid)
+        ]
+
+        self.pi0hh_merged_pid = [
+            filterPID('D2MergedPi0HHPID', self.pi0hh_merged, config_pid)
+        ]
+        self.pi0hh_resolved_pid = [
+            filterPID('D2ResolvedPi0HHPID', self.pi0hh_resolved, config_pid)
+        ]
+        ''' self.pi0hhh_merged_pid    = [filterPID('D2MergedPi0HHHPID',self.pi0hhh_merged,config_pid)] '''
+        ''' self.pi0hhh_resolved_pid  = [filterPID('D2ResolvedPi0HHHPID',self.pi0hhh_resolved,config_pid)] '''
+        #self.pi0hhhh_merged_pid   = [filterPID('D2MergedPi0HHHHPID',self.pi0hhhh_merged,config_pid)]
+        #self.pi0hhhh_resolved_pid = [filterPID('D2ResolvedPi0HHHHPID',self.pi0hhhh_resolved,config_pid)]
+
+        # Pi0HH, Pi0HHH with Tigher Pi0 cuts
+        tightPi0_sel = "(NINTREE( ('pi0'==ABSID) & (PT < %s) ) == 0)" % self.config_pi0[
+            'TIGHT_PT_MIN']
+        self.pi0hh_tightpi0_merged_pid = [
+            filterSelection('D2MergedTightPi0HHPID', tightPi0_sel,
+                            self.pi0hh_merged_pid)
+        ]
+        self.pi0hh_tightpi0_resolved_pid = [
+            filterSelection('D2ResolvedTightPi0HHPID', tightPi0_sel,
+                            self.pi0hh_resolved_pid)
+        ]
+        ''' self.pi0hhh_tightpi0_merged_pid = [filterSelection('D2MergedTightPi0HHHPID',
+                                                             tightPi0_sel, self.pi0hhh_merged_pid)]
+          self.pi0hhh_tightpi0_resolved_pid = [filterSelection('D2ResolvedTightPi0HHHPID',
+                                                               tightPi0_sel, self.pi0hhh_resolved_pid)] '''
+
+        # subset decays
+        nossK = "((NINTREE(ID=='K+') < 2) & (NINTREE(ID=='K-') < 2))"
+        self.hhh_pid_nossK = [
+            filterSelection('D2HHHPIDNOSSK', nossK, self.hhh_pid)
+        ]
+        self.hhh_pid_tight_nossK = [
+            filterSelection('D2HHHPIDTIGHTNOSSK', nossK, self.hhh_pid_tight)
+        ]
+        self.kshhh_ll_pid_nossK = [
+            filterSelection('D2KsHHHLLPIDNOSSK', nossK, self.kshhh_ll_pid)
+        ]
+        self.kshhh_dd_pid_nossK = [
+            filterSelection('D2KsHHHDDPIDNOSSK', nossK, self.kshhh_dd_pid)
+        ]
+
+        oneK = "NINTREE(ABSID=='K+') == 1"
+        self.kpi = [filterSelection('D2KPi', oneK, self.hh)]
+        d_cf = "(((ID=='D+') & (NINTREE(ID=='K-')==1) & (%s)) | "\
+               "((ID=='D-') & (NINTREE(ID=='K+')==1) & (%s)))" % (oneK,oneK)
+        ds_cf = "((NINTREE(ID=='K-')==1) & (NINTREE(ID=='K+')==1))"
+        self.kpi_pid = [filterSelection('D2KPIPID', oneK, self.hh_pid)]
+        self.kpi_pid_tight = [
+            filterSelection('D2KPITIGHTPID', oneK, self.hh_pid_tight)
+        ]
+        self.kpi_pid_tighter1 = [
+            filterPID('D2KPITIGHTER1PID', self.kpi_pid, config_pid['TIGHTER1'])
+        ]
+
+        # Sub set decays for DDX
+        # D+/-(s) -> K+K-pi+/-
+        loki_kpkmpip_cc = "((NINTREE(ID=='K-')==1) & (NINTREE(ID=='K+')==1))"
+        loki_kmpippip_cc   = "(((ID=='D+') & (NINTREE(ID=='K-')==1) & (%s)) | "\
+                             "((ID=='D-') & (NINTREE(ID=='K+')==1) & (%s)))" % (oneK,oneK)
+        self.kpkmpip_cc = [
+            filterSelection('D2KpKmPip_cc', loki_kpkmpip_cc, self.hhh)
+        ]
+        self.kmpippip_cc = [
+            filterSelection('D2KmPipPip_cc', loki_kmpippip_cc, self.hhh)
+        ]
+        self.kpkmpip_cc_pid = [
+            filterPID('D2KpKmPip_cc_PID', self.kpkmpip_cc, config_pid)
+        ]
+        self.kmpippip_cc_pid = [
+            filterPID('D2KmPipPip_cc_PID', self.kmpippip_cc, config_pid)
+        ]
+        self.d_and_ds_cf_pid = [
+            MergedSelection(
+                'DANDDSCFPIDBeauty2Charm',
+                RequiredSelections=self.kpkmpip_cc_pid + self.kmpippip_cc_pid)
+        ]
+
+        atLeastOneK = "NINTREE(ABSID=='K+') > 0"
+        self.k2h = [filterSelection('D2K2H', atLeastOneK, self.hhh)]
+        self.k3h = [filterSelection('D2K3H', atLeastOneK, self.hhhh)]
+        self.k2h_pid = [filterPID('D2K2HPID', self.k2h, config_pid)]
+        self.k3h_pid = [filterPID('D2K3HPID', self.k3h, config_pid)]
+        self.kskhh_ll = [
+            filterSelection('D2KsKHHLL', atLeastOneK, self.kshhh_ll)
+        ]
+        self.kskhh_dd = [
+            filterSelection('D2KsKHHDD', atLeastOneK, self.kshhh_dd)
+        ]
+        self.kskhh_ll_pid = [
+            filterPID('D2KsKHHLLPID', self.kskhh_ll, config_pid)
+        ]
+        self.kskhh_dd_pid = [
+            filterPID('D2KsKHHDDPID', self.kskhh_dd, config_pid)
+        ]
+        ''' self.pi0khh_merged   = [filterSelection('D2MergedPi0KHH',atLeastOneK,self.pi0hhh_merged)]
+          self.pi0khh_resolved = [filterSelection('D2ResolvedPi0KHH',atLeastOneK,self.pi0hhh_resolved)] '''
+        ''' self.pi0khh_merged_pid   = [filterPID('D2MergedPi0KHHPID',self.pi0khh_merged,config_pid)]
+          self.pi0khh_resolved_pid = [filterPID('D2ResolvedPi0KHHPID',self.pi0khh_resolved,config_pid)] '''
+
+
+        #d0 narrow mass window +-40MeV
+        d0_narrow_min, d0_narrow_max = self._massWindow('D0narrow')
+
+        self.kpi_pid_tighter1_narrow = [
+            filterSelection(
+                'D2KPITIGHTER1PIDNARROWMW',
+                'in_range(%s,MM,%s)' % (d0_narrow_min, d0_narrow_max),
+                self.kpi_pid_tighter1)
+        ]
+        self.kpi_pid_tight_up = [
+            filterSelection('D2KPITIGHTPIDUP', oneK, self.hh_pid_tight_up)
+        ]
+        self.k3pi = [filterSelection('D2K3PI', oneK, self.hhhh)]
+        self.k3pi_up = [filterSelection('D2K3PIUP', oneK, self.hhhh_up)]
+        self.k3pi_pid = [filterPID('D2K3PIPID', self.k3pi, config_pid)]
+        self.k3pi_pid_tight = [
+            filterPID('D2K3PIPIDTIGHT', self.k3pi, config_pid['TIGHT'])
+        ]
+        self.k3pi_pid_tighter1 = [
+            filterPID('D2K3PIPIDTIGHTER1', self.k3pi, config_pid['TIGHTER1'])
+        ]
+        self.k3pi_pid_tighter1_narrow = [
+            filterSelection(
+                'D2K3PIPIDTIGHTER1NARROWMW',
+                'in_range(%s,MM,%s)' % (d0_narrow_min, d0_narrow_max),
+                self.k3pi_pid_tighter1)
+        ]
+        self.k3pi_pid_tight_up = [
+            filterPID('D2K3PIPIDTIGHTUP', self.k3pi_up, config_pid['TIGHT'])
+        ]
+        self.d0_cf_pid = [
+            MergedSelection(
+                'D0CFPIDBeauty2Charm',
+                RequiredSelections=self.kpi_pid + self.k3pi_pid)
+        ]
+        self.pi0kpi_merged = [
+            filterSelection('D2Pi0KPi_Merged', oneK, self.pi0hh_merged)
+        ]
+        self.pi0kpi_resolved = [
+            filterSelection('D2Pi0KPi_Resolved', oneK, self.pi0hh_resolved)
+        ]
+        d_min, d_max, ds_min, ds_max = self._massWindowD2HHHCF()
+
+        #tighter D selections for DDX
+        #self.hh_ddx_pid   = [filterSelection('D2hh_for_DDX',LoKiCuts(['VCHI2DOF','BPVVDCHI2'],config_for_ddx).code(),self.hh_pid)]
+        #self.hhh_ddx_pid   = [filterSelection('D2hhh_for_DDX',LoKiCuts(['VCHI2DOF','BPVVDCHI2'],config_for_ddx).code(),self.hhh_pid)]
+        #self.hhhh_ddx_pid   = [filterSelection('D2hhhh_for_DDX',LoKiCuts(['VCHI2DOF','BPVVDCHI2'],config_for_ddx).code(),self.hhhh_pid)]
+        #self.k3pi_ddx_pid = [filterSelection('D2k3pi_for_DDX',LoKiCuts(['VCHI2DOF','BPVVDCHI2'],config_for_ddx).code(),self.k3pi_pid)]
+
+        #use this below
+        d_cf_noMassWin = d_cf
+        d_cf = LoKiCuts.combine([d_cf, "in_range(%s,MM,%s)" % (d_min, d_max)])
+        ds_cf = LoKiCuts.combine(
+            [ds_cf, "in_range(%s,MM,%s)" % (ds_min, ds_max)])
+        cf = '(' + d_cf + ') | (' + ds_cf + ')'
+        self.hhh_cf_pid = [filterSelection('D2HHHCFPID', cf, self.hhh_pid)]
+        ds = "(((NINTREE(ID=='K-')==1) & (NINTREE(ID=='K+')==1)) |"
+        ds += "(NINTREE(ABSID=='K+')==0) | "
+        ds += "((ID=='D+') & (NINTREE(ID=='K+')==1) & (%s)) | "\
+              "((ID=='D-') & (NINTREE(ID=='K-')==1) & (%s)))" % (oneK,oneK)
+        ds = LoKiCuts.combine([ds, "in_range(%s,MM,%s)" % (ds_min, ds_max)])
+
+        #D with Ds rejection
+        self.hhh_ds_rejection = [
+            filterSelection('DsRejection',
+                            "(MM < 1910*MeV)",
+                            self.hhh_cf_pid)
+        ]
+
+        #print 'ds =', ds
+        self.ds_hhh_pid_tight = [
+            filterSelection('Ds2HHHPIDTIGHT', ds, self.hhh_pid_tight)
+        ]
+        # WS decays
+        self.kshh_ll_ws = self._makeD2KShhWS("LL")
+        self.kshh_dd_ws = self._makeD2KShhWS("DD")
+        self.hh_ws = self._makeD2hhWS()
+        self.pi0hh_merged_ws = self._makeD2Pi0hhWS('Merged')
+        self.pi0hh_resolved_ws = self._makeD2Pi0hhWS('Resolved')
+        self.hhhh_ws = self._makeD2hhhhWS()
+
+        self.ksmumu_ll_ws = self._makeD2KSmumuWS("LL")
+        self.ksmumu_dd_ws = self._makeD2KSmumuWS("DD")
+
+        # phi mu nu
+        self.phimu = self._makeD2PhiMuNu()
+
+        #Different subsets or selections for FULL DST lines
+        #Different PID filtering
+        self.hhh_pid_tightpi = [
+            filterPID('D2HHHPIDTIGHTPI', self.hhh_pid, config_pid['TIGHTPI'])
+        ]
+        ''' self.hhh_pid_tightpi_up = [filterPID('D2HHHPIDTIGHTPIUP',self.hhh_up,config_pid['TIGHTPI'])] '''
+        ''' self.hhh_pid_tighter = [filterPID('D2HHHPIDTIGHTER',self.hhh_pid,config_pid['TIGHTER'])] '''
+        self.hhh_pid_special = [
+            filterPID('D2HHHPIDSPECIAL', self.hhh, config_pid['SPECIAL'])
+        ]
+        self.hhh_pid_specialpi = [
+            filterPID('D2HHHPIDSPECIALPI', self.hhh, config_pid['SPECIALPI'])
+        ]
+
+        self.hh_pid_tight = [
+            filterPID('D2HHPIDTIGHT', self.hh_pid, config_pid['TIGHT'])
+        ]
+
+        self.kshh_ll_ws_pid = [
+            filterPID('D2KsHHLLWSPID', self.kshh_ll_ws, config_pid)
+        ]
+        self.kshh_dd_ws_pid = [
+            filterPID('D2KsHHDDWSPID', self.kshh_dd_ws, config_pid)
+        ]
+
+        kkpi = "((NINTREE(ID=='K-')==1) & (NINTREE(ID=='K+')==1))"
+        self.kkpi_pid_tightpi = [
+            filterSelection('D2KKPiPIDTIGHTPI', kkpi, self.hhh_pid_tightpi)
+        ]
+        self.kkpi_pid_specialpi = [
+            filterSelection('D2KKPiPIDSPECIALPI', kkpi, self.hhh_pid_specialpi)
+        ]
+
+        #filter fo d2kkpi
+        myPreAmble = [
+            "qPion = CHILD(Q,'pi+' == ABSID)", "qKaonP = CHILD(Q, 'K+' == ID)",
+            "qKaonM = CHILD(Q, 'K-' == ID)",
+            "px_pi = CHILD(PX, 'pi+' == ABSID ) ",
+            "py_pi = CHILD(PY, 'pi+' == ABSID ) ",
+            "pz_pi = CHILD(PZ, 'pi+' == ABSID ) ",
+            "e_pi = CHILD(E, 'pi+' == ABSID  ) ",
+            "px_kp = CHILD(PX, 'K+' == ID ) ",
+            "py_kp = CHILD(PY, 'K+' == ID ) ",
+            "pz_kp = CHILD(PZ, 'K+' == ID ) ", "e_kp = CHILD(E, 'K+' == ID ) ",
+            "pid_kp = CHILD(PIDK, 'K+' == ID ) ",
+            "px_km = CHILD(PX, 'K-' == ID ) ",
+            "py_km = CHILD(PY, 'K-' == ID ) ",
+            "pz_km = CHILD(PZ, 'K-' == ID ) ", "e_km = CHILD(E, 'K-' == ID ) ",
+            "pid_km = CHILD(PIDK, 'K-' == ID ) ", "px_KK = px_kp + px_km ",
+            "py_KK = py_kp + py_km ", "pz_KK = pz_kp + pz_km ",
+            "e_KK = e_kp + e_km",
+            "m_KK = sqrt ( e_KK**2 - px_KK**2 - py_KK**2 - pz_KK**2 ) ",
+            "px_Kpi1 = px_kp + px_pi ", "py_Kpi1 = py_kp + py_pi ",
+            "pz_Kpi1 = pz_kp + pz_pi ", "e_Kpi1 = e_kp + e_pi ",
+            "m_KpPim = sqrt ( e_Kpi1**2 - px_Kpi1**2 - py_Kpi1**2 - pz_Kpi1**2 ) ",
+            "px_Kpi2 = px_km + px_pi ", "py_Kpi2 = py_km + py_pi ",
+            "pz_Kpi2 = pz_km + pz_pi ", "e_Kpi2 = e_km + e_pi ",
+            "m_KmPip = sqrt ( e_Kpi2**2 - px_Kpi2**2 - py_Kpi2**2 - pz_Kpi2**2 ) "
+        ]
+
+        D1isDs2KKPi = "( ((pid_km>0) & (pid_kp>0)) | (m_KK<1040) | ((qPion*qKaonP<0) & (abs(m_KpPim-892)<100)) | ((qPion*qKaonM<0) & (abs(m_KmPip-892)<100) )  )"
+
+        #self.kkpi_custom = [filterSelection('D2KKPiCUSTOM',D1isDs2KKPi,self.kkpi_pid_tightpi,myPreAmble)]
+        self.kkpi_custom = [
+            filterSelection('D2KKPiCUSTOM', D1isDs2KKPi,
+                            self.kkpi_pid_specialpi, myPreAmble)
+        ]
+
+        #for use with the FULL DST B --> Ds 3H lines
+
+        #ds non CF selection = (Ds+ --> K+pi+pi-) | (Ds+ --> 3pi)
+        ds_pipipi = "(NINTREE(ABSID=='K+')==0)"
+        ds_kpipi = "((ID=='D+') & (NINTREE(ID=='K+')==1) & (%s)) | "\
+                   "((ID=='D-') & (NINTREE(ID=='K-')==1) & (%s))" % (oneK,oneK)
+
+        self.ds_hhh_cf_custom = [
+            filterSelection('Ds2HHHCFCUSTOM',
+                            "in_range(%s,MM,%s)" % (ds_min, ds_max),
+                            self.kkpi_custom)
+        ]
+
+        self.ds_pipipi_pid_tightpi = [
+            filterSelection('Ds2PiPiPiPIDTIGHTPI', ds_pipipi,
+                            self.hhh_pid_tightpi)
+        ]
+        self.ds_kpipi_pid_special = [
+            filterSelection('Ds2KPiPiPIDSPECIAL', ds_kpipi,
+                            self.hhh_pid_special)
+        ]
+
+        self.ds_hhh_pid_custom = [
+            MergedSelection(
+                'Ds2HHHPIDCUSTOMBeauty2Charm',
+                RequiredSelections=self.ds_pipipi_pid_tightpi +
+                self.ds_kpipi_pid_special + self.ds_hhh_cf_custom)
+        ]
+
+        #this spans the whole mass range covered by D+ and Ds (comes from self.hhh)
+        #either d(s) --> pipipi kpipi or kkpi
+        self.hhh_pid_custom = [
+            MergedSelection(
+                'D2HHHPIDCUSTOMBeauty2Charm',
+                RequiredSelections=self.ds_pipipi_pid_tightpi +
+                self.ds_kpipi_pid_special + self.kkpi_custom)
+        ]
+
+        #for use with the FULL DST B --> DD line
+        #add D+ --> K+K-pi+ to the d_cf selection
+        #remove trailing bracket to add this charge combo in
+        #d_cf_plus = d_cf_noMassWin[:-1] + " | ((NINTREE(ID=='K-')==1) & (NINTREE(ID=='K+')==1)))"
+        #d_cf_plus = LoKiCuts.combine([d_cf_plus,"in_range(%s,MM,%s)"%(d_min,d_max)])
+
+        #d_kkpi_custom = [filterSelection('Dplus2KKPiCUSTOM',"in_range(%s,MM,%s)"%(d_min,d_max),self.kkpi_custom)]
+        self.d_cf_hhh_pid_tightpi = [
+            filterSelection('Dplus2HHHCF', d_cf, self.hhh_pid_tightpi)
+        ]
+        #self.d_hhh_custom = [MergedSelection('Dplus2HHHCUSTOMBeauty2Charm',RequiredSelections=d_kkpi_custom+self.d_cf_hhh_pid_tightpi)]
+        ''' self.d_cf_hhh_pid_tightpi_up = [filterSelection('Dplus2HHHCFUP',d_cf,self.hhh_pid_tightpi_up)] '''
+        #self.d_hhh_4_B2DD_custom = [MergedSelection('D2HHH_4_B2DD_CUSTOM_Beauty2Charm',
+        #                                            RequiredSelections=self.ds_hhh_pid_custom+self.d_hhh_custom)]
+        self.d_hhh_4_B2DD_custom = [
+            MergedSelection(
+                'D2HHH_4_B2DD_CUSTOM_Beauty2Charm',
+                RequiredSelections=self.hhh_pid_custom +
+                self.d_cf_hhh_pid_tightpi)
+        ]
+        ''' #for use with FULL DST D0D0 line
+          self.d0_cf_pid_tight = [filterPID('D0CFPIDTIGHT',
+                                            self.d0_cf_pid,config_pid['TIGHT'])]
+          self.d0_cf_pid_tight_up = [MergedSelection('D0CFPIDTIGHTUPBeauty2Charm',
+                                                     RequiredSelections=self.kpi_pid_tight_up+self.k3pi_pid_tight_up)] '''
+
+    def _makeD2TwoBody(self, name, decays, wm, up, config, inputs):
+        ''' Makes all D -> HH selections.'''
+        if up:
+            wm += '& (ANUM(ISUP)==1)'
+            name += 'UP'
+        comboCuts = [LoKiCuts(['ASUMPT'], config).code(), wm, hasTopoChild()]
+        comboCuts.append(LoKiCuts(['ADOCA12'], config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], config).code()
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        return Selection(
+            'Proto' + name + 'Beauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=inputs)
+
+    def _makeD2ThreeBody(self, name, decays, wm, up, config, inputs):
+        ''' Makes all D -> HHH selections.'''
+        if up:
+            wm += '& (ANUM(ISUP)==1)'
+            name += 'UP'
+        comboCuts = [LoKiCuts(['ASUMPT'], config).code(), wm, hasTopoChild()]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], config).code()]
+        comboCuts.append(LoKiCuts(['ADOCA13'], config).code())
+        comboCuts.append(LoKiCuts(['ADOCA23'], config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        momCuts = LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], config).code()
+        cp = DaVinci__N3BodyDecays(
+            Combination12Cut=comboCuts12,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        return Selection(
+            'Proto' + name + 'Beauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=inputs)
+
+    def _makeD2FourBody(self, name, decays, wm, up, config, inputs):
+        ''' Makes all D -> HHHH selections.'''
+        if up:
+            wm += '& (ANUM(ISUP)==1)'
+            name += 'UP'
+        comboCuts = [LoKiCuts(['ASUMPT'], config).code(), wm, hasTopoChild()]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], config).code()]
+        comboCuts123 = ["AALL"]
+        comboCuts123.append(LoKiCuts(['ADOCA13'], config).code())
+        comboCuts123.append(LoKiCuts(['ADOCA23'], config).code())
+        comboCuts.append(LoKiCuts(['ADOCA14'], config).code())
+        comboCuts.append(LoKiCuts(['ADOCA24'], config).code())
+        comboCuts.append(LoKiCuts(['ADOCA34'], config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts123 = LoKiCuts.combine(comboCuts123)
+        momCuts = LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], config).code()
+        cp = DaVinci__N4BodyDecays(
+            Combination12Cut=comboCuts12,
+            Combination123Cut=comboCuts123,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        return Selection(
+            'Proto' + name + 'Beauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=inputs)
+
+    def _makeD2FiveBody(self, name, decays, wm, up, config, inputs):
+        ''' Makes all D -> HHHHH selections.'''
+        if up:
+            wm += '& (ANUM(ISUP)==1)'
+            name += 'UP'
+        comboCuts = [LoKiCuts(['ASUMPT'], config).code(), wm, hasTopoChild()]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], config).code()]
+        comboCuts123 = ["AALL"]
+        comboCuts123.append(LoKiCuts(['ADOCA13'], config).code())
+        comboCuts123.append(LoKiCuts(['ADOCA23'], config).code())
+        comboCuts1234 = ["AALL"]
+        comboCuts1234.append(LoKiCuts(['ADOCA14'], config).code())
+        comboCuts1234.append(LoKiCuts(['ADOCA24'], config).code())
+        comboCuts1234.append(LoKiCuts(['ADOCA34'], config).code())
+        comboCuts.append(LoKiCuts(['ADOCA15'], config).code())
+        comboCuts.append(LoKiCuts(['ADOCA25'], config).code())
+        comboCuts.append(LoKiCuts(['ADOCA35'], config).code())
+        comboCuts.append(LoKiCuts(['ADOCA45'], config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts123 = LoKiCuts.combine(comboCuts123)
+        comboCuts1234 = LoKiCuts.combine(comboCuts1234)
+        momCuts = LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], config).code()
+        cp = DaVinci__N5BodyDecays(
+            Combination12Cut=comboCuts12,
+            Combination123Cut=comboCuts123,
+            Combination1234Cut=comboCuts1234,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        return Selection(
+            'Proto' + name + 'Beauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=inputs)
+
+    def _massWindow(self, which):
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        if which == 'D0':
+            min = 1864.84 - dm  # D0 - dm
+            max = 1864.84 + dm  # D0 + dm
+        elif which == 'D0wide':
+            min = 1864.84 - dm - 150.
+            max = 1864.84 + dm + 150.
+        elif which == 'D0narrow':
+            min = 1864.84 - dm + 60.
+            max = 1864.84 + dm - 60.
+        elif which == 'D0Partial':
+            min = 1000.0
+            max = 1864.84 + dm
+        else:
+            min = 1869.62 - dm  # D+ - dm
+            max = 1968.49 + dm  # Ds+ + dm
+        return ('%s*%s' % (min, units), '%s*%s' % (max, units))
+
+    def _massWindowD2HHHCF(self):
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        d_min = 1869.62 - dm
+        d_max = 1869.62 + dm
+        ds_min = 1968.49 - dm
+        ds_max = 1968.49 + dm
+        return ('%s*%s' % (d_min, units), '%s*%s' % (d_max, units),
+                '%s*%s' % (ds_min, units), '%s*%s' % (ds_max, units))
+
+    def getInputs(self, dec, up, extras):
+
+        inputs = []
+        inputs += extras
+
+        # Pions ?
+        if 'pi-' in dec or 'pi+' in dec:
+            inputs += [self.pions]
+            if up: inputs += [self.uppions]
+
+        # kaons ?
+        if 'K-' in dec or 'K+' in dec:
+            inputs += [self.kaons]
+            if up: inputs += [self.upkaons]
+
+        # muons ?
+        if 'mu-' in dec or 'mu+' in dec:
+            inputs += [self.muons]
+
+        return inputs
+
+    ## # Implementation using SubPID
+    ## def _makeD2hh(self,up=False):
+    ##      '''Makes D->hh'''
+    ##      min,max  = self._massWindow('D0')
+    ##      decays = [['pi+','pi-'],['pi+','K-'],['K+','pi-'],['K+','K-']]
+    ##      wm = awmFunctor(decays,min,max)
+    ##      inputs = [ self.pions ]
+    ##      if up : inputs += [self.uppions]
+    ##      protoD2hh = self._makeD2TwoBody('D2HH',['D0 -> pi+ pi-'],wm,up,self.config,inputs)
+    ##      name = 'D2HH'
+    ##      if up: name += 'UP'
+    ##      return [subPIDSels(decays,name,'',min,max,[protoD2hh])]
+
+    # Implementation not using SubPID
+    def _makeD2hh(self, up=False):
+        '''Makes D->hh'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D0')
+
+        decays = [['pi+', 'pi-'], ['K+', 'pi-'], ['K+', 'K-'], ['K-', 'pi+']]
+
+        sels = []
+
+        for dec in decays:
+            name = makeSelName('D', dec)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, [])
+            sels += [
+                self._makeD2TwoBody(name, [sel], awmFunctor([dec], min, max),
+                                    up, self.config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2HH' + tag + 'Beauty2Charm', RequiredSelections=sels)
+        ]
+
+    ## # Implementation using SubPID
+    ## def _makeD2hhWS(self,up=False):
+    ##      '''Makes D->hh WS'''
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+    ##      min,max  = self._massWindow('D0')
+    ##      decays = [['pi+','pi+'],['pi+','K+'],['K+','pi+'],['K+','K+']]
+    ##      wm = awmFunctor(decays,min,max)
+    ##      inputs = [ self.pions ]
+    ##      if up : inputs += [self.uppions]
+    ##      psel = self._makeD2TwoBody('D2HHWSPlus',['D0 -> pi+ pi+'],wm,up,self.config,inputs)
+    ##      psel = subPIDSels(decays,'D2HHWSPlus'+tag,'',min,max,[psel])
+    ##      msel = self._makeD2TwoBody('D2HHWSMinus',['D0 -> pi- pi-'],wm,up,self.config,inputs)
+    ##      msel = subPIDSels(getCCs(decays),'D2HHWSMinus'+tag,'',min,max,[msel])
+    ##      return [MergedSelection('D2HHWSBeauty2Charm'+tag,
+    ##                              RequiredSelections=[psel,msel])]
+
+    # Implementation not using SubPID
+    def _makeD2hhWS(self, up=False):
+        '''Makes D->hh WS'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D0')
+
+        decaysp = [['pi+', 'pi+'], ['K+', 'pi+'], ['K+', 'K+']]
+        decaysm = getCCs(decaysp)
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D', dec, 'WSPlus')
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, [])
+            sels += [
+                self._makeD2TwoBody(name, [sel], awmFunctor([dec], min, max),
+                                    up, self.config, inputs)
+            ]
+
+        for dec in decaysm:
+            name = makeSelName('D', dec, 'WSMinus')
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, [])
+            sels += [
+                self._makeD2TwoBody(name, [sel], awmFunctor([dec], min, max),
+                                    up, self.config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2HHWS' + tag + 'Beauty2Charm', RequiredSelections=sels)
+        ]
+
+    ## # Implementation using one instance of SubPID for all subsitutions
+    ## def _makeD2hhh(self,up=False):
+    ##     '''Makes D->hhh'''
+    ##     tag = ''
+    ##     if up: tag = 'UP'
+    ##     min,max = self._massWindow('D+')
+    ##     decays = [['pi+','pi+','pi-'],['pi+','pi+','K-'],
+    ##               ['K+', 'pi+','pi-'],['K+', 'pi+','K-'],
+    ##               ['pi+','K+', 'pi-'],['pi+','K+', 'K-'],
+    ##               ['K+', 'K+', 'pi-'],['K+', 'K+', 'K-']]
+    ##     wm = awmFunctor(decays,min,max)
+    ##     inputs = [ self.pions ]
+    ##     if up : inputs += [self.uppions]
+    ##     protoDp2hhh = self._makeD2ThreeBody('D+2HHH',['D+ -> pi+ pi+ pi-'],wm,up,
+    ##                                         self.config, inputs)
+    ##     psels = subPIDSels(decays,'D+2HHH'+tag,'',min,max,[protoDp2hhh])
+    ##     protoDm2hhh = self._makeD2ThreeBody('D-2HHH',['D- -> pi- pi- pi+'],wm,up,
+    ##                                         self.config, inputs)
+    ##     msels = subPIDSels(getCCs(decays),'D-2HHH'+tag,'',min,max,[protoDm2hhh])
+    ##     return [MergedSelection('D2HHHBeauty2Charm'+tag,RequiredSelections=[psels,msels])]
+
+    ## # Implementation using one instance of SubPID per substitution
+    ## def _makeD2hhh(self,up=False):
+    ##      '''Makes D->hhh'''
+
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+
+    ##      min,max = self._massWindow('D+')
+
+    ##      inputs = [ self.pions ]
+    ##      if up : inputs += [self.uppions]
+
+    ##      decaysp = [['pi+','pi+','pi-'],['pi+','pi+','K-'],
+    ##                 ['K+', 'pi+','pi-'],['K+', 'pi+','K-'],
+    ##                 ['pi+','K+', 'pi-'],['pi+','K+', 'K-'],
+    ##                 ['K+', 'K+', 'pi-'],['K+', 'K+', 'K-']]
+    ##      decaysm = getCCs(decaysp)
+
+    ##      sp = self._makeD2ThreeBody('D+2HHH',['D+ -> pi+ pi+ pi-'],
+    ##                                 awmFunctor(decaysp,min,max),
+    ##                                 up, self.config, inputs)
+    ##      sm = self._makeD2ThreeBody('D-2HHH',['D- -> pi- pi- pi+'],
+    ##                                 awmFunctor(decaysm,min,max),
+    ##                                 up, self.config, inputs)
+
+    ##      sels = []
+
+    ##      for dec in decaysp :
+    ##           name = makeSelName('D+',dec)
+    ##           sels += [ subPIDSels([dec],name,tag,min,max,[sp]) ]
+    ##      for dec in decaysm :
+    ##           name = makeSelName('D-',dec)
+    ##           sels += [ subPIDSels([dec],name,tag,min,max,[sm]) ]
+
+    ##      return [MergedSelection('D2HHHBeauty2Charm'+tag,RequiredSelections=sels)]
+
+    # Implementation not using SubPID at all
+    def _makeD2hhh(self, up=False):
+        '''Makes D->hhh'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D+')
+
+        decaysp = [['pi+', 'pi+', 'pi-'], ['pi+', 'pi+', 'K-'],
+                   ['K+', 'pi+', 'pi-'], ['K+', 'pi+', 'K-'],
+                   ['K+', 'K+', 'pi-'], ['K+', 'K+', 'K-']]
+        decaysm = getCCs(decaysp)
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D+', dec, tag)
+            sel = makeSel('D+', dec)
+            inputs = self.getInputs(dec, up, [])
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, self.config, inputs)
+            ]
+        for dec in decaysm:
+            name = makeSelName('D-', dec, tag)
+            sel = makeSel('D-', dec)
+            inputs = self.getInputs(dec, up, [])
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, self.config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2HHH' + tag + 'Beauty2Charm', RequiredSelections=sels)
+        ]
+
+    ## # Implementation using SubPID
+    ## def _makeD2KSh(self,which,up=False):
+    ##      '''Makes D->Ksh'''
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+    ##      min,max  = self._massWindow('D+')
+    ##      decays = [['KS0','pi+'],['KS0','K+']]
+    ##      wm = awmFunctor(decays,min,max)
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA12_MAX')
+    ##      if up : inputs = [self.pions] + self.ks[which] + [self.uppions]
+    ##      else:   inputs = [self.pions] + self.ks[which]
+    ##      protoDp2Ksh = self._makeD2TwoBody('D+2KsH_'+which,['D+ -> KS0 pi+'],wm,up,config,inputs)
+    ##      psels = subPIDSels(decays,'D+2KsH'+tag,which,min,max,[protoDp2Ksh])
+    ##      protoDm2Ksh = self._makeD2TwoBody('D-2KsH_'+which,['D- -> KS0 pi-'],wm,up,config,inputs)
+    ##      msels = subPIDSels(getCCs(decays),'D-2KsH'+tag,which,min,max,[protoDm2Ksh])
+    ##      return [MergedSelection('D2KsHBeauty2Charm_%s%s'%(which,tag),
+    ##                              RequiredSelections=[psels,msels])]
+
+    # Implementation not using SubPID
+    def _makeD2KSh(self, which, up=False):
+        '''Makes D->Ksh'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D+')
+
+        decaysp = [['KS0', 'pi+'], ['KS0', 'K+']]
+        decaysm = getCCs(decaysp)
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA12_MAX')
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D+', dec, which)
+            sel = makeSel('D+', dec)
+            inputs = self.getInputs(dec, up, self.ks[which])
+            sels += [
+                self._makeD2TwoBody(name, [sel], awmFunctor([dec], min, max),
+                                    up, config, inputs)
+            ]
+
+        for dec in decaysm:
+            name = makeSelName('D-', dec, which)
+            sel = makeSel('D-', dec)
+            inputs = self.getInputs(dec, up, self.ks[which])
+            sels += [
+                self._makeD2TwoBody(name, [sel], awmFunctor([dec], min, max),
+                                    up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2KsHBeauty2Charm_%s%s' % (which, tag),
+                RequiredSelections=sels)
+        ]
+
+    def _makeD2KstarKs(self, which):
+
+        min, max = self._massWindow('D+')
+
+        decaysp = [["K*(892)+", "KS0"]]
+        wmp = awmFunctor(decaysp, min, max)
+
+        decaysm = [["K*(892)-", "KS0"]]
+        wmm = awmFunctor(decaysm, min, max)
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA12_MAX')
+
+        inputs = self.hhBuilder.kspi + self.hhBuilder.kstarpm + self.ks[which]
+
+        comboCutsp = [LoKiCuts(['ASUMPT'], config).code(), wmp]
+        comboCutsp = LoKiCuts.combine(comboCutsp)
+        comboCutsm = [LoKiCuts(['ASUMPT'], config).code(), wmm]
+        comboCutsm = LoKiCuts.combine(comboCutsm)
+
+        momCuts = LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], config).code()
+
+        cpp = CombineParticles(
+            CombinationCut=comboCutsp,
+            MotherCut=momCuts,
+            DecayDescriptors=['D+ -> K*(892)+ KS0'])
+        cpm = CombineParticles(
+            CombinationCut=comboCutsm,
+            MotherCut=momCuts,
+            DecayDescriptors=['D- -> K*(892)- KS0'])
+
+        selp = Selection(
+            'ProtoD+2KstKs' + which + 'Beauty2Charm',
+            Algorithm=cpp,
+            RequiredSelections=inputs)
+        selm = Selection(
+            'ProtoD-2KstKs' + which + 'Beauty2Charm',
+            Algorithm=cpm,
+            RequiredSelections=inputs)
+
+        return [
+            MergedSelection(
+                'D2KstKsBeauty2Charm' + which, RequiredSelections=[selp, selm])
+        ]
+
+    def _makeD2KstarKstar0(self):
+        min, max = self._massWindow('D+')
+
+        decaysp = [["K*(892)+", "K*(892)~0"]]
+        wmp = awmFunctor(decaysp, min, max)
+
+        decaysm = [["K*(892)-", "K*(892)0"]]
+        wmm = awmFunctor(decaysm, min, max)
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA12_MAX')
+
+        inputs = self.hhBuilder.kspi + self.hhBuilder.kstarpm + self.hhBuilder.kstar0
+
+        comboCutsp = [LoKiCuts(['ASUMPT'], config).code(), wmp]
+        comboCutsp = LoKiCuts.combine(comboCutsp)
+        comboCutsm = [LoKiCuts(['ASUMPT'], config).code(), wmm]
+        comboCutsm = LoKiCuts.combine(comboCutsm)
+        momCuts = LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], config).code()
+
+        #dauCuts = { "K*(892)+"  : hasTopoChild(),
+        #            "K*(892)-"  : hasTopoChild(),
+        #            "K*(892)~0" : hasTopoChild(),
+        #            "K*(892)0"  : hasTopoChild() }
+
+        cpp = CombineParticles(
+            CombinationCut=comboCutsp,
+            MotherCut=momCuts,
+            #DaughtersCuts=dauCuts,
+            DecayDescriptors=['D+ -> K*(892)+ K*(892)~0'])
+        cpm = CombineParticles(
+            CombinationCut=comboCutsm,
+            MotherCut=momCuts,
+            #DaughtersCuts=dauCuts,
+            DecayDescriptors=['D- -> K*(892)- K*(892)0'])
+
+        selp = Selection(
+            'ProtoD+2KstKst0Beauty2Charm',
+            Algorithm=cpp,
+            RequiredSelections=inputs)
+        selm = Selection(
+            'ProtoD-2KstKst0Beauty2Charm',
+            Algorithm=cpm,
+            RequiredSelections=inputs)
+
+        return [
+            MergedSelection(
+                'D2KstKst0Beauty2Charm', RequiredSelections=[selp, selm])
+        ]
+
+    ## # Implementation using one instance of SubPID for all substitutions
+    ## def _makeD2Kstarhh(self,up=False):
+    ##      '''Makes D-> K*+(->Ksh,Kpi0) hh'''
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+    ##      min,max = self._massWindow('D+')
+    ##      decaysp = [['pi+','pi-','K*(892)+'],['pi+','K-','K*(892)+'],
+    ##                 ['K+', 'pi-','K*(892)+'],['K+', 'K-','K*(892)+']]
+    ##      wmp = awmFunctor(decaysp,min,max)
+    ##      decaysm = [['pi+','pi-','K*(892)-'],['pi+','K-','K*(892)-'],
+    ##                 ['K+', 'pi-','K*(892)-'],['K+', 'K-','K*(892)-']]
+    ##      wmm = awmFunctor(decaysm,min,max)
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA13_MAX')
+    ##      config.pop('ADOCA23_MAX')
+    ##      if up : inputs = [self.pions] + self.hhBuilder.kspi + self.hhBuilder.kstarpm + [self.uppions]
+    ##      else:   inputs = [self.pions] + self.hhBuilder.kspi + self.hhBuilder.kstarpm
+    ##      protoDp2Ksthh = self._makeD2ThreeBody('D+2KstHH',['D+ -> pi+ pi- K*(892)+'],
+    ##                                            wmp,up,config,inputs)
+    ##      psels = subPIDSels(decaysp,'D+2KstHH',tag,min,max,[protoDp2Ksthh])
+    ##      protoDm2Ksthh = self._makeD2ThreeBody('D-2KstHH',['D- -> pi+ pi- K*(892)-'],
+    ##                                            wmm,up,config,inputs)
+    ##      msels = subPIDSels(decaysm,'D-2KstHH',tag,min,max,[protoDm2Ksthh])
+    ##      return [MergedSelection('D2KstHHBeauty2Charm_%s'%tag,
+    ##                              RequiredSelections=[psels,msels])]
+
+    ## # Implementation using one instance of SubPID per substitution
+    ## def _makeD2Kstarhh(self,up=False):
+    ##      '''Makes D-> K*+(->Ksh,Kpi0) hh'''
+
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+
+    ##      min,max = self._massWindow('D+')
+
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA13_MAX')
+    ##      config.pop('ADOCA23_MAX')
+
+    ##      if up : inputs = [self.pions] + self.hhBuilder.kspi + self.hhBuilder.kstarpm + [self.uppions]
+    ##      else:   inputs = [self.pions] + self.hhBuilder.kspi + self.hhBuilder.kstarpm
+
+    ##      decaysp = [['pi+','pi-','K*(892)+'],['pi+','K-','K*(892)+'],
+    ##                 ['K+', 'pi-','K*(892)+'],['K+', 'K-','K*(892)+']]
+
+    ##      decaysm = [['pi+','pi-','K*(892)-'],['pi+','K-','K*(892)-'],
+    ##                 ['K+', 'pi-','K*(892)-'],['K+', 'K-','K*(892)-']]
+
+    ##      ps = self._makeD2ThreeBody('D+2HHKst',['D+ -> pi+ pi- K*(892)+'],
+    ##                                 awmFunctor(decaysp,min,max),
+    ##                                 up,config,inputs)
+
+    ##      ms = self._makeD2ThreeBody('D-2HHKst',['D- -> pi+ pi- K*(892)-'],
+    ##                                 awmFunctor(decaysm,min,max),
+    ##                                 up,config,inputs)
+
+    ##      sels = [ ]
+
+    ##      for dec in decaysp :
+    ##           name = makeSelName('D+',dec)
+    ##           sels += [ subPIDSels([dec],name,tag,min,max,[ps]) ]
+
+    ##      for dec in decaysm :
+    ##           name = makeSelName('D-',dec)
+    ##           sels += [ subPIDSels([dec],name,tag,min,max,[ms]) ]
+
+    ##      return [MergedSelection('D2KstHHBeauty2Charm_%s'%tag,RequiredSelections=sels)]
+
+    # Implementation not using SubPID at all
+    def _makeD2Kstarhh(self, up=False):
+        '''Makes D-> K*+(->Ksh,Kpi0) hh'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D+')
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA13_MAX')
+        config.pop('ADOCA23_MAX')
+
+        extrainputs = self.hhBuilder.kspi + self.hhBuilder.kstarpm
+
+        decaysp = [['pi+', 'pi-', 'K*(892)+'], ['pi+', 'K-', 'K*(892)+'],
+                   ['K+', 'pi-', 'K*(892)+'], ['K+', 'K-', 'K*(892)+']]
+
+        decaysm = [['pi+', 'pi-', 'K*(892)-'], ['pi+', 'K-', 'K*(892)-'],
+                   ['K+', 'pi-', 'K*(892)-'], ['K+', 'K-', 'K*(892)-']]
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D+', dec)
+            sel = makeSel('D+', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor(
+                    decaysp, min, max), up, config, inputs)
+            ]
+
+        for dec in decaysm:
+            name = makeSelName('D-', dec)
+            sel = makeSel('D-', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor(
+                    decaysm, min, max), up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2KstHHBeauty2Charm_%s' % tag, RequiredSelections=sels)
+        ]
+
+    # Implementation not using SubPID
+    def _makeD2KShh(self, which, up=False):
+        '''Makes D->Kshh'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        mass_window_tag = 'D0'
+        ks_tag = which
+        if which.find("PartialD") != -1:
+            mass_window_tag += 'Partial'
+            ks_tag = ks_tag.replace("PartialD", "")
+
+        min, max = self._massWindow(mass_window_tag)
+
+        decays = [['pi+', 'pi-', 'KS0'], ['pi+', 'K-', 'KS0'],
+                  ['K+', 'pi-', 'KS0'], ['K+', 'K-', 'KS0']]
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA13_MAX')
+        config.pop('ADOCA23_MAX')
+
+        extrainputs = self.ks[ks_tag]
+
+        sels = []
+
+        for dec in decays:
+            name = makeSelName('D', dec, which)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2Ks' + tag + 'HH' + which + 'Beauty2Charm',
+                RequiredSelections=sels)
+        ]
+
+    def _makeD2KSmumu(self, which, up=False):
+        '''Makes D->Ksmumu'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D0')
+
+        decays = [['mu+', 'mu-', 'KS0']]
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA13_MAX')
+        config.pop('ADOCA23_MAX')
+
+        extrainputs = self.ks[which]
+
+        sels = []
+
+        for dec in decays:
+            name = makeSelName('D', dec, which)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2Ks' + tag + 'MuMu' + which + 'Beauty2Charm',
+                RequiredSelections=sels)
+        ]
+
+    def _makeD2KSPi0(self, name, decays, inputs):
+        ''' Makes D0 -> Ks pi0 selection.'''
+        comboCuts = "(ADAMASS('D0') < %(MASS_WINDOW)s) " % self.config
+        momCuts = "ALL"
+
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        cp = cp.configurable(name + 'Beauty2CharmCombiner')
+        return Selection(
+            'D02KSPi0' + name + 'Beauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=inputs)
+
+    def _makeD02KSPi0(self, kstype, pi0type):
+        decays = ["D0 -> KS0 pi0"]
+        return [
+            self._makeD2KSPi0('KS' + kstype + 'Pi0' + pi0type, decays,
+                              self.ks[kstype] + self.pi0[pi0type])
+        ]
+
+    ## # Implementation using one instance of SubPID for all substitutions
+    ## def _makeD2KShhh(self,which,up=False):
+    ##      '''Makes D->Kshhh'''
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+    ##      min,max  = self._massWindow('D+')
+    ##      decays = [['pi+','pi-','pi+','KS0'],
+    ##                ['K+', 'pi-','pi+','KS0'],['pi+','K-', 'pi+','KS0'],['pi+','pi-','K+','KS0'],
+    ##                ['K+', 'K-', 'pi+','KS0'],['K+', 'pi-','K+', 'KS0'],['pi+','K-', 'K+','KS0'],
+    ##                ['K+', 'K-', 'K+', 'KS0']]
+    ##      wm = awmFunctor(decays,min,max)
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA14_MAX')
+    ##      config.pop('ADOCA24_MAX')
+    ##      config.pop('ADOCA34_MAX')
+    ##      if up : inputs = [self.pions] + self.ks[which] + [self.uppions]
+    ##      else  : inputs = [self.pions] + self.ks[which]
+    ##      protoDp2Kshhh = self._makeD2FourBody('D+2KsHHH_'+which,['D+ -> pi+ pi- pi+ KS0'],
+    ##                                           wm,up,config,inputs)
+    ##      psels = subPIDSels(decays,'D+2KsHHH'+tag,which,min,max,[protoDp2Kshhh])
+    ##      protoDm2Kshhh = self._makeD2FourBody('D-2KsHHH_'+which,['D- -> pi- pi+ pi- KS0'],
+    ##                                           wm,up,config,inputs)
+    ##      msels = subPIDSels(getCCs(decays),'D-2KsHHH'+tag,which,min,max,[protoDm2Kshhh])
+    ##      return [MergedSelection('D2KsHHHBeauty2Charm_%s%s'%(which,tag),
+    ##                              RequiredSelections=[psels,msels])]
+
+    ## # Implementation using one instance of SubPID per substitution
+    ## def _makeD2KShhh(self,which,up=False):
+    ##      '''Makes D->Kshhh'''
+
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+
+    ##      min,max  = self._massWindow('D+')
+
+    ##      decaysp = [['pi+','pi-','pi+','KS0'],
+    ##                 ['K+', 'pi-','pi+','KS0'],['pi+','K-', 'pi+','KS0'],['pi+','pi-','K+','KS0'],
+    ##                 ['K+', 'K-', 'pi+','KS0'],['K+', 'pi-','K+', 'KS0'],['pi+','K-', 'K+','KS0'],
+    ##                 ['K+', 'K-', 'K+', 'KS0']]
+    ##      decaysm = getCCs(decaysp)
+
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA14_MAX')
+    ##      config.pop('ADOCA24_MAX')
+    ##      config.pop('ADOCA34_MAX')
+
+    ##      if up : inputs = [self.pions] + self.ks[which] + [self.uppions]
+    ##      else:   inputs = [self.pions] + self.ks[which]
+
+    ##      sp = self._makeD2FourBody('D+2KsHHH_'+which,['D+ -> pi+ pi- pi+ KS0'],
+    ##                                awmFunctor(decaysp,min,max),
+    ##                                up,config,inputs)
+    ##      sm = self._makeD2FourBody('D-2KsHHH_'+which,['D- -> pi- pi+ pi- KS0'],
+    ##                                awmFunctor(decaysm,min,max),
+    ##                                up,config,inputs)
+
+    ##      sels = []
+
+    ##      for dec in decaysp :
+    ##           name = makeSelName('D+',dec,tag)
+    ##           sels += [ subPIDSels([dec],name,which,min,max,[sp]) ]
+    ##      for dec in decaysm :
+    ##           name = makeSelName('D-',dec,tag)
+    ##           sels += [ subPIDSels([dec],name,which,min,max,[sm]) ]
+
+    ##      return [MergedSelection('D2KsHHHBeauty2Charm_%s%s'%(which,tag),RequiredSelections=sels)]
+
+    # Implementation not using SubPID at all
+    def _makeD2KShhh(self, which, up=False):
+        '''Makes D->Kshhh'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D+')
+
+        decaysp = [['pi+', 'pi-', 'pi+', 'KS0'], ['K+', 'pi-', 'pi+', 'KS0'],
+                   ['pi+', 'K-', 'pi+', 'KS0'], ['K+', 'K-', 'pi+', 'KS0'],
+                   ['K+', 'pi-', 'K+', 'KS0'], ['K+', 'K-', 'K+', 'KS0']]
+        decaysm = getCCs(decaysp)
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA14_MAX')
+        config.pop('ADOCA24_MAX')
+        config.pop('ADOCA34_MAX')
+
+        extrainputs = self.ks[which]
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D+', dec, tag + which)
+            sel = makeSel('D+', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2FourBody(name, [sel], awmFunctor([dec], min, max),
+                                     up, config, inputs)
+            ]
+        for dec in decaysm:
+            name = makeSelName('D-', dec, tag + which)
+            sel = makeSel('D-', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2FourBody(name, [sel], awmFunctor([dec], min, max),
+                                     up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2KsHHHBeauty2Charm_%s%s' % (which, tag),
+                RequiredSelections=sels)
+        ]
+
+    ## # Implementation using SubPID
+    ## def _makeD2KShhWS(self,which,up=False):
+    ##      '''Makes D->Kshh WS'''
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+    ##      min,max = self._massWindow('D0')
+    ##      decays = [['pi+','pi+','KS0'],['pi+','K+','KS0'],
+    ##                ['K+', 'pi+','KS0'],['K+', 'K+','KS0']]
+    ##      wm = awmFunctor(decays,min,max)
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA13_MAX')
+    ##      config.pop('ADOCA23_MAX')
+    ##      if up : inputs = [self.pions] + self.ks[which] + [self.uppions]
+    ##      else  : inputs = [self.pions] + self.ks[which]
+    ##      protoPlus = self._makeD2ThreeBody('D2KSHHWSPlus'+which,['D0 -> pi+ pi+ KS0'],
+    ##                                wm,up,config,inputs)
+    ##      psels = subPIDSels(decays,'D2KSHHWSPlus'+tag,which,min,max,[protoPlus])
+    ##      protoMinus = self._makeD2ThreeBody('D2KSHHWSMinus'+which,['D0 -> pi- pi- KS0'],
+    ##                                 wm,up,config,inputs)
+    ##      msels = subPIDSels(getCCs(decays),'D2KSHHWSMinus'+tag,which,min,max,
+    ##                         [protoMinus])
+    ##      return [MergedSelection('D2KsHHWSBeauty2Charm_%s%s'%(which,tag),
+    ##                              RequiredSelections=[psels,msels])]
+
+    # Implementation not using SubPID
+    def _makeD2KShhWS(self, which, up=False):
+        '''Makes D->Kshh WS'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D0')
+
+        decaysp = [['pi+', 'pi+', 'KS0'], ['K+', 'pi+', 'KS0'],
+                   ['K+', 'K+', 'KS0']]
+        decaysm = getCCs(decaysp)
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA13_MAX')
+        config.pop('ADOCA23_MAX')
+
+        extrainputs = self.ks[which]
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D', dec, 'WSPlus' + which)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        for dec in decaysm:
+            name = makeSelName('D', dec, 'WSMinus' + which)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2KsHHWSBeauty2Charm_%s%s' % (which, tag),
+                RequiredSelections=sels)
+        ]
+
+    def _makeD2KSmumuWS(self, which, up=False):
+        '''Makes D->Ksmumu WS'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D0')
+
+        decaysp = [['mu+', 'mu+', 'KS0']]
+        decaysm = getCCs(decaysp)
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA13_MAX')
+        config.pop('ADOCA23_MAX')
+
+        extrainputs = self.ks[which]
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D', dec, 'WSPlus' + which)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        for dec in decaysm:
+            name = makeSelName('D', dec, 'WSMinus' + which)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2KsMuMuWSBeauty2Charm_%s%s' % (which, tag),
+                RequiredSelections=sels)
+        ]
+
+    ## # CRJ : To be improved. Will have hideous combinatorics if used ...
+    ## def _makeD2Pi0hhhh(self,which,up=False):
+    ##      '''Makes D->Pi0hhhh'''
+    ##      min,max = self._massWindow('D0wide')
+    ##      decays = [
+    ##          ['pi+','pi-','pi+','pi-','pi0'],
+    ##          ['pi+','pi-','pi+','K-','pi0'],['pi+','pi-','K+','pi-','pi0'],
+    ##          ['pi+','K-','pi+','pi-','pi0'],['K+','pi-','pi+','pi-','pi0'],
+    ##          ['pi+','pi-','K+','K-','pi0'],['pi+','K-','pi+','K-','pi0'],
+    ##          ['K+','pi-','pi+','K-','pi0'],
+    ##          ['pi+','K-','K+','K-','pi0'],['K+','pi-','K+','K-','pi0'],
+    ##          ['K+','K-','K+','pi-','pi0'],
+    ##          ['K+','K-','K+','K-','pi0']
+    ##          ]
+    ##      wm = awmFunctor(decays,min,max)
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA15_MAX')
+    ##      config.pop('ADOCA25_MAX')
+    ##      config.pop('ADOCA35_MAX')
+    ##      config.pop('ADOCA45_MAX')
+    ##      if up : inputs = [self.pions] + self.pi0[which]+ [self.uppions]
+    ##      else  : inputs = [self.pions] + self.pi0[which]
+    ##      protoD2pi0hh = self._makeD2FiveBody('D2Pi0HHHH_'+which,['D0 -> pi+ pi- pi+ pi- pi0'],
+    ##                                          wm,up,config,inputs)
+    ##      name = 'D2Pi0HHHH'
+    ##      if up: name += 'UP'
+    ##      return [subPIDSels(decays,name,which,min,max,[protoD2pi0hh])]
+
+    ## # Implementation using one instance of Sub PID for all substitutions
+    ## def _makeD2Pi0hhh(self,which,up=False):
+    ##      '''Makes D->Pi0hhh'''
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+
+    ##      min,max = self._massWindow('D+')
+
+    ##      decaysp = [['pi+','pi+','pi-','pi0'],['K+', 'pi+','pi-','pi0'],
+    ##                 ['pi+','K+', 'pi-','pi0'],['K+', 'K+', 'pi-','pi0'],
+    ##                 ['K+', 'pi+','K-', 'pi0'],['pi+','pi+','K-', 'pi0'],
+    ##                 ['K+', 'K+', 'K-', 'pi0'],['pi+','K+', 'K-', 'pi0']]
+    ##      decaysm = getCCs(decaysp)
+
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA14_MAX')
+    ##      config.pop('ADOCA24_MAX')
+    ##      config.pop('ADOCA34_MAX')
+
+    ##      if up : inputs = [self.pions] + self.pi0[which] + [self.uppions]
+    ##      else  : inputs = [self.pions] + self.pi0[which]
+
+    ##      sels = [ ]
+
+    ##      name = 'D+2Pi0HHH'
+    ##      sels += [ subPIDSels(decaysp,name+tag,which,min,max,
+    ##                           [self._makeD2FourBody(name+'_'+which,
+    ##                                                 ['D+ -> pi+ pi+ pi- pi0'],
+    ##                                                 awmFunctor(decaysp,min,max),
+    ##                                                 up,config,inputs)]) ]
+
+    ##      name = 'D-2Pi0HHH'
+    ##      sels += [ subPIDSels(decaysm,name+tag,which,min,max,
+    ##                           [self._makeD2FourBody(name+'_'+which,
+    ##                                                 ['D- -> pi- pi- pi+ pi0'],
+    ##                                                 awmFunctor(decaysm,min,max),
+    ##                                                 up,config,inputs)]) ]
+
+    ##      return [MergedSelection('D2Pi0HHHBeauty2Charm_%s%s'%(which,tag),
+    ##                              RequiredSelections=sels)]
+
+    ## ## Implementation using one instance of SubPID per substitution
+    ## def _makeD2Pi0hhh(self,which,up=False):
+    ##      '''Makes D->Pi0hhh'''
+
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+
+    ##      min,max = self._massWindow('D+')
+
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA14_MAX')
+    ##      config.pop('ADOCA24_MAX')
+    ##      config.pop('ADOCA34_MAX')
+
+    ##      if up : inputs = [self.pions] + self.pi0[which] + [self.uppions]
+    ##      else  : inputs = [self.pions] + self.pi0[which]
+
+    ##      decaysp = [['pi+','pi+','pi-','pi0'],['K+', 'pi+','pi-','pi0'],
+    ##                 ['pi+','K+', 'pi-','pi0'],['K+', 'K+', 'pi-','pi0'],
+    ##                 ['K+', 'pi+','K-', 'pi0'],['pi+','pi+','K-', 'pi0'],
+    ##                 ['K+', 'K+', 'K-', 'pi0'],['pi+','K+', 'K-', 'pi0']]
+    ##      decaysm = getCCs(decaysp)
+
+    ##      ps = self._makeD2FourBody( 'D+2HHHPi0_'+which, ['D+ -> pi+ pi+ pi- pi0'],
+    ##                                 awmFunctor(decaysp,min,max),
+    ##                                 up,config,inputs )
+
+    ##      ms = self._makeD2FourBody( 'D-2HHHPi0_'+which, ['D- -> pi- pi- pi+ pi0'],
+    ##                                 awmFunctor(decaysm,min,max),
+    ##                                 up,config,inputs )
+
+    ##      sels = []
+
+    ##      for dec in decaysp :
+    ##           name = makeSelName('D+',dec,tag)
+    ##           sels += [ subPIDSels([dec],name,which,min,max,[ps]) ]
+
+    ##      for dec in decaysm :
+    ##           name = makeSelName('D-',dec,tag)
+    ##           sels += [ subPIDSels([dec],name,which,min,max,[ms]) ]
+
+    ##      return [MergedSelection('D2Pi0HHHBeauty2Charm_%s%s'%(which,tag),RequiredSelections=sels)]
+
+    ## Method not using SubPID st all
+    def _makeD2Pi0hhh(self, which, up=False):
+        '''Makes D->Pi0hhh'''
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D+')
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA14_MAX')
+        config.pop('ADOCA24_MAX')
+        config.pop('ADOCA34_MAX')
+
+        extrainputs = self.pi0[which]
+
+        decaysp = [['pi+', 'pi+', 'pi-', 'pi0'], ['K+', 'pi+', 'pi-', 'pi0'],
+                   ['K+', 'K+', 'pi-', 'pi0'], ['K+', 'pi+', 'K-', 'pi0'],
+                   ['pi+', 'pi+', 'K-', 'pi0'], ['K+', 'K+', 'K-', 'pi0']]
+        decaysm = getCCs(decaysp)
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D+', dec, which)
+            sel = makeSel('D+', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2FourBody(name, [sel], awmFunctor([dec], min, max),
+                                     up, config, inputs)
+            ]
+
+        for dec in decaysm:
+            name = makeSelName('D-', dec, which)
+            sel = makeSel('D-', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2FourBody(name, [sel], awmFunctor([dec], min, max),
+                                     up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2Pi0HHHBeauty2Charm_%s%s' % (which, tag),
+                RequiredSelections=sels)
+        ]
+
+    ## Implementation not using SubPID at all
+    def _makeD2Pi0hh(self, which, up=False):
+        '''Makes D->Pi0hh'''
+
+        min, max = self._massWindow('D0wide')
+
+        tag = ''
+        if up: tag = 'UP'
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA13_MAX')
+        config.pop('ADOCA23_MAX')
+
+        extrainputs = self.pi0[which]
+
+        decays = [['pi+', 'pi-', 'pi0'], ['pi+', 'K-', 'pi0'],
+                  ['K+', 'pi-', 'pi0'], ['K+', 'K-', 'pi0']]
+
+        sels = []
+
+        for dec in decays:
+            name = makeSelName('D', dec, which)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2Pi0HHBeauty2Charm_%s%s' % (which, tag),
+                RequiredSelections=sels)
+        ]
+
+    ## # Implementation using SubPID
+    ## def _makeD2Pi0hhWS(self,which,up=False):
+    ##      '''Makes D->Pi0hh WS'''
+
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+
+    ##      min,max = self._massWindow('D0')
+
+    ##      decays = [['pi+','pi+','pi0'],['pi+','K+','pi0'],
+    ##                ['K+', 'pi+','pi0'],['K+', 'K+','pi0']]
+
+    ##      wm = awmFunctor(decays,min,max)
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA13_MAX')
+    ##      config.pop('ADOCA23_MAX')
+    ##      if up : inputs = [self.pions] + self.pi0[which] + [self.uppions]
+    ##      else  : inputs = [self.pions] + self.pi0[which]
+    ##      psel = self._makeD2ThreeBody('D2Pi0HHWSPlus'+which,['D0 -> pi+ pi+ pi0'],wm,
+    ##                           up,config,inputs)
+    ##      psel = subPIDSels(decays,'D2Pi0HHWSPlus'+tag,which,min,max,[psel])
+    ##      msel = self._makeD2ThreeBody('D2Pi0HHWSMinus'+which,['D0 -> pi- pi- pi0'],wm,
+    ##                           up,config,inputs)
+    ##      msel = subPIDSels(getCCs(decays),'D2Pi0HHWSMinus'+tag,which,min,max,[msel])
+    ##      return [MergedSelection('D2Pi0HHWSBeauty2Charm'+which+tag,
+    ##                              RequiredSelections=[psel,msel])]
+
+    # Implementation not using SubPID
+    def _makeD2Pi0hhWS(self, which, up=False):
+        '''Makes D->Pi0hh WS'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D0')
+
+        decaysp = [['pi+', 'pi+', 'pi0'], ['K+', 'pi+', 'pi0'],
+                   ['K+', 'K+', 'pi0']]
+        decaysm = getCCs(decaysp)
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA13_MAX')
+        config.pop('ADOCA23_MAX')
+
+        extrainputs = self.pi0[which]
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D', dec, 'WSPlus' + which)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        for dec in decaysm:
+            name = makeSelName('D', dec, 'WSMinus' + which)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2Pi0HHWSBeauty2Charm' + which + tag, RequiredSelections=sels)
+        ]
+
+    ## # Implementation using one instance of SubPID
+    ## def _makeD2KSPi0h(self,whichKs,whichPi0,up=False):
+    ##      '''Makes D->KsPi0h'''
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+    ##      which = whichKs+whichPi0
+    ##      min,max = self._massWindow('D+')
+    ##      decays = [['pi+','KS0','pi0'],
+    ##                ['K+', 'KS0','pi0']]
+    ##      wm = awmFunctor(decays,min,max)
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA13_MAX')
+    ##      config.pop('ADOCA23_MAX')
+    ##      if up : inputs = [self.pions] + self.pi0[whichPi0] + self.ks[whichKs] + [self.uppions]
+    ##      else  : inputs = [self.pions] + self.pi0[whichPi0] + self.ks[whichKs]
+    ##      protoDp2Kspi0h = self._makeD2ThreeBody('D+2KSPi0H_'+whichKs+'_'+whichPi0,['D+ -> pi+ KS0 pi0'],
+    ##                                             wm,up,config,inputs)
+    ##      psel = subPIDSels(decays,'D+2KSPi0H'+tag,which,min,max,[protoDp2Kspi0h])
+    ##      protoDm2Kspi0h = self._makeD2ThreeBody('D-2KSPi0H_'+whichKs+'_'+whichPi0,['D- -> pi- KS0 pi0'],
+    ##                                             wm,up,config,inputs)
+    ##      msel = subPIDSels(getCCs(decays),'D-2KSPi0H'+tag,which,min,max,[protoDm2Kspi0h])
+    ##      return [MergedSelection('D2KSPi0HBeauty2Charm_'+which+tag,RequiredSelections=[psel,msel])]
+
+    # Implementation not using SubPID
+    def _makeD2KSPi0h(self, whichKs, whichPi0, up=False):
+        '''Makes D->KsPi0h'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        which = whichKs + whichPi0
+
+        min, max = self._massWindow('D+')
+
+        decaysp = [['pi+', 'KS0', 'pi0'], ['K+', 'KS0', 'pi0']]
+        decaysm = getCCs(decaysp)
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA13_MAX')
+        config.pop('ADOCA23_MAX')
+
+        extrainputs = self.pi0[whichPi0] + self.ks[whichKs]
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D+', dec, which)
+            sel = makeSel('D+', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        for dec in decaysm:
+            name = makeSelName('D-', dec, which)
+            sel = makeSel('D-', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2ThreeBody(name, [sel], awmFunctor([dec], min, max),
+                                      up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2KSPi0HBeauty2Charm_' + which + tag, RequiredSelections=sels)
+        ]
+
+    ## # Implementation using one instance of SubPID for all substitutions
+    ## def _makeD2KSPi0hh(self,whichKs,whichPi0,up=False):
+    ##      '''Makes D->KsPi0hh'''
+    ##      min,max = self._massWindow('D0wide')
+    ##      decays = [['pi+','pi-','KS0','pi0'],['pi+','K-','KS0','pi0'],
+    ##                ['K+','pi-','KS0','pi0'],['K+','K-','KS0','pi0']]
+    ##      wm = awmFunctor(decays,min,max)
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA13_MAX')
+    ##      config.pop('ADOCA23_MAX')
+    ##      config.pop('ADOCA14_MAX')
+    ##      config.pop('ADOCA24_MAX')
+    ##      config.pop('ADOCA34_MAX')
+    ##      if up : inputs = [self.pions] + self.pi0[whichPi0] + self.ks[whichKs] + [self.uppions]
+    ##      else  : inputs = [self.pions] + self.pi0[whichPi0] + self.ks[whichKs]
+    ##      protoD2Kspi0hh = self._makeD2FourBody('D2KSPi0HH_'+whichKs+'_'+whichPi0,['D0 -> pi+ pi- KS0 pi0'],
+    ##                                            wm,up,config,inputs)
+    ##      name = 'D2KsPi0HH'
+    ##      if up: name += 'UP'
+    ##      return [subPIDSels(decays,name,whichKs+'_'+whichPi0,min,max,[protoD2Kspi0hh])]
+
+    ## ## Implementation using one instance of SubPID per substitution
+    ## def _makeD2KSPi0hh(self,whichKs,whichPi0,up=False):
+    ##      '''Makes D->KsPi0hh'''
+
+    ##      min,max = self._massWindow('D0wide')
+
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+
+    ##      which = whichKs+'_'+whichPi0
+
+    ##      config = deepcopy(self.config)
+    ##      config.pop('ADOCA13_MAX')
+    ##      config.pop('ADOCA23_MAX')
+    ##      config.pop('ADOCA14_MAX')
+    ##      config.pop('ADOCA24_MAX')
+    ##      config.pop('ADOCA34_MAX')
+
+    ##      if up : inputs = [self.pions] + self.pi0[whichPi0] + self.ks[whichKs] + [self.uppions]
+    ##      else  : inputs = [self.pions] + self.pi0[whichPi0] + self.ks[whichKs]
+
+    ##      decays = [['pi+','pi-','KS0','pi0'],['pi+','K-','KS0','pi0'],
+    ##                ['K+', 'pi-','KS0','pi0'],['K+', 'K-','KS0','pi0']]
+
+    ##      s = self._makeD2FourBody('D2HHKsPi0_'+which,['D0 -> pi+ pi- KS0 pi0'],
+    ##                               awmFunctor(decays,min,max),up,config,inputs)
+
+    ##      sels = [ ]
+
+    ##      for dec in decays :
+    ##           name = makeSelName('D',dec,tag)
+    ##           sels += [ subPIDSels([dec],name,which,min,max,[s]) ]
+
+    ##      return [ MergedSelection( 'D2KSPi0HHBeauty2Charm'+whichPi0+whichKs+tag,
+    ##                                RequiredSelections=sels ) ]
+
+    ## Implementation not using SubPID at all
+    def _makeD2KSPi0hh(self, whichKs, whichPi0, up=False):
+        '''Makes D->KsPi0hh'''
+
+        min, max = self._massWindow('D0wide')
+
+        tag = ''
+        if up: tag = 'UP'
+
+        which = whichKs + '_' + whichPi0
+
+        config = deepcopy(self.config)
+        config.pop('ADOCA13_MAX')
+        config.pop('ADOCA23_MAX')
+        config.pop('ADOCA14_MAX')
+        config.pop('ADOCA24_MAX')
+        config.pop('ADOCA34_MAX')
+
+        extrainputs = self.pi0[whichPi0] + self.ks[whichKs]
+
+        decays = [['pi+', 'pi-', 'KS0', 'pi0'], ['pi+', 'K-', 'KS0', 'pi0'],
+                  ['K+', 'pi-', 'KS0', 'pi0'], ['K+', 'K-', 'KS0', 'pi0']]
+
+        sels = []
+
+        for dec in decays:
+            name = makeSelName('D', dec, which)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, extrainputs)
+            sels += [
+                self._makeD2FourBody(name, [sel], awmFunctor([dec], min, max),
+                                     up, config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2HHKSPi0' + whichPi0 + whichKs + tag,
+                RequiredSelections=sels)
+        ]
+
+    # Implementation not using SubPID at all
+    def _makeD2hhhh(self, up=False):
+        '''Makes D->hhhh'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D0')
+
+        decays = [
+            # 4pi
+            ['pi+', 'pi+', 'pi-', 'pi-'],
+            # K3pi
+            ['pi+', 'pi+', 'K-', 'pi-'],
+            ['K+', 'pi+', 'pi-', 'pi-'],
+            # 2K2pi
+            ['K+', 'K+', 'pi-', 'pi-'],
+            ['pi+', 'K+', 'K-', 'pi-'],
+            ['pi+', 'pi+', 'K-', 'K-'],
+            # 3Kpi
+            ['K+', 'K+', 'K-', 'pi-'],
+            ['K+', 'pi+', 'K-', 'K-'],
+            # 4K
+            ['K+', 'K+', 'K-', 'K-']
+        ]
+
+        sels = []
+
+        for dec in decays:
+            name = makeSelName('D', dec)
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, [])
+            sels += [
+                self._makeD2FourBody(name, [sel], awmFunctor([dec], min, max),
+                                     up, self.config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2HHHH' + tag + 'Beauty2Charm', RequiredSelections=sels)
+        ]
+
+    ## # Implementation using one instance of SubPID per substitution
+    ## def _makeD2hhhhWS(self,up=False):
+    ##      '''Makes D->hhhh WS'''
+
+    ##      tag = ''
+    ##      if up: tag = 'UP'
+
+    ##      min,max = self._massWindow('D0')
+
+    ##      decaysp = [['pi+','pi+','pi+','pi+'],
+    ##                 ['pi+','pi+','K+', 'pi+'],['pi+','pi+','pi+','K+'],
+    ##                 ['K+', 'pi+','pi+','pi+'],['pi+','K+', 'pi+','pi+'],
+    ##                 ['K+', 'pi+','K+', 'pi+'],['K+', 'pi+','pi+','K+'],
+    ##                 ['pi+','K+', 'K+', 'pi+'],['pi+','K+', 'pi+','K+'],
+    ##                 ['K+', 'K+', 'pi+','pi+'],['pi+','pi+','K+', 'K+'],
+    ##                 ['pi+','K+', 'K+', 'K+'], ['K+', 'pi+','K+', 'K+'],
+    ##                 ['K+', 'K+', 'pi+','K+'], ['K+', 'K+', 'K+', 'pi+'],
+    ##                 ['K+', 'K+', 'K+', 'K+']
+    ##                 ]
+    ##      decaysm = getCCs(decaysp)
+
+    ##      inputs = [ self.pions ]
+    ##      if up : inputs += [self.uppions]
+
+    ##      sp = self._makeD2FourBody('D2HHHHWSPlus',['D0 -> pi+ pi+ pi+ pi+'],
+    ##                                awmFunctor(decaysp,min,max),
+    ##                                up,self.config,inputs)
+    ##      sm = self._makeD2FourBody('D2HHHHWSMinus',['D0 -> pi- pi- pi- pi-'],
+    ##                                awmFunctor(decaysm,min,max),
+    ##                                up,self.config,inputs)
+
+    ##      sels = []
+
+    ##      for dec in decaysp :
+    ##           name = makeSelName('D',dec,'WSPlus')
+    ##           sels += [ subPIDSels([dec],name,tag,min,max,[sp]) ]
+    ##      for dec in decaysm :
+    ##           name = makeSelName('D',dec,'WSMinus')
+    ##           sels += [ subPIDSels([dec],name,tag,min,max,[sm]) ]
+
+    ##      return [MergedSelection('D2HHHH'+tag+'WSBeauty2Charm',RequiredSelections=sels)]
+
+    # Implementation not using SubPID at all
+    def _makeD2hhhhWS(self, up=False):
+        '''Makes D->hhhh WS'''
+
+        tag = ''
+        if up: tag = 'UP'
+
+        min, max = self._massWindow('D0')
+
+        decaysp = [['pi+', 'pi+', 'pi+', 'pi+'], ['K+', 'pi+', 'pi+', 'pi+'],
+                   ['K+', 'K+', 'pi+', 'pi+'], ['K+', 'K+', 'K+', 'pi+'],
+                   ['K+', 'K+', 'K+', 'K+']]
+        decaysm = getCCs(decaysp)
+
+        sels = []
+
+        for dec in decaysp:
+            name = makeSelName('D', dec, 'WSPlus')
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, [])
+            sels += [
+                self._makeD2FourBody(name, [sel], awmFunctor([dec], min, max),
+                                     up, self.config, inputs)
+            ]
+
+        for dec in decaysm:
+            name = makeSelName('D', dec, 'WSMinus')
+            sel = makeSel('D0', dec)
+            inputs = self.getInputs(dec, up, [])
+            sels += [
+                self._makeD2FourBody(name, [sel], awmFunctor([dec], min, max),
+                                     up, self.config, inputs)
+            ]
+
+        return [
+            MergedSelection(
+                'D2HHHH' + tag + 'WSBeauty2Charm', RequiredSelections=sels)
+        ]
+
+    def _makeD2PhiMuNu(self, up=False):
+        '''makes Ds->phi mu nu'''
+        decays = [['phi(1020)', 'mu+']]
+        min = '1125.13*MeV'
+        max = '2168.49*MeV'
+        cpkk = CombineParticles(
+            CombinationCut="ADAMASS('phi(1020)') < 150*MeV",  #( hasTopoChild() )
+            MotherCut='(VFASPF(VCHI2/VDOF) < 10)',
+            DaughtersCuts={'K+': '(PIDK>-10)'},
+            DecayDescriptors=['phi(1020) -> K+ K-'])
+        phi = Selection(
+            'PHI2KK4D2PhiMuNu' + 'Beauty2Charm',
+            Algorithm=cpkk,
+            RequiredSelections=[self.kaons])
+        momCuts = [LoKiCuts(['VCHI2DOF'], self.config).code()]
+        momCuts.append('(MM < 2168.49)')
+        momCuts = LoKiCuts.combine(momCuts)
+
+        cpp = CombineParticles(  #CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=['[D+ -> phi(1020) mu+]cc'])
+        protoD2PhiMuNu = Selection(
+            'ProtoD2PhiMuNuBeauty2Charm',
+            Algorithm=cpp,
+            RequiredSelections=[phi, self.muons])
+        return [protoD2PhiMuNu]
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class DstarBuilder(object):
+    '''Makes D* mesons for Beauty2Charm.'''
+
+    def __init__(self, d, pions, uppions, pi0, photons, vlaphotons, config,
+                 config_pid):
+        self.d = d
+        self.pions = pions
+        self.uppions = uppions
+        self.pi0 = pi0
+        self.photons = photons
+        self.vlaphotons = vlaphotons
+        self.config = config
+        #self.d0pi           = self._makeDstar2D0pi('',self.d.hh)
+        self.d0pi = self._makeDstar2D0pi('D2HHPID', self.d.hh_pid)
+        self.d0pi_k3pi = self._makeDstar2D0pi('D2K3Pi', self.d.k3pi)
+        self.d0pi_hhhh = self._makeDstar2D0pi('D2HHHH', self.d.hhhh)
+        self.d0pi_hhhh_pid = self._makeDstar2D0pi('D2HHHHPID', self.d.hhhh_pid)
+        self.d0pi_k3h = self._makeDstar2D0pi('D2K3H', self.d.k3h)
+        self.d0pi_k3h_pid = self._makeDstar2D0pi('D2K3HPID', self.d.k3h_pid)
+        self.d0pi_hhhh_ws = self._makeDstar2D0pi('D2HHHHWS', self.d.hhhh_ws)
+        self.d0pi_kshh_ll = self._makeDstar2D0pi('D2KSHHLL', self.d.kshh_ll)
+        self.d0pi_kshh_dd = self._makeDstar2D0pi('D2KSHHDD', self.d.kshh_dd)
+        self.d0pi_kshh_ll_pid = self._makeDstar2D0pi('D2KSHHLLPID',
+                                                     self.d.kshh_ll_pid)
+        self.d0pi_kshh_dd_pid = self._makeDstar2D0pi('D2KSHHDDPID',
+                                                     self.d.kshh_dd_pid)
+        self.d0pi_pid = [filterPID('Dstar2D0PiPID', self.d0pi, config_pid, 2)]
+        self.d0pi_k3pi_pid = [
+            filterPID('Dstar2D0PiK3PiPID', self.d0pi_k3pi, config_pid, 2)
+        ]
+
+        self.d0pi_kspi0hh_ll_merged = self._makeDstar2D0pi(
+            'D2KSLLPI0MERGEDHH', self.d.kspi0hh_ll_merged)
+        self.d0pi_kspi0hh_dd_merged = self._makeDstar2D0pi(
+            'D2KSDDPI0MERGEDHH', self.d.kspi0hh_dd_merged)
+        self.d0pi_kspi0hh_ll_resolved = self._makeDstar2D0pi(
+            'D2KSLLPI0RESOLVEDHH', self.d.kspi0hh_ll_resolved)
+        self.d0pi_kspi0hh_dd_resolved = self._makeDstar2D0pi(
+            'D2KSDDPI0RESOLVEDHH', self.d.kspi0hh_dd_resolved)
+
+        self.d0pi_kspi0hh_ll_merged_pid = self._makeDstar2D0pi(
+            'D2KSLLPI0MERGEDHHPID', self.d.kspi0hh_ll_merged_pid)
+        self.d0pi_kspi0hh_dd_merged_pid = self._makeDstar2D0pi(
+            'D2KSDDPI0MERGEDHHPID', self.d.kspi0hh_dd_merged_pid)
+        self.d0pi_kspi0hh_ll_resolved_pid = self._makeDstar2D0pi(
+            'D2KSLLPI0RESOLVEDHHPID', self.d.kspi0hh_ll_resolved_pid)
+        self.d0pi_kspi0hh_dd_resolved_pid = self._makeDstar2D0pi(
+            'D2KSDDPI0RESOLVEDHHPID', self.d.kspi0hh_dd_resolved_pid)
+
+        # With Upstream D's
+        self.d0pi_kspi0hh_ll_merged_dup = self._makeDstar2D0pi(
+            'UPD2KSLLPI0MERGEDHH', self.d.kspi0hh_ll_merged_up)
+        self.d0pi_kspi0hh_dd_merged_dup = self._makeDstar2D0pi(
+            'UPD2KSDDPI0MERGEDHH', self.d.kspi0hh_dd_merged_up)
+        self.d0pi_kspi0hh_ll_resolved_dup = self._makeDstar2D0pi(
+            'UPD2KSLLPI0RESOLVEDHH', self.d.kspi0hh_ll_resolved_up)
+        self.d0pi_kspi0hh_dd_resolved_dup = self._makeDstar2D0pi(
+            'UPD2KSDDPI0RESOLVEDHH', self.d.kspi0hh_dd_resolved_up)
+        # With Upstream bachelor h
+        self.d0pi_kspi0hh_ll_merged_hup = self._makeDstar2D0pi(
+            'D2KSLLPI0MERGEDHHUP', self.d.kspi0hh_ll_merged, True)
+        self.d0pi_kspi0hh_dd_merged_hup = self._makeDstar2D0pi(
+            'D2KSDDPI0MERGEDHHUP', self.d.kspi0hh_dd_merged, True)
+        self.d0pi_kspi0hh_ll_resolved_hup = self._makeDstar2D0pi(
+            'D2KSLLPI0RESOLVEDHHUP', self.d.kspi0hh_ll_resolved, True)
+        self.d0pi_kspi0hh_dd_resolved_hup = self._makeDstar2D0pi(
+            'D2KSDDPI0RESOLVEDHHUP', self.d.kspi0hh_dd_resolved, True)
+
+        self.d0pi0_merged = self._makeDstar02D0Pi0('', 'Merged', self.d.hh)
+        self.d0pi0_resolved = self._makeDstar02D0Pi0('', 'Resolved', self.d.hh)
+        self.d0pi0_merged_pid = self._makeDstar02D0Pi0('D2HHPID', 'Merged',
+                                                       self.d.hh_pid)
+        self.d0pi0_resolved_pid = self._makeDstar02D0Pi0(
+            'D2HHPID', 'Resolved', self.d.hh_pid)
+        self.d0pi0_hhhh_merged = self._makeDstar02D0Pi0(
+            'D2HHHH', 'Merged', self.d.hhhh)
+        self.d0pi0_hhhh_resolved = self._makeDstar02D0Pi0(
+            'D2HHHH', 'Resolved', self.d.hhhh)
+        self.d0pi0_hhhh_merged_pid = self._makeDstar02D0Pi0(
+            'D2HHHHPID', 'Merged', self.d.hhhh_pid)
+        self.d0pi0_hhhh_resolved_pid = self._makeDstar02D0Pi0(
+            'D2HHHHPID', 'Resolved', self.d.hhhh_pid)
+
+        self.d0pi0_k3h_merged = self._makeDstar02D0Pi0('D2K3H', 'Merged',
+                                                       self.d.k3h)
+        self.d0pi0_k3h_resolved = self._makeDstar02D0Pi0(
+            'D2K3H', 'Resolved', self.d.k3h)
+        self.d0pi0_k3h_merged_pid = self._makeDstar02D0Pi0(
+            'D2K3HPID', 'Merged', self.d.k3h_pid)
+        self.d0pi0_k3h_resolved_pid = self._makeDstar02D0Pi0(
+            'D2K3HPID', 'Resolved', self.d.k3h_pid)
+
+        # With Upstream D's
+        self.d0pi0_merged_dup = self._makeDstar02D0Pi0('UPD2HH', 'Merged',
+                                                       self.d.hh_up)
+        self.d0pi0_resolved_dup = self._makeDstar02D0Pi0(
+            'UPD2HH', 'Resolved', self.d.hh_up)
+        self.d0pi0_hhhh_merged_dup = self._makeDstar02D0Pi0(
+            'UPD2HHHH', 'Merged', self.d.hhhh_up)
+        self.d0pi0_hhhh_resolved_dup = self._makeDstar02D0Pi0(
+            'UPD2HHHH', 'Resolved', self.d.hhhh_up)
+
+        # CRJ : With upstream D candidates
+        self.d0pi_dup = self._makeDstar2D0pi('UPD2HH', self.d.hh_up)
+        self.d0pi_hhhh_dup = self._makeDstar2D0pi('UPD2HHHH', self.d.hhhh_up)
+        self.d0pi_kshh_ll_dup = self._makeDstar2D0pi('UPD2KSHHLL',
+                                                     self.d.kshh_ll_up)
+        self.d0pi_kshh_dd_dup = self._makeDstar2D0pi('UPD2KSHHDD',
+                                                     self.d.kshh_dd_up)
+
+        # CRJ : With Upstream bachelor pi
+        self.d0pi_hup = self._makeDstar2D0pi('', self.d.hh, True)
+        self.d0pi_hhhh_hup = self._makeDstar2D0pi('D2HHHH', self.d.hhhh, True)
+        self.d0pi_kshh_ll_hup = self._makeDstar2D0pi('D2KSHHLL',
+                                                     self.d.kshh_ll, True)
+        self.d0pi_kshh_dd_hup = self._makeDstar2D0pi('D2KSHHDD',
+                                                     self.d.kshh_dd, True)
+        self.d0pi_dup_hup = self._makeDstar2D0pi('UPD2HH', self.d.hh_up, True)
+        self.d0pi_hhhh_dup_hup = self._makeDstar2D0pi('UPD2HHHH',
+                                                      self.d.hhhh_up, True)
+        self.d0pi_kshh_ll_dup_hup = self._makeDstar2D0pi(
+            'UPD2KSHHLL', self.d.kshh_ll_up, True)
+        self.d0pi_kshh_dd_dup_hup = self._makeDstar2D0pi(
+            'UPD2KSHHDD', self.d.kshh_dd_up, True)
+
+        # CRJ : Modes for Ds*+ -> Ds+ pi0
+        self.dpi0_merged = self._makeDstar2DPi0('', 'Merged', self.d.hhh)
+        self.dpi0_resolved = self._makeDstar2DPi0('', 'Resolved', self.d.hhh)
+        self.dpi0_merged_pid = self._makeDstar2DPi0('D2HHHPID', 'Merged',
+                                                    self.d.hhh_pid)
+        self.dpi0_resolved_pid = self._makeDstar2DPi0('D2HHHPID', 'Resolved',
+                                                      self.d.hhh_pid)
+        self.dpi0_khh_merged = self._makeDstar2DPi0('D2KHH', 'Merged',
+                                                    self.d.k2h)
+        self.dpi0_khh_resolved = self._makeDstar2DPi0('D2KHH', 'Resolved',
+                                                      self.d.k2h)
+        self.dpi0_khh_merged_pid = self._makeDstar2DPi0(
+            'D2KHHPID', 'Merged', self.d.k2h_pid)
+        self.dpi0_khh_resolved_pid = self._makeDstar2DPi0(
+            'D2KHHPID', 'Resolved', self.d.k2h_pid)
+        self.dpi0_merged_ksh_ll = self._makeDstar2DPi0('D2KSHLL', 'Merged',
+                                                       self.d.ksh_ll)
+        self.dpi0_merged_ksh_dd = self._makeDstar2DPi0('D2KSHDD', 'Merged',
+                                                       self.d.ksh_dd)
+        self.dpi0_merged_kshhh_ll = self._makeDstar2DPi0(
+            'D2KSHHHLL', 'Merged', self.d.kshhh_ll)
+        self.dpi0_merged_kshhh_dd = self._makeDstar2DPi0(
+            'D2KSHHHDD', 'Merged', self.d.kshhh_dd)
+        self.dpi0_merged_kshhh_ll_pid = self._makeDstar2DPi0(
+            'D2KSHHHLLPID', 'Merged', self.d.kshhh_ll_pid)
+        self.dpi0_merged_kshhh_dd_pid = self._makeDstar2DPi0(
+            'D2KSHHHDDPID', 'Merged', self.d.kshhh_dd_pid)
+        self.dpi0_merged_kskhh_ll = self._makeDstar2DPi0(
+            'D2KSKHHLL', 'Merged', self.d.kskhh_ll)
+        self.dpi0_merged_kskhh_dd = self._makeDstar2DPi0(
+            'D2KSKHHDD', 'Merged', self.d.kskhh_dd)
+        self.dpi0_merged_kskhh_ll_pid = self._makeDstar2DPi0(
+            'D2KSKHHLLPID', 'Merged', self.d.kskhh_ll_pid)
+        self.dpi0_merged_kskhh_dd_pid = self._makeDstar2DPi0(
+            'D2KSKHHDDPID', 'Merged', self.d.kskhh_dd_pid)
+        self.dpi0_resolved_ksh_ll = self._makeDstar2DPi0(
+            'D2KSHLL', 'Resolved', self.d.ksh_ll)
+        self.dpi0_resolved_ksh_dd = self._makeDstar2DPi0(
+            'D2KSHDD', 'Resolved', self.d.ksh_dd)
+        self.dpi0_resolved_kshhh_ll = self._makeDstar2DPi0(
+            'D2KSHHHLL', 'Resolved', self.d.kshhh_ll)
+        self.dpi0_resolved_kshhh_dd = self._makeDstar2DPi0(
+            'D2KSHHHDD', 'Resolved', self.d.kshhh_dd)
+        self.dpi0_resolved_kshhh_ll_pid = self._makeDstar2DPi0(
+            'D2KSHHHLLPID', 'Resolved', self.d.kshhh_ll_pid)
+        self.dpi0_resolved_kshhh_dd_pid = self._makeDstar2DPi0(
+            'D2KSHHHDDPID', 'Resolved', self.d.kshhh_dd_pid)
+        self.dpi0_resolved_kskhh_ll = self._makeDstar2DPi0(
+            'D2KSKHHLL', 'Resolved', self.d.kskhh_ll)
+        self.dpi0_resolved_kskhh_dd = self._makeDstar2DPi0(
+            'D2KSKHHDD', 'Resolved', self.d.kskhh_dd)
+        self.dpi0_resolved_kskhh_ll_pid = self._makeDstar2DPi0(
+            'D2KSKHHLLPID', 'Resolved', self.d.kskhh_ll_pid)
+        self.dpi0_resolved_kskhh_dd_pid = self._makeDstar2DPi0(
+            'D2KSKHHDDPID', 'Resolved', self.d.kskhh_dd_pid)
+        self.dpi0_merged_kspi0h_ll = self._makeDstar2DPi0(
+            'D2KSPI0HLL', 'Merged',
+            self.d.kspi0h_ll_resolved + self.d.kspi0h_ll_merged)
+        self.dpi0_merged_kspi0h_dd = self._makeDstar2DPi0(
+            'D2KSPI0HDD', 'Merged',
+            self.d.kspi0h_dd_resolved + self.d.kspi0h_dd_merged)
+        self.dpi0_resolved_kspi0h_ll = self._makeDstar2DPi0(
+            'D2KSPI0HLL', 'Resolved',
+            self.d.kspi0h_ll_resolved + self.d.kspi0h_ll_merged)
+        self.dpi0_resolved_kspi0h_dd = self._makeDstar2DPi0(
+            'D2KSPI0HDD', 'Resolved',
+            self.d.kspi0h_dd_resolved + self.d.kspi0h_dd_merged)
+
+        # With Upstream D
+        self.dpi0_merged_dup = self._makeDstar2DPi0('UPD2HHH', 'Merged',
+                                                    self.d.hhh_up)
+        self.dpi0_resolved_dup = self._makeDstar2DPi0('UPD2HHH', 'Resolved',
+                                                      self.d.hhh_up)
+        self.dpi0_merged_ksh_ll_dup = self._makeDstar2DPi0(
+            'UPD2KSHLL', 'Merged', self.d.ksh_ll_up)
+        self.dpi0_merged_ksh_dd_dup = self._makeDstar2DPi0(
+            'UPD2KSHDD', 'Merged', self.d.ksh_dd_up)
+        self.dpi0_merged_kshhh_ll_dup = self._makeDstar2DPi0(
+            'UPD2KSHHHLL', 'Merged', self.d.kshhh_ll_up)
+        self.dpi0_merged_kshhh_dd_dup = self._makeDstar2DPi0(
+            'UPD2KSHHHDD', 'Merged', self.d.kshhh_dd_up)
+        self.dpi0_resolved_ksh_ll_dup = self._makeDstar2DPi0(
+            'UPD2KSHLL', 'Resolved', self.d.ksh_ll_up)
+        self.dpi0_resolved_ksh_dd_dup = self._makeDstar2DPi0(
+            'UPD2KSHDD', 'Resolved', self.d.ksh_dd_up)
+        self.dpi0_resolved_kshhh_ll_dup = self._makeDstar2DPi0(
+            'UPD2KSHHHLL', 'Resolved', self.d.kshhh_ll_up)
+        self.dpi0_resolved_kshhh_dd_dup = self._makeDstar2DPi0(
+            'UPD2KSHHHDD', 'Resolved', self.d.kshhh_dd_up)
+        self.dpi0_merged_kspi0h_ll_dup = self._makeDstar2DPi0(
+            'UPD2KSPI0HLL', 'Merged',
+            self.d.kspi0h_ll_resolved_up + self.d.kspi0h_ll_merged_up)
+        self.dpi0_merged_kspi0h_dd_dup = self._makeDstar2DPi0(
+            'UPD2KSPI0HDD', 'Merged',
+            self.d.kspi0h_dd_resolved_up + self.d.kspi0h_dd_merged_up)
+        self.dpi0_resolved_kspi0h_ll_dup = self._makeDstar2DPi0(
+            'UPD2KSPI0HLL', 'Resolved',
+            self.d.kspi0h_ll_resolved_up + self.d.kspi0h_ll_merged_up)
+        self.dpi0_resolved_kspi0h_dd_dup = self._makeDstar2DPi0(
+            'UPD2KSPI0HDD', 'Resolved',
+            self.d.kspi0h_dd_resolved_up + self.d.kspi0h_dd_merged_up)
+
+        # CRJ : Modes for Ds*+ -> Ds+ gamma
+        self.dgamma_hhh = self._makeDstar2DGamma('D2HHH', self.d.hhh)
+        self.dgamma_hhh_pid = self._makeDstar2DGamma('D2HHHPID',
+                                                     self.d.hhh_pid)
+        self.dgamma_khh = self._makeDstar2DGamma('D2KHH', self.d.k2h)
+        self.dgamma_khh_pid = self._makeDstar2DGamma('D2KHHPID',
+                                                     self.d.k2h_pid)
+        self.dgamma_ksh_ll = self._makeDstar2DGamma('D2KsHLL', self.d.ksh_ll)
+        self.dgamma_ksh_dd = self._makeDstar2DGamma('D2KsHDD', self.d.ksh_dd)
+        self.dgamma_kshhh_ll = self._makeDstar2DGamma('D2KsHHHLL',
+                                                      self.d.kshhh_ll)
+        self.dgamma_kshhh_dd = self._makeDstar2DGamma('D2KsHHHDD',
+                                                      self.d.kshhh_dd)
+        self.dgamma_kshhh_ll_pid = self._makeDstar2DGamma(
+            'D2KsHHHLLPID', self.d.kshhh_ll_pid)
+        self.dgamma_kshhh_dd_pid = self._makeDstar2DGamma(
+            'D2KsHHHDDPID', self.d.kshhh_dd_pid)
+        self.dgamma_kskhh_ll = self._makeDstar2DGamma('D2KsKHHLL',
+                                                      self.d.kskhh_ll)
+        self.dgamma_kskhh_dd = self._makeDstar2DGamma('D2KsKHHDD',
+                                                      self.d.kskhh_dd)
+        self.dgamma_kskhh_ll_pid = self._makeDstar2DGamma(
+            'D2KsKHHLLPID', self.d.kskhh_ll_pid)
+        self.dgamma_kskhh_dd_pid = self._makeDstar2DGamma(
+            'D2KsKHHDDPID', self.d.kskhh_dd_pid)
+        self.dgamma_kspi0h_ll = self._makeDstar2DGamma(
+            'D2KsPI0HLL', self.d.kspi0h_ll_resolved + self.d.kspi0h_ll_merged)
+        self.dgamma_kspi0h_dd = self._makeDstar2DGamma(
+            'D2KsPI0HDD', self.d.kspi0h_dd_resolved + self.d.kspi0h_dd_merged)
+        # With Upstream D
+        self.dgamma_hhh_dup = self._makeDstar2DGamma('UPD2HHH', self.d.hhh_up)
+        self.dgamma_ksh_ll_dup = self._makeDstar2DGamma(
+            'UPD2KsHLL', self.d.ksh_ll_up)
+        self.dgamma_ksh_dd_dup = self._makeDstar2DGamma(
+            'UPD2KsHDD', self.d.ksh_dd_up)
+        self.dgamma_kshhh_ll_dup = self._makeDstar2DGamma(
+            'UPD2KsHHHLL', self.d.kshhh_ll_up)
+        self.dgamma_kshhh_dd_dup = self._makeDstar2DGamma(
+            'UPD2KsHHHDD', self.d.kshhh_dd_up)
+        self.dgamma_kspi0h_ll_dup = self._makeDstar2DGamma(
+            'UPD2KsPI0HLL',
+            self.d.kspi0h_ll_resolved_up + self.d.kspi0h_ll_merged_up)
+        self.dgamma_kspi0h_dd_dup = self._makeDstar2DGamma(
+            'UPD2KsPI0HDD',
+            self.d.kspi0h_dd_resolved_up + self.d.kspi0h_dd_merged_up)
+
+        # Jordi: create the lists of selections for D*0 -> D0 pi0 with merged and resolved LL and DD Ks.
+        self.d0pi0_kshh_ll = self._makeDstar02D0Pi0('KsHHLL', 'all',
+                                                    self.d.kshh_ll)
+        self.d0pi0_kshh_dd = self._makeDstar02D0Pi0('KsHHDD', 'all',
+                                                    self.d.kshh_dd)
+        self.d0pi0_kshh_ll_ws = self._makeDstar02D0Pi0(
+            'KsHHLLWS', 'all', self.d.kshh_ll_ws)  # added by A.B.
+        self.d0pi0_kshh_dd_ws = self._makeDstar02D0Pi0(
+            'KsHHDDWS', 'all', self.d.kshh_dd_ws)  # added by A.B.
+        self.d0pi0_kshh_ll_pid = self._makeDstar02D0Pi0(
+            'KsHHLLPID', 'all', self.d.kshh_ll_pid)
+        self.d0pi0_kshh_dd_pid = self._makeDstar02D0Pi0(
+            'KsHHDDPID', 'all', self.d.kshh_dd_pid)
+        # add a loose version by A.B.
+        self.d0pi0_loose_kshh_ll = self._makeDstar02D0Pi0(
+            'KsHHLL', 'all', self.d.kshh_ll, False)
+        self.d0pi0_loose_kshh_dd = self._makeDstar02D0Pi0(
+            'KsHHDD', 'all', self.d.kshh_dd, False)
+        # With Upstream D's
+        self.d0pi0_kshh_ll_dup = self._makeDstar02D0Pi0(
+            'UPKsHHLL', 'all', self.d.kshh_ll_up)
+        self.d0pi0_kshh_dd_dup = self._makeDstar02D0Pi0(
+            'UPKsHHDD', 'all', self.d.kshh_dd_up)
+
+        # Jordi: create the lists of selections for D*0 -> D0 gamma for LL and DD Ks.
+        self.d0gamma_kshh_ll = self._makeDstar02D0Gamma(
+            'KsHHLL', self.d.kshh_ll)
+        self.d0gamma_kshh_dd = self._makeDstar02D0Gamma(
+            'KsHHDD', self.d.kshh_dd)
+        self.d0gamma_kshh_ll_ws = self._makeDstar02D0Gamma(
+            'KsHHLLWS', self.d.kshh_ll_ws)  # added by A.B.
+        self.d0gamma_kshh_dd_ws = self._makeDstar02D0Gamma(
+            'KsHHDDWS', self.d.kshh_dd_ws)  # added by A.B.
+        self.d0gamma_kshh_ll_pid = self._makeDstar02D0Gamma(
+            'KsHHLLPID', self.d.kshh_ll_pid)
+        self.d0gamma_kshh_dd_pid = self._makeDstar02D0Gamma(
+            'KsHHDDPID', self.d.kshh_dd_pid)
+        # add loose version (by AB)
+        self.d0gamma_loose_kshh_ll = self._makeDstar02D0GammaLoose(
+            'KsHHLL', self.d.kshh_ll)
+        self.d0gamma_loose_kshh_dd = self._makeDstar02D0GammaLoose(
+            'KsHHDD', self.d.kshh_dd)
+        # With Upstream D's
+        self.d0gamma_kshh_ll_dup = self._makeDstar02D0Gamma(
+            'UPKsHHLL', self.d.kshh_ll_up)
+        self.d0gamma_kshh_dd_dup = self._makeDstar02D0Gamma(
+            'UPKsHHDD', self.d.kshh_dd_up)
+
+        self.d0gamma_hh = self._makeDstar02D0Gamma('HH', self.d.hh)
+        self.d0gamma_k3h = self._makeDstar02D0Gamma('K3H', self.d.k3h)
+        self.d0gamma_hh_pid = self._makeDstar02D0Gamma('HHPID', self.d.hh_pid)
+        self.d0gamma_k3h_pid = self._makeDstar02D0Gamma(
+            'K3HPID', self.d.k3h_pid)
+
+        self.d0gamma_hhhh = self._makeDstar02D0Gamma('HHHH', self.d.hhhh)
+
+        #Donal: D*0 -> D0 gamma with looser delta mass window
+        self.d0gamma_loose_hh = self._makeDstar02D0GammaLoose('HH', self.d.hh)
+        self.d0gamma_loose_k3h = self._makeDstar02D0GammaLoose(
+            'K3H', self.d.k3h)
+        self.d0gamma_loose_hh_pid = self._makeDstar02D0GammaLoose(
+            'HHPID', self.d.hh_pid)
+        self.d0gamma_loose_k3h_pid = self._makeDstar02D0GammaLoose(
+            'K3HPID', self.d.k3h_pid)
+        self.d0gamma_loose_hhhh = self._makeDstar02D0GammaLoose(
+            'HHHH', self.d.hhhh)
+
+        d0pi_2460 = self._makeDstar24602D0pi()
+        self.d0pi_2460_pid = [
+            filterPID('Dstar24602D0PiPID', d0pi_2460, config_pid, 2)
+        ]
+        dpi_2460 = self._makeD0star24602Dpi()
+        self.dpi_2460_pid = [
+            filterPID('D0star24602DPiPID', dpi_2460, config_pid, 2)
+        ]
+
+        # Alessandro Bertolin: Ds*K CPV
+        ds4dsgammacpv = [
+            filterSelection('Ds4DsGammaCPV',
+                            "(MM > 1910*MeV) & (MM < 2030*MeV)",
+                            self.d.hhh_pid_tight)
+        ]
+        self.dsgammacpv_hhh = self._makeDsst2DGammaCPV(
+            'D2HHH', ds4dsgammacpv)  # self.d.hhh_pid
+
+    def _makeHc2Dpi(self, name, massCut, momCut, decays, inputs):
+        comboCuts = [massCut, LoKiCuts(['ADOCA12'], self.config).code()]
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'],
+                           self.config).code()
+        if momCut != "ALL": momCuts = momCuts + " & " + momCut
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        return [
+            Selection(
+                name + '2D0PiBeauty2Charm',
+                Algorithm=cp,
+                RequiredSelections=inputs)
+        ]
+
+    def _makeDstar2D0pi(self, name, d2x, up=False):
+        '''Makes D*+ -> D0 pi+ + c.c.'''
+        pions = [self.pions]
+        if up:
+            name += 'UP'
+            pions += [self.uppions]
+        massCut = "(ADAMASS('D*(2010)+') < %(MASS_WINDOW)s) " % self.config
+        momCut = "(M-MAXTREE(ABSID=='D0',M) < %(DELTAMASS_MAX)s)" % self.config
+        decays = ["D*(2010)+ -> pi+ D0", "D*(2010)- -> pi- D0"]
+        return self._makeHc2Dpi('Dstar' + name, massCut, momCut, decays,
+                                d2x + pions)
+
+    def _makeDstar24602D0pi(self):
+        '''Makes D*2(2460)+- -> D0 pi+-'''
+        massCut = "(ADAMASS('D*_2(2460)+') < 100*MeV) "
+        momCut = "ALL"
+        decays = ["D*_2(2460)+ -> pi+ D0", "D*_2(2460)- -> pi- D0"]
+        return self._makeHc2Dpi('Dstar2460', massCut, momCut, decays,
+                                self.d.kpi_pid + [self.pions])
+
+    def _makeD0star24602Dpi(self):
+        '''Makes D*2(2460)0 -> D+- pi-+'''
+        massCut = "(ADAMASS('D*_2(2460)0') < 100*MeV) "
+        momCut = "ALL"
+        decays = ["D*_2(2460)0 -> pi+ D-", "D*_2(2460)0 -> pi- D+"]
+        return self._makeHc2Dpi('D0star2460', massCut, momCut, decays,
+                                self.d.hhh_cf_pid + [self.pions])
+
+    def _makeDstar02D0X0(self, name, decays, inputs, TightDM):
+        ''' Makes all X -> HH selections involving neutrals.'''
+        comboCuts = "(ADAMASS('D*(2007)0') < %(MASS_WINDOW)s) " % self.config
+        momCuts = "(M-MAXTREE(ABSID=='D0',M) < %(DELTAMASSLOOSE_MAX)s)" % self.config
+        if TightDM:
+            momCuts = "(M-MAXTREE(ABSID=='D0',M) < %(DELTAMASS_MAX)s)" % self.config
+            name += 'TightDeltaM'
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        cp = cp.configurable(name + 'Beauty2CharmCombiner')
+        return Selection(
+            'Dstar02D0' + name + 'Beauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=inputs)
+
+    def _makeDstar2DX0(self, name, decays, inputs):
+        ''' Makes all X+ -> HH selections involving neutrals.'''
+        comboCuts = "(ADAMASS('D*_s+') < %(MASS_WINDOW)s) " % self.config
+        #momCuts = "ALL"
+        momCuts = "(M-MAXTREE(ABSID=='D+',M) < %(DELTAMASS_MAX)s)" % self.config
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        cp = cp.configurable(name + 'Beauty2CharmCombiner')
+        return Selection(
+            'Dstar2D' + name + 'Beauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=inputs)
+
+    # CRJ: make the list of selections of D*+ -> D+ pi0 with given selection of D and pi0 type.
+    def _makeDstar2DPi0(self, name, pi0type, d2x):
+        decays = ["[D*_s+ -> D+ pi0]cc"]
+        return [
+            self._makeDstar2DX0(name + 'Pi0' + pi0type, decays,
+                                d2x + self.pi0[pi0type])
+        ]
+
+    # Jordi: make the list of selections of D*0 -> D0 pi0 with given selection of D and pi0 type.
+    # modification by A.B. to use tight or wider DeltaM mass cut
+    def _makeDstar02D0Pi0(self, name, pi0type, d2x, TightDM=True):
+        decays = ["D*(2007)0 -> D0 pi0"]
+        return [
+            self._makeDstar02D0X0(name + 'Pi0' + pi0type, decays,
+                                  d2x + self.pi0[pi0type], TightDM)
+        ]
+
+    # Jordi: make the list of selections of D*0 -> D0 gamma with given selection of D.
+    def _makeDstar02D0Gamma(self, name, d2x):
+        decays = ["D*(2007)0 -> D0 gamma"]
+        # return [ self._makeDstar02D0X0( name + 'Gamma', decays, d2x + [ self.photons ] ) ]
+
+        combinationCuts = "(AALL)"
+        motherCuts = "(M-MAXTREE(ABSID=='D0',M) < %(DELTAMASS_MAX)s)" % self.config
+
+        cp = CombineParticles(
+            CombinationCut=combinationCuts,
+            MotherCut=motherCuts,
+            DecayDescriptors=decays)
+
+        cp = cp.configurable(name + 'Beauty2CharmCombiner')
+        #cp.ParticleCombiners.update( { '' : 'MomentumCombiner' } )
+
+        return [
+            Selection(
+                'Dstar02D0' + name + 'Beauty2Charm',
+                Algorithm=cp,
+                RequiredSelections=d2x + [self.photons])
+        ]
+
+    # Donal: make D*0 -> D0 gamma with higher upper delta mass window
+    def _makeDstar02D0GammaLoose(self, name, d2x):
+        decays = ["D*(2007)0 -> D0 gamma"]
+        # return [ self._makeDstar02D0X0( name + 'Gamma', decays, d2x + [ self.photons ] ) ]
+
+        combinationCuts = "(AALL)"
+        motherCuts = "(M-MAXTREE(ABSID=='D0',M) < %(DELTAMASSLOOSE_MAX)s)" % self.config
+
+        cp = CombineParticles(
+            CombinationCut=combinationCuts,
+            MotherCut=motherCuts,
+            DecayDescriptors=decays)
+
+        cp = cp.configurable(name + 'Beauty2CharmCombiner')
+        #cp.ParticleCombiners.update( { '' : 'MomentumCombiner' } )
+
+        return [
+            Selection(
+                'Dstar02D0GammaLoose' + name + 'Beauty2Charm',
+                Algorithm=cp,
+                RequiredSelections=d2x + [self.photons])
+        ]
+
+    # CRJ: make the list of selections of D*+ -> D+ gamma with given selection of D.
+    def _makeDstar2DGamma(self, name, d2x):
+        decays = ["[D*_s+ -> D+ gamma]cc"]
+
+        combinationCuts = "(AALL)"
+        motherCuts = "(M-MAXTREE(ABSID=='D+',M) < %(DELTAMASS_MAX)s)" % self.config
+
+        cp = CombineParticles(
+            CombinationCut=combinationCuts,
+            MotherCut=motherCuts,
+            DecayDescriptors=decays)
+
+        cp = cp.configurable(name + 'Beauty2CharmCombiner')
+
+        return [
+            Selection(
+                'Dstar2DGamma' + name + 'Beauty2Charm',
+                Algorithm=cp,
+                RequiredSelections=d2x + [self.photons])
+        ]
+
+    # Alessandro Bertolin for Ds*K CPV
+    def _makeDsst2DGammaCPV(self, name, d2x):
+        decays = ["[D*_s+ -> D+ gamma]cc"]
+
+        combinationCuts = "(AALL)"
+        motherCuts = "(M-MAXTREE(ABSID=='D+',M) > %(DM_DSPH_MIN)s) & (M-MAXTREE(ABSID=='D+',M) < %(DM_DSPH_MAX)s)" % self.config
+        # daughtersCuts   = "(ACHILD(M,1) > %(CHARMMASS_MIN)s)" % self.config
+
+        cp = CombineParticles(
+            CombinationCut=combinationCuts,
+            MotherCut=motherCuts,  # DaughtersCuts    = daughtersCuts  ,
+            DecayDescriptors=decays)
+
+        cp = cp.configurable(name + 'Beauty2CharmCombiner')
+
+        return [
+            Selection(
+                'Dsst2DGammaCPV' + name + 'Beauty2Charm',
+                Algorithm=cp,
+                RequiredSelections=d2x + [self.vlaphotons])
+        ]
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_HHBuilder.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_HHBuilder.py
new file mode 100644
index 000000000..1be993e8c
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_HHBuilder.py
@@ -0,0 +1,468 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 copy import deepcopy
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from Beauty2Charm_Utils import *
+from Configurables import SubstitutePID
+from Configurables import SubPIDMMFilter
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+def subPID(name, p, d, inputs):
+    sub = SubstitutePID(
+        name + 'SubPIDBeauty2Charm', Code="DECTREE('X0 -> X+ X-')")
+    sub.MaxChi2PerDoF = -666
+    sub.Substitutions = {
+        'X0 -> ^X+ X-': d[0],
+        'X0 -> X+ ^X-': d[1],
+        'X0 -> X+ X-': p
+    }
+    sel = Selection(
+        name + 'Beauty2CharmSel', Algorithm=sub, RequiredSelections=inputs)
+    filter = "INTREE(ID=='%s') & INTREE(ID=='%s') & INTREE(ID=='%s')" \
+             % (p,d[0],d[1])
+    return filterSelection(name, filter, [sel])
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class HHBuilder(object):
+    '''Produces all HH quasi-particles for the Beauty2Charm module.'''
+
+    def __init__(self, pions, kaons, protons, ks, pi0, config, config_pid):
+        self.pions = filterInputs("HHPions", [pions], config['DAUGHTERS'])
+        self.kaons = filterInputs("HHKaons", [kaons], config['DAUGHTERS'])
+        self.protons = filterInputs("HHProtons", [protons],
+                                    config['DAUGHTERS'])
+        self.ks = ks
+        self.pi0 = pi0
+        self.config = config
+        self.config_pid = config_pid
+        self.pipi = self._makePiPi()
+        self.pipi_loose = self._makePiPi_Loose()
+        self.kspi = self._makeKsPi()
+        self.kpi0 = self._makeKPi0()
+        self.pipi0 = self._makePiPi0()
+        self.kpi = self._makeKPi(self.pipi)
+        self.kpi_loose = self._makeKPi_Loose(self.pipi_loose)
+        self.kk = self._makeKK(self.pipi)
+        self.kstar0 = self._makeKstar0(self.kpi)
+        self.ph = self._makePH()
+        self.ph_nopid = self._makePHNoPID()
+        self.phi = self._makePhi(self.kk)
+        self.rho0 = self._makeRho0(self.pipi)
+        self.rhopm = self._makeRhoPM(self.pipi0)
+        self.kstarpm = self._makeKstarPM(self.kpi0)
+        self.ppbar = self._makePPbar()
+        # WS selections (ie doubly-charged ones)
+        self.hh_ws = self._makeHHWS()
+        self.ph_ws = self._makePHWS()
+        self.ph_nopid_ws = self._makePHNoPIDWS()
+        self.ppbar_ws = self._makePPbarWS()
+        # PID filtered selections
+        self.pipi_pid = [filterPID('X2PiPiPID', self.pipi, config_pid)]
+        self.kpi_pid = [filterPID('X2KPiPID', self.kpi, config_pid)]
+        self.kpi_loose_ProbNNpid = [
+            filterSelection(
+                "X2KPiLooseProbNNPID",
+                "(0 == NINTREE( (ABSID=='K+') &  (PROBNNk<0.1) )) & (0 == NINTREE( (ABSID=='pi+') &  (PROBNNpi<0.1) ))",
+                self.kpi_loose)
+        ]
+
+        # different PID filterings for testing with the FULL DST lines
+        self.pipi_pid_tightpi = [
+            filterPID('X2PiPiPIDTIGHTPI', self.pipi, config_pid['TIGHTPI'])
+        ]
+        # tighter on the kaon
+        self.kpi_pid_tighter = [
+            filterPID('X2KPiPIDTIGHTER', self.kpi, config_pid['TIGHTER'])
+        ]
+        # narrow window around K*(892)0
+        mCutKst = "ADMASS('K*(892)0') < 400.0"
+        self.kpi_pid_narrow = [
+            filterSelection('KstNarrowWindow', mCutKst, self.kpi_pid)
+        ]
+
+        self.kk_pid = [filterPID('X2KKPID', self.kk, config_pid)]
+        self.hh_ws_pid = [filterPID('X2HHWSPID', self.hh_ws, config_pid)]
+        self.ph_pid = [filterPID('X2PHPID', self.ph, config_pid)]
+        self.ppbar_pid = [
+            filterPID('X2PPbarPID', self.ppbar, config_pid['TIGHT'])
+        ]
+        self.ppbar_ws_pid = [
+            filterPID('X2PPbarWSPID', self.ppbar_ws, config_pid['TIGHT'])
+        ]
+        self.ppbar_pid_tighter = [
+            filterPID('X2PPbarPIDTIGHTER', self.ppbar, config_pid['TIGHTER'])
+        ]
+        self.ppbar_ws_pid_tighter = [
+            filterPID('X2PPbarWSPIDTIGHTER', self.ppbar_ws,
+                      config_pid['TIGHTER'])
+        ]
+
+        self.ppbar_Mcut = [
+            filterSelection('X2PPbarMCUT', '( M < 3.5*GeV )', self.ppbar)
+        ]
+        self.ppbar_Mcut_pid_tighter2 = [
+            filterPID('X2PPbarMCUTPIDTIGHTER2', self.ppbar_Mcut,
+                      config_pid['TIGHTER2'])
+        ]
+
+        self.rho0_pid = [filterPID('RHO02PiPiPID', self.rho0, config_pid)]
+        self.kstar0_pid = [filterPID('Kstar02KPiPID', self.kstar0, config_pid)]
+        self.phi_pid = [filterPID('PHI2KKPID', self.phi, config_pid)]
+
+    def _makeX2HH(self, name, decays, amass, config, inputs):
+        ''' Makes all X -> HH selections with charged tracks only.'''
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], config).code(), amass,
+            hasTopoChild()
+        ]
+        comboCuts.append(LoKiCuts(['ADOCA12'], config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], config).code()
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        return Selection(
+            name + 'Beauty2Charm', Algorithm=cp, RequiredSelections=inputs)
+
+    def _makeX2HH_Loose(self, name, decays, amass, config, inputs):
+        ''' Makes all X -> HH selections with charged tracks only. Loose selection.'''
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], config).code(), amass,
+            hasTopoChild_Loose()
+        ]
+        comboCuts.append(LoKiCuts(['ADOCA12'], config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], config).code()
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        return Selection(
+            name + 'Beauty2Charm', Algorithm=cp, RequiredSelections=inputs)
+
+    def _makeXPLUS2HH(self, name, decays, amass, config, inputs, pi0=False):
+        ''' Makes all X+ -> HH selections involving neutrals.'''
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], config).code(), amass,
+            hasTopoChild()
+        ]
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = "ALL"
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=decays)
+        if pi0:
+            cp = cp.configurable(name + 'Beauty2CharmCombiner')
+            #cp.ParticleCombiners.update({'':'MomentumCombiner'})
+        return Selection(
+            name + 'Beauty2Charm', Algorithm=cp, RequiredSelections=inputs)
+
+    def _massWindow(self, which, name):
+        return "ADAMASS('%s') < %s" % (name, self.config['MASS_WINDOW'][which])
+
+    def _makePiPi(self):
+        '''Makes X -> pi+pi-'''
+        return [
+            self._makeX2HH('X2PiPi', ['rho(770)0 -> pi+ pi-'],
+                           '(AM < 5.2*GeV)', self.config, [self.pions])
+        ]
+
+    def _makePiPi_Loose(self):
+        '''Makes X -> pi+pi-. With Loose P, PT cuts'''
+        config = self.config
+        config["ASUMPT_MIN"] = '500*MeV'
+        return [
+            self._makeX2HH_Loose('X2PiPi_Loose', ['rho(770)0 -> pi+ pi-'],
+                                 '(AM < 5.2*GeV)', config, [self.pions])
+        ]
+
+    def _makePiPiWSSels(self):
+        '''Makes X -> pi+pi+ + c.c.'''
+        plus = self._makeX2HH('X2PiPiWSPlus', ['rho(770)+ -> pi+ pi+'],
+                              '(AM < 5.2*GeV)', self.config, [self.pions])
+        minus = self._makeX2HH('X2PiPiWSMinus', ['rho(770)- -> pi- pi-'],
+                               '(AM < 5.2*GeV)', self.config, [self.pions])
+        return [plus, minus]
+
+    def _makePiPiWS(self):
+        sels = self._makePiPiWSSels()
+        return [
+            MergedSelection('X2PiPiWSBeauty2Charm', RequiredSelections=sels)
+        ]
+
+    def _makeKPi(self, pipi):
+        '''Makes X -> K+pi- + c.c.'''
+        sel1 = subPID('X2KPi', 'K*(892)0', ['K+', 'pi-'], pipi)
+        sel2 = subPID('X2KPiBar', 'K*(892)~0', ['pi+', 'K-'], pipi)
+        return [
+            MergedSelection(
+                'X2KPiBeauty2Charm', RequiredSelections=[sel1, sel2])
+        ]
+
+    def _makeKPi_Loose(self, pipi_loose):
+        '''Makes X -> K+pi- + c.c. With loose P, PT cuts'''
+        sel1 = subPID('X2KPi_Loose', 'K*(892)0', ['K+', 'pi-'], pipi_loose)
+        sel2 = subPID('X2KPiBar_Loose', 'K*(892)~0', ['pi+', 'K-'], pipi_loose)
+        return [
+            MergedSelection(
+                'X2KPiLooseBeauty2Charm', RequiredSelections=[sel1, sel2])
+        ]
+
+    def _makeKK(self, pipi):
+        '''Makes X -> K+K-.'''
+        return [subPID('X2KK', 'phi(1020)', ['K+', 'K-'], pipi)]
+
+    def _makeHHWS(self):
+        from Beauty2Charm_DBuilder import subPIDSels
+        protoSels = self._makePiPiWSSels()
+        decays = [['pi+', 'pi+'], ['pi+', 'K+'], ['K+', 'pi+'], ['K+', 'K+']]
+        plus = subPIDSels(decays, 'X2HHWSPlus', '', '0*MeV', '5200*MeV',
+                          [protoSels[0]])
+        decays = [['pi-', 'pi-'], ['pi-', 'K-'], ['K-', 'pi-'], ['K-', 'K-']]
+        minus = subPIDSels(decays, 'X2HHWSMinus', '', '0*MeV', '5200*MeV',
+                           [protoSels[1]])
+        return [
+            MergedSelection(
+                'X2HHWSBeauty2Charm', RequiredSelections=[plus, minus])
+        ]
+
+    def _makeKsPi(self):
+        '''Makes X -> Ks0pi- + c.c.'''
+        dd = self._makeXPLUS2HH('X2KsPiDD', ['[K*(892)+ -> KS0 pi+]cc'],
+                                '(AM < 5.2*GeV)', self.config,
+                                self.ks["DD"] + [self.pions])
+        ll = self._makeXPLUS2HH('X2KsPiLL', ['[K*(892)+ -> KS0 pi+]cc'],
+                                '(AM < 5.2*GeV)', self.config,
+                                self.ks["LL"] + [self.pions])
+        return [
+            MergedSelection('X2KsPiBeauty2Charm', RequiredSelections=[dd, ll])
+        ]
+
+    def _makeKPi0(self):
+        '''Makes X -> K+pi0 + c.c.'''
+        m = self._makeXPLUS2HH('X2KPi0Merged', ['[K*(892)+ -> K+ pi0]cc'],
+                               '(AM < 5*GeV)', self.config,
+                               self.pi0["Merged"] + [self.kaons], True)
+        r = self._makeXPLUS2HH('X2KPi0Resolved', ['[K*(892)+ -> K+ pi0]cc'],
+                               '(AM < 5*GeV)', self.config,
+                               self.pi0["Resolved"] + [self.kaons], True)
+        return [
+            MergedSelection('X2KPi0Beauty2Charm', RequiredSelections=[m, r])
+        ]
+
+    def _makePiPi0(self):
+        '''Makes X -> pi+pi0'''
+        m = self._makeXPLUS2HH('X2PiPi0Merged', ['[rho(770)+ -> pi+ pi0]cc'],
+                               'AM < 5*GeV', self.config,
+                               [self.pions] + self.pi0["Merged"], True)
+        r = self._makeXPLUS2HH('X2PiPi0Resolved', ['[rho(770)+ -> pi+ pi0]cc'],
+                               'AM < 5*GeV', self.config,
+                               [self.pions] + self.pi0["Resolved"], True)
+        return [
+            MergedSelection('X2PiPi0Beauty2Charm', RequiredSelections=[m, r])
+        ]
+
+    def _makeRho0(self, pipi):
+        mass = self._massWindow('RHO', 'rho(770)0').replace(
+            'ADAMASS', 'ADMASS')
+        return [filterSelection('RHO', mass, pipi)]
+
+    def _makeKstar0(self, kpi):
+        mass = self._massWindow('KST', 'K*(892)0').replace('ADAMASS', 'ADMASS')
+        return [filterSelection('K*0', mass, kpi)]
+
+    def _makePhi(self, kk):
+        mass = self._massWindow('PHI', 'phi(1020)').replace(
+            'ADAMASS', 'ADMASS')
+        return [filterSelection('PHI', mass, kk)]
+
+    def _makeRhoPM(self, pipi):
+        mass = self._massWindow('RHO', 'rho(770)+').replace(
+            'ADAMASS', 'ADMASS')
+        return [filterSelection('RHOPM', mass, pipi)]
+
+    def _makeKstarPM(self, kpi):
+        mass = self._massWindow('KST', 'K*(892)+').replace('ADAMASS', 'ADMASS')
+        return [filterSelection('K*PM', mass, kpi)]
+
+    def _makePH(self):
+        '''Makes X -> p+ h- + c.c.'''
+        sel = self._makeX2HH('X2PPi', ['Lambda0 -> pi+ pi-'], '(AM < 5*GeV)',
+                             self.config, [self.pions])
+        decays = [['p+', 'pi-'], ['pi+', 'p~-'], ['p+', 'K-'], ['K+', 'p~-']]
+        filter = SubPIDMMFilter(
+            'X2PHSubPIDBeauty2Charm',
+            Code='ALL',
+            MinMM=0,
+            MaxMM=5000,
+            PIDs=decays)
+        presel = Selection(
+            'X2PHSubPIDSelBeauty2Charm',
+            Algorithm=filter,
+            RequiredSelections=[sel])
+        filter="INTREE((ABSID=='p+') & (P > %s)) & (M < 5.2*GeV)" \
+                % self.config['pP_MIN']
+        return [filterSelection('X2PH', filter, [presel])]
+
+    def _makePHWS(self):
+        '''Makes X -> p+ h+ + c.c.'''
+        psel = self._makeX2HH('X2PPiPlusWS', ['Lambda0 -> pi+ pi+'],
+                              '(AM < 5*GeV)', self.config, [self.pions])
+        decays = [['p+', 'pi+'], ['pi+', 'p+'], ['p+', 'K+'], ['K+', 'p+']]
+        pfilter = SubPIDMMFilter(
+            'X2PHPlusWSSubPIDBeauty2Charm',
+            Code='ALL',
+            MinMM=0,
+            MaxMM=5000,
+            PIDs=decays)
+        psel = Selection(
+            'X2PHPlusWSSubPIDSelBeauty2Charm',
+            Algorithm=pfilter,
+            RequiredSelections=[psel])
+        filter="INTREE((ABSID=='p+') & (P > %s)) & (M < 5.2*GeV)" \
+                % self.config['pP_MIN']
+        psel = filterSelection('X2PHPlusWS', filter, [psel])
+        msel = self._makeX2HH('X2PPiMinusWS', ['Lambda0 -> pi- pi-'],
+                              '(AM < 5*GeV)', self.config, [self.pions])
+        decays = [['p~-', 'pi-'], ['pi-', 'p~-'], ['p~-', 'K-'], ['K-', 'p~-']]
+        mfilter = SubPIDMMFilter(
+            'X2PHMinusWSSubPIDBeauty2Charm',
+            Code='ALL',
+            MinMM=0,
+            MaxMM=5000,
+            PIDs=decays)
+        msel = Selection(
+            'X2PHMinusWSSubPIDSelBeauty2Charm',
+            Algorithm=mfilter,
+            RequiredSelections=[msel])
+        msel = filterSelection('X2PHMinusWS', filter, [msel])
+        return [psel, msel]
+
+    def _makePHNoPID(self):
+        '''Makes X -> p+ h- + c.c.'''
+        sel = self._makeX2HH('X2PPiNoPID', ['Lambda0 -> pi+ pi-'],
+                             '(AM < 5*GeV)', self.config, [self.pions])
+        decays = [['p+', 'deuteron~'], ['deuteron', 'p~-']]
+        filter = SubPIDMMFilter(
+            'X2PHNoPIDSubPIDBeauty2Charm',
+            Code='ALL',
+            MinMM=0,
+            MaxMM=5000,
+            PIDs=decays)
+        presel = Selection(
+            'X2PHNoPIDSubPIDSelBeauty2Charm',
+            Algorithm=filter,
+            RequiredSelections=[sel])
+        filter="INTREE((ABSID=='p+') & (P > %s) & (PIDp > 0)) & (M < 5.2*GeV)" \
+                % (self.config['pP_MIN'])
+        return [filterSelection('X2PHNoPID', filter, [presel])]
+
+    def _makePHNoPIDWS(self):
+        '''Makes X -> p+ h+ + c.c.'''
+        psel = self._makeX2HH('X2PPiNoPIDPlusWS', ['Lambda0 -> pi+ pi+'],
+                              '(AM < 5*GeV)', self.config, [self.pions])
+        decays = [['p+', 'deuteron']]
+        pfilter = SubPIDMMFilter(
+            'X2PHNoPIDPlusWSSubPIDBeauty2Charm',
+            Code='ALL',
+            MinMM=0,
+            MaxMM=5000,
+            PIDs=decays)
+        psel = Selection(
+            'X2PHNoPIDPlusWSSubPIDSelBeauty2Charm',
+            Algorithm=pfilter,
+            RequiredSelections=[psel])
+        filter="INTREE((ABSID=='p+') & (P > %s) & (PIDp > 0)) & (M < 5.2*GeV)" \
+                % self.config['pP_MIN']
+        psel = filterSelection('X2PHNoPIDPlusWS', filter, [psel])
+        msel = self._makeX2HH('X2PPiNoPIDMinusWS', ['Lambda0 -> pi- pi-'],
+                              '(AM < 5*GeV)', self.config, [self.pions])
+        decays = [['p~-', 'deuteron~']]
+        mfilter = SubPIDMMFilter(
+            'X2PHNoPIDMinusWSSubPIDBeauty2Charm',
+            Code='ALL',
+            MinMM=0,
+            MaxMM=5000,
+            PIDs=decays)
+        msel = Selection(
+            'X2PHNoPIDMinusWSSubPIDSelBeauty2Charm',
+            Algorithm=mfilter,
+            RequiredSelections=[msel])
+        msel = filterSelection('X2PHNoPIDMinusWS', filter, [msel])
+        return [psel, msel]
+
+    def _makePPbar(self):
+        '''Makes X -> p+ pbar-'''
+        sel = self._makeX2HH('X2PPbar', ['rho(770)0 -> pi+ pi-'],
+                             '(AM < 5*GeV)', self.config, [self.pions])
+        decays = [['p+', 'p~-']]
+        filter = SubPIDMMFilter(
+            'X2PPbarSubPIDBeauty2Charm',
+            Code='ALL',
+            MinMM=0,
+            MaxMM=5000,
+            PIDs=decays)
+        presel = Selection(
+            'X2PPbarSubPIDSelBeauty2Charm',
+            Algorithm=filter,
+            RequiredSelections=[sel])
+        filter="INTREE((ABSID=='p+') & (P > %s)) & (M < 5.2*GeV)" \
+                % self.config['pP_MIN']
+        return [filterSelection('X2PPbar', filter, [presel])]
+
+    def _makePPbarWS(self):
+        '''Makes X -> p+ p+ + c.c.'''
+        psel = self._makeX2HH('X2PPbarPlusWS', ['rho(770)+ -> pi+ pi+'],
+                              '(AM < 5*GeV)', self.config, [self.pions])
+        decays = [['p+', 'p+']]
+        pfilter = SubPIDMMFilter(
+            'X2PPbarPlusWSSubPIDBeauty2Charm',
+            Code='ALL',
+            MinMM=0,
+            MaxMM=5000,
+            PIDs=decays)
+        psel = Selection(
+            'X2PPbarPlusWSSubPIDSelBeauty2Charm',
+            Algorithm=pfilter,
+            RequiredSelections=[psel])
+        filter="INTREE((ABSID=='p+') & (P > %s)) & (M < 5.2*GeV)" \
+                % self.config['pP_MIN']
+        psel = filterSelection('X2PPbarPlusWS', filter, [psel])
+        msel = self._makeX2HH('X2PPbarMinusWS', ['rho(770)- -> pi- pi-'],
+                              '(AM < 5*GeV)', self.config, [self.pions])
+        decays = [['p~-', 'p~-']]
+        mfilter = SubPIDMMFilter(
+            'X2PPbarMinusWSSubPIDBeauty2Charm',
+            Code='ALL',
+            MinMM=0,
+            MaxMM=5000,
+            PIDs=decays)
+        msel = Selection(
+            'X2PPbarMinusWSSubPIDSelBeauty2Charm',
+            Algorithm=mfilter,
+            RequiredSelections=[msel])
+        msel = filterSelection('X2PPbarMinusWS', filter, [msel])
+        return [psel, msel]
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_HHHBuilder.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_HHHBuilder.py
new file mode 100644
index 000000000..9d2d0d9c1
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_HHHBuilder.py
@@ -0,0 +1,217 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 copy import deepcopy
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, DaVinci__N3BodyDecays, DaVinci__N4BodyDecays
+from PhysSelPython.Wrappers import Selection
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from Beauty2Charm_Utils import *
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+class HHHBuilder(object):
+    '''Produces all HHH quasi-particles for the Beauty2Charm module.'''
+
+    def __init__(self,pions,kaons,protons,config, config_pid):
+        self.pions = filterInputs("HHHPions",[pions],config['PiDAUGHTERS'])
+        self.kaons = filterInputs("HHHKaons",[kaons],config['KDAUGHTERS'])
+        self.protons = filterInputs("HHHProtons",[protons],
+                                    config['pDAUGHTERS'])
+        self.config = config
+        self.pipipi = [self._makePiPiPi()]
+
+        #Different PID filtering for testing the FULL DST lines
+        self.pipipi_tighterpi = [filterPID('X2PiPiPiPIDTIGHTERPI',self.pipipi,config['PID']['TIGHTERPI'])]
+        tightpipipiSel = "(MIPCHI2DV(PRIMARY)>20) & (M<2800)"
+        self.pipipi_tightersel = [filterSelection('X2PiPiPiPIDTIGHTER3PISEL',tightpipipiSel,self.pipipi_tighterpi)]
+        
+        self.kkpi = [self._makeKKPi()]
+        self.kpipi = [self._makeKPiPi()]
+        self.kpipiSS = [self._makeKPiPiSS()]
+
+        #Soft PID for kkpi
+        self.kkpi_pid = [filterPID('X2KKPiPID',self.kkpi,config_pid)]
+        #Really tight on the kaon (for FULL DST)
+        self.kpipi_realtightk = [filterPID('X2KPiPiPIDREALTIGHTK',self.kpipi,config['PID']['REALTIGHTK'])]
+        
+        self.ppbarpi = [self._makeppbarPi()]
+        self.ppbark = [self._makeppbarK()]
+        self.pppbar = [self._makepppbar()]
+
+        self.ppipi = [self._makepPiPi()]
+        self.pkpi  = [self._makepKPi()]
+        self.pkk   = [self._makepKK()]
+        
+        self.ppipiOS = [self._makepPiPiOS()]
+        self.pkpiOS  = [self._makepKPiOS()]
+        self.pkkOS   = [self._makepKKOS()]
+        
+        self.ppipi_pid = [filterPID('X2pPiPiTIGHTPID',self.ppipi,config_pid['TIGHTER'])]
+        self.pkpi_pid =  [filterPID('X2pKPiTIGHTPID', self.pkpi,config_pid['TIGHTER'])]
+        self.pkk_pid =   [filterPID('X2pKKTIGHTPID',  self.pkk,config_pid['TIGHTER'])]
+        
+        self.ppipi_pid_OS = [filterPID('X2pPiPiOSTIGHTPID',self.ppipiOS,config_pid['TIGHTER'])]
+        self.pkpi_pid_OS =  [filterPID('X2pKPiOSTIGHTPID', self.pkpiOS,config_pid['TIGHTER'])]
+        self.pkk_pid_OS =   [filterPID('X2pKKOSTIGHTPID',  self.pkkOS,config_pid['TIGHTER'])]
+
+        self.pipipipi = [self._makePiPiPiPi()]
+        self.kpipipi = [self._makeKPiPiPi()]
+        
+    def _makeX2HHH(self,name,decays,amass,config,inputs):
+        ''' Makes all X -> HHH selections with charged tracks only.'''
+        comboCuts = [LoKiCuts(['ASUMPT'],config).code(),amass,hasTopoChild()]
+        comboCuts12 = [LoKiCuts(['ADOCA12'],config).code()]
+        comboCuts.append(LoKiCuts(['ADOCA13'],config).code())
+        comboCuts.append(LoKiCuts(['ADOCA23'],config).code())
+        numPassPtCut = "(ANUM(PT < %s) <= 1)" %(config['PTMIN1'])
+        comboCuts.append(numPassPtCut)
+        comboCuts = LoKiCuts.combine(comboCuts)
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        momCuts = LoKiCuts(['VCHI2DOF','BPVVDCHI2','BPVDIRA','MIPCHI2DV',
+                            'BPVVDRHO','BPVVDZ'],config).code()
+        cp = DaVinci__N3BodyDecays(Combination12Cut=comboCuts12,CombinationCut=comboCuts,MotherCut=momCuts,
+                              DecayDescriptors=decays)
+        return Selection(name+'Beauty2Charm',Algorithm=cp,
+                         RequiredSelections=inputs)
+
+    def _makePiPiPi(self):
+        '''Makes X -> pi+pi-pi+'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['A1'])
+        return self._makeX2HHH('X2PiPiPi',['[a_1(1260)+ -> pi+ pi- pi+]cc'],
+                              massWindow,self.config,[self.pions])
+
+    def _makeKKPi(self):
+        '''Makes X -> K+K-pi+'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['A1'])
+        return self._makeX2HHH('X2KKPi',['[a_1(1260)+ -> K+ K- pi+]cc'],
+                              massWindow,self.config,[self.pions,self.kaons])
+
+    def _makeKPiPi(self):
+        '''Makes X -> K+pi-pi+ + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['K1'])
+        return self._makeX2HHH('X2KPiPi',['[K_1(1270)+ -> K+ pi- pi+]cc'],
+                              massWindow,self.config,
+                              [self.pions,self.kaons])
+
+    def _makeKPiPiSS(self):
+        '''Makes X -> K-pi+pi+ + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['K1'])
+        return self._makeX2HHH('X2KPiPiSS',['[K_1(1270)+ -> K- pi+ pi+]cc'],
+                              massWindow,self.config,
+                              [self.pions,self.kaons])
+
+    def _makeppbarPi(self):
+        '''Makes X -> p pbar-pi+ + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['PPH'])
+        return self._makeX2HHH('X2ppbarPi',['[a_1(1260)+ -> p+ p~- pi+]cc'],
+                              massWindow,self.config,
+                              [self.pions,self.protons])
+
+    def _makeppbarK(self):
+        '''Makes X -> p pbar-K+ + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['PPH'])
+        return self._makeX2HHH('X2ppbarK',['[a_1(1260)+ -> p+ p~- K+]cc'],
+                              massWindow,self.config,
+                              [self.kaons,self.protons])
+
+    def _makepppbar(self):
+        '''Makes X -> p p pbar- + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['PPH'])
+        return self._makeX2HHH('X2pppbar',['[a_1(1260)+ -> p+ p+ p~-]cc'],
+                              massWindow,self.config,
+                              [self.protons])
+
+    def _makepKPi(self):
+        '''Makes X- -> p K-pi- + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['PHH'])
+        return self._makeX2HHH('X2pKPi',['[a_1(1260)- -> p+ K- pi-]cc'],
+                              massWindow,self.config,
+                              [self.pions,self.kaons,self.protons])
+
+    def _makepKK(self):
+        '''Makes X- -> p K-pi- + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['PHH'])
+        return self._makeX2HHH('X2pKK',['[a_1(1260)- -> p+ K- K-]cc'],
+                              massWindow,self.config,
+                              [self.kaons,self.protons])
+
+    def _makepPiPi(self):
+        '''Makes X- -> p pi-pi- + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['PHH'])
+        return self._makeX2HHH('X2pPiPi',['[a_1(1260)- -> p+ pi- pi-]cc'],
+                              massWindow,self.config,
+                              [self.pions,self.protons])
+
+    def _makepKPiOS(self):
+        '''Makes X+ -> p K+pi- + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['PHH'])
+        return self._makeX2HHH('X2pKPiOS',['[a_1(1260)+ -> p+ K+ pi-]cc'],
+                              massWindow,self.config,
+                              [self.pions,self.kaons,self.protons])
+
+    def _makepKKOS(self):
+        '''Makes X- -> p K+K- + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['PHH'])
+        return self._makeX2HHH('X2pKKOS',['[a_1(1260)+ -> p+ K+ K-]cc'],
+                              massWindow,self.config,
+                              [self.kaons,self.protons])
+
+    def _makepPiPiOS(self):
+        '''Makes X- -> p pi+pi- + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['PHH'])
+        return self._makeX2HHH('X2pPiPiOS',['[a_1(1260)+ -> p+ pi+ pi-]cc'],
+                              massWindow,self.config,
+                              [self.pions,self.protons])
+
+        
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+    def _makeX2HHHH(self,name,decays,amass,config,inputs):
+        ''' Makes all X -> HHHH selections with charged tracks only.'''
+        comboCuts = [LoKiCuts(['ASUMPT'],config).code(),amass,hasTopoChild()]
+        comboCuts12 = [LoKiCuts(['ADOCA12'],config).code()]
+        comboCuts123 = [LoKiCuts(['ADOCA13'],config).code()]
+        comboCuts123.append(LoKiCuts(['ADOCA23'],config).code())
+        comboCuts.append(LoKiCuts(['ADOCA14'],config).code())
+        comboCuts.append(LoKiCuts(['ADOCA24'],config).code())
+        comboCuts.append(LoKiCuts(['ADOCA34'],config).code())
+        numPassPtCut = "(ANUM(PT < %s) <= 1)" %(config['PTMIN1'])
+        comboCuts.append(numPassPtCut)
+        comboCuts = LoKiCuts.combine(comboCuts)
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts123 = LoKiCuts.combine(comboCuts123)
+        momCuts = LoKiCuts(['VCHI2DOF','BPVVDCHI2','BPVDIRA','MIPCHI2DV',
+                            'BPVVDRHO','BPVVDZ'],config).code()
+        cp = DaVinci__N4BodyDecays(
+                Combination12Cut=comboCuts12,
+                Combination123Cut=comboCuts123,
+                CombinationCut=comboCuts,
+                MotherCut=momCuts,
+                DecayDescriptors=decays)
+        return Selection(name+'Beauty2Charm',Algorithm=cp,
+                         RequiredSelections=inputs)
+
+    def _makePiPiPiPi(self):
+        '''Makes X -> pi+pi-pi-pi- + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['A1'])
+        return self._makeX2HHHH('X2PiPiPiPi',['[a_1(1260)- -> pi+ pi- pi- pi-]cc'],
+                              massWindow,self.config,
+                              [self.pions])
+
+    def _makeKPiPiPi(self):
+        '''Makes X -> pi+K-pi-pi- + c.c.'''
+        massWindow = "(AM < %s)" % (self.config['MASS_WINDOW']['K1'])
+        return self._makeX2HHHH('X2KPiPiPi',['[K_1(1270)- -> pi+ K- pi- pi-]cc'],
+                              massWindow,self.config,
+                              [self.pions,self.kaons])
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_LTUnbiased.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_LTUnbiased.py
new file mode 100644
index 000000000..56729c89b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_LTUnbiased.py
@@ -0,0 +1,77 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 copy import deepcopy
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from Beauty2Charm_Utils import *
+from StandardParticles import ( StdAllNoPIDsKaons, StdTightKaons, StdTightPions)
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+class LTUnbiasedBuilder(object):
+    '''Makes all lifetime unbiased decays for the Beauty2Charm module.'''
+
+    def __init__(self,d,dst,config):
+        self.config = deepcopy(config)
+        self.kaons = [topoInputs('PromptKaons',[StdAllNoPIDsKaons])]
+        self.kaons_pid = [topoInputs('PromptKaonsPid',[StdTightKaons])] # DLL(K/pi) > 0
+        self.kaons_tight_pid = [filterSelection('B2OCLTUTIGHTK',"(PROBNNk > 0.5)",self.kaons_pid)]
+        self.pions_pid = [topoInputs('PromptPionsPid',[StdTightPions])]
+        self.pions_tight_pid = [filterSelection('B2OCLTUTIGHTPI',"(PROBNNpi>0.5)",self.pions_pid)]
+        self.d = d
+        self.dst = dst
+        self.lines = []
+        self._makeB02DH('D2HHH',self.d.hhh_cf_pid)
+        ds_hhh_pid_tight = [filterSelection('B2OCLTUDs2HHH',"(MM > 1920*MeV) & (MM < 2020*MeV)",self.d.hhh_pid_tight)]
+        self._makeB02DHHH('D2HHH',ds_hhh_pid_tight)
+        kkpi = "((NINTREE(ID=='K-')==1) & (NINTREE(ID=='K+')==1))"
+        self.kkpi_only = [filterSelection('Dsstar2DGammaD2KKPi',kkpi,self.dst.dsgammacpv_hhh)]
+        self._makeB02DsK('Dsstar2DGammaD2HHH',self.kkpi_only)
+
+    def _makeSels(self,decays,xtag,inputs,reFit=False):
+        sels = []
+        for tag, decay in decays.iteritems():
+            comboCuts = LoKiCuts(['SUMPT','AM'],self.config).code()
+            momCuts = [LoKiCuts(['VCHI2DOF'],self.config).code(),
+                       hasTopoChildren()]
+            momCuts = LoKiCuts.combine(momCuts)
+            b2x = CombineParticles(DecayDescriptors=decay,
+                                   ReFitPVs=reFit,
+                                   CombinationCut=comboCuts,
+                                   MotherCut=momCuts)
+            sel = Selection(tag+xtag+'Beauty2Charm',Algorithm=b2x,
+                            RequiredSelections=inputs[tag])
+            sels.append(sel)
+        return sels
+
+    def _makeB02DH(self,dname,d2x):
+        decays = {'B02DKLTUB' : ["[B0 -> D- K+]cc"]}
+        inputs = {'B02DKLTUB' : d2x+self.kaons}
+        sel = self._makeSels(decays,dname,inputs,True)
+        self.lines.append(ProtoLine(sel,1.0))
+
+    def _makeB02DHHH(self,dname,d2x):
+        decays = {'B02DsKPiPiLTUB' : ["[B0 -> D- K+ pi+ pi-]cc"]}
+        inputs = {'B02DsKPiPiLTUB' : d2x+self.kaons_tight_pid+self.pions_tight_pid}
+        sel = self._makeSels(decays,dname,inputs,True)
+        self.lines.append(ProtoLine(sel,1.0))
+
+    def _makeB02DsK(self,dname,d2x):
+        decays = {'B02DsstarKLTUB' : ["B0 -> D*_s- K+","B0 -> D*_s+ K-"]}
+        inputs = {'B02DsstarKLTUB' : d2x+self.kaons_pid}
+        sel = self._makeSels(decays,dname,inputs,True)
+        self.lines.append(ProtoLine(sel,1.0))
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py
new file mode 100644
index 000000000..e13427945
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py
@@ -0,0 +1,2300 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 copy import deepcopy
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays, DaVinci__N4BodyDecays
+from PhysSelPython.Wrappers import Selection
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from Beauty2Charm_Utils import *
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class LcBuilder(object):
+    '''Produces all Lambda_c baryons for the Beauty2Charm module.'''
+
+    def __init__(self, pions, kaons, protons, config, config_pid):
+        self.pions = pions
+        self.kaons = kaons
+        self.protons = protons
+        self.config = config
+        self.pkpi = [self._makeLc2phh()]
+        self.pkk = [self._makeLc2phh("PKK")]
+        self.ppipi = [self._makeLc2phh("PPiPi")]
+        self.xic_pkpi = [self._makeXic2pKpi()]
+        self.xic0_pkkpi = [self._makeXic02pKKpi()]
+        self.omegac0_pkkpi = [self._makeOmegac02pKKpi()]
+
+        # Filter with tighter PID
+        self.pkpi_tight = [
+            filterPID('LC2PKPITIGHTER3PID', self.pkpi, config_pid['TIGHTER3'])
+        ]
+        self.xic_pkpi_tight = [
+            filterPID('XIC2PKPITIGHTER3PID', self.xic_pkpi,
+                      config_pid['TIGHTER3'])
+        ]
+        self.omegac0_pkkpi_tight = [
+            filterPID('OMC02PKKPITIGHTER3PID', self.omegac0_pkkpi,
+                      config_pid['TIGHTER3'])
+        ]
+
+        # Now apply tighter mass window
+        mCutLc = "ADMASS('Lambda_c+') < 60.0"
+        mCutXic = "ADMASS('Xi_c+') < 60.0"
+        mCutXicTight = "ADMASS('Xi_c+') < 50.0"
+        mCutOmegac = "ADMASS('Omega_c0') < 60.0"
+        self.pkpi_tight_win = [
+            filterSelection('LC2PKPITIGHTER3PIDMWIN', mCutLc, self.pkpi_tight)
+        ]
+        self.xic_pkpi_tight_win = [
+            filterSelection('XIC2PKPITIGHTER3PIDMWIN', mCutXic,
+                            self.xic_pkpi_tight)
+        ]
+        self.xic_pkpi_tightest_win = [
+            filterSelection('XIC2PKPITIGHTEST3PIDMWIN', mCutXicTight,
+                            self.xic_pkpi_tight)
+        ]
+        self.omegac0_pkkpi_tight_win = [
+            filterSelection('OMC02PKPITIGHTER3PIDMWIN', mCutOmegac,
+                            self.omegac0_pkkpi_tight)
+        ]
+
+    def _makeLc2phh(self,mode="PKPi"):
+        '''Makes Lc -> p h h' + cc
+           mode:
+               "PKPi" : Lc -> p K pi
+               "PKK"  : Lc -> p K K
+               "PPiPi": Lc -> p pi pi
+        '''
+        decays = {
+            "PKPi" : "[Lambda_c+ -> p+ K- pi+]cc",
+            "PKK"  : "[Lambda_c+ -> p+ K- K+]cc",
+            "PPiPi": "[Lambda_c+ -> p+ pi- pi+]cc"
+        }
+        inputs = {
+            "PKPi" : [self.pions, self.kaons, self.protons],
+            "PKK"  : [self.kaons, self.protons],
+            "PPiPi": [self.pions, self.protons]
+        }
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Lambda_c+') < %s*%s) " % (dm + 10, units),
+            hasTopoChild()
+        ]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], self.config).code()]
+        comboCuts.append(LoKiCuts(['ADOCA13'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA23'], self.config).code())
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Lambda_c+') < %s*%s) " % (dm, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = DaVinci__N3BodyDecays(
+            Combination12Cut=comboCuts12,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=[decays[mode]])
+        return Selection(
+            "Lc2%sBeauty2Charm" % mode,
+            Algorithm=cp,
+            RequiredSelections=inputs[mode])
+
+    def _makeXic2pKpi(self):
+        '''Makes Xic -> p K pi + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Xi_c+') < %s*%s) " % (dm + 10, units),
+            hasTopoChild()
+        ]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], self.config).code()]
+        comboCuts.append(LoKiCuts(['ADOCA13'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA23'], self.config).code())
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Xi_c+') < %s*%s) " % (dm, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = DaVinci__N3BodyDecays(
+            Combination12Cut=comboCuts12,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_c+ -> p+ K- pi+]cc"])
+        return Selection(
+            'Xic2PKPiBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=[self.pions, self.kaons, self.protons])
+
+    def _makeXic02pKKpi(self):
+        '''Makes Xic0 -> p K K pi + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Xi_c0') < %s*%s) " % (dm + 10, units),
+            hasTopoChild()
+        ]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], self.config).code()]
+        comboCuts123 = [LoKiCuts(['ADOCA13'], self.config).code()]
+        comboCuts123.append(LoKiCuts(['ADOCA23'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA14'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA24'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA34'], self.config).code())
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts123 = LoKiCuts.combine(comboCuts123)
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Xi_c0') < %s*%s) " % (dm, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = DaVinci__N4BodyDecays(
+            Combination12Cut=comboCuts12,
+            Combination123Cut=comboCuts123,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_c0 -> p+ K- K- pi+]cc"])
+        return Selection(
+            'Xic02PKKPiBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=[self.pions, self.kaons, self.protons])
+
+    def _makeOmegac02pKKpi(self):
+        '''Makes Omegac0 -> p K K pi + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Omega_c0') < %s*%s) " % (dm + 10, units),
+            hasTopoChild()
+        ]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], self.config).code()]
+        comboCuts123 = [LoKiCuts(['ADOCA13'], self.config).code()]
+        comboCuts123.append(LoKiCuts(['ADOCA23'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA14'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA24'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA34'], self.config).code())
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts123 = LoKiCuts.combine(comboCuts123)
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Omega_c0') < %s*%s) " % (dm, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = DaVinci__N4BodyDecays(
+            Combination12Cut=comboCuts12,
+            Combination123Cut=comboCuts123,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Omega_c0 -> p+ K- K- pi+]cc"])
+        return Selection(
+            'Omegac02PKKPiBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=[self.pions, self.kaons, self.protons])
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class LooseLcBuilder(object):
+    '''Produces Loose Lambda_c baryons for the Beauty2Charm module.'''
+
+    def __init__(self, pions, kaons, protons, config):
+        self.pions = pions
+        self.kaons = kaons
+        self.protons = protons
+        self.config = config
+        self.pkpi = [self._makeLooseLc2pKpi()]
+        self.xic_pkpi = [self._makeLooseXic2pKpi()]
+        self.xic0_pkkpi = [self._makeLooseXic02pKKpi()]
+        self.omegac0_pkkpi = [self._makeLooseOmegac02pKKpi()]
+
+    def _makeLooseLc2pKpi(self):
+        '''Makes Lc -> p K pi + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Lambda_c+') < %s*%s) " % (dm + 10, units),
+            "(ANUM(MIPCHI2DV(PRIMARY)>4) >= 2)",
+            hasTopoChild()
+        ]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], self.config).code()]
+        comboCuts.append(LoKiCuts(['ADOCA13'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA23'], self.config).code())
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Lambda_c+') < %s*%s) " % (dm, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = DaVinci__N3BodyDecays(
+            Combination12Cut=comboCuts12,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Lambda_c+ -> p+ K- pi+]cc"])
+        return Selection(
+            'LooseLc2PKPiBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=[self.pions, self.kaons, self.protons])
+
+    def _makeLooseXic2pKpi(self):
+        '''Makes Xic -> p K pi + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Xi_c+') < %s*%s) " % (dm + 10, units),
+            "(ANUM(MIPCHI2DV(PRIMARY)>4) >= 2)",
+            hasTopoChild()
+        ]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], self.config).code()]
+        comboCuts.append(LoKiCuts(['ADOCA13'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA23'], self.config).code())
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Xi_c+') < %s*%s) " % (dm, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = DaVinci__N3BodyDecays(
+            Combination12Cut=comboCuts12,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_c+ -> p+ K- pi+]cc"])
+        return Selection(
+            'LooseXic2PKPiBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=[self.pions, self.kaons, self.protons])
+
+    def _makeLooseXic02pKKpi(self):
+        '''Makes Xic0 -> p K K pi + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Xi_c0') < %s*%s) " % (dm + 10, units),
+            "(ANUM(MIPCHI2DV(PRIMARY)>4) >= 3)",
+            hasTopoChild()
+        ]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], self.config).code()]
+        comboCuts123 = [LoKiCuts(['ADOCA13'], self.config).code()]
+        comboCuts123.append(LoKiCuts(['ADOCA23'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA14'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA24'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA34'], self.config).code())
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts123 = LoKiCuts.combine(comboCuts123)
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Xi_c0') < %s*%s) " % (dm, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = DaVinci__N4BodyDecays(
+            Combination12Cut=comboCuts12,
+            Combination123Cut=comboCuts123,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_c0 -> p+ K- K- pi+]cc"])
+        return Selection(
+            'LooseXic02PKKPiBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=[self.pions, self.kaons, self.protons])
+
+    def _makeLooseOmegac02pKKpi(self):
+        '''Makes Omegac0 -> p K K pi + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Omega_c0') < %s*%s) " % (dm + 10, units),
+            "(ANUM(MIPCHI2DV(PRIMARY)>4) >= 3)",
+            hasTopoChild()
+        ]
+        comboCuts12 = [LoKiCuts(['ADOCA12'], self.config).code()]
+        comboCuts123 = [LoKiCuts(['ADOCA13'], self.config).code()]
+        comboCuts123.append(LoKiCuts(['ADOCA23'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA14'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA24'], self.config).code())
+        comboCuts.append(LoKiCuts(['ADOCA34'], self.config).code())
+        comboCuts12 = LoKiCuts.combine(comboCuts12)
+        comboCuts123 = LoKiCuts.combine(comboCuts123)
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Omega_c0') < %s*%s) " % (dm, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = DaVinci__N4BodyDecays(
+            Combination12Cut=comboCuts12,
+            Combination123Cut=comboCuts123,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Omega_c0 -> p+ K- K- pi+]cc"])
+        return Selection(
+            'LooseOmegac02PKKPiBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=[self.pions, self.kaons, self.protons])
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class XiccBuilder(object):
+    '''Produces Xi_cc baryons for the Beauty2Charm module.'''
+
+    def __init__(self, lc, pions, config):
+        self.lc = lc.pkpi
+        self.pions = pions
+        self.config = config
+        self.xic = lc.xic_pkpi
+        self.xic0 = lc.xic0_pkkpi
+        self.xiccpp = [self._makeXiccpp2Xicpi()]
+        self.xiccp = [self._makeXiccp2Xic0pi()]
+        self.sigmacpp = [self._makeSigmacpp2LcPi()]
+
+    def _makeXiccpp2Xicpi(self):
+        '''Makes Xi_cc++-> Xi_c+ pi+ + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Xi_cc++') < %s*%s) " % (dm + 410, units)
+        ]
+        comboCuts.append(LoKiCuts(['ADOCA12'], self.config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Xi_cc++') < %s*%s) " % (dm + 400, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_cc++ -> Xi_c+ pi+]cc"])
+        return Selection(
+            'Xiccpp2XicPiXic2PKPiPBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=self.xic + [self.pions])
+
+    def _makeXiccp2Xic0pi(self):
+        '''Makes Xi_cc+ -> Xi_c0 pi+ + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Xi_cc+') < %s*%s) " % (dm + 410, units)
+        ]
+        comboCuts.append(LoKiCuts(['ADOCA12'], self.config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Xi_cc+') < %s*%s) " % (dm + 400, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_cc+ -> Xi_c0 pi+]cc"])
+        return Selection(
+            'Xiccp2Xic0PiXic02PKKPiPBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=self.xic0 + [self.pions])
+
+    def _makeSigmacpp2LcPi(self):
+        '''Makes Sigma_c++-> Lc+ pi+ + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Sigma_c++') < %s*%s) " % (dm + 150, units)
+        ]
+        comboCuts.append(LoKiCuts(['ADOCA12'], self.config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Sigma_c++') < %s*%s) " % (dm + 120, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Sigma_c++ -> Lambda_c+ pi+]cc"])
+        return Selection(
+            'Sigmacpp2LcPiLc2PKPiBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=self.lc + [self.pions])
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class LooseXiccBuilder(object):
+    '''Produces Xi_cc baryons for the Beauty2Charm module.'''
+
+    def __init__(self, lc, pions, kaons, config):
+        self.lc = lc.pkpi
+        self.pions = pions
+        self.kaons = kaons
+        self.config = config
+        self.xic = lc.xic_pkpi
+        self.xic0 = lc.xic0_pkkpi
+        self.xiccpp = [self._makeLooseXiccpp2Xicpi()]
+        self.xiccpp2lck2pi = [self._makeLooseXiccpp2LcK2Pi()]
+        self.xiccp = [self._makeLooseXiccp2Xic0pi()]
+
+    def _makeLooseXiccpp2Xicpi(self):
+        '''Makes Xi_cc++-> Xi_c+ pi+ + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Xi_cc++') < %s*%s) " % (dm + 410, units)
+        ]
+        comboCuts.append(LoKiCuts(['ADOCA12'], self.config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Xi_cc++') < %s*%s) " % (dm + 400, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_cc++ -> Xi_c+ pi+]cc"])
+        return Selection(
+            'LooseXiccpp2XicPiXic2PKPiPBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=self.xic + [self.pions])
+
+    def _makeLooseXiccp2Xic0pi(self):
+        '''Makes Xi_cc+ -> Xi_c0 pi+ + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Xi_cc+') < %s*%s) " % (dm + 410, units)
+        ]
+        comboCuts.append(LoKiCuts(['ADOCA12'], self.config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Xi_cc+') < %s*%s) " % (dm + 400, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_cc+ -> Xi_c0 pi+]cc"])
+        return Selection(
+            'LooseXiccp2Xic0PiXic02PKKPiPBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=self.xic0 + [self.pions])
+
+    def _makeLooseXiccpp2LcK2Pi(self):
+        '''Makes Xi_cc++ -> Lambda_c+ K- pi+ pi+ + cc'''
+        dm, units = LoKiCuts.cutValue(self.config['MASS_WINDOW'])
+        comboCuts = [
+            LoKiCuts(['ASUMPT'], self.config).code(),
+            "(ADAMASS('Xi_cc+') < %s*%s) " % (dm + 410, units)
+        ]
+        comboCuts.append(LoKiCuts(['ADOCA12'], self.config).code())
+        comboCuts = LoKiCuts.combine(comboCuts)
+        momCuts = [
+            "(ADMASS('Xi_cc+') < %s*%s) " % (dm + 400, units),
+            LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], self.config).code()
+        ]
+        momCuts = LoKiCuts.combine(momCuts)
+        cp = CombineParticles(
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_cc++ -> Lambda_c+ K- pi+ pi+]cc"])
+        return Selection(
+            'LooseXiccpp2LcK2PiLc2PKPiBeauty2Charm',
+            Algorithm=cp,
+            RequiredSelections=self.lc + [self.kaons] + [self.pions])
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class XibcBuilder(object):
+    '''Makes all Xibc -> X lines.'''
+
+    def __init__(self, lc, xicc, d, topoPions_PID, topoKaons_PID,
+                 topoProtons_PID, pions, kaons, protons, muons, config,
+                 configSL):
+        self.lc = lc.pkpi
+        self.xic = lc.xic_pkpi
+        self.xic0 = lc.xic0_pkkpi
+        self.omegac0 = lc.omegac0_pkkpi
+        self.xiccp = xicc.xiccp
+        self.xiccpp = xicc.xiccpp
+        self.xiccpp2lck2pi = xicc.xiccpp2lck2pi
+        #self.d = d
+        self.dp = d.d_cf_hhh_pid_tightpi
+        self.d0 = d.kpi_pid_tighter1_narrow  #Tight PID cuts, 60 MeV mass window
+        self.pions = [pions]
+        self.kaons = [kaons]
+        self.protons = [protons]
+        self.muons = [muons]
+        self.topoPions_pid = [topoPions_PID]
+        self.topoKaons_pid = [topoKaons_PID]
+        self.protons_pid = [topoProtons_PID]
+        self.config = deepcopy(config)
+        self.configSL = deepcopy(configSL)
+        #self.config['AM_MIN'] = '5200*MeV'
+        self.lines = []
+
+        #-----------------------
+        # --- Hadronic Modes ---
+        #-----------------------
+        ### bc baryon -> Lc D0
+        self._makeXibc2LcD0()
+        ### bc baryon -> Lc D0 H
+        self._makeXibc2LcD0H()
+        ### bc baryon -> Xi_cc+ pi-
+        self._makeXibc02XiccH()
+        ### bc baryon -> Xi_cc++ pi- (Xicc -> XicPi/LcK2Pi)
+        self._makeXibc2XiccH('Xiccpp2XicPi', self.xiccpp)
+        self._makeXibc2XiccH('Xiccpp2LcK2Pi', self.xiccpp2lck2pi)
+        ### bc baryon -> Lc H+H-,
+        self._makeXibc2LcHH()
+        # Xibc -> Lc+- H-
+        self._makeXibc2LcH()
+        # Xibc -> Xic+- Pi
+        self._makeXibc2XicH()
+        ### Xibc -> Xic0 Pi
+        self._makeXibc2Xic0H()
+        ### Xibc -> D0 D0 p
+        self._makeXibc2D0D0p()
+        # X -> Omega_c0 {Pi,K}
+        self._makeX2Omegac0H()
+
+        #---------------------------
+        # --- Semileptonic Modes ---
+        #---------------------------
+        ### bc baryon -> Xi_cc+ mu-
+        self._makeXibc02XiccMu()
+        ### bc baryon -> Xi_cc++ mu-
+        self._makeXibc2XiccMu()
+        ### bc baryon -> Lc D0 H
+        self._makeXibc2LcD0Mu()
+        ### bc baryon -> Lc D0 H
+        self._makeXibc2LcDMu()
+
+    def _makeXibc2D0D0p(self):
+        '''Makes Xibc -> D0 D0 p'''
+        decays = {'Xibc2D0D0p': ["Xi_bc+ -> D0 D0 p+", "Xi_bc~- -> D0 D0 p~-"]}
+        inputs = {'Xibc2D0D0p': self.d0 + self.protons}
+        b2d0d0p = makeB2XSels(decays, 'D02KPi', inputs, self.config)
+        self.lines.append(ProtoLine(b2d0d0p, 1.0))
+
+    def _makeXibc2LcD0(self):
+        '''Makes RS Xibc -> Lc D0 + c.c.'''
+        decays = {
+            'Xibc2LcD0':
+            ["Xi_bc+ -> Lambda_c+ D0", "Xi_bc~- -> Lambda_c~- D0"]
+        }
+        inputs = {'Xibc2LcD0': self.d0 + self.lc}
+        rs = makeB2XSels(decays, 'D02KPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXibc2LcD0H(self):
+        '''Makes RS  Xibc -> Lc D0 H + c.c. Need loose pions here as they may be soft'''
+        pions = self.pions
+        #kaons = self.kaons
+        decays = {
+            'Xibc2LcD0Pi':
+            ["Xi_bc0 -> Lambda_c+ D0 pi-", "Xi_bc0 -> Lambda_c~- D0 pi+"]
+        }
+        inputs = {'Xibc2LcD0Pi': self.d0 + self.lc + pions}
+        rs = makeB2XSels(decays, 'D02KPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXibc2LcHH(self):
+        '''Makes RS Xibc -> Lc H+H-, LC H-H- + c.c.'''
+        pions = self.pions
+        kaons = self.kaons
+        decays = {
+            'Xibc2LcPiPiOS': ["[Xi_bc+ -> Lambda_c+ pi- pi+]cc"],
+            'Xibc2LcKPiOS': ["[Xi_bc+ -> Lambda_c+ K- pi+]cc"],
+            'Xibc2LcPiKOS': ["[Xi_bc+ -> Lambda_c+ K+ pi-]cc"],
+        }
+        inputs = {
+            'Xibc2LcPiPiOS': self.lc + pions,
+            'Xibc2LcKPiOS': self.lc + kaons + pions,
+            'Xibc2LcPiKOS': self.lc + kaons + pions,
+        }
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXibc02XiccH(self):
+        '''Make RS Xi_bcd -> Xi_cc+ H (H=pi) + cc.'''
+        pions = self.topoPions_pid
+        #kaons = self.kaons
+        decays = {'Xibc02XiccpPi': ["[Xi_bc0 -> Xi_cc+ pi-]cc"]}
+        inputs = {'Xibc02XiccpPi': self.xiccp + pions}
+        rs = makeB2XSels(decays, 'Xiccp2Xic0Pi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXibc2XiccH(self, dname, xiccpp2x):
+        '''Make RS and WS Xi_bcu -> Xi_cc++ H (H=pi) + cc.'''
+        pions = self.topoPions_pid
+        decays = {'Xibc2XiccppPi': ["[Xi_bc+ -> Xi_cc++ pi-]cc"]}
+        inputs = {'Xibc2XiccppPi': xiccpp2x + pions}
+        rs = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXibc2LcH(self):
+        '''Make RS Xibc -> Lc H (H=pi,K) + cc.'''
+        pions = self.topoPions_pid
+        kaons = self.topoKaons_pid
+        decays = {
+            'Xibc2LcPi': ["[Xi_bc0 -> Lambda_c+ pi-]cc"],
+            'Xibc2LcK': ["[Xi_bc0 -> Lambda_c+ K-]cc"]
+        }
+        inputs = {'Xibc2LcPi': self.lc + pions, 'Xibc2LcK': self.lc + kaons}
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXibc2XicH(self):
+        '''Make RS Xibc -> Xi_c+ H (H=pi) + cc.'''
+        pions = self.topoPions_pid
+        #kaons = self.topoKaons
+        decays = {'Xibc2XicPi': ["[Xi_bc0 -> Xi_c+ pi-]cc"]}
+        inputs = {'Xibc2XicPi': self.xic + pions}
+        rs = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXibc2Xic0H(self):
+        '''Make RS and WS Xi_bc -> Xi_c0 H (H=pi) + cc.'''
+        pions = self.topoPions_pid
+        decays = {'Xibc2Xic0Pi': ["[Xi_bc+ -> Xi_c0 pi+]cc"]}
+        inputs = {'Xibc2Xic0Pi': self.xic0 + pions}
+        rs = makeB2XSels(decays, 'Xic02PKKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeX2Omegac0H(self):
+        '''Make Omega_b --> Omega_c {pi,K} and Xibc+ -->  Omega_c0 K+  + cc.'''
+        pions = self.topoPions_pid
+        kaons = self.topoKaons_pid
+        decays = {'X2Omegac0Pi': ["[Omega_b- -> Omega_c0 pi-]cc"]}
+        inputs = {'X2Omegac0Pi': self.omegac0 + pions}
+        rspi = makeB2XSels(decays, 'Omegac02PKKPi', inputs, self.config)
+        decays = {'X2Omegac0K': ["[Omega_b- -> Omega_c0 K-]cc"]}
+        inputs = {'X2Omegac0K': self.omegac0 + kaons}
+        rsk = makeB2XSels(decays, 'Omegac02PKKPi', inputs, self.config)
+        decays = {'X2Omegac0KOS': ["[Xi_bc+ -> Omega_c0 K+]cc"]}
+        inputs = {'X2Omegac0KOS': self.omegac0 + kaons}
+        osk = makeB2XSels(decays, 'Omegac02PKKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rspi, 1.0))
+        self.lines.append(ProtoLine(rsk, 1.0))
+        self.lines.append(ProtoLine(osk, 1.0))
+
+    def _makeXibc02XiccMu(self):
+        '''Make RS+WS Xi_bcd -> Xi_cc+ mu-  + cc.'''
+        muons = self.muons
+        decays = {'Xibc02XiccpMu': ["[Xi_bc0 -> Xi_cc+ mu-]cc"]}
+        inputs = {'Xibc02XiccpMu': self.xiccp + muons}
+        rs = makeB2XSels(decays, 'Xiccp2Xic0Pi', inputs, self.configSL)
+        decays = {'Xibc02XiccpMuWS': ["[Xi_bc0 -> Xi_cc+ mu+]cc"]}
+        inputs = {'Xibc02XiccpMuWS': self.xiccp + muons}
+        ws = makeB2XSels(decays, 'Xiccp2Xic0Pi', inputs, self.configSL)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 1.0))
+
+    def _makeXibc2XiccMu(self):
+        '''Make RS+WS Xi_bcu -> Xi_cc++ mu-  + cc.'''
+        muons = self.muons
+        decays = {'Xibc2XiccppMu': ["[Xi_bc+ -> Xi_cc++ mu-]cc"]}
+        inputs = {'Xibc2XiccppMu': self.xiccpp + muons}
+        rs = makeB2XSels(decays, 'Xiccpp2XicPi', inputs, self.configSL)
+        decays = {'Xibc2XiccppMuWS': ["[Xi_bc+ -> Xi_cc++ mu+]cc"]}
+        inputs = {'Xibc2XiccppMuWS': self.xiccpp + muons}
+        ws = makeB2XSels(decays, 'Xiccpp2XicPi', inputs, self.configSL)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 1.0))
+
+    def _makeXibc2LcD0Mu(self):
+        '''Makes RS  Xibc -> Lc D0 mu + c.c. Need loose pions here as they may be soft'''
+        muons = self.muons
+        decays = {
+            'Xibc2LcD0Mu':
+            ["Xi_bc0 -> Lambda_c+ D0 mu-", "Xi_bc0 -> Lambda_c~- D0 mu+"]
+        }
+        inputs = {'Xibc2LcD0Mu': self.d0 + self.lc + muons}
+        rs = makeB2XSels(decays, 'D02KPi', inputs, self.configSL)
+        decays = {
+            'Xibc2LcD0MuWS':
+            ["Xi_bc0 -> Lambda_c+ D0 mu+", "Xi_bc0 -> Lambda_c~- D0 mu-"]
+        }
+        inputs = {'Xibc2LcD0MuWS': self.d0 + self.lc + muons}
+        ws = makeB2XSels(decays, 'D02KPi', inputs, self.configSL)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 1.0))
+
+    def _makeXibc2LcDMu(self):
+        '''Makes RS  Xibc -> Lc D+ mu + c.c. Need loose muons here as they may be soft'''
+        muons = self.muons
+        decays = {'Xibc2LcDMu': ["[Xi_bc+ -> Lambda_c+ D+ mu-]cc"]}
+        inputs = {'Xibc2LcDMu': self.dp + self.lc + muons}
+        rs = makeB2XSels(decays, 'D2KPiPi', inputs, self.configSL)
+        decays = {'Xibc2LcDMuWS': ["[Xi_bc+ -> Lambda_c+ D+ mu+]cc"]}
+        inputs = {'Xibc2LcDMuWS': self.dp + self.lc + muons}
+        ws = makeB2XSels(decays, 'D2KPiPi', inputs, self.configSL)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 1.0))
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class Lb2XBuilder(object):
+    '''Makes all Lambda_b -> X lines.'''
+
+    def __init__(self, lc, xicc, d, hh, topoPions, topoPions_PID, topoKaons,
+                 topoKaons_PID, topoProtons, topoProtons_PID, pions, kaons, ks,
+                 hhh, dst, lambda0, config):
+
+        self.lc = lc.pkpi
+        self.lc_pkk = lc.pkk
+        self.lc_ppipi = lc.ppipi
+        self.xic = lc.xic_pkpi
+        self.xic0 = lc.xic0_pkkpi
+        self.omegac0 = lc.omegac0_pkkpi
+        self.lc_tight = lc.pkpi_tight_win  #tight Lc
+        self.xic_tight = lc.xic_pkpi_tight_win  #tight Xic
+        self.xic_tightest = lc.xic_pkpi_tightest_win  #tight Xic
+        self.omegac0_tight = lc.omegac0_pkkpi_tight_win  #tight Omegac0
+        self.xiccp = xicc.xiccp
+        self.xiccpp = xicc.xiccpp
+        self.sigmacpp = xicc.sigmacpp
+        self.d = d
+        self.d0_pid = d.hh_pid
+        self.d0_k3pi_pid = d.k3pi_pid
+        self.d0_k3pi = d.k3pi_pid_tighter1_narrow  #Tight PID cuts, 60 MeV mass window
+        self.d0_kshh_dd = d.kshh_dd_pid
+        self.d0_kshh_ll = d.kshh_ll_pid
+        self.hh = hh
+        self.hhh = hhh
+        self.dst = dst
+        self.ds = d.ds_hhh_pid_tight
+        self.dds = d.hhh_pid_tight
+        self.lambda0 = lambda0
+        self.pions = [pions]
+        self.kaons = [kaons]
+        self.topoPions = [topoPions]
+        self.topoPions_pid = [topoPions_PID]
+        self.topoKaons = [topoKaons]
+        self.topoKaons_pid = [topoKaons_PID]
+        self.protons = [topoProtons]
+        self.protons_pid = [topoProtons_PID]
+        self.ks = ks
+        self.config = deepcopy(config)
+        self.config['AM_MIN'] = '5200*MeV'
+        self.lines = []
+        # Lb -> Lc+- H-+ (+WS)
+        self._makeLb2LcH()
+        # Lb -> Xic+- H-+ (+WS)
+        self._makeLb2XicH()
+
+        ### Xib- -> Xic0 H- (+WS)
+        self._makeXib2Xic0H()
+        ### Omegab- -> Omegac0 H- (+WS)
+        self._makeOmegab2Omegac0H()
+        ### Omega_b- -> Xic+ K- pi-, Xic+ -> pKpi
+        self._makeOmegab2XicpKPi()
+        ### Omega_b- -> Lambda_c+ K- K-
+        self._makeOmegab2LcKK()
+        ### Xib0 -> Xic+ D- (+WS)
+        self._makeXib02XicD()
+        ### Xib- -> Xic0 D- (+WS)
+        self._makeXib2Xic0D()
+        ### Xib0 -> Xic+ HHH- (+WS) (HHH = 3pi, Kpipi)
+        self._makeXib02XicHHH()
+        ###Xib- -> Xic0 HHH- (+WS) (HHH = 3pi, Kpipi)
+        self._makeXib2Xic0HHH()
+        ### Xb- -> Lc+ D(s)- K-
+        self._makeXib2LcDK()
+        ### Xb- -> Lc+ Ds- K- Pi+
+        self._makeXib02LcDsKPi()
+        ### B- -> Lc+ Ds- pbar
+        self._makeB2LcDspbar()
+
+        # Sb+- -> D0(HH) p+-
+        self._makeSb2D0P()
+        # Sb -> D-+(HHH) p+-
+        self._makeSb02DP()
+        # Lb -> D0(HH/K3Pi) p+- H-+
+        self._makeLb2D0HHPH()
+        # Lb -> D0(HH) p+- p-+ (+WS)
+        self._makeLb2D0PPbar()
+        # Lb -> Lc+- 3Pi, KPiPi, ppbarPi, ppbarK (+WS)
+        self._makeLb2LcHHH()
+        # Lb -> Lc D (+WS)
+        self._makeLb2LcD()
+        # Lb -> Lc+ KS K-
+        self._makeLb2LcKSK("LL")
+        self._makeLb2LcKSK("DD")
+
+        # Lb  -> Lc D K*
+        MMSeld2hhh = [
+            filterSelection(
+                'D2HHH4LcDKst',
+                "(MM > (1864.84-50.)*MeV) & (MM < (1968.49+50.)*MeV)",
+                self.d.hhh_pid)
+        ]
+        self._makeLb2LcDKst(MMSeld2hhh)
+        self._makeLb2LcDstKst()
+        # Lb  -> Lc D*0 K, D*0 -> D0 gamma/Pi0_resolved/merged
+        self._makeLb2Dst0K('Dst02D0GammaD2HH', self.dst.d0gamma_hh_pid)
+        self._makeLb2Dst0K('Dst02D0Pi0ResolvedD2HH',
+                           self.dst.d0pi0_resolved_pid)
+        self._makeLb2Dst0K('Dst02D0Pi0MergedD2HH', self.dst.d0pi0_merged_pid)
+
+        ### bc baryon -> Lc D0
+        self._makeX2LcD0()
+        ### bc baryon -> Lc D0 H (+WS)
+        self._makeX2LcD0H()
+        ### bc baryon -> Xi_cc+ pi-
+        self._makeX02XiccH()
+        ### bc baryon -> Xi_cc++ pi-
+        self._makeX2XiccH()
+        ### Xib -> Lc H+H-, LcH-H- (+WS)
+        self._makeX2LcHH()
+        ### bc baryon -> Lc HHHH (+WS)
+        self._makeX2LcKPiPiPi()
+        ### Xib,Omega_b -> Lc HH (+WS)
+        self._makeXib2XicHH()
+
+        # Lb -> Lc D* (+WS)
+        self._makeLb2LcDst()
+        # X -> Lc Lc (+WS)
+        self._makeX2LcLc()
+        # Lb -> Lc 5pi
+        self._makeLb2Lc5Pi()
+        # Lb -> D0 Lambda0, D0(HH/K3Pi)
+        self._makeLb2D0Lambda0()
+
+        # Lb -> D+ p h- h-
+        self._makeLb2DpHH()
+        # Xib -> D0 p h- h-
+        self._makeXib2D0pHH()
+
+        # B -> Lc pbar h-
+        self._makeB2LcpbarH()
+        # B-> Lc pbar
+        self._makeB2Lcpbar()
+        # B- -> Lc Lc K-
+        self._makeB2LcLcK()
+
+        # B0->Lc pbar Ks
+        self._makeB02LcpbarKS('DD')
+        self._makeB02LcpbarKS('LL')
+
+        # Lb -> D(s)+ Lambda0 pi-
+        self._makeLb2DLambda0pi()
+        # Xib -> D0 Lambda0 pi-
+        self._makeXib2D0Lambda0pi()
+        # B0 -> Lambdac+ Lambda0bar h-
+        self._makeB2LcLambda0barH()
+
+        # Lb -> D0 p h (D02K3Pi/D02KsDDHH/D02KsLLHH)
+        self._makeLb2D0ph('D02K3Pi', self.d.k3pi_pid)
+        self._makeLb2D0ph('D02KsDDHH', self.d.kshh_dd_pid)
+        self._makeLb2D0ph('D02KsLLHH', self.d.kshh_ll_pid)
+        # Lb -> D(s)- D0(K3Pi/HH) p
+        self._makeLb2DD0p('D02K3Pi', self.d.k3pi_pid)
+        self._makeLb2DD0p('D2HH', self.d.hh_pid)
+        # Xi_bc+ --> D+ p K-
+        self._makeXibc2DpK()
+
+        # Lb -> Lc+- 3Pi
+        self._makeLb2LcPiPiPiFullDST()
+        # Xib -> Xic+- 3Pi
+        self._makeXib02XicPiPiPiFullDST()
+        # Xib- -> Xic+- 3Pi
+        self._makeXib2Xic0PiPiPiFullDST()
+        # Omegab- -> Omegac0- 3Pi
+        self._makeOmegab2Omegac0PiPiPiFullDST()
+
+        # Lb->sigmacpp(LcPi)4Pi
+        self._makeLb2sigmacpp4Pi()
+        # Lb->sigmacpp(LcPi)D0(KPi)KPi
+        self._makeLb2sigmacppD0KPi()
+
+        # Lb -> D D Lambda0 (+18 lines)
+        self._makeLb2DDLambda('DD')
+        self._makeLb2D0D0Lambda('DD')
+        self._makeLb2DstDLambda('DD')
+        self._makeLb2DstDstLambda('DD')
+        self._makeLb2DDLambda('LL')
+        self._makeLb2D0D0Lambda('LL')
+        self._makeLb2DstDLambda('LL')
+        self._makeLb2DstDstLambda('LL')
+
+        # Lb -> D+ D- p K-
+        self._makeLb2DDpK()
+
+        # B0 -> Lc+ Sigmacpp(LcPi) K+
+        self._makeB02LcSigmacppK()
+
+        # B+ -> Lc+ Xic- pi+
+        self._makeB2LcXicPi()
+
+        # B- -> Xic+ pi- pbar
+        self._makeB2XicpbarPi()
+        # B0 -> Xic+ pi+ pi- pbar
+        self._makeB02XicpbarPiPi()
+        # B0 -> Xic+ K+ pi- pbar
+        self._makeB02XicpbarKPi()
+        # B0 -> Lambda0 D(*)+ pbar
+        self._makeB02DpbarLambda('DD')
+        self._makeB02DpbarLambda('LL')
+        # B- -> Lambda0 D0 pbar
+        self._makeB2D0pbarLambda('DD')
+        self._makeB2D0pbarLambda('LL')
+        # B0 -> Lambda0 D0 pbar K
+        self._makeB02D0pbarKLambda('DD')
+        self._makeB02D0pbarKLambda('LL')
+
+        # Xib- -> Xic0 D~0 K-, Xib- -> Xic+ D- K-, Xib- -> Xic+ D*- K-
+        self._makeXib2XicDK()
+        # Xib0 -> Xic+ D~0 K-
+        self._makeXib02XicD0K()
+        # Omegab- -> Xic0 K Pi Pi
+        self._makeOmegab2Xic0KPiPi()
+        # Xib0 -> D0 Lambda0 pi+ pi-
+        self._makeXib02D0LambdaPiPi()
+        # Xib- -> Lambdac+ pi+ K- pi- pi-
+        self._makeXib2LcKHHH()
+        # Xib- -> Xic+ pi+ pi- pi- pi-
+        self._makeXib2XicHHHH()
+
+    def _makeLb2LcH(self):
+        '''Make RS and WS Lb -> Lc H (H=pi,K) + cc.'''
+        pions = self.topoPions
+        kaons = self.topoKaons
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '9000*MeV'
+        decays = {
+            'Lb2LcPi': ["[Lambda_b0 -> Lambda_c+ pi-]cc"],
+            'Lb2LcK': ["[Lambda_b0 -> Lambda_c+ K-]cc"]
+        }
+        inputs = {'Lb2LcPi': self.lc + pions, 'Lb2LcK': self.lc + kaons}
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        decays = {
+            'Lb2LcPiWS': ["[Lambda_b0 -> Lambda_c+ pi+]cc"],
+            'Lb2LcKWS': ["[Lambda_b0 -> Lambda_c+ K+]cc"]
+        }
+        inputs = {'Lb2LcPiWS': self.lc + pions, 'Lb2LcKWS': self.lc + kaons}
+        ws = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        decays = {'Lb2LcPiNoIP': ["[Lambda_b0 -> Lambda_c+ pi-]cc"]}
+        #inputs = {'Lb2LcPiNoIP': self.lc+pions}
+        inputs = {'Lb2LcPiNoIP': self.lc_tight + pions}  # use TightLc
+        noip = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config, False)
+        decays = {'Lb2LcPiNoIPWS': ["[Lambda_b0 -> Lambda_c+ pi+]cc"]}
+        #inputs = {'Lb2LcPiNoIPWS': self.lc+pions}
+        inputs = {'Lb2LcPiNoIPWS': self.lc_tight + pions}
+        noip_ws = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config, False)
+        decays = {'Lb2LcPi': ["[Lambda_b0 -> Lambda_c+ pi-]cc"] }
+        inputs = {'Lb2LcPi': self.lc_pkk + pions}
+        rs_pkk = makeB2XSels(decays, 'Lc2PKK', inputs, config)
+        decays = {'Lb2LcPiWS': ["[Lambda_b0 -> Lambda_c+ pi+]cc"] }
+        inputs = {'Lb2LcPiWS': self.lc_pkk + pions}
+        ws_pkk = makeB2XSels(decays, 'Lc2PKK', inputs, config)
+        decays = {'Lb2LcPi': ["[Lambda_b0 -> Lambda_c+ pi-]cc"] }
+        inputs = {'Lb2LcPi': self.lc_ppipi + pions}
+        rs_ppipi = makeB2XSels(decays, 'Lc2PPiPi', inputs, config)
+        decays = {'Lb2LcPiWS': ["[Lambda_b0 -> Lambda_c+ pi+]cc"] }
+        inputs = {'Lb2LcPiWS': self.lc_ppipi + pions}
+        ws_ppipi = makeB2XSels(decays, 'Lc2PPiPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+        self.lines.append(ProtoLine(noip, 1.0))
+        self.lines.append(ProtoLine(noip_ws, 0.1))
+        self.lines.append(ProtoLine(rs_pkk, 1.0))
+        self.lines.append(ProtoLine(ws_pkk, 0.1))
+        self.lines.append(ProtoLine(rs_ppipi, 1.0))
+        self.lines.append(ProtoLine(ws_ppipi, 0.1))
+
+    def _makeB2Lcpbar(self):
+        '''Make RS and WS B -> Lc pbar + cc.'''
+        protons = self.protons
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4750.*MeV'
+        decays = {'B2Lcpbar': ["[B0 -> Lambda_c+ p~-]cc"]}
+        inputs = {'B2Lcpbar': self.lc + protons}
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        decays = {'B2LcpbarWS': ["[B0 -> Lambda_c+ p+]cc"]}
+        inputs = {'B2LcpbarWS': self.lc + protons}
+        ws = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeB2LcLcK(self):
+        '''Make B- -> Lc- Lc+ K- + cc.'''
+        decays = {'B2LcLcK': ["[B- -> Lambda_c~- Lambda_c+ K-]cc"]}
+        inputs = {'B2LcLcK': self.lc + self.topoKaons_pid}
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2XicH(self):
+        '''Make RS and WS Lb -> Xi_c+ H (H=pi,K) + cc.'''
+        pions = self.topoPions
+        kaons = self.topoKaons
+        decays = {
+            'Lb2XicPi': ["[Lambda_b0 -> Xi_c+ pi-]cc"],
+            'Lb2XicK': ["[Lambda_b0 -> Xi_c+ K-]cc"]
+        }
+        inputs = {'Lb2XicPi': self.xic + pions, 'Lb2XicK': self.xic + kaons}
+        rs = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        decays = {
+            'Lb2XicPiWS': ["[Lambda_b0 -> Xi_c+ pi+]cc"],
+            'Lb2XicKWS': ["[Lambda_b0 -> Xi_c+ K+]cc"]
+        }
+        inputs = {
+            'Lb2XicPiWS': self.xic + pions,
+            'Lb2XicKWS': self.xic + kaons
+        }
+        ws = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        decays = {'Lb2XicPiNoIP': ["[Lambda_b0 -> Xi_c+ pi-]cc"]}
+        inputs = {'Lb2XicPiNoIP': self.xic + pions}
+        inputs = {'Lb2XicPiNoIP': self.xic_tight + pions}
+        noip = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config, False)
+        decays = {'Lb2XicPiNoIPWS': ["[Lambda_b0 -> Xi_c+ pi+]cc"]}
+        inputs = {'Lb2XicPiNoIPWS': self.xic_tight + pions}
+        #inputs = {'Lb2XicPiNoIPWS':self.xic+pions}
+        noip_ws = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config, False)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+        self.lines.append(ProtoLine(noip, 1.0))
+        self.lines.append(ProtoLine(noip_ws, 0.1))
+
+    def _makeXib2Xic0H(self):
+        '''Make RS and WS Xi_b- -> Xi_c0 H (H=pi,K) + cc.'''
+        pions = self.topoPions
+        kaons = self.topoKaons
+        decays = {
+            'Xib2Xic0Pi': ["[Xi_b- -> Xi_c0 pi-]cc"],
+            'Xib2Xic0K': ["[Xi_b- -> Xi_c0 K-]cc"]
+        }
+        inputs = {
+            'Xib2Xic0Pi': self.xic0 + pions,
+            'Xib2Xic0K': self.xic0 + kaons
+        }
+        rs = makeB2XSels(decays, 'Xic02PKKPi', inputs, self.config)
+        decays = {
+            'Xib2Xic0PiWS': ["[Xi_b- -> Xi_c0 pi+]cc"],
+            'Xib2Xic0KWS': ["[Xi_b- -> Xi_c0 K+]cc"]
+        }
+        inputs = {
+            'Xib2Xic0PiWS': self.xic0 + pions,
+            'Xib2Xic0KWS': self.xic0 + kaons
+        }
+        ws = makeB2XSels(decays, 'Xic02PKKPi', inputs, self.config)
+        decays = {'Xib2Xic0PiNoIP': ["[Xi_b- -> Xi_c0 pi-]cc"]}
+        inputs = {'Xib2Xic0PiNoIP': self.xic0 + pions}
+        noip = makeB2XSels(decays, 'Xic02PKKPi', inputs, self.config, False)
+        decays = {'Xib2Xic0PiNoIPWS': ["[Xi_b- -> Xi_c0 pi+]cc"]}
+        inputs = {'Xib2Xic0PiNoIPWS': self.xic0 + pions}
+        noip_ws = makeB2XSels(decays, 'Xic02PKKPi', inputs, self.config, False)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+        self.lines.append(ProtoLine(noip, 1.0))
+        self.lines.append(ProtoLine(noip_ws, 0.1))
+
+    def _makeOmegab2Omegac0H(self):
+        '''Make RS and WS Omega_b- -> Omega_c0 H (H=pi,K) + cc.'''
+        pions = self.topoPions
+        kaons = self.topoKaons
+        decays = {
+            'Omegab2Omegac0Pi': ["[Omega_b- -> Omega_c0 pi-]cc"],
+            'Omegab2Omegac0K': ["[Omega_b- -> Omega_c0 K-]cc"]
+        }
+        inputs = {
+            'Omegab2Omegac0Pi': self.omegac0 + pions,
+            'Omegab2Omegac0K': self.omegac0 + kaons
+        }
+        rs = makeB2XSels(decays, 'Omegac02PKKPi', inputs, self.config)
+        decays = {
+            'Omegab2Omegac0PiWS': ["[Omega_b- -> Omega_c0 pi+]cc"],
+            'Omegab2Omegac0KWS': ["[Omega_b- -> Omega_c0 K+]cc"]
+        }
+        inputs = {
+            'Omegab2Omegac0PiWS': self.omegac0 + pions,
+            'Omegab2Omegac0KWS': self.omegac0 + kaons
+        }
+        ws = makeB2XSels(decays, 'Omegac02PKKPi', inputs, self.config)
+        decays = {'Omegab2Omegac0PiNoIP': ["[Omega_b- -> Omega_c0 pi-]cc"]}
+        #inputs = {'Omegab2Omegac0PiNoIP': self.omegac0+pions}
+        inputs = {'Omegab2Omegac0PiNoIP': self.omegac0_tight + pions}
+        noip = makeB2XSels(decays, 'Omegac02PKKPi', inputs, self.config, False)
+        decays = {'Omegab2Omegac0PiNoIPWS': ["[Omega_b- -> Omega_c0 pi+]cc"]}
+        #inputs = {'Omegab2Omegac0PiNoIPWS':self.omegac0+pions}
+        inputs = {'Omegab2Omegac0PiNoIPWS': self.omegac0_tight + pions}
+        noip_ws = makeB2XSels(decays, 'Omegac02PKKPi', inputs, self.config,
+                              False)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+        self.lines.append(ProtoLine(noip, 1.0))
+        self.lines.append(ProtoLine(noip_ws, 0.1))
+
+    def _makeOmegab2XicpKPi(self):
+        '''Make Omega_b- -> Xic+ K- pi-, Xic+ -> pKpi'''
+        pions = self.pions
+        kaons = self.kaons
+        decays = {'Omegab2XicpKPi': ["[Omega_b- -> Xi_c+ K- pi-]cc"]}
+        inputs = {'Omegab2XicpKPi': self.xic + kaons + pions}
+        rs = makeB2XSels(decays, 'Xicp2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeOmegab2LcKK(self):
+        '''Make Omega_b- -> Lambda_c+ K- K-'''
+        kaons = self.kaons
+        decays = {'Omegab2LcKK': ["[Omega_b- -> Lambda_c+ K- K-]cc"]}
+        inputs = {'Omegab2LcKK': self.lc + kaons}
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXib02XicD(self):
+        '''Make RS and WS Xi_b0 -> Xi_c+ D (D=D-,Ds) + cc.'''
+        decays = {'Xib02XicD': ["[Xi_b0 -> Xi_c+ D-]cc"]}
+        inputs = {'Xib02XicD': self.xic + self.d.hhh_cf_pid}
+        rs = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        decays = {'Xib02XicDWS': ["[Xi_b0 -> Xi_c+ D+]cc"]}
+        inputs = {'Xib02XicDWS': self.xic + self.d.hhh_cf_pid}
+        ws = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeXib2Xic0D(self):
+        '''Make RS and WS Xi_b- -> Xi_c0 D (D=D-,Ds) + cc.'''
+        decays = {'Xib2Xic0D': ["[Xi_b- -> Xi_c0 D-]cc"]}
+        inputs = {'Xib2Xic0D': self.xic0 + self.d.hhh_cf_pid}
+        rs = makeB2XSels(decays, 'Xic02PKKPi', inputs, self.config)
+        decays = {'Xib2Xic0DWS': ["[Xi_b- -> Xi_c0 D+]cc"]}
+        inputs = {'Xib2Xic0DWS': self.xic0 + self.d.hhh_cf_pid}
+        ws = makeB2XSels(decays, 'Xic02PKKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeXib02XicHHH(self):
+        '''Make RS and WS Xi_b0 -> Xi_c+ HHH (HHH=3pi,Kpipi) + cc.'''
+        pipipi = self.hhh.pipipi
+        kpipi = self.hhh.kpipi
+        decays = {
+            'Xib02XicPiPiPi': ["[Xi_b0 -> Xi_c+ a_1(1260)-]cc"],
+            'Xib02XicKPiPi': ["[Xi_b0 -> Xi_c+ K_1(1270)-]cc"]
+        }
+        inputs = {
+            'Xib02XicPiPiPi': self.xic + pipipi,
+            'Xib02XicKPiPi': self.xic + kpipi
+        }
+        rs = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        decays = {
+            'Xib02XicPiPiPiWS': ["[Xi_b0 -> Xi_c+ a_1(1260)+]cc"],
+            'Xib02XicKPiPiWS': ["[Xi_b0 -> Xi_c+ K_1(1270)+]cc"]
+        }
+        inputs = {
+            'Xib02XicPiPiPiWS': self.xic + pipipi,
+            'Xib02XicKPiPiWS': self.xic + kpipi
+        }
+        ws = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeXib2Xic0HHH(self):
+        '''Make RS and WS Xi_b- -> Xi_c0 HHH- (HHH=3pi,Kpipi) + cc.'''
+        pipipi = self.hhh.pipipi
+        kpipi = self.hhh.kpipi
+        decays = {
+            'Xib2Xic0PiPiPi': ["[Xi_b- -> Xi_c0 a_1(1260)-]cc"],
+            'Xib2Xic0KPiPi': ["[Xi_b- -> Xi_c0 K_1(1270)-]cc"]
+        }
+        inputs = {
+            'Xib2Xic0PiPiPi': self.xic0 + pipipi,
+            'Xib2Xic0KPiPi': self.xic0 + kpipi
+        }
+        rs = makeB2XSels(decays, 'Xic02PKKPi', inputs, self.config)
+        decays = {
+            'Xib2Xic0PiPiPiWS': ["[Xi_b- -> Xi_c0 a_1(1260)+]cc"],
+            'Xib2Xic0KPiPiWS': ["[Xi_b- -> Xi_c0 K_1(1270)+]cc"]
+        }
+        inputs = {
+            'Xib2Xic0PiPiPiWS': self.xic0 + pipipi,
+            'Xib2Xic0KPiPiWS': self.xic0 + kpipi
+        }
+        ws = makeB2XSels(decays, 'Xic02PKKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeLb2LcHHH(self):
+        '''Make RS and WS X_b ->Lc HHH (H=pi,K) + cc.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '9000*MeV'
+        pipipi = self.hhh.pipipi
+        kpipi = self.hhh.kpipi
+        kkpi = self.hhh.kkpi
+        ppbarpi = self.hhh.ppbarpi
+        ppbark = self.hhh.ppbark
+        pppbar = self.hhh.pppbar
+
+        ppipi = self.hhh.ppipiOS
+        pkpi = self.hhh.pkpiOS
+        pkk = self.hhh.pkkOS
+
+        decays = {
+            'Lb2LcPiPiPi': ["[Lambda_b0 -> Lambda_c+ a_1(1260)-]cc"],
+            'Lb2LcKPiPi': ["[Lambda_b0 -> Lambda_c+ K_1(1270)-]cc"],
+            'Lb2LcppbarPi': ["[Lambda_b0 -> Lambda_c+ a_1(1260)-]cc"],
+            'Lb2LcppbarK': ["[Lambda_b0 -> Lambda_c+ a_1(1260)-]cc"],
+            'Lb2LcKKPi': ["[Lambda_b0 -> Lambda_c+ a_1(1260)-]cc"]
+        }
+        inputs = {
+            'Lb2LcPiPiPi': self.lc + pipipi,
+            'Lb2LcKPiPi': self.lc + kpipi,
+            'Lb2LcppbarPi': self.lc + ppbarpi,
+            'Lb2LcppbarK': self.lc + ppbark,
+            'Lb2LcKKPi': self.lc + kkpi
+        }
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        decays = {
+            'Lb2LcPiPiPiWS': ["[Lambda_b0 -> Lambda_c+ a_1(1260)+]cc"],
+            'Lb2LcKPiPiWS': ["[Lambda_b0 -> Lambda_c+ K_1(1270)+]cc"],
+            'Lb2LcppbarPiWS': ["[Lambda_b0 -> Lambda_c+ a_1(1260)+]cc"],
+            'Lb2LcppbarKWS': ["[Lambda_b0 -> Lambda_c+ a_1(1260)+]cc"],
+            'Lb2LcKKPiWS': ["[Lambda_b0 -> Lambda_c+ a_1(1260)+]cc"]
+        }
+        inputs = {
+            'Lb2LcPiPiPiWS': self.lc + pipipi,
+            'Lb2LcKPiPiWS': self.lc + kpipi,
+            'Lb2LcppbarPiWS': self.lc + ppbarpi,
+            'Lb2LcppbarKWS': self.lc + ppbark,
+            'Lb2LcKKPiWS': self.lc + kkpi
+        }
+        ws = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        decays = {'Lb2LcPiPiPi': ["[Lambda_b0 -> Lambda_c+ a_1(1260)-]cc"]}
+        inputs = {'Lb2LcPiPiPi': self.lc_pkk + pipipi}
+        rs_pkk = makeB2XSels(decays, 'Lc2PKK', inputs, config)
+        decays = {'Lb2LcPiPiPiWS': ["[Lambda_b0 -> Lambda_c+ a_1(1260)+]cc"]}
+        inputs = {'Lb2LcPiPiPiWS': self.lc_pkk + pipipi}
+        ws_pkk = makeB2XSels(decays, 'Lc2PKK', inputs, config)
+        decays = {'Lb2LcPiPiPi': ["[Lambda_b0 -> Lambda_c+ a_1(1260)-]cc"]}
+        inputs = {'Lb2LcPiPiPi': self.lc_ppipi + pipipi}
+        rs_ppipi = makeB2XSels(decays, 'Lc2PPiPi', inputs, config)
+        decays = {'Lb2LcPiPiPiWS': ["[Lambda_b0 -> Lambda_c+ a_1(1260)+]cc"]}
+        inputs = {'Lb2LcPiPiPiWS': self.lc_ppipi + pipipi}
+        ws_ppipi = makeB2XSels(decays, 'Lc2PPiPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+        self.lines.append(ProtoLine(rs_pkk, 1.0))
+        self.lines.append(ProtoLine(ws_pkk, 0.1))
+        self.lines.append(ProtoLine(rs_ppipi, 1.0))
+        self.lines.append(ProtoLine(ws_ppipi, 0.1))
+
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4750.*MeV'
+        decays = {
+            'B02Lcpbarpbarp': ["[B0 -> Lambda_c+ a_1(1260)-]cc"],
+            'B02LcpbarPiPi': ["[B0 -> Lambda_c+ a_1(1260)-]cc"],
+            'B02LcpbarKPi': ["[B0 -> Lambda_c+ a_1(1260)-]cc"],
+            'B02LcpbarKK': ["[B0 -> Lambda_c+ a_1(1260)-]cc"]
+        }
+        inputs = {
+            'B02Lcpbarpbarp': self.lc + pppbar,
+            'B02LcpbarPiPi': self.lc + ppipi,
+            'B02LcpbarKPi': self.lc + pkpi,
+            'B02LcpbarKK': self.lc + pkk,
+        }
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        decays = {
+            'B02LcpbarpbarpWS': ["[B0 -> Lambda_c+ a_1(1260)+]cc"],
+            'B02LcpbarPiPiWS': ["[B0 -> Lambda_c+ a_1(1260)+]cc"],
+            'B02LcpbarKPiWS': ["[B0 -> Lambda_c+ a_1(1260)+]cc"],
+            'B02LcpbarKKWS': ["[B0 -> Lambda_c+ a_1(1260)+]cc"],
+        }
+        inputs = {
+            'B02LcpbarpbarpWS': self.lc + pppbar,
+            'B02LcpbarPiPiWS': self.lc + ppipi,
+            'B02LcpbarKPiWS': self.lc + pkpi,
+            'B02LcpbarKKWS': self.lc + pkk,
+        }
+        ws = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeLb2D0HHPH(self):
+        '''Makes RS Lb -> D0(HH/HHHH) p+- H-+ + c.c. and WS lines'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '9000*MeV'
+        decs = ["Lambda_b0 -> D0 Lambda0", "Lambda_b0 -> D0 Lambda~0"]
+        decays = {'Lb2D0PH': decs}
+        inputs = {'Lb2D0PH': self.d0_pid + self.hh.ph_pid}
+        rs = makeB2XSels(decays, 'D02HH', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        inputs_k3pi = {'Lb2D0PH': self.d0_k3pi_pid + self.hh.ph_pid}
+        rs_k3pi = makeB2XSels(decays, 'D02K3Pi', inputs_k3pi, config)
+        self.lines.append(ProtoLine(rs_k3pi, 1.0))
+        decays = {'Lb2D0PHWS': decs}
+        inputs = {'Lb2D0PHWS': self.d0_pid + self.hh.ph_ws}
+        ws = makeB2XSels(decays, 'D02HH', inputs, config)
+        self.lines.append(ProtoLine(ws, 0.1))
+        inputs_k3pi = {'Lb2D0PHWS': self.d0_k3pi_pid + self.hh.ph_ws}
+        ws_k3pi = makeB2XSels(decays, 'D02K3Pi', inputs_k3pi, config)
+        self.lines.append(ProtoLine(ws_k3pi, 0.1))
+        config['B2CBBDT_MIN'] = '-0.1'
+        decays = {'Lb2D0PHNoPID': decs}
+        inputs = {'Lb2D0PHNoPID': self.d0_pid + self.hh.ph_nopid}
+        rs = makeB2XSels(decays, 'D02HH', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {'Lb2D0PHNoPIDWS': decs}
+        inputs = {'Lb2D0PHNoPIDWS': self.d0_pid + self.hh.ph_nopid_ws}
+        ws = makeB2XSels(decays, 'D02HH', inputs, config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeLb2D0PPbar(self):
+        ''' Makes RS Lb->D0(HH) p+- p-+ and WS lines (mass window for a missing neutron)'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '6000*MeV'
+        config['AM_MIN'] = '3000*MeV'
+        decs = ["Lambda_b0 -> D0 rho(770)0"]
+        decays = {'Lb2D0PPbar': decs}
+        inputs = {'Lb2D0PPbar': self.d0_pid + self.hh.ppbar_pid}
+        rs = makeB2XSels(decays, 'D02HH', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decs = ["Lambda_b0 -> D0 rho(770)-", "Lambda_b0 -> D0 rho(770)+"]
+        decays = {'Lb2D0PPbarWS': decs}
+        inputs = {'Lb2D0PPbarWS': self.d0_pid + self.hh.ppbar_ws_pid}
+        ws = makeB2XSels(decays, 'D02HH', inputs, config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeLb2D0Lambda0(self):
+        '''Makes RS Lb -> D0(HH/K3Pi) Lambda0 + c.c.'''
+        decs = ["Lambda_b0 -> D0 Lambda0", "Lambda_b0 -> D0 Lambda~0"]
+        decays = {'Lb2D0Lambda0DD': decs}
+        inputs = {'Lb2D0Lambda0DD': self.d0_pid + self.lambda0["DD"]}
+        lb_dd = makeB2XSels(decays, 'D02HH', inputs, self.config)
+        self.lines.append(ProtoLine(lb_dd, 1.0))
+        inputs_k3pi = {'Lb2D0Lambda0DD': self.d0_k3pi + self.lambda0["DD"]}
+        lb_dd_k3pi = makeB2XSels(decays, 'D02K3Pi', inputs_k3pi, self.config)
+        self.lines.append(ProtoLine(lb_dd_k3pi, 1.0))
+        decays = {'Lb2D0Lambda0LL': decs}
+        inputs = {'Lb2D0Lambda0LL': self.d0_pid + self.lambda0["LL"]}
+        lb_ll = makeB2XSels(decays, 'D02HH', inputs, self.config)
+        self.lines.append(ProtoLine(lb_ll, 1.0))
+        inputs_k3pi = {'Lb2D0Lambda0LL': self.d0_k3pi + self.lambda0["LL"]}
+        lb_ll_k3pi = makeB2XSels(decays, 'D02K3Pi', inputs_k3pi, self.config)
+        self.lines.append(ProtoLine(lb_ll_k3pi, 1.0))
+
+    def _makeLb2DLambda0pi(self):
+        '''Makes RS/WS Lb -> D+(HHH) Lambda0 pi- + c.c.'''
+        decays = {'Lb2DLambda0DDpi': ["[Lambda_b0 -> D+ Lambda0 pi-]cc"]}
+        inputs = {
+            'Lb2DLambda0DDpi':
+            self.d.hhh_cf_pid + self.lambda0["DD"] + self.pions
+        }
+        lb_dd = makeB2XSels(decays, 'D2HHH', inputs, self.config)
+        self.lines.append(ProtoLine(lb_dd, 1.0))
+        decays = {'Lb2DLambda0LLpi': ["[Lambda_b0 -> D+ Lambda0 pi-]cc"]}
+        inputs = {
+            'Lb2DLambda0LLpi':
+            self.d.hhh_cf_pid + self.lambda0["LL"] + self.pions
+        }
+        lb_ll = makeB2XSels(decays, 'D2HHH', inputs, self.config)
+        self.lines.append(ProtoLine(lb_ll, 1.0))
+        decays = {'Lb2DLambda0DDpiWS': ["[Lambda_b0 -> D+ Lambda0 pi+]cc"]}
+        inputs = {
+            'Lb2DLambda0DDpiWS':
+            self.d.hhh_cf_pid + self.lambda0["DD"] + self.pions
+        }
+        lb_dd = makeB2XSels(decays, 'D2HHH', inputs, self.config)
+        self.lines.append(ProtoLine(lb_dd, 0.1))
+        decays = {'Lb2DLambda0LLpiWS': ["[Lambda_b0 -> D+ Lambda0 pi+]cc"]}
+        inputs = {
+            'Lb2DLambda0LLpiWS':
+            self.d.hhh_cf_pid + self.lambda0["LL"] + self.pions
+        }
+        lb_ll = makeB2XSels(decays, 'D2HHH', inputs, self.config)
+        self.lines.append(ProtoLine(lb_ll, 0.1))
+
+    def _makeXib2D0Lambda0pi(self):
+        '''Makes Xib -> D0(HH) Lambda0 pi- + c.c.'''
+        decays = {
+            'Xib2D0Lambda0DDpi':
+            ["Xi_b- -> D0 Lambda0 pi-", "Xi_b~+ -> D0 Lambda~0 pi+"]
+        }
+        inputs = {
+            'Xib2D0Lambda0DDpi': self.d0_pid + self.lambda0["DD"] + self.pions
+        }
+        lb_dd = makeB2XSels(decays, 'D02HH', inputs, self.config)
+        self.lines.append(ProtoLine(lb_dd, 1.0))
+        decays = {
+            'Xib2D0Lambda0LLpi':
+            ["Xi_b- -> D0 Lambda0 pi-", "Xi_b~+ -> D0 Lambda~0 pi+"]
+        }
+        inputs = {
+            'Xib2D0Lambda0LLpi': self.d0_pid + self.lambda0["LL"] + self.pions
+        }
+        lb_ll = makeB2XSels(decays, 'D02HH', inputs, self.config)
+        self.lines.append(ProtoLine(lb_ll, 1.0))
+        decays = {
+            'Xib2D0Lambda0DDpiWS':
+            ["Xi_b- -> D0 Lambda~0 pi-", "Xi_b~+ -> D0 Lambda0 pi+"]
+        }
+        inputs = {
+            'Xib2D0Lambda0DDpiWS':
+            self.d0_pid + self.lambda0["DD"] + self.pions
+        }
+        lb_dd = makeB2XSels(decays, 'D02HH', inputs, self.config)
+        self.lines.append(ProtoLine(lb_dd, 0.1))
+        decays = {
+            'Xib2D0Lambda0LLpiWS':
+            ["Xi_b- -> D0 Lambda~0 pi-", "Xi_b~+ -> D0 Lambda0 pi+"]
+        }
+        inputs = {
+            'Xib2D0Lambda0LLpiWS':
+            self.d0_pid + self.lambda0["LL"] + self.pions
+        }
+        lb_ll = makeB2XSels(decays, 'D02HH', inputs, self.config)
+        self.lines.append(ProtoLine(lb_ll, 0.1))
+
+    def _makeSb02DP(self):
+        '''Make RS and WS Sb0 -> D+- p-+ + cc.'''
+        protons = self.protons
+        decays = {'Sb02DP': ["[Sigma_b0 -> D- p+]cc"]}
+        inputs = {'Sb02DP': self.d.hhh_pid + protons}
+        rs = makeB2XSels(decays, 'D2HHHPID', inputs, self.config)
+        decays = {'Sb02DPWS': ["[Sigma_b0 -> D+ p+]cc"]}
+        inputs = {'Sb02DPWS': self.d.hhh_pid + protons}
+        ws = makeB2XSels(decays, 'D2HHHPID', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeSb2D0P(self):
+        '''Make Sb+- -> D0 p+- + cc.'''
+        protons = self.protons
+        decays = {'Sb2D0P': ["Sigma_b+ -> D0 p+", "Sigma_b- -> D0 p~-"]}
+        inputs = {'Sb2D0P': self.d.hh_pid + protons}
+        rs = makeB2XSels(decays, 'D2HHPID', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2LcKSK(self,ks):
+        '''Make Lb -> Lc+ Ks K- c.c.'''
+        kaons = self.kaons
+        decays = {'Lb2LcKSK' + ks: ["Lambda_b0 -> Lambda_c+ KS0 K-", "Lambda_b~0 -> Lambda_c~- KS0 K+"]}
+        inputs = {'Lb2LcKSK' + ks: self.lc + self.ks[ks] + kaons}
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2LcD(self):
+        '''Makes RS + WS Lb -> Lc D + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4000*MeV'
+        config['AM_MAX'] = '6000*MeV'
+        decays = {'Lb2LcD': ["[Lambda_b0 -> Lambda_c+ D-]cc"]}
+        inputs = {'Lb2LcD': self.d.hhh_pid + self.lc}
+        rs = makeB2XSels(decays, 'D2HHHPID', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {'Lb2LcDWS': ["[Lambda_b0 -> Lambda_c+ D+]cc"]}
+        inputs = {'Lb2LcDWS': self.d.hhh_pid + self.lc}
+        ws = makeB2XSels(decays, 'D2HHHPID', inputs, config)
+        self.lines.append(ProtoLine(ws, 1.0))
+
+    def _makeLb2LcDKst(self, d2x):
+        '''Makes RS Lb -> Lc D+ Kst c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '6400*MeV'
+        config['AM_MIN'] = '5200*MeV'
+        decays = {'Lb2LcDKst': ["[Lambda_b0 -> Lambda_c+ D- K*(892)~0]cc"]}
+        inputs = {
+            'Lb2LcDKst': d2x + self.lc_tight + self.hh.kpi_loose_ProbNNpid
+        }
+        rs = makeB2XSels(decays, '', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2LcDstKst(self):
+        '''Makes RS Lb -> Lc D*(2010)+ Kst c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '6400*MeV'
+        config['AM_MIN'] = '5200*MeV'
+        decays = {
+            'Lb2LcDstKst': ["[Lambda_b0 -> Lambda_c+ D*(2010)- K*(892)~0]cc"]
+        }
+        inputs = {
+            'Lb2LcDstKst':
+            self.dst.d0pi_pid + self.lc_tight + self.hh.kpi_loose_ProbNNpid
+        }
+        rs = makeB2XSels(decays, '', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2Dst0K(self, dname, d2x):
+        '''Makes Lb  -> Lc+ D*0 K-, D*0 -> D0 gamma/Pi0_resolved/merged'''
+        kaons = self.kaons
+        decays = {
+            'Lb2LcDst0KLc2PKPi': ["[Lambda_b0 -> Lambda_c+ D*(2007)0 K-]cc"]
+        }
+        inputs = {'Lb2LcDst0KLc2PKPi': self.lc + d2x + kaons}
+        rs = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeX2LcD0(self):
+        '''Makes RS X -> Lc D0 + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '9000*MeV'
+        decays = {'X2LcD0': ["B+ -> Lambda_c+ D0", "B- -> Lambda_c~- D0"]}
+        inputs = {'X2LcD0': self.d.kpi_pid + self.lc}
+        rs = makeB2XSels(decays, 'D02KPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeX2LcD0H(self):
+        '''Makes RS + WS X -> Lc D0 H + c.c. Need loose pions here as they may be soft'''
+        pions = self.pions
+        kaons = self.kaons
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '9000*MeV'
+        decays = {
+            'X2LcD0Pi': ["B0 -> Lambda_c+ D0 pi-", "B0 -> Lambda_c~- D0 pi+"],
+            'X2LcD0K': ["B0 -> Lambda_c+ D0 K-", "B0 -> Lambda_c~- D0 K+"]
+        }
+        inputs = {
+            'X2LcD0Pi': self.d.kpi_pid + self.lc + pions,
+            'X2LcD0K': self.d.kpi_pid + self.lc + kaons
+        }
+        rs = makeB2XSels(decays, 'D02KPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {
+            'X2LcD0PiWS':
+            ["B0 -> Lambda_c+ D0 pi+", "B0 -> Lambda_c~- D0 pi-"],
+            'X2LcD0KWS': ["B0 -> Lambda_c+ D0 K+", "B0 -> Lambda_c~- D0 K-"]
+        }
+        inputs = {
+            'X2LcD0PiWS': self.d.kpi_pid + self.lc + pions,
+            'X2LcD0KWS': self.d.kpi_pid + self.lc + kaons
+        }
+        ws = makeB2XSels(decays, 'D02KPi', inputs, config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeX2LcHH(self):
+        '''Makes RS + WS Xib -> Lc H+H-, LC H-H- + c.c.'''
+        pions = self.pions
+        kaons = self.kaons
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '9000*MeV'
+        decays = {
+            'X2LcPiPiSS': ["[B- -> Lambda_c+ pi- pi-]cc"],
+            'X2LcKPiSS': ["[B- -> Lambda_c+ K- pi-]cc"],
+            'X2LcKKSS': ["[B- -> Lambda_c+ K- K-]cc"],
+            'X2LcPiPiOS': ["[B+ -> Lambda_c+ pi- pi+]cc"],
+            'X2LcKPiOS': ["[B+ -> Lambda_c+ K- pi+]cc"],
+            'X2LcPiKOS': ["[B+ -> Lambda_c+ K+ pi-]cc"],
+            'X2LcKKOS': ["[B+ -> Lambda_c+ K- K+]cc"]
+        }
+        inputs = {
+            'X2LcPiPiSS': self.lc + pions,
+            'X2LcKPiSS': self.lc + kaons + pions,
+            'X2LcKKSS': self.lc + kaons,
+            'X2LcPiPiOS': self.lc + pions,
+            'X2LcKPiOS': self.lc + kaons + pions,
+            'X2LcPiKOS': self.lc + kaons + pions,
+            'X2LcKKOS': self.lc + kaons
+        }
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+        decays = {
+            'X2LcPiPiWS': ["[B+ -> Lambda_c+ pi+ pi+]cc"],
+            'X2LcKPiWS': ["[B+ -> Lambda_c+ K+ pi+]cc"],
+            'X2LcKKWS': ["[B+ -> Lambda_c+ K+ K+]cc"]
+        }
+        inputs = {
+            'X2LcPiPiWS': self.lc + pions,
+            'X2LcKPiWS': self.lc + kaons + pions,
+            'X2LcKKWS': self.lc + kaons
+        }
+        ws = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeB2LcpbarH(self):
+        '''Makes RS + WS B- -> Lc+ pbar- h- + c.c.'''
+        pions = self.pions
+        kaons = self.kaons
+        protons = self.protons
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4750.*MeV'
+        decays = {
+            'B2LcpbarPiSS': ["[B- -> Lambda_c+ p~- pi-]cc"],
+            'B2LcpbarKSS': ["[B- -> Lambda_c+ p~- K-]cc"],
+        }
+        inputs = {
+            'B2LcpbarPiSS': self.lc + pions + protons,
+            'B2LcpbarKSS': self.lc + kaons + protons
+        }
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+        decays = {
+            'B2LcpbarPiWS':
+            ["[B+ -> Lambda_c+ p~- pi+]cc", "[B+ -> Lambda_c+ p+ pi-]cc"],
+            'B2LcpbarKWS':
+            ["[B+ -> Lambda_c+ p~- K+]cc", "[B+ -> Lambda_c+ p+ K-]cc"],
+        }
+        inputs = {
+            'B2LcpbarPiWS': self.lc + pions + protons,
+            'B2LcpbarKWS': self.lc + kaons + protons
+        }
+        ws = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeB02LcpbarKS(self, ks):
+        '''Makes RS + WS B0 -> Lc+ pbar- Ks + c.c.'''
+        protons = self.protons
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4750.*MeV'
+        decays = {'B02LcpbarKS' + ks: ["[B0 -> Lambda_c+ p~- KS0]cc"]}
+        inputs = {'B02LcpbarKS' + ks: self.lc + self.ks[ks] + protons}
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {'B02LcpbarKSWS' + ks: ["[B0 -> Lambda_c+ p+ KS0]cc"]}
+        inputs = {'B02LcpbarKSWS' + ks: self.lc + self.ks[ks] + protons}
+        ws = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeB2LcLambda0barH(self):
+        '''Makes RS + WS B0 -> Lc+ Lambda0bar h- + c.c.'''
+        pions = self.pions
+        kaons = self.kaons
+        lambdadd = self.lambda0["DD"]
+        lambdall = self.lambda0["LL"]
+        lambdas = lambdadd + lambdall
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4750.*MeV'
+        decays = {
+            'B02LcLambda0Pi': ["[B0 -> Lambda_c+ Lambda~0 pi-]cc"],
+            'B02LcLambda0K': ["[B0 -> Lambda_c+ Lambda~0 K-]cc"],
+        }
+        inputs = {
+            'B02LcLambda0Pi': self.lc + pions + lambdas,
+            'B02LcLambda0K': self.lc + kaons + lambdas
+        }
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+        decays = {
+            'B02LcLambda0PiWS': ["[B0 -> Lambda_c+ Lambda~0 pi+]cc"],
+            'B02LcLambda0KWS': ["[B0 -> Lambda_c+ Lambda~0 K+]cc"],
+        }
+        inputs = {
+            'B02LcLambda0PiWS': self.lc + pions + lambdas,
+            'B02LcLambda0KWS': self.lc + kaons + lambdas
+        }
+        ws = makeB2XSels(decays, 'Lc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeX2LcKPiPiPi(self):
+        '''Makes RS + WS Xib -> Lc HH + c.c.'''
+        pions = self.pions
+        kaons = self.kaons
+        pipipi = self.hhh.pipipi
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '9000*MeV'
+        decays = {'X2LcKPiPiPi': ["[B+ -> Lambda_c+ a_1(1260)+ K- ]cc"]}
+        inputs = {'X2LcKPiPiPi': self.lc + pipipi + kaons}
+        rs = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+        decays = {'X2LcKPiPiPiWS': ["[B+ -> Lambda_c+ a_1(1260)+ K+]cc"]}
+        inputs = {'X2LcKPiPiPiWS': self.lc + pipipi + kaons}
+        ws = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeXib2XicHH(self):
+        '''Makes RS + WS Xib -> Lc HH + c.c.'''
+        pions = self.pions
+        kaons = self.kaons
+        decays = {
+            'Xib2XicPiPi': ["[Xi_b- -> Xi_c+ pi- pi-]cc"],
+            'Xib2XicKPi': ["[Xi_b- -> Xi_c+ K- pi-]cc"],
+            'Xib2XicKK': ["[Xi_b- -> Xi_c+ K- K-]cc"]
+        }
+        inputs = {
+            'Xib2XicPiPi': self.xic + pions,
+            'Xib2XicKPi': self.xic + kaons + pions,
+            'Xib2XicKK': self.xic + kaons
+        }
+        rs = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {
+            'Xib2XicPiPiWS': ["[Xi_b- -> Xi_c+ pi+ pi+]cc"],
+            'Xib2XicKPiWS': ["[Xi_b- -> Xi_c+ K+ pi+]cc"],
+            'Xib2XicKKWS': ["[Xi_b- -> Xi_c+ K+ K+]cc"]
+        }
+        inputs = {
+            'Xib2XicPiPiWS': self.xic + pions,
+            'Xib2XicKPiWS': self.xic + kaons + pions,
+            'Xib2XicKKWS': self.xic + kaons
+        }
+        ws = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeXib2LcDK(self):
+        '''Makes RS + WS Xib -> Lc+ D(s)- K- + c.c.'''
+        kaons = self.kaons
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5000.*MeV'
+        decays = {'Xib2LcDK': ["[Xi_b- -> Lambda_c+ D- K-]cc"]}
+        inputs = {'Xib2LcDK': self.lc + self.d.hhh_pid + kaons}
+        rs = makeB2XSels(decays, 'Lc2PKPiD2HHH', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {'Xib2LcDKWS': ["[Xi_b- -> Lambda_c+ D+ K-]cc"]}
+        inputs = {'Xib2LcDKWS': self.lc + self.d.hhh_pid + kaons}
+        ws = makeB2XSels(decays, 'Lc2PKPiD2HHH', inputs, config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeXib02LcDsKPi(self):
+        '''Makes RS + WS Xib -> Lc+ Ds- K- Pi+ + c.c.'''
+        pions = self.pions
+        kaons = self.kaons
+        decays = {'Xib02LcDsKPi': ["[Xi_b0 -> Lambda_c+ D- K- pi+]cc"]}
+        inputs = {'Xib02LcDsKPi': self.lc + self.ds + kaons + pions}
+        rs = makeB2XSels(decays, 'Lc2PKPiDs2KKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {'Xib02LcDsKPiWS': ["[Xi_b0 -> Lambda_c+ D- K+ pi+]cc"]}
+        inputs = {'Xib02LcDsKPiWS': self.lc + self.ds + kaons + pions}
+        ws = makeB2XSels(decays, 'Lc2PKPiDs2KKPi', inputs, self.config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeB2LcDspbar(self):
+        '''Makes RS + WS B- -> Lc+ Ds- pbar- + c.c.'''
+        protons = self.protons
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4750.*MeV'
+        decays = {'B2LcDspbar': ["[B- -> Lambda_c+ D- p~-]cc"]}
+        inputs = {'B2LcDspbar': self.lc + self.d.hhh_pid + protons}
+        rs = makeB2XSels(decays, 'Lc2PKPiDs2KKPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {'B2LcDspbarWS': ["[B- -> Lambda_c+ D+ p~-]cc"]}
+        inputs = {'B2LcDspbarWS': self.lc + self.d.hhh_pid + protons}
+        ws = makeB2XSels(decays, 'Lc2PKPiDs2KKPi', inputs, self.config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeX02XiccH(self):
+        '''Make RS and WS Xi_bcd -> Xi_cc+ H (H=pi,K) + cc.'''
+        pions = self.pions
+        kaons = self.kaons
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '9000*MeV'
+        decays = {
+            'X02XiccpPi': ["[B0 -> Xi_cc+ pi-]cc"],
+            'X02XiccpK': ["[B0 -> Xi_cc+ K-]cc"]
+        }
+        inputs = {
+            'X02XiccpPi': self.xiccp + pions,
+            'X02XiccpK': self.xiccp + kaons
+        }
+        rs = makeB2XSels(decays, 'Xiccp2Xic0Pi', inputs, config)
+
+        decays = {
+            'X02XiccpPiWS': ["[B0 -> Xi_cc+ pi+]cc"],
+            'X02XiccpKWS': ["[B0 -> Xi_cc+ K+]cc"]
+        }
+        inputs = {
+            'X02XiccpPiWS': self.xiccp + pions,
+            'X02XiccpKWS': self.xiccp + kaons
+        }
+        ws = makeB2XSels(decays, 'Xiccp2Xic0Pi', inputs, config)
+
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeX2XiccH(self):
+        '''Make RS and WS Xi_bcu -> LXi_cc++ H (H=pi,K) + cc.'''
+        pions = self.pions
+        kaons = self.kaons
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '9000*MeV'
+        decays = {
+            'X2XiccppPi': ["[B+ -> Xi_cc++ pi-]cc"],
+            'X2XiccppK': ["[B+ -> Xi_cc++ K-]cc"]
+        }
+        inputs = {
+            'X2XiccppPi': self.xiccpp + pions,
+            'X2XiccppK': self.xiccpp + kaons
+        }
+        rs = makeB2XSels(decays, 'Xiccpp2XicPi', inputs, config)
+
+        decays = {
+            'X2XiccppPiWS': ["[B+ -> Xi_cc++ pi+]cc"],
+            'X2XiccppKWS': ["[B+ -> Xi_cc++ K+]cc"]
+        }
+        inputs = {
+            'X2XiccppPiWS': self.xiccpp + pions,
+            'X2XiccppKWS': self.xiccpp + kaons
+        }
+        ws = makeB2XSels(decays, 'Xiccpp2XicPi', inputs, config)
+
+        self.lines.append(ProtoLine(rs, 1.0))
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeLb2LcDst(self):
+        '''Makes RS + WS Lb -> Lc D* + c.c.'''
+        decays = {'Lb2LcDst': ["[Lambda_b0 -> Lambda_c+ D*(2010)-]cc"]}
+        inputs = {'Lb2LcDst': self.dst.d0pi_pid + self.lc}
+        rs = makeB2XSels(decays, 'Dstar2D0PiPID', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {'Lb2LcDstWS': ["[Lambda_b0 -> Lambda_c+ D*(2010)+]cc"]}
+        inputs = {'Lb2LcDstWS': self.dst.d0pi_pid + self.lc}
+        ws = makeB2XSels(decays, 'Dstar2D0PiPID', inputs, self.config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeX2LcLc(self):
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '4800*MeV'
+        decays = {'X2LcLc': ["B0 -> Lambda_c+ Lambda_c~-"]}
+        inputs = {'X2LcLc': self.lc}
+        rs = makeB2XSels(decays, '', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+        decays = {'X2LcLcWS': ["[B0 -> Lambda_c+ Lambda_c+]cc"]}
+        inputs = {'X2LcLcWS': self.lc}
+        ws = makeB2XSels(decays, '', inputs, config)
+        self.lines.append(ProtoLine(ws, 0.1))
+
+    def _makeLb2Lc5Pi(self):
+        decays = {
+            'Lb2Lc5Pi': ["[Lambda_b0 -> Lambda_c+ a_1(1260)- rho(770)0]cc"]
+        }
+        inputs = {'Lb2Lc5Pi': self.lc + self.hhh.pipipi + self.hh.pipi_pid}
+        lb2lc5pi = makeB2XSels(decays, 'Lc2PKPiPID', inputs, self.config)
+        self.lines.append(ProtoLine(lb2lc5pi, 1.0))
+
+    def _makeLb2DpHH(self):
+        '''Make RS and WS Lb ->DpHH (H=pi,K) + cc.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '7000*MeV'
+        ppipi = self.hhh.ppipi_pid
+        pkpi = self.hhh.pkpi_pid
+        pkk = self.hhh.pkk_pid
+        decays = {
+            'Lb2DpPiPi': ["[Lambda_b0 -> D+ a_1(1260)-]cc"],
+            'Lb2DpKPi': ["[Lambda_b0 -> D+ a_1(1260)-]cc"],
+            'Lb2DpKK': ["[Lambda_b0 -> D+ a_1(1260)-]cc"]
+        }
+        inputs = {
+            'Lb2DpPiPi': self.d.hhh_cf_pid + ppipi,
+            'Lb2DpKPi': self.d.hhh_cf_pid + pkpi,
+            'Lb2DpKK': self.d.hhh_cf_pid + pkk
+        }
+        rs = makeB2XSels(decays, 'D2HHH', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXib2D0pHH(self):
+        '''Make RS and WS Xi_b ->DpHH (H=pi,K) + cc.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '7000*MeV'
+        ppipi = self.hhh.ppipi_pid
+        pkpi = self.hhh.pkpi_pid
+        pkk = self.hhh.pkk_pid
+        decays = {
+            'Xib2D0pPiPi':
+            ["Xi_b- -> D0 a_1(1260)-", "Xi_b~+ -> D0 a_1(1260)+"],
+            'Xib2D0pKPi':
+            ["Xi_b- -> D0 a_1(1260)-", "Xi_b~+ -> D0 a_1(1260)+"],
+            'Xib2D0pKK': ["Xi_b- -> D0 a_1(1260)-", "Xi_b~+ -> D0 a_1(1260)+"]
+        }
+        inputs = {
+            'Xib2D0pPiPi': self.d0_pid + ppipi,
+            'Xib2D0pKPi': self.d0_pid + pkpi,
+            'Xib2D0pKK': self.d0_pid + pkk
+        }
+        rs = makeB2XSels(decays, 'D02HH', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2D0ph(self, dname, d2x):
+        '''Make RS Lb -> D0(K3pi) p h + cc.'''
+        protons_pid = self.protons_pid
+        kaons_pid = self.topoKaons_pid
+        pions_pid = self.topoPions_pid
+        decays_k = {'Lb2D0pK': ["Lambda_b0 -> D0 p+ K-", "Lambda_b0 -> D0 p~- K+"]}
+        inputs_k = {'Lb2D0pK': d2x + protons_pid + kaons_pid}
+        rs_k = makeB2XSels(decays_k, dname, inputs_k, self.config)
+        self.lines.append(ProtoLine(rs_k, 1.0))
+        decays_pi = {'Lb2D0pPi': ["Lambda_b0 -> D0 p+ pi-", "Lambda_b0 -> D0 p~- pi+"]}
+        inputs_pi = {'Lb2D0pPi': d2x + protons_pid + pions_pid}
+        rs_pi = makeB2XSels(decays_pi, dname, inputs_pi, self.config)
+        self.lines.append(ProtoLine(rs_pi, 1.0))
+
+    def _makeLb2DD0p(self, dname, d2x):
+        '''Make Lb -> D(s)- D0(K3pi) p + cc.'''
+        decays = {'Lb2DD0pD2HHH': ["Lambda_b0 -> D- D0 p+", "Lambda_b0 -> D+ D0 p~-"]}
+        inputs = {'Lb2DD0pD2HHH': self.d.hhh_cf_pid + d2x + self.protons_pid}
+        rs = makeB2XSels(decays, dname, inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXibc2DpK(self):
+        '''Make Xi_bc+ --> D+ p K- + cc.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '9000*MeV'
+        config['AM_MIN'] = '5800*MeV'
+        config['BPVLTIME_MIN'] = '0.05*ps'
+        protons_pid = self.protons_pid
+        kaons_pid = self.topoKaons_pid
+        decays = {'Xibc2DpK': ["[Xi_bc+ -> D+ p+ K-]cc"]}
+        inputs = {'Xibc2DpK': self.d.hhh_cf_pid + protons_pid + kaons_pid}
+        rs = makeB2XSels(decays, 'D2HHH', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2LcPiPiPiFullDST(self):
+        '''Make RS L_b ->Lc 3pi + cc.'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5400*MeV'
+        config['AM_MAX'] = '5900*MeV'
+        config['BPVIPCHI2_MAX'] = '16'
+        pipipi = self.hhh.pipipi_tightersel
+        Lc = self.lc_tight
+        decays = {'Lb2LcPiPiPi': ["[Lambda_b0 -> Lambda_c+ a_1(1260)-]cc"]}
+        inputs = {'Lb2LcPiPiPi': Lc + pipipi}
+        rs = makeB2XSels(decays, 'Lc2PKPiFullDST', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXib02XicPiPiPiFullDST(self):
+        '''Make RS Xi_b0 -> Xi_c+ 3pi + cc.'''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5600*MeV'
+        config['AM_MAX'] = '6000*MeV'
+        config['BPVIPCHI2_MAX'] = '16'
+        pipipi = self.hhh.pipipi_tightersel
+        Xic = self.xic_tightest
+        decays = {'Xib02XicPiPiPi': ["[Xi_b0 -> Xi_c+ a_1(1260)-]cc"]}
+        inputs = {'Xib02XicPiPiPi': Xic + pipipi}
+        rs = makeB2XSels(decays, 'Xic2PKPiFullDST', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeXib2Xic0PiPiPiFullDST(self):
+        '''Make RS Xi_b- -> Xi_c0 PiPiPi- '''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5600*MeV'
+        config['AM_MAX'] = '6100*MeV'
+        config['BPVIPCHI2_MAX'] = '16'
+        pipipi = self.hhh.pipipi_tightersel
+        decays = {'Xib2Xic0PiPiPi': ["[Xi_b- -> Xi_c0 a_1(1260)-]cc"]}
+        inputs = {'Xib2Xic0PiPiPi': self.xic0 + pipipi}
+        rs = makeB2XSels(decays, 'Xic02PKKPiFullDST', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeOmegab2Omegac0PiPiPiFullDST(self):
+        '''Make RS Omega_b- -> Omega_c0 PiPiPi- '''
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5800*MeV'
+        config['AM_MAX'] = '6300*MeV'
+        config['BPVIPCHI2_MAX'] = '16'
+        pipipi = self.hhh.pipipi_tightersel
+        Omegac = self.omegac0_tight
+        decays = {
+            'Omegab2Omegac0PiPiPi': ["[Omega_b- -> Omega_c0 a_1(1260)-]cc"]
+        }
+        inputs = {'Omegab2Omegac0PiPiPi': Omegac + pipipi}
+        rs = makeB2XSels(decays, 'Omegac02PKKPiFullDST', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2sigmacpp4Pi(self):
+        '''Make Lambda_b0 -> Sigma_c++ Pi+ 3Pi- cc.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '6000*MeV'
+        config['AM_MIN'] = '4900*MeV'
+        pions = self.pions
+        decays = {
+            'Lb2sigmacpp4Pi': ["[Lambda_b0 -> Sigma_c++ pi+ pi- pi- pi-]cc"]
+        }
+        inputs = {'Lb2sigmacpp4Pi': self.sigmacpp + pions}
+        rs = makeB2XSels(decays, 'Sigmacpp2LcPiLc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2sigmacppD0KPi(self):
+        '''Makes Lambda_b0 -> Sigma_c++ D0 K- pi- + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '6000*MeV'
+        config['AM_MIN'] = '4900*MeV'
+        pions = self.pions
+        kaons = self.kaons
+        decays = {
+            'Lb2sigmacppD0KPi': [
+                "Lambda_b0 -> Sigma_c++ D0 K- pi-",
+                "Lambda_b~0 -> Sigma_c~-- D0 K+ pi+"
+            ]
+        }
+        inputs = {
+            'Lb2sigmacppD0KPi': self.d.kpi_pid + self.sigmacpp + pions + kaons
+        }
+        rs = makeB2XSels(decays, 'Sigmacpp2LcPiLc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2DDLambda(self, lambda0):
+        '''Makes Lambda_b0 -> D+ D- Lambda0'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '6219*MeV'
+        '''1870*2+1115=4855'''
+        config['AM_MIN'] = '4900*MeV'
+        decays = {'Lb2DDLambda' + lambda0: ["[Lambda_b0 -> D- D+ Lambda0]cc"]}
+        inputs = {
+            'Lb2DDLambda' + lambda0:
+            self.dds + self.lambda0[lambda0]
+        }
+        lb2ddlambda_rs = makeB2XSels(decays, '', inputs, config)
+        self.lines.append(ProtoLine(lb2ddlambda_rs, 1.0))
+
+    def _makeLb2D0D0Lambda(self, lambda0):
+        '''Makes Lambda_b0 -> D0 D0 Lambda0'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '6219*MeV'
+        config['AM_MIN'] = '4300*MeV'
+        dec = ["Lambda_b0 -> D0 D0 Lambda0", "Lambda_b~0 -> D0 D0 Lambda~0"]
+        decays = {
+            'Lb2D0D0LambdaD02HHD02HH' + lambda0: dec,
+            'Lb2D0D0LambdaD02HHD02K3Pi' + lambda0: dec,
+            'Lb2D0D0LambdaD02K3PiD02K3Pi' + lambda0: dec
+        }
+        inputs = {
+            'Lb2D0D0LambdaD02HHD02HH' + lambda0:
+            self.d.hh_pid_tight + self.lambda0[lambda0],
+            'Lb2D0D0LambdaD02HHD02K3Pi' + lambda0:
+            self.d.hh_pid_tight + self.d.k3pi_pid_tight +
+            self.lambda0[lambda0],
+            'Lb2D0D0LambdaD02K3PiD02K3Pi' + lambda0:
+            self.d.k3pi_pid_tight + self.lambda0[lambda0]
+        }
+        lb2d0d0lambda = makeB2XSels(decays, '', inputs, config)
+        self.lines.append(ProtoLine(lb2d0d0lambda, 1.0))
+
+    def _makeLb2DstDLambda(self, lambda0):
+        '''Makes the Lambda_b0 -> D*+- D-+ Lambda0 + c.c.'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '6219*MeV'
+        config['AM_MIN'] = '4300*MeV'
+        decays = {
+            'Lb2DstDLambda' + lambda0:
+            ["[Lambda_b0 -> D*(2010)- D+ Lambda0]cc","[Lambda_b0 -> D- D*(2010)+ Lambda0]cc"]
+        }
+        inputs = {
+            'Lb2DstDLambda' + lambda0:
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_pid + self.lambda0[lambda0]
+        }
+        lb2dstdlambda_rs = makeB2XSels(decays, '', inputs, config)
+        self.lines.append(ProtoLine(lb2dstdlambda_rs, 1.0))
+        inputs = {
+            'Lb2DstDLambda' + lambda0:
+            self.d.d_and_ds_cf_pid + self.dst.d0pi_k3pi_pid +
+            self.lambda0[lambda0]
+        }
+        lb2dstdlambda_rs = makeB2XSels(decays, 'DstarD02K3Pi', inputs, config)
+        self.lines.append(ProtoLine(lb2dstdlambda_rs, 1.0))
+
+    def _makeLb2DstDstLambda(self, lambda0):
+        '''Makes Lambda_b0 -> D*+- D*-+ Lambda0'''
+        config = deepcopy(self.config)
+        config['AM_MAX'] = '6219*MeV'
+        config['AM_MIN'] = '4300*MeV'
+        decays = {
+            'Lb2DstDstLambda' + lambda0:
+            ["[Lambda_b0 -> D*(2010)- D*(2010)+ Lambda0]cc"]
+        }
+        inputs = {
+            'Lb2DstDstLambda' + lambda0:
+            self.dst.d0pi_pid + self.lambda0[lambda0]
+        }
+        lb2dstdstlambda_rs = makeB2XSels(decays, '', inputs, config)
+        self.lines.append(ProtoLine(lb2dstdstlambda_rs, 1.0))
+        inputs = {
+            'Lb2DstDstLambda' + lambda0:
+            self.dst.d0pi_pid + self.dst.d0pi_k3pi_pid + self.lambda0[lambda0]
+        }
+        lb2dstdstlambda_rs = makeB2XSels(decays, 'DstarD02K3Pi', inputs,
+                                         config)
+        self.lines.append(ProtoLine(lb2dstdstlambda_rs, 1.0))
+        inputs = {
+            'Lb2DstDstLambda' + lambda0:
+            self.dst.d0pi_k3pi_pid + self.lambda0[lambda0]
+        }
+        lb2dstdstlambda_rs = makeB2XSels(decays, 'DstarD02K3PiDstarD02K3Pi',
+                                         inputs, config)
+        self.lines.append(ProtoLine(lb2dstdstlambda_rs, 1.0))
+    
+    def _makeB02LcSigmacppK(self):
+        '''Makes B0 -> Lc+ Sigma_c-- K+ + c.c.'''
+        kaons = self.topoKaons_pid
+        decays = {'B02LcSigmacppK': ["[B0 -> Lambda_c+ Sigma_c~-- K+]cc"]}
+        inputs = {'B02LcSigmacppK': self.lc_tight + self.sigmacpp + kaons}
+        rs = makeB2XSels(decays, 'Sigmacpp2LcPiLc2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeLb2DDpK(self):
+        '''Make Lb -> D+ D- p K- + cc.'''
+        protons = self.protons_pid
+        kaons = self.topoKaons_pid
+        decays = {'Lb2DDpK': ["[Lambda_b0 -> D+ D- p+ K-]cc"]}
+        inputs = {'Lb2DDpK': self.d.hhh_ds_rejection + protons + kaons}
+        rs = makeB2XSels(decays, 'D2HHHPID', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeB2LcXicPi(self):
+        '''Make B+ -> Lc+ Xic- pi+ + cc.'''
+        pions = self.pions
+        config = deepcopy(self.config)
+        config['AM_MIN'] = '5000.*MeV'
+        decays = {'B2LcXicPi': ["[B+ -> Lambda_c+ Xi_c~- pi+]cc"]}
+        inputs = {'B2LcXicPi': self.lc_tight + self.xic_tight + pions}
+        rs = makeB2XSels(decays, 'Xic2PKPiLc2PKPi', inputs, config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
+    def _makeB2XicpbarPi(self):
+        '''Make B- -> Xic+ pbar pi-'''
+        pions = self.topoPions_pid
+        decays = {'B2XicpbarPi': ["[B- -> Xi_c+ p~- pi-]cc"]}
+        inputs = {'B2XicpbarPi': self.xic + self.protons_pid + pions}
+        make_xic = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(make_xic, 1.0))
+
+    def _makeB02XicpbarPiPi(self):
+        '''Make B0 -> Xic+ pi+ pi- pbar'''
+        pions = self.topoPions_pid
+        decays = {'B02XicpbarPiPi': ["[B0 -> Xi_c+ pi+ pi- p~-]cc"]}
+        inputs = {'B02XicpbarPiPi': self.xic + self.protons_pid + pions}
+        make_xic = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(make_xic, 1.0))
+
+    def _makeB02XicpbarKPi(self):
+        '''Make B0 -> Xic+ K+ pi- pbar'''
+        pions = self.topoPions_pid
+        kaons = self.topoKaons_pid
+        decays = {'B02XicpbarKPi': ["[B0 -> Xi_c+ K+ pi- p~-]cc"]}
+        inputs = {'B02XicpbarKPi': self.xic + self.protons_pid + pions + kaons}
+        make_xic = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(make_xic, 1.0))
+
+    def _makeB02DpbarLambda(self, lambda0):
+        '''Make B0 -> Lambda0 D(*)+ pbar'''
+        decays = {'B02DpbarLambda' + lambda0: ["[B0 -> D+ p~- Lambda0]cc"]}
+        inputs = {'B02DpbarLambda' + lambda0: self.d.hh_pid_tight + self.protons_pid + self.lambda0[lambda0]}
+        make_d = makeB2XSels(decays, 'D2HHH', inputs, self.config)
+        self.lines.append(ProtoLine(make_d, 1.0))
+        decays = {'B02DstpbarLambda' + lambda0: ["[B0 -> D*(2010)+ p~- Lambda0]cc"]}
+        inputs = {'B02DstpbarLambda' + lambda0: self.dst.d0pi_pid + self.protons_pid + self.lambda0[lambda0]}
+        make_dst = makeB2XSels(decays, 'Dst2D0Pi', inputs, self.config)
+        self.lines.append(ProtoLine(make_dst, 1.0))
+        inputs = {'B02DstpbarLambda' + lambda0: self.dst.d0pi_k3pi_pid + self.protons_pid + self.lambda0[lambda0]}
+        make_dst_k3pi = makeB2XSels(decays, 'Dst2D0PiD02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(make_dst_k3pi, 1.0))
+
+    def _makeB2D0pbarLambda(self, lambda0):
+        '''Make B- -> Lambda0 D0 pbar'''
+        decays = {'B2D0pbarLambda' + lambda0: ["B- -> D0 p~- Lambda0", "B+ -> D0 p+ Lambda~0"]}
+        inputs = {'B2D0pbarLambda' + lambda0: self.d0_pid + self.protons_pid + self.lambda0[lambda0]}
+        make_d0 = makeB2XSels(decays, 'D02HH', inputs, self.config)
+        self.lines.append(ProtoLine(make_d0, 1.0))
+        inputs = {'B2D0pbarLambda' + lambda0: self.d0_k3pi_pid + self.protons_pid + self.lambda0[lambda0]}
+        make_d0_k3pi = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(make_d0_k3pi, 1.0))
+
+    def _makeB02D0pbarKLambda(self, lambda0):
+        '''Make B0 -> Lambda0 D0 pbar K+'''
+        kaons = self.topoKaons_pid
+        decays = {'B02D0pbarKLambda' + lambda0: ["B0 -> D0 p~- Lambda0 K+", "B0 -> D0 p+ Lambda~0 K-"]}
+        inputs = {'B02D0pbarKLambda' + lambda0: self.d0_pid + self.protons_pid + self.lambda0[lambda0] + kaons}
+        make_d0 = makeB2XSels(decays, 'D02HH', inputs, self.config)
+        self.lines.append(ProtoLine(make_d0, 1.0))
+        inputs = {'B02D0pbarKLambda' + lambda0: self.d0_k3pi_pid + self.protons_pid + self.lambda0[lambda0] + kaons}
+        make_d0_k3pi = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(make_d0_k3pi, 1.0))
+
+    def _makeXib2XicHHHH(self):
+        '''Make Xib- -> Xic+ pi+ pi- pi- pi-'''
+        pipipipi = self.hhh.pipipipi
+        decays = {'Xib2XicHHHH': ["[Xi_b- -> Xi_c+ a_1(1260)-]cc"]}
+        inputs = {'Xib2XicHHHH': self.xic + pipipipi}
+        make_Xic4h = makeB2XSels(decays, 'Xic2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(make_Xic4h, 1.0))
+
+    def _makeXib2LcKHHH(self):
+        '''Make Xib- -> Lambdac+ pi+ K- pi- pi-'''
+        kpipipi = self.hhh.kpipipi
+        decays = {'Xib2LcKHHH': ["[Xi_b- -> Lambda_c+ K_1(1270)-]cc"]}
+        inputs = {'Xib2LcKHHH': self.lc + kpipipi}
+        make_LcKhhh = makeB2XSels(decays, 'Lc2PKPi', inputs, self.config)
+        self.lines.append(ProtoLine(make_LcKhhh, 1.0))
+
+    def _makeXib02D0LambdaPiPi(self):
+        '''Make Xib0 -> D0 Lambda0 pi+ pi-'''
+        pipi = self.hh.pipi
+        lambda0="LL"
+        decays = {'Xib02D0LambdaPiPi'+lambda0: ["Xi_b0 -> D0 Lambda0 rho(770)0", "Xi_b0 -> D0 Lambda~0 rho(770)0"]}
+        inputs = {'Xib02D0LambdaPiPi'+lambda0: self.d0_pid  + pipi+ self.lambda0[lambda0]}
+        make_D0L0PiPiLLKPi= makeB2XSels(decays, 'D02KPi', inputs, self.config)
+        self.lines.append(ProtoLine(make_D0L0PiPiLLKPi, 1.0))
+        decays = {'Xib02D0LambdaPiPi'+lambda0: ["Xi_b0 -> D0 Lambda0 rho(770)0", "Xi_b0 -> D0 Lambda~0 rho(770)0"]}
+        inputs = {'Xib02D0LambdaPiPi'+lambda0: self.d0_k3pi_pid  + pipi+ self.lambda0[lambda0]}
+        make_D0L0PiPiLLK3Pi= makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(make_D0L0PiPiLLK3Pi, 1.0))
+
+        lambda0="DD"
+        decays = {'Xib02D0LambdaPiPi'+lambda0: ["Xi_b0 -> D0 Lambda0 rho(770)0", "Xi_b0 -> D0 Lambda~0 rho(770)0"]}
+        inputs = {'Xib02D0LambdaPiPi'+lambda0: self.d0_pid + pipi+ self.lambda0[lambda0]}
+        make_D0L0PiPiDDKPi= makeB2XSels(decays, 'D02KPi', inputs, self.config)
+        self.lines.append(ProtoLine(make_D0L0PiPiDDKPi, 1.0))
+        decays = {'Xib02D0LambdaPiPi'+lambda0: ["Xi_b0 -> D0 Lambda0 rho(770)0", "Xi_b0 -> D0 Lambda~0 rho(770)0"]}
+        inputs = {'Xib02D0LambdaPiPi'+lambda0: self.d0_k3pi_pid + pipi+ self.lambda0[lambda0]}
+        make_D0L0PiPiDDK3Pi= makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(make_D0L0PiPiDDK3Pi, 1.0))
+
+    def _makeOmegab2Xic0KPiPi(self):
+        '''Make Omegab- -> Xic0 K Pi Pi'''
+        kpipi = self.hhh.kpipi
+        decays = {'Omegab2Xic0KPiPi': ["[Omega_b- -> Xi_c0 K_1(1270)-]cc"]}
+        inputs = {'Omegab2Xic0KPiPi': self.xic0 + kpipi}
+        make_rs = makeB2XSels(decays, 'Xic02PKKPi', inputs, self.config)
+        self.lines.append(ProtoLine(make_rs, 1.0))
+
+
+    def _makeXib02XicD0K(self):
+        '''Make Xib0 -> Xic+ D~0 K-'''
+        kaons = self.topoKaons_pid
+        decays = {'Xib02XicD0K': ["Xi_b0 -> Xi_c+ D0 K-","Xi_b0 -> Xi_c~- D0 K+"]}
+        inputs = {'Xib02XicD0K': self.xic + self.d0_pid + kaons}
+        make_d2KPi = makeB2XSels(decays, 'D02KPi', inputs, self.config)
+        self.lines.append(ProtoLine(make_d2KPi, 1.0))
+
+        decays = {'Xib02XicD0K': ["Xi_b0 -> Xi_c+ D0 K-","Xi_b0 -> Xi_c~- D0 K+"]}
+        inputs = {'Xib02XicD0K': self.xic + self.d0_k3pi_pid + kaons}
+        make_d2K3Pi = makeB2XSels(decays, 'D02K3Pi', inputs, self.config)
+        self.lines.append(ProtoLine(make_d2K3Pi, 1.0))
+
+
+    def _makeXib2XicDK(self):
+        '''Make Xib- -> Xic0 D~0 K-, Xib- -> Xic+ D- K-, Xib- -> Xic+ D*- K-'''
+        kaons = self.topoKaons_pid
+
+        decays = {'Xib2Xic0D0K': ["Xi_b- -> Xi_c0 D0 K-","Xi_b~+ -> Xi_c~0 D0 K+"]}
+        inputs = {'Xib2Xic0D0K': self.xic0 + self.d0_pid + kaons}
+        make_d2KPi = makeB2XSels(decays, 'D02KPi', inputs, self.config)
+        self.lines.append(ProtoLine(make_d2KPi, 1.0))
+
+        decays = {'Xib2XicDK': ["[Xi_b- -> Xi_c+ D- K-]cc"]}
+        inputs = {'Xib2XicDK': self.xic + self.d.hhh_cf_pid + kaons}
+        make_d2hhh = makeB2XSels(decays, 'D2HHH', inputs, self.config)
+        self.lines.append(ProtoLine(make_d2hhh, 1.0))
+
+        decays = {'Xib2XicDK': ["[Xi_b- -> Xi_c+ D*(2010)- K-]cc"]}
+        inputs = {'Xib2XicDK': self.xic + self.dst.d0pi_pid + kaons}
+        make_dst2d0h = makeB2XSels(decays, 'Dst2D0Pi', inputs, self.config)
+        self.lines.append(ProtoLine(make_dst2d0h, 1.0))
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_LoKiCuts.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_LoKiCuts.py
new file mode 100644
index 000000000..da2e5bbc8
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_LoKiCuts.py
@@ -0,0 +1,129 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from StandardParticles import StdNoPIDsPions, StdNoPIDsKaons
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+class LoKiCuts(object):
+    ''' Class to automatically build LoKi cut strings.
+
+    Each functor has a "key" which is just the functor name if the functor does
+    not have any special characters or ()s.  See the "functors" dictionary
+    below for the full list of keys (the values are the functor strings).
+
+    The cut string is built by supplying a dictionary of cuts and a list of
+    functor keys to use.  The entries in the cuts dict must be of the form
+    <functor key>_<MIN or MAX> : <value>.
+
+    Ex.) cuts = {"PT_MIN":"500*MeV", "VCHI2DOF_MAX":30, "ASUMPT_MIN":"1*GeV"}
+         code = LoKiCuts(["PT","VCHI2DOF"],cuts).code()
+
+    The result is: "(PT > 500*MeV) & (VFASPF(VCHI2/VDOF) < 30)".  Notice that
+    the MIN and MAX suffixes determine the > or < usage (both are allowed if
+    the user supplies separate entries to the cuts dict).  Also notice how the
+    full functor is used (not the key) and that cuts are ignored if the key
+    is not supplied to LoKiCuts.
+    '''
+    
+    functors = {'TRCHI2DOF' : 'TRCHI2DOF',
+                'P'         : 'P',
+                'PT'        : 'PT',
+                'MIPCHI2DV' : 'MIPCHI2DV(PRIMARY)',
+                'ASUMPT'    : 'ASUM(PT)',
+                'AMAXDOCA'  : "ACUTDOCA(%s,'LoKi::DistanceCalculator')",
+                'ADOCA12'   : "ADOCA(1,2)",
+                'ADOCA13'   : "ADOCA(1,3)",
+                'ADOCA23'   : "ADOCA(2,3)",
+                'ADOCA14'   : "ADOCA(1,4)",
+                'ADOCA24'   : "ADOCA(2,4)",
+                'ADOCA34'   : "ADOCA(3,4)",
+                'ADOCA15'   : "ADOCA(1,5)",
+                'ADOCA25'   : "ADOCA(2,5)",
+                'ADOCA35'   : "ADOCA(3,5)",
+                'ADOCA45'   : "ADOCA(3,5)", 
+                'VCHI2DOF'  : "VFASPF(VCHI2/VDOF)",
+                'BPVVDCHI2' : 'BPVVDCHI2',
+                'BPVDIRA'   : 'BPVDIRA',
+                'SUMPT'     : "ASUM(SUMTREE(PT,(ISBASIC | (ID=='gamma')),0.0))",
+                'BPVIPCHI2' : 'BPVIPCHI2()',
+                'BPVLTIME'  : 'BPVLTIME()',
+                'MM'        : 'MM',
+                'CHILDCL1'  : 'CHILD(CL,1)',
+                'CHILDCL2'  : 'CHILD(CL,2)',
+                'PIDK'      : 'PIDK',
+                'PIDp'      : 'PIDp',
+                'PIDKp'     : 'PIDK-PIDp',
+                'PIDpK'     : 'PIDp-PIDK',
+                'BPVVDRHO'  : 'BPVVDRHO',
+                'BPVVDZ'    : 'BPVVDZ',
+                'DOCAMAX'   : 'DOCAMAX',
+                'AM'        : 'AM',
+                'CL'        : 'CL', 
+                'TRGHP'     : 'TRGHP',
+                'DZ1'       : ' (CHILD(VFASPF(VZ), 1) - VFASPF(VZ))',
+                'DZ2'       : ' (CHILD(VFASPF(VZ), 2) - VFASPF(VZ))',
+                'PROBNNK'   : 'PROBNNK',
+                'PROBNNpi'  : 'PROBNNpi',
+                'PIDmu'     : 'PIDmu',
+                'HASVERTEX' : 'HASVERTEX',
+                'BPVCORRM'  : 'BPVCORRM',
+                'ISNOTE'    : 'PPINFO(LHCb.ProtoParticle.IsNotE,-1)'
+                }
+    
+    def __init__(self,cuts,config):
+        self.cuts = cuts
+        self.config = config
+
+    def code(self):
+        cuts = []
+        for cut in self.cuts: cuts += self._getCut(cut)
+        return LoKiCuts.combine(cuts)
+        
+    def _getCut(self,cut):
+        cuts = []
+        fun = self.functors[cut]
+        if cut is 'AMAXDOCA': # Use ACUTDOCA instead (slightly faster)
+            if self.config.has_key(cut+'_MAX'):
+                return [fun%self.config[cut+'_MAX']]
+            else: # Look for ADOCA(N,M) entries
+                for key,val in self.config.iteritems():
+                    if key.startswith('ADOCA') and key.endswith('MAX'):
+                        cuts.append(key.replace('_MAX','')+'<'+str(val))
+                return cuts        
+        for key,val in self.config.iteritems():
+            if key.startswith(cut+'_'):                
+                if key.endswith('MIN'): cuts.append(fun+'>'+str(val))
+                else: cuts.append(fun+'<'+str(val))
+        return cuts
+
+    @staticmethod
+    def cutValue(cut):
+        '''Takes X*Units and returns X as an int and Units'''
+        info = cut.split('*')
+        return (int(info[0]),info[1])
+
+    @staticmethod
+    def combine(cuts):
+        '''Simple combine of list of LoKi cut strings.'''
+        cutList = []
+        for c in cuts:
+            if c:
+                if not c.startswith('('): c = '('+c+')'
+                cutList.append(c)
+        return ' & '.join(cutList)
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Utils.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Utils.py
new file mode 100644
index 000000000..67273aefd
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/Beauty2Charm_Utils.py
@@ -0,0 +1,471 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import DataOnDemand, Selection, MergedSelection, VoidEventSelection
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from Configurables import SubstitutePID
+from Configurables import ConeJetProxyFilter
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class ProtoLine(object):
+    '''Stores selections, prescales, etc. that will become lines.'''
+
+    def __init__(self, sels, pre=1.0):
+        self.selections = sels
+        self.pre = pre
+
+    def prescale(self, line, name, config):
+        if not name in config['Prescales'].keys(): return self.pre
+        else: return config['Prescales'][name]
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+def dataOnDemand(loc):
+    return DataOnDemand(Location="Phys/%s/Particles" % loc)
+
+
+def filterSelection(name, code, inputs, preambulo=None):
+    alg = FilterDesktop(Code=code)
+    if preambulo is not None: alg.Preambulo = preambulo
+    return Selection(
+        name + 'Beauty2CharmFilter', Algorithm=alg, RequiredSelections=inputs)
+
+
+def filterInputs(tag, inputs, config):
+    '''Filter input particles.'''
+    code = LoKiCuts([
+        'TRCHI2DOF', 'PT', 'P', 'MIPCHI2DV', 'MM', 'CHILDCL1', 'CHILDCL2',
+        'PIDK', 'PIDp', 'BPVVDRHO', 'BPVVDZ', 'DOCAMAX', 'TRGHP'
+    ], config).code()
+    return filterSelection(tag + 'Inputs', code, inputs)
+
+
+def filterPi0s(which, inputs, config):
+    cuts = ['PT', 'P']
+    if which is 'Resolved':
+        cuts.append('CHILDCL1')
+        cuts.append('CHILDCL2')
+    code = LoKiCuts.combine(["ABSID==111", LoKiCuts(cuts, config).code()])
+    return filterSelection('Pi0' + which + 'Inputs', code, inputs)
+
+
+def topoInputsCuts():  # Don't need IP chi2 cut b/c is in 1st filter
+    return "HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV)"
+
+
+def topoInputsLooseCuts():
+    return "HASTRACK & (TRCHI2DOF<4.) & (PT > 250*MeV) & (P > 2500*MeV)"
+
+
+def topoKSInputsCuts():  # Don't need IP chi2 cut b/c is in 1st filter
+    return "(PT > 500*MeV) & (P > 5000*MeV) & (BPVVDCHI2 > 1000)"
+
+
+def topoInputs(tag, inputs):
+    '''Selects tracks that could have been used by the Topo.'''
+    return filterSelection(tag + 'TopoInputs', topoInputsCuts(), inputs)
+
+
+def topoInputsLoose(tag, inputs):
+    '''Selects tracks that could have been used by the Topo.'''
+    return filterSelection(tag + 'TopoInputsLoose', topoInputsLooseCuts(),
+                           inputs)
+
+
+def hasTopoChild():
+    return "AHASCHILD((ISBASIC & "+topoInputsCuts()+")|((ABSID=='KS0') & "\
+           +topoKSInputsCuts() +"))"
+
+
+def hasTopoChild_Loose():
+    return "AHASCHILD((ISBASIC & "+topoInputsLooseCuts()+")|((ABSID=='KS0') & "\
+           +topoKSInputsCuts() +"))"
+
+
+def hasTopoChildren():
+    return "NINTREE((ISBASIC & "+topoInputsCuts()+")|((ABSID=='KS0') & "\
+           +topoKSInputsCuts() +")) > 1"
+
+
+def has1TrackChild():
+    return "INTREE(HASTRACK & (P>10000*MeV) & (PT>1700*MeV) & (TRCHI2DOF<4.) "\
+           "& (MIPCHI2DV(PRIMARY)>16) & (MIPDV(PRIMARY)>0.1*mm))"
+
+
+def makeTOSFilter(name, specs):
+    from Configurables import TisTosParticleTagger
+    tosFilter = TisTosParticleTagger(name + 'TOSFilter')
+    tosFilter.TisTosSpecs = specs
+    tosFilter.ProjectTracksToCalo = False
+    tosFilter.CaloClustForCharged = False
+    tosFilter.CaloClustForNeutral = False
+    tosFilter.TOSFrac = {4: 0.0, 5: 0.0}
+    return tosFilter
+
+
+def tosSelection(sel, specs):
+    '''Filters Selection sel to be TOS.'''
+    tosFilter = makeTOSFilter(sel.name(), specs)
+    return Selection(
+        sel.name() + 'TOS', Algorithm=tosFilter, RequiredSelections=[sel])
+
+
+def makeTISTOSFilter(name):
+    specs = {
+        'Hlt2Topo.*Decision%TOS': 0,
+        'Hlt2Topo.*Decision%TIS': 0,
+        'Hlt2.*IncPhi.*Decision%TOS': 0,
+        'Hlt2.*IncPhi.*Decision%TIS': 0
+    }
+    from Configurables import TisTosParticleTagger
+    tisTosFilter = TisTosParticleTagger(name + 'TISTOSFilter')
+    tisTosFilter.TisTosSpecs = specs
+    tisTosFilter.ProjectTracksToCalo = False
+    tisTosFilter.CaloClustForCharged = False
+    tisTosFilter.CaloClustForNeutral = False
+    tisTosFilter.TOSFrac = {4: 0.0, 5: 0.0}
+    return tisTosFilter
+
+
+def tisTosSelection(sel):
+    '''Filters Selection sel to be TOS OR TIS.'''
+    tisTosFilter = makeTISTOSFilter(sel.name())
+    tsel = Selection(
+        sel.name() + 'TISTOS',
+        Algorithm=tisTosFilter,
+        RequiredSelections=[sel])
+    return tsel
+
+
+def filterPID(name, input, config, level=1):
+    cuts = ["(NINGENERATION(('p+'==ABSID) & (PIDp < %s),%d) == 0)" \
+            % (config['P']['PIDp_MIN'],level),
+            "(NINGENERATION(('K+'==ABSID) & (PIDK < %s), %d) == 0)" \
+            % (config['K']['PIDK_MIN'],level),
+            "(NINGENERATION(('pi+'==ABSID) & (PIDK > %s), %d) == 0)" \
+            % (config['PI']['PIDK_MAX'],level)]
+    return filterSelection(name, LoKiCuts.combine(cuts), input)
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+def makeB2X(name, decay, inputs, config, useIP=True, resVert=True):
+    '''Makes all B -> X selections.'''
+    from copy import deepcopy
+    config = deepcopy(config)
+    if name.find('B02') >= 0 or name.find('B2D0PiNoIP') >= 0:
+        config['AM_MAX'] = '6000*MeV'
+    if name.find('B02DPiD2HHHBeauty2Charm') >= 0 or name.find(
+            'B02DKD2HHHBeauty2Charm') >= 0:
+        config['AM_MAX'] = '7000*MeV'
+    if name.find('Lb2XicPiXic2PKPi') >= 0 or name.find(
+            'Lb2XicPiWSXic2PKPi') >= 0:
+        config['AM_MAX'] = '8000*MeV'
+    if name.find('Omegab2Omegac0PiNoIP') >= 0:
+        config['AM_MAX'] = '8000*MeV'
+    if name.find('B2D0PiD2HHmuDST') >= 0:
+        config['AM_MAX'] = '9000*MeV'
+    if name.find('Xib2Xic0PiXic02PKKPi') >= 0:
+        config['AM_MAX'] = '9000*MeV'
+    if name.find('B02D0MuMu') >= 0:
+        config['AM_MAX'] = '7000*MeV'
+    if name.find('X02XiccpKWSXiccp2Xic0Pi') >= 0 or name.find(
+            'X02XiccpKXiccp2Xic0Pi') >= 0:
+        config['AM_MAX'] = '8000*MeV'
+    if name.find('X02XiccpPiWSXiccp2Xic0Pi') >= 0 or name.find(
+            'X02XiccpPiXiccp2Xic0Pi') >= 0:
+        config['AM_MAX'] = '8000*MeV'
+    if name.find('X2XiccppKWSXiccpp2XicPi') >= 0 or name.find(
+            'X2XiccppKXiccpp2XicPi') >= 0:
+        config['AM_MAX'] = '8000*MeV'
+    if name.find('X2XiccppPiWSXiccpp2XicPi') >= 0 or name.find(
+            'X2XiccppPiXiccpp2XicPi') >= 0:
+        config['AM_MAX'] = '8000*MeV'
+    if name.find('PartialD') >= 0:
+        config['AM_MIN'] = '3500*MeV'
+        config['AM_MAX'] = '6000*MeV'
+
+    comboCuts = LoKiCuts(['SUMPT', 'AM'], config).code()
+    flightCuts = ['BPVLTIME', 'DZ1', 'DZ2']
+    if useIP: flightCuts += ['BPVIPCHI2', 'BPVDIRA']
+    momCuts = [
+        LoKiCuts(['VCHI2DOF', 'BPVCORRM'], config).code(),
+        has1TrackChild(),
+        hasTopoChildren(),
+        LoKiCuts(flightCuts, config).code()
+    ]
+
+    if name.find('PartialD') >= 0:
+        momCuts.append(
+            "(M-MAXTREE(ABSID=='D0',M) < 4000*MeV) & (M-MAXTREE(ABSID=='D0',M) > 2600*MeV)"
+        )
+        comboCuts += "& (ACHILD(P,2) <100000*MeV)"
+
+    momCuts = LoKiCuts.combine(momCuts)
+    b2x = CombineParticles(
+        DecayDescriptors=decay,
+        CombinationCut=comboCuts,
+        MotherCut=momCuts,
+        StopAtMaxCombinations=True,
+        MaxCombinations=10000000)
+
+    presels = []
+    for i in inputs:
+        if name.find('B02D0KKD2Pi0HHResolved') >=0 or \
+           name.find('B02DDKSLL') >=0 or \
+           name.find('B2D0DKSLLD02K3Pi') >=0 or \
+           name.find('B2DstD0KSLLDstarD02K3PiD02K3Pi') >=0 or \
+           name.find('Bc2DstD0Dst2D0PID02KSHHD02KSHH') >=0 or \
+           name.find('Bc2DstDst0Dst2D0PID02KHHHDst02D0GammaD02KSHH') >=0 or \
+           name.find('Xib2LcDKLc2PKPiD2HHH') >=0 or \
+           name.find('Lb2LcDKst') >=0 or \
+           name.find('Lb2LcDstKst') >=0 :
+            _code = "(CONTAINS('%s')<500)" % i.outputLocation()
+        else:
+            _code = "(CONTAINS('%s')<2000)" % i.outputLocation()
+        presels += [
+            VoidEventSelection(
+                name + "CombCut" + i.name(), Code=_code, RequiredSelection=i)
+        ]
+
+    return Selection(name, Algorithm=b2x, RequiredSelections=presels)
+
+
+def makeB2XSels(decays, xtag, inputs, config, useIP=True, resVert=True):
+    '''Returns a list of the Hb->X selections.'''
+    sels = []
+    for tag, decay in decays.iteritems():
+        sname = tag + xtag + 'Beauty2Charm'
+        sel = makeB2X(sname, decay, inputs[tag], config, useIP, resVert)
+        sel = tisTosSelection(sel)
+        sel = filterSelection(sname + 'B2CBBDT',
+                              "FILTER('BBDecTreeTool/B2CBBDT')", [sel])
+        from Configurables import BBDecTreeTool as BBDT
+        bbdt = BBDT(sel.name() + '.B2CBBDT')
+        bbdt.Threshold = config['B2CBBDT_MIN']
+        bbdt.ParamFile = 'Beauty2Charm_BDTParams_v1r0.txt'
+        bbdt.ParticleDictTool = 'LoKi::Hybrid::DictOfFunctors/VarHandler'
+        from Configurables import LoKi__Hybrid__DictOfFunctors as VarHandler
+        varHandler = VarHandler(bbdt.name() + '.VarHandler')
+        heavyIDs = "( (5 == ((ABSID / 1000) % 10)) " \
+                   + "| (4 == ((ABSID / 1000) % 10))" \
+                   + "| (5 == ((ABSID / 100) % 10))" \
+                   + "| (4 == ((ABSID / 100) % 10)) )"
+        hvChi2DOFTot = "SUMTREE(VFASPF(VCHI2),%s,0.0) / SUMTREE(VFASPF(VDOF),%s,0.0)" % (
+            heavyIDs, heavyIDs)
+        varHandler.Variables = {
+            "FDCHI2": "BPVVDCHI2",
+            "PT": "PT",
+            "HVCHI2DOFTOT": hvChi2DOFTot
+        }
+        sels.append(sel)
+
+    return sels
+
+
+def makeBc2BX(name, decay, inputs, config):
+    from copy import deepcopy
+    config = deepcopy(config)
+    comboCuts = LoKiCuts(['SUMPT', 'AM'], config).code()
+    flightCuts = ['BPVLTIME', 'DZ1']
+    flightCuts += ['BPVIPCHI2', 'BPVDIRA']
+    momCuts = [
+        LoKiCuts(['VCHI2DOF'], config).code(),
+        "INTREE( HASTRACK & ISBASIC & (P>5000*MeV) & (PT > 500*MeV) & (MIPCHI2DV(PRIMARY) > 10) & (MIPDV(PRIMARY) > 0.06*mm))",
+        LoKiCuts(flightCuts, config).code()
+    ]
+    momCuts = LoKiCuts.combine(momCuts)
+    bc2bx = CombineParticles(
+        DecayDescriptors=decay, CombinationCut=comboCuts, MotherCut=momCuts)
+
+    return Selection(name, Algorithm=bc2bx, RequiredSelections=inputs)
+
+
+def makeBc2BXSels(decays, xtag, inputs, config):
+    sels = []
+    for tag, decay in decays.iteritems():
+        sname = tag + xtag + 'Beauty2Charm'
+        sel = makeBc2BX(sname, decay, inputs[tag], config)
+        sels.append(sel)
+    return sels
+
+
+def makeBc2DX(name, decay, inputs, config):
+    from copy import deepcopy
+    config = deepcopy(config)
+    comboCuts = LoKiCuts(['SUMPT', 'AM'], config).code()
+    flightCuts = ['BPVLTIME']
+    flightCuts += ['BPVIPCHI2', 'BPVDIRA']
+    momCuts = [
+        LoKiCuts(['VCHI2DOF'], config).code(),
+        "INTREE( HASTRACK & ISBASIC & (P>5000*MeV) & (PT > 500*MeV) & (MIPCHI2DV(PRIMARY) > 10) & (MIPDV(PRIMARY) > 0.06*mm))",
+        LoKiCuts(flightCuts, config).code()
+    ]
+    momCuts = LoKiCuts.combine(momCuts)
+    bc2dx = CombineParticles(
+        DecayDescriptors=decay, CombinationCut=comboCuts, MotherCut=momCuts)
+
+    return Selection(name, Algorithm=bc2dx, RequiredSelections=inputs)
+
+
+def makeBc2DXSels(decays, xtag, inputs, config):
+    sels = []
+    for tag, decay in decays.iteritems():
+        sname = tag + xtag + 'Beauty2Charm'
+        sel = makeBc2DX(sname, decay, inputs[tag], config)
+        sels.append(sel)
+    return sels
+
+
+def makeBc2DsX(name, decay, inputs, config):
+    from copy import deepcopy
+    config = deepcopy(config)
+    comboCuts = LoKiCuts(['SUMPT', 'AM'], config).code()
+    flightCuts = ['BPVLTIME']
+    flightCuts += ['BPVIPCHI2', 'BPVDIRA']
+    momCuts = [
+        LoKiCuts(['VCHI2DOF'], config).code(),
+        "INTREE( HASTRACK & ISBASIC & (P>5000*MeV) & (PT > 500*MeV) & (MIPCHI2DV(PRIMARY) > 10) & (MIPDV(PRIMARY) > 0.06*mm))",
+        LoKiCuts(flightCuts, config).code()
+    ]
+    momCuts = LoKiCuts.combine(momCuts)
+    bc2dsx = CombineParticles(
+        DecayDescriptors=decay, CombinationCut=comboCuts, MotherCut=momCuts)
+
+    return Selection(name, Algorithm=bc2dsx, RequiredSelections=inputs)
+
+
+def makeBc2DsXSels(decays, xtag, inputs, config):
+    sels = []
+    for tag, decay in decays.iteritems():
+        sname = tag + xtag + 'Beauty2Charm'
+        sel = makeBc2DsX(sname, decay, inputs[tag], config)
+        sels.append(sel)
+    return sels
+
+
+def makeBc2D0X(name, decay, inputs, config):
+    from copy import deepcopy
+    config = deepcopy(config)
+    comboCuts = LoKiCuts(['SUMPT', 'AM'], config).code()
+    flightCuts = ['BPVLTIME']
+    flightCuts += ['BPVIPCHI2', 'BPVDIRA']
+    momCuts = [
+        LoKiCuts(['VCHI2DOF'], config).code(),
+        "INTREE( HASTRACK & ISBASIC & (P>5000*MeV) & (PT > 500*MeV) & (MIPCHI2DV(PRIMARY) > 10) & (MIPDV(PRIMARY) > 0.06*mm))",
+        LoKiCuts(flightCuts, config).code()
+    ]
+    momCuts = LoKiCuts.combine(momCuts)
+    bc2d0x = CombineParticles(
+        DecayDescriptors=decay, CombinationCut=comboCuts, MotherCut=momCuts)
+
+    return Selection(name, Algorithm=bc2d0x, RequiredSelections=inputs)
+
+
+def makeBc2D0XSels(decays, xtag, inputs, config):
+    sels = []
+    for tag, decay in decays.iteritems():
+        sname = tag + xtag + 'Beauty2Charm'
+        sel = makeBc2D0X(sname, decay, inputs[tag], config)
+        sels.append(sel)
+    return sels
+
+
+def makeBc2DstX(name, decay, inputs, config):
+    from copy import deepcopy
+    config = deepcopy(config)
+    comboCuts = LoKiCuts(['SUMPT', 'AM'], config).code()
+    flightCuts = ['BPVLTIME']
+    flightCuts += ['BPVIPCHI2', 'BPVDIRA']
+    momCuts = [
+        LoKiCuts(['VCHI2DOF'], config).code(),
+        "INTREE( HASTRACK & ISBASIC & (P>5000*MeV) & (PT > 500*MeV) & (MIPCHI2DV(PRIMARY) > 10) & (MIPDV(PRIMARY) > 0.06*mm))",
+        LoKiCuts(flightCuts, config).code()
+    ]
+    momCuts = LoKiCuts.combine(momCuts)
+    bc2dstx = CombineParticles(
+        DecayDescriptors=decay, CombinationCut=comboCuts, MotherCut=momCuts)
+
+    return Selection(name, Algorithm=bc2dstx, RequiredSelections=inputs)
+
+
+def makeBc2DstXSels(decays, xtag, inputs, config):
+    sels = []
+    for tag, decay in decays.iteritems():
+        sname = tag + xtag + 'Beauty2Charm'
+        sel = makeBc2DstX(sname, decay, inputs[tag], config)
+        sels.append(sel)
+    return sels
+
+
+def makeB2DstarX(sel, uppions, config):
+    # change B to something that doesn't fly
+    sub = SubstitutePID(
+        'SubPID' + sel.name(), Code="DECTREE('Beauty -> Charm ...')")
+    sub.MaxChi2PerDoF = -666
+    sub.Substitutions = {'Beauty -> Charm ...': 'J/psi(1S)'}
+    subsel = Selection(
+        sel.name() + 'DstarUPSel', Algorithm=sub, RequiredSelections=[sel])
+    filter = "INTREE(ID=='J/psi(1S)')"
+    subsel = filterSelection(sel.name() + 'DstarUPFilter', filter, [subsel])
+    # Delta M cut on D* (preambulo is below)
+    #dmcut = '((ISD1 & ((MD1PI-MD1) < 180)) | (ISD2 & ((MD2PI-MD2) < 180)))'
+    #dmcut = '((MD1PI-MD1) < 180) | ((MD2PI-MD2) < 180)'
+    dmcut = "((((IDD1==421)|(IDD1==411)) & ((MD1PI-MD1) < 180)) | (((IDD2==421)|(IDD2==411)) & ((MD2PI-MD2) < 180)))"
+    # add UP track
+    combConfig = {'AMAXDOCA_MAX': '0.5*mm'}
+    comboCuts = [LoKiCuts(['AMAXDOCA'], combConfig).code(), dmcut]
+    comboCuts = LoKiCuts.combine(comboCuts)
+    momCuts = LoKiCuts(['VCHI2DOF', 'BPVVDCHI2', 'BPVDIRA'], config).code()
+    #did = "((ABSID=='D+')|(ABSID=='D0'))"
+    preambulo = [
+        'PXPI = ACHILD(PX,2)',
+        'PYPI = ACHILD(PY,2)',
+        'PZPI = ACHILD(PZ,2)',
+        'EPI  = ACHILD(E,2)',
+        'IDD1 = ACHILD(CHILD(ABSID,1),1)',
+        #'ISD1 = ACHILD(CHILD(%s,1),1)' % did,
+        'PXD1 = ACHILD(CHILD(PX,1),1)',
+        'PYD1 = ACHILD(CHILD(PY,1),1)',
+        'PZD1 = ACHILD(CHILD(PZ,1),1)',
+        'ED1  = ACHILD(CHILD(E,1),1)',
+        'MD1  = ACHILD(CHILD(M,1),1)',
+        'MD1PI = sqrt((EPI+ED1)**2 - (PXPI+PXD1)**2 - (PYPI+PYD1)**2 - (PZPI+PZD1)**2)',
+        #'ISD2 = ACHILD(CHILD(%s,2),1)' % did,
+        'IDD2 = ACHILD(CHILD(ABSID,2),1)',
+        'PXD2 = ACHILD(CHILD(PX,2),1)',
+        'PYD2 = ACHILD(CHILD(PY,2),1)',
+        'PZD2 = ACHILD(CHILD(PZ,2),1)',
+        'ED2  = ACHILD(CHILD(E,2),1)',
+        'MD2  = ACHILD(CHILD(M,2),1)',
+        'MD2PI = sqrt((EPI+ED2)**2 - (PXPI+PXD2)**2 - (PYPI+PYD2)**2 - (PZPI+PZD2)**2)',
+    ]
+    cp = CombineParticles(
+        CombinationCut=comboCuts,
+        MotherCut=momCuts,
+        Preambulo=preambulo,
+        DecayDescriptor='[B+ -> J/psi(1S) pi+]cc')
+    return Selection(
+        'DstarUP' + sel.name(),
+        Algorithm=cp,
+        RequiredSelections=[uppions] + [subsel])
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2DDphi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2DDphi.py
new file mode 100644
index 000000000..5cad2f473
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2DDphi.py
@@ -0,0 +1,297 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+B->DDphi, D= D0, D+, Ds+, D*0, D*+ 
+
+Author: M. Martinelli
+Notes: Excited states are included by placing the line in FULL.DST
+'''
+__author__ = ['Maurizio Martinelli']
+
+defaultName = 'B2DDphi'
+
+# Import Packages
+from StrippingConf.StrippingLine import StrippingLine
+from PhysSelPython.Wrappers import Selection , DataOnDemand
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from Configurables import FilterDesktop, CombineParticles, DaVinci__N4BodyDecays
+
+# Default configuration dictionary
+default_config = {
+    'NAME' : 'B2DDphi',
+    'BUILDERTYPE' : 'B2DDphiConf',
+    'CONFIG' : {
+      # Lines
+    'FULLDST': 'D0D0',
+    # Cuts made on all bachelor tracks
+    'TR_CHI2DOF_MAX' :3,
+    'TR_PT_MIN': 100, #MeV
+    'TR_P_MIN': 1000, #MeV
+    'TR_MIPCHI2DV_MIN': 4,
+    'TR_GHP_MAX': 0.4,
+    # Cuts made on all KK's
+    'KK_MASS_MAX': 2300, #MeV
+    'KK_MASS_MAX_D0D0': 2300, #MeV
+    'KK_MASS_MAX_DD': 2300, #MeV
+    'KK_MASS_MAX_DsDs': 2200, #MeV
+    'KK_MASS_MAX_DstDst': 2050, #MeV
+    'KK_MASS_MAX_DstDp': 2150, #MeV
+    'KK_VCHI2NDOF': 9, 
+    # Cuts made on all D0's
+    'D0_MASS_WIN': 65, #MeV
+    'D0_PT': 1500., #MeV
+    'D0_IPCHI2': 4,
+    'D0_VCHI2NDOF': 10, 
+    # Cuts made on all D+'s
+    'Dp_MASS_WIN': 65, #MeV
+    'Dp_PT': 1500., #MeV
+    'Dp_IPCHI2': 4,
+    'Dp_VCHI2NDOF': 10,
+    # Cuts made on all Ds+'s
+    'Ds_MASS_WIN': 65, #MeV
+    'Ds_PT': 1500., #MeV
+    'Ds_IPCHI2': 4,
+    'Ds_VCHI2NDOF': 10,
+    # Cuts made on all D*+'s
+    'Dst_MASS_WIN': 50, #MeV
+    'Dst_PT': 1500., #MeV
+    'Dst_IPCHI2': 4,
+    'Dst_VCHI2NDOF': 15,
+    # Cuts made on all B's
+    'B_MASS_MAX': 6000, #MeV
+    'B_MASS_MIN': 4500, #MeV
+    'B_MASS_MIN_MDST': 4800, #MeV
+#    'B_DOCA': 0.3, #mm
+    'B_DOCACHI2': 16, # 4-body decay
+    'B_DIRA': 0.999, 
+    'B_VCHI2NDOF': 15,
+    'B_BPVLTIME': 0.2, #ps
+    # Cuts made on PID for specific particles
+    'K_ProbNNk_MIN': 0.1,
+    'PI_ProbNNpi_MIN': 0.1
+    }, 
+    'STREAMS' : {
+     'Bhadron': [
+     'StrippingB2DDphi_B2DstDpPhiLine',
+     'StrippingB2DDphi_B2DDPhiLine',
+     'StrippingB2DDphi_B2DsDsPhiLine',
+     'StrippingB2DDphi_B2DstDstPhiLine', 
+    ],
+    'BhadronCompleteEvent':[
+     'StrippingB2DDphi_B2D0D0PhiLine',  
+     ]
+    },
+    'WGs' : [ 'B2OC' ]    
+}
+
+
+# Configure the LinBuilder
+class B2DDphiConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, moduleName, config):
+        LineBuilder.__init__(self, moduleName, config)
+
+        # Lines
+        FullDstLines = config['FULLDST'].split(',')
+
+        # Select D candidates from composite common particles
+        self.selD = {}
+        DSelections = {'D0': {'name':'D02KPi',
+                              'pdgname': 'D0',
+                              'location': 'StdLooseD02KPi'},
+                        'Dp': {'name':'D2KPiPi',
+                              'pdgname': 'D+',
+                              'location': 'StdLooseDplus2KPiPi'},
+                        'Ds': {'name': 'Ds2KKPi',
+                              'pdgname': 'D_s+',
+                              'location': 'StdLooseDsplus2KKPi'},
+                        'Dst': {'name': 'Dst2D0Pi_D02KPi',
+                              'pdgname': 'D*(2010)+',
+                              'location': 'StdLooseDstarWithD02KPi'} }
+        for name, args in DSelections.iteritems():
+            self.selD.update({name: self.makeDCandidate(args['name']+'For'+moduleName,
+                                                        args['pdgname'],
+                                                        args['location'],
+                                                        config['TR_PT_MIN'],
+                                                        config['TR_P_MIN'],
+                                                        config['TR_MIPCHI2DV_MIN'],
+                                                        config['TR_GHP_MAX'],
+                                                        config['K_ProbNNk_MIN'],
+                                                        config['PI_ProbNNpi_MIN'],
+                                                        config[name+'_MASS_WIN'],
+                                                        config[name+'_PT'],
+                                                        config[name+'_IPCHI2'],
+                                                        config[name+'_VCHI2NDOF'])})
+            
+        # Select kaons from StdLoose list
+        self.selK  = self.makeKaons(   'KFor' + moduleName, 
+                                       config['TR_PT_MIN'],
+                                       config['TR_P_MIN'],
+                                       config['TR_MIPCHI2DV_MIN'],
+                                       config['TR_GHP_MAX'],
+                                       config['K_ProbNNk_MIN'] )
+
+        # Create B candidates
+        self.selB = {}
+        BCandidateHelper = {'D0D0': {'decayDescriptor': "B_s0 -> K+ K- D0 D~0",
+                                     'selections': ['D0']},
+                            'DstDp': {'decayDescriptor': "[B_s0 -> K+ K- D*(2010)+ D-]cc",
+                                     'selections': ['Dst', 'Dp']},
+                            'DD': {'decayDescriptor': "B_s0 -> K+ K- D+ D-",
+                                     'selections': ['Dp']},
+                            'DsDs': {'decayDescriptor': "B_s0 -> K+ K- D_s+ D_s-",
+                                     'selections': ['Ds']},
+                            'DstDst': {'decayDescriptor': "B_s0 -> K+ K- D*(2010)+ D*(2010)-",
+                                     'selections': ['Dst']} }
+        for name, args in BCandidateHelper.iteritems():
+            self.selB.update({name: self.makeBs2DDPhi('B2'+name+'Phi'+ moduleName,
+                                                    args['decayDescriptor'],
+                                                    Selections = [ self.selK]+[ self.selD[i] for i in args['selections']],
+                                                    KKMassMax = config['KK_MASS_MAX_'+name],
+                                                    BMassMax = config['B_MASS_MAX'],
+                                                    BMassMin = config['B_MASS_MIN' if name in FullDstLines else 'B_MASS_MIN_MDST'],
+                                                    BVCHI2 = config['B_VCHI2NDOF'],
+                                                    BDOCACHI2 = config['B_DOCACHI2'],
+                                                    BDIRA = config['B_DIRA'],
+                                                    BPVLTIME = config['B_BPVLTIME']) })
+            
+        # Create the stripping lines
+        for name, selections in self.selB.iteritems():
+            line = StrippingLine(moduleName+"_B2"+name+"PhiLine",
+                                             prescale = 1,
+                                             postscale = 1,
+                                             algos = [ selections ]
+                                             )
+            self.registerLine(line)
+
+    def makeKaons( self, name,
+                   KaonPT,
+                   KaonP,
+                   KaonIPCHI2,
+                   KaonGPMax,
+                   KaonProbNNk ):
+
+        """
+        Create and return a refined list of Kaons
+        Starts from DataOnDemand 'Phys/StdLooseKaons'.
+        Arguments:
+        name             : name of the Selection.
+        KaonPT           : Minimum transverse momentum of K (MeV).
+        KaonIPCHI2       : Minimum impact parameter chi2 of K.
+        KaonProbNNk      : Minimum ProbNNk of K.
+        """
+        
+        _params = locals()
+        _code = " ( PROBNNk > %(KaonProbNNk)s)"    \
+            "& ( PT > %(KaonPT)s *MeV)"  \
+            "& ( P > %(KaonP)s *MeV)" \
+            "& ( TRGHP < %(KaonGPMax)s)"\
+            "& ( MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)" % _params
+        StdLooseKaons = DataOnDemand(Location = "Phys/StdAllLooseANNKaons/Particles")
+
+        _kFilter = FilterDesktop("KFilterForBs2DDPhi",
+                                 Code = _code)
+
+        return Selection (name,
+                          Algorithm = _kFilter,
+                          RequiredSelections = [StdLooseKaons])
+
+    
+    def makeDCandidate( self, name,
+                        PDGName,
+                        ContainerName,
+                        TrackPT,
+                        TrackP,
+                        TrackIPCHI2,
+                        TrackGHP,
+                        KaonProbNNk,
+                        PionProbNNpi,
+                        DMassWin,
+                        DPT,
+                        DIPCHI2,
+                        DVCHI2):
+        
+        """
+        Create and return a D candidate Selection object.
+        Starts from DataOnDemand 'Phys/StdLooseD02KPi'.
+        Arguments:
+        name             : name of the Selection.
+        TrackPT          : Minimum transverse momentum of K,pi (MeV).
+        TrackIPCHI2      : Minimum impact parameter chi2 of K,pi.
+        TrackGHP         : Maximum ghost probability of K,pi.
+        KaonProbNNk      : Minimum ProbNNK of K.
+        PionProbNNpi     : Minimum ProbNNpi of pi.
+        DPT              : Minimum transverse momentum of D (MeV).
+        DIPCHI2          : Minimum IP chi2 of D.
+        DMassWin         : D invariant mass window around PDG mass value (MeV).
+        DVCHI2           : Maximum D vertex chi2 (per degree of freedom?)
+        """
+        
+        _params = locals()
+        _code = " (INTREE(('K+'==ABSID) & (PROBNNk > %(KaonProbNNk)s) & (PT>%(TrackPT)s *MeV) & (MIPCHI2DV(PRIMARY)> %(TrackIPCHI2)s) & (TRGHP < %(TrackGHP)s)))" \
+            "& (INTREE(('pi+'==ABSID) & (PROBNNpi > %(PionProbNNpi)s) & (PT>%(TrackPT)s *MeV) & (MIPCHI2DV(PRIMARY)> %(TrackIPCHI2)s) & (TRGHP < %(TrackGHP)s)))" \
+            "& (ADMASS('%(PDGName)s') < %(DMassWin)s *MeV)" \
+            "& (PT > %(DPT)s *MeV)" \
+            "& (MIPCHI2DV(PRIMARY) > %(DIPCHI2)s)" \
+            "& (VFASPF(VCHI2/VDOF) < %(DVCHI2)s)" % _params
+        DCandidatesList = DataOnDemand(Location = "Phys/"+ContainerName+"/Particles")
+        _dFilter = FilterDesktop(name+"FilterForBs2DDPhi",
+                                  Code = _code)
+
+        return Selection (name,
+                          Algorithm = _dFilter,
+                          RequiredSelections = [DCandidatesList])
+    
+    def makeBs2DDPhi(self, name,
+                     DecayDesc,
+                     Selections,
+                     KKMassMax,
+                     BMassMax,
+                     BMassMin,
+                     BVCHI2,
+                     BDOCACHI2,
+                     BDIRA,
+                     BPVLTIME):
+        """
+        Create and return a Bs -> D+ (KPiPi) D- (KPiPi) Phi (KK) Selection object.
+        Arguments:
+        name        : name of the Selection.
+        Ksel        : Kaons Selection object.
+        D0sel       : D+ -> K-pi+pi+ Selection object.
+        KKMassMax   : KK invariant mass maximum (MeV).
+        BMassMax    : Bs invariant mass maximum (MeV).
+        BMassMin    : Bs invariant mass minimum (MeV).
+        BVCHI2      : Maximum Bs vertex chi2 per degree of freedom.
+        BDOCACHI2   : Maximum DOCACHI2 for tracks used in B vertex.
+        BPVLTIME    : Minimum Bs lifetime
+        """ 
+        
+        _motherCuts = "(VFASPF(VCHI2/VDOF) < %(BVCHI2)s) & (BPVDIRA > %(BDIRA)s) & (BPVLTIME() > %(BPVLTIME)s*ps)"% locals()
+        _combinationCut = "(AM > %(BMassMin)s *MeV) & (AM < %(BMassMax)s *MeV)" \
+            " & (ACHI2DOCA(1,4)< %(BDOCACHI2)s) & (ACHI2DOCA(2,4)< %(BDOCACHI2)s) & (ACHI2DOCA(3,4)< %(BDOCACHI2)s)" % locals() 
+        _combination12Cut = "(AM < %(KKMassMax)s *MeV) & (ACHI2DOCA(1,2) < %(BDOCACHI2)s )"  % locals()
+        _combination123Cut = "(ACHI2DOCA(1,3) < %(BDOCACHI2)s ) & (ACHI2DOCA(2,3) < %(BDOCACHI2)s )"  % locals()
+        
+        _Bs = DaVinci__N4BodyDecays("_"+name)
+        _Bs.DecayDescriptor = DecayDesc
+        _Bs.DaughtersCuts = { }
+        _Bs.Combination12Cut = _combination12Cut
+        _Bs.Combination123Cut = _combination123Cut
+        _Bs.CombinationCut = _combinationCut
+        _Bs.MotherCut = _motherCuts
+        
+        return Selection ( name,
+                           Algorithm = _Bs,
+                           RequiredSelections = Selections)
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2DXD2HMuNu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2DXD2HMuNu.py
new file mode 100644
index 000000000..d09663fa8
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2DXD2HMuNu.py
@@ -0,0 +1,338 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Wenbin Qian']
+__date__ = '09/11/2015'
+__version__ = '$Revision: 0.01 $'
+
+from Gaudi.Configuration import *
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, DaVinci__N4BodyDecays, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StandardParticles import StdLooseMuons, StdLoosePions, StdLooseKaons
+from GaudiKernel.SystemOfUnits import MeV, GeV, cm, mm
+
+__all__ = ('B2DXD2HMuNuBuilder',
+           'default_config')
+
+default_config = {
+   'NAME'        : 'B2DXD2HMuNu',
+   'WGs'         : ['B2OC'],
+   'BUILDERTYPE' : 'B2DXD2HMuNuBuilder',
+   'CONFIG'      :{
+          "PT_MIN"          :  200,  #MeV
+          "P_MIN"           :  3000, #MeV
+          "MIPCHI2DV_MIN"   :  4.,
+          "TRGHP_MAX"       :  0.4,
+          "MuonPIDK"            : 0.    ,#adimensional
+          "MuonPIDmu"           : 3.    ,#adimensional
+          "MuonPIDp"            : 0.    ,#adimensional
+          "KaonPIDK"            : 5.     ,#adimensional
+          "KaonPIDmu"           : 5.     ,#adimensional
+          "KaonPIDp"            : 5.     ,#adimensional
+          "PionPIDK"            : 0.     ,#adimensional
+          "PionPIDmu"           : 0.     ,#adimensional
+          "PionPIDp"            : 0.     ,#adimensional
+          "DMass_MAX"           : 1800, #MeV
+          "Cos_MAX"             : 0.99999,
+          "SUMPT_MIN"           : 1500, #MeV
+          "ADOCA_MAX"           : 0.2, #mm
+          "Plane_MAX"           : 0.02, #mm
+          "VCHI2DOF_MAX"        : 10,
+          "BPVVDCHI2_MIN"       : 36,
+          "HH_MAX"              : 3800, #MeV
+          "BMass_MAX"           : 5200, #MeV
+          "GEC_nLongTrk"        : 160.   #adimensional
+   },
+   'STREAMS'     : {
+      'Bhadron': [
+         'StrippingB2D0PiD02PiMuNuLine',
+         'StrippingB2D0PiD02KMuNuLine',
+         'StrippingB2D0PiD02KPiPiMuNuLine',
+         'StrippingB2D0KD02PiMuNuLine',
+         'StrippingB2D0KD02KMuNuLine',
+         'StrippingB2D0KD02KPiPiMuNuLine',
+         'StrippingB2D0KPiPiD02PiMuNuLine',
+         'StrippingB2D0KPiPiD02KMuNuLine',
+         'StrippingB2D0KPiPiD02KPiPiMuNuLine',
+         'StrippingB02D0KPiD02PiMuNuLine',
+         'StrippingB02D0KPiD02KMuNuLine',
+         'StrippingB02D0KKD02PiMuNuLine',
+         'StrippingB02D0KKD02KMuNuLine',
+         'StrippingB02D0PiPiD02PiMuNuLine',
+         'StrippingB02D0PiPiD02KMuNuLine',
+         'StrippingB02D0KPiD02KPiPiMuNuLine',
+         'StrippingB2D0PiD02PiMuNuSUPLine',
+         'StrippingB2D0PiD02KMuNuSUPLine',
+         'StrippingB2D0PiD02KPiPiMuNuSUPLine',
+         'StrippingB2D0KD02PiMuNuSUPLine',
+         'StrippingB2D0KD02KMuNuSUPLine',
+         'StrippingB2D0KD02KPiPiMuNuSUPLine',
+         'StrippingB2D0KPiPiD02PiMuNuSUPLine',
+         'StrippingB2D0KPiPiD02KMuNuSUPLine',
+         'StrippingB2D0KPiPiD02KPiPiMuNuSUPLine',
+         'StrippingB02D0KPiD02PiMuNuSUPLine',
+         'StrippingB02D0KPiD02KMuNuSUPLine',
+         'StrippingB02D0KPiD02KPiPiMuNuSUPLine',
+         'StrippingB2D0PiD02PiMuNuWSLine',
+         'StrippingB2D0PiD02KMuNuWSLine',
+         'StrippingB2D0PiD02KPiPiMuNuWSLine',
+         'StrippingB2D0KD02PiMuNuWSLine',
+         'StrippingB2D0KD02KMuNuWSLine',
+         'StrippingB2D0KD02KPiPiMuNuWSLine',
+         'StrippingB2D0KPiPiD02PiMuNuWSLine',
+         'StrippingB2D0KPiPiD02KMuNuWSLine',
+         'StrippingB2D0KPiPiD02KPiPiMuNuWSLine',
+         'StrippingB02D0KPiD02PiMuNuWSLine',
+         'StrippingB02D0KPiD02KMuNuWSLine',
+         'StrippingB02D0KKD02PiMuNuWSLine',
+         'StrippingB02D0KKD02KMuNuWSLine',
+         'StrippingB02D0PiPiD02PiMuNuWSLine',
+         'StrippingB02D0PiPiD02KMuNuWSLine',
+         'StrippingB02D0KPiD02KPiPiMuNuWSLine',
+         'StrippingB2D0PiD02PiMuNuWSSUPLine',
+         'StrippingB2D0PiD02KMuNuWSSUPLine',
+         'StrippingB2D0PiD02KPiPiMuNuWSSUPLine',
+         'StrippingB2D0KD02PiMuNuWSSUPLine',
+         'StrippingB2D0KD02KMuNuWSSUPLine',
+         'StrippingB2D0KD02KPiPiMuNuWSSUPLine',
+         'StrippingB2D0KPiPiD02PiMuNuWSSUPLine',
+         'StrippingB2D0KPiPiD02KMuNuWSSUPLine',
+         'StrippingB2D0KPiPiD02KPiPiMuNuWSSUPLine',
+         'StrippingB02D0KPiD02PiMuNuWSSUPLine',
+         'StrippingB02D0KPiD02KMuNuWSSUPLine',
+         'StrippingB02D0KPiD02KPiPiMuNuWSSUPLine'
+      ]
+   }
+}
+
+            
+class B2DXD2HMuNuBuilder(LineBuilder):
+            
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self,name,config): 
+        LineBuilder.__init__(self, name, config)
+        self._config=config
+               
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        self._muon = self._muonFilter() 
+        self._pion = self._pionFilter()
+        self._kaon = self._kaonFilter()
+
+        self._d2pimunu = self._D2HMuNuBuilder("D02PiMuNu",["[D0 -> pi- mu+]cc"],[self._muon,self._pion])
+        self._d2kmunu = self._D2HMuNuBuilder("D02KMuNu",["[D0 -> K- mu+]cc"],[self._muon,self._kaon])
+        self._d2kpipimunu = self._D2KPiPiMuNuBuilder("D02KPiPiMuNu",["[D0 -> K- pi+ pi- mu+]cc"],[self._kaon,self._pion,self._muon])
+        self._d2pimunuws = self._D2HMuNuBuilder("D02PiMuNuWS",["[D0 -> pi- mu-]cc"],[self._muon,self._pion])
+        self._d2kmunuws = self._D2HMuNuBuilder("D02KMuNuWS",["[D0 -> K- mu-]cc"],[self._muon,self._kaon])
+        self._d2kpipimunuws = self._D2KPiPiMuNuBuilder("D02KPiPiMuNuWS",["[D0 -> K- pi+ pi- mu-]cc"],[self._kaon,self._pion,self._muon])
+        self._hh = self._HHBuilder()
+        self._hhh = self._HHHBuilder()
+               
+        self.registerLine(self._makeBLine("B2D0PiD02PiMuNu",["[B- -> D0 pi-]cc"],[self._d2pimunu,self._pion],1.0))
+        self.registerLine(self._makeBLine("B2D0PiD02KMuNu",["[B- -> D0 pi-]cc"],[self._d2kmunu,self._pion],1.0))
+        self.registerLine(self._makeBLine("B2D0PiD02KPiPiMuNu",["[B- -> D0 pi-]cc"],[self._d2kpipimunu,self._pion],1.0))
+        self.registerLine(self._makeBLine("B2D0KD02PiMuNu",["[B- -> D0 K-]cc"],[self._d2pimunu,self._kaon],1.0))
+        self.registerLine(self._makeBLine("B2D0KD02KMuNu",["[B- -> D0 K-]cc"],[self._d2kmunu,self._kaon],1.0))
+        self.registerLine(self._makeBLine("B2D0KD02KPiPiMuNu",["[B- -> D0 K-]cc"],[self._d2kpipimunu,self._kaon],1.0))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02PiMuNu",["[B- -> D0 K_1(1270)-]cc"],[self._d2pimunu,self._hhh],1.0))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02KMuNu",["[B- -> D0 K_1(1270)-]cc"],[self._d2kmunu,self._hhh],1.0))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02KPiPiMuNu",["[B- -> D0 K_1(1270)-]cc"],[self._d2kpipimunu,self._hhh],1.0))
+        self.registerLine(self._makeBLine("B02D0KPiD02PiMuNu",["[B0 -> D~0 K*(892)0]cc"],[self._d2pimunu,self._hh],1.0))
+        self.registerLine(self._makeBLine("B02D0KPiD02KMuNu",["[B0 -> D~0 K*(892)0]cc"],[self._d2kmunu,self._hh],1.0))
+        self.registerLine(self._makeBLine("B02D0KPiD02KPiPiMuNu",["[B0 -> D~0 K*(892)0]cc"],[self._d2kpipimunu,self._hh],1.0))
+        self.registerLine(self._makeBLine("B02D0KKD02PiMuNu",["B0 -> D0 K+ K-"],[self._d2pimunu,self._kaon],1.0))
+        self.registerLine(self._makeBLine("B02D0KKD02KMuNu",["B0 -> D0 K+ K-"],[self._d2kmunu,self._kaon],1.0))
+        self.registerLine(self._makeBLine("B02D0PiPiD02PiMuNu",["B0 -> D0 pi+ pi-"],[self._d2pimunu,self._pion],1.0))
+        self.registerLine(self._makeBLine("B02D0PiPiD02KMuNu",["B0 -> D0 pi+ pi-"],[self._d2kmunu,self._pion],1.0))
+
+        self.registerLine(self._makeBLine("B2D0PiD02PiMuNuSUP",["[B+ -> D0 pi+]cc"],[self._d2pimunu,self._pion],1.0))
+        self.registerLine(self._makeBLine("B2D0PiD02KMuNuSUP",["[B+ -> D0 pi+]cc"],[self._d2kmunu,self._pion],1.0))
+        self.registerLine(self._makeBLine("B2D0PiD02KPiPiMuNuSUP",["[B+ -> D0 pi+]cc"],[self._d2kpipimunu,self._pion],1.0))
+        self.registerLine(self._makeBLine("B2D0KD02PiMuNuSUP",["[B+ -> D0 K+]cc"],[self._d2pimunu,self._kaon],1.0))
+        self.registerLine(self._makeBLine("B2D0KD02KMuNuSUP",["[B+ -> D0 K+]cc"],[self._d2kmunu,self._kaon],1.0))
+        self.registerLine(self._makeBLine("B2D0KD02KPiPiMuNuSUP",["[B+ -> D0 K+]cc"],[self._d2kpipimunu,self._kaon],1.0))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02PiMuNuSUP",["[B+ -> D0 K_1(1270)+]cc"],[self._d2pimunu,self._hhh],1.0))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02KMuNuSUP",["[B+ -> D0 K_1(1270)+]cc"],[self._d2kmunu,self._hhh],1.0))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02KPiPiMuNuSUP",["[B+ -> D0 K_1(1270)+]cc"],[self._d2kpipimunu,self._hhh],1.0))
+        self.registerLine(self._makeBLine("B02D0KPiD02PiMuNuSUP",["[B0 -> D0 K*(892)0]cc"],[self._d2pimunu,self._hh],1.0))
+        self.registerLine(self._makeBLine("B02D0KPiD02KMuNuSUP",["[B0 -> D0 K*(892)0]cc"],[self._d2kmunu,self._hh],1.0))
+        self.registerLine(self._makeBLine("B02D0KPiD02KPiPiMuNuSUP",["[B0 -> D0 K*(892)0]cc"],[self._d2kpipimunu,self._hh],1.0))
+
+        self.registerLine(self._makeBLine("B2D0PiD02PiMuNuWS",["[B- -> D0 pi-]cc"],[self._d2pimunuws,self._pion],0.1))
+        self.registerLine(self._makeBLine("B2D0PiD02KMuNuWS",["[B- -> D0 pi-]cc"],[self._d2kmunuws,self._pion],0.1))
+        self.registerLine(self._makeBLine("B2D0PiD02KPiPiMuNuWS",["[B- -> D0 pi-]cc"],[self._d2kpipimunuws,self._pion],0.1))
+        self.registerLine(self._makeBLine("B2D0KD02PiMuNuWS",["[B- -> D0 K-]cc"],[self._d2pimunuws,self._kaon],0.1))
+        self.registerLine(self._makeBLine("B2D0KD02KMuNuWS",["[B- -> D0 K-]cc"],[self._d2kmunuws,self._kaon],0.1))
+        self.registerLine(self._makeBLine("B2D0KD02KPiPiMuNuWS",["[B- -> D0 K-]cc"],[self._d2kpipimunuws,self._kaon],0.1))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02PiMuNuWS",["[B- -> D0 K_1(1270)-]cc"],[self._d2pimunuws,self._hhh],0.1))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02KMuNuWS",["[B- -> D0 K_1(1270)-]cc"],[self._d2kmunuws,self._hhh],0.1))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02KPiPiMuNuWS",["[B- -> D0 K_1(1270)-]cc"],[self._d2kpipimunuws,self._hhh],0.1))
+        self.registerLine(self._makeBLine("B02D0KPiD02PiMuNuWS",["[B0 -> D~0 K*(892)0]cc"],[self._d2pimunuws,self._hh],0.1))
+        self.registerLine(self._makeBLine("B02D0KPiD02KMuNuWS",["[B0 -> D~0 K*(892)0]cc"],[self._d2kmunuws,self._hh],0.1))
+        self.registerLine(self._makeBLine("B02D0KPiD02KPiPiMuNuWS",["[B0 -> D~0 K*(892)0]cc"],[self._d2kpipimunuws,self._hh],0.1))
+        self.registerLine(self._makeBLine("B02D0KKD02PiMuNuWS",["B0 -> D0 K+ K-"],[self._d2pimunuws,self._kaon],0.1))
+        self.registerLine(self._makeBLine("B02D0KKD02KMuNuWS",["B0 -> D0 K+ K-"],[self._d2kmunuws,self._kaon],0.1))
+        self.registerLine(self._makeBLine("B02D0PiPiD02PiMuNuWS",["B0 -> D0 pi+ pi-"],[self._d2pimunuws,self._pion],0.1))
+        self.registerLine(self._makeBLine("B02D0PiPiD02KMuNuWS",["B0 -> D0 pi+ pi-"],[self._d2kmunuws,self._pion],0.1))
+
+        self.registerLine(self._makeBLine("B2D0PiD02PiMuNuWSSUP",["[B+ -> D0 pi+]cc"],[self._d2pimunuws,self._pion],0.1))
+        self.registerLine(self._makeBLine("B2D0PiD02KMuNuWSSUP",["[B+ -> D0 pi+]cc"],[self._d2kmunuws,self._pion],0.1))
+        self.registerLine(self._makeBLine("B2D0PiD02KPiPiMuNuWSSUP",["[B+ -> D0 pi+]cc"],[self._d2kpipimunuws,self._pion],0.1))
+        self.registerLine(self._makeBLine("B2D0KD02PiMuNuWSSUP",["[B+ -> D0 K+]cc"],[self._d2pimunuws,self._kaon],0.1))
+        self.registerLine(self._makeBLine("B2D0KD02KMuNuWSSUP",["[B+ -> D0 K+]cc"],[self._d2kmunuws,self._kaon],0.1))
+        self.registerLine(self._makeBLine("B2D0KD02KPiPiMuNuWSSUP",["[B+ -> D0 K+]cc"],[self._d2kpipimunuws,self._kaon],0.1))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02PiMuNuWSSUP",["[B+ -> D0 K_1(1270)+]cc"],[self._d2pimunuws,self._hhh],0.1))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02KMuNuWSSUP",["[B+ -> D0 K_1(1270)+]cc"],[self._d2kmunuws,self._hhh],0.1))
+        self.registerLine(self._makeBLine("B2D0KPiPiD02KPiPiMuNuWSSUP",["[B+ -> D0 K_1(1270)+]cc"],[self._d2kpipimunuws,self._hhh],0.1))
+        self.registerLine(self._makeBLine("B02D0KPiD02PiMuNuWSSUP",["[B0 -> D0 K*(892)0]cc"],[self._d2pimunuws,self._hh],0.1))
+        self.registerLine(self._makeBLine("B02D0KPiD02KMuNuWSSUP",["[B0 -> D0 K*(892)0]cc"],[self._d2kmunuws,self._hh],0.1))
+        self.registerLine(self._makeBLine("B02D0KPiD02KPiPiMuNuWSSUP",["[B0 -> D0 K*(892)0]cc"],[self._d2kpipimunuws,self._hh],0.1))
+
+
+    def _NominalMuSelection( self ):
+        return " (PT> %(PT_MIN)s* MeV)"\
+               "& (P> %(P_MIN)s* MeV)"\
+               "& (TRGHOSTPROB < %(TRGHP_MAX)s)"\
+               "& (PIDmu-PIDpi> %(MuonPIDmu)s )"\
+               "& (PIDmu-PIDp> %(MuonPIDp)s )"\
+               "& (PIDmu-PIDK> %(MuonPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(MIPCHI2DV_MIN)s )"
+        
+    def _NominalKSelection( self ):
+        return " (PT> %(PT_MIN)s *MeV)"\
+               "& (P> %(P_MIN)s* MeV)"\
+               "& (TRGHOSTPROB < %(TRGHP_MAX)s)"\
+               "& (PIDK-PIDpi> %(KaonPIDK)s )  "\
+               "& (PIDK-PIDp> %(KaonPIDp)s )   "\
+               "& (PIDK-PIDmu> %(KaonPIDmu)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(MIPCHI2DV_MIN)s )"
+        
+    def _NominalPiSelection( self ):
+        return " (PT> %(PT_MIN)s *MeV)"\
+               "& (P> %(P_MIN)s* MeV)"\
+               "& (TRGHOSTPROB < %(TRGHP_MAX)s)"\
+               "& (PIDK-PIDpi< %(PionPIDK)s ) "\
+               "& (PIDp < %(PionPIDp)s )      "\
+               "& (PIDmu < %(PionPIDmu)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(MIPCHI2DV_MIN)s )"
+
+    def _muonFilter( self ):
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        return Selection("Mu_for"+self._name,Algorithm=_mu,RequiredSelections = [StdLooseMuons])        
+
+    def _pionFilter( self ):
+        _pi = FilterDesktop( Code = self._NominalPiSelection() % self._config )
+        return Selection("Pi_for"+self._name,Algorithm=_pi,RequiredSelections = [StdLoosePions])
+       
+    def _kaonFilter( self ):
+        _ka = FilterDesktop( Code = self._NominalKSelection() % self._config )
+        return Selection("K_for"+self._name,Algorithm=_ka,RequiredSelections = [StdLooseKaons])
+
+    def _D2HMuNuBuilder( self,_name,_decay,inputs ):
+        _d = CombineParticles(
+            DecayDescriptors = _decay,
+            CombinationCut = "(ASUM(PT)>%(SUMPT_MIN)s*MeV) "\
+            "& (ADOCA(1,2)<%(ADOCA_MAX)s*mm) "\
+            "& (AM<%(DMass_MAX)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(VCHI2DOF_MAX)s )"\
+            "& (cos<%(Cos_MAX)s)" \
+#            "& (MIPCHI2DV(PRIMARY)> %(MIPCHI2DV_MIN)s )"\
+            "& (BPVVDCHI2 >%(BPVVDCHI2_MIN)s)"% self._config,
+            )
+        _d.Preambulo = ["from LoKiPhys.decorators import *",
+                         "px1 = CHILD(PX,1)",
+                         "py1 = CHILD(PY,1)",
+                         "pz1 = CHILD(PZ,1)",
+                         "px2 = CHILD(PX,2)",
+                         "py2 = CHILD(PY,2)",
+                         "pz2 = CHILD(PZ,2)",
+                         "cos = (px1*px2+py1*py2+pz1*pz2)/(sqrt(px1*px1+py1*py1+pz1*pz1)*sqrt(px2*px2+py2*py2+pz2*pz2))",
+                        ]
+        return Selection(_name+"_for"+self._name,Algorithm=_d,RequiredSelections=inputs)
+    
+    def _D2KPiPiMuNuBuilder( self,_name,_decay,inputs ):
+        _d = DaVinci__N4BodyDecays(
+            DecayDescriptors =  _decay,
+            Combination12Cut =  "  (ADOCA(1,2)<%(ADOCA_MAX)s*mm) "%self._config,
+            Combination123Cut = "  (ADOCA(1,3)<%(ADOCA_MAX)s*mm) " \
+            "& (ADOCA(2,3)<%(ADOCA_MAX)s*mm) "%self._config,
+            CombinationCut = "  (ADOCA(1,4)<%(ADOCA_MAX)s*mm) " \
+            "& (ADOCA(2,4)<%(ADOCA_MAX)s*mm) " \
+            "& (ADOCA(3,4)<%(ADOCA_MAX)s*mm) " \
+            "& (ASUM(PT)>%(SUMPT_MIN)s*MeV) "\
+            "& (AM<%(DMass_MAX)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(VCHI2DOF_MAX)s )"\
+ #           "& (MIPCHI2DV(PRIMARY)> %(MIPCHI2DV_MIN)s )"\
+            "& (BPVVDCHI2 >%(BPVVDCHI2_MIN)s)"% self._config,
+            )
+        return Selection(_name+"_for"+self._name,Algorithm=_d,RequiredSelections=inputs)
+
+    def _HHBuilder(self):
+        _hh = CombineParticles(
+            DecayDescriptors =  ["[K*(892)0 -> K+ pi-]cc"],
+            CombinationCut = "(ASUM(PT)>%(SUMPT_MIN)s*MeV) "\
+            "& (ADOCA(1,2)<%(ADOCA_MAX)s*mm) "\
+            "& (AM<%(HH_MAX)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(VCHI2DOF_MAX)s )"\
+  #          "& (MIPCHI2DV(PRIMARY)> %(MIPCHI2DV_MIN)s )"\
+            "& (BPVVDCHI2 >%(BPVVDCHI2_MIN)s)"% self._config,
+            )
+        return Selection("HH_for"+self._name,Algorithm=_hh,RequiredSelections=[self._kaon,self._pion])
+
+    def _HHHBuilder(self):
+        _hhh = DaVinci__N3BodyDecays(
+            DecayDescriptors =  ["[K_1(1270)+ -> K+ pi- pi+]cc"],
+            Combination12Cut =  "  (ADOCA(1,2)<%(ADOCA_MAX)s*mm) "%self._config,
+            CombinationCut = "  (ADOCA(1,3)<%(ADOCA_MAX)s*mm) " \
+            "& (ADOCA(2,3)<%(ADOCA_MAX)s*mm) "\
+            "& (ASUM(PT)>%(SUMPT_MIN)s*MeV) "\
+            "& (AM<%(HH_MAX)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(VCHI2DOF_MAX)s )"\
+   #         "& (MIPCHI2DV(PRIMARY)> %(MIPCHI2DV_MIN)s )"\
+            "& (BPVVDCHI2 >%(BPVVDCHI2_MIN)s)"% self._config,
+            )
+        return Selection("HHH_for"+self._name,Algorithm=_hhh,RequiredSelections=[self._kaon,self._pion])
+    
+    def _makeBLine(self,_name,_decay,inputs, pre):
+        _b = CombineParticles(
+            DecayDescriptors = _decay,
+            CombinationCut = "(AM<%(BMass_MAX)s *MeV)" %self._config,
+            MotherCut = "(MDNDOCA(5.279,0) < %(Plane_MAX)s*mm) & (lim_up<0) & (lim_lo>0)"%self._config, 
+            )
+        _b.Preambulo = ["from LoKiPhys.decorators import *",
+                        "m_B = 5279.29 ",
+                        "m_D = 1864.84 ",
+                        "m_3 = CHILD(M,2)",
+                        "e3 = (m_B*m_B - m_D*m_D - m_3*m_3)/(2.*m_D)",
+                        "p3 = sqrt(e3*e3 - m_3*m_3)",
+                        "m_all = M",
+                        "m_n   = CHILD(M,1)",
+                        "lim_up = (m_all*m_all - m_B*m_B) - (1.+e3/m_D -p3/m_D)*(m_n*m_n - m_D*m_D) ",
+                        "lim_lo = (m_all*m_all - m_B*m_B) - (1.+e3/m_D + p3/m_D)*(m_n*m_n - m_D*m_D) ",                 
+                 ]
+        _bsel = Selection("Sel"+_name,Algorithm = _b,RequiredSelections = inputs)
+
+        hlt2 = "(HLT_PASS_RE('Hlt2Topo.*Decision') |"\
+               " HLT_PASS_RE('Hlt2.*SingleMuon.*Decision'))"
+        Line = StrippingLine(_name+'Line',
+               prescale = pre,
+               checkPV = True,
+               FILTER=self.GECs,
+               HLT2 = hlt2,
+               selection = _bsel) 
+        
+        return Line
+                                                    
+
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2nbody.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2nbody.py
new file mode 100644
index 000000000..e1e46bfc7
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingB2nbody.py
@@ -0,0 +1,1098 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingB2nbody.py,v 1.0 2011-02-8 12:53:17 roldeman Exp $
+__author__ = ['Rudolf Oldeman']
+__date__ = '08/02/2011'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('B2nbodyConf',
+           'makeB2nbody',
+           'makePi',
+           'makeK',
+           'makep', 
+           'makeKs',
+           'makeLm',
+           'makeDz',
+           'makeDp',
+           'makeDs',
+           'makeLc',
+           'makePh',
+           'makeKS',
+           'makeJp',
+           'makeDS',
+           'default_config')
+
+
+default_config ={
+  'B2twobody': {
+    'BUILDERTYPE' : 'B2nbodyConf',
+    'CONFIG' : {  'nbody':                2,
+                  'MinBMass':        4700.0,
+                  'MaxBMass':        8000.0,
+                  'MinBPt':          5000.0,
+                  'MaxBVertChi2DOF':   10.0,
+                  'MinBPVVDChi2':     225.0,
+                  'MaxBPVIPChi2':      15.0,
+                  'MinBPVDIRA':         0.0,
+                  'MaxMass':         6000.0,
+                  'MaxNtrk':              8,
+                  'MinNvc':               2,
+                  'doPi':              True,
+                  'doK':               True,
+                  'dop':               True,
+                  'doKs':              True,
+                  'doLm':              True,
+                  'doDz':              True,
+                  'doDp':              True,
+                  'doDs':              True,
+                  'doLc':              True,
+                  'doPh':              True,
+                  'doKS':             False,
+                  'doJp':              True,
+                  'doDS':              True,
+                  'prescale':           1.0,
+                  'MaxTrLong':           70,
+                  'MinPiPt':         1000.0,
+                  'MinPiIPChi2DV':     25.0,
+                  'MaxPiChi2':          4.0,
+                  'MinPiPIDK':          2.0,
+                  'MinPiPIDp':          2.0,
+                  'MaxPiGHP':           0.3,
+                  'MinKPt':          1000.0,
+                  'MinKIPChi2DV':      25.0,
+                  'MaxKChi2':           4.0,
+                  'MinKPIDPi':          2.0,
+                  'MinKPIDp':           2.0,
+                  'MaxKGHP':            0.3,
+                  'MinpPt':          1000.0,
+                  'MinpIPChi2DV':      25.0,
+                  'MaxpChi2':           4.0,
+                  'MinpPIDPi':          2.0,
+                  'MinpPIDK':           2.0,
+                  'MaxpGHP':            0.3,
+                  'MaxKsDeltaM':       40.0,
+                  'MinKsPt':         1000.0,
+                  'MaxKsVertChi2DOF':  10.0,
+                  'MinKsPVVDChi2':    400.0,
+                  'MinKsIPChi2':        0.0,
+                  'MinKsDauPt':       200.0,
+                  'MinKsDauIPChi2':    16.0,
+                  'MaxKsDauTrkChi2':    5.0,
+                  'MaxLmDeltaM':       15.0,
+                  'MinLmPt':         1000.0,
+                  'MaxLmVertChi2DOF':  10.0,
+                  'MinLmPVVDChi2':    400.0,
+                  'MinLmIPChi2':        0.0,
+                  'MinLmPrtPt':       500.0,
+                  'MinLmPiPt':        100.0,
+                  'MinLmPrtIPChi2':     4.0,
+                  'MinLmPiIPChi2':     16.0,
+                  'MaxLmPrtTrkChi2':    5.0,
+                  'MaxLmPiTrkChi2':     5.0,
+                  'MaxDzDeltaM':       40.0,
+                  'MinDzPt':         1000.0,
+                  'MaxDzVertChi2DOF':  10.0,
+                  'MinDzPVVDChi2':    225.0,
+                  'MinDzIPChi2':        0.0,
+                  'MinDzDauPt':       250.0,
+                  'MinDzDauIPChi2':     9.0,
+                  'MaxDzDauTrkChi2':    5.0,
+                  'MinDzPiPIDK':       -5.0,
+                  'MinDzKPIDPi':       -5.0,
+                  'MaxDpDeltaM':       40.0,
+                  'MinDpPt':         1000.0,
+                  'MaxDpVertChi2DOF':  10.0,
+                  'MinDpPVVDChi2':    225.0,
+                  'MinDpIPChi2':        9.0,
+                  'MinDpDauPt':       250.0,
+                  'MinDpDauIPChi2':     9.0,
+                  'MaxDpDauTrkChi2':    5.0,
+                  'MinDpKPIDPi':       -5.0,
+                  'MinDpPiPIDK':       -5.0,
+                  'MaxDsDeltaM':       40.0,
+                  'MinDsPt':         1000.0,
+                  'MaxDsVertChi2DOF':  10.0,
+                  'MinDsPVVDChi2':    225.0,
+                  'MinDsIPChi2':        9.0,
+                  'MinDsDauPt':       250.0,
+                  'MinDsDauIPChi2':     9.0,
+                  'MaxDsDauTrkChi2':    5.0,
+                  'MinDsKmPIDPi':      -5.0,
+                  'MinDsKpPIDPi':       0.0,
+                  'MinDsPiPIDK':       -5.0,
+                  'MaxLcDeltaM':       40.0,
+                  'MinLcPt':         1000.0,
+                  'MaxLcVertChi2DOF':  10.0,
+                  'MinLcPVVDChi2':    225.0,
+                  'MinLcIPChi2':        9.0,
+                  'MinLcDauPt':       250.0,
+                  'MinLcDauIPChi2':     9.0,
+                  'MaxLcDauTrkChi2':    5.0,
+                  'MinLcKPIDPi':       -5.0,
+                  'MinLcpPIDPi':        0.0,
+                  'MinLcpPIDK':         0.0,
+                  'MinLcPiPIDK':       -5.0,
+                  'MaxPhDeltaM':       30.0,
+                  'MinPhPt':         1000.0,
+                  'MaxPhVertChi2DOF':  10.0,
+                  'MinPhPVVDChi2':    100.0,
+                  'MinPhIPChi2':       16.0,
+                  'MinPhDauPt':       300.0,
+                  'MinPhDauIPChi2':     9.0,
+                  'MaxPhDauTrkChi2':    5.0,
+                  'MaxKSDeltaM':      150.0,
+                  'MinKSPt':         2000.0,
+                  'MaxKSVertChi2DOF':  10.0,
+                  'MinKSPVVDChi2':    100.0,
+                  'MinKSIPChi2':       16.0,
+                  'MinKSDauPt':       500.0,
+                  'MinKSDauIPChi2':    16.0,
+                  'MaxKSDauTrkChi2':    5.0,
+                  'MinKSKPIDPi':        0.0,
+                  'MinKSPiPIDK':        0.0,
+                  'MaxJpDeltaM':     3000.0,
+                  'MinJpPt':         1000.0,
+                  'MaxJpVertChi2DOF':  10.0,
+                  'MinJpPVVDChi2':     16.0,
+                  'MinJpIPChi2':        0.0,
+                  'MinJpDauPt':       500.0,
+                  'MinJpDauIPChi2':     0.0,
+                  'MaxJpDauTrkChi2':    5.0,
+                  'MaxDSDeltaM':      153.0,
+                  'MinDSPt':         1000.0,
+                  'MaxDSVertChi2DOF':  10.0,
+                  'MinDSPVVDChi2':      0.0,
+                  'MinDSIPChi2':        0.0,
+                  'MinDSPiPt':        100.0,
+                  'MinDSPiIPChi2':      0.0,
+                  'MaxDSPiTrkChi2':     5.0,
+                  'MaxDSD0DeltaM':     40.0,
+                  'MinDSD0Pt':        500.0,
+                  'MaxDSD0VertChi2DOF':10.0,
+                  'MinDSD0PVVDChi2':  225.0,
+                  'MinDSD0IPChi2':      0.0,
+                  'MinDSD0DauPt':     250.0,
+                  'MinDSD0DauIPChi2':   9.0,
+                  'MaxDSD0DauTrkChi2':  5.0
+                  }, 
+    'STREAMS' : [ 'Bhadron' ],
+    'WGs' : [ 'B2OC' ]
+    },
+
+ 'B2threebody' : {
+    'BUILDERTYPE' : 'B2nbodyConf',
+    'CONFIG' : {  'nbody':                3,
+                  'MinBMass':        4700.0,
+                  'MaxBMass':        8000.0,
+                  'MinBPt':          5000.0,
+                  'MaxBVertChi2DOF':   10.0,
+                  'MinBPVVDChi2':     225.0,
+                  'MaxBPVIPChi2':      15.0,
+                  'MinBPVDIRA':         0.0,
+                  'MaxMass':         6000.0,
+                  'MaxNtrk':              8,
+                  'MinNvc':               2,
+                  'doPi':              True,
+                  'doK':               True,
+                  'dop':               True,
+                  'doKs':              True,
+                  'doLm':              True,
+                  'doDz':              True,
+                  'doDp':              True,
+                  'doDs':              True,
+                  'doLc':              True,
+                  'doPh':              True,
+                  'doKS':             False,
+                  'doJp':              True,
+                  'doDS':              True,
+                  'prescale':           1.0,
+                  'MaxTrLong':           70,
+                  'MinPiPt':         1000.0,
+                  'MinPiIPChi2DV':     25.0,
+                  'MaxPiChi2':          4.0,
+                  'MinPiPIDK':          2.0,
+                  'MinPiPIDp':          2.0,
+                  'MaxPiGHP':           0.3,
+                  'MinKPt':          1000.0,
+                  'MinKIPChi2DV':      25.0,
+                  'MaxKChi2':           4.0,
+                  'MinKPIDPi':          2.0,
+                  'MinKPIDp':           2.0,
+                  'MaxKGHP':            0.3,
+                  'MinpPt':          1000.0,
+                  'MinpIPChi2DV':      25.0,
+                  'MaxpChi2':           4.0,
+                  'MinpPIDPi':          2.0,
+                  'MinpPIDK':           2.0,
+                  'MaxpGHP':            0.3,
+                  'MaxKsDeltaM':       40.0,
+                  'MinKsPt':         1000.0,
+                  'MaxKsVertChi2DOF':  10.0,
+                  'MinKsPVVDChi2':    400.0,
+                  'MinKsIPChi2':        0.0,
+                  'MinKsDauPt':       200.0,
+                  'MinKsDauIPChi2':    16.0,
+                  'MaxKsDauTrkChi2':    5.0,
+                  'MaxLmDeltaM':       15.0,
+                  'MinLmPt':         1000.0,
+                  'MaxLmVertChi2DOF':  10.0,
+                  'MinLmPVVDChi2':    400.0,
+                  'MinLmIPChi2':        0.0,
+                  'MinLmPrtPt':       500.0,
+                  'MinLmPiPt':        100.0,
+                  'MinLmPrtIPChi2':     4.0,
+                  'MinLmPiIPChi2':     16.0,
+                  'MaxLmPrtTrkChi2':    5.0,
+                  'MaxLmPiTrkChi2':     5.0,
+                  'MaxDzDeltaM':       40.0,
+                  'MinDzPt':         1000.0,
+                  'MaxDzVertChi2DOF':  10.0,
+                  'MinDzPVVDChi2':    225.0,
+                  'MinDzIPChi2':        0.0,
+                  'MinDzDauPt':       250.0,
+                  'MinDzDauIPChi2':     9.0,
+                  'MaxDzDauTrkChi2':    5.0,
+                  'MinDzPiPIDK':       -5.0,
+                  'MinDzKPIDPi':       -5.0,
+                  'MaxDpDeltaM':       40.0,
+                  'MinDpPt':         1000.0,
+                  'MaxDpVertChi2DOF':  10.0,
+                  'MinDpPVVDChi2':    225.0,
+                  'MinDpIPChi2':        9.0,
+                  'MinDpDauPt':       250.0,
+                  'MinDpDauIPChi2':     9.0,
+                  'MaxDpDauTrkChi2':    5.0,
+                  'MinDpKPIDPi':       -5.0,
+                  'MinDpPiPIDK':       -5.0,
+                  'MaxDsDeltaM':       40.0,
+                  'MinDsPt':         1000.0,
+                  'MaxDsVertChi2DOF':  10.0,
+                  'MinDsPVVDChi2':    225.0,
+                  'MinDsIPChi2':        9.0,
+                  'MinDsDauPt':       250.0,
+                  'MinDsDauIPChi2':     9.0,
+                  'MaxDsDauTrkChi2':    5.0,
+                  'MinDsKmPIDPi':      -5.0,
+                  'MinDsKpPIDPi':       0.0,
+                  'MinDsPiPIDK':       -5.0,
+                  'MaxLcDeltaM':       40.0,
+                  'MinLcPt':         1000.0,
+                  'MaxLcVertChi2DOF':  10.0,
+                  'MinLcPVVDChi2':    225.0,
+                  'MinLcIPChi2':        9.0,
+                  'MinLcDauPt':       250.0,
+                  'MinLcDauIPChi2':     9.0,
+                  'MaxLcDauTrkChi2':    5.0,
+                  'MinLcKPIDPi':       -5.0,
+                  'MinLcpPIDPi':        0.0,
+                  'MinLcpPIDK':         0.0,
+                  'MinLcPiPIDK':       -5.0,
+                  'MaxPhDeltaM':       30.0,
+                  'MinPhPt':         1000.0,
+                  'MaxPhVertChi2DOF':  10.0,
+                  'MinPhPVVDChi2':    100.0,
+                  'MinPhIPChi2':       16.0,
+                  'MinPhDauPt':       300.0,
+                  'MinPhDauIPChi2':     9.0,
+                  'MaxPhDauTrkChi2':    5.0,
+                  'MaxKSDeltaM':      150.0,
+                  'MinKSPt':         2000.0,
+                  'MaxKSVertChi2DOF':  10.0,
+                  'MinKSPVVDChi2':    100.0,
+                  'MinKSIPChi2':       16.0,
+                  'MinKSDauPt':       500.0,
+                  'MinKSDauIPChi2':    16.0,
+                  'MaxKSDauTrkChi2':    5.0,
+                  'MinKSKPIDPi':        0.0,
+                  'MinKSPiPIDK':        0.0,
+                  'MaxJpDeltaM':     3000.0,
+                  'MinJpPt':         1000.0,
+                  'MaxJpVertChi2DOF':  10.0,
+                  'MinJpPVVDChi2':     16.0,
+                  'MinJpIPChi2':        0.0,
+                  'MinJpDauPt':       500.0,
+                  'MinJpDauIPChi2':     0.0,
+                  'MaxJpDauTrkChi2':    5.0,
+                  'MaxDSDeltaM':      153.0,
+                  'MinDSPt':         1000.0,
+                  'MaxDSVertChi2DOF':  10.0,
+                  'MinDSPVVDChi2':      0.0,
+                  'MinDSIPChi2':        0.0,
+                  'MinDSPiPt':        100.0,
+                  'MinDSPiIPChi2':      0.0,
+                  'MaxDSPiTrkChi2':     5.0,
+                  'MaxDSD0DeltaM':     40.0,
+                  'MinDSD0Pt':        500.0,
+                  'MaxDSD0VertChi2DOF':10.0,
+                  'MinDSD0PVVDChi2':  225.0,
+                  'MinDSD0IPChi2':      0.0,
+                  'MinDSD0DauPt':     250.0,
+                  'MinDSD0DauIPChi2':   9.0,
+                  'MaxDSD0DauTrkChi2':  5.0
+                  }, 
+    'STREAMS' : [ 'Bhadron' ],
+    'WGs' : [ 'B2OC' ]
+    },
+
+  'B2fourbody': {
+    'BUILDERTYPE' : 'B2nbodyConf',
+    'CONFIG' : { 'nbody':                 4,
+                  'MinBMass':        4700.0,
+                  'MaxBMass':        8000.0,
+                  'MinBPt':          5000.0,
+                  'MaxBVertChi2DOF':   10.0,
+                  'MinBPVVDChi2':     225.0,
+                  'MaxBPVIPChi2':      15.0,
+                  'MinBPVDIRA':         0.0,
+                  'MaxMass':         6000.0,
+                  'MaxNtrk':              8,
+                  'MinNvc':               2,
+                  'doPi':              True,
+                  'doK':               True,
+                  'dop':               True,
+                  'doKs':              True,
+                  'doLm':              True,
+                  'doDz':              True,
+                  'doDp':              True,
+                  'doDs':              True,
+                  'doLc':              True,
+                  'doPh':              True,
+                  'doKS':             False,
+                  'doJp':              True,
+                  'doDS':              True,
+                  'prescale':           1.0,
+                  'MaxTrLong':           70,
+                  'MinPiPt':         1000.0,
+                  'MinPiIPChi2DV':     25.0,
+                  'MaxPiChi2':          4.0,
+                  'MinPiPIDK':          2.0,
+                  'MinPiPIDp':          2.0,
+                  'MaxPiGHP':           0.3,
+                  'MinKPt':          1000.0,
+                  'MinKIPChi2DV':      25.0,
+                  'MaxKChi2':           4.0,
+                  'MinKPIDPi':          2.0,
+                  'MinKPIDp':           2.0,
+                  'MaxKGHP':            0.3,
+                  'MinpPt':          1000.0,
+                  'MinpIPChi2DV':      25.0,
+                  'MaxpChi2':           4.0,
+                  'MinpPIDPi':          2.0,
+                  'MinpPIDK':           2.0,
+                  'MaxpGHP':            0.3,
+                  'MaxKsDeltaM':       40.0,
+                  'MinKsPt':         1000.0,
+                  'MaxKsVertChi2DOF':  10.0,
+                  'MinKsPVVDChi2':    400.0,
+                  'MinKsIPChi2':        0.0,
+                  'MinKsDauPt':       200.0,
+                  'MinKsDauIPChi2':    16.0,
+                  'MaxKsDauTrkChi2':    5.0,
+                  'MaxLmDeltaM':       15.0,
+                  'MinLmPt':         1000.0,
+                  'MaxLmVertChi2DOF':  10.0,
+                  'MinLmPVVDChi2':    400.0,
+                  'MinLmIPChi2':        0.0,
+                  'MinLmPrtPt':       500.0,
+                  'MinLmPiPt':        100.0,
+                  'MinLmPrtIPChi2':     4.0,
+                  'MinLmPiIPChi2':     16.0,
+                  'MaxLmPrtTrkChi2':    5.0,
+                  'MaxLmPiTrkChi2':     5.0,
+                  'MaxDzDeltaM':       40.0,
+                  'MinDzPt':         1000.0,
+                  'MaxDzVertChi2DOF':  10.0,
+                  'MinDzPVVDChi2':    225.0,
+                  'MinDzIPChi2':        0.0,
+                  'MinDzDauPt':       250.0,
+                  'MinDzDauIPChi2':     9.0,
+                  'MaxDzDauTrkChi2':    5.0,
+                  'MinDzPiPIDK':       -5.0,
+                  'MinDzKPIDPi':       -5.0,
+                  'MaxDpDeltaM':       40.0,
+                  'MinDpPt':         1000.0,
+                  'MaxDpVertChi2DOF':  10.0,
+                  'MinDpPVVDChi2':    225.0,
+                  'MinDpIPChi2':        9.0,
+                  'MinDpDauPt':       250.0,
+                  'MinDpDauIPChi2':     9.0,
+                  'MaxDpDauTrkChi2':    5.0,
+                  'MinDpKPIDPi':       -5.0,
+                  'MinDpPiPIDK':       -5.0,
+                  'MaxDsDeltaM':       40.0,
+                  'MinDsPt':         1000.0,
+                  'MaxDsVertChi2DOF':  10.0,
+                  'MinDsPVVDChi2':    225.0,
+                  'MinDsIPChi2':        9.0,
+                  'MinDsDauPt':       250.0,
+                  'MinDsDauIPChi2':     9.0,
+                  'MaxDsDauTrkChi2':    5.0,
+                  'MinDsKmPIDPi':      -5.0,
+                  'MinDsKpPIDPi':       0.0,
+                  'MinDsPiPIDK':       -5.0,
+                  'MaxLcDeltaM':       40.0,
+                  'MinLcPt':         1000.0,
+                  'MaxLcVertChi2DOF':  10.0,
+                  'MinLcPVVDChi2':    225.0,
+                  'MinLcIPChi2':        9.0,
+                  'MinLcDauPt':       250.0,
+                  'MinLcDauIPChi2':     9.0,
+                  'MaxLcDauTrkChi2':    5.0,
+                  'MinLcKPIDPi':       -5.0,
+                  'MinLcpPIDPi':        0.0,
+                  'MinLcpPIDK':         0.0,
+                  'MinLcPiPIDK':       -5.0,
+                  'MaxPhDeltaM':       30.0,
+                  'MinPhPt':         1000.0,
+                  'MaxPhVertChi2DOF':  10.0,
+                  'MinPhPVVDChi2':    100.0,
+                  'MinPhIPChi2':       16.0,
+                  'MinPhDauPt':       300.0,
+                  'MinPhDauIPChi2':     9.0,
+                  'MaxPhDauTrkChi2':    5.0,
+                  'MaxKSDeltaM':      150.0,
+                  'MinKSPt':         2000.0,
+                  'MaxKSVertChi2DOF':  10.0,
+                  'MinKSPVVDChi2':    100.0,
+                  'MinKSIPChi2':       16.0,
+                  'MinKSDauPt':       500.0,
+                  'MinKSDauIPChi2':    16.0,
+                  'MaxKSDauTrkChi2':    5.0,
+                  'MinKSKPIDPi':        0.0,
+                  'MinKSPiPIDK':        0.0,
+                  'MaxJpDeltaM':     3000.0,
+                  'MinJpPt':         1000.0,
+                  'MaxJpVertChi2DOF':  10.0,
+                  'MinJpPVVDChi2':     16.0,
+                  'MinJpIPChi2':        0.0,
+                  'MinJpDauPt':       500.0,
+                  'MinJpDauIPChi2':     0.0,
+                  'MaxJpDauTrkChi2':    5.0,
+                  'MaxDSDeltaM':      153.0,
+                  'MinDSPt':         1000.0,
+                  'MaxDSVertChi2DOF':  10.0,
+                  'MinDSPVVDChi2':      0.0,
+                  'MinDSIPChi2':        0.0,
+                  'MinDSPiPt':        100.0,
+                  'MinDSPiIPChi2':      0.0,
+                  'MaxDSPiTrkChi2':     5.0,
+                  'MaxDSD0DeltaM':     40.0,
+                  'MinDSD0Pt':        500.0,
+                  'MaxDSD0VertChi2DOF':10.0,
+                  'MinDSD0PVVDChi2':  225.0,
+                  'MinDSD0IPChi2':      0.0,
+                  'MinDSD0DauPt':     250.0,
+                  'MinDSD0DauIPChi2':   9.0,
+                  'MaxDSD0DauTrkChi2':  5.0
+                  }, 
+    'STREAMS' : [ 'Bhadron' ],
+    'WGs' : [ 'B2OC' ]
+    }    
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, MergedSelection, DataOnDemand, VoidEventSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class B2nbodyConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['B2twobody']['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.selPi = makePi( 'PiFor'+name,
+                             MinPiPt      =config['MinPiPt'],
+                             MinPiIPChi2DV=config['MinPiIPChi2DV'],
+                             MaxPiChi2    =config['MaxPiChi2'],
+                             MinPiPIDK    =config['MinPiPIDK'],
+                             MinPiPIDp    =config['MinPiPIDp'], 
+                             MaxPiGHP     =config['MaxPiGHP'])
+        self.selK = makeK( 'KFor'+name,
+                             MinKPt      =config['MinKPt'],
+                             MinKIPChi2DV=config['MinKIPChi2DV'],
+                             MaxKChi2    =config['MaxKChi2'],
+                             MinKPIDPi   =config['MinKPIDPi'],
+                             MinKPIDp    =config['MinKPIDp'],
+                             MaxKGHP     =config['MaxKGHP'])
+        self.selp = makep( 'pFor'+name,
+                             MinpPt      =config['MinpPt'],
+                             MinpIPChi2DV=config['MinpIPChi2DV'],
+                             MaxpChi2    =config['MaxpChi2'],
+                             MinpPIDPi   =config['MinpPIDPi'],
+                             MinpPIDK    =config['MinpPIDK'],
+                             MaxpGHP     =config['MaxpGHP'])
+        self.selKs = makeKs('KsFor'+name,
+                            MaxKsDeltaM     =config['MaxKsDeltaM'],    
+                            MinKsPt         =config['MinKsPt'],        
+                            MaxKsVertChi2DOF=config['MaxKsVertChi2DOF'],
+                            MinKsPVVDChi2   =config['MinKsPVVDChi2'],  
+                            MinKsIPChi2     =config['MinKsIPChi2'],
+                            MinKsDauPt      =config['MinKsDauPt'],     
+                            MinKsDauIPChi2  =config['MinKsDauIPChi2'], 
+                            MaxKsDauTrkChi2 =config['MaxKsDauTrkChi2'])
+        self.selLm = makeLm('LmFor'+name,
+                            MaxLmDeltaM     =config['MaxLmDeltaM'],    
+                            MinLmPt         =config['MinLmPt'],        
+                            MaxLmVertChi2DOF=config['MaxLmVertChi2DOF'],
+                            MinLmPVVDChi2   =config['MinLmPVVDChi2'],  
+                            MinLmIPChi2     =config['MinLmIPChi2'],    
+                            MinLmPrtPt      =config['MinLmPrtPt'],     
+                            MinLmPiPt       =config['MinLmPiPt'],      
+                            MinLmPrtIPChi2  =config['MinLmPrtIPChi2'], 
+                            MinLmPiIPChi2   =config['MinLmPiIPChi2'],  
+                            MaxLmPrtTrkChi2 =config['MaxLmPrtTrkChi2'],
+                            MaxLmPiTrkChi2  =config['MaxLmPiTrkChi2'])
+        self.selDz = makeDz('DzFor'+name,
+                            MaxDzDeltaM     =config['MaxDzDeltaM'],   
+                            MinDzPt         =config['MinDzPt'],        
+                            MaxDzVertChi2DOF=config['MaxDzVertChi2DOF'],
+                            MinDzPVVDChi2   =config['MinDzPVVDChi2'],  
+                            MinDzIPChi2     =config['MinDzIPChi2'],    
+                            MinDzDauPt      =config['MinDzDauPt'],     
+                            MinDzDauIPChi2  =config['MinDzDauIPChi2'], 
+                            MaxDzDauTrkChi2 =config['MaxDzDauTrkChi2'],
+                            MinDzKPIDPi     =config['MinDzKPIDPi'],
+                            MinDzPiPIDK     =config['MinDzPiPIDK'])
+        self.selDp = makeDp('DpFor'+name,
+                            MaxDpDeltaM     =config['MaxDpDeltaM'],   
+                            MinDpPt         =config['MinDpPt'],        
+                            MaxDpVertChi2DOF=config['MaxDpVertChi2DOF'],
+                            MinDpPVVDChi2   =config['MinDpPVVDChi2'],  
+                            MinDpIPChi2     =config['MinDpIPChi2'],    
+                            MinDpDauPt      =config['MinDpDauPt'],     
+                            MinDpDauIPChi2  =config['MinDpDauIPChi2'], 
+                            MaxDpDauTrkChi2 =config['MaxDpDauTrkChi2'],
+                            MinDpKPIDPi     =config['MinDpKPIDPi'],
+                            MinDpPiPIDK     =config['MinDpPiPIDK'])
+        self.selDs = makeDs('DsFor'+name,
+                            MaxDsDeltaM     =config['MaxDsDeltaM'],   
+                            MinDsPt         =config['MinDsPt'],        
+                            MaxDsVertChi2DOF=config['MaxDsVertChi2DOF'],
+                            MinDsPVVDChi2   =config['MinDsPVVDChi2'],  
+                            MinDsIPChi2     =config['MinDsIPChi2'],    
+                            MinDsDauPt      =config['MinDsDauPt'],     
+                            MinDsDauIPChi2  =config['MinDsDauIPChi2'], 
+                            MaxDsDauTrkChi2 =config['MaxDsDauTrkChi2'],
+                            MinDsKmPIDPi    =config['MinDsKmPIDPi'],
+                            MinDsKpPIDPi    =config['MinDsKpPIDPi'],
+                            MinDsPiPIDK     =config['MinDsPiPIDK'])
+        self.selLc = makeLc('LcFor'+name,
+                            MaxLcDeltaM     =config['MaxLcDeltaM'],   
+                            MinLcPt         =config['MinLcPt'],        
+                            MaxLcVertChi2DOF=config['MaxLcVertChi2DOF'],
+                            MinLcPVVDChi2   =config['MinLcPVVDChi2'],  
+                            MinLcIPChi2     =config['MinLcIPChi2'],    
+                            MinLcDauPt      =config['MinLcDauPt'],     
+                            MinLcDauIPChi2  =config['MinLcDauIPChi2'], 
+                            MaxLcDauTrkChi2 =config['MaxLcDauTrkChi2'],
+                            MinLcKPIDPi     =config['MinLcKPIDPi'],
+                            MinLcpPIDPi     =config['MinLcpPIDPi'],
+                            MinLcpPIDK      =config['MinLcpPIDK'],
+                            MinLcPiPIDK     =config['MinLcPiPIDK'])
+        self.selPh = makePh('PhFor'+name,
+                            MaxPhDeltaM     =config['MaxPhDeltaM'],     
+                            MinPhPt         =config['MinPhPt'],         
+                            MaxPhVertChi2DOF=config['MaxPhVertChi2DOF'],
+                            MinPhPVVDChi2   =config['MinPhPVVDChi2'],   
+                            MinPhIPChi2     =config['MinPhIPChi2'],     
+                            MinPhDauPt      =config['MinPhDauPt'],      
+                            MinPhDauIPChi2  =config['MinPhDauIPChi2'],  
+                            MaxPhDauTrkChi2 =config['MaxPhDauTrkChi2'])
+        self.selKS = makeKS('KSFor'+name,
+                            MaxKSDeltaM     =config['MaxKSDeltaM'],     
+                            MinKSPt         =config['MinKSPt'],         
+                            MaxKSVertChi2DOF=config['MaxKSVertChi2DOF'],
+                            MinKSPVVDChi2   =config['MinKSPVVDChi2'],   
+                            MinKSIPChi2     =config['MinKSIPChi2'],     
+                            MinKSDauPt      =config['MinKSDauPt'],      
+                            MinKSDauIPChi2  =config['MinKSDauIPChi2'],  
+                            MaxKSDauTrkChi2 =config['MaxKSDauTrkChi2'],
+                            MinKSKPIDPi     =config['MinKSKPIDPi'],
+                            MinKSPiPIDK     =config['MinKSPiPIDK'])
+        self.selJp = makeJp('JpFor'+name,
+                            MaxJpDeltaM     =config['MaxJpDeltaM'],     
+                            MinJpPt         =config['MinJpPt'],         
+                            MaxJpVertChi2DOF=config['MaxJpVertChi2DOF'],
+                            MinJpPVVDChi2   =config['MinJpPVVDChi2'],   
+                            MinJpIPChi2     =config['MinJpIPChi2'],     
+                            MinJpDauPt      =config['MinJpDauPt'],      
+                            MinJpDauIPChi2  =config['MinJpDauIPChi2'],  
+                            MaxJpDauTrkChi2 =config['MaxJpDauTrkChi2']) 
+        self.selDS = makeDS('DSFor'+name,
+                            MaxDSDeltaM       =config['MaxDSDeltaM'],      
+                            MinDSPt           =config['MinDSPt'],          
+                            MaxDSVertChi2DOF  =config['MaxDSVertChi2DOF'], 
+                            MinDSPVVDChi2     =config['MinDSPVVDChi2'],    
+                            MinDSIPChi2       =config['MinDSIPChi2'],      
+                            MinDSPiPt         =config['MinDSPiPt'],        
+                            MinDSPiIPChi2     =config['MinDSPiIPChi2'],    
+                            MaxDSPiTrkChi2    =config['MaxDSPiTrkChi2'],   
+                            MaxDSD0DeltaM     =config['MaxDSD0DeltaM'],    
+                            MinDSD0Pt         =config['MinDSD0Pt'],        
+                            MaxDSD0VertChi2DOF=config['MaxDSD0VertChi2DOF'],
+                            MinDSD0PVVDChi2   =config['MinDSD0PVVDChi2'],  
+                            MinDSD0IPChi2     =config['MinDSD0IPChi2'],    
+                            MinDSD0DauPt      =config['MinDSD0DauPt'],     
+                            MinDSD0DauIPChi2  =config['MinDSD0DauIPChi2'], 
+                            MaxDSD0DauTrkChi2 =config['MaxDSD0DauTrkChi2'])
+
+        
+        self.selB2nbody = makeB2nbody(name,
+                                     PiSel=self.selPi,
+                                     KSel =self.selK,
+                                     pSel =self.selp,
+                                     KsSel=self.selKs,
+                                     LmSel=self.selLm,
+                                     DzSel=self.selDz,
+                                     DpSel=self.selDp,
+                                     DsSel=self.selDs,
+                                     LcSel=self.selLc,
+                                     PhSel=self.selPh,
+                                     KSSel=self.selKS,
+                                     JpSel=self.selJp,
+                                     DSSel=self.selDS,
+                                     nbody          =config['nbody'],       
+                                     MinBMass       =config['MinBMass'],       
+                                     MaxBMass       =config['MaxBMass'],       
+                                     MinBPt         =config['MinBPt'],         
+                                     MaxBVertChi2DOF=config['MaxBVertChi2DOF'],
+                                     MinBPVVDChi2   =config['MinBPVVDChi2'],   
+                                     MaxBPVIPChi2   =config['MaxBPVIPChi2'],   
+                                     MinBPVDIRA     =config['MinBPVDIRA'],     
+                                     MaxMass        =config['MaxMass'],
+                                     MaxNtrk        =config['MaxNtrk'],
+                                     MinNvc         =config['MinNvc'],
+                                     doPi           =config['doPi'],
+                                     doK            =config['doK'],
+                                     dop            =config['dop'],
+                                     doKs           =config['doKs'],
+                                     doLm           =config['doLm'],
+                                     doDz           =config['doDz'],
+                                     doDp           =config['doDp'],
+                                     doDs           =config['doDs'],
+                                     doLc           =config['doLc'],
+                                     doPh           =config['doPh'],
+                                     doKS           =config['doKS'],
+                                     doJp           =config['doJp'],
+                                     doDS           =config['doDS'])
+        TrLongFilter={'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s )"% config['MaxTrLong'],
+                      'Preambulo' : [ "from LoKiTracks.decorators import *",'from LoKiCore.functions import *' ]}
+
+
+        self.line = StrippingLine(name+"Line",
+                                  selection = self.selB2nbody,
+                                  prescale = config['prescale'],
+                                  FILTER = TrLongFilter )
+        self.registerLine(self.line)
+
+
+
+def makeB2nbody(name,PiSel,KSel,pSel,KsSel,LmSel,DzSel,DpSel,DsSel,LcSel,PhSel,KSSel,JpSel,DSSel,
+                nbody,MinBMass,MaxBMass,MinBPt,MaxBVertChi2DOF,MinBPVVDChi2,MaxBPVIPChi2,MinBPVDIRA,MaxMass,MaxNtrk,MinNvc,
+                doPi,doK,dop,doKs,doLm,doDz,doDp,doDs,doLc,doPh,doKS,doJp,doDS):
+
+    # Define a class that contains all relevant particle properties
+    class particle:
+        def __init__(self,name,m,ntrk,nvc,q,b):
+            self.name=name
+            self.m=m            #mass
+            self.ntrk=ntrk      # number of charged tracks in fian state
+            self.nvc=nvc        # number of vertex-contraining (pseudo)tracks
+            self.Q=q            # electrical charge
+            self.B=b            # baryon number
+            self.cp=self
+        def CP(self,name):
+            p= particle(name,self.m,self.ntrk,self.nvc,-self.Q,-self.B)
+            p.cp=self
+            self.cp=p
+            return p
+        def isCP(self):
+            if self.cp.name==self.name: return True
+            else: return False
+
+
+
+    # Define the particles
+    particles=[]
+    if doPi: particles.append(particle(        "pi+"       , 139.6,1,1,  +1,  0))
+    if doPi: particles.append(particles[-1].CP("pi-"       ))
+    if doK:  particles.append(particle(        "K+"        , 493.7,1,1,  +1,  0))
+    if doK:  particles.append(particles[-1].CP("K-"        ))
+    if dop:  particles.append(particle(        "p+"        , 938.3,1,1,  +1, +1))
+    if dop:  particles.append(particles[-1].CP("p~-"       ))
+    if doKs: particles.append(particle(        "KS0"       , 497.6,2,0,   0,  0))
+    if doLm: particles.append(particle(        "Lambda0"   ,1115.7,2,0,   0, +1))
+    if doLm: particles.append(particles[-1].CP("Lambda~0"  ))
+    if doDz: particles.append(particle(        "D0"        ,1864.8,2,1,   0,  0))
+    if doDz: particles.append(particles[-1].CP("D~0"       ))
+    if doDp: particles.append(particle(        "D+"        ,1869.6,3,1,  +1,  0))
+    if doDp: particles.append(particles[-1].CP("D-"        ))
+    if doDs: particles.append(particle(        "D_s+"      ,1968.5,3,1,  +1,  0))
+    if doDs: particles.append(particles[-1].CP("D_s-"      ))
+    if doLc: particles.append(particle(        "Lambda_c+" ,2286.5,3,1,  +1, +1))
+    if doLc: particles.append(particles[-1].CP("Lambda_c~-"))
+    if doPh: particles.append(particle(        "phi(1020)" ,1019.5,2,2,   0,  0))
+    if doKS: particles.append(particle(        "K*(892)0"  , 895.9,2,2,   0,  0))
+    if doKS: particles.append(particles[-1].CP("K*(892)~0" ))
+    if doJp: particles.append(particle(        "J/psi(1S)" ,3096.9,2,2,   0,  0))
+    if doDS: particles.append(particle(        "D*(2010)+" ,2010.2,3,2,  +1,  0))
+    if doDS: particles.append(particles[-1].CP("D*(2010)-" ))
+
+    # in itertools only since python 2.7
+    def combinations_with_replacement(iterable, r):
+        pool = tuple(iterable)
+        n = len(pool)
+        if not n and r: return
+        indices = [0] * r
+        yield tuple(pool[i] for i in indices)
+        while True:
+            for i in reversed(range(r)):
+                if indices[i] != n - 1: break
+            else: return
+            indices[i:] = [indices[i] + 1] * (r - i)
+            yield tuple(pool[i] for i in indices)
+
+    #alphabetically ordered name of particles
+    def pname(ps):
+        names=[]
+        for p in ps: names.append(p.name)
+        names.sort()
+        result=""
+        for name in names:
+            result=result+name+' '
+        return result[:-1]
+
+    descriptors = []
+    for comb in combinations_with_replacement(particles,nbody):
+        #check for the mass
+        m=0
+        for p in comb: m+=p.m
+        if m>MaxMass: continue
+        #check for the number of tracks in the final state
+        ntrk=0
+        for p in comb: ntrk+=p.ntrk
+        if ntrk>MaxNtrk: continue
+        #check for the number of vertex-constraining (pseudo)tracks
+        nvc=0
+        for p in comb: nvc+=p.nvc
+        if nvc<MinNvc: continue
+        #check for charge and baryon number
+        Q=0
+        for p in comb: Q+=p.Q
+        if abs(Q)>1: continue
+        B=0
+        for p in comb: B+=p.B
+        if abs(B)>1: continue
+
+        #assign identity to mother 
+        mother=""
+        if Q==0  and B==0: mother="B0"
+        if Q==1  and B==0: mother="B+"
+        if Q==0  and B==1: mother="Lambda_b0"
+        if Q==-1 and B==1: mother="Xi_b-"
+        if Q==+1 and B==1: mother="Xi_bc+"
+        if mother=="": continue
+
+        #check if final state is CP eigenstate
+        ps=[p for p in comb if not p.isCP()]
+        while True:
+            doagain=False
+            for p in ps:
+                if ps.count(p.cp)>0:
+                    ps.remove(p)
+                    ps.remove(p.cp)
+                    doagain=True
+                    break
+            if not doagain: break
+        if len(ps)==0: CP=True
+        else: CP=False
+        
+        #for B0 non-CP combinations come twice. 
+        if mother=="B0" and not CP:
+            combcp=[x.cp for x in comb]
+            if pname(comb)<pname(combcp):continue
+
+        #build the decay descriptor
+        descriptor=mother+" -> "+pname(comb)
+        if not CP:descriptor="["+descriptor+"]cc"
+        descriptors.append(descriptor)
+
+    #for descriptor in descriptors: print "DESCRIPTOR:",descriptor
+
+    #make a merge of the input selections
+    AllSel=[]
+    if doPi:AllSel.append(PiSel)
+    if doK: AllSel.append(KSel)
+    if dop: AllSel.append(pSel)
+    if doKs:AllSel.append(KsSel)
+    if doLm:AllSel.append(LmSel)
+    if doDz:AllSel.append(DzSel)
+    if doDp:AllSel.append(DpSel)
+    if doDs:AllSel.append(DsSel)
+    if doLc:AllSel.append(LcSel)
+    if doPh:AllSel.append(PhSel)
+    if doKS:AllSel.append(KSSel)
+    if doJp:AllSel.append(JpSel)
+    if doDS:AllSel.append(DSSel)
+    InputSel= MergedSelection("InputFor"+name, RequiredSelections = AllSel )
+
+    _combinationCuts =    "(in_range(%(MinBMass)s*MeV, AM, %(MaxBMass)s*MeV))" % locals()
+    _combinationCuts += "& (APT>%(MinBPt)s*MeV)"%locals()
+    _motherCuts = "(VFASPF(VCHI2/VDOF)<%(MaxBVertChi2DOF)s)"%locals()
+    _motherCuts += "& (BPVVDCHI2 > %(MinBPVVDChi2)s)"% locals()
+    _motherCuts += "& (BPVIPCHI2() < %(MaxBPVIPChi2)s)"%locals()
+    _motherCuts += "& (BPVDIRA > %(MinBPVDIRA)s)"% locals()
+
+    #make a selection
+    _B=CombineParticles(DecayDescriptors = descriptors, CombinationCut = _combinationCuts, MotherCut = _motherCuts)
+
+    #make a preselection
+    _presel=VoidEventSelection("preselFor"+name,
+                               Code="(CONTAINS('%s')> %3.1f)"%(InputSel.outputLocation(),nbody-0.5 ),
+                               RequiredSelection=InputSel
+                               )
+
+    return Selection(name, Algorithm = _B, RequiredSelections = [_presel] )
+
+from StandardParticles import StdLoosePions
+def makePi(name, MinPiPt, MinPiIPChi2DV, MaxPiChi2, MinPiPIDK, MinPiPIDp, MaxPiGHP) :
+    _code =  "(PT > %(MinPiPt)s*MeV)"%locals()
+    _code+="& (MIPCHI2DV(PRIMARY) > %(MinPiIPChi2DV)s)"%locals()
+    _code+="& (TRCHI2DOF<%(MaxPiChi2)s)"%locals()
+    _code+="& (PIDpi-PIDK > %(MinPiPIDK)s)"%locals()
+    _code+="& (PIDpi-PIDp > %(MinPiPIDp)s)"%locals()
+    _code+="& (TRGHP < %(MaxPiGHP)s)"%locals()
+    _PiFilter=FilterDesktop(Code=_code)
+    return Selection (name,  Algorithm = _PiFilter, RequiredSelections = [StdLoosePions])
+                        
+from StandardParticles import StdLooseKaons
+def makeK(name, MinKPt, MinKIPChi2DV, MaxKChi2, MinKPIDPi, MinKPIDp, MaxKGHP) :
+    _code =  "(PT > %(MinKPt)s*MeV)"%locals()
+    _code+="& (MIPCHI2DV(PRIMARY) > %(MinKIPChi2DV)s)"%locals()
+    _code+="& (TRCHI2DOF<%(MaxKChi2)s)"%locals()
+    _code+="& (PIDK-PIDpi > %(MinKPIDPi)s)"%locals()
+    _code+="& (PIDK-PIDp > %(MinKPIDp)s)"%locals()
+    _code+="& (TRGHP < %(MaxKGHP)s)"%locals()
+    _KFilter=FilterDesktop(Code=_code)
+    return Selection (name,  Algorithm = _KFilter, RequiredSelections = [StdLooseKaons])
+                        
+from StandardParticles import StdLooseProtons
+def makep(name, MinpPt, MinpIPChi2DV, MaxpChi2, MinpPIDPi, MinpPIDK, MaxpGHP) :
+    _code =  "(PT > %(MinpPt)s*MeV)"%locals()
+    _code+="& (MIPCHI2DV(PRIMARY) > %(MinpIPChi2DV)s)"%locals()
+    _code+="& (TRCHI2DOF<%(MaxpChi2)s)"%locals()
+    _code+="& (PIDp-PIDpi > %(MinpPIDPi)s)"%locals()
+    _code+="& (PIDp-PIDK > %(MinpPIDK)s)"%locals()
+    _code+="& (TRGHP < %(MaxpGHP)s)"%locals()
+    _pFilter=FilterDesktop(Code=_code)
+    return Selection (name,  Algorithm = _pFilter, RequiredSelections = [StdLooseProtons])
+
+def makeKs(name, MaxKsDeltaM, MinKsPt, MaxKsVertChi2DOF, MinKsPVVDChi2, MinKsIPChi2, MinKsDauPt, MinKsDauIPChi2, MaxKsDauTrkChi2) :
+    _code =  "(ADMASS('KS0') < %(MaxKsDeltaM)s*MeV)"%locals()
+    _code+="& (PT>%(MinKsPt)s*MeV)"%locals()
+    _code+="& (VFASPF(VCHI2/VDOF)<%(MaxKsVertChi2DOF)s)"%locals()
+    _code+="& (BPVVDCHI2>%(MinKsPVVDChi2)s)"%locals()
+    _code+="& (MIPCHI2DV(PRIMARY)>%(MinKsIPChi2)s)"%locals()
+    _code+="& CHILDCUT ( PT > %(MinKsDauPt)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinKsDauPt)s , 2 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinKsDauIPChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinKsDauIPChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxKsDauTrkChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxKsDauTrkChi2)s , 2 )"%locals()
+    _KsFilter = FilterDesktop(Code = _code)
+    _stdKsLL    = DataOnDemand(Location = "Phys/StdLooseKsLL/Particles")
+    _stdKsDD    = DataOnDemand(Location = "Phys/StdLooseKsDD/Particles")
+    _KsMerged = MergedSelection( "MergedKsFor" + name, RequiredSelections = [_stdKsDD,_stdKsLL] )
+    return Selection (name, Algorithm = _KsFilter, RequiredSelections = [_KsMerged])
+
+
+def makeLm(name, MaxLmDeltaM, MinLmPt, MaxLmVertChi2DOF, MinLmPVVDChi2, MinLmIPChi2, MinLmPrtPt, MinLmPiPt, MinLmPrtIPChi2, MinLmPiIPChi2, MaxLmPrtTrkChi2, MaxLmPiTrkChi2) :
+    _code =  "(ADMASS('Lambda0') < %(MaxLmDeltaM)s*MeV)"%locals()
+    _code+="& (PT>%(MinLmPt)s*MeV)"%locals()
+    _code+="& (VFASPF(VCHI2/VDOF)<%(MaxLmVertChi2DOF)s)"%locals()
+    _code+="& (BPVVDCHI2>%(MinLmPVVDChi2)s)"%locals()
+    _code+="& (MIPCHI2DV(PRIMARY)>%(MinLmIPChi2)s)"%locals()
+    _code+="& CHILDCUT ( PT > %(MinLmPrtPt)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinLmPiPt)s , 2 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinLmPrtIPChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinLmPiIPChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxLmPrtTrkChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxLmPiTrkChi2)s , 2 )"%locals()
+    _LmFilter = FilterDesktop(Code = _code)
+    _stdLmLL    = DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")
+    _stdLmDD    = DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")
+    _LmMerged = MergedSelection( "MergedLmFor" + name, RequiredSelections = [_stdLmDD,_stdLmLL] )
+    return Selection (name, Algorithm = _LmFilter, RequiredSelections = [_LmMerged])
+
+def makeDz(name, MaxDzDeltaM, MinDzPt, MaxDzVertChi2DOF, MinDzPVVDChi2, MinDzIPChi2, MinDzDauPt, MinDzDauIPChi2, MaxDzDauTrkChi2, MinDzKPIDPi,MinDzPiPIDK):
+    _code = "(PT>%(MinDzPt)s*MeV)"%locals()
+    _code+="& (VFASPF(VCHI2/VDOF)<%(MaxDzVertChi2DOF)s)"%locals()
+    _code+="& (BPVVDCHI2>%(MinDzPVVDChi2)s)"%locals()
+    _code+="& (MIPCHI2DV(PRIMARY)>%(MinDzIPChi2)s)"%locals()
+    _code+="& CHILDCUT ( PT > %(MinDzDauPt)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinDzDauPt)s , 2 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinDzDauIPChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinDzDauIPChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxDzDauTrkChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxDzDauTrkChi2)s , 2 )"%locals()
+    _code+="& (ADMASS('D0') < %(MaxDzDeltaM)s*MeV)"%locals()
+    _code+="& CHILDCUT ( PIDK-PIDpi > %(MinDzKPIDPi)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PIDpi-PIDK > %(MinDzPiPIDK)s , 2 )"%locals()
+    _DzFilter = FilterDesktop(Code = _code)
+    _stdDz = DataOnDemand(Location = "Phys/StdLooseD02KPi/Particles")
+    return Selection (name, Algorithm = _DzFilter, RequiredSelections = [_stdDz])
+
+def makeDp(name, MaxDpDeltaM, MinDpPt, MaxDpVertChi2DOF, MinDpPVVDChi2, MinDpIPChi2, MinDpDauPt, MinDpDauIPChi2, MaxDpDauTrkChi2, MinDpKPIDPi, MinDpPiPIDK):
+    _code = "(PT>%(MinDpPt)s*MeV)"%locals()
+    _code+="& (VFASPF(VCHI2/VDOF)<%(MaxDpVertChi2DOF)s)"%locals()
+    _code+="& (BPVVDCHI2>%(MinDpPVVDChi2)s)"%locals()
+    _code+="& (MIPCHI2DV(PRIMARY)>%(MinDpIPChi2)s)"%locals()
+    _code+="& CHILDCUT ( PT > %(MinDpDauPt)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinDpDauPt)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinDpDauPt)s , 3 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinDpDauIPChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinDpDauIPChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinDpDauIPChi2)s , 3 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxDpDauTrkChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxDpDauTrkChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxDpDauTrkChi2)s , 3 )"%locals()
+    _code+="& (ADMASS('D+') < %(MaxDpDeltaM)s*MeV)"%locals()
+    _code+="& CHILDCUT ( PIDK-PIDpi > %(MinDpKPIDPi)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PIDpi-PIDK > %(MinDpPiPIDK)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PIDpi-PIDK > %(MinDpPiPIDK)s , 3 )"%locals()
+    _DpFilter = FilterDesktop(Code = _code)
+    _stdDp = DataOnDemand(Location = "Phys/StdLooseDplus2KPiPi/Particles")
+    return Selection (name, Algorithm = _DpFilter, RequiredSelections = [_stdDp])
+
+def makeDs(name, MaxDsDeltaM, MinDsPt, MaxDsVertChi2DOF, MinDsPVVDChi2, MinDsIPChi2, MinDsDauPt, MinDsDauIPChi2, MaxDsDauTrkChi2, MinDsKmPIDPi, MinDsKpPIDPi,MinDsPiPIDK):
+    _code = "(PT>%(MinDsPt)s*MeV)"%locals()
+    _code+="& (VFASPF(VCHI2/VDOF)<%(MaxDsVertChi2DOF)s)"%locals()
+    _code+="& (BPVVDCHI2>%(MinDsPVVDChi2)s)"%locals()
+    _code+="& (MIPCHI2DV(PRIMARY)>%(MinDsIPChi2)s)"%locals()
+    _code+="& CHILDCUT ( PT > %(MinDsDauPt)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinDsDauPt)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinDsDauPt)s , 3 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinDsDauIPChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinDsDauIPChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinDsDauIPChi2)s , 3 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxDsDauTrkChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxDsDauTrkChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxDsDauTrkChi2)s , 3 )"%locals()
+    _code+="& (ADMASS('D_s+') < %(MaxDsDeltaM)s*MeV)"%locals()
+    _code+="& CHILDCUT ( PIDK-PIDpi > %(MinDsKmPIDPi)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PIDK-PIDpi > %(MinDsKpPIDPi)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PIDpi-PIDK > %(MinDsPiPIDK)s , 3 )"%locals()
+    _DsFilter = FilterDesktop(Code = _code)
+    _stdDs = DataOnDemand(Location = "Phys/StdLooseDsplus2KKPi/Particles")
+    return Selection (name, Algorithm = _DsFilter, RequiredSelections = [_stdDs])
+
+def makeLc(name, MaxLcDeltaM, MinLcPt, MaxLcVertChi2DOF, MinLcPVVDChi2, MinLcIPChi2, MinLcDauPt, MinLcDauIPChi2, MaxLcDauTrkChi2, MinLcKPIDPi, MinLcpPIDPi, MinLcpPIDK, MinLcPiPIDK):
+    _code = "(PT>%(MinLcPt)s*MeV)"%locals()
+    _code+="& (VFASPF(VCHI2/VDOF)<%(MaxLcVertChi2DOF)s)"%locals()
+    _code+="& (BPVVDCHI2>%(MinLcPVVDChi2)s)"%locals()
+    _code+="& (MIPCHI2DV(PRIMARY)>%(MinLcIPChi2)s)"%locals()
+    _code+="& CHILDCUT ( PT > %(MinLcDauPt)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinLcDauPt)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinLcDauPt)s , 3 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinLcDauIPChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinLcDauIPChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinLcDauIPChi2)s , 3 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxLcDauTrkChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxLcDauTrkChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxLcDauTrkChi2)s , 3 )"%locals()
+    _code+="& (ADMASS('Lambda_c+') < %(MaxLcDeltaM)s*MeV)"%locals()
+    _code+="& CHILDCUT ( PIDK-PIDpi > %(MinLcKPIDPi)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PIDp-PIDpi > %(MinLcpPIDPi)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PIDp-PIDK > %(MinLcpPIDK)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PIDpi-PIDK > %(MinLcPiPIDK)s , 3 )"%locals()
+    _LcFilter = FilterDesktop(Code = _code)
+    _stdLc = DataOnDemand(Location = "Phys/StdLooseLambdac2PKPi/Particles")
+    return Selection (name, Algorithm = _LcFilter, RequiredSelections = [_stdLc])
+
+
+def makePh(name, MaxPhDeltaM, MinPhPt, MaxPhVertChi2DOF, MinPhPVVDChi2, MinPhIPChi2, MinPhDauPt, MinPhDauIPChi2, MaxPhDauTrkChi2):
+    _code =  "( ADMASS('phi(1020)') < %(MaxPhDeltaM)s*MeV)"%locals()
+    _code+="& ( PT > %(MinPhPt)s )"%locals()
+    _code+="& ( VFASPF(VCHI2/VDOF) < %(MaxPhVertChi2DOF)s )"%locals()
+    _code+="& ( BPVVDCHI2 > %(MinPhPVVDChi2)s )"%locals()
+    _code+="& ( MIPCHI2DV(PRIMARY) > %(MinPhIPChi2)s )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinPhDauIPChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinPhDauIPChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinPhDauPt)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinPhDauPt)s , 2 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxPhDauTrkChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxPhDauTrkChi2)s , 2 )"%locals()
+    _PhFilter = FilterDesktop(Code = _code)
+    _stdPh = DataOnDemand(Location = "Phys/StdLooseDetachedPhi2KK/Particles")
+    return Selection (name, Algorithm = _PhFilter, RequiredSelections = [_stdPh])
+
+def makeKS(name, MaxKSDeltaM, MinKSPt, MaxKSVertChi2DOF, MinKSPVVDChi2, MinKSIPChi2, MinKSDauPt, MinKSDauIPChi2, MaxKSDauTrkChi2, MinKSKPIDPi, MinKSPiPIDK):
+    _code =  "(ADMASS('K*(892)0') < %(MaxKSDeltaM)s*MeV)"%locals()
+    _code+="& ( PT > %(MinKSPt)s )"%locals()
+    _code+="& ( VFASPF(VCHI2/VDOF) < %(MaxKSVertChi2DOF)s )"%locals()
+    _code+="& ( BPVVDCHI2 > %(MinKSPVVDChi2)s )"%locals()
+    _code+="& ( MIPCHI2DV(PRIMARY) > %(MinKSIPChi2)s )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinKSDauIPChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinKSDauIPChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinKSDauPt)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinKSDauPt)s , 2 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxKSDauTrkChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxKSDauTrkChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PIDK-PIDpi > %(MinKSKPIDPi)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PIDpi-PIDK > %(MinKSPiPIDK)s , 2 )"%locals()
+    _KSFilter = FilterDesktop(Code = _code)
+    _stdKS = DataOnDemand(Location = "Phys/StdLooseKstar2Kpi/Particles")
+    return Selection (name, Algorithm = _KSFilter, RequiredSelections = [_stdKS])
+                                                            
+def makeJp(name, MaxJpDeltaM, MinJpPt, MaxJpVertChi2DOF, MinJpPVVDChi2, MinJpIPChi2, MinJpDauPt, MinJpDauIPChi2, MaxJpDauTrkChi2):
+    _code =  "( ADMASS('J/psi(1S)') < %(MaxJpDeltaM)s*MeV)"%locals()
+    _code+="& ( PT > %(MinJpPt)s )"%locals()
+    _code+="& ( VFASPF(VCHI2/VDOF) < %(MaxJpVertChi2DOF)s )"%locals()
+    _code+="& ( BPVVDCHI2 > %(MinJpPVVDChi2)s )"%locals()
+    _code+="& ( MIPCHI2DV(PRIMARY) > %(MinJpIPChi2)s )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinJpDauIPChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinJpDauIPChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinJpDauPt)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinJpDauPt)s , 2 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxJpDauTrkChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxJpDauTrkChi2)s , 2 )"%locals()
+    _JpFilter = FilterDesktop(Code = _code)
+    _stdJp = DataOnDemand(Location = "Phys/StdLooseDiMuon/Particles")
+    return Selection (name, Algorithm = _JpFilter, RequiredSelections = [_stdJp])
+
+def makeDS(name, MaxDSDeltaM, MinDSPt, MaxDSVertChi2DOF, MinDSPVVDChi2, MinDSIPChi2, MinDSPiPt, MinDSPiIPChi2,MaxDSPiTrkChi2, MaxDSD0DeltaM,
+           MinDSD0Pt, MaxDSD0VertChi2DOF, MinDSD0PVVDChi2, MinDSD0IPChi2, MinDSD0DauPt, MinDSD0DauIPChi2, MaxDSD0DauTrkChi2):
+    _code =  "(M-MAXTREE('D0'==ABSID,M)<%(MaxDSDeltaM)s)"%locals()
+    _code+="& ( PT > %(MinDSPt)s )"%locals()
+    _code+="& ( VFASPF(VCHI2/VDOF) < %(MaxDSVertChi2DOF)s )"%locals()
+    _code+="& ( BPVVDCHI2 > %(MinDSPVVDChi2)s )"%locals()
+    _code+="& ( MIPCHI2DV(PRIMARY) > %(MinDSIPChi2)s )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinDSPiPt)s , 1 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV ( PRIMARY ) > %(MinDSPiIPChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( TRCHI2DOF < %(MaxDSPiTrkChi2)s , 1 )"%locals()
+    _code+="& CHILDCUT ( PT > %(MinDSD0Pt)s , 2 )"%locals()
+    _code+="& CHILDCUT ( VFASPF(VCHI2/VDOF) < %(MaxDSD0VertChi2DOF)s , 2 )"%locals()
+    _code+="& CHILDCUT ( BPVVDCHI2 > %(MinDSD0PVVDChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( MIPCHI2DV(PRIMARY) > %(MinDSD0IPChi2)s , 2 )"%locals()
+    _code+="& CHILDCUT ( ADMASS('D0') < %(MaxDSD0DeltaM)s*MeV , 2 )"%locals()
+    _code+="& ( NINGENERATION ( ( PT > %(MinDSD0DauPt)s ) , 2 ) == 2 )"%locals()
+    _code+="& ( NINGENERATION ( ( MIPCHI2DV ( PRIMARY ) > %(MinDSD0DauIPChi2)s ) , 2 ) == 2 )"%locals()
+    _code+="& ( NINGENERATION ( ( TRCHI2DOF < %(MaxDSD0DauTrkChi2)s ) , 2 ) == 2 )"%locals()
+    _DSFilter = FilterDesktop(Code = _code)
+    _stdDS = DataOnDemand(Location = "Phys/StdLooseDstarWithD02KPi/Particles")
+    return Selection (name, Algorithm = _DSFilter, RequiredSelections = [_stdDS])
+                                                               
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingBeauty2Charm.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingBeauty2Charm.py
new file mode 100644
index 000000000..dea06de96
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/StrippingBeauty2Charm.py
@@ -0,0 +1,1935 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+'''
+B->DX, Lb -> LcX, etc.
+
+Author: M. Williams
+'''
+__author__ = ['Mike Williams']
+
+__all__ = ('Beauty2CharmConf', 'default_config')
+
+moduleName = 'Beauty2Charm'
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+import re
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from PhysSelPython.Wrappers import EventSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter
+from StandardParticles import (StdAllNoPIDsPions, StdAllNoPIDsKaons,
+                               StdAllNoPIDsProtons, StdNoPIDsUpPions,
+                               StdLooseMuons, StdNoPIDsUpKaons,
+                               StdLooseResolvedPi0, StdLooseMergedPi0)
+from StandardParticles import StdLooseAllPhotons, StdVeryLooseAllPhotons
+from Beauty2Charm_DBuilder import *
+from Beauty2Charm_HHBuilder import *
+from Beauty2Charm_HHHBuilder import *
+from Beauty2Charm_B2DXBuilder import *
+from Beauty2Charm_Lb2XBuilder import *
+from Beauty2Charm_LTUnbiased import *
+from Beauty2Charm_Bc2DDBuilder import *
+from Beauty2Charm_Bc2BXBuilder import *
+from Beauty2Charm_Bc2DXBuilder import *
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+# Default configuration dictionary
+default_config = {
+    'NAME': 'Beauty2Charm',
+    'BUILDERTYPE': 'Beauty2CharmConf',
+    'CONFIG': {
+        "ALL":
+        {  # Cuts made on all charged input particles in all lines (expt. upstream)
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'TRGHP_MAX': 0.4
+        },
+        "PIDPION": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDK_MAX': 20.,
+            'TRGHP_MAX': 0.4
+        },
+        "PIDKAON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDK_MIN': -10.,
+            'TRGHP_MAX': 0.4
+        },
+        "PIDPROTON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDp_MIN': -10.,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xc_PION": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 1.0,
+            'PIDK_MAX': 10.,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xc_KAON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '150*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 1.0,
+            'PIDK_MIN': -5.0,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xc_PROTON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '400*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 1.0,
+            'PIDp_MIN': -5.0,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xb_PION": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '300*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDK_MAX': 10.,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xb_KAON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '300*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDK_MIN': -5.0,
+            'TRGHP_MAX': 0.4
+        },
+        "Xibc_Xb_PROTON": {
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '300*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.,
+            'PIDp_MIN': -5.0,
+            'TRGHP_MAX': 0.4
+        },
+        "UPSTREAM": {  # Cuts made on all upstream particles
+            'TRCHI2DOF_MAX': 4.,
+            'PT_MIN': '100*MeV',
+            'P_MIN': '1000*MeV',
+            'MIPCHI2DV_MIN': 4.
+        },
+        "KS0": {  # Cuts made on all K shorts
+            'PT_MIN': '250*MeV',
+            'BPVVDCHI2_MIN': 36,
+            'MM_MIN': '467.*MeV',
+            'MM_MAX': '527.*MeV'
+        },
+        "VLKS0_LL": {  # cuts for StdVeryLooseKsLL
+            'PT_MIN': '0*MeV',
+            'BPVVDCHI2_MIN': 36,
+            'MM_MIN': '467.*MeV',
+            'MM_MAX': '527.*MeV'
+        },
+        "Lambda0": {  # Cuts made on all Lambda0's
+            'PT_MIN': '250*MeV',
+            'BPVVDCHI2_MIN': 36,
+            'MM_MIN': '1086.*MeV',
+            'MM_MAX': '1146.*MeV'
+        },
+        "Pi0": {  # Cuts made on all pi0's
+            'PT_MIN': '500*MeV',
+            'P_MIN': '1000*MeV',
+            'CHILDCL1_MIN': 0.25,
+            'CHILDCL2_MIN': 0.25,
+            'FROM_B_P_MIN': '2000*MeV',
+            'TIGHT_PT_MIN': '1500*MeV'
+        },
+        "gamma": {  # Cuts made on all photons
+            'PT_MIN': '400*MeV',
+            'CL_MIN': 0.25,
+            'ISNOTE_MIN': -999.0,
+            'PT_VLAPH': '145*MeV'
+        },
+        "D2X": {  # Cuts made on all D's and Lc's used in all lines
+            'ASUMPT_MIN': '1800*MeV',
+            'ADOCA12_MAX': '0.5*mm',
+            'ADOCA13_MAX': '0.5*mm',
+            'ADOCA23_MAX': '0.5*mm',
+            'ADOCA14_MAX': '0.5*mm',
+            'ADOCA24_MAX': '0.5*mm',
+            'ADOCA34_MAX': '0.5*mm',
+            'ADOCA15_MAX': '0.5*mm',
+            'ADOCA25_MAX': '0.5*mm',
+            'ADOCA35_MAX': '0.5*mm',
+            'ADOCA45_MAX': '0.5*mm',
+            'VCHI2DOF_MAX': 10,
+            'BPVVDCHI2_MIN': 36,
+            'BPVDIRA_MIN': 0,
+            'MASS_WINDOW': '100*MeV'
+        },
+        "LC_FOR_XIBC": {  # Cuts made on Lc's/Xic(0) used in Xibc lines
+            'ASUMPT_MIN': '1800*MeV',
+            'ADOCA12_MAX': '0.5*mm',
+            'ADOCA13_MAX': '0.5*mm',
+            'ADOCA23_MAX': '0.5*mm',
+            'ADOCA14_MAX': '0.5*mm',
+            'ADOCA24_MAX': '0.5*mm',
+            'ADOCA34_MAX': '0.5*mm',
+            'ADOCA15_MAX': '0.5*mm',
+            'ADOCA25_MAX': '0.5*mm',
+            'ADOCA35_MAX': '0.5*mm',
+            'ADOCA45_MAX': '0.5*mm',
+            'VCHI2DOF_MAX': 8,
+            'BPVVDCHI2_MIN': 36,
+            'BPVDIRA_MIN': 0,
+            'MASS_WINDOW': '50*MeV'
+        },
+        "D2X_FOR_DDX": {  # Cuts made on all D's and Lc's used in B->DDX lines
+            'ASUMPT_MIN': '1800*MeV',
+            'ADOCA12_MAX': '0.5*mm',
+            'ADOCA13_MAX': '0.5*mm',
+            'ADOCA23_MAX': '0.5*mm',
+            'ADOCA14_MAX': '0.5*mm',
+            'ADOCA24_MAX': '0.5*mm',
+            'ADOCA34_MAX': '0.5*mm',
+            'ADOCA15_MAX': '0.5*mm',
+            'ADOCA25_MAX': '0.5*mm',
+            'ADOCA35_MAX': '0.5*mm',
+            'ADOCA45_MAX': '0.5*mm',
+            'VCHI2DOF_MAX': 8,
+            'BPVVDCHI2_MIN': 50,
+            'BPVDIRA_MIN': 0,
+            'MASS_WINDOW': '100*MeV'
+        },
+        "B2X": {  # Cuts made on all B's and Lb's used in all lines
+            'SUMPT_MIN': '5000*MeV',
+            'VCHI2DOF_MAX': 10,
+            'BPVIPCHI2_MAX': 25,
+            'BPVLTIME_MIN': '0.2*ps',
+            'BPVDIRA_MIN': 0.999,
+            'AM_MIN': '4750*MeV',  # Lb->X sets this to 5200*MeV
+            'AM_MAX': '7000*MeV',  # B->Dh+-h0 sets this to 5800*MeV
+            'B2CBBDT_MIN': 0.05
+        },
+        "Bc2DD": {  # Cuts made on Bc -> DD lines
+            'SUMPT_MIN': '5000*MeV',
+            'VCHI2DOF_MAX': 10,
+            'BPVIPCHI2_MAX': 20,
+            'BPVLTIME_MIN': '0.05*ps',
+            'BPVDIRA_MIN': 0.999,
+            'AM_MIN': '4800*MeV',
+            'AM_MAX': '6800*MeV',
+            'B2CBBDT_MIN': -999.9
+        },
+        "Xibc": {  # Cuts made on Xibc -> Xc hh, LcD0, Xicc h lines
+            'SUMPT_MIN': '5000*MeV',
+            'VCHI2DOF_MAX': 8,
+            'BPVIPCHI2_MAX': 20,
+            'BPVLTIME_MIN': '0.05*ps',
+            'BPVDIRA_MIN': 0.99,
+            'AM_MIN': '5500*MeV',
+            'AM_MAX': '9000*MeV',
+            'B2CBBDT_MIN': -999.9
+        },
+        "XiccMu": {  # Cuts made on Xibc -> Xc hh, LcD0, Xicc h lines
+            'SUMPT_MIN': '4000*MeV',
+            'VCHI2DOF_MAX': 10,
+            'BPVIPCHI2_MAX': 200,
+            'BPVLTIME_MIN': '0.0*ps',
+            'BPVDIRA_MIN': 0.99,
+            'AM_MIN': '3000*MeV',
+            'AM_MAX': '8000*MeV',
+            'B2CBBDT_MIN': -999.9
+        },
+        "Bc2BX": {  # Cuts made on Bc -> BHH lines
+            'SUMPT_MIN': '1000*MeV',
+            'VCHI2DOF_MAX': 10,
+            'BPVIPCHI2_MAX': 25,
+            'BPVLTIME_MIN': '0.05*ps',
+            'BPVDIRA_MIN': 0.999,
+            'AM_MIN': '6000*MeV',
+            'AM_MAX': '7200*MeV',
+            'DZ1_MIN': '-1.5*mm',
+            'B2CBBDT_MIN': -999.9
+        },
+        "Bc2DX": {  # Cuts made on Bc -> DX lines
+            'SUMPT_MIN': '5000*MeV',
+            'VCHI2DOF_MAX': 10,
+            'BPVIPCHI2_MAX': 25,
+            'BPVLTIME_MIN': '0.05*ps',
+            'BPVDIRA_MIN': 0.999,
+            'AM_MIN': '5800*MeV',
+            'AM_MAX': '6800*MeV',
+            'B2CBBDT_MIN': -999.9
+        },
+        "Dstar": {  # Cuts made on all D*'s used in all lines
+            'ADOCA12_MAX': '0.5*mm',
+            'VCHI2DOF_MAX': 10,
+            'BPVVDCHI2_MIN': 36,
+            'BPVDIRA_MIN': 0,
+            'MASS_WINDOW': '600*MeV',  # was 50MeV
+            'DELTAMASS_MAX': '200*MeV',
+            'DELTAMASSLOOSE_MAX': '250*MeV',
+            'DM_DSPH_MAX': '250*MeV',
+            'DM_DSPH_MIN': '80*MeV'
+        },
+        "HH": {  # Cuts for rho, K*, phi, XHH Dalitz analyese, etc.
+            'MASS_WINDOW': {
+                'KST': '150*MeV',
+                'RHO': '150*MeV',
+                'PHI': '150*MeV'
+            },
+            'DAUGHTERS': {
+                'PT_MIN': '100*MeV',
+                'P_MIN': '2000*MeV'
+            },
+            'ADOCA12_MAX': '0.5*mm',
+            'VCHI2DOF_MAX': 16,
+            'BPVVDCHI2_MIN': 16,
+            'BPVDIRA_MIN': 0,
+            'ASUMPT_MIN': '1000*MeV',
+            'pP_MIN': '5000*MeV'  # for pH only (obviously)
+        },
+        "HHH": {  # Cuts for PiPiPi, KPiPi analyese, etc.
+            'MASS_WINDOW': {
+                'A1': '3500*MeV',
+                'K1': '4000*MeV',
+                'PPH': '3600*MeV',
+                'PHH': '4000*MeV'
+            },
+            'KDAUGHTERS': {
+                'PT_MIN': '100*MeV',
+                'P_MIN': '2000*MeV',
+                'PIDK_MIN': '-2'
+            },
+            'PiDAUGHTERS': {
+                'PT_MIN': '100*MeV',
+                'P_MIN': '2000*MeV',
+                'PIDK_MAX': '10'
+            },
+            'pDAUGHTERS': {
+                'PT_MIN': '100*MeV',
+                'P_MIN': '2000*MeV',
+                'PIDp_MIN': '-2'
+            },
+            'ADOCA12_MAX': '0.40*mm',
+            'ADOCA13_MAX': '0.40*mm',
+            'ADOCA23_MAX': '0.40*mm',
+            'ADOCA14_MAX': '0.40*mm',
+            'ADOCA24_MAX': '0.40*mm',
+            'ADOCA34_MAX': '0.40*mm',
+            'VCHI2DOF_MAX': 8,
+            'BPVVDCHI2_MIN': 16,
+            'BPVDIRA_MIN': 0.98,
+            'ASUMPT_MIN': '1250*MeV',
+            'MIPCHI2DV_MIN': 0.0,
+            'BPVVDRHO_MIN': '0.1*mm',
+            'BPVVDZ_MIN': '2.0*mm',
+            'PTMIN1': '300*MeV',
+            'PID': {
+                'TIGHTERPI': {
+                    'P': {
+                        'PIDp_MIN': -10
+                    },
+                    'PI': {
+                        'PIDK_MAX': 8
+                    },
+                    'K': {
+                        'PIDK_MIN': -10
+                    }
+                },
+                'REALTIGHTK': {
+                    'P': {
+                        'PIDp_MIN': -10
+                    },
+                    'PI': {
+                        'PIDK_MAX': 10
+                    },
+                    'K': {
+                        'PIDK_MIN': 4
+                    }
+                }
+            }
+        },
+        'PID': {
+            'P': {
+                'PIDp_MIN': -10
+            },
+            'PI': {
+                'PIDK_MAX': 20
+            },
+            'K': {
+                'PIDK_MIN': -10
+            },
+            'TIGHT': {
+                'P': {
+                    'PIDp_MIN': -5
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': -5
+                }
+            },
+            'TIGHTER': {
+                'P': {
+                    'PIDp_MIN': 0
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': 0
+                }
+            },
+            'TIGHTPI': {
+                'P': {
+                    'PIDp_MIN': -10
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': -10
+                }
+            },
+            'TIGHTER1': {
+                'P': {
+                    'PIDp_MIN': 0
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': -1
+                }
+            },
+            'TIGHTER2': {
+                'P': {
+                    'PIDp_MIN': 5
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': 0
+                }
+            },
+            'TIGHTER3': {
+                'P': {
+                    'PIDp_MIN': 0
+                },
+                'PI': {
+                    'PIDK_MAX': 10
+                },
+                'K': {
+                    'PIDK_MIN': -10
+                }
+            },
+            'SPECIAL': {
+                'P': {
+                    'PIDp_MIN': -5
+                },
+                'PI': {
+                    'PIDK_MAX': 5
+                },
+                'K': {
+                    'PIDK_MIN': 5
+                }
+            },
+            'SPECIALPI': {
+                'P': {
+                    'PIDp_MIN': -10
+                },
+                'PI': {
+                    'PIDK_MAX': 12
+                },
+                'K': {
+                    'PIDK_MIN': -10
+                }
+            }
+        },
+        'FlavourTagging': [
+            'B02DstarMuNuDst2D0Pi_D2HHHHBeauty2CharmLine',
+            'B02DstarMuNuWSDst2D0Pi_D2HHHHBeauty2CharmLine',
+            'B02DstarMuNuDst2D0Pi_D2HHHHWSBeauty2CharmLine',
+            'B02DstarMuNuWSDst2D0Pi_D2HHHHWSBeauty2CharmLine',
+            'B2D0PiPiPiD2HHPIDBeauty2CharmLine',
+            'B02DKD2Pi0HHHMergedBeauty2CharmLine',
+            'B02DKD2Pi0HHHResolvedBeauty2CharmLine',
+            'B02DPiD2Pi0HHHMergedBeauty2CharmLine',
+            'B02DPiD2Pi0HHHResolvedBeauty2CharmLine',
+            'B02D0KKD2HHBeauty2CharmLine',
+            'B02D0KPiD2HHBeauty2CharmLine',
+            'B02DHHWSD2HHBeauty2CharmLine',
+            'B02D0PPbarD2HHBeauty2CharmLine',
+            'B02D0PPbarWSD2HHBeauty2CharmLine',
+            'B02D0KKD2HHWSBeauty2CharmLine',
+            'B02D0PiPiD2HHWSBeauty2CharmLine',
+            'B02D0KPiD2HHWSBeauty2CharmLine',
+            'B02DHHWSD2HHWSBeauty2CharmLine',
+            'B02D0KSDDD2HHBeauty2CharmLine',
+            'B02D0KSLLD2HHBeauty2CharmLine',
+            'B02DKD2PhiMuNuBeauty2CharmLine',
+            'B02DPiD2PhiMuNuBeauty2CharmLine',
+            'B02DKWSD2PhiMuNuBeauty2CharmLine',
+            'B02DPiWSD2PhiMuNuBeauty2CharmLine',
+            #'B02DKD2HHHBeauty2CharmLine',
+            #'B02DPiD2HHHBeauty2CharmLine',
+            #'B02DKWSD2HHHBeauty2CharmLine',
+            #'B02DPiWSD2HHHBeauty2CharmLine',
+            'B02DKD2HHHUPBeauty2CharmLine',
+            #'B02DPiD2HHHUPBeauty2CharmLine',
+            #'B02DKWSD2HHHUPBeauty2CharmLine',
+            #'B02DPiWSD2HHHUPBeauty2CharmLine',
+            #'B02DPiNoIPD2HHHCFPIDBeauty2CharmLine',
+            'B02DPiWSNoIPD2HHHCFPIDBeauty2CharmLine',
+            #'B02DPiNoIPDs2HHHPIDBeauty2CharmLine',
+            'B02DPiWSNoIPDs2HHHPIDBeauty2CharmLine',
+            'B02DKsKDDD2HHHCFPIDBeauty2CharmLine',
+            'B02DKsKLLD2HHHCFPIDBeauty2CharmLine',
+            #'B02DKPi0ResolvedD2HHHCFPIDBeauty2CharmLine',
+            'B02DKsPiDDD2HHHCFPIDBeauty2CharmLine',
+            #'B02DPiPi0MergedD2HHHCFPIDBeauty2CharmLine',
+            #'B02DKPi0MergedD2HHHCFPIDBeauty2CharmLine',
+            'B02DPiPi0ResolvedD2HHHCFPIDBeauty2CharmLine',
+            'B02DKsPiLLD2HHHCFPIDBeauty2CharmLine',
+            #'B02DKPi0MergedWSD2HHHCFPIDBeauty2CharmLine',
+            'B02DKsPiDDWSD2HHHCFPIDBeauty2CharmLine',
+            #'B02DKPi0ResolvedWSD2HHHCFPIDBeauty2CharmLine',
+            #'B02DPiPi0MergedWSD2HHHCFPIDBeauty2CharmLine',
+            'B02DKsPiLLWSD2HHHCFPIDBeauty2CharmLine',
+            'B02DPiPi0ResolvedWSD2HHHCFPIDBeauty2CharmLine',
+            'B02DKsKLLWSD2HHHCFPIDBeauty2CharmLine',
+            'B02DKsKDDWSD2HHHCFPIDBeauty2CharmLine',
+            'B02DRhoPMD2HHHCFPIDBeauty2CharmLine',
+            'B02DKstarPMD2HHHCFPIDBeauty2CharmLine',
+            'B02DKD2KSHLLBeauty2CharmLine',
+            'B02DPiD2KSHLLBeauty2CharmLine',
+            'B02DKWSD2KSHLLBeauty2CharmLine',
+            'B02DPiWSD2KSHLLBeauty2CharmLine',
+            'B02DKD2KSHDDBeauty2CharmLine',
+            'B02DPiD2KSHDDBeauty2CharmLine',
+            'B02DKWSD2KSHDDBeauty2CharmLine',
+            'B02DPiWSD2KSHDDBeauty2CharmLine',
+            #'B02D0KKD2KSHHLLBeauty2CharmLine',
+            #'B02D0PiPiD2KSHHLLBeauty2CharmLine',
+            'B02D0KPiD2KSHHLLBeauty2CharmLine',
+            'B02DHHWSD2KSHHLLBeauty2CharmLine',
+            #'B02D0KKD2KSHHDDBeauty2CharmLine',
+            #'B02D0PiPiD2KSHHDDBeauty2CharmLine',
+            'B02D0KPiD2KSHHDDBeauty2CharmLine',
+            'B02DHHWSD2KSHHDDBeauty2CharmLine',
+            #'B02D0KKD2KSHHLLWSBeauty2CharmLine',
+            #'B02D0PiPiD2KSHHLLWSBeauty2CharmLine',
+            'B02D0KPiD2KSHHLLWSBeauty2CharmLine',
+            'B02DHHWSD2KSHHLLWSBeauty2CharmLine',
+            #'B02D0KKD2KSHHDDWSBeauty2CharmLine',
+            #'B02D0PiPiD2KSHHDDWSBeauty2CharmLine',
+            'B02D0KPiD2KSHHDDWSBeauty2CharmLine',
+            'B02DHHWSD2KSHHDDWSBeauty2CharmLine',
+            #'B02DstarKDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            #'B02DstarPiDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            #'B02DstarKDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            #'B02DstarPiDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            #'B02DstarKDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            #'B02DstarPiDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            #'B02DstarKDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            #'B02DstarPiDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'B02DstarKDst2D0Pi_D2KSHHLLBeauty2CharmLine',
+            'B02DstarPiDst2D0Pi_D2KSHHLLBeauty2CharmLine',
+            'B02DstarKDst2D0Pi_D2KSHHDDBeauty2CharmLine',
+            'B02DstarPiDst2D0Pi_D2KSHHDDBeauty2CharmLine',
+            #'B02DstarMuNuDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            #'B02DstarMuNuWSDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            #'B02DstarMuNuDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            #'B02DstarMuNuWSDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            #'B02DstarMuNuDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            #'B02DstarMuNuWSDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            #'B02DstarMuNuDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            #'B02DstarMuNuWSDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'B02DstarMuNuDst2D0Pi_D2KSHHLLBeauty2CharmLine',
+            'B02DstarMuNuWSDst2D0Pi_D2KSHHLLBeauty2CharmLine',
+            'B02DstarMuNuDst2D0Pi_D2KSHHDDBeauty2CharmLine',
+            'B02DstarMuNuWSDst2D0Pi_D2KSHHDDBeauty2CharmLine',
+            'B02DstarKsPiDDDst2D0PiBeauty2CharmLine',
+            'B02DstarKsKDDDst2D0PiBeauty2CharmLine',
+            'B02DstarKsKLLDst2D0PiBeauty2CharmLine',
+            'B02DstarKsPiLLDst2D0PiBeauty2CharmLine',
+            'B02DstarKsKDDWSDst2D0PiBeauty2CharmLine',
+            'B02DstarKsKLLWSDst2D0PiBeauty2CharmLine',
+            'B02DstarKsPiDDWSDst2D0PiBeauty2CharmLine',
+            'B02DstarKsPiLLWSDst2D0PiBeauty2CharmLine',
+            'B02D0KKD2HHHHBeauty2CharmLine',
+            'B02D0PiPiD2HHHHBeauty2CharmLine',
+            'B02D0KPiD2HHHHBeauty2CharmLine',
+            'B02DHHWSD2HHHHBeauty2CharmLine',
+            'B02D0KKD2HHHHWSBeauty2CharmLine',
+            'B02D0PiPiD2HHHHWSBeauty2CharmLine',
+            'B02D0KPiD2HHHHWSBeauty2CharmLine',
+            'B02DHHWSD2HHHHWSBeauty2CharmLine',
+            'B02D0KSDDD2K3PiBeauty2CharmLine',
+            'B02D0KSLLD2K3PiBeauty2CharmLine',
+            'B02D0KKD2Pi0HHResolvedBeauty2CharmLine',
+            'B02D0PiPiD2Pi0HHResolvedBeauty2CharmLine',
+            'B02D0KPiD2Pi0HHResolvedBeauty2CharmLine',
+            'B02DHHWSD2Pi0HHResolvedBeauty2CharmLine',
+            'B02DKWSD2Pi0HHHResolvedBeauty2CharmLine',
+            'B02DPiWSD2Pi0HHHResolvedBeauty2CharmLine',
+            'B02DKWSD2Pi0HHHMergedBeauty2CharmLine',
+            'B02DPiWSD2Pi0HHHMergedBeauty2CharmLine',
+            'B02DKPiPiSSD2HHHPIDBeauty2CharmLine',
+            'B02DKKPiD2HHHPIDBeauty2CharmLine',
+            'B02DKPiPiSSWSD2HHHPIDBeauty2CharmLine',
+            'B02DKKPiWSD2HHHPIDBeauty2CharmLine',
+            'B02DKPiPiWSD2HHHPIDBeauty2CharmLine',
+            'B02DPiPiPiWSD2HHHPIDBeauty2CharmLine',
+            #'B02DppbarKD2HHHBeauty2CharmLine',
+            #'B02DppbarPiD2HHHBeauty2CharmLine',
+            'B02DstKKPiDstar2D0PiPIDBeauty2CharmLine',
+            'B02DstKPiPiDstar2D0PiPIDBeauty2CharmLine',
+            'B02DstPiPiPiDstar2D0PiPIDBeauty2CharmLine',
+            'B02DstPiPiPiWSDstar2D0PiPIDBeauty2CharmLine',
+            'B02DstKPiPiWSDstar2D0PiPIDBeauty2CharmLine',
+            'B02DstKKPiWSDstar2D0PiPIDBeauty2CharmLine',
+            'B02DDWSBeauty2CharmLine',
+            'B02D0D0D02K3PiD02K3PiBeauty2CharmLine',
+            'B02D0D0D02HHD02K3PiBeauty2CharmLine',
+            'B02D0D0D02HHD02HHBeauty2CharmLine',
+            'B02DstDstWSBeauty2CharmLine',
+            'B02D0DKBeauty2CharmLine',
+            'B02D0DKD02K3PiBeauty2CharmLine',
+            'B02D0DKWSBeauty2CharmLine',
+            'B02D0DKWSD02K3PiBeauty2CharmLine',
+            'B02DstD0KBeauty2CharmLine',
+            'B02DstD0KD02K3PiBeauty2CharmLine',
+            'B02DstD0KDstarD02K3PiBeauty2CharmLine',
+            #'B02DstD0KDstarD02K3PiD02K3PiBeauty2CharmLine',
+            'B02DstD0KWSBeauty2CharmLine',
+            'B02DstD0KWSD02K3PiBeauty2CharmLine',
+            'B02DstD0KWSDstarD02K3PiBeauty2CharmLine',
+            'B02DstD0KWSDstarD02K3PiD02K3PiBeauty2CharmLine',
+            #'B02D0D0KstD02K3PiD02K3PiBeauty2CharmLine',
+            'B02D0D0KstD02HHD02HHBeauty2CharmLine',
+            #'B02D0D0KstD02HHD02K3PiBeauty2CharmLine',
+            #'B02DDKstBeauty2CharmLine',
+            #'B02DstDKstBeauty2CharmLine',
+            #'B02DstDKstDstarD02K3PiBeauty2CharmLine',
+            'B02DstDstKstBeauty2CharmLine',
+            'B02DstDstKstDstarD02K3PiBeauty2CharmLine',
+            'B02DstDstKstDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'B02DDKSDDBeauty2CharmLine',
+            'B02DDKSWSDDBeauty2CharmLine',
+            'B02DstDKSDDBeauty2CharmLine',
+            'B02DstDKSDDDstarD02K3PiBeauty2CharmLine',
+            'B02DstDKSWSDDBeauty2CharmLine',
+            'B02DstDKSWSDDDstarD02K3PiBeauty2CharmLine',
+            'B02D0D0KSD02K3PiD02K3PiDDBeauty2CharmLine',
+            'B02D0D0KSD02HHD02HHDDBeauty2CharmLine',
+            'B02D0D0KSD02HHD02K3PiDDBeauty2CharmLine',
+            'B02DstDstKSDDBeauty2CharmLine',
+            'B02DstDstKSDDDstarD02K3PiBeauty2CharmLine',
+            'B02DstDstKSDDDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'B02DstDstKSWSDDBeauty2CharmLine',
+            'B02DstDstKSWSDDDstarD02K3PiBeauty2CharmLine',
+            'B02DstDstKSWSDDDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'B02DDKSLLBeauty2CharmLine',
+            'B02DDKSWSLLBeauty2CharmLine',
+            'B02DstDKSLLBeauty2CharmLine',
+            'B02DstDKSLLDstarD02K3PiBeauty2CharmLine',
+            'B02DstDKSWSLLBeauty2CharmLine',
+            'B02DstDKSWSLLDstarD02K3PiBeauty2CharmLine',
+            'B02D0D0KSD02K3PiD02K3PiLLBeauty2CharmLine',
+            'B02D0D0KSD02HHD02HHLLBeauty2CharmLine',
+            'B02D0D0KSD02HHD02K3PiLLBeauty2CharmLine',
+            'B02DstDstKSLLBeauty2CharmLine',
+            'B02DstDstKSLLDstarD02K3PiBeauty2CharmLine',
+            'B02DstDstKSLLDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'B02DstDstKSWSLLBeauty2CharmLine',
+            'B02DstDstKSWSLLDstarD02K3PiBeauty2CharmLine',
+            'B02DstDstKSWSLLDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            #'B02DDKKBeauty2CharmLine',
+            #'B02DstDKKBeauty2CharmLine',
+            #'B02DstDKKDstarD02K3PiBeauty2CharmLine',
+            'B02DstDstKKBeauty2CharmLine',
+            'B02DstDstKKDstarD02K3PiBeauty2CharmLine',
+            'B02DstDstKKDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'B02LcpbarKKLc2PKPiBeauty2CharmLine',
+            'B02LcpbarpbarpLc2PKPiBeauty2CharmLine',
+            'B02LcpbarPiPiLc2PKPiBeauty2CharmLine',
+            'B02LcpbarKPiLc2PKPiBeauty2CharmLine',
+            'B02LcpbarPiPiWSLc2PKPiBeauty2CharmLine',
+            'B02LcpbarpbarpWSLc2PKPiBeauty2CharmLine',
+            'B02LcpbarKKWSLc2PKPiBeauty2CharmLine',
+            'B02LcpbarKPiWSLc2PKPiBeauty2CharmLine',
+            'B02LcpbarKSDDLc2PKPiBeauty2CharmLine',
+            'B02LcpbarKSWSDDLc2PKPiBeauty2CharmLine',
+            'B02LcpbarKSLLLc2PKPiBeauty2CharmLine',
+            'B02LcpbarKSWSLLLc2PKPiBeauty2CharmLine',
+            'B02LcLambda0KLc2PKPiBeauty2CharmLine',
+            'B02LcLambda0PiLc2PKPiBeauty2CharmLine',
+            'B02LcLambda0PiWSLc2PKPiBeauty2CharmLine',
+            'B02LcLambda0KWSLc2PKPiBeauty2CharmLine',
+            'B02DKLTUBD2HHHBeauty2CharmLine',
+            'B02DsKPiPiLTUBD2HHHBeauty2CharmLine',
+            'B02DsstarKLTUBDsstar2DGammaD2HHHBeauty2CharmLine',
+            'B02Dst0DKDst02D0Pi0ResolvedD2HHHBeauty2CharmLine',
+            'B02Dst0DKDst02D0GammaD2HHHBeauty2CharmLine',
+            'B02DsstKsPiLLDsst2DGammaD2HHHBeauty2CharmLine',
+            'B02DsstKsPiDDDsst2DGammaD2HHHBeauty2CharmLine',
+            'B02D0MuMuD2HHBeauty2CharmLine',
+            'B02D0MuMuWSD2HHBeauty2CharmLine',
+            'B02D0MuMuD2HHHHBeauty2CharmLine',
+            'B02D0MuMuWSD2HHHHBeauty2CharmLine',
+            'B02D0MuMuD2KSHHLLBeauty2CharmLine',
+            'B02D0MuMuWSD2KSHHLLBeauty2CharmLine',
+            'B02D0MuMuD2KSHHDDBeauty2CharmLine',
+            'B02D0MuMuWSD2KSHHDDBeauty2CharmLine'
+        ],
+        'RawEvents': [
+            'B02DKD2HHHBeauty2CharmLine', 'B02DPiD2HHHBeauty2CharmLine',
+            'B02DsstarPiDsstar2DGammaD2HHHBeauty2CharmLine',
+            'B02DsstarKDsstar2DGammaD2HHHBeauty2CharmLine',
+            'B02DsstarKMCwNoPIDDsstar2DGammaD2HHHBeauty2CharmLine'
+        ],
+        'MDSTChannels': [],
+        'RelatedInfoTools': [
+            {
+                "Type": "RelInfoConeVariables",
+                "ConeAngle": 1.5,
+                "Variables": ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "Location": 'P2ConeVar1'
+            },
+            {
+                "Type": "RelInfoConeVariables",
+                "ConeAngle": 1.7,
+                "Variables": ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "Location": 'P2ConeVar2'
+            },
+            {
+                "Type": "RelInfoConeVariables",
+                "ConeAngle": 1.0,
+                "Variables": ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "Location": 'P2ConeVar3'
+            },
+        ],
+        "Prescales": {  # Prescales for individual lines
+            'RUN_BY_DEFAULT': True,  # False = lines off by default
+            'RUN_RE': ['.*'],
+            # Defaults are defined in, eg, Beauty2Charm_B2DXBuilder.py.  Put the full
+            # line name here to override. E.g. 'B2D0HD2HHBeauty2CharmTOSLine': 0.5.
+            'B02DKLTUBD2HHHBeauty2CharmLine': 0.04,
+            'B02DsKPiPiLTUBD2HHHBeauty2CharmLine': 0.004,
+            'B02DsstarKLTUBDsstar2DGammaD2HHHBeauty2CharmLine': 0.19,
+            'B02DKWSD2HHHBeauty2CharmLine': 1.0,
+            'B02DPiWSD2HHHBeauty2CharmLine': 1.0,
+            'B02DPiWSNoIPD2HHHCFPIDBeauty2CharmLine': 1.0,
+            'B02DPiWSNoIPDs2HHHPIDBeauty2CharmLine': 1.0,
+            'B02DPiPiPiWSD2HHHPIDBeauty2CharmLine': 1.0,
+            'B02DKPiPiWSD2HHHPIDBeauty2CharmLine': 1.0,
+            'B2Dstar0PiDst02D0Pi0D2KSHHLLWSBeauty2CharmLine': 0.1,
+            'B2Dstar0PiDst02D0Pi0D2KSHHDDWSBeauty2CharmLine': 0.1,
+            'B2Dstar0PiDst02D0GammaD2KSHHLLWSBeauty2CharmLine': 0.1,
+            'B2Dstar0PiDst02D0GammaD2KSHHDDWSBeauty2CharmLine': 0.1,
+            'B2Dstar0KDst02D0Pi0D2KSHHLLWSBeauty2CharmLine': 0.1,
+            'B2Dstar0KDst02D0Pi0D2KSHHDDWSBeauty2CharmLine': 0.1,
+            'B2Dstar0KDst02D0GammaD2KSHHLLWSBeauty2CharmLine': 0.1,
+            'B2Dstar0KDst02D0GammaD2KSHHDDWSBeauty2CharmLine': 0.1
+        },
+        'GECNTrkMax':
+        500
+    },
+    'STREAMS': {
+        'BhadronCompleteEvent': [
+            'StrippingB02DKD2HHHBeauty2CharmLine',
+            'StrippingB02DPiD2HHHBeauty2CharmLine',
+            'StrippingB2D0KD2HHBeauty2CharmLine',
+            'StrippingB2D0PiD2HHBeauty2CharmLine',
+            'StrippingB2D0PiNoIPD2KPIPIDBeauty2CharmLine',
+            'StrippingB02DPiNoIPD2HHHCFPIDBeauty2CharmLine',
+            'StrippingLb2XicPiNoIPXic2PKPiBeauty2CharmLine',
+            'StrippingXib2Xic0PiNoIPXic02PKKPiBeauty2CharmLine',
+            'StrippingLb2LcPiNoIPLc2PKPiBeauty2CharmLine',
+            'StrippingOmegab2Omegac0PiNoIPOmegac02PKKPiBeauty2CharmLine',
+            'StrippingB2D0PiPiPiD2HHTIGHTBeauty2CharmLine',
+            'StrippingB2D0PiD2HHHHTIGHTBeauty2CharmLine',
+            'StrippingB02DsstarPiDsstar2DGammaD2HHHBeauty2CharmLine',
+            'StrippingB02DsstarKDsstar2DGammaD2HHHBeauty2CharmLine',
+            'StrippingB02DsstarKMCwNoPIDDsstar2DGammaD2HHHBeauty2CharmLine',
+            'StrippingB02DDBeauty2CharmLine', 'StrippingB2D0DBeauty2CharmLine',
+            'StrippingB02DstDBeauty2CharmLine',
+            'StrippingB02DstDD02K3PiBeauty2CharmLine',
+            'StrippingB02D0PiPiD2HHBeauty2CharmLine',
+            'StrippingB02DstDstBeauty2CharmLine',
+            'StrippingB02DKPiPiD2HHHPIDBeauty2CharmLine',
+            'StrippingB02DPiPiPiD2HHHPIDBeauty2CharmLine',
+            'StrippingB2D0PiD2KSHHLLPartialDBeauty2CharmLine',
+            'StrippingB2D0PiD2KSHHDDPartialDBeauty2CharmLine',
+            'StrippingB2D0KD2KSHHLLPartialDBeauty2CharmLine',
+            'StrippingB2D0KD2KSHHDDPartialDBeauty2CharmLine',
+            'StrippingB02D0KKDSTD2HHBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiLc2PKPiFullDSTBeauty2CharmLine',
+            'StrippingXib02XicPiPiPiXic2PKPiFullDSTBeauty2CharmLine',
+            'StrippingXib2Xic0PiPiPiXic02PKKPiFullDSTBeauty2CharmLine',
+            'StrippingOmegab2Omegac0PiPiPiOmegac02PKKPiFullDSTBeauty2CharmLine'
+        ],
+        'Bhadron': [
+            'StrippingB2Dstar0KDst02D0Pi0D2HHHHMergedBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0Pi0D2HHHHMergedBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0Pi0D2HHHHResolvedBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0Pi0D2HHHHResolvedBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0GammaD2HHHHBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0GammaD2HHHHBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0Pi0D2HHResolvedBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0Pi0D2HHResolvedBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0GammaD2HHBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0GammaD2HHBeauty2CharmLine',
+            'StrippingB2D0PiD2HHmuDSTBeauty2CharmLine',
+            'StrippingB2D0KsPiLLD2HHWSBeauty2CharmLine',
+            'StrippingB2D0KsPiDDD2HHWSBeauty2CharmLine',
+            'StrippingB2D0KsPiLLD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB2D0KsPiLLD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB2D0KsPiDDD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB2D0KsPiDDD2KSHHDDWSBeauty2CharmLine',
+            'StrippingUpsilon2BBBeauty2CharmLine',
+            'StrippingBc2BPiPiB2D0HD02HHBeauty2CharmLine',
+            'StrippingBc2BPiPiWSB2D0HD02HHBeauty2CharmLine',
+            'StrippingBc2BPiKB2D0HD02HHBeauty2CharmLine',
+            'StrippingBc2BPiKWSB2D0HD02HHBeauty2CharmLine',
+            'StrippingBc2BKPiB2D0HD02HHBeauty2CharmLine',
+            'StrippingBc2BKKB2D0HD02HHBeauty2CharmLine',
+            'StrippingBc2BKKWSB2D0HD02HHBeauty2CharmLine',
+            'StrippingBc2BPiPiB2D0HD02HHHHBeauty2CharmLine',
+            'StrippingBc2BPiPiWSB2D0HD02HHHHBeauty2CharmLine',
+            'StrippingBc2BPiKB2D0HD02HHHHBeauty2CharmLine',
+            'StrippingBc2BPiKWSB2D0HD02HHHHBeauty2CharmLine',
+            'StrippingBc2BKPiB2D0HD02HHHHBeauty2CharmLine',
+            'StrippingBc2BKKB2D0HD02HHHHBeauty2CharmLine',
+            'StrippingBc2BKKWSB2D0HD02HHHHBeauty2CharmLine',
+            'StrippingBc2BPiPiB2DHHD2HHHCFPIDBeauty2CharmLine',
+            'StrippingBc2BPiPiWSB2DHHD2HHHCFPIDBeauty2CharmLine',
+            'StrippingBc2BPiKB2DHHD2HHHCFPIDBeauty2CharmLine',
+            'StrippingBc2BPiKWSB2DHHD2HHHCFPIDBeauty2CharmLine',
+            'StrippingBc2BKPiB2DHHD2HHHCFPIDBeauty2CharmLine',
+            'StrippingBc2BKKB2DHHD2HHHCFPIDBeauty2CharmLine',
+            'StrippingBc2BKKWSB2DHHD2HHHCFPIDBeauty2CharmLine',
+            'StrippingBc2BPiPiB2D0HHHD02HHPIDBeauty2CharmLine',
+            'StrippingBc2BPiPiWSB2D0HHHD02HHPIDBeauty2CharmLine',
+            'StrippingBc2BPiKB2D0HHHD02HHPIDBeauty2CharmLine',
+            'StrippingBc2BPiKWSB2D0HHHD02HHPIDBeauty2CharmLine',
+            'StrippingBc2BKPiB2D0HHHD02HHPIDBeauty2CharmLine',
+            'StrippingBc2BKKB2D0HHHD02HHPIDBeauty2CharmLine',
+            'StrippingBc2BKKWSB2D0HHHD02HHPIDBeauty2CharmLine',
+            'StrippingBc2BPiPiB2D0DBeauty2CharmLine',
+            'StrippingBc2BPiPiWSB2D0DBeauty2CharmLine',
+            'StrippingBc2BPiKB2D0DBeauty2CharmLine',
+            'StrippingBc2BPiKWSB2D0DBeauty2CharmLine',
+            'StrippingBc2BKPiB2D0DBeauty2CharmLine',
+            'StrippingBc2BKKB2D0DBeauty2CharmLine',
+            'StrippingBc2BKKWSB2D0DBeauty2CharmLine',
+            'StrippingBc2D0PiD02HHPIDBeauty2CharmLine',
+            'StrippingBc2D0PiD02HHHHPIDBeauty2CharmLine',
+            'StrippingBc2D0KD02HHPIDBeauty2CharmLine',
+            'StrippingBc2D0KD02HHHHPIDBeauty2CharmLine',
+            'StrippingBc2DPiPiD2HHHPIDBeauty2CharmLine',
+            'StrippingBc2DHHWSD2HHHPIDBeauty2CharmLine',
+            'StrippingBc2DHHNPD2HHHPIDBeauty2CharmLine',
+            'StrippingBc2DKPiD2HHHPIDBeauty2CharmLine',
+            'StrippingBc2DKKD2HHHPIDBeauty2CharmLine',
+            'StrippingBc2DstarPiPiDstar2D0PiD02HHPIDBeauty2CharmLine',
+            'StrippingBc2DstarHHWSDstar2D0PiD02HHPIDBeauty2CharmLine',
+            'StrippingBc2DstarHHNPDstar2D0PiD02HHPIDBeauty2CharmLine',
+            'StrippingBc2DstarKPiDstar2D0PiD02HHPIDBeauty2CharmLine',
+            'StrippingBc2DstarKKDstar2D0PiD02HHPIDBeauty2CharmLine',
+            'StrippingBc2DstarPiKDstar2D0PiD02HHPIDBeauty2CharmLine',
+            'StrippingBc2DstarPiPiDstar2D0PiD02HHHHPIDBeauty2CharmLine',
+            'StrippingBc2DstarHHWSDstar2D0PiD02HHHHPIDBeauty2CharmLine',
+            'StrippingBc2DstarHHNPDstar2D0PiD02HHHHPIDBeauty2CharmLine',
+            'StrippingBc2DstarKPiDstar2D0PiD02HHHHPIDBeauty2CharmLine',
+            'StrippingBc2DstarKKDstar2D0PiD02HHHHPIDBeauty2CharmLine',
+            'StrippingBc2DstarPiKDstar2D0PiD02HHHHPIDBeauty2CharmLine',
+            'StrippingB2D0KD2HHWSBeauty2CharmLine',
+            'StrippingB2D0PiD2HHWSBeauty2CharmLine',
+            #'StrippingB2D0KD2HHUPBeauty2CharmLine',
+            'StrippingB2D0PiD2HHUPBeauty2CharmLine',
+            'StrippingB02DKWSD2HHHBeauty2CharmLine',
+            'StrippingB02DPiWSD2HHHBeauty2CharmLine',
+            'StrippingB02DPiNoIPDs2HHHPIDBeauty2CharmLine',
+            'StrippingB02DKD2Pi0HHHMergedBeauty2CharmLine',
+            'StrippingB02DKD2Pi0HHHResolvedBeauty2CharmLine',
+            'StrippingB02DPiD2Pi0HHHMergedBeauty2CharmLine',
+            'StrippingB02DPiD2Pi0HHHResolvedBeauty2CharmLine',
+            'StrippingB02D0KKD2HHBeauty2CharmLine',
+            'StrippingB02D0KPiD2HHBeauty2CharmLine',
+            'StrippingB02DHHWSD2HHBeauty2CharmLine',
+            'StrippingB02D0PPbarD2HHBeauty2CharmLine',
+            'StrippingB02D0PPbarWSD2HHBeauty2CharmLine',
+            'StrippingB02D0KKD2HHWSBeauty2CharmLine',
+            'StrippingB02D0PiPiD2HHWSBeauty2CharmLine',
+            'StrippingB02D0KPiD2HHWSBeauty2CharmLine',
+            'StrippingB02DHHWSD2HHWSBeauty2CharmLine',
+            'StrippingB02D0KSDDD2HHBeauty2CharmLine',
+            'StrippingB02D0KSLLD2HHBeauty2CharmLine',
+            'StrippingB02Dst0PiPiDst02D0Pi0D2HHResolvedBeauty2CharmLine',
+            'StrippingB02Dst0KPiDst02D0Pi0D2HHResolvedBeauty2CharmLine',
+            'StrippingB02Dst0KKDst02D0Pi0D2HHResolvedBeauty2CharmLine',
+            'StrippingB02Dst0HHWSDst02D0Pi0D2HHResolvedBeauty2CharmLine',
+            'StrippingB02Dst0PiPiDst02D0GammaD2HHBeauty2CharmLine',
+            'StrippingB02Dst0KPiDst02D0GammaD2HHBeauty2CharmLine',
+            'StrippingB02Dst0KKDst02D0GammaD2HHBeauty2CharmLine',
+            'StrippingB02Dst0HHWSDst02D0GammaD2HHBeauty2CharmLine',
+            'StrippingB2D0KsPiDDD2HHBeauty2CharmLine',
+            'StrippingB2D0KPi0ResolvedD2HHBeauty2CharmLine',
+            'StrippingB2D0KsPiLLD2HHBeauty2CharmLine',
+            'StrippingB2D0PiPi0ResolvedD2HHBeauty2CharmLine',
+            'StrippingB2D0KsPiDDD2KSHHLLBeauty2CharmLine',
+            'StrippingB2D0KPi0ResolvedD2KSHHLLBeauty2CharmLine',
+            'StrippingB2D0KsPiLLD2KSHHLLBeauty2CharmLine',
+            'StrippingB2D0PiPi0ResolvedD2KSHHLLBeauty2CharmLine',
+            'StrippingB2D0KsPiDDD2KSHHDDBeauty2CharmLine',
+            'StrippingB2D0KPi0ResolvedD2KSHHDDBeauty2CharmLine',
+            'StrippingB2D0KsPiLLD2KSHHDDBeauty2CharmLine',
+            'StrippingB2D0PiPi0ResolvedD2KSHHDDBeauty2CharmLine',
+            'StrippingB2D0KsPiDDD2HHHHBeauty2CharmLine',
+            'StrippingB2D0KPi0ResolvedD2HHHHBeauty2CharmLine',
+            'StrippingB2D0KsPiLLD2HHHHBeauty2CharmLine',
+            'StrippingB2D0PiPi0ResolvedD2HHHHBeauty2CharmLine',
+            'StrippingB2D0KsPiDDD2HHHHWSBeauty2CharmLine',
+            'StrippingB2D0KPi0ResolvedD2HHHHWSBeauty2CharmLine',
+            'StrippingB2D0KsPiLLD2HHHHWSBeauty2CharmLine',
+            'StrippingB2D0PiPi0ResolvedD2HHHHWSBeauty2CharmLine',
+            'StrippingB02DKD2PhiMuNuBeauty2CharmLine',
+            'StrippingB02DPiD2PhiMuNuBeauty2CharmLine',
+            'StrippingB02DKWSD2PhiMuNuBeauty2CharmLine',
+            'StrippingB02DPiWSD2PhiMuNuBeauty2CharmLine',
+            'StrippingB02DKD2HHHUPBeauty2CharmLine',
+            #'StrippingB02DPiD2HHHUPBeauty2CharmLine',
+            #'StrippingB02DKWSD2HHHUPBeauty2CharmLine',
+            #'StrippingB02DPiWSD2HHHUPBeauty2CharmLine',
+            'StrippingB02DPiWSNoIPD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DPiWSNoIPDs2HHHPIDBeauty2CharmLine',
+            'StrippingB02DKsKDDD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKsKLLD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKPi0ResolvedD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKsPiDDD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DPiPi0MergedD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKPi0MergedD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DPiPi0ResolvedD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKsPiLLD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKPi0MergedWSD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKsPiDDWSD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKPi0ResolvedWSD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DPiPi0MergedWSD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKsPiLLWSD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DPiPi0ResolvedWSD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKsKLLWSD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKsKDDWSD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB2DKKD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB2DKPiD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB2DPiPiD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB2DHHOSD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB2DRho0D2HHHPIDBeauty2CharmLine',
+            'StrippingB2DKstar0D2HHHPIDBeauty2CharmLine',
+            'StrippingB2DPhiD2HHHPIDBeauty2CharmLine',
+            'StrippingB2DKSDDD2HHHBeauty2CharmLine',
+            'StrippingB2DKSLLD2HHHBeauty2CharmLine',
+            'StrippingB02DRhoPMD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKstarPMD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB02DKD2KSHLLBeauty2CharmLine',
+            'StrippingB02DPiD2KSHLLBeauty2CharmLine',
+            'StrippingB02DKWSD2KSHLLBeauty2CharmLine',
+            'StrippingB02DPiWSD2KSHLLBeauty2CharmLine',
+            'StrippingB02DKD2KSHDDBeauty2CharmLine',
+            'StrippingB02DPiD2KSHDDBeauty2CharmLine',
+            'StrippingB02DKWSD2KSHDDBeauty2CharmLine',
+            'StrippingB02DPiWSD2KSHDDBeauty2CharmLine',
+            'StrippingB2D0KD2KSMuMuLLBeauty2CharmLine',
+            'StrippingB2D0PiD2KSMuMuLLBeauty2CharmLine',
+            'StrippingB2D0KD2KSMuMuDDBeauty2CharmLine',
+            'StrippingB2D0PiD2KSMuMuDDBeauty2CharmLine',
+            'StrippingB2D0MuNuD2KSHHLLBeauty2CharmLine',
+            'StrippingB2D0MuNuD2KSHHDDBeauty2CharmLine',
+            'StrippingB02D0KKD2KSHHLLBeauty2CharmLine',
+            'StrippingB02D0PiPiD2KSHHLLBeauty2CharmLine',
+            'StrippingB02D0KPiD2KSHHLLBeauty2CharmLine',
+            'StrippingB02DHHWSD2KSHHLLBeauty2CharmLine',
+            'StrippingB02D0KKD2KSHHDDBeauty2CharmLine',
+            'StrippingB02D0PiPiD2KSHHDDBeauty2CharmLine',
+            'StrippingB02D0KPiD2KSHHDDBeauty2CharmLine',
+            'StrippingB02DHHWSD2KSHHDDBeauty2CharmLine',
+            'StrippingB02D0KKD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB02D0PiPiD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB02D0KPiD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB02DHHWSD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB02D0KKD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB02D0PiPiD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB02D0KPiD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB02DHHWSD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB2D0KD2KSHHLLBeauty2CharmLine',
+            'StrippingB2D0KD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB2D0PiD2KSHHLLBeauty2CharmLine',
+            'StrippingB2D0PiD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB2D0KD2KSMuMuLLWSBeauty2CharmLine',
+            'StrippingB2D0PiD2KSMuMuLLWSBeauty2CharmLine',
+            'StrippingB2D0KD2KSHHDDBeauty2CharmLine',
+            'StrippingB2D0KD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB2D0PiD2KSHHDDBeauty2CharmLine',
+            'StrippingB2D0PiD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB2D0KD2KSMuMuDDWSBeauty2CharmLine',
+            'StrippingB2D0PiD2KSMuMuDDWSBeauty2CharmLine',
+            'StrippingB02DstarKDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarKWSDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarPiDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarPiWSDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarKDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarKWSDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarPiDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarPiWSDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarKDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarKWSDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarPiDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarPiWSDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarKDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarKWSDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarPiDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarPiWSDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarKDst2D0Pi_D2KSHHLLBeauty2CharmLine',
+            'StrippingB02DstarPiDst2D0Pi_D2KSHHLLBeauty2CharmLine',
+            'StrippingB02DstarKDst2D0Pi_D2KSHHDDBeauty2CharmLine',
+            'StrippingB02DstarPiDst2D0Pi_D2KSHHDDBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2KSHHLLBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2KSHHLLBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2KSHHDDBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2KSHHDDBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2HHHHBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2HHHHBeauty2CharmLine',
+            'StrippingB02DstarMuNuDst2D0Pi_D2HHHHWSBeauty2CharmLine',
+            'StrippingB02DstarMuNuWSDst2D0Pi_D2HHHHWSBeauty2CharmLine',
+            'StrippingB02DstarKsPiDDDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstarKsKDDDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstarKsKLLDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstarKsPiLLDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstarKsKDDWSDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstarKsKLLWSDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstarKsPiDDWSDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstarKsPiLLWSDst2D0PiBeauty2CharmLine',
+            'StrippingB2D0KD2HHHHBeauty2CharmLine',
+            'StrippingB2D0PiD2HHHHBeauty2CharmLine',
+            'StrippingB2D0KD2HHHHWSBeauty2CharmLine',
+            'StrippingB2D0PiD2HHHHWSBeauty2CharmLine',
+            #'StrippingB2D0KD2HHHHUPBeauty2CharmLine',
+            #'StrippingB2D0PiD2HHHHUPBeauty2CharmLine',
+            'StrippingB02D0KKD2HHHHBeauty2CharmLine',
+            'StrippingB02D0PiPiD2HHHHBeauty2CharmLine',
+            'StrippingB02D0KPiD2HHHHBeauty2CharmLine',
+            'StrippingB02DHHWSD2HHHHBeauty2CharmLine',
+            'StrippingB02D0KKD2HHHHWSBeauty2CharmLine',
+            'StrippingB02D0PiPiD2HHHHWSBeauty2CharmLine',
+            'StrippingB02D0KPiD2HHHHWSBeauty2CharmLine',
+            'StrippingB02DHHWSD2HHHHWSBeauty2CharmLine',
+            'StrippingB02D0KSDDD2K3PiBeauty2CharmLine',
+            'StrippingB02D0KSLLD2K3PiBeauty2CharmLine',
+            'StrippingB2D0KD2Pi0HHResolvedBeauty2CharmLine',
+            'StrippingB2D0PiD2Pi0HHResolvedBeauty2CharmLine',
+            'StrippingB2D0KD2Pi0HHWSResolvedBeauty2CharmLine',
+            'StrippingB2D0PiD2Pi0HHWSResolvedBeauty2CharmLine',
+            'StrippingB2D0KD2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB2D0PiD2KSPi0HHLLResolvedBeauty2CharmLine',
+            'StrippingB2D0KD2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB2D0PiD2KSPi0HHLLMergedBeauty2CharmLine',
+            'StrippingB2D0KD2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB2D0PiD2KSPi0HHDDResolvedBeauty2CharmLine',
+            'StrippingB2D0KD2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB2D0PiD2KSPi0HHDDMergedBeauty2CharmLine',
+            'StrippingB2D0KD02KSPi0LLResolvedBeauty2CharmLine',
+            'StrippingB2D0PiD02KSPi0LLResolvedBeauty2CharmLine',
+            'StrippingB2D0KD02KSPi0LLMergedBeauty2CharmLine',
+            'StrippingB2D0PiD02KSPi0LLMergedBeauty2CharmLine',
+            'StrippingB2D0KD02KSPi0DDResolvedBeauty2CharmLine',
+            'StrippingB2D0PiD02KSPi0DDResolvedBeauty2CharmLine',
+            'StrippingB2D0KD02KSPi0DDMergedBeauty2CharmLine',
+            'StrippingB2D0PiD02KSPi0DDMergedBeauty2CharmLine',
+            'StrippingB02D0KKD2Pi0HHResolvedBeauty2CharmLine',
+            'StrippingB02D0PiPiD2Pi0HHResolvedBeauty2CharmLine',
+            'StrippingB02D0KPiD2Pi0HHResolvedBeauty2CharmLine',
+            'StrippingB02DHHWSD2Pi0HHResolvedBeauty2CharmLine',
+            'StrippingB02DKWSD2Pi0HHHResolvedBeauty2CharmLine',
+            'StrippingB02DPiWSD2Pi0HHHResolvedBeauty2CharmLine',
+            'StrippingB02DKWSD2Pi0HHHMergedBeauty2CharmLine',
+            'StrippingB02DPiWSD2Pi0HHHMergedBeauty2CharmLine',
+            'StrippingB2D0KKPiD2HHPIDBeauty2CharmLine',
+            'StrippingB2D0KPiPiD2HHPIDBeauty2CharmLine',
+            'StrippingB2D0PiPiPiD2HHPIDBeauty2CharmLine',
+            'StrippingB2D0KKPiD2HHHHPIDBeauty2CharmLine',
+            'StrippingB2D0KPiPiD2HHHHPIDBeauty2CharmLine',
+            'StrippingB2D0PiPiPiD2HHHHPIDBeauty2CharmLine',
+            'StrippingB2D0KKPiD2KSHHDDBeauty2CharmLine',
+            'StrippingB2D0KPiPiD2KSHHDDBeauty2CharmLine',
+            'StrippingB2D0KPiPiD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB2D0PiPiPiD2KSHHDDBeauty2CharmLine',
+            'StrippingB2D0PiPiPiD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB2D0KKPiD2KSHHLLBeauty2CharmLine',
+            'StrippingB2D0KPiPiD2KSHHLLBeauty2CharmLine',
+            'StrippingB2D0KPiPiD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB2D0PiPiPiD2KSHHLLBeauty2CharmLine',
+            'StrippingB2D0PiPiPiD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB02DKPiPiSSD2HHHPIDBeauty2CharmLine',
+            'StrippingB02DKKPiD2HHHPIDBeauty2CharmLine',
+            'StrippingB02DKPiPiSSWSD2HHHPIDBeauty2CharmLine',
+            'StrippingB02DKKPiWSD2HHHPIDBeauty2CharmLine',
+            'StrippingB02DKPiPiWSD2HHHPIDBeauty2CharmLine',
+            'StrippingB02DPiPiPiWSD2HHHPIDBeauty2CharmLine',
+            'StrippingB2D0ppbarKD2HHBeauty2CharmLine',
+            'StrippingB2D0ppbarPiD2HHBeauty2CharmLine',
+            'StrippingB02DppbarKD2HHHBeauty2CharmLine',
+            'StrippingB02DppbarPiD2HHHBeauty2CharmLine',
+            'StrippingB02DstKKPiDstar2D0PiPIDBeauty2CharmLine',
+            'StrippingB02DstKPiPiDstar2D0PiPIDBeauty2CharmLine',
+            'StrippingB02DstPiPiPiDstar2D0PiPIDBeauty2CharmLine',
+            'StrippingB02DstPiPiPiWSDstar2D0PiPIDBeauty2CharmLine',
+            'StrippingB02DstKPiPiWSDstar2D0PiPIDBeauty2CharmLine',
+            'StrippingB02DstKKPiWSDstar2D0PiPIDBeauty2CharmLine',
+            'StrippingB2DMuMuD2HHHBeauty2CharmLine',
+            'StrippingB2DMuMuWSD2HHHBeauty2CharmLine',
+            'StrippingB2DMuMuNPD2HHHBeauty2CharmLine',
+            'StrippingB2DMuMuD2KSHLLBeauty2CharmLine',
+            'StrippingB2DMuMuWSD2KSHLLBeauty2CharmLine',
+            'StrippingB2DMuMuNPD2KSHLLBeauty2CharmLine',
+            'StrippingB2DMuMuD2KSHDDBeauty2CharmLine',
+            'StrippingB2DMuMuWSD2KSHDDBeauty2CharmLine',
+            'StrippingB2DMuMuNPD2KSHDDBeauty2CharmLine',
+            'StrippingB2DstarMuMuD0PiBeauty2CharmLine',
+            'StrippingB2DstarMuMuWSD0PiBeauty2CharmLine',
+            'StrippingB2DstarMuMuNPD0PiBeauty2CharmLine',
+            'StrippingB2DstarMuMuD2HHHHPiBeauty2CharmLine',
+            'StrippingB2DstarMuMuWSD2HHHHPiBeauty2CharmLine',
+            'StrippingB2DstarMuMuNPD2HHHHPiBeauty2CharmLine',
+            'StrippingB02D0MuMuD2HHBeauty2CharmLine',
+            'StrippingB02D0MuMuWSD2HHBeauty2CharmLine',
+            'StrippingB02D0MuMuD2HHHHBeauty2CharmLine',
+            'StrippingB02D0MuMuWSD2HHHHBeauty2CharmLine',
+            'StrippingB02D0MuMuD2KSHHLLBeauty2CharmLine',
+            'StrippingB02D0MuMuWSD2KSHHLLBeauty2CharmLine',
+            'StrippingB02D0MuMuD2KSHHDDBeauty2CharmLine',
+            'StrippingB02D0MuMuWSD2KSHHDDBeauty2CharmLine',
+            'StrippingB02DsstKsPiLLDsst2DGammaD2HHHBeauty2CharmLine',
+            'StrippingB02DsstKsPiDDDsst2DGammaD2HHHBeauty2CharmLine',
+            'StrippingB02DDWSBeauty2CharmLine',
+            'StrippingB2D0DD02K3PiBeauty2CharmLine',
+            'StrippingB02D0D0D02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB02D0D0D02HHD02K3PiBeauty2CharmLine',
+            'StrippingB02D0D0D02HHD02HHBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0Pi0D2KSHHLLBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0Pi0D2KSHHLLWSBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0Pi0D2KSHHLLBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0Pi0D2KSHHLLWSBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0Pi0D2KSHHDDBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0Pi0D2KSHHDDWSBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0Pi0D2KSHHDDBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0Pi0D2KSHHDDWSBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0GammaD2KSHHLLBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0GammaD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0GammaD2KSHHLLBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0GammaD2KSHHLLWSBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0GammaD2KSHHDDBeauty2CharmLine',
+            'StrippingB2Dstar0KDst02D0GammaD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0GammaD2KSHHDDBeauty2CharmLine',
+            'StrippingB2Dstar0PiDst02D0GammaD2KSHHDDWSBeauty2CharmLine',
+            'StrippingB2DstPiKFavD0PiBeauty2CharmLine',
+            'StrippingB2DstPiKFavD2HHHHPiBeauty2CharmLine',
+            'StrippingB2DstPiKSupD0PiBeauty2CharmLine',
+            'StrippingB2DstPiKSupD2HHHHPiBeauty2CharmLine',
+            'StrippingB2DstPipPipD0PiBeauty2CharmLine',
+            'StrippingB2DstPipPipD2HHHHPiBeauty2CharmLine',
+            'StrippingB2DstPimPipD0PiBeauty2CharmLine',
+            'StrippingB2DstPimPipD2HHHHPiBeauty2CharmLine',
+            'StrippingB2DstPiKWSD0PiBeauty2CharmLine',
+            'StrippingB2DstPiKWSD2HHHHPiBeauty2CharmLine',
+            'StrippingB2DstPiPiWSD0PiBeauty2CharmLine',
+            'StrippingB2DstPiPiWSD2HHHHPiBeauty2CharmLine',
+            'StrippingB2D0D0KD02HHD02HHBeauty2CharmLine',
+            'StrippingB2D0D0PiD02HHD02HHBeauty2CharmLine',
+            'StrippingB2DstD0Beauty2CharmLine',
+            'StrippingB2DstD0D02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstWSBeauty2CharmLine',
+            'StrippingB02DstDWSBeauty2CharmLine',
+
+            ######################
+            ###### DDX lines #####
+            ######################
+            #### DDK lines ###
+            'StrippingB2DDKBeauty2CharmLine',
+            'StrippingB2DDKWSBeauty2CharmLine',
+            'StrippingB02D0DKBeauty2CharmLine',
+            'StrippingB02D0DKD02K3PiBeauty2CharmLine',
+            'StrippingB02D0DKWSBeauty2CharmLine',
+            'StrippingB02D0DKWSD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDKBeauty2CharmLine',
+            'StrippingB2DstDKDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDKWSBeauty2CharmLine',
+            'StrippingB2DstDKWSDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2D0D0KD02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB2D0D0KD02HHD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0KBeauty2CharmLine',
+            'StrippingB02DstD0KD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0KDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0KDstarD02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0KWSBeauty2CharmLine',
+            'StrippingB02DstD0KWSD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0KWSDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0KWSDstarD02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDstKBeauty2CharmLine',
+            'StrippingB2DstDstKDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDstKDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDstKWSBeauty2CharmLine',
+            'StrippingB2DstDstKWSDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDstKWSDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2Dst2460DKBeauty2CharmLine',
+            'StrippingB2Dst2460DKWSBeauty2CharmLine',
+            'StrippingB2D0st2460D0KBeauty2CharmLine',
+            'StrippingB2Dst0D0KDst02D0Pi0ResolvedD02HHBeauty2CharmLine',
+            'StrippingB2Dst0D0KDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingB02Dst0DKDst02D0Pi0ResolvedD2HHHBeauty2CharmLine',
+            'StrippingB02Dst0DKDst02D0GammaD2HHHBeauty2CharmLine',
+            #### DDKS lines ###
+            'StrippingB02DDKSDDBeauty2CharmLine',
+            'StrippingB02DDKSWSDDBeauty2CharmLine',
+            'StrippingB2D0DKSDDBeauty2CharmLine',
+            'StrippingB2D0DKSDDD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDKSDDBeauty2CharmLine',
+            'StrippingB02DstDKSDDDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDKSWSDDBeauty2CharmLine',
+            'StrippingB02DstDKSWSDDDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02D0D0KSD02K3PiD02K3PiDDBeauty2CharmLine',
+            'StrippingB02D0D0KSD02HHD02HHDDBeauty2CharmLine',
+            'StrippingB02D0D0KSD02HHD02K3PiDDBeauty2CharmLine',
+            'StrippingB2DstD0KSDDBeauty2CharmLine',
+            'StrippingB2DstD0KSDDD02K3PiBeauty2CharmLine',
+            'StrippingB2DstD0KSDDDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstD0KSDDDstarD02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKSDDBeauty2CharmLine',
+            'StrippingB02DstDstKSDDDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKSDDDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKSWSDDBeauty2CharmLine',
+            'StrippingB02DstDstKSWSDDDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKSWSDDDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DDKSLLBeauty2CharmLine',
+            'StrippingB02DDKSWSLLBeauty2CharmLine',
+            'StrippingB2D0DKSLLBeauty2CharmLine',
+            'StrippingB2D0DKSLLD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDKSLLBeauty2CharmLine',
+            'StrippingB02DstDKSLLDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDKSWSLLBeauty2CharmLine',
+            'StrippingB02DstDKSWSLLDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02D0D0KSD02K3PiD02K3PiLLBeauty2CharmLine',
+            'StrippingB02D0D0KSD02HHD02HHLLBeauty2CharmLine',
+            'StrippingB02D0D0KSD02HHD02K3PiLLBeauty2CharmLine',
+            'StrippingB2DstD0KSLLBeauty2CharmLine',
+            'StrippingB2DstD0KSLLD02K3PiBeauty2CharmLine',
+            'StrippingB2DstD0KSLLDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstD0KSLLDstarD02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKSLLBeauty2CharmLine',
+            'StrippingB02DstDstKSLLDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKSLLDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKSWSLLBeauty2CharmLine',
+            'StrippingB02DstDstKSWSLLDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKSWSLLDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            #### DDLambda lines ###
+            'StrippingLb2DDLambdaDDBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02HHD02HHDDBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02HHD02K3PiDDBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02K3PiD02K3PiDDBeauty2CharmLine',
+            'StrippingLb2DstDLambdaDDBeauty2CharmLine',
+            'StrippingLb2DstDLambdaDDDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaDDBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaDDDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaDDDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DDLambdaLLBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02HHD02HHLLBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02HHD02K3PiLLBeauty2CharmLine',
+            'StrippingLb2D0D0LambdaD02K3PiD02K3PiLLBeauty2CharmLine',
+            'StrippingLb2DstDLambdaLLBeauty2CharmLine',
+            'StrippingLb2DstDLambdaLLDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaLLBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaLLDstarD02K3PiBeauty2CharmLine',
+            'StrippingLb2DstDstLambdaLLDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            #### DDK* lines ###
+            'StrippingB02D0D0KstD02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB02D0D0KstD02HHD02HHBeauty2CharmLine',
+            'StrippingB02D0D0KstD02HHD02K3PiBeauty2CharmLine',
+            'StrippingB02DDKstBeauty2CharmLine',
+            'StrippingB02DstDKstBeauty2CharmLine',
+            'StrippingB02DstDKstDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKstBeauty2CharmLine',
+            'StrippingB02DstDstKstDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKstDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DD0KstBeauty2CharmLine',
+            'StrippingB2DD0KstD02K3PiBeauty2CharmLine',
+            'StrippingB2DstD0KstBeauty2CharmLine',
+            'StrippingB2DstD0KstDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstD0KstD02K3PiBeauty2CharmLine',
+            'StrippingB2DstD0KstDstarD02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB2D0DKPiBeauty2CharmLine',
+            'StrippingB2D0DKPiD02K3PiBeauty2CharmLine',
+            #### DDPhi lines ###
+            'StrippingB2D0DKKBeauty2CharmLine',
+            'StrippingB2D0DKKD2K3PiBeauty2CharmLine',
+            #'StrippingB02DDKKBeauty2CharmLine',
+            #'StrippingB02DstDKKBeauty2CharmLine',
+            #'StrippingB02DstDKKDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKKBeauty2CharmLine',
+            'StrippingB02DstDstKKDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstDstKKDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            #### DDPi lines ###
+            'StrippingB2DDPiBeauty2CharmLine',
+            'StrippingB2DDPiWSBeauty2CharmLine',
+            'StrippingB02D0DPiBeauty2CharmLine',
+            'StrippingB02D0DPiD02K3PiBeauty2CharmLine',
+            'StrippingB02D0DPiWSBeauty2CharmLine',
+            'StrippingB02D0DPiWSD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDPiBeauty2CharmLine',
+            'StrippingB2DstDPiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDPiWSBeauty2CharmLine',
+            'StrippingB2DstDPiWSDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2D0D0PiD02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB2D0D0PiD02HHD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0PiBeauty2CharmLine',
+            'StrippingB02DstD0PiD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0PiDstarD02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0PiWSBeauty2CharmLine',
+            'StrippingB02DstD0PiWSD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0PiWSDstarD02K3PiBeauty2CharmLine',
+            'StrippingB02DstD0PiWSDstarD02K3PiD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDstPiBeauty2CharmLine',
+            'StrippingB2DstDstPiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDstPiDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDstPiWSBeauty2CharmLine',
+            'StrippingB2DstDstPiWSDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2DstDstPiWSDstarD02K3PiDstarD02K3PiBeauty2CharmLine',
+            'StrippingB2Dst2460DPiBeauty2CharmLine',
+            'StrippingB2Dst2460DPiWSBeauty2CharmLine',
+            'StrippingB2D0st2460D0PiBeauty2CharmLine',
+            #### DDpK lines ###
+            'StrippingLb2DDpKD2HHHPIDBeauty2CharmLine',
+            #########################
+            #### End of DDX lines ###
+            #########################
+            'StrippingLb2LcKLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiLc2PPiPiBeauty2CharmLine',
+            'StrippingLb2LcKWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiWSLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiWSLc2PPiPiBeauty2CharmLine',
+            'StrippingLb2LcPiNoIPWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2XicPiXic2PKPiBeauty2CharmLine',
+            'StrippingLb2XicKXic2PKPiBeauty2CharmLine',
+            'StrippingLb2XicKWSXic2PKPiBeauty2CharmLine',
+            'StrippingLb2XicPiWSXic2PKPiBeauty2CharmLine',
+            'StrippingLb2XicPiNoIPWSXic2PKPiBeauty2CharmLine',
+            'StrippingXib2Xic0KXic02PKKPiBeauty2CharmLine',
+            'StrippingXib2Xic0PiXic02PKKPiBeauty2CharmLine',
+            'StrippingXib2Xic0PiWSXic02PKKPiBeauty2CharmLine',
+            'StrippingXib2Xic0KWSXic02PKKPiBeauty2CharmLine',
+            'StrippingXib2Xic0PiNoIPWSXic02PKKPiBeauty2CharmLine',
+            'StrippingOmegab2Omegac0PiOmegac02PKKPiBeauty2CharmLine',
+            'StrippingOmegab2Omegac0KOmegac02PKKPiBeauty2CharmLine',
+            'StrippingOmegab2Omegac0KWSOmegac02PKKPiBeauty2CharmLine',
+            'StrippingOmegab2Omegac0PiWSOmegac02PKKPiBeauty2CharmLine',
+            'StrippingOmegab2Omegac0PiNoIPWSOmegac02PKKPiBeauty2CharmLine',
+            'StrippingOmegab2XicpKPiXicp2PKPiBeauty2CharmLine',
+            'StrippingOmegab2LcKKLc2PKPiBeauty2CharmLine',
+            'StrippingXib02XicDXic2PKPiBeauty2CharmLine',
+            'StrippingXib02XicDWSXic2PKPiBeauty2CharmLine',
+            'StrippingXib2Xic0DXic02PKKPiBeauty2CharmLine',
+            'StrippingXib2Xic0DWSXic02PKKPiBeauty2CharmLine',
+            'StrippingXib02XicKPiPiXic2PKPiBeauty2CharmLine',
+            'StrippingXib02XicPiPiPiXic2PKPiBeauty2CharmLine',
+            'StrippingXib02XicPiPiPiWSXic2PKPiBeauty2CharmLine',
+            'StrippingXib02XicKPiPiWSXic2PKPiBeauty2CharmLine',
+            'StrippingXib2Xic0KPiPiXic02PKKPiBeauty2CharmLine',
+            'StrippingXib2Xic0PiPiPiXic02PKKPiBeauty2CharmLine',
+            'StrippingXib2Xic0KPiPiWSXic02PKKPiBeauty2CharmLine',
+            'StrippingXib2Xic0PiPiPiWSXic02PKKPiBeauty2CharmLine',
+            'StrippingXib2LcDKLc2PKPiD2HHHBeauty2CharmLine',
+            'StrippingXib2LcDKWSLc2PKPiD2HHHBeauty2CharmLine',
+            'StrippingXib02LcDsKPiLc2PKPiDs2KKPiBeauty2CharmLine',
+            'StrippingXib02LcDsKPiWSLc2PKPiDs2KKPiBeauty2CharmLine',
+            'StrippingB2LcDspbarLc2PKPiDs2KKPiBeauty2CharmLine',
+            'StrippingB2LcDspbarWSLc2PKPiDs2KKPiBeauty2CharmLine',
+            'StrippingSb2D0PD2HHPIDBeauty2CharmLine',
+            'StrippingSb02DPD2HHHPIDBeauty2CharmLine',
+            'StrippingSb02DPWSD2HHHPIDBeauty2CharmLine',
+            'StrippingLb2D0PHD02HHBeauty2CharmLine',
+            'StrippingLb2D0PHWSD02HHBeauty2CharmLine',
+            'StrippingLb2D0PHNoPIDD02HHBeauty2CharmLine',
+            'StrippingLb2D0PHNoPIDWSD02HHBeauty2CharmLine',
+            'StrippingLb2D0PHD02K3PiBeauty2CharmLine',
+            'StrippingLb2D0PHWSD02K3PiBeauty2CharmLine',
+            'StrippingLb2D0PPbarD02HHBeauty2CharmLine',
+            'StrippingLb2D0PPbarWSD02HHBeauty2CharmLine',
+            'StrippingLb2LcKSKLLLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcKSKDDLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcKKPiLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcppbarKLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcppbarPiLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcKPiPiLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiLc2PPiPiBeauty2CharmLine',
+            'StrippingLb2LcKPiPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiWSLc2PKKBeauty2CharmLine',
+            'StrippingLb2LcPiPiPiWSLc2PPiPiBeauty2CharmLine',
+            'StrippingLb2LcppbarKWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcppbarPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcKKPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarKKLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarpbarpLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarPiPiLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarKPiLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarPiPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarpbarpWSLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarKKWSLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarKPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2LcDD2HHHPIDBeauty2CharmLine',
+            'StrippingLb2LcDWSD2HHHPIDBeauty2CharmLine',
+            'StrippingLb2LcDKstBeauty2CharmLine',
+            'StrippingLb2LcDstKstBeauty2CharmLine',
+            'StrippingLb2LcDst0KLc2PKPiDst02D0GammaD2HHBeauty2CharmLine',
+            'StrippingLb2LcDst0KLc2PKPiDst02D0Pi0ResolvedD2HHBeauty2CharmLine',
+            'StrippingLb2LcDst0KLc2PKPiDst02D0Pi0MergedD2HHBeauty2CharmLine',
+            'StrippingX2LcD0D02KPiBeauty2CharmLine',
+            'StrippingX2LcD0PiD02KPiBeauty2CharmLine',
+            'StrippingX2LcD0KD02KPiBeauty2CharmLine',
+            'StrippingX2LcD0PiWSD02KPiBeauty2CharmLine',
+            'StrippingX2LcD0KWSD02KPiBeauty2CharmLine',
+            'StrippingX02XiccpPiXiccp2Xic0PiBeauty2CharmLine',
+            'StrippingX02XiccpKXiccp2Xic0PiBeauty2CharmLine',
+            'StrippingX02XiccpPiWSXiccp2Xic0PiBeauty2CharmLine',
+            'StrippingX02XiccpKWSXiccp2Xic0PiBeauty2CharmLine',
+            'StrippingX2XiccppKXiccpp2XicPiBeauty2CharmLine',
+            'StrippingX2XiccppPiXiccpp2XicPiBeauty2CharmLine',
+            'StrippingX2XiccppKWSXiccpp2XicPiBeauty2CharmLine',
+            'StrippingX2XiccppPiWSXiccpp2XicPiBeauty2CharmLine',
+            'StrippingX2LcPiPiOSLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcPiKOSLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcPiPiSSLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcKKSSLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcKPiOSLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcKKOSLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcKPiSSLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcPiPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcKPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcKKWSLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcKPiPiPiLc2PKPiBeauty2CharmLine',
+            'StrippingX2LcKPiPiPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingXib2XicPiPiXic2PKPiBeauty2CharmLine',
+            'StrippingXib2XicKPiXic2PKPiBeauty2CharmLine',
+            'StrippingXib2XicKKXic2PKPiBeauty2CharmLine',
+            'StrippingXib2XicKKWSXic2PKPiBeauty2CharmLine',
+            'StrippingXib2XicPiPiWSXic2PKPiBeauty2CharmLine',
+            'StrippingXib2XicKPiWSXic2PKPiBeauty2CharmLine',
+            'StrippingLb2LcDstDstar2D0PiPIDBeauty2CharmLine',
+            'StrippingLb2LcDstWSDstar2D0PiPIDBeauty2CharmLine',
+            'StrippingX2LcLcBeauty2CharmLine',
+            'StrippingX2LcLcWSBeauty2CharmLine',
+            'StrippingLb2Lc5PiLc2PKPiPIDBeauty2CharmLine',
+            'StrippingLb2D0Lambda0DDD02HHBeauty2CharmLine',
+            'StrippingLb2D0Lambda0LLD02HHBeauty2CharmLine',
+            'StrippingLb2D0Lambda0DDD02K3PiBeauty2CharmLine',
+            'StrippingLb2D0Lambda0LLD02K3PiBeauty2CharmLine',
+            'StrippingLb2DpKKD2HHHBeauty2CharmLine',
+            'StrippingLb2DpPiPiD2HHHBeauty2CharmLine',
+            'StrippingLb2DpKPiD2HHHBeauty2CharmLine',
+            'StrippingXib2D0pKKD02HHBeauty2CharmLine',
+            'StrippingXib2D0pPiPiD02HHBeauty2CharmLine',
+            'StrippingXib2D0pKPiD02HHBeauty2CharmLine',
+            'StrippingLb2D0pKD02K3PiBeauty2CharmLine',
+            'StrippingLb2D0pKD02KsDDHHBeauty2CharmLine',
+            'StrippingLb2D0pKD02KsLLHHBeauty2CharmLine',
+            'StrippingLb2D0pPiD02KsDDHHBeauty2CharmLine',
+            'StrippingLb2D0pPiD02KsLLHHBeauty2CharmLine',
+            'StrippingLb2DD0pD2HHHD02K3PiBeauty2CharmLine',
+            'StrippingLb2DD0pD2HHHD2HHBeauty2CharmLine',
+            'StrippingXibc2DpKD2HHHBeauty2CharmLine',
+            'StrippingB2LcpbarKSSLc2PKPiBeauty2CharmLine',
+            'StrippingB2LcpbarPiSSLc2PKPiBeauty2CharmLine',
+            'StrippingB2LcpbarKWSLc2PKPiBeauty2CharmLine',
+            'StrippingB2LcpbarPiWSLc2PKPiBeauty2CharmLine',
+            'StrippingB2LcpbarLc2PKPiBeauty2CharmLine',
+            'StrippingB2LcpbarWSLc2PKPiBeauty2CharmLine',
+            'StrippingB2LcLcKLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarKSDDLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarKSWSDDLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarKSLLLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcpbarKSWSLLLc2PKPiBeauty2CharmLine',
+            'StrippingLb2DLambda0DDpiD2HHHBeauty2CharmLine',
+            'StrippingLb2DLambda0LLpiD2HHHBeauty2CharmLine',
+            'StrippingLb2DLambda0DDpiWSD2HHHBeauty2CharmLine',
+            'StrippingLb2DLambda0LLpiWSD2HHHBeauty2CharmLine',
+            'StrippingXib2D0Lambda0DDpiD02HHBeauty2CharmLine',
+            'StrippingXib2D0Lambda0LLpiD02HHBeauty2CharmLine',
+            'StrippingXib2D0Lambda0DDpiWSD02HHBeauty2CharmLine',
+            'StrippingXib2D0Lambda0LLpiWSD02HHBeauty2CharmLine',
+            'StrippingB02LcLambda0KLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcLambda0PiLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcLambda0PiWSLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcLambda0KWSLc2PKPiBeauty2CharmLine',
+            'StrippingLb2sigmacpp4PiSigmacpp2LcPiLc2PKPiBeauty2CharmLine',
+            'StrippingLb2sigmacppD0KPiSigmacpp2LcPiLc2PKPiBeauty2CharmLine',
+            'StrippingB02LcSigmacppKSigmacpp2LcPiLc2PKPiBeauty2CharmLine',
+            'StrippingB2LcXicPiXic2PKPiLc2PKPiBeauty2CharmLine',
+            'StrippingB02DKLTUBD2HHHBeauty2CharmLine',
+            'StrippingB02DsKPiPiLTUBD2HHHBeauty2CharmLine',
+            'StrippingB02DsstarKLTUBDsstar2DGammaD2HHHBeauty2CharmLine',
+            'StrippingDstarUPB02D0KPiD2HHBeauty2CharmLine',
+
+            # Bc+ -> D+ D0
+            'StrippingBc2DD0D2KSHHHD02HHBeauty2CharmLine',
+            'StrippingBc2DD0D2KSHHHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DD0D2KSHHHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DD0D2KSHHHD02KSHHBeauty2CharmLine',
+            'StrippingBc2DD0D2KSHD02HHBeauty2CharmLine',
+            'StrippingBc2DD0D2KSHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DD0D2KSHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DD0D2KSHD02KSHHBeauty2CharmLine',
+            'StrippingBc2DD0D2HHHD02HHBeauty2CharmLine',
+            'StrippingBc2DD0D2HHHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DD0D2HHHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DD0D2HHHD02KSHHBeauty2CharmLine',
+
+            # Bc+ -> D*+ D0
+            'StrippingBc2DstD0Dst2DPI0D2HHHD02HHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2HHHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2HHHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2HHHD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2KSHD02HHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2KSHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2KSHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2KSHD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02KHHHD02HHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02KHHHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02KHHHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02KHHHD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2KSHHHD02HHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2KSHHHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2KSHHHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2KSHHHD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2HHHD02HHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2HHHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2HHHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DstD0Dst2DGammaD2HHHD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02HHD02HHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02HHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02HHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02HHD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02KSHHD02HHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02KSHHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02KSHHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DstD0Dst2D0PID02KSHHD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2KSHHHD02HHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2KSHHHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2KSHHHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2KSHHHD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2KSHD02HHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2KSHD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2KSHD02HHPI0Beauty2CharmLine',
+            'StrippingBc2DstD0Dst2DPI0D2KSHD02KSHHBeauty2CharmLine',
+
+            # Bc+ -> D+ D*0
+            'StrippingBc2DDst0D2KSHHHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHHHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHHHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHHHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHHHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHHHDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2KSHDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingBc2DDst0D2HHHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2HHHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2HHHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DDst0D2HHHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2HHHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DDst0D2HHHDst02D0GammaD02HHBeauty2CharmLine',
+
+            # Bc+ -> D*+ D*0
+            'StrippingBc2DstDst0Dst2DPI0D2HHHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2HHHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2HHHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2HHHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2HHHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2HHHDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KHHHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KHHHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KHHHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KHHHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KHHHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KHHHDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHHHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHHHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHHHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHHHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHHHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2KSHHHDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2HHHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2HHHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2HHHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2HHHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2HHHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DGammaD2HHHDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02HHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02HHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02HHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02HHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02HHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02HHDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KSHHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KSHHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KSHHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KSHHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KSHHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2D0PID02KSHHDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHHHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHHHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHHHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHHHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHHHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHHHDst02D0GammaD02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHDst02D0GammaD02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHDst02D0GammaD02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHDst02D0PI0D02HHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHDst02D0PI0D02KHHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHDst02D0PI0D02KSHHBeauty2CharmLine',
+            'StrippingBc2DstDst0Dst2DPI0D2KSHDst02D0GammaD02HHBeauty2CharmLine',
+
+            #Xibc
+            'StrippingXibc2LcD0D02KPiBeauty2CharmLine',
+            'StrippingXibc2LcD0PiD02KPiBeauty2CharmLine',
+            'StrippingXibc2D0D0pD02KPiBeauty2CharmLine',
+            'StrippingXibc2LcPiPiOSLc2PKPiBeauty2CharmLine',
+            'StrippingXibc2LcKPiOSLc2PKPiBeauty2CharmLine',
+            'StrippingXibc2LcPiKOSLc2PKPiBeauty2CharmLine',
+            'StrippingXibc02XiccpPiXiccp2Xic0PiBeauty2CharmLine',
+            'StrippingXibc2XiccppPiXiccpp2XicPiBeauty2CharmLine',
+            'StrippingXibc2XiccppPiXiccpp2LcK2PiBeauty2CharmLine',
+            'StrippingXibc2LcPiLc2PKPiBeauty2CharmLine',
+            'StrippingXibc2LcKLc2PKPiBeauty2CharmLine',
+            'StrippingXibc2XicPiXic2PKPiBeauty2CharmLine',
+            'StrippingXibc2Xic0PiXic02PKKPiBeauty2CharmLine',
+            'StrippingXibc02XiccpMuXiccp2Xic0PiBeauty2CharmLine',
+            'StrippingXibc2XiccppMuXiccpp2XicPiBeauty2CharmLine',
+            'StrippingXibc02XiccpMuWSXiccp2Xic0PiBeauty2CharmLine',
+            'StrippingXibc2XiccppMuWSXiccpp2XicPiBeauty2CharmLine',
+            'StrippingX2Omegac0PiOmegac02PKKPiBeauty2CharmLine',
+            'StrippingX2Omegac0KOmegac02PKKPiBeauty2CharmLine',
+            'StrippingX2Omegac0KOSOmegac02PKKPiBeauty2CharmLine',
+            'StrippingXibc2LcD0MuD02KPiBeauty2CharmLine',
+            'StrippingXibc2LcD0MuWSD02KPiBeauty2CharmLine',
+            'StrippingXibc2LcDMuD2KPiPiBeauty2CharmLine',
+            'StrippingXibc2LcDMuWSD2KPiPiBeauty2CharmLine',
+
+            'StrippingB2XicpbarPiXic2PKPiBeauty2CharmLine',
+            'StrippingB02XicpbarPiPiXic2PKPiBeauty2CharmLine',
+            'StrippingB02XicpbarKPiXic2PKPiBeauty2CharmLine',
+            'StrippingB02DpbarLambdaDDD2HHHBeauty2CharmLine',
+            'StrippingB02DpbarLambdaLLD2HHHBeauty2CharmLine',
+            'StrippingB02DstpbarLambdaDDDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstpbarLambdaLLDst2D0PiBeauty2CharmLine',
+            'StrippingB02DstpbarLambdaDDDst2D0PiD02K3PiBeauty2CharmLine',
+            'StrippingB02DstpbarLambdaLLDst2D0PiD02K3PiBeauty2CharmLine',
+            'StrippingB2D0pbarLambdaDDD02HHBeauty2CharmLine',
+            'StrippingB2D0pbarLambdaLLD02HHBeauty2CharmLine',
+            'StrippingB2D0pbarLambdaDDD02K3PiBeauty2CharmLine',
+            'StrippingB2D0pbarLambdaLLD02K3PiBeauty2CharmLine',
+            'StrippingB02D0pbarKLambdaDDD02HHBeauty2CharmLine',
+            'StrippingB02D0pbarKLambdaLLD02HHBeauty2CharmLine',
+            'StrippingB02D0pbarKLambdaDDD02K3PiBeauty2CharmLine',
+            'StrippingB02D0pbarKLambdaLLD02K3PiBeauty2CharmLine',
+            'StrippingXib2Xic0D0KD02KPiBeauty2CharmLine',
+            'StrippingXib2XicDKD2HHHBeauty2CharmLine',
+            'StrippingXib2XicDKDst2D0PiBeauty2CharmLine',
+            'StrippingXib02XicD0KD02KPiBeauty2CharmLine',
+            'StrippingXib02XicD0KD02K3PiBeauty2CharmLine',
+            'StrippingOmegab2Xic0KPiPiXic02PKKPiBeauty2CharmLine',
+            'StrippingXib02D0LambdaPiPiLLD02KPiBeauty2CharmLine',
+            'StrippingXib02D0LambdaPiPiLLD02K3PiBeauty2CharmLine',
+            'StrippingXib02D0LambdaPiPiDDD02KPiBeauty2CharmLine',
+            'StrippingXib02D0LambdaPiPiDDD02K3PiBeauty2CharmLine',
+            'StrippingXib2LcKHHHLc2PKPiBeauty2CharmLine',
+            'StrippingXib2XicHHHHXic2PKPiBeauty2CharmLine'
+        ]
+    },
+    'WGs': ['B2OC']
+}
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+class Beauty2CharmConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, moduleName, config):
+
+        LineBuilder.__init__(self, moduleName, config)
+
+        # pre-filter inputs
+        pions = filterInputs('Pi', [StdAllNoPIDsPions], config['ALL'])
+        pions_pid = filterInputs('Pi_PID', [pions], config['PIDPION'])
+        uppions = filterInputs('PiUP', [StdNoPIDsUpPions], config['UPSTREAM'])
+        kaons = filterInputs('K', [StdAllNoPIDsKaons], config['ALL'])
+        kaons_pid = filterInputs('K_PID', [kaons], config['PIDKAON'])
+        upkaons = filterInputs('KaUP', [StdNoPIDsUpKaons], config['UPSTREAM'])
+        protons = filterInputs('P', [StdAllNoPIDsProtons], config['ALL'])
+        protons_pid = filterInputs('P_PID', [protons], config['PIDPROTON'])
+
+        #pions,kaons, protons for Lc, Xic from Xibc
+        pions_Xc_Xibc = filterInputs('Pi_Xc_Xibc', [StdAllNoPIDsPions],
+                                     config['Xibc_Xc_PION'])
+        kaons_Xc_Xibc = filterInputs('K_Xc_Xibc', [StdAllNoPIDsKaons],
+                                     config['Xibc_Xc_KAON'])
+        protons_Xc_Xibc = filterInputs('P_Xc_Xibc', [StdAllNoPIDsProtons],
+                                       config['Xibc_Xc_PROTON'])
+        #pions,kaons, from Xicc or Xib vertex (filter from PID pions, above, as all cuts are tighter)
+        pions_Xb_Xibc = filterInputs('Pi_Xb_Xibc', [pions_pid],
+                                     config['Xibc_Xb_PION'])
+        kaons_Xb_Xibc = filterInputs('K_Xb_Xibc', [kaons_pid],
+                                     config['Xibc_Xb_KAON'])
+        protons_Xb_Xibc = filterInputs('P_Xb_Xibc', [protons_pid],
+                                       config['Xibc_Xb_PROTON'])
+
+        ks_dd = filterInputs('KS0_DD', [dataOnDemand("StdLooseKsDD")],
+                             config['KS0'])
+        ks_ll = filterInputs('KS0_LL', [dataOnDemand("StdVeryLooseKsLL")],
+                             config['VLKS0_LL'])
+        ks = {"DD": [ks_dd], "LL": [ks_ll]}
+        lambda0_dd = filterInputs('Lambda0_DD',
+                                  [dataOnDemand("StdLooseLambdaDD")],
+                                  config['Lambda0'])
+        lambda0_ll = filterInputs('Lambda0_LL',
+                                  [dataOnDemand("StdLooseLambdaLL")],
+                                  config['Lambda0'])
+        lambda0 = {"DD": [lambda0_dd], "LL": [lambda0_ll]}
+        pi0_merged = filterPi0s('Merged', [StdLooseMergedPi0], config['Pi0'])
+        pi0_resolved = filterPi0s('Resolved', [StdLooseResolvedPi0],
+                                  config['Pi0'])
+        pi0_all = MergedSelection(
+            'Pi0AllBeauty2Charm',
+            RequiredSelections=[pi0_merged, pi0_resolved])
+
+        pi0 = {
+            'Merged': [pi0_merged],
+            'Resolved': [pi0_resolved],
+            'all': [pi0_all]
+        }
+
+        pcut = 'P > %s' % config['Pi0']['FROM_B_P_MIN']
+        pi0_fromB_merged = filterSelection('Pi0FromBMerged', pcut,
+                                           [pi0_merged])
+        pi0_fromB_resolved = filterSelection('Pi0FromBResolved', pcut,
+                                             [pi0_resolved])
+        pi0_fromB = {
+            'Merged': [pi0_fromB_merged],
+            'Resolved': [pi0_fromB_resolved]
+        }
+        muons = filterInputs('MU', [StdLooseMuons],
+                             config['ALL'])  # make muons (for D -> phi mu nu)
+
+        # Jordi: photon selection.
+        gammacut = '(PT > %(PT_MIN)s) & (CL > %(CL_MIN)f) & (PPINFO(LHCb.ProtoParticle.IsNotE,-1) > %(ISNOTE_MIN)f)' % config[
+            'gamma']
+        photons = filterSelection('Gamma', gammacut, [StdLooseAllPhotons])
+        # Alessandro Bertolin: very loose all photons.
+        vlagammacut = '(PT > %(PT_VLAPH)s) & (CL > %(CL_MIN)f) & (PPINFO(LHCb.ProtoParticle.IsNotE,-1) > %(ISNOTE_MIN)f)' % config[
+            'gamma']
+        vlaphotons = filterSelection('VLAGamma', vlagammacut,
+                                     [StdVeryLooseAllPhotons])
+
+        # pre-filter hard inputs (these could have been used in HLT2)
+        topoPions = topoInputs('Pi', [pions])
+        topoPions_PID = topoInputs('Pi_PID', [pions_pid])
+        topoPionsLoose = topoInputsLoose('PiLoose', [pions])
+        topoKaons = topoInputs('K', [kaons])
+        topoKaons_PID = topoInputs('K_PID', [kaons_pid])
+        topoKaonsLoose = topoInputsLoose('KLoose', [kaons])
+        topoProtons = topoInputs('P', [protons])
+        topoProtons_PID = topoInputs('P_PID', [protons_pid])
+
+        # X -> hh
+        hh = HHBuilder(pions, kaons, protons, ks, pi0_fromB, config['HH'],
+                       config['PID'])
+
+        # X -> hhh
+        hhh = HHHBuilder(pions, kaons, protons, config['HHH'], config['PID'])
+
+        # make D->X, etc. inputs
+        d = DBuilder(pions, kaons, ks, pi0, uppions, upkaons, muons, hh,
+                     config['D2X'], config['D2X_FOR_DDX'], config['PID'],
+                     config['Pi0'])
+        dst = DstarBuilder(d, pions, uppions, pi0, photons, vlaphotons,
+                           config['Dstar'], config['PID'])
+
+        # Lc -> X
+        lc = LcBuilder(pions_pid, kaons_pid, protons_pid, config['D2X'],
+                       config['PID'])
+        xicc = XiccBuilder(lc, pions_pid, config['D2X'])
+        # Loose Lc, for Xibc
+        lcLoose = LooseLcBuilder(pions_Xc_Xibc, kaons_Xc_Xibc, protons_Xc_Xibc,
+                                 config['LC_FOR_XIBC'])
+        xiccLoose = LooseXiccBuilder(lcLoose, pions_Xb_Xibc, kaons_Xb_Xibc,
+                                     config['LC_FOR_XIBC'])
+
+        # make B->DX
+        b2dx = B2DXBuilder(d, dst, topoPions, topoPionsLoose, topoKaons,
+                           topoKaons_PID, topoPions_PID, muons, ks, pi0_fromB,
+                           hh, hhh, config['B2X'])
+        self._makeLines(b2dx.lines, config)
+
+        # Bc -> DD lines
+        bc2dd = Bc2DDBuilder(d, dst, config['Bc2DD'])
+        self._makeLines(bc2dd.lines, config)
+
+        # Bc->Buhh lines
+        bc2bx = Bc2BXBuilder(b2dx, topoPionsLoose, topoKaonsLoose,
+                             config['Bc2BX'])
+        self._makeLines(bc2bx.lines, config)
+
+        #Bc -> DX lines
+        bc2dx = Bc2DXBuilder(d, dst, hh, topoPionsLoose, topoKaonsLoose,
+                             config['Bc2DX'])
+        self._makeLines(bc2dx.lines, config)
+
+        # Lb -> X
+        lb2x = Lb2XBuilder(lc, xicc, d, hh, topoPions, topoPions_PID,
+                           topoKaons, topoKaons_PID, topoProtons,
+                           topoProtons_PID, pions, kaons, ks, hhh, dst,
+                           lambda0, config['B2X'])
+        self._makeLines(lb2x.lines, config)
+
+        # Xibc -> Xc hh, LcD0, Xicc h
+        xibc = XibcBuilder(lcLoose, xiccLoose, d, topoPions_PID, topoKaons_PID,
+                           topoProtons_PID, pions_Xb_Xibc, kaons_Xb_Xibc,
+                           protons_Xb_Xibc, muons, config['Xibc'],
+                           config['XiccMu'])
+        self._makeLines(xibc.lines, config)
+
+        # Unbiased lines
+        ltub = LTUnbiasedBuilder(d, dst, config['B2X'])
+        self._makeLines(ltub.lines, config)
+
+        # UP D* lines
+        for line in b2dx.lines:
+            for sel in line.selections:
+                if sel.name().find('WS') > 0: continue
+                dstar_sel = makeB2DstarX(sel, uppions, config['B2X'])
+                self._makeLine(ProtoLine([dstar_sel], line.pre), config)
+
+        # UNKNOWN line
+        # # B->D0X inclusive line
+        # cuts = "(PT > %d*MeV) & (ADMASS('D0') < 25*MeV) & (MIPCHI2DV(PRIMARY)>%d)" \
+        #        % (config['D0INC']['PT_MIN'],config['D0INC']['IPCHI2_MIN'])
+        # sel = filterSelection('D02KPIPIDMTIGHT',cuts,d.kpi_pid_tight)
+        # sel = tosSelection(sel,{'Hlt2Topo2.*Decision%TOS':0})
+        # hlt = "HLT_PASS_RE('Hlt2Topo2.*Decision')"
+        # sline = StrippingLine('D02HHTopoTOSLine',1.0,selection=sel,HLT2=hlt)
+        # self.registerLine(sline)
+
+    def _makeLine(self, protoLine, config):
+        tag = 'B2CBBDTBeauty2CharmFilter'
+        default = config['Prescales']['RUN_BY_DEFAULT']
+        run_re = config['Prescales']['RUN_RE']
+        prescale_keys = config['Prescales'].keys()
+        for line in protoLine.selections:
+            name = line.name().replace(tag, '') + 'Line'
+            match = False
+            for r in run_re:
+                if re.match(r, name):
+                    match = True
+                    break
+            if (not default) and (not match) and (not (name in prescale_keys)):
+                continue
+            tmpSel = Selection(
+                line.name() + 'FilterALL',
+                Algorithm=FilterDesktop(Code='ALL'),
+                RequiredSelections=[line])
+            filter = {'Code' :
+                      "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG)"\
+                      " < %s )" \
+                      % config['GECNTrkMax'],
+                      'Preambulo' : [ "from LoKiTracks.decorators import *",
+                                      'from LoKiCore.functions    import *' ]
+                      }
+            # Hlt2IncPhi untill 2015, since 2016 Hlt2PhiIncPhi
+            hlt = "(HLT_PASS_RE('Hlt2Topo.*Decision') | "\
+                  "HLT_PASS_RE('Hlt2.*IncPhi.*Decision'))"
+
+            if ((name in config['RawEvents'])):
+                rawevent = [
+                    "Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"
+                ]
+            else:
+                rawevent = []
+
+            checkPV_option = True
+
+            sline = StrippingLine(
+                name,
+                protoLine.prescale(line, name, config),
+                selection=tmpSel,
+                checkPV=checkPV_option,
+                FILTER=filter,
+                HLT2=hlt,
+                EnableFlavourTagging=(name in config['FlavourTagging']),
+                RequiredRawEvents=rawevent,
+                MDSTFlag=(name in config['MDSTChannels']),
+                RelatedInfoTools=config['RelatedInfoTools'])
+
+            self.registerLine(sline)
+
+    def _makeLines(self, lines, config):
+        for line in lines:
+            self._makeLine(line, config)
+
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/__init__.py
new file mode 100644
index 000000000..99e0171a6
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingB2OC/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ('StrippingB2DXD2HMuNu', 'StrippingBeauty2Charm')
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingB2Chic0KPi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingB2Chic0KPi.py
new file mode 100644
index 000000000..965f3b349
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingB2Chic0KPi.py
@@ -0,0 +1,476 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting B0->Chic0 K pi, B+->Chic0 K phi #yanxi
+'''
+
+__author__=['Andrii Usachov']
+__date__ = '13/03/2018'
+__version__= '$Revision: 1.2$'
+
+
+__all__ = (
+    'B2Chic0KPiConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              :  'B2Chic0KPi',
+    'BUILDERTYPE'       :  'B2Chic0KPiConf',
+    'CONFIG'    : {
+        'KaonCuts'      : "(PROBNNk  > 0.2) & (PT > 300*MeV) & (MIPCHI2DV()>9) & (TRGHOSTPROB<0.4)",
+        'ProtonCuts'    : "(PROBNNp  > 0.2) & (PT > 300*MeV) & (MIPCHI2DV()>9) & (P > 10*GeV) & (TRGHOSTPROB<0.4)",
+        'PionCuts'      : "(PROBNNpi > 0.2) & (PT > 300*MeV) & (MIPCHI2DV()>9) & (TRGHOSTPROB<0.4)",
+        'KaonCuts4h'    : "(PROBNNk  > 0.2) & (PROBNNp < 0.9) & (PROBNNpi < 0.9) & (MIPCHI2DV()>6) & (PT > 300*MeV) & (TRGHOSTPROB<0.4)",
+        'PionCuts4h'    : "(PROBNNpi > 0.2) & (PROBNNk < 0.9) & (PROBNNp  < 0.9) & (MIPCHI2DV()>6) & (PT > 300*MeV) & (TRGHOSTPROB<0.4)",
+        'Chic0ComAMCuts' : "(AM<4.2*GeV)",
+        'Chic0ComN4Cuts' : """
+                           (in_range(2.6*GeV, AM, 4.1*GeV))
+                           & ( (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3)+ACHILD(PT,4) ) > 2.0 *GeV)
+                           & ( (ACHILD(MIPCHI2DV(), 1) + ACHILD(MIPCHI2DV(), 2) + ACHILD(MIPCHI2DV(), 3) + ACHILD(MIPCHI2DV(), 4))>50)
+                           """,
+        'Chic0MomN4Cuts' : """
+                           (VFASPF(VCHI2/VDOF) < 5.)
+                           & (in_range(2.7*GeV, MM, 4.1*GeV))
+                           & (MIPCHI2DV(PRIMARY) > 0.)
+                           & (BPVVDCHI2>16)
+                           & (BPVDIRA>0.9)
+                           """,
+        'Chic0ComCuts'   : """
+                           (in_range(2.6*GeV, AM, 4.2*GeV))
+                           & ( (ACHILD(PT,1)+ACHILD(PT,2))> 1.5 *GeV)
+                           """,
+        'Chic0MomN2Cuts' : """
+                           (VFASPF(VCHI2/VDOF) < 9.)
+                           & (in_range(2.7*GeV, MM, 4.1*GeV))
+                           & (MIPCHI2DV(PRIMARY) > 0.)
+                           & (BPVVDCHI2>16)
+                           & (BPVDIRA>0.9)
+                           """,
+        'KstarComCuts': """
+                        (ACHILD(PT,1)+ACHILD(PT,2) > 900.*MeV) & (AM < 4.0 *GeV) & (ADOCACHI2CUT(10., ''))
+                        & ( (ACHILD(MIPCHI2DV(), 1) + ACHILD(MIPCHI2DV(), 2))>20)
+                        """,
+        'KstarMomCuts': """
+                          (MIPCHI2DV(PRIMARY) > 0.)
+                          & (BPVVDCHI2 > 9.)
+                          & (VFASPF(VCHI2) < 9.)
+                          & (BPVDIRA>0.9)
+                        """,
+        'PhiComCuts': "(ACHILD(PT,1)+ACHILD(PT,2) > 400.*MeV) & (AM>970.*MeV) &(AM < 1070 *MeV) & (ADOCACHI2CUT(10., ''))",
+        'PhiMomCuts': """
+                          (MIPCHI2DV(PRIMARY) > 0.)
+                          & (BPVVDCHI2 > 9.)
+                          & (VFASPF(VCHI2) < 9.)
+                          & (BPVDIRA>0.9)
+                        """,
+        'BComCuts'     : "(ADAMASS('B0') < 300 *MeV)",
+        'BMomCuts'     : """
+                          (VFASPF(VCHI2/VDOF) < 8.)
+                          & (BPVDIRA> 0.9999)
+                          & (BPVIPCHI2()<16)
+                          & (BPVVDCHI2>49)
+                         """,
+        'LbComCuts'     : "(ADAMASS('Lambda_b0') < 200 *MeV)",
+        'LbMomCuts'     : """
+                          (VFASPF(VCHI2/VDOF) < 5.)
+                          & (BPVDIRA> 0.9999)
+                          & (BPVIPCHI2()<16)
+                          & (BPVVDCHI2>49)
+                         """,
+        'Prescale'      : 1.,
+        'RelatedInfoTools': [{
+                      'Type'              : 'RelInfoVertexIsolation',
+                      'Location'          : 'RelInfoVertexIsolation'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 1.0,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                      'Location'          : 'RelInfoConeVariables_1.0'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 1.5,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                      'Location'          : 'RelInfoConeVariables_1.5'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 2.0,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                      'Location'          : 'RelInfoConeVariables_2.0'
+                  }]       
+        },
+    'STREAMS'           : ['Bhadron'],
+    'WGs'               : ['BandQ'],
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+#from Configurables import DaVinci__N4BodyDecays
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+class B2Chic0KPiConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        self.SelKaons   = self.createSubSel( OutputList = self.name + "SelKaons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLooseKaons/Particles' ), 
+                                           Cuts = config['KaonCuts']
+                                           )
+
+        self.SelPions   = self.createSubSel( OutputList = self.name + "SelPions",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLoosePions/Particles' ), 
+                                           Cuts = config['PionCuts']
+                                           )
+
+        self.SelPions4h = self.createSubSel( OutputList = self.name + "SelPions4h",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLoosePions/Particles' ), 
+                                           Cuts = config['PionCuts4h']
+                                           )
+
+        self.SelKaons4h = self.createSubSel( OutputList = self.name + "SelKaons4h",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLooseKaons/Particles' ), 
+                                           Cuts = config['KaonCuts4h']
+                                           )
+
+        self.SelProtons = self.createSubSel( OutputList = self.name + "SelProtons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLooseProtons/Particles' ), 
+                                           Cuts = config['ProtonCuts']
+                                           )
+
+        """
+        Chic0-> K K Pi Pi
+        """
+        self.SelChic02KKPiPi = self.createN4BodySel( OutputList = self.name + "SelChic02KKPiPi",
+                                                    DaughterLists = [ self.SelKaons4h, self.SelPions4h ],
+                                                    DecayDescriptor = "chi_c0(1P) -> K+ K- pi+ pi-",
+                                                    ComAMCuts      = config['Chic0ComAMCuts'],
+                                                    PreVertexCuts  = config['Chic0ComN4Cuts'], 
+                                                    PostVertexCuts = config['Chic0MomN4Cuts']
+                                                    )
+
+        """
+        Chic0-> K K K K
+        """
+        self.SelChic02KKKK = self.createN4BodySel( OutputList = self.name + "SelChic02KKKK",
+                                                  DaughterLists = [ self.SelKaons4h ],
+                                                  DecayDescriptor = "chi_c0(1P) -> K+ K- K+ K-",
+                                                  ComAMCuts      = config['Chic0ComAMCuts'],
+                                                  PreVertexCuts  = config['Chic0ComN4Cuts'], 
+                                                  PostVertexCuts = config['Chic0MomN4Cuts']
+                                                  )
+
+        
+        """
+        Chic0-> Pi Pi Pi Pi
+        """
+        self.SelChic02PiPiPiPi = self.createN4BodySel( OutputList = self.name + "SelChic02PiPiPiPi",
+                                                      DaughterLists = [ self.SelPions4h ],
+                                                      DecayDescriptor = "chi_c0(1P) -> pi+ pi- pi+ pi-",
+                                                      ComAMCuts      = config['Chic0ComAMCuts'],
+                                                      PreVertexCuts  = config['Chic0ComN4Cuts'], 
+                                                      PostVertexCuts = config['Chic0MomN4Cuts']
+                                                      )
+
+        """
+        Chic0-> p pbar Pi Pi
+        """
+        self.SelChic02PPbarPiPi = self.createN4BodySel( OutputList = self.name + "SelChic02PPbarPiPi",
+                                                      DaughterLists = [ self.SelPions4h, self.SelProtons ],
+                                                      DecayDescriptor = "chi_c0(1P) -> p+ p~- pi+ pi-",
+                                                      ComAMCuts      = config['Chic0ComAMCuts'],
+                                                      PreVertexCuts  = config['Chic0ComN4Cuts'], 
+                                                      PostVertexCuts = config['Chic0MomN4Cuts']
+                                                      )
+        """
+        Chic0-> p pbar K K
+        """
+        self.SelChic02PPbarKK = self.createN4BodySel( OutputList = self.name + "SelChic02PPbarKK",
+                                                      DaughterLists = [ self.SelKaons4h, self.SelProtons ],
+                                                      DecayDescriptor = "chi_c0(1P) -> p+ p~- K+ K-",
+                                                      ComAMCuts      = config['Chic0ComAMCuts'],
+                                                      PreVertexCuts  = config['Chic0ComN4Cuts'],
+                                                      PostVertexCuts = config['Chic0MomN4Cuts']
+                                                      )
+
+        """
+        Chic0-> p pbar
+        """
+        self.SelChic02PPbar = self.createCombinationSel( OutputList = self.name + "SelChic02PPbar",
+                                                        DecayDescriptor = "chi_c0(1P) -> p+ p~-",
+                                                        DaughterLists = [ self.SelProtons ],          
+                                                        PreVertexCuts  = config['Chic0ComCuts'], 
+                                                        PostVertexCuts = config['Chic0MomN2Cuts']
+                                                        )
+
+        """
+        Chic0-> K K
+        """
+        self.SelChic02KK    = self.createCombinationSel( OutputList = self.name + "SelChic02KK",
+                                                        DecayDescriptor = "chi_c0(1P) -> K+ K-",
+                                                        DaughterLists = [ self.SelKaons ],
+                                                        PreVertexCuts  = config['Chic0ComCuts'],
+                                                        PostVertexCuts = config['Chic0MomN2Cuts']
+                                                        )
+
+        """
+        Chic0-> Pi Pi
+        """
+        self.SelChic02PiPi  = self.createCombinationSel( OutputList = self.name + "SelChic02PiPi",
+                                                        DecayDescriptor = "chi_c0(1P) -> pi+ pi-",
+                                                        DaughterLists = [ self.SelPions ],
+                                                        PreVertexCuts  = config['Chic0ComCuts'],
+                                                        PostVertexCuts = config['Chic0MomN2Cuts']
+                                                        )
+
+        """
+        Chi_c0 -> 4h, Chi_c0 -> 2h
+        """
+        from PhysSelPython.Wrappers import MergedSelection
+        self.SelChic0_4h = MergedSelection( self.name + "SelChic0_4h",
+                                        RequiredSelections =  [ self.SelChic02KKPiPi, 
+                                                                self.SelChic02KKKK,
+                                                                self.SelChic02PiPiPiPi,
+                                                                self.SelChic02PPbarPiPi,
+                                                                self.SelChic02PPbarKK
+                                                               ])
+
+        self.SelChic0_2h = MergedSelection( self.name + "SelChic0_2h",
+                                        RequiredSelections =  [ self.SelChic02KK,
+                                                                self.SelChic02PiPi,
+                                                                self.SelChic02PPbar
+                                                                ])
+
+        """
+        K*
+        """
+        self.SelKstar       = self.createCombinationSel( OutputList = self.name + "SelKstar",
+                                         DecayDescriptor = "[K*(892)0 -> K+ pi-]cc", 
+                                         DaughterLists = [self.SelKaons, self.SelPions],
+                                         PreVertexCuts  = config['KstarComCuts'],     
+                                         PostVertexCuts = config['KstarMomCuts']
+                                         )
+
+        """
+        phi(1020)
+        """
+        self.SelPhi = self.createCombinationSel( OutputList = self.name + "SelPhi",
+                                         DecayDescriptor = "phi(1020) -> K+ K-", 
+                                         DaughterLists = [self.SelKaons],
+                                         PreVertexCuts  = config['PhiComCuts'],     
+                                         PostVertexCuts = config['PhiMomCuts']
+                                         )
+         
+        """
+        B->Chi_c0(->2h) K* 
+        """
+        self.SelB2Chic0Kpi_2h = self.createCombinationSel( OutputList = self.name + "SelB2Chic0Kpi_2h",
+                                                              DecayDescriptor = "[B0 -> chi_c0(1P) K*(892)0]cc",
+                                                              DaughterLists = [ self.SelKstar, self.SelChic0_2h ],                    
+                                                              PreVertexCuts  = config['BComCuts'],
+                                                              PostVertexCuts = config['BMomCuts'] )
+         
+        self.B2Chic0Kpi_2hLine = StrippingLine( self.name + '_2hLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                  # HLT       = config['HLTCuts'],
+                                                   algos     = [ self.SelB2Chic0Kpi_2h ],
+                                                   EnableFlavourTagging = False,
+#                                                   MDSTFlag = False,
+                                                   RelatedInfoTools = self.config['RelatedInfoTools']
+                                                   )
+        
+        self.registerLine( self.B2Chic0Kpi_2hLine )
+        
+        
+        
+        """
+        B->(Chi_c0->4h) K* 
+        """
+
+        self.SelB2Chic0Kpi_4h = self.createCombinationSel( OutputList = self.name + "SelB2Chic0Kpi_4h",
+                                                              DecayDescriptor = "[B0 -> chi_c0(1P) K*(892)0]cc",
+                                                              DaughterLists = [ self.SelKstar, self.SelChic0_4h ],                    
+                                                              PreVertexCuts  = config['BComCuts'],
+                                                              PostVertexCuts = config['BMomCuts'] )
+         
+        self.B2Chic0Kpi_4hLine = StrippingLine( self.name + '_4hLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                  # HLT       = config['HLTCuts'],
+                                                   algos     = [ self.SelB2Chic0Kpi_4h ],
+                                                   EnableFlavourTagging = False,
+#                                                   MDSTFlag = False,
+                                                   RelatedInfoTools = self.config['RelatedInfoTools']
+                                                   )
+        
+        self.registerLine( self.B2Chic0Kpi_4hLine )
+        
+        
+
+
+
+
+        """
+        B+->Chi_c0(->2h) phi K+ 
+        """
+        self.SelB2Chic0phiK_2h = self.createCombinationSel( OutputList = self.name + "SelB2Chic0phiK_2h",
+                                                              DecayDescriptor = "[B+ -> chi_c0(1P) phi(1020) K+]cc",
+                                                              DaughterLists = [ self.SelPhi, self.SelKaons, self.SelChic0_2h ],                    
+                                                              PreVertexCuts  = config['BComCuts'],
+                                                              PostVertexCuts = config['BMomCuts'] )
+         
+        self.B2Chic0phiK_2hLine = StrippingLine( 'B2Chic0phiK_2hLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                  # HLT       = config['HLTCuts'],
+                                                   algos     = [ self.SelB2Chic0phiK_2h ],
+                                                   EnableFlavourTagging = False,
+#                                                   MDSTFlag = False,
+                                                   RelatedInfoTools = self.config['RelatedInfoTools']
+                                                   )
+        
+        self.registerLine( self.B2Chic0phiK_2hLine )
+        
+        
+        
+        """
+        B+->Chi_c0(->4h) phi K+ 
+        """
+        self.SelB2Chic0phiK_4h = self.createCombinationSel( OutputList = self.name + "SelB2Chic0phiK_4h",
+                                                        DecayDescriptor = "[B+ -> chi_c0(1P) phi(1020) K+]cc",
+                                                        DaughterLists = [ self.SelPhi, self.SelKaons, self.SelChic0_4h ],                    
+                                                        PreVertexCuts  = config['BComCuts'],
+                                                        PostVertexCuts = config['BMomCuts'] )
+        
+        self.B2Chic0phiK_4hLine            = StrippingLine( 'B2Chic0phiK_4hLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                 #  HLT       = config['HLTCuts'],
+                                                   algos     = [ self.SelB2Chic0phiK_4h ],
+                                                   EnableFlavourTagging = False,
+#                                                   MDSTFlag = False,
+                                                   RelatedInfoTools = self.config['RelatedInfoTools']                                                   
+                                                   )
+        self.registerLine( self.B2Chic0phiK_4hLine )
+
+        """
+        Lambda_b0->Chi_c0(->2h) p+ K- 
+        """
+        self.SelLb2Chic0pK_2h = self.createCombinationSel( OutputList = self.name + "SelLb2Chic0pK_2h",
+                                                              DecayDescriptor = "[Lambda_b0 -> chi_c0(1P) p+ K-]cc",
+                                                              DaughterLists = [ self.SelProtons, self.SelKaons, self.SelChic0_2h ],                    
+                                                              PreVertexCuts  = config['LbComCuts'],
+                                                              PostVertexCuts = config['LbMomCuts'] )
+         
+        self.Lb2Chic0pK_2hLine = StrippingLine( 'Lb2Chic0pK_2hLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                  # HLT       = config['HLTCuts'],
+                                                   algos     = [ self.SelLb2Chic0pK_2h ],
+                                                   EnableFlavourTagging = False,
+#                                                   MDSTFlag = False,
+                                                   RelatedInfoTools = self.config['RelatedInfoTools']
+                                                   )
+        
+        self.registerLine( self.Lb2Chic0pK_2hLine )
+
+        """
+        Lambda_b0->Chi_c0(->4h) p+ K- 
+        """
+        self.SelLb2Chic0pK_4h = self.createCombinationSel( OutputList = self.name + "SelLb2Chic0pK_4h",
+                                                              DecayDescriptor = "[Lambda_b0 -> chi_c0(1P) p+ K-]cc",
+                                                              DaughterLists = [ self.SelProtons, self.SelKaons, self.SelChic0_4h ],                    
+                                                              PreVertexCuts  = config['LbComCuts'],
+                                                              PostVertexCuts = config['LbMomCuts'] )
+         
+        self.Lb2Chic0pK_4hLine = StrippingLine( 'Lb2Chic0pK_4hLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                  # HLT       = config['HLTCuts'],
+                                                   algos     = [ self.SelLb2Chic0pK_4h ],
+                                                   EnableFlavourTagging = False,
+#                                                   MDSTFlag = False,
+                                                   RelatedInfoTools = self.config['RelatedInfoTools']
+                                                   )
+        
+        self.registerLine( self.Lb2Chic0pK_4hLine )
+        
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+
+    def createN4BodySel( self, OutputList,
+                         DecayDescriptor,
+                         DaughterLists,
+                         DaughterCuts = {} ,
+                         ComAMCuts      = "AALL",
+                         PreVertexCuts  = "AALL",
+                         PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = DaVinci__N4BodyDecays ( DecayDescriptor = DecayDescriptor,      
+                                           DaughtersCuts = DaughterCuts,
+                                           Combination12Cut  = ComAMCuts + "&" + "( ACHI2DOCA(1,2)<20 )",
+                                           Combination123Cut = ComAMCuts + "&" + "( ACHI2DOCA(1,3)<20 ) & ( ACHI2DOCA(2,3)<20 )",
+                                           CombinationCut = "( ACHI2DOCA(1,4)<20 ) & ( ACHI2DOCA(2,4)<20 ) & ( ACHI2DOCA(3,4)<20 )" + " & " + PreVertexCuts,
+                                           MotherCut = PostVertexCuts,
+                                           ReFitPVs = False )
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+    
+
+    #def applyMVA( self, name, 
+    #              SelB,
+    #              MVAVars,
+    #              MVAxmlFile,
+    #              MVACutValue
+    #              ):
+    #    from MVADictHelpers import addTMVAclassifierValue
+    #    from Configurables import FilterDesktop as MVAFilterDesktop
+    #
+    #    _FilterB = MVAFilterDesktop( name + "Filter",
+    #                                 Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+    #
+    #    addTMVAclassifierValue( Component = _FilterB,
+    #                            XMLFile   = MVAxmlFile,
+    #                            Variables = MVAVars,
+    #                            ToolName  = name )
+    #    
+    #    return Selection( name,
+    #                      Algorithm =  _FilterB,
+    #                      RequiredSelections = [ SelB ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingB2JpsiXforEM_s.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingB2JpsiXforEM_s.py
new file mode 100644
index 000000000..fcb99c173
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingB2JpsiXforEM_s.py
@@ -0,0 +1,275 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingB2JpsiXforBandQ_s.py,v 1.3 2010-09-05 21:31:13 wouter Exp $
+'''
+Module for construction of B->JpsiX for BandQ Early Measurement, copied from StrippingB2JpsiXforBeta_s by Greig Cowan, Juan Palacios, Francesca Dordei, Carlos Vazquez Sierra
+'''
+
+__author__ = ['Greig Cowan','Juan Palacios','Francesca Dordei', 'Carlos Vazquez Sierra']
+__date__ = '28/02/2015'
+__version__ = '$Revision: 0.0 $'
+
+__all__ = ('B2JpsiXforEM_sConf','default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from Configurables import LoKi__PVReFitter, CombineParticles
+from CommonParticles.Utils import updateDoD
+from StandardParticles import StdLoosePions
+from StandardParticles import StdLooseKaons
+from StandardParticles import StdAllLooseKaons
+from StandardParticles import StdLooseResolvedPi0
+from StandardParticles import StdLooseMergedPi0
+from StandardParticles import StdNoPIDsPions
+from StandardParticles import StdLooseProtons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+default_config = {
+    'NAME'              : 'B2JpsiXforEM',
+    'WGs'               : ['BandQ'],
+    'BUILDERTYPE'       : 'B2JpsiXforEM_sConf',
+    'CONFIG'    : {'ReFitPVsFlag'            :  True
+                   ,'TRCHI2DOF'         :       5
+                   ,'BPVLTIME'          :       0.2
+                   ,'JpsiMassWindow'    :       80
+                   ,'DaughterPT'        :       1000
+                   ,'VCHI2PDOF'         :       10
+                   ,'BuVCHI2PDOF'       :       10.0 #ok
+                   ,'BdVCHI2PDOF'       :       10.0 #ok
+                   ,'BsVCHI2PDOF'       :       10.0 #ok
+                   ,'MinBsMass'         :       5150.0
+                   ,'MaxBsMass'         :       5550.0
+                   ,'MinBuMass'         :       5150.0 #ok
+                   ,'MaxBuMass'         :       5550.0 #ok
+                   ,'MinBdMass'         :       5150.0
+                   ,'MaxBdMass'         :       5550.0
+                   ,'CombMinBuMass'     :       5050.0 #ok
+                   ,'CombMaxBuMass'     :       5650.0 #ok
+                   ,'CombMinBdMass'     :       5050.0
+                   ,'CombMaxBdMass'     :       5650.0
+                   ,'CombMinBsMass'     :       5050.0
+                   ,'CombMaxBsMass'     :       5650.0
+                   ,'PIDKaon'           :        -2
+                   ,'MinPhiMass'        :       980.0
+                   ,'MaxPhiMass'        :       1050.0
+                   ,'phiPT'             :       500.0
+                   ,'phiVCHI2'          :       16.0
+                   ,'MinKstarMass'      :       826.0
+                   ,'MaxKstarMass'      :       966.0
+                   ,'KstarPT'           :       500.0
+                   ,'KstarVCHI2'        :       16.0
+                   ,'PTKaon'            :       500.
+                   
+                   
+                   },
+    'STREAMS' : {'Dimuon' : ['StrippingB2JpsiXforEMBu2JpsiKDetachedLine',
+                             'StrippingB2JpsiXforEMBd2JpsiKstarDetachedLine',
+                             'StrippingB2JpsiXforEMBs2JpsiPhiDetachedLine'
+                             ]
+                 }
+    }
+
+### Lines stored in this file:
+# StrippingBetaSBu2JpsiKDetachedLine
+# StrippingBetaSBs2JpsiPhiDetachedLine
+# StrippingBetaSBd2JpsiKstarDetachedLine
+
+
+class B2JpsiXforEM_sConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+	
+        # Define input daughter lists for various B -> J/psi X selections:
+
+        self.WideJpsiList = DataOnDemand(Location = "Phys/StdLooseJpsi2MuMu/Particles")
+
+        self.JpsiList = self.createSubSel( OutputList = 'NarrowJpsiForBandQ' + self.name,
+                                           InputList = self.WideJpsiList,
+                                           Cuts = "(PFUNA(ADAMASS('J/psi(1S)')) < %(JpsiMassWindow)s * MeV)" % self.config)
+        
+
+        self.NoIPKaonList = self.createSubSel( OutputList = "NoIPKaonsForBandQ" + self.name,
+                                               InputList = DataOnDemand(Location = "Phys/StdAllNoPIDsKaons/Particles"),
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s )" % self.config )    
+        
+                        
+        self.PhiList = self.createSubSel( OutputList = "Phi2KKForBandQ" + self.name,
+                                          InputList = DataOnDemand(Location = "Phys/StdLoosePhi2KK/Particles"),
+                                          #Cuts = "(in_range(980,M,1050))" \
+                                          Cuts = "(in_range( %(MinPhiMass)s *MeV, M, %(MaxPhiMass)s *MeV) & (PT > %(phiPT)s *MeV ) & (VFASPF(VCHI2) < %(phiVCHI2)s ) & (MAXTREE('K+'==ABSID, TRCHI2DOF) < %(TRCHI2DOF)s ) & (MINTREE('K+'==ABSID, PIDK) > %(PIDKaon)s ))" % self.config)
+        self.KstarList = self.createSubSel( OutputList = "Kstar2KpiForBandQ" + self.name,
+                                            InputList = DataOnDemand(Location = "Phys/StdLooseKstar2Kpi/Particles"),
+                                            #Cuts = "(in_range(826,M,966))" \
+                                            Cuts = "(in_range( %(MinKstarMass)s *MeV, M, %(MaxKstarMass)s *MeV ) & (PT > %(KstarPT)s *MeV) & (VFASPF(VCHI2) < %(KstarVCHI2)s ) & (MAXTREE('K+'==ABSID,  TRCHI2DOF) < %(TRCHI2DOF)s ) & (MAXTREE('pi-'==ABSID, TRCHI2DOF) < %(TRCHI2DOF)s )  & (MINTREE('K+'==ABSID, PIDK) > %(PIDKaon)s ))" % self.config)
+        #  & (MINTREE('K+'==ABSID, PIDK) > %(PIDKaon)s )
+        
+        
+        
+        self.makeBu2JpsiK()
+        self.makeBs2JpsiPhi()
+        
+        self.makeBd2JpsiKstar()
+        
+        
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                      Algorithm = filter,
+                      RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                          DecayDescriptor,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = False ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( name=self.name+"combiner", DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = ReFitPVs)
+        
+        if ReFitPVs:
+            mypvrefitter=LoKi__PVReFitter("mypvrefitter")
+            mypvrefitter.CheckTracksByLHCbIDs = True
+            mypvrefitter.DeltaChi2 = 1.
+            mypvrefitter.DeltaDistance = 100.
+            combiner.IgnoreP2PVFromInputLocations = True
+            combiner.addTool(mypvrefitter)
+            combiner.PVReFitters.update( {"": "LoKi::PVReFitter/mypvrefitter"} )
+            
+        
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+        
+    def createCombinationsSel( self, OutputList,
+	                  DecayDescriptors,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = False ) :
+        '''For taking in multiple decay descriptors'''
+        combiner = CombineParticles( name=self.name+"combiners",DecayDescriptors = DecayDescriptors,
+                                 DaughtersCuts = DaughterCuts,
+                                 MotherCut = PostVertexCuts,
+                                 CombinationCut = PreVertexCuts,
+                                 ReFitPVs = ReFitPVs)
+        if ReFitPVs:
+            mypvrefitter=LoKi__PVReFitter("mypvrefitter")
+            mypvrefitter.CheckTracksByLHCbIDs = True
+            mypvrefitter.DeltaChi2 = 1.
+            mypvrefitter.DeltaDistance = 100.
+            combiner.IgnoreP2PVFromInputLocations = True
+            combiner.addTool(mypvrefitter)
+            combiner.PVReFitters.update( {"": "LoKi::PVReFitter/mypvrefitter"} )
+
+        
+        return Selection ( OutputList,
+                       Algorithm = combiner,
+                       RequiredSelections = DaughterLists)
+
+    
+    def makeBu2JpsiK( self ):
+        Bu2JpsiK = self.createCombinationSel( OutputList = "Bu2JpsiK" + self.name,
+                                              DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                              DaughterLists = [ self.WideJpsiList, self.NoIPKaonList ],
+                                              #DaughterCuts  = {"K+": "(PT > 500.*MeV)" },
+                                              #DaughterCuts  = {"K+": "(PT > %(PTKaon)s *MeV)" %self.config },
+                                              DaughterCuts  = {"K+": "ALL" %self.config },
+                                              PreVertexCuts = "in_range( %(CombMinBuMass)s *MeV, AM, %(CombMaxBuMass)s *MeV)" %self.config,
+                                              PostVertexCuts = "in_range( %(MinBuMass)s *MeV,M, %(MaxBuMass)s *MeV) & (VFASPF(VCHI2PDOF) < %(BuVCHI2PDOF)s)" % self.config,
+                                              ReFitPVs = self.config["ReFitPVsFlag"]
+                                              ) # for the other particles is 10.
+
+        #Bu2JpsiKPrescaledLine = StrippingLine( self.name + "Bu2JpsiKPrescaledLine", algos = [ Bu2JpsiK ] , HLT = "HLT_PASS_RE('Hlt2DiMuonJPsiDecision')", prescale = self.config["Bu2JpsiKPrescale"], EnableFlavourTagging = True, MDSTFlag = True )
+
+        Bu2JpsiKDetached = self.createSubSel( InputList = Bu2JpsiK, OutputList = Bu2JpsiK.name() + "Detached" + self.name,
+                                              Cuts = "(CHILD('Beauty -> ^J/psi(1S) X', PFUNA(ADAMASS('J/psi(1S)'))) < %(JpsiMassWindow)s * MeV) & (BPVLTIME() > %(BPVLTIME)s *ps)" % self.config)
+
+        Bu2JpsiKDetachedLine  = StrippingLine( self.name + "Bu2JpsiKDetachedLine", algos = [ Bu2JpsiKDetached ] )
+        
+        self.registerLine(Bu2JpsiKDetachedLine)
+        #self.registerLine(Bu2JpsiKPrescaledLine)
+
+    def makeBs2JpsiPhi( self ):
+        Bs2JpsiPhi = self.createCombinationSel( OutputList = "Bs2JpsiPhi" + self.name,
+                                                DecayDescriptor = "B_s0 -> J/psi(1S) phi(1020)",
+                                                DaughterLists  = [ self.WideJpsiList, self.PhiList ],
+                                                PreVertexCuts = "in_range( %(CombMinBsMass)s *MeV, AM, %(CombMaxBsMass)s *MeV)" %self.config,
+                                                PostVertexCuts = "in_range( %(MinBsMass)s *MeV,M, %(MaxBsMass)s *MeV) & (VFASPF(VCHI2PDOF) < %(BsVCHI2PDOF)s)" % self.config,
+                                                ReFitPVs = self.config["ReFitPVsFlag"]
+                                                )
+				   
+        #Bs2JpsiPhiPrescaledLine = StrippingLine( self.name + "Bs2JpsiPhiPrescaledLine", algos = [ Bs2JpsiPhi ] , HLT = "HLT_PASS_RE('Hlt2DiMuonJPsiDecision')", prescale = self.config['Bs2JpsiPhiPrescale'], MDSTFlag = True, EnableFlavourTagging = True )
+
+        Bs2JpsiPhiDetached = self.createSubSel( InputList = Bs2JpsiPhi,
+                                                OutputList = Bs2JpsiPhi.name() + "Detached" + self.name,
+                                                Cuts = "(CHILD('Beauty -> ^J/psi(1S) X', PFUNA(ADAMASS('J/psi(1S)'))) < %(JpsiMassWindow)s * MeV) & (BPVLTIME() > %(BPVLTIME)s*ps)" % self.config )
+
+        Bs2JpsiPhiDetachedLine  = StrippingLine( self.name + "Bs2JpsiPhiDetachedLine", algos = [ Bs2JpsiPhiDetached ] )
+        
+        #self.registerLine(Bs2JpsiPhiPrescaledLine)
+        self.registerLine(Bs2JpsiPhiDetachedLine)
+
+    def makeBd2JpsiKstar( self ):
+        Bd2JpsiKstar = self.createCombinationSel( OutputList = "Bd2JpsiKstar" + self.name,
+                                                  DecayDescriptor = "[B0 -> J/psi(1S) K*(892)0]cc",
+                                                  DaughterLists  = [ self.WideJpsiList, self.KstarList ],
+                                                  PreVertexCuts = "in_range( %(CombMinBdMass)s *MeV, AM, %(CombMaxBdMass)s *MeV)" %self.config,
+                                                  #PostVertexCuts = "in_range(5150,M,5450) & (VFASPF(VCHI2PDOF) < %(VCHI2PDOF)s)" % self.config)
+                                                  PostVertexCuts = "in_range( %(MinBdMass)s *MeV, M, %(MaxBdMass)s *MeV) & (VFASPF(VCHI2PDOF) < %(BdVCHI2PDOF)s)" % self.config,
+                                                  ReFitPVs = self.config["ReFitPVsFlag"]
+                                                  )
+
+        #Bd2JpsiKstarPrescaledLine = StrippingLine( self.name + "Bd2JpsiKstarPrescaledLine", algos = [ Bd2JpsiKstar ] , HLT = "HLT_PASS_RE('Hlt2DiMuonJPsiDecision')", prescale = self.config['Bd2JpsiKstarPrescale'], MDSTFlag = True, EnableFlavourTagging = True )
+
+
+        Bd2JpsiKstarDetached = self.createSubSel( InputList = Bd2JpsiKstar,
+                                                  OutputList = Bd2JpsiKstar.name() + "Detached" + self.name,
+                                                  Cuts = "(CHILD('Beauty -> ^J/psi(1S) X', PFUNA(ADAMASS('J/psi(1S)'))) < %(JpsiMassWindow)s * MeV) & (BPVLTIME() > %(BPVLTIME)s*ps)" % self.config )
+
+        Bd2JpsiKstarDetachedLine  = StrippingLine( self.name + "Bd2JpsiKstarDetachedLine",
+                                          algos = [ Bd2JpsiKstarDetached ]  )
+
+        #self.registerLine(Bd2JpsiKstarPrescaledLine)
+        self.registerLine(Bd2JpsiKstarDetachedLine)
+
+        
+    def filterTisTos( self, name, DiMuonInput, myTisTosSpecs ) :
+        from Configurables import TisTosParticleTagger
+    
+        myTagger = TisTosParticleTagger(name + "_TisTosTagger")
+        myTagger.TisTosSpecs = myTisTosSpecs
+        
+        # To speed it up, TisTos only with tracking system:
+        myTagger.ProjectTracksToCalo = False
+        myTagger.CaloClustForCharged = False
+        myTagger.CaloClustForNeutral = False
+        myTagger.TOSFrac = { 4:0.0, 5:0.0 }
+
+        return Selection(name + "_SelTisTos",
+                     Algorithm = myTagger,
+                     RequiredSelections = [ DiMuonInput ] ) 
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBbbar2PhiPhi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBbbar2PhiPhi.py
new file mode 100644
index 000000000..bdcc6c4a1
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBbbar2PhiPhi.py
@@ -0,0 +1,140 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Bbbar->PhiPhi, including two lines:
+1. Prompt line, with tight PT, PID cuts, requiring Hlt Tis, since there is no lifetime unbiased phi trigger yet.
+2. Detached line, with loose PT, PID cuts, but with IPS cuts on Kaons. 
+
+To include it:
+
+from StrippingSelections.StrippingBbbar2PhiPhi import Bbbar2PhiPhiConf
+from StrippingSelections.StrippingBbbar2PhiPhi import config_default as config_Bbbar2PhiPhi
+confBbbar2PhiPhi = Bbbar2PhiPhiConf( name = 'Bbbar2PhiPhi', config = config_Bbbar2PhiPhi )
+stream.appendLines( confBbbar2PhiPhi.lines() )
+'''
+
+__author__=['Simone Stracka']
+__date__ = '10/03/2015'
+__all__ = (
+    'Bbbar2PhiPhiConf'
+    )
+
+default_config = {
+    'NAME'        : 'Bbbar2PhiPhi', 
+    'BUILDERTYPE' : 'Bbbar2PhiPhiConf',
+    'CONFIG' : {
+        'TRCHI2DOF'        :     3.  ,
+        'KaonPIDK'         :     0.  ,
+        'KaonPT'           :   650.  , # MeV
+        'PhiVtxChi2'       :     9.  ,
+        'PhiMassW'         :    30.  , 
+        'CombMaxMass'      : 10700.  , # MeV, before Vtx fit
+        'CombMinMass'      :  8800.  , # MeV, before Vtx fit
+        'MaxMass'          : 10600.  , # MeV, after Vtx fit
+        'MinMass'          :  8900.  , # MeV, after Vtx fit
+        'Phi_TisTosSpecs'  : { "Hlt1Global%TIS" : 0 },
+        },
+    'STREAMS' : [ 'Charm' ] ,
+    'WGs'     : [ 'BandQ' ]
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdNoPIDsProtons, StdNoPIDsPions, StdNoPIDsDownPions
+
+class Bbbar2PhiPhiConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        """
+        Unbiased, require Hlt Tis 
+        """
+        self.PhiForJpsiList = self.createSubSel( OutputList = "PhiFor" + self.name,
+                                                 InputList =  DataOnDemand( Location = 'Phys/StdTightPhi2KK/Particles' ), 
+                                                 Cuts = "(VFASPF(VCHI2/VDOF)<%(PhiVtxChi2)s)"\
+                                                 " & (ADMASS('phi(1020)')<%(PhiMassW)s*MeV)"\
+                                                 " & (INTREE( ('K+'==ID) & (PT> %(KaonPT)s*MeV) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PIDK> %(KaonPIDK)s) ))"\
+                                                 " & (INTREE( ('K-'==ID) & (PT> %(KaonPT)s*MeV) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PIDK> %(KaonPIDK)s) ))" % self.config )
+
+        self.TisPhiForJpsiList = self.filterTisTos( "TisPhiFor" + self.name ,
+                                                    PhiInput = self.PhiForJpsiList,
+                                                    myTisTosSpecs = config['Phi_TisTosSpecs']
+                                                    )
+
+        self.makeJpsi2PhiPhi()
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "AALL",
+                              PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = True)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+    
+    
+    
+    def makeJpsi2PhiPhi(self):
+        Jpsi2PhiPhi = self.createCombinationSel( OutputList = "Jpsi2PhiPhi" + self.name,
+                                                 DecayDescriptor = " J/psi(1S) -> phi(1020) phi(1020)", 
+                                                 DaughterLists = [ self.TisPhiForJpsiList ], 
+                                                 PreVertexCuts = "(in_range( %(CombMinMass)s *MeV, AM, %(CombMaxMass)s *MeV))" % self.config,
+                                                 PostVertexCuts = "(in_range( %(MinMass)s *MeV, MM, %(MaxMass)s *MeV)) & (VFASPF(VCHI2PDOF) < 16 )" %self.config )
+        
+        Jpsi2PhiPhiLine = StrippingLine( self.name + "Line",
+                                         algos = [ Jpsi2PhiPhi ] )
+        
+        self.registerLine(Jpsi2PhiPhiLine)
+        
+        
+    def filterTisTos(self, name,
+                     PhiInput,
+                     myTisTosSpecs ) :
+        from Configurables import TisTosParticleTagger
+        
+        myTagger = TisTosParticleTagger(name + "_TisTosTagger")
+        myTagger.TisTosSpecs = myTisTosSpecs
+        
+        # To speed it up, TisTos only with tracking system)
+        myTagger.ProjectTracksToCalo = False
+        myTagger.CaloClustForCharged = False
+        myTagger.CaloClustForNeutral = False
+        myTagger.TOSFrac = { 4:0.0, 5:0.0 }
+        
+        return Selection(name + "_SelTisTos",
+                         Algorithm = myTagger,
+                         RequiredSelections = [ PhiInput ] )
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2Ds1Gamma.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2Ds1Gamma.py
new file mode 100644
index 000000000..5911a5e2d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2Ds1Gamma.py
@@ -0,0 +1,242 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Radiative Decays Stripping Selections and StrippingLines.
+Provides functions to build Bc, D0, Ds1 selections.
+Provides class Bc2Ds1GammaConf, which constructs the Selections and
+StrippingLines given a configuration dictionary.
+Exported selection makers: 'makePhoton', 'makeD0', 'makeDs1', 'makeBc2Ds1Gamma',
+
+"""
+
+__author__ = ['Marco Pappagallo']
+__date__ = '02/07/2014'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('Bc2Ds1GammaConf',
+           'makePhoton',
+           'makeD0',
+           'makeDs1',
+           'makeDs1WS',
+           'makeBc2Ds1Gamma',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+#default_name = 'Bc2Ds1Gamma'
+default_config = {
+    'NAME'              : 'Bc2Ds1Gamma',
+    'BUILDERTYPE'       : 'Bc2Ds1GammaConf',
+    'CONFIG'    : {
+                  #'TrIPchi2'            : 4.        # Dimensionless Already implemented in the particle lists
+#                   'BcMassWin'           : 1500.     # MeV
+                   'MinBcMass'           : 4800.     # MeV
+                  ,'MaxBcMass'           : 7500.     # MeV  
+                  ,'BcPVIPchi2'          : 16.       # Dimensionless
+                  ,'photonPT'            : 1500.     # MeV
+                  ,'KaonProbNN'          : 0.1       # Dimensionless
+                  ,'pionProbNN'          : 0.1       # Dimensionless
+                  ,'TrGhostProb'         : 0.5       # Dimensionless
+                  ,'Ds1DeltaMassWin'     : 580       # MeV
+                  ,'MaxDs1VertChi2DOF'   : 10        # Dimensionless
+                  ,'Bc_PT'               : 1000      # MeV
+                  ,'CTAU_Bc'             : 75        # microMeter
+                  # Pre- and postscales
+                  ,'Bc2Ds1GammaPreScale'               : 1.0
+                  ,'Bc2Ds1GammaPostScale'              : 1.0
+                  },
+    'STREAMS' : [ 'BhadronCompleteEvent' ],
+    'WGs'    : [ 'BandQ' ]
+    }
+
+class Bc2Ds1GammaConf(LineBuilder):
+    """
+    Definition of Bc -> Ds1 Gamma stripping
+    
+    Constructs Bc -> Ds1 Gamma Selections and StrippingLines from
+    a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> gammaConf = StrippingB2XGammaConf('StrippingB2XGammaTest',config)
+    >>> gammaLines = gammaConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selPhoton                    : Photon Selection object
+    selD0                        : nominal D0 -> K pi Selection object
+    selDs1                       : nominal Ds1 -> D0 K Selection object 
+    selDs1WS                     : nominal Ds1 -> D~0 K Selection object
+    selBc2Ds1Gamma               : Bc -> Ds1 Gamma Selection object 
+    selBc2Ds1GammaWS             : Bc -> Ds1 Gamma Selection object
+    lines                  : List of lines
+
+    Exports as class data member:
+    StrippingB2XGammaConf.__configuration_keys__ : List of required configuration parameters.    
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        # if name not set outside, set it to empty
+        #if name == None:
+        #    name = ""   
+
+        # Selection of Bc daughters: photon, D0, Ds1
+        self.selPhoton = makePhoton('GammaFor%s' % name,
+                                    config['photonPT'])
+
+        self.selD0  = makeD0('D0For%s' % name,
+                             config['KaonProbNN'],
+                             config['pionProbNN'],
+                             config['TrGhostProb'])
+
+        self.selDs1 = makeDs1('Ds1For%s' % name,
+                              self.selD0,
+                              '[D_s1(2536)+ -> D0 K+]cc', #DecayDescriptor
+                              config['KaonProbNN'],
+                              config['TrGhostProb'],
+                              config['Ds1DeltaMassWin'],
+                              config['MaxDs1VertChi2DOF'])
+
+        self.selDs1WS = makeDs1('Ds1WSFor%s' % name,
+                              self.selD0,
+                              '[D_s1(2536)+ -> D~0 K+]cc', #DecayDescriptor
+                              config['KaonProbNN'],
+                              config['TrGhostProb'],
+                              config['Ds1DeltaMassWin'],
+                              config['MaxDs1VertChi2DOF'])
+
+        # Bc->Ds1 Gamma selections
+        self.selBc2Ds1Gamma = makeBc2Ds1Gamma('Bc2Ds1GammaFor%s' % name,
+                                              self.selDs1,
+                                              self.selPhoton,
+                                              config['BcPVIPchi2'],
+#                                              config['BcMassWin'],
+                                              config['MinBcMass'],
+                                              config['MaxBcMass'],
+                                              config['Bc_PT'],
+                                              config['CTAU_Bc'])
+
+        self.selBc2Ds1GammaWS = makeBc2Ds1Gamma('Bc2Ds1GammaWSFor%s' % name,
+                                                self.selDs1WS,
+                                                self.selPhoton,
+                                                config['BcPVIPchi2'],
+#                                                config['BcMassWin'],
+                                                config['MinBcMass'],
+                                                config['MaxBcMass'],
+                                                config['Bc_PT'],
+                                                config['CTAU_Bc'])
+
+        # Create and register stripping lines
+        self.Bc2Ds1GammaLine = StrippingLine("%s_Line" % name,
+                                             prescale=config['Bc2Ds1GammaPreScale'],
+                                             postscale=config['Bc2Ds1GammaPostScale'],
+                                             selection=self.selBc2Ds1Gamma)
+        self.registerLine(self.Bc2Ds1GammaLine)
+
+        self.Bc2Ds1GammaLineWS = StrippingLine("%sWS_Line" % name,
+                                               prescale=config['Bc2Ds1GammaPreScale'],
+                                               postscale=config['Bc2Ds1GammaPostScale'],
+                                               selection=self.selBc2Ds1GammaWS)
+        self.registerLine(self.Bc2Ds1GammaLineWS)
+        
+def makePhoton(name, photonPT):
+    """
+    Create photon Selection object starting from DataOnDemand 'Phys/StdLooseAllPhotons'.
+
+    @arg name: name of the Selection.
+    @arg photonPT: PT of the photon
+    @return: Selection object
+    
+    """
+
+    _code = "(PT> %(photonPT)s*MeV)" % locals()
+    _gammaFilter = FilterDesktop(Code=_code)
+    _stdGamma = DataOnDemand(Location='Phys/StdLooseAllPhotons/Particles')
+    return Selection(name, Algorithm=_gammaFilter, RequiredSelections=[_stdGamma])
+
+def makeD0(name,  KaonProbNN, pionProbNN, TrGhostProb) :
+    """
+    Create and return a D0->Kpi Selection object, starting from DataOnDemand 'Phys/StdLooseD02KPi'.
+    
+    @arg name: name of the Selection.
+    @arg KaonProbNN: PID of Kaon
+    @arg pionProbNN: PID of pion
+    @arg TrGhostProb: Ghost probability of pion/kaon
+    @return: Selection object
+    
+    """
+
+    _code = "(MAXTREE(ABSID=='K+',PROBNNk) > %(KaonProbNN)s) & (MAXTREE(ABSID=='pi+',PROBNNpi) > %(pionProbNN)s) & CHILDCUT( (TRGHOSTPROB<%(TrGhostProb)s) , 1 ) & CHILDCUT( (TRGHOSTPROB<%(TrGhostProb)s) , 2 )" % locals()
+    _D0Filter = FilterDesktop(Code=_code)
+    _stdD02Kpi = DataOnDemand(Location="Phys/StdLooseD02KPi/Particles")
+    return Selection(name, Algorithm=_D0Filter, RequiredSelections=[_stdD02Kpi])
+
+def makeDs1(name, D0Sel, DecDescr, KaonProbNN, TrGhostProb, Ds1DeltaMassWin, MaxDs1VertChi2DOF):
+    """
+    Create and return a Ds1+ -> D0/D~0 K+ Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg D0Sel: D0 selection.
+    @arg DecDescr: Decay descriptor
+    @arg KaonProbNN: PID of Kaon
+    @arg TrGhostProb: Ghost probability of kaon
+    @arg Ds1DeltaMassWin: Mass difference m(D0K) - m(D0)
+    @arg MaxDs1VertChi2DOF: chi2/NDOF
+    @return: Selection object
+    """
+    _daughterCut = "(TRGHOSTPROB<%(TrGhostProb)s) & (PROBNNk > %(KaonProbNN)s)" % locals()
+    _combinationCut = "((AM-AM1) < 1.25*%(Ds1DeltaMassWin)s*MeV)" % locals()
+    _motherCut = "((M-M1) < %(Ds1DeltaMassWin)s*MeV) & (VFASPF(VCHI2/VDOF) < %(MaxDs1VertChi2DOF)s)" % locals()
+    _Ds1 = CombineParticles(DecayDescriptor = DecDescr,
+                            DaughtersCuts = {"K+" : _daughterCut},
+                            CombinationCut = _combinationCut,
+                            MotherCut=_motherCut)
+    
+    _stdANNKaon = DataOnDemand(Location="Phys/StdLooseANNKaons/Particles")
+    return Selection(name, Algorithm=_Ds1, RequiredSelections=[D0Sel, _stdANNKaon])
+                                
+def makeBc2Ds1Gamma(name, Ds1Sel, gammaSel, BcPVIPchi2, MinBcMass, MaxBcMass, Bc_PT, CTAU_Bc):
+    """
+    Create and return a Bc+ -> Ds1+ Gamma Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg Ds1Sel: Ds1 -> D0/D~0 K selection
+    @arg gammaSel: photon selection
+    @arg BcPVIPchi2: IP chi2 of the Bc wrt the PV
+    @arg MinBcMass: Lower bound of Bc mass 
+    @arg MaxBcMass: Upper bound of Bc mass
+    @arg Bc_PT : PT of Bc
+    @arg CTAU_Bc: lifetime*c of the Bc
+    @return: Selection object
+
+    """  
+#    _combinationCut = "ADAMASS('B_c+') < 1.5*%(BcMassWin)s*MeV" % locals()
+#    _motherCut = "(ADMASS('B_c+')<%(BcMassWin)s*MeV) & (BPVIPCHI2() < %(BcPVIPchi2)s) & ((BPVLTIME()*c_light)>%(CTAU_Bc)s*micrometer) & (PT>%(Bc_PT)s*MeV)" % locals()
+
+    _combinationCut = "(AM < %(MaxBcMass)s*MeV+500*MeV) & (AM > %(MinBcMass)s*MeV-500*MeV)" % locals()
+    _motherCut = "(M < %(MaxBcMass)s*MeV) & (M > %(MinBcMass)s*MeV) & (BPVIPCHI2() < %(BcPVIPchi2)s) & ((BPVLTIME()*c_light)>%(CTAU_Bc)s*micrometer) & (PT>%(Bc_PT)s*MeV)" % locals()
+        
+    _Bc = CombineParticles(DecayDescriptor="[B_c+ -> D_s1(2536)+ gamma]cc",
+                           CombinationCut=_combinationCut,
+                           MotherCut=_motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=_Bc, RequiredSelections=[Ds1Sel, gammaSel])
+        
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2EtacMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2EtacMu.py
new file mode 100644
index 000000000..8445217a3
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2EtacMu.py
@@ -0,0 +1,209 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for B_c->eta_c mu
+
+'''
+
+__author__ = ['Valeriia Zhovkovska']
+__date__ = '15/03/2019'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('Bc2EtacMuConf', 'default_config')
+
+# If you have several configs in one module your default_config should
+# be a dict of configs with the names of the configs as keys. The configs
+# themselves then shouldn't have a 'NAME' element.
+# M.A. 2017/05/02.
+default_config = {
+    'NAME': 'Bc2EtacMu',
+    'BUILDERTYPE': 'Bc2EtacMuConf',
+    'CONFIG': {
+        'LinePrescale':
+        1.,
+        'LinePostscale':
+        1.,
+        'SpdMult':
+        450.,  # dimensionless, Spd Multiplicy cut
+        'MuonCuts':
+        "(PROBNNmu > 0.1) & (PT > 500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5)",
+        'ProtonCuts':
+        "(PROBNNp > 0.1)  & (PT > 400*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5)",
+        'PionCuts':
+        "(PROBNNpi > 0.65) & (PT > 500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5) & (MIPCHI2DV(PRIMARY) > 4)",
+        'KaonCuts':
+        "(PROBNNk > 0.65)  & (PT > 500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5) & (MIPCHI2DV(PRIMARY) > 4)",
+        'KsCuts':
+        "(ADMASS('KS0') < 30.*MeV) & (BPVDLS>5) & (PT > 500*MeV) & (MAXTREE('pi-'==ABSID, PROBNNpi) > 0.45) & (MAXTREE('pi-'==ABSID, TRGHOSTPROB) < 0.4) & (MAXTREE('pi-'==ABSID, TRCHI2DOF) < 5)",
+        'EtacCombCuts':
+        "in_range(2.7*GeV, AM, 3.3*GeV)",
+        'EtacMomCuts':
+        "in_range(2.7*GeV, MM, 3.3*GeV) & (VFASPF(VCHI2/VDOF) < 9.)",
+        'BcCombCuts':
+        "in_range(3.2*GeV, AM, 7.5*GeV)",
+        'BcMomCuts':
+        "in_range(3.2*GeV, MM, 7.5*GeV) & in_range(4.0*GeV, BPVCORRM, 12.0*GeV) & (VFASPF(VCHI2/VDOF) < 9.) & (PT > 5000)",
+        'CCCut':
+        ""
+    },
+    'STREAMS': ['CharmCompleteEvent'],
+    'WGs': ['BandQ']
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class Bc2EtacMuConf(LineBuilder):
+
+    #__configuration_keys__ = default_config['CONFIG'].keys()
+
+    __configuration_keys__ = ('LinePrescale', 'LinePostscale', 'SpdMult',
+                              'MuonCuts', 'ProtonCuts', 'PionCuts', 'KaonCuts',
+                              'KsCuts', 'EtacCombCuts', 'EtacMomCuts',
+                              'BcCombCuts', 'BcMomCuts', 'CCCut')
+
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+
+        self.name = name
+        self.config = config
+
+        from PhysSelPython.Wrappers import MergedSelection
+
+        self.InputKs = MergedSelection(
+            self.name + "InputKs",
+            RequiredSelections=[
+                DataOnDemand(Location="Phys/StdLooseKsDD/Particles"),
+                DataOnDemand(Location="Phys/StdVeryLooseKsLL/Particles")
+            ])
+
+        self.SelKs = self.createSubSel(
+            OutputList=self.name + "SelKs",
+            InputList=self.InputKs,
+            Cuts=config['KsCuts'])
+
+        self.SelKaons = self.createSubSel(
+            OutputList=self.name + "SelKaons",
+            InputList=DataOnDemand(Location='Phys/StdLooseKaons/Particles'),
+            Cuts=config['KaonCuts'])
+
+        self.SelPions = self.createSubSel(
+            OutputList=self.name + "SelPions",
+            InputList=DataOnDemand(
+                Location='Phys/StdAllNoPIDsPions/Particles'),
+            Cuts=config['PionCuts'])
+
+        self.SelProtons = self.createSubSel(
+            OutputList=self.name + "SelProtons",
+            InputList=DataOnDemand(Location='Phys/StdLooseProtons/Particles'),
+            Cuts=config['ProtonCuts'])
+
+        self.SelMuons = self.createSubSel(
+            OutputList=self.name + "SelMuons",
+            InputList=DataOnDemand(Location='Phys/StdLooseMuons/Particles'),
+            Cuts=config['MuonCuts'])
+
+        # Eta_c -> KS0 K Pi
+        self.SelEtac2KsKPi = self.createCombinationSel(
+            OutputList=self.name + "SelEtac2KsKPi",
+            DecayDescriptor="[eta_c(1S) -> KS0 K+ pi-]cc",
+            DaughterLists=[self.SelKs, self.SelKaons, self.SelPions],
+            PreVertexCuts=config['EtacCombCuts'],
+            PostVertexCuts=config['EtacMomCuts'])
+
+        # Eta_c -> p pbar
+        self.SelEtac2Ppbar = self.createCombinationSel(
+            OutputList=self.name + "SelEtac2Ppbar",
+            DecayDescriptor="eta_c(1S) -> p+ p~-",
+            DaughterLists=[self.SelProtons],
+            PreVertexCuts=config['EtacCombCuts'],
+            PostVertexCuts=config['EtacMomCuts'])
+
+        SpdMultForCcbarCut = config['SpdMult']
+
+        self.SelBc2EtacMu_Ppbar = self.createCombinationSel(
+            OutputList=self.name + "SelBc2EtacMu_Ppbar",
+            DecayDescriptor="[B_c+ -> eta_c(1S) mu+]cc",
+            DaughterLists=[self.SelEtac2Ppbar, self.SelMuons],
+            PreVertexCuts=config['BcCombCuts'],
+            PostVertexCuts=config['BcMomCuts'])
+
+        self.Bc2EtacMu_PpbarLine = StrippingLine(
+            self.name + "_PpbarLine",
+            prescale=config['LinePrescale'],
+            postscale=config['LinePostscale'],
+            FILTER={
+                'Code':
+                " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMultForCcbarCut)s )"
+                % locals(),
+                'Preambulo': [
+                    "from LoKiNumbers.decorators import *",
+                    "from LoKiCore.basic import LHCb"
+                ]
+            },
+            checkPV=True,
+            algos=[self.SelBc2EtacMu_Ppbar])
+
+        self.registerLine(self.Bc2EtacMu_PpbarLine)
+
+        self.SelBc2EtacMu_KsKpi = self.createCombinationSel(
+            OutputList=self.name + "SelBc2EtacMu_KsKpi",
+            DecayDescriptor="[B_c+ -> eta_c(1S) mu+]cc",
+            DaughterLists=[self.SelEtac2KsKPi, self.SelMuons],
+            PreVertexCuts=config['BcCombCuts'],
+            PostVertexCuts=config['BcMomCuts'])
+
+        self.Bc2EtacMu_KsKpiLine = StrippingLine(
+            self.name + "_KsKpiLine",
+            prescale=config['LinePrescale'],
+            postscale=config['LinePostscale'],
+            FILTER={
+                'Code':
+                " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMultForCcbarCut)s )"
+                % locals(),
+                'Preambulo': [
+                    "from LoKiNumbers.decorators import *",
+                    "from LoKiCore.basic import LHCb"
+                ]
+            },
+            checkPV=True,
+            algos=[self.SelBc2EtacMu_KsKpi])
+
+        self.registerLine(self.Bc2EtacMu_KsKpiLine)
+
+    def createSubSel(self, OutputList, InputList, Cuts):
+        '''create a selection using a FilterDesktop'''
+        filt = FilterDesktop(Code=Cuts)
+        return Selection(
+            OutputList, Algorithm=filt, RequiredSelections=[InputList])
+
+    def createCombinationSel(self,
+                             OutputList,
+                             DecayDescriptor,
+                             DaughterLists,
+                             DaughterCuts={},
+                             PreVertexCuts="ALL",
+                             PostVertexCuts="ALL",
+                             ReFitPVs=True):
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles(
+            DecayDescriptor=DecayDescriptor,
+            DaughtersCuts=DaughterCuts,
+            MotherCut=PostVertexCuts,
+            CombinationCut=PreVertexCuts,
+            ReFitPVs=True)
+        return Selection(
+            OutputList, Algorithm=combiner, RequiredSelections=DaughterLists)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2EtacSL.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2EtacSL.py
new file mode 100644
index 000000000..1780b3f34
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2EtacSL.py
@@ -0,0 +1,365 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for B_c->eta_c semileptonic
+
+========== Description of lines ==========
+
+B_c->eta_c mu, with eta_c->ppbar
+B_c->eta_c mu, with eta_c->K_s K pi
+B_c->eta_c tau, with eta_c->ppbar and tau->mu
+B_c->eta_c tau, with eta_c->K_s K pi and tau->mu
+B_c->eta_c tau, with eta_c->ppbar and tau->3pi
+B_c->eta_c tau, with eta_c->K_s K pi and tau->3pi
+'''
+
+__author__ = ['Valeriia Zhovkovska']
+__date__ = '24/06/2021'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = ('Bc2EtacSLConf', 'default_config')
+
+# If you have several configs in one module your default_config should
+# be a dict of configs with the names of the configs as keys. The configs
+# themselves then shouldn't have a 'NAME' element.
+# M.A. 2017/05/02.
+default_config = {
+    'NAME':        'Bc2EtacSL',
+    'BUILDERTYPE': 'Bc2EtacSLConf',
+    'CONFIG': {
+        'LinePrescale':
+        1.,
+        'LinePostscale':
+        1.,
+        'SpdMult':
+        450.,  # dimensionless, Spd Multiplicy cut
+        'MuonCuts':
+        "(PROBNNmu > 0.1) & (PT > 500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5)",
+        'FakeMuonCuts':
+        "(PROBNNmu > 0.1) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5) & (MIPCHI2DV(PRIMARY) > 16)",
+        'TauCombCuts':
+        "in_range(500.*MeV, AM, 2100.*MeV) & (APT > 800*MeV) & ((AM12<1670.*MeV) or (AM23<1670.*MeV)) & (ACUTDOCA(0.08*mm,''))",
+        'TauMomCuts':
+        "in_range(600.*MeV, M, 2000.*MeV)  & (PT > 1000*MeV) & (VFASPF(VCHI2) < 9) & (BPVVDCHI2>16)",
+        'Pion4TauCuts':
+        "(PROBNNpi > 0.65) & (PT > 250*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5) & (MIPCHI2DV(PRIMARY) > 16)",
+        'ProtonCuts':
+        "(PROBNNp > 0.2)   & (PT > 600*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5)",
+        'PionCuts':
+        "(PROBNNpi > 0.65) & (PT > 500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5) & (MIPCHI2DV(PRIMARY) > 4)",
+        'KaonCuts':
+        "(PROBNNk > 0.65)  & (PT > 500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5) & (MIPCHI2DV(PRIMARY) > 4)",
+        'KsCuts':
+        "(ADMASS('KS0') < 30.*MeV) & (BPVDLS>5) & (PT > 500*MeV) & (MAXTREE('pi-'==ABSID, PROBNNpi) > 0.45) & (MAXTREE('pi-'==ABSID, TRGHOSTPROB) < 0.4) & (MAXTREE('pi-'==ABSID, TRCHI2DOF) < 5)",
+        'EtacCombCuts':
+        "in_range(2.7*GeV, AM, 3.3*GeV)",
+        'EtacMomCuts':
+        "in_range(2.7*GeV, MM, 3.3*GeV) & (VFASPF(VCHI2/VDOF) < 9.)",
+        'BcTightCombCuts':
+        "in_range(3.2*GeV, AM, 7.5*GeV)",
+        'BcLooseCombCuts':
+        "in_range(0.75*GeV, AM, 7.5*GeV)",
+        'Bc4PpbarMuMomCuts':
+        "in_range(3.2*GeV, MM, 7.5*GeV)  & in_range(4.0*GeV, BPVCORRM, 12.0*GeV) & (VFASPF(VCHI2/VDOF) < 9.) & (PT > 3000)",
+        'Bc4KsKpiMuMomCuts':
+        "in_range(3.2*GeV, MM, 7.5*GeV)  & in_range(4.0*GeV, BPVCORRM, 12.0*GeV) & (VFASPF(VCHI2/VDOF) < 9.) & (PT > 5000)",
+        'Bc4PpbarTauMomCuts':
+        "in_range(0.75*GeV, MM, 7.5*GeV) & in_range(1.0*GeV, BPVCORRM, 12.0*GeV) & (VFASPF(VCHI2/VDOF) < 9.) & (PT > 3000)",
+        'Bc4KsKpiTauMomCuts':
+        "in_range(0.75*GeV, MM, 7.5*GeV) & in_range(1.0*GeV, BPVCORRM, 12.0*GeV) & (VFASPF(VCHI2/VDOF) < 9.) & (PT > 5000)",
+        'CCCut':
+        ""
+    },
+    'STREAMS': ['CharmCompleteEvent'],
+    'WGs': ['BandQ']
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class Bc2EtacSLConf(LineBuilder):
+
+    # __configuration_keys__ = default_config['CONFIG'].keys()
+
+    __configuration_keys__ = ('LinePrescale', 'LinePostscale', 'SpdMult',
+                              'MuonCuts', 'FakeMuonCuts', 
+                              'TauMomCuts', 'TauCombCuts','Pion4TauCuts',
+                              'ProtonCuts', 'PionCuts', 'KaonCuts',
+                              'KsCuts', 'EtacCombCuts', 'EtacMomCuts',
+                              'BcTightCombCuts',    'BcLooseCombCuts', 
+                              'Bc4PpbarMuMomCuts',  'Bc4KsKpiMuMomCuts',
+                              'Bc4PpbarTauMomCuts', 'Bc4KsKpiTauMomCuts',
+                              'CCCut')
+
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+
+        self.name = name
+        self.config = config
+
+        from PhysSelPython.Wrappers import MergedSelection
+
+        self.InputKs = MergedSelection(
+            self.name + "InputKs",
+            RequiredSelections=[
+                DataOnDemand(Location="Phys/StdLooseKsDD/Particles"),
+                DataOnDemand(Location="Phys/StdVeryLooseKsLL/Particles")
+            ])
+
+        self.SelKs = self.createSubSel(
+            OutputList=self.name + "SelKs",
+            InputList=self.InputKs,
+            Cuts=config['KsCuts'])
+
+        self.SelKaons = self.createSubSel(
+            OutputList=self.name + "SelKaons",
+            InputList=DataOnDemand(Location='Phys/StdLooseKaons/Particles'),
+            Cuts=config['KaonCuts'])
+
+        self.SelPions = self.createSubSel(
+            OutputList=self.name + "SelPions",
+            InputList=DataOnDemand(
+                Location='Phys/StdAllNoPIDsPions/Particles'),
+            Cuts=config['PionCuts'])
+
+        self.SelProtons = self.createSubSel(
+            OutputList=self.name + "SelProtons",
+            InputList=DataOnDemand(Location='Phys/StdLooseProtons/Particles'),
+            Cuts=config['ProtonCuts'])
+
+        self.SelMuons = self.createSubSel(
+            OutputList=self.name + "SelMuons",
+            InputList=DataOnDemand(Location='Phys/StdLooseMuons/Particles'),
+            Cuts=config['MuonCuts'])
+
+        self.SelFakeMuons = self.createSubSel(
+            OutputList=self.name + "SelFakeMuons",
+            InputList=DataOnDemand(Location='Phys/StdAllNoPIDsMuons/Particles'),
+            Cuts=config['FakeMuonCuts'])
+
+        self.SelPions4Tau = self.createSubSel(
+            OutputList=self.name + "SelPions4Tau",
+            InputList=DataOnDemand(Location='Phys/StdLoosePions/Particles'),
+            # InputList=DataOnDemand(Location='Phys/StdLooseANNPions/Particles'),
+            Cuts=config['Pion4TauCuts'])
+
+        # tau+ -> pi+ pi- pi+
+        self.SelTau = self.createCombinationSel(
+            OutputList=self.name + "SelTau",
+            DecayDescriptor="[tau+ -> pi+ pi- pi+]cc",
+            DaughterLists=[self.SelPions4Tau],
+            PreVertexCuts=config['TauCombCuts'],
+            PostVertexCuts=config['TauMomCuts'])
+
+        # Eta_c -> KS0 K Pi
+        self.SelEtac2KsKPi = self.createCombinationSel(
+            OutputList=self.name + "SelEtac2KsKPi",
+            DecayDescriptor="[eta_c(1S) -> KS0 K+ pi-]cc",
+            DaughterLists=[self.SelKs, self.SelKaons, self.SelPions],
+            PreVertexCuts=config['EtacCombCuts'],
+            PostVertexCuts=config['EtacMomCuts'])
+
+        # Eta_c -> p pbar
+        self.SelEtac2Ppbar = self.createCombinationSel(
+            OutputList=self.name + "SelEtac2Ppbar",
+            DecayDescriptor="eta_c(1S) -> p+ p~-",
+            DaughterLists=[self.SelProtons],
+            PreVertexCuts=config['EtacCombCuts'],
+            PostVertexCuts=config['EtacMomCuts'])
+
+        SpdMultForBcCut = config['SpdMult']
+
+        ################ Bc-> eta_c mu nu SELECTION ################
+
+        self.SelBc2EtacMu_Ppbar = self.createCombinationSel(
+            OutputList=self.name + "SelBc2EtacMu_Ppbar",
+            DecayDescriptor="[B_c+ -> eta_c(1S) mu+]cc",
+            DaughterLists=[self.SelEtac2Ppbar, self.SelMuons],
+            PreVertexCuts=config['BcTightCombCuts'],
+            PostVertexCuts=config['Bc4PpbarMuMomCuts'])
+
+        self.Bc2EtacMu_PpbarLine = StrippingLine(
+            self.name + "_Mu_PpbarLine",
+            prescale=config['LinePrescale'],
+            postscale=config['LinePostscale'],
+            FILTER={
+                'Code':
+                " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMultForBcCut)s )"
+                % locals(),
+                'Preambulo': [
+                    "from LoKiNumbers.decorators import *",
+                    "from LoKiCore.basic import LHCb"
+                ]
+            },
+            checkPV=True,
+            algos=[self.SelBc2EtacMu_Ppbar])
+
+        self.registerLine(self.Bc2EtacMu_PpbarLine)
+
+        self.SelBc2EtacMu_KsKpi = self.createCombinationSel(
+            OutputList=self.name + "SelBc2EtacMu_KsKpi",
+            DecayDescriptor="[B_c+ -> eta_c(1S) mu+]cc",
+            DaughterLists=[self.SelEtac2KsKPi, self.SelMuons],
+            PreVertexCuts=config['BcTightCombCuts'],
+            PostVertexCuts=config['Bc4KsKpiMuMomCuts'])
+
+        self.Bc2EtacMu_KsKpiLine = StrippingLine(
+            self.name + "_Mu_KsKpiLine",
+            prescale=config['LinePrescale'],
+            postscale=config['LinePostscale'],
+            FILTER={
+                'Code':
+                " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMultForBcCut)s )"
+                % locals(),
+                'Preambulo': [
+                    "from LoKiNumbers.decorators import *",
+                    "from LoKiCore.basic import LHCb"
+                ]
+            },
+            checkPV=True,
+            algos=[self.SelBc2EtacMu_KsKpi])
+
+        self.registerLine(self.Bc2EtacMu_KsKpiLine)
+
+        ################ Bc-> eta_c (tau->mu nu nu) nu SELECTION ################
+
+        self.SelBc2EtacTau2Mu_Ppbar = self.createCombinationSel(
+            OutputList=self.name + "SelBc2EtacTau2Mu_Ppbar",
+            DecayDescriptor="[B_c+ -> eta_c(1S) mu+]cc",
+            DaughterLists=[self.SelEtac2Ppbar, self.SelFakeMuons],
+            PreVertexCuts=config['BcLooseCombCuts'],
+            PostVertexCuts=config['Bc4PpbarTauMomCuts'])
+
+        self.Bc2EtacTau2Mu_PpbarLine = StrippingLine(
+            self.name + "_Tau2Mu_PpbarLine",
+            prescale=config['LinePrescale'],
+            postscale=config['LinePostscale'],
+            FILTER={
+                'Code':
+                " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMultForBcCut)s )"
+                % locals(),
+                'Preambulo': [
+                    "from LoKiNumbers.decorators import *",
+                    "from LoKiCore.basic import LHCb"
+                ]
+            },
+            checkPV=True,
+            algos=[self.SelBc2EtacTau2Mu_Ppbar])
+
+        self.registerLine(self.Bc2EtacTau2Mu_PpbarLine)
+
+        self.SelBc2EtacTau2Mu_KsKpi = self.createCombinationSel(
+            OutputList=self.name + "SelBc2EtacTau2Mu_KsKpi",
+            DecayDescriptor="[B_c+ -> eta_c(1S) mu+]cc",
+            DaughterLists=[self.SelEtac2KsKPi, self.SelFakeMuons],
+            PreVertexCuts=config['BcLooseCombCuts'],
+            PostVertexCuts=config['Bc4KsKpiTauMomCuts'])
+
+        self.Bc2EtacTau2Mu_KsKpiLine = StrippingLine(
+            self.name + "_Tau2Mu_KsKpiLine",
+            prescale=config['LinePrescale'],
+            postscale=config['LinePostscale'],
+            FILTER={
+                'Code':
+                " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMultForBcCut)s )"
+                % locals(),
+                'Preambulo': [
+                    "from LoKiNumbers.decorators import *",
+                    "from LoKiCore.basic import LHCb"
+                ]
+            },
+            checkPV=True,
+            algos=[self.SelBc2EtacTau2Mu_KsKpi])
+
+        self.registerLine(self.Bc2EtacTau2Mu_KsKpiLine)
+
+        ################ Bc-> eta_c (tau -> 3pi) nu SELECTION ################
+
+        self.SelBc2EtacTau23pi_Ppbar = self.createCombinationSel(
+            OutputList=self.name + "SelBc2EtacTau23pi_Ppbar",
+            DecayDescriptor="[B_c+ -> eta_c(1S) tau+]cc",
+            DaughterLists=[self.SelEtac2Ppbar, self.SelTau],
+            PreVertexCuts=config['BcLooseCombCuts'],
+            PostVertexCuts=config['Bc4PpbarTauMomCuts'])
+
+        self.Bc2EtacTau23pi_PpbarLine = StrippingLine(
+            self.name + "_Tau23pi_PpbarLine",
+            prescale=config['LinePrescale'],
+            postscale=config['LinePostscale'],
+            FILTER={
+                'Code':
+                " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMultForBcCut)s )"
+                % locals(),
+                'Preambulo': [
+                    "from LoKiNumbers.decorators import *",
+                    "from LoKiCore.basic import LHCb"
+                ]
+            },
+            checkPV=True,
+            algos=[self.SelBc2EtacTau23pi_Ppbar])
+
+        self.registerLine(self.Bc2EtacTau23pi_PpbarLine)
+
+        self.SelBc2EtacTau23pi_KsKpi = self.createCombinationSel(
+            OutputList=self.name + "SelBc2EtacTau23pi_KsKpi",
+            DecayDescriptor="[B_c+ -> eta_c(1S) tau+]cc",
+            DaughterLists=[self.SelEtac2KsKPi, self.SelTau],
+            PreVertexCuts=config['BcLooseCombCuts'],
+            PostVertexCuts=config['Bc4KsKpiTauMomCuts'])
+
+        self.Bc2EtacTau23pi_KsKpiLine = StrippingLine(
+            self.name + "_Tau23pi_KsKpiLine",
+            prescale=config['LinePrescale'],
+            postscale=config['LinePostscale'],
+            FILTER={
+                'Code':
+                " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMultForBcCut)s )"
+                % locals(),
+                'Preambulo': [
+                    "from LoKiNumbers.decorators import *",
+                    "from LoKiCore.basic import LHCb"
+                ]
+            },
+            checkPV=True,
+            algos=[self.SelBc2EtacTau23pi_KsKpi])
+
+        self.registerLine(self.Bc2EtacTau23pi_KsKpiLine)
+
+    def createSubSel(self, OutputList, InputList, Cuts):
+        '''create a selection using a FilterDesktop'''
+        filt = FilterDesktop(Code=Cuts)
+        return Selection(
+            OutputList, Algorithm=filt, RequiredSelections=[InputList])
+
+    def createCombinationSel(self,
+                             OutputList,
+                             DecayDescriptor,
+                             DaughterLists,
+                             DaughterCuts={},
+                             PreVertexCuts="ALL",
+                             PostVertexCuts="ALL",
+                             Combination12Cut = "ALL",
+                             ReFitPVs=True):
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+
+        combiner = CombineParticles(
+            DecayDescriptor=DecayDescriptor,
+            DaughtersCuts=DaughterCuts,
+            MotherCut=PostVertexCuts,
+            CombinationCut=PreVertexCuts,
+            ReFitPVs=True)
+        return Selection(
+            OutputList, Algorithm=combiner, RequiredSelections=DaughterLists)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2JpsiHBDT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2JpsiHBDT.py
new file mode 100644
index 000000000..8a5305091
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2JpsiHBDT.py
@@ -0,0 +1,176 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingBc2JpsiH.py,v 1.2 2010-09-06 16:30:22 jhe Exp $
+
+'''
+Module for construction of Bc->Jpsi(MuMu)H BDT
+'''
+
+__author__=['Jibo He']
+__date__ = '02/11/2013'
+__version__= '$Revision: 2.0 $'
+
+
+__all__ = (
+    'Bc2JpsiHBDTConf',
+    'makeJpsi2MuMu',
+    'makeBc2JpsiH',
+    'default_config'
+    )
+
+default_config =  {
+    'NAME'        : 'Bc2JpsiHBDT',
+    'WGs'         : ['BandQ'],
+    'BUILDERTYPE' : 'Bc2JpsiHBDTConf',
+    'CONFIG'      : {
+    'LinePrescale'        :    1.   ,
+    'LinePostscale'       :    1.   ,    
+    'MuonCuts'            : "(MINTREE('mu+'==ABSID,PT)>500*MeV) & (MAXTREE('mu+'==ABSID,TRCHI2DOF)<3) & (MINTREE('mu+'==ABSID,PIDmu)>0.)",
+    'JpsiCuts'            : '((MM>3.0*GeV) & (MM<3.2*GeV) & (VFASPF(VCHI2PDOF)<16))',
+    'PionCuts'            : '((TRGHOSTPROB<0.6) & (PT>1.0*GeV))',
+    'BcComCuts'           : '(in_range(5.8*GeV, AM, 7.0*GeV))',
+    'BcMomCuts'           : """(VFASPF(VCHI2/VDOF)<16) 
+                             & (in_range(6.0*GeV, DTF_FUN(M,True,strings( ['J/psi(1S)'])), 6.75*GeV))
+                             & (BPVIPCHI2()<25) 
+                            """,
+    'BDTCutValue'         :  0.6 ,
+    'BDTWeightsFile'      : '$TMVAWEIGHTSROOT/data/Bc2JpsiH_BDTG_v1r0.xml'    
+    },
+    'STREAMS'   : [ 'Dimuon' ]
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class Bc2JpsiHBDTConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ):
+
+        LineBuilder.__init__(self, name, config)
+        
+        Bc2JpsiHName = name
+        Bc2JpsiHLineName = Bc2JpsiHName + "Line"
+        
+        self.SelJpsi2MuMu = makeJpsi2MuMu( 'Jpsi2MuMuFor'+Bc2JpsiHName,
+                                           MuonCuts = config['MuonCuts'],
+                                           JpsiCuts = config['JpsiCuts']
+                                           )
+        
+        self.SelBc2JpsiH = makeBc2JpsiH( "Sel_"+Bc2JpsiHName,
+                                         SelJpsi2MuMu = self.SelJpsi2MuMu,
+                                         PionCuts = config['PionCuts'],
+                                         BcComCuts = config['BcComCuts'],
+                                         BcMomCuts = config['BcMomCuts']
+                                         )
+        
+        self.CutBDTBc2JpsiH  = applyBDT( "CutBDT_" + Bc2JpsiHName,
+                                         LineName  = Bc2JpsiHLineName,
+                                         SelBc2JpsiH = self.SelBc2JpsiH,
+                                         BDTCutValue = config['BDTCutValue'],
+                                         BDTWeightsFile = config['BDTWeightsFile']
+                                         )
+        
+        self.line = StrippingLine( Bc2JpsiHLineName,
+                                   prescale = config['LinePrescale'],
+                                   postscale = config['LinePostscale'],
+                                   selection = self.CutBDTBc2JpsiH,
+                                   #RequiredRawEvents = [ "Trigger", "Muon", "Calo", "Rich", "Velo","Tracker" ]
+                                   )
+                                             
+        self.registerLine(self.line)
+        
+        
+       
+
+def makeJpsi2MuMu( name,
+                   MuonCuts,
+                   JpsiCuts
+                   ):
+
+    _StdLooseDiMuon = DataOnDemand(Location = "Phys/StdLooseDiMuon/Particles")
+    
+    MuonCut = MuonCuts     
+    MuMuCut = JpsiCuts
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut )
+    
+    return Selection( name + "_SelP2MuMu",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseDiMuon ]
+                      )
+
+
+def makeBc2JpsiH( name,
+                  SelJpsi2MuMu,
+                  PionCuts,                  
+                  BcComCuts,
+                  BcMomCuts
+                  ):
+
+    #---------------------------
+    # Pion or Kaon
+    #---------------------------        
+    from StandardParticles import StdAllNoPIDsPions as NoPIDsPionsForBc2JpsiH
+
+    # Pion Cut
+    PionCut = PionCuts 
+
+    _PionFilter = FilterDesktop( Code = PionCut )
+    
+    SelPion = Selection("SelPion_"+name,
+                        Algorithm = _PionFilter,
+                        RequiredSelections = [ NoPIDsPionsForBc2JpsiH ])
+
+    
+    #---------------------------
+    # Bc -> J/psi(MuMu) H
+    #---------------------------            
+    _Bc2JpsiH = CombineParticles( DecayDescriptor = "[ B_c+ -> J/psi(1S) pi+ ]cc",
+                                  CombinationCut = BcComCuts,
+                                  MotherCut      = BcMomCuts,
+                                  ReFitPVs = False )
+    
+    return Selection( name,
+                      Algorithm = _Bc2JpsiH,
+                      RequiredSelections = [ SelJpsi2MuMu, SelPion  ]
+                      )
+
+
+def applyBDT( name,
+              LineName,
+              SelBc2JpsiH,
+              BDTCutValue,
+              BDTWeightsFile ):
+    
+    _FilterBc2JpsiH = FilterDesktop( Code = "FILTER('Bc2JpsiHBDTSelection/Bc2JpsiHBDT')" )
+    
+    BDTSel = Selection( name,
+                        Algorithm = _FilterBc2JpsiH,
+                        RequiredSelections = [ SelBc2JpsiH ]
+                        )
+
+    """
+    Name is special here, since this is the last algorithm,
+    whose name seems to be the one of the stripping line....
+    """
+    from Configurables import Bc2JpsiHBDTSelection
+
+    MyBDT = Bc2JpsiHBDTSelection( LineName + '.Bc2JpsiHBDT' )
+    MyBDT.BDTCut = BDTCutValue
+    MyBDT.WeightsFile = BDTWeightsFile
+    
+    return BDTSel 
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2JpsiMuXNew.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2JpsiMuXNew.py
new file mode 100644
index 000000000..bf86e6827
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc2JpsiMuXNew.py
@@ -0,0 +1,171 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingBc2JpsiMuX.py,v 1.2 2010-09-06 16:30:22 jhe Exp $
+
+'''
+Module for construction of Bc->Jpsi(MuMu)X
+'''
+
+__author__=['Jibo He']
+__date__ = '02/09/2010'
+__version__= '$Revision: 2.0 $'
+
+
+__all__ = (
+    'Bc2JpsiMuXConf',
+    'makeJpsi2MuMu',
+    'makeBc2JpsiMu'
+    )
+
+default_config = {
+    'NAME'        : 'Bc2JpsiMu',
+    'BUILDERTYPE' : 'Bc2JpsiMuXConf',
+    'CONFIG' : {
+    'LinePrescale'        :    1.   ,
+    'LinePostscale'       :    1.   ,
+   
+    'MuonTRCHI2DOF'       :    5.   ,  # adimentional
+    'MuonPT'              : 1400.   ,  # MeV
+    'MuonP'               :   -5.   ,  # MeV, not applied now
+    'MuMuParticleName'    : "'J/psi(1S)'", # Particle Name, like "'psi(2S)'"
+    'MuMuMassWindow'      :  150.   ,  # MeV, 10 sigma, may decreased to 150
+    'MuMuVtxCHI2'         :    9.   ,  # adimentional
+    'MuMuPT'              :  -10.   ,  # MeV, not applied
+   
+    'MuonBcTRCHI2DOF'     :    5.   ,  # adimentional    
+    'MuonBcPT'            : 2500.   ,  # MeV
+    'MuonBcP'             :   -5.   ,  # MeV, not applied now
+    'BcUpperMass'         : 6400.   ,  # MeV, Upper limit for partial rec.
+    'BcLowerMass'         : 3200.   ,  # MeV, Lower limit for partial rec.
+    'BcVtxCHI2'           :    9.   ,  # adimentional
+    'BcPT'                : 6000.      # MeV, May incrase up to 5000 MeV if needed      
+    },
+    'STREAMS' : [ 'Leptonic' ] ,
+    'WGs'    : [ 'BandQ' ]
+  }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class Bc2JpsiMuXConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ):
+
+        LineBuilder.__init__(self, name, config)
+        
+        Bc2JpsiMuXName = name
+        self.SelJpsi2MuMu = makeJpsi2MuMu( 'Jpsi2MuMuFor'+Bc2JpsiMuXName,
+                                           MuonPT = config['MuonPT'],
+                                           MuonP  = config['MuonP'],
+                                           MuonTRCHI2DOF = config['MuonTRCHI2DOF'],
+                                           MuMuParticleName = config['MuMuParticleName'],
+                                           MuMuVtxCHI2 = config['MuMuVtxCHI2'],
+                                           MuMuMassWindow = config['MuMuMassWindow'],
+                                           MuMuPT = config['MuMuPT']
+                                           )
+        
+        self.SelBc2JpsiMuX = makeBc2JpsiMu( "Sel_"+Bc2JpsiMuXName,
+                                            SelJpsi2MuMu = self.SelJpsi2MuMu,
+                                            MuonBcTRCHI2DOF = config['MuonBcTRCHI2DOF'],
+                                            MuonBcPT = config['MuonBcPT'],
+                                            MuonBcP = config['MuonBcP'],
+                                            BcVtxCHI2 = config['BcVtxCHI2'],
+                                            BcUpperMass = config['BcUpperMass'],
+                                            BcLowerMass = config['BcLowerMass'],
+                                            BcPT = config['BcPT']                                           
+                                            )
+                                             
+        self.line = StrippingLine( Bc2JpsiMuXName+"Line",
+                                   prescale = config['LinePrescale'],
+                                   postscale = config['LinePostscale'],
+                                   RequiredRawEvents = ['Muon'],
+                                   selection = self.SelBc2JpsiMuX 
+                                   )
+
+        self.registerLine(self.line)
+        
+        
+       
+
+def makeJpsi2MuMu( name,
+                   MuonPT,
+                   MuonP,
+                   MuonTRCHI2DOF,
+                   MuMuParticleName, 
+                   MuMuVtxCHI2,
+                   MuMuMassWindow,
+                   MuMuPT
+                   ):
+    
+    _StdLooseDiMuon = DataOnDemand(Location = "Phys/StdLooseDiMuon/Particles")
+    
+    #MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s *MeV) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s *MeV) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)" % locals()
+    MuonCut = "(CHILDCUT((TRCHI2DOF < %(MuonTRCHI2DOF)s),1)) & (CHILDCUT((TRCHI2DOF < %(MuonTRCHI2DOF)s),2)) & (CHILDCUT((PT > %(MuonPT)s *MeV),1))  & (CHILDCUT((PT > %(MuonPT)s *MeV),2))" % locals()
+    
+    MuMuCut = "(ADMASS(%(MuMuParticleName)s) < %(MuMuMassWindow)s *MeV) & (VFASPF(VCHI2PDOF)< %(MuMuVtxCHI2)s) & (PT > %(MuMuPT)s *MeV)" % locals()
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut )
+    
+    return Selection( name + "_SelP2MuMu",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseDiMuon ]
+                      )
+
+
+def makeBc2JpsiMu( name,
+                   SelJpsi2MuMu,
+                   MuonBcTRCHI2DOF,
+                   MuonBcPT,
+                   MuonBcP,
+                   BcVtxCHI2,
+                   BcUpperMass,
+                   BcLowerMass,
+                   BcPT
+                   ):
+
+    #---------------------------
+    # Muon
+    #---------------------------        
+    from StandardParticles import StdAllNoPIDsMuons as NoPIDsMuonsForBc2JpsiMu
+    
+    # MuBc Cut
+    MuonBcCut = "(PT > %(MuonBcPT)s *MeV) & (P > %(MuonBcP)s *MeV) & (TRCHI2DOF < %(MuonBcTRCHI2DOF)s) & (TRGHOSTPROB<0.4)" % locals()
+
+    _MuonBcFilter = FilterDesktop( Code = MuonBcCut )
+    
+    SelMuonBc = Selection("SelMuonBc_"+name,
+                          Algorithm = _MuonBcFilter,
+                          RequiredSelections = [ NoPIDsMuonsForBc2JpsiMu ])
+    
+    
+    #---------------------------
+    # Bc -> J/psi(MuMu) Mu X
+    #---------------------------         
+    # Comb cut
+    combCut = "(in_range( %(BcLowerMass)s *MeV, AM, %(BcUpperMass)s *MeV))" % locals()
+    
+    # Bc Cut
+    BcCut = "(VFASPF(VCHI2PDOF)< %(BcVtxCHI2)s ) & (PT > %(BcPT)s *MeV)" % locals()
+
+    _Bc2JpsiMuX = CombineParticles( DecayDescriptor = "[ B_c+ -> J/psi(1S) mu+ ]cc",
+                                    CombinationCut = combCut,
+                                    MotherCut = BcCut,
+                                    ReFitPVs = True )
+    
+    return Selection( name,
+                      Algorithm = _Bc2JpsiMuX,
+                      RequiredSelections = [ SelJpsi2MuMu, SelMuonBc ]
+                      )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc3h.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc3h.py
new file mode 100755
index 000000000..310b821a3
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingBc3h.py
@@ -0,0 +1,577 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# $Id:$
+# =============================================================================
+## @file
+#  A bit naive way to run stripping for Bc -> 3h
+#  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+#  @date 2010-08-03
+#                    $Revision:$
+#  Last modifictaion $Date:$
+#                 by $Author:$
+# =============================================================================
+""" A bit naive attempt to make  Bc->3h stripping
+
+- Bc -> pi+ pi+ pi-
+- Bc -> K+  K+  K-
+- Bc -> K+  K-  pi+
+- Bc -> K+  K+  pi-
+- Bc -> p   p~  K+
+- Bc -> p   p~  pi+
+
+"""
+# =============================================================================
+__author__  = 'Vanya BELYAEV Ivan.Belyaev@itep.ru'
+__date__    = '2010-08-03'
+__version__ = '$Revision: 154361 $'
+# =============================================================================
+__all__ = (
+    'Bc3hConf'       , ## the builder 
+    'default_config' , ## configuration 
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+# =============================================================================
+## logging
+# =============================================================================
+import logging
+logger = logging.getLogger(__name__)
+if not logger.handlers :
+    logging.basicConfig()
+logger.setLevel(logging.INFO)
+# =============================================================================
+from GaudiKernel.SystemOfUnits             import GeV, MeV, mm, micrometer 
+from StrippingUtils.Utils                  import LineBuilder
+# =============================================================================
+## Define the default configuration
+# =============================================================================
+_default_configuration_ = {
+    #
+    ## PV-requiremens
+    #
+    'CheckPV'   : True ,
+    #
+    ## Global filter
+    # 
+    'FILTER'    : None ,   ## VOID filter 
+    'ODIN'      : None ,   ## ODIN filter 
+    'L0DU'      : None ,   ## L0   filter 
+    'HLT1'      : None ,   ## HLT  filter
+    'HLT2'      : None ,   ## HLT  filter
+    #
+    ## c*tau cut for B-hadrons 
+    #
+    'CTAU'      : 140 * micrometer , 
+    'CTAU_BC'   :  80 * micrometer , 
+    #
+    ## pions and kaons
+    # 
+    'PionCut'   : """
+    ( CLONEDIST   > 5000   ) & 
+    ( TRGHOSTPROB < 0.4    ) &
+    ( PT          > 500 * MeV               ) & 
+    in_range ( 2          , ETA , 4.9       ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                  &
+    ( PROBNNpi     > 0.15  ) &
+    ( MIPCHI2DV()  > 9.    )
+    """ ,
+    #
+    'KaonCut'   : """
+    ( CLONEDIST   > 5000   ) & 
+    ( TRGHOSTPROB < 0.4    ) & 
+    ( PT          > 500 * MeV               ) & 
+    in_range ( 2          , ETA , 4.9       ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                  &
+    ( PROBNNk      > 0.20  ) &
+    ( MIPCHI2DV()  > 9.    ) 
+    """ ,
+    #
+    'ProtonCut'   : """
+    ( CLONEDIST   > 5000    ) & 
+    ( TRGHOSTPROB < 0.4     ) & 
+    ( PT          > 500 * MeV              ) & 
+    in_range (  2        , ETA , 4.9       ) &
+    in_range ( 10 * GeV  , P   , 150 * GeV ) &
+    HASRICH                   &
+    ( PROBNNp      > 0.15   ) &
+    ( MIPCHI2DV()  > 4.     ) 
+    """ ,
+    #
+    ## useful shortcuts:
+    #
+    'Preambulo' : [
+    ## shortcut for chi2 of vertex fit 
+    'chi2vx = VFASPF(VCHI2)   '                                , 
+    ## shortcut for the c*tau
+    "from GaudiKernel.PhysicalConstants import c_light"        , 
+    ## use the embedded cut for chi2(LifetimeFit)<25
+    "ctau      = BPVLTIME ( 25 ) * c_light "                   ,
+    "ctau_9    = BPVLTIME (  9 ) * c_light "                   ,
+    "ctau_16   = BPVLTIME ( 16 ) * c_light "                   ,
+    ## Combination mass-cut for beauty particles 
+    "mbp_acut  = in_range ( 5.050 * GeV , AM , 5.550 * GeV ) " ,
+    "mbc_acut  = in_range ( 6.000 * GeV , AM , 6.600 * GeV ) " ,
+    ## mass-cut for beauty particles 
+    "mbp_cut   = in_range ( 5.100 * GeV ,  M , 5.500 * GeV ) " ,
+    "mbc_cut   = in_range ( 6.050 * GeV ,  M , 6.550 * GeV ) " ,
+    ] ,
+    # =========================================================================
+    ## Prescales 
+    # =========================================================================
+    'Bc3piPrescale'    : 1.0 ,
+    'Bc3kPrescale'     : 1.0 ,
+    'Bc3kpiPrescale'   : 1.0 ,
+    'Bc3kpiPrescale'   : 1.0 ,
+    'Bc3pppiPrescale'  : 1.0 ,
+    'Bc3ppkPrescale'   : 1.0 ,
+    # =========================================================================
+    }
+# =============================================================================
+## the mandatory element for stripping framework 
+default_config = {
+    'NAME'        :   'Bc3h'                 ,
+    'WGs'         : [ 'BandQ' ]              ,
+    'BUILDERTYPE' :   'Bc3hConf'             ,
+    'CONFIG'      : _default_configuration_  , 
+    'STREAMS'     : { 'Bhadron' : [ 'StrippingBc3piForBc3h'   ,
+                                    'StrippingBc3kForBc3h'    ,
+                                    'StrippingBc3kpiForBc3h'  , 
+                                    'StrippingBc3pppiForBc3h' , 
+                                    'StrippingBc3ppkForBc3h'  ] } 
+    }    
+# =============================================================================
+## @class  Bc3hConf
+#  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+#  @date 2013-08-29
+class Bc3hConf(LineBuilder) :
+    """
+    Helper class to configure 'Bc->3h'-lines
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    ## get the default configuration 
+    @staticmethod
+    def defaultConfiguration ( key = None ) :
+        """
+        Get the default/recommended configurtaion
+        
+        >>> conf = Bc3h.defaultConfiguration()
+        
+        """
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+        if key : return _config[ key ]
+        return _config
+    
+    ## constructor
+    def __init__ ( self , name , config ) :
+        """
+        Constructor
+        """
+        # check the names 
+        if 'Bc3h' != name :
+            logger.warning ( 'The non-default name is specified "%s"' % name  ) 
+            
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+
+        if isinstance ( config , dict ):
+            _config.update ( config )
+            LineBuilder.__init__( self , name , _config )
+        else :
+            LineBuilder.__init__( self , name ,  config )
+
+        ## private set of selections 
+        self.__selections_ = {}
+        
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {}
+            
+        self.__selections_[ self.name() ]['CONFIG'] = deepcopy ( _config ) 
+        
+        keys = _config.keys()
+        for key in keys :
+            
+            if not key in _default_configuration_ :
+                raise KeyError("Invalid key is specified: '%s'" % key )
+            
+            val = _config[key]
+            if val != _default_configuration_ [ key ] : 
+                logger.debug ('new configuration: %-16s : %s ' % ( key , _config[key] ) )
+                
+        self._name         = name
+        
+        for line in self._lines_Bc () :
+            self.registerLine(line)
+            logger.debug ( "Register line: %s" %  line.name () ) 
+            
+            
+    ## get the selection, associated with some nickname name 
+    def _selection ( self , nick ) :
+        """
+        Get the selection, associated with some nickname name
+        """
+        
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {} 
+            
+        return self.__selections_[ self.name() ].get( nick , None ) 
+    
+    ## add the selection, associated with some nickname name 
+    def _add_selection ( self , nick , sel ) :
+        """
+        add the selection, associated with some nickname name
+        """
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {} 
+        
+        if self.__selections_[ self.name()].has_key( nick ) :
+            raise AttributeError , "Selection '%s'already exists " % nick
+        
+        self.__selections_[ self.name() ][ nick ] = sel
+        
+        return sel
+
+    # =========================================================================
+    ## pure technical method for creation of selections
+    # =========================================================================
+    def make_selection ( self      ,
+                         tag       , 
+                         algotype  ,
+                         inputs    , 
+                         *args     ,
+                         **kwargs  ) :
+        """
+        Technical method for creation of 1-step selections 
+        """
+        sel_tag  = '%s_Selection' % tag
+        sel_name = 'Sel%sFor%s'   % ( tag , self.name() )
+        #
+        ## check existing selection
+        #
+        sel      = self._selection ( sel_tag )
+        if sel : return sel 
+        
+        #
+        ## adjust a bit the arguments
+        if not kwargs.has_key ( 'Preambulo'         ) :
+            kwargs ['Preambulo'        ] = self['Preambulo']
+            
+        if not kwargs.has_key ( 'ParticleCombiners' ) :
+            kwargs ['ParticleCombiners'] = { '' : 'LoKi::VertexFitter:PUBLIC' } 
+                          
+        # 
+        ## use "simple-selection"
+        #
+        from PhysSelPython.Wrappers import SimpleSelection
+        sel = SimpleSelection (
+            sel_name ,
+            algotype ,
+            inputs   , 
+            *args    ,
+            **kwargs )
+        # 
+        return self._add_selection( sel_tag , sel ) 
+
+ 
+    ## get all single charm lines 
+    def _lines_Bc   ( self ) :
+        """
+        Get all psiX lines 
+        """
+        sel = self._selection ( 'Bc3h_Lines' )
+        if sel : return sel
+        #
+        from StrippingConf.StrippingLine import StrippingLine
+        sel = [
+            # =================================================================
+            #
+            ## 3h
+            #
+            StrippingLine (
+            "Bc3pppiFor"    + self.name()              ,
+            prescale        = self ['Bc3pppiPrescale'] , 
+            checkPV         = self ['CheckPV']         ,
+            FILTER          = self ['FILTER' ]         ,
+            ODIN            = self ['ODIN'   ]         ,
+            L0DU            = self ['L0DU'   ]         ,
+            HLT1            = self ['HLT1'   ]         ,
+            HLT2            = self ['HLT2'   ]         ,
+            algos           = [ self.Bc3pppi ()   ]  ) ,
+            #
+            StrippingLine (
+            "Bc3ppkFor"     + self.name()              ,
+            prescale        = self ['Bc3ppkPrescale']  , 
+            checkPV         = self ['CheckPV']         ,
+            FILTER          = self ['FILTER' ]         ,
+            ODIN            = self ['ODIN'   ]         ,
+            L0DU            = self ['L0DU'   ]         ,
+            HLT1            = self ['HLT1'   ]         ,
+            HLT2            = self ['HLT2'   ]         ,
+            algos           = [ self.Bc3ppk ()   ]  )  ,
+            #
+            StrippingLine (
+            "Bc3piFor"      + self.name()              ,
+            prescale        = self ['Bc3piPrescale'] , 
+            checkPV         = self ['CheckPV']         ,
+            FILTER          = self ['FILTER' ]         ,
+            ODIN            = self ['ODIN'   ]         ,
+            L0DU            = self ['L0DU'   ]         ,
+            HLT1            = self ['HLT1'   ]         ,
+            HLT2            = self ['HLT2'   ]         ,
+            algos           = [ self.Bc3pi ()      ]  ) ,
+            ## 
+            StrippingLine (
+            "Bc3kFor"      + self.name()              ,
+            prescale        = self ['Bc3kPrescale'] , 
+            checkPV         = self ['CheckPV']         ,
+            FILTER          = self ['FILTER' ]         ,
+            ODIN            = self ['ODIN'   ]         ,
+            L0DU            = self ['L0DU'   ]         ,
+            HLT1            = self ['HLT1'   ]         ,
+            HLT2            = self ['HLT2'   ]         ,
+            algos           = [ self.Bc3k ()      ]  ) ,
+            #
+            StrippingLine (
+            "Bc3kpiFor"     + self.name()              ,
+            prescale        = self ['Bc3kpiPrescale']  , 
+            checkPV         = self ['CheckPV']         ,
+            FILTER          = self ['FILTER' ]         ,
+            ODIN            = self ['ODIN'   ]         ,
+            L0DU            = self ['L0DU'   ]         ,
+            HLT1            = self ['HLT1'   ]         ,
+            HLT2            = self ['HLT2'   ]         ,
+            algos           = [ self.Bc3kpi ()    ]  ) ,
+            ]
+        ## 
+        return self._add_selection ( 'Bc3h_Lines' , sel ) 
+    
+    ## pions :
+    def pions     ( self ) :
+        """ Pions for   Bc -> 3h lines """
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from StandardParticles                     import StdAllLooseANNPions as inpts 
+        return self.make_selection (
+            'Pion'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = self['PionCut'] ,
+            )
+    
+    ## kaons :
+    def kaons     ( self ) :
+        """ Kaons for   Bc -> 3h lines """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from StandardParticles                     import StdAllLooseANNKaons as inpts  
+        return self.make_selection (
+            'Kaon'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = self['KaonCut'] ,
+            )
+    
+    ## protons :
+    def protons    ( self ) :
+        """ Protons for   Bc -> 3h  lines  """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from StandardParticles                     import StdAllLooseANNProtons as inpts 
+        return self.make_selection (
+            'Proton'                 ,
+            FilterDesktop            ,
+            [ inpts ]                ,
+            Code = self['ProtonCut'] ,
+            )
+    
+    # Bc -> 3 pi 
+    def Bc3pi ( self ) :
+        """ Bc -> 3 pi """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            'Bc3pi'               , ## selection name 
+            DaVinci__N3BodyDecays , ## the algorithm type 
+            [ self.pions() ]      , ## input selections 
+            #
+            ## algorithm configurtaion
+            #
+            DecayDescriptor  = "[B_c+ -> pi+ pi- pi+ ]cc" ,
+            Combination12Cut = """ ( AM < 7 * GeV )
+            & ( ACHI2DOCA(1,2) < 20 )  
+            """  , 
+            CombinationCut   = """ ( mbp_acut | mbc_acut )
+            & ( ACHI2DOCA(1,3) < 20 ) 
+            & ( ACHI2DOCA(2,3) < 20 ) 
+            """ , 
+            MotherCut        = """
+            ( chi2vx    < 16            ) &
+            ( ( mbp_cut & ( ctau > %s ) ) | ( mbc_cut & ( ctau > %s ) ) ) 
+            """ % ( self['CTAU'] , self['CTAU_BC'] ) 
+            )
+    
+    # Bc -> 3 k 
+    def Bc3k ( self ) :
+        """ Bc -> 3 k """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            'Bc3k'                , ## selection name 
+            DaVinci__N3BodyDecays , ## the algorithm type 
+            [ self.kaons() ]      , ## input selections 
+            #
+            ## algorithm configurtaion
+            #
+            DecayDescriptor  = "[B_c+ -> K+ K- K+ ]cc" ,
+            Combination12Cut = """ ( AM < 7 * GeV )
+            & ( ACHI2DOCA(1,2) < 20 )  
+            """  , 
+            CombinationCut   = """ ( mbp_acut | mbc_acut )
+            & ( ACHI2DOCA(1,3) < 20 ) 
+            & ( ACHI2DOCA(2,3) < 20 ) 
+            """ , 
+            MotherCut        = """
+            ( chi2vx    < 16            ) &
+            ( ( mbp_cut & ( ctau > %s ) ) | ( mbc_cut & ( ctau > %s ) ) ) 
+            """ % ( self['CTAU'] , self['CTAU_BC'] ) 
+            )
+
+    # Bc -> 3kpi 
+    def Bc3kpi ( self ) :
+        """ Bc -> 3 k pi """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            'Bc3kpi'                         , ## selection name 
+            DaVinci__N3BodyDecays            , ## the algorithm type 
+            [ self.kaons() , self.pions() ]  , ## input selections 
+            #
+            ## algorithm configurtaion
+            #
+            DecayDescriptors = [
+            "[B_c+ -> K+  K-  pi+ ]cc" ,
+            "[B_c+ -> K+  pi- pi+ ]cc" ,
+            ] ,
+            Combination12Cut = """ ( AM < 7 * GeV )
+            & ( ACHI2DOCA(1,2) < 20 )  
+            """  , 
+            CombinationCut   = """ ( mbp_acut | mbc_acut )
+            & ( ACHI2DOCA(1,3) < 20 ) 
+            & ( ACHI2DOCA(2,3) < 20 ) 
+            """ , 
+            MotherCut        = """
+            ( chi2vx    < 16            ) &
+            ( ( mbp_cut & ( ctau > %s ) ) | ( mbc_cut & ( ctau > %s ) ) ) 
+            """ % ( self['CTAU'] , self['CTAU_BC'] ) 
+            )
+    
+    # Bc -> pppi
+    def Bc3pppi ( self ) :
+        """ Bc -> pppi"""
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            'Bc3pppi'                         , ## selection name 
+            DaVinci__N3BodyDecays             , ## the algorithm type 
+            [ self.protons() , self.pions() ] , ## input selections 
+            #
+            ## algorithm configurtaion
+            #
+            DecayDescriptor  = "[B_c+ -> p+  p~- pi+ ]cc" ,
+            Combination12Cut = """ ( AM < 7 * GeV )
+            & ( ACHI2DOCA(1,2) < 20 )  
+            """  , 
+            CombinationCut   = """ ( mbp_acut | mbc_acut )
+            & ( ACHI2DOCA(1,3) < 20 ) 
+            & ( ACHI2DOCA(2,3) < 20 ) 
+            """ , 
+            MotherCut        = """
+            ( chi2vx    < 16            ) &
+            ( ( mbp_cut & ( ctau > %s ) ) | ( mbc_cut & ( ctau > %s ) ) ) 
+            """ % ( self['CTAU'] , self['CTAU_BC'] ) 
+            )
+    
+    # Bc -> ppK
+    def Bc3ppk ( self ) :
+        """
+        Bc -> ppK
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            'Bc3ppk'                          , ## selection name 
+            DaVinci__N3BodyDecays             , ## the algorithm type 
+            [ self.protons() , self.kaons() ] , ## input selections 
+            #
+            ## algorithm configurtaion
+            #
+            DecayDescriptor  = "[B_c+ -> p+  p~- K+ ]cc" ,
+            Combination12Cut = """ ( AM < 7 * GeV )
+            & ( ACHI2DOCA(1,2) < 20 )  
+            """  , 
+            CombinationCut   = """ ( mbp_acut | mbc_acut )
+            & ( ACHI2DOCA(1,3) < 20 ) 
+            & ( ACHI2DOCA(2,3) < 20 ) 
+            """ , 
+            MotherCut        = """
+            ( chi2vx    < 16            ) &
+            ( ( mbp_cut & ( ctau > %s ) ) | ( mbc_cut & ( ctau > %s ) ) ) 
+            """ % ( self['CTAU'] , self['CTAU_BC'] ) 
+            )
+    
+# =============================================================================
+if '__main__' == __name__ :
+    
+
+    logger.info ( 80*'*'  ) 
+    logger.info (  __doc__ ) 
+    logger.info ( ' Author :  %s' % __author__ ) 
+    logger.info ( ' Date   :  %s' % __date__   )
+    ##
+    clines = set() 
+    logger.info ( ' Lines declared in default_config["STREAMS"] are' )
+    for stream in default_config['STREAMS'] :
+        lines = default_config['STREAMS'][stream] 
+        for l in lines :
+            logger.info ( ' %-15s : %-50s ' % ( stream , l ) )
+            clines.add ( l )
+    ##
+    logger.info ( ' The output locations for the default configuration: ' )
+    _conf = Bc3hConf ( 'Bc3h' , config = default_config['CONFIG'] )
+    ## 
+    _ln   = ' ' + 61*'-' + '+' + 30*'-'
+    logger.info ( _ln ) 
+    logger.info ( '  %-60s| %-30s  ' % ( 'Output location', 'Stripping line name' ) ) 
+    logger.info ( _ln )
+    for l in _conf.lines() :
+        lout  = l.outputLocation()
+        lname = l.name() 
+        logger.info ( '  %-60s| %-30s  ' % ( lout, lname ) )
+        if not lname in clines :
+            raise AttributeError ('Unknown Line %s' % lname )
+        clines.remove ( lname )
+    logger.info ( _ln ) 
+    logger.info ( 80*'*'  ) 
+    if clines :
+        raise AttributeError('Undeclared lines: %s' % clines )
+
+    ## make dot-graphs 
+    try:    
+        selections = _conf._selections_private() 
+        for s in selections :
+            from SelPy.graph import graph
+            o = graph ( s , format = 'png' )
+            if o : logger.info  ( "Generate DOT-graph: %s"          % o        )
+            else : logger.error ( "Can't produce DOT=-graph for %s" % s.name() )
+            
+    except : pass
+   
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCC2DD.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCC2DD.py
new file mode 100644
index 000000000..668113f08
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCC2DD.py
@@ -0,0 +1,619 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingCC2DD.py, v 0.4 2015-12-01  $
+''' 
+Module for construction of CC->D D, where CC is a particle decaying to D D
+                                    and D is a D0(Kpi) or a D+(K-pi+pi+)
+                                          or a Ds(KKpi)
+                                          or one of their antipartciles
+          v .03: added "D+charmed baryon" and "2-charmed baryons" combinations,
+                 where "charmed baryon" = Lambda_c+(Xi_c+) -> p+ K- pi+
+                                    or    Xi_c0(Omega_c0)  -> p+ K- K- pi+
+'''
+
+__author__ = ['Lucio Anderlini','Andrea Bizzeti']
+__date__ = '2015-12-01'
+__version__ = '$Revision: 0.4 $'
+
+__all__ = ('CC2DDConf',
+           'makeD02HH',
+           'makeDp2HHH',
+           'makeLc2HHH',
+           'makeXc2HHHH',
+           'default_config')
+
+
+default_config =  {
+    'CC2DD': {
+    'WGs'  : ['BandQ'],
+    'BUILDERTYPE'       : 'CC2DDConf',
+    'CONFIG'   :  {
+######## D0 / D~0 -> K pi cuts
+                   'D0MassWin'     : "60*MeV",
+                   'D0PT'          : "1000*MeV",
+                   'D0VtxChi2Ndof' : 8,
+                   'D0Bpvdira'     : -10.,
+                   'D0Bpvdls'      : 4.,
+                   'D0daughterBpvIpChi2'    : 4.,
+                   'D0daughterPT'           : "600*MeV",
+                   'D0daughterP'            : "5*GeV",
+                   'D0daughterTrkChi2'      : 3,
+                   'D0daughterTrkGhostProb' : 0.3,
+### ProbNN conditions
+                   'D0daughterKaonProbNNk'  : 0.1,
+                   'D0daughterPionProbNNpi' : 0.1,
+
+######## Dplus/Dminus -> Kpipi cuts, used also for D_s+/D_s- ->KKpi
+                   'DpmMassWin'     : "60*MeV",
+                   'DpmPT'          : "1000*MeV",
+                   'DpmVtxChi2Ndof' : 8,
+                   'DpmBpvdira'     : -10.,
+                   'DpmBpvdls'      : 4.,
+                   'DpmdaughterBpvIpChi2'    : 4.,
+                   'DpmdaughterPT'           : "500*MeV",
+                   'DpmdaughterP'            : "5*GeV",
+                   'DpmdaughterTrkChi2'      : 3,
+                   'DpmdaughterTrkGhostProb' : 0.3,
+### ProbNN conditions
+                   'DpmdaughterKaonProbNNk'  : 0.1,
+                   'DpmdaughterPionProbNNpi' : 0.1,
+
+######## Lambda_c+, Xi_c+ -> p+ K- pi+ cuts
+                   'LcMassWin'     : "60*MeV",
+                   'LcPT'          : "1000*MeV",
+                   'LcVtxChi2Ndof' : 8,
+                   'LcBpvdira'     : -10.,
+                   'LcBpvdls'      : 4.,               # standard cut
+                   'LcdaughterBpvIpChi2'    : 4.,
+                   'LcdaughterPT'           : "500*MeV",
+                   'LcdaughterP'            : "5*GeV",
+                   'LcdaughterTrkChi2'      : 3,
+                   'LcdaughterTrkGhostProb' : 0.3,
+### ProbNN conditions
+                   'LcdaughterKaonProbNNk'  : 0.1,
+                   'LcdaughterPionProbNNpi' : 0.1,
+                   'LcdaughterProtonProbNNp': 0.15,
+
+######## Xi_c0, Omega_c0 -> p+ K- K- pi+ cuts
+                   'XcMassWin'     : "60*MeV",
+                   'XcPT'          : "1000*MeV",
+                   'XcVtxChi2Ndof' : 8,
+                   'XcBpvdira'     : -10.,
+                   'XcBpvdls'      : -10.,             # no cut
+                   'XcdaughterBpvIpChi2'    : 2.,      # loose cut
+                   'XcdaughterPT'           : "500*MeV",
+                   'XcdaughterP'            : "5*GeV",
+                   'XcdaughterTrkChi2'      : 3,
+                   'XcdaughterTrkGhostProb' : 0.3,
+### ProbNN conditions
+                   'XcdaughterKaonProbNNk'  : 0.1,
+                   'XcdaughterPionProbNNpi' : 0.1,
+                   'XcdaughterProtonProbNNp': 0.15,
+
+######## psi(3779) -> D D  cuts
+#                   'CCMassCut'     : "(AM<5000*MeV)",
+# no mass constraint
+                   'CCMassCut'      : "(AM>0)",
+                   'CCVtxChi2Ndof'  : 10,
+                   'CCMaxD0ChildPT' : "1500*MeV",
+                   'CCMaxD0TreePT'  : "1200*MeV",
+                   'CCMaxD0MinTreeIpChi2'   : "0.",    ## unused for the moment
+                   },
+    'STREAMS' : [
+    'CharmCompleteEvent' 
+    ],
+    },
+    'CC2DDcontrol' :  {
+    #'NAME' : 'CC2DDcontrol',
+	'BUILDERTYPE'       : 'CC2DDConf',
+	'CONFIG'   :  {
+	   ######## D0 / D~0 -> K pi cuts
+	   'D0MassWin'     : "60*MeV",
+	   'D0PT'          : "1000*MeV",
+	   'D0VtxChi2Ndof' : 8,
+	   'D0Bpvdira'     : -10.,
+	   'D0Bpvdls'      : 4.,
+	   'D0daughterBpvIpChi2'    : 4.,
+	   'D0daughterPT'           : "600*MeV",
+	   'D0daughterP'            : "5*GeV",
+	   'D0daughterTrkChi2'      : 3,
+	   'D0daughterTrkGhostProb' : 0.4,
+	   ### ProbNN conditions
+	   'D0daughterKaonProbNNk'  : 0.0,
+	   'D0daughterPionProbNNpi' : 0.0,
+
+	   ######## Dplus/Dminus -> Kpipi cuts, used also for D_s+/D_s- ->KKpi
+	   'DpmMassWin'     : "60*MeV",
+	   'DpmPT'          : "1000*MeV",
+	   'DpmVtxChi2Ndof' : 8,
+	   'DpmBpvdira'     : -10.,
+	   'DpmBpvdls'      : 4.,
+	   'DpmdaughterBpvIpChi2'    : 4.,
+	   'DpmdaughterPT'           : "500*MeV",
+	   'DpmdaughterP'            : "5*GeV",
+	   'DpmdaughterTrkChi2'      : 3,
+	   'DpmdaughterTrkGhostProb' : 0.4,
+	   ### ProbNN conditions
+	   'DpmdaughterKaonProbNNk'  : 0.0,
+	   'DpmdaughterPionProbNNpi' : 0.0,
+	   ######## Lambda_c+, Xi_c+ -> p+ K- pi+ cuts
+	   'LcMassWin'     : "60*MeV",
+	   'LcPT'          : "1000*MeV",
+	   'LcVtxChi2Ndof' : 8,
+	   'LcBpvdira'     : -10.,
+	   'LcBpvdls'      : 4.,               # standard cut
+	   'LcdaughterBpvIpChi2'    : 4.,
+	   'LcdaughterPT'           : "500*MeV",
+	   'LcdaughterP'            : "5*GeV",
+	   'LcdaughterTrkChi2'      : 3,
+	   'LcdaughterTrkGhostProb' : 0.4,
+	   ### ProbNN conditions
+	   'LcdaughterKaonProbNNk'  : 0.0,
+	   'LcdaughterPionProbNNpi' : 0.0,
+	   'LcdaughterProtonProbNNp': 0.15,
+
+	   ######## Xi_c0, Omega_c0 -> p+ K- K- pi+ cuts
+	   'XcMassWin'     : "60*MeV",
+	   'XcPT'          : "1000*MeV",
+	   'XcVtxChi2Ndof' : 8,
+	   'XcBpvdira'     : -10.,
+	   'XcBpvdls'      : -10.,             # no cut
+         'XcdaughterBpvIpChi2'    : 2.,      # loose cut
+         'XcdaughterPT'           : "500*MeV",
+	   'XcdaughterP'            : "5*GeV",
+	   'XcdaughterTrkChi2'      : 3,
+	   'XcdaughterTrkGhostProb' : 0.4,
+	   ### ProbNN conditions
+	   'XcdaughterKaonProbNNk'  : 0.0,
+	   'XcdaughterPionProbNNpi' : 0.0,
+	   'XcdaughterProtonProbNNp': 0.15,
+
+	   ######## psi(3770) -> D D  cuts
+	   #                   'CCMassCut'     : "(AM<5000*MeV)",
+	   # no mass constraint
+	   'CCMassCut'      : "(AM>0)",
+	   'CCVtxChi2Ndof'  : 10,
+	   'CCMaxD0ChildPT' : "1500*MeV",
+	   'CCMaxD0TreePT'  : "1200*MeV",
+	   'CCMaxD0MinTreeIpChi2'   : "0.",    ## unused for the moment
+	   },
+	'STREAMS' : [
+		'Charm'
+	   ],
+        'WGs'  : ['BandQ']
+        }
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class CC2DDConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CC2DD']['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.selD02HH = makeD02HH( 'D0For'+name, 
+                                     D0MassWin     = config['D0MassWin'],
+                                     D0PT          = config['D0PT'],
+                                     D0VtxChi2Ndof = config['D0VtxChi2Ndof'],
+                                     D0Bpvdira     = config['D0Bpvdira'],
+                                     D0Bpvdls      = config['D0Bpvdls'],
+                                     D0daughterPT       = config['D0daughterPT'],
+                                     D0daughterP        = config['D0daughterP'],
+                                     D0daughterTrkChi2  = config['D0daughterTrkChi2'],
+                                     D0daughterTrkGhostProb = config['D0daughterTrkGhostProb'],
+                                     D0daughterBpvIpChi2    = config['D0daughterBpvIpChi2'],
+###                                     D0daughterKaonPIDK     = config['D0daughterKaonPIDK'],
+###                                     D0daughterPionPIDK     = config['D0daughterPionPIDK'],
+                                     D0daughterKaonProbNNk  = config['D0daughterKaonProbNNk'],
+                                     D0daughterPionProbNNpi = config['D0daughterPionProbNNpi'],
+                                   )
+
+        self.selDp2HHH = makeDp2HHH( 'DpFor'+name, 
+                                     DpmMassWin     = config['DpmMassWin'],
+                                     DpmPT          = config['DpmPT'],
+                                     DpmVtxChi2Ndof = config['DpmVtxChi2Ndof'],
+                                     DpmBpvdira     = config['DpmBpvdira'],
+                                     DpmBpvdls      = config['DpmBpvdls'],
+                                     DpmdaughterPT           = config['DpmdaughterPT'],
+                                     DpmdaughterP            = config['DpmdaughterP'],
+                                     DpmdaughterTrkChi2      = config['DpmdaughterTrkChi2'],
+                                     DpmdaughterTrkGhostProb = config['DpmdaughterTrkGhostProb'],
+                                     DpmdaughterBpvIpChi2    = config['DpmdaughterBpvIpChi2'],
+###                                     DpmdaughterKaonPIDK     = config['DpmdaughterKaonPIDK'],
+###                                     DpmdaughterPionPIDK     = config['DpmdaughterPionPIDK'],
+                                     DpmdaughterKaonProbNNk  = config['DpmdaughterKaonProbNNk'],
+                                     DpmdaughterPionProbNNpi = config['DpmdaughterPionProbNNpi'],
+                                   )
+
+        self.selDs2HHH = makeDs2HHH( 'DsFor'+name, 
+                                     DpmMassWin     = config['DpmMassWin'],
+                                     DpmPT          = config['DpmPT'],
+                                     DpmVtxChi2Ndof = config['DpmVtxChi2Ndof'],
+                                     DpmBpvdira     = config['DpmBpvdira'],
+                                     DpmBpvdls      = config['DpmBpvdls'],
+                                     DpmdaughterPT           = config['DpmdaughterPT'],
+                                     DpmdaughterP            = config['DpmdaughterP'],
+                                     DpmdaughterTrkChi2      = config['DpmdaughterTrkChi2'],
+                                     DpmdaughterTrkGhostProb = config['DpmdaughterTrkGhostProb'],
+                                     DpmdaughterBpvIpChi2    = config['DpmdaughterBpvIpChi2'],
+###                                     DpmdaughterKaonPIDK     = config['DpmdaughterKaonPIDK'],
+###                                     DpmdaughterPionPIDK     = config['DpmdaughterPionPIDK'],
+                                     DpmdaughterKaonProbNNk  = config['DpmdaughterKaonProbNNk'],
+                                     DpmdaughterPionProbNNpi = config['DpmdaughterPionProbNNpi'],
+                                   )
+
+
+        self.selLc2HHH = makeLc2HHH( 'LcFor'+name, 
+                                     LcMassWin     = config['LcMassWin'],
+                                     LcPT          = config['LcPT'],
+                                     LcVtxChi2Ndof = config['LcVtxChi2Ndof'],
+                                     LcBpvdira     = config['LcBpvdira'],
+                                     LcBpvdls      = config['LcBpvdls'],
+                                     LcdaughterPT           = config['LcdaughterPT'],
+                                     LcdaughterP            = config['LcdaughterP'],
+                                     LcdaughterTrkChi2      = config['LcdaughterTrkChi2'],
+                                     LcdaughterTrkGhostProb = config['LcdaughterTrkGhostProb'],
+                                     LcdaughterBpvIpChi2    = config['LcdaughterBpvIpChi2'],
+###                                     LcdaughterKaonPIDK     = config['LcdaughterKaonPIDK'],
+###                                     LcdaughterPionPIDK     = config['LcdaughterPionPIDK'],
+                                     LcdaughterProtonProbNNp= config['LcdaughterProtonProbNNp'],
+                                     LcdaughterKaonProbNNk  = config['LcdaughterKaonProbNNk'],
+                                     LcdaughterPionProbNNpi = config['LcdaughterPionProbNNpi'],
+                                   )
+
+        self.selXc2HHHH = makeXc2HHHH( 'XcFor'+name, 
+                                     XcMassWin     = config['XcMassWin'],
+                                     XcPT          = config['XcPT'],
+                                     XcVtxChi2Ndof = config['XcVtxChi2Ndof'],
+                                     XcBpvdira     = config['XcBpvdira'],
+                                     XcBpvdls      = config['XcBpvdls'],
+                                     XcdaughterPT           = config['XcdaughterPT'],
+                                     XcdaughterP            = config['XcdaughterP'],
+                                     XcdaughterTrkChi2      = config['XcdaughterTrkChi2'],
+                                     XcdaughterTrkGhostProb = config['XcdaughterTrkGhostProb'],
+                                     XcdaughterBpvIpChi2    = config['XcdaughterBpvIpChi2'],
+###                                     XcdaughterKaonPIDK     = config['XcdaughterKaonPIDK'],
+###                                     XcdaughterPionPIDK     = config['XcdaughterPionPIDK'],
+                                     XcdaughterProtonProbNNp  = config['XcdaughterProtonProbNNp'],
+                                     XcdaughterKaonProbNNk  = config['XcdaughterKaonProbNNk'],
+                                     XcdaughterPionProbNNpi = config['XcdaughterPionProbNNpi'],
+                                   )
+
+
+        self.selCC2DD = makeCC2DD(name,  
+                                  D0Sel    = self.selD02HH,
+                                  DplusSel = self.selDp2HHH,
+                                  DsSel    = self.selDs2HHH,
+                                  LcSel    = self.selLc2HHH,
+                                  XcSel    = self.selXc2HHHH,
+                                  CCMassCut      = config['CCMassCut'],
+                                  CCVtxChi2Ndof  = config['CCVtxChi2Ndof'],
+                                  CCMaxD0ChildPT = config['CCMaxD0ChildPT'],
+                                  CCMaxD0TreePT  = config['CCMaxD0TreePT'],
+                                  CCMaxD0MinTreeIpChi2 = config['CCMaxD0MinTreeIpChi2'],
+                                 )
+
+        self.myLine = StrippingLine(name+"Line",
+                                            prescale = 1.,
+                                            postscale = 1.,
+                                            selection = self.selCC2DD
+                                            )
+
+        self.registerLine(self.myLine)
+
+
+def makeD02HH(name, D0MassWin, D0PT, D0VtxChi2Ndof, D0Bpvdira, D0Bpvdls,
+                    D0daughterPT, D0daughterP, D0daughterTrkChi2,
+                    D0daughterTrkGhostProb, D0daughterBpvIpChi2,
+###                    D0daughterKaonPIDK, D0daughterPionPIDK,
+                    D0daughterKaonProbNNk, D0daughterPionProbNNpi, 
+              ) :
+
+    """
+    Create and return a D0 -> K pi 
+    """
+
+    _motherCuts = "(ADMASS('D0')<%(D0MassWin)s) & (PT>%(D0PT)s) & (VFASPF(VCHI2PDOF)<%(D0VtxChi2Ndof)s) " % locals()
+    _motherCuts += "& (BPVDIRA>%(D0Bpvdira)s) & (BPVDLS>%(D0Bpvdls)s)" % locals()
+    _daughtersCuts = "(PT> %(D0daughterPT)s) & (P>%(D0daughterP)s) & (TRCHI2DOF<%(D0daughterTrkChi2)s) " % locals()
+    _daughtersCuts += "& (TRGHP<%(D0daughterTrkGhostProb)s) & (BPVIPCHI2()>%(D0daughterBpvIpChi2)s)" % locals()
+###    _KCutsPID     = "&( (PIDK>%(D0daughterKaonPIDK)s) | (PROBNNk>%(D0daughterKaonProbNNk)s) )" % locals()
+###    _PiCutsPID    = "&( (PIDK<%(D0daughterPionPIDK)s) | (PROBNNpi>%(D0daughterPionProbNNpi)s) )" % locals()
+    _KCutsPID     = "&(PROBNNk>%(D0daughterKaonProbNNk)s)" % locals()
+    _PiCutsPID    = "&(PROBNNpi>%(D0daughterPionProbNNpi)s)" % locals()
+    _KCuts    = _daughtersCuts + _KCutsPID
+    _PiCuts   = _daughtersCuts + _PiCutsPID
+    _D0Filter = CombineParticles( DecayDescriptor = "[D0 -> K- pi+]cc",
+                                  MotherCut = _motherCuts,
+                                  DaughtersCuts =  { "pi+" : _PiCuts, "K+" : _KCuts }
+                                  )
+
+#    _stdTightKaons = DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")
+#    _stdTightPions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+    _stdTightKaons = DataOnDemand(Location = "Phys/StdAllLooseANNKaons/Particles")
+    _stdTightPions = DataOnDemand(Location = "Phys/StdAllLooseANNPions/Particles")
+
+    return Selection (name,
+                      Algorithm = _D0Filter,
+                      RequiredSelections = [_stdTightKaons, _stdTightPions])
+
+
+
+
+def makeDp2HHH(name, DpmMassWin, DpmPT, DpmVtxChi2Ndof, DpmBpvdira, DpmBpvdls,
+                     DpmdaughterPT, DpmdaughterP, DpmdaughterTrkChi2,
+                     DpmdaughterTrkGhostProb, DpmdaughterBpvIpChi2,
+###                     DpmdaughterKaonPIDK, DpmdaughterPionPIDK,
+                     DpmdaughterKaonProbNNk, DpmdaughterPionProbNNpi,
+               ) :
+
+    """
+    Create and return a D+ -> K- pi+ pi+
+    """
+
+    _DpmotherCuts  = "(ADMASS('D+')<%(DpmMassWin)s) & (PT> %(DpmPT)s) & (VFASPF(VCHI2PDOF) < %(DpmVtxChi2Ndof)s) " % locals()
+    _DpmotherCuts += "& (BPVDIRA>%(DpmBpvdira)s) & (BPVDLS > %(DpmBpvdls)s)" % locals()
+    _DpdaughtersCuts  = "(PT>%(DpmdaughterPT)s) & (P>%(DpmdaughterP)s) & (TRCHI2DOF<%(DpmdaughterTrkChi2)s) " % locals()
+    _DpdaughtersCuts += "& (TRGHP<%(DpmdaughterTrkGhostProb)s) & (BPVIPCHI2()>%(DpmdaughterBpvIpChi2)s)" % locals()
+###    _KCutsPID     = "&( (PIDK>%(DpmdaughterKaonPIDK)s) | (PROBNNk>%(DpmdaughterKaonProbNNk)s) )" % locals()
+###    _PiCutsPID    = "&( (PIDK<%(DpmdaughterPionPIDK)s) | (PROBNNpi>%(DpmdaughterPionProbNNpi)s) )" % locals()
+    _KCutsPID     = "&(PROBNNk>%(DpmdaughterKaonProbNNk)s)" % locals()
+    _PiCutsPID    = "&(PROBNNpi>%(DpmdaughterPionProbNNpi)s)" % locals()
+    _DpKCuts  = _DpdaughtersCuts + _KCutsPID
+    _DpPiCuts = _DpdaughtersCuts + _PiCutsPID
+
+    _DplusFilter = CombineParticles( DecayDescriptor = "[D+ -> K- pi+ pi+]cc",
+                                  MotherCut = _DpmotherCuts,
+                                  DaughtersCuts =  { "pi+" : _DpPiCuts, "K+" : _DpKCuts }
+                                  )
+
+    _stdTightKaons = DataOnDemand(Location = "Phys/StdAllLooseANNKaons/Particles")
+    _stdTightPions = DataOnDemand(Location = "Phys/StdAllLooseANNPions/Particles")
+
+    return Selection (name,
+                      Algorithm = _DplusFilter,
+                      RequiredSelections = [_stdTightKaons, _stdTightPions])
+
+
+
+
+def makeDs2HHH(name, DpmMassWin, DpmPT, DpmVtxChi2Ndof, DpmBpvdira, DpmBpvdls,
+                     DpmdaughterPT, DpmdaughterP, DpmdaughterTrkChi2,
+                     DpmdaughterTrkGhostProb, DpmdaughterBpvIpChi2,
+###                     DpmdaughterKaonPIDK, DpmdaughterPionPIDK,
+                     DpmdaughterKaonProbNNk, DpmdaughterPionProbNNpi,
+              ) :
+
+    """
+    Create and return a D_s+ -> K- K+ pi+
+    """
+
+    _DsmotherCuts  = "(ADMASS('D_s+')<%(DpmMassWin)s) & (PT> %(DpmPT)s) & (VFASPF(VCHI2PDOF) < %(DpmVtxChi2Ndof)s) " % locals()
+    _DsmotherCuts += "& (BPVDIRA>%(DpmBpvdira)s) & (BPVDLS > %(DpmBpvdls)s)" % locals()
+    _DsdaughtersCuts  = "(PT>%(DpmdaughterPT)s) & (P>%(DpmdaughterP)s) & (TRCHI2DOF<%(DpmdaughterTrkChi2)s) " % locals()
+    _DsdaughtersCuts += "& (TRGHP<%(DpmdaughterTrkGhostProb)s) & (BPVIPCHI2()>%(DpmdaughterBpvIpChi2)s)" % locals()
+###    _KCutsPID     = "&( (PIDK>%(DpmdaughterKaonPIDK)s) | (PROBNNk>%(DpmdaughterKaonProbNNk)s) )" % locals()
+###    _PiCutsPID    = "&( (PIDK<%(DpmdaughterPionPIDK)s) | (PROBNNpi>%(DpmdaughterPionProbNNpi)s) )" % locals()
+    _KCutsPID     = "&(PROBNNk>%(DpmdaughterKaonProbNNk)s)" % locals()
+    _PiCutsPID    = "&(PROBNNpi>%(DpmdaughterPionProbNNpi)s)" % locals()
+    _DsKCuts  = _DsdaughtersCuts + _KCutsPID
+    _DsPiCuts = _DsdaughtersCuts + _PiCutsPID
+
+    _DsFilter = CombineParticles( DecayDescriptor = "[D_s+ -> K- K+ pi+]cc",
+                                  MotherCut = _DsmotherCuts,
+                                  DaughtersCuts =  { "pi+" : _DsPiCuts, "K+" : _DsKCuts }
+                                  )
+
+#    _stdTightKaons = DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")
+#    _stdTightPions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+    _stdTightKaons = DataOnDemand(Location = "Phys/StdAllLooseANNKaons/Particles")
+    _stdTightPions = DataOnDemand(Location = "Phys/StdAllLooseANNPions/Particles")
+
+    return Selection (name,
+                      Algorithm = _DsFilter,
+                      RequiredSelections = [_stdTightKaons, _stdTightPions])
+
+
+
+
+
+
+def makeLc2HHH(name, LcMassWin, LcPT, LcVtxChi2Ndof, LcBpvdira, LcBpvdls,
+                     LcdaughterPT, LcdaughterP, LcdaughterTrkChi2,
+                     LcdaughterTrkGhostProb, LcdaughterBpvIpChi2,
+###                     LcdaughterKaonPIDK, LcdaughterPionPIDK,
+                     LcdaughterProtonProbNNp,
+                     LcdaughterKaonProbNNk, LcdaughterPionProbNNpi,
+               ) :
+
+    """
+    Create and return a Lambda_c+/Xi_c+ -> p K- pi+
+    """
+
+###    _LcotherCuts  = "(ALL)"   # no cuts
+    _LcotherCuts  = "( (ADMASS('Lambda_c+')<%(LcMassWin)s) | (ADMASS('Xi_c+')<%(LcMassWin)s) ) " % locals()
+    _LcotherCuts += "& (PT> %(LcPT)s) & (VFASPF(VCHI2PDOF) < %(LcVtxChi2Ndof)s) " % locals()
+    _LcotherCuts += "& (BPVDIRA>%(LcBpvdira)s) & (BPVDLS > %(LcBpvdls)s)" % locals()
+###    _LcdaughtersCuts  = "(ALL)"   # no cuts
+    _LcdaughtersCuts  = "(PT>%(LcdaughterPT)s) & (P>%(LcdaughterP)s) & (TRCHI2DOF<%(LcdaughterTrkChi2)s) " % locals()
+    _LcdaughtersCuts += "& (TRGHP<%(LcdaughterTrkGhostProb)s) & (BPVIPCHI2()>%(LcdaughterBpvIpChi2)s)" % locals()
+
+###    _KCutsPID     = "&( (PIDK>%(LcdaughterKaonPIDK)s) | (PROBNNk>%(LcdaughterKaonProbNNk)s) )" % locals()
+###    _PiCutsPID    = "&( (PIDK<%(LcdaughterPionPIDK)s) | (PROBNNpi>%(LcdaughterPionProbNNpi)s) )" % locals()
+    _PCutsPID     = "&(PROBNNp>%(LcdaughterProtonProbNNp)s)" % locals()
+    _KCutsPID     = "&(PROBNNk>%(LcdaughterKaonProbNNk)s)" % locals()
+    _PiCutsPID    = "&(PROBNNpi>%(LcdaughterPionProbNNpi)s)" % locals()
+    _LcPCuts  = _LcdaughtersCuts + _PCutsPID
+    _LcKCuts  = _LcdaughtersCuts + _KCutsPID
+    _LcPiCuts = _LcdaughtersCuts + _PiCutsPID
+
+    _LcFilter = CombineParticles( DecayDescriptor = "[Lambda_c+ -> p+ K- pi+]cc",
+                                  MotherCut = _LcotherCuts,
+                                  DaughtersCuts =  { "p+" : _LcPCuts, "pi+" : _LcPiCuts, "K+" : _LcKCuts }
+                                  )
+#    _stdTightProtons = DataOnDemand(Location = "Phys/StdAllLooseProtons/Particles")
+#    _stdTightKaons   = DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")
+#    _stdTightPions   = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+    _stdTightProtons = DataOnDemand(Location = "Phys/StdAllLooseANNProtons/Particles")
+    _stdTightKaons   = DataOnDemand(Location = "Phys/StdAllLooseANNKaons/Particles")
+    _stdTightPions   = DataOnDemand(Location = "Phys/StdAllLooseANNPions/Particles")
+
+    return Selection (name,
+                      Algorithm = _LcFilter,
+                      RequiredSelections = [_stdTightProtons, _stdTightKaons, _stdTightPions])
+
+
+
+
+
+
+
+
+
+
+
+def makeXc2HHHH(name, XcMassWin, XcPT, XcVtxChi2Ndof, XcBpvdira, XcBpvdls,
+                     XcdaughterPT, XcdaughterP, XcdaughterTrkChi2,
+                     XcdaughterTrkGhostProb, XcdaughterBpvIpChi2,
+###                     XcdaughterKaonPIDK, XcdaughterPionPIDK,
+                     XcdaughterProtonProbNNp,
+                     XcdaughterKaonProbNNk, XcdaughterPionProbNNpi,
+               ) :
+
+    """
+    Create and return a Xi_c0/Omega_c0 -> p K- K- pi+
+    """
+
+###    _XcotherCuts  = "(ALL)"
+    _XcotherCuts  = "( (ADMASS('Xi_c0')<%(XcMassWin)s) | (ADMASS('Omega_c0')<%(XcMassWin)s) ) " % locals()
+    _XcotherCuts += "& (PT> %(XcPT)s) & (VFASPF(VCHI2PDOF) < %(XcVtxChi2Ndof)s) " % locals()
+    _XcotherCuts += "& (BPVDIRA>%(XcBpvdira)s) & (BPVDLS > %(XcBpvdls)s)" % locals()
+###    _XcdaughtersCuts  = "(ALL)"
+    _XcdaughtersCuts  = "(PT>%(XcdaughterPT)s) & (P>%(XcdaughterP)s) & (TRCHI2DOF<%(XcdaughterTrkChi2)s) " % locals()
+    _XcdaughtersCuts += "& (TRGHP<%(XcdaughterTrkGhostProb)s) & (BPVIPCHI2()>%(XcdaughterBpvIpChi2)s)" % locals()
+###    _KCutsPID     = "&( (PIDK>%(XcdaughterKaonPIDK)s) | (PROBNNk>%(XcdaughterKaonProbNNk)s) )" % locals()
+###    _PiCutsPID    = "&( (PIDK<%(XcdaughterPionPIDK)s) | (PROBNNpi>%(XcdaughterPionProbNNpi)s) )" % locals()
+
+    _PCutsPID     = "&(PROBNNp>%(XcdaughterProtonProbNNp)s)" % locals()
+    _KCutsPID     = "&(PROBNNk>%(XcdaughterKaonProbNNk)s)" % locals()
+    _PiCutsPID    = "&(PROBNNpi>%(XcdaughterPionProbNNpi)s)" % locals()
+    _XcPCuts  = _XcdaughtersCuts + _PCutsPID
+    _XcKCuts  = _XcdaughtersCuts + _KCutsPID
+    _XcPiCuts = _XcdaughtersCuts + _PiCutsPID
+
+    _XcFilter = CombineParticles( DecayDescriptor = "[Xi_c0 -> p+ K- K- pi+]cc",
+                                  MotherCut = _XcotherCuts,
+                                  DaughtersCuts =  { "p+" : _XcPCuts, "pi+" : _XcPiCuts, "K+" : _XcKCuts }
+                                  )
+    _stdTightProtons = DataOnDemand(Location = "Phys/StdAllLooseANNProtons/Particles")
+    _stdTightKaons   = DataOnDemand(Location = "Phys/StdAllLooseANNKaons/Particles")
+    _stdTightPions   = DataOnDemand(Location = "Phys/StdAllLooseANNPions/Particles")
+
+    return Selection (name,
+                      Algorithm = _XcFilter,
+                      RequiredSelections = [_stdTightProtons, _stdTightKaons, _stdTightPions])
+
+
+
+
+
+
+def makeCC2DD(name,
+                   D0Sel,
+                   DplusSel,
+                   DsSel,
+                   LcSel,
+                   XcSel,
+                   CCMassCut,
+                   CCVtxChi2Ndof,
+                   CCMaxD0ChildPT,
+                   CCMaxD0TreePT,
+                   CCMaxD0MinTreeIpChi2,
+                   ) :
+    """
+    Create and return a X -> DD  Selection Object, with  D = D0(Kpi) or Dp(Kpipi)
+    Arguments:
+    name          : name of the Selection.
+    D0Sel, etc.   : (D0 -> HH; Dplus,Ds,Lc -> HHH, Xc -> HHHH) Selection objects.
+    CCMassCut     : CC invariant mass cuts (not used)
+    CCVtxChi2Ndof : CC vertex Chi2/Ndof cut
+    CCMaxD0ChildPT  : highest PT between D0 and D~0
+    CCMaxD0TreePT   : highest PT between all D0/D~0 daughters
+    CCMaxD0MinTreeIpChi2 : max between D0/D~0 minima of daughter's MINIPCHI2
+    """
+
+    _motherCuts = "(ALL)" 
+#    _motherCuts  = "(VFASPF(VCHI2PDOF)<%(CCVtxChi2Ndof)s)" % locals()
+#    _motherCuts += "&(MAXTREE(ISBASIC,PT)>%(CCMaxD0TreePT)s)" % locals()
+    _combinationCuts  = "(AALL)"
+#    _combinationCuts  = CCMassCut
+#    _combinationCuts += "&(AMAXCHILD(PT)>%(CCMaxD0ChildPT)s)" % locals()
+##    _combinationCuts += "&(AMAXCHILD(MINTREE(BPVIPCHI2()))>%(CCMaxD0MinTreeIpChi2)s)" % locals()  ## unused for the moment
+
+    #print 'makeBs2JpsiPhi', name, 'MotherCuts:', _motherCuts
+    _X = CombineParticles( DecayDescriptors = [
+                  ################################# pure particle-(anti)particle
+                 "psi(3770) -> D0 D~0",
+                 "[psi(3770) -> D0 D0]cc",      ### C=2,       Q=0
+                 "psi(3770) -> D+ D-",
+                 "[psi(3770) -> D+ D+]cc",      ### C=2,       Q=+2
+                 "psi(3770) -> D_s+ D_s-",
+                 "[psi(3770) -> D_s+ D_s+]cc",  ### C=2, S=2,  Q=+2
+                  #################################  mixed (without Ds)
+                 "[psi(3770) -> D0 D-]cc",      ###            Q=-1
+                 "[psi(3770) -> D0 D+]cc",      ### C=2,       Q=+1
+                  #################################  mixed (with Ds)
+                 "[psi(3770) -> D0 D_s-]cc",    ###      S=-1, Q=-1
+                 "[psi(3770) -> D+ D_s-]cc",    ###      S=-1, Q=0
+                 "[psi(3770) -> D0 D_s+]cc",    ### C=2, S=1,  Q=+1
+                 "[psi(3770) -> D+ D_s+]cc",    ### C=2, S=1,  Q=+2
+                  #################################  baryon mixed (with Lambda_c+/Xi_c+)
+                 "[psi(3770) -> Lambda_c+ D0]cc",
+                 "[psi(3770) -> Lambda_c+ D~0]cc",
+                 "[psi(3770) -> Lambda_c+ D+]cc",
+                 "[psi(3770) -> Lambda_c+ D-]cc",
+                 "[psi(3770) -> Lambda_c+ D_s+]cc",
+                 "[psi(3770) -> Lambda_c+ D_s-]cc",
+                  #################################  baryon mixed (with Xi_c0/Omega_c0)
+                 "[psi(3770) -> Xi_c0 D0]cc",
+                 "[psi(3770) -> Xi_c0 D~0]cc",
+                 "[psi(3770) -> Xi_c0 D+]cc",
+                 "[psi(3770) -> Xi_c0 D-]cc",
+                 "[psi(3770) -> Xi_c0 D_s+]cc",
+                 "[psi(3770) -> Xi_c0 D_s-]cc",
+                  #################################  baryon + baryon
+                 "psi(3770) -> Lambda_c+ Lambda_c~-",
+                 "[psi(3770) -> Lambda_c+ Lambda_c+]cc",
+                 "psi(3770) -> Xi_c0 Xi_c~0",
+                 "[psi(3770) -> Xi_c0 Xi_c0]cc",
+                 "[psi(3770) -> Lambda_c+ Xi_c0]cc",
+                 "[psi(3770) -> Lambda_c+ Xi_c~0]cc",
+                                               ],
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combinationCuts
+                           )
+
+    DSel = MergedSelection ( name + "MergedDSelection",
+                             RequiredSelections = [D0Sel, DplusSel, DsSel, LcSel, XcSel]
+                           )
+
+    return Selection ( name,
+                       Algorithm = _X,
+                       RequiredSelections = [DSel])
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2Baryons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2Baryons.py
new file mode 100644
index 000000000..fd9476eb9
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2Baryons.py
@@ -0,0 +1,169 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Ccbar->LambdaLambda, XiXi
+
+To include it:
+
+from StrippingSelections.StrippingCcbar2Baryons import Ccbar2BaryonsConf
+StrippingCcbar2BaryonsConf =  Ccbar2BaryonsConf( name = 'Ccbar2Baryons', config = Ccbar2BaryonsConf.config_default )
+stream.appendLines( [
+      StrippingCcbar2BaryonsConf.line
+])
+'''
+
+__author__=['Jibo He']
+__date__ = '03/10/2010'
+__version__= '$Revision: 1.2 $'
+
+
+__all__ = (
+    'Ccbar2BaryonsConf',
+    'makePP'
+    )
+
+config_default =  {
+        'TRCHI2DOF'        :    5.   ,
+        'CombMaxMass'      :  4100.  , # MeV, before Vtx fit
+        'CombMinMass'      :  2750.  , # MeV, before Vtx fit
+        'MaxMass'          :  4000.  , # MeV, after Vtx fit
+        'MinMass'          :  2800.    # MeV, after Vtx fit
+        }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdNoPIDsProtons, StdNoPIDsPions, StdNoPIDsDownPions
+
+class Ccbar2BaryonsConf(LineBuilder):
+
+    __configuration_keys__ = config_default.keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        """
+        Lambda 
+        """
+        self.LambdaLLForJpsi = self.createSubSel( OutputList = "LambdaLLFor" + self.name,
+                                                  InputList =  DataOnDemand( Location = 'Phys/StdLooseLambdaLL/Particles' ), 
+                                                  Cuts = "(VFASPF(VCHI2/VDOF)<16)"\
+                                                  " & (ADMASS('Lambda0')<5*MeV)"\
+                                                  " & (INTREE( ('pi+'==ABSID) & (TRCHI2DOF < %(TRCHI2DOF)s)))" \
+                                                  " & (INTREE( ('p+'==ABSID)  & (TRCHI2DOF < %(TRCHI2DOF)s)))" \
+                                                  " & (log(CHILD(MIPDV(PRIMARY),1)*CHILD(MIPDV(PRIMARY),2)/MIPDV(PRIMARY))>2.0)"\
+                                                  " & (ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > 20*MeV )" % self.config )
+        
+        self.LambdaDDForJpsi = self.createSubSel( OutputList = "LambdaDDFor" + self.name,
+                                                  InputList =  DataOnDemand( Location = 'Phys/StdLooseLambdaDD/Particles' ), 
+                                                  Cuts = "(VFASPF(VCHI2/VDOF)<16)"\
+                                                  " & (ADMASS('Lambda0')<5*MeV)"\
+                                                  " & (INTREE( ('pi+'==ABSID) & (TRCHI2DOF < %(TRCHI2DOF)s)))" \
+                                                  " & (INTREE( ('p+'==ABSID)  & (TRCHI2DOF < %(TRCHI2DOF)s) & (PIDp>5) ))" \
+                                                  " & (log(CHILD(MIPDV(PRIMARY),1)*CHILD(MIPDV(PRIMARY),2)/MIPDV(PRIMARY))>2.5)"\
+                                                  " & (ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > 20*MeV )" % self.config )
+        
+        self.LambdaForJpsiList = MergedSelection("MergedLambdaForJpsi" + self.name,
+                                                 RequiredSelections =  [ self.LambdaLLForJpsi, 
+                                                                         self.LambdaDDForJpsi, 
+                                                                         ])
+        
+        """
+        Pion 
+        """
+        self.PionLongForXi = self.createSubSel( OutputList = "PionLongForXiList" + self.name,
+                                                InputList =  DataOnDemand( Location = 'Phys/StdNoPIDsPions/Particles' ), 
+                                                Cuts = "(PT>0.1*GeV) & (P>2.*GeV) & (TRCHI2DOF < %(TRCHI2DOF)s )" % self.config
+                                                )
+
+        self.PionDownForXi = self.createSubSel( OutputList = "PionDownForXiList" + self.name,
+                                                InputList =  DataOnDemand( Location = 'Phys/StdNoPIDsDownPions/Particles' ), 
+                                                Cuts = "(PT>0.1*GeV) & (P>2.*GeV) & (TRCHI2DOF < %(TRCHI2DOF)s )" % self.config
+                                                )
+        
+        self.PionForXiList = MergedSelection("MergedPionForXi" + self.name,
+                                             RequiredSelections =  [ self.PionLongForXi, 
+                                                                     self.PionDownForXi, 
+                                                                     ])
+        
+        """
+        Xi
+        """
+        self.XiList = self.createCombinationSel( OutputList = "XiFor" + self.name,
+                                                 DaughterLists = [ self.LambdaForJpsiList, self.PionForXiList ],
+                                                 DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                                                 PreVertexCuts = "(ADAMASS('Xi-')<50*MeV) & (ADOCACHI2CUT(40, ''))",
+                                                 PostVertexCuts = "(VFASPF(VCHI2/VDOF)<16)"\
+                                                 " & (ADMASS('Xi-')<20*MeV)"
+                                                 )
+
+        
+        self.makeJpsi2DiLambda()
+        self.makeJpsi2DiXi()
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = True)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+    
+    
+    
+    def makeJpsi2DiLambda(self):
+        Jpsi2DiLambda = self.createCombinationSel( OutputList = "Jpsi2DiLambda" + self.name,
+                                                   DecayDescriptor = " J/psi(1S) -> Lambda0 Lambda~0", 
+                                                   DaughterLists = [ self.LambdaForJpsiList ], 
+                                                   DaughterCuts  = { "Lambda0": "(PT>0.5*GeV)" },
+                                                   PreVertexCuts = "(in_range( %(CombMinMass)s *MeV, AM, %(CombMaxMass)s *MeV))" % self.config,
+                                                   PostVertexCuts = "(in_range( %(MinMass)s *MeV, MM, %(MaxMass)s *MeV)) & (VFASPF(VCHI2PDOF) < 16 )" %self.config )
+        
+        Jpsi2DiLambdaLine = StrippingLine( self.name + "Jpsi2DiLambdaLine",
+                                           algos = [ Jpsi2DiLambda ] )
+        
+        self.registerLine(Jpsi2DiLambdaLine)
+
+
+    def makeJpsi2DiXi(self):
+        Jpsi2DiXi = self.createCombinationSel( OutputList = "Jpsi2DiXi" + self.name,
+                                               DecayDescriptor = " J/psi(1S) -> Xi~+  Xi-", 
+                                               DaughterLists = [ self.XiList ], 
+                                               DaughterCuts  = { "Xi-": "(PT>0.5*GeV)" },
+                                               PreVertexCuts = "(in_range( %(CombMinMass)s *MeV, AM, %(CombMaxMass)s *MeV))" % self.config,
+                                               PostVertexCuts = "(in_range( %(MinMass)s *MeV, MM, %(MaxMass)s *MeV)) & (VFASPF(VCHI2PDOF) < 16 )" %self.config )
+        
+        Jpsi2DiXiLine = StrippingLine( self.name + "Jpsi2DiXiLine",
+                                           algos = [ Jpsi2DiXi ] )
+        
+        self.registerLine(Jpsi2DiXiLine)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2KsKpi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2KsKpi.py
new file mode 100644
index 000000000..8d279cec2
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2KsKpi.py
@@ -0,0 +1,152 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for Charmonium->Ks K pi, including three lines
+1. Normal line
+2. Exclusive
+3. Detached
+
+'''
+
+__author__ = ['Valeriia Zhovkovska']
+__date__ = '07/03/2019'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('Ccbar2KsKpiConf', 'default_config')
+
+# If you have several configs in one module your default_config should
+# be a dict of configs with the names of the configs as keys. The configs
+# themselves then shouldn't have a 'NAME' element.
+# M.A. 2017/05/02.
+default_config = {
+    'Ccbar2KsKpi': {
+        'BUILDERTYPE': 'Ccbar2KsKpiConf',
+        'CONFIG': {
+            'LinePrescale':
+            1.,
+            'LinePostscale':
+            1.,
+            'SpdMult':
+            450.,  # dimensionless, Spd Multiplicy cut
+            'KaonCuts':
+            "(PROBNNk > 0.2)  & (PT > 1500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5)",
+            'PionCuts':
+            "(PROBNNpi > 0.2) & (PT > 1500*MeV) & (TRGHOSTPROB<0.4) & (TRCHI2DOF < 5)",
+            'KsCuts':
+            "(ADMASS('KS0') < 30.*MeV) & (BPVDLS>5) & (PT > 1500*MeV) & (MAXTREE('pi-'==ABSID, PROBNNpi) > 0.2) & (MAXTREE('pi-'==ABSID, TRGHOSTPROB) < 0.4) & (MAXTREE('pi-'==ABSID, TRCHI2DOF) < 5) & (MAXTREE('pi-'==ABSID, MIPCHI2DV(PRIMARY)) > 4)",
+            'CombCuts':
+            "in_range(2.7*GeV, AM, 4.4*GeV)",
+            'MomCuts':
+            "in_range(2.7*GeV, MM, 4.4*GeV) & (VFASPF(VCHI2/VDOF) < 9.)",
+            'CCCut':
+            ""
+        },
+        'STREAMS': ['Charm'],
+        'WGs': ['BandQ']
+    }
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class Ccbar2KsKpiConf(LineBuilder):
+
+    __configuration_keys__ = ('LinePrescale', 'LinePostscale', 'SpdMult',
+                              'KaonCuts', 'PionCuts', 'KsCuts', 'CombCuts',
+                              'MomCuts', 'CCCut')
+
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+
+        self.name = name
+
+        from PhysSelPython.Wrappers import MergedSelection
+
+        self.InputKs = MergedSelection(
+            self.name + "InputKs",
+            RequiredSelections=[
+                DataOnDemand(Location="Phys/StdLooseKsDD/Particles"),
+                DataOnDemand(Location="Phys/StdVeryLooseKsLL/Particles")
+            ])
+        #DataOnDemand(Location = "Phys/StdLooseKsLL/Particles")] )
+
+        self.SelKs = self.createSubSel(
+            OutputList=self.name + "SelKs",
+            InputList=self.InputKs,
+            Cuts=config['KsCuts'])
+
+        self.SelKaons = self.createSubSel(
+            OutputList=self.name + "SelKaons",
+            InputList=DataOnDemand(Location='Phys/StdLooseKaons/Particles'),
+            Cuts=config['KaonCuts'])
+
+        self.SelPions = self.createSubSel(
+            OutputList=self.name + "SelPions",
+            InputList=DataOnDemand(
+                Location='Phys/StdAllNoPIDsPions/Particles'),
+            Cuts=config['PionCuts'])
+
+        # Eta_c -> KS0 K Pi
+        self.SelEtac2KsKPi = self.createCombinationSel(
+            OutputList=self.name + "SelEtac2KsKPi",
+            DecayDescriptor="[eta_c(1S) -> KS0 K+ pi-]cc",
+            DaughterLists=[self.SelKs, self.SelKaons, self.SelPions],
+            PreVertexCuts=config['CombCuts'],
+            PostVertexCuts=config['MomCuts'])
+
+        SpdMultForCcbarCut = config['SpdMult']
+
+        self.line = StrippingLine(
+            self.name + "Line",
+            prescale=config['LinePrescale'],
+            postscale=config['LinePostscale'],
+            FILTER={
+                'Code':
+                " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMultForCcbarCut)s )"
+                % locals(),
+                'Preambulo': [
+                    "from LoKiNumbers.decorators import *",
+                    "from LoKiCore.basic import LHCb"
+                ]
+            },
+            checkPV=True,
+            selection=self.SelEtac2KsKPi)
+
+        self.registerLine(self.line)
+
+    def createSubSel(self, OutputList, InputList, Cuts):
+        '''create a selection using a FilterDesktop'''
+        filt = FilterDesktop(Code=Cuts)
+        return Selection(
+            OutputList, Algorithm=filt, RequiredSelections=[InputList])
+
+    def createCombinationSel(self,
+                             OutputList,
+                             DecayDescriptor,
+                             DaughterLists,
+                             DaughterCuts={},
+                             PreVertexCuts="ALL",
+                             PostVertexCuts="ALL",
+                             ReFitPVs=True):
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles(
+            DecayDescriptor=DecayDescriptor,
+            DaughtersCuts=DaughterCuts,
+            MotherCut=PostVertexCuts,
+            CombinationCut=PreVertexCuts,
+            ReFitPVs=False)
+        return Selection(
+            OutputList, Algorithm=combiner, RequiredSelections=DaughterLists)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LambdaLambda.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LambdaLambda.py
new file mode 100644
index 000000000..aa9508cff
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LambdaLambda.py
@@ -0,0 +1,254 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Ccbar->LambdaLambda detached line, with loose PT, PID cuts. 
+********
+Updated for run2 re-stripping
+A new line named 'Jpsi2LooseLambdaLambdaLine' 
+which is made up by Lambda0 anti-Lambda0 from basic StdAllLoose and StdNoPIDsDown pion/proton combination 
+Apply very loose P/PT cuts on proton and pions
+'''
+
+__author__=['Andrii Usachov', 'Jinlin Fu', 'Ziyi Wang']
+__date__ = '20/06/2021'
+__version__ = '$Revision: 0.1 $'
+
+__all__ = (
+    'Ccbar2LambdaLambdaConf'
+           ,'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, picosecond
+
+
+from StandardParticles import StdNoPIDsProtons
+from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdNoPIDsDownProtons
+from StandardParticles import StdAllLoosePions,  StdAllLooseProtons
+
+
+
+default_name='Ccbar2LambdaLambda'
+default_config = {
+    'NAME'        : 'Ccbar2LambdaLambda', 
+    'BUILDERTYPE' : 'Ccbar2LambdaLambdaConf',
+    'CONFIG' : {
+          'TRCHI2DOF'               :     5.
+        , 'TRIPCHI2'                :     4.
+        , 'ProtonProbNNp'           :     0.3
+        , 'ProtonPTSec'             :   250.  # MeV
+        , 'PionProbNNpi'            :     0.1 
+        , 'PionPTSec'               :   250.  # MeV
+        , 'LambdaMassW'             :    30   
+        , 'LambdaVCHI2DOF'          :     9   
+        , 'CombMaxMass'             : 15100.  # MeV, before Vtx fit
+        , 'CombMinMass'             :  2700.  # MeV, before Vtx fit
+        , 'MaxMass'                 : 15000.  # MeV, after Vtx fit
+        , 'MinMass'                 :  2750.  # MeV, after Vtx fit
+        , 'Lambda0_MassWindowLarge' :   180   #MeV
+        , 'Lambda0_APT'             :   700   #MeV
+        , 'Lambda0_ENDVERTEXCHI2'   :    10
+        , 'LambdaBPVDLSMAX'         :    20
+        , 'TRCHI2DOFMax'            :     3.0
+        , 'TrGhostProbMax'          :     0.5
+        , 'MINIPCHI2'               :     4.0
+        , 'PionP'                   :     2.0*GeV
+        , 'PionPT'                  :   100.0*MeV
+        , 'PionPIDK'                :    10.0
+        , 'ProtonP'                 :     2.0*GeV
+        , 'ProtonPT'                :   100.0*MeV
+        , 'Proton_PIDpPIDpi_Min'    :     5.0
+        , 'Proton_PIDpPIDK_Min'     :     0.0
+        , 'Jpsi_ENDVERTEX_Z'        :   200*mm
+        , 'Jpsi_BPVIPCHI2'          :    25.0
+        },
+    'STREAMS' : [ 'Charm'],
+    'WGs'     : [ 'BandQ']
+    }
+
+class Ccbar2LambdaLambdaConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        """
+        Lambda 
+        """
+        self.LambdaLLForJpsi = self.createSubSel( OutputList = "LambdaLLFor" + self.name,
+                InputList =  DataOnDemand( Location = 'Phys/StdLooseLambdaLL/Particles' ), 
+                Cuts = "(VFASPF(VCHI2/VDOF)< %(LambdaVCHI2DOF)s)"\
+                        " & (ADMASS('Lambda0')<%(LambdaMassW)s *MeV)"\
+                        " & (INTREE( ('pi+'==ABSID) & (MIPCHI2DV(PRIMARY) > %(TRIPCHI2)s) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNpi> %(PionProbNNpi)s) & (PT> %(PionPTSec)s*MeV)))"\
+                        " & (INTREE( ('p+'==ABSID)  & (MIPCHI2DV(PRIMARY) > %(TRIPCHI2)s) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNp> %(ProtonProbNNp)s) & (PT> %(ProtonPTSec)s*MeV)))"\
+                        " & (ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > 20*MeV ) "\
+                        " & (BPVDLS>5)" % self.config )
+
+        self.LambdaDDForJpsi = self.createSubSel( OutputList = "LambdaDDFor" + self.name,
+                InputList =  DataOnDemand( Location = 'Phys/StdLooseLambdaDD/Particles' ), 
+                Cuts = "(VFASPF(VCHI2/VDOF)< %(LambdaVCHI2DOF)s)"\
+                        " & (ADMASS('Lambda0')< %(LambdaMassW)s *MeV)"\
+                        " & (INTREE( ('pi+'==ABSID) & (MIPCHI2DV(PRIMARY) > %(TRIPCHI2)s) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNpi> %(PionProbNNpi)s) & (PT> %(PionPTSec)s*MeV)))"\
+                        " & (INTREE( ('p+'==ABSID)  & (MIPCHI2DV(PRIMARY) > %(TRIPCHI2)s) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNp> %(ProtonProbNNp)s) & (PT> %(ProtonPTSec)s*MeV)))"\
+                        " & (ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > 20*MeV )"\
+                        " & (BPVDLS>5)" % self.config )
+
+        self.LambdaLDForJpsi = self.createSubSel( OutputList = "LambdaLDFor" + self.name,
+                InputList =  DataOnDemand( Location = 'Phys/StdLooseLambdaLD/Particles' ),
+                Cuts = "(VFASPF(VCHI2/VDOF)< %(LambdaVCHI2DOF)s)"\
+                        " & (ADMASS('Lambda0')< %(LambdaMassW)s *MeV)"\
+                        " & (INTREE( ('pi+'==ABSID) & (MIPCHI2DV(PRIMARY) > %(TRIPCHI2)s) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNpi> %(PionProbNNpi)s) & (PT> %(PionPTSec)s*MeV)))"\
+                        " & (INTREE( ('p+'==ABSID)  & (MIPCHI2DV(PRIMARY) > %(TRIPCHI2)s) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNp> %(ProtonProbNNp)s) & (PT> %(ProtonPTSec)s*MeV)))"\
+                        " & (ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > 20*MeV )"\
+                        " & (BPVDLS>5)" % self.config )
+
+        """
+        Make basic Lambda from StdAllLoose and StdNoPIDsDown Pion/Proton
+        """ 
+        self.selLongPion = Selection( "SelLongPionfor" + name,
+                Algorithm = self._longpionFilter("LongPionfor"+name),
+                RequiredSelections = [StdAllLoosePions])
+
+        self.selLongProton = Selection( "SelLongProtonfor" + name,
+                Algorithm = self._longprotonFilter("LongProtonfor"+name),
+                RequiredSelections = [StdAllLooseProtons])
+
+        self.selDownPion = Selection( "SelDownPionfor" + name,
+                Algorithm = self._downpionFilter("DownPionfor"+name),
+                RequiredSelections = [StdNoPIDsDownPions])
+
+        self.selDownProton = Selection( "SelDownProtonfor" + name,
+                Algorithm = self._downprotonFilter("DownProtonfor"+name),
+                RequiredSelections = [StdNoPIDsDownProtons])
+
+        self.LooseLambdaLL = self.createCombinationSel( OutputList = "LooseLambdaLL"+ self.name,
+                DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                DaughterLists   = [self.selLongProton, self.selLongPion],
+                PreVertexCuts   = "( (ADAMASS('Lambda0') < %(Lambda0_MassWindowLarge)s *MeV)" \
+                        "& (APT>%(Lambda0_APT)s*MeV) )" % self.config,
+                PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(Lambda0_ENDVERTEXCHI2)s)" \
+                        "& (ADMASS('Lambda0') < %(LambdaMassW)s *MeV)" % self.config )
+
+        self.LooseLambdaDD = self.createCombinationSel( OutputList = "LooseLambdaDD"+ self.name,
+                DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                DaughterLists   = [self.selDownProton, self.selDownPion],
+                PreVertexCuts   = "( (ADAMASS('Lambda0') < %(Lambda0_MassWindowLarge)s *MeV )" \
+                        "& (APT>%(Lambda0_APT)s*MeV) )" % self.config,
+                PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(Lambda0_ENDVERTEXCHI2)s)" \
+                        "& (ADMASS('Lambda0') < %(LambdaMassW)s *MeV)" % self.config )
+
+        """
+        MakeLambdaList
+        """
+        self.LambdaForJpsiList = MergedSelection("MergedLambdaForJpsi" + self.name,
+                                                 RequiredSelections =  [ self.LambdaLLForJpsi,
+                                                                         self.LambdaDDForJpsi, 
+									                                     self.LambdaLDForJpsi ])
+        self.LooseLambdaForJpsiList = MergedSelection("MergedLooseLambdaForJpsi" + self.name,
+                                                 RequiredSelections =  [ self.LooseLambdaLL,
+                                                                         self.LooseLambdaDD])
+
+        self.makeJpsi2LambdaLambda()
+        self.makeJpsi2LooseLambdaLambda()
+
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "AALL",
+                              PostVertexCuts = "ALL",
+                              reFitPVs = True) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = reFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+        
+    def makeJpsi2LambdaLambda(self):
+        Jpsi2LambdaLambda = self.createCombinationSel( OutputList = "Jpsi2LambdaLambda" + self.name,
+                DecayDescriptor = "J/psi(1S) -> Lambda0 Lambda~0",
+                DaughterLists = [ self.LambdaForJpsiList],
+                PreVertexCuts = "(in_range( %(CombMinMass)s *MeV, AM, %(CombMaxMass)s *MeV))" % self.config,
+                PostVertexCuts = "(in_range( %(MinMass)s *MeV, MM, %(MaxMass)s *MeV)) & (VFASPF(VCHI2PDOF) < 9 )" %self.config )
+        Jpsi2LambdaLambdaLine = StrippingLine( self.name + "Jpsi2LambdaLambdaLine",
+                algos = [ Jpsi2LambdaLambda ] )
+        self.registerLine(Jpsi2LambdaLambdaLine)
+
+    def makeJpsi2LooseLambdaLambda(self):
+        Jpsi2LooseLambdaLambda = self.createCombinationSel( OutputList = "Jpsi2LooseLambdaLambda" + self.name,
+                DecayDescriptor = "J/psi(1S) -> Lambda0 Lambda~0",
+                DaughterLists = [ self.LooseLambdaForJpsiList],
+                PreVertexCuts = "(in_range( %(CombMinMass)s *MeV, AM, %(CombMaxMass)s *MeV))" % self.config,
+                PostVertexCuts = "(in_range( %(MinMass)s *MeV, MM, %(MaxMass)s *MeV))"\
+                        "& (VFASPF(VCHI2PDOF) < 9 )"\
+                        "& (BPVIPCHI2() < %(Jpsi_BPVIPCHI2)s)"\
+                        "& (abs(VFASPF(VZ)) < %(Jpsi_ENDVERTEX_Z)s )" %self.config )
+        Jpsi2LooseLambdaLambdaLine = StrippingLine( self.name + "Jpsi2LooseLambdaLambdaLine",
+                algos = [ Jpsi2LooseLambdaLambda ] )
+        self.registerLine(Jpsi2LooseLambdaLambdaLine)
+
+    def _longpionFilter( self , _name):
+        _code = "  (TRCHI2DOF < %(TRCHI2DOFMax)s)"\
+                "& (P>%(PionP)s)"\
+                "& (PT > %(PionPT)s)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)"\
+                "& (PIDK< %(PionPIDK)s)" % self.config
+        _pi = FilterDesktop(Code = _code )
+        return _pi
+
+    def _downpionFilter( self , _name):
+        _code = "  (TRCHI2DOF < %(TRCHI2DOFMax)s)"\
+                "& (P>%(PionP)s)"\
+                "& (PT > %(PionPT)s)"\
+                "& (PIDK< %(PionPIDK)s)" % self.config
+        _pi = FilterDesktop(Code = _code )
+        return _pi
+
+    def _longprotonFilter( self, _name ):
+        _code = "  (TRCHI2DOF < %(TRCHI2DOFMax)s)"\
+                "& (PT > %(ProtonPT)s)"\
+                "& (P>%(ProtonP)s)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)"\
+                "& (HASRICH)&(PIDp-PIDpi>%(Proton_PIDpPIDpi_Min)s)"\
+                "& (HASRICH)&(PIDp-PIDK>%(Proton_PIDpPIDK_Min)s)"% self.config
+        _pr = FilterDesktop(Code = _code)
+        return _pr
+
+    def _downprotonFilter( self, _name ):
+        _code = "  (TRCHI2DOF < %(TRCHI2DOFMax)s)"\
+                "& (PT > %(ProtonPT)s)"\
+                "& (P>%(ProtonP)s)"\
+                "& (HASRICH)&(PIDp-PIDpi>%(Proton_PIDpPIDpi_Min)s)"\
+                "& (HASRICH)&(PIDp-PIDK>%(Proton_PIDpPIDK_Min)s)"% self.config
+        _pr = FilterDesktop(Code = _code)
+        return _pr
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LstLambda.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LstLambda.py
new file mode 100644
index 000000000..b6b87284e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LstLambda.py
@@ -0,0 +1,162 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Ccbar->LstLambda detached line, with loose PT, PID cuts. 
+'''
+
+__author__=['Andrii Usachov']
+__date__ = '23/11/2017'
+
+__all__ = (
+    'Ccbar2LstLambdaConf'
+    )
+
+default_config = {
+    'NAME'        : 'Ccbar2LstLambda', 
+    'BUILDERTYPE' : 'Ccbar2LstLambdaConf',
+    'CONFIG' : {
+        'TRCHI2DOF'        :  5.   ,
+        'KaonProbNNk'      :  0.1  ,
+        'KaonPTSec'        :  100. , # MeV
+        'ProtonProbNNp'    :  0.1  ,
+        'ProtonP'          :  5000 ,
+        'ProtonPTSec'      :  100. , # MeV
+        'PionProbNNpi'     :  0.1  ,
+        'PionPTSec'        :  100. , # MeV
+        'LstVtxChi2'       :  16.  ,
+        'LstMinMass'       :  1400 ,
+        'LstMaxMass'       :  1600 ,
+        'LambdaMassW'      :  30 ,
+        'LambdaVCHI2DOF'   :  16 ,
+        'CombMaxMass'      :  15100., # MeV, before Vtx fit
+        'CombMinMass'      :  2700., # MeV, before Vtx fit
+        'MaxMass'          :  15000., # MeV, after Vtx fit
+        'MinMass'          :  2750. # MeV, after Vtx fit
+        },
+    'STREAMS' : [ 'Charm'],
+    'WGs'     : [ 'BandQ']
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+from StandardParticles import StdNoPIDsProtons, StdNoPIDsKaons
+from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons
+from StandardParticles import StdAllLoosePions, StdAllLooseKaons
+
+
+class Ccbar2LstLambdaConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+        self.DetachedProtonForLst = self.createSubSel( OutputList = "DetachedProtonForLst" + self.name,
+                                              InputList =  DataOnDemand( Location = 'Phys/StdNoPIDsProtons/Particles' ),
+                                              Cuts = "(P>%(ProtonP)s*MeV) & (PT> %(ProtonPTSec)s*MeV) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNp> %(ProtonProbNNp)s)" % self.config
+                                              )
+        self.DetachedKaonForLst = self.createSubSel( OutputList = "DetachedKaonForLst" + self.name,
+                                              InputList =  DataOnDemand( Location = 'Phys/StdNoPIDsKaons/Particles' ),
+                                              Cuts = "(PT> %(KaonPTSec)s*MeV) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNk> %(KaonProbNNk)s)" % self.config
+                                              )
+        
+        self.DetachedLstForJpsiList = self.createCombinationSel( OutputList = "DetachedLstFor" + self.name,
+                                                        DaughterLists = [ self.DetachedProtonForLst, self.DetachedKaonForLst],
+                                                        DecayDescriptor = "[Lambda(1520)0 -> p+ K-]cc",
+                                                        PreVertexCuts = "(in_range( %(LstMinMass)s *MeV, AM, %(LstMaxMass)s *MeV))" % self.config,
+                                                        PostVertexCuts = "(in_range( %(LstMinMass)s *MeV, MM, %(LstMaxMass)s *MeV)) & (VFASPF(VCHI2PDOF)<%(LstVtxChi2)s)" % self.config,
+                                                        reFitPVs = False
+                                                        )
+
+
+        """
+        Lambda 
+        """
+        self.LambdaLLForJpsi = self.createSubSel( OutputList = "LambdaLLFor" + self.name,
+                                                  InputList =  DataOnDemand( Location = 'Phys/StdLooseLambdaLL/Particles' ), 
+                                                  Cuts = "(VFASPF(VCHI2/VDOF)< %(LambdaVCHI2DOF)s)"\
+                                                  " & (ADMASS('Lambda0')<%(LambdaMassW)s *MeV)"\
+                                                  " & (INTREE( ('pi+'==ABSID) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNpi> %(PionProbNNpi)s) & (PT> %(PionPTSec)s*MeV)))"\
+                                                  " & (INTREE( ('p+'==ABSID)  & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNp> %(ProtonProbNNp)s) & (PT> %(ProtonPTSec)s*MeV)))"\
+                                                  " & (ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > 20*MeV ) & (BPVDLS>4)" % self.config )
+        
+        self.LambdaDDForJpsi = self.createSubSel( OutputList = "LambdaDDFor" + self.name,
+                                                  InputList =  DataOnDemand( Location = 'Phys/StdLooseLambdaDD/Particles' ), 
+                                                  Cuts = "(VFASPF(VCHI2/VDOF)< %(LambdaVCHI2DOF)s)"\
+                                                  " & (ADMASS('Lambda0')< %(LambdaMassW)s *MeV)"\
+                                                  " & (INTREE( ('pi+'==ABSID) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNpi> %(PionProbNNpi)s) & (PT> %(PionPTSec)s*MeV)))"\
+                                                  " & (INTREE( ('p+'==ABSID)  & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNp> %(ProtonProbNNp)s) & (PT> %(ProtonPTSec)s*MeV)))"\
+                                                  " & (ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > 20*MeV ) & (BPVDLS>4)" % self.config )
+        
+        self.LambdaLDForJpsi = self.createSubSel( OutputList = "LambdaLDFor" + self.name,
+                                                  InputList =  DataOnDemand( Location = 'Phys/StdLooseLambdaLD/Particles' ),
+                                                  Cuts = "(VFASPF(VCHI2/VDOF)< %(LambdaVCHI2DOF)s)"\
+                                                  " & (ADMASS('Lambda0')< %(LambdaMassW)s *MeV)"\
+                                                  " & (INTREE( ('pi+'==ABSID) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNpi> %(PionProbNNpi)s) & (PT> %(PionPTSec)s*MeV)))"\
+                                                  " & (INTREE( ('p+'==ABSID)  & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNp> %(ProtonProbNNp)s) & (PT> %(ProtonPTSec)s*MeV)))"\
+                                                  " & (ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > 20*MeV ) & (BPVDLS>4)" % self.config )
+
+        self.LambdaForJpsiList = MergedSelection("MergedLambdaForJpsi" + self.name,
+                                                 RequiredSelections =  [ self.LambdaLLForJpsi,
+                                                                         self.LambdaDDForJpsi, 
+									 self.LambdaLDForJpsi
+                                                                       ])
+
+
+        self.makeDetachedJpsi2LstLambda()
+
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "AALL",
+                              PostVertexCuts = "ALL",
+                              reFitPVs = True) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = reFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+        
+    def makeDetachedJpsi2LstLambda(self):
+        DetachedJpsi2LstLambda = self.createCombinationSel( OutputList = "DetachedJpsi2LstLambda" + self.name,
+                                                         DecayDescriptor = " [J/psi(1S) -> Lambda(1520)0 Lambda~0]cc",
+                                                         DaughterLists = [ self.DetachedLstForJpsiList, self.LambdaForJpsiList],
+                                                         PreVertexCuts = "(in_range( %(CombMinMass)s *MeV, AM, %(CombMaxMass)s *MeV))" % self.config,
+                                                         PostVertexCuts = "(in_range( %(MinMass)s *MeV, MM, %(MaxMass)s *MeV)) & (VFASPF(VCHI2PDOF) < 16 ) & (BPVDLS>3)" %self.config )
+                                                        
+        DetachedJpsi2LstLambdaLine = StrippingLine( self.name + "Line",
+                                                 algos = [ DetachedJpsi2LstLambda ] )
+        self.registerLine(DetachedJpsi2LstLambdaLine)
+
+
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LstLst.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LstLst.py
new file mode 100644
index 000000000..2b3c831b0
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2LstLst.py
@@ -0,0 +1,136 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Ccbar->LstLst detached line, with loose PT, PID cuts. 
+'''
+
+__author__=['Andrii Usachov']
+__date__ = '12/01/2017'
+
+__all__ = (
+    'Ccbar2LstLstConf'
+    )
+
+default_config = {
+    'NAME'        : 'Ccbar2LstLst', 
+    'BUILDERTYPE' : 'Ccbar2LstLstConf',
+    'CONFIG' : {
+        'TRCHI2DOF'        :  5.   ,
+        'KaonProbNNk'      :  0.1  ,
+        'KaonPTSec'        :  100. , # MeV
+        'ProtonProbNNp'    :  0.1  ,
+        'ProtonP'          :  5000 ,
+        'ProtonPTSec'      :  100. , # MeV
+        'LstVtxChi2'       :  16.  ,
+        'LstMinMass'       :  1400 ,
+        'LstMaxMass'       :  1600 ,
+        'CombMaxMass'      :  6100., # MeV, before Vtx fit
+        'CombMinMass'      :  2800., # MeV, before Vtx fit
+        'MaxMass'          :  6000., # MeV, after Vtx fit
+        'MinMass'          :  2850. # MeV, after Vtx fit
+        },
+    'STREAMS' : [ 'Charm'],
+    'WGs'     : [ 'BandQ']
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+from StandardParticles import StdNoPIDsProtons, StdNoPIDsKaons
+
+
+class Ccbar2LstLstConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+        TRCHI2DOF       =   config['TRCHI2DOF']
+        KaonProbNNk     =   config['KaonProbNNk']
+        KaonPTSec       =   config['KaonPTSec']
+        ProtonProbNNp   =   config['ProtonProbNNp']
+        ProtonP         =   config['ProtonP']
+        ProtonPTSec     =   config['ProtonPTSec']
+        LstVtxChi2      =   config['LstVtxChi2']
+        LstMinMass      =   config['LstMinMass']
+        LstMaxMass      =   config['LstMaxMass']
+        CombMaxMass     =   config['CombMaxMass']
+        CombMinMass     =   config['CombMinMass']
+        MaxMass         =   config['MaxMass']
+        MinMass         =   config['MinMass']
+
+
+
+        self.DetachedProtonForLst = self.createSubSel( OutputList = "DetachedProtonForLst" + self.name,
+                                              InputList =  DataOnDemand( Location = 'Phys/StdNoPIDsProtons/Particles' ),
+                                              Cuts = "(P>%(ProtonP)s*MeV) & (PT> %(ProtonPTSec)s*MeV) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNp> %(ProtonProbNNp)s)" % self.config
+                                              )
+        self.DetachedKaonForLst = self.createSubSel( OutputList = "DetachedKaonForLst" + self.name,
+                                              InputList =  DataOnDemand( Location = 'Phys/StdNoPIDsKaons/Particles' ),
+                                              Cuts = "(PT> %(KaonPTSec)s*MeV) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PROBNNk> %(KaonProbNNk)s)" % self.config
+                                              )
+        
+        self.DetachedLstForJpsiList = self.createCombinationSel( OutputList = "DetachedLstFor" + self.name,
+                                                        DaughterLists = [ self.DetachedProtonForLst, self.DetachedKaonForLst],
+                                                        DecayDescriptor = "[Lambda(1520)0 -> p+ K-]cc",
+                                                        PreVertexCuts = "(in_range( %(LstMinMass)s *MeV, AM, %(LstMaxMass)s *MeV))" % self.config,
+                                                        PostVertexCuts = "(in_range( %(LstMinMass)s *MeV, MM, %(LstMaxMass)s *MeV)) & (VFASPF(VCHI2PDOF)<%(LstVtxChi2)s)" % self.config,
+                                                        reFitPVs = False
+                                                        )
+        self.makeDetachedJpsi2LstLst()
+
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "AALL",
+                              PostVertexCuts = "ALL",
+                              reFitPVs = True) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = reFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+        
+    def makeDetachedJpsi2LstLst(self):
+        DetachedJpsi2LstLst = self.createCombinationSel( OutputList = "DetachedJpsi2LstLst" + self.name,
+                                                         DecayDescriptor = " J/psi(1S) -> Lambda(1520)0 Lambda(1520)~0",
+                                                         DaughterLists = [ self.DetachedLstForJpsiList ],
+                                                         PreVertexCuts = "(in_range( %(CombMinMass)s *MeV, AM, %(CombMaxMass)s *MeV))" % self.config,
+                                                         PostVertexCuts = "(in_range( %(MinMass)s *MeV, MM, %(MaxMass)s *MeV)) & (VFASPF(VCHI2PDOF) < 16 ) & (BPVDLS>3)" %self.config )
+                                                        
+        DetachedJpsi2LstLstLine = StrippingLine( self.name + "Line",
+                                                 algos = [ DetachedJpsi2LstLst ] )
+        self.registerLine(DetachedJpsi2LstLstLine)
+
+
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PPPiPi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PPPiPi.py
new file mode 100644
index 000000000..1d40caa1a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PPPiPi.py
@@ -0,0 +1,176 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting charmonium -> p pbar pi pi 
+'''
+
+__author__=['Jibo He']
+__date__ = '12/11/2015'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'Ccbar2PPPiPiConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              :  'Ccbar2PPPiPi',
+    'BUILDERTYPE'       :  'Ccbar2PPPiPiConf',
+    'CONFIG'    : {
+        'ProtonCuts'    : "(PROBNNp  > 0.05) & (PT > 400*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY) > 1.)",
+        'PionCuts'      : "(PROBNNpi > 0.2 ) & (PT > 150*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY) > 2.)",
+        'EtacComAMCuts' : "AALL",
+        'EtacComN4Cuts' : """
+                          (AM > 2.7 *GeV)
+                          & ( (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3)+ACHILD(PT,4) ) > 2.5 *GeV)
+                          & ( (ACHILD(MIPCHI2DV(), 1) + ACHILD(MIPCHI2DV(), 2) + ACHILD(MIPCHI2DV(), 3) + ACHILD(MIPCHI2DV(), 4))>30)
+                          """,
+        'EtacMomN4Cuts' : "(VFASPF(VCHI2/VDOF) < 9.) & (MM>2.8 *GeV) & (BPVDLS>5)",
+        'MvaCut'        : "0.19",
+        'XmlFile'       : "$TMVAWEIGHTSROOT/data/Ccbar2PPPiPi_BDT_v1r0.xml",
+        'Prescale'      : 1.
+        },
+    'STREAMS'           : ['Bhadron' ],
+    'WGs'               : ['BandQ'],
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+class Ccbar2PPPiPiConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        self.SelProtons = self.createSubSel( OutputList = self.name + "SelProtons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllLooseANNProtons/Particles' ), 
+                                           Cuts = config['ProtonCuts']
+                                           )
+
+        self.SelPions = self.createSubSel( OutputList = self.name + "SelPions",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllLooseANNPions/Particles' ), 
+                                           Cuts = config['PionCuts']
+                                           )
+
+        """
+        J/psi -> p pbar Pi Pi
+        """
+        self.SelCcbar2PPPiPi = self.createN4BodySel( OutputList = self.name + "SelCcbar2PPPiPi",
+                                                     DaughterLists = [ self.SelProtons, self.SelPions ],
+                                                     DecayDescriptor = "J/psi(1S) -> p+ p~- pi+ pi-",
+                                                     ComAMCuts      = config['EtacComAMCuts'],
+                                                     PreVertexCuts  = config['EtacComN4Cuts'], 
+                                                     PostVertexCuts = config['EtacMomN4Cuts']
+                                                     )
+        
+
+        """
+        BDT based 
+        """
+        self.Ccbar2PPPiPiVars = {
+            "sqrt(ProtonP_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(ProtonM_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(PionP_IPCHI2_OWNPV)"        : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(PionM_IPCHI2_OWNPV)"        : "sqrt(CHILD(MIPCHI2DV(), 4 ))",
+            "ProtonP_ProbNNpi"                : "(CHILD(PROBNNpi, 1))",
+            "ProtonM_ProbNNpi"                : "(CHILD(PROBNNpi, 2))",
+            "ProtonP_ProbNNk"                 : "(CHILD(PROBNNk,  1))",
+            "ProtonM_ProbNNk"                 : "(CHILD(PROBNNk,  2))",
+            "ProtonP_ProbNNp"                 : "(CHILD(PROBNNp,  1))",
+            "ProtonM_ProbNNp"                 : "(CHILD(PROBNNp,  2))",
+            "PionP_ProbNNpi"                  : "(CHILD(PROBNNpi, 3))",
+            "PionM_ProbNNpi"                  : "(CHILD(PROBNNpi, 4))",
+            "PionP_ProbNNk"                   : "(CHILD(PROBNNk,  3))",
+            "PionM_ProbNNk"                   : "(CHILD(PROBNNk,  4))",
+            "sqrt(ProtonP_IPCHI2_OWNPV+ProtonM_IPCHI2_OWNPV+PionP_IPCHI2_OWNPV+PionM_IPCHI2_OWNPV)"  : "sqrt( CHILD(MIPCHI2DV(),1) + CHILD(MIPCHI2DV(),2) + CHILD(MIPCHI2DV(),3) + CHILD(MIPCHI2DV(),4))",
+            "sqrt(Jpsi_IPCHI2_OWNPV)"         : "sqrt(BPVIPCHI2())",
+            "log(ProtonP_PT)"                 : "log(CHILD(PT, 1))",
+            "log(ProtonM_PT)"                 : "log(CHILD(PT, 2))",
+            "log(PionP_PT)"                   : "log(CHILD(PT, 3))",
+            "log(PionM_PT)"                   : "log(CHILD(PT, 4))",
+            "log(Jpsi_PT)"                    : "log(PT)",
+            "Jpsi_ENDVERTEX_CHI2"             : "VFASPF(VCHI2)" 
+        }
+
+        self.MvaCcbar2PPPiPi = self.applyMVA( self.name + "MvaCcbar2PPPiPi",
+                                           SelB        = self.SelCcbar2PPPiPi,
+                                           MVAVars     = self.Ccbar2PPPiPiVars,
+                                           MVACutValue = config['MvaCut'], 
+                                           MVAxmlFile  = config['XmlFile']
+                                           )
+        
+        self.Ccbar2PPPiPiLine = StrippingLine( self.name + 'Line',                                                
+                                               prescale  = config['Prescale'],                                               
+                                               algos     = [ self.MvaCcbar2PPPiPi ],
+                                               MDSTFlag  = False
+                                               )
+        self.registerLine( self.Ccbar2PPPiPiLine )
+        
+
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createN4BodySel( self, OutputList,
+                         DecayDescriptor,
+                         DaughterLists,
+                         DaughterCuts = {} ,
+                         ComAMCuts      = "AALL",
+                         PreVertexCuts  = "AALL",
+                         PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = DaVinci__N4BodyDecays ( DecayDescriptor = DecayDescriptor,      
+                                           DaughtersCuts = DaughterCuts,
+                                           Combination12Cut  = ComAMCuts + "&" + "( ACHI2DOCA(1,2)<20 )",
+                                           Combination123Cut = ComAMCuts + "&" + "( ACHI2DOCA(1,3)<20 ) & ( ACHI2DOCA(2,3)<20 )",
+                                           CombinationCut = "( ACHI2DOCA(1,4)<20 ) & ( ACHI2DOCA(2,4)<20 ) & ( ACHI2DOCA(3,4)<20 )" + " & " + PreVertexCuts,
+                                           MotherCut = PostVertexCuts,
+                                           ReFitPVs = False )
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhi.py
new file mode 100644
index 000000000..d81db2bd7
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhi.py
@@ -0,0 +1,267 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Ccbar->PhiPhi, including two lines:
+1. Prompt line, with tight PT, PID cuts, requiring Hlt Tis, since there is no lifetime unbiased phi trigger yet.
+2. Detached line, with loose PT, PID cuts, but with IPS cuts on Kaons. 
+
+To include it:
+
+from StrippingSelections.StrippingCcbar2PhiPhi import Ccbar2PhiPhiConf
+from StrippingSelections.StrippingCcbar2PhiPhi import config_default as config_Ccbar2PhiPhi
+confCcbar2PhiPhi = Ccbar2PhiPhiConf( name = 'Ccbar2PhiPhi', config = config_Ccbar2PhiPhi )
+stream.appendLines( confCcbar2PhiPhi.lines() )
+'''
+
+__author__=['Jibo He']
+__date__ = '20/01/2012'
+
+__all__ = (
+    'Ccbar2PhiPhiConf'
+    )
+
+default_config = {
+    'NAME'        : 'Ccbar2Phi', 
+    'BUILDERTYPE' : 'Ccbar2PhiPhiConf',
+    'CONFIG' : {
+        'TRCHI2DOF'        :     3.  ,
+        'KaonPIDK'         :     0.  ,
+        'KaonPT'           :   650.  , # MeV
+        'KaonP'            :  3000.  ,
+        'PhiPT'            :   800   ,
+        'PhiVtxChi2'       :    9.   ,
+        'PhiMassW'         :    30.  , 
+        'CombMaxMass'      :  4200.  , # MeV, before Vtx fit
+        'CombMinMass'      :  2700.  , # MeV, before Vtx fit
+        'MaxMass'          :  4150.  , # MeV, after Vtx fit
+        'MinMass'          :  2750.  , # MeV, after Vtx fit
+        'Phi_TisTosSpecs'  : { "Hlt1Global%TIS" : 0 },
+        'PionCuts'         :  "(PT>0.7*GeV) & (TRCHI2DOF<5) & (MIPCHI2DV(PRIMARY)>36.) & (PIDK<10)" ,
+        'KaonCuts'         :  "(PT>0.5*GeV) & (TRCHI2DOF<5) & (MIPCHI2DV(PRIMARY)>25.) & (PIDK>5)",
+        'LooseKaonCuts'    :  "(PT>0.5*GeV) & (TRCHI2DOF<5) & (MIPCHI2DV(PRIMARY)>9.)"
+        },
+    'STREAMS' : [ 'Charm' ] ,
+    'WGs'     : [ 'BandQ' ]
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdNoPIDsProtons, StdNoPIDsPions, StdNoPIDsDownPions
+
+class Ccbar2PhiPhiConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        """
+        Unbiased, require Hlt Tis 
+        """
+        self.PhiForJpsiList = self.createSubSel( OutputList = "PhiFor" + self.name,
+                                                 InputList =  DataOnDemand( Location = 'Phys/StdTightPhi2KK/Particles' ), 
+                                                 Cuts = "(VFASPF(VCHI2/VDOF)<%(PhiVtxChi2)s) & (PT> %(PhiPT)s*MeV)"\
+                                                 " & (ADMASS('phi(1020)')<%(PhiMassW)s*MeV)"\
+                                                 " & (INTREE( ('K+'==ID) & (PT> %(KaonPT)s*MeV) & (P> %(KaonP)s*MeV) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PIDK> %(KaonPIDK)s) ))"\
+                                                 " & (INTREE( ('K-'==ID) & (PT> %(KaonPT)s*MeV) & (P> %(KaonP)s*MeV) & (TRCHI2DOF < %(TRCHI2DOF)s) & (PIDK> %(KaonPIDK)s) ))" % self.config )
+
+        #self.TisPhiForJpsiList = self.filterTisTos( "TisPhiFor" + self.name ,
+        #                                            PhiInput = self.PhiForJpsiList,
+        #                                            myTisTosSpecs = config['Phi_TisTosSpecs']
+        #                                            )        
+        
+        
+        """
+        Detached 
+        """
+        self.DetachedPhiForJpsiList = self.createSubSel( OutputList = "DetachedPhiFor" + self.name,
+                                                         InputList =  DataOnDemand( Location = 'Phys/StdLooseDetachedPhi2KK/Particles' ), 
+                                                         Cuts = "(VFASPF(VCHI2/VDOF)<%(PhiVtxChi2)s)"\
+                                                         " & (ADMASS('phi(1020)')<%(PhiMassW)s*MeV )"\
+                                                         " & (MAXTREE('K+'==ABSID, TRCHI2DOF) < %(TRCHI2DOF)s )" \
+                                                         " & (MINTREE('K+'==ABSID, PIDK)>0)" % self.config)
+
+        """
+        Pion 
+        """
+        self.PionForCcbar = self.createSubSel( OutputList = "PionFor" + self.name,
+                                               InputList =  DataOnDemand( Location = 'Phys/StdLoosePions/Particles' ), 
+                                               Cuts = config['PionCuts'] 
+                                               )
+
+        """
+        Kaon
+        """
+        self.KaonForCcbar = self.createSubSel( OutputList = "KaonFor" + self.name,
+                                               InputList =  DataOnDemand( Location = 'Phys/StdLooseKaons/Particles' ), 
+                                               Cuts = config['KaonCuts'] 
+                                               )
+
+        """
+        Loose Kaon
+        """
+        self.LooseKaonForCcbar = self.createSubSel( OutputList = "LooseKaonFor" + self.name,
+                                                    InputList =  DataOnDemand( Location = 'Phys/StdLooseKaons/Particles' ),
+                                                    Cuts = config['LooseKaonCuts'] 
+                                                    )        
+                                                 
+
+
+
+        self.makeJpsi2PhiPhi()
+        self.makeDetachedJpsi2PhiKK()
+        self.makeDetachedJpsi2PhiPiPi()
+        self.makeBs2TriPhi()
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "AALL",
+                              PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = True)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+    
+    
+    
+    def makeJpsi2PhiPhi(self):
+        Jpsi2PhiPhi = self.createCombinationSel( OutputList = "Jpsi2PhiPhi" + self.name,
+                                                 DecayDescriptor = " J/psi(1S) -> phi(1020) phi(1020)", 
+                                                 DaughterLists = [ self.PhiForJpsiList ], 
+                                                 PreVertexCuts = "(in_range( %(CombMinMass)s *MeV, AM, %(CombMaxMass)s *MeV))" % self.config,
+                                                 PostVertexCuts = "(in_range( %(MinMass)s *MeV, MM, %(MaxMass)s *MeV)) & (VFASPF(VCHI2PDOF) < 9 )" %self.config )
+        
+        Jpsi2PhiPhiLine = StrippingLine( self.name + "PhiLine",
+                                         algos = [ Jpsi2PhiPhi ] )
+        
+        self.registerLine(Jpsi2PhiPhiLine)
+        
+
+    def makeDetachedJpsi2PhiKK(self):
+        DetachedJpsi2PhiKK = self.createCombinationSel( OutputList = "DetachedJpsi2PhiKK" + self.name,
+                                                        DecayDescriptor = " J/psi(1S) -> phi(1020) K+ K-", 
+                                                        DaughterLists = [ self.DetachedPhiForJpsiList,
+                                                                          self.KaonForCcbar
+                                                                          ], 
+                                                        DaughterCuts  = { "phi(1020)": """
+                                                                            (INTREE( (ID=='K+') & (PT>500*MeV) & (TRCHI2DOF<5) & (MIPCHI2DV(PRIMARY)>25.) & (PIDK>5)))
+                                                                          & (INTREE( (ID=='K-') & (PT>500*MeV) & (TRCHI2DOF<5) & (MIPCHI2DV(PRIMARY)>25.) & (PIDK>5)))
+                                                                          """ },
+                                                        PreVertexCuts = "AM>2.65*GeV",
+                                                        PostVertexCuts = "(MM>2.7*GeV) & (VFASPF(VCHI2PDOF)<16) & (BPVDLS>10)" %self.config )
+        
+        DetachedJpsi2PhiKKLine = StrippingLine( self.name + "KKDetachedLine",
+                                                 algos = [ DetachedJpsi2PhiKK ] )
+        
+        self.registerLine(DetachedJpsi2PhiKKLine)
+
+        """
+        Bs->Jpsi Phi
+        """
+        Bs2JpsiPhi = self.createCombinationSel( OutputList = "Bs2JpsiPhi" + self.name,
+                                                DecayDescriptor = " B_s0 -> J/psi(1S) phi(1020)", 
+                                                DaughterLists = [ DetachedJpsi2PhiKK, 
+                                                                  self.DetachedPhiForJpsiList ], 
+                                                PostVertexCuts = "(VFASPF(VCHI2PDOF)<16)" %self.config )
+
+        Bs2JpsiPhiLine = StrippingLine( self.name + "Bs2JpsiPhiLine",
+                                        algos = [ Bs2JpsiPhi ] )
+        
+        self.registerLine( Bs2JpsiPhiLine )
+
+        """
+        B2JpsiK
+        """
+        B2JpsiK = self.createCombinationSel( OutputList = "B2JpsiK" + self.name,
+                                             DecayDescriptor = " [ B+ -> J/psi(1S) K+ ]cc", 
+                                             DaughterLists = [ DetachedJpsi2PhiKK, 
+                                                               self.LooseKaonForCcbar ], 
+                                             PostVertexCuts = "(VFASPF(VCHI2PDOF)<16)" %self.config )
+
+        B2JpsiKLine = StrippingLine( self.name + "B2JpsiKLine",
+                                        algos = [ B2JpsiK ] )
+        
+        self.registerLine( B2JpsiKLine )        
+        
+
+
+    def makeDetachedJpsi2PhiPiPi(self):
+        DetachedJpsi2PhiPiPi = self.createCombinationSel( OutputList = "DetachedJpsi2PhiPiPi" + self.name,
+                                                          DecayDescriptor = " J/psi(1S) -> phi(1020) pi+ pi-", 
+                                                          DaughterLists = [ self.DetachedPhiForJpsiList,
+                                                                            self.PionForCcbar
+                                                                            ], 
+                                                          DaughterCuts  = { "phi(1020)": """                                                                          
+                                                                            (INTREE( (ID=='K+') & (PT>500*MeV) & (TRCHI2DOF<5) & (MIPCHI2DV(PRIMARY)>25.) & (PIDK>5)))
+                                                                          & (INTREE( (ID=='K-') & (PT>500*MeV) & (TRCHI2DOF<5) & (MIPCHI2DV(PRIMARY)>25.) & (PIDK>5)))
+                                                                          """},
+                                                          PreVertexCuts = "AM>2.65*GeV",
+                                                          PostVertexCuts = "(MM>2.7*GeV) & (VFASPF(VCHI2PDOF)<16) & (BPVDLS>10)" %self.config )
+        
+        DetachedJpsi2PhiPiPiLine = StrippingLine( self.name + "PiPiDetachedLine",
+                                                  algos = [ DetachedJpsi2PhiPiPi ] )
+        
+        self.registerLine(DetachedJpsi2PhiPiPiLine)     
+
+        
+    def makeBs2TriPhi(self):
+        Bs2TriPhi = self.createCombinationSel( OutputList = "Bs2TriPhi" + self.name,
+                                               DecayDescriptor = " B_s0 -> phi(1020) phi(1020) phi(1020)", 
+                                               DaughterLists = [ self.DetachedPhiForJpsiList ], 
+                                               PreVertexCuts = "AM>2.65*GeV",
+                                               PostVertexCuts = "(MM>2.7*GeV) & (VFASPF(VCHI2PDOF)<16)" %self.config )
+        
+        Bs2TriPhiLine = StrippingLine( self.name + "Bs2TriPhiLine",
+                                       algos = [ Bs2TriPhi ] )
+        
+        self.registerLine( Bs2TriPhiLine )        
+
+
+    def filterTisTos(self, name,
+                     PhiInput,
+                     myTisTosSpecs ) :
+        from Configurables import TisTosParticleTagger
+        
+        myTagger = TisTosParticleTagger(name + "_TisTosTagger")
+        myTagger.TisTosSpecs = myTisTosSpecs
+        
+        # To speed it up, TisTos only with tracking system)
+        myTagger.ProjectTracksToCalo = False
+        myTagger.CaloClustForCharged = False
+        myTagger.CaloClustForNeutral = False
+        myTagger.TOSFrac = { 4:0.0, 5:0.0 }
+        
+        return Selection(name + "_SelTisTos",
+                         Algorithm = myTagger,
+                         RequiredSelections = [ PhiInput ] )
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhiDetached.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhiDetached.py
new file mode 100644
index 000000000..a7b1b24bf
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhiDetached.py
@@ -0,0 +1,133 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Ccbar->PhiPhi, including one line:
+DiPhi Detached line, with loose PT, PID cuts, but with IPS cuts on Kaons. 
+Inherited from StrippingCcbar2PhiPhi.py; moved To FullDST
+
+'''
+
+__author__=['Jibo He, Liupan An']
+__date__ = '11/01/2017'
+
+__all__ = (
+    'Ccbar2PhiPhiDetachedConf'
+    )
+
+default_config = {
+    'NAME'        : 'Ccbar2PhiDetached', 
+    'BUILDERTYPE' : 'Ccbar2PhiPhiDetachedConf',
+    'CONFIG' : {
+        'TRCHI2DOF'        :     5.  ,
+        'KaonPIDK'         :     5.  ,
+        'KaonPT'           :   650.  , # MeV
+        'PhiVtxChi2'       :    16.  ,
+        'PhiMassW'         :    12.  , 
+        'CombMaxMass'      :  4100.  , # MeV, before Vtx fit
+        'CombMinMass'      :  2750.  , # MeV, before Vtx fit
+        'MaxMass'          :  4000.  , # MeV, after Vtx fit
+        'MinMass'          :  2800.  , # MeV, after Vtx fit
+        'Phi_TisTosSpecs'  : { "Hlt1Global%TIS" : 0 },
+        'PionCuts'         :  "(PT>0.7*GeV) & (TRCHI2DOF<5) & (MIPCHI2DV(PRIMARY)>36.) & (PIDK<10)" ,
+        'KaonCuts'         :  "(PT>0.5*GeV) & (TRCHI2DOF<5) & (MIPCHI2DV(PRIMARY)>25.) & (PIDK>5)",
+        'LooseKaonCuts'    :  "(PT>0.5*GeV) & (TRCHI2DOF<5) & (MIPCHI2DV(PRIMARY)>9.)"
+        },
+    'STREAMS' : [ 'CharmCompleteEvent' ] ,
+    'WGs'     : [ 'BandQ' ]
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdNoPIDsProtons, StdNoPIDsPions, StdNoPIDsDownPions
+
+class Ccbar2PhiPhiDetachedConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+        
+        """
+        Detached 
+        """
+        self.DetachedPhiForJpsiList = self.createSubSel( OutputList = "DetachedPhiFor" + self.name,
+                                                         InputList =  DataOnDemand( Location = 'Phys/StdLooseDetachedPhi2KK/Particles' ), 
+                                                         Cuts = "(VFASPF(VCHI2/VDOF)<%(PhiVtxChi2)s)"\
+                                                         " & (ADMASS('phi(1020)')<%(PhiMassW)s*MeV )"\
+                                                         " & (MAXTREE('K+'==ABSID, TRCHI2DOF) < %(TRCHI2DOF)s )" \
+                                                         " & (MINTREE('K+'==ABSID, PIDK)>0)" % self.config)
+
+
+        self.makeDetachedJpsi2PhiPhi()
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "AALL",
+                              PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = True)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+    
+    
+    
+    def makeDetachedJpsi2PhiPhi(self):
+        DetachedJpsi2PhiPhi = self.createCombinationSel( OutputList = "DetachedJpsi2PhiPhi" + self.name,
+                                                         DecayDescriptor = " J/psi(1S) -> phi(1020) phi(1020)", 
+                                                         DaughterLists = [ self.DetachedPhiForJpsiList ],                                                          
+                                                         PreVertexCuts = "AM>2.65*GeV",
+                                                         PostVertexCuts = "(MM>2.7*GeV) & (VFASPF(VCHI2PDOF)<16) & (BPVDLS>10)" %self.config )
+        
+        DetachedJpsi2PhiPhiLine = StrippingLine( "Ccbar2PhiPhiDetachedLine",
+                                                 algos = [ DetachedJpsi2PhiPhi ] )
+        
+        self.registerLine(DetachedJpsi2PhiPhiLine)
+
+    def filterTisTos(self, name,
+                     PhiInput,
+                     myTisTosSpecs ) :
+        from Configurables import TisTosParticleTagger
+        
+        myTagger = TisTosParticleTagger(name + "_TisTosTagger")
+        myTagger.TisTosSpecs = myTisTosSpecs
+        
+        # To speed it up, TisTos only with tracking system)
+        myTagger.ProjectTracksToCalo = False
+        myTagger.CaloClustForCharged = False
+        myTagger.CaloClustForNeutral = False
+        myTagger.TOSFrac = { 4:0.0, 5:0.0 }
+        
+        return Selection(name + "_SelTisTos",
+                         Algorithm = myTagger,
+                         RequiredSelections = [ PhiInput ] )
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhiPiPi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhiPiPi.py
new file mode 100644
index 000000000..472284c35
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PhiPhiPiPi.py
@@ -0,0 +1,130 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting charmonium -> phi phi pi pi 
+'''
+
+__author__=['Andrii Usachov']
+__date__ = '10/04/2017'
+__version__= '$Revision: 1.1 $'
+
+
+
+__all__ = (
+    'Ccbar2PhiPhiPiPiConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              :  'Ccbar2PhiPhiPiPi',
+    'BUILDERTYPE'       :  'Ccbar2PhiPhiPiPiConf',
+    'CONFIG'    : {
+        'PionCuts'      : "(PROBNNpi > 0.1) & (PT > 100*MeV) & (MIPCHI2DV(PRIMARY)>4.)",
+        'EtacComN4Cuts' : """
+                          (AM > 2.7 *GeV)
+                          """,  
+        'EtacMomN4Cuts' : "(VFASPF(VCHI2/VDOF) < 16.) & (MM>2.7*GeV) & (BPVDLS>3)",
+        'Prescale'         :     1.,     
+        'TRCHI2DOF'        :     5.,
+        'KaonProbNNk'      :    0.1,
+        'PhiMassW'         :    30.,
+        'PhiVtxChi2'       :    25.,
+        'KaonPT'           :    100,
+        'KaonIPCHI2'       :      4.
+        },
+    'STREAMS'           : ['Charm' ],
+    'WGs'               : ['BandQ'],
+    }
+
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+class Ccbar2PhiPhiPiPiConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+        PhiVtxChi2 =config['PhiVtxChi2']
+        PhiMassW   =config['PhiMassW']
+        KaonPT     =config['KaonPT']
+        TRCHI2DOF  =config['TRCHI2DOF']
+        KaonProbNNk=config['KaonProbNNk']
+        KaonIPCHI2 =config['KaonIPCHI2'] 
+
+        self.SelPions = self.createSubSel( OutputList = self.name + "SelPions",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLoosePions/Particles' ), 
+                                           Cuts = config['PionCuts']
+                                           )
+
+
+        self.PhiForJpsiList = self.createSubSel( OutputList = "PhiFor" + self.name,
+                                                 InputList =  DataOnDemand( Location = 'Phys/StdLooseDetachedPhi2KK/Particles' ), 
+                                                 Cuts = "(VFASPF(VCHI2/VDOF)<%(PhiVtxChi2)s)"\
+                                                         " & (ADMASS('phi(1020)')<%(PhiMassW)s*MeV )"\
+                                                         " & (MAXTREE('K+'==ABSID, TRCHI2DOF) < %(TRCHI2DOF)s )" \
+                                                         " & (MINTREE('K+'==ABSID, PROBNNk) > %(KaonProbNNk)s )"\
+                                                         " & (MINTREE('K+'==ABSID, MIPCHI2DV(PRIMARY)) > %(KaonIPCHI2)s )"\
+                                                         % self.config)
+
+
+        """
+        J/psi -> Phi Phi Pi Pi
+        """
+        self.SelCcbar2PhiPhiPiPi = self.createN4BodySel( OutputList = self.name + "SelCcbar2PhiPhiPiPi",
+                                                     DaughterLists = [ self.PhiForJpsiList, self.SelPions ],
+                                                     DecayDescriptor = "J/psi(1S) -> phi(1020) phi(1020) pi+ pi-",
+                                                     PreVertexCuts  = config['EtacComN4Cuts'], 
+                                                     PostVertexCuts = config['EtacMomN4Cuts']
+                                                     )
+        
+        self.Ccbar2PhiPhiPiPiLine = StrippingLine( self.name + 'Line',                                                
+                                               prescale  = config['Prescale'],
+                                               algos     = [ self.SelCcbar2PhiPhiPiPi ],
+                                               MDSTFlag  = False
+                                               )
+        self.registerLine( self.Ccbar2PhiPhiPiPiLine )
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createN4BodySel( self, OutputList,
+                         DecayDescriptor,
+                         DaughterLists,
+                         DaughterCuts = {} ,
+                         ComAMCuts      = "AALL",
+                         PreVertexCuts  = "AALL",
+                         PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = DaVinci__N4BodyDecays ( DecayDescriptor = DecayDescriptor,      
+                                           DaughtersCuts = DaughterCuts,
+                                           Combination12Cut  = ComAMCuts + "&" + "( ACHI2DOCA(1,2)<20 )",
+                                           Combination123Cut = ComAMCuts + "&" + "( ACHI2DOCA(1,3)<20 ) & ( ACHI2DOCA(2,3)<20 )",
+                                           CombinationCut = "( ACHI2DOCA(1,4)<20 ) & ( ACHI2DOCA(2,4)<20 ) & ( ACHI2DOCA(3,4)<20 )" + " & " + PreVertexCuts,
+                                           MotherCut = PostVertexCuts,
+                                           ReFitPVs = False )
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PpbarNew.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PpbarNew.py
new file mode 100644
index 000000000..0ca9c1ea5
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCcbar2PpbarNew.py
@@ -0,0 +1,210 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for Charmonium->p pbar, including three lines
+1. Normal line
+2. Exclusive
+3. Detached
+
+'''
+
+__author__ = ['Jibo He']
+__date__ = '03/10/2010'
+__version__ = '$Revision: 1.2 $'
+
+__all__ = ('Ccbar2PpbarConf', 'makePP')
+
+# If you have several configs in one module your default_config should
+# be a dict of configs with the names of the configs as keys. The configs
+# themselves then shouldn't have a 'NAME' element.
+# M.A. 2017/05/02.
+default_config = {
+    # is moving to Turbo
+    'Ccbar2Ppbar': {
+        'BUILDERTYPE': 'Ccbar2PpbarConf',
+        'CONFIG': {
+            'LinePrescale': 1.,
+            'LinePostscale': 1.,
+            'SpdMult': 300.,  # dimensionless, Spd Multiplicy cut
+            'ProtonPT': 1950.,  # MeV
+            'ProtonP': 10.,  # GeV
+            'ProtonTRCHI2DOF': 4.,
+            'ProtonPIDppi': 20.,  # CombDLL(p-pi)
+            'ProtonPIDpK': 15.,  # CombDLL(p-K)
+            'ProtonIPCHI2Cut': "",
+            'CombMaxMass': 4100.,  # MeV, before Vtx fit
+            'CombMinMass': 2750.,  # MeV, before Vtx fit
+            'MaxMass': 4000.,  # MeV, after Vtx fit
+            'MinMass': 2800.,  # MeV, after Vtx fit
+            'VtxCHI2': 9.,  # dimensionless
+            'CCCut': " & (PT>6*GeV)"
+        },
+        'STREAMS': ['Charm'],
+        'WGs': ['BandQ']
+    },
+    'Ccbar2PpbarExclusive': {
+        'BUILDERTYPE': 'Ccbar2PpbarConf',
+        'CONFIG': {
+            'LinePrescale': 1.,
+            'LinePostscale': 1.,
+            'SpdMult': 20.,  # dimensionless, Spd Multiplicy cut
+            'ProtonPT': 550.,  # MeV
+            'ProtonP': -2.,  # MeV
+            'ProtonTRCHI2DOF': 5.,
+            'ProtonPIDppi': 20.,  # CombDLL(p-pi)
+            'ProtonPIDpK': 15.,  # CombDLL(p-K)
+            'ProtonIPCHI2Cut': "",
+            'CombMaxMass': 1.0e+6,  # MeV, before Vtx fit
+            'CombMinMass': 0.,  # MeV, before Vtx fit
+            'MaxMass': 1.0e+6,  # MeV, after Vtx fit
+            'MinMass': 0.,  # MeV, after Vtx fit
+            'VtxCHI2': 9.,  # dimensionless
+            'CCCut': ""
+        },
+        'STREAMS': ['Charm'],
+        'WGs': ['BandQ']
+    },
+    'Ccbar2PpbarDetached': {
+        'BUILDERTYPE': 'Ccbar2PpbarConf',
+        'CONFIG': {
+            'LinePrescale': 1.,
+            'LinePostscale': 1.,
+            'SpdMult': 600.,  # dimensionless, Spd Multiplicy cut
+            'ProtonPT': 1000.,  # MeV
+            'ProtonP': -2.,  # MeV
+            'ProtonTRCHI2DOF': 5.,
+            'ProtonPIDppi': 15.,  # CombDLL(p-pi)
+            'ProtonPIDpK': 10.,  # CombDLL(p-K)
+            'ProtonIPCHI2Cut': " & (BPVIPCHI2()>9)",
+            'CombMaxMass': 1.0e+6,  # MeV, before Vtx fit
+            'CombMinMass': 2650.,  # MeV, before Vtx fit
+            'MaxMass': 1.0e+6,  # MeV, after Vtx fit
+            'MinMass': 2700.,  # MeV, after Vtx fit
+            'VtxCHI2': 9.,  # dimensionless
+            'CCCut': " & (BPVDLS>5)"
+        },
+        'STREAMS': ['CharmCompleteEvent'],
+        'WGs': ['BandQ']
+    },
+    'Ccbar2PpbarFromB': {  # this will be used for the proton asymmetry
+        'BUILDERTYPE': 'Ccbar2PpbarConf',
+        'CONFIG': {
+            'LinePrescale': 1.,
+            'LinePostscale': 1.,
+            'SpdMult': 750.,  # dimensionless, Spd Multiplicy cut
+            'ProtonPT': 500.,  # MeV
+            'ProtonP': 7.5,  # GeV
+            'ProtonTRCHI2DOF': 5.,  # no cut
+            'ProtonPIDppi': 5.,  # CombDLL(p-pi)
+            'ProtonPIDpK': 5.,  # CombDLL(p-K)
+            'ProtonIPCHI2Cut': " & (BPVIPCHI2()>9)",
+            'CombMaxMass': 3600,  # MeV, before Vtx fit
+            'CombMinMass': 2650.,  # MeV, before Vtx fit
+            'MaxMass': 3400,  # MeV, after Vtx fit
+            'MinMass': 2700.,  # MeV, after Vtx fit
+            'VtxCHI2': 9.,  # dimensionless
+            'CCCut': " & (BPVDLS>5) & (BPVCORRM>4000) & (BPVCORRM<5700)"
+        },
+        'STREAMS': ['CharmCompleteEvent'],
+        'WGs': ['Calib']
+    }
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class Ccbar2PpbarConf(LineBuilder):
+
+    __configuration_keys__ = ('LinePrescale', 'LinePostscale', 'SpdMult',
+                              'ProtonPT', 'ProtonP', 'ProtonTRCHI2DOF',
+                              'ProtonPIDppi', 'ProtonPIDpK', 'ProtonIPCHI2Cut',
+                              'CombMaxMass', 'CombMinMass', 'MaxMass',
+                              'MinMass', 'VtxCHI2', 'CCCut')
+
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+
+        self.name = name
+        self.SelPP = makePP(
+            'eeFor' + self.name,
+            #
+            ProtonPT=config['ProtonPT'],
+            ProtonP=config['ProtonP'],
+            ProtonTRCHI2DOF=config['ProtonTRCHI2DOF'],
+            ProtonPIDppi=config['ProtonPIDppi'],
+            ProtonPIDpK=config['ProtonPIDpK'],
+            ProtonIPCHI2Cut=config['ProtonIPCHI2Cut'],
+            CombMinMass=config['CombMinMass'],
+            CombMaxMass=config['CombMaxMass'],
+            VtxCHI2=config['VtxCHI2'],
+            MinMass=config['MinMass'],
+            MaxMass=config['MaxMass'],
+            CCCut=config['CCCut'])
+
+        SpdMultForCcbarCut = config['SpdMult']
+
+        self.line = StrippingLine(
+            self.name + "Line",
+            prescale=config['LinePrescale'],
+            postscale=config['LinePostscale'],
+            FILTER={
+                'Code':
+                " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMultForCcbarCut)s )"
+                % locals(),
+                'Preambulo': [
+                    "from LoKiNumbers.decorators import *",
+                    "from LoKiCore.basic import LHCb"
+                ]
+            },
+            checkPV=False,
+            selection=self.SelPP)
+
+        self.registerLine(self.line)
+
+
+def makePP(
+        name,
+        #
+        ProtonPT,
+        ProtonP,
+        ProtonTRCHI2DOF,
+        ProtonPIDppi,
+        ProtonPIDpK,
+        ProtonIPCHI2Cut,
+        CombMinMass,
+        CombMaxMass,
+        VtxCHI2,
+        MinMass,
+        MaxMass,
+        CCCut):
+
+    from StandardParticles import StdTightProtons as ProtonsForCcbar2Ppbar
+
+    ProtonCut = "(PT > %(ProtonPT)s *MeV) & (P > %(ProtonP)s *GeV) & (TRCHI2DOF < %(ProtonTRCHI2DOF)s) & ((PIDp-PIDpi) > %(ProtonPIDppi)s) & ((PIDp-PIDK) > %(ProtonPIDpK)s)" % locals(
+    )
+    CombCut = "(in_range( %(CombMinMass)s *MeV, AM, %(CombMaxMass)s *MeV))" % locals(
+    )
+    MomCut = "(VFASPF(VCHI2)< %(VtxCHI2)s) & (in_range( %(MinMass)s *MeV, MM, %(MaxMass)s *MeV))" % locals(
+    )
+
+    _PP = CombineParticles(
+        DecayDescriptor="J/psi(1S) -> p+ p~-",
+        DaughtersCuts={"p+": ProtonCut + ProtonIPCHI2Cut},
+        CombinationCut=CombCut,
+        MotherCut=MomCut + CCCut)
+
+    return Selection(
+        name, Algorithm=_PP, RequiredSelections=[ProtonsForCcbar2Ppbar])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCharmAssociative.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCharmAssociative.py
new file mode 100644
index 000000000..c4b00286a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingCharmAssociative.py
@@ -0,0 +1,645 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# $Id: StrippingCharmAssociative.py 176885 2014-08-26 14:00:22Z ibelyaev $
+# =============================================================================
+## @file
+# 
+#  The attempt for stripping of associative ``onium'' production
+#
+#    - dimuon + dimuon 
+#    - dimuon + high-pt gamma
+#
+#   Parasitic:
+#
+#    - dimuon + ( dimuon + gamma ) [ mimic   Chi_(b,c) + dimuon  ] 
+#    -       2x ( dimuon + gamma ) [ mimic 2xChi_(b,c)           ] 
+#
+#   Accociative W+ production:
+#    - dimuon             & W+  
+#    - ( dimuon + gamma ) & W+      [ mimic Chi_(b,c)] 
+#
+#
+# +-------------------------------------+--------+------+-------+
+# | StrippingReport   INFO Event 276300, Good event 276300      |
+# +-------------------------------------+--------+------+-------+
+# |    Decision name                    | Rate,% | Acc. | ms/evt|
+# +-------------------------------------+--------+------+-------+
+# |                     double charm                            |
+# +-------------------------------------+--------+------+-------+
+# | <>DiMuonAndGammaForCharmAssociative | 0.0467 | 129  | 0.668 |
+# | <>DoubleDiMuonForCharmAssociative   | 0.0405 | 112  | 0.037 |
+# | <>ChiAndDiMuonForCharmAssociative   | 0.0405 | 112  | 0.037 |
+# | <>DiChiForCharmAssociative          | 0.0405 | 112  | 0.037 |
+# +-------------------------------------+--------+------+-------+
+# |                     charm & W+                              |
+# +-------------------------------------+--------+------+-------+
+# | <>DiMuonAndWForCharmAssociative     | 0.0076 |  21  | 0.060 |
+# | <>ChiAndWForCharmAssociative        | 0.0054 |  15  | 0.033 |
+# +-------------------------------------+--------+------+-------+
+#
+# @author Vanya BELYAEV Ivan.Belyaev@cern.ch
+# @date   2011-05-26
+# 
+#                   $Revision: 176885 $
+# Last modification $Date: 2013-01-05 21:21:10 +0100
+#                by $Author: ibelyaev $
+# =============================================================================
+"""The attempt for stripping of associative ``onium'' production
+ 
+     - dimuon + dimuon 
+     - dimuon + high-pt gamma
+ 
+    Parasitic:
+ 
+     - dimuon + ( dimuon + gamma ) [ mimic   Chi_(b,c) + dimuon  ] 
+     -       2x ( dimuon + gamma ) [ mimic 2xChi_(b,c)           ] 
+ 
+    Accociative W+ production:
+     - dimuon             & W+  
+     - ( dimuon + gamma ) & W+      [ mimic Chi_(b,c)] 
+ 
+ 
+  +-------------------------------------+--------+------+-------+
+  | StrippingReport   INFO Event 276300, Good event 276300      |
+  +-------------------------------------+--------+------+-------+
+  |    Decision name                    | Rate,% | Acc. | ms/evt|
+  +-------------------------------------+--------+------+-------+
+  |                     double charm                            |
+  +-------------------------------------+--------+------+-------+
+  | <>DiMuonAndGammaForCharmAssociative | 0.0467 | 129  | 0.668 |
+  | <>DoubleDiMuonForCharmAssociative   | 0.0405 | 112  | 0.037 |
+  | <>ChiAndDiMuonForCharmAssociative   | 0.0405 | 112  | 0.037 |
+  | <>DiChiForCharmAssociative          | 0.0405 | 112  | 0.037 |
+  +-------------------------------------+--------+------+-------+
+  |                     charm & W+                              |
+  +-------------------------------------+--------+------+-------+
+  | <>DiMuonAndWForCharmAssociative     | 0.0076 |  21  | 0.060 |
+  | <>ChiAndWForCharmAssociative        | 0.0054 |  15  | 0.033 |
+  +-------------------------------------+--------+------+-------+
+
+"""
+# =============================================================================
+__author__  = 'Vanya BELYAEV Ivan.Belyaev@itep.ru'
+__date__    = '2011-05-26'
+__version__ = '$Revision: 176885 $'
+# =============================================================================
+__all__ = (
+    'StrippingCharmAssociativeConf',
+    'default_config'
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from GaudiKernel.SystemOfUnits             import GeV, MeV, mm
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import   Selection
+#
+# Attention: we need prompt onia, thus "All" Loose muons here 
+from StandardParticles      import ( StdAllLooseMuons   , ## PROMPT muons!
+                                     StdLooseAllPhotons ) 
+#
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder
+# =============================================================================
+## logging 
+# =============================================================================
+import logging
+logger = logging.getLogger(__name__)
+if not logger.handlers :
+    logging.basicConfig()
+logger.setLevel(logging.INFO)
+# =============================================================================
+## Define the default configuration 
+_default_configuration_ = {
+    #
+    ## Selection of basic particles 
+    #
+    'PhotonCuts'      : ' PT > 3.0 * GeV  '                                 , 
+    'MuonCuts'        : ' ISMUON & ( PT > 650 * MeV ) & ( TRCHI2DOF < 5 ) ' ,
+    #
+    ## photons from chi_(c,b)
+    #
+    'GammaChi'        : ' ( PT > 400 * MeV ) & ( CL > 0.05 ) ' , 
+    #
+    ## W+- selection
+    #
+    'WCuts'           : " ( 'mu+'== ABSID ) & ( PT > 15 * GeV )" ,
+    #
+    ## Global Event cuts 
+    #
+    'CheckPV'         : True , 
+    #
+    ## Technicalities:
+    #
+    'Preambulo'       : [
+    #
+    ## shortcut for chi2 of vertex fit 
+    'chi2vx = VFASPF(VCHI2) '                    ,
+    #
+    ## shortcut for the c*tau
+    "from GaudiKernel.PhysicalConstants import c_light" , 
+    #
+    ## dimuons:
+    "psi             = ADAMASS ( 'J/psi(1S)'  ) < 125 * MeV"         ,
+    "psi_prime       = ADAMASS (   'psi(2S)'  ) < 125 * MeV"         ,
+    "mu2_tight       = ( chi2vx < 10    ) & ( MINTREE ( 'mu+' == ABSID , PT ) > 900 * MeV ) " ,
+    "dimu_tight      = ( PT > 3.0 * GeV ) & mu2_tight " ,
+    "psi_tight       = ( ADMASS ( 'J/psi(1S)' ) < 110 * MeV ) & dimu_tight " ,
+    "psi_prime_tight = ( ADMASS (   'psi(2S)' ) < 110 * MeV ) & dimu_tight " ,
+    "dimuon_heavy    = ( M > 4.9 * GeV ) & dimu_tight "                      ,
+    "dimuon_tight    = psi_tight | psi_prime_tight | dimuon_heavy " ,
+    ] ,
+    #
+    ## monitoring ?
+    'Monitor'     : False ,
+    #
+    ## pescales 
+    'DiMuonAndGammaPrescale' : 1.0 ,
+    'DoubleDiMuonPrescale'   : 1.0 ,
+    'ChiAndDiMuonPrescale'   : 1.0 ,
+    'DiChiPrescale'          : 1.0 ,
+    'DiMuonAndWPrescale'     : 1.0 , 
+    'ChiAndWPrescale'        : 1.0
+    # =========================================================================
+    }    
+# =============================================================================
+## the mandatory element for stripping framework 
+default_config = {
+    #
+    'NAME'        :   'CharmAssociative'     ,
+    'WGs'         : [ 'BandQ' ]              ,
+    'CONFIG'      : _default_configuration_  , 
+    'BUILDERTYPE' :   'StrippingCharmAssociativeConf'            ,
+    'STREAMS'     : { 'Leptonic' : [ 'StrippingDiMuonAndGammaForCharmAssociative', 
+                                     'StrippingDoubleDiMuonForCharmAssociative'  , 
+                                     'StrippingChiAndDiMuonForCharmAssociative'  , 
+                                     'StrippingDiChiForCharmAssociative'         , 
+                                     'StrippingDiMuonAndWForCharmAssociative'    ,
+                                     'StrippingChiAndWForCharmAssociative'       ] } 
+    }    
+# =============================================================================
+## @class  StrippingCharmAssociativeConf
+#  Helper class required by Tom & Greig 
+#  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
+#  @date 2011-05-26
+class StrippingCharmAssociativeConf(LineBuilder) :
+    """
+    Helper class to configure 'CharmAssociative/PromptCharm'-lines
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    ## private set of selections 
+    __selections_ = {}
+    
+    ## get the default configuration 
+    @staticmethod
+    def defaultConfiguration( key = None ) :
+        """
+        Get the default configurtaion
+        
+        >>> conf = StrippingCharmAssociativeConf.defaultConfiguration()
+        
+        Get the elements of default configurtaion:
+        
+        >>> prescale = StrippingCharmAssociativeConf.defaultConfiguration( 'DoubleDiMuon' )
+        """
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+        if key : return _config[ key ]
+        return _config
+    
+    ## constructor
+    def __init__( self , name , config ) :
+        """
+        Constructor
+        """
+        # check the names 
+        if not name : name = 'CharmAssociative'
+        # check the names 
+        if 'CharmAssociative' != name :
+            logger.warning ( 'The non-default name is specified "%s"' % name  ) 
+            
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+
+        if isinstance ( config , dict ):
+            _config.update ( config )
+            LineBuilder.__init__( self , name , _config )
+        else :
+            LineBuilder.__init__( self , name ,  config )
+
+        ## private set of selections 
+        self.__selections_ = {}
+        
+        
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {}
+            
+        self.__selections_[ self.name() ]['CONFIG'] = deepcopy ( _config ) 
+
+        keys = _config.keys()
+        for key in keys :
+            
+            if not key in _default_configuration_ :
+                raise KeyError("Invalid key is specified: '%s'" % key )
+            
+            val = _config[key]
+            if val != _default_configuration_ [ key ] : 
+                logger.debug ('new configuration: %-16s : %s ' % ( key , _config[key] ) )
+
+        keys = _config.keys()
+        for key in keys :
+            
+            if not key in _default_configuration_ :
+                raise KeyError("Invalid key is specified: '%s'" % key )
+            
+            val = _config[key]
+            if val != _default_configuration_ [ key ] : 
+                logger.debug ('new configuration: %-16s : %s ' % ( key , _config[key] ) )
+
+        ## cehck for prescales 
+        for keys in self.keys() :
+            if 0 > key.find('Prescale') and 0 > key.find('prescale') :  continue
+            if 1 != self[key] : logger.warning ( '%s is %s' % ( key , self[key] ) ) 
+            
+
+        for line in self._lines_associative_onia () :
+            self.registerLine(line)
+            logger.debug ( "Register line: %s" %  line.name () ) 
+
+    # =========================================================================
+    ## pure technical method for creation of selections
+    # =========================================================================
+    def make_selection ( self      ,
+                         tag       , 
+                         algotype  ,
+                         inputs    , 
+                         *args     ,
+                         **kwargs  ) :
+        """
+        Pure Technical method for creation of simple 1-step selections 
+        """
+        sel_tag  = '%s_Selection' % tag
+        sel_name = 'Sel%sFor%s'   % ( tag , self.name() )
+        #
+        ## check existing selection
+        #
+        sel      = self._selection ( sel_tag )
+        if sel : return sel 
+        #
+        ## adjust a bit the arguments
+        if not kwargs.has_key ( 'Preambulo'         ) :
+            kwargs ['Preambulo'        ] = self['Preambulo']
+            
+        if not kwargs.has_key ( 'ParticleCombiners' ) :
+            kwargs ['ParticleCombiners'] = { '' : 'LoKi::VertexFitter:PUBLIC' }                 
+        # 
+        ## use "simple-selection"
+        #
+        from PhysSelPython.Wrappers import SimpleSelection
+        sel = SimpleSelection (
+            sel_name ,
+            algotype ,
+            inputs   , 
+            *args    ,
+            **kwargs )
+        # 
+        return self._add_selection( sel_tag , sel ) 
+                        
+
+    ## get the common preambulo: 
+    def preambulo    ( self ) : return self [ 'Preambulo' ] 
+
+    ## get photon cuts 
+    def photonCuts   ( self ) : return self [ 'PhotonCuts' ] 
+    
+    ## get muon cuts 
+    def muonCuts     ( self ) : return self [ 'MuonCuts' ] 
+
+    ## get the dimuons 
+    def DiMuon ( self ) :
+        """
+        Get the dimuons  
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles  
+        ## ATTENITON: we need PROMPT onia, thus 'AllMuons' are here
+        from StandardParticles                     import StdAllLooseMuons as inpts  
+        return self.make_selection (
+            'DiMuon'               ,
+            CombineParticles       ,
+            [ inpts ]              ,
+            DecayDescriptor = 'J/psi(1S) -> mu+ mu-' ,
+            DaughtersCuts   = { 'mu+' : self.muonCuts() } , 
+            CombinationCut  = " psi | psi_prime | ( 8 * GeV < AM ) " , 
+            MotherCut       = " chi2vx < 20 " 
+            )
+    
+    ## get the dimuons & gamma 
+    def DiMuonAndGamma ( self ) :
+        """
+        Get dimuon & gamma 
+        Select events with dimuon and high-pt photon 
+        at least one dimuon 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles  
+        from StandardParticles                     import StdLooseAllPhotons as gamma 
+        return self.make_selection (
+            'DiMuonAdGamma'        ,
+            CombineParticles       ,
+            [ self.DiMuon() , gamma ]              ,
+            DecayDescriptor = " chi_b2(1P)  -> J/psi(1S) gamma"   ,
+            DaughtersCuts   = { 'J/psi(1S)' : " dimuon_tight "    ,   
+                                'gamma'     :  self.photonCuts () } ,
+            CombinationCut = " AALL "  ,
+            MotherCut      = "  ALL "  
+            )
+    
+    ## get the double dimuons
+    def DoubleDiMuon ( self ) :
+        """
+        Get 2xdimuon
+        Select events with two dimuons
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles  
+        return self.make_selection (
+            'DoubleDiMuon'    ,
+            CombineParticles  ,
+            [ self.DiMuon() ] ,
+            DecayDescriptor   = "chi_b2(1P)  -> J/psi(1S) J/psi(1S)" ,
+            CombinationCut    = " AALL " ,
+            MotherCut         = "  ALL "
+            )
+    
+    ## get chi_(c,b) & dimuon 
+    def ChiAndDiMuon ( self ) : 
+        """ Construct Chi_(c,b) + dumuon line """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles  
+        from StandardParticles                     import StdLooseAllPhotons as gamma 
+        pre_chidimu = self.make_selection (
+            'PreChiAndDiMuon'         ,
+            CombineParticles          ,
+            [ self.DoubleDiMuon() , self.DiMuon() , gamma ] ,  ## the first one is fake
+            DecayDescriptor  =  "chi_b2(1P)  -> J/psi(1S) J/psi(1S) gamma " ,
+            DaughtersCuts    = { 'gamma'     :  self['GammaChi'] } ,
+            ## mimic chi_(c,b):
+            CombinationCut   = """
+            ( AM13 - AM1 < 1.05 * GeV ) |
+            ( AM23 - AM2 < 1.05 * GeV ) 
+            """ ,
+            MotherCut        = "  ALL " 
+            )
+        ## apply pi0-veto-tagger ! 
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+        return self.make_selection (
+            'ChiAndDiMuon'   ,
+            Pi0Veto__Tagger  ,
+            [ pre_chidimu ]  ,
+            MassWindow     = 25 * MeV  ,
+            MassChi2       = -1        ,
+            ExtraInfoIndex = 25011     ## unique ! 
+            )
+    
+    ## get 2xXhi_(c,b) & dimuon 
+    def DiChi ( self ) : 
+        """ Construct 2xChi_(c,b) line """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles  
+        from StandardParticles                     import StdLooseAllPhotons as gamma 
+        pre_dichi = self.make_selection (
+            'PreDiChi'         ,
+            CombineParticles   ,
+            [ self.DoubleDiMuon() , self.DiMuon() , gamma ] ,  ## the first one is fake
+            DecayDescriptor =  "chi_b2(1P)  -> J/psi(1S) J/psi(1S) gamma gamma" ,
+            DaughtersCuts   = { 'gamma' :  self [ 'GammaChi' ] } ,
+            ## mimic 2xchi_(c,b):
+            CombinationCut   = """
+            ( ( AM13 - AM1 < 1.05 * GeV ) & ( AM24 - AM2 < 1.05 * GeV ) ) | 
+            ( ( AM14 - AM1 < 1.05 * GeV ) & ( AM23 - AM2 < 1.05 * GeV ) ) 
+            """ ,
+            MotherCut        = "  ALL " 
+            )
+        ## apply pi0-veto-tagger ! 
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+        return self.make_selection (
+            'DiChi'          ,
+            Pi0Veto__Tagger  ,
+            [ pre_dichi   ]  ,
+            MassWindow     = 25 * MeV  ,
+            MassChi2       = -1        ,
+            ExtraInfoIndex = 25012     ## unique ! 
+            )
+    
+    ## W+- selection 
+    def W ( self )  :
+        """ Get simple  W+-selection """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop 
+        from StandardParticles                     import StdAllLooseMuons as inpts 
+        return self.make_selection (
+            'W'                    ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code   = self['WCuts']
+            )
+    
+    ## select dimuon + W 
+    def DiMuonAndW ( self ) :
+        """ Select dimuon + W+ """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles 
+        return self.make_selection (
+            'DiMuW'                     ,
+            CombineParticles            ,
+            [ self.W () , self.DiMuon() ] , 
+            DecayDescriptor =  "[chi_b2(2P)  -> J/psi(1S) mu+]cc" ,
+            CombinationCut  = " AALL " ,
+            MotherCut       = "  ALL " 
+            )
+    
+    ## select chi + W 
+    def ChiAndW ( self ) :
+        """ Select chi & W+ """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles 
+        from StandardParticles                     import StdLooseAllPhotons as gamma 
+        pre_chiw = self.make_selection (
+            'PreChiAndW'        ,
+            CombineParticles    ,
+            [ self.DiMuon()     , self.W() , gamma ] ,
+            DecayDescriptor =  "[chi_b2(2P)  -> J/psi(1S) gamma mu+]cc" ,
+            DaughtersCuts = {
+            "J/psi(1S)" : " ( M  < 3.21 * GeV ) | in_range ( 8.5 * GeV , M , 12.0 * GeV ) " ,  
+            'gamma'     :  self['GammaChi']
+            } ,
+            ## mimic chi_(c,b):
+            CombinationCut   = """
+            ( AM12 - AM1 < 1.05 * GeV ) | 
+            ( AM12 - AM1 < 1.05 * GeV )  
+            """ ,
+            MotherCut        = "  ALL " 
+            )
+        ## apply pi0-veto-tagger ! 
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+        return self.make_selection (
+            'ChiAndW'        ,
+            Pi0Veto__Tagger  ,
+            [ pre_chiw ]     , 
+            MassWindow     = 25 * MeV  ,
+            MassChi2       = -1        ,
+            ExtraInfoIndex = 25013     ## unique ! 
+            )
+    
+    ## get all dicharm lines 
+    def _lines_associative_onia ( self ) :
+        
+        sel = self._selection ( 'OniaAndXLines' )
+        if sel : return sel 
+        
+        sel = [
+            ##
+            StrippingLine (
+            "DiMuonAndGammaFor" + self._name             ,
+            prescale = self [ 'DiMuonAndGammaPrescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self [ 'CheckPV']                 ,
+            algos    = [ self . DiMuonAndGamma () ]      ,
+            MDSTFlag = False                              , ## try to save it on MDST.DST 
+            ) ,
+            ##
+            StrippingLine (
+            "DoubleDiMuonFor" + self._name             ,
+            prescale = self [ 'DoubleDiMuonPrescale' ] , ## ATTENTION! Prescale here !!      
+            checkPV  = self [ 'CheckPV' ]              ,
+            algos    = [ self . DoubleDiMuon () ]            
+            ) ,
+            ##
+            StrippingLine (
+            "ChiAndDiMuonFor" + self._name             ,
+            prescale = self [ 'ChiAndDiMuonPrescale' ] , ## ATTENTION! Prescale here !!           
+            checkPV  = self [ 'CheckPV' ]              ,
+            algos    = [ self . ChiAndDiMuon () ]            
+            ) ,
+            ## 
+            StrippingLine (
+            "DiChiFor" + self._name             ,
+            prescale = self [ 'DiChiPrescale' ] , ## ATTENTION! Prescale here !!              
+            checkPV  = self [ 'CheckPV']        ,
+            algos    = [ self . DiChi       () ]            
+            ) ,
+            ##
+            StrippingLine (
+            "DiMuonAndWFor" + self._name             ,
+            prescale = self [ 'DiMuonAndWPrescale' ] , ## ATTENTION! Prescale here !!              
+            checkPV  = self [ 'CheckPV'  ]           ,
+            algos    = [ self . DiMuonAndW ()  ]             
+            ) ,
+            ##
+            StrippingLine (
+            "ChiAndWFor" + self._name             ,
+            prescale = self [ 'ChiAndWPrescale' ] , ## ATTENTION! Prescale here !!              
+            checkPV  = self [ 'CheckPV'  ]           ,
+            algos    = [ self . ChiAndW ()  ]             
+            ) ,
+            ##
+            ]
+        #
+        return self._add_selection ( 'OniaAndXLines' , sel ) 
+    
+    ## get the selection, associated with some nickname name 
+    def _selection ( self , nick ) :
+        """
+        Get the selection, associated with some nickname name
+        """
+        
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {} 
+            
+        return self.__selections_[ self.name() ].get( nick , None ) 
+        
+    ## add the selection, associated with some nickname name 
+    def _add_selection ( self , nick , sel ) :
+        """
+        Add the selection, associated with some nickname name
+        """
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {} 
+        
+        if self.__selections_[ self.name()].has_key( nick ) :
+            raise AttributeError , "Selection '%s'already exists " % nick
+        
+        self.__selections_[ self.name() ][ nick ] = sel
+        
+        return sel 
+    
+# =============================================================================
+if '__main__' == __name__ :
+    
+    logger.info ( 80*'*'  ) 
+    logger.info (  __doc__ ) 
+    logger.info ( ' Author :  %s' % __author__ ) 
+    logger.info ( ' Date   :  %s' % __date__   ) 
+    logger.info ( 80 * '*' ) 
+    ##
+    clines = set() 
+    logger.info ( 70 * '-' ) 
+    logger.info ( ' %-15s | %-40s ' % ( 'STREAM' , 'LINE' ) )
+    logger.info ( 70 * '-' ) 
+    for stream in default_config['STREAMS'] :
+        lines = default_config['STREAMS'][stream]
+        for l in lines :
+            logger.info ( ' %-15s | %-40s ' % ( stream , l ) )
+            clines.add ( l )
+    logger.info ( 80 * '*' ) 
+    ##
+    logger.info ( ' The output locations for the default configuration: ' )
+    ##
+    _conf = StrippingCharmAssociativeConf ( 'CharmAssociative' ,
+                                            config = default_config['CONFIG']  )
+    ##
+    ## 
+    _ln   = ' ' + 61*'-' + '+' + 60*'-'
+    logger.info ( _ln ) 
+    logger.info ( '  %-60s| %-45s | %s ' % ( 'Output location'     ,
+                                             'Stripping line name' ,
+                                             'MDST.DST'            ) ) 
+    logger.info ( _ln )
+    for l in _conf.lines() :
+        lout  = l.outputLocation()
+        lname = l.name()
+        flag  = l.MDSTFlag
+        logger.info ( '  %-60s| %-45s | %s ' % ( lout, lname , flag ) )
+        if not lname in clines :
+            raise AttributeError ('Unknown Line %s' % lname )
+        clines.remove ( lname )
+    logger.info ( _ln ) 
+    logger.info ( 80*'*'  ) 
+    if clines :
+        raise AttributeError('Undeclared lines: %s' % clines )
+
+    keys = default_config['CONFIG'].keys()
+    keys.sort()
+    prescale = [ i for i in keys if 0 <= i.find('Prescale') ]
+    other    = [ i for i in keys if not i in prescale       ] 
+    logger.info ( 'Configuration keys are: %s' % other    ) 
+    logger.info ( 'Prescale      keys are: %s' % prescale ) 
+    logger.info ( 80*'*' )
+    
+    ## make dot-graphs 
+    try:    
+        selections = _conf._selections_private() 
+        for s in selections :
+            from SelPy.graph import graph
+            o = graph ( s , format = 'png' )
+            if o : logger.info  ( "Generate DOT-graph: %s"          % o        )
+            else : logger.error ( "Can't produce DOT=-graph for %s" % s.name() )
+            
+    except : pass
+       
+# =============================================================================
+# The END 
+# =============================================================================
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingChiCJPsiGammaConv.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingChiCJPsiGammaConv.py
new file mode 100644
index 000000000..1ceef3000
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingChiCJPsiGammaConv.py
@@ -0,0 +1,273 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Edwige Tournefier'
+__date__ = '08/06/2012'
+__version__ = '$ 1.0 $'
+
+"""
+ChiC -> JPsi Gamma -> Mu Mu e e
+"""
+moduleName = 'ChiCJPsiGammaConv'
+
+__all__ = ('StrippingChiCJPsiGammaConvConf',
+           'default_config')
+
+
+default_config = {
+    'NAME'              : 'ChiCJPsiGammaConv',
+    'WGs'               : ['BandQ'],
+    'BUILDERTYPE'       : 'StrippingChiCJPsiGammaConvConf',
+    'CONFIG'            : {'trackChi2'               :    100000 #disable
+                           , 'MuPTMin'               :    900 #MeV #Can be tightened to 600 MeV
+                           , 'MuPMin'               :    8000 #MeV
+                           , 'JPsiMassMin'           :    3.0 # GeV
+                           , 'JPsiMassMax'           :    3.2 # GeV
+                           , 'JPsiPTMin'             :     2 # GeV
+                           , 'JPsi_PIDmu'            :    0. 
+                           , 'JPsiVertexChi2'        :   25.0
+                           , 'UpsilonMassMin'        :    9.0  #GeV
+                           , 'UpsilonMassMax'        :    12.9 #GeV
+                           , 'UpsilonVertexChi2'     :   25.0
+                           , 'UpsilonPTMin'          :    0.9 # GeV
+                           , 'Upsilon_PIDmu'         :    0. 
+                           , 'eDLLe'                 :   0.0
+                           , 'GammaEEMass'           :   100.0 #MeV
+                           , 'GammaEEPt'             :   580.0 #MeV
+                           , 'mMinChiCRaw'           :   2.9 #GeV
+                           , 'mMaxChiCRaw'           :   4.8 #GeV
+                           , 'mMinChiCFit'           :   3.0 #GeV
+                           , 'mMaxChiCFit'           :   4.7 ##GeV
+                           , 'mMinChiBRaw'           :   9.4 #GeV
+                           , 'mMaxChiBRaw'           :   13.2 #GeV
+                           , 'mMinChiBFit'           :   9.5 #GeV
+                           , 'mMaxChiBFit'           :   13.0  #GeV
+                           , 'PrescaleChi'          :   1.0
+                           , 'PostscaleChi'         :   1.0
+                           },
+    'STREAMS': {'Dimuon':
+                ['StrippingChiCJPsiGammaConvChibLine',
+                 'StrippingChiCJPsiGammaConvChicLine']
+                }
+}
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles, OfflineVertexFitter
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class StrippingChiCJPsiGammaConvConf(LineBuilder):
+    """
+    Stripping selection for ChiC -> JPsi Gamma
+    where JPsi -> mu mu and Gamma -> e+ e- (i.e. conversions before the magnet)
+    
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+
+        self.SelJPsi           = self.filterDiMu(name+"JPsi",
+                                                 MuonPT   = config['MuPTMin'],
+                                                 MuonP    = config['MuPMin'],
+                                                 MuonTRCHI2DOF  = config['trackChi2'],
+                                                 MuonPID      = config['JPsi_PIDmu'],
+                                                 MuMuMinMass    = config['JPsiMassMin'],
+                                                 MuMuMaxMass    = config['JPsiMassMax'],
+                                                 MuMuVCHI2PDOF = config['JPsiVertexChi2'],
+                                                 MuMuPT      = config['JPsiPTMin']
+                                                 )
+
+        self.SelUpsilon           = self.filterDiMu(name+"Upsilon",
+                                                    MuonPT   = config['MuPTMin'],
+                                                    MuonP    = config['MuPMin'],
+                                                    MuonTRCHI2DOF  = config['trackChi2'],
+                                                    MuonPID      = config['Upsilon_PIDmu'],
+                                                    MuMuMinMass    = config['UpsilonMassMin'],
+                                                    MuMuMaxMass    = config['UpsilonMassMax'],
+                                                    MuMuVCHI2PDOF = config['UpsilonVertexChi2'],
+                                                    MuMuPT      = config['UpsilonPTMin']
+                                                    )
+
+
+
+        self.SelGammaEE        = self.filterGammaEE(name+"GammaEE",
+                                                    eDLLe        = config['eDLLe'],
+                                                    GammaEEMass  = config['GammaEEMass'],
+                                                    GammaEEPt    = config['GammaEEPt']
+                                                    )
+
+        self.SelSymGammaEE        = self.filterSymGammaEE(name+"SymGammaEE",
+                                              eDLLe        = config['eDLLe'],
+                                              GammaEEMass  = config['GammaEEMass'],
+                                              GammaEEPt    = config['GammaEEPt']
+                                              )
+
+        self.SelChiC           = self.ChiC(name+"ChiC",
+                                           self.SelJPsi,
+                                           self.SelGammaEE,
+                                           mMinChiCRaw = config['mMinChiCRaw'],       
+                                           mMaxChiCRaw = config['mMaxChiCRaw'],      
+                                           mMinChiCFit = config['mMinChiCFit'],       
+                                           mMaxChiCFit = config['mMaxChiCFit'])              
+
+        self.SelChiCSym           = self.ChiC(name+"ChiCSym",
+                                           self.SelJPsi,
+                                           self.SelSymGammaEE,
+                                           mMinChiCRaw = config['mMinChiCRaw'],       
+                                           mMaxChiCRaw = config['mMaxChiCRaw'],      
+                                           mMinChiCFit = config['mMinChiCFit'],       
+                                           mMaxChiCFit = config['mMaxChiCFit'])              
+
+        self.SelChiB           = self.ChiC(name+"ChiB",
+                                           self.SelUpsilon,
+                                           self.SelGammaEE,
+                                           mMinChiCRaw = config['mMinChiBRaw'],       
+                                           mMaxChiCRaw = config['mMaxChiBRaw'],      
+                                           mMinChiCFit = config['mMinChiBFit'],       
+                                           mMaxChiCFit = config['mMaxChiBFit'])              
+
+        self.SelChiBSym           = self.ChiC(name+"ChiBSym",
+                                           self.SelUpsilon,
+                                           self.SelSymGammaEE,
+                                           mMinChiCRaw = config['mMinChiBRaw'],       
+                                           mMaxChiCRaw = config['mMaxChiBRaw'],      
+                                           mMinChiCFit = config['mMinChiBFit'],       
+                                           mMaxChiCFit = config['mMaxChiBFit'])              
+            
+
+        self.ChiCLine           = StrippingLine(name+"ChicLine",
+                                                prescale  = config['PrescaleChi'],
+                                                postscale = config['PostscaleChi'],
+                                                selection = self.SelChiC)
+
+        self.ChiCSymLine           = StrippingLine(name+"ChicSymLine",
+                                                prescale  = config['PrescaleChi'],
+                                                postscale = config['PostscaleChi'],
+                                                selection = self.SelChiCSym)
+
+        self.ChiBLine           = StrippingLine(name+"ChibLine",
+                                                prescale  = config['PrescaleChi'],
+                                                postscale = config['PostscaleChi'],
+                                                selection = self.SelChiB)
+
+        self.ChiBSymLine           = StrippingLine(name+"ChibSymLine",
+                                                prescale  = config['PrescaleChi'],
+                                                postscale = config['PostscaleChi'],
+                                                selection = self.SelChiBSym)
+
+
+        self.registerLine(self.ChiCLine)
+
+        self.registerLine(self.ChiCSymLine)
+
+        self.registerLine(self.ChiBLine)
+
+        self.registerLine(self.ChiBSymLine)
+
+
+    #####################################################################################################################
+    #    
+    # filter candidates J/Psi -> mu mu
+    #
+    ######################################################################################################################  
+    def filterDiMu( self, name,
+                      MuonPT,
+                      MuonP,
+                      MuonTRCHI2DOF,
+                      MuonPID,
+                      MuMuMinMass,
+                      MuMuMaxMass,
+                      MuMuVCHI2PDOF,
+                      MuMuPT 
+                      ):
+        
+        _StdLooseDiMuon = DataOnDemand( Location = 'Phys/StdLooseDiMuon/Particles' )
+        
+        MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s )  & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)  & (MINTREE('mu+'==ABSID,PIDmu)> %(MuonPID)s)" % locals()
+        MuonCut += "& (MINTREE('mu+'==ABSID,P) > %(MuonP)s )" % locals()
+#        MuonCut = " (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)  & (MINTREE('mu+'==ABSID,PIDmu)> %(MuonPID)s )" % locals()
+        
+        MuMuCut = "(MM > %(MuMuMinMass)s *GeV) & (MM < %(MuMuMaxMass)s *GeV) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s *GeV)" % locals()
+        
+        _MuMu = FilterDesktop( name+"FilterChiCMuMu", Code = MuonCut + " & " + MuMuCut  )
+        
+        return Selection( name + "_SelMuMu",
+                          Algorithm = _MuMu,
+                          RequiredSelections = [ _StdLooseDiMuon ]
+                          )
+
+
+
+    ######################################################################################################################  
+    #
+    # Filter gamma-> e+ e- candidates
+    # 
+    #
+    ######################################################################################################################  
+    def filterGammaEE(self, name, eDLLe, GammaEEMass, GammaEEPt):
+        
+        _StdAllTightGammaDD = DataOnDemand( Location = 'Phys/StdAllTightGammaDD/Particles' )
+
+        EleCut = " (MINTREE('e+'==ABSID,PIDe)> %(eDLLe)s)" % locals()
+        GammaCut = " (MM < %(GammaEEMass)s *MeV) & ( PT > %(GammaEEPt)s *MeV) " % locals()
+
+        _Gamma = FilterDesktop( name+"FilterChiCGamma", Code = EleCut + " & " + GammaCut  )
+        
+        return Selection( name + "_SelGamma",
+                          Algorithm = _Gamma,
+                          RequiredSelections = [ _StdAllTightGammaDD ]
+                          )
+
+
+    ######################################################################################################################  
+    #
+    # Filter gamma-> e+ e- candidates
+    # 
+    #
+    ######################################################################################################################  
+    def filterSymGammaEE(self, name, eDLLe, GammaEEMass, GammaEEPt):
+        
+        _StdAllTightSymGammaDD = DataOnDemand( Location = 'Phys/StdAllTightSymGammaDD/Particles' )
+
+        EleCut = " (MINTREE('e+'==ABSID,PIDe)> %(eDLLe)s)" % locals()
+        GammaCut = " (MM < %(GammaEEMass)s) & ( PT > %(GammaEEPt)s) " % locals()
+
+        _Gamma = FilterDesktop( name="FilterChiCSymGamma", Code = EleCut + " & " + GammaCut  )
+        
+        return Selection( name + "_SelSymGamma",
+                          Algorithm = _Gamma,
+                          RequiredSelections = [ _StdAllTightSymGammaDD ]
+                          )
+
+
+    ######################################################################################################################
+    #
+    # Build ChiC Candidates
+    #
+    ######################################################################################################################
+    def ChiC(self, name, inputSelJPsi, inputSelGamma, mMinChiCRaw, mMaxChiCRaw, mMinChiCFit, mMaxChiCFit):
+
+        combCut   = "(AM > %(mMinChiCRaw)s *GeV) & (AM < %(mMaxChiCRaw)s*GeV)"  % locals()
+        motherCut = "(MM > %(mMinChiCFit)s *GeV) & (MM < %(mMaxChiCFit)s*GeV)"  % locals()
+        
+        ChiC                  = CombineParticles("ChiC"+name)
+        ChiC.DecayDescriptor  = "chi_c1(1P) -> J/psi(1S) gamma"
+        ChiC.CombinationCut   = combCut
+        ChiC.MotherCut        = motherCut
+        ChiC.ParticleCombiners.update( { "" : "OfflineVertexFitter:PUBLIC"}  )
+        
+        ChiCSel = Selection(name+"_ChiCSel", Algorithm = ChiC, RequiredSelections = [inputSelJPsi, inputSelGamma])
+
+        return ChiCSel
+        
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonForXsection.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonForXsection.py
new file mode 100644
index 000000000..bbbdf9061
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonForXsection.py
@@ -0,0 +1,79 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting J/psi, Psi(2S), and Upsilon 
+'''
+
+__author__=['Jibo He']
+__date__ = '28/03/2012'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'DiMuonForXsectionConf',
+    'default_config'
+    )
+
+default_config =  {
+    'NAME'       : 'DiMuonForXsection',
+    'WGs'        : ['BandQ'],
+    'STREAMS' : ['Dimuon'],
+    'BUILDERTYPE': 'DiMuonForXsectionConf',
+    'CONFIG'     : {
+    'TotalCuts'  :  """
+    (MINTREE('mu+'==ABSID,PT)>0.65*GeV)
+    & (VFASPF(VCHI2PDOF)<25)
+    & ((ADMASS('J/psi(1S)')<150*MeV) | (ADMASS('psi(2S)')<150*MeV) | (MM>8.5*GeV))
+    """,
+    'Prescale'   :  1.,
+    'CheckPV'    :  False
+    }
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class DiMuonForXsectionConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        """
+        DiMuon
+        """
+        self.SelDiMuon = self.createSubSel( OutputList = self.name + "SelDiMuon",
+                                            InputList =  DataOnDemand( Location = 'Phys/StdLooseDiMuon/Particles' ), 
+                                            Cuts = config['TotalCuts']
+                                            )
+
+        self.DiMuonForXsectionLine = StrippingLine( self.name + 'Line',
+                                                    prescale  = config['Prescale'],                                                    
+                                                    checkPV   = config['CheckPV'],
+                                                    algos     = [ self.SelDiMuon ]
+                                                    )
+        self.registerLine( self.DiMuonForXsectionLine )
+        
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonInherit.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonInherit.py
new file mode 100644
index 000000000..a9e7c2427
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonInherit.py
@@ -0,0 +1,461 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting J/psi and Psi(2S) using an ineheritance approach
+'''
+
+__author__=['Lucio Anderlini', 'Liupan An']
+__date__ = '2017-01-09'
+__version__= '$Revision: 2.0 $'
+
+
+__all__ = (
+    'default_config'
+    )
+
+default_config = {
+    'NAME'       : 'DiMuonInherit',
+    'WGs'        : ['BandQ'],
+    'STREAMS'    : {'Dimuon' :[
+                      "StrippingFullDSTDiMuonPsi2MuMuTOSLine",
+                      "StrippingFullDSTDiMuonJpsi2MuMuTOSLine",
+                      "StrippingFullDSTDiMuonPsi2MuMuDetachedLine",
+                      "StrippingFullDSTDiMuonJpsi2MuMuDetachedLine",
+                      "StrippingFullDSTDiMuonDiMuonNoPVLine",
+                      'StrippingFullDSTDiMuonDiMuonHighMassLine',
+                      'StrippingFullDSTDiMuonDiMuonHighMassSameSignLine'
+                    ],
+                    'Leptonic' :[
+                      "StrippingMicroDSTDiMuonDiMuonSameSignLine",
+                      "StrippingMicroDSTDiMuonDiMuonIncLine",
+                      "StrippingMicroDSTDiMuonDiMuonSameSignhighPTLine",
+                      "StrippingMicroDSTDiMuonDiMuonInchighPTLine",
+                      "StrippingMicroDSTDiMuonDiMuonSameSignTISLine",
+                      "StrippingMicroDSTDiMuonDiMuonIncTISLine"
+                    ]
+    },
+                   
+    'BUILDERTYPE': 'DiMuonInherit',
+    'CONFIG'     : {
+  #### Definition of all the DiMuon lines ############
+  ###############
+    "Debug" : False,
+    "Lines" : {
+      "VirtualBase" : {
+        "Prescale"      : 0.0,
+        "Inherit"       : None,
+        "checkPV"       : False,
+        "maxPV"         : None,
+        "TOScut"        : None,
+        "RequiredRawEvents" : None,
+        "InputDiMuon"   : "StdLooseDiMuon",
+        "Cuts"          : {
+          "MuonPt"        : "MINTREE('mu+'==ABSID,PT) > 650.0 *MeV",
+          "JpsiVtx"       : "VFASPF(VCHI2PDOF)< 20.0"
+        }
+      },
+
+      "FullDSTDiMuonDiMuonHighMassLine" : {
+        "Prescale"      : 1.0,
+        "Inherit"       : "VirtualBase",
+        "Cuts"          : {
+          "MuonP"         : "MINTREE('mu+'==ABSID,P ) > 8000.0 *MeV",
+          "MuonPt"        : "MINTREE('mu+'==ABSID,PT) > 1000.0 *MeV",
+          "Mass"          : "MM > 8500 *MeV",
+          "MuonPIDmu"     : "MINTREE('mu+'==ABSID,PIDmu) > 0.0"
+          }
+      },
+
+      "FullDSTDiMuonDiMuonHighMassSameSignLine" : {
+    "Prescale"      : 0.2,
+    "Inherit"       : "VirtualBase",
+    #"Inherit"       : "FullDSTDiMuonDiMuonHighMassLine",
+    "InputDiMuon"   : "StdLooseDiMuonSameSign",
+    #"MuonPIDmu"     : None #remove the cut 
+    #      "Cuts"          : None
+    "Cuts"          : {
+          "MuonP"         : "MINTREE('mu+'==ABSID,P ) > 8000.0 *MeV",
+          "MuonPt"        : "MINTREE('mu+'==ABSID,PT) > 1000.0 *MeV",
+          "Mass"          : "MM > 8500 *MeV",
+          #"MuonPIDmu"     : "MINTREE('mu+'==ABSID,PIDmu) > 0.0"
+          }
+    },
+
+      "FullDSTDiMuonDiMuonNoPVLine" : {
+        "Prescale"      : 1.0,
+        "Inherit"       : "VirtualBase",
+        "maxPV"         : 0.5,
+        "Cuts"          : {
+          "BPVVDZ"        : "BPVVDZ < -1 *mm",
+          #"MuonPIDmu"     : None, #remove the cut 
+          "Mass"          : "MM > 2900",
+          #"MuonPIDmu"     : "MINTREE('mu+'==ABSID,PIDmu) > 0.0"
+          }
+      },
+      
+      "FullDSTDiMuonJpsi2MuMuDetachedLine" : {
+        "Prescale"      : 1.0,
+        "Inherit"       : "VirtualBase",
+        "checkPV"       : True,
+        "RequiredRawEvents" : ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+        "InputDiMuon"   : "StdLooseJpsi2MuMu",
+        "Cuts"          : {
+          "MuonPt"        : "MINTREE('mu+'==ABSID,PT) > 500.0 *MeV",# replace!
+          "Mass"          : "(MM > 2996.916) & (MM < 3196.916)",
+          "Detachement"   : "((BPVDLS>3) | (BPVDLS<-3))",
+          "MuonPIDmu"     : "MINTREE('mu+'==ABSID,PIDmu) > 0.0"
+          }
+      },
+
+      "FullDSTDiMuonPsi2MuMuDetachedLine" : {
+        "Prescale"      : 1.0,
+        "Inherit"       : "FullDSTDiMuonJpsi2MuMuDetachedLine",
+        #"RequiredRawEvents" : ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+        'RequiredRawEvents' : None,
+        "InputDiMuon"   : "StdLooseDiMuon",
+        "Cuts"          : {
+          "Mass"          :  "ADMASS('psi(2S)') < 100.0 *MeV"
+        }
+      },
+      
+      "FullDSTDiMuonJpsi2MuMuTOSLine" : {
+        "Prescale"      : 1.0,
+        "Inherit"       : "VirtualBase",
+        "InputDiMuon"   : "StdLooseJpsi2MuMu",
+#        "TOScut"        : { "L0.*Mu.*Decision%TOS":0,
+#                            "Hlt1DiMuonHighMassDecision%TOS" : 0,
+#                            "Hlt2DiMuonJPsiHighPTDecision%TOS" : 0 
+#                          },
+        "RequiredRawEvents" : None,
+        "Cuts"          : {
+          "MuonP"         : "MINTREE('mu+'==ABSID,P) > 10 *GeV",
+          "JpsiPt"        : "PT > 3 *GeV",
+          "Mass"          : "(MM > 3010) & (MM < 3170)",
+          "MuonPIDmu"     : "MINTREE('mu+'==ABSID,PIDmu) > 0.0",
+          "TOSL0"         : "TOS('L0.*Mu.*Decision', 'L0TriggerTisTos')",
+          "TOSHlt1"       : "TOS('Hlt1DiMuonHighMassDecision', 'Hlt1TriggerTisTos')",
+          "TOSHlt2"       : "TOS('Hlt2DiMuonJPsiHighPTDecision', 'Hlt2TriggerTisTos')",
+          }   
+      },
+
+      "FullDSTDiMuonPsi2MuMuTOSLine" : {
+        "Prescale"      : 1.0,
+        "Inherit"       : "FullDSTDiMuonJpsi2MuMuTOSLine",
+        "InputDiMuon"   : "StdLooseDiMuon",
+#        "TOScut"        : { "L0.*Mu.*Decision%TOS":0,
+#                            "Hlt1DiMuonHighMassDecision%TOS" : 0,
+#                            "Hlt2DiMuonPsi2SHighPTDecision%TOS" : 0 
+#                          },
+        "RequiredRawEvents" : None,
+        "Cuts"          : {
+          "Mass"        : "ADMASS('psi(2S)') < 100.0",
+          "MuonPt"      : "MINTREE('mu+'==ABSID,PT) > 1 *GeV",
+          "MuonPIDmu"     : "MINTREE('mu+'==ABSID,PIDmu) > 0.0",
+          "TOSL0"         : "TOS('L0.*Mu.*Decision', 'L0TriggerTisTos')",
+          "TOSHlt1"       : "TOS('Hlt1DiMuonHighMassDecision', 'Hlt1TriggerTisTos')",
+          "TOSHlt2"       : "TOS('Hlt2DiMuonPsi2SHighPTDecision', 'Hlt2TriggerTisTos')",
+          }   
+      },
+
+
+  ## MicroDST lines
+
+      "MicroDSTDiMuonDiMuonIncLine" : {
+        "Prescale"      : 0.03,
+        "Inherit"       : "VirtualBase",
+        "InputDiMuon"   : "StdLooseDiMuon",
+        "Cuts"          : {
+          "Mass"          : "MM > 3000*MeV",
+        }   
+      },
+
+      "MicroDSTDiMuonDiMuonSameSignLine" : {
+        "Prescale"              : 0.1,
+        "Inherit"               : "MicroDSTDiMuonDiMuonIncLine",
+        "InputDiMuon"           : "StdLooseDiMuonSameSign",
+        "Cuts"                  : None
+      },
+
+      "MicroDSTDiMuonDiMuonInchighPTLine" : {
+        "Prescale"      : 1.,
+        "Inherit"       : "VirtualBase",
+        "InputDiMuon"   : "StdLooseDiMuon",
+        "Cuts"          : {
+          "Mass"          : "MM > 3000*MeV",
+          "JpsiPt"        : "PT > 6 *GeV",
+        }   
+      },
+
+      "MicroDSTDiMuonDiMuonSameSignhighPTLine" : {
+        "Prescale"              : 1.0,
+        "Inherit"               : "MicroDSTDiMuonDiMuonInchighPTLine",
+        "InputDiMuon"           : "StdLooseDiMuonSameSign",
+        "Cuts"                  : None
+      },
+
+
+      "MicroDSTDiMuonDiMuonIncTISLine" : {
+        "Prescale"      : 1.0,
+        "Inherit"       : "VirtualBase",
+        "InputDiMuon"   : "StdLooseDiMuon",
+        "Cuts"          : {
+          "Mass"          : "MM > 3000*MeV",
+          "TISHlt2"       : "TIS('Hlt2(?!Forward)(?!DebugEvent)(?!Express)(?!Lumi)(?!Transparent)(?!PassThrough).*Decision', 'Hlt2TriggerTisTos')",
+          #"TISHlt2"       : "TIS('Hlt2.*Decision', 'Hlt2TriggerTisTos')",
+        }   
+      },
+
+      "MicroDSTDiMuonDiMuonSameSignTISLine" : {
+        "Prescale"              : 1.0,
+        "Inherit"               : "MicroDSTDiMuonDiMuonIncTISLine",
+        "InputDiMuon"           : "StdLooseDiMuonSameSign",
+        "Cuts"                  : None
+      },
+      ## Are these lines really needed? Aren't they included in Inclusive line?
+      #"Jpsi2MuMu" : {
+       # "Prescale"      : 1.0,
+       # "checkPV"       : True,
+       # "Inherit"       : "VirtualBase",
+       # "InputDiMuon"   : "StdLooseDiMuon",
+       # "Cuts"          : {
+       #   "Mass"        :   "(MM > 2976.916 *MeV) & (MM < 3216.916 *MeV)",
+       #   "MuonPIDmu"   :   "MINTREE('mu+'==ABSID,PIDmu) > -5",
+       #   "JpsiPt"      :   "(PT > 3*GeV)"
+       # }   
+     # },
+
+      #"Psi2MuMu" : {
+      #  "Prescale"      : 1.0,
+      #  "Inherit"       : "Jpsi2MuMu",
+      #  "Cuts"          : {
+      #    "Mass"        :   "ADMASS('psi(2S)') < 120.0 *MeV",
+      #  }
+      #},
+    }
+  }
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class DiMuonInherit (LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+        self.linesCfg  = config['Lines']
+        self.dbug = config['Debug']
+
+        ### Loops on the lines defined and get line titles
+        for lineName in self.linesCfg:
+          ### Translate the line name to a dictionary
+          line = self.linesCfg[lineName] 
+          ### Test the prescale. Zero prescale means virtual line.
+          if self.getVariable(line,'Prescale') != None:
+            if (self.getVariable(line,'Prescale')  != 0) :
+
+              ### Defines the filter desktop with the cuts
+              _tmpFilter = FilterDesktop(Code = self.compileCut(line))
+              ### Binds the algorithm to a DaVinci Selection
+              _tmpAlgorithm = Selection ( self.name + lineName + 'Sel',
+                Algorithm = _tmpFilter,
+                RequiredSelections = [DataOnDemand(
+                  "Phys/"+self.getVariable(line,"InputDiMuon")+"/Particles")])
+
+              ### If a check on maxPV is required defines the proper filter
+              _tmpFilter = {}
+              if self.getVariable(line, 'maxPV') != None:
+                _tmpFilter = { 'Code'       : "recSummary(LHCb.RecSummary.nPVs, 'Rec/Vertex/Primary')<" + 
+                                                str(self.getVariable(line, 'maxPV')) ,
+                               'Preambulo'  : [ 'from LoKiTracks.decorators import *' ,
+                                                'from LoKiNumbers.decorators import *',
+                                                'from LoKiCore.functions import *' ]
+                             }
+
+
+              if self.dbug:
+                ## debug cut writer
+                print "###################### DiMuonInh Debugger ########################"
+                print "## " + name + lineName + 'Line'
+                print "## Input:      " +  "Phys/"+self.getVariable(line,"InputDiMuon")+"/Particles" 
+                print "## Parsed Cut: " + self.compileCut(line).replace(" &", " \n\t\t&" )
+
+
+              ### If a TOS check is required redefine  _tmpAlgorithm to point to TOS filter
+              if self.getVariable(line, 'TOScut') != None:
+                _tmpPlainAlgorithm = _tmpAlgorithm
+                _tmpAlgorithm = self.filterTisTos( name + lineName + "TOSFilter",
+                                                   DiMuonInput = _tmpPlainAlgorithm,
+                                                   myTisTosSpecs = self.getVariable(line, 'TOScut')
+                                                 )
+
+
+              if self.dbug:
+                print "##################################################################"
+
+              ### StrippingLine
+              _tmpDiMuonLine = StrippingLine (  lineName, # name + lineName + 'Line',
+                                                prescale  = self.getVariable(line, 'Prescale'),    
+                                                FILTER    = _tmpFilter,
+                                                checkPV   = self.getVariable(line, 'checkPV'),
+                                                RequiredRawEvents = self.getVariable(line, 'RequiredRawEvents'),
+                                                algos     = [ _tmpAlgorithm ]
+                                             )
+
+              self.registerLine( _tmpDiMuonLine )
+
+    def getVariable (self, line, varName ):
+      if varName in line:
+        retVal = line[varName]
+      else:
+        if "Inherit" in line and line["Inherit"] != None : 
+          retVal = self.getVariable ( self.linesCfg[line["Inherit"]] , varName )
+        else:
+          raise NameError("Missing definition of " + varName + " in line " + line + " and no inheritance defined")
+          return None
+
+      return retVal
+
+    def compileCut ( self, line ):
+      ### retrieves the dictionary
+      cutDict = self.getCutDict ( line )
+       
+      ### compiles the dictionary into a cut set
+      _compiledCut = ""
+      for cut in cutDict:
+         
+        if cutDict[cut] != None:
+          if _compiledCut != "" : _compiledCut += " & "
+          _compiledCut += "(" + cutDict[cut] + ")"
+
+      return _compiledCut;
+        
+    def getCutDict ( self, line ):
+      ### Loads the current cut dict
+      if "Cuts" in line and line["Cuts"] != None:
+        dictCutCurr = line["Cuts"]
+        
+        ### Loads the inherited cut dict
+        if "Inherit" in line and line["Inherit"] != None : 
+          dictCutInh = self.getCutDict ( self.linesCfg[line["Inherit"]] )
+        else:
+          dictCutInh = {}
+
+        ### Merges the two dictionaries
+        for cut in dictCutInh: 
+#          if self.dbug: print "Consider inherited cut " + cut
+          if cut not in dictCutCurr :
+#            if self.dbug:      print " not defined in current dictionary"
+            dictCutCurr[cut] = dictCutInh[cut]
+
+        ### returns the merged dict
+        return dictCutCurr;
+
+      return self.getCutDict ( self.linesCfg[line["Inherit"]] )
+
+
+
+  
+    def filterTisTos(self,
+                     name,
+                     DiMuonInput,
+                     myTisTosSpecs ) :
+
+        from Configurables import TisTosParticleTagger
+        if self.dbug:
+          print "##  TOS requirement applied"
+        
+        myTagger = TisTosParticleTagger(name + "_TisTosTagger")
+        myTagger.TisTosSpecs = myTisTosSpecs
+        
+        # To speed it up, TisTos only with tracking system
+        myTagger.ProjectTracksToCalo = False
+        myTagger.CaloClustForCharged = False
+        myTagger.CaloClustForNeutral = False
+        myTagger.TOSFrac = { 4:0.0, 5:0.0 }
+        
+        return Selection(name + "_SelTisTos",
+                         Algorithm = myTagger,
+                         RequiredSelections = [ DiMuonInput ] )
+
+
+
+
+# =============================================================================
+## logging
+# =============================================================================
+import logging
+logger = logging.getLogger(__name__)
+if not logger.handlers : logging.basicConfig()
+logger.setLevel(logging.INFO)
+# =============================================================================
+# =============================================================================
+if '__main__' == __name__ :
+    
+    
+    logger.info ( 80*'*'  ) 
+    logger.info (  __doc__ ) 
+    logger.info ( ' Author :  %s' % __author__ ) 
+    logger.info ( ' Date   :  %s' % __date__   )
+    ##
+    clines = set() 
+    logger.info ( ' Lines declared in default_config["STREAMS"] are' )
+    for stream in default_config['STREAMS'] :
+        lines = default_config['STREAMS'][stream] 
+        for l in lines :
+            logger.info ( ' %-15s : %-50s ' % ( stream , l ) )
+            clines.add ( l )
+    ##
+    logger.info ( ' The output locations for the default configuration: ' )
+    ##
+    config = default_config['CONFIG']
+    config['Debug'] = True
+    _conf = DiMuonInherit ( 'DiMuonInherit' ,  config = config)
+    ##
+    _ln   = ' ' + 61*'-' + '+' + 30*'-'
+    logger.info ( _ln ) 
+    logger.info ( '  %-60s| %-30s  ' % ( 'Output location', 'Stripping line name' ) ) 
+    logger.info ( _ln )
+    for l in _conf.lines() :
+        lout  = l.outputLocation()
+        lname = l.name() 
+        logger.info ( '  %-60s| %-30s  ' % ( lout, lname ) )
+        if not lname in clines :
+            raise AttributeError ('Unknown Line %s' % lname )
+        clines.remove ( lname )
+    logger.info ( _ln ) 
+    logger.info ( 80*'*'  ) 
+    if clines :
+        raise AttributeError('Undeclared lines: %s' % clines )
+
+    ## make dot-graphs 
+    try:    
+        selections = _conf._selections_private() 
+        for s in selections :
+            from SelPy.graph import graph
+            o = graph ( s , format = 'png' )
+            if o : logger.info  ( "Generate DOT-graph: %s"          % o        )
+            else : logger.error ( "Can't produce DOT=-graph for %s" % s.name() )
+            
+    except : pass
+        
+# =============================================================================
+# The END 
+# =============================================================================
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonNew.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonNew.py
new file mode 100644
index 000000000..b98e4af0e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingDiMuonNew.py
@@ -0,0 +1,1291 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Inclusive DiMuon lines based on the lines by Gaia Lanfranchi, Alessio Sarti,
+with inputs from Joel Bressieux, Giulia Manca, Matthew Needham and Patrick Robbe.
+
+Including the following lines:
+1. DiMuonLine
+   FullDST (keep 10%) and MicroDST 
+2. DiMuonSameSignLine
+   FullDST (keep  1%) and MicroDST (keep 10%)
+3. DiMuonExclusiveLine
+   Selection is the same as DiMuonLine at present,
+   a cut of "1mm upstream of any PV" applied further  
+4. DiMuonNoPVLine
+   Using the same selection as DiMuonExclusiveLine at present (except the PV cut)
+   Requring no reconstructed PV.   
+5. DiMuonHighMassLine                     
+6. DiMuonHighMassSameSignLine             
+7. DiMuonLowMassLine
+   Keep Hlt2UnbiasedDiMuonLowMassDecision triggered events 
+8. Jpsi2MuMuLine
+9. Psi2MuMuLine
+10. DiMuonDetachedLine
+11. Jpsi2MuMuDetachedLine
+
+
+More details can be found here:
+http://indico.cern.ch/contributionDisplay.py?contribId=2&confId=100755
+
+--------------------------
+To include lines for DiMuon stream
+--------------------------
+from StrippingSelections.StrippingDiMuonNew import DiMuonConf
+from StrippingSelections.StrippingDiMuonNew import config_default as config_FullDSTDiMuon
+FullDSTDiMuonConf = DiMuonConf( name = None, config =config_FullDSTDiMuon  )
+stream.appendLines( FullDSTDiMuonConf.lines() )
+
+--------------------------
+For MicroDST
+--------------------------
+from StrippingSelections.StrippingDiMuonNew import DiMuonConf
+from StrippingSelections.StrippingDiMuonNew import config_microDST as MicroDSTDiMuon
+MicroDSTDiMuonConf = DiMuonConf( name = 'MicroDST', config = MicroDSTDiMuon )
+stream.appendLines( MicroDSTDiMuonConf.lines() )
+
+
+'''
+
+__author__=['Jibo He']
+__date__ = '30/09/2010'
+__version__= '$Revision: 1.0 $'
+
+__all__ = (
+    'DiMuonConf'
+    , 'default_config'
+  )
+
+
+default_config = {
+    'TestFullDSTDiMuon':{
+    'BUILDERTYPE'       :       'DiMuonConf',
+    'CONFIG'    : {
+        'MicroDST'                                 :  False   ,
+                
+        # DiMuon line
+        'DiMuon_Prescale'                          :     1.   ,
+        'DiMuon_Postscale'                         :     1.   ,
+        'DiMuon_checkPV'                           : False    ,  
+        
+        'DiMuon_MuonPT'                            :   650.   ,  # MeV
+        'DiMuon_MuonP'                             : -8000.   ,  # MeV, no cut now 
+        'DiMuon_MuonTRCHI2DOF'                     :     5.   , 
+        'DiMuon_MinMass'                           :  3000.   ,  # MeV
+        'DiMuon_MaxMass'                           :  1.0e+8  ,  # MeV
+        'DiMuon_VCHI2PDOF'                         :    20.   , 
+        'DiMuon_PT'                                : -1000.   ,  # MeV, no cut now 
+
+        # DiMuonTIS line
+        'DiMuonTIS_Prescale'                       :     1.   ,
+        'DiMuonTIS_Postscale'                      :     1.   ,
+        'DiMuonTIS_checkPV'                        : False    ,  
+        'DiMuonTIS_TisTosSpecs'                    : { "L0(Muon|DiMuon|Electron|Photon|Hadron).*Decision%TIS":0,
+                                                       "Hlt1(?!ODIN)(?!L0)(?!Lumi)(?!Tell1)(?!MB)(?!NZS)(?!Velo)(?!BeamGas)(?!Incident).*Decision%TIS" : 0,
+                                                       "Hlt2(?!Forward)(?!DebugEvent)(?!Express)(?!Lumi)(?!Transparent)(?!PassThrough).*Decision%TIS" : 0 },
+
+        # DiMuon Same Sign line
+        'DiMuonSameSign_Prescale'                  :    1.  ,
+        'DiMuonSameSign_Postscale'                 :     1.   ,
+        'DiMuonSameSign_checkPV'                   : False    ,
+
+        # DiMuonPrescaled line
+        'DiMuonPrescaled_Prescale'                 :     0.1  ,
+        'DiMuonPrescaled_Postscale'                :     1.   ,
+        'DiMuonPrescaled_checkPV'                  : False    ,
+        
+        'DiMuonPrescaled_MuonPT'                   :   650.   ,  # MeV
+        'DiMuonPrescaled_MuonP'                    : -8000.   ,  # MeV, no cut now 
+        'DiMuonPrescaled_MuonTRCHI2DOF'            :     5.   , 
+        'DiMuonPrescaled_MinMass'                  :  3000.   ,  # MeV
+        'DiMuonPrescaled_MaxMass'                  :  1.0e+8  ,  # MeV
+        'DiMuonPrescaled_VCHI2PDOF'                :    20.   , 
+        'DiMuonPrescaled_PT'                       : -1000.   ,  # MeV, no cut now 
+        
+        # DiMuonExclusive line
+        'DiMuonExclusive_Prescale'                 :     0.   ,
+        'DiMuonExclusive_Postscale'                :     1.   ,
+        'DiMuonExclusive_checkPV'                  :  True    ,
+        
+        'DiMuonExclusive_MuonPT'                   :   650.   ,  # MeV
+        'DiMuonExclusive_MuonP'                    : -8000.   ,  # MeV, no cut now 
+        'DiMuonExclusive_MuonTRCHI2DOF'            :     5.   ,
+        'DiMuonExclusive_MuonPIDCut'               :    ""    ,
+        'DiMuonExclusive_MinMass'                  :  2900.   ,
+        'DiMuonExclusive_VCHI2PDOF'                :    20.   ,
+        'DiMuonExclusive_PT'                       : -1000.   ,  # MeV, no cut now 
+        'DiMuonExclusive_DZ'                       :    -1.   ,  # mm, upstream of any PV
+
+        # DiMuonNoPV line
+        'DiMuonNoPV_Prescale'                      :     1.   ,
+        'DiMuonNoPV_Postscale'                     :     1.   ,
+        
+        # DiMuon High Mass line
+        'DiMuonHighMass_Prescale'                  :     1.   ,
+        'DiMuonHighMass_Postscale'                 :     1.   ,
+        'DiMuonHighMass_checkPV'                   : False    ,
+        
+        'DiMuonHighMass_MuonPT'                    :  1000.   , # MeV
+        'DiMuonHighMass_MuonP'                     :  8000.   , # MeV 
+        'DiMuonHighMass_MuonTRCHI2DOF'             :     5.   ,
+        'DiMuonHighMass_MuonPIDCut'                : " & (MINTREE('mu+'==ABSID,PIDmu)>0)",
+        'DiMuonHighMass_MinMass'                   :  8500.   , # MeV
+        'DiMuonHighMass_VCHI2PDOF'                 :    20.   ,
+        'DiMuonHighMass_PT'                        : -1000.   , # MeV, no cut now
+
+        # DiMuon High Mass Same Sign line
+        'DiMuonHighMassSameSign_Prescale'          :     0.2  ,
+        'DiMuonHighMassSameSign_Postscale'         :     1.   ,
+        'DiMuonHighMassSameSign_checkPV'           : False    ,
+
+        # DiMuon Low Mass line
+        'DiMuonLowMass_Prescale'                   :     0.   ,
+        'DiMuonLowMass_Postscale'                  :     1.   ,
+        'DiMuonLowMass_checkPV'                    : False    , 
+        
+        'DiMuonLowMass_MuonPT'                     :   650.   ,  # MeV
+        'DiMuonLowMass_MuonP'                      : -8000.   ,  # MeV, no cut now
+        'DiMuonLowMass_MuonTRCHI2DOF'              :     5.   ,
+        'DiMuonLowMass_MuonPIDCut'                 :    ""    , 
+        'DiMuonLowMass_MinMass'                    :   500.   ,  # MeV
+        'DiMuonLowMass_VCHI2PDOF'                  :    20.   ,       
+        'DiMuonLowMass_PT'                         : -1000.   ,  # MeV, no cut now
+        'DiMuonLowMass_HLTFILTER'                : "(HLT_PASS('Hlt2DiMuonLowMassDecision'))",
+
+        # Jpsi2MuMu line
+        'Jpsi2MuMu_Prescale'                       :     1.   ,
+        'Jpsi2MuMu_Postscale'                      :     1.   ,
+        'Jpsi2MuMu_checkPV'                        : False    ,
+        
+        'Jpsi2MuMu_MuonPT'                         :   650.   ,  # MeV
+        'Jpsi2MuMu_MuonP'                          : 10000.   ,  # MeV
+        'Jpsi2MuMu_MuonPIDmu'                      :     0.   , 
+        'Jpsi2MuMu_MuonTRCHI2DOF'                  :     5.   , 
+        'Jpsi2MuMu_MinMass'                        :  3010.   ,  # MeV
+        'Jpsi2MuMu_MaxMass'                        :  3170.   ,  # MeV
+        'Jpsi2MuMu_VCHI2PDOF'                      :    20.   ,
+        'Jpsi2MuMu_PT'                             :  3000.   ,  # MeV
+        'Jpsi2MuMu_TisTosSpecs'                    : { "L0.*Mu.*Decision%TOS":0,
+                                                       "Hlt1DiMuonHighMassDecision%TOS" : 0,
+                                                       "Hlt2DiMuonJPsiHighPTDecision%TOS" : 0 },
+
+        # Psi2MuMu line
+        'Psi2MuMu_Prescale'                        :     1.   ,
+        'Psi2MuMu_Postscale'                       :     1.   ,
+        'Psi2MuMu_checkPV'                         : False    ,
+
+        'Psi2MuMu_ParticleName'                    : "'psi(2S)'", # Particle Name, like "'psi(2S)'"   
+        'Psi2MuMu_MuonPT'                          :  1000.   ,  # MeV
+        'Psi2MuMu_MuonP'                           : 10000.   ,  # MeV
+        'Psi2MuMu_MuonPIDmu'                       :     0.   , 
+        'Psi2MuMu_MuonTRCHI2DOF'                   :     5.   , 
+        'Psi2MuMu_MassWindow'                      :   100.   ,  # MeV
+        'Psi2MuMu_VCHI2PDOF'                       :    20.   ,
+        'Psi2MuMu_PT'                              :  3000.   ,   # MeV
+        'Psi2MuMu_TisTosSpecs'                     : { "L0.*Mu.*Decision%TOS":0,
+                                                       "Hlt1DiMuonHighMassDecision%TOS" : 0,
+                                                       "Hlt2DiMuonPsi2SHighPTDecision%TOS" : 0 },
+        
+        # DiMuonDetached line
+        'DiMuonDetached_Prescale'                 :     0.   ,
+        'DiMuonDetached_Postscale'                :     1.   ,
+        
+        'DiMuonDetached_MuonPT'                   :   500.   ,  # MeV
+        'DiMuonDetached_MuonP'                    : -8000.   ,  # MeV, no cut now
+        'DiMuonDetached_MuonPIDmu'                :    -5.   ,
+        'DiMuonDetached_MuonTRCHI2DOF'            :     5.   , 
+        'DiMuonDetached_MinMass'                  :  2950.   ,
+        'DiMuonDetached_VCHI2PDOF'                :    20.   ,
+        'DiMuonDetached_PT'                       : -1000.   ,  # MeV, no cut now 
+        'DiMuonDetached_LTCuts'                   :   " & ((BPVDLS>3)|(BPVDLS<-3))"    , 
+        
+        # Jpsi2MuMuDetached line
+        'Jpsi2MuMuDetached_Prescale'                       :     1.   ,
+        'Jpsi2MuMuDetached_Postscale'                      :     1.   ,
+        
+        'Jpsi2MuMuDetached_MuonPT'                         :   500.   ,  # MeV
+        'Jpsi2MuMuDetached_MuonP'                          : -8000.   ,  # MeV, no cut now
+        'Jpsi2MuMuDetached_MuonPIDmu'                      :     0.   , 
+        'Jpsi2MuMuDetached_MuonTRCHI2DOF'                  :     5.   , 
+        'Jpsi2MuMuDetached_MinMass'                        :  2996.916,  # MeV
+        'Jpsi2MuMuDetached_MaxMass'                        :  3196.916,  # MeV
+        'Jpsi2MuMuDetached_VCHI2PDOF'                      :    20.   ,
+        'Jpsi2MuMuDetached_PT'                             : -1000.   ,  # MeV
+        'Jpsi2MuMuDetached_LTCuts'                         :    " & ((BPVDLS>3)|(BPVDLS<-3))",
+
+        # Psi2MuMuDetachedDetached line
+        'Psi2MuMuDetached_Prescale'                        :     1.   ,
+        'Psi2MuMuDetached_Postscale'                       :     1.   ,
+
+        'Psi2MuMuDetached_ParticleName'                    : "'psi(2S)'", # Particle Name, like "'psi(2S)'"   
+        'Psi2MuMuDetached_MuonPT'                          :   500.   ,  # MeV
+        'Psi2MuMuDetached_MuonP'                           : -8000.   ,  # MeV, no cut now
+        'Psi2MuMuDetached_MuonPIDmu'                       :     0.   , 
+        'Psi2MuMuDetached_MuonTRCHI2DOF'                   :     5.   , 
+        'Psi2MuMuDetached_MassWindow'                      :   100.   ,  # MeV
+        'Psi2MuMuDetached_VCHI2PDOF'                       :    20.   ,
+        'Psi2MuMuDetached_PT'                              : -1000.   ,   # MeV, no cut now
+        'Psi2MuMuDetached_LTCuts'                          :  " & ((BPVDLS>3)|(BPVDLS<-3))"
+        },
+    'STREAMS' : { 'Dimuon' : [
+    "StrippingTestFullDSTDiMuonPsi2MuMuTOSLine",
+    "StrippingTestFullDSTDiMuonJpsi2MuMuTOSLine",
+    "StrippingTestFullDSTDiMuonPsi2MuMuDetachedLine",
+    "StrippingTestFullDSTDiMuonJpsi2MuMuDetachedLine",
+    "StrippingTestFullDSTDiMuonDiMuonNoPVLine",
+    'StrippingTestFullDSTDiMuonDiMuonHighMassLine',
+    'StrippingTestFullDSTDiMuonDiMuonHighMassSameSignLine'
+    
+    ]},
+    'WGs'    : [ 'BandQ' ]
+    },
+
+    'TestMicroDSTDiMuon' :{
+    'BUILDERTYPE' : 'DiMuonConf',
+    'CONFIG' : {
+        'MicroDST'                                 :   True   ,
+    
+        # DiMuon line
+        'DiMuon_Prescale'                          :     1.   ,
+        'DiMuon_Postscale'                         :     1.   ,
+        'DiMuon_checkPV'                           : False    ,  
+        
+        'DiMuon_MuonPT'                            :   650.   ,  # MeV
+        'DiMuon_MuonP'                             : -8000.   ,  # MeV, no cut now 
+        'DiMuon_MuonTRCHI2DOF'                     :     5.   , 
+        'DiMuon_MinMass'                           :  3000.   ,  # MeV
+        'DiMuon_MaxMass'                           :  1.0e+8  ,  # MeV
+        'DiMuon_VCHI2PDOF'                         :    20.   , 
+        'DiMuon_PT'                                : -1000.   ,  # MeV
+
+        # DiMuonTIS line
+        'DiMuonTIS_Prescale'                       :     1.   ,
+        'DiMuonTIS_Postscale'                      :     1.   ,
+        'DiMuonTIS_checkPV'                        : False    ,  
+        'DiMuonTIS_TisTosSpecs'                    : { "L0(Muon|DiMuon|Electron|Photon|Hadron).*Decision%TIS":0,
+                                                       "Hlt1(?!ODIN)(?!L0)(?!Lumi)(?!Tell1)(?!MB)(?!NZS)(?!Velo)(?!BeamGas)(?!Incident).*Decision%TIS" : 0,
+                                                       "Hlt2(?!Forward)(?!DebugEvent)(?!Express)(?!Lumi)(?!Transparent)(?!PassThrough).*Decision%TIS" : 0 },
+
+        # DiMuon Same Sign line
+        'DiMuonSameSign_Prescale'                  :     0.5 ,
+        'DiMuonSameSign_Postscale'                 :     1.   ,
+        'DiMuonSameSign_checkPV'                   :  False   ,
+
+        # DiMuonPrescaled line
+        'DiMuonPrescaled_Prescale'                 :     0.1  ,
+        'DiMuonPrescaled_Postscale'                :     1.   ,
+        'DiMuonPrescaled_checkPV'                  : False    ,
+        
+        'DiMuonPrescaled_MuonPT'                   :   650.   ,  # MeV
+        'DiMuonPrescaled_MuonP'                    : -8000.   ,  # MeV, no cut now 
+        'DiMuonPrescaled_MuonTRCHI2DOF'            :     5.   ,
+        'DiMuonPrescaled_MinMass'                  :  3000.   ,  # MeV
+        'DiMuonPrescaled_MaxMass'                  :  1.0e+8  ,  # MeV
+        'DiMuonPrescaled_VCHI2PDOF'                :    20.   , 
+        'DiMuonPrescaled_PT'                       : -1000.   ,  # MeV, no cut now 
+
+        # DiMuonExclusive line
+        'DiMuonExclusive_Prescale'                 :     1.   ,
+        'DiMuonExclusive_Postscale'                :     1.   ,
+        'DiMuonExclusive_checkPV'                  :  True    ,
+        
+        'DiMuonExclusive_MuonPT'                   :   650.   ,  # MeV
+        'DiMuonExclusive_MuonP'                    : -8000.   ,  # MeV, no cut now 
+        'DiMuonExclusive_MuonTRCHI2DOF'            :     5.   ,
+        'DiMuonExclusive_MuonPIDCut'               :    ""    ,
+        'DiMuonExclusive_MinMass'                  :  2900.   ,
+        'DiMuonExclusive_VCHI2PDOF'                :    20.   ,
+        'DiMuonExclusive_PT'                       : -1000.   ,  # MeV, no cut now 
+        'DiMuonExclusive_DZ'                       :    -1.   ,  # mm, upstream of any PV
+
+        # DiMuonNoPV line
+        'DiMuonNoPV_Prescale'                      :     1.   ,
+        'DiMuonNoPV_Postscale'                     :     1.   ,
+               
+        # DiMuon High Mass line
+        'DiMuonHighMass_Prescale'                  :     1.   ,
+        'DiMuonHighMass_Postscale'                 :     1.   ,
+        'DiMuonHighMass_checkPV'                   :  True    ,
+        
+        'DiMuonHighMass_MuonPT'                    :   650.   , # MeV
+        'DiMuonHighMass_MuonP'                     : -8000.   , 
+        'DiMuonHighMass_MuonTRCHI2DOF'             :     5.   ,
+        'DiMuonHighMass_MuonPIDCut'                : " & (MINTREE('mu+'==ABSID,PIDmu)>0)",
+        'DiMuonHighMass_MinMass'                   :  8000.   , # MeV
+        'DiMuonHighMass_VCHI2PDOF'                 :    20.   ,
+        'DiMuonHighMass_PT'                        : -1000.   , # MeV, no cut now 
+
+        # DiMuon High Mass Same Sign line
+        'DiMuonHighMassSameSign_Prescale'          :     1.   ,
+        'DiMuonHighMassSameSign_Postscale'         :     1.   ,
+        'DiMuonHighMassSameSign_checkPV'           :  True    ,
+
+        # DiMuon Low Mass line
+        'DiMuonLowMass_Prescale'                   :     1.   ,
+        'DiMuonLowMass_Postscale'                  :     1.   ,
+        'DiMuonLowMass_checkPV'                    :  True    , 
+        
+        'DiMuonLowMass_MuonPT'                     :   650.   ,  # MeV
+        'DiMuonLowMass_MuonP'                      : -8000.   ,  # MeV, no cut now
+        'DiMuonLowMass_MuonPIDCut'                 : ""       , 
+        'DiMuonLowMass_MuonTRCHI2DOF'              :     5.   , 
+        'DiMuonLowMass_MinMass'                    :   500.   ,  # MeV
+        'DiMuonLowMass_VCHI2PDOF'                  :    20.   ,       
+        'DiMuonLowMass_PT'                         : -1000.   ,  # MeV, no cut now
+        'DiMuonLowMass_HLTFILTER'                : "(HLT_PASS('Hlt2DiMuonLowMassDecision'))",
+
+        # Jpsi2MuMu line
+        'Jpsi2MuMu_Prescale'                       :     1.   ,
+        'Jpsi2MuMu_Postscale'                      :     1.   ,
+        'Jpsi2MuMu_checkPV'                        :  True    ,
+        
+        'Jpsi2MuMu_MuonPT'                         :   650.   ,  # MeV
+        'Jpsi2MuMu_MuonP'                          : -8000.   ,  # MeV, no cut now
+        'Jpsi2MuMu_MuonPIDmu'                      :    -5.   ,  
+        'Jpsi2MuMu_MuonTRCHI2DOF'                  :     5.   , 
+        'Jpsi2MuMu_MinMass'                        :  2976.916,  # MeV
+        'Jpsi2MuMu_MaxMass'                        :  3216.916,  # MeV
+        'Jpsi2MuMu_VCHI2PDOF'                      :    20.   ,
+        'Jpsi2MuMu_PT'                             :  3000.0  ,  # MeV
+        'Jpsi2MuMu_TisTosSpecs'                    : { "L0.*Mu.*Decision%TOS":0,
+                                                       "Hlt1DiMuonHighMassDecision%TOS" : 0,
+                                                       "Hlt2DiMuonJPsiHighPTDecision%TOS" : 0 },
+
+        # Psi2MuMu line
+        'Psi2MuMu_Prescale'                        :     1.   ,
+        'Psi2MuMu_Postscale'                       :     1.   ,
+        'Psi2MuMu_checkPV'                         :  True    ,
+
+        'Psi2MuMu_ParticleName'                    : "'psi(2S)'", # Particle Name, like "'psi(2S)'"   
+        'Psi2MuMu_MuonPT'                          :   650.   ,  # MeV
+        'Psi2MuMu_MuonP'                           : -8000.   ,  # MeV
+        'Psi2MuMu_MuonPIDmu'                       :    -5.   , 
+        'Psi2MuMu_MuonTRCHI2DOF'                   :     5.   , 
+        'Psi2MuMu_MassWindow'                      :   120.   ,  # MeV
+        'Psi2MuMu_VCHI2PDOF'                       :    20.   ,
+        'Psi2MuMu_PT'                              :  3000.   ,  # MeV
+        'Psi2MuMu_TisTosSpecs'                     : { "L0.*Mu.*Decision%TOS":0,
+                                                       "Hlt1DiMuonHighMassDecision%TOS" : 0,
+                                                       "Hlt2DiMuonPsi2SHighPTDecision%TOS" : 0 }, 
+
+        # DiMuonDetached line
+        'DiMuonDetached_Prescale'                 :     1.   ,
+        'DiMuonDetached_Postscale'                :     1.   ,
+        
+        'DiMuonDetached_MuonPT'                   :   500.   ,  # MeV
+        'DiMuonDetached_MuonP'                    : -8000.   ,  # MeV, no cut now
+        'DiMuonDetached_MuonPIDmu'                :    -5.   ,
+        'DiMuonDetached_MuonTRCHI2DOF'            :     5.   , 
+        'DiMuonDetached_MinMass'                  :  2950.   ,
+        'DiMuonDetached_VCHI2PDOF'                :    20.   ,
+        'DiMuonDetached_PT'                       : -1000.   ,  # MeV, no cut now 
+        'DiMuonDetached_LTCuts'                   :    " & ((BPVDLS>5) | (BPVDLS<-3))"   ,  # mm,
+        
+        # Jpsi2MuMuDetached line
+        'Jpsi2MuMuDetached_Prescale'                       :     1.   ,
+        'Jpsi2MuMuDetached_Postscale'                      :     1.   ,
+        
+        'Jpsi2MuMuDetached_MuonPT'                         :   500.   ,  # MeV
+        'Jpsi2MuMuDetached_MuonP'                          : -8000.   ,  # MeV, no cut now
+        'Jpsi2MuMuDetached_MuonPIDmu'                      :    -5.   , 
+        'Jpsi2MuMuDetached_MuonTRCHI2DOF'                  :     5.   , 
+        'Jpsi2MuMuDetached_MinMass'                        :  2976.916,  # MeV
+        'Jpsi2MuMuDetached_MaxMass'                        :  3216.916,  # MeV
+        'Jpsi2MuMuDetached_VCHI2PDOF'                      :    20.   ,
+        'Jpsi2MuMuDetached_PT'                             : -1000.   ,  # MeV
+        'Jpsi2MuMuDetached_LTCuts'                         :   " & ((BPVDLS>3 | (BPVDLS<-3))"  ,
+
+        # Psi2MuMuDetachedDetached line
+        'Psi2MuMuDetached_Prescale'                        :     1.   ,
+        'Psi2MuMuDetached_Postscale'                       :     1.   ,
+
+        'Psi2MuMuDetached_ParticleName'                    : "'psi(2S)'", # Particle Name, like "'psi(2S)'"   
+        'Psi2MuMuDetached_MuonPT'                          :   500.   ,  # MeV
+        'Psi2MuMuDetached_MuonP'                           : -8000.   ,  # MeV, no cut now
+        'Psi2MuMuDetached_MuonPIDmu'                       :    -5.   , 
+        'Psi2MuMuDetached_MuonTRCHI2DOF'                   :     5.   , 
+        'Psi2MuMuDetached_MassWindow'                      :   120.   ,  # MeV
+        'Psi2MuMuDetached_VCHI2PDOF'                       :    20.   ,
+        'Psi2MuMuDetached_PT'                              : -1000.   ,   # MeV, no cut now
+        'Psi2MuMuDetached_LTCuts'                          :   " & ((BPVDLS>3) | (BPVDLS<-3))"    
+        }, 
+    'STREAMS' : {'Leptonic' :[
+                      "StrippingTestMicroDSTDiMuonDiMuonSameSignLine",
+                      "StrippingTestMicroDSTDiMuonDiMuonIncLine"
+                      ]} ,
+    'WGs'    : [ 'BandQ' ]
+    }
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from Configurables import LoKi__VoidFilter
+from PhysSelPython.Wrappers import Selection, DataOnDemand, EventSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class DiMuonConf(LineBuilder):
+    
+    __configuration_keys__ = (
+        "MicroDST",
+        
+        # DiMuon line
+        'DiMuon_Prescale',
+        'DiMuon_Postscale',
+        'DiMuon_checkPV',
+        
+        'DiMuon_MuonPT',
+        'DiMuon_MuonP',
+        'DiMuon_MuonTRCHI2DOF', 
+        'DiMuon_MinMass',
+        'DiMuon_MaxMass',   
+        'DiMuon_VCHI2PDOF',
+        'DiMuon_PT',
+#        'DiMuon_PT_oldTh',
+
+        # DiMuonTIS line
+        'DiMuonTIS_Prescale',
+        'DiMuonTIS_Postscale',
+        'DiMuonTIS_TisTosSpecs',
+        'DiMuonTIS_checkPV',
+
+        # DiMuon Same Sign line
+        'DiMuonSameSign_Prescale',
+        'DiMuonSameSign_Postscale',
+        'DiMuonSameSign_checkPV',
+        
+        # DiMuonPrescaled line
+        'DiMuonPrescaled_Prescale',
+        'DiMuonPrescaled_Postscale',
+        'DiMuonPrescaled_checkPV',
+        
+        'DiMuonPrescaled_MuonPT',
+        'DiMuonPrescaled_MuonP',
+        'DiMuonPrescaled_MuonTRCHI2DOF', 
+        'DiMuonPrescaled_MinMass',
+        'DiMuonPrescaled_MaxMass',   
+        'DiMuonPrescaled_VCHI2PDOF',
+        'DiMuonPrescaled_PT', 
+        
+        # DiMuonExclusive line
+        'DiMuonExclusive_Prescale',
+        'DiMuonExclusive_Postscale',
+        'DiMuonExclusive_checkPV',
+        
+        'DiMuonExclusive_MuonPT',
+        'DiMuonExclusive_MuonP',
+        'DiMuonExclusive_MuonTRCHI2DOF',
+        'DiMuonExclusive_MuonPIDCut',
+        'DiMuonExclusive_MinMass',
+        'DiMuonExclusive_VCHI2PDOF',
+        'DiMuonExclusive_PT',
+        'DiMuonExclusive_DZ',
+
+        # DiMuonNoPV line
+        'DiMuonNoPV_Prescale',
+        'DiMuonNoPV_Postscale',
+        
+        # DiMuon High Mass line
+        'DiMuonHighMass_Prescale',
+        'DiMuonHighMass_Postscale',
+        'DiMuonHighMass_checkPV',
+        
+        'DiMuonHighMass_MuonPT',
+        'DiMuonHighMass_MuonP',
+        'DiMuonHighMass_MuonTRCHI2DOF',
+        'DiMuonHighMass_MuonPIDCut',
+        'DiMuonHighMass_MinMass',
+        'DiMuonHighMass_VCHI2PDOF',
+        'DiMuonHighMass_PT',
+
+        # DiMuonHighMassSameSign line
+        'DiMuonHighMassSameSign_Prescale',
+        'DiMuonHighMassSameSign_Postscale',
+        'DiMuonHighMassSameSign_checkPV',
+
+        # DiMuon Low Mass line
+        'DiMuonLowMass_Prescale',
+        'DiMuonLowMass_Postscale',
+        'DiMuonLowMass_checkPV',
+        
+        'DiMuonLowMass_MuonPT',
+        'DiMuonLowMass_MuonP',
+        'DiMuonLowMass_MuonTRCHI2DOF',
+        'DiMuonLowMass_MuonPIDCut',
+        'DiMuonLowMass_MinMass',
+        'DiMuonLowMass_VCHI2PDOF',       
+        'DiMuonLowMass_PT',
+        'DiMuonLowMass_HLTFILTER',
+        # Tight Jpsi line
+        'Jpsi2MuMu_Prescale',
+        'Jpsi2MuMu_Postscale',
+        'Jpsi2MuMu_checkPV',
+        
+        'Jpsi2MuMu_MuonPT',
+        'Jpsi2MuMu_MuonP',
+        'Jpsi2MuMu_MuonPIDmu',
+        'Jpsi2MuMu_MuonTRCHI2DOF', 
+        'Jpsi2MuMu_MinMass',
+        'Jpsi2MuMu_MaxMass',
+        'Jpsi2MuMu_VCHI2PDOF',
+        'Jpsi2MuMu_PT',
+        'Jpsi2MuMu_TisTosSpecs',
+        
+        # Tight Psi(2S) line
+        'Psi2MuMu_Prescale',
+        'Psi2MuMu_Postscale',
+        'Psi2MuMu_checkPV',
+
+        'Psi2MuMu_ParticleName', 
+        'Psi2MuMu_MuonPT',
+        'Psi2MuMu_MuonP',
+        'Psi2MuMu_MuonPIDmu',
+        'Psi2MuMu_MuonTRCHI2DOF', 
+        'Psi2MuMu_MassWindow',
+        'Psi2MuMu_VCHI2PDOF',
+        'Psi2MuMu_PT',
+        'Psi2MuMu_TisTosSpecs', 
+        
+        # DiMuonDetached line
+        'DiMuonDetached_Prescale',
+        'DiMuonDetached_Postscale',
+        
+        'DiMuonDetached_MuonPT',
+        'DiMuonDetached_MuonP',
+        'DiMuonDetached_MuonPIDmu',
+        'DiMuonDetached_MuonTRCHI2DOF', 
+        'DiMuonDetached_MinMass',
+        'DiMuonDetached_VCHI2PDOF',
+        'DiMuonDetached_PT',
+        'DiMuonDetached_LTCuts',
+        
+        # Jpsi2MuMuDetached line
+        'Jpsi2MuMuDetached_Prescale',
+        'Jpsi2MuMuDetached_Postscale',
+        
+        'Jpsi2MuMuDetached_MuonPT',
+        'Jpsi2MuMuDetached_MuonP',
+        'Jpsi2MuMuDetached_MuonPIDmu',
+        'Jpsi2MuMuDetached_MuonTRCHI2DOF', 
+        'Jpsi2MuMuDetached_MinMass',
+        'Jpsi2MuMuDetached_MaxMass',
+        'Jpsi2MuMuDetached_VCHI2PDOF',
+        'Jpsi2MuMuDetached_PT',
+        'Jpsi2MuMuDetached_LTCuts',
+#        'Jpsi2MuMuDetached_MinusLTCuts',
+        
+        # Psi2MuMuDetached line
+        'Psi2MuMuDetached_Prescale',
+        'Psi2MuMuDetached_Postscale',
+
+        'Psi2MuMuDetached_ParticleName',  
+        'Psi2MuMuDetached_MuonPT',
+        'Psi2MuMuDetached_MuonP',
+        'Psi2MuMuDetached_MuonPIDmu',
+        'Psi2MuMuDetached_MuonTRCHI2DOF',
+        'Psi2MuMuDetached_MassWindow',
+        'Psi2MuMuDetached_VCHI2PDOF',
+        'Psi2MuMuDetached_PT',
+        'Psi2MuMuDetached_LTCuts',
+#        'Psi2MuMuDetached_MinusLTCuts'       
+        )
+    
+
+
+
+    
+    def __init__(self, name, config):
+        
+        LineBuilder.__init__(self, name, config)
+
+        # if name not set outside, set it to empty 
+        if name == None:
+            name = ""        
+
+            
+        """
+        DiMuon line 
+        """
+        self.SelDiMuon = filterDiMuonWMax( name + 'DiMuon',
+                                           MuonPT        = config['DiMuon_MuonPT'],
+                                           MuonP         = config['DiMuon_MuonP'],
+                                           MuonTRCHI2DOF = config['DiMuon_MuonTRCHI2DOF'],
+                                           MuMuMinMass   = config['DiMuon_MinMass'],
+                                           MuMuMaxMass   = config['DiMuon_MaxMass'],
+                                           MuMuVCHI2PDOF = config['DiMuon_VCHI2PDOF'],
+                                           MuMuPT        = config['DiMuon_PT']
+                                       )
+
+        self.DiMuonLine = StrippingLine( name + 'DiMuonInc' + 'Line',
+                                         prescale  = config['DiMuon_Prescale'],
+                                         postscale = config['DiMuon_Postscale'],
+                                         checkPV   = config['DiMuon_checkPV'],
+                                         selection = self.SelDiMuon
+                                         )
+# Line merged to DiMuon
+#        """
+#        DiMuonLowPT line (Complementary line for 2012 restripping, including only events with pT(Jpsi) < DiMuon_PT_oldTh
+#        """
+#        self.SelDiMuonLowPT = filterDiMuonWMax( name + 'DiMuonLowPT',
+#                                           MuonPT        = config['DiMuon_MuonPT'],
+#                                           MuonP         = config['DiMuon_MuonP'],
+#                                           MuonTRCHI2DOF = config['DiMuon_MuonTRCHI2DOF'],
+#                                           MuMuMinMass   = config['DiMuon_MinMass'],
+#                                           MuMuMaxMass   = config['DiMuon_MaxMass'],
+#                                           MuMuVCHI2PDOF = config['DiMuon_VCHI2PDOF'],
+#                                           MuMuPT        = config['DiMuon_PT_oldTh'],
+#                                           reversePtCut  = True
+#                                       )
+#
+#        self.DiMuonLowPTLine = StrippingLine( name + 'DiMuonIncLowPT' + 'Line',
+#                                         prescale  = config['DiMuon_Prescale'],
+#                                         postscale = config['DiMuon_Postscale'],
+#                                         checkPV   = config['DiMuon_checkPV'],
+#                                         selection = self.SelDiMuonLowPT
+#                                         )
+
+        """
+        DiMuon same sign line
+        """
+        self.SelDiMuonSameSign = filterDiMuonSameSign( name + 'DiMuonSameSign',
+                                                       MuonPT        = config['DiMuon_MuonPT'],
+                                                       MuonP         = config['DiMuon_MuonP'],
+                                                       MuonTRCHI2DOF = config['DiMuon_MuonTRCHI2DOF'],
+                                                       MuMuMinMass   = config['DiMuon_MinMass'],
+                                                       MuMuVCHI2PDOF = config['DiMuon_VCHI2PDOF'],
+                                                       MuMuPT        = config['DiMuon_PT']
+                                                       )
+        self.DiMuonSameSignLine = StrippingLine( name + 'DiMuonSameSign' + 'Line',
+                                                 prescale  = config['DiMuonSameSign_Prescale'],
+                                                 postscale = config['DiMuonSameSign_Postscale'],
+                                                 checkPV   = config['DiMuonSameSign_checkPV'],
+                                                 selection = self.SelDiMuonSameSign
+                                                 )
+
+        """
+        DiMuonTIS
+        """
+        self.DiMuonTISSel = filterTisTos( name + "TISDiMuon",
+                                          DiMuonInput = self.SelDiMuon,
+                                          myTisTosSpecs = config['DiMuonTIS_TisTosSpecs']
+                                          )
+        
+        self.DiMuonTISLine = StrippingLine( name + 'DiMuonTIS' + 'Line',
+                                               prescale  = config['Jpsi2MuMu_Prescale'],
+                                               postscale = config['Jpsi2MuMu_Postscale'],
+                                               checkPV   = config['Jpsi2MuMu_checkPV'],
+                                               selection = self.DiMuonTISSel
+                                               )
+        
+        """
+        DiMuonPrescaled line
+        """
+        self.SelDiMuonPrescaled = filterDiMuonWMax( name + 'DiMuonPrescaled',
+                                                    MuonPT        = config['DiMuonPrescaled_MuonPT'],
+                                                    MuonP         = config['DiMuonPrescaled_MuonP'],
+                                                    MuonTRCHI2DOF = config['DiMuonPrescaled_MuonTRCHI2DOF'],
+                                                    MuMuMinMass   = config['DiMuonPrescaled_MinMass'],
+                                                    MuMuMaxMass   = config['DiMuonPrescaled_MaxMass'],
+                                                    MuMuVCHI2PDOF = config['DiMuonPrescaled_VCHI2PDOF'],
+                                                    MuMuPT        = config['DiMuonPrescaled_PT']
+                                                    )
+        
+        self.DiMuonPrescaledLine = StrippingLine( name + 'DiMuonPrescaled' + 'Line',
+                                                  prescale  = config['DiMuonPrescaled_Prescale'],
+                                                  postscale = config['DiMuonPrescaled_Postscale'],
+                                                  checkPV   = config['DiMuonPrescaled_checkPV'],
+                                                  selection = self.SelDiMuonPrescaled
+                                                  )
+        
+        
+        """
+        DiMuonExclusiveline
+        """
+        self.SelDiMuonExclusive = filterDiMuonAndDZ( name + 'DiMuonExclusive',
+                                                     MuonPT        = config['DiMuonExclusive_MuonPT'],
+                                                     MuonP         = config['DiMuonExclusive_MuonP'],
+                                                     MuonTRCHI2DOF = config['DiMuonExclusive_MuonTRCHI2DOF'],
+                                                     MuMuMinMass   = config['DiMuonExclusive_MinMass'],
+                                                     MuMuVCHI2PDOF = config['DiMuonExclusive_VCHI2PDOF'],
+                                                     MuMuPT        = config['DiMuonExclusive_PT'],
+                                                     MuMuDZ        = config['DiMuonExclusive_DZ']
+                                                     )
+                
+        self.DiMuonExclusiveLine = StrippingLine( name + 'DiMuonExclusive' + 'Line',
+                                                  prescale  = config['DiMuonExclusive_Prescale'],
+                                                  postscale = config['DiMuonExclusive_Postscale'],
+                                                  checkPV   = config['DiMuonExclusive_checkPV'],
+                                                  selection = self.SelDiMuonExclusive
+                                                  )
+
+        """
+        DiMuonNoPVline
+        """
+        self.SelDiMuonNoPV = filterDiMuon( name + 'DiMuonNoPV',
+                                           MuonPT        = config['DiMuonExclusive_MuonPT'],
+                                           MuonP         = config['DiMuonExclusive_MuonP'],
+                                           MuonTRCHI2DOF = config['DiMuonExclusive_MuonTRCHI2DOF'],
+                                           MuonPIDCut    = config['DiMuonExclusive_MuonPIDCut'], 
+                                           MuMuMinMass   = config['DiMuonExclusive_MinMass'],
+                                           MuMuVCHI2PDOF = config['DiMuonExclusive_VCHI2PDOF'],
+                                           MuMuPT        = config['DiMuonExclusive_PT']
+                                           )
+
+        self.DiMuonNoPVLine = StrippingLine( name + 'DiMuonNoPV' + 'Line',
+                                             prescale  = config['DiMuonNoPV_Prescale'],
+                                             postscale = config['DiMuonNoPV_Postscale'],
+                                             checkPV   = False,
+                                             FILTER = { 'Code'       : "recSummary(LHCb.RecSummary.nPVs, 'Rec/Vertex/Primary')<0.5" , 
+                                                        'Preambulo'  : [ 'from LoKiTracks.decorators import *' ,
+                                                                         'from LoKiNumbers.decorators    import *',
+                                                                         'from LoKiCore.functions    import *' ]
+                                                        },
+                                             selection = self.SelDiMuonNoPV
+                                             )       
+        
+        """
+        DiMuon High Mass line
+        """
+        self.SelDiMuonHighMass = filterDiMuon( name + 'DiMuonHighMass',
+                                               MuonPT        = config['DiMuonHighMass_MuonPT'],
+                                               MuonP         = config['DiMuonHighMass_MuonP'],
+                                               MuonTRCHI2DOF = config['DiMuonHighMass_MuonTRCHI2DOF'],
+                                               MuonPIDCut    = config['DiMuonHighMass_MuonPIDCut'],
+                                               MuMuMinMass   = config['DiMuonHighMass_MinMass'],
+                                               MuMuVCHI2PDOF = config['DiMuonHighMass_VCHI2PDOF'],
+                                               MuMuPT        = config['DiMuonHighMass_PT']                                               
+                                               )
+        self.DiMuonHighMassLine = StrippingLine( name + 'DiMuonHighMass' + 'Line',
+                                                 prescale  = config['DiMuonHighMass_Prescale'],
+                                                 postscale = config['DiMuonHighMass_Postscale'],
+                                                 checkPV   = config['DiMuonHighMass_checkPV'],
+                                                 selection = self.SelDiMuonHighMass
+                                                 )
+
+
+        
+        """
+        DiMuon High Mass Same Sign line
+        """
+        self.SelDiMuonHighMassSameSign = filterDiMuonSameSign( name + 'DiMuonHighMassSameSign',
+                                                               MuonPT        = config['DiMuonHighMass_MuonPT'],
+                                                               MuonP         = config['DiMuonHighMass_MuonP'],
+                                                               MuonTRCHI2DOF = config['DiMuonHighMass_MuonTRCHI2DOF'],
+                                                               MuMuMinMass   = config['DiMuonHighMass_MinMass'],
+                                                               MuMuVCHI2PDOF = config['DiMuonHighMass_VCHI2PDOF'],
+                                                               MuMuPT        = config['DiMuonHighMass_PT']
+                                                               )
+        
+        self.DiMuonHighMassSameSignLine = StrippingLine( name + 'DiMuonHighMassSameSign' + 'Line',
+                                                         prescale  = config['DiMuonHighMassSameSign_Prescale'],
+                                                         postscale = config['DiMuonHighMassSameSign_Postscale'],
+                                                         checkPV   = config['DiMuonHighMassSameSign_checkPV'],
+                                                         selection = self.SelDiMuonHighMassSameSign
+                                                         )
+
+
+        
+        """
+        DiMuon Low Mass line
+        """
+        self.SelDiMuonLowMass = filterDiMuon( name + 'DiMuonLowMass',
+                                              MuonPT        = config['DiMuonLowMass_MuonPT'],
+                                              MuonP         = config['DiMuonLowMass_MuonP'],
+                                              MuonTRCHI2DOF = config['DiMuonLowMass_MuonTRCHI2DOF'],
+                                              MuonPIDCut    = config['DiMuonLowMass_MuonPIDCut'], 
+                                              MuMuMinMass   = config['DiMuonLowMass_MinMass'],
+                                              MuMuVCHI2PDOF = config['DiMuonLowMass_VCHI2PDOF'],
+                                              MuMuPT        = config['DiMuonLowMass_PT']
+                                              )
+        self.DiMuonLowMassLine = StrippingLine( name + 'DiMuonLowMass' + 'Line',
+                                                HLT = config['DiMuonLowMass_HLTFILTER'],
+                                                prescale  = config['DiMuonLowMass_Prescale'],
+                                                postscale = config['DiMuonLowMass_Postscale'],
+                                                checkPV   = config['DiMuonLowMass_checkPV'],
+                                                selection = self.SelDiMuonLowMass 
+                                                )
+        
+        """
+        Jpsi-> mumu tight line
+        """
+        self.SelJpsi2MuMu = filterJpsi2MuMu( name + 'Jpsi2MuMu',
+                                             MuonPT        = config['Jpsi2MuMu_MuonPT'],
+                                             MuonP         = config['Jpsi2MuMu_MuonP'],
+                                             MuonPIDmu     = config['Jpsi2MuMu_MuonPIDmu'],
+                                             MuonTRCHI2DOF = config['Jpsi2MuMu_MuonTRCHI2DOF'],
+                                             MuMuMinMass   = config['Jpsi2MuMu_MinMass'],
+                                             MuMuMaxMass   = config['Jpsi2MuMu_MaxMass'],
+                                             MuMuVCHI2PDOF = config['Jpsi2MuMu_VCHI2PDOF'],
+                                             MuMuPT        = config['Jpsi2MuMu_PT']
+                                             )
+        self.Jpsi2MuMuLine = StrippingLine( name + 'Jpsi2MuMu' + 'Line',
+                                            prescale  = config['Jpsi2MuMu_Prescale'],
+                                            postscale = config['Jpsi2MuMu_Postscale'],
+                                            checkPV   = config['Jpsi2MuMu_checkPV'],
+                                            selection = self.SelJpsi2MuMu
+                                            )
+
+        """
+        Jpsi2MuMuTOS
+        """
+        self.TOSJpsi2MuMu = filterTisTos( name + "TOSJpsi2MuMu",
+                                          DiMuonInput = self.SelJpsi2MuMu,
+                                          myTisTosSpecs = config['Jpsi2MuMu_TisTosSpecs']
+                                          )
+        
+        self.Jpsi2MuMuTOSLine = StrippingLine( name + 'Jpsi2MuMuTOS' + 'Line',
+                                               prescale  = config['Jpsi2MuMu_Prescale'],
+                                               postscale = config['Jpsi2MuMu_Postscale'],
+                                               checkPV   = config['Jpsi2MuMu_checkPV'],
+                                               selection = self.TOSJpsi2MuMu
+                                               )
+
+        """
+        Psi(2S)->mumu tight line
+        """
+        self.SelPsi2MuMu = filterSignal( name + 'Psi2MuMu',
+                                         ParticleName  = config['Psi2MuMu_ParticleName'],
+                                         MuonPT        = config['Psi2MuMu_MuonPT'],
+                                         MuonP         = config['Psi2MuMu_MuonP'],
+                                         MuonPIDmu     = config['Psi2MuMu_MuonPIDmu'],  
+                                         MuonTRCHI2DOF = config['Psi2MuMu_MuonTRCHI2DOF'],
+                                         MuMuMassWindow= config['Psi2MuMu_MassWindow'],                                          
+                                         MuMuVCHI2PDOF = config['Psi2MuMu_VCHI2PDOF'],
+                                         MuMuPT        = config['Psi2MuMu_PT']
+                                         )
+
+        self.Psi2MuMuLine = StrippingLine( name + 'Psi2MuMu' + 'Line',
+                                           prescale  = config['Psi2MuMu_Prescale'],
+                                           postscale = config['Psi2MuMu_Postscale'],
+                                           checkPV   = config['Psi2MuMu_checkPV'],
+                                           selection = self.SelPsi2MuMu
+                                           )
+
+        
+        """
+        Psi2MuMuTOS
+        """
+        self.TOSPsi2MuMu = filterTisTos( name + "TOSPsi2MuMu",
+                                         DiMuonInput = self.SelPsi2MuMu,
+                                         myTisTosSpecs = config['Psi2MuMu_TisTosSpecs']
+                                         )
+        
+        self.Psi2MuMuTOSLine = StrippingLine( name + 'Psi2MuMuTOS' + 'Line',
+                                              prescale  = config['Psi2MuMu_Prescale'],
+                                              postscale = config['Psi2MuMu_Postscale'],
+                                              checkPV   = config['Psi2MuMu_checkPV'],
+                                              selection = self.TOSPsi2MuMu
+                                              )
+        
+        
+        """
+        DiMuonDetachedline
+        """
+        self.SelDiMuonDetached = filterDiMuonDetached( name + 'DiMuonDetached',
+                                                       MuonPT        = config['DiMuonDetached_MuonPT'],
+                                                       MuonP         = config['DiMuonDetached_MuonP'],
+                                                       MuonPIDmu     = config['DiMuonDetached_MuonPIDmu'],
+                                                       MuonTRCHI2DOF = config['DiMuonDetached_MuonTRCHI2DOF'],
+                                                       MuMuMinMass   = config['DiMuonDetached_MinMass'],
+                                                       MuMuVCHI2PDOF = config['DiMuonDetached_VCHI2PDOF'],
+                                                       MuMuPT        = config['DiMuonDetached_PT'],
+                                                       MuMuLTCuts    = config['DiMuonDetached_LTCuts']
+                                                       )
+                
+        self.DiMuonDetachedLine = StrippingLine( name + 'DiMuonDetached' + 'Line',
+                                                 prescale  = config['DiMuonDetached_Prescale'],
+                                                 postscale = config['DiMuonDetached_Postscale'],
+                                                 checkPV   = True,
+                                                 selection = self.SelDiMuonDetached
+                                                 )
+
+
+        """
+        Jpsi2MuMuDetached tight line
+        """
+        self.SelJpsi2MuMuDetached = filterJpsi2MuMuDetached( name + 'Jpsi2MuMuDetached',
+                                                             MuonPT        = config['Jpsi2MuMuDetached_MuonPT'],
+                                                             MuonP         = config['Jpsi2MuMuDetached_MuonP'],
+                                                             MuonPIDmu     = config['Jpsi2MuMuDetached_MuonPIDmu'],
+                                                             MuonTRCHI2DOF = config['Jpsi2MuMuDetached_MuonTRCHI2DOF'],
+                                                             MuMuMinMass   = config['Jpsi2MuMuDetached_MinMass'],
+                                                             MuMuMaxMass   = config['Jpsi2MuMuDetached_MaxMass'],
+                                                             MuMuVCHI2PDOF = config['Jpsi2MuMuDetached_VCHI2PDOF'],
+                                                             MuMuPT        = config['Jpsi2MuMuDetached_PT'],
+                                                             MuMuLTCuts    = config['Jpsi2MuMuDetached_LTCuts']
+                                                             )
+        self.Jpsi2MuMuDetachedLine = StrippingLine( name + 'Jpsi2MuMuDetached' + 'Line',
+                                                    prescale  = config['Jpsi2MuMuDetached_Prescale'],
+                                                    postscale = config['Jpsi2MuMuDetached_Postscale'],
+                                                    #RequiredRawEvents = [ "Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker" ],
+                                                    checkPV   = True,
+                                                    selection = self.SelJpsi2MuMuDetached
+                                                    )
+
+#        """                               
+#        Jpsi2MuMuDetached tight line. negative value for lifetime cut.      
+#        """
+#        self.SelJpsi2MuMuDetachedMinus = filterJpsi2MuMuDetached( name + 'Jpsi2MuMuDetachedMinus',
+#                                                             MuonPT        = config['Jpsi2MuMuDetached_MuonPT'],
+#                                                             MuonP         = config['Jpsi2MuMuDetached_MuonP'],
+#                                                             MuonPIDmu     = config['Jpsi2MuMuDetached_MuonPIDmu'],
+#                                                             MuonTRCHI2DOF = config['Jpsi2MuMuDetached_MuonTRCHI2DOF'],
+#                                                             MuMuMinMass   = config['Jpsi2MuMuDetached_MinMass'],
+#                                                             MuMuMaxMass   = config['Jpsi2MuMuDetached_MaxMass'],
+#                                                             MuMuVCHI2PDOF = config['Jpsi2MuMuDetached_VCHI2PDOF'],
+#                                                             MuMuPT        = config['Jpsi2MuMuDetached_PT'],
+#                                                             MuMuLTCuts    = config['Jpsi2MuMuDetached_MinusLTCuts']
+#                                                             )
+#        self.Jpsi2MuMuDetachedMinusLine = StrippingLine( name + 'Jpsi2MuMuDetachedMinus' + 'Line',
+#                                                    prescale  = config['Jpsi2MuMuDetached_Prescale'],
+#                                                    postscale = config['Jpsi2MuMuDetached_Postscale'],
+#                                                    checkPV   = True,
+#                                                    selection = self.SelJpsi2MuMuDetachedMinus
+#                                                    )
+
+        """
+        Psi2MuMuDetached line
+        """
+        self.SelPsi2MuMuDetached = filterSignalDetached( name + 'Psi2MuMuDetached',
+                                                         ParticleName  = config['Psi2MuMuDetached_ParticleName'],
+                                                         MuonPT        = config['Psi2MuMuDetached_MuonPT'],
+                                                         MuonP         = config['Psi2MuMuDetached_MuonP'],
+                                                         MuonPIDmu     = config['Psi2MuMuDetached_MuonPIDmu'],  
+                                                         MuonTRCHI2DOF = config['Psi2MuMuDetached_MuonTRCHI2DOF'],
+                                                         MuMuMassWindow= config['Psi2MuMuDetached_MassWindow'],
+                                                         MuMuVCHI2PDOF = config['Psi2MuMuDetached_VCHI2PDOF'],
+                                                         MuMuPT        = config['Psi2MuMuDetached_PT'],
+                                                         MuMuLTCuts    = config['Psi2MuMuDetached_LTCuts']
+                                                         )
+
+        self.Psi2MuMuDetachedLine = StrippingLine( name + 'Psi2MuMuDetached' + 'Line',
+                                                   prescale  = config['Psi2MuMuDetached_Prescale'],
+                                                   postscale = config['Psi2MuMuDetached_Postscale'],
+                                                   checkPV   = True,
+                                                   #RequiredRawEvents = [ "Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker" ],
+                                                   selection = self.SelPsi2MuMuDetached
+                                                   ) 
+
+
+# 
+#        """
+#        Psi2MuMuDetached line. negative value for lifetime cut.
+#        """                                      
+#        self.SelPsi2MuMuDetachedMinus = filterSignalDetached( name + 'Psi2MuMuDetachedMinus',
+#                                                         ParticleName  = config['Psi2MuMuDetached_ParticleName'],
+#                                                         MuonPT        = config['Psi2MuMuDetached_MuonPT'],
+#                                                         MuonP         = config['Psi2MuMuDetached_MuonP'],
+#                                                         MuonPIDmu     = config['Psi2MuMuDetached_MuonPIDmu'],  
+#                                                         MuonTRCHI2DOF = config['Psi2MuMuDetached_MuonTRCHI2DOF'],
+#                                                         MuMuMassWindow= config['Psi2MuMuDetached_MassWindow'],
+#                                                         MuMuVCHI2PDOF = config['Psi2MuMuDetached_VCHI2PDOF'],
+#                                                         MuMuPT        = config['Psi2MuMuDetached_PT'],
+##                                                         MuMuLTCuts    = config['Psi2MuMuDetached_MinusLTCuts']
+#                                                         )
+#           
+#        self.Psi2MuMuDetachedMinusLine = StrippingLine( name + 'Psi2MuMuDetachedMinus' + 'Line',
+#                                                   prescale  = config['Psi2MuMuDetached_Prescale'],
+#                                                   postscale = config['Psi2MuMuDetached_Postscale'],
+#                                                   checkPV   = True,
+#                                                   selection = self.SelPsi2MuMuDetachedMinus
+#                                                   )
+
+        
+
+        if config['MicroDST']:
+            self.registerLine( self.DiMuonLine )
+            #self.registerLine( self.DiMuonLowPTLine ) ## line merged to DiMuonLine
+            self.registerLine( self.DiMuonSameSignLine )
+            # self.registerLine( self.DiMuonPrescaledLine ) ## line covered by DiMuonLine
+            self.registerLine( self.Jpsi2MuMuLine )
+            self.registerLine( self.Psi2MuMuLine )
+            self.registerLine( self.DiMuonTISLine )
+
+        else:    
+            #self.registerLine( self.DiMuonExclusiveLine )
+            self.registerLine( self.DiMuonNoPVLine )
+            self.registerLine( self.DiMuonHighMassLine )
+            self.registerLine( self.DiMuonHighMassSameSignLine )
+            #self.registerLine( self.DiMuonLowMassLine )
+            #self.registerLine( self.Jpsi2MuMuLine )
+            self.registerLine( self.Jpsi2MuMuTOSLine )
+            #self.registerLine( self.Psi2MuMuLine )
+            self.registerLine( self.Psi2MuMuTOSLine )
+            #self.registerLine( self.DiMuonDetachedLine )
+            self.registerLine( self.Jpsi2MuMuDetachedLine )
+#            self.registerLine( self.Jpsi2MuMuDetachedMinusLine )
+            self.registerLine( self.Psi2MuMuDetachedLine )
+#            self.registerLine( self.Psi2MuMuDetachedMinusLine )
+
+def filterDiMuon( name,
+                  MuonPT,
+                  MuonP,
+                  MuonTRCHI2DOF,
+                  MuonPIDCut,
+                  MuMuMinMass,
+                  MuMuVCHI2PDOF,
+                  MuMuPT 
+                  ):
+    
+    _StdLooseDiMuon = DataOnDemand( Location = 'Phys/StdLooseDiMuon/Particles' )
+    
+    MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s *MeV) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s *MeV) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)" % locals()
+    
+    MuMuCut = "(MM > %(MuMuMinMass)s) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s)" % locals()
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut + MuonPIDCut )
+
+    return Selection( name + "_SelMuMu",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseDiMuon ]
+                      )
+
+
+def filterDiMuonSameSign( name,
+                          MuonPT,
+                          MuonP,
+                          MuonTRCHI2DOF,
+                          MuMuMinMass,
+                          MuMuVCHI2PDOF,
+                          MuMuPT
+                          ):
+    
+    _StdLooseDiMuonSameSign = DataOnDemand( Location = 'Phys/StdLooseDiMuonSameSign/Particles' )
+    
+    MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s *MeV) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s *MeV) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)" % locals()
+    
+    MuMuCut = "(MM > %(MuMuMinMass)s) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s *MeV)" % locals()
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut )
+    
+    return Selection( name + "_SelMuMuSS",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseDiMuonSameSign ]
+                      )
+
+
+def filterDiMuonWMax( name,
+                      MuonPT,
+                      MuonP,
+                      MuonTRCHI2DOF,
+                      MuMuMinMass,
+                      MuMuMaxMass,
+                      MuMuVCHI2PDOF,
+                      MuMuPT,
+                      reversePtCut = False
+                      ):
+    
+    _StdLooseDiMuon = DataOnDemand( Location = 'Phys/StdLooseDiMuon/Particles' )
+    
+    MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s *MeV) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s *MeV) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)" % locals()
+    
+    MuMuCut = "(in_range( %(MuMuMinMass)s *MeV, MM, %(MuMuMaxMass)s *MeV)) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s)" % locals()
+
+    if (reversePtCut):
+      MuMuCut = "(in_range( %(MuMuMinMass)s *MeV, MM, %(MuMuMaxMass)s *MeV)) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT < %(MuMuPT)s)" % locals()
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut )
+
+    return Selection( name + "_SelMuMu",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseDiMuon ]
+                      )
+
+
+
+def filterJpsi2MuMu( name,
+                     MuonPT,
+                     MuonP,
+                     MuonPIDmu,
+                     MuonTRCHI2DOF,
+                     MuMuMinMass,
+                     MuMuMaxMass, 
+                     MuMuVCHI2PDOF,
+                     MuMuPT
+                     ):
+    
+    _StdLooseJpsi2MuMu = DataOnDemand( Location = 'Phys/StdLooseJpsi2MuMu/Particles' )
+    
+    MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s *MeV) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s *MeV) & (MINTREE('mu+'==ABSID,PIDmu) > %(MuonPIDmu)s) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)" % locals()
+    
+    MuMuCut = "(MM > %(MuMuMinMass)s) & (MM < %(MuMuMaxMass)s) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s)" % locals()
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut )
+    
+    return Selection( name + "_SelJpsi2MuMu",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseJpsi2MuMu ]
+                      )
+
+
+def filterSignal( name,
+                  ParticleName, 
+                  MuonPT,
+                  MuonP,
+                  MuonPIDmu,
+                  MuonTRCHI2DOF,
+                  MuMuMassWindow, 
+                  MuMuVCHI2PDOF,
+                  MuMuPT
+                  ):
+        
+    _StdLooseDiMuon = DataOnDemand( Location = 'Phys/StdLooseDiMuon/Particles' )
+    
+    MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s *MeV) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s *MeV) & (MINTREE('mu+'==ABSID,PIDmu) > %(MuonPIDmu)s) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)" % locals()
+    
+    MuMuCut = "(ADMASS(%(ParticleName)s) < %(MuMuMassWindow)s *MeV) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s *MeV)" % locals()
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut )
+    
+    return Selection( name + "_SelP2MuMu",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseDiMuon ]
+                      )
+
+
+def filterDZ( name,
+              DZAnyPV, 
+              MySelection ):
+    
+    return EventSelection (
+        #
+        LoKi__VoidFilter( name + 'filterDZ', 
+                          Code =  " ( minMyZ - minPVZ ) < %(DZAnyPV)s*mm " % locals() ,
+                          Preambulo = [ "from LoKiPhys.decorators import *",
+                                        "minMyZ = SOURCE('%s') >> min_value( VFASPF(VZ) )"  %(MySelection.outputLocation()) ,
+                                        "minPVZ = VSOURCE('Rec/Vertex/Primary') >> min_value(VZ) "
+                                        ]
+                          )
+        )
+        
+
+
+def filterDiMuonAndDZ( name,
+                       MuonPT,
+                       MuonP,
+                       MuonTRCHI2DOF,
+                       MuMuMinMass,
+                       MuMuVCHI2PDOF,
+                       MuMuPT,
+                       MuMuDZ
+                       ):
+    
+    _StdLooseDiMuon = DataOnDemand( Location = 'Phys/StdLooseDiMuon/Particles' )
+    
+    MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s *MeV) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s *MeV) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)" % locals()
+    
+    MuMuCut = "(MM > %(MuMuMinMass)s) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s) & (BPVVDZ < %(MuMuDZ)s*mm)" % locals()
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut )
+
+    return Selection( name + "_SelMuMu",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseDiMuon ]
+                      )
+
+
+def filterDiMuonDetached( name,
+                          MuonPT,
+                          MuonP,
+                          MuonPIDmu,
+                          MuonTRCHI2DOF,
+                          MuMuMinMass,
+                          MuMuVCHI2PDOF,
+                          MuMuPT,
+                          MuMuLTCuts
+                          ):
+    
+    _StdLooseDiMuon = DataOnDemand( Location = 'Phys/StdLooseDiMuon/Particles' )
+    
+    MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s *MeV) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s *MeV) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s) & (MINTREE('mu+'==ABSID,PIDmu) > %(MuonPIDmu)s)" % locals()
+    
+    MuMuCut = "(MM > %(MuMuMinMass)s) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s)" % locals()
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut + MuMuLTCuts )
+
+    return Selection( name + "_SelMuMu",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseDiMuon ]
+                      )
+
+
+def filterJpsi2MuMuDetached( name,
+                             MuonPT,
+                             MuonP,
+                             MuonPIDmu,
+                             MuonTRCHI2DOF,
+                             MuMuMinMass,
+                             MuMuMaxMass, 
+                             MuMuVCHI2PDOF,
+                             MuMuPT,
+                             MuMuLTCuts
+                             ):
+    
+    _StdLooseJpsi2MuMu = DataOnDemand( Location = 'Phys/StdLooseJpsi2MuMu/Particles' )
+    
+    MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s *MeV) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s *MeV) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s) & (MINTREE('mu+'==ABSID,PIDmu) > %(MuonPIDmu)s)" % locals()
+    
+    MuMuCut = "(MM > %(MuMuMinMass)s) & (MM < %(MuMuMaxMass)s) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s)" % locals()
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut + MuMuLTCuts  )
+    
+    return Selection( name + "_SelJpsi2MuMu",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseJpsi2MuMu ]
+                      )
+
+
+def filterSignalDetached( name,
+                          ParticleName, 
+                          MuonPT,
+                          MuonP,
+                          MuonPIDmu,
+                          MuonTRCHI2DOF,
+                          MuMuMassWindow, 
+                          MuMuVCHI2PDOF,
+                          MuMuPT,
+                          MuMuLTCuts
+                          ):
+    
+    _StdLooseDiMuon = DataOnDemand( Location = 'Phys/StdLooseDiMuon/Particles' )
+    
+    MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s *MeV) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s *MeV) & (MINTREE('mu+'==ABSID,PIDmu) > %(MuonPIDmu)s) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)" % locals()
+    
+    MuMuCut = "(ADMASS(%(ParticleName)s) < %(MuMuMassWindow)s *MeV) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s *MeV)" % locals()
+    
+    _MuMu = FilterDesktop( Code = MuonCut + " & " + MuMuCut + MuMuLTCuts )
+    
+    return Selection( name + "_SelP2MuMu",
+                      Algorithm = _MuMu,
+                      RequiredSelections = [ _StdLooseDiMuon ]
+                      )
+
+
+
+def filterTisTos(name,
+                 DiMuonInput,
+                 myTisTosSpecs ) :
+    from Configurables import TisTosParticleTagger
+    
+    myTagger = TisTosParticleTagger(name + "_TisTosTagger")
+    myTagger.TisTosSpecs = myTisTosSpecs
+    
+    # To speed it up, TisTos only with tracking system
+    myTagger.ProjectTracksToCalo = False
+    myTagger.CaloClustForCharged = False
+    myTagger.CaloClustForNeutral = False
+    myTagger.TOSFrac = { 4:0.0, 5:0.0 }
+    
+    return Selection(name + "_SelTisTos",
+                     Algorithm = myTagger,
+                     RequiredSelections = [ DiMuonInput ] )
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingEtap2pipimumu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingEtap2pipimumu.py
new file mode 100644
index 000000000..909da9f73
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingEtap2pipimumu.py
@@ -0,0 +1,453 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = ['Xabier Cid Vidal']
+## inspired by StrippingD2XMuMuSSConf, from Malcolm John, B. Viaud and O. Kochebina
+__date__ = '10/3/2020'
+__version__ = '$Revision: 2.0 $'
+
+'''
+D(s)+-> pi+etap(mumupipi),
+D(s)+-> pi+eta(mumupipi),
+and Bu->eta_prime(mumupipi)K+, and norm channels
+Ds+-> phi(mumu)pipipi and Bu->J/PsiK+
+'''
+
+__all__ = ('StrippingEtap2pipimumuConf','default_config','makeDaughters',
+           'makeEtap', 'make2body', 'makeDsNorm')
+
+default_config =  {
+    'NAME' : 'Etap2pipimumu',
+    'BUILDERTYPE' : 'StrippingEtap2pipimumuConf',
+    'WGs' : [ 'BandQ' ],
+    'STREAMS' : [ 'Charm' ],
+    'CONFIG':{
+               ## eta and eta' daughters
+               'EtapMuonP'         : 0. ,    #MeV
+               'EtapMuonPT'        : 0.  ,    #MeV
+               'EtapMuonMINIPCHI2' : 5     ,    #adminensional
+               'EtapMuonPIDmu'     : -5,   #adimensional    
+               
+               'EtapPionP'         : 0. ,    #MeV
+               'EtapPionPT'        : 0.  ,    #MeV
+               'EtapPionMINIPCHI2' : 5     ,    #adminensional
+               
+               ## Ds decay
+               'DsPionP'         : 200. ,    #MeV
+               'DsPionPT'        : 25.  ,    #MeV
+               'DsPionMINIPCHI2' : 5     ,    #adminensional
+               
+               ## B+ decay
+               'BuKaonP'         : 2000. ,    #MeV
+               'BuKaonPT'        : 300.  ,    #MeV
+               'BuKaonMINIPCHI2' : 5     ,    #adminensional
+               'BuKaonPIDk'      : -5,   #adimensional
+               
+               #eta -> pipimumu
+               'Eta_PT'         : 50 , #MeV                  
+               'Eta_VCHI2DOF'   : 20    ,    #adminensional         
+               'Eta_MAXDOCA'   : 2  ,    #mm
+               'Eta_FDCHI2'     : 2.5     ,   #adimensional
+               'Eta_IPCHI2'     : 2.5    ,    #adimensional
+               'Eta_MASSWIN'    : 100    ,    #MeV
+
+               #eta and eta' -> pipimumu
+               'Etap_PT'         : 100 , #MeV                  
+               'Etap_VCHI2DOF'   : 10    ,    #adminensional         
+               'Etap_MAXDOCA'   : 1  ,    #mm
+               'Etap_FDCHI2'     : 5     ,   #adimensional
+               'Etap_IPCHI2'     : 5    ,    #adimensional
+               'Etap_MASSWIN'    : 50    ,    #MeV
+               
+               #Ds+ -> pi+eta and pi+pi-pi+phi
+               'Ds_PT'         : 300 , #MeV                  
+               'Ds_VCHI2DOF'   : 15     ,    #adminensional         
+               'Ds_FDCHI2'     : 10     ,   #adimensional
+               'Ds_IPCHI2'     : 10    ,    #adimensional, should be close to 0
+               'Ds_MINMASS'    : 1770    ,    #MeV
+               'Ds_MAXMASS'    : 2070    ,    #MeV
+                           
+               #B+->eta'K+ and J/PsiK+
+               'Bu_PT'         : 300 , #MeV                  
+               'Bu_VCHI2DOF'   : 8     ,    #adminensional         
+               'Bu_FDCHI2'     : 36     ,   #adimensional
+               'Bu_IPCHI2'     : 20    ,    #adimensional
+               'Bu_MASSWIN'    : 100    ,    #MeV
+               
+               #normalization
+               #phi -> mumu
+               'Phi_PT'         : 100 , #MeV                  
+               'Phi_VCHI2DOF'   : 10     ,    #adminensional         
+               'Phi_MAXDOCA'   : 1  ,    #mm
+               'Phi_FDCHI2'     : 5     ,   #adimensional
+               'Phi_IPCHI2'     : 5    ,    #adimensional
+               'Phi_MASSWIN'    : 75    ,    #MeV
+               
+               #J/Psi -> mumu
+               'JPsi_PT'         : 100 , #MeV                  
+               'JPsi_VCHI2DOF'   : 10     ,    #adminensional         
+               'JPsi_MAXDOCA'   : 1  ,    #mm
+               'JPsi_FDCHI2'     : 5     ,   #adimensional
+               'JPsi_IPCHI2'     : 5    ,    #adimensional
+               'JPsi_MASSWIN'    : 75    ,    #MeV
+
+               'Ds2Eta2PiPiMuMuLinePrescale'      : 1 ,
+               'Ds2Eta2PiPiMuMuLinePostscale'     : 1 ,
+
+               'Ds2Etap2PiPiMuMuLinePrescale'      : 1 ,
+               'Ds2Etap2PiPiMuMuLinePostscale'     : 1 ,
+               
+               'Ds2Phi3PiLineForEtapPrescale'      : 0 ,
+               'Ds2Phi3PiLineForEtapPostscale'     : 0 ,
+               
+               'Bu2Etap2PiPiMuMuLinePrescale'      : 0 ,
+               'Bu2Etap2PiPiMuMuLinePostscale'     : 0 ,
+               
+               'Bu2JPsiKForEtapLinePrescale'      : 0 ,
+               'Bu2JPsiKForEtapLinePostscale'     : 0 ,
+               
+               'RelatedInfoTools': [{'Type'              : 'RelInfoVertexIsolation',
+                                     'Location'          : 'RelInfoVertexIsolation'
+                                     },
+
+                                    { "Type" : "RelInfoMuonIDPlus",
+                                      "Variables" : ["MU_BDT"],
+                                      "DaughterLocations"  : {
+    "[D_s+ -> ( X0 -> ^mu+ mu- pi+ pi- ) pi+ ]CC": "Muon1BDT",
+    "[D_s+ -> ( X0 -> mu+ ^mu- pi+ pi- ) pi+ ]CC": "Muon2BDT",
+    "[D_s+ -> ( X0 -> mu+ mu- ^pi+ pi- ) pi+ ]CC": "Pi1BDT",
+    "[D_s+ -> ( X0 -> mu+ mu- pi+ ^pi- ) pi+ ]CC": "Pi2BDT",
+    "[D_s+ -> ( X0 -> mu+ mu- pi+ pi- ) ^pi+ ]CC": "Pi3BDT"}                                    
+                                      },
+                                    
+                                    {'Type'              : 'RelInfoVertexIsolationBDT',
+                                     'Location'          : 'RelInfoVertexIsolationBDT'
+                                     },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 1.0,
+                                     'Location'          : 'RelInfoConeVariables_1.0',
+                                     },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 1.5,
+                                     'Location'          : 'RelInfoConeVariables_1.5',
+                                     },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 2.0,
+                                     'Location'          : 'RelInfoConeVariables_2.0',
+                                     },
+                                    {'Type'              : 'RelInfoTrackIsolationBDT',
+                                     'Location'          : 'RelInfoTrackIsolationBDT',
+                                     },
+                                    {'Type'              : 'RelInfoTrackIsolationBDT2',
+                                     'Location'          : 'RelInfoTrackIsolationBDT2',
+                                     'Particles': [1,2]
+                                     },
+                                    {'Type'              : 'RelInfoBstautauCDFIso',
+                                     'Location'          : 'RelInfoBstautauCDFIso'
+                                     }]
+               }
+    }
+
+from copy import copy
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, OfflineVertexFitter
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons, StdAllLoosePions, StdAllLooseKaons
+
+default_name = 'Etap2pipimumu'
+
+class StrippingEtap2pipimumuConf(LineBuilder) :
+    """
+    Builder for Ds2etap2pipimumu
+    """
+            
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+        
+        Ds2EtapLine_name = name+"_Ds2Etap"
+        Bu2EtapLine_name = name+"_Bu2Etap"
+        Ds2Phi3PiLine_name = name+"_Ds2Phi3Pi"
+        Bu2JPsiKLine_name = name+"_Bu2JPsiK"
+        
+        # 1 : Make pions and kaons
+        selPionsEta = makeDaughters(name="PionsEtaFor"+name
+                                    , P = config['EtapPionP']
+                                    , PT = config['EtapPionPT']               
+                                    , MINIPCHI2 = config['EtapPionMINIPCHI2']
+                                    , decid = 211)
+        
+        
+        selPionsDs = makeDaughters(name="PionsDsFor"+name
+                                   , P = config['DsPionP']
+                                   , PT = config['DsPionPT']
+                                   , MINIPCHI2 = config['DsPionMINIPCHI2']
+                                   , decid = 211)
+
+        
+        selKaonsBu = makeDaughters(name="KaonsBuFor"+name
+                                   , P = config['BuKaonP']
+                                   , PT = config['BuKaonPT']
+                                   , MINIPCHI2 = config['BuKaonMINIPCHI2']
+                                   , PID = config['BuKaonPIDk'],decid = 321)
+        
+        # 2 : Make muons
+        selMuonsEta = makeDaughters(name="MuonsEtaFor"+name
+                                    , P = config['EtapMuonP']
+                                    , PT = config['EtapMuonPT']               
+                                    , MINIPCHI2 = config['EtapMuonMINIPCHI2']
+                                    , PID = config['EtapMuonPIDmu'],decid = 13)
+        
+        # 4 : makeEta and Etap
+        selEta  = makeEtap("EtaFor"+name, [selPionsEta,selMuonsEta],
+                           config['Eta_MASSWIN'],config['Eta_MAXDOCA'],
+                           config['Eta_VCHI2DOF'],config['Eta_PT'],
+                           config['Eta_FDCHI2'], config['Eta_IPCHI2'],1)
+        
+        
+        selEtap  = makeEtap("EtapFor"+name, [selPionsEta,selMuonsEta],
+                            config['Etap_MASSWIN'],config['Etap_MAXDOCA'],
+                            config['Etap_VCHI2DOF'],config['Etap_PT'],
+                            config['Etap_FDCHI2'], config['Etap_IPCHI2'])
+
+        # 5: make Phi and Jpsi
+        selPhi = make2body("PhiFor"+name,[selMuonsEta],
+                           "Phi",
+                           config['Phi_PT'],config['Phi_VCHI2DOF'],
+                           config['Phi_FDCHI2'],config['Phi_IPCHI2'],
+                           config['Phi_MASSWIN'])
+
+        selJPsi = make2body("JPsiFor"+name,[selMuonsEta],
+                            "JPsi",
+                            config['JPsi_PT'],config['JPsi_VCHI2DOF'],
+                            config['JPsi_FDCHI2'],config['JPsi_IPCHI2'],
+                            config['JPsi_MASSWIN'])
+        
+        # 6: make Ds
+        selDs2Eta = make2body("DsEtaFor"+name,[selPionsDs,selEta],
+                              "DsSigEta",
+                              config['Ds_PT'],config['Ds_VCHI2DOF'],
+                              config['Ds_FDCHI2'],config['Ds_IPCHI2'],
+                              config['Ds_MINMASS'],
+                              config['Ds_MAXMASS']
+                              )
+
+        selDs2Etap = make2body("DsEtapFor"+name,[selPionsDs,selEtap],
+                               "DsSigEtap",
+                               config['Ds_PT'],config['Ds_VCHI2DOF'],
+                               config['Ds_FDCHI2'],config['Ds_IPCHI2'],
+                               config['Ds_MINMASS'],
+                               config['Ds_MAXMASS']
+                               )
+
+        
+        ## add cuts to ensure alignment of at least one pion with the pion in the Ds signal decay
+        selDs2Phi = makeDsNorm("DsPhiFor"+name, [selPionsEta,selPhi],
+                               config['Ds_PT'],config['Ds_VCHI2DOF'],
+                               config['Ds_FDCHI2'],config['Ds_IPCHI2'],
+                               config['Ds_MINMASS'],config['Ds_MAXMASS'],
+                               config['DsPionMINIPCHI2'],config['DsPionPT'],
+                               config['DsPionP'])
+
+        # 7: make B+        
+        selBu2Etap = make2body("BuEtapFor"+name,[selKaonsBu,selEtap],
+                               "B+Sig",
+                               config['Bu_PT'],config['Bu_VCHI2DOF'],
+                               config['Bu_FDCHI2'],config['Bu_IPCHI2'],
+                               config['Bu_MASSWIN'])
+
+        selBu2JPsi = make2body("BuJPsiFor"+name,[selKaonsBu,selJPsi],
+                               "B+Norm",
+                               config['Bu_PT'],config['Bu_VCHI2DOF'],
+                               config['Bu_FDCHI2'],config['Bu_IPCHI2'],
+                               config['Bu_MASSWIN'])
+        
+        
+       
+        # 8 : Declare Lines
+        self.Ds2EtaLine = StrippingLine(name+"Ds2EtaLine",
+                                        prescale = config['Ds2Eta2PiPiMuMuLinePrescale'],
+                                        postscale = config['Ds2Eta2PiPiMuMuLinePostscale'],
+                                        selection = selDs2Eta,
+                                        RelatedInfoTools = config['RelatedInfoTools'])
+        
+        self.Ds2EtaPLine = StrippingLine(name+"Ds2EtaPLine",
+                                         prescale = config['Ds2Etap2PiPiMuMuLinePrescale'],
+                                         postscale = config['Ds2Etap2PiPiMuMuLinePostscale'],
+                                         selection = selDs2Etap,
+                                         RelatedInfoTools = config['RelatedInfoTools'])
+
+
+        #self.Ds2PhiLine = StrippingLine(name+"Ds2PhiLine",
+        #                                prescale = config['Ds2Phi3PiLineForEtapPrescale'],
+        #                                postscale = config['Ds2Phi3PiLineForEtapPostscale'],
+        #                                selection = selDs2Phi,
+        #                                RelatedInfoTools = config['RelatedInfoTools'])
+        
+
+        
+        #self.Bu2EtapLine = StrippingLine(name+"Bu2EtapLine",
+        #                                 prescale = config['Bu2Etap2PiPiMuMuLinePrescale'],
+        #                                 postscale = config['Bu2Etap2PiPiMuMuLinePostscale'],
+        #                                 selection = selBu2Etap,
+        #                                 RelatedInfoTools = config['RelatedInfoTools'])
+
+
+        #self.Bu2JpsiLine = StrippingLine(name+"Bu2JPsiLine",
+        #                                 prescale = config['Bu2JPsiKForEtapLinePrescale'],
+        #                                 postscale = config['Bu2JPsiKForEtapLinePostscale'],
+        #                                 selection = selBu2JPsi,
+        #                                 RelatedInfoTools = config['RelatedInfoTools'])
+
+        # 9 : register them
+        self.registerLine( self.Ds2EtaLine)
+        self.registerLine( self.Ds2EtaPLine)
+        #self.registerLine( self.Ds2PhiLine)
+        #self.registerLine( self.Bu2EtapLine)
+        #self.registerLine( self.Bu2JpsiLine)
+
+
+#####################################################
+#####################################################
+#
+# Out of class
+#####################################################
+#make pion or muon daughters, if PID is not str, it means it is a muon, cut in that PIDmu
+def makeDaughters(name, P, PT, MINIPCHI2, PID=0,decid=0):
+    """
+    Daughters selection
+    """
+    
+    _code = "(P > %(P)s *MeV) & "\
+            "(PT > %(PT)s *MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(MINIPCHI2)s)" % locals()
+
+    if decid==13:
+        _code+= "& (PIDmu > %(PID)s)" %locals()
+        mysel = StdAllLooseMuons
+    elif decid==321:
+        _code+= "& (PIDK > %(PID)s)" %locals()
+        mysel = StdAllLooseKaons
+    else: mysel = StdAllLoosePions
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ mysel] )
+
+
+#####################################################
+
+def makeEtap(name, inputs,
+             MASSWIN, MAXDOCA, VCHI2DOF,PT, FDCHI2, IPCHI2,iseta=0): 
+
+    """
+    Makes the eta -> pi+ pi- mu+ mu- or eta' -> pi+ pi- mu+ mu-
+    """
+
+    if iseta:
+        _combcut = "(ADAMASS('eta') < %(MASSWIN)s *MeV) & "\
+                   "(AMAXDOCA('')<%(MAXDOCA)s) " %locals()
+        decayd = "eta -> mu+ mu- pi+ pi-"
+    else:
+        _combcut = "(ADAMASS('eta_prime') < %(MASSWIN)s *MeV) & "\
+                   "(AMAXDOCA('')<%(MAXDOCA)s) " %locals()
+        decayd = "eta_prime -> mu+ mu- pi+ pi-"
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(VCHI2DOF)s) & "\
+              "(PT > %(PT)s *MeV) &"\
+              "(BPVVDCHI2>%(FDCHI2)s) & (BPVIPCHI2()> %(IPCHI2)s) " %locals()
+
+    _Combine = CombineParticles(DecayDescriptor = decayd,
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = inputs )
+
+
+#####################################################
+def make2body(name, inputs, decaycode,
+              PT,VCHI2DOF,FDCHI2,IPCHI2,MASSWIN,MAXMASS=0):
+
+    """
+    Makes the D_s+ -> eta' pi+, B->eta'K+, B->J/PsiK+, J/Psi->mumu and phi->mumu
+    """
+
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(VCHI2DOF)s ) & "\
+              "(PT > %(PT)s *MeV) & (BPVVDCHI2 > %(FDCHI2)s ) &" %locals()
+
+    ## if it is the Ds or B+, it should point to the PV, else it shouldn't
+    if ("DsSig" in decaycode) or decaycode == "B+Sig" or decaycode=="B+Norm":
+        _bcut+= "(BPVIPCHI2()< %(IPCHI2)s) " %locals()
+        refitpv = 1
+        if decaycode == "DsSigEtap": decay = "[D_s+ -> eta_prime pi+ ]cc";mom = "D_s+"
+        if decaycode == "DsSigEta": decay = "[D_s+ -> eta pi+ ]cc";mom = "D_s+"
+        if decaycode == "B+Sig": decay = "[B+ -> eta_prime K+ ]cc";mom = "B+"
+        if decaycode == "B+Norm": decay = "[B+ -> J/psi(1S) K+ ]cc";mom = "B+"
+        
+    else:
+        _bcut+= "(BPVIPCHI2()> %(IPCHI2)s) " %locals()
+        refitpv = 0
+        if decaycode == "JPsi": decay = "J/psi(1S) -> mu+ mu-";mom = "J/psi(1S)"
+        if decaycode == "Phi": decay = "phi(1020) -> mu+ mu-";mom = "phi(1020)"
+
+    ## if MAXMASS exists, then MASSWIN corresponds really  to MINMASS!!!
+    if MAXMASS: _combcut = "( AM > %(MASSWIN)s *MeV ) & ( AM < %(MAXMASS)s *MeV ) " %locals()
+    else:  _combcut = "(ADAMASS('"+mom+"') < %(MASSWIN)s *MeV) " %locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = decay,
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+
+    ## only refit PV if stopping here
+    if refitpv: _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = inputs)
+       
+
+#####################################################
+def makeDsNorm(name, inputs,
+               PT,VCHI2DOF,FDCHI2,IPCHI2,MINMASS,MAXMASS,
+               IPCHI2DSPI,PTDSPI,PDSPI):
+       
+    """
+    Makes the D_s- -> phi pi+ pi- pi+
+    """
+
+    _combcut = "( AM > %(MINMASS)s *MeV ) & ( AM < %(MAXMASS)s *MeV ) " %locals()
+
+    ## ensure one of the pions is similar to the Ds one
+    _combcut+= "& ( AHASCHILD( (MIPCHI2DV(PRIMARY)>%(IPCHI2DSPI)s) &  "\
+               "(PT>%(PTDSPI)s) & (P>%(PDSPI)s) ) )" %locals()
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(VCHI2DOF)s) & "\
+              "(PT > %(PT)s *MeV) & (BPVVDCHI2>%(FDCHI2)s) & "\
+              "(BPVIPCHI2()< %(IPCHI2)s) " %locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D_s+ -> phi(1020) pi+ pi+ pi- ]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = inputs)
+       
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingHeavyBaryons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingHeavyBaryons.py
new file mode 100644
index 000000000..640d5e0a7
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingHeavyBaryons.py
@@ -0,0 +1,195 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping line for HeavyBaryons studies : Xi_b-, Xi_b0 and Omega_b-
+Author: Yasmine Amhis
+'''
+__author__ = ['Yasmine Amhis', 'updated by Vitalii Lisovskyi']
+__date__ = '19/05/2011'
+__version__ = '$Revision: 1.5 $'
+__all__ = ('HeavyBaryonsConf',
+           'default_config')
+
+default_config = {
+       'NAME' : 'HeavyBaryon',
+       'BUILDERTYPE'  : 'HeavyBaryonsConf',
+       'CONFIG'       : {    'TRCHI2DOF'             :       4.,
+                             'PionPIDK'              :       5.,
+                             'JpsiMassWindow'        :      100., #80
+                             'KaonPIDK'              :      -5.,
+                             'DLSForLongLived'       :       5.,
+                             'XiMassWindow'          :      30.,
+                             'OmegaMassWindow'       :      30.,
+                             "XibminusMassWindow"    :     300.,
+                             "XibzeroMassWindow"     :     500.,
+                             "OmegabminusMassWindow" :     500.
+                             },
+       'STREAMS' : [ 'Dimuon' ],
+       'WGs'    : ['BandQ']
+       }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons
+from StandardParticles import  StdAllLoosePions, StdAllLooseKaons
+
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+
+#-------------------------------------------------------------------------------------------------------------
+class HeavyBaryonsConf(LineBuilder) :
+
+       __configuration_keys__ = default_config['CONFIG'].keys()
+
+       def __init__(self, name, config) :
+           LineBuilder.__init__(self, name, config)
+           self.name = name
+           self.config = config
+
+           # define input daughter lists for various selections
+           self.WideJpsiList = DataOnDemand(Location = "Phys/StdLooseJpsi2MuMu/Particles") #"Phys/StdMassConstrainedJpsi2MuMu/Particles")
+           self.JpsiList = self.createSubSel( OutputList = 'MassConstrainedJpsiForHeavyBaryons' + self.name,
+                                              InputList = self.WideJpsiList,
+                                              Cuts = "(PFUNA(ADAMASS('J/psi(1S)')) < %(JpsiMassWindow)s)" % self.config)
+
+           #make a merged list for pions
+           self.MergedPionsList = MergedSelection( "MergedPionsFor" + self.name,
+                                                   #RequiredSelections =  [DataOnDemand(Location = "Phys/StdLoosePions/Particles"),
+                                                   #                       DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")])
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLoosePions/Particles"), # take all long tracks
+                                                                          DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")]) # take all downstream tracks
+
+
+
+           self.MergedKaonsList = MergedSelection( "MergedKaonsFor" + self.name,
+                                                   #RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseKaons/Particles"),
+                                                   #                       DataOnDemand(Location = "Phys/StdLooseDownKaons/Particles")])
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles"),# take all long tracks
+                                                                          DataOnDemand(Location = "Phys/StdLooseDownKaons/Particles")])# take all downstream tracks
+           #make a merged list for kaons
+           self.PionsList = self.createSubSel( OutputList = "PionsFor" + self.name,
+                                               InputList = self.MergedPionsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s ) & (PIDK < %(PionPIDK)s)" % self.config )
+           self.KaonsList = self.createSubSel( OutputList = "KaonsFor" + self.name,
+                                               InputList = self.MergedKaonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s ) & (PIDK > %(KaonPIDK)s)" % self.config )
+
+
+
+           self.LambdaListLoose = MergedSelection("StdLooseLambdaMergedFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles"),
+                                                                         DataOnDemand(Location = "Phys/StdVeryLooseLambdaLL/Particles")])
+           self.LambdaList =  self.createSubSel(OutputList = "LambdaFor" + self.name,
+                                                InputList = self.LambdaListLoose ,
+                                                Cuts = "(MAXTREE('p+'==ABSID, PT) > 500.*MeV) "\
+                                                "& (MAXTREE('pi-'==ABSID, PT) > 100.*MeV) " \
+                                                "& (ADMASS('Lambda0') < 15.*MeV) & (VFASPF(VCHI2) < 20 )  & (BPVDLS> %(DLSForLongLived)s ) " % self.config)
+
+
+
+           self.XiminusList = self.makeXiminus()
+           self.OmegaminusList = self.makeOmegaminus()
+           self.makeXibminus2JpsiXi()
+           self.makeXibzero2JpsiXistar    ()
+           self.makeOmegabminus2JpsiOmega()
+
+       def createSubSel( self, OutputList, InputList, Cuts ) :
+           '''create a selection using a FilterDesktop'''
+           filter = FilterDesktop(Code = Cuts)
+           return Selection( OutputList,
+                             Algorithm = filter,
+                             RequiredSelections = [ InputList ] )
+
+       def createCombinationSel( self, OutputList,
+                                 DecayDescriptor,
+                                 DaughterLists,
+                                 DaughterCuts = {} ,
+                                 PreVertexCuts = "ALL",
+                                 PostVertexCuts = "ALL" ) :
+           '''create a selection using a ParticleCombiner with a single decay descriptor'''
+           combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                        DaughtersCuts = DaughterCuts,
+                                        MotherCut = PostVertexCuts,
+                                        CombinationCut = PreVertexCuts,
+                                        ReFitPVs = True)
+           return Selection ( OutputList,
+                              Algorithm = combiner,
+                              RequiredSelections = DaughterLists)
+
+
+
+#------------------------------------------------------------------------------------------
+
+       def makeXiminus( self ):
+
+              ''' Make a Xi minus candidate '''
+              Ximinus2LambdaPi = self.createCombinationSel(OutputList = "Ximinus2LambdaPi"+ self.name,
+                                                           DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                                                           DaughterLists   = [self.PionsList, self.LambdaList],
+                                                           DaughterCuts    = {"pi-"      : "(PT>0.*GeV) & (BPVIPCHI2()>9)"},
+                                                           PreVertexCuts   = "(ADAMASS('Xi-') < %(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<25) &(BPVDLS > %(DLSForLongLived)s) " %self.config)
+              return Ximinus2LambdaPi
+
+
+       def makeOmegaminus( self ):
+               ''' Make an Omega minus candidate '''
+               Omegaminus2LambdaK = self.createCombinationSel(OutputList = "Omegaminus2LambdaK"+ self.name,
+                                                              DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+                                                              DaughterLists = [self.KaonsList, self.LambdaList],
+                                                              DaughterCuts = {"K-"      : "(PT>0.*GeV) & (BPVIPCHI2()>9)"},
+                                                              PreVertexCuts = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)"%self.config,
+                                                              PostVertexCuts = "(VFASPF(VCHI2/VDOF)<25) & (BPVDLS> %(DLSForLongLived)s) " %self.config)
+
+
+               return Omegaminus2LambdaK
+
+
+       def makeXibminus2JpsiXi( self ):
+
+               Xibminus2JpsiXi = self.createCombinationSel (OutputList = "Xibminus2JpsiXi" + self.name,
+                                                            DecayDescriptor = "[Xi_b- -> Xi- J/psi(1S)]cc",
+                                                            DaughterLists = [self.JpsiList , self.XiminusList ],
+                                                            PreVertexCuts = "(ADAMASS('Xi_b-') <600*MeV )",
+                                                            PostVertexCuts = "(VFASPF(VCHI2/VDOF)<25)  &  (ADMASS('Xi_b-') < %(XibminusMassWindow)s *MeV) "  % self.config)
+               Xibminus2JpsiXiLine = StrippingLine (self.name + "Xib2JpsiXi",
+                                                    RequiredRawEvents=["Trigger", "Velo", "Tracker"],
+                                                    algos = [Xibminus2JpsiXi])
+               self.registerLine (Xibminus2JpsiXiLine)
+
+
+       def makeXibzero2JpsiXistar( self ) :
+              Xibzero2JpsiXistar = self.createCombinationSel(OutputList = "Xibzero2JpsiXistar" + self.name,
+                                                             DecayDescriptor = "[Xi_b0 -> Xi- pi+ J/psi(1S)]cc",
+                                                             DaughterLists = [self.JpsiList, self.XiminusList, self.PionsList],
+                                                             DaughterCuts = {"pi+"      : "(PT>0.1*GeV) & (BPVIPCHI2()>9)"},
+                                                             PreVertexCuts = "(ADAMASS('Xi_b0') <600*MeV )" %self.config,
+                                                             PostVertexCuts = "(VFASPF(VCHI2/VDOF)<25)  &  (ADMASS('Xi_b0') < %(XibzeroMassWindow)s *MeV) "  % self.config)
+              Xibzero2JpsiXistarLine = StrippingLine (self.name + "Xibzero2JpsiXistar",
+                                                    RequiredRawEvents=["Trigger", "Velo", "Tracker"],
+                                                      algos = [Xibzero2JpsiXistar])
+              self.registerLine (Xibzero2JpsiXistarLine)
+
+
+       def makeOmegabminus2JpsiOmega( self ):
+
+              Omegabminus2JpsiOmega = self.createCombinationSel (OutputList = "Omegabminus2JpsiOmega" + self.name,
+                                                              DecayDescriptor = "[Omega_b- -> Omega- J/psi(1S)]cc",
+                                                              DaughterLists = [self.JpsiList , self.OmegaminusList ],
+                                                              PreVertexCuts = "(ADAMASS('Omega_b-') <600*MeV )",
+                                                              PostVertexCuts = "(VFASPF(VCHI2/VDOF)<25)  &  (ADMASS('Omega_b-') <%(OmegabminusMassWindow)s *MeV)"  % self.config)
+              Omegabminus2JpsiOmegaLine = StrippingLine (self.name + "Omegab2JpsiOmega",
+                                                    RequiredRawEvents=["Trigger", "Velo", "Tracker"],
+                                                         algos = [Omegabminus2JpsiOmega])
+              self.registerLine (Omegabminus2JpsiOmegaLine)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingInclusiveCharmBaryons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingInclusiveCharmBaryons.py
new file mode 100644
index 000000000..1a1ebce65
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingInclusiveCharmBaryons.py
@@ -0,0 +1,218 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Inclusive lines for single open charm baryons
+Selection based on DfomB BDTs for Lc -> p K- pi+, Xic+ -> p K- pi+, Xic0 -> p K- K- pi+, Omegac0 -> p K- K- pi+
+BDT cuts are chosen such that they are ~80 % efficient on their Xb->Xc pi calibration channels
+
+Author: M. Stahl
+Notes: Be creative!
+'''
+__author__ = ['Marian Stahl']
+
+__all__ = ('InclusiveCharmBaryonsConf', 'default_config', 'applyMVA', 'getMVAVars')
+
+moduleName = 'InclusiveCharmBaryons'
+
+# Import Packages
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import Selection , AutomaticData
+from PhysConf.Selections import FilterSelection, CombineSelection, Combine4BodySelection, Combine3BodySelection, LimitSelection, MergedSelection
+from Configurables import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from LoKiPhys.decorators import *
+from LoKiArrayFunctors.decorators import *
+from LoKiProtoParticles.decorators import *
+import math
+
+# Default configuration dictionary
+default_config = {
+  'NAME' : 'InclusiveCharmBaryons',
+  'BUILDERTYPE' : 'InclusiveCharmBaryonsConf',
+  'CONFIG' : {
+    'pi' : {
+      'TES'    : 'Phys/StdAllNoPIDsPions/Particles',
+      'Filter' : "(P>1000*MeV) & (MIPCHI2DV(PRIMARY)>4.0)"
+    },
+    'K' : {
+      'TES'    : 'Phys/StdAllNoPIDsKaons/Particles',
+      'Filter' : "(P>1000*MeV) & (MIPCHI2DV(PRIMARY)>4.0)"
+    },
+    'p' : {
+      'TES'    : 'Phys/StdAllNoPIDsProtons/Particles',
+      'Filter' : "(P>1000*MeV) & (MIPCHI2DV(PRIMARY)>4.0)"
+    },
+    'CharmHadrons': {
+      'Lc' : {
+        'Daughters'       : {'p' : 1, 'K' : 2, 'pi' : 3},
+        'Parent'          : 'Lc',
+        'DecayDescriptors' : ['[Lambda_c+ -> p+ K- pi+]cc'],
+        'xmlFile'         : '$TMVAWEIGHTSROOT/data/DfromB/LcPi_2017_GBDT.weights.xml',
+        'MVACut'          : '0.45',
+        'Comb12Cut'       : "(ADOCA(1,2)<0.5*mm)",
+        'CombCut'         : """(ASUM(PT)>1800*MeV) & (ADAMASS('Lambda_c+') < 50*MeV) &
+                               (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))|
+                                ((ABSID=='KS0') & (PT > 500*MeV) & (P > 5000*MeV) & (BPVVDCHI2 > 1000)))) &
+                               (ADOCA(1,3)<0.5*mm) & (ADOCA(2,3)<0.5*mm)""",
+        'MotherCut'       : "(CHI2VXNDF<10) & (BPVVDCHI2>36) & (BPVDIRA>0) & (ADMASS('Lambda_c+') < 32*MeV)",
+      },
+      'Xic' : {
+        'Daughters'       : {'p' : 1, 'K' : 2, 'pi' : 3},
+        'Parent'          : 'Xic',
+        'DecayDescriptors' : ['[Xi_c+ -> p+ K- pi+]cc'],
+        'xmlFile'         : '$TMVAWEIGHTSROOT/data/DfromB/XicPi_Run2_GBDT.weights.xml',
+        'MVACut'          : '0.5',
+        'Comb12Cut'       : "(ADOCA(1,2)<0.5*mm)",
+        'CombCut'         : """(ASUM(PT)>1800*MeV) & (ADAMASS('Xi_c+') < 50*MeV) &
+                               (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))|
+                                ((ABSID=='KS0') & (PT > 500*MeV) & (P > 5000*MeV) & (BPVVDCHI2 > 1000)))) &
+                               (ADOCA(1,3)<0.5*mm) & (ADOCA(2,3)<0.5*mm)""",
+        'MotherCut'       : "(CHI2VXNDF<10) & (BPVVDCHI2>36) & (BPVDIRA>0) & (ADMASS('Xi_c+') < 32*MeV)",
+      },
+      'Xic0' : {
+        'Daughters'       : {'p' : 1, 'K1' : 2, 'K2' : 3, 'pi' : 4},
+        'Parent'          : 'Xic0',
+        'DecayDescriptors' : ['[Xi_c0 -> p+ K- K- pi+]cc'],
+        'xmlFile'         : '$TMVAWEIGHTSROOT/data/DfromB/Xic0Pi_Run2_GBDT.weights.xml',
+        'MVACut'          : '0.5',
+        'Comb12Cut'       : "(ADOCA(1,2)<0.5*mm)",
+        'Comb123Cut'      : "(ADOCA(1,3)<0.5*mm) & (ADOCA(2,3)<0.5*mm)",
+        'CombCut'         : """(ASUM(PT)>1800*MeV) & (ADAMASS('Xi_c0') < 40*MeV) &
+                               (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))|
+                                ((ABSID=='KS0') & (PT > 500*MeV) & (P > 5000*MeV) & (BPVVDCHI2 > 1000)))) &
+                               (ADOCA(1,4)<0.5*mm) & (ADOCA(2,4)<0.5*mm) & (ADOCA(3,4)<0.5*mm)""",
+        'MotherCut'       : "(CHI2VXNDF<10) & (BPVVDCHI2>36) & (BPVDIRA>0) & (ADMASS('Xi_c0') < 24*MeV)",
+      },
+      'Omegac0' : {
+        'Daughters'       : {'p' : 1, 'K1' : 2, 'K2' : 3, 'pi' : 4},
+        'Parent'          : 'Xic0', # the name in the weights file
+        'DecayDescriptors' : ['[Omega_c0 -> p+ K- K- pi+]cc'],
+        'xmlFile'         : '$TMVAWEIGHTSROOT/data/DfromB/Xic0Pi_Run2_GBDT.weights.xml',
+        'MVACut'          : '0.5',
+        'Comb12Cut'       : "(ADOCA(1,2)<0.5*mm)",
+        'Comb123Cut'      : "(ADOCA(1,3)<0.5*mm) & (ADOCA(2,3)<0.5*mm)",
+        'CombCut'         : """(ASUM(PT)>1800*MeV) & (ADAMASS('Omega_c0') < 40*MeV) &
+                               (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))|
+                                ((ABSID=='KS0') & (PT > 500*MeV) & (P > 5000*MeV) & (BPVVDCHI2 > 1000)))) &
+                               (ADOCA(1,4)<0.5*mm) & (ADOCA(2,4)<0.5*mm) & (ADOCA(3,4)<0.5*mm)""",
+        'MotherCut'       : "(CHI2VXNDF<10) & (BPVVDCHI2>36) & (BPVDIRA>0) & (ADMASS('Omega_c0') < 24*MeV)",
+      },
+    },
+  },
+  'STREAMS' : {
+    'BhadronCompleteEvent':[
+      'StrippingInclusiveCharmBaryons_LcLine',
+      'StrippingInclusiveCharmBaryons_XicLine',
+      'StrippingInclusiveCharmBaryons_Xic0Line',
+      'StrippingInclusiveCharmBaryons_Omegac0Line',
+    ]
+  },
+  'WGs' : [ 'BandQ' ]
+}
+
+
+# Configure the LineBuilder
+class InclusiveCharmBaryonsConf(LineBuilder):
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__(self, moduleName, config):
+    LineBuilder.__init__(self, moduleName, config)
+
+    # inputs to build charm candidates
+    pi = FilterSelection(moduleName + "DetachedLongPions",   [AutomaticData(config['pi']['TES'])], Code = config['pi']['Filter'])
+    K  = FilterSelection(moduleName + "DetachedLongKaons",   [AutomaticData(config['K' ]['TES'])], Code = config['K' ]['Filter'])
+    p  = FilterSelection(moduleName + "DetachedLongProtons", [AutomaticData(config['p' ]['TES'])], Code = config['p' ]['Filter'])
+    mergedTracks  = MergedSelection(moduleName+"MergedTracks",RequiredSelections = [pi, K, p])
+
+    # loop over all charm decays in the configuration and save their MVA-filtered selection in a list
+    for name, cHad in config['CharmHadrons'].iteritems():
+
+      # save some computing time by using multi-body combinations
+      if "Comb123Cut" in cHad :
+        SelcHad = Combine4BodySelection (moduleName+'Proto'+name, [mergedTracks], DecayDescriptors = cHad["DecayDescriptors"],
+                                         Combination12Cut = cHad["Comb12Cut"], Combination123Cut = cHad["Comb123Cut"],
+                                         CombinationCut = cHad["CombCut"], MotherCut = cHad["MotherCut"])
+      else :
+        SelcHad = Combine3BodySelection (moduleName+'Proto'+name, [mergedTracks], DecayDescriptors = cHad["DecayDescriptors"],
+                                         Combination12Cut = cHad["Comb12Cut"], CombinationCut = cHad["CombCut"], MotherCut = cHad["MotherCut"])
+
+      # Apply MVA cut
+      MVASelcHad = self.applyMVA(moduleName+'_'+name, cHad['Parent'], cHad['Daughters'], [SelcHad], cHad['xmlFile'], cHad['MVACut'])
+
+      line = StrippingLine(moduleName+'_'+name+'Line', algos = [MVASelcHad])
+      self.registerLine(line)
+
+  def applyMVA(self, selname, parentname, daughters, b2cSel, MVAxmlFile, MVACutValue):
+    """
+    Applies a BDT cut based on the input beauty 2 charm selection
+    """
+    from MVADictHelpers import addTMVAclassifierValue
+    from Configurables import FilterDesktop
+
+    _XcMVAFilter = FilterDesktop(selname+"Filter", Code = "VALUE('LoKi::Hybrid::DictValue/"+parentname+"_BDT')>"+MVACutValue)
+    addTMVAclassifierValue(Component = _XcMVAFilter, XMLFile = MVAxmlFile,
+                            Variables = self.getMVAVars(parentname, daughters), ToolName = parentname+"_BDT")
+    return Selection(selname+'_MVAFilter', Algorithm = _XcMVAFilter, RequiredSelections = b2cSel)
+
+  def getMVAVars(self, parentname, daugthers):
+    """
+    Return all variables required for the BDT
+    Variable names MUST correspond exactly to what is needed by classifier (xml)
+    """
+
+    bdt_vars = {}
+    # Variables for D and daughters;  prefixes added later
+    vars_parent = {
+      'log_P'              : 'math.log10(P)',
+      'log_PT'             : 'math.log10(PT)',
+      'log_ENDVERTEX_CHI2' : 'math.log10(VFASPF(VCHI2))',
+      'log_IPCHI2_OWNPV'   : 'math.log10(MIPCHI2DV(PRIMARY))',
+      'log_FDCHI2_OWNPV'   : 'math.log10(BPVVDCHI2)',
+      'beta'               : '(SUMTREE(P,ISBASIC,0.)-(2.*CHILD(P,1)))/SUMTREE(P,ISBASIC,0.)',
+    }
+    vars_daughters = {
+      'log_PT'                 : 'math.log10(CHILD(PT,{0}))',
+      'log_IPCHI2_OWNPV'       : 'math.log10(CHILD(MIPCHI2DV(PRIMARY),{0}))',
+      'log_TRACK_VeloCHI2NDOF' : 'math.log10(switch(CHILD(TINFO(LHCb.Track.FitVeloNDoF,-1),{0})>0,CHILD(TINFO(LHCb.Track.FitVeloChi2,-1),{0})/CHILD(TINFO(LHCb.Track.FitVeloNDoF,-1),{0}),-1))',
+      'log_TRACK_TCHI2NDOF'    : 'math.log10(switch(CHILD(TINFO(LHCb.Track.FitTNDoF,-1),{0})>0,CHILD(TINFO(LHCb.Track.FitTChi2,-1),{0})/CHILD(TINFO(LHCb.Track.FitTNDoF,-1),{0}),-1))',
+      'log_TRACK_MatchCHI2'    : 'math.log10(CHILD(TINFO(LHCb.Track.FitMatchChi2,-1.),{0}))',
+      'log_TRACK_GhostProb'    : 'math.log10(CHILD(TRGHOSTPROB,{0}))',
+      'UsedRichAerogel'        : 'switch(CHILDCUT(PPCUT(PP_USEDAEROGEL),{0}),1,0)',
+      'UsedRich1Gas'           : 'switch(CHILDCUT(PPCUT(PP_USEDRICH1GAS),{0}),1,0)',
+      'UsedRich2Gas'           : 'switch(CHILDCUT(PPCUT(PP_USEDRICH2GAS),{0}),1,0)',
+      'RichAbovePiThres'       : 'switch(CHILDCUT(PPCUT(PP_RICHTHRES_PI),{0}),1,0)',
+      'RichAboveKaThres'       : 'switch(CHILDCUT(PPCUT(PP_RICHTHRES_K),{0}),1,0)',
+      'RichAbovePrThres'       : 'switch(CHILDCUT(PPCUT(PP_RICHTHRES_P),{0}),1,0)',
+      'atan_RichDLLe'          : 'math.atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLe,-1000),{0}))',
+      'atan_RichDLLmu'         : 'math.atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLmu,-1000),{0}))',
+      'atan_RichDLLk'          : 'math.atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLk,-1000),{0}))',
+      'atan_RichDLLp'          : 'math.atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLp,-1000),{0}))',
+      'atan_RichDLLbt'         : 'math.atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLbt,-1000),{0}))',
+      'atan_MuonLLbg'          : 'math.atan(switch(CHILD(PPINFO(LHCb.ProtoParticle.InAccMuon,0),{0})==1,CHILD(PPINFO(LHCb.ProtoParticle.MuonBkgLL,-10000),{0}),-1000))',
+      'atan_MuonLLmu'          : 'math.atan(switch(CHILD(PPINFO(LHCb.ProtoParticle.InAccMuon,0),{0})==1,CHILD(PPINFO(LHCb.ProtoParticle.MuonMuLL,-10000),{0}),-1000))',
+      'isMuon'                 : 'switch(CHILDCUT(ISMUON,{0}),1,0)',
+      'MuonNShared'            : 'switch(CHILD(PPINFO(LHCb.ProtoParticle.InAccMuon,0),{0})==1,CHILD(PPINFO(LHCb.ProtoParticle.MuonNShared,0),{0}),-1)',
+      'VeloCharge'             : 'CHILD(PPINFO(LHCb.ProtoParticle.VeloCharge,-1000),{0})',
+    }
+    # Add all parent variables to output
+    for var, loki in vars_parent.iteritems():
+      bdt_vars.update({'{}_{}'.format(parentname, var) : loki})
+    # Add all daughter variables to output
+    for daugthername, lab in daugthers.iteritems():
+      for var, loki in vars_daughters.iteritems():
+        bdt_vars.update({'{}_{}_{}'.format(parentname,daugthername, var) : loki.format(lab)})
+    # Print out variables for sanity
+    #for key in sorted(bdt_vars):
+    #    print '{:<25} : {}'.format(key, bdt_vars[key].replace(',', ', '))
+    #print 80 * '-'
+    return bdt_vars
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingInclusiveDoubleD.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingInclusiveDoubleD.py
new file mode 100644
index 000000000..7256b3a2a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingInclusiveDoubleD.py
@@ -0,0 +1,204 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Inclusive line for double open charm mesons
+Selection based on DfomB BDTs for D0 -> K- pi+, D+ -> K- pi+ pi+, Ds+ -> K+ K- pi+
+BDT cuts are chosen such that they are ~90 % efficient on their Xb->Xc pi calibration channels
+Two D's should build a good vertex
+
+Author: M. Stahl
+Notes: Be creative!
+'''
+__author__ = ['Marian Stahl']
+
+__all__ = ('InclusiveDoubleDConf', 'default_config', 'applyMVA', 'getMVAVars')
+
+moduleName = 'InclusiveDoubleD'
+
+# Import Packages
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import Selection , AutomaticData
+from PhysConf.Selections import FilterSelection, CombineSelection, Combine3BodySelection, MergedSelection
+from Configurables import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from LoKiPhys.decorators import *
+from LoKiArrayFunctors.decorators import *
+from LoKiProtoParticles.decorators import *
+import math
+
+# Default configuration dictionary
+default_config = {
+  'NAME' : 'InclusiveDoubleD',
+  'BUILDERTYPE' : 'InclusiveDoubleDConf',
+  'CONFIG' : {
+    'pi' : {
+      'TES'    : 'Phys/StdAllNoPIDsPions/Particles',
+      'Filter' : "(P>1000*MeV) & (MIPCHI2DV(PRIMARY)>4.0)"
+    },
+    'K' : {
+      'TES'    : 'Phys/StdAllNoPIDsKaons/Particles',
+      'Filter' : "(P>1000*MeV) & (MIPCHI2DV(PRIMARY)>4.0)"
+    },
+    'CharmHadrons': {
+      'D0' : {
+        'Daughters'        : {'K' : 1, 'pi' : 2},
+        'Parent'           : 'D0',
+        'DecayDescriptors' : ['[D0 -> K- pi+]cc'],
+        'xmlFile'          : '$TMVAWEIGHTSROOT/data/DfromB/D0Pi_2017_GBDT.weights.xml',
+        'MVACut'           : '-0.4',
+        'CombCut'          : """(ASUM(PT)>1800*MeV) & (ADAMASS('D0') < 60*MeV) & (ADOCA(1,2)<0.5*mm) &
+                                (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))))""",
+        'MotherCut'        : "(CHI2VXNDF<10) & (BPVVDCHI2>36) & (BPVDIRA>0) & (ADMASS('D0') < 32*MeV)",
+      },
+      'D' : {
+        'Daughters'        : {'K' : 1, 'pi1' : 2, 'pi2' : 3},
+        'Parent'           : 'D',
+        'DecayDescriptors' : ['[D+ -> K- pi+ pi+]cc'],
+        'xmlFile'          : '$TMVAWEIGHTSROOT/data/DfromB/DPi_2017_GBDT.weights.xml',
+        'MVACut'           : '-0.2',
+        'Comb12Cut'        : "(ADOCA(1,2)<0.5*mm)",
+        'CombCut'          : """(ASUM(PT)>1800*MeV) & (ADAMASS('D+') < 50*MeV) &
+                                (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))|
+                                 ((ABSID=='KS0') & (PT > 500*MeV) & (P > 5000*MeV) & (BPVVDCHI2 > 1000)))) &
+                                (ADOCA(1,3)<0.5*mm) & (ADOCA(2,3)<0.5*mm)""",
+        'MotherCut'        : "(CHI2VXNDF<10) & (BPVVDCHI2>36) & (BPVDIRA>0) & (ADMASS('D+') < 32*MeV)",
+      },
+      'Ds' : {
+        'Daughters'        : {'Kp' : 1, 'Km' : 2, 'pi' : 3},
+        'Parent'           : 'Ds',
+        'DecayDescriptors' : ['[D_s+ -> K+ K- pi+]cc'],
+        'xmlFile'          : '$TMVAWEIGHTSROOT/data/DfromB/DsPi_2017_GBDT.weights.xml',
+        'MVACut'           : '0.0',
+        'Comb12Cut'        : "(ADOCA(1,2)<0.5*mm)",
+        'CombCut'          : """(ASUM(PT)>1800*MeV) & (ADAMASS('D_s+') < 50*MeV) &
+                                (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))|
+                                 ((ABSID=='KS0') & (PT > 500*MeV) & (P > 5000*MeV) & (BPVVDCHI2 > 1000)))) &
+                                (ADOCA(1,3)<0.5*mm) & (ADOCA(2,3)<0.5*mm)""",
+        'MotherCut'        : "(CHI2VXNDF<10) & (BPVVDCHI2>36) & (BPVDIRA>0) & (ADMASS('D_s+') < 32*MeV)",
+      },
+    },
+    'DecayDescriptors' : ["B0 -> D0 D~0", "[B0 -> D0 D0]cc", "[B0 -> D0 D+]cc", "[B0 -> D0 D-]cc",
+                          "[B0 -> D0 D_s+]cc", "[B0 -> D0 D_s-]cc", "B0 -> D+ D-", "[B0 -> D+ D+]cc",
+                          "[B0 -> D+ D_s+]cc", "[B0 -> D+ D_s-]cc", "B0 -> D_s+ D_s-", "[B0 -> D_s+ D_s+]cc"],
+    'CombCut'          : "AM > 0",
+    'MotherCut'        : "(CHI2VXNDF<10)",
+  },
+  'STREAMS' : {
+    'CharmCompleteEvent':[
+      'StrippingInclusiveDoubleDLine',
+    ]
+  },
+  'WGs' : [ 'BandQ' ]
+}
+
+
+# Configure the LineBuilder
+class InclusiveDoubleDConf(LineBuilder):
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__(self, moduleName, config):
+    LineBuilder.__init__(self, moduleName, config)
+
+    # inputs to build charm candidates
+    pi = FilterSelection(moduleName + "DetachedLongPions",   [AutomaticData(config['pi']['TES'])], Code = config['pi']['Filter'])
+    K  = FilterSelection(moduleName + "DetachedLongKaons",   [AutomaticData(config['K' ]['TES'])], Code = config['K' ]['Filter'])
+    #mergedTracks  = MergedSelection(moduleName+"MergedTracks",RequiredSelections = [pi, K])
+
+    # loop over all charm decays in the configuration and save their MVA-filtered selection in a list
+    MVASelcHad = []
+    for name, cHad in config['CharmHadrons'].iteritems():
+
+      # save some computing time by using multi-body combinations
+      if "Comb12Cut" in cHad :
+        SelcHad = Combine3BodySelection (moduleName+'Proto'+name, [pi, K], DecayDescriptors = cHad["DecayDescriptors"],
+                                         Combination12Cut = cHad["Comb12Cut"], CombinationCut = cHad["CombCut"], MotherCut = cHad["MotherCut"])
+      else :
+        SelcHad = CombineSelection (moduleName+'Proto'+name, [pi, K], DecayDescriptors = cHad["DecayDescriptors"],
+                                    CombinationCut = cHad["CombCut"], MotherCut = cHad["MotherCut"])
+
+      # Apply MVA cut
+      MVASelcHad.append(self.applyMVA(moduleName+'_'+name, cHad['Parent'], cHad['Daughters'], [SelcHad], cHad['xmlFile'], cHad['MVACut']))
+
+    # merge this list and make a vertex from 2 of the candidates according to the given generic decay descriptors
+    mergedCharm = MergedSelection(moduleName+"MergedCharm",RequiredSelections = MVASelcHad)#, Unique = True)
+    multiCharm = CombineSelection (moduleName+'ProtoB', [mergedCharm], DecayDescriptors = config["DecayDescriptors"],
+                                   CombinationCut = config["CombCut"], MotherCut = config["MotherCut"])
+
+    # Create the stripping line
+    line = StrippingLine(moduleName+'Line', algos = [multiCharm])
+    self.registerLine(line)
+
+  def applyMVA(self, selname, parentname, daughters, b2cSel, MVAxmlFile, MVACutValue):
+    """
+    Applies a BDT cut based on the input beauty 2 charm selection
+    """
+    from MVADictHelpers import addTMVAclassifierValue
+    from Configurables import FilterDesktop
+
+    _XcMVAFilter = FilterDesktop(selname+"Filter", Code = "VALUE('LoKi::Hybrid::DictValue/"+parentname+"_BDT')>"+MVACutValue)
+    addTMVAclassifierValue(Component = _XcMVAFilter, XMLFile = MVAxmlFile,
+                            Variables = self.getMVAVars(parentname, daughters), ToolName = parentname+"_BDT")
+    return Selection(selname+'_MVAFilter', Algorithm = _XcMVAFilter, RequiredSelections = b2cSel)
+
+  def getMVAVars(self, parentname, daugthers):
+    """
+    Return all variables required for the BDT
+    Variable names MUST correspond exactly to what is needed by classifier (xml)
+    """
+
+    bdt_vars = {}
+    # Variables for D and daughters;  prefixes added later
+    vars_parent = {
+      'log_P'              : 'math.log10(P)',
+      'log_PT'             : 'math.log10(PT)',
+      'log_ENDVERTEX_CHI2' : 'math.log10(VFASPF(VCHI2))',
+      'log_IPCHI2_OWNPV'   : 'math.log10(MIPCHI2DV(PRIMARY))',
+      'log_FDCHI2_OWNPV'   : 'math.log10(BPVVDCHI2)',
+      'beta'               : '(SUMTREE(P,ISBASIC,0.)-(2.*CHILD(P,1)))/SUMTREE(P,ISBASIC,0.)',
+    }
+    vars_daughters = {
+      'log_PT'                 : 'math.log10(CHILD(PT,{0}))',
+      'log_IPCHI2_OWNPV'       : 'math.log10(CHILD(MIPCHI2DV(PRIMARY),{0}))',
+      'log_TRACK_VeloCHI2NDOF' : 'math.log10(switch(CHILD(TINFO(LHCb.Track.FitVeloNDoF,-1),{0})>0,CHILD(TINFO(LHCb.Track.FitVeloChi2,-1),{0})/CHILD(TINFO(LHCb.Track.FitVeloNDoF,-1),{0}),-1))',
+      'log_TRACK_TCHI2NDOF'    : 'math.log10(switch(CHILD(TINFO(LHCb.Track.FitTNDoF,-1),{0})>0,CHILD(TINFO(LHCb.Track.FitTChi2,-1),{0})/CHILD(TINFO(LHCb.Track.FitTNDoF,-1),{0}),-1))',
+      'log_TRACK_MatchCHI2'    : 'math.log10(CHILD(TINFO(LHCb.Track.FitMatchChi2,-1.),{0}))',
+      'log_TRACK_GhostProb'    : 'math.log10(CHILD(TRGHOSTPROB,{0}))',
+      'UsedRichAerogel'        : 'switch(CHILDCUT(PPCUT(PP_USEDAEROGEL),{0}),1,0)',
+      'UsedRich1Gas'           : 'switch(CHILDCUT(PPCUT(PP_USEDRICH1GAS),{0}),1,0)',
+      'UsedRich2Gas'           : 'switch(CHILDCUT(PPCUT(PP_USEDRICH2GAS),{0}),1,0)',
+      'RichAbovePiThres'       : 'switch(CHILDCUT(PPCUT(PP_RICHTHRES_PI),{0}),1,0)',
+      'RichAboveKaThres'       : 'switch(CHILDCUT(PPCUT(PP_RICHTHRES_K),{0}),1,0)',
+      'RichAbovePrThres'       : 'switch(CHILDCUT(PPCUT(PP_RICHTHRES_P),{0}),1,0)',
+      'atan_RichDLLe'          : 'math.atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLe,-1000),{0}))',
+      'atan_RichDLLmu'         : 'math.atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLmu,-1000),{0}))',
+      'atan_RichDLLk'          : 'math.atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLk,-1000),{0}))',
+      'atan_RichDLLp'          : 'math.atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLp,-1000),{0}))',
+      'atan_RichDLLbt'         : 'math.atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLbt,-1000),{0}))',
+      'atan_MuonLLbg'          : 'math.atan(switch(CHILD(PPINFO(LHCb.ProtoParticle.InAccMuon,0),{0})==1,CHILD(PPINFO(LHCb.ProtoParticle.MuonBkgLL,-10000),{0}),-1000))',
+      'atan_MuonLLmu'          : 'math.atan(switch(CHILD(PPINFO(LHCb.ProtoParticle.InAccMuon,0),{0})==1,CHILD(PPINFO(LHCb.ProtoParticle.MuonMuLL,-10000),{0}),-1000))',
+      'isMuon'                 : 'switch(CHILDCUT(ISMUON,{0}),1,0)',
+      'MuonNShared'            : 'switch(CHILD(PPINFO(LHCb.ProtoParticle.InAccMuon,0),{0})==1,CHILD(PPINFO(LHCb.ProtoParticle.MuonNShared,0),{0}),-1)',
+      'VeloCharge'             : 'CHILD(PPINFO(LHCb.ProtoParticle.VeloCharge,-1000),{0})',
+    }
+    # Add all parent variables to output
+    for var, loki in vars_parent.iteritems():
+      bdt_vars.update({'{}_{}'.format(parentname, var) : loki})
+    # Add all daughter variables to output
+    for daugthername, lab in daugthers.iteritems():
+      for var, loki in vars_daughters.iteritems():
+        bdt_vars.update({'{}_{}_{}'.format(parentname,daugthername, var) : loki.format(lab)})
+    # Print out variables for sanity
+    #for key in sorted(bdt_vars):
+    #    print '{:<25} : {}'.format(key, bdt_vars[key].replace(',', ', '))
+    #print 80 * '-'
+    return bdt_vars
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingLb2EtacKp.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingLb2EtacKp.py
new file mode 100644
index 000000000..18221e1eb
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingLb2EtacKp.py
@@ -0,0 +1,350 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Lb->eta_c K p
+'''
+
+__author__=['Liming Zhang', 'Xuesong Liu']
+__date__ = '23/11/2016'
+__version__= '$Revision: 2.0$'
+
+
+__all__ = (
+    'Lb2EtacKpConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              :  'Lb2EtacKp',
+    'BUILDERTYPE'       :  'Lb2EtacKpConf',
+    'CONFIG'    : {
+        'KaonCuts'      : "(PROBNNk > 0.1) & (PT > 300*MeV) & (TRGHOSTPROB<0.4)",
+        'ProtonCuts'    : "(PROBNNp > 0.1) & (PT > 300*MeV) & (P > 10*GeV) & (TRGHOSTPROB<0.4)",        
+        'PionCuts'      : "(PROBNNpi > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB<0.4)",
+        'EtacComAMCuts' : "(AM<3.45*GeV)",
+        'EtacComN4Cuts' : """
+                          (in_range(2.65*GeV, AM, 3.45*GeV))
+                          & ( (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3)+ACHILD(PT,4) ) > 2.5 *GeV)
+                          & ( (ACHILD(MIPCHI2DV(), 1) + ACHILD(MIPCHI2DV(), 2) + ACHILD(MIPCHI2DV(), 3) + ACHILD(MIPCHI2DV(), 4))>30)
+                          """,
+        'EtacMomN4Cuts' : """
+                           (VFASPF(VCHI2/VDOF) < 9.) 
+                           & (in_range(2.7*GeV, MM, 3.3*GeV)) 
+                           & (MIPCHI2DV(PRIMARY) > 0.) 
+                           & (BPVVDCHI2>10) 
+                           & (BPVDIRA>0.9)
+                           """,
+        'EtacComCuts'   : "(in_range(2.65*GeV, AM, 3.45*GeV))",
+        'LambdaSComCuts': "(ACHILD(PT,1)+ACHILD(PT,2) > 900.*MeV) & (AM < 4.0 *GeV) & (ADOCACHI2CUT(20., ''))",
+        'LambdaSMomCuts': """
+                          (MIPCHI2DV(PRIMARY) > 0.)
+                          & (BPVVDCHI2 > 10.)
+                          & (VFASPF(VCHI2) < 9.)
+                          & (BPVDIRA>0.9)
+                          """,
+        'KsCuts'        : "(ADMASS('KS0') < 30.*MeV) & (BPVDLS>5)",
+        'LbComCuts'     : "(ADAMASS('Lambda_b0') < 500 *MeV)",
+        'LbMomCuts'     : """
+                          (VFASPF(VCHI2/VDOF) < 10.) 
+                          & (BPVDIRA> 0.9999) 
+                          & (BPVIPCHI2()<25) 
+                          & (BPVVDCHI2>250)
+                          & (BPVVDRHO>0.1*mm) 
+                          & (BPVVDZ>2.0*mm)
+                          """,
+        'Prescale'      : 1.,
+        'RelatedInfoTools': [{
+                      'Type'              : 'RelInfoVertexIsolation',
+                      'Location'          : 'RelInfoVertexIsolation'
+                  }, {
+                      'Type'              : 'RelInfoVertexIsolationBDT',
+                      'Location'          : 'RelInfoVertexIsolationBDT'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 1.0,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                      'Location'          : 'RelInfoConeVariables_1.0'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 1.5,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                      'Location'          : 'RelInfoConeVariables_1.5'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 2.0,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                      'Location'          : 'RelInfoConeVariables_2.0'
+                  }]        
+        },
+    'STREAMS'           : ['Bhadron' ],
+    'WGs'               : ['BandQ'],
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+#from Configurables import DaVinci__N4BodyDecays
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+class Lb2EtacKpConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        self.SelKaons = self.createSubSel( OutputList = self.name + "SelKaons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLooseKaons/Particles' ), 
+                                           Cuts = config['KaonCuts']
+                                           )
+
+        self.SelPions = self.createSubSel( OutputList = self.name + "SelPions",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLoosePions/Particles' ), 
+                                           Cuts = config['PionCuts']
+                                           )
+
+        self.SelProtons = self.createSubSel( OutputList = self.name + "SelProtons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLooseProtons/Particles' ), 
+                                           Cuts = config['ProtonCuts']
+                                           )
+
+        """
+        Etac-> K K Pi Pi
+        """
+        self.SelEtac2KKPiPi = self.createN4BodySel( OutputList = self.name + "SelEtac2KKPiPi",
+                                                    DaughterLists = [ self.SelKaons, self.SelPions ],
+                                                    DecayDescriptor = "eta_c(1S) -> K+ K- pi+ pi-",
+                                                    ComAMCuts      = config['EtacComAMCuts'],
+                                                    PreVertexCuts  = config['EtacComN4Cuts'], 
+                                                    PostVertexCuts = config['EtacMomN4Cuts']
+                                                    )
+
+        """
+        Etac-> K K K K
+        """
+        self.SelEtac2KKKK = self.createN4BodySel( OutputList = self.name + "SelEtac2KKKK",
+                                                  DaughterLists = [ self.SelKaons ],
+                                                  DecayDescriptor = "eta_c(1S) -> K+ K- K+ K-",
+                                                  ComAMCuts      = config['EtacComAMCuts'],
+                                                  PreVertexCuts  = config['EtacComN4Cuts'], 
+                                                  PostVertexCuts = config['EtacMomN4Cuts']
+                                                  )
+
+        
+        """
+        Etac-> Pi Pi Pi Pi
+        """
+        self.SelEtac2PiPiPiPi = self.createN4BodySel( OutputList = self.name + "SelEtac2PiPiPiPi",
+                                                      DaughterLists = [ self.SelPions ],
+                                                      DecayDescriptor = "eta_c(1S) -> pi+ pi- pi+ pi-",
+                                                      ComAMCuts      = config['EtacComAMCuts'],
+                                                      PreVertexCuts  = config['EtacComN4Cuts'], 
+                                                      PostVertexCuts = config['EtacMomN4Cuts']
+                                                      )
+
+        """
+        Etac-> p pbar Pi Pi
+        """
+        self.SelEtac2PPbarPiPi = self.createN4BodySel( OutputList = self.name + "SelEtac2PPbarPiPi",
+                                                      DaughterLists = [ self.SelPions, self.SelProtons ],
+                                                      DecayDescriptor = "eta_c(1S) -> p+ p~- pi+ pi-",
+                                                      ComAMCuts      = config['EtacComAMCuts'],
+                                                      PreVertexCuts  = config['EtacComN4Cuts'], 
+                                                      PostVertexCuts = config['EtacMomN4Cuts']
+                                                      )
+
+        """
+        Etac-> p pbar
+        """
+        self.SelEtac2PPbar = self.createCombinationSel( OutputList = self.name + "SelEtac2PPbar",
+                                                        DecayDescriptor = "eta_c(1S) -> p+ p~-",
+                                                        DaughterLists = [ self.SelProtons ],                                                        
+                                                        PreVertexCuts  = config['EtacComCuts'], 
+                                                        PostVertexCuts = config['EtacMomN4Cuts']
+                                                        )
+        """
+        Eta_c
+        """
+        from PhysSelPython.Wrappers import MergedSelection
+
+        self.SelEtac = MergedSelection( self.name + "SelEtac",
+                                        RequiredSelections =  [ self.SelEtac2KKPiPi, 
+                                                                self.SelEtac2KKKK,
+                                                                self.SelEtac2PiPiPiPi,
+                                                                self.SelEtac2PPbarPiPi,
+                                                                ])
+        
+        """
+        Lambda*
+        """
+        self.SelLambdaS = self.createCombinationSel( OutputList = self.name + "SelLambdaS",
+                                         DecayDescriptor = "[Lambda(1520)0 -> p+ K-]cc", 
+                                         DaughterLists = [self.SelProtons, self.SelKaons],
+                                         PreVertexCuts  = config['LambdaSComCuts'],     
+                                         PostVertexCuts = config['LambdaSMomCuts']
+                                         )
+        
+        """
+        Kshort 
+        """
+        # Both LL and DD 
+        self.InputKs = MergedSelection( self.name + "InputKs",
+                                        RequiredSelections = [DataOnDemand(Location = "Phys/StdLooseKsDD/Particles"),
+                                                              DataOnDemand(Location = "Phys/StdLooseKsLL/Particles")] )
+
+        self.SelKs = self.createSubSel( OutputList = self.name + "SelKs",
+                                        InputList = self.InputKs,
+                                        Cuts = config['KsCuts'] ) 
+
+        # Eta_c -> KS0 K Pi 
+        self.SelEtac2KsKPi = self.createCombinationSel( OutputList = self.name + "SelEtac2KsKPi",
+                                                        DecayDescriptor = "[eta_c(1S) -> KS0 K+ pi-]cc",
+                                                        DaughterLists = [ self.SelKs, self.SelKaons, self.SelPions ],                                                        
+                                                        PreVertexCuts  = config['EtacComCuts'], 
+                                                        PostVertexCuts = config['EtacMomN4Cuts']
+                                                        )
+
+        """
+        Lb->Eta_c(KsKPi) Lambda* 
+        """
+        self.SelLb2EtacKp_KsKPi = self.createCombinationSel( OutputList = self.name + "SelLb2EtacKp_KsKPi",
+                                                              DecayDescriptor = "[Lambda_b0 -> eta_c(1S) Lambda(1520)0]cc",
+                                                              DaughterLists = [ self.SelLambdaS, self.SelEtac2KsKPi ],                    
+                                                              PreVertexCuts  = config['LbComCuts'],
+                                                              PostVertexCuts = config['LbMomCuts'] )
+
+        self.Lb2EtacKp_KsKPiLine = StrippingLine( self.name + '_KsKPiLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                 #  HLT       = config['HLTCuts'],
+                                                   algos     = [ self.SelLb2EtacKp_KsKPi ],
+                                                   EnableFlavourTagging = False,
+                                                   MDSTFlag = False,
+                                                   RelatedInfoTools = self.config['RelatedInfoTools']                                                   
+                                                   )
+
+        self.registerLine( self.Lb2EtacKp_KsKPiLine )
+        
+        """
+        Lb->Eta_c(p pbar) Lambda* 
+        """
+        self.SelLb2EtacKp_PPbar = self.createCombinationSel( OutputList = self.name + "SelLb2EtacKp_PPbar",
+                                                              DecayDescriptor = "[Lambda_b0 -> eta_c(1S) Lambda(1520)0]cc",
+                                                              DaughterLists = [ self.SelLambdaS, self.SelEtac2PPbar ],                    
+                                                              PreVertexCuts  = config['LbComCuts'],
+                                                              PostVertexCuts = config['LbMomCuts'] )
+
+        self.Lb2EtacKp_PPbarLine = StrippingLine( self.name + '_PPbarLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                  # HLT       = config['HLTCuts'],
+                                                   algos     = [ self.SelLb2EtacKp_PPbar ],
+                                                   EnableFlavourTagging = False,
+                                                   MDSTFlag = False,
+                                                   RelatedInfoTools = self.config['RelatedInfoTools']                                                   
+                                                   )
+
+        self.registerLine( self.Lb2EtacKp_PPbarLine )
+        
+
+
+        """
+        Lb->Eta_c Lambda* 
+        """
+        self.SelLb2EtacKp = self.createCombinationSel( OutputList = self.name + "SelLb2EtacKp",
+                                                        DecayDescriptor = "[Lambda_b0 -> eta_c(1S) Lambda(1520)0]cc",
+                                                        DaughterLists = [ self.SelLambdaS, self.SelEtac ],                    
+                                                        PreVertexCuts  = config['LbComCuts'],
+                                                        PostVertexCuts = config['LbMomCuts'] )
+
+        self.Lb2EtacKp_4hLine            = StrippingLine( self.name + '_4hLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                 #  HLT       = config['HLTCuts'],
+                                                   algos     = [ self.SelLb2EtacKp ],
+                                                   EnableFlavourTagging = False,
+                                                   MDSTFlag = False,
+                                                   RelatedInfoTools = self.config['RelatedInfoTools']                                                   
+                                                   )
+
+        self.registerLine( self.Lb2EtacKp_4hLine )
+        
+
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+
+    def createN4BodySel( self, OutputList,
+                         DecayDescriptor,
+                         DaughterLists,
+                         DaughterCuts = {} ,
+                         ComAMCuts      = "AALL",
+                         PreVertexCuts  = "AALL",
+                         PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = DaVinci__N4BodyDecays ( DecayDescriptor = DecayDescriptor,      
+                                           DaughtersCuts = DaughterCuts,
+                                           Combination12Cut  = ComAMCuts + "&" + "( ACHI2DOCA(1,2)<20 )",
+                                           Combination123Cut = ComAMCuts + "&" + "( ACHI2DOCA(1,3)<20 ) & ( ACHI2DOCA(2,3)<20 )",
+                                           CombinationCut = "( ACHI2DOCA(1,4)<20 ) & ( ACHI2DOCA(2,4)<20 ) & ( ACHI2DOCA(3,4)<20 )" + " & " + PreVertexCuts,
+                                           MotherCut = PostVertexCuts,
+                                           ReFitPVs = False )
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+    
+
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingLb2L0X3872.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingLb2L0X3872.py
new file mode 100644
index 000000000..4fa063a3a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingLb2L0X3872.py
@@ -0,0 +1,136 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+StrippingLine for Lambda_b0 -> Lambda0 X(3872) and Lambda_b0 -> Lambda0 Psi(2S)
+'''
+__author__  = 'Xijun Wang'
+__date__    = '2021-3-18'
+__version__ = 'Stripping28'
+
+__all__ = (
+            'Lb2L0X3872Conf'            ,
+            'default_config'            
+            )
+
+default_config = {
+        'NAME'              :   'Lb2L0X3872',
+        'BUILDERTYPE'       :   'Lb2L0X3872Conf',
+        'CONFIG'    : {
+            'PionCuts_X'    :   "(TRCHI2DOF < 4.0) & (PT > 10.*MeV) & (PROBNNpi > 0.2) & ( MIPCHI2DV(PRIMARY) >4)",
+            'LooseJpsiCuts' :   "(MINTREE('mu+'==ABSID,PT) > 500.0 *MeV) & (MM > 2996.916) & (MM < 3196.916) & ((BPVDLS>2.5) | (BPVDLS<-2.5)) & (MINTREE('mu+'==ABSID,PIDmu) > 0.0)  & (VFASPF(VCHI2) < 25.)",
+            'JpsiComCuts'   :   "(in_range(2.5*GeV, AM, 4.0*GeV))",
+            'JpsiMomCuts'   :   "(VFASPF(VCHI2) < 25.)",
+            'XComCuts'      :   "((AM > 3200*MeV) & (AM < 5000.*MeV))",
+            'XMomCuts'      :   "(VFASPF(VCHI2) < 100.)",
+            'LbComCuts'     :   "((AM > 5000.*MeV) & (AM < 6200.*MeV))",
+            'LbMomCuts'     :   "(VFASPF(VCHI2) < 25.)",
+            'L0Cuts'	    :	"(MAXTREE('p+'==ABSID, PT) > 10.*MeV) & (MAXTREE('pi-'==ABSID, PT) > 10.*MeV) & (ADMASS('Lambda0') < 50.*MeV) & (VFASPF(VCHI2) < 25 )",
+            'Prescale'      :   1.0 ,
+            },
+        'STREAMS'           :   ['Dimuon'],
+        'WGs'               :   ['BandQ']
+        }
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class Lb2L0X3872Conf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ):
+
+        LineBuilder.__init__( self, name, config )
+        self.name = name
+        self.config = config
+
+
+        self.SelPions_X = self.createSubSel( OutputList = self.name + "SelPions_X",
+                                             InputList =  DataOnDemand(Location = 'Phys/StdAllNoPIDsPions/Particles' ),
+                                             Cuts = config['PionCuts_X']
+                                             )
+
+
+        """
+        J/psi -> mu+ mu-
+        """
+
+        self.SelJpsi2Mumu = self.createSubSel( OutputList = self.name + "SelJpsiMumu",
+                                               InputList = DataOnDemand(Location = 'Phys/StdLooseJpsi2MuMu/Particles'),
+                                               Cuts = config['LooseJpsiCuts'])
+
+        """
+        Psi(2S) -> J/psi(1S) pi+ pi-
+        """
+        self.SelX2JpsiPiPi = self.createCombinationSel( OutputList = self.name + "SelX2JpsiPiPi",
+                                                        DecayDescriptor = "psi(2S) -> J/psi(1S) pi+ pi-",
+                                                        DaughterLists = [ self.SelPions_X, self.SelJpsi2Mumu ],
+                                                        PreVertexCuts = config['XComCuts'],
+                                                        PostVertexCuts = config['XMomCuts']
+                                                        )
+        """
+        Lambda0 -> p+ pi-
+        """
+	from PhysSelPython.Wrappers import MergedSelection
+	self.InputL0 = MergedSelection( self.name + "InputL0",
+           			        RequiredSelections = [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles"),
+                                                              DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")]  )
+	self.SelL0 = self.createSubSel( OutputList = self.name + "SelL0",
+				        InputList = self.InputL0,
+				        Cuts = config['L0Cuts']
+				        )
+	
+
+        """
+        Lambda_b0 -> Lambda0 Psi(2S)
+        """
+        self.SelLb2L0X3872 = self.createCombinationSel( OutputList = self.name + "SelLb2L0X3872",
+                                                    DecayDescriptor = "[Lambda_b0 -> Lambda0 psi(2S)]cc",
+                                                    DaughterLists = [ self.SelL0, self.SelX2JpsiPiPi ],
+                                                    PreVertexCuts = config['LbComCuts'],
+                                                    PostVertexCuts = config['LbMomCuts']
+                                                    )
+
+        self.Lb2L0X3872Line = StrippingLine( self.name + 'Line',
+                                     	     prescale = config['Prescale'],
+	                                     algos    = [ self.SelLb2L0X3872 ],
+                	                     MDSTFlag = False,
+					     )
+
+        self.registerLine( self.Lb2L0X3872Line )
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) : 
+        filters = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filters,
+                          RequiredSelections = [ InputList ] )
+    
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughtersCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughtersCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False )
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists )
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOmegab2XicKpi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOmegab2XicKpi.py
new file mode 100644
index 000000000..7f5da176e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOmegab2XicKpi.py
@@ -0,0 +1,209 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Radiative Decays Stripping Selections and StrippingLines.
+Provides functions to build Bc, D0, Ds1 selections.
+Provides class Bc2Ds1GammaConf, which constructs the Selections and
+StrippingLines given a configuration dictionary.
+Exported selection makers: 'makeXic', 'makeBc2Ds1Gamma',
+"""
+
+__author__ = ['Marco Pappagallo']
+__date__ = '12/11/2015'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('Omegab2XicKpiConf',
+           'makeXic',
+           'makeOmegab2XicKpi',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+#default_name = 'Bc2Ds1Gamma'
+default_config = {
+    'NAME'              : 'Omegab2XicKpi',
+    'BUILDERTYPE'       : 'Omegab2XicKpiConf',
+    'CONFIG'    : {
+                   # Omegab
+                    'MinOmegabMass'      : 5500.     # MeV
+                   ,'MaxOmegabMass'      : 6700.     # MeV
+                   ,'Omegab_PT'          : 3500.     # MeV 
+#                   (ASUM(SUMTREE(PT,(ISBASIC | (ID=='gamma')),0.0))>5000*MeV)
+                   ,'OmegabVertChi2DOF'  : 10        # Dimensionless 
+                   ,'OmegabLT'           : 0.2       # ps
+                   ,'OmegabIPCHI2'       : 25        # Dimensionless
+                   ,'OmegabDIRA'         : 0.999     # Dimensionless
+                   ,'KaonProbNN'          : 0.1       # Dimensionless
+                   ,'PionProbNN'          : 0.1       # Dimensionless
+                   ,'ProtProbNN'          : 0.1       # Dimensionless
+                   ,'XicPT'               : 1800      # MeV
+                   ,'XicBPVVDCHI2'        : 36
+                   ,'XicDIRA'             : 0.        # Dimensionless
+                   ,'XicDeltaMassWin'     : 100       # MeV
+                   ,'MaxXicVertChi2DOF'   : 10        # Dimensionless
+                   # Pre- and postscales
+                   ,'Omegab2XicKpiPreScale'               : 1.0
+                   ,'Omegab2XicKpiPostScale'              : 1.0
+                  },
+    'STREAMS' : [ 'Bhadron' ],
+    'WGs'    : [ 'BandQ' ]
+    }
+
+class Omegab2XicKpiConf(LineBuilder):
+    """
+    Definition of Bc -> Ds1 Gamma stripping
+    
+    Constructs Bc -> Ds1 Gamma Selections and StrippingLines from
+    a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> gammaConf = StrippingB2XGammaConf('StrippingB2XGammaTest',config)
+    >>> gammaLines = gammaConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selPhoton                    : Photon Selection object
+    selD0                        : nominal D0 -> K pi Selection object
+    selDs1                       : nominal Ds1 -> D0 K Selection object 
+    selDs1WS                     : nominal Ds1 -> D~0 K Selection object
+    selBc2Ds1Gamma               : Bc -> Ds1 Gamma Selection object 
+    selBc2Ds1GammaWS             : Bc -> Ds1 Gamma Selection object
+    lines                  : List of lines
+
+    Exports as class data member:
+    StrippingB2XGammaConf.__configuration_keys__ : List of required configuration parameters.    
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        # if name not set outside, set it to empty
+        #if name == None:
+        #    name = ""   
+
+        # Selection of Bc daughters: photon, D0, Ds1
+
+        self.selXic = makeXic('XicFor%s' % name,
+                              config['KaonProbNN'],
+                              config['PionProbNN'],
+                              config['ProtProbNN'],
+                              config['XicPT'],
+                              config['XicDeltaMassWin'],
+                              config['MaxXicVertChi2DOF'],
+                              config['XicBPVVDCHI2'],
+                              config['XicDIRA'])
+
+        # Bc->Ds1 Gamma selections
+        self.selOmegab2XicKpi = makeOmegab2XicKpi('Omegab2XicKpiFor%s' % name,
+                                                  self.selXic,
+                                                  '[Omega_b- -> Xi_c+ K- pi-]cc',
+                                                  config['KaonProbNN'],
+                                                  config['PionProbNN'],
+                                                  config['MaxOmegabMass'],
+                                                  config['MinOmegabMass'],
+                                                  config['OmegabVertChi2DOF'],
+                                                  config['OmegabIPCHI2'],
+                                                  config['OmegabLT'],
+                                                  config['Omegab_PT'],
+                                                  config['OmegabDIRA'])
+        
+        self.selOmegab2XicKpiWS = makeOmegab2XicKpi('Omegab2XicKpiWSFor%s' % name,
+                                                    self.selXic,
+                                                    '[Omega_b- -> Xi_c+ K- pi+]cc',
+                                                    config['KaonProbNN'],
+                                                    config['PionProbNN'],
+                                                    config['MaxOmegabMass'],
+                                                    config['MinOmegabMass'],
+                                                    config['OmegabVertChi2DOF'],
+                                                    config['OmegabIPCHI2'],
+                                                    config['OmegabLT'],
+                                                    config['Omegab_PT'],
+                                                    config['OmegabDIRA'])
+        
+        # Create and register stripping lines
+        self.Omegab2XicKpiLine = StrippingLine("%sLine" % name,
+                                               prescale=config['Omegab2XicKpiPreScale'],
+                                               postscale=config['Omegab2XicKpiPostScale'],
+                                               selection=self.selOmegab2XicKpi)
+#                                               selection=self.selXic) 
+        self.registerLine(self.Omegab2XicKpiLine)
+
+        self.Omegab2XicKpiLineWS = StrippingLine("%sWSLine" % name,
+                                               prescale=config['Omegab2XicKpiPreScale'],
+                                               postscale=config['Omegab2XicKpiPostScale'],
+                                               selection=self.selOmegab2XicKpiWS)
+        self.registerLine(self.Omegab2XicKpiLineWS)
+        
+def makeXic(name, KaonProbNN, PionProbNN, ProtProbNN, XicPT, XicDeltaMassWin, MaxXicVertChi2DOF, XicBPVVDCHI2, XicDIRA):
+    """
+    Create and return a Ds1+ -> D0/D~0 K+ Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg D0Sel: D0 selection.
+    @arg DecDescr: Decay descriptor
+    @arg KaonProbNN: PID of Kaon
+    @arg TrGhostProb: Ghost probability of kaon
+    @arg XicDeltaMassWin: Mass difference m(D0K) - m(D0)
+    @arg MaxXicVertChi2DOF: chi2/NDOF
+    @return: Selection object
+    """
+    _daughterKCut  = "(PROBNNk  > %(KaonProbNN)s)" % locals()
+    _daughterpiCut = "(PROBNNpi > %(PionProbNN)s)" % locals()
+    _daughterpCut  = "(PROBNNp  > %(ProtProbNN)s)" % locals()
+
+    _combinationCut = "(ASUM(PT)> %(XicPT)s*MeV) & (ADAMASS('Xi_c+') < 1.25*%(XicDeltaMassWin)s*MeV) & (ACUTDOCA(0.5*mm,'LoKi::DistanceCalculator'))" % locals()
+    _motherCut = "(ADMASS('Xi_c+') < %(XicDeltaMassWin)s*MeV) & (VFASPF(VCHI2/VDOF)<%(MaxXicVertChi2DOF)s) & (BPVVDCHI2>%(XicBPVVDCHI2)s) & (BPVDIRA>%(XicDIRA)s)" % locals()
+    _Xic = CombineParticles(DecayDescriptor = "[Xi_c+ -> p+ K- pi+]cc",
+                            DaughtersCuts = {"K+"  : _daughterKCut,
+                                             "pi+" : _daughterpiCut,
+                                             "p+"  : _daughterpCut},
+                            CombinationCut = _combinationCut,
+                            MotherCut=_motherCut)
+    
+    _stdANNKaon    = DataOnDemand(Location="Phys/StdLooseANNKaons/Particles")
+    _stdANNPion    = DataOnDemand(Location="Phys/StdLooseANNPions/Particles")
+    _stdANNProtons = DataOnDemand(Location="Phys/StdLooseANNProtons/Particles")
+    
+    return Selection(name, Algorithm=_Xic, RequiredSelections=[_stdANNKaon, _stdANNPion, _stdANNProtons])
+                                
+def makeOmegab2XicKpi(name, XicSel, DecDescr, KaonProbNN, PionProbNN, MaxOmegabMass, MinOmegabMass, OmegabVertChi2DOF, OmegabIPCHI2, OmegabLT, Omegab_PT, OmegabDIRA):
+    """
+    Create and return a Omegab- -> Xic+ K- pi- Selection object, starting with the daughters' selections.
+    """
+
+    _stdANNKaonAll    = DataOnDemand(Location="Phys/StdAllLooseANNKaons/Particles")
+    _stdANNPionAll    = DataOnDemand(Location="Phys/StdAllLooseANNPions/Particles")
+
+    _daughterKCut  = "(PROBNNk  > %(KaonProbNN)s)" % locals()
+    _daughterpiCut = "(PROBNNpi > %(PionProbNN)s)" % locals()
+    
+    _combinationCut = "(AM < %(MaxOmegabMass)s*MeV+500*MeV) & (AM > %(MinOmegabMass)s*MeV-500*MeV)" % locals()
+    #_combinationCut = "(AM < %(MaxOmegabMass)s*MeV) & (AM > %(MinOmegabMass)s*MeV)" % locals()
+    _motherCut = "(M < %(MaxOmegabMass)s*MeV) & (M > %(MinOmegabMass)s*MeV) & (VFASPF(VCHI2/VDOF)<%(OmegabVertChi2DOF)s) & (BPVIPCHI2() < %(OmegabIPCHI2)s) & (BPVLTIME()>%(OmegabLT)s*ps) & (PT>%(Omegab_PT)s*MeV) & (BPVDIRA>%(OmegabDIRA)s)" % locals()
+        
+    _Omegab = CombineParticles(DecayDescriptor = DecDescr,
+                               DaughtersCuts = {"K+"  : _daughterKCut,
+                                                "pi+" : _daughterpiCut
+                                                },
+                               CombinationCut = _combinationCut,
+                               MotherCut=_motherCut)
+
+    return Selection(name, Algorithm=_Omegab, RequiredSelections=[XicSel, _stdANNKaonAll, _stdANNPionAll])
+        
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOmegabDecays.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOmegabDecays.py
new file mode 100644
index 000000000..cc59714af
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOmegabDecays.py
@@ -0,0 +1,764 @@
+###############################################################################
+# (c) Copyright 2019 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.                                       #
+###############################################################################
+"""
+This module supersedes StrippingOmegab2XicKpi.py
+Module for construction of Omegab Decays Stripping Selections and StrippingLines.
+Provides functions to build Xic, Omegac, Omegab selections.
+Provides class OmegabDecaysConf, which constructs the Selections and
+StrippingLines given a configuration dictionary.
+Exported selection makers: 'makeXic', 'makeOmegac', 'makeXic0', 'makeOmegab2XicKpi', 'makeOmegab2XicgammaKpi', 'makeOmegab2Omegacpi', 'makeOmegab2Omegacpi0pi', 'makeOmegab2Omegacgammapi'
+"""
+
+__author__ = ['Marco Pappagallo']
+__date__ = '23/01/2019'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('OmegabDecaysConf', 'makeXic', 'makeOmegac', 'makeXic0',
+           'makeOmegab2XicKpi', 'makeOmegab2XicgammaKpi',
+           'makeOmegab2Omegacpi', 'makeOmegab2Omegacpi0pi',
+           'makeOmegab2Omegacgammapi', 'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+#default_name = ''
+default_config = {
+    'NAME': 'OmegabDecays',
+    'BUILDERTYPE': 'OmegabDecaysConf',
+    'CONFIG': {
+        # Omegab
+        'MinOmegabMass': 5500.  # MeV
+        ,
+        'MaxOmegabMass': 6700.  # MeV
+        ,
+        'Omegab_PT': 3500.  # MeV
+        ,
+        'OmegabVertChi2DOF': 10  # Dimensionless
+        ,
+        'OmegabLT': 0.2  # ps
+        ,
+        'OmegabIPCHI2': 25  # Dimensionless
+        ,
+        'OmegabDIRA': 0.999  # Dimensionless
+        ,
+        'KaonProbNN': 0.1  # Dimensionless
+        ,
+        'PionProbNN': 0.1  # Dimensionless
+        ,
+        'ProtProbNN': 0.1  # Dimensionless
+        ,
+        'TrackMinIPCHI2': 4  # Dimensionless
+        ,
+        'XicPT': 1800  # MeV
+        ,
+        'XicBPVVDCHI2': 36,
+        'XicDIRA': 0.  # Dimensionless
+        ,
+        'XicDeltaMassWin': 100  # MeV
+        ,
+        'XicprDeltaMassWin': 250  # MeV
+        ,
+        'OmegacstDeltaMassWin': 500  # MeV
+        ,
+        'MaxXicVertChi2DOF': 10  # Dimensionless
+        # Pre- and postscales
+        ,
+        'OmegabDecaysPreScale': 1.0,
+        'OmegabDecaysPostScale': 1.0
+    },
+    'STREAMS': ['Bhadron'],
+    'WGs': ['BandQ']
+}
+
+
+class OmegabDecaysConf(LineBuilder):
+    """
+    Definition of Omegab -> Xic K pi stripping
+
+    Constructs Omegab -> Xic K pi Selections and StrippingLines from
+    a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> gammaConf = StrippingB2XGammaConf('StrippingB2XGammaTest',config)
+    >>> gammaLines = gammaConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selXic                       : nominal Xic+   -> p K- pi+ Selection object
+    selXic0                      : nominal Xic0   -> p K- K- pi+ Selection object
+    selOmegac                    : nominal Omegac -> p K- K- pi+ Selection object
+    selOmegab2XicKpi             : nominal Omegab- -> Xic+ K- pi- Selection object
+    selOmegab2XicKpiWS           : nominal Omegab- -> Xic+ K- pi+ Selection object
+    selOmegab2XicgammaKpi        : nominal Omegab- -> Xic+ gamma K- pi- Selection object
+    selOmegab2XicgammaKpiWS      : nominal Omegab- -> Xic+ gamma K- pi+ Selection object
+    selOmegab2Xic0piKpi          : nominal Omegab- -> Xic0 pi+ K- pi- Selection object
+    selOmegab2Xic0piKpiWS        : nominal Omegab- -> Xic0 pi+ K- pi+ Selection object
+    selOmegab2Omegacpi           : nominal Omegab- -> Omegac pi- Selection object
+    selOmegab2OmegacpiWS         : nominal Omegab- -> Omegac pi+ Selection object
+    selOmegab2Omegacpipipi       : nominal Omegab- -> Omegac pi- pi+ pi- Selection object
+    selOmegab2Omegacpi0pi        : nominal Omegab- -> Omegac pi0 pi- Selection object
+    selOmegab2Omegacpi0piWS      : nominal Omegab- -> Omegac pi0 pi+ Selection object
+    selOmegab2Omegacgammapi      : nominal Omegab- -> Omegac gamma pi- Selection object
+    selOmegab2OmegacgammapiWS    : nominal Omegab- -> Omegac gamma pi+ Selection object
+    lines                  : List of lines
+
+    Exports as class data member:
+    StrippingB2XGammaConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        # if name not set outside, set it to empty
+        #if name == None:
+        #    name = ""
+
+        # Selection of Omegab daughters: Xic
+
+        self.selXic = makeXic(
+            'XicFor%s' % name, config['KaonProbNN'], config['PionProbNN'],
+            config['ProtProbNN'], config['XicPT'], config['XicDeltaMassWin'],
+            config['MaxXicVertChi2DOF'], config['XicBPVVDCHI2'],
+            config['XicDIRA'], config['TrackMinIPCHI2'])
+
+        self.selOmegac = makeOmegac(
+            'OmegacFor%s' % name, config['KaonProbNN'], config['PionProbNN'],
+            config['ProtProbNN'], config['XicPT'], config['XicDeltaMassWin'],
+            config['MaxXicVertChi2DOF'], config['XicBPVVDCHI2'],
+            config['XicDIRA'], config['TrackMinIPCHI2'])
+
+        self.selXic0 = makeXic0(
+            'Xic0For%s' % name, config['KaonProbNN'], config['PionProbNN'],
+            config['ProtProbNN'], config['XicPT'], config['XicDeltaMassWin'],
+            config['MaxXicVertChi2DOF'], config['XicBPVVDCHI2'],
+            config['XicDIRA'], config['TrackMinIPCHI2'])
+
+        # Omegab -> Xic K pi selections
+        self.selOmegab2XicKpi = makeOmegab2XicKpi(
+            'Omegab2XicKpiFor%s' % name, self.selXic,
+            '[Omega_b- -> Xi_c+ K- pi-]cc', config['KaonProbNN'],
+            config['PionProbNN'], config['MaxOmegabMass'],
+            config['MinOmegabMass'], config['OmegabVertChi2DOF'],
+            config['OmegabIPCHI2'], config['OmegabLT'], config['Omegab_PT'],
+            config['OmegabDIRA'], config['TrackMinIPCHI2'])
+
+        self.selOmegab2XicKpiWS = makeOmegab2XicKpi(
+            'Omegab2XicKpiWSFor%s' % name, self.selXic,
+            '[Omega_b- -> Xi_c+ K- pi+]cc', config['KaonProbNN'],
+            config['PionProbNN'], config['MaxOmegabMass'],
+            config['MinOmegabMass'], config['OmegabVertChi2DOF'],
+            config['OmegabIPCHI2'], config['OmegabLT'], config['Omegab_PT'],
+            config['OmegabDIRA'], config['TrackMinIPCHI2'])
+
+        # Omegab -> Xic gamma K pi selections
+        self.selOmegab2XicgammaKpi = makeOmegab2XicgammaKpi(
+            'Omegab2XicgammaKpiFor%s' % name, self.selXic,
+            '[Omega_b- -> Xi_c+ gamma K- pi-]cc', config['KaonProbNN'],
+            config['PionProbNN'], config['MaxOmegabMass'],
+            config['MinOmegabMass'], config['OmegabVertChi2DOF'],
+            config['OmegabIPCHI2'], config['OmegabLT'], config['Omegab_PT'],
+            config['OmegabDIRA'], config['TrackMinIPCHI2'],
+            config['XicprDeltaMassWin'])
+
+        self.selOmegab2XicgammaKpiWS = makeOmegab2XicgammaKpi(
+            'Omegab2XicgammaKpiWSFor%s' % name, self.selXic,
+            '[Omega_b- -> Xi_c+ gamma K- pi+]cc', config['KaonProbNN'],
+            config['PionProbNN'], config['MaxOmegabMass'],
+            config['MinOmegabMass'], config['OmegabVertChi2DOF'],
+            config['OmegabIPCHI2'], config['OmegabLT'], config['Omegab_PT'],
+            config['OmegabDIRA'], config['TrackMinIPCHI2'],
+            config['XicprDeltaMassWin'])
+
+        # Omegab -> Xic0 pi K pi selections
+        self.selOmegab2Xic0piKpi = makeOmegab2XicKpi(
+            'Omegab2Xic0piKpiFor%s' % name, self.selXic0,
+            '[Omega_b- -> Xi_c0 pi+ K- pi-]cc', config['KaonProbNN'],
+            config['PionProbNN'], config['MaxOmegabMass'],
+            config['MinOmegabMass'], config['OmegabVertChi2DOF'],
+            config['OmegabIPCHI2'], config['OmegabLT'], config['Omegab_PT'],
+            config['OmegabDIRA'], config['TrackMinIPCHI2'])
+
+        self.selOmegab2Xic0piKpiWS = makeOmegab2XicKpi(
+            'Omegab2Xic0piKpiWSFor%s' % name, self.selXic0,
+            '[Omega_b- -> Xi_c0 pi+ K- pi+]cc', config['KaonProbNN'],
+            config['PionProbNN'], config['MaxOmegabMass'],
+            config['MinOmegabMass'], config['OmegabVertChi2DOF'],
+            config['OmegabIPCHI2'], config['OmegabLT'], config['Omegab_PT'],
+            config['OmegabDIRA'], config['TrackMinIPCHI2'])
+
+        # Omegab -> Omegac pi selections
+        self.selOmegab2Omegacpi = makeOmegab2Omegacpi(
+            'Omegab2OmegacpiFor%s' % name, self.selOmegac,
+            '[Omega_b- -> Omega_c0 pi-]cc', config['PionProbNN'],
+            config['MaxOmegabMass'], config['MinOmegabMass'],
+            config['OmegabVertChi2DOF'], config['OmegabIPCHI2'],
+            config['OmegabLT'], config['Omegab_PT'], config['OmegabDIRA'],
+            config['TrackMinIPCHI2'])
+
+        self.selOmegab2OmegacpiWS = makeOmegab2Omegacpi(
+            'Omegab2OmegacpiWSFor%s' % name, self.selOmegac,
+            '[Omega_b- -> Omega_c0 pi+]cc', config['PionProbNN'],
+            config['MaxOmegabMass'], config['MinOmegabMass'],
+            config['OmegabVertChi2DOF'], config['OmegabIPCHI2'],
+            config['OmegabLT'], config['Omegab_PT'], config['OmegabDIRA'],
+            config['TrackMinIPCHI2'])
+
+        # Omegab -> Omegac pi0 pi selections
+        self.selOmegab2Omegacpi0pi = makeOmegab2Omegacpi0pi(
+            'Omegab2Omegacpi0piFor%s' % name, self.selOmegac,
+            '[Omega_b- -> Omega_c0 pi0 pi-]cc', config['PionProbNN'],
+            config['MaxOmegabMass'], config['MinOmegabMass'],
+            config['OmegabVertChi2DOF'], config['OmegabIPCHI2'],
+            config['OmegabLT'], config['Omegab_PT'], config['OmegabDIRA'],
+            config['TrackMinIPCHI2'])
+
+        self.selOmegab2Omegacpi0piWS = makeOmegab2Omegacpi0pi(
+            'Omegab2Omegacpi0piWSFor%s' % name, self.selOmegac,
+            '[Omega_b- -> Omega_c0 pi0 pi+]cc', config['PionProbNN'],
+            config['MaxOmegabMass'], config['MinOmegabMass'],
+            config['OmegabVertChi2DOF'], config['OmegabIPCHI2'],
+            config['OmegabLT'], config['Omegab_PT'], config['OmegabDIRA'],
+            config['TrackMinIPCHI2'])
+
+        # Omegab -> Omegac gamma pi selections
+        self.selOmegab2Omegacgammapi = makeOmegab2Omegacgammapi(
+            'Omegab2OmegacgammapiFor%s' % name, self.selOmegac,
+            '[Omega_b- -> Omega_c0 gamma pi-]cc', config['PionProbNN'],
+            config['MaxOmegabMass'], config['MinOmegabMass'],
+            config['OmegabVertChi2DOF'], config['OmegabIPCHI2'],
+            config['OmegabLT'], config['Omegab_PT'], config['OmegabDIRA'],
+            config['TrackMinIPCHI2'], config['OmegacstDeltaMassWin'])
+
+        self.selOmegab2OmegacgammapiWS = makeOmegab2Omegacgammapi(
+            'Omegab2OmegacgammapiWSFor%s' % name, self.selOmegac,
+            '[Omega_b- -> Omega_c0 gamma pi+]cc', config['PionProbNN'],
+            config['MaxOmegabMass'], config['MinOmegabMass'],
+            config['OmegabVertChi2DOF'], config['OmegabIPCHI2'],
+            config['OmegabLT'], config['Omegab_PT'], config['OmegabDIRA'],
+            config['TrackMinIPCHI2'], config['OmegacstDeltaMassWin'])
+
+        # Omegab -> Omegac pi pi pi selections
+        self.selOmegab2Omegacpipipi = makeOmegab2Omegacpi(
+            'Omegab2OmegacpipipiFor%s' % name, self.selOmegac,
+            '[Omega_b- -> Omega_c0 pi+ pi- pi-]cc', config['PionProbNN'],
+            config['MaxOmegabMass'], config['MinOmegabMass'],
+            config['OmegabVertChi2DOF'], config['OmegabIPCHI2'],
+            config['OmegabLT'], config['Omegab_PT'], config['OmegabDIRA'],
+            config['TrackMinIPCHI2'])
+
+        self.selOmegab2OmegacpipipiWS = makeOmegab2Omegacpi(
+            'Omegab2OmegacpipipiWSFor%s' % name, self.selOmegac,
+            '[Omega_b- -> Omega_c0 pi+ pi- pi+]cc', config['PionProbNN'],
+            config['MaxOmegabMass'], config['MinOmegabMass'],
+            config['OmegabVertChi2DOF'], config['OmegabIPCHI2'],
+            config['OmegabLT'], config['Omegab_PT'], config['OmegabDIRA'],
+            config['TrackMinIPCHI2'])
+
+        # Create and register stripping lines
+        self.Omegab2XicKpiLine = StrippingLine(
+            "%sXicKpiLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2XicKpi)
+        #                                               selection=self.selXic)
+        self.registerLine(self.Omegab2XicKpiLine)
+
+        self.Omegab2XicKpiLineWS = StrippingLine(
+            "%sXicKpiWSLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2XicKpiWS)
+        self.registerLine(self.Omegab2XicKpiLineWS)
+
+        self.Omegab2XicgammaKpiLine = StrippingLine(
+            "%sXicgammaKpiLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2XicgammaKpi)
+        self.registerLine(self.Omegab2XicgammaKpiLine)
+
+        self.Omegab2XicgammaKpiLineWS = StrippingLine(
+            "%sXicgammaKpiWSLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2XicgammaKpiWS)
+        self.registerLine(self.Omegab2XicgammaKpiLineWS)
+
+        self.Omegab2Xic0piKpiLine = StrippingLine(
+            "%sXic0piKpiLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2Xic0piKpi)
+        self.registerLine(self.Omegab2Xic0piKpiLine)
+
+        self.Omegab2Xic0piKpiLineWS = StrippingLine(
+            "%sXic0piKpiWSLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2Xic0piKpiWS)
+        self.registerLine(self.Omegab2Xic0piKpiLineWS)
+
+        self.Omegab2OmegacpiLine = StrippingLine(
+            "%sOmegacpiLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2Omegacpi)
+        self.registerLine(self.Omegab2OmegacpiLine)
+
+        self.Omegab2OmegacpiLineWS = StrippingLine(
+            "%sOmegacpiWSLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2OmegacpiWS)
+        self.registerLine(self.Omegab2OmegacpiLineWS)
+
+        self.Omegab2Omegacpi0piLine = StrippingLine(
+            "%sOmegacpi0piLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2Omegacpi0pi)
+        self.registerLine(self.Omegab2Omegacpi0piLine)
+
+        self.Omegab2Omegacpi0piLineWS = StrippingLine(
+            "%sOmegacpi0piWSLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2Omegacpi0piWS)
+        self.registerLine(self.Omegab2Omegacpi0piLineWS)
+
+        self.Omegab2OmegacgammapiLine = StrippingLine(
+            "%sOmegacgammapiLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2Omegacgammapi)
+        self.registerLine(self.Omegab2OmegacgammapiLine)
+
+        self.Omegab2OmegacgammapiLineWS = StrippingLine(
+            "%sOmegacgammapiWSLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2OmegacgammapiWS)
+        self.registerLine(self.Omegab2OmegacgammapiLineWS)
+
+        self.Omegab2OmegacpipipiLine = StrippingLine(
+            "%sOmegacpipipiLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2Omegacpipipi)
+        self.registerLine(self.Omegab2OmegacpipipiLine)
+
+        self.Omegab2OmegacpipipiLineWS = StrippingLine(
+            "%sOmegacpipipiWSLine" % name,
+            prescale=config['OmegabDecaysPreScale'],
+            postscale=config['OmegabDecaysPostScale'],
+            selection=self.selOmegab2OmegacpipipiWS)
+        self.registerLine(self.Omegab2OmegacpipipiLineWS)
+
+
+def makeXic(name, KaonProbNN, PionProbNN, ProtProbNN, XicPT, XicDeltaMassWin,
+            MaxXicVertChi2DOF, XicBPVVDCHI2, XicDIRA, TrackMinIPCHI2):
+    """
+    Create and return a Xic+ -> p K- pi+ Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg KaonProbNN: PID of Kaon
+    @arg PionProbNN: PID of pion
+    @arg ProtProbNN: PID of proton
+    @arg XicPT:      Min PT of Xic
+    @arg XicDeltaMassWin: Mass difference m(pKpi)-m(Xic)
+    @arg MaxXicVertChi2DOF: chi2/NDOF
+    @arg XicBPVVDCHI2: Flight distance chi2
+    @arg XicDIRA:    DIRA of Xic
+    @arg TrackMinIPCHI2: Min IPCHI2 for kaons and pions
+    @return: Selection object
+    """
+    _daughterKCut = "(PROBNNk  > %(KaonProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+    _daughterpiCut = "(PROBNNpi > %(PionProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s)& (TRGHOSTPROB < 0.5)" % locals(
+    )
+    _daughterpCut = "(PROBNNp  > %(ProtProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (P>10000) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+
+    _combinationCut = "(ASUM(PT)> %(XicPT)s*MeV) & (ADAMASS('Xi_c+') < 1.25*%(XicDeltaMassWin)s*MeV) & (ACUTDOCA(0.5*mm,'LoKi::DistanceCalculator'))" % locals(
+    )
+    _motherCut = "(ADMASS('Xi_c+') < %(XicDeltaMassWin)s*MeV) & (VFASPF(VCHI2/VDOF)<%(MaxXicVertChi2DOF)s) & (BPVVDCHI2>%(XicBPVVDCHI2)s) & (BPVDIRA>%(XicDIRA)s)" % locals(
+    )
+    _Xic = CombineParticles(
+        DecayDescriptor="[Xi_c+ -> p+ K- pi+]cc",
+        DaughtersCuts={
+            "K+": _daughterKCut,
+            "pi+": _daughterpiCut,
+            "p+": _daughterpCut
+        },
+        CombinationCut=_combinationCut,
+        MotherCut=_motherCut)
+
+    _stdANNKaon = DataOnDemand(Location="Phys/StdLooseANNKaons/Particles")
+    _stdANNPion = DataOnDemand(Location="Phys/StdLooseANNPions/Particles")
+    _stdANNProtons = DataOnDemand(Location="Phys/StdLooseANNProtons/Particles")
+
+    return Selection(
+        name,
+        Algorithm=_Xic,
+        RequiredSelections=[_stdANNKaon, _stdANNPion, _stdANNProtons])
+
+
+def makeOmegac(name, KaonProbNN, PionProbNN, ProtProbNN, XicPT,
+               XicDeltaMassWin, MaxXicVertChi2DOF, XicBPVVDCHI2, XicDIRA,
+               TrackMinIPCHI2):
+    """
+    Create and return a Omegac0 -> p K- K- pi+ Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg KaonProbNN: PID of Kaon
+    @arg PionProbNN: PID of pion
+    @arg ProtProbNN: PID of proton
+    @arg XicPT:      Min PT of Xic
+    @arg XicDeltaMassWin: Mass difference m(pKpi)-m(Xic)
+    @arg MaxXicVertChi2DOF: chi2/NDOF
+    @arg XicBPVVDCHI2: Flight distance chi2
+    @arg XicDIRA:    DIRA of Xic
+    @arg TrackMinIPCHI2: Min IPCHI2 for kaons and pions
+    @return: Selection object
+    """
+    _daughterKCut = "(PROBNNk  > %(KaonProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+    _daughterpiCut = "(PROBNNpi > %(PionProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+    _daughterpCut = "(PROBNNp  > %(ProtProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (P>10000) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+
+    _combinationCut = "(ASUM(PT)> %(XicPT)s*MeV) & (ADAMASS('Omega_c0') < 1.25*%(XicDeltaMassWin)s*MeV) & (ACUTDOCA(0.5*mm,'LoKi::DistanceCalculator'))" % locals(
+    )
+    _motherCut = "(ADMASS('Omega_c0') < %(XicDeltaMassWin)s*MeV) & (VFASPF(VCHI2/VDOF)<%(MaxXicVertChi2DOF)s) & (BPVVDCHI2>%(XicBPVVDCHI2)s) & (BPVDIRA>%(XicDIRA)s)" % locals(
+    )
+    _Omegac = CombineParticles(
+        DecayDescriptor="[Omega_c0 -> p+ K- K- pi+]cc",
+        DaughtersCuts={
+            "K+": _daughterKCut,
+            "pi+": _daughterpiCut,
+            "p+": _daughterpCut
+        },
+        CombinationCut=_combinationCut,
+        MotherCut=_motherCut)
+
+    _stdANNKaon = DataOnDemand(Location="Phys/StdLooseANNKaons/Particles")
+    _stdANNPion = DataOnDemand(Location="Phys/StdLooseANNPions/Particles")
+    _stdANNProtons = DataOnDemand(Location="Phys/StdLooseANNProtons/Particles")
+
+    return Selection(
+        name,
+        Algorithm=_Omegac,
+        RequiredSelections=[_stdANNKaon, _stdANNPion, _stdANNProtons])
+
+
+def makeXic0(name, KaonProbNN, PionProbNN, ProtProbNN, XicPT, XicDeltaMassWin,
+             MaxXicVertChi2DOF, XicBPVVDCHI2, XicDIRA, TrackMinIPCHI2):
+    """
+    Create and return a Xic0 -> p K- K- pi+ Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg KaonProbNN: PID of Kaon
+    @arg PionProbNN: PID of pion
+    @arg ProtProbNN: PID of proton
+    @arg XicPT:      Min PT of Xic
+    @arg XicDeltaMassWin: Mass difference m(pKpi)-m(Xic)
+    @arg MaxXicVertChi2DOF: chi2/NDOF
+    @arg XicBPVVDCHI2: Flight distance chi2
+    @arg XicDIRA:    DIRA of Xic
+    @arg TrackMinIPCHI2: Min IPCHI2 for kaons and pions
+    @return: Selection object
+    """
+    _daughterKCut = "(PROBNNk  > %(KaonProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+    _daughterpiCut = "(PROBNNpi > %(PionProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5) " % locals(
+    )
+    _daughterpCut = "(PROBNNp  > %(ProtProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (P>10000) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+
+    _combinationCut = "(ASUM(PT)> %(XicPT)s*MeV) & (ADAMASS('Xi_c0') < 1.25*%(XicDeltaMassWin)s*MeV) & (ACUTDOCA(0.5*mm,'LoKi::DistanceCalculator'))" % locals(
+    )
+    _motherCut = "(ADMASS('Xi_c0') < %(XicDeltaMassWin)s*MeV) & (VFASPF(VCHI2/VDOF)<%(MaxXicVertChi2DOF)s) & (BPVVDCHI2>%(XicBPVVDCHI2)s) & (BPVDIRA>%(XicDIRA)s)" % locals(
+    )
+    _Omegac = CombineParticles(
+        DecayDescriptor="[Xi_c0 -> p+ K- K- pi+]cc",
+        DaughtersCuts={
+            "K+": _daughterKCut,
+            "pi+": _daughterpiCut,
+            "p+": _daughterpCut
+        },
+        CombinationCut=_combinationCut,
+        MotherCut=_motherCut)
+
+    _stdANNKaon = DataOnDemand(Location="Phys/StdLooseANNKaons/Particles")
+    _stdANNPion = DataOnDemand(Location="Phys/StdLooseANNPions/Particles")
+    _stdANNProtons = DataOnDemand(Location="Phys/StdLooseANNProtons/Particles")
+
+    return Selection(
+        name,
+        Algorithm=_Omegac,
+        RequiredSelections=[_stdANNKaon, _stdANNPion, _stdANNProtons])
+
+
+def makeOmegab2XicKpi(name, XicSel, DecDescr, KaonProbNN, PionProbNN,
+                      MaxOmegabMass, MinOmegabMass, OmegabVertChi2DOF,
+                      OmegabIPCHI2, OmegabLT, Omegab_PT, OmegabDIRA,
+                      TrackMinIPCHI2):
+    """
+    Create and return a Omegab- -> Xic+ K- pi- or Omegab- -> Xic0 pi+ K- pi- Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg XicSel: Xic selection.
+    @arg DecDescr: Decay descriptor
+    @arg KaonProbNN: PID of Kaon
+    @arg PionProbNN: PID of pion
+    @arg MaxOmegabMass: Max value of Omegab mass window
+    @arg MinOmegabMass: Max value of Omegab mass window
+    @arg OmegabVertChi2DOF: chi2/NDOF
+    @arg OmegabIPCHI2:  Omegab IP chi2
+    @arg OmegabLT:      Omegab lifetime
+    @arg Omegab_PT:     Omegab PT
+    @arg OmegabDIRA:    Omegab DIRA
+    @arg TrackMinIPCHI2: Min IPCHI2 for kaons and pions
+    @return: Selection object
+    """
+
+    _stdANNKaonAll = DataOnDemand(Location="Phys/StdLooseANNKaons/Particles")
+    _stdANNPionAll = DataOnDemand(Location="Phys/StdLooseANNPions/Particles")
+
+    _daughterKCut = "(PROBNNk  > %(KaonProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+    _daughterpiCut = "(PROBNNpi > %(PionProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+
+    _combinationCut = "(AM < %(MaxOmegabMass)s*MeV+100*MeV) & (AM > %(MinOmegabMass)s*MeV-100*MeV) & (APT>%(Omegab_PT)s*MeV-300*MeV)" % locals(
+    )
+    #_combinationCut = "(AM < %(MaxOmegabMass)s*MeV) & (AM > %(MinOmegabMass)s*MeV)" % locals()
+    _motherCut = "(M < %(MaxOmegabMass)s*MeV) & (M > %(MinOmegabMass)s*MeV) & (VFASPF(VCHI2/VDOF)<%(OmegabVertChi2DOF)s) & (BPVIPCHI2() < %(OmegabIPCHI2)s) & (BPVLTIME()>%(OmegabLT)s*ps) & (PT>%(Omegab_PT)s*MeV) & (BPVDIRA>%(OmegabDIRA)s)" % locals(
+    )
+
+    _Omegab = CombineParticles(
+        DecayDescriptor=DecDescr,
+        DaughtersCuts={
+            "K+": _daughterKCut,
+            "pi+": _daughterpiCut
+        },
+        CombinationCut=_combinationCut,
+        MotherCut=_motherCut)
+
+    return Selection(
+        name,
+        Algorithm=_Omegab,
+        RequiredSelections=[XicSel, _stdANNKaonAll, _stdANNPionAll])
+
+
+def makeOmegab2XicgammaKpi(name, XicSel, DecDescr, KaonProbNN, PionProbNN,
+                           MaxOmegabMass, MinOmegabMass, OmegabVertChi2DOF,
+                           OmegabIPCHI2, OmegabLT, Omegab_PT, OmegabDIRA,
+                           TrackMinIPCHI2, XicprDeltaMassWin):
+    """
+    Create and return a Omegab- -> Xic+ gamma K- pi- Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg XicSel: Xic selection.
+    @arg DecDescr: Decay descriptor
+    @arg KaonProbNN: PID of Kaon
+    @arg PionProbNN: PID of pion
+    @arg MaxOmegabMass: Max value of Omegab mass window
+    @arg MinOmegabMass: Max value of Omegab mass window
+    @arg OmegabVertChi2DOF: chi2/NDOF
+    @arg OmegabIPCHI2:  Omegab IP chi2
+    @arg OmegabLT:      Omegab lifetime
+    @arg Omegab_PT:     Omegab PT
+    @arg OmegabDIRA:    Omegab DIRA
+    @arg TrackMinIPCHI2: Min IPCHI2 for kaons and pions
+    @arg XicprDeltaMassWin : Delta Mass m(Xic') - m(Xic)
+    @return: Selection object
+    """
+
+    _stdANNKaonAll = DataOnDemand(Location="Phys/StdLooseANNKaons/Particles")
+    _stdANNPionAll = DataOnDemand(Location="Phys/StdLooseANNPions/Particles")
+    _stdPhotonAll = DataOnDemand(Location="Phys/StdLooseAllPhotons/Particles")
+
+    _daughterKCut = "(PROBNNk  > %(KaonProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+    _daughterpiCut = "(PROBNNpi > %(PionProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+
+    _combinationCut = "(AM < %(MaxOmegabMass)s*MeV+100*MeV) & (AM > %(MinOmegabMass)s*MeV-100*MeV) & (AM12 - AM1 < %(XicprDeltaMassWin)s) & (APT>%(Omegab_PT)s*MeV-300*MeV)" % locals(
+    )
+    #_combinationCut = "(AM < %(MaxOmegabMass)s*MeV) & (AM > %(MinOmegabMass)s*MeV)" % locals()
+    _motherCut = "(M < %(MaxOmegabMass)s*MeV) & (M > %(MinOmegabMass)s*MeV) & (VFASPF(VCHI2/VDOF)<%(OmegabVertChi2DOF)s) & (BPVIPCHI2() < %(OmegabIPCHI2)s) & (BPVLTIME()>%(OmegabLT)s*ps) & (PT>%(Omegab_PT)s*MeV) & (BPVDIRA>%(OmegabDIRA)s)" % locals(
+    )
+
+    _Omegab = CombineParticles(
+        DecayDescriptor=DecDescr,
+        DaughtersCuts={
+            "K+": _daughterKCut,
+            "pi+": _daughterpiCut
+        },
+        CombinationCut=_combinationCut,
+        MotherCut=_motherCut)
+
+    return Selection(
+        name,
+        Algorithm=_Omegab,
+        RequiredSelections=[
+            XicSel, _stdANNKaonAll, _stdANNPionAll, _stdPhotonAll
+        ])
+
+
+def makeOmegab2Omegacpi(name, OmegacSel, DecDescr, PionProbNN, MaxOmegabMass,
+                        MinOmegabMass, OmegabVertChi2DOF, OmegabIPCHI2,
+                        OmegabLT, Omegab_PT, OmegabDIRA, TrackMinIPCHI2):
+    """
+    Create and return a Omegab- -> Omegac0 pi- or Omegab- -> Omegac0 pi- pi+ pi- Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg OmegacSel: Xic selection.
+    @arg DecDescr: Decay descriptor
+    @arg PionProbNN: PID of pion
+    @arg MaxOmegabMass: Max value of Omegab mass window
+    @arg MinOmegabMass: Max value of Omegab mass window
+    @arg OmegabVertChi2DOF: chi2/NDOF
+    @arg OmegabIPCHI2:  Omegab IP chi2
+    @arg OmegabLT:      Omegab lifetime
+    @arg Omegab_PT:     Omegab PT
+    @arg OmegabDIRA:    Omegab DIRA
+    @arg TrackMinIPCHI2: Min IPCHI2 for kaons and pions
+    @return: Selection object
+    """
+
+    _stdANNPionAll = DataOnDemand(Location="Phys/StdLooseANNPions/Particles")
+
+    _daughterpiCut = "(PROBNNpi > %(PionProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+
+    _combinationCut = "(AM < %(MaxOmegabMass)s*MeV+100*MeV) & (AM > %(MinOmegabMass)s*MeV-100*MeV) & (APT>%(Omegab_PT)s*MeV-300*MeV)" % locals(
+    )
+
+    _motherCut = "(M < %(MaxOmegabMass)s*MeV) & (M > %(MinOmegabMass)s*MeV) & (VFASPF(VCHI2/VDOF)<%(OmegabVertChi2DOF)s) & (BPVIPCHI2() < %(OmegabIPCHI2)s) & (BPVLTIME()>%(OmegabLT)s*ps) & (PT>%(Omegab_PT)s*MeV) & (BPVDIRA>%(OmegabDIRA)s)" % locals(
+    )
+
+    _Omegab = CombineParticles(
+        DecayDescriptor=DecDescr,
+        DaughtersCuts={"pi+": _daughterpiCut},
+        CombinationCut=_combinationCut,
+        MotherCut=_motherCut)
+
+    return Selection(
+        name,
+        Algorithm=_Omegab,
+        RequiredSelections=[OmegacSel, _stdANNPionAll])
+
+
+def makeOmegab2Omegacpi0pi(name, OmegacSel, DecDescr, PionProbNN,
+                           MaxOmegabMass, MinOmegabMass, OmegabVertChi2DOF,
+                           OmegabIPCHI2, OmegabLT, Omegab_PT, OmegabDIRA,
+                           TrackMinIPCHI2):
+    """
+    Create and return a Omegab- -> Omegac0 pi0 pi- Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg OmegacSel: Xic selection.
+    @arg DecDescr: Decay descriptor
+    @arg PionProbNN: PID of pion
+    @arg MaxOmegabMass: Max value of Omegab mass window
+    @arg MinOmegabMass: Max value of Omegab mass window
+    @arg OmegabVertChi2DOF: chi2/NDOF
+    @arg OmegabIPCHI2:  Omegab IP chi2
+    @arg OmegabLT:      Omegab lifetime
+    @arg Omegab_PT:     Omegab PT
+    @arg OmegabDIRA:    Omegab DIRA
+    @arg TrackMinIPCHI2: Min IPCHI2 for kaons and pions
+    @return: Selection object
+    """
+
+    _stdANNPionAll = DataOnDemand(Location="Phys/StdLooseANNPions/Particles")
+    _stdPi0Resolved = DataOnDemand(
+        Location="Phys/StdLooseResolvedPi0/Particles")
+
+    _daughterpiCut = "(PROBNNpi > %(PionProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+
+    _combinationCut = "(AM < %(MaxOmegabMass)s*MeV+100*MeV) & (AM > %(MinOmegabMass)s*MeV-100*MeV) & (APT>%(Omegab_PT)s*MeV-300*MeV)" % locals(
+    )
+
+    _motherCut = "(M < %(MaxOmegabMass)s*MeV) & (M > %(MinOmegabMass)s*MeV) & (VFASPF(VCHI2/VDOF)<%(OmegabVertChi2DOF)s) & (BPVIPCHI2() < %(OmegabIPCHI2)s) & (BPVLTIME()>%(OmegabLT)s*ps) & (PT>%(Omegab_PT)s*MeV) & (BPVDIRA>%(OmegabDIRA)s)" % locals(
+    )
+
+    _Omegab = CombineParticles(
+        DecayDescriptor=DecDescr,
+        DaughtersCuts={"pi+": _daughterpiCut},
+        CombinationCut=_combinationCut,
+        MotherCut=_motherCut)
+
+    return Selection(
+        name,
+        Algorithm=_Omegab,
+        RequiredSelections=[OmegacSel, _stdANNPionAll, _stdPi0Resolved])
+
+
+def makeOmegab2Omegacgammapi(name, OmegacSel, DecDescr, PionProbNN,
+                             MaxOmegabMass, MinOmegabMass, OmegabVertChi2DOF,
+                             OmegabIPCHI2, OmegabLT, Omegab_PT, OmegabDIRA,
+                             TrackMinIPCHI2, OmegacstDeltaMassWin):
+    """
+    Create and return a Omegab- -> Omegac0 gamma pi- Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg OmegacSel: Xic selection.
+    @arg DecDescr: Decay descriptor
+    @arg PionProbNN: PID of pion
+    @arg MaxOmegabMass: Max value of Omegab mass window
+    @arg MinOmegabMass: Max value of Omegab mass window
+    @arg OmegabVertChi2DOF: chi2/NDOF
+    @arg OmegabIPCHI2:  Omegab IP chi2
+    @arg OmegabLT:      Omegab lifetime
+    @arg Omegab_PT:     Omegab PT
+    @arg OmegabDIRA:    Omegab DIRA
+    @arg TrackMinIPCHI2: Min IPCHI2 for kaons and pions
+    @arg OmegacstDeltaMassWin: Delta Mass m(Omegac*) - m(Omegac)
+    @return: Selection object
+    """
+
+    _stdANNPionAll = DataOnDemand(Location="Phys/StdLooseANNPions/Particles")
+    _stdPhotonAll = DataOnDemand(Location="Phys/StdLooseAllPhotons/Particles")
+
+    _daughterpiCut = "(PROBNNpi > %(PionProbNN)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPCHI2)s) & (TRGHOSTPROB < 0.5)" % locals(
+    )
+
+    _combinationCut = "(AM < %(MaxOmegabMass)s*MeV+100*MeV) & (AM > %(MinOmegabMass)s*MeV-100*MeV) & (AM12 - AM1 < %(OmegacstDeltaMassWin)s) & (APT>%(Omegab_PT)s*MeV-300*MeV)" % locals(
+    )
+    #_combinationCut = "(AM < %(MaxOmegabMass)s*MeV) & (AM > %(MinOmegabMass)s*MeV)" % locals()
+    _motherCut = "(M < %(MaxOmegabMass)s*MeV) & (M > %(MinOmegabMass)s*MeV) & (VFASPF(VCHI2/VDOF)<%(OmegabVertChi2DOF)s) & (BPVIPCHI2() < %(OmegabIPCHI2)s) & (BPVLTIME()>%(OmegabLT)s*ps) & (PT>%(Omegab_PT)s*MeV) & (BPVDIRA>%(OmegabDIRA)s)" % locals(
+    )
+
+    _Omegab = CombineParticles(
+        DecayDescriptor=DecDescr,
+        DaughtersCuts={"pi+": _daughterpiCut},
+        CombinationCut=_combinationCut,
+        MotherCut=_motherCut)
+
+    return Selection(
+        name,
+        Algorithm=_Omegab,
+        RequiredSelections=[OmegacSel, _stdANNPionAll, _stdPhotonAll])
+
+
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOniaPhotoProduction.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOniaPhotoProduction.py
new file mode 100644
index 000000000..79dd7ec74
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOniaPhotoProduction.py
@@ -0,0 +1,118 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Line for Jpsi+Jet production studies 
+#
+# R. McNulty with lots of help from D. Johnson and V. Zhovkovska
+#
+# Jpsi production to be as unbiased as possible.  Require 1 PV and low Herschel activity in the backwards direction
+#
+# Require following in the DaVinci configuration:                             
+# from Configurables import HCRawBankDecoderHlt                               
+# Hlt1LowMult_HCRawBankDecoderHlt = HCRawBankDecoderHlt('hcrawbankdecoder')   
+# DaVinci().appendToMainSequence([Hlt1LowMult_HCRawBankDecoderHlt])           
+
+__author__ = ['R. McNulty']
+
+__all__ = (
+  'OniaPhotoProductionConf',
+  'default_config',
+)
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons
+from GaudiKernel.SystemOfUnits import GeV
+from Configurables import HCRawBankDecoderHlt
+
+default_config = {
+  'JpsiPhotoProduction':
+  {  'BUILDERTYPE' : 'OniaPhotoProductionConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.5,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 2.977 * GeV,
+        'MMmax'     : 3.217 * GeV,
+        'MaxHRCADC' : 350,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+  'Psi2SPhotoProduction':
+  {  'BUILDERTYPE'  : 'OniaPhotoProductionConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 1.0,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 3.566 * GeV,
+        'MMmax'     : 3.806 * GeV,
+        'MaxHRCADC' : 350,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+  'UpsilonPhotoProduction':
+  {  'BUILDERTYPE'  : 'OniaPhotoProductionConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 1.0,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 9.300 * GeV,
+        'MMmax'     : 999.0 * GeV,
+        'MaxHRCADC' : 500,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+}
+
+class OniaPhotoProductionConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['JpsiPhotoProduction']['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    self.registerLine(StrippingLine( name + 'Line',
+      prescale          = config[ 'Prescale'  ],
+      postscale         = config[ 'Postscale' ],
+      RequiredRawEvents = config[ 'RawEvents' ],
+      checkPV           = (0,1),
+      FILTER ={
+        'Code':
+        "( ( HRCSUMADC('Raw/HC/Sums','B2') < %(MaxHRCADC)s ) & ( HRCSUMADC('Raw/HC/Sums','B1') < %(MaxHRCADC)s ) &    ( HRCSUMADC('Raw/HC/Sums','B0') < %(MaxHRCADC)s ) )"%config
+         },
+      selection         = makeCombination(name+'PhotoProduction', config),
+    ))
+
+
+
+def makeCombination( name, config):
+  # Define the cuts
+  dcut = '(PT>%(pT)s)'%config
+  mcut = '(MM>%(MMmin)s) & (MM<%(MMmax)s)'%config
+
+
+  return SimpleSelection(name, CombineParticles, [StdAllLooseMuons],
+    DecayDescriptor    = 'J/psi(1S) -> mu+ mu-',
+    DaughtersCuts      = { 'mu+' : dcut, 'mu-' : dcut },
+    MotherCut          = mcut,
+    WriteP2PVRelations = False
+  )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOniaPhotoProductionPrescaled.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOniaPhotoProductionPrescaled.py
new file mode 100644
index 000000000..42ec3d37f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingOniaPhotoProductionPrescaled.py
@@ -0,0 +1,106 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Line for Jpsi+Jet production studies 
+#
+# R. McNulty with lots of help from D. Johnson and V. Zhovkovska
+#
+# Jpsi production to be as unbiased as possible.  Limit to one PV.  Heavy prescale to figure out what Herschel is doing in parallel line 
+
+__author__ = ['R. McNulty']
+
+__all__ = (
+  'OniaPhotoProductionPrescaledConf',
+  'default_config',
+)
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons
+from GaudiKernel.SystemOfUnits import GeV
+from Configurables import HCRawBankDecoderHlt
+
+default_config = {
+  'JpsiPhotoProductionPrescaled':
+  {  'BUILDERTYPE' : 'OniaPhotoProductionPrescaledConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.01,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 2.977 * GeV,
+        'MMmax'     : 3.217 * GeV,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+  'Psi2SPhotoProductionPrescaled':
+  {  'BUILDERTYPE'  : 'OniaPhotoProductionPrescaledConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.03,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 3.566 * GeV,
+        'MMmax'     : 3.806 * GeV,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+  'UpsilonPhotoProductionPrescaled':
+  {  'BUILDERTYPE'  : 'OniaPhotoProductionPrescaledConf',
+      'WGs'         : [ 'BandQ'],
+      'STREAMS'     : [ 'Dimuon' ],
+      'CONFIG'      : { 
+    
+        'Prescale'  : 0.25,
+        'Postscale' : 1.0,
+        'pT'        : 0.  * GeV,
+        'MMmin'     : 9.300 * GeV,
+        'MMmax'     : 999.0 * GeV,
+        'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+      }  
+    },
+}
+
+class OniaPhotoProductionPrescaledConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['JpsiPhotoProductionPrescaled']['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    self.registerLine(StrippingLine( name + 'Line',
+      prescale          = config[ 'Prescale'  ],
+      postscale         = config[ 'Postscale' ],
+      RequiredRawEvents = config[ 'RawEvents' ],
+      checkPV           = (0,1),
+      selection         = makeCombination(name+'PhotoProduction', config),
+    ))
+
+
+
+def makeCombination( name, config):
+  # Define the cuts
+  dcut = '(PT>%(pT)s)'%config
+  mcut = '(MM>%(MMmin)s) & (MM<%(MMmax)s)'%config
+
+
+  return SimpleSelection(name, CombineParticles, [StdAllLooseMuons],
+    DecayDescriptor    = 'J/psi(1S) -> mu+ mu-',
+    DaughtersCuts      = { 'mu+' : dcut, 'mu-' : dcut },
+    MotherCut          = mcut,
+    WriteP2PVRelations = False
+  )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPPMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPPMuMu.py
new file mode 100644
index 000000000..8d3fbdf5b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPPMuMu.py
@@ -0,0 +1,197 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Hc -> p pbar mu mu
+'''
+
+__author__=['Liupan An']
+__date__ = '18/05/2017'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'PPMuMuConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              :  'PPMuMu',
+    'BUILDERTYPE'       :  'PPMuMuConf',
+    'CONFIG'    : {
+        'HcProtonCuts'    : "(PROBNNp  > 0.1) & (PT > 1000*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY) < 10.)",
+        'HcMuonCuts'      : "(PROBNNmu > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY) < 10.)",
+        'HcComAMCuts'     : "AALL",
+        'HcComN4Cuts'     : "(AM > 2.8 *GeV) & (AM < 4.2 *GeV)",
+        'HcMomN4Cuts'     : "(VFASPF(VCHI2/VDOF) < 9.) & (MM>3.0 *GeV) & (MM<4.0 *GeV)",
+
+        'HighProtonCuts'  : "(PROBNNp  > 0.2) & (PT > 1600*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY) < 8.)",
+        'HighMuonCuts'    : "(PROBNNmu > 0.2) & (PT > 800*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY) < 8.)",
+        'HighComAMCuts'   : "AALL",
+        'HighComN4Cuts'   : "(AM > 3.8 *GeV)",
+        'HighMomN4Cuts'   : "(VFASPF(VCHI2/VDOF) < 9.) & (MM>4.0 *GeV) & (MM<20.0 *GeV)",
+
+        'DetachedProtonCuts'    : "(PROBNNp  > 0.1) & (PT > 1000*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY) > 5.)",
+        'DetachedMuonCuts'      : "(PROBNNmu > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY) > 5.)",
+        'DetachedComAMCuts'     : "AALL",
+        'DetachedComN4Cuts'     : "(AM > 2.8 *GeV)",
+        'DetachedMomN4Cuts'     : "(VFASPF(VCHI2/VDOF) < 9.) & (MM>3.0 *GeV) & (MM<20.0 *GeV)",
+
+        'Prescale'      : 1.
+        },
+    'STREAMS'           : ['Bhadron' ],
+    'WGs'               : ['BandQ'],
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+class PPMuMuConf(LineBuilder):
+    
+    __configuration_keys__ = (
+        'HcProtonCuts',
+        'HcMuonCuts',
+        'HcComAMCuts',
+        'HcComN4Cuts',
+        'HcMomN4Cuts',
+
+        'HighProtonCuts',
+        'HighMuonCuts',
+        'HighComAMCuts',
+        'HighComN4Cuts',
+        'HighMomN4Cuts',
+
+        'DetachedProtonCuts',
+        'DetachedMuonCuts',
+        'DetachedComAMCuts',
+        'DetachedComN4Cuts',
+        'DetachedMomN4Cuts',
+        'Prescale'
+        )
+
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+        """
+        Prompt Hc -> p pbar Mu Mu 
+        """
+
+        self.SelHcProtons = self.createSubSel( OutputList = self.name + "SelHcProtons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllLooseANNProtons/Particles' ), 
+                                           Cuts = config['HcProtonCuts']
+                                           )
+        self.SelHcMuons = self.createSubSel( OutputList = self.name + "HcSelMuons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllLooseMuons/Particles' ), 
+                                           Cuts = config['HcMuonCuts']
+                                           )
+        self.SelHc2PPMuMu = self.createN4BodySel( OutputList = self.name + "SelHc2PPMuMu",
+                                                     DaughterLists = [ self.SelHcProtons, self.SelHcMuons ],
+                                                     DecayDescriptor = "h_c(1P) -> p+ p~- mu+ mu-",
+                                                     ComAMCuts      = config['HcComAMCuts'],
+                                                     PreVertexCuts  = config['HcComN4Cuts'], 
+                                                     PostVertexCuts = config['HcMomN4Cuts']
+                                                     )
+        self.Hc2PPMuMuLine = StrippingLine( self.name + 'HcLine',                                                
+                                               prescale  = config['Prescale'],                                               
+                                               algos     = [ self.SelHc2PPMuMu ],
+                                               MDSTFlag  = False
+                                               )
+        self.registerLine( self.Hc2PPMuMuLine )
+
+        
+        """
+        Prompt B -> p pbar Mu Mu 
+        """
+
+        self.SelHighProtons = self.createSubSel( OutputList = self.name + "SelHighProtons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllLooseANNProtons/Particles' ), 
+                                           Cuts = config['HighProtonCuts']
+                                           )
+        self.SelHighMuons = self.createSubSel( OutputList = self.name + "HighSelMuons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllLooseMuons/Particles' ), 
+                                           Cuts = config['HighMuonCuts']
+                                           )
+        self.SelHigh2PPMuMu = self.createN4BodySel( OutputList = self.name + "SelHigh2PPMuMu",
+                                                     DaughterLists = [ self.SelHighProtons, self.SelHighMuons ],
+                                                     DecayDescriptor = "h_c(1P) -> p+ p~- mu+ mu-",
+                                                     ComAMCuts      = config['HighComAMCuts'],
+                                                     PreVertexCuts  = config['HighComN4Cuts'], 
+                                                     PostVertexCuts = config['HighMomN4Cuts']
+                                                     )
+        self.High2PPMuMuLine = StrippingLine( self.name + 'HighLine',                                                
+                                               prescale  = config['Prescale'],                                               
+                                               algos     = [ self.SelHigh2PPMuMu ],
+                                               MDSTFlag  = False
+                                               )
+        self.registerLine( self.High2PPMuMuLine )
+
+        """
+        Detached X -> p pbar Mu Mu 
+        """
+
+        self.SelDetachedProtons = self.createSubSel( OutputList = self.name + "SelDetachedProtons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllLooseANNProtons/Particles' ), 
+                                           Cuts = config['DetachedProtonCuts']
+                                           )
+        self.SelDetachedMuons = self.createSubSel( OutputList = self.name + "DetachedSelMuons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllLooseMuons/Particles' ), 
+                                           Cuts = config['DetachedMuonCuts']
+                                           )
+        self.SelDetached2PPMuMu = self.createN4BodySel( OutputList = self.name + "SelDetached2PPMuMu",
+                                                     DaughterLists = [ self.SelDetachedProtons, self.SelDetachedMuons ],
+                                                     DecayDescriptor = "h_c(1P) -> p+ p~- mu+ mu-",
+                                                     ComAMCuts      = config['DetachedComAMCuts'],
+                                                     PreVertexCuts  = config['DetachedComN4Cuts'], 
+                                                     PostVertexCuts = config['DetachedMomN4Cuts']
+                                                     )
+        self.Detached2PPMuMuLine = StrippingLine( self.name + 'DetachedLine',                                                
+                                               prescale  = config['Prescale'],                                               
+                                               algos     = [ self.SelDetached2PPMuMu ],
+                                               MDSTFlag  = False
+                                               )
+        self.registerLine( self.Detached2PPMuMuLine )
+
+
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createN4BodySel( self, OutputList,
+                         DecayDescriptor,
+                         DaughterLists,
+                         DaughterCuts = {} ,
+                         ComAMCuts      = "AALL",
+                         PreVertexCuts  = "AALL",
+                         PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = DaVinci__N4BodyDecays ( DecayDescriptor = DecayDescriptor,      
+                                           DaughtersCuts = DaughterCuts,
+                                           Combination12Cut  = ComAMCuts + "&" + "( ACHI2DOCA(1,2)<20 )",
+                                           Combination123Cut = ComAMCuts + "&" + "( ACHI2DOCA(1,3)<20 ) & ( ACHI2DOCA(2,3)<20 )",
+                                           CombinationCut = "( ACHI2DOCA(1,4)<20 ) & ( ACHI2DOCA(2,4)<20 ) & ( ACHI2DOCA(3,4)<20 )" + " & " + PreVertexCuts,
+                                           MotherCut = PostVertexCuts,
+                                           ReFitPVs = False )
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPsiX0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPsiX0.py
new file mode 100644
index 000000000..0e22e88f8
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPsiX0.py
@@ -0,0 +1,2281 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+##!/usr/bin/env python
+# =============================================================================
+# $Id:$
+# =============================================================================
+## @file
+# 
+#  The attempt for coherent stripping for B -> psi(') X0 modes,
+#  where  X0 :  eta   -> gamma gamma ,
+#               eta   -> pi+ pi- pi0 ,
+#               eta'  -> rho0 gamma 
+#               eta'  -> pi+ pi- ( eta -> gamma gamma )
+#               omega -> pi+ pi- pi0
+#
+# The cuts correspond to B->J/psiX0 selection by Dasha Savrina LHCb-ANA-2011-096
+#
+# @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+# @date   2012-02-19
+#
+# Attention: the ``wide'' versions of pi0->2gg  and eta->gg a used
+#           to cure the potential problems with bad ECAL calibration
+#
+#                   $Revision: 135537 $
+# Last modification $Date: 2012-02-19 15:18:08 +0100 (Sun, 19 Feb 2012) $
+#                by $Author: ibelyaev $
+# =============================================================================
+""" The attempt for coherent stripping for B -> psi(') X0 modes, where X0 :
+
+- eta   -> gamma gamma ,
+- eta   -> pi+ pi- pi0 ,
+- eta'  -> rho0 gamma 
+- eta'  -> pi+ pi- ( eta -> gamma gamma )
+- omega -> pi+ pi- pi0
+
+The cuts correspond to J/psiX0 selection by Dasha Savrina LHCb-ANA-2011-096
+
+Attention: the ``wide'' versions of pi0->2gg  and eta->gg a used
+           to cure the potential problems with bad ECAL calibration
+
+"""
+# =============================================================================
+__author__  = 'Vanya BELYAEV Ivan.Belyaev@itep.ru'
+__date__    = '2012-02-19'
+__version__ = '$Revision$'
+# =============================================================================
+__all__ = (
+    'PsiX0Conf'      ,
+    'default_config' , 
+    )
+# =============================================================================
+from GaudiKernel.SystemOfUnits             import GeV, MeV, mm, micrometer 
+from StrippingUtils.Utils                  import LineBuilder
+# =============================================================================
+## logging
+# =============================================================================
+import logging
+logger = logging.getLogger(__name__)
+if not logger.handlers : logging.basicConfig()
+logger.setLevel(logging.INFO)
+# =============================================================================
+## Define the default configuration 
+_default_configuration_ = {
+    #
+    'NOPIDHADRONS'   : False ,  ## USE FOR SUIMULATION 
+    ## use for B&Q wg production
+    'DIMUONLINES'    : []    ,  ## USE FOR B&Q WG-selection 
+    #
+    ## PV-requiremens
+    #
+    'CheckPV'   : True ,
+    #
+    ## the transverse momentum of X0
+    'X0PT'      : 1.2  * GeV        ,
+    ## the transverse momentum of X0, when accompanied with K(K) 
+    'X0PTK'     : 0.7  * GeV        ,
+    #
+    ## c*tau cut for B-candidates
+    #
+    'CTAU'      : 100  * micrometer ,
+    'CTAU_Kst'  : 150  * micrometer , ## for B->J/psi K*+ line 
+    #
+    ## photon selection for eta' -> rho gamma
+    #
+    'GammaCut'  : ' ( PT > 250 * MeV ) ' ,
+    #
+    ## pi0 selection for  eta/omega -> pi+ pi- pi0 ,
+    #
+    'Pi0Cut'    : """
+    ( 250    * MeV < MINTREE ( 'gamma' == ID , PT ) ) 
+    """ ,
+    #
+    ## eta -> gamma gamma selection for eta' -> pi+ pi- eta
+    #
+    'EtaCut'    :"""
+    ( 250    * MeV < MINTREE ( 'gamma' == ID , PT ) ) 
+    """ ,
+    #
+    ## muon selection for  psi(') -> mu+ mu-
+    #
+    'MuonCut'   : """
+    ISMUON &
+    ( PT            >  550 * MeV ) &
+    ( PIDmu - PIDpi >    0       ) &
+    ( CLONEDIST     > 5000       )     
+    """ , 
+    #
+    ## pions and kaons
+    # 
+    'PionCut'   : """
+    ( PT          > 200 * MeV ) & 
+    ( CLONEDIST   > 5000      ) & 
+    ( TRGHOSTPROB < 0.5       ) &
+    ( TRCHI2DOF   < 4         ) & 
+    in_range ( 2          , ETA , 5         ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     &
+    ( MIPCHI2DV()  > 4        )
+    """ ,
+    #
+    'KaonCut'   : """
+    ( PT          > 200 * MeV ) & 
+    ( CLONEDIST   > 5000      ) & 
+    ( TRGHOSTPROB < 0.5       ) &
+    ( TRCHI2DOF   < 4         ) & 
+    in_range ( 2          , ETA , 5         ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     &
+    ( MIPCHI2DV()  > 4        )
+    """ ,
+    #
+    ##
+    'ProtonCut'   : """
+    ( PT           > 200 * MeV ) & 
+    ( CLONEDIST    > 5000      ) & 
+    ( TRCHI2DOF    < 4         ) & 
+    ( TRGHOSTPROB  < 0.5       ) & 
+    in_range ( 2         , ETA , 5         ) &
+    in_range ( 10 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     &
+    ( MIPCHI2DV()  > 4        ) 
+    """ ,
+    #
+    ## PID-cuts for hadrons 
+    #
+    'PionPIDCut'   : " PROBNNpi > 0.1 " ,
+    'KaonPIDCut'   : " PROBNNk  > 0.1 " ,
+    'ProtonPIDCut' : " PROBNNp  > 0.1 " ,
+    #
+    ## useful shortcuts:
+    #
+    'Preambulo' : [
+    ## shortcut for chi2 of vertex fit 
+    'chi2vx    = VFASPF(VCHI2)     '                           , 
+    'chi2vxNDF = VFASPF(VCHI2PDOF) '                           , 
+    'chi2vxndf = chi2vxNDF         '                           ,
+    ## shortcut for the c*tau
+    "from GaudiKernel.PhysicalConstants import c_light"        , 
+    ## use the embedded cut for chi2(LifetimeFit)<25
+    "ctau      = BPVLTIME ( 25 ) * c_light "                   ,
+    "ctau_9    = BPVLTIME (  9 ) * c_light "                   ,
+    "ctau_16   = BPVLTIME ( 16 ) * c_light "                   ,
+    "APT23     = LoKi.AParticles.TransverseMomentum ( 2 , 3 )" ,
+    ## Combination mass-cut for beauty particles 
+    "mb0_acut   = in_range ( 4.50 * GeV , AM , 6.00 * GeV ) "  ,
+    "mbu_acut   = in_range ( 4.50 * GeV , AM , 6.00 * GeV ) "  ,
+    "mbl_acut   = in_range ( 5.00 * GeV , AM , 6.50 * GeV ) "  ,
+    "mbc_acut   = in_range ( 4.50 * GeV , AM , 6.75 * GeV ) "  ,
+    ## mass-cut for beauty particles 
+    "mb0_cut    = in_range ( 4.55 * GeV ,  M , 5.95 * GeV ) "  ,
+    "mbu_cut    = in_range ( 4.55 * GeV ,  M , 5.95 * GeV ) "  ,
+    "mbl_cut    = in_range ( 5.05 * GeV ,  M , 6.45 * GeV ) "  ,
+    "mbc_cut    = in_range ( 4.55 * GeV ,  M , 6.70 * GeV ) "  ,
+    ] ,
+    # =========================================================================
+    ## Prescales 
+    # =========================================================================
+    'B2EtaPrescale'             : 1.0 ,
+    'B2EtaPrimePrescale'        : 1.0 ,
+    'B2OmegaPrescale'           : 1.0 ,
+    #
+    'B2KEtaPrescale'            : 1.0 ,
+    'B2KEtaPrimePrescale'       : 1.0 ,
+    'B2KOmegaPrescale'          : 1.0 ,
+    #
+    'B2PiEtaPrescale'           : 1.0 ,
+    'B2PiEtaPrimePrescale'      : 1.0 ,
+    'B2PiOmegaPrescale'         : 1.0 ,
+    #
+    'B2KKEtaPrescale'           : 1.0 ,
+    'B2KKEtaPrimePrescale'      : 1.0 ,
+    'B2KKOmegaPrescale'         : 1.0 ,
+    #
+    'B2KPiEtaPrescale'          : 1.0 ,
+    'B2KPiEtaPrimePrescale'     : 1.0 ,
+    'B2KPiOmegaPrescale'        : 1.0 ,
+    #
+    'B2PiPiEtaPrescale'         : 1.0 ,
+    'B2PiPiEtaPrimePrescale'    : 1.0 ,
+    'B2PiPiOmegaPrescale'       : 1.0 ,
+    #
+    'Bu2PsiKstarPrescale'       : 1.0 ,
+    'Bu2PsiKstarMPrescale'      : 1.0 ,
+    'Bc2PsiRhoPrescale'         : 1.0 ,
+    #
+    'B2ChicKPrescale'           : 1.0 ,
+    'B2ChicKKPrescale'          : 1.0 ,
+    'B2ChicKPiPrescale'         : 1.0 ,
+    'B2ChicKPiPiPrescale'       : 1.0 ,
+    'B2ChicPiPiPrescale'        : 1.0 ,
+    ## Bc * Lb  
+    'Bc2ChicPiPrescale'         : 1.0 ,
+    'Lb2ChicPKPrescale'         : 1.0 ,
+    # =========================================================================
+    }
+## ============================================================================
+## the mandatory element for stripping framework 
+default_config = {
+    #
+    'NAME'        :   'PsiX0'                ,
+    'WGs'         : [ 'BandQ' ]              ,
+    'CONFIG'      : _default_configuration_  , 
+    'BUILDERTYPE' :   'PsiX0Conf'            ,
+    'STREAMS'     : { 'Bhadron'    : [ 'StrippingB2PsiEtaForPsiX0'          ,
+                                       'StrippingB2PsiEtaPrimeForPsiX0'     ,
+                                       'StrippingB2PsiOmegaForPsiX0'        ,
+                                       'StrippingB2PsiKEtaForPsiX0'         ,
+                                       'StrippingB2PsiPiEtaForPsiX0'        ,
+                                       'StrippingB2PsiKKEtaForPsiX0'        , 
+                                       'StrippingB2PsiKPiEtaForPsiX0'       ,
+                                       'StrippingB2PsiPiPiEtaForPsiX0'      , 
+                                       'StrippingB2PsiKEtaPrimeForPsiX0'    ,
+                                       'StrippingB2PsiPiEtaPrimeForPsiX0'   , 
+                                       'StrippingB2PsiKKEtaPrimeForPsiX0'   , 
+                                       'StrippingB2PsiKPiEtaPrimeForPsiX0'  ,
+                                       'StrippingB2PsiPiPiEtaPrimeForPsiX0' ,
+                                       'StrippingB2PsiKOmegaForPsiX0'       ,
+                                       'StrippingB2PsiPiOmegaForPsiX0'      ,
+                                       'StrippingB2PsiKKOmegaForPsiX0'      ,
+                                       'StrippingB2PsiKPiOmegaForPsiX0'     ,
+                                       'StrippingB2PsiPiPiOmegaForPsiX0'    ,
+                                       'StrippingBu2PsiKstarForPsiX0'       , ## CALIB ? 
+                                       'StrippingBu2PsiKstarMergedForPsiX0' , ## CALIB ?
+                                       'StrippingBc2PsiRhoForPsiX0'         ,
+                                       'StrippingB2ChicKForPsiX0'           ,
+                                       'StrippingB2ChicKKForPsiX0'          ,
+                                       'StrippingB2ChicKPiForPsiX0'         ,
+                                       'StrippingB2ChicKPiPiForPsiX0'       ,
+                                       'StrippingB2ChicPiPiForPsiX0'        ,
+                                       'StrippingBc2ChicPiForPsiX0'         ,
+                                       'StrippingLb2ChicPKForPsiX0'         ] }
+    }
+# =============================================================================
+## @class  PsiX0Conf
+#  B-> psi(') X0 configuration file 
+#  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+#  @date 2012-02-19
+class PsiX0Conf(LineBuilder) :
+    """
+    Helper class to configure 'PsiX0'-lines
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    ## get the default configuration 
+    @staticmethod
+    def defaultConfiguration( key = None ) :
+        """
+        Get the default/recommended configurtaion
+        
+        >>> conf = PsiX0.defaultConfiguration()
+        
+        """
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+        if key : return _config[ key ]
+        return _config
+    
+    ## constructor
+    def __init__ ( self , name , config ) :
+        """
+        Constructor
+        """
+        # check the names 
+        if 'PsiX0' != name :
+            logger.warning ( 'The non-default name is specified "%s"' % name  ) 
+            
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+
+        if isinstance ( config , dict ):
+            _config.update ( config )
+            LineBuilder.__init__( self , name , _config )
+        else :
+            LineBuilder.__init__( self , name ,  config )
+
+        ## private set of selections 
+        self.__selections_ = {}
+
+
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {}
+            
+        self.__selections_[ self.name() ]['CONFIG'] = deepcopy ( _config ) 
+        
+        keys = _config.keys()
+        for key in keys :
+            
+            if not key in _default_configuration_ :
+                raise KeyError("Invalid key is specified: '%s'" % key )
+            
+            val = _config[key]
+            if val != _default_configuration_ [ key ] : 
+                logger.debug ('new configuration: %-16s : %s ' % ( key , _config[key] ) )
+                
+        self._name         = name
+                
+        for line in self._lines_psiX0 () :
+            self.registerLine(line)
+            logger.debug ( "Register line: %s" %  line.name () ) 
+            
+    ## get the selection, associated with some nickname name 
+    def _selection ( self, nick ) :
+        """
+        Get the selection, associated with some nickname name
+        """
+        
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {} 
+            
+        return self.__selections_[ self.name() ].get( nick , None ) 
+    
+    ## add the selection, associated with some nickname name 
+    def _add_selection ( self , nick , sel ) :
+        """
+        add the selection, associated with some nickname name
+        """
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {} 
+        
+        if self.__selections_[ self.name()].has_key( nick ) :
+            raise AttributeError , "Selection '%s'already exists " % nick
+        
+        self.__selections_[ self.name() ][ nick ] = sel
+        
+        return sel 
+    
+    # =========================================================================
+    ## pure technical method for creation of selections
+    # =========================================================================
+    def make_selection ( self      ,
+                         tag       , 
+                         algotype  ,
+                         inputs    , 
+                         *args     ,
+                         **kwargs  ) :
+        """
+        Technical method for creation of 1-step selections 
+        """
+        sel_tag  = '%s_Selection' % tag
+        sel_name = 'Sel%sFor%s'   % ( tag , self.name() )
+        #
+        ## check existing selection
+        #
+        sel      = self._selection ( sel_tag )
+        if sel : return sel 
+
+        #
+        ## adjust a bit the arguments
+        if not kwargs.has_key('Preambulo')           :
+            kwargs ['Preambulo'        ] = self['Preambulo']
+
+        if not kwargs.has_key( 'ParticleCombiners' ) :
+            kwargs ['ParticleCombiners'] = { '' : 'LoKi::VertexFitter:PUBLIC' } 
+            
+        # 
+        ## use "simple-selection"
+        #
+        from PhysSelPython.Wrappers import SimpleSelection
+        sel = SimpleSelection (
+            sel_name ,
+            algotype ,
+            inputs   , 
+            *args    ,
+            **kwargs )
+        # 
+        return self._add_selection( sel_tag , sel ) 
+
+    ## get the selections
+    def _selections_private ( self ) :
+        
+        sel = self._selection ( 'Selections' )
+        if sel : return sel
+        
+        sel =  [
+            #
+            ## basic
+            #
+            self.gamma            () ,
+            self.pi0              () ,
+            self.eta_             () ,
+            self.muons            () ,
+            self.pions            () ,
+            self.kaons            () ,
+            self.protons          () ,
+            ##
+            self.eta0             () ,
+            self.eta_prime        () ,
+            #
+            ## local 
+            self.psi              () ,
+            self.eta2gg           () ,
+            self.eta23pi          () ,
+            self.etap2rhog        () ,
+            self.etap2pipieta     () ,
+            self.omega            () ,
+            self.chi_c            () , 
+            #
+            ## beauty
+            #
+            self.b2eta            () ,
+            self.b2etap           () ,
+            self.b2omega          () , 
+            #
+            ## 
+            # 
+            self.b2Keta           () ,
+            self.b2KKeta          () ,
+            self.b2Kpieta         () ,
+            self.b2pieta          () ,
+            self.b2pipieta        () ,
+            ## 
+            self.b2Ketap          () ,
+            self.b2KKetap         () ,
+            self.b2Kpietap        () ,
+            self.b2pietap         () ,
+            self.b2pipietap       () ,
+            ## 
+            self.b2Komega         () ,
+            self.b2KKomega        () ,
+            self.b2Kpiomega       () ,
+            self.b2piomega        () ,
+            self.b2pipiomega      () ,
+            ## 
+            self.bc2rho           () ,
+            self.bu2Kstar         () , ## for extraction of photon efficiency
+            self.bu2KstarM        () ,  ## for merged pi0s
+            #
+            ## b -> chi_c
+            self.b2chicK          () ,
+            self.b2chicKK         () ,
+            self.b2chicKpi        () ,
+            self.b2chicKpipi      () ,
+            self.b2chicpipi       () ,
+            # 
+            self.bc2chicpi        () ,
+            ]
+        
+        return self._add_selection ( 'Selections' , sel )
+
+
+    # =========================================================================
+    ## get all lines  
+    # =========================================================================
+    def _lines_psiX0   ( self ) :
+        """
+        Get all psiX0 lines 
+        """
+        sel = self._selection ( 'PsiX0Lines' )
+        if sel : return sel
+        #
+        from StrippingConf.StrippingLine  import StrippingLine
+        sel = [
+            #
+            ## B -> psi(') X0  
+            #
+            StrippingLine (
+            "B2PsiEtaFor" + self.name()       ,
+            prescale = self['B2EtaPrescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV']        ,
+            algos    = [ self.b2eta ()      ]
+            ) ,
+            ## 
+            StrippingLine (
+            "B2PsiEtaPrimeFor" + self.name()     ,
+            prescale = self['B2EtaPrimePrescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'            ] ,
+            algos    = [ self.b2etap ()          ]
+            ) ,
+            ## 
+            StrippingLine (
+            "B2PsiOmegaFor" + self.name ()       ,
+            prescale = self['B2OmegaPrescale' ]  , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ]  ,
+            algos    = [ self.b2omega ()      ]
+            ) ,
+            #
+            ## B -> psi(') [...] eta 
+            #
+            StrippingLine (
+            "B2PsiKEtaFor" + self.name()        ,
+            prescale = self['B2KEtaPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    = [ self.b2Keta ()       ]
+            ) ,
+            ## 
+            StrippingLine (
+            "B2PsiPiEtaFor" + self.name()        ,
+            prescale = self['B2PiEtaPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'          ] ,
+            algos    = [ self.b2pieta ()       ]
+            ) ,
+            ##
+            StrippingLine (
+            "B2PsiKKEtaFor" + self.name()        ,
+            prescale = self['B2KKEtaPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'          ] ,
+            algos    = [ self.b2KKeta ()       ]
+            ) ,
+            StrippingLine (
+            "B2PsiKPiEtaFor" + self.name()        ,
+            prescale = self['B2KPiEtaPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'           ] ,
+            algos    = [ self.b2Kpieta ()       ]
+            ) ,
+            ##
+            ##
+            StrippingLine (
+            "B2PsiPiPiEtaFor" + self.name()        ,
+            prescale = self['B2PiPiEtaPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'            ] ,
+            algos    = [ self.b2pipieta ()       ]
+            ) ,
+            #
+            ## B -> psi(') [...] eta' 
+            #
+            StrippingLine (
+            "B2PsiKEtaPrimeFor" + self.name()        ,
+            prescale = self['B2KEtaPrimePrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.b2Ketap ()           ]
+            ) ,
+            ## 
+            StrippingLine (
+            "B2PsiPiEtaPrimeFor" + self.name()        ,
+            prescale = self['B2PiEtaPrimePrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'               ] ,
+            algos    = [ self.b2pietap ()           ]
+            ) ,
+            ##
+            StrippingLine (
+            "B2PsiKKEtaPrimeFor" + self.name()        ,
+            prescale = self['B2KKEtaPrimePrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'               ] ,
+            algos    = [ self.b2KKetap ()           ]
+            ) ,
+            StrippingLine (
+            "B2PsiKPiEtaPrimeFor" + self.name()        ,
+            prescale = self['B2KPiEtaPrimePrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'                ] ,
+            algos    = [ self.b2Kpietap ()           ]
+            ) ,
+            ##
+            StrippingLine (
+            "B2PsiPiPiEtaPrimeFor" + self.name()        ,
+            prescale = self['B2PiPiEtaPrimePrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'                 ] ,
+            algos    = [ self.b2pipietap ()           ]
+            ) ,
+            #
+            ## B -> psi(') [...] omega
+            #
+            StrippingLine (
+            "B2PsiKOmegaFor" + self.name()           ,
+            prescale = self['B2KOmegaPrescale'     ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.b2Komega ()          ]
+            ) ,
+            ## 
+            StrippingLine (
+            "B2PsiPiOmegaFor" + self.name()        ,
+            prescale = self['B2PiOmegaPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'            ] ,
+            algos    = [ self.b2omega ()         ]
+            ) ,
+            ##
+            StrippingLine (
+            "B2PsiKKOmegaFor" + self.name()          ,
+            prescale = self['B2KKOmegaPrescale'    ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.b2KKomega ()         ]
+            ) ,
+            StrippingLine (
+            "B2PsiKPiOmegaFor" + self.name()          ,
+            prescale = self['B2KPiOmegaPrescale'    ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'               ] ,
+            algos    = [ self.b2Kpiomega ()         ]
+            ) ,
+            ##
+            StrippingLine (
+            "B2PsiPiPiOmegaFor" + self.name()        ,
+            prescale = self['B2PiPiOmegaPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.b2pipiomega ()       ]
+            ) ,
+            ##            
+            StrippingLine (
+            "Bu2PsiKstarFor" + self.name()              ,
+            prescale = self['Bu2PsiKstarPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.bu2Kstar ()          ]
+            ) ,
+            ## 
+            StrippingLine (
+            "Bu2PsiKstarMergedFor" + self.name()     ,
+            prescale = self['Bu2PsiKstarMPrescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.bu2KstarM ()         ]
+            ) ,
+            ##            
+            StrippingLine (
+            "Bc2PsiRhoFor" + self.name()             ,
+            prescale = self['Bc2PsiRhoPrescale'    ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.bc2rho ()            ]
+            ) ,
+            ##
+            ## b -> chi_c
+            ##
+            StrippingLine (
+            "B2ChicKFor" + self.name()               ,
+            prescale = self['B2ChicKPrescale'      ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.b2chicK ()           ]
+            ) ,
+            ##
+            StrippingLine (
+            "B2ChicKKFor" + self.name()              ,
+            prescale = self['B2ChicKKPrescale'     ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.b2chicKK ()          ]
+            ) ,
+            ##
+            StrippingLine (
+            "B2ChicKPiFor" + self.name()             ,
+            prescale = self['B2ChicKPiPrescale'    ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.b2chicKpi ()         ]
+            ) ,
+            ##
+            StrippingLine (
+            "B2ChicKPiPiFor" + self.name()           ,
+            prescale = self['B2ChicKPiPiPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.b2chicKpipi ()       ]
+            ) ,
+            ##
+            StrippingLine (
+            "B2ChicPiPiFor" + self.name()            ,
+            prescale = self['B2ChicPiPiPrescale'   ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.b2chicpipi ()        ]
+            ) ,
+            ##
+            StrippingLine (
+            "Bc2ChicPiFor" + self.name()             ,
+            prescale = self['Bc2ChicPiPrescale'    ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.bc2chicpi ()         ]
+            ) ,
+            ##
+            StrippingLine (
+            "Lb2ChicPKFor" + self.name()             ,
+            prescale = self['Lb2ChicPKPrescale'    ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'              ] ,
+            algos    = [ self.lb2chicpK ()         ]
+            ) ,
+            #
+            ]
+        #
+        return self._add_selection ( 'PsiX0Lines' , sel ) 
+    
+    # ========================================================================
+    ## pions :
+    # ========================================================================
+    def pions    ( self ) :
+        """
+        Pions for   B -> psi X lines 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        ##
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdAllNoPIDsPions as inpts
+            pioncut = self['PionCut']
+        else                    :
+            from StandardParticles import StdAllLooseANNPions as inpts
+            pioncut = "(%s)&(%s)" % ( self['PionCut'] , self['PionPIDCut'] ) 
+        ##
+        return self.make_selection (
+            'Pion'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = pioncut         ,
+            )
+    
+    # ========================================================================
+    ## kaons :
+    # ========================================================================
+    def kaons     ( self ) :
+        """
+        Kaons for   B -> psi X lines 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        ## 
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdAllNoPIDsKaons as inpts
+            kaoncut = self['KaonCut']
+        else                    :
+            from StandardParticles import StdAllLooseANNKaons as inpts 
+            kaoncut = "(%s)&(%s)" % ( self['KaonCut'] , self['KaonPIDCut'] ) 
+        #
+        ##
+        return self.make_selection (
+            'Kaon'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = kaoncut         ,
+            )
+
+    # ========================================================================
+    ## protons
+    # ========================================================================
+    def protons    ( self ) :
+        """
+        protons for   B -> psi X lines 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdAllNoPIDsProtons as inpts
+            protoncut = self['ProtonCut']
+        else                    :
+            from StandardParticles import StdAllLooseANNProtons as inpts 
+            protoncut = "(%s)&(%s)" % ( self['ProtonCut'] , self['ProtonPIDCut'] ) 
+        ##
+        return self.make_selection (
+            'Proton'                 ,
+            FilterDesktop            ,
+            [ inpts ]                ,
+            Code = protoncut         ,
+            )
+
+    # =========================================================================
+    ## muons 
+    # =========================================================================
+    def muons  ( self ) :
+        from   StandardParticles  import StdLooseMuons as muons_
+        return muons_
+
+    # =========================================================================
+    ## gamma 
+    # =========================================================================
+    def gamma  ( self ) :
+        from   StandardParticles  import StdLooseAllPhotons as photons_
+        return photons_ 
+    
+    # =========================================================================
+    ## define proper pi0 
+    # =========================================================================
+    def pi0  ( self ) :
+        """
+        Define proper pi0
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from StandardParticles                     import StdLoosePi02gg as inpts 
+        ##
+        return self.make_selection (
+            'Pi0'                  ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = self['Pi0Cut']  ,
+            )
+    
+    # =========================================================================
+    ## define proper eta
+    # =========================================================================
+    def eta_  ( self ) :
+        """
+        Define proper eta -> gamma gamma 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from StandardParticles                     import StdLooseEta2gg as inpts 
+        ##
+        return self.make_selection (
+            'EtaStd'               ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = self['EtaCut']  ,
+            )
+    
+    
+    # =========================================================================
+    ## selection for  eta -> gamma gamma 
+    # =========================================================================
+    def eta2gg ( self ) :
+        """
+        Selection for Eta -> gamma gamma
+        """
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        pre_eta = self.make_selection (
+            'PreEta2gg'            ,
+            FilterDesktop          ,
+            [ self.eta_ () ]       ,
+            Code = """
+            ( ADMASS ('eta') < 100 * MeV ) &
+            ( PT > %s ) 
+            """ % min ( self['X0PT'] , self['X0PTK'] ) 
+            )
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g
+        return self.make_selection (
+            'Eta2gg'                   ,
+            Pi0Veto__Tagger2g          ,
+            [ pre_eta  ]               ,
+            MassWindow     = 25 * MeV  ,
+            MassChi2       = -1        ,
+            ExtraInfoIndex = 25015     ## unique ! 
+            )
+    
+    # =========================================================================
+    ## (selection for  eta -> pipipi
+    # =========================================================================
+    def eta23pi ( self ) :
+        """
+        Selection for Eta -> pipipi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        ## 
+        pre_eta = self.make_selection (
+            ## the unique tag 
+            'PreEta3Pi'                   ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.pions () , self.pi0 ()  ] ,
+            ## algorithm properties 
+            DecayDescriptor = " eta -> pi+ pi- pi0" ,
+            ## 
+            Combination12Cut  = """  ( AM < 700 * MeV  ) &
+            ( ACHI2DOCA(1,2) < 12 ) 
+            """ , 
+            ##
+            CombinationCut  = """
+            ( APT > %s ) & ( ADAMASS ( 'eta' ) < 100 * MeV )
+            """ % ( 0.9 * min ( self['X0PT'] , self['X0PTK'] ) ) ,
+            ##
+            MotherCut       = """
+            ( PT     > %s ) &
+            ( chi2vx <  9 ) 
+            """ % min ( self['X0PT'] , self['X0PTK'] )
+            )
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g
+        ## 
+        return self.make_selection (
+            'Eta23pi'                  ,
+            Pi0Veto__Tagger2g          ,
+            [ pre_eta ]                ,
+            MassWindow     = 25 * MeV  ,
+            MassChi2       = -1        ,
+            ExtraInfoIndex = 25016     ## unique ! 
+            )
+
+    # =========================================================================
+    ## all etas 
+    # =========================================================================
+    def eta0 ( self ) :
+        """
+        All etas 
+        """
+        tag      = 'Eta0_selection'
+        sel      = self._selection ( tag )
+        if sel : return sel
+        #
+        from PhysSelPython.Wrappers import MergedSelection
+        sel = MergedSelection (
+            'SelEta0AllFor' + self.name() ,
+            RequiredSelections = [ self.eta2gg  () ,
+                                   self.eta23pi () ]
+            )
+        
+        return self._add_selection ( tag , sel ) 
+    
+    
+    # ===========================================================================
+    ## selection for  etap -> rho0 gamma 
+    # ===========================================================================
+    def etap2rhog ( self ) :
+        """
+        Selection for Eta' -> rho gamma        
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        pre_etap = self.make_selection (
+            ## the unique tag 
+            'PreEtapRhoG'                 ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.pions () , self.gamma ()  ] ,
+            ##
+            DecayDescriptor = " eta_prime -> pi+ pi- gamma" ,
+            ##
+            DaughtersCuts   = { 'gamma' :  self['GammaCut'] } ,
+            ## 
+            Combination12Cut  = """  ( AM < 950 * MeV  ) &
+            ( ACHI2DOCA(1,2) < 12 ) 
+            """ , 
+            CombinationCut  = """
+            ( APT > %s ) & 
+            in_range  ( 500 * MeV , AM12 , 950 * MeV ) & 
+            ( ADAMASS ( 'eta_prime' ) <    100 * MeV ) 
+            """ % ( 0.9 * min ( self['X0PT'] , self['X0PTK'] ) ),
+            ##
+            MotherCut       = """
+            ( PT     > %s ) &
+            ( chi2vx <  9 )
+            """ % min ( self['X0PT'] , self['X0PTK'] )
+            )
+        ##         
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+        ## 
+        return self.make_selection (
+            'Etap2rhogamma'               ,
+            Pi0Veto__Tagger               ,
+            [ pre_etap ]                  ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25017     ## unique ! 
+            )
+    
+    # ============================================================================
+    ## selection for  etap -> pi+ pi- eta
+    # ============================================================================ 
+    def etap2pipieta ( self ) :
+        """
+        Selection for Eta' -> pi+ pi- eta         
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ##
+        pre_etap = self.make_selection (
+            ## the unique tag 
+            'PreEtapPiPiEta'               ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.pions () , self.eta_ ()  ] ,
+            ##
+            DecayDescriptor = " eta_prime -> pi+ pi- eta" ,
+            ## 
+            Combination12Cut  = """  ( AM < 600 * MeV  ) &
+            ( ACHI2DOCA(1,2) < 12 ) 
+            """ , 
+            CombinationCut  = """
+            ( APT > %s ) & 
+            ( ADAMASS ( 'eta_prime' ) <    100 * MeV ) 
+            """ % ( 0.9 * min ( self['X0PT'] , self['X0PTK'] ) ),
+            ##
+            MotherCut       = """
+            ( PT     > %s ) &
+            ( chi2vx <  9 )
+            """ % min ( self['X0PT'] , self['X0PTK'] )
+            )
+        
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g
+        ## 
+        return self.make_selection (
+            'Etap2pipieta'                ,
+            Pi0Veto__Tagger2g             ,
+            [ pre_etap ]                  ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25018     ## unique ! 
+            )
+    
+    # =========================================================================
+    ## all etas 
+    # =========================================================================
+    def eta_prime ( self ) :
+        """
+        All eta's 
+        """
+        tag      = 'EtaPrime_selection'
+        sel      = self._selection ( tag )
+        if sel : return sel
+        #
+        from PhysSelPython.Wrappers import MergedSelection
+        sel = MergedSelection (
+            'SelEtaPrimAllFor' + self.name() ,
+            RequiredSelections = [ self.etap2rhog    () ,
+                                   self.etap2pipieta () ]
+            )
+        
+        return self._add_selection ( tag , sel ) 
+    
+    
+    # =========================================================================
+    ## omega -> 3 pi 
+    # =========================================================================
+    def omega ( self ) :
+        """
+        omega -> 3 pi selection 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ##
+        pre_omega = self.make_selection (
+            ## the unique tag 
+            'PreOmega'                ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.pions () , self.pi0 ()  ] ,
+            ##
+            DecayDescriptor = " omega(782) -> pi+ pi- pi0" ,
+            ## 
+            Combination12Cut  = """  ( AM < 1 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 12 ) 
+            """ ,
+            ## 
+            CombinationCut  = """
+            ( APT > %s ) & ( ADAMASS ( 'omega(782)' ) < 100 * MeV )
+            """ % ( 0.9 * min ( self['X0PT'] , self['X0PTK'] ) ),
+            ##
+            MotherCut       = """
+            ( PT     > %s ) &
+            ( chi2vx <  9 )
+            """ % min ( self['X0PT'] , self['X0PTK'] ) 
+            )
+        
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g
+        ## 
+        return self.make_selection (
+            'Omega'                       ,
+            Pi0Veto__Tagger2g             ,
+            [ pre_omega ]                 ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25019     ## unique ! 
+            )
+    
+    # =========================================================================
+    ## psi(') -> mu+ mu-
+    # =========================================================================
+    def psi ( self ) :
+        """
+        psi(') -> mu+ mu- 
+        """
+        psi_name = 'Psi'
+        sel_name = 'Sel%sFor%s' % ( psi_name , self.name() )
+        sel_tag  = '%s_Selection'
+        sel      = self._selection( sel_tag ) 
+        if sel  : return sel 
+        
+        dimu_lines = self['DIMUONLINES']
+        if not dimu_lines :
+            ## 
+            from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+            ##
+            return self.make_selection (
+                psi_name         ,
+                CombineParticles ,
+                [ self.muons() ] ,
+                ## 
+                DecayDescriptor = " J/psi(1S) -> mu+ mu- " ,
+                ##
+                DaughtersCuts   = {
+                'mu+'   :  self [ 'MuonCut' ] 
+                } ,
+                ## 
+                CombinationCut  = """
+                ( ADAMASS  ( 'J/psi(1S)' ) < 120 * MeV ) | 
+                ( ADAMASS  (   'psi(2S)' ) < 120 * MeV ) 
+                """ ,
+                ##
+                MotherCut       = """
+                chi2vx < 20
+                """ 
+                )
+
+        ## list of lines 
+        from PhysSelPython.Wrappers import AutomaticData 
+        if 1 < len( dimu_lines ) :
+            lines = [ AutomaticData ( l ) for l in dimu_lines ] 
+            from PhysSelPython.Wrappers import MergedSelection
+            sel = MergedSelection ( sel_name , RequiredSelections = lines ) 
+            return self._add_selection ( sel_tag , sel ) 
+
+        ## single line  
+        dimu_line = dimu_lines[0]
+        sel = AutomaticData ( dimu_line ) 
+        return self._add_selection ( sel_tag , sel ) 
+        
+    # =========================================================================
+    ## chi_c -> J/psi gamma 
+    # =========================================================================
+    def chi_c ( self ) :
+        """
+        chi_c -> J/psi gamma 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ##
+        pre_chic = self.make_selection (
+            'PreChic' ,
+            CombineParticles ,
+            [ self.psi() , self.gamma()  ] ,
+            ## 
+            DecayDescriptor = " chi_c1(1P) -> J/psi(1S) gamma " ,
+            ##
+            DaughtersCuts   = {
+            'J/psi(1S)'   :  " M  < ( 3.100 + 0.120 ) * GeV " ,
+            'gamma'       :  " PT > 400 * MeV "
+            } ,
+            ## 
+            CombinationCut  = """
+            ( AM - AM1 ) < 650 * MeV
+            """ ,
+            ##
+            MotherCut       = " PALL "
+            )
+        
+        ##         
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+        ## 
+        return self.make_selection (
+            'Chic'                        ,
+            Pi0Veto__Tagger               ,
+            [ pre_chic ]                  ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25030     ## unique ! 
+            )
+    
+    # ============================================================================
+    ## Beauty -> psi(') X0
+    # ============================================================================
+    
+    # ============================================================================
+    # B -> psi(') eta 
+    # ============================================================================
+    def b2eta ( self ) :
+        """
+        B -> psi(') eta
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ##
+        return self.make_selection (
+            'B2PsiEta2gg'  ,
+            CombineParticles ,
+            [ self.psi() , self.eta0()  ] ,
+            ## 
+            DecayDescriptor = "B_s0 -> J/psi(1S) eta" ,
+            ##
+            Preambulo       = self['Preambulo'] ,
+            DaughtersCuts   = { 'eta' : ' PT > %s ' % self['X0PT'] } ,
+            ##
+            CombinationCut  = "mb0_acut" ,
+            ##
+            MotherCut       = """
+            mb0_cut     & 
+            ( ctau > %s ) 
+            """ % self['CTAU']
+            ##
+            )
+    
+    # =========================================================================
+    # B -> psi(')  eta'
+    # =========================================================================
+    def b2etap ( self ) :
+        """
+        B -> psi(') eta'
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ##
+        return self.make_selection (
+            'B2PsiEtaPrime'  ,
+            CombineParticles  ,
+            [ self.psi()      , self.eta_prime () ] ,
+            ## 
+            DecayDescriptor = "B_s0 -> J/psi(1S) eta_prime" ,
+            ##
+            Preambulo       = self['Preambulo'] ,
+            DaughtersCuts   = { 'eta_prime' : ' PT > %s ' % self['X0PT'] } ,
+            ##
+            CombinationCut  = "mb0_acut" ,
+            ##
+            MotherCut       = """
+            mb0_cut            & 
+            ( chi2vxndf < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU']
+            ##
+            )
+    
+    # =========================================================================
+    # B -> psi(') (omega -> 3pi  ) 
+    # =========================================================================
+    def b2omega ( self ) :
+        """
+        B -> psi(') (omega -> 3pi  ) 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ##
+        return self.make_selection (
+            'B2PsiOmega'  ,
+            CombineParticles  ,
+            [ self.psi()      , self.omega () ] ,
+            ## 
+            DecayDescriptor = "B0 -> J/psi(1S) omega(782)" ,
+            ##
+            DaughtersCuts   = { 'omega(782)' : ' PT > %s ' % self['X0PT'] } ,
+            ##
+            CombinationCut  = "mb0_acut" ,
+            ##
+            MotherCut       = """
+            mb0_cut            &
+            ( chi2vxndf < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU']
+            ##
+            )
+
+
+    # ============================================================================
+    ## Beauty -> chi_c  X 
+    # ============================================================================
+
+    # ============================================================================
+    # B -> chi_c K 
+    # ============================================================================
+    def b2chicK ( self ) :
+        """
+        B -> chic K 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2ChicK'                   ,
+            ## algorithm type to be used
+            CombineParticles            ,
+            ## input selections 
+            [ self.chi_c () , self.kaons()  ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> chi_c1(1P) K+ ]cc" ,
+            ##
+            CombinationCut = """ mbu_acut &
+            ( ACHI2DOCA(1,2) < 20 )
+            """ , 
+            ## 
+            MotherCut        = """
+            mbu_cut                 &
+            ( chi2vxNDF < 10      ) &  
+            ( ctau      > %s      ) 
+            """ % self['CTAU'],
+            )
+
+
+    # ============================================================================
+    # Bs -> chi_c K K 
+    # ============================================================================
+    def b2chicKK ( self ) :
+        """
+        B -> chic K K
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2ChicKK'                    ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.chi_c () , self.kaons()  ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B_s0 -> chi_c1(1P) K- K+" ,
+            ##
+            Combination12Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 ) 
+            """  ,
+            ## 
+            CombinationCut   = """ mb0_acut &
+            ( ACHI2DOCA(1,3) < 20 ) & 
+            ( ACHI2DOCA(2,3) < 20 ) 
+            """ , 
+            ## 
+            MotherCut        = """
+            mbu_cut                 &
+            ( chi2vxNDF < 10      ) &  
+            ( ctau      > %s      ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # B0 -> chi_c K- pi+ 
+    # ============================================================================
+    def b2chicKpi ( self ) :
+        """
+        B -> chic K- pi+
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2ChicKPi'                   ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.chi_c () , self.kaons() , self.pions ()  ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B0 -> chi_c1(1P) K- pi+]cc" ,
+            ##
+            Combination12Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 ) 
+            """  ,
+            ## 
+            CombinationCut   = """ mb0_acut &
+            ( ACHI2DOCA(1,3) < 20 ) & 
+            ( ACHI2DOCA(2,3) < 20 ) 
+            """ , 
+            ## 
+            MotherCut        = """
+            mbu_cut                 &
+            ( chi2vxNDF < 10      ) &  
+            ( ctau      > %s      ) 
+            """ % self['CTAU'],
+            )
+
+
+    # ============================================================================
+    # B- -> chi_c K+ pi+ pi-  
+    # ============================================================================
+    def b2chicKpipi ( self ) :
+        """
+        B -> chic K+ pi+ pi-
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2ChicKPiPi'                   ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.chi_c () , self.kaons() , self.pions ()  ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> chi_c1(1P) K+ pi+ pi-]cc" ,
+            ##
+            Combination12Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 ) 
+            """  ,
+            ## 
+            Combination123Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,3) < 20 ) & 
+            ( ACHI2DOCA(2,3) < 20 ) 
+            """  ,
+            ## 
+            CombinationCut   = """ mb0_acut &
+            ( ACHI2DOCA(1,4) < 20 ) & 
+            ( ACHI2DOCA(2,4) < 20 ) &
+            ( ACHI2DOCA(3,4) < 20 ) 
+            """ , 
+            ## 
+            MotherCut        = """
+            mbu_cut                 &
+            ( chi2vxNDF < 10      ) &  
+            ( ctau      > %s      ) 
+            """ % self['CTAU'],
+            )
+
+
+    # ============================================================================
+    # Bs -> chi_c pi pi 
+    # ============================================================================
+    def b2chicpipi ( self ) :
+        """
+        B -> chic pi pi 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2ChicPiPi'                  ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.chi_c () , self.pions()  ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B_s0 -> chi_c1(1P) pi- pi+" ,
+            ##
+            Combination12Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 ) 
+            """  ,
+            ## 
+            CombinationCut   = """ mb0_acut &
+            ( ACHI2DOCA(1,3) < 20 ) & 
+            ( ACHI2DOCA(2,3) < 20 ) 
+            """ , 
+            ## 
+            MotherCut        = """
+            mbu_cut                 &
+            ( chi2vxNDF < 10      ) &  
+            ( ctau      > %s      ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # Bc -> chi_c pi
+    # ============================================================================
+    def bc2chicpi ( self ) :
+        """
+        Bc -> chic pi+ 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Bc2ChicPi'                 ,
+            ## algorithm type to be used
+            CombineParticles            ,
+            ## input selections 
+            [ self.chi_c () , self.pions()  ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B_c+ -> chi_c1(1P) pi+ ]cc" ,
+            ##
+            CombinationCut = """ mbc_acut &
+            ( ACHI2DOCA(1,2) < 20 )
+            """ , 
+            ## 
+            MotherCut        = """
+            mbc_cut                 &
+            ( chi2vxNDF < 10      ) &  
+            in_range ( 75   * um  , ctau ,  5 * mm     )
+            """
+            )
+
+    # ============================================================================
+    # Lb -> chi_c p K 
+    # ============================================================================
+    def lb2chicpK ( self ) :
+        """
+        Lambda_b -> chic p K 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Lb2ChicPK'                   ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.chi_c () , self.protons() , self.kaons () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[Lambda_b0 -> chi_c1(1P) p+ K-]cc" ,
+            ##
+            Combination12Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )
+            """  ,
+            ## 
+            CombinationCut   = """ mbl_acut &
+            ( ACHI2DOCA(1,3) < 20 ) & 
+            ( ACHI2DOCA(2,3) < 20 ) 
+            """ , 
+            ## 
+            MotherCut        = """
+            mbl_cut                 &
+            ( chi2vxNDF < 10      ) &  
+            ( ctau      > %s      ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # B -> psi(') K eta
+    # ============================================================================
+    def b2Keta ( self ) :
+        """
+        B -> psi(') K eta 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiKEta'                   ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons()   , self.eta0 () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) K+ eta]cc" ,
+            ##
+            DaughtersCuts   = { 'eta' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mbu_acut " , 
+            ## 
+            MotherCut        = """
+            mbu_cut                 &
+            ( PT        > 1 * GeV ) &
+            ( chi2vxNDF < 10      ) &  
+            ( ctau      > %s      ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # B -> psi(') pi  eta
+    # ============================================================================
+    def b2pieta ( self ) :
+        """
+        B -> psi(') pi eta 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiPiEta'                ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions() , self.eta0 () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) pi+ eta]cc" ,
+            ## 
+            DaughtersCuts   = { 'eta' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mbu_acut " , 
+            ## 
+            MotherCut        = """
+            mbu_cut                 &
+            ( PT        > 1 * GeV ) &
+            ( chi2vxNDF < 10      ) &  
+            ( ctau      > %s      ) 
+            """ % self['CTAU'],
+            )
+        
+    # ============================================================================
+    # B -> psi(') K K eta
+    # ============================================================================
+    def b2KKeta ( self ) :
+        """
+        B -> psi(') K K eta 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiKKEta'                   ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons()   , self.eta0 () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B_s0 -> J/psi(1S) K+ K- eta" ,
+            ##
+            DaughtersCuts   = { 'eta' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut  = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            Combination123Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,3) < 20 )  &
+            ( ACHI2DOCA(2,3) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mb0_acut " , 
+            ## 
+            MotherCut        = """
+            mb0_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # B -> psi(') pi pi  eta
+    # ============================================================================
+    def b2pipieta ( self ) :
+        """
+        B -> psi(') pi pi eta 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiPiPiEta'                ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions() , self.eta0 () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B_s0 -> J/psi(1S) pi+ pi- eta" ,
+            ## 
+            DaughtersCuts   = { 'eta' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            ## 
+            Combination123Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,3) < 20 ) & 
+            ( ACHI2DOCA(2,3) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mb0_acut " , 
+            ## 
+            MotherCut        = """
+            mb0_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # B -> psi(') K pi eta
+    # ============================================================================
+    def b2Kpieta ( self ) :
+        """
+        B -> psi(') K pi eta 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiKPiEta'                 ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons() , self.pions() , self.eta0 () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B0 -> J/psi(1S) K+ pi- eta]cc" ,
+            ##
+            DaughtersCuts   = { 'eta' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut  = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            Combination123Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,3) < 20 ) & 
+            ( ACHI2DOCA(2,3) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mb0_acut " , 
+            ## 
+            MotherCut        = """
+            mb0_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+    
+    
+
+    # ============================================================================
+    # B -> psi(') K eta'
+    # ============================================================================
+    def b2Ketap ( self ) :
+        """
+        B -> psi(') K eta'
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiKEtaPrime'               ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons()   , self.eta_prime () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) K+ eta_prime]cc" ,
+            ##
+            DaughtersCuts   = { 'eta_prime' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut = """ ( AM < 7 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mbc_acut " , 
+            ## 
+            MotherCut        = """
+            mbc_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+
+    # ============================================================================
+    # B -> psi(') pi  eta'
+    # ============================================================================
+    def b2pietap ( self ) :
+        """
+        B -> psi(') pi eta'
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiPiEtaPrime'                ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions() , self.eta_prime () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) pi+ eta_prime]cc" ,
+            ## 
+            DaughtersCuts   = { 'eta_prime' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut = """ ( AM < 7 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mbc_acut " , 
+            ## 
+            MotherCut        = """
+            mbc_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+        
+    # ============================================================================
+    # B -> psi(') K K eta'
+    # ============================================================================
+    def b2KKetap ( self ) :
+        """
+        B -> psi(') K K eta' 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiKKEtaPrime'             ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons()   , self.eta_prime () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B_s0 -> J/psi(1S) K+ K- eta_prime" ,
+            ##
+            DaughtersCuts   = { 'eta_prime' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut  = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            Combination123Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,3) < 20 ) & 
+            ( ACHI2DOCA(2,3) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mb0_acut " , 
+            ## 
+            MotherCut        = """
+            mb0_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # B -> psi(') pi pi  eta'
+    # ============================================================================
+    def b2pipietap ( self ) :
+        """
+        B -> psi(') pi pi eta'
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiPiPiEtaPrime'           ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions() , self.eta_prime () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B_s0 -> J/psi(1S) pi+ pi- eta_prime " ,
+            ## 
+            DaughtersCuts   = { 'eta_prime' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            ## 
+            Combination123Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,3) < 20 ) & 
+            ( ACHI2DOCA(2,3) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mb0_acut " , 
+            ## 
+            MotherCut        = """
+            mb0_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # B -> psi(') K pi eta'
+    # ============================================================================
+    def b2Kpietap ( self ) :
+        """
+        B -> psi(') K pi eta' 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiKPiEtaPrime'            ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons() , self.pions() , self.eta_prime () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B0 -> J/psi(1S) K+ pi- eta_prime]cc" ,
+            ##
+            DaughtersCuts   = { 'eta_prime' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut  = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            Combination123Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,3) < 20 )  & 
+            ( ACHI2DOCA(2,3) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mb0_acut " , 
+            ## 
+            MotherCut        = """
+            mb0_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+        
+
+    # ============================================================================
+    # B -> psi(') K omega
+    # ============================================================================
+    def b2Komega ( self ) :
+        """
+        B -> psi(') K omega
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiKOmega'               ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons()   , self.omega () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) K+ omega(782) ]cc" ,
+            ##
+            DaughtersCuts   = { 'omega(782)' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut = """ ( AM < 7 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mbc_acut " , 
+            ## 
+            MotherCut        = """
+            mbc_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+
+    # ============================================================================
+    # B -> psi(') pi  omega
+    # ============================================================================
+    def b2piomega ( self ) :
+        """
+        B -> psi(') pi omega
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiPiOmega'                ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions() , self.omega () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) pi+ omega(782) ]cc" ,
+            ## 
+            DaughtersCuts   = { 'omega(782)' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut = """ ( AM < 7 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mbc_acut " , 
+            ## 
+            MotherCut        = """
+            mbc_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # B -> psi(') K K omega 
+    # ============================================================================
+    def b2KKomega ( self ) :
+        """
+        B -> psi(') K K omega
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiKKOmega'                ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons()   , self.omega () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B_s0 -> J/psi(1S) K+ K- omega(782)" ,
+            ##
+            DaughtersCuts   = { 'omega(782)' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut  = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            Combination123Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,3) < 20 ) &
+            ( ACHI2DOCA(2,3) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mb0_acut " , 
+            ## 
+            MotherCut        = """
+            mb0_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # B -> psi(') pi pi  omega
+    # ============================================================================
+    def b2pipiomega ( self ) :
+        """
+        B -> psi(') pi pi omega
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiPiPiOmega'           ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions() , self.omega () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B_s0 -> J/psi(1S) pi+ pi- omega(782)" ,
+            ## 
+            DaughtersCuts   = { 'omega(782)' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            ## 
+            Combination123Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,3) < 20 )  &
+            ( ACHI2DOCA(2,3) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mb0_acut " , 
+            ## 
+            MotherCut        = """
+            mb0_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU'],
+            )
+    
+    # ============================================================================
+    # B -> psi(') K pi omega 
+    # ============================================================================
+    def b2Kpiomega ( self ) :
+        """
+        B -> psi(') K pi omega
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'B2PsiKPiOmega'               ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons() , self.pions() , self.omega () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B0 -> J/psi(1S) K+ pi- omega(782)]cc" ,
+            ##
+            DaughtersCuts   = { 'omega(782)' : ' PT > %s ' % self['X0PTK'] } ,
+            ##
+            Combination12Cut  = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  ,
+            Combination123Cut = """ ( AM < 6 * GeV  ) &
+            ( ACHI2DOCA(1,3) < 20 ) & 
+            ( ACHI2DOCA(2,3) < 20 )  
+            """  ,
+            ## 
+            CombinationCut   = " mb0_acut " , 
+            ## 
+            MotherCut        = """
+            mb0_cut            &
+            ( chi2vxNDF < 10 ) &  
+            ( ctau      > %s ) 
+            """ % self['CTAU']
+            )
+    
+    # =========================================================================
+    # B+ -> psi ( K*+ -> K+ pi0)
+    # =========================================================================
+    def bu2Kstar ( self ) :
+        """
+        This is just a control line to study
+        the reconstruction efficiency for pi0 and gamma
+        see LHCb-INT-2012-001 
+        
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        pre_bkst = self.make_selection (
+            ## the unique tag 
+            'PreBu2PsiKstar'              ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## inputs 
+            [ self.psi   () , self.kaons () , self.pi0  () ] ,
+            ## configuration:
+            DecayDescriptor = "[B+ -> J/psi(1S) K+ pi0 ]cc" ,
+            ## keep only J/psi 
+            DaughtersCuts = { 'J/psi(1S)' : " M < 3.3 * GeV " } ,
+            ## 
+            Combination12Cut = """  ( AM < 5.75 * GeV ) &
+            ( ACHI2DOCA (1,2) < 20 )
+            """ ,             
+            CombinationCut = """
+            in_range ( 4.90 * GeV , AM   , 5.80 * GeV ) &
+            in_range ( 750  * MeV , AM23 , 1250 * MeV ) &
+            ( APT23 > 1 * GeV ) 
+            """ , 
+            ## 
+            MotherCut = """
+            in_range ( 4.95 * GeV , M , 5.75 * GeV ) & 
+            ( chi2vxndf < 10 ) &
+            ( ctau_9    > %s ) 
+            """ % self['CTAU_Kst'] 
+            )
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g
+        ## 
+        return self.make_selection (
+            'Bu2PsiKstar'              ,
+            Pi0Veto__Tagger2g          ,
+            [ pre_bkst ]               ,
+            MassWindow     = 25 * MeV  ,
+            MassChi2       = -1        ,
+            ExtraInfoIndex = 25020     ## unique ! 
+            )
+
+    # =========================================================================
+    # B+ -> psi ( K* -> K+ pi0-merged)
+    # =========================================================================
+    def bu2KstarM ( self ) :
+        """
+        B+ -> psi ( K* -> K+ pi0-merged )        
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        from StandardParticles                     import StdLooseMergedPi0 as pi0_merged
+        return self.make_selection (
+            ## the unique tag 
+            'Bu2PsiKstarMerged'           ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## inputs 
+            [ self.psi   () , self.kaons () , pi0_merged ] ,
+            ## configuration:
+            DecayDescriptor = "[B+ -> J/psi(1S) K+ pi0 ]cc" ,
+            ## keep only J/psi 
+            DaughtersCuts = { 'J/psi(1S)' : " M < 3.3 * GeV " } ,
+            ## 
+            Combination12Cut = """ ( AM < 7.1 * GeV ) &
+            ( ACHI2DOCA (1,2) < 20 ) 
+            """ ,             
+            CombinationCut = """
+            in_range ( 4.40 * GeV , AM , 7.10 * GeV ) &
+            ( AM23 < 2.5 * GeV ) 
+            """ , 
+            ##
+            MotherCut = """
+            in_range ( 4.45 * GeV , M , 7.05 * GeV ) & 
+            ( chi2vxndf < 10 ) 
+            """
+            )
+    ## ( ctau_9 > %s ) 
+    ## """ % self['CTAU_Kst'] 
+
+    # =========================================================================
+    # B(c) -> psi ( rho+ -> pi+ pi0 )
+    # =========================================================================
+    def bc2rho ( self ) :
+        """
+        Bc+ -> psi ( rho+ -> pi+ pi0 ) in very wide window 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        ##
+        pre_rho = self.make_selection (
+            ## the unique tag 
+            'PreBc2PsiRho'                ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## inputs 
+            [ self.psi   () , self.pions() , self.pi0  () ] ,
+            ## configuration:
+            DecayDescriptor  = "[B_c+ -> J/psi(1S) pi+ pi0 ]cc" ,
+            ## 
+            DaughtersCuts    = {
+            'J/psi(1S)' :   "    M   < 3.3 * GeV " , ## keep only J/psi 
+            'pi+'       :   "   PT   > 500 * MeV " ,
+            'pi0'       : """
+            (             PT   > 500 * MeV ) &
+            ( CHILD ( 1 , PT ) > 300 * MeV ) &
+            ( CHILD ( 2 , PT ) > 300 * MeV ) 
+            """
+            } ,
+            ## 
+            Combination12Cut = """
+            ( AM < 7.6 * GeV    )  & 
+            ( ACHI2DOCA ( 1 , 2 )  < 10 )  
+            """ ,
+            ##
+            CombinationCut   = """
+            in_range ( 4.4  * GeV , AM , 7.6 * GeV ) &
+            ( AM23 < 2.5 * GeV ) 
+            """ ,
+            ##
+            MotherCut        = """
+            ( chi2vx < 16  ) & 
+            in_range ( 4.45 * GeV , M      ,  7.55 * GeV ) & 
+            in_range ( 90   * um  , ctau_9 ,  5 * mm     )
+            """
+            )
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g
+        ## 
+        return self.make_selection (
+            'Bc2PsiRho'                ,
+            Pi0Veto__Tagger2g          ,
+            [ pre_rho ]                ,
+            MassWindow     = 25 * MeV  ,
+            MassChi2       = -1        ,
+            ExtraInfoIndex = 25025     ## unique ! 
+            )
+    
+# =============================================================================
+if '__main__' == __name__ :
+    
+    
+    logger.info ( 80*'*'  ) 
+    logger.info (  __doc__ ) 
+    logger.info ( ' Author :  %s' % __author__ ) 
+    logger.info ( ' Date   :  %s' % __date__   )
+    ##
+    clines = set() 
+    logger.info ( ' Lines declared in default_config["STREAMS"] are' )
+    for stream in default_config['STREAMS'] :
+        lines = default_config['STREAMS'][stream] 
+        for l in lines :
+            logger.info ( ' %-15s : %-50s ' % ( stream , l ) )
+            clines.add ( l )
+    ##
+    logger.info ( ' The output locations for the default configuration: ' )
+    ##
+    _conf = PsiX0Conf ( 'PsiX0' , 
+                        config = default_config['CONFIG']  )
+    ##
+    _ln   = ' ' + 61*'-' + '+' + 30*'-'
+    logger.info ( _ln ) 
+    logger.info ( '  %-60s| %-30s  ' % ( 'Output location', 'Stripping line name' ) ) 
+    logger.info ( _ln )
+    for l in _conf.lines() :
+        lout  = l.outputLocation()
+        lname = l.name() 
+        logger.info ( '  %-60s| %-30s  ' % ( lout, lname ) )
+        if not lname in clines :
+            raise AttributeError ('Unknown Line %s' % lname )
+        clines.remove ( lname )
+    logger.info ( _ln ) 
+    logger.info ( 80*'*'  ) 
+    if clines :
+        raise AttributeError('Undeclared lines: %s' % clines )
+
+    ## make dot-graphs 
+    try:    
+        selections = _conf._selections_private() 
+        for s in selections :
+            from SelPy.graph import graph
+            o = graph ( s , format = 'png' )
+            if o : logger.info  ( "Generate DOT-graph: %s"          % o        )
+            else : logger.error ( "Can't produce DOT=-graph for %s" % s.name() )
+            
+    except : pass
+        
+# =============================================================================
+# The END 
+# =============================================================================
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPsiXForBandQ.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPsiXForBandQ.py
new file mode 100644
index 000000000..42abe9426
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingPsiXForBandQ.py
@@ -0,0 +1,2393 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# $Id:$
+# =============================================================================
+## @file
+# 
+#   The coherent (miroDST) stripping for B -> psi(') + X for B&Q 
+#
+#   @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+#   @date   2012-02-19
+#
+#                   $Revision: 135537 $
+# Last modification $Date: 2012-02-19 15:18:08 +0100 (Sun, 19 Feb 2012) $
+#                by $Author: ibelyaev $
+# =============================================================================
+"""
+The coherent (microDST) stripping for B -> psi(') + X for B&Q
+
+"""
+# =============================================================================
+__author__  = 'Vanya BELYAEV Ivan.Belyaev@itep.ru'
+__date__    = '2012-02-19'
+__version__ = '$Revision$'
+# =============================================================================
+__all__ = (
+    'PsiX_BQ_Conf'  ,
+    'default_config'
+    )
+# =============================================================================
+
+# =============================================================================
+from GaudiKernel.SystemOfUnits             import GeV, MeV, mm, micrometer 
+from StrippingUtils.Utils                  import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g 
+# =============================================================================
+## logging
+# =============================================================================
+import logging
+logger = logging.getLogger(__name__)
+if not logger.handlers : logging.basicConfig()
+logger.setLevel(logging.INFO)
+# =============================================================================
+## Define the default configuration 
+_default_configuration_ = {
+    #
+    'NOPIDHADRONS'   : False ,  ## USE FOR SUIMULATION 
+    ## use for B&Q wg production
+    'DIMUONLINES'    : []    ,  ## USE FOR B&Q WG-selection 
+    #
+    ## PV-requiremens
+    #
+    'CheckPV'   : True ,
+    #
+    ## Global filter
+    # 
+    'FILTER'    : None ,   ## VOID filter 
+    'ODIN'      : None ,   ## ODIN filter 
+    'L0DU'      : None ,   ## L0   filter 
+    'HLT'       : None ,   ## HLT  filter
+    #
+    ## c*tau cut for B-hadrons 
+    #
+    'CTAU'      :  75 * micrometer , 
+    'CTAU_BC'   :  50 * micrometer , 
+    #
+    ## muon selection for  psi(') -> mu+ mu-
+    #
+    'MuonCut'   : """
+    ISMUON &
+    ( PT            >  550 * MeV ) &
+    ( PIDmu - PIDpi >    0       ) &
+    ( CLONEDIST     > 5000       )     
+    """ , 
+    #
+    ## pions and kaons
+    # 
+    'PionCut'   : """
+    ( PT          > 200 * MeV ) & 
+    ( CLONEDIST   > 5000      ) & 
+    ( TRGHOSTPROB < 0.5       ) &
+    ( TRCHI2DOF   < 4         ) & 
+    in_range ( 2          , ETA , 5         ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     &
+    ( MIPCHI2DV()  > 4        )
+    """ ,
+    #
+    'KaonCut'   : """
+    ( PT          > 200 * MeV ) & 
+    ( CLONEDIST   > 5000      ) & 
+    ( TRGHOSTPROB < 0.5       ) &
+    ( TRCHI2DOF   < 4         ) & 
+    in_range ( 2          , ETA , 5         ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     &
+    ( MIPCHI2DV()  > 4        )
+    """ ,
+    #
+    'ProtonCut'   : """
+    ( PT           > 200 * MeV ) & 
+    ( CLONEDIST    > 5000      ) & 
+    ( TRCHI2DOF    < 4         ) & 
+    ( TRGHOSTPROB  < 0.5       ) & 
+    in_range ( 2         , ETA , 5         ) &
+    in_range ( 10 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     &
+    ( MIPCHI2DV()  > 4        ) 
+    """ ,
+    #
+    ## PID-cuts for hadrons 
+    #
+    'PionPIDCut'   : " PROBNNpi > 0.1 " ,
+    'KaonPIDCut'   : " PROBNNk  > 0.1 " ,
+    'ProtonPIDCut' : " PROBNNp  > 0.1 " ,
+    #
+    #
+    ## useful shortcuts:
+    #
+    'Preambulo' : [
+    ## shortcut for chi2 of vertex fit 
+    'chi2vx    = VFASPF(VCHI2)     '                           , 
+    'chi2vxndf = VFASPF(VCHI2PDOF) '                           , 
+    ## shortcut for the c*tau
+    "from GaudiKernel.PhysicalConstants import c_light"        , 
+    ## use the embedded cut for chi2(LifetimeFit)<16
+    "ctau      = BPVLTIME ( 25 ) * c_light "                   ,
+    "ctau_9    = BPVLTIME (  9 ) * c_light "                   ,
+    "ctau_16   = BPVLTIME ( 16 ) * c_light "                   ,
+    "APT23     = LoKi.AParticles.TransverseMomentum ( 2 , 3 )" ,
+    ## Combination mass-cut for neutral beauty particles
+    "mb0_ahigh = 5.550 * GeV " , 
+    "mbu_ahigh = mb0_ahigh   " , 
+    "mlb_ahigh = 5.850 * GeV " , 
+    "mxb_ahigh = 6.460 * GeV " , 
+    "mbc_ahigh = 6.555 * GeV " , 
+    "mb0_acut  = in_range ( 5.100 * GeV , AM , mb0_ahigh   ) " ,
+    "mbu_acut  = in_range ( 5.100 * GeV , AM , mbu_ahigh   ) " ,
+    "mlb_acut  = in_range ( 5.350 * GeV , AM , mlb_ahigh   ) " ,
+    "mxb_acut  = in_range ( 5.350 * GeV , AM , mxb_ahigh   ) " ,
+    "mbc_acut  = in_range ( 6.050 * GeV , AM , mbc_ahigh   ) " ,
+    "mbp_acut  = mbu_acut    " ,
+    ## mass-cut for beauty particles 
+    "mb0_high  = 5.510 * GeV " , 
+    "mbu_high  = mb0_high    " , 
+    "mlb_high  = 5.810 * GeV " , 
+    "mxb_high  = 6.410 * GeV " , 
+    "mb0_cut   = in_range ( 5.140 * GeV ,  M , mb0_high    ) " ,
+    "mbu_cut   = in_range ( 5.140 * GeV ,  M , mbu_high    ) " ,
+    "mlb_cut   = in_range ( 5.390 * GeV ,  M , mlb_high   ) " ,
+    "mxb_cut   = in_range ( 5.390 * GeV ,  M , mxb_high    ) " ,
+    "mbc_cut   = in_range ( 6.090 * GeV ,  M , 6.510 * GeV ) " ,
+    ] ,
+    # =========================================================================
+    ## Prescales 
+    # =========================================================================
+    'B2PsiPiPrescale'   : 1.0 ,
+    'B2PsiKPrescale'    : 1.0 ,
+    #
+    'B2Psi2PiPrescale'  : 1.0 ,
+    'B2Psi2KPiPrescale' : 1.0 ,
+    'B2Psi2KPrescale'   : 1.0 ,
+    #
+    'B2Psi3KPrescale'   : 1.0 ,
+    'B2Psi3PiPrescale'  : 1.0 ,
+    'B2Psi3KPiPrescale' : 1.0 ,
+    #
+    'B2Psi4PiPrescale'  : 1.0 ,
+    'B2Psi4KPiPrescale' : 1.0 ,
+    'B2Psi4KPrescale'   : 1.0 ,
+    #
+    'B2Psi5PiPrescale'  : 1.0 ,
+    'B2Psi5KPiPrescale' : 1.0 ,
+    'B2Psi5KPrescale'   : 1.0 ,
+    #
+    'B2Psi6PiPrescale'  : 1.0 ,
+    'B2Psi6KPiPrescale' : 1.0 ,
+    #
+    'B2Psi7PiPrescale'  : 1.0 ,
+    'B2Psi7KPiPrescale' : 1.0 ,
+    #
+    'Lb2PsiPKPrescale'      : 1.0 ,
+    'Lb2PsiPPiPrescale'     : 1.0 ,
+    'Lb2PsiPKPiPiPrescale'  : 1.0 ,
+    'Lb2PsiPPiPiPiPrescale' : 1.0 ,
+    #
+    'Xib2PsiPKKPrescale'       : 1.0 ,
+    'Xib2PsiPKKpiPrescale'     : 1.0 ,    
+    'Omegab2PsiPKKKpiPrescale' : 1.0 ,    
+    #
+    'B2PsiPPPrescale'       : 1.0 ,
+    'B2PsiPPPiPrescale'     : 1.0 ,
+    'B2PsiPPKPrescale'      : 1.0 ,
+    'B2PsiPPPiPiPrescale'   : 1.0 ,
+    'B2PsiPPKPiPiPrescale'  : 1.0 ,
+    'B2PsiPPPiPiPiPrescale' : 1.0 ,
+    # =========================================================================
+    }
+## ============================================================================
+## the mandatory element for stripping framework 
+default_config = {
+    #
+    'NAME'        :   'PsiX'         ,
+    'WGs'         : [ 'BandQ' ]              ,
+    'CONFIG'      : _default_configuration_  , 
+    'BUILDERTYPE' :   'PsiX_BQ_Conf'         ,
+    'STREAMS'     : { 'Bhadron'    : [ 'StrippingB2PsiPiForPsiX'       ,
+                                       'StrippingB2PsiKForPsiX'        ,                                       
+                                       'StrippingB2Psi2PiForPsiX'      ,
+                                       'StrippingB2Psi2KPiForPsiX'     ,
+                                       'StrippingB2Psi2KForPsiX'       ,
+                                       'StrippingB2Psi3KForPsiX'       ,
+                                       'StrippingB2Psi3PiForPsiX'      ,
+                                       'StrippingB2Psi3KPiForPsiX'     ,
+                                       'StrippingB2Psi4PiForPsiX'      ,
+                                       'StrippingB2Psi4KPiForPsiX'     ,
+                                       'StrippingB2Psi4KForPsiX'       ,
+                                       'StrippingB2Psi5PiForPsiX'      ,
+                                       'StrippingB2Psi5KPiForPsiX'     ,
+                                       'StrippingB2Psi5KForPsiX'       ,
+                                       'StrippingB2Psi6PiForPsiX'      ,
+                                       'StrippingB2Psi6KPiForPsiX'     ,
+                                       'StrippingB2Psi7PiForPsiX'      ,
+                                       'StrippingB2Psi7KPiForPsiX'     ,
+                                       #
+                                       'StrippingLb2PsiPKForPsiX'         ,
+                                       'StrippingLb2PsiPPiForPsiX'        ,
+                                       'StrippingLb2PsiPKPiPiForPsiX'     ,
+                                       'StrippingLb2PsiPPiPiPiForPsiX'    ,
+                                       'StrippingXib2PsiPKKForPsiX'       ,
+                                       'StrippingXib2PsiPKKpiForPsiX'     ,
+                                       'StrippingOmegab2PsiPKKKpiForPsiX' ,
+                                       #
+                                       'StrippingB2PsiPPForPsiX'       ,
+                                       'StrippingB2PsiPPPiForPsiX'     ,
+                                       'StrippingB2PsiPPKForPsiX'      , 
+                                       'StrippingB2PsiPPPiPiForPsiX'   ,
+                                       'StrippingB2PsiPPKPiPiForPsiX'  ,
+                                       'StrippingB2PsiPPPiPiPiForPsiX' ] } 
+    }
+## ============================================================================
+## @class  PsiX_BQ_Conf
+#  psi(') X configuration file 
+#  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+#  @date 2012-02-19
+class PsiX_BQ_Conf(LineBuilder) :
+    """
+    Helper class to configure 'PsiX'-lines
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    ## get the default configuration 
+    @staticmethod
+    def defaultConfiguration( key = None ) :
+        """
+        Get the default/recommended configurtaion
+        
+        >>> conf = PsiX.defaultConfiguration()
+        
+        """
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+        if key : return _config[ key ]
+        return _config
+    
+    ## constructor
+    def __init__ ( self , name , config ) :
+        """
+        Constructor
+        """
+        # check the names 
+        if 'PsiX' != name :
+            logger.warning ( 'The non-default name is specified "%s"' % name  ) 
+            
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+
+        if isinstance ( config , dict ):
+            _config.update ( config )
+            LineBuilder.__init__( self , name , _config )
+        else :
+            LineBuilder.__init__( self , name ,  config )
+
+        ## private set of selections 
+        self.__selections_ = {}
+        
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {}
+            
+        self.__selections_[ self.name() ]['CONFIG'] = deepcopy ( _config ) 
+        
+        keys = _config.keys()
+        for key in keys :
+            
+            if not key in _default_configuration_ :
+                raise KeyError("Invalid key is specified: '%s'" % key )
+            
+            val = _config[key]
+            if val != _default_configuration_ [ key ] : 
+                logger.debug ('new configuration: %-16s : %s ' % ( key , _config[key] ) )
+                
+        self._name         = name
+
+        for line in self._lines_psiX () :
+            self.registerLine(line)
+            logger.debug ( "Register line: %s" %  line.name () ) 
+            
+            
+    ## get the selection, associated with some nickname name 
+    def _selection ( self , nick ) :
+        """
+        Get the selection, associated with some nickname name
+        """
+        
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {} 
+            
+        return self.__selections_[ self.name() ].get( nick , None ) 
+    
+    ## add the selection, associated with some nickname name 
+    def _add_selection ( self , nick , sel ) :
+        """
+        add the selection, associated with some nickname name
+        """
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {} 
+        
+        if self.__selections_[ self.name()].has_key( nick ) :
+            raise AttributeError , "Selection '%s'already exists " % nick
+        
+        self.__selections_[ self.name() ][ nick ] = sel
+        
+        return sel
+    
+    ## the basic Mother cuts for all charged modea
+    def _chargedB ( self ) :
+        """
+        The basic MotherCuts for all charged modea
+        """
+        return """
+        ( chi2vxndf < 12  ) &
+        ( ( mbu_cut & ( ctau > %s ) ) | ( mbc_cut & ( ctau > %s ) ) ) 
+        """ % ( self['CTAU'] , self['CTAU_BC'] ) 
+    
+    ## the basic Mother cuts for all charged modea
+    def _neutralB ( self ) :
+        """
+        The basic MotherCuts for all neutral modea
+        """
+        return """
+        mb0_cut            &
+        ( chi2vxndf < 10 ) &
+        ( ctau      > %s ) 
+        """ % self['CTAU']
+    
+    ## the basic Mother cuts for baryons 
+    def _lambdaB ( self ) :
+        """
+        The basic MotherCuts for baruons 
+        """
+        return """
+        mlb_cut            &
+        ( chi2vxndf < 10 ) &
+        ( ctau      > %s ) 
+        """ % self['CTAU']
+    
+    ## the basic Mother cuts for baryons 
+    def _xiB ( self ) :
+        """
+        The basic MotherCuts for baruons 
+        """
+        return """
+        mxb_cut            &
+        ( chi2vxndf < 10 ) &
+        ( ctau      > %s ) 
+        """ % self['CTAU'] 
+
+    ## get all single charm lines 
+    def _lines_psiX   ( self ) :
+        """
+        Get all psiX lines 
+        """
+        sel = self._selection ( 'PsiX_Lines' )
+        if sel : return sel
+        #
+        from StrippingConf.StrippingLine import StrippingLine
+        sel = [
+            # =================================================================
+            #
+            ## 1h
+            #            
+            StrippingLine (
+            "B2PsiPiFor"    + self.name()              ,
+            prescale        = self ['B2PsiPiPrescale'] , 
+            checkPV         = self ['CheckPV']         ,
+            FILTER          = self ['FILTER' ]         ,
+            ODIN            = self ['ODIN'   ]         ,
+            L0DU            = self ['L0DU'   ]         ,
+            HLT             = self ['L0DU'   ]         ,
+            algos           = [ self.psi_pi ()      ]  ) ,
+            ## 
+            StrippingLine (
+            "B2PsiKFor"     + self.name()              ,
+            prescale        = self ['B2PsiKPrescale' ] , 
+            checkPV         = self ['CheckPV']         ,
+            FILTER          = self ['FILTER' ]         ,
+            ODIN            = self ['ODIN'   ]         ,
+            L0DU            = self ['L0DU'   ]         ,
+            HLT             = self ['L0DU'   ]         ,
+            algos           = [ self.psi_K ()       ]  ) ,
+            #
+            ## 2h
+            #
+            StrippingLine (
+            "B2Psi2PiFor"   + self.name()                ,
+            prescale        = self ['B2Psi2PiPrescale' ] , 
+            checkPV         = self ['CheckPV']           ,
+            FILTER          = self ['FILTER' ]           ,
+            ODIN            = self ['ODIN'   ]           ,
+            L0DU            = self ['L0DU'   ]           ,
+            HLT             = self ['L0DU'   ]           ,
+            algos           = [ self.psi_2pi ()       ]  ) ,            
+            ##
+            StrippingLine (
+            "B2Psi2KPiFor"  + self.name()                 ,
+            prescale        = self ['B2Psi2KPiPrescale' ] , 
+            checkPV         = self ['CheckPV']            ,
+            FILTER          = self ['FILTER' ]            ,
+            ODIN            = self ['ODIN'   ]            ,
+            L0DU            = self ['L0DU'   ]            ,
+            HLT             = self ['L0DU'   ]            ,
+            algos           = [ self.psi_2Kpi ()    ]  )  ,
+            #
+            StrippingLine (
+            "B2Psi2KFor"    + self.name()               ,
+            prescale        = self ['B2Psi2KPrescale' ] , 
+            checkPV         = self ['CheckPV']          ,
+            FILTER          = self ['FILTER' ]          ,
+            ODIN            = self ['ODIN'   ]          ,
+            L0DU            = self ['L0DU'   ]          ,
+            HLT             = self ['L0DU'   ]          ,
+            algos           = [ self.psi_2K ()       ]  ) ,
+            #
+            ## 3h
+            #
+            StrippingLine (
+            "B2Psi3KFor"    + self.name()               ,
+            prescale        = self ['B2Psi3KPrescale' ] , 
+            checkPV         = self ['CheckPV']          ,
+            FILTER          = self ['FILTER' ]          ,
+            ODIN            = self ['ODIN'   ]          ,
+            L0DU            = self ['L0DU'   ]          ,
+            HLT             = self ['L0DU'   ]          ,
+            algos           = [ self.psi_3K ()       ]  ) ,  
+            ##
+            StrippingLine (
+            "B2Psi3PiFor"   + self.name()                ,
+            prescale        = self ['B2Psi3PiPrescale' ] , 
+            checkPV         = self ['CheckPV']           ,
+            FILTER          = self ['FILTER' ]           ,
+            ODIN            = self ['ODIN'   ]           ,
+            L0DU            = self ['L0DU'   ]           ,
+            HLT             = self ['L0DU'   ]           ,
+            algos           = [ self.psi_3pi ()       ]  ) ,
+            ##
+            StrippingLine (
+            "B2Psi3KPiFor"  + self.name()                 ,
+            prescale        = self ['B2Psi3KPiPrescale' ] , 
+            checkPV         = self ['CheckPV']            ,
+            FILTER          = self ['FILTER' ]            ,
+            ODIN            = self ['ODIN'   ]            ,
+            L0DU            = self ['L0DU'   ]            ,
+            HLT             = self ['L0DU'   ]            ,
+            algos           = [ self.psi_3Kpi ()       ]  ) ,
+            #
+            ## 4h
+            #
+            StrippingLine (
+            "B2Psi4PiFor"   + self.name()                ,
+            prescale        = self ['B2Psi4PiPrescale' ] , 
+            checkPV         = self ['CheckPV']           ,
+            FILTER          = self ['FILTER' ]           ,
+            ODIN            = self ['ODIN'   ]           ,
+            L0DU            = self ['L0DU'   ]           ,
+            HLT             = self ['L0DU'   ]           ,
+            algos           = [ self.psi_4pi ()       ]  ) ,
+            ##
+            StrippingLine (
+            "B2Psi4KPiFor"  + self.name()                 ,
+            prescale        = self ['B2Psi4KPiPrescale' ] , 
+            checkPV         = self ['CheckPV']            ,
+            FILTER          = self ['FILTER' ]            ,
+            ODIN            = self ['ODIN'   ]            ,
+            L0DU            = self ['L0DU'   ]            ,
+            HLT             = self ['L0DU'   ]            ,
+            algos           = [ self.psi_4Kpi ()       ]  ) ,
+            ##
+            StrippingLine (
+            "B2Psi4KFor"    + self.name()               ,
+            prescale        = self ['B2Psi4KPrescale' ] , 
+            checkPV         = self ['CheckPV']          ,
+            FILTER          = self ['FILTER' ]          ,
+            ODIN            = self ['ODIN'   ]          ,
+            L0DU            = self ['L0DU'   ]          ,
+            HLT             = self ['L0DU'   ]          ,
+            algos           = [ self.psi_4K ()       ]  ) ,
+            #
+            ## 5h
+            #
+            StrippingLine (
+            "B2Psi5PiFor"   + self.name()                ,
+            prescale        = self ['B2Psi5PiPrescale' ] , 
+            checkPV         = self ['CheckPV']           ,
+            FILTER          = self ['FILTER' ]           ,
+            ODIN            = self ['ODIN'   ]           ,
+            L0DU            = self ['L0DU'   ]           ,
+            HLT             = self ['L0DU'   ]           ,
+            algos           = [ self.psi_5pi ()       ]  ) ,
+            ##
+            StrippingLine (
+            "B2Psi5KPiFor"  + self.name()                 ,
+            prescale        = self ['B2Psi5KPiPrescale' ] , 
+            checkPV         = self ['CheckPV']            ,
+            FILTER          = self ['FILTER' ]            ,
+            ODIN            = self ['ODIN'   ]            ,
+            L0DU            = self ['L0DU'   ]            ,
+            HLT             = self ['L0DU'   ]            ,
+            algos           = [ self.psi_5Kpi ()       ]  ) ,
+            #
+            StrippingLine (
+            "B2Psi5KFor"    + self.name()                 ,
+            prescale        = self ['B2Psi5KPrescale'   ] , 
+            checkPV         = self ['CheckPV']            ,
+            FILTER          = self ['FILTER' ]            ,
+            ODIN            = self ['ODIN'   ]            ,
+            L0DU            = self ['L0DU'   ]            ,
+            HLT             = self ['L0DU'   ]            ,
+            algos           = [ self.psi_5K  ()        ]  ) ,
+            #
+            ## 6h
+            #
+            StrippingLine (
+            "B2Psi6PiFor"   + self.name()                ,
+            prescale        = self ['B2Psi6PiPrescale' ] , 
+            checkPV         = self ['CheckPV']           ,
+            FILTER          = self ['FILTER' ]           ,
+            ODIN            = self ['ODIN'   ]           ,
+            L0DU            = self ['L0DU'   ]           ,
+            HLT             = self ['L0DU'   ]           ,
+            algos           = [ self.psi_6pi ()       ]  ) ,
+            ##
+            StrippingLine (
+            "B2Psi6KPiFor"  + self.name()                 ,
+            prescale        = self [ 'B2Psi6KPiPrescale' ], 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_6Kpi ()       ]  ) ,
+            #
+            #
+            ## 7h
+            #
+            StrippingLine (
+            "B2Psi7PiFor"   + self.name()                ,
+            prescale        = self ['B2Psi7PiPrescale' ] , 
+            checkPV         = self ['CheckPV']           ,
+            FILTER          = self ['FILTER' ]           ,
+            ODIN            = self ['ODIN'   ]           ,
+            L0DU            = self ['L0DU'   ]           ,
+            HLT             = self ['L0DU'   ]           ,
+            algos           = [ self.psi_7pi ()       ]  ) ,
+            ##
+            StrippingLine (
+            "B2Psi7KPiFor"  + self.name()                 ,
+            prescale        = self [ 'B2Psi7KPiPrescale' ], 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_7Kpi ()       ]  ) ,
+            #
+            ## 1 proton
+            #
+            StrippingLine (
+            "Lb2PsiPKFor"   + self.name()                 ,
+            prescale        = self [ 'Lb2PsiPKPrescale'  ] , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_pK ()         ]  ) ,
+            #            
+            StrippingLine (
+            "Lb2PsiPPiFor"  + self.name()                 ,
+            prescale        = self [ 'Lb2PsiPPiPrescale' ] , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_ppi ()        ]  ) ,
+            #
+            StrippingLine (
+            "Lb2PsiPKPiPiFor"  + self.name()                 ,
+            prescale        = self [ 'Lb2PsiPKPiPiPrescale' ] , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_pKpipi ()      ]  ) ,
+            #
+            #
+            StrippingLine (
+            "Lb2PsiPPiPiPiFor"  + self.name()                 ,
+            prescale        = self [ 'Lb2PsiPPiPiPiPrescale' ] , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_ppipipi ()       ]  ) ,
+            #
+            StrippingLine (
+            "Xib2PsiPKKFor"  + self.name()                  ,
+            prescale        = self [ 'Xib2PsiPKKPrescale' ] , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_pKK   ()      ]  ) ,
+            #            
+            StrippingLine (
+            "Xib2PsiPKKpiFor"  + self.name()                  ,
+            prescale        = self [ 'Xib2PsiPKKpiPrescale' ] , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_pKKpi ()      ]  ) ,
+            #
+            StrippingLine (
+            "Omegab2PsiPKKKpiFor"  + self.name()                  ,
+            prescale        = self [ 'Omegab2PsiPKKKpiPrescale' ] , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_pKKKpi ()      ]  ) ,
+            #
+            ## two protons
+            #
+            StrippingLine (
+            "B2PsiPPFor"    + self.name()                 ,
+            prescale        = self [ 'B2PsiPPPrescale' ]  , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_pp ()       ]  ) ,
+            #
+            StrippingLine (
+            "B2PsiPPPiFor"  + self.name()                 ,
+            prescale        = self [ 'B2PsiPPPiPrescale' ]  , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_pppi ()       ]  ) ,
+            #
+            StrippingLine (
+            "B2PsiPPKFor"  + self.name()                 ,
+            prescale        = self [ 'B2PsiPPKPrescale' ]  , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_ppK ()       ]  ) ,
+            #
+            StrippingLine (
+            "B2PsiPPPiPiFor"  + self.name()                 ,
+            prescale        = self [ 'B2PsiPPPiPiPrescale' ]  , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_pppipi ()       ]  ) ,
+            #
+            StrippingLine (
+            "B2PsiPPKPiPiFor"  + self.name()                 ,
+            prescale        = self [ 'B2PsiPPKPiPiPrescale' ]  , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_ppKpipi ()       ]  ) ,
+            #
+            StrippingLine (
+            "B2PsiPPPiPiPiFor"  + self.name()                 ,
+            prescale        = self [ 'B2PsiPPPiPiPiPrescale' ]  , 
+            checkPV         = self [ 'CheckPV' ]          ,
+            FILTER          = self [ 'FILTER'  ]          ,
+            ODIN            = self [ 'ODIN'    ]          ,
+            L0DU            = self [ 'L0DU'    ]          ,
+            HLT             = self [ 'L0DU'    ]          ,
+            algos           = [ self.psi_pppipipi ()       ]  ) 
+            #            
+            ]
+            ## 
+        return self._add_selection ( 'PsiX_Lines' , sel ) 
+    
+    ## get the selections
+    def _selections_private ( self ) :
+        
+        sel = self._selection ( 'Selections' )
+        if sel : return sel
+        
+        sel =  [
+            ## basic 
+            self.muons        () ,
+            self.pions        () ,
+            self.kaons        () ,
+            self.protons      () ,
+            ## composite
+            self.psi          () ,
+            ## beauty 
+            self.psi_pi       () ,
+            self.psi_K        () ,
+            #
+            self.psi_2pi      () ,
+            self.psi_2Kpi     () ,
+            self.psi_2K       () ,
+            ## 
+            self.psi_3pi      () ,
+            self.psi_3K       () ,
+            self.psi_3Kpi     () ,
+            ##
+            self.psi_4pi      () ,
+            self.psi_4Kpi     () ,
+            self.psi_4K       () ,
+            ##
+            self.psi_5pi      () ,
+            self.psi_5Kpi     () ,
+            self.psi_5K       () ,
+            ##
+            self.psi_6pi      () ,
+            self.psi_6Kpi     () ,
+            ##
+            self.psi_7pi      () ,
+            self.psi_7Kpi     () ,
+            ##
+            self.psi_pK       () ,
+            self.psi_ppi      () ,
+            self.psi_pKpipi   () ,
+            self.psi_ppipipi  () ,
+            ##
+            self.psi_pKK      () ,
+            self.psi_pKKpi    () ,
+            self.psi_pKKKpi   () ,
+            ## 
+            self.psi_pp       () ,
+            self.psi_pppi     () ,
+            self.psi_ppK      () ,
+            self.psi_pppipi   () ,
+            self.psi_ppKpipi  () ,
+            self.psi_pppipipi () ,
+            ]
+        
+        return self._add_selection ( 'Selections' , sel )
+    
+    # =========================================================================
+    ## pure technical method for creation of selections
+    # =========================================================================
+    def make_selection ( self      ,
+                         tag       , 
+                         algotype  ,
+                         inputs    , 
+                         *args     ,
+                         **kwargs  ) :
+        """
+        Technical method for creation of 1-step selections 
+        """
+        sel_tag  = '%s_Selection' % tag
+        sel_name = 'Sel%sFor%s'   % ( tag , self.name() )
+        #
+        ## check existing selection
+        #
+        sel      = self._selection ( sel_tag )
+        if sel : return sel 
+
+        #
+        ## adjust a bit the arguments
+        if not kwargs.has_key('Preambulo')           :
+            kwargs ['Preambulo'        ] = self['Preambulo']
+
+        if not kwargs.has_key ( 'ParticleCombiners' ) :
+            kwargs ['ParticleCombiners'] = { '' : 'LoKi::VertexFitter:PUBLIC' } 
+                          
+        # 
+        ## use "simple-selection"
+        #
+        from PhysSelPython.Wrappers import SimpleSelection
+        sel = SimpleSelection (
+            sel_name ,
+            algotype ,
+            inputs   , 
+            *args    ,
+            **kwargs )
+        # 
+        return self._add_selection( sel_tag , sel ) 
+        
+    ## muons 
+    def muons     ( self ) :    
+        from StandardParticles import StdLooseMuons
+        return StdLooseMuons
+    
+    # ========================================================================
+    ## pions :
+    # ========================================================================
+    def pions    ( self ) :
+        """
+        Pions for   B -> psi X lines 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        ##
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdAllNoPIDsPions as inpts
+            pioncut = self['PionCut']
+        else                    :
+            from StandardParticles import StdAllLooseANNPions as inpts
+            pioncut = "(%s)&(%s)" % ( self['PionCut'] , self['PionPIDCut'] ) 
+        ##
+        return self.make_selection (
+            'Pion'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = pioncut         ,
+            )
+    
+    # ========================================================================
+    ## kaons :
+    # ========================================================================
+    def kaons     ( self ) :
+        """
+        Kaons for   B -> psi X lines 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        ## 
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdAllNoPIDsKaons as inpts
+            kaoncut = self['KaonCut']
+        else                    :
+            from StandardParticles import StdAllLooseANNKaons as inpts 
+            kaoncut = "(%s)&(%s)" % ( self['KaonCut'] , self['KaonPIDCut'] ) 
+        #
+        ##
+        return self.make_selection (
+            'Kaon'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = kaoncut         ,
+            )
+
+    # ========================================================================
+    ## protons
+    # ========================================================================
+    def protons    ( self ) :
+        """
+        protons for   B -> psi X lines 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdAllNoPIDsProtons as inpts
+            protoncut = self['ProtonCut']
+        else                    :
+            from StandardParticles import StdAllLooseANNProtons as inpts 
+            protoncut = "(%s)&(%s)" % ( self['ProtonCut'] , self['ProtonPIDCut'] ) 
+        ##
+        return self.make_selection (
+            'Proton'                 ,
+            FilterDesktop            ,
+            [ inpts ]                ,
+            Code = protoncut         ,
+            )
+
+    # =========================================================================
+    ## psi(') -> mu+ mu-
+    # =========================================================================
+    def psi ( self ) :
+        """
+        psi(') -> mu+ mu- 
+        """
+        psi_name = 'Psi'
+        sel_name = 'Sel%sFor%s' % ( psi_name , self.name() )
+        sel_tag  = '%s_Selection'
+        sel      = self._selection ( sel_tag ) 
+        if sel  : return sel 
+        
+        dimu_lines = self['DIMUONLINES']
+        if not dimu_lines :
+            ## 
+            from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+            ##
+            return self.make_selection (
+                psi_name         ,
+                CombineParticles ,
+                [ self.muons() ] ,
+                ## 
+                DecayDescriptor = " J/psi(1S) -> mu+ mu- " ,
+                ##
+                DaughtersCuts   = {
+                'mu+'   :  self [ 'MuonCut' ] 
+                } ,
+                ## 
+                CombinationCut  = """
+                ( ADAMASS  ( 'J/psi(1S)' ) < 120 * MeV ) | 
+                ( ADAMASS  (   'psi(2S)' ) < 120 * MeV ) 
+                """ ,
+                ##
+                MotherCut       = """
+                chi2vx < 20
+                """ 
+                )
+
+        ## list of lines 
+        from PhysSelPython.Wrappers import AutomaticData 
+        if 1 < len( dimu_lines ) :
+            lines = [ AutomaticData ( l ) for l in dimu_lines ] 
+            from PhysSelPython.Wrappers import MergedSelection
+            sel = MergedSelection ( sel_name , RequiredSelections = lines ) 
+            return self._add_selection ( sel_tag , sel ) 
+
+        ## single line  
+        dimu_line = dimu_lines[0]
+        sel = AutomaticData ( dimu_line ) 
+        return self._add_selection ( sel_tag , sel ) 
+        
+    # =========================================================================
+    # B -> psi(') K
+    # =========================================================================
+    def psi_K ( self ) :
+        """
+        B -> psi(') K
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        return self.make_selection (
+            ## the unique tag 
+            'PsiK'                        ,
+            ## algorithm type to be used 
+            CombineParticles              ,
+            ## input selections 
+            [ self.psi() , self.kaons() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) K+ ]cc" ,
+            ##
+            CombinationCut  = " mbu_acut | mbc_acut "    ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+    
+    # =========================================================================
+    ## B -> psi(') pi
+    # =========================================================================
+    def psi_pi ( self ) :
+        """
+        B -> psi(') pi 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ##
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPi'                       ,
+            ## algorithm type to be used 
+            CombineParticles              ,
+            ## input selections 
+            [ self.psi() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) pi+ ]cc"  ,
+            ##
+            CombinationCut  = " mbu_acut | mbc_acut "     ,
+            ## 
+            MotherCut       = self._chargedB() 
+            ##
+            )    
+    
+    # =========================================================================
+    # B -> psi(') K+ K- 
+    # =========================================================================
+    def psi_2K ( self ) :
+        """
+        B -> psi(') K+ K-
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi2K'                       ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = " B0 -> J/psi(1S) K+ K- " ,
+            ##
+            Combination12Cut = """ ( AM < mb0_ahigh )   &
+            ( ACHI2DOCA(1,2) < 20 )  
+            """  , 
+            CombinationCut   = """        mb0_acut      &
+            ( ACHI2DOCA(1,3) < 20 ) &
+            ( ACHI2DOCA(2,3) < 20 ) 
+            """  ,
+            ## 
+            MotherCut       = self._neutralB() 
+            )
+    
+    # =========================================================================
+    # B -> psi(') K+ pi- 
+    # =========================================================================
+    def psi_2Kpi ( self ) :
+        """
+        B -> psi(') K+ K-
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi2KPi'                     ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[ B0 -> J/psi(1S) K+ pi-]cc" ,
+            ##
+            Combination12Cut = """ ( AM < mb0_ahigh )  &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """  , 
+            CombinationCut   = """        mb0_acut     &
+            ( ACHI2DOCA(1,3) <  20 ) &   
+            ( ACHI2DOCA(2,3) <  20 )   
+            """   ,
+            ## 
+            MotherCut       = self._neutralB() 
+            )
+    
+    # =========================================================================
+    # B -> psi(') pi+ pi- 
+    # =========================================================================
+    def psi_2pi ( self ) :
+        """
+        B -> psi(') pi+ pi-
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi2Pi'                      ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B0 -> J/psi(1S) pi+ pi-"  ,
+            ##
+            Combination12Cut = """ ( AM < mb0_ahigh )  &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """  , 
+            CombinationCut   = """        mb0_acut     &
+            ( ACHI2DOCA(1,3) <  20 ) &   
+            ( ACHI2DOCA(2,3) <  20 )   
+            """   ,
+            ## 
+            MotherCut       = self._neutralB() 
+            )
+
+    # ========================================================================
+    # B -> psi(') 3K
+    # ========================================================================
+    def psi_3K ( self ) :
+        """
+        B -> psi(') 3K        
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi3K'                       ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) K+ K+ K-]cc"  ,
+            ##
+            Combination12Cut = """  ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &  
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            CombinationCut   = """  ( mbp_acut | mbc_acut ) &
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+
+    # ========================================================================
+    # B -> psi(') 3Kpi
+    # ========================================================================
+    def psi_3Kpi ( self ) :
+        """
+        B -> psi(') 3Kpi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi3KPi'                     ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons () , self.pions () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptors = [
+            "[B+ -> J/psi(1S) K+ pi+ pi-]cc" ,
+            "[B+ -> J/psi(1S) K+ K-  pi+]cc" ,
+            "[B+ -> J/psi(1S) K- pi+ pi+]cc"  ## ATTENTION: wrong charge combination!!!
+            ],
+            ##
+            Combination12Cut = """  ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            CombinationCut   = """  ( mbp_acut | mbc_acut ) &
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+
+
+    # ========================================================================
+    # B -> psi(') 3pi
+    # ========================================================================
+    def psi_3pi ( self ) :
+        """
+        B -> psi(') 3pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi3Pi'                      ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) pi+ pi+ pi-]cc" ,
+            ##
+            Combination12Cut = """  ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            CombinationCut   = """  ( mbp_acut | mbc_acut ) &
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+
+
+
+    # ========================================================================
+    # B -> psi(') 4K
+    # ========================================================================
+    def psi_4K ( self ) :
+        """
+        B -> psi(') 4K
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N5BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi4k'                       ,
+            ## algorithm type to be used
+            DaVinci__N5BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor    = "B_s0 -> J/psi(1S) K+ K+ K- K-"  ,
+            ##
+            Combination12Cut   = """ ( AM < mb0_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut  = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            Combination1234Cut = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ , 
+            CombinationCut   = """  mb0_acut  &
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._neutralB() 
+            )
+
+    # ========================================================================
+    # B -> psi(') 4Kpi
+    # ========================================================================
+    def psi_4Kpi ( self ) :
+        """
+        B -> psi(') 4Kpi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N5BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi4KPi'                     ,
+            ## algorithm type to be used
+            DaVinci__N5BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons () , self.pions () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptors = [
+            "[B0 -> J/psi(1S) K+ pi+ pi- pi-]cc" ,
+            " B0 -> J/psi(1S) K+ pi+ K-  pi-   " ,
+            "[B0 -> J/psi(1S) K+ K+  K-  pi-]cc" ,
+            ],
+            ##
+            Combination12Cut  = """  ( AM < mb0_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut  = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            Combination1234Cut = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ , 
+            CombinationCut   = """  mb0_acut  &
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._neutralB() 
+            )
+
+    # ========================================================================
+    # B -> psi(') 4pi
+    # ========================================================================
+    def psi_4pi ( self ) :
+        """
+        B -> psi(') 4pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N5BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi4Pi'                      ,
+            ## algorithm type to be used
+            DaVinci__N5BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor   = "B0 -> J/psi(1S) pi+ pi+ pi- pi-" ,
+            ##
+            Combination12Cut  = """  ( AM < mb0_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut  = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) & 
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ ,            
+            Combination1234Cut = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) & 
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,
+            CombinationCut   = """  mb0_acut &
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) & 
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._neutralB() 
+            )
+
+
+    # ========================================================================
+    # B -> psi(') 5K
+    # ========================================================================
+    def psi_5K ( self ) :
+        """
+        B -> psi(') 5K        
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N6BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi5K'                       ,
+            ## algorithm type to be used
+            DaVinci__N6BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B_c+ -> J/psi(1S) K+ K+ K+ K- K-]cc"  ,
+            ##
+            Combination12Cut = """  ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &  
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            Combination1234Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) &  
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,            
+            Combination12345Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,5) <  20 ) &  
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &  
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ ,
+            CombinationCut   = """  ( mbp_acut | mbc_acut ) &
+            ( ACHI2DOCA(1,6) <  20 ) &  
+            ( ACHI2DOCA(2,6) <  20 ) &
+            ( ACHI2DOCA(3,6) <  20 ) &  
+            ( ACHI2DOCA(4,6) <  20 ) &
+            ( ACHI2DOCA(5,6) <  20 ) 
+            """ ,
+            ##
+            MotherCut       = self._chargedB() 
+            )
+
+    # ========================================================================
+    # B -> psi(') 5Kpi
+    # ========================================================================
+    def psi_5Kpi ( self ) :
+        """
+        B -> psi(') 5Kpi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N6BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi5KPi'                     ,
+            ## algorithm type to be used
+            DaVinci__N6BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons () , self.pions () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptors = [
+            "[B+ -> J/psi(1S) K+ pi+ pi+ pi- pi-]cc" ,
+            "[B+ -> J/psi(1S) K+ pi+ pi+ K-  pi-]cc" ,
+            "[B+ -> J/psi(1S) K+ K+  pi+ K-  pi-]cc" ,
+            "[B+ -> J/psi(1S) K+ K+  pi+ K-  K- ]cc" 
+            ],
+            ##
+            Combination12Cut = """  ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &  
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            Combination1234Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) &  
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,            
+            Combination12345Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,5) <  20 ) &  
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &  
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ ,
+            CombinationCut   = """  ( mbp_acut | mbc_acut ) &
+            ( ACHI2DOCA(1,6) <  20 ) &  
+            ( ACHI2DOCA(2,6) <  20 ) &
+            ( ACHI2DOCA(3,6) <  20 ) &  
+            ( ACHI2DOCA(4,6) <  20 ) &
+            ( ACHI2DOCA(5,6) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+
+
+
+    # ========================================================================
+    # B -> psi(') 5pi
+    # ========================================================================
+    def psi_5pi ( self ) :
+        """
+        B -> psi(') 5pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N6BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi5Pi'                      ,
+            ## algorithm type to be used
+            DaVinci__N6BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) pi+ pi+ pi+ pi- pi-]cc" ,
+            ##
+            ##
+            Combination12Cut = """  ( AM < mbc_ahigh )    &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut = """ ( AM < mbc_ahigh )    & 
+            ( ACHI2DOCA(1,3) <  20 ) &  
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            Combination1234Cut = """ ( AM < mbc_ahigh )    & 
+            ( ACHI2DOCA(1,4) <  20 ) &  
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,            
+            Combination12345Cut = """ ( AM < mbc_ahigh )    & 
+            ( ACHI2DOCA(1,5) <  20 ) &  
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &  
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ ,
+            CombinationCut   = """  ( mbp_acut | mbc_acut ) &
+            ( ACHI2DOCA(1,6) <  20 ) &  
+            ( ACHI2DOCA(2,6) <  20 ) &
+            ( ACHI2DOCA(3,6) <  20 ) &  
+            ( ACHI2DOCA(4,6) <  20 ) &
+            ( ACHI2DOCA(5,6) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+
+    
+    # ========================================================================
+    # B -> psi(') 6K
+    # ========================================================================
+    
+    # ========================================================================
+    # B -> psi(') 6Kpi
+    # ========================================================================
+    def psi_6Kpi ( self ) :
+        """
+        B -> psi(') 6Kpi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N7BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi6KPi'                     ,
+            ## algorithm type to be used
+            DaVinci__N7BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons () , self.pions () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptors = [
+            "[B0 -> J/psi(1S) K+ pi+ pi+ pi- pi- pi-]cc" ,
+            " B0 -> J/psi(1S) K+ pi+ pi+ K-  pi- pi-   " ,
+            "[B0 -> J/psi(1S) K+ K+  pi+ K-  pi- pi-]cc" ,
+            " B0 -> J/psi(1S) K+ K+  pi+ K-  K-  pi-   " ,
+            ],
+            ##
+            Combination12Cut     = """  ( AM < mb0_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut    = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            Combination1234Cut   = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ , 
+            Combination12345Cut  = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ , 
+            Combination123456Cut = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,6) <  20 ) &
+            ( ACHI2DOCA(2,6) <  20 ) &
+            ( ACHI2DOCA(3,6) <  20 ) & 
+            ( ACHI2DOCA(4,6) <  20 ) &
+            ( ACHI2DOCA(5,6) <  20 ) 
+            """ , 
+            CombinationCut   = """  mb0_acut  &
+            ( ACHI2DOCA(1,7) <  20 ) &
+            ( ACHI2DOCA(2,7) <  20 ) &
+            ( ACHI2DOCA(3,7) <  20 ) &
+            ( ACHI2DOCA(4,7) <  20 ) &
+            ( ACHI2DOCA(5,7) <  20 ) &
+            ( ACHI2DOCA(6,7) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._neutralB() 
+            )
+
+    # ========================================================================
+    # B -> psi(') 6pi
+    # ========================================================================
+    def psi_6pi ( self ) :
+        """
+        B -> psi(') 6pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N7BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi6Pi'                      ,
+            ## algorithm type to be used
+            DaVinci__N7BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor   = "B0 -> J/psi(1S) pi+ pi+ pi+ pi- pi- pi-" ,
+            ##
+            Combination12Cut  = """  ( AM < mb0_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut  = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) & 
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ ,            
+            Combination1234Cut = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) & 
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,
+            Combination12345Cut = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,5) <  20 ) & 
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ ,
+            Combination123456Cut = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,6) <  20 ) & 
+            ( ACHI2DOCA(2,6) <  20 ) &
+            ( ACHI2DOCA(3,6) <  20 ) &
+            ( ACHI2DOCA(4,6) <  20 ) &
+            ( ACHI2DOCA(5,6) <  20 ) 
+            """ ,
+            CombinationCut   = """  mb0_acut &
+            ( ACHI2DOCA(1,7) <  20 ) & 
+            ( ACHI2DOCA(2,7) <  20 ) &
+            ( ACHI2DOCA(3,7) <  20 ) &
+            ( ACHI2DOCA(4,7) <  20 ) &
+            ( ACHI2DOCA(5,7) <  20 ) & 
+            ( ACHI2DOCA(6,7) <  20 )
+            """ ,
+            ## 
+            MotherCut       = self._neutralB() 
+            )
+
+
+
+    # ========================================================================
+    # B -> psi(') 7Kpi
+    # ========================================================================
+    def psi_7Kpi ( self ) :
+        """
+        B -> psi(') 6Kpi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N8BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi7KPi'                     ,
+            ## algorithm type to be used
+            DaVinci__N8BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.kaons () , self.pions () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptors = [
+            "[B_c+ -> J/psi(1S) K+ pi+ pi+ pi+ pi- pi- pi-]cc" , ## 1K
+            "[B_c+ -> J/psi(1S) K+ pi+ pi+ pi+  K- pi- pi-]cc" , ## 2K
+            "[B_c+ -> J/psi(1S) K+ K+  pi+ pi+  K- pi- pi-]cc" , ## 3K
+            "[B_c+ -> J/psi(1S) K+ K+  pi+ pi+  K-  K- pi-]cc" , ## 4K 
+            "[B_c+ -> J/psi(1S) K+ K+  K+  pi+  K-  K- pi-]cc" , ## 5K 
+            "[B_c+ -> J/psi(1S) K+ K+  K+  pi+  K-  K-  K-]cc" , ## 6K
+            ],
+            ##
+            Combination12Cut     = """ ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut    = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            Combination1234Cut   = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ , 
+            Combination12345Cut  = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ , 
+            Combination123456Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,6) <  20 ) &
+            ( ACHI2DOCA(2,6) <  20 ) &
+            ( ACHI2DOCA(3,6) <  20 ) & 
+            ( ACHI2DOCA(4,6) <  20 ) &
+            ( ACHI2DOCA(5,6) <  20 ) 
+            """ , 
+            Combination1234567Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,7) <  20 ) &
+            ( ACHI2DOCA(2,7) <  20 ) &
+            ( ACHI2DOCA(3,7) <  20 ) & 
+            ( ACHI2DOCA(4,7) <  20 ) &
+            ( ACHI2DOCA(5,7) <  20 ) &
+            ( ACHI2DOCA(6,7) <  20 ) 
+            """ , 
+            CombinationCut   = """  mbc_acut  &
+            ( ACHI2DOCA(1,8) <  20 ) &
+            ( ACHI2DOCA(2,8) <  20 ) &
+            ( ACHI2DOCA(3,8) <  20 ) &
+            ( ACHI2DOCA(4,8) <  20 ) &
+            ( ACHI2DOCA(5,8) <  20 ) &
+            ( ACHI2DOCA(6,8) <  20 ) &
+            ( ACHI2DOCA(7,8) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+
+
+    # ========================================================================
+    # B -> psi(') 7pi
+    # ========================================================================
+    def psi_7pi ( self ) :
+        """
+        B -> psi(') 7pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N8BodyDecays
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'Psi7Pi'                      ,
+            ## algorithm type to be used
+            DaVinci__N8BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.pions () ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor   = "[B_c+ -> J/psi(1S) pi+ pi+ pi+ pi+ pi- pi- pi-]cc" ,
+            ##
+            Combination12Cut  = """  ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut  = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) & 
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ ,            
+            Combination1234Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) & 
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,
+            Combination12345Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,5) <  20 ) & 
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ ,
+            Combination123456Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,6) <  20 ) & 
+            ( ACHI2DOCA(2,6) <  20 ) &
+            ( ACHI2DOCA(3,6) <  20 ) &
+            ( ACHI2DOCA(4,6) <  20 ) &
+            ( ACHI2DOCA(5,6) <  20 ) 
+            """ ,
+            Combination1234567Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,7) <  20 ) & 
+            ( ACHI2DOCA(2,7) <  20 ) &
+            ( ACHI2DOCA(3,7) <  20 ) &
+            ( ACHI2DOCA(4,7) <  20 ) &
+            ( ACHI2DOCA(5,7) <  20 ) &
+            ( ACHI2DOCA(6,7) <  20 ) 
+            """ ,
+            CombinationCut   = """  mbc_acut &
+            ( ACHI2DOCA(1,8) <  20 ) & 
+            ( ACHI2DOCA(2,8) <  20 ) &
+            ( ACHI2DOCA(3,8) <  20 ) &
+            ( ACHI2DOCA(4,8) <  20 ) &
+            ( ACHI2DOCA(5,8) <  20 ) & 
+            ( ACHI2DOCA(6,8) <  20 ) & 
+            ( ACHI2DOCA(7,8) <  20 )
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+
+
+    # ===========================================================================
+    # make use of protons 
+    # =========================================================================
+    
+    # =========================================================================
+    # Lb -> psi(') pK
+    # =========================================================================
+    def psi_pK ( self ) :
+        """
+        Lb -> psi(') pK
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPK'                      ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.kaons() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[Lambda_b0 -> J/psi(1S) p+ K-]cc" ,
+            ##
+            Combination12Cut = """ ( AM < mlb_ahigh )  &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """  , 
+            CombinationCut   = """        mlb_acut     &
+            ( ACHI2DOCA(1,3) <  20 ) &   
+            ( ACHI2DOCA(2,3) <  20 )   
+            """   ,
+            ##
+            MotherCut       = self._lambdaB() 
+            )
+
+    # =========================================================================
+    # Lb -> psi(') ppi
+    # =========================================================================
+    def psi_ppi ( self ) :
+        """
+        Lb -> psi(') p pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPPi'                      ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[Lambda_b0 -> J/psi(1S) p+ pi-]cc" ,
+            ##
+            Combination12Cut = """ ( AM < mlb_ahigh )  &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """  , 
+            CombinationCut   = """        mlb_acut     &
+            ( ACHI2DOCA(1,3) <  20 ) &   
+            ( ACHI2DOCA(2,3) <  20 )   
+            """   ,
+            ## 
+            MotherCut       = self._lambdaB() 
+            )
+
+    # =========================================================================
+    # Lb -> psi(') pK pipi
+    # =========================================================================
+    def psi_pKpipi ( self ) :
+        """
+        Lb -> psi(') pK pi pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N5BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPKpipi'                   ,
+            ## algorithm type to be used
+            DaVinci__N5BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.kaons() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor    = "[Lambda_b0 -> J/psi(1S) p+ K- pi+ pi- ]cc" ,
+            ##
+            Combination12Cut   = """ ( AM < mlb_ahigh )  &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """  , 
+            Combination123Cut  = """ ( AM < mlb_ahigh )  &
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """  , 
+            Combination1234Cut = """ ( AM < mlb_ahigh )  &
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """  , 
+            CombinationCut   = """        mlb_acut       &
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """   ,
+            ## 
+            MotherCut       = self._lambdaB() 
+            )
+
+
+    # =========================================================================
+    ## Xi_b- -> psi(') pKK
+    #  new signal observed by Antol Poluektov
+    #  @see https://indico.cern.ch/event/350830/
+    def psi_pKK ( self ) :
+        """
+        Xib -> psi(') pKK
+        The signal observed by Anton Polurkotov
+        see https://indico.cern.ch/event/350830/
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPKK'                   ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.kaons() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptors   = [
+            "[Xi_b- -> J/psi(1S) p+ K- K- ]cc" ,
+            "[Xi_b- -> J/psi(1S) p+ K- K+ ]cc" , ## and wrong sign also
+            ] , 
+            ##
+            Combination12Cut   = """ ( AM < mxb_ahigh )  &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """  , 
+            Combination123Cut  = """ ( AM < mxb_ahigh )  &
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """  , 
+            CombinationCut   = """          mxb_acut     &
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """   ,
+            ## 
+            MotherCut       = self._xiB() 
+            )
+
+    # =========================================================================
+    ## Xi_b0 -> psi(') pKKpi
+    def psi_pKKpi ( self ) :
+        """
+        Xib0 -> psi(') pKK pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N5BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPKKpi'                   ,
+            ## algorithm type to be used
+            DaVinci__N5BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.kaons() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptors   = [
+            "[Xi_b0 -> J/psi(1S) p+ K- K- pi+ ]cc" ,
+            "[Xi_b0 -> J/psi(1S) p+ K- K+ pi+ ]cc" , ## and wrong sign also
+            "[Xi_b0 -> J/psi(1S) p+ K- K+ pi- ]cc" , ## and wrong sign also
+            ] , 
+            ##
+            Combination12Cut   = """ ( AM < mxb_ahigh )  &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """  , 
+            Combination123Cut  = """ ( AM < mxb_ahigh )  &
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """  , 
+            Combination1234Cut = """ ( AM < mxb_ahigh )  &
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """  , 
+            CombinationCut   = """          mxb_acut     &
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """   ,
+            ## 
+            MotherCut       = self._xiB() 
+            )
+
+    # =========================================================================
+    ## Omega_b- -> psi(') pKKKpi
+    def psi_pKKKpi ( self ) :
+        """
+        Omega_b0 -> psi(') pKKK pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N6BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPKKKpi'                   ,
+            ## algorithm type to be used
+            DaVinci__N6BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.kaons() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptors   = [
+            "[Omega_b- -> J/psi(1S) p+ K- K- K- pi+ ]cc" ,
+            "[Omega_b- -> J/psi(1S) p+ K- K- K+ pi- ]cc" , ## wrong sign 
+            ] ,
+            ##
+            Combination12Cut   = """ ( AM < mxb_ahigh )  &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """  , 
+            Combination123Cut  = """ ( AM < mxb_ahigh )  &
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """  , 
+            Combination1234Cut = """ ( AM < mxb_ahigh )  &
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """  , 
+            Combination12345Cut = """ ( AM < mxb_ahigh )  &
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """   ,
+            CombinationCut   = """          mxb_acut     &
+            ( ACHI2DOCA(1,6) <  20 ) &
+            ( ACHI2DOCA(2,6) <  20 ) &
+            ( ACHI2DOCA(3,6) <  20 ) &
+            ( ACHI2DOCA(4,6) <  20 ) &
+            ( ACHI2DOCA(5,6) <  20 ) 
+            """   ,
+            ## 
+            MotherCut       = self._xiB() 
+            )
+    
+    # =========================================================================
+    # Lb -> psi(') p pipipi
+    # =========================================================================
+    def psi_ppipipi ( self ) :
+        """
+        Lb -> psi(') p pipipi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N5BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPpipipi'                  ,
+            ## algorithm type to be used
+            DaVinci__N5BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor    = "[Lambda_b0 -> J/psi(1S) p+ pi+ pi- pi- ]cc" ,
+            ##
+            Combination12Cut   = """ ( AM < mlb_ahigh )  &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """  , 
+            Combination123Cut  = """ ( AM < mlb_ahigh )  &
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """  , 
+            Combination1234Cut = """ ( AM < mlb_ahigh )  &
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """  , 
+            CombinationCut   = """        mlb_acut       &
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """   ,
+            ## 
+            MotherCut       = self._lambdaB() 
+            )
+    
+    
+    # =========================================================================
+    # B -> psi(') pp
+    # =========================================================================    
+    def psi_pp ( self ) :
+        """
+        B -> psi(') pp
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPP'                       ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B_s0 -> J/psi(1S) p+ p~-" ,
+            ##
+            Combination12Cut = """ ( AM < mlb_ahigh )  &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """  , 
+            CombinationCut   = """        mlb_acut     &
+            ( ACHI2DOCA(1,3) <  20 ) &   
+            ( ACHI2DOCA(2,3) <  20 )   
+            """   ,
+            ## 
+            MotherCut       = self._neutralB() 
+            )
+    
+    # =========================================================================
+    # B -> psi(') pp pi
+    # =========================================================================    
+    def psi_pppi( self ) :
+        """
+        B -> psi(') pp pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPPpi'                     ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) p+ p~- pi+]cc" ,
+            ##
+            Combination12Cut = """  ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            CombinationCut   = """  ( mbp_acut | mbc_acut ) &
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+
+    # =========================================================================
+    # B -> psi(') pp pi
+    # =========================================================================    
+    def psi_ppK( self ) :
+        """
+        B -> psi(') pp K
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPPK'                   ,
+            ## algorithm type to be used
+            DaVinci__N4BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.kaons() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) p+ p~- K+]cc" ,
+            ##
+            Combination12Cut = """  ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            CombinationCut   = """  ( mbp_acut | mbc_acut ) &
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+
+
+    # =========================================================================
+    # B -> psi(') pp pipi
+    # =========================================================================    
+    def psi_pppipi( self ) :
+        """
+        B -> psi(') pp pi pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N5BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPPpipi'                   ,
+            ## algorithm type to be used
+            DaVinci__N5BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "B_s0 -> J/psi(1S) p+ p~- pi+ pi-" ,
+            ##
+            Combination12Cut  = """  ( AM < mb0_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut  = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) & 
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ ,            
+            Combination1234Cut = """ ( AM < mb0_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) & 
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ ,
+            CombinationCut   = """  mb0_acut &
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) & 
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._neutralB() 
+            )
+
+
+    # =========================================================================
+    # B -> psi(') pp pipipi
+    # =========================================================================    
+    def psi_pppipipi( self ) :
+        """
+        B -> psi(') pp pi pi pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N6BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPPpipipi'                     ,
+            ## algorithm type to be used
+            DaVinci__N6BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor = "[B+ -> J/psi(1S) p+ p~- pi+ pi+ pi-]cc" ,
+            ##
+            Combination12Cut = """  ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            Combination1234Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ , 
+            Combination12345Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ , 
+            CombinationCut   = """  ( mbp_acut | mbc_acut ) &
+            ( ACHI2DOCA(1,6) <  20 ) &
+            ( ACHI2DOCA(2,6) <  20 ) &
+            ( ACHI2DOCA(3,6) <  20 ) &
+            ( ACHI2DOCA(4,6) <  20 ) &
+            ( ACHI2DOCA(5,6) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+
+    # =========================================================================
+    # B -> psi(') pp Kpipi
+    # =========================================================================    
+    def psi_ppKpipi( self ) :
+        """
+        B -> psi(') pp K pi pi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N6BodyDecays 
+        return self.make_selection (
+            ## the unique tag 
+            'PsiPPKpipi'                  ,
+            ## algorithm type to be used
+            DaVinci__N6BodyDecays         ,
+            ## input selections 
+            [ self.psi() , self.protons() , self.kaons() , self.pions() ] ,
+            #
+            ## algorithm configuration
+            #
+            DecayDescriptor  = "[B+ -> J/psi(1S) p+ p~- K+ pi+ pi-]cc" ,
+            ##
+            Combination12Cut = """  ( AM < mbc_ahigh )      &
+            ( ACHI2DOCA(1,2) <  20 ) 
+            """ , 
+            Combination123Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,3) <  20 ) &
+            ( ACHI2DOCA(2,3) <  20 ) 
+            """ , 
+            Combination1234Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,4) <  20 ) &
+            ( ACHI2DOCA(2,4) <  20 ) &
+            ( ACHI2DOCA(3,4) <  20 ) 
+            """ , 
+            Combination12345Cut = """ ( AM < mbc_ahigh )      & 
+            ( ACHI2DOCA(1,5) <  20 ) &
+            ( ACHI2DOCA(2,5) <  20 ) &
+            ( ACHI2DOCA(3,5) <  20 ) &
+            ( ACHI2DOCA(4,5) <  20 ) 
+            """ ,
+            CombinationCut   = """  ( mbp_acut | mbc_acut ) &
+            ( ACHI2DOCA(1,6) <  20 ) &
+            ( ACHI2DOCA(2,6) <  20 ) &
+            ( ACHI2DOCA(3,6) <  20 ) &
+            ( ACHI2DOCA(4,6) <  20 ) &
+            ( ACHI2DOCA(5,6) <  20 ) 
+            """ ,
+            ## 
+            MotherCut       = self._chargedB() 
+            )
+    
+    
+    # =========================================================================
+    ## merged few basic B-hadrons: B+ , B- & Bs 
+    # =========================================================================
+    def beauty ( self ) :
+        """
+        Merged selection of B-, B+ & Bs  
+        """
+        sel = self._selection ( 'Beauty_Selection')
+        if sel : return sel
+        
+        from PhysSelPython.Wrappers import MergedSelection
+        sel = MergedSelection (
+            'SelBeautyFor' + self.name() ,
+            RequiredSelections = [ self.psi_K    () ,  ## B+
+                                   self.psi_2Kpi () ,  ## B0 
+                                   self.psi_2K   () ,  ## B_s0 
+                                   self.psi_3K   () ,  ## B+ 
+                                   self.psi_3Kpi () ]  ## B+ 
+            )
+        #
+        return self._add_selection ( 'Beauty_Selection' , sel )
+        
+# =============================================================================
+if '__main__' == __name__ :
+
+    logger.info ( 80*'*'  ) 
+    logger.info (  __doc__ ) 
+    logger.info ( ' Author :  %s' % __author__ ) 
+    logger.info ( ' Date   :  %s' % __date__   )
+    ##
+    clines = set() 
+    logger.info ( ' Lines declared in default_config["STREAMS"] are' )
+    for stream in default_config['STREAMS'] :
+        lines = default_config['STREAMS'][stream] 
+        for l in lines :
+            logger.info ( ' %-15s : %-50s ' % ( stream , l ) )
+            clines.add ( l )
+    ##
+    logger.info ( ' The output locations for the default configuration: ' )
+    ##
+    _conf = PsiX_BQ_Conf ( 'PsiX' , 
+                           config = default_config['CONFIG']  )
+    ##
+    _ln   = ' ' + 61*'-' + '+' + 30*'-'
+    logger.info ( _ln ) 
+    logger.info ( '  %-60s| %-30s  ' % ( 'Output location', 'Stripping line name' ) ) 
+    logger.info ( _ln )
+    for l in _conf.lines() :
+        lout  = l.outputLocation()
+        lname = l.name() 
+        logger.info ( '  %-60s| %-30s  ' % ( lout, lname ) )
+        if not lname in clines :
+            raise AttributeError ('Unknown Line %s' % lname )
+        clines.remove ( lname )
+    logger.info ( _ln ) 
+    logger.info ( 80*'*'  ) 
+    if clines :
+        raise AttributeError('Undeclared lines: %s' % clines )
+
+    ## make dot-graphs 
+    try:    
+        selections = _conf._selections_private() 
+        for s in selections :
+            from SelPy.graph import graph
+            o = graph ( s , format = 'png' )
+            if o : logger.info  ( "Generate DOT-graph: %s"          % o        )
+            else : logger.error ( "Can't produce DOT=-graph for %s" % s.name() )
+            
+    except : pass
+    
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingUpsilonExotic.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingUpsilonExotic.py
new file mode 100644
index 000000000..843da132b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingUpsilonExotic.py
@@ -0,0 +1,994 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+##!/usr/bin/env python
+# =============================================================================
+# $Id:$
+# =============================================================================
+## @file
+# 
+#  The attempt for coherent stripping for X -> Upsilon X0 
+#
+#  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+#  @date   2015-03-22
+#
+
+#                   $Revision: 135537 $
+# Last modification $Date: 2012-02-19 15:18:08 +0100 (Sun, 19 Feb 2012) $
+#                by $Author: ibelyaev $
+# =============================================================================
+""" The attempt for coherent stripping for X -> Upsilon X0 
+
+- phi 
+- eho 
+- eta 
+- eta'
+- omega 
+- proton
+- prton + kaon 
+"""
+# =============================================================================
+__author__  = 'Vanya BELYAEV Ivan.Belyaev@itep.ru'
+__date__    = '2015-03-22'
+__version__ = '$Revision:$'
+# =============================================================================
+__all__ = (
+    'UpsilonExoticConf' ,
+    'default_config'    , 
+    )
+# =============================================================================
+from GaudiKernel.SystemOfUnits             import GeV, MeV, mm, micrometer 
+from StrippingUtils.Utils                  import LineBuilder
+# =============================================================================
+## logging
+# =============================================================================
+import logging
+logger = logging.getLogger(__name__)
+if not logger.handlers : logging.basicConfig()
+logger.setLevel(logging.INFO)
+# =============================================================================
+## Define the default configuration 
+_default_configuration_ = {
+    #    
+    'NOPIDHADRONS'   : False ,  ## USE FOR SIMULATION "True"
+    ## use for B&Q wg production
+    'DIMUONLINE'     : None  ,  ## USE FOR B&Q WG-selection  
+    #
+    'ETA_PT'    : 1.5 * GeV ,
+    'ETAP_PT'   : 1.5 * GeV ,
+    'OMEGA_PT'  : 1.5 * GeV ,    
+    #
+    #
+    ## photon selection for eta' -> rho gamma
+    #
+    'GammaCut'  : ' ( PT > 250 * MeV ) ' ,
+    #
+    ## pi0 selection for  eta/omega -> pi+ pi- pi0 ,
+    #
+    'Pi0Cut'    : """
+    ( 250    * MeV < MINTREE ( 'gamma' == ID , PT ) ) 
+    """ ,
+    #
+    ## eta -> gamma gamma selection for eta' -> pi+ pi- eta
+    #
+    'Eta2ggCut' : " 250    * MeV < MINTREE ( 'gamma' == ID , PT ) " , 
+    #
+    ## muon selection for  Y -> mu+ mu-
+    #
+    'MuonCut'   : """
+    ISMUON &
+    ( PT            >  750 * MeV ) &
+    ( PIDmu - PIDpi >    0       ) &
+    ( CLONEDIST     > 5000       )     
+    """ ,
+    #
+    ## pions 
+    # 
+    'PionCut'   : """
+    ( PT          > 200 * MeV ) & 
+    ( CLONEDIST   > 5000      ) & 
+    ( TRGHOSTPROB < 0.5       ) &
+    ( TRCHI2DOF   < 4         ) & 
+    in_range ( 2          , ETA , 5         ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     
+    """ ,
+    #
+    ## kaons
+    # 
+    'KaonCut'   : """
+    ( PT          > 200 * MeV ) & 
+    ( CLONEDIST   > 5000      ) & 
+    ( TRGHOSTPROB < 0.5       ) &
+    ( TRCHI2DOF   < 4         ) & 
+    in_range ( 2          , ETA , 5         ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     
+    """ ,
+    #
+    ## protons 
+    #
+    'ProtonCut'   : """
+    ( PT           > 200 * MeV ) & 
+    ( CLONEDIST    > 5000      ) & 
+    ( TRCHI2DOF    < 4         ) & 
+    ( TRGHOSTPROB  < 0.5       ) & 
+    in_range ( 2         , ETA , 5         ) &
+    in_range ( 10 * GeV  , P   , 150 * GeV ) &
+    HASRICH                      
+    """ ,
+    #
+    'UpsilonCut' : """
+    ( M > 7 * GeV ) & 
+    DECTREE   ('Meson -> mu+ mu-'  )                      &
+    CHILDCUT( 1 , HASMUON & ISMUON )                      &
+    CHILDCUT( 2 , HASMUON & ISMUON )                      & 
+    ( MINTREE ( 'mu+' == ABSID , PT ) > 1 * GeV         ) &
+    ( MAXTREE ( ISBASIC & HASTRACK , TRCHI2DOF ) < 4    ) & 
+    ( MINTREE ( ISBASIC & HASTRACK , CLONEDIST ) > 5000 ) & 
+    ( VFASPF  ( VPCHI2 ) > 0.5/100 ) 
+    & ( abs ( BPV ( VZ    ) ) <  0.5 * meter     ) 
+    & (       BPV ( vrho2 )   < ( 10 * mm ) ** 2 ) 
+    """ ,
+ 
+    #
+    #
+    ## PID-cuts for hadrons 
+    #
+    'PionPIDCut'   : " PROBNNpi > 0.1 " ,
+    'KaonPIDCut'   : " PROBNNk  > 0.1 " ,
+    'ProtonPIDCut' : " PROBNNp  > 0.1 " ,
+    #
+    ## useful shortcuts:
+    #
+    'Preambulo' : [
+    ## shortcut for chi2 of vertex fit 
+    'chi2vx    = VFASPF(VCHI2)     '                           , 
+    'chi2vxNDF = VFASPF(VCHI2PDOF) '                           , 
+    'chi2vxndf = chi2vxNDF         '                           ,
+    'vrho2     = VX**2 + VY**2'                                , 
+    ] ,
+    }
+## ============================================================================
+## the mandatory element for stripping framework 
+default_config = {
+    #
+    'NAME'        :   'UpsilonExotic'        ,
+    'WGs'         : [ 'BandQ' ]              ,
+    'CONFIG'      : _default_configuration_  , 
+    'BUILDERTYPE' :   'UpsilonExoticConf'    ,
+    'STREAMS'     : { 'Dimuon'    : [] }
+    }
+# =============================================================================
+## @class  UpsilonExoticConf
+#  B-> psi(') X0 configuration file 
+#  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+#  @date 2012-02-19
+class UpsilonExoticConf(LineBuilder) :
+    """
+    Helper class to configure 'PsiX0'-lines
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    ## get the default configuration 
+    @staticmethod
+    def defaultConfiguration( key = None ) :
+        """
+        Get the default/recommended configurtaion
+        
+        >>> conf = PsiX0.defaultConfiguration()
+        
+        """
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+        if key : return _config[ key ]
+        return _config
+    
+    ## constructor
+    def __init__ ( self , name , config ) :
+        """
+        Constructor
+        """
+        # check the names 
+        if 'UpsilonExotic' != name :
+            logger.warning ( 'The non-default name is specified "%s"' % name  ) 
+            
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+
+        if isinstance ( config , dict ):
+            _config.update ( config )
+            LineBuilder.__init__( self , name , _config )
+        else :
+            LineBuilder.__init__( self , name ,  config )
+
+        ## private set of selections 
+        self.__selections_ = {}
+
+
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {}
+            
+        self.__selections_[ self.name() ]['CONFIG'] = deepcopy ( _config ) 
+        
+        keys = _config.keys()
+        for key in keys :
+            
+            if not key in _default_configuration_ :
+                raise KeyError("Invalid key is specified: '%s'" % key )
+            
+            val = _config[key]
+            if val != _default_configuration_ [ key ] : 
+                logger.debug ('new configuration: %-16s : %s ' % ( key , _config[key] ) )
+                
+        self._name         = name
+        
+        for line in self._lines_UpsilonExotic () :
+            self.registerLine(line)
+            logger.debug ( "Register line: %s" %  line.name () ) 
+            
+    ## get the selection, associated with some nickname name 
+    def _selection ( self, nick ) :
+        """
+        Get the selection, associated with some nickname name
+        """
+        
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {} 
+            
+        return self.__selections_[ self.name() ].get( nick , None ) 
+    
+    ## add the selection, associated with some nickname name 
+    def _add_selection ( self , nick , sel ) :
+        """
+        add the selection, associated with some nickname name
+        """
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {} 
+        
+        if self.__selections_[ self.name()].has_key( nick ) :
+            raise AttributeError , "Selection '%s'already exists " % nick
+        
+        self.__selections_[ self.name() ][ nick ] = sel
+        
+        return sel 
+    
+    ## empty, no real stripping lines here 
+    def _lines_UpsilonExotic ( self ) : return [] 
+
+    # =========================================================================
+    ## pure technical method for creation of selections
+    # =========================================================================
+    def make_selection ( self      ,
+                         tag       , 
+                         algotype  ,
+                         inputs    , 
+                         *args     ,
+                         **kwargs  ) :
+        """
+        Technical method for creation of 1-step selections 
+        """
+        sel_tag  = '%s_Selection' % tag
+        sel_name = 'Sel%sFor%s'   % ( tag , self.name() )
+        #
+        ## check existing selection
+        #
+        sel      = self._selection ( sel_tag )
+        if sel : return sel 
+
+        #
+        ## adjust a bit the arguments
+        if not kwargs.has_key('Preambulo')           :
+            kwargs ['Preambulo'        ] = self['Preambulo']
+
+        if not kwargs.has_key( 'ParticleCombiners' ) :
+            kwargs ['ParticleCombiners'] = { '' : 'LoKi::VertexFitter:PUBLIC' } 
+            
+        # 
+        ## use "simple-selection"
+        #
+        from PhysSelPython.Wrappers import SimpleSelection
+        sel = SimpleSelection (
+            sel_name ,
+            algotype ,
+            inputs   , 
+            *args    ,
+            **kwargs )
+        # 
+        return self._add_selection( sel_tag , sel ) 
+
+    ## get the selections
+    def _selections_private ( self ) :
+        
+        sel = self._selection ( 'Selections' )
+        if sel : return sel
+        
+        sel =  [
+            #
+            self.upsilons          () ,
+            #
+            self.pi0               () ,
+            self.eta0              () ,
+            self.eta_prime         () ,
+            self.omega             () ,
+            #
+            self.upsilon_phi       () ,
+            self.upsilon_rho       () ,
+            self.upsilon_eta       () ,
+            self.upsilon_eta_prime () ,
+            self.upsilon_omega     () ,
+            self.upsilon_proton    () ,
+            self.upsilon_pK        () 
+            #
+            ]
+        
+        return self._add_selection ( 'Selections' , sel )
+    
+    # ========================================================================
+    ## pions :
+    # ========================================================================
+    def pions    ( self ) :
+        """
+        Pions for  X -> Upsilon X lines 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        ##
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdAllNoPIDsPions as inpts
+            pioncut = self['PionCut']
+        else                    :
+            from StandardParticles import StdAllLooseANNPions as inpts
+            pioncut = "(%s)&(%s)" % ( self['PionCut'] , self['PionPIDCut'] ) 
+        ##
+        return self.make_selection (
+            'Pion'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = pioncut         ,
+            )
+    
+    # ========================================================================
+    ## kaons :
+    # ========================================================================
+    def kaons     ( self ) :
+        """
+        Kaons for X -> Upsilon X 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        ## 
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdAllNoPIDsKaons as inpts
+            kaoncut = self['KaonCut']
+        else                    :
+            from StandardParticles import StdAllLooseANNKaons as inpts 
+            kaoncut = "(%s)&(%s)" % ( self['KaonCut'] , self['KaonPIDCut'] ) 
+        #
+        ##
+        return self.make_selection (
+            'Kaon'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = kaoncut         ,
+            )
+
+    # ========================================================================
+    ## protons 
+    # ========================================================================
+    def protons     ( self ) :
+        """
+        Kaons for X -> Upsilon P 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        ## 
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdAllNoPIDsProtons as inpts
+            protoncut = self['ProtonCut']
+        else                    :
+            from StandardParticles import StdAllLooseANNProtons as inpts 
+            protoncut = "(%s)&(%s)" % ( self['ProtonCut'] , self['ProtonPIDCut'] ) 
+        #
+        ##
+        return self.make_selection (
+            'Proton'               ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = protoncut       ,
+            )
+    
+    # ========================================================================
+    ## muons 
+    # ========================================================================
+    def muons    ( self ) :
+        """
+        Muons for  Upsilon -> mu+ mu-
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from StandardParticles                     import StdAllLooseMuons  as inpts 
+        ##
+        return self.make_selection (
+            'Muons'                 ,
+            FilterDesktop           ,
+            [ inpts ]               ,
+            Code = self['MuonCut']  ,
+            )
+
+    # =========================================================================
+    ## make heavy dimuons 
+    # =========================================================================
+    def dimuon ( self ) :
+        """
+        Create heavy dimuons
+        """
+        #
+        ups_name = 'HeavyDiMion'
+        sel_name = 'Sel%sFor%s' % ( ups_name , self.name() )
+        sel_tag  = '%s_Selection'
+        sel      = self._selection( sel_tag )        
+        if sel  : return sel
+        #
+        dimu_line = self[ 'DIMUONLINE']
+        if dimu_line :
+            ## list of lines 
+            from PhysSelPython.Wrappers import AutomaticData 
+            sel = AutomaticData( dimu_line ) 
+            return self._add_selection ( sel_tag , sel ) 
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        return self.make_selection (
+            ups_name         ,
+            CombineParticles ,
+            [ self.muons() ] ,
+            DecayDescriptor = " J/psi -> mu+ mu- " ,
+            CombinationCut  = "in_range ( 6.5 * GeV , AM , 20 * GeV ) ", 
+            MotherCut       = "chi2vx < 20" 
+            )
+    
+    # =========================================================================
+    ## get good upsilons
+    # =========================================================================
+    def upsilons ( self ) :
+        """
+        Select good upsilons, cuts ar einspire by variosu Y analyses at LHCb
+        """
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        ##
+        return self.make_selection  (
+            'Upsilon'           ,
+            FilterDesktop       , 
+            [ self.dimuon () ]  , 
+            ## algorithm parameters 
+            Code     = self['UpsilonCut'] ,
+            ## 
+            ReFitPVs = True
+            ##
+            )
+    
+    # =========================================================================
+    ## gamma 
+    # =========================================================================
+    def gamma  ( self ) :
+        from   StandardParticles  import StdLooseAllPhotons as photons_
+        return photons_ 
+    
+    # =========================================================================
+    ## define proper pi0 
+    # =========================================================================
+    def pi0  ( self ) :
+        """
+        Define proper pi0
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from StandardParticles                     import StdLoosePi02gg as inpts 
+        ##
+        return self.make_selection (
+            'Pi0'                  ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = self['Pi0Cut']  ,
+            )
+    
+    # =========================================================================
+    ## define proper eta
+    # =========================================================================
+    def eta_  ( self ) :
+        """
+        Define proper eta -> gamma gamma 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from StandardParticles                     import StdLooseEta2gg as inpts 
+        ##
+        return self.make_selection (
+            'EtaStd'                  ,
+            FilterDesktop             ,
+            [ inpts ]                 ,
+            Code = self['Eta2ggCut']  ,
+            )
+    
+    # =========================================================================
+    ## selection for  eta -> gamma gamma 
+    # =========================================================================
+    def eta2gg ( self ) :
+        """
+        Selection for Eta -> gamma gamma
+        """
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        pre_eta = self.make_selection (
+            'PreEta2gg'            ,
+            FilterDesktop          ,
+            [ self.eta_ () ]       ,
+            Code = """
+            ( ADMASS ('eta') < 100 * MeV ) &
+            ( PT > %s ) 
+            """ % self['ETA_PT']  
+            )
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g
+        return self.make_selection (
+            'Eta2gg'                   ,
+            Pi0Veto__Tagger2g          ,
+            [ pre_eta  ]               ,
+            MassWindow     = 25 * MeV  ,
+            MassChi2       = -1        ,
+            ExtraInfoIndex = 25015     ## unique ! 
+            )
+    
+    # =========================================================================
+    ## (selection for  eta -> pipipi
+    # =========================================================================
+    def eta23pi ( self ) :
+        """
+        Selection for Eta -> pipipi
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        ## 
+        pre_eta = self.make_selection (
+            ## the unique tag 
+            'PreEta3Pi'                   ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.pions () , self.pi0 ()  ] ,
+            ## algorithm properties 
+            DecayDescriptor = " eta -> pi+ pi- pi0" ,
+            ## 
+            Combination12Cut  = """  ( AM < 700 * MeV  ) &
+            ( ACHI2DOCA(1,2) < 12 ) 
+            """ , 
+            ##
+            CombinationCut  = """
+            ( APT > %s ) & ( ADAMASS ( 'eta' ) < 100 * MeV )
+            """ % ( 0.9 * self['ETA_PT'] ) ,
+            ##
+            MotherCut       = """
+            ( PT     > %s ) &
+            ( chi2vx <  9 ) 
+            """ %         self['ETA_PT']
+            )
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g
+        ## 
+        return self.make_selection (
+            'Eta23pi'                  ,
+            Pi0Veto__Tagger2g          ,
+            [ pre_eta ]                ,
+            MassWindow     = 25 * MeV  ,
+            MassChi2       = -1        ,
+            ExtraInfoIndex = 25016     ## unique ! 
+            )
+
+    # =========================================================================
+    ## all etas 
+    # =========================================================================
+    def eta0 ( self ) :
+        """
+        All etas 
+        """
+        tag      = 'Eta0_selection'
+        sel      = self._selection ( tag )
+        if sel : return sel
+        #
+        from PhysSelPython.Wrappers import MergedSelection
+        sel = MergedSelection (
+            'SelEta0AllFor' + self.name() ,
+            RequiredSelections = [ self.eta2gg  () ,
+                                   self.eta23pi () ]
+            )
+        #
+        return self._add_selection ( tag , sel )
+    
+    # ===========================================================================
+    ## selection for  etap -> rho0 gamma 
+    # ===========================================================================
+    def etap2rhog ( self ) :
+        """
+        Selection for Eta' -> rho gamma        
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        pre_etap = self.make_selection (
+            ## the unique tag 
+            'PreEtapRhoG'                 ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.pions () , self.gamma ()  ] ,
+            ##
+            DecayDescriptor = " eta_prime -> pi+ pi- gamma" ,
+            ##
+            DaughtersCuts   = { 'gamma' :  self['GammaCut'] } ,
+            ## 
+            Combination12Cut  = """  ( AM < 950 * MeV  ) &
+            ( ACHI2DOCA(1,2) < 12 ) 
+            """ , 
+            CombinationCut  = """
+            ( APT > %s ) & 
+            in_range  ( 500 * MeV , AM12 , 950 * MeV ) & 
+            ( ADAMASS ( 'eta_prime' ) <    100 * MeV ) 
+            """ % ( 0.9 * self['ETAP_PT'] ),
+            ##
+            MotherCut       = """
+            ( PT     > %s ) &
+            ( chi2vx <  9 )
+            """ %         self['ETAP_PT'] 
+            )
+        ##         
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+        ## 
+        return self.make_selection (
+            'Etap2rhogamma'               ,
+            Pi0Veto__Tagger               ,
+            [ pre_etap ]                  ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25017     ## unique ! 
+            )
+    
+    # ============================================================================
+    ## selection for  etap -> pi+ pi- eta
+    # ============================================================================ 
+    def etap2pipieta ( self ) :
+        """
+        Selection for Eta' -> pi+ pi- eta         
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ##
+        pre_etap = self.make_selection (
+            ## the unique tag 
+            'PreEtapPiPiEta'               ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.pions () , self.eta_ ()  ] ,
+            ##
+            DecayDescriptor = " eta_prime -> pi+ pi- eta" ,
+            DaughtersCuts   = {
+            'eta' : " ( ADMASS ('eta') < 100 * MeV ) "
+            } ,
+            ## 
+            Combination12Cut  = """  ( AM < 600 * MeV  ) &
+            ( ACHI2DOCA(1,2) < 12 ) 
+            """ , 
+            CombinationCut  = """
+            ( APT > %s ) & 
+            ( ADAMASS ( 'eta_prime' ) <    100 * MeV ) 
+            """ % ( 0.9 * self['ETAP_PT'] ),
+            ##
+            MotherCut       = """
+            ( PT     > %s ) &
+            ( chi2vx <  9 )
+            """ %         self['ETAP_PT'] 
+            )
+        
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g
+        ## 
+        return self.make_selection (
+            'Etap2pipieta'                ,
+            Pi0Veto__Tagger2g             ,
+            [ pre_etap ]                  ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25018     ## unique ! 
+            )
+    
+    # =========================================================================
+    ## all eta's 
+    # =========================================================================
+    def eta_prime ( self ) :
+        """
+        All eta's 
+        """
+        tag      = 'EtaPrime_selection'
+        sel      = self._selection ( tag )
+        if sel : return sel
+        #
+        from PhysSelPython.Wrappers import MergedSelection
+        sel = MergedSelection (
+            'SelEtaPrimAllFor' + self.name() ,
+            RequiredSelections = [ self.etap2rhog    () ,
+                                   self.etap2pipieta () ]
+            )
+        
+        return self._add_selection ( tag , sel ) 
+    
+    # =========================================================================
+    ## omega -> 3 pi 
+    # =========================================================================
+    def omega ( self ) :
+        """
+        omega -> 3 pi selection 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ##
+        pre_omega = self.make_selection (
+            ## the unique tag 
+            'PreOmega'                ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays         ,
+            ## input selections 
+            [ self.pions () , self.pi0 ()  ] ,
+            ##
+            DecayDescriptor = " omega(782) -> pi+ pi- pi0" ,
+            ## 
+            Combination12Cut  = """  ( AM < 1 * GeV  ) &
+            ( ACHI2DOCA(1,2) < 12 ) 
+            """ ,
+            ## 
+            CombinationCut  = """
+            ( APT > %s ) & ( ADAMASS ( 'omega(782)' ) < 100 * MeV )
+            """ % ( 0.9 * self['OMEGA_PT'] ),
+            ##
+            MotherCut       = """
+            ( PT     > %s ) &
+            ( chi2vx <  9 )
+            """ %         self['OMEGA_PT']
+            )
+        
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger2g
+        ## 
+        return self.make_selection (
+            'Omega'                       ,
+            Pi0Veto__Tagger2g             ,
+            [ pre_omega ]                 ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25019     ## unique ! 
+            )
+    
+    # =========================================================================
+    # X -> Upsilon phi(K+K-)
+    # =========================================================================
+    def  upsilon_phi( self ) :
+        """
+        X -> Upsilon phi(K+ K-)
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        #
+        return self.make_selection  (
+            'Y&KK'                ,
+            DaVinci__N3BodyDecays ,
+            [ self.upsilons() , self.kaons() ] ,
+            ## algorithm properties 
+            DecayDescriptor  = " Upsilon(4S) -> J/psi(1S) K+ K-" ,
+            Combination12Cut = """
+            ( AM < 15 * GeV       ) &
+            ( ACHI2DOCA(1,2) < 16 )
+            """ ,
+            CombinationCut = """
+            ( AM                  < 15   * GeV ) &
+            ( AM23                < 1050 * MeV ) & 
+            ( ( AM - AM1 - AM23 ) < 2.5  * GeV ) &
+            ( ACHI2DOCA(1,3)      < 16  ) &
+            ( ACHI2DOCA(2,3)      < 16  )
+            """ ,
+            MotherCut      = " chi2vxndf<10" ,
+            )
+    
+    # =========================================================================
+    # X -> Upsilon rho0 
+    # =========================================================================
+    def  upsilon_rho( self ) :
+        """
+        X -> Upsilon rho0
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        #
+        return self.make_selection  (
+            'Y&pipi'              ,
+            DaVinci__N3BodyDecays ,
+            [ self.upsilons() , self.pions() ] ,
+            ## algorithm properties 
+            DecayDescriptor  = " Upsilon(4S) -> J/psi(1S) pi+ pi-" ,
+            Combination12Cut = """
+            ( AM < 15 * GeV       ) &
+            ( ACHI2DOCA(1,2) < 16 )
+            """ ,
+            CombinationCut = """
+            ( AM                  < 15   * GeV ) &
+            ( AM23                < 1050 * MeV ) & 
+            ( ( AM - AM1 - AM23 ) < 2.5  * GeV ) &
+            ( ACHI2DOCA(1,3)      < 16         ) &
+            ( ACHI2DOCA(2,3)      < 16         )
+            """ ,
+            MotherCut      = " chi2vxndf< 10 " ,
+            )
+
+    # =========================================================================
+    # X -> Upsilon proton 
+    # =========================================================================
+    def  upsilon_proton ( self ) :
+        """
+        X -> Upsilon proton
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        #
+        return self.make_selection  (
+            'Y&p'             ,
+            CombineParticles  ,
+            [ self.upsilons() , self.protons() ] ,
+            ## algorithm properties 
+            DecayDescriptor  = "[Upsilon(4S) -> J/psi(1S) p+]cc" ,
+            CombinationCut   = """
+            ( AM                 < 13   * GeV ) &
+            ( ( AM - AM1 - AM2 ) < 2.5  * GeV ) &
+            ( ACHI2DOCA(1,2)     < 16  ) 
+            """ ,
+            MotherCut      = " chi2vxndf<10" ,
+            )
+
+    # =========================================================================
+    # X -> Upsilon proton kaon 
+    # =========================================================================
+    def  upsilon_pK ( self ) :
+        """
+        X -> Upsilon proton kaon 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        #
+        return self.make_selection  (
+            'Y&pK'                  ,
+            DaVinci__N3BodyDecays   ,
+            [ self.upsilons() , self.protons() , self.kaons() ] ,
+            ## algorithm properties 
+            DecayDescriptor  = "[Upsilon(4S) -> J/psi(1S) p+ K-]cc" ,
+            Combination12Cut = """
+            ( AM < 15 * GeV       ) &
+            ( ACHI2DOCA(1,2) < 16 )
+            """ ,
+            CombinationCut = """
+            ( AM                  < 15   * GeV ) &
+            ( AM23                < 2000 * MeV ) & 
+            ( ( AM - AM1 - AM23 ) < 2.5  * GeV ) &
+            ( ACHI2DOCA(1,3)      < 16         ) &
+            ( ACHI2DOCA(2,3)      < 16         )
+            """ ,
+            MotherCut      = " chi2vxndf< 10 " ,
+            )            
+    
+    # =========================================================================
+    # X -> Upsilon eta
+    # =========================================================================
+    def  upsilon_eta ( self ) :
+        """
+        X -> Upsilon eta
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles 
+        #
+        return self.make_selection  (
+            'Y&eta'                ,
+            CombineParticles       ,
+            [ self.upsilons() , self.eta0() ] ,
+            ## algorithm properties 
+            DecayDescriptor = " chi_b0(1P) -> J/psi(1S) eta" ,
+            CombinationCut  = """
+            (   AM               < 14  * GeV ) &
+            ( ( AM - AM1 - AM2 ) < 2.5 * GeV )
+            """,
+            MotherCut      = " chi2vxndf< 10 " 
+            )
+    
+    # =========================================================================
+    # X -> Upsilon eta'
+    # =========================================================================
+    def  upsilon_eta_prime ( self ) :
+        """
+        X -> Upsilon eta'
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles 
+        #
+        return self.make_selection  (
+            'Y&eta_prime'          ,
+            CombineParticles       ,
+            [ self.upsilons() , self.eta_prime () ] ,
+            ## algorithm properties 
+            DecayDescriptor = " chi_b1(1P) -> J/psi(1S) eta_prime" ,
+            CombinationCut  = """
+            (   AM               < 14  * GeV ) &
+            ( ( AM - AM1 - AM2 ) < 2.5 * GeV )
+            """,
+            MotherCut      = " chi2vxndf< 10 " 
+            )
+    
+    # =========================================================================
+    # X -> Upsilon omega
+    # =========================================================================
+    def  upsilon_omega ( self ) :
+        """
+        X -> Upsilon omega
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles 
+        #
+        return self.make_selection  (
+            'Y&omega'              ,
+            CombineParticles       ,
+            [ self.upsilons() , self.omega () ] ,
+            ## algorithm properties 
+            DecayDescriptor = " chi_b2(1P) -> J/psi(1S) omega(782)" ,
+            CombinationCut  = """
+            (   AM               < 14  * GeV ) &
+            ( ( AM - AM1 - AM2 ) < 2.5 * GeV )
+            """,
+            MotherCut      = " chi2vxndf< 10 " 
+            )
+
+    
+# =============================================================================
+if '__main__' == __name__ :
+    
+    
+    logger.info ( 80*'*'  ) 
+    logger.info (  __doc__ ) 
+    logger.info ( ' Author :  %s' % __author__ ) 
+    logger.info ( ' Date   :  %s' % __date__   )
+    ##
+    clines = set() 
+    logger.info ( ' Lines declared in default_config["STREAMS"] are' )
+    for stream in default_config['STREAMS'] :
+        lines = default_config['STREAMS'][stream] 
+        for l in lines :
+            logger.info ( ' %-15s : %-50s ' % ( stream , l ) )
+            clines.add ( l )
+    ##
+    logger.info ( ' The output locations for the default configuration: ' )
+    ##
+    _conf = UpsilonExoticConf ( 'UpsilonExotic' , 
+                                config = default_config['CONFIG']  )
+    ##
+    _ln   = ' ' + 61*'-' + '+' + 30*'-'
+    logger.info ( _ln ) 
+    logger.info ( '  %-60s| %-30s  ' % ( 'Output location', 'Stripping line name' ) ) 
+    logger.info ( _ln )
+    for l in _conf.lines() :
+        lout  = l.outputLocation()
+        lname = l.name() 
+        logger.info ( '  %-60s| %-30s  ' % ( lout, lname ) )
+        if not lname in clines :
+            raise AttributeError ('Unknown Line %s' % lname )
+        clines.remove ( lname )
+    logger.info ( _ln ) 
+    logger.info ( 80*'*'  ) 
+    if clines :
+        raise AttributeError('Undeclared lines: %s' % clines )
+
+    ## make dot-graphs 
+    try:    
+        selections = _conf._selections_private() 
+        for s in selections :
+            from SelPy.graph import graph
+            o = graph ( s , format = 'png' )
+            if o : logger.info  ( "Generate DOT-graph: %s"          % o        )
+            else : logger.error ( "Can't produce DOT=-graph for %s" % s.name() )
+            
+    except : pass
+   
+# =============================================================================
+# The END 
+# =============================================================================
+ 
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXB2DPiP.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXB2DPiP.py
new file mode 100644
index 000000000..eca314e9d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXB2DPiP.py
@@ -0,0 +1,255 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Reconstruct XB -> D(*)- pi+ proton and control mode B0 -> D(*)- pi+
+'''
+
+__author__ = ['Liming Zhang']
+__date__ = '1/12/2015'
+
+__all__ = ('XB2DPiPConf','default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from CommonParticles.Utils import updateDoD
+from StandardParticles import StdLoosePions
+from StandardParticles import StdLooseKaons
+from StandardParticles import StdAllLooseKaons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+import copy
+
+default_config = {
+    'NAME'              : 'XB2DPiP',
+    'WGs'               : ['BandQ'],
+    'BUILDERTYPE'       : 'XB2DPiPConf',
+    'STREAMS' : [ 'Bhadron' ],
+    'CONFIG'    : {
+                         'TRCHI2DOF'                 :       5
+                 ,       'TRGHOSTPROB'               :       0.5
+                 ,       'MIPCHI2'                   :       9
+                 ,       'ProtonPIDp'                      :       5
+                 ,       'ProtonPIDpK'                     :      -3
+                 ,        'MomCuts'     : """
+                          (VFASPF(VCHI2/VDOF) < 10.) 
+                          & (BPVDIRA> 0.9999) 
+                          & (BPVIPCHI2()<25) 
+                          & (BPVVDCHI2>250)
+                          & (BPVVDRHO>0.1*mm) 
+                          & (BPVVDZ>2.0*mm)
+                          & (MINTREE(((ABSID=='D+') | (ABSID=='D0') | (ABSID=='Lambda_c+')) , VFASPF(VZ))-VFASPF(VZ) > 0.0 *mm )
+                          """
+                  ,'RelatedInfoTools': [{
+                      'Type'              : 'RelInfoVertexIsolation',
+                      'Location'          : 'RelInfoVertexIsolation'
+                  }, {
+                      'Type'              : 'RelInfoVertexIsolationBDT',
+                      'Location'          : 'RelInfoVertexIsolationBDT'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 1.0,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                      'Location'          : 'RelInfoConeVariables_1.0'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 1.5,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                      'Location'          : 'RelInfoConeVariables_1.5'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 2.0,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                      'Location'          : 'RelInfoConeVariables_2.0'
+                  }]
+                  }    
+    }
+
+### Lines stored in this file:
+
+class XB2DPiPConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+	
+        #### Input selections:
+        #------------------------------------------------------------- D- + Ds-
+        self.DplusList = DataOnDemand(Location = "Phys/StdLooseDplus2KPiPi/Particles")
+        self.DsList = DataOnDemand(Location = "Phys/StdLooseDplus2KKPi/Particles")
+        self.DstarList = DataOnDemand(Location = "Phys/StdLooseDstarWithD02KPi/Particles")
+        
+        from PhysSelPython.Wrappers import MergedSelection
+
+        self.DpDsList = MergedSelection( self.name + "SelDpDs",
+                                        RequiredSelections =  [ self.DplusList,
+                                                                self.DsList
+                                                                ])
+        self.SelDpDsList = self.createSubSel( OutputList = "DpDsForXB2DPiP" + self.name,
+                                              InputList = self.DpDsList,
+                                              Cuts = "(MIPDV(PRIMARY) > 0.05*mm) & ((CHILD(MIPCHI2DV(), 1) + CHILD(MIPCHI2DV(), 2) + CHILD(MIPCHI2DV(), 3) ) > 100.) & ((MAXTREE(TRGHOSTPROB, ISBASIC) < %(TRGHOSTPROB)s))" % self.config)
+
+        self.SelDstarList = self.createSubSel( OutputList = "DstarForXB2DPiP" + self.name,
+                                              InputList = self.DstarList,
+                                              Cuts = "((MAXTREE(TRGHOSTPROB, ISBASIC) < %(TRGHOSTPROB)s))" % self.config)
+
+        #------------------------------------------------------------- Protons
+        
+        self.PionList = self.createSubSel( OutputList = "PionsForXB2DPiP" + self.name,
+                                           InputList = DataOnDemand(Location = "Phys/StdLoosePions/Particles"),                                                
+                                           Cuts = "(MIPCHI2DV(PRIMARY) > %(MIPCHI2)s ) & (TRCHI2DOF < %(TRCHI2DOF)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self.config )                                           
+
+        self.ProtonList = self.createSubSel( OutputList = "ProtonsForXB2DPiP" + self.name,
+                                           InputList = DataOnDemand(Location = "Phys/StdLooseProtons/Particles"),                                                
+                                           Cuts = "(MIPCHI2DV(PRIMARY) > %(MIPCHI2)s )" \
+                                           " & (TRCHI2DOF < %(TRCHI2DOF)s ) "\
+                                           " & (PIDp> %(ProtonPIDp)s) & ((PIDp-PIDK)> %(ProtonPIDpK)s)" \
+                                           "& (P>10.0*GeV) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self.config )                                           
+
+        self.makeB2DPi()
+        self.makeB2DPiP()
+    # -------------------------- B0->D(*)pi constrol channel:
+    def makeB2DPi( self ):
+        Bd2DPi = self.createCombinationSel( OutputList = "Bd2DPi" + self.name,
+                                DecayDescriptor = "[B0 -> D- pi+]cc",
+                                DaughterLists  = [ self.SelDpDsList, self.PionList ],
+                                PreVertexCuts = "in_range(4200,AM,6750)",
+                                PostVertexCuts = self.config['MomCuts'] )
+
+        Bd2DPiLine = StrippingLine( self.name + "Bd2DPiLine", 
+                                    algos = [ Bd2DPi ], 
+                                    MDSTFlag = False, 
+                                    EnableFlavourTagging = False, 
+                                    RelatedInfoTools = self.config['RelatedInfoTools']
+                                    )
+
+        Bd2DstarPi = self.createCombinationSel( OutputList = "Bd2DstarPi" + self.name,
+                                DecayDescriptor = "[B0 -> D*(2010)- pi+]cc",
+                                DaughterLists  = [ self.SelDstarList , self.PionList ],
+                                PreVertexCuts = "in_range(4200,AM,7250)",
+                                PostVertexCuts = self.config['MomCuts'] )
+
+        Bd2DstarPiLine = StrippingLine( self.name + "Bd2DstarPiLine", 
+                                        algos = [ Bd2DstarPi ], 
+                                        MDSTFlag = False, 
+                                        EnableFlavourTagging = False,
+                                        RelatedInfoTools = self.config['RelatedInfoTools']                                        
+                                         )
+
+        self.registerLine(Bd2DPiLine)
+        self.registerLine(Bd2DstarPiLine)
+
+
+    def makeB2DPiP( self ):
+        Bd2DPiP = self.createCombinationsSel( OutputList = "Bd2DPiP" + self.name,
+                                DecayDescriptors = ["[B+ -> D- pi+ p+]cc", "[B- -> D- pi+ p~-]cc"],
+                                DaughterLists  = [ self.SelDpDsList, self.PionList, self.ProtonList ],
+                                PreVertexCuts = "in_range(4200,AM,7250) & ( ACHI2DOCA(2,3)<20 )",
+                                PostVertexCuts = self.config['MomCuts'] )
+
+        Bd2DPiPLine = StrippingLine( self.name + "Bd2DPiPLine", 
+                                     algos = [ Bd2DPiP ], 
+                                     MDSTFlag = False, 
+                                     EnableFlavourTagging = False,
+                                     RelatedInfoTools = self.config['RelatedInfoTools']                                     
+                                      )
+
+        Bd2DstarPiP = self.createCombinationsSel( OutputList = "Bd2DstarPiP" + self.name,
+                                DecayDescriptors = ["[B+ -> D*(2010)- pi+ p+]cc", "[B- -> D*(2010)- pi+ p~-]cc"],
+                                DaughterLists  = [ self.SelDstarList , self.PionList, self.ProtonList ],
+                                PreVertexCuts = "in_range(4200,AM,7250) & ( ACHI2DOCA(2,3)<20 )",
+                                PostVertexCuts = self.config['MomCuts'] )
+
+        Bd2DstarPiPLine = StrippingLine( self.name + "Bd2DstarPiPLine", 
+                                         algos = [ Bd2DstarPiP ], 
+                                         MDSTFlag = False, 
+                                         EnableFlavourTagging = False,
+                                         RelatedInfoTools = self.config['RelatedInfoTools']                                         
+                                          )
+
+        self.registerLine(Bd2DPiPLine)
+        self.registerLine(Bd2DstarPiPLine)
+
+    ### Common tools:
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                      Algorithm = filter,
+                      RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                          DecayDescriptor,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+        
+    def createCombinationsSel( self, OutputList,
+	                  DecayDescriptors,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = True ) :
+        '''For taking in multiple decay descriptors'''
+        combiner = CombineParticles( DecayDescriptors = DecayDescriptors,
+                                 DaughtersCuts = DaughterCuts,
+                                 MotherCut = PostVertexCuts,
+                                 CombinationCut = PreVertexCuts,
+                                 ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                       Algorithm = combiner,
+                       RequiredSelections = DaughterLists)
+
+
+def _format_related_info(selection, config):
+    """Format the RelatedInfoTools configuation dictionary.
+
+    Replaces any dictionaries which have 'DaughterLocations' set to `None` with
+    the correct locations and decay descriptors.
+    HACK
+    """
+    decay_descriptor = selection.algorithm().DecayDescriptor.replace('cc', 'CC')
+    daughter_names = ['Dp_h', 'Dp_l1', 'Dp_l2']
+
+    config = copy.deepcopy(config)
+    for tool_config in config:
+        if 'DaughterLocations' not in tool_config or tool_config['DaughterLocations'] is not None:
+            continue
+
+        tool_config['DaughterLocations'] = {}
+        dd_index = decay_descriptor.find('->')+2
+        daughter_index = 0
+        while ' ' in decay_descriptor[dd_index:]:
+            d = '{} ^{}'.format(decay_descriptor[:dd_index], decay_descriptor[dd_index+1:])
+            tool_config['DaughterLocations'][d] = '{}_{}'.format(tool_config['Location'],
+                                                                 daughter_names[daughter_index])
+            daughter_index += 1
+            dd_index = decay_descriptor.find(' ', dd_index+1)
+    print config
+    return config
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXbToLambdaKmX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXbToLambdaKmX.py
new file mode 100644
index 000000000..d00c82376
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXbToLambdaKmX.py
@@ -0,0 +1,228 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+"""
+Lines for b-baryon -> Lambda0 K- X, where X = D0,D+,Ds+
+"""
+__author__ = ["Marian Stahl"]
+
+__all__ = ("XbToLambdaKmXConf", "default_config", "get_mva_vars")
+
+moduleName = "XbToLambdaKmX"
+
+# Import Packages
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import AutomaticData
+from PhysConf.Selections import (FilterSelection, CombineSelection, Combine3BodySelection, MergedSelection)
+from MVADictHelpers import addTMVAclassifierValue
+from collections import OrderedDict
+
+# Default configuration dictionary
+default_config = {
+  "NAME": "XbToLambdaKmX",
+  "BUILDERTYPE": "XbToLambdaKmXConf",
+  "CONFIG": {
+    "bach_pion" : {
+      "tes"    : "Phys/StdAllNoPIDsPions/Particles",
+      "filter" : "(P>2*GeV) & (PT>150*MeV) & (MIPCHI2DV(PRIMARY)>4) & (PROBNNpi>0.03)"
+    },
+    "bach_kaon" : {
+      "tes"    : "Phys/StdAllNoPIDsKaons/Particles",
+      "filter" : "(P>4*GeV) & (PT>250*MeV) & (MIPCHI2DV(PRIMARY)>4) & (PROBNNk>0.03)"
+    },
+    "lambda_ll" : {
+      "tes"    : "Phys/StdVeryLooseLambdaLL/Particles",
+      "filter" : """(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>0.8*GeV) & (BPVVDZ>10*mm) & (BPVVDCHI2>32) &
+                    (DOCA(1,2)<0.5*mm) & (DOCACHI2(1,2)<16) & (MAXTREE('p+'==ABSID,P)>7.5*GeV) &
+                    (MAXTREE('p+'==ABSID,MIPCHI2DV(PRIMARY))>9) & (MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))>9)"""
+    },
+    "lambda_dd" : {
+      "tes"    : "Phys/StdLooseLambdaDD/Particles",
+      "filter" : "(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>1*GeV) & (CHILDIP(1)<2*mm) & (MAXTREE('p+'==ABSID,P)>9*GeV)"
+    },
+    "dz" : {
+      "descriptors" : ["[D0 -> K- pi+]cc"],
+      "comb_cut"    : "(ASUM(PT)>1.4*GeV) & (ADAMASS('D0')<120*MeV) & (ADOCA(1,2)<0.3*mm)",
+      "mother_cut"  : """(ADMASS('D0')<80*MeV) & (P>12*GeV) & (PT>1.2*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.4*mm) &
+                         (CHILDIP(1)<0.3*mm) & (CHILDIP(2)<0.3*mm) & (VALUE('LoKi::Hybrid::DictValue/D0_BDT')>-0.8)""",
+    },
+    "dp" : {
+      "descriptors" : ["[D+ -> K- pi+ pi+]cc"],
+      "comb12_cut"  : "(ADOCA(1,2)<0.2*mm) & (AMASS(1,2)<1840*MeV)",
+      "comb_cut"    : "(ASUM(PT)>1.4*GeV) & (ADAMASS('D+')<120*MeV) & (ADOCA(1,3)<0.3*mm) & (ADOCA(2,3)<0.3*mm)",
+      "mother_cut"  : """(ADMASS('D+')<80*MeV) & (P>12*GeV) & (PT>1.2*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.4*mm) & (CHILDIP(1)<0.2*mm) &
+                         (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.3*mm) & (VALUE('LoKi::Hybrid::DictValue/D_BDT')>-0.9)"""
+    },
+    "ds" : {
+      "descriptors" : ["[D_s+ -> K+ K- pi+]cc"],
+      "comb12_cut"  : "(ADOCA(1,2)<0.2*mm) & (AMASS(1,2)<1940*MeV)",
+      "comb_cut"    : "(ASUM(PT)>1.4*GeV) & (ADAMASS('D_s+')<120*MeV) & (ADOCA(1,3)<0.3*mm) & (ADOCA(2,3)<0.3*mm)",
+      "mother_cut"  : """(ADMASS('D_s+')<80*MeV) & (P>12*GeV) & (PT>1.3*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.4*mm) &
+                         (CHILDIP(1)<0.2*mm) & (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.3*mm) & (VALUE('LoKi::Hybrid::DictValue/Ds_BDT')>-0.9)""",
+    },
+    "dfb_kids" : { # daughter-names are the ones in the xml file
+      "D0" : OrderedDict({"K":1, "pi":2}),
+      "D"  : OrderedDict({"K":1, "pi1":2, "pi2":3}),
+      "Ds" : OrderedDict({"Kp":1, "Km":2, "pi":3}),
+    },
+    "dfb_weights_path" : "$TMVAWEIGHTSROOT/data/DfromB/{}Pi_2016_GBDT.weights.xml",
+    "b_decays" : {
+      "Xib2LKD0" : {
+        "LL" : {
+          "daughters"   : ["dz","bach_kaon","lambda_ll"],
+          "descriptors" : ["[Xi_b- -> D0 K- Lambda0]cc"],
+          "comb12_cut"  : "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)",
+          "comb_cut"    : "(ADOCA(1,3)<0.6*mm) & (ADOCA(2,3)<0.3*mm) & (ASUM(PT)>5.2*GeV) & (AMASS()>5.3*GeV) & (AMASS()<6.4*GeV)",
+          "mother_cut"  : """(in_range(5.4*GeV,M,6.3*GeV)) & (P>36*GeV) & (PT>5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.2*mm) & (BPVIPCHI2()<16) & (CHILDIP(1)<0.3*mm) &
+                             (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.4*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm) & ((CHILD(VFASPF(VZ),3) - VFASPF(VZ))>10*mm)"""
+        },
+        "DD" : {
+          "daughters"   : ["dz","bach_kaon","lambda_dd"],
+          "descriptors" : ["[Xi_b- -> D0 K- Lambda0]cc"],
+          "comb12_cut"  : "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)",
+          "comb_cut"    : "(ADOCA(1,3)<2*mm) & (ADOCA(2,3)<2*mm) & (ASUM(PT)>5.2*GeV) & (AMASS()>5.3*GeV) & (AMASS()<6.4*GeV)",
+          "mother_cut"  : """(in_range(5.4*GeV,M,6.3*GeV)) & (P>36*GeV) & (PT>5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.1*mm) & (BPVIPCHI2()<16) &
+                             (CHILDIP(1)<0.3*mm) & (CHILDIP(2)<0.2*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm)"""
+        },
+      },
+      "Xib02LKD" : {
+        "LL" : {
+          "daughters"   : ["dp","bach_kaon","lambda_ll"],
+          "descriptors" : ["[Xi_b0 -> D+ K- Lambda0]cc"],
+          "comb12_cut"  : "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)",
+          "comb_cut"    : "(ADOCA(1,3)<0.6*mm) & (ADOCA(2,3)<0.3*mm) & (ASUM(PT)>5.2*GeV) & (AMASS()>5.3*GeV) & (AMASS()<6.2*GeV)",
+          "mother_cut"  : """(in_range(5.4*GeV,M,6.1*GeV)) & (P>36*GeV) & (PT>5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.2*mm) & (BPVIPCHI2()<16) & (CHILDIP(1)<0.3*mm) &
+                             (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.4*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm) & ((CHILD(VFASPF(VZ),3) - VFASPF(VZ))>10*mm)"""
+        },
+        "DD" : {
+          "daughters"   : ["dp","bach_kaon","lambda_dd"],
+          "descriptors" : ["[Xi_b0 -> D+ K- Lambda0]cc"],
+          "comb12_cut"  : "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)",
+          "comb_cut"    : "(ADOCA(1,3)<2*mm) & (ADOCA(2,3)<2*mm) & (ASUM(PT)>5.2*GeV) & (AMASS()>5.3*GeV) & (AMASS()<6.2*GeV)",
+          "mother_cut"  : """(in_range(5.4*GeV,M,6.1*GeV)) & (P>36*GeV) & (PT>5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.1*mm) & (BPVIPCHI2()<16) &
+                             (CHILDIP(1)<0.3*mm) & (CHILDIP(2)<0.2*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm)"""
+        },
+      },
+      "Lb2LKDs" : {
+        "LL" : {
+          "daughters"   : ["ds","bach_kaon","lambda_ll"],
+          "descriptors" : ["[Lambda_b0 -> D_s+ K- Lambda0]cc"],
+          "comb12_cut"  : "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)",
+          "comb_cut"    : "(ADOCA(1,3)<0.6*mm) & (ADOCA(2,3)<0.3*mm) & (ASUM(PT)>4.8*GeV) & (AMASS()>5*GeV) & (AMASS()<6.1*GeV)",
+          "mother_cut"  : """(in_range(5.1*GeV,M,6*GeV)) & (P>36*GeV) & (PT>4.5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.2*mm) & (BPVIPCHI2()<16) & (CHILDIP(1)<0.3*mm) &
+                             (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.4*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm) & ((CHILD(VFASPF(VZ),3) - VFASPF(VZ))>10*mm)"""
+        },
+        "DD" : {
+          "daughters"   : ["ds","bach_kaon","lambda_dd"],
+          "descriptors" : ["[Lambda_b0 -> D_s+ K- Lambda0]cc"],
+          "comb12_cut"  : "(ADOCA(1,2)<0.3*mm) & (AMASS(1,2)<5*GeV)",
+          "comb_cut"    : "(ADOCA(1,3)<2*mm) & (ADOCA(2,3)<2*mm) & (ASUM(PT)>4.8*GeV) & (AMASS()>5*GeV) & (AMASS()<6.1*GeV)",
+          "mother_cut"  : """(in_range(5.1*GeV,M,6*GeV)) & (P>36*GeV) & (PT>4.5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0.1*mm) & (BPVIPCHI2()<16) &
+                             (CHILDIP(1)<0.3*mm) & (CHILDIP(2)<0.2*mm) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>0.0*mm)"""
+        },
+      },
+    },
+  },
+  "STREAMS" : {
+    "Bhadron" : ["StrippingXbToLambdaKmX_Xib2LKD0Line",
+                 "StrippingXbToLambdaKmX_Xib02LKDLine",
+                 "StrippingXbToLambdaKmX_Lb2LKDsLine"]
+  },
+  "WGs": ["BandQ"]
+}
+
+class XbToLambdaKmXConf(LineBuilder):
+
+  __configuration_keys__ = default_config["CONFIG"].keys()
+
+  def __init__(self, moduleName, config):
+    LineBuilder.__init__(self, moduleName, config)
+
+    daughters = {}
+    daughters["bach_pion"] = FilterSelection(moduleName+"_bach_pion", [AutomaticData(config["bach_pion"]["tes"])], Code=config["bach_pion"]["filter"])
+    daughters["bach_kaon"] = FilterSelection(moduleName+"_bach_kaon", [AutomaticData(config["bach_kaon"]["tes"])], Code=config["bach_kaon"]["filter"])
+    daughters["lambda_ll"] = FilterSelection(moduleName+"_lambda_ll", [AutomaticData(config["lambda_ll"]["tes"])], Code=config["lambda_ll"]["filter"])
+    daughters["lambda_dd"] = FilterSelection(moduleName+"_lambda_dd", [AutomaticData(config["lambda_dd"]["tes"])], Code=config["lambda_dd"]["filter"])
+
+    daughters["dz"] = CombineSelection(moduleName+'_D02KPi', [daughters["bach_pion"], daughters["bach_kaon"]], DecayDescriptors=config["dz"]["descriptors"],
+                                CombinationCut=config["dz"]["comb_cut"], MotherCut=config["dz"]["mother_cut"])
+    daughters["dp"] = Combine3BodySelection(moduleName+'_D2KPiPi', [daughters["bach_pion"], daughters["bach_kaon"]], DecayDescriptors=config["dp"]["descriptors"],
+                                     Combination12Cut=config["dp"]["comb12_cut"], CombinationCut=config["dp"]["comb_cut"], MotherCut=config["dp"]["mother_cut"])
+    daughters["ds"] = Combine3BodySelection(moduleName+'_Ds2KKPi', [daughters["bach_pion"], daughters["bach_kaon"]], DecayDescriptors=config["ds"]["descriptors"],
+                                      Combination12Cut=config["ds"]["comb12_cut"], CombinationCut=config["ds"]["comb_cut"], MotherCut=config["ds"]["mother_cut"])
+
+    add_bdt_val = lambda s, p : addTMVAclassifierValue(s.algorithm(), config["dfb_weights_path"].format(p), self.get_mva_vars(p, config["dfb_kids"][p]), p+"_BDT")
+    add_bdt_val(daughters["dz"],"D0")
+    add_bdt_val(daughters["dp"],"D")
+    add_bdt_val(daughters["ds"],"Ds")
+
+    for line_name, v in config["b_decays"].iteritems() :
+      individual_selections = []
+      for k, conf in v.iteritems():
+        individual_selections.append(Combine3BodySelection(moduleName+"_"+line_name+k, [daughters[dau] for dau in conf["daughters"]], DecayDescriptors=conf["descriptors"],
+                                                           Combination12Cut=conf["comb12_cut"], CombinationCut=conf["comb_cut"], MotherCut=conf["mother_cut"]))
+      merged_selection = MergedSelection(moduleName+"_"+line_name+"_combsel", RequiredSelections=individual_selections)
+      # Create the stripping lines
+      self.registerLine(StrippingLine(moduleName+"_"+line_name+"Line", algos=[merged_selection]))
+
+  def get_mva_vars(self, parentname, daugthers):
+    """
+    Return all variables required for the BDT
+    Variable names MUST correspond exactly to what is needed by classifier (xml)
+    """
+
+    bdt_vars = {}
+    # Variables for D and daughters;  prefixes added later
+    vars_parent = {
+      'log_P'              : 'log10(P)',
+      'log_PT'             : 'log10(PT)',
+      'log_ENDVERTEX_CHI2' : 'log10(VFASPF(VCHI2))',
+      'log_IPCHI2_OWNPV'   : 'log10(MIPCHI2DV(PRIMARY))',
+      'log_FDCHI2_OWNPV'   : 'log10(BPVVDCHI2)',
+      'beta'               : '(SUMTREE(P,ISBASIC,0.)-(2.*CHILD(P,1)))/SUMTREE(P,ISBASIC,0.)',
+    }
+    vars_daughters = {
+      'log_PT'                 : 'log10(CHILD(PT,{0}))',
+      'log_IPCHI2_OWNPV'       : 'log10(CHILD(MIPCHI2DV(PRIMARY),{0}))',
+      'log_TRACK_VeloCHI2NDOF' : 'log10(switch(CHILD(TINFO(LHCb.Track.FitVeloNDoF,-1),{0})>0,CHILD(TINFO(LHCb.Track.FitVeloChi2,-1),{0})/CHILD(TINFO(LHCb.Track.FitVeloNDoF,-1),{0}),-1))',
+      'log_TRACK_TCHI2NDOF'    : 'log10(switch(CHILD(TINFO(LHCb.Track.FitTNDoF,-1),{0})>0,CHILD(TINFO(LHCb.Track.FitTChi2,-1),{0})/CHILD(TINFO(LHCb.Track.FitTNDoF,-1),{0}),-1))',
+      'log_TRACK_MatchCHI2'    : 'log10(CHILD(TINFO(LHCb.Track.FitMatchChi2,-1.),{0}))',
+      'log_TRACK_GhostProb'    : 'log10(CHILD(TRGHOSTPROB,{0}))',
+      'UsedRichAerogel'        : 'switch(CHILDCUT(PPCUT(PP_USEDAEROGEL),{0}),1,0)',
+      'UsedRich1Gas'           : 'switch(CHILDCUT(PPCUT(PP_USEDRICH1GAS),{0}),1,0)',
+      'UsedRich2Gas'           : 'switch(CHILDCUT(PPCUT(PP_USEDRICH2GAS),{0}),1,0)',
+      'RichAbovePiThres'       : 'switch(CHILDCUT(PPCUT(PP_RICHTHRES_PI),{0}),1,0)',
+      'RichAboveKaThres'       : 'switch(CHILDCUT(PPCUT(PP_RICHTHRES_K),{0}),1,0)',
+      'RichAbovePrThres'       : 'switch(CHILDCUT(PPCUT(PP_RICHTHRES_P),{0}),1,0)',
+      'atan_RichDLLe'          : 'atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLe,-1000),{0}))',
+      'atan_RichDLLmu'         : 'atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLmu,-1000),{0}))',
+      'atan_RichDLLk'          : 'atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLk,-1000),{0}))',
+      'atan_RichDLLp'          : 'atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLp,-1000),{0}))',
+      'atan_RichDLLbt'         : 'atan(CHILD(PPINFO(LHCb.ProtoParticle.RichDLLbt,-1000),{0}))',
+      'atan_MuonLLbg'          : 'atan(switch(CHILD(PPINFO(LHCb.ProtoParticle.InAccMuon,0),{0})==1,CHILD(PPINFO(LHCb.ProtoParticle.MuonBkgLL,-10000),{0}),-1000))',
+      'atan_MuonLLmu'          : 'atan(switch(CHILD(PPINFO(LHCb.ProtoParticle.InAccMuon,0),{0})==1,CHILD(PPINFO(LHCb.ProtoParticle.MuonMuLL,-10000),{0}),-1000))',
+      'isMuon'                 : 'switch(CHILDCUT(ISMUON,{0}),1,0)',
+      'MuonNShared'            : 'switch(CHILD(PPINFO(LHCb.ProtoParticle.InAccMuon,0),{0})==1,CHILD(PPINFO(LHCb.ProtoParticle.MuonNShared,0),{0}),-1)',
+      'VeloCharge'             : 'CHILD(PPINFO(LHCb.ProtoParticle.VeloCharge,-1000),{0})',
+    }
+    # Add all parent variables to output
+    for var, loki in vars_parent.iteritems():
+      bdt_vars.update({'{}_{}'.format(parentname, var) : loki})
+    # Add all daughter variables to output
+    for daugthername, lab in daugthers.iteritems():
+      for var, loki in vars_daughters.iteritems():
+        bdt_vars.update({'{}_{}_{}'.format(parentname,daugthername, var) : loki.format(lab)})
+    # Print out variables for sanity
+    #for key in sorted(bdt_vars):
+    #    print '{:<25} : {}'.format(key, bdt_vars[key].replace(',', ', '))
+    #print 80 * '-'
+    return bdt_vars
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXibc.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXibc.py
new file mode 100644
index 000000000..2c5999607
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXibc.py
@@ -0,0 +1,621 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id$
+'''
+Stripping Lines for the search of Xi_bc states.
+The following channels are used:
+ Xi_bc0 -> Xi_c0 J/psi(1S)
+ Xi_bc+ -> Lambdac+ J/psi(1S)
+
+where the daughter charmed baryon is reconstructed via:
+  Lambdac+ -> p K- pi+ 
+  Xic0 -> Xi- pi+
+and where the Xi- is reconstructed via:
+  Xi- -> Lambda pi-, Lambda -> p pi- 
+'''
+
+
+
+
+__author__ = ['Lucio Andelini']
+__date__ = '1/Mar/2012'
+__version__ = '$Revision: 0 $'
+
+
+__all__ = ( 'XibcBuilder'              ## LineBuilder class specialization
+            , 'default_name'           ## Default name for XibcBuilder object
+            , 'default_config'         ## Default config for XibcBuilder object
+            ## Common cut
+            , "filterJpsi"             ## Takes preconstructed Jpsi and filter them according to muon requirements
+            ## Charged Xibc
+            , "makeLambdac"            ## Lambdac filter
+            , "makeXibc"               ## Xibc+ CombineParticles Selection
+            ## Neutral Xibc
+            ,	"makeLambda0"            ## Lambda0 CombineParticles
+            ,	"makeXi"                 ## Ximinus CombineParticles Selection (has to be called for Up and Long)
+            ,	"makeXic"                ## Xic0 CombineParticles
+            , "makeXibc0"              ## Xibc0 CombineParticles Selection
+            ## Inclusive Line
+            , "makeX"                  ## CombineParticle Selection for the High Mass Baryon State (assigned ID=Xibc+)
+)
+
+
+from Gaudi.Configuration import *
+
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, AutomaticData, MergedSelection 
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from CommonParticles.StdLooseLambda import StdLooseLambdaLL, StdLooseLambdaDD
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from Configurables import TisTosParticleTagger
+
+
+default_name = "Xibc"
+
+default_config = {
+    'NAME'                                  : 'Xibc',
+    'WGs'                                   : ['BandQ'],
+    'BUILDERTYPE'                           : 'XibcBuilder',
+    'STREAMS'                               : {'Dimuon' : ['StrippingXibcXibc2LcJpsi',
+                                                           'StrippingXibcX2JpsiProton'
+                                                           ]
+                                               },
+    'CONFIG'                                : {
+    'Pions4Lambdac_MINIPCHI2'             : 0.0
+    , 'Pion4Lambdac_TRPCHI2'              : 0#.015
+    , 'Pion4Lambdac_ProbNNpi'             : 0.2
+    , 'Pion4Lambdac_PT'                   : '250*MeV'
+    , 'Protons4Lambdac_TRPCHI2'           : 0#.05
+    , 'Protons4Lambdac_minP'              : '0*GeV'
+    , 'Kaon4Lambdac_TRPCHI2'              : 0#.05
+    , 'Protons4Lambdac_ProbNNp'           : 0.05
+    , 'Protons4Lambdac_PT'                : '450*MeV'
+    , 'Kaon4Lambdac_PT'                   : '450*MeV'
+    , 'Kaon4Lambdac_ProbNNk'              : 0.02
+    , 'Kaon4Lambdac_minP'                 : '0*GeV'
+    , 'Muon4Jpsi_PIDmu'                   : 0
+    , 'Muon4Jpsi_TRPCHI2'                 : 0#.005
+    , 'Lambdac_MassWindowLarge'           : '120*MeV'
+    , 'Lambdac_MassWindowTight'           : '30*MeV'		
+    , 'Lambdac_MinAPT'                    : '1500*MeV' 
+    , 'Lambdac_MaxADOCA'                  : '0.5*mm'
+    , 'Lambdac_BPVDIRA'                   : 0.98
+    , 'Lambdac_minTAU'                    : -0.0001 	
+    , 'Lambdac_ENDVERTEXCHI2'             : 5						
+    , 'Jpsi_MassWindowLarge'              : '150*MeV'
+    , 'Jpsi_MassWindowTight'              : '50*MeV'
+    , 'Muon4Jpsi_PT'                      : '650*MeV'
+    , 'Jpsi_ENDVERTEXCHI2'                : 10
+    , 'Xibc_ENDVERTEXCHI2'                : 7
+    , 'Xibc_MassWindow'                   : '2*GeV'
+    , 'Xibc_MINPVIP'                      : 1e3			#DISABLED FOR INCLUSIVITY
+    , 'Xibc2LcJpsiPrescale'               : 0.2
+    #, 'Xibc2LcJpsiPrescale'               : 1.0
+    ####### #
+    , 'Protons4Lambda0_ProbNNp'           : 0.02
+    , 'LongProtons4Lambda0_MINIPCHI2'     : 2
+    , 'Protons4Lambda0_PT'                : '600*MeV'
+    , 'Pions4Lambda0_ProbNNpi'            : 0.2
+    , 'Pions4Lambda0_PT'                  : '0*MeV'
+    , 'Pions4Lambda0_MINIPCHI2'           : 0.
+    , 'Lambda0_MassWindowLarge'           : '180*MeV'
+    , 'Lambda0_MassWindowTight'           : '30*MeV'
+    , 'Lambda0_APT'                       : '700*MeV'
+    , 'Lambda0_ENDVERTEXCHI2'             : 10	
+    , 'Lambda0_DownProtonTrackPvalue'     : 0
+    , 'Lambda0_DownPionTrackPvalue'       : 0
+    , 'Lambda0_minFD'                     : '1*mm/GeV'
+    , 'Pions4Ximinus_PT'                  : '0*MeV'
+    , 'Pions4Ximinus_ProbNNpi'            : 0.2
+    , 'Pions4Ximinus_TRPCHI2'             : 0
+    , 'Pions4Ximinus_MINIPCHI2'           : 0
+    , 'Ximinus_MassWindowLarge'           : '120*MeV'
+    , 'Ximinus_MassWindowTight'           : '40*MeV'
+    , 'Ximinus_APT'                       : '800*MeV'
+    , 'Ximinus_FlightDistance'            : '0.1*mm/GeV'
+    , 'Ximinus_ENDVERTEXCHI2'             : 20
+    , 'Xic0_MassWindowLarge'              : '600*MeV'
+    , 'Xic0_MassWindowTight'              : '100*MeV'
+    , 'Pions4Xic0_PT'                     : '200*MeV'
+    , 'Pions4Xic0_ProbNNpi'               : 0.2
+    , 'Pions4Xic0_TRPCHI2'                : 0
+    , 'Xic0_APT'                          : '0*MeV'
+    , 'Xic0_ENDVERTEXCHI2'                : 20
+    , 'Xibc0_MassWindow'                  : '1.5*GeV'
+    , 'Xibc0_ENDVERTEXCHI2'               : 20
+    ####### 
+    , 'HighMassBaryon_MassLowEdge'        : '4.5*GeV'
+    , 'HighMassBaryon_MinAPT'             : '1*GeV'
+    , 'ProtonsForHighMassBaryon_TRPCHI2'  : 0.#1
+    , 'ProtonsForHighMassBaryon_PT'       : '1.5*GeV'
+    , 'ProtonsForHighMassBaryon_P'        : '5*GeV'
+    , 'ProtonsForHighMassBaryon_ProbNNp'  : 0.1
+    , 'JpsiForHighMassBaryon_PT'          : '1.5*GeV'
+    , 'JpsiForHighMassBaryon_MassWin'     : '40*MeV'
+    , 'JpsiForHighMassBaryon_MuonPIDmu'   : 0
+    , 'JpsiProtonForHighMassBaryonCosth'  : 1 #disabled
+    #######
+    , "JpsiKp_CtrlLine_Prescale"          : 1.0
+    , "JpsiKp_MinTAU"                     : '0.10*ps'
+    , "JpsiKp_MassMin"                    : 5200 #MeV/c2
+    , "JpsiKp_MassLbThreshold"            : 5750 #MeV/c2
+    , "JpsiKp_MassMax"                    : 8000 #MeV/c2
+    , "JpsiKp_MaxVertexChi2"              : 10
+    , "JpsiKp_Jpsi_MinPT"                 : 700 #MeV/c
+    , "JpsiKp_Jpsi_MassWin"               : 40  #MeV/cc
+    , "JpsiKp_mu_MaxTrackGhostProb"       : 0.4
+    , "JpsiKp_mu_MinPIDmu"                : 0
+    , "JpsiKp_p_MinPt"                    : 300 #MeV
+    , "JpsiKp_p_MinProbNNp"               : 0.05
+    , "JpsiKp_p_MaxTrackGhostProb"        : 0.4
+    , "JpsiKp_p_MinTrackPvalue"           : 0.1
+    , "JpsiKp_p_MinP"                     : 2000 #MeV/c
+    , "JpsiKp_K_MinPT"                    : 300 #MeV
+    , "JpsiKp_K_MinProbNNk"               : 0.02
+    , "JpsiKp_K_MaxTrackGhostProb"        : 0.4
+    , "JpsiKp_K_MinTrackPvalue"           : 0.1
+    , "JpsiKp_K_MinP"                     : 2000 #MeV/c
+    ########
+    , 'GlobalGhostProb_Max'               : 0.4
+    , 'LongTrackGEC'                      : 150 
+    }
+    }
+
+## These configuration parameters should not be changed outside of this file.
+_my_immutable_config = {
+				'PionsForLambdacLocation'         : 'Phys/StdAllNoPIDsPions/Particles'
+				, 'KaonsForLambdacLocation'       : 'Phys/StdAllNoPIDsKaons/Particles'
+				, 'ProtonsForLambdacLocation'     : 'Phys/StdAllNoPIDsProtons/Particles'
+				, 'MuonsForJpsiLocation'          : 'Phys/StdAllNoPIDsMuons/Particles'
+				, 'LongProtonsForLambda'          : 'Phys/StdLooseProtons/Particles'
+				, 'LongPionsForLambda'            : 'Phys/StdLoosePions/Particles'
+				, 'DownProtonsForLambda'          : 'Phys/StdNoPIDsDownProtons/Particles'
+				, 'DownPionsForLambda'            : 'Phys/StdNoPIDsDownPions/Particles'
+				, 'UpPionsForLambda'              : 'Phys/StdNoPIDsUpPions/Particles'
+				, 'LongPionsForXi'                : 'Phys/StdLoosePions/Particles'
+				, 'DownPionsForXi'                : 'Phys/StdNoPIDsDownPions/Particles'
+				, 'JpsiForExclusiveLinesLocation' : 'Phys/StdLooseJpsi2MuMu/Particles'
+				, 'PionsForXic'                   : 'Phys/StdAllNoPIDsPions/Particles'
+        , 'Protons4JpsiKp'                : 'Phys/StdAllNoPIDsProtons/Particles'
+        , 'Kaons4JpsiKp'                  : 'Phys/StdAllNoPIDsKaons/Particles'
+				, 'Protons4HighMassBaryon'        : 'Phys/StdAllNoPIDsProtons/Particles'
+				, 'Jpsi4HighMassBaryon'           : 'Phys/StdLooseJpsi2MuMu/Particles'
+        } 
+
+
+class XibcBuilder(LineBuilder) :
+    """
+    Search for Xibc
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+################################################################################################
+# LineBuilder definition
+################################################################################################
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+        # Set up global event cuts.
+        # Conceptually these come first, although the place where they're
+        # inserted into the line is at the bottom of the code.
+        _globalEventCuts = {
+					'Code' :
+          ("(recSummary (LHCb.RecSummary.nLongTracks, 'Rec/Track/Long') < %(LongTrackGEC)s )"
+                                                                                  ) % config,
+					'Preambulo' : ["from LoKiTracks.decorators import *"]
+				}
+
+
+        ####################################### Common Jpsi  #########################################
+
+
+        self._muon4Jpsi = AutomaticData(_my_immutable_config['MuonsForJpsiLocation'])
+        self._Jpsi = filterJpsi(name, config=config)
+
+
+        ######################################## Xibc+ Exclusive Line ##################################
+
+        self._pions4Lambdac = AutomaticData(_my_immutable_config ['PionsForLambdacLocation'])
+        self._protons4Lambdac = AutomaticData(_my_immutable_config['ProtonsForLambdacLocation']) 
+        self._kaons4Lambdac = AutomaticData(_my_immutable_config['KaonsForLambdacLocation'])
+
+
+        self._Lambdac = makeLambdac(name, 
+                                    [self._protons4Lambdac, self._kaons4Lambdac, self._pions4Lambdac], 
+                                    config);
+
+        self._Xibc = makeXibc(name, [self._Jpsi, self._Lambdac], config);
+
+
+        #declare the line:
+        self.lineXibc2LcJpsi = StrippingLine(name+'Xibc2LcJpsi',
+                                      prescale = config['Xibc2LcJpsiPrescale'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self._Xibc)
+
+        self.registerLine(self.lineXibc2LcJpsi)
+
+        ##################################### Xibc0 ###################################################
+
+        self._Lambda0 = makeLambda0(name, [] , config)
+        #Note: the Jpsi requirement is added to quickly skip events without a Jpsi saving CPU time
+        self._XiminusL = makeXi(name+"LongPi", 
+                      [self._Lambda0, AutomaticData(_my_immutable_config['LongPionsForXi']), self._Jpsi]
+                      , config )
+
+        self._XiminusD = makeXi(name+"DownPi", 
+                      [self._Lambda0, AutomaticData(_my_immutable_config['DownPionsForXi']), self._Jpsi]
+                      , config )
+
+        self._Ximinus = MergedSelection(name+"MergedXiminus", 
+                                        RequiredSelections = [self._XiminusL, self._XiminusD]);
+
+        self._Xic0 = makeXic(name, 
+                            [self._Ximinus, AutomaticData(_my_immutable_config['PionsForXic'])], 
+                            config);
+
+        self._Xibc0 = makeXibc0(name, [self._Jpsi, self._Xic0], config);
+
+        #declare the line:
+        self.lineXibc2XicJpsi = StrippingLine(name+'Xibc2XicJpsi',
+                                      prescale = 1,
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self._Xibc0)
+
+        self.registerLine(self.lineXibc2XicJpsi)
+
+
+        ########################################## Xibc -> J/psi K p  Line #######################
+
+        self._Xibc2JpsiKpi = makeXibc2JpsiKp(name, 
+            [ self._Jpsi, 
+              AutomaticData( _my_immutable_config['Protons4JpsiKp']),
+              AutomaticData( _my_immutable_config['Kaons4JpsiKp'])
+            ],
+            config)
+      
+        self.lineXibc2JpsiKp = StrippingLine((name+'Xibc2JpsiKp'),
+                                               prescale = 1.0,
+                                               postscale = 1.0,
+                                               FILTER = _globalEventCuts,
+                                               selection = self._Xibc2JpsiKpi)
+
+        self.registerLine (self.lineXibc2JpsiKp);
+
+        ########################################## Xibc -> J/psi K p Control Line #######################
+
+        self._Xibc2JpsiKpiCtrl = makeXibc2JpsiKp(name+"Lb", 
+            [ self._Jpsi, 
+              AutomaticData( _my_immutable_config['Protons4JpsiKp']),
+              AutomaticData( _my_immutable_config['Kaons4JpsiKp'])
+            ],
+            config, controlLine = True)
+      
+        self.lineXibc2JpsiKp = StrippingLine((name+'Lb2JpsiKp'),
+                                               prescale = config['JpsiKp_CtrlLine_Prescale'],
+                                               postscale = 1.0,
+                                               FILTER = _globalEventCuts,
+                                               selection = self._Xibc2JpsiKpiCtrl)
+
+        self.registerLine (self.lineXibc2JpsiKp);
+
+
+        ########################################## Inclusive X -> p J/psi Line #####################
+
+        self._X = makeX (name, 
+              [	#self._Jpsi, 
+                AutomaticData (_my_immutable_config['Jpsi4HighMassBaryon']), 
+                AutomaticData( _my_immutable_config['Protons4HighMassBaryon'])]
+                                                        , config)
+
+        self.lineX2JpsiProton = StrippingLine(name+'X2JpsiProton',
+                                      prescale = 1.0,
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self._X)
+
+        self.registerLine(self.lineX2JpsiProton)
+
+        ########################################## Inclusive X -> p J/psi Line Good Pointing #####
+        # Complementary line reverting the Pointing requirement for Stripping20r1p1.
+        # Previous Stripping version was tuned on decays towards heavy daughters
+        # partially reconstructed, so that the requirement of bad pointing did make sense
+        # however, it forbids studies on Xibc -> J/psi p K -like decays.
+        #
+        #  2014-06-04: Line "JpsiProtonGoodPointing" merged to JpsiProton 
+        #              for Stripping21 (Lucio.Anderlini@fi.infn.it)
+        # 
+
+#####################
+# Functions
+#####################
+
+def filterJpsi (localname, 
+                _InputLocation=_my_immutable_config['JpsiForExclusiveLinesLocation'], 
+                config=default_config['CONFIG']):
+  _filterAlgorithm = FilterDesktop(localname+"JpsiMuonFilter");
+  _myCutOnMuons = ("(PIDmu > %(Muon4Jpsi_PIDmu)s) &"+
+                  " (TRPCHI2 > %(Muon4Jpsi_TRPCHI2)s) &"+
+                  " (TRGHP < %(GlobalGhostProb_Max)s) &" +
+                  " (PT > %(Muon4Jpsi_PT)s) ")%config
+  _filterAlgorithm.Code = ("(CHILDCUT(("+_myCutOnMuons+"),1) & CHILDCUT(("+_myCutOnMuons+"),2)) &"+
+                  " (VFASPF(VCHI2/VDOF)<%(Jpsi_ENDVERTEXCHI2)s) &"+
+                  " (ADMASS('J/psi(1S)') < %(Jpsi_MassWindowTight)s)") % config
+	
+
+  return Selection (name = localname + 'JpsiMuonFilterSelection', 
+                  Algorithm = _filterAlgorithm, 
+                  RequiredSelections = [ AutomaticData(_InputLocation) ])
+
+
+
+def makeLambdac (localname, _RequiredSelections, config=default_config['CONFIG']):
+  _lambdacCP = CombineParticles(localname+"lambdacAlgorithm")
+  _lambdacCP.DecayDescriptor = "[Lambda_c+ -> p+ pi+ K-]cc"
+  _lambdacCP.DaughtersCuts = {
+        "p+" 	: ("(TRPCHI2 > %(Protons4Lambdac_TRPCHI2)s) & " + 
+                  " (PROBNNp > %(Protons4Lambdac_ProbNNp)s) & " +
+                  " (TRGHP < %(GlobalGhostProb_Max)s) &" +
+                  " (PT > %(Protons4Lambdac_PT)s) & " +
+                  " (P > %(Protons4Lambdac_minP)s) ") % config,
+        "K-"	:	("(TRPCHI2 > %(Kaon4Lambdac_TRPCHI2)s) &"+
+                  "(PROBNNk > %(Kaon4Lambdac_ProbNNk)s) & "+
+                  "(TRGHP < %(GlobalGhostProb_Max)s) &" +
+                  "(P > %(Kaon4Lambdac_minP)s) & "+
+                  "(PT > %(Kaon4Lambdac_PT)s)" ) % config,
+        "pi+"	:	("(MIPCHI2DV(PRIMARY)> %(Pions4Lambdac_MINIPCHI2)s) &"+
+                  " (TRPCHI2 > %(Pion4Lambdac_TRPCHI2)s) &"+
+                  " (TRGHP < %(GlobalGhostProb_Max)s) &" +
+                  " (PROBNNpi > %(Pion4Lambdac_ProbNNpi)s) &"+
+                  "(PT > %(Pion4Lambdac_PT)s)") % config 
+		}
+  _lambdacCP.CombinationCut = ("(ADAMASS('Lambda_c+') < %(Lambdac_MassWindowLarge)s) & " +
+                                "(APT > %(Lambdac_MinAPT)s) & " +
+                                "(ADOCAMAX('') < %(Lambdac_MaxADOCA)s)"  
+                                            ) % config
+
+  _lambdacCP.MotherCut = ("(VFASPF(VCHI2/VDOF) < %(Lambdac_ENDVERTEXCHI2)s) & "+
+                          "(ADMASS('Lambda_c+') < %(Lambdac_MassWindowTight)s) & "+
+                          "(BPVDIRA > %(Lambdac_BPVDIRA)s) & "+
+                          "(BPVLTIME()>%(Lambdac_minTAU)s)"
+                          ) % config
+
+	
+  return Selection (name = localname + 'LcSelection', Algorithm=_lambdacCP, 
+                          RequiredSelections = _RequiredSelections);
+
+###
+
+def makeXibc (localname, _RequiredSelections ,config=default_config['CONFIG']):
+  _xibcLc = CombineParticles(localname + "Xibc2LcJpsiAlgorithm")
+  _xibcLc.DecayDescriptor = "[Xi_bc+ -> J/psi(1S) Lambda_c+]cc"
+  _xibcLc.CombinationCut = ("(ADAMASS('Xi_bc+') < %(Xibc_MassWindow)s) " 
+#                          "(AMAXCHILD(TRGHP, ISBASIC) < %(GlobalGhostProb_Max)s)"
+                        ) % config
+  _xibcLc.MotherCut = ("(VFASPF(VCHI2/VDOF)<%(Xibc_ENDVERTEXCHI2)s)" +
+                        " & (MIPDV(PRIMARY) < %(Xibc_MINPVIP)s)") % config #MINIPCUT disabled
+    
+  return Selection (name = localname+'XibcLcSelection', Algorithm = _xibcLc,
+                      RequiredSelections = _RequiredSelections)
+  ###############################################################
+
+
+def makeLambda0 (localname, additionalRequiredSelections=[], config=default_config['CONFIG']):
+	#Lambda combine particles
+  _protonCommonCut = ('(PROBNNp > %(Protons4Lambda0_ProbNNp)s) & ' + 
+                      '(PT > %(Protons4Lambda0_PT)s)'
+                                                    ) % config
+  _pionCommonCut = ('(PROBNNpi > %(Pions4Lambda0_ProbNNpi)s) & ' +
+                    '(PT > %(Pions4Lambda0_PT)s) & ' +
+                    '(MIPCHI2DV(PRIMARY) > %(Pions4Lambda0_MINIPCHI2)s)') % config
+
+  _lambdaCommonCut = ("((VFASPF(VCHI2/VDOF)<%(Lambda0_ENDVERTEXCHI2)s) &" + 
+                      "(ADMASS('Lambda0') < %(Lambda0_MassWindowTight)s) & " +
+                      "(BPVVDZ/P > %(Lambda0_minFD)s))") % config
+
+  _lambda = CombineParticles(localname+"lambda2ppi")
+  _lambda.DecayDescriptors = ["[Lambda0 -> p+ pi-]cc", "[Lambda0 -> p+ pi+]cc"]
+  _lambda.DaughtersCuts = { "p+" : _protonCommonCut + 
+                            " & (MIPCHI2DV(PRIMARY) > %(LongProtons4Lambda0_MINIPCHI2)s)" % config,
+                            "pi-" : _pionCommonCut,
+                            "pi+" : _pionCommonCut
+                            }
+  _lambda.CombinationCut = ("(ADAMASS('Lambda0') < %(Lambda0_MassWindowLarge)s) & "+			
+                            "(APT > %(Lambda0_APT)s)"		  
+                                                      ) % config
+  _lambda.MotherCut = _lambdaCommonCut
+
+	#Selection
+  LooseLambdaSelection = Selection(localname+"SelLooseLambda",
+            Algorithm = _lambda,
+            RequiredSelections =  additionalRequiredSelections + [
+                                AutomaticData(_my_immutable_config['LongProtonsForLambda']),
+                                AutomaticData(_my_immutable_config['LongPionsForLambda'])]);
+
+	#Lambda combine particles WITH DOWNSTREAM TRACKS
+  _lambdaDD = CombineParticles(localname+"lambda2ppidown")
+  _lambdaDD.DecayDescriptors = _lambda.DecayDescriptors;
+  _lambdaDD.CombinationCut = ("(ADAMASS('Lambda0') < %(Lambda0_MassWindowLarge)s) & "+
+                              "(APT > %(Lambda0_APT)s)" 
+                                                                        ) % config
+  _lambdaDD.DaughtersCuts = {
+             "p+" 		: (	_protonCommonCut +
+                        "& ( TRPCHI2 > %(Lambda0_DownProtonTrackPvalue)s )") % config,
+             "pi-"	:  ( _pionCommonCut + 
+                        "& ( TRPCHI2 > %(Lambda0_DownPionTrackPvalue)s)" ) % config,
+             "pi+"	:  ( _pionCommonCut + 
+                        "& ( TRPCHI2 > %(Lambda0_DownPionTrackPvalue)s)" ) % config
+            }
+  _lambdaDD.MotherCut = _lambdaCommonCut
+
+	#Selection
+  LooseLambdaDDSelection = Selection(localname+"SelLooseLambdaDown",
+            Algorithm = _lambdaDD,
+                      RequiredSelections = additionalRequiredSelections + [
+                                    AutomaticData(_my_immutable_config['DownProtonsForLambda']), 
+                                    AutomaticData(_my_immutable_config['DownPionsForLambda'])]);
+
+	#Lambda combine particles WITH UPSTREAM TRACKS
+  _lambdaUL = CombineParticles(localname+"lambda2ppiup")
+  _lambdaUL.DecayDescriptors = _lambda.DecayDescriptors;
+  _lambdaUL.DaughtersCuts = {
+                            "p+" : _protonCommonCut,
+                            "pi-": _pionCommonCut,
+                            "pi+": _pionCommonCut
+                            }
+  _lambdaUL.CombinationCut = ("(ADAMASS('Lambda0') <  %(Lambda0_MassWindowLarge)s) & "+
+                              "(APT > %(Lambda0_APT)s)"
+                                                       ) % config
+  _lambdaUL.MotherCut = _lambdaCommonCut
+
+	##Selection
+  LooseLambdaULSelection = Selection(localname+"SelLooseLambdaUp",
+                Algorithm = _lambdaUL,
+                RequiredSelections = additionalRequiredSelections + [
+                              AutomaticData(_my_immutable_config['LongProtonsForLambda']),
+                              AutomaticData(_my_immutable_config['UpPionsForLambda'])]);
+
+  return MergedSelection(localname+'AllLooseLambda', 
+                        RequiredSelections = [LooseLambdaSelection, 
+                                              LooseLambdaDDSelection, 
+                                              LooseLambdaULSelection ] );
+                  
+
+def makeXi (localname, _RequiredSelections, config=default_config['CONFIG']):
+
+  _xi = CombineParticles(localname+"xi2lambda")
+  _xi.DecayDescriptor = "[Xi- -> Lambda0 pi-]cc"
+  _xi.DaughtersCuts = 	{ "pi-" : (	"(PT > %(Pions4Ximinus_PT)s) & " + 
+                                  "(PROBNNpi > %(Pions4Ximinus_ProbNNpi)s) & " +
+                                  "(TRPCHI2 > %(Pions4Ximinus_TRPCHI2)s) & " +
+                                  "(MIPCHI2DV(PRIMARY) > %(Pions4Ximinus_MINIPCHI2)s)"
+                                                                                ) % config 
+                          }
+  _xi.CombinationCut = ("(ADAMASS('Xi-') < %(Ximinus_MassWindowLarge)s) & "+
+                      "(APT > %(Ximinus_APT)s)"
+                                                ) % config
+  _xi.MotherCut = ("((VFASPF(VCHI2/VDOF) < %(Ximinus_ENDVERTEXCHI2)s) "
+                    "& (ADMASS('Xi-') < %(Ximinus_MassWindowTight)s)" 
+                    "& (BPVVDZ/P > %(Ximinus_FlightDistance)s))" 
+                                                                      )% config
+
+	#Selection
+  return Selection(localname+"SelLooseXi",
+            Algorithm = _xi,
+            RequiredSelections = _RequiredSelections);
+					
+
+
+def makeXic (localname, _RequiredSelections, config=default_name):
+
+  _xic = CombineParticles(localname+"xic2xipi")
+  _xic.DecayDescriptor = "[Xi_c0 -> Xi- pi+]cc"
+  _xic.CombinationCut = ("(ADAMASS('Xi_c0') < %(Xic0_MassWindowLarge)s) &  "+ 
+                         "(APT > %(Xic0_APT)s)") % config
+  _xic.DaughtersCuts = { "pi+": ( 
+                          "(PT > %(Pions4Xic0_PT)s) & " +
+                          "(TRPCHI2 > %(Pions4Xic0_TRPCHI2)s) & " +
+                          "(PROBNNpi > %(Pions4Xic0_ProbNNpi)s) ") % config			
+                      }
+
+  _xic.MotherCut = ("((VFASPF(VCHI2/VDOF)< %(Xic0_ENDVERTEXCHI2)s) & "+
+                          "(ADMASS('Xi_c0') < %(Xic0_MassWindowTight)s))  " 
+                          )% config
+
+  return Selection(localname+"SelLooseXic0",
+            Algorithm = _xic,
+            RequiredSelections = _RequiredSelections);
+
+def makeXibc0 (localname, _RequiredSelections, config=default_name):
+	
+  _xibc = CombineParticles(localname + "xibc2xijpsi")
+  _xibc.DecayDescriptor = "[Xi_bc0 -> Xi_c0 J/psi(1S)]cc"
+  _xibc.CombinationCut = ("(ADAMASS('Xi_bc0') < %(Xibc0_MassWindow)s) & " +
+                          "(AMAXCHILD(TRGHP, ISBASIC) < %(GlobalGhostProb_Max)s)"
+                          ) % config
+  _xibc.MotherCut = ("(VFASPF(VCHI2/VDOF)< %(Xibc0_ENDVERTEXCHI2)s)" 
+#                    " & (MAXTREE(TRGHP, ISBASIC) < %(GlobalGhostProb_Max)s)"
+                                                                  )% config
+                  
+
+  #Selection
+  return Selection(localname + "SelLooseXibc0",
+          Algorithm = _xibc,
+          RequiredSelections = _RequiredSelections);
+
+
+#################################################################################
+
+def makeX (localname, _RequiredSelections, config=default_config['CONFIG']):
+
+  _combinex = CombineParticles(localname + "HighMassState");
+  _combinex.DecayDescriptor = "[Xi_bc+ -> J/psi(1S) p+]cc"
+  _combinex.CombinationCut = ("(AM > %(HighMassBaryon_MassLowEdge)s ) &" +
+                              " (APT > %(HighMassBaryon_MinAPT)s ) " ) % config
+
+  _combinex.DaughtersCuts = { "p+" : ("(PT > %(ProtonsForHighMassBaryon_PT)s) &"+
+                                    " (PROBNNp > %(ProtonsForHighMassBaryon_ProbNNp)s) &"+
+                                    " (TRGHP < %(GlobalGhostProb_Max)s) &" +
+                                    " (TRPCHI2 > %(ProtonsForHighMassBaryon_TRPCHI2)s) & "+
+                                    " ( P > %(ProtonsForHighMassBaryon_P)s)") % config
+                          , "J/psi(1S)" : ("(PT > %(JpsiForHighMassBaryon_PT)s) & "+
+                                    "(ADMASS('J/psi(1S)') < %(JpsiForHighMassBaryon_MassWin)s) &"+
+                                    "(MAXTREE(TRGHP, ISBASIC) < %(GlobalGhostProb_Max)s) & "
+                                    "(MINTREE('mu+'==ABSID,PIDmu) > %(JpsiForHighMassBaryon_MuonPIDmu)s)"
+                                                                            ) % config
+     }
+  _combinex.MotherCut = "(ALL)" #No cut
+	
+  return Selection(localname + "SelHighMassBaryonicStates", Algorithm =_combinex, 
+                        RequiredSelections = _RequiredSelections);
+
+
+###################################################################################
+def makeXibc2JpsiKp (localname, _RequiredSelections, config=default_config['CONFIG'], controlLine=False):
+  myXibc = CombineParticles(localname+"Xibc2JpsipK");
+  myXibc.DecayDescriptor = "[Xi_bc0 -> J/psi(1S) p+ K-]cc"
+  if (controlLine == True):
+    myXibc.CombinationCut = ("(AM > %(JpsiKp_MassMin)s ) & " 
+                             "(AM < %(JpsiKp_MassLbThreshold)s)  " )%config
+  else:
+    myXibc.CombinationCut = ("(AM > %(JpsiKp_MassLbThreshold)s ) & " 
+                             "(AM < %(JpsiKp_MassMax)s  )  " )%config
+                                                                          
+  myXibc.MotherCut = ("(VFASPF(VCHI2/VDOF)< %(JpsiKp_MaxVertexChi2)s) & "
+                      "(BPVLTIME()> %(JpsiKp_MinTAU)s)"
+                      ) %config
+  myXibc.DaughtersCuts = {"J/psi(1S)" : ("(PT > %(JpsiKp_Jpsi_MinPT)s) & "+
+                                         "(ADMASS('J/psi(1S)') < %(JpsiKp_Jpsi_MassWin)s) &"+
+                                         "(MAXTREE(TRGHP, ISBASIC) < %(JpsiKp_mu_MaxTrackGhostProb)s) &"+
+                                         "(MINTREE('mu+'==ABSID,PIDmu) > %(JpsiKp_mu_MinPIDmu)s )" ) %config,
+                          "p+" : ("(PT > %(JpsiKp_p_MinPt)s) &"+
+                                  " (PROBNNp > %(JpsiKp_p_MinProbNNp)s) &"+
+                                  " (TRGHP < %(JpsiKp_p_MaxTrackGhostProb)s) &" +
+                                  " (TRPCHI2 > %(JpsiKp_p_MinTrackPvalue)s) & "+
+                                  " (P > %(JpsiKp_p_MinP)s )" ) %config,
+                          "K-" : ("(PT > %(JpsiKp_K_MinPT)s) &"+
+                                  "(PROBNNk > %(JpsiKp_K_MinProbNNk)s) &"+
+                                  "(TRGHP < %(JpsiKp_K_MaxTrackGhostProb)s )&" +
+                                  "(TRPCHI2 > %(JpsiKp_K_MinTrackPvalue)s) & "+
+                                  "(P > %(JpsiKp_K_MinP)s)") %config}
+
+
+  return Selection(localname + "Xibc2JpsipKSel", Algorithm=myXibc, 
+                      RequiredSelections = _RequiredSelections)
+                                
+
+
+###################################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXibcBDT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXibcBDT.py
new file mode 100644
index 000000000..ced3c225c
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXibcBDT.py
@@ -0,0 +1,836 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for the Doublely Heavy Flavour Baryons, Xibc,  
+Note:
+*. CPU-intensive cuts like IPCHI2 are not re-applied
+   if being identical to those in the common particles
+
+Include the following lines:
+Xibc+  -> p+ K- pi+ 
+Xibc+  -> D0 p+ K- pi+
+Xibc+  -> D+ p+ K-
+Xibc+  -> Lc+ K- pi+
+Xibc+  -> Lambda pi+
+-----------------------
+Xibc0  -> p+ K-
+Xibc0  -> D0 p+ K-
+Xibc0  -> Lambda phi
+Xibc0  -> Lc+ pi-
+Xibc0  -> Lc+ K-
+Xibc0  -> Lb+ K- pi+
+'''
+
+__author__=['Jibo He']
+__date__ = '20/11/2016'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'XibcBDTConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              :  'XibcBDT',
+    'BUILDERTYPE'       :  'XibcBDTConf',
+    'CONFIG'    : {
+        'PionCuts'      : "(PROBNNpi> 0.2) & (PT>200*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>1.)",
+        'KaonCuts'      : "(PROBNNk > 0.1) & (PT>250*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>1.)",
+        'ProtonCuts'    : "(PROBNNp> 0.05) & (PT>300*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>1.)",
+
+        'DplusCuts'     : "(ADMASS('D+')<75*MeV) & (VFASPF(VCHI2/VDOF) < 25.) & (PT>1.0*GeV) & (BPVVDCHI2>100)",
+        'D0Cuts'        : "(ADMASS('D0')<75*MeV) & (VFASPF(VCHI2/VDOF) < 25.) & (PT>1.0*GeV) & (BPVVDCHI2>64)",
+    
+        'LcComCuts'     : "(APT>1.0*GeV) & (ADAMASS('Lambda_c+')<50*MeV) & (ADOCACHI2CUT(30, ''))",
+        'LcMomCuts'     : "(ADMASS('Lambda_c+')<30*MeV) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVVDCHI2>16)",
+
+        'LambdaDDCuts'   : "(ADMASS('Lambda0') < 30.*MeV) & (BPVVDCHI2>25)",
+        'LambdaLLComCuts': "(ADAMASS('Lambda0')<50*MeV) & (ADOCACHI2CUT(30, ''))",
+        'LambdaLLCuts'   : "(ADMASS('Lambda0') < 30.*MeV) & (BPVVDCHI2>25) & (VFASPF(VCHI2) < 25.)",
+
+        'PhiCuts'       : """
+                          (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<1.05*GeV) & (MIPCHI2DV(PRIMARY)>2.)
+                          & (INTREE( (ID=='K+') & (PT>200*MeV) & (TRGHOSTPROB<0.4) ))
+                          & (INTREE( (ID=='K-') & (PT>200*MeV) & (TRGHOSTPROB<0.4) ))
+                          """ ,
+
+        'UnPionCuts'    : "(PROBNNpi> 0.2) & (PT>200*MeV) & (TRGHOSTPROB<0.4)",  
+        'UnKaonCuts'    : "(PROBNNk > 0.1) & (PT>250*MeV) & (TRGHOSTPROB<0.4)",
+        'UnProtonCuts'  : "(PROBNNp> 0.05) & (PT>300*MeV) & (TRGHOSTPROB<0.4)",
+
+        'UnPTPionCuts'    : "(PROBNNpi> 0.2) & (PT>500*MeV) & (TRGHOSTPROB<0.4)",  
+        'UnPTKaonCuts'    : "(PROBNNk > 0.1) & (PT>600*MeV) & (TRGHOSTPROB<0.4)",
+        'UnPTProtonCuts'  : "(PROBNNp> 0.05) & (PT>750*MeV) & (TRGHOSTPROB<0.4)",    
+
+        'TightPionCuts'   : "(PROBNNpi> 0.2) & (PT>200*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>2.)",
+        'TightKaonCuts'   : "(PROBNNk > 0.1) & (PT>250*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>2.)",
+        'TightProtonCuts' : "(PROBNNp> 0.05) & (PT>300*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>2.)",
+
+        'HighPTPionCuts'   : "(PROBNNpi> 0.2) & (PT>0.5*GeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>1.)",
+        'HighPTKaonCuts'   : "(PROBNNk > 0.1) & (PT>1.0*GeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>1.)",
+        'HighPTProtonCuts' : "(PROBNNp> 0.05) & (PT>1.0*GeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>1.)",
+
+        'Pion4LPCuts'   : "(PROBNNpi> 0.2) & (PT>100*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>9.)",
+        
+        'XibcComCuts'   : "(AM>4.8*GeV)",
+        'XibcMomCuts'   : "(M>5.0*GeV) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVIPCHI2()<25) & (BPVDIRA> 0.99)",
+        'XibcLPMomCuts' : "(M>5.0*GeV) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVIPCHI2()<25)",
+
+        'LbComCuts'     : "(APT>1.0*GeV) & (ADAMASS('Lambda_b0')<80*MeV) & (ADOCACHI2CUT(30, ''))",
+        'LbMomCuts'     : "(ADMASS('Lambda_b0')<60*MeV) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVVDCHI2>64)",
+
+        'XibcP2pKpiMVACut'   :  "0.14",
+        'XibcP2pKpiXmlFile'  :  '$TMVAWEIGHTSROOT/data/XibcP2pKpi_BDT_v1r0.xml',
+
+        'XibcP2D0pKpiMVACut'   :  "-0.05",
+        'XibcP2D0pKpiXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccP2D0pKpi_BDT_v1r0.xml', # use Xicc one
+
+        'XibcP2DpKMVACut'   :  "0.02",
+        'XibcP2DpKXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccP2DpK_BDT_v1r0.xml',  #use Xicc one
+
+        'XibcP2LcKpiMVACut'   :  "0.10",
+        'XibcP2LcKpiXmlFile'  :  '$TMVAWEIGHTSROOT/data/XibcP2LcKpi_BDT_v1r0.xml',
+
+        'XibcP2LambdaPiMVACut'   :  "0.1",
+        'XibcP2LambdaPiXmlFile'  :  '$TMVAWEIGHTSROOT/data/XibcP2LambdaPi_BDT_v1r0.xml',
+
+        'Xibc2pKMVACut'   :  "0.",
+        'Xibc2pKXmlFile'  :  '$TMVAWEIGHTSROOT/data/Xibc2pK_BDT_v1r0.xml',
+
+        'Xibc2D0pKMVACut'   :  "0.05",
+        'Xibc2D0pKXmlFile'  :  '$TMVAWEIGHTSROOT/data/Xibc2D0pK_BDT_v1r0.xml',
+
+        'Xibc2LambdaPhiMVACut'   :  "-0.1",
+        'Xibc2LambdaPhiXmlFile'  :  '$TMVAWEIGHTSROOT/data/Xibc2LambdaPhi_BDT_v1r0.xml',
+
+        'Xibc2LcPiMVACut'   :  "0.",
+        'Xibc2LcKMVACut'    :  "-0.01",
+        'Xibc2LcPiXmlFile'  :  '$TMVAWEIGHTSROOT/data/Xibc2LcPi_BDT_v1r0.xml',
+
+        'Xibc2LbKpiMVACut'   :  "-0.3",
+        'Xibc2LbKpiXmlFile'  :  '$TMVAWEIGHTSROOT/data/Xibc2LbKpi_BDT_v1r0.xml'
+        },
+    'STREAMS'           : ['Bhadron' ],
+    'WGs'               : ['BandQ']
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+from PhysSelPython.Wrappers import Selection, MergedSelection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class XibcBDTConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+                
+        """
+        Basic particles, long tracks
+        """
+        from StandardParticles import StdAllLooseANNPions, StdAllLooseANNKaons, StdAllLooseANNProtons
+        
+        self.SelPions = self.createSubSel( OutputList = self.name + "SelPions",
+                                           InputList =  StdAllLooseANNPions , 
+                                           Cuts = config['PionCuts']
+                                           )
+        
+        self.SelKaons = self.createSubSel( OutputList = self.name + "SelKaons",
+                                           InputList = StdAllLooseANNKaons, 
+                                           Cuts = config['KaonCuts']
+                                           )
+                                                   
+        self.SelProtons = self.createSubSel( OutputList = self.name + "SelProtons",
+                                             InputList = StdAllLooseANNProtons, 
+                                             Cuts = config['ProtonCuts']
+                                             )
+
+        #from StandardParticles import StdAllLooseANNPions
+        self.SelUnPions = self.createSubSel( OutputList = self.name + "SelUnPions",
+                                               InputList =  StdAllLooseANNPions , 
+                                               Cuts = config['UnPionCuts']
+                                               )
+        
+        self.SelUnKaons = self.createSubSel( OutputList = self.name + "SelUnKaons",
+                                               InputList =  StdAllLooseANNKaons , 
+                                               Cuts = config['UnKaonCuts']
+                                               )
+        self.SelUnProtons = self.createSubSel( OutputList = self.name + "SelUnProtons",
+                                                 InputList =  StdAllLooseANNProtons , 
+                                                 Cuts = config['UnProtonCuts']
+                                                 )
+
+        """
+        Unbiased but with moderate PT
+        """
+        self.SelUnPTPions = self.createSubSel( OutputList = self.name + "SelUnPTPions",
+                                               InputList =  StdAllLooseANNPions , 
+                                               Cuts = config['UnPTPionCuts']
+                                               )
+        
+        self.SelUnPTKaons = self.createSubSel( OutputList = self.name + "SelUnPTKaons",
+                                               InputList =  StdAllLooseANNKaons , 
+                                               Cuts = config['UnPTKaonCuts']
+                                               )
+        self.SelUnPTProtons = self.createSubSel( OutputList = self.name + "SelUnPTProtons",
+                                                 InputList =  StdAllLooseANNProtons , 
+                                                 Cuts = config['UnPTProtonCuts']
+                                                 )
+        
+        """
+        With IPCHI2
+        """
+        self.SelTightPions = self.createSubSel( OutputList = self.name + "SelTightPions",
+                                                    InputList =  StdAllLooseANNPions , 
+                                                    Cuts = config['TightPionCuts']
+                                                    )
+        
+        self.SelTightKaons = self.createSubSel( OutputList = self.name + "SelTightKaons",
+                                                    InputList =  StdAllLooseANNKaons , 
+                                                    Cuts = config['TightKaonCuts']
+                                                    )
+
+        """
+        With high PT cut, also IPCHI2
+        """
+        self.SelHighPTPions = self.createSubSel( OutputList = self.name + "SelHighPTPions",
+                                                 InputList =  StdAllLooseANNPions , 
+                                                 Cuts = config['HighPTPionCuts']
+                                                 )
+        
+        self.SelHighPTKaons = self.createSubSel( OutputList = self.name + "SelHighPTKaons",
+                                                 InputList =  StdAllLooseANNKaons , 
+                                                 Cuts = config['HighPTKaonCuts']
+                                                 )
+
+        self.SelHighPTProtons = self.createSubSel( OutputList = self.name + "SelHighPTProtons",
+                                                 InputList =  StdAllLooseANNProtons , 
+                                                 Cuts = config['HighPTProtonCuts']
+                                                 )
+
+        """
+        Pion for very long lived particle 
+        """
+        self.SelPions4LP = self.createSubSel( OutputList = self.name + "SelPions4LP",
+                                              InputList =  StdAllLooseANNPions , 
+                                              Cuts = config['Pion4LPCuts']
+                                              )
+        
+        """
+        Dplus->K pi pi 
+        """
+        self.SelDplus = self.createSubSel( OutputList = self.name + "SelDplus",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLooseDplus2KPiPi/Particles' ), 
+                                           Cuts = config['DplusCuts']
+                                           )
+
+        """
+        D0->K pi
+        """
+        self.SelD0 = self.createSubSel( OutputList = self.name + "SelD0",
+                                        InputList =  DataOnDemand(Location = 'Phys/StdLooseD02KPi/Particles' ), 
+                                        Cuts = config['D0Cuts']
+                                        )
+        
+        """
+        LambdaC->p K pi
+        """
+        self.SelLambdaC = self.createCombinationSel( OutputList = self.name + "SelLambdaC",
+                                                     DecayDescriptor = "[ Lambda_c+ -> p+  K-  pi+ ]cc",
+                                                     DaughterLists = [ self.SelProtons,
+                                                                       self.SelKaons,
+                                                                       self.SelPions ],                    
+                                                     PreVertexCuts  = config['LcComCuts'],
+                                                     PostVertexCuts = config['LcMomCuts'] )
+
+        
+        """
+        Lambda_b -> LambdaC pi
+        """
+        self.SelLambdaB = self.createCombinationSel( OutputList = self.name + "SelLambdaB",
+                                                     DecayDescriptor = "[ Lambda_b0 -> Lambda_c+  pi- ]cc",
+                                                     DaughterLists = [ self.SelLambdaC,
+                                                                       self.SelHighPTPions ],                    
+                                                     PreVertexCuts  = config['LbComCuts'],
+                                                     PostVertexCuts = config['LbMomCuts'] )
+
+        
+        """
+        Lambda, both LL and DD
+        """
+        from StandardParticles import StdLooseLambdaDD
+
+        self.SelLambdaDD = self.createSubSel( OutputList = self.name + "SelLambdaDD",
+                                              InputList = StdLooseLambdaDD,
+                                              Cuts = config['LambdaDDCuts'] )
+
+        self.SelLambdaLL = self.createCombinationSel( OutputList = self.name + "SelLambdaLL",
+                                                      DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                                      DaughterLists = [ self.SelProtons, self.SelPions4LP ],   
+                                                      PreVertexCuts  = config['LambdaLLComCuts'],
+                                                      PostVertexCuts = config['LambdaLLCuts'] )
+        
+        self.SelLambda = MergedSelection( self.name + "SelLambda",
+                                          RequiredSelections = [ self.SelLambdaDD,
+                                                                 self.SelLambdaLL ] )
+
+
+        """
+        Phi 
+        """
+        from StandardParticles import StdLoosePhi2KK
+        
+        self.SelPhi = self.createSubSel( OutputList = self.name + "SelPhi",
+                                         InputList =  StdLoosePhi2KK, 
+                                         Cuts = config['PhiCuts']
+                                         )
+
+
+        #
+        # Stripping lines 
+        # 
+        """
+        -------------------------------------------
+        Xibc+
+        -------------------------------------------
+
+        """
+
+        """
+        XibcP2pKpi 
+        """
+        self.XibcP2pKpiVars = {
+            "sqrt(P_IPCHI2_OWNPV)"        : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(Kaon_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(Pion_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(P_IPCHI2_OWNPV+Kaon_IPCHI2_OWNPV+Pion_IPCHI2_OWNPV)" : "sqrt( CHILD(MIPCHI2DV(),1) + CHILD(MIPCHI2DV(),2) + CHILD(MIPCHI2DV(),3) )",
+            "sqrt(C_IPCHI2_OWNPV)"        : "sqrt(BPVIPCHI2())", 
+            "log(P_PT)"                   : "log(CHILD(PT, 1))",
+            "log(Kaon_PT)"                : "log(CHILD(PT, 2))",
+            "log(Pion_PT)"                : "log(CHILD(PT, 3))",
+            "log(P_PT+Kaon_PT+Pion_PT)"   : "log( CHILD(PT, 1) + CHILD(PT, 2) + CHILD(PT, 3) )",
+            "log(C_PT)"                   : "log(PT)",
+            "sqrt(C_FDCHI2_OWNPV)"        : "sqrt(BPVVDCHI2)", 
+            "C_DIRA_OWNPV"                : "BPVDIRA"
+            }
+        
+        self.SelXibcP2pKpi = self.createCombinationSel( OutputList = self.name + "SelXibcP2pKpi",
+                                                        DecayDescriptor = "[ Xi_bc+ -> p+ K- pi+ ]cc",
+                                                        DaughterLists = [ self.SelHighPTProtons,
+                                                                          self.SelHighPTKaons,
+                                                                          self.SelPions ],
+                                                        PreVertexCuts  = config['XibcComCuts'],
+                                                        PostVertexCuts = config['XibcMomCuts'] )
+        
+        
+        self.MvaXibcP2pKpi = self.applyMVA( self.name + "MvaXibcP2pKpi",
+                                           SelB        = self.SelXibcP2pKpi,
+                                           MVAVars     = self.XibcP2pKpiVars,
+                                           MVACutValue = config['XibcP2pKpiMVACut'], 
+                                           MVAxmlFile  = config['XibcP2pKpiXmlFile']
+                                           )
+        
+        self.XibcP2pKpiLine = StrippingLine( self.name + '_XibcP2pKpiLine',                                               
+                                            algos     = [ self.MvaXibcP2pKpi ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.XibcP2pKpiLine )
+
+
+        """
+        XibcP2D0pKpi
+        """
+        # No MC, use Xicc one
+        self.XibcP2D0pKpiVars = {
+            "sqrt(DK_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(DPi_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(D_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccP_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(XiccK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(XiccPi_IPCHI2_OWNPV)"  : "sqrt(CHILD(MIPCHI2DV(), 4 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(DK_PT)"                 : "log(CHILD(PT, 1, 1))", 
+            "log(DPi_PT)"                : "log(CHILD(PT, 1, 2))", 
+            "log(D_PT)"                  : "log(CHILD(PT, 1))",   
+            "log(XiccP_PT)"              : "log(CHILD(PT, 2))",
+            "log(XiccK_PT)"              : "log(CHILD(PT, 3))",
+            "log(XiccPi_PT)"             : "log(CHILD(PT, 4))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(D_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+        self.SelXibcP2D0pKpi = self.createCombinationSel( OutputList = self.name + "SelXibcP2D0pKpi",
+                                                          DecayDescriptor = "[ Xi_bc+ -> D0 p+ K- pi+ ]cc",
+                                                          DaughterLists = [ self.SelD0,
+                                                                            self.SelUnProtons,
+                                                                            self.SelUnKaons,
+                                                                            self.SelHighPTPions ],  # w/ IPchi2 cut to speed up
+                                                          PreVertexCuts  = config['XibcComCuts'],
+                                                          PostVertexCuts = config['XibcMomCuts'] )
+              
+        self.MvaXibcP2D0pKpi = self.applyMVA( self.name + "MvaXibcP2D0pKpi",
+                                           SelB        = self.SelXibcP2D0pKpi,
+                                           MVAVars     = self.XibcP2D0pKpiVars,
+                                           MVACutValue = config['XibcP2D0pKpiMVACut'], 
+                                           MVAxmlFile  = config['XibcP2D0pKpiXmlFile']
+                                           )
+        
+        self.XibcP2D0pKpiLine = StrippingLine( self.name + '_XibcP2D0pKpiLine',                                               
+                                                 algos     = [ self.MvaXibcP2D0pKpi ],
+                                                 MDSTFlag  = False
+                                               )
+        
+        self.registerLine( self.XibcP2D0pKpiLine )
+
+
+        """
+        XibcP2DpK
+        """
+        # No MC, use Xicc one
+        self.XibcP2DpKVars = {
+            "sqrt(DK_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(DPi1_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(DPi2_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 3))",
+            "sqrt(D_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccP_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(XiccK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(DK_PT)"                 : "log(CHILD(PT, 1, 1))", 
+            "log(DPi1_PT)"               : "log(CHILD(PT, 1, 2))", 
+            "log(DPi2_PT)"               : "log(CHILD(PT, 1, 3))", 
+            "log(D_PT)"                  : "log(CHILD(PT, 1))",   
+            "log(XiccP_PT)"              : "log(CHILD(PT, 2))",
+            "log(XiccK_PT)"              : "log(CHILD(PT, 3))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(D_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+        self.SelXibcP2DpK = self.createCombinationSel( OutputList = self.name + "SelXibcP2DpK",
+                                                          DecayDescriptor = "[ Xi_bc+ -> D+ p+ K- ]cc",
+                                                          DaughterLists = [ self.SelDplus,
+                                                                            self.SelUnProtons,
+                                                                            self.SelUnKaons ], 
+                                                          PreVertexCuts  = config['XibcComCuts'],
+                                                          PostVertexCuts = config['XibcMomCuts'] )
+        
+        self.MvaXibcP2DpK = self.applyMVA( self.name + "MvaXibcP2DpK",
+                                           SelB        = self.SelXibcP2DpK,
+                                           MVAVars     = self.XibcP2DpKVars,
+                                           MVACutValue = config['XibcP2DpKMVACut'], 
+                                           MVAxmlFile  = config['XibcP2DpKXmlFile']
+                                           )
+        
+        self.XibcP2DpKLine = StrippingLine( self.name + '_XibcP2DpKLine',                                               
+                                                 algos     = [ self.MvaXibcP2DpK ],
+                                                 MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.XibcP2DpKLine )
+
+
+        """
+        XibcP2LcKpi
+        """
+        self.XibcP2LcKpiVars = {
+            "sqrt(LcP_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(LcPi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 3))",
+            "sqrt(LcK_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Lc_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XibcPi_IPCHI2_OWNPV)"  : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(XibcK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(LcP_PT)"                : "log(CHILD(PT, 1, 1))", 
+            "log(LcPi_PT)"               : "log(CHILD(PT, 1, 3))", 
+            "log(LcK_PT)"                : "log(CHILD(PT, 1, 2))", 
+            "log(Lc_PT)"                 : "log(CHILD(PT, 1))",   
+            "log(XibcPi_PT)"             : "log(CHILD(PT, 3))",
+            "log(XibcK_PT)"              : "log(CHILD(PT, 2))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(Lc_FDCHI2_OWNPV)"      : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+        self.SelXibcP2LcKpi = self.createCombinationSel( OutputList = self.name + "SelXibcP2LcKpi",
+                                                         DecayDescriptor = "[ Xi_bc+ -> Lambda_c+ K- pi+ ]cc",
+                                                         DaughterLists = [ self.SelLambdaC,
+                                                                           self.SelUnKaons,
+                                                                           self.SelUnPions ],
+                                                         PreVertexCuts  = config['XibcComCuts'],
+                                                         PostVertexCuts = config['XibcMomCuts'] )
+        
+        self.MvaXibcP2LcKpi = self.applyMVA( self.name + "MvaXibcP2LcKpi",
+                                           SelB        = self.SelXibcP2LcKpi,
+                                           MVAVars     = self.XibcP2LcKpiVars,
+                                           MVACutValue = config['XibcP2LcKpiMVACut'], 
+                                           MVAxmlFile  = config['XibcP2LcKpiXmlFile']
+                                           )
+        
+        self.XibcP2LcKpiLine = StrippingLine( self.name + '_XibcP2LcKpiLine',                                               
+                                                 algos     = [ self.MvaXibcP2LcKpi ],
+                                                 MDSTFlag  = False
+                                                 )
+        
+        self.registerLine( self.XibcP2LcKpiLine )
+
+
+
+        """
+        XibcP2LambdaPi
+        """
+        self.XibcP2LambdaPiVars = {
+            "sqrt(LP_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(LPi_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Pi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "log(LP_PT)"               : "log(CHILD(PT, 1, 1))",
+            "log(LPi_PT)"              : "log(CHILD(PT, 1, 2))", 
+            "log(Lambda_PT)"           : "log(CHILD(PT, 1))",
+            "log(Pi_PT)"               : "log(CHILD(PT, 2))",
+            "sqrt(Lambda_FDCHI2_OWNPV)": "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"     : "sqrt(BPVVDCHI2)",
+            "sqrt(C_IPCHI2_OWNPV)"     : "sqrt(BPVIPCHI2())" 
+            }
+        
+        self.SelXibcP2LambdaPi = self.createCombinationSel( OutputList = self.name + "SelXibcP2LambdaPi",
+                                                         DecayDescriptor = "[ Xi_bc+ -> Lambda0 pi+ ]cc",
+                                                         DaughterLists = [ self.SelLambda,
+                                                                           self.SelUnPions ],
+                                                         PreVertexCuts  = config['XibcComCuts'],
+                                                         PostVertexCuts = config['XibcLPMomCuts'] )
+        
+        self.MvaXibcP2LambdaPi = self.applyMVA( self.name + "MvaXibcP2LambdaPi",
+                                           SelB        = self.SelXibcP2LambdaPi,
+                                           MVAVars     = self.XibcP2LambdaPiVars,
+                                           MVACutValue = config['XibcP2LambdaPiMVACut'], 
+                                           MVAxmlFile  = config['XibcP2LambdaPiXmlFile']
+                                           )
+        
+        self.XibcP2LambdaPiLine = StrippingLine( self.name + '_XibcP2LambdaPiLine',                                               
+                                                 algos     = [ self.MvaXibcP2LambdaPi ],
+                                                 MDSTFlag  = False
+                                                 )
+        
+        self.registerLine( self.XibcP2LambdaPiLine )
+
+
+
+        """
+        -------------------------------------------
+        Xibc0
+        -------------------------------------------
+
+        """
+
+        """
+        Xibc2pK 
+        """
+        self.Xibc2pKVars = {
+            "sqrt(P_IPCHI2_OWNPV)"        : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(K_IPCHI2_OWNPV)"        : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(P_IPCHI2_OWNPV+K_IPCHI2_OWNPV)" : "sqrt( CHILD(MIPCHI2DV(),1) + CHILD(MIPCHI2DV(),2) )",
+            "sqrt(C_IPCHI2_OWNPV)"        : "sqrt(BPVIPCHI2())", 
+            "log(P_PT)"                   : "log(CHILD(PT, 1))",
+            "log(K_PT)"                   : "log(CHILD(PT, 2))",
+            "log(P_PT+K_PT)"              : "log( CHILD(PT, 1) + CHILD(PT, 2) )",
+            "log(C_PT)"                   : "log(PT)",
+            "sqrt(C_FDCHI2_OWNPV)"        : "sqrt(BPVVDCHI2)", 
+            "C_DIRA_OWNPV"                : "BPVDIRA"
+            }
+        self.SelXibc2pK = self.createCombinationSel( OutputList = self.name + "SelXibc2pK",
+                                                     DecayDescriptor = "[ Xi_bc0 -> p+ K- ]cc",
+                                                     DaughterLists = [ self.SelHighPTProtons,
+                                                                       self.SelHighPTKaons
+                                                                       ],
+                                                     PreVertexCuts  = config['XibcComCuts'],
+                                                     PostVertexCuts = config['XibcMomCuts'] )
+        
+        
+        self.MvaXibc2pK = self.applyMVA( self.name + "MvaXibc2pK",
+                                           SelB        = self.SelXibc2pK,
+                                           MVAVars     = self.Xibc2pKVars,
+                                           MVACutValue = config['Xibc2pKMVACut'], 
+                                           MVAxmlFile  = config['Xibc2pKXmlFile']
+                                           )
+        
+        self.Xibc2pKLine = StrippingLine( self.name + '_Xibc2pKLine',                                               
+                                            algos     = [ self.MvaXibc2pK ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.Xibc2pKLine )
+
+
+        """
+        Xibc2D0pK
+        """
+        self.Xibc2D0pKVars = {
+            "sqrt(DK_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(DPi_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(D_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XibcP_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(XibcK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(DK_PT)"                 : "log(CHILD(PT, 1, 1))", 
+            "log(DPi_PT)"                : "log(CHILD(PT, 1, 2))", 
+            "log(D_PT)"                  : "log(CHILD(PT, 1))",   
+            "log(XibcP_PT)"              : "log(CHILD(PT, 2))",
+            "log(XibcK_PT)"              : "log(CHILD(PT, 3))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(D_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+        self.SelXibc2D0pK = self.createCombinationSel( OutputList = self.name + "SelXibc2D0pK",
+                                                       DecayDescriptor = "[ Xi_bc0 -> D0 p+ K- ]cc",
+                                                       DaughterLists = [ self.SelD0,
+                                                                         self.SelUnProtons,
+                                                                         self.SelUnKaons ], 
+                                                       PreVertexCuts  = config['XibcComCuts'],
+                                                       PostVertexCuts = config['XibcMomCuts'] )
+        
+        self.MvaXibc2D0pK = self.applyMVA( self.name + "MvaXibc2D0pK",
+                                           SelB        = self.SelXibc2D0pK,
+                                           MVAVars     = self.Xibc2D0pKVars,
+                                           MVACutValue = config['Xibc2D0pKMVACut'], 
+                                           MVAxmlFile  = config['Xibc2D0pKXmlFile']
+                                           )
+ 
+        self.Xibc2D0pKLine = StrippingLine( self.name + '_Xibc2D0pKLine',                                               
+                                            algos     = [ self.MvaXibc2D0pK ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.Xibc2D0pKLine )
+
+
+        """
+        Xibc2LambdaPhi
+        """
+        self.Xibc2LambdaPhiVars = {
+            "sqrt(LP_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(LPi_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(KaonP_IPCHI2_OWNPV)" : "sqrt(CHILD(MIPCHI2DV(), 2, 1))",
+            "sqrt(KaonM_IPCHI2_OWNPV)" : "sqrt(CHILD(MIPCHI2DV(), 2, 2))",
+            "sqrt(Phi_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "log(LP_PT)"               : "log(CHILD(PT, 1, 1))",
+            "log(LPi_PT)"              : "log(CHILD(PT, 1, 2))",
+            "log(KaonP_PT)"            : "log(CHILD(PT, 2, 1))",
+            "log(KaonM_PT)"            : "log(CHILD(PT, 2, 2))",
+            "log(Lambda_PT)"           : "log(CHILD(PT, 1))",
+            "log(Phi_PT)"              : "log(CHILD(PT, 2))",
+            "sqrt(Lambda_FDCHI2_OWNPV)": "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(Phi_FDCHI2_OWNPV)"   : "sqrt(CHILD(BPVVDCHI2,2))",
+            "sqrt(C_FDCHI2_OWNPV)"     : "sqrt(BPVVDCHI2)",
+            "sqrt(C_IPCHI2_OWNPV)"     : "sqrt(BPVIPCHI2())" 
+            }
+        self.SelXibc2LambdaPhi = self.createCombinationSel( OutputList = self.name + "SelXibc2LambdaPhi",
+                                                            DecayDescriptor = "[ Xi_bc0 -> Lambda0 phi(1020) ]cc",
+                                                            DaughterLists = [ self.SelLambda,
+                                                                              self.SelPhi ],
+                                                            PreVertexCuts  = config['XibcComCuts'],
+                                                            PostVertexCuts = config['XibcLPMomCuts'] )
+        
+        self.MvaXibc2LambdaPhi = self.applyMVA( self.name + "MvaXibc2LambdaPhi",
+                                           SelB        = self.SelXibc2LambdaPhi,
+                                           MVAVars     = self.Xibc2LambdaPhiVars,
+                                           MVACutValue = config['Xibc2LambdaPhiMVACut'], 
+                                           MVAxmlFile  = config['Xibc2LambdaPhiXmlFile']
+                                           )
+        
+        self.Xibc2LambdaPhiLine = StrippingLine( self.name + '_Xibc2LambdaPhiLine',                                               
+                                                 algos     = [ self.MvaXibc2LambdaPhi ],
+                                                 MDSTFlag  = False
+                                                 )
+        
+        self.registerLine( self.Xibc2LambdaPhiLine )
+
+
+        """
+        Xibc2LcPi
+        """
+        self.Xibc2LcPiVars = {
+            "sqrt(LcP_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(LcPi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 3))",
+            "sqrt(LcK_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Lc_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XibcPi_IPCHI2_OWNPV)"  : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(LcP_PT)"                : "log(CHILD(PT, 1, 1))", 
+            "log(LcPi_PT)"               : "log(CHILD(PT, 1, 3))", 
+            "log(LcK_PT)"                : "log(CHILD(PT, 1, 2))", 
+            "log(Lc_PT)"                 : "log(CHILD(PT, 1))",
+            "log(XibcPi_PT)"             : "log(CHILD(PT, 2))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(Lc_FDCHI2_OWNPV)"      : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+        self.SelXibc2LcPi = self.createCombinationSel( OutputList = self.name + "SelXibc2LcPi",
+                                                         DecayDescriptor = "[ Xi_bc0 -> Lambda_c+ pi- ]cc",
+                                                         DaughterLists = [ self.SelLambdaC,
+                                                                           self.SelUnPions ],
+                                                         PreVertexCuts  = config['XibcComCuts'],
+                                                         PostVertexCuts = config['XibcMomCuts'] )
+
+        self.MvaXibc2LcPi = self.applyMVA( self.name + "MvaXibc2LcPi",
+                                           SelB        = self.SelXibc2LcPi,
+                                           MVAVars     = self.Xibc2LcPiVars,
+                                           MVACutValue = config['Xibc2LcPiMVACut'], 
+                                           MVAxmlFile  = config['Xibc2LcPiXmlFile']
+                                           )
+        
+        self.Xibc2LcPiLine = StrippingLine( self.name + '_Xibc2LcPiLine',                                               
+                                            algos     = [ self.MvaXibc2LcPi ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.Xibc2LcPiLine )
+
+
+        """
+        Xibc2LcK
+        """
+        # Use the same as LcPi
+        self.SelXibc2LcK = self.createCombinationSel( OutputList = self.name + "SelXibc2LcK",
+                                                      DecayDescriptor = "[ Xi_bc0 -> Lambda_c+ K- ]cc",
+                                                      DaughterLists = [ self.SelLambdaC,
+                                                                        self.SelUnKaons ],
+                                                      PreVertexCuts  = config['XibcComCuts'],
+                                                      PostVertexCuts = config['XibcMomCuts'] )
+              
+        self.MvaXibc2LcK = self.applyMVA( self.name + "MvaXibc2LcK",
+                                           SelB        = self.SelXibc2LcK,
+                                           MVAVars     = self.Xibc2LcPiVars,
+                                           MVACutValue = config['Xibc2LcKMVACut'], 
+                                           MVAxmlFile  = config['Xibc2LcPiXmlFile']
+                                           )
+        
+        self.Xibc2LcKLine = StrippingLine( self.name + '_Xibc2LcKLine',                                               
+                                            algos     = [ self.MvaXibc2LcK ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.Xibc2LcKLine )
+        
+
+
+        """
+        Xibc2LbKpi
+        """
+        self.Xibc2LbKpiVars = {
+            "sqrt(LcP_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 1, 1))",
+            "sqrt(LcPi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 1, 3))",
+            "sqrt(LcK_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 1, 2))",
+            "sqrt(Lc_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(LbPi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Lb_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XibcPi_IPCHI2_OWNPV)"  : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(XibcK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(LcP_PT)"                : "log(CHILD(PT, 1, 1, 1))", 
+            "log(LcPi_PT)"               : "log(CHILD(PT, 1, 1, 3))", 
+            "log(LcK_PT)"                : "log(CHILD(PT, 1, 1, 2))",            
+            "log(Lc_PT)"                 : "log(CHILD(PT, 1, 1))",
+            "log(LbPi_PT)"               : "log(CHILD(PT, 1, 2))",
+            "log(Lb_PT)"                 : "log(CHILD(PT, 1))",  
+            "log(XibcPi_PT)"             : "log(CHILD(PT, 3))",
+            "log(XibcK_PT)"              : "log(CHILD(PT, 2))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(Lc_FDCHI2_OWNPV)"      : "sqrt(CHILD(BPVVDCHI2, 1, 1))",
+            "sqrt(Lb_FDCHI2_OWNPV)"      : "sqrt(CHILD(BPVVDCHI2, 1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+        self.SelXibc2LbKpi = self.createCombinationSel( OutputList = self.name + "SelXibc2LbKpi",
+                                                        DecayDescriptor = "[ Xi_bc0 -> Lambda_b0 K- pi+ ]cc",
+                                                        DaughterLists = [ self.SelLambdaB,
+                                                                          self.SelUnKaons,
+                                                                          self.SelUnPions ],
+                                                        PreVertexCuts  = config['XibcComCuts'],
+                                                        PostVertexCuts = config['XibcMomCuts'] )
+        
+        self.MvaXibc2LbKpi = self.applyMVA( self.name + "MvaXibc2LbKpi",
+                                           SelB        = self.SelXibc2LbKpi,
+                                           MVAVars     = self.Xibc2LbKpiVars,
+                                           MVACutValue = config['Xibc2LbKpiMVACut'], 
+                                           MVAxmlFile  = config['Xibc2LbKpiXmlFile']
+                                           )
+    
+        self.Xibc2LbKpiLine = StrippingLine( self.name + '_Xibc2LbKpiLine',                                               
+                                                 algos     = [ self.MvaXibc2LbKpi ],
+                                                 MDSTFlag  = False
+                                                 )
+        
+        self.registerLine( self.Xibc2LbKpiLine )
+        
+
+
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXiccBDT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXiccBDT.py
new file mode 100644
index 000000000..f20e7093d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/StrippingXiccBDT.py
@@ -0,0 +1,673 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for the Doublely Heavy Flavour Baryons, Xicc,  
+Note:
+*. CPU-intensive cuts like IPCHI2 are not re-applied
+   if being identical to those in the common particles
+
+Include the following lines:
+Xicc++ -> Lc+ pi+
+Xicc++ -> Lc+ K- pi+ pi+
+Xicc++ -> D+ p+
+Xicc++ -> D+ p+ K- pi+
+Xicc++ -> D0 p+ K- pi+ pi+
+---------------------------
+Xicc+  -> Lc+ K- pi+ 
+Xicc+  -> D0 p+
+Xicc+  -> D0 p+ K- pi+
+Xicc+  -> D+ p+ K- 
+'''
+
+__author__=['Jibo He']
+__date__ = '20/11/2016'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'XiccBDTConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              :  'XiccBDT',
+    'BUILDERTYPE'       :  'XiccBDTConf',
+    'CONFIG'    : {
+        'PionCuts'      : "(PROBNNpi> 0.2) & (PT>200*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>1.)",
+        'KaonCuts'      : "(PROBNNk > 0.1) & (PT>250*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>1.)",
+        'ProtonCuts'    : "(PROBNNp> 0.05) & (PT>300*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>1.)",
+
+        'DplusCuts'     : "(ADMASS('D+')<75*MeV) & (VFASPF(VCHI2/VDOF) < 25.) & (PT>1.0*GeV) & (BPVVDCHI2>100)",
+        'D0Cuts'        : "(ADMASS('D0')<75*MeV) & (VFASPF(VCHI2/VDOF) < 25.) & (PT>1.0*GeV) & (BPVVDCHI2>64)",
+    
+        'LcComCuts'     : "(APT>1.0*GeV) & ((ADAMASS('Lambda_c+')<50*MeV) | (ADAMASS('Xi_c+')<50*MeV)) & (ADOCACHI2CUT(30, ''))",
+        'LcMomCuts'     : "((ADMASS('Lambda_c+')<20*MeV) | (ADMASS('Xi_c+')<20*MeV)) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVVDCHI2>16)",
+        
+        'UnPionCuts'    : "(PROBNNpi> 0.2) & (PT>200*MeV) & (TRGHOSTPROB<0.4)",  
+        'UnKaonCuts'    : "(PROBNNk > 0.1) & (PT>250*MeV) & (TRGHOSTPROB<0.4)",
+        'UnProtonCuts'  : "(PROBNNp> 0.05) & (PT>300*MeV) & (TRGHOSTPROB<0.4)",  
+
+        'TightPionCuts'   : "(PROBNNpi> 0.2) & (PT>200*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>2.)",
+        'TightKaonCuts'   : "(PROBNNk > 0.1) & (PT>250*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>2.)",
+        'TightProtonCuts' : "(PROBNNp> 0.05) & (PT>300*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>2.)",
+         
+        'XiccComCuts'   : "(AM<4.6*GeV) & (APT>2*GeV)",
+        'XiccMomCuts'   : "(M<4.4*GeV) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVDIRA> 0.99) & (BPVIPCHI2()<25)",
+
+        'XiccPP2LcPiMVACut'   :  "0.18",
+        'XiccPP2LcPiXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccPP2LcPi_BDT_v1r0.xml',
+
+        'XiccPP2DpMVACut'   :  "0.05",
+        'XiccPP2DpXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccPP2Dp_BDT_v1r0.xml',
+
+        'XiccPP2DpKpiMVACut'   :  "-0.05",
+        'XiccPP2DpKpiXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccPP2DpKpi_BDT_v1r0.xml',
+
+        'XiccPP2D0pKpipiMVACut'   :  "-0.1",
+        'XiccPP2D0pKpipiXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccPP2D0pKpipi_BDT_v1r0.xml',
+        
+        'XiccPP2LcKpipiMVACut'   :  "0.",
+        'XiccPP2LcKpipiXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccPP2LcKpipi_BDT_v1r0.xml',
+
+        'XiccP2LcKpiMVACut'   :  "0.16",
+        'XiccP2LcKpiXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccP2LcKpi_BDT_v1r0.xml',
+
+        'XiccP2D0pMVACut'   :  "0.1",
+        'XiccP2D0pXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccP2D0p_BDT_v1r0.xml',
+
+        'XiccP2D0pKpiMVACut'   :  "-0.05",
+        'XiccP2D0pKpiXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccP2D0pKpi_BDT_v1r0.xml',
+
+        'XiccP2DpKMVACut'   :  "0.",
+        'XiccP2DpKXmlFile'  :  '$TMVAWEIGHTSROOT/data/XiccP2DpK_BDT_v1r0.xml',       
+        },
+    'STREAMS'           : ['Bhadron' ],
+    'WGs'               : ['BandQ']
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+from PhysSelPython.Wrappers import Selection, MergedSelection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class XiccBDTConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+                
+        """
+        Basic particles, long tracks
+        """
+        from StandardParticles import StdAllLooseANNPions, StdAllLooseANNKaons, StdAllLooseANNProtons
+        
+        self.SelPions = self.createSubSel( OutputList = self.name + "SelPions",
+                                           InputList =  StdAllLooseANNPions , 
+                                           Cuts = config['PionCuts']
+                                           )
+        
+        self.SelKaons = self.createSubSel( OutputList = self.name + "SelKaons",
+                                           InputList = StdAllLooseANNKaons, 
+                                           Cuts = config['KaonCuts']
+                                           )
+                                                   
+        self.SelProtons = self.createSubSel( OutputList = self.name + "SelProtons",
+                                             InputList = StdAllLooseANNProtons, 
+                                             Cuts = config['ProtonCuts']
+                                             )
+
+        #from StandardParticles import StdAllLooseANNPions
+        self.SelUnPions = self.createSubSel( OutputList = self.name + "SelUnPions",
+                                               InputList =  StdAllLooseANNPions , 
+                                               Cuts = config['UnPionCuts']
+                                               )
+        
+        self.SelUnKaons = self.createSubSel( OutputList = self.name + "SelUnKaons",
+                                               InputList =  StdAllLooseANNKaons , 
+                                               Cuts = config['UnKaonCuts']
+                                               )
+        self.SelUnProtons = self.createSubSel( OutputList = self.name + "SelUnProtons",
+                                                 InputList =  StdAllLooseANNProtons , 
+                                                 Cuts = config['UnProtonCuts']
+                                                 )
+        
+        self.SelTightPions = self.createSubSel( OutputList = self.name + "SelTightPions",
+                                                    InputList =  StdAllLooseANNPions , 
+                                                    Cuts = config['TightPionCuts']
+                                                    )
+        
+        self.SelTightKaons = self.createSubSel( OutputList = self.name + "SelTightKaons",
+                                                    InputList =  StdAllLooseANNKaons , 
+                                                    Cuts = config['TightKaonCuts']
+                                                    )
+        
+        
+        """
+        Dplus->K pi pi 
+        """
+        self.SelDplus = self.createSubSel( OutputList = self.name + "SelDplus",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLooseDplus2KPiPi/Particles' ), 
+                                           Cuts = config['DplusCuts']
+                                           )
+
+        """
+        D0->K pi
+        """
+        self.SelD0 = self.createSubSel( OutputList = self.name + "SelD0",
+                                        InputList =  DataOnDemand(Location = 'Phys/StdLooseD02KPi/Particles' ), 
+                                        Cuts = config['D0Cuts']
+                                        )
+        
+        """
+        LambdaC->p K pi
+        """
+        self.SelLambdaC = self.createCombinationSel( OutputList = self.name + "SelLambdaC",
+                                                     DecayDescriptor = "[ Lambda_c+ -> p+  K-  pi+ ]cc",
+                                                     DaughterLists = [ self.SelProtons,
+                                                                       self.SelKaons,
+                                                                       self.SelPions ],                    
+                                                     PreVertexCuts  = config['LcComCuts'],
+                                                     PostVertexCuts = config['LcMomCuts'] )
+        
+        
+
+        #
+        # Stripping line 
+        #
+        """
+        -------------------------------------------
+        Xicc++
+        -------------------------------------------
+
+        """
+        self.XiccPP2LcPiVars = {
+            "sqrt(LcP_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(LcPi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 3))",
+            "sqrt(LcK_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Lc_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccPi_IPCHI2_OWNPV)"  : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(LcP_PT)"                : "log(CHILD(PT, 1, 1))", 
+            "log(LcPi_PT)"               : "log(CHILD(PT, 1, 3))", 
+            "log(LcK_PT)"                : "log(CHILD(PT, 1, 2))", 
+            "log(Lc_PT)"                 : "log(CHILD(PT, 1))",
+            "log(XiccPi_PT)"             : "log(CHILD(PT, 2))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(Lc_FDCHI2_OWNPV)"      : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+        
+        
+        """
+        XiccPP2LcPi
+        """
+        self.SelXiccPP2LcPi = self.createCombinationSel( OutputList = self.name + "SelXiccPP2LcPi",
+                                                         DecayDescriptor = "[ Xi_cc++ -> Lambda_c+ pi+ ]cc",
+                                                         DaughterLists = [ self.SelLambdaC,
+                                                                           self.SelUnPions ],
+                                                         PreVertexCuts  = config['XiccComCuts'],
+                                                         PostVertexCuts = config['XiccMomCuts'] )
+
+        
+        self.MvaXiccPP2LcPi = self.applyMVA( self.name + "MvaXiccPP2LcPi",
+                                           SelB        = self.SelXiccPP2LcPi,
+                                           MVAVars     = self.XiccPP2LcPiVars,
+                                           MVACutValue = config['XiccPP2LcPiMVACut'], 
+                                           MVAxmlFile  = config['XiccPP2LcPiXmlFile']
+                                           )
+        
+        self.XiccPP2LcPiLine = StrippingLine( self.name + '_XiccPP2LcPiLine',                                               
+                                            algos     = [ self.MvaXiccPP2LcPi ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.XiccPP2LcPiLine )
+
+
+        
+        """
+        XiccPP2LcKpipi
+        """       
+        self.XiccPP2LcKpipiVars = {
+            "sqrt(LcP_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(LcPi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 3))",
+            "sqrt(LcK_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Lc_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccPi1_IPCHI2_OWNPV)" : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(XiccPi2_IPCHI2_OWNPV)" : "sqrt(CHILD(MIPCHI2DV(), 4 ))",
+            "sqrt(XiccK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(LcP_PT)"                : "log(CHILD(PT, 1, 1))", 
+            "log(LcPi_PT)"               : "log(CHILD(PT, 1, 3))", 
+            "log(LcK_PT)"                : "log(CHILD(PT, 1, 2))", 
+            "log(Lc_PT)"                 : "log(CHILD(PT, 1))",   
+            "log(XiccPi1_PT)"            : "log(CHILD(PT, 3))",
+            "log(XiccPi2_PT)"            : "log(CHILD(PT, 4))",
+            "log(XiccK_PT)"              : "log(CHILD(PT, 2))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(Lc_FDCHI2_OWNPV)"      : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+        
+        self.SelXiccPP2LcKpipi = self.createCombinationSel( OutputList = self.name + "SelXiccPP2LcKpipi",
+                                                            DecayDescriptor = "[ Xi_cc++ -> Lambda_c+ K- pi+ pi+ ]cc",
+                                                            DaughterLists = [ self.SelLambdaC,
+                                                                              self.SelTightKaons,
+                                                                              self.SelTightPions ],
+                                                            PreVertexCuts  = config['XiccComCuts'],
+                                                            PostVertexCuts = config['XiccMomCuts'] )
+        
+        self.MvaXiccPP2LcKpipi = self.applyMVA( self.name + "MvaXiccPP2LcKpipi",
+                                           SelB        = self.SelXiccPP2LcKpipi,
+                                           MVAVars     = self.XiccPP2LcKpipiVars,
+                                           MVACutValue = config['XiccPP2LcKpipiMVACut'], 
+                                           MVAxmlFile  = config['XiccPP2LcKpipiXmlFile']
+                                           )
+        
+        self.XiccPP2LcKpipiLine = StrippingLine( self.name + '_XiccPP2LcKpipiLine',                                               
+                                                 algos     = [ self.MvaXiccPP2LcKpipi ],
+                                                 MDSTFlag  = False
+                                                 )
+        
+        self.registerLine( self.XiccPP2LcKpipiLine )
+
+
+        """
+        XiccPP2Dp
+        """
+        self.XiccPP2DpVars = {
+            "sqrt(DK_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(DPi1_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(DPi2_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 3))",
+            "sqrt(D_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccP_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(DK_PT)"                 : "log(CHILD(PT, 1, 1))", 
+            "log(DPi1_PT)"               : "log(CHILD(PT, 1, 2))", 
+            "log(DPi2_PT)"               : "log(CHILD(PT, 1, 3))", 
+            "log(D_PT)"                  : "log(CHILD(PT, 1))",   
+            "log(XiccP_PT)"              : "log(CHILD(PT, 2))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(D_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+        
+        self.SelXiccPP2Dp = self.createCombinationSel( OutputList = self.name + "SelXiccPP2Dp",
+                                                       DecayDescriptor = "[ Xi_cc++ -> D+ p+ ]cc",
+                                                       DaughterLists = [ self.SelDplus,
+                                                                         self.SelUnProtons,
+                                                                         ],
+                                                       PreVertexCuts  = config['XiccComCuts'],
+                                                       PostVertexCuts = config['XiccMomCuts'] )
+        
+
+        self.MvaXiccPP2Dp = self.applyMVA( self.name + "MvaXiccPP2Dp",
+                                           SelB        = self.SelXiccPP2Dp,
+                                           MVAVars     = self.XiccPP2DpVars,
+                                           MVACutValue = config['XiccPP2DpMVACut'], 
+                                           MVAxmlFile  = config['XiccPP2DpXmlFile']
+                                           )
+
+        self.XiccPP2DpLine = StrippingLine( self.name + '_XiccPP2DpLine',                                               
+                                            algos     = [ self.MvaXiccPP2Dp ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.XiccPP2DpLine )
+
+        
+        """
+        XiccPP2DpKpi
+        """
+        self.XiccPP2DpKpiVars = {
+            "sqrt(DK_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(DPi1_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(DPi2_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 3))",
+            "sqrt(D_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccP_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(XiccK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(XiccPi_IPCHI2_OWNPV)"  : "sqrt(CHILD(MIPCHI2DV(), 4 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(DK_PT)"                 : "log(CHILD(PT, 1, 1))", 
+            "log(DPi1_PT)"               : "log(CHILD(PT, 1, 2))", 
+            "log(DPi2_PT)"               : "log(CHILD(PT, 1, 3))", 
+            "log(D_PT)"                  : "log(CHILD(PT, 1))",   
+            "log(XiccP_PT)"              : "log(CHILD(PT, 2))",
+            "log(XiccK_PT)"              : "log(CHILD(PT, 3))",
+            "log(XiccPi_PT)"             : "log(CHILD(PT, 4))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(D_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+        
+        self.SelXiccPP2DpKpi = self.createCombinationSel( OutputList = self.name + "SelXiccPP2DpKpi",
+                                                          DecayDescriptor = "[ Xi_cc++ -> D+ p+ K- pi+ ]cc",
+                                                          DaughterLists = [ self.SelDplus,
+                                                                            self.SelUnProtons,
+                                                                            self.SelUnKaons,
+                                                                            self.SelUnPions ],
+                                                          PreVertexCuts  = config['XiccComCuts'],
+                                                          PostVertexCuts = config['XiccMomCuts'] )
+        
+        
+        self.MvaXiccPP2DpKpi = self.applyMVA( self.name + "MvaXiccPP2DpKpi",
+                                           SelB        = self.SelXiccPP2DpKpi,
+                                           MVAVars     = self.XiccPP2DpKpiVars,
+                                           MVACutValue = config['XiccPP2DpKpiMVACut'], 
+                                           MVAxmlFile  = config['XiccPP2DpKpiXmlFile']
+                                           )
+        
+        self.XiccPP2DpKpiLine = StrippingLine( self.name + '_XiccPP2DpKpiLine',                                               
+                                                 algos     = [ self.MvaXiccPP2DpKpi ],
+                                                 MDSTFlag  = False
+                                               )
+        
+        self.registerLine( self.XiccPP2DpKpiLine )
+
+        
+        """
+        XiccPP2D0pKpipi
+        """        
+        self.XiccPP2D0pKpipiVars = {
+            "sqrt(DK_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(DPi_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(D_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccP_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(XiccK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(XiccPi1_IPCHI2_OWNPV)" : "sqrt(CHILD(MIPCHI2DV(), 4 ))",
+            "sqrt(XiccPi2_IPCHI2_OWNPV)" : "sqrt(CHILD(MIPCHI2DV(), 5 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(DK_PT)"                 : "log(CHILD(PT, 1, 1))", 
+            "log(DPi_PT)"                : "log(CHILD(PT, 1, 2))", 
+            "log(D_PT)"                  : "log(CHILD(PT, 1))",   
+            "log(XiccP_PT)"              : "log(CHILD(PT, 2))",
+            "log(XiccK_PT)"              : "log(CHILD(PT, 3))",
+            "log(XiccPi1_PT)"            : "log(CHILD(PT, 4))",
+            "log(XiccPi2_PT)"            : "log(CHILD(PT, 5))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(D_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+        
+        self.SelXiccPP2D0pKpipi = self.createCombinationSel( OutputList = self.name + "SelXiccPP2D0pKpipi",
+                                                          DecayDescriptor = "[ Xi_cc++ -> D0 p+ K- pi+ pi+ ]cc",
+                                                          DaughterLists = [ self.SelD0,
+                                                                            self.SelUnProtons,
+                                                                            self.SelUnKaons,
+                                                                            self.SelPions ],  # w/ IPchi2 cut to speed up
+                                                          PreVertexCuts  = config['XiccComCuts'],
+                                                          PostVertexCuts = config['XiccMomCuts'] )
+        
+        self.MvaXiccPP2D0pKpipi = self.applyMVA( self.name + "MvaXiccPP2D0pKpipi",
+                                           SelB        = self.SelXiccPP2D0pKpipi,
+                                           MVAVars     = self.XiccPP2D0pKpipiVars,
+                                           MVACutValue = config['XiccPP2D0pKpipiMVACut'], 
+                                           MVAxmlFile  = config['XiccPP2D0pKpipiXmlFile']
+                                           )
+        
+        self.XiccPP2D0pKpipiLine = StrippingLine( self.name + '_XiccPP2D0pKpipiLine',                                               
+                                                 algos     = [ self.MvaXiccPP2D0pKpipi ],
+                                                 MDSTFlag  = False
+                                                  )
+        
+        self.registerLine( self.XiccPP2D0pKpipiLine )
+
+
+
+        """
+        -------------------------------------------
+        Xicc+
+        -------------------------------------------
+
+        """
+
+        """
+        XiccP2LcKpi
+        """
+        self.XiccP2LcKpiVars = {
+            "sqrt(LcP_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(LcPi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 3))",
+            "sqrt(LcK_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Lc_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccPi_IPCHI2_OWNPV)"  : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(XiccK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(LcP_PT)"                : "log(CHILD(PT, 1, 1))", 
+            "log(LcPi_PT)"               : "log(CHILD(PT, 1, 3))", 
+            "log(LcK_PT)"                : "log(CHILD(PT, 1, 2))", 
+            "log(Lc_PT)"                 : "log(CHILD(PT, 1))",   
+            "log(XiccPi_PT)"             : "log(CHILD(PT, 3))",
+            "log(XiccK_PT)"              : "log(CHILD(PT, 2))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(Lc_FDCHI2_OWNPV)"      : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+         
+         
+        self.SelXiccP2LcKpi = self.createCombinationSel( OutputList = self.name + "SelXiccP2LcKpi",
+                                                         DecayDescriptor = "[ Xi_cc+ -> Lambda_c+ K- pi+ ]cc",
+                                                         DaughterLists = [ self.SelLambdaC,
+                                                                           self.SelUnKaons,
+                                                                           self.SelUnPions ],
+                                                         PreVertexCuts  = config['XiccComCuts'],
+                                                         PostVertexCuts = config['XiccMomCuts'] )
+        
+        self.MvaXiccP2LcKpi = self.applyMVA( self.name + "MvaXiccP2LcKpi",
+                                           SelB        = self.SelXiccP2LcKpi,
+                                           MVAVars     = self.XiccP2LcKpiVars,
+                                           MVACutValue = config['XiccP2LcKpiMVACut'], 
+                                           MVAxmlFile  = config['XiccP2LcKpiXmlFile']
+                                           )
+       
+        self.XiccP2LcKpiLine = StrippingLine( self.name + '_XiccP2LcKpiLine',                                               
+                                                 algos     = [ self.MvaXiccP2LcKpi ],
+                                                 MDSTFlag  = False
+                                                 )
+        
+        self.registerLine( self.XiccP2LcKpiLine )
+
+        
+        """
+        XiccP2D0p
+        """
+        self.XiccP2D0pVars = {
+            "sqrt(DK_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(DPi_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(D_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccP_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(DK_PT)"                 : "log(CHILD(PT, 1, 1))", 
+            "log(DPi_PT)"                : "log(CHILD(PT, 1, 2))", 
+            "log(D_PT)"                  : "log(CHILD(PT, 1))",   
+            "log(XiccP_PT)"              : "log(CHILD(PT, 2))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(D_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+        
+        self.SelXiccP2D0p = self.createCombinationSel( OutputList = self.name + "SelXiccP2D0p",
+                                                       DecayDescriptor = "[ Xi_cc+ -> D0 p+ ]cc",
+                                                       DaughterLists = [ self.SelD0,
+                                                                         self.SelUnProtons,
+                                                                         ],
+                                                       PreVertexCuts  = config['XiccComCuts'],
+                                                       PostVertexCuts = config['XiccMomCuts'] )
+        
+       
+        self.MvaXiccP2D0p = self.applyMVA( self.name + "MvaXiccP2D0p",
+                                           SelB        = self.SelXiccP2D0p,
+                                           MVAVars     = self.XiccP2D0pVars,
+                                           MVACutValue = config['XiccP2D0pMVACut'], 
+                                           MVAxmlFile  = config['XiccP2D0pXmlFile']
+                                           )
+    
+        self.XiccP2D0pLine = StrippingLine( self.name + '_XiccP2D0pLine',                                               
+                                            algos     = [ self.MvaXiccP2D0p ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.XiccP2D0pLine )        
+
+
+        """
+        XiccP2D0pKpi
+        """
+        self.XiccP2D0pKpiVars = {
+            "sqrt(DK_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(DPi_IPCHI2_OWNPV)"     : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(D_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccP_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(XiccK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(XiccPi_IPCHI2_OWNPV)"  : "sqrt(CHILD(MIPCHI2DV(), 4 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(DK_PT)"                 : "log(CHILD(PT, 1, 1))", 
+            "log(DPi_PT)"                : "log(CHILD(PT, 1, 2))", 
+            "log(D_PT)"                  : "log(CHILD(PT, 1))",   
+            "log(XiccP_PT)"              : "log(CHILD(PT, 2))",
+            "log(XiccK_PT)"              : "log(CHILD(PT, 3))",
+            "log(XiccPi_PT)"             : "log(CHILD(PT, 4))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(D_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+                
+        self.SelXiccP2D0pKpi = self.createCombinationSel( OutputList = self.name + "SelXiccP2D0pKpi",
+                                                          DecayDescriptor = "[ Xi_cc+ -> D0 p+ K- pi+ ]cc",
+                                                          DaughterLists = [ self.SelD0,
+                                                                            self.SelUnProtons,
+                                                                            self.SelUnKaons,
+                                                                            self.SelUnPions ],  
+                                                          PreVertexCuts  = config['XiccComCuts'],
+                                                          PostVertexCuts = config['XiccMomCuts'] )
+        
+        
+        self.MvaXiccP2D0pKpi = self.applyMVA( self.name + "MvaXiccP2D0pKpi",
+                                           SelB        = self.SelXiccP2D0pKpi,
+                                           MVAVars     = self.XiccP2D0pKpiVars,
+                                           MVACutValue = config['XiccP2D0pKpiMVACut'], 
+                                           MVAxmlFile  = config['XiccP2D0pKpiXmlFile']
+                                           )
+        
+        self.XiccP2D0pKpiLine = StrippingLine( self.name + '_XiccP2D0pKpiLine',                                               
+                                                 algos     = [ self.MvaXiccP2D0pKpi ],
+                                                 MDSTFlag  = False
+                                               )
+        
+        self.registerLine( self.XiccP2D0pKpiLine )
+
+        
+        """
+        XiccP2DpK
+        """
+        self.XiccP2DpKVars = {
+            "sqrt(DK_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(DPi1_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(DPi2_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1, 3))",
+            "sqrt(D_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(XiccP_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(XiccK_IPCHI2_OWNPV)"   : "sqrt(CHILD(MIPCHI2DV(), 3 ))",
+            "sqrt(C_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(DK_PT)"                 : "log(CHILD(PT, 1, 1))", 
+            "log(DPi1_PT)"               : "log(CHILD(PT, 1, 2))", 
+            "log(DPi2_PT)"               : "log(CHILD(PT, 1, 3))", 
+            "log(D_PT)"                  : "log(CHILD(PT, 1))",   
+            "log(XiccP_PT)"              : "log(CHILD(PT, 2))",
+            "log(XiccK_PT)"              : "log(CHILD(PT, 3))",
+            "log(C_PT)"                  : "log(PT)",
+            "sqrt(D_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(C_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "C_DIRA_OWNPV"               : "BPVDIRA"
+            }
+        self.SelXiccP2DpK = self.createCombinationSel( OutputList = self.name + "SelXiccP2DpK",
+                                                          DecayDescriptor = "[ Xi_cc+ -> D+ p+ K- ]cc",
+                                                          DaughterLists = [ self.SelDplus,
+                                                                            self.SelUnProtons,
+                                                                            self.SelUnKaons ], 
+                                                          PreVertexCuts  = config['XiccComCuts'],
+                                                          PostVertexCuts = config['XiccMomCuts'] )
+        
+        
+        self.MvaXiccP2DpK = self.applyMVA( self.name + "MvaXiccP2DpK",
+                                           SelB        = self.SelXiccP2DpK,
+                                           MVAVars     = self.XiccP2DpKVars,
+                                           MVACutValue = config['XiccP2DpKMVACut'], 
+                                           MVAxmlFile  = config['XiccP2DpKXmlFile']
+                                           )
+        
+        self.XiccP2DpKLine = StrippingLine( self.name + '_XiccP2DpKLine',                                               
+                                                 algos     = [ self.MvaXiccP2DpK ],
+                                                 MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.XiccP2DpKLine )
+
+
+
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/__init__.py
new file mode 100644
index 000000000..5ba751089
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBandQ/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ('StrippingBc2EtacSL', 'StrippingCcbar2LambdaLambda', 'StrippingEtap2pipimumu', 'StrippingHeavyBaryons', 'StrippingLb2L0X3872', 'StrippingOniaPhotoProduction', 'StrippingOniaPhotoProductionPrescaled', 'StrippingXbToLambdaKmX')
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB24pLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB24pLines.py
new file mode 100644
index 000000000..bb0fa65d2
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB24pLines.py
@@ -0,0 +1,406 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of B0 -> p+ p+ p- p- lines
+
+Performance: using DV42r6p1
+
+Full.dst (Reco16_Run182594.py)
+##########################
+StrippingReport                                                INFO Event 200000, Good event 176679
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |_StrippingGlobal_                                            |  0.0951|       168|       |   9.821|
+ |_StrippingSequenceStreamBhadron_                             |  0.0951|       168|       |   9.716|
+ |!StrippingB24pB24pLine_TIMING                                |  0.0340|        60|  1.467|   0.169|
+ |!StrippingB24pB2JpsiKpiLine_TIMING                           |  0.0600|       106|  2.349|   0.286|
+ |!StrippingB24pB2PhiKhLine_TIMING                             |  0.0085|        15|  2.733|   0.215|
+   
+#TODO Update this rates
+MC: B2pppp (11104077)
+#######################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingB24pB24pLine_TIMING                                |  5.0250|      5025|  1.022|   0.260|
+
+MC: B2JpsiKpi (11134010)
+########################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingB24pB2JpsiKpiLine_TIMING                           |  6.3320|      6332|  1.311|   0.574|
+
+MC: B2PhiKst (11104020)
+#######################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingB24pB2PhiKhLine_TIMING                             |  7.8100|      7810|  1.318|   0.476|
+
+MC: Bs2JpsiPhi (13134010)
+########################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingB24pB2JpsiKpiLine_TIMING                           |  6.3960|      6396|  2.397|   0.609|
+
+
+    
+Exported symbols (use python help!):
+   - 
+"""
+
+__author__  = ["Pietro Marino", "Oliver Gruenberg"]
+__date__    = "13.10.2017"
+__version__ = "$Revision: 3.0 $"
+
+#############################################################################
+
+__all__ = ( "B24pLinesConf",
+            "default_config", )
+
+#############################################################################
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles, DaVinci__N4BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+#from StrippingSelections.Utils import checkConfig
+from GaudiKernel.PhysicalConstants import c_light
+
+#############################################################################
+
+default_config = {
+    "NAME"        : "B24p",
+    "WGs"         : [ "BnoC" ],
+    "STREAMS"     : [ "Bhadron" ],
+    "BUILDERTYPE" : "B24pLinesConf",
+    "CONFIG"      : {
+    "MDSTflag"           : True, # True or False
+    # TrackCuts
+    "MinTrIPChi2"        : 9.0,
+    "MaxTrChi2Dof"       : 4.0,
+    "MaxTrGhp"           : 0.4,
+    # CommonCombiCuts
+    "MaxDoca"            : 0.35, # (mm)
+    "mDiffb"             : 400, # (MeV)
+    # MassCuts
+    "mJpsiMin"           : 2990, # (MeV)
+    "mJpsiMax"           : 3200, # (MeV)
+    "mKstMax"            : 1200, # (MeV)
+    # MotherCuts
+    "MaxIPChi2"          : 25,
+    "MinVDChi2"          : 100,
+    "MaxVtxChi2Dof"      : 9,
+    "MinDira"            : 0.0,
+    "MinTau"             : 1.0, # (ps)
+    # scalings
+    "Postscale"          : 1, 
+    "B24pPrescale"       : 1, 
+    "B2JpsiKpiPrescale"  : 1,
+    "B2PhiKhPrescale"    : 1, 
+    "CommonRelInfoTools" : [ { "Type": "RelInfoVertexIsolation", "Location":"VtxIsoInfo" },
+                             { "Type": "RelInfoVertexIsolationBDT", "Location":"VtxIsoInfoBDT" },
+                             { "Type" : "RelInfoBs2MuMuBIsolations",
+                               "Variables" : [],
+                               "Location"  : "BsMuMuBIsolation",
+                               "tracktype" : 3,
+                               "makeTrackCuts" : False, },
+                             ] # closes CommonRelInfoTools    
+    } # closes CONFIG
+    } # closes default_config
+
+class B24pLinesConf(LineBuilder) :
+    """
+    Builder
+    
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name = "B24p", config = default_config) :
+
+        LineBuilder.__init__(self, name, config)
+        
+        B24p_name      = name+"B24p"
+        B2JpsiKpi_name = name+"B2JpsiKpi"
+        B2PhiKh_name   = name+"B2PhiKh"
+
+#############################################################################
+
+        self.TrackCuts = """
+                         ( MIPCHI2DV(PRIMARY) > %(MinTrIPChi2)s )
+                         & ( TRCHI2DOF < %(MaxTrChi2Dof)s )
+                         & ( TRGHP < %(MaxTrGhp)s )
+                         """ %config
+
+        self.CommonCombi12Cuts = "(ADOCA(1,2) < %(MaxDoca)s*mm)" %config
+
+        self.CommonCombi123Cuts = """
+                                  (ADOCA(1,3) < %(MaxDoca)s*mm)
+                                  & (ADOCA(2,3) < %(MaxDoca)s*mm)
+                                  """ %config
+
+        self.CommonCombiCuts = """
+                               (ADAMASS(5323*MeV) < %(mDiffb)s*MeV)
+                               & (ADOCA(1,4) < %(MaxDoca)s*mm)
+                               & (ADOCA(2,4) < %(MaxDoca)s*mm)
+                               & (ADOCA(3,4) < %(MaxDoca)s*mm)                               
+                               """ %config
+        
+        self.MotherCuts = """
+                          (BPVIPCHI2() < %(MaxIPChi2)s )
+                          & (BPVVDCHI2 > %(MinVDChi2)s )
+                          & (VFASPF(VCHI2/VDOF) < %(MaxVtxChi2Dof)s )
+                          & (BPVDIRA > %(MinDira)s )
+                          & (BPVLTIME() > %(MinTau)s*ps )
+                          """ %config  
+
+        self.B2JpsiKpiCombi12Cut = "(ADOCA(1,2) < %(MaxDoca)s*mm) & ( in_range(2990*MeV,AM12,3200*MeV) )"
+
+#############################################################################
+
+        self.selB24p      = self.makeB24p(B24p_name)
+        self.selB2JpsiKpi = self.makeB2JpsiKpi(B2JpsiKpi_name,config)
+        self.selB2PhiKh   = self.makeB2PhiKh(B2PhiKh_name,config)
+
+#############################################################################
+
+        self.B24p_Line = StrippingLine(B24p_name+"Line",
+                                       prescale = config["B24pPrescale"],
+                                       postscale = config["Postscale"],
+                                       MDSTFlag = config["MDSTflag"],
+                                       selection = self.selB24p,
+                                       RelatedInfoTools = [                                       
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05B0',
+                                             "DaughterLocations" : {
+                                             "Beauty -> ^X  X  X  X"  : "ConeIso05p1",
+                                             "Beauty ->  X ^X  X  X"  : "ConeIso05p2",
+                                             "Beauty ->  X  X ^X  X"  : "ConeIso05p3",
+                                             "Beauty ->  X  X  X ^X"  : "ConeIso05p4", 
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10B0',
+                                             "DaughterLocations" : {
+                                             "Beauty -> ^X  X  X  X"  : "ConeIso10p1",
+                                             "Beauty ->  X ^X  X  X"  : "ConeIso10p2",
+                                             "Beauty ->  X  X ^X  X"  : "ConeIso10p3",
+                                             "Beauty ->  X  X  X ^X"  : "ConeIso10p4", 
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15B0',
+                                             "DaughterLocations" : {
+                                             "Beauty -> ^X  X  X  X"  : "ConeIso15p1",
+                                             "Beauty ->  X ^X  X  X"  : "ConeIso15p2",
+                                             "Beauty ->  X  X ^X  X"  : "ConeIso15p3",
+                                             "Beauty ->  X  X  X ^X"  : "ConeIso15p4",
+                                             }, }, 
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "Beauty -> ^X  X  X  X"  : "TrackIsoBDTp1",
+                                             "Beauty ->  X ^X  X  X"  : "TrackIsoBDTp2",
+                                             "Beauty ->  X  X ^X  X"  : "TrackIsoBDTp3",
+                                             "Beauty ->  X  X  X ^X"  : "TrackIsoBDTp4",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "Beauty -> ^X  X  X  X"  : "BsMuMuTrackIsop1",
+                                             "Beauty ->  X ^X  X  X"  : "BsMuMuTrackIsop2",
+                                             "Beauty ->  X  X ^X  X"  : "BsMuMuTrackIsop3",
+                                             "Beauty ->  X  X  X ^X"  : "BsMuMuTrackIsop4",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools
+                                       ) # closes Strippingline
+        
+        self.B2JpsiKpi_Line = StrippingLine(B2JpsiKpi_name+"Line",
+                                            prescale = config["B2JpsiKpiPrescale"],
+                                            postscale = config["Postscale"],
+                                            MDSTFlag = config["MDSTflag"], 
+                                            selection = self.selB2JpsiKpi, 
+                                            RelatedInfoTools = [
+                                                { "Type" : "RelInfoConeVariables",
+                                                  "ConeAngle" : 0.5,
+                                                  "Variables" : [],
+                                                  "Location"  : "ConeIso05B0",
+                                                  "DaughterLocations" : {
+                                                  "[B0 -> ^p+  p~-  K+  pi-]CC" : "ConeIso05p1",
+                                                  "[B0 ->  p+ ^p~-  K+  pi-]CC" : "ConeIso05p2",
+                                                  "[B0 ->  p+  p~- ^K+  pi-]CC" : "ConeIso05K",
+                                                  "[B0 ->  p+  p~-  K+ ^pi-]CC" : "ConeIso05pi",
+                                                  }, },
+                                                { "Type" : "RelInfoConeVariables",
+                                                  "ConeAngle" : 1.0,
+                                                  "Variables" : [],
+                                                  "Location"  : "ConeIso10B0",
+                                                  "DaughterLocations" : {
+                                                  "[B0 -> ^p+  p~-  K+  pi-]CC" : "ConeIso10p1",
+                                                  "[B0 ->  p+ ^p~-  K+  pi-]CC" : "ConeIso10p2",
+                                                  "[B0 ->  p+  p~- ^K+  pi-]CC" : "ConeIso10K",
+                                                  "[B0 ->  p+  p~-  K+ ^pi-]CC" : "ConeIso10pi",
+                                                  }, },
+                                                { "Type" : "RelInfoConeVariables",
+                                                  "ConeAngle" : 1.5,
+                                                  "Variables" : [],
+                                                  "Location"  : "ConeIso15B0",
+                                                  "DaughterLocations" : {
+                                                  "[B0 -> ^p+  p~-  K+  pi-]CC" : "ConeIso15p1",
+                                                  "[B0 ->  p+ ^p~-  K+  pi-]CC" : "ConeIso15p2",
+                                                  "[B0 ->  p+  p~- ^K+  pi-]CC" : "ConeIso15K",
+                                                  "[B0 ->  p+  p~-  K+ ^pi-]CC" : "ConeIso15pi",
+                                                  }, },
+                                                { "Type": "RelInfoTrackIsolationBDT",
+                                                  "Variables" : 0,
+                                                  "DaughterLocations" : {
+                                                  "[B0 -> ^p+  p~-  K+  pi-]CC" : "TrackIsoBDTp1",
+                                                  "[B0 ->  p+ ^p~-  K+  pi-]CC" : "TrackIsoBDTp2",
+                                                  "[B0 ->  p+  p~- ^K+  pi-]CC" : "TrackIsoBDTK",
+                                                  "[B0 ->  p+  p~-  K+ ^pi-]CC" : "TrackIsoBDTpi",
+                                                  }, },
+                                                { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                                  "Variables" : [],
+                                                  "IsoTwoBody" : True,
+                                                  "DaughterLocations" : {
+                                                  "[B0 -> ^p+  p~-  K+  pi-]CC" : "BsMuMuTrackIsop1",
+                                                  "[B0 ->  p+ ^p~-  K+  pi-]CC" : "BsMuMuTrackIsop2",
+                                                  "[B0 ->  p+  p~- ^K+  pi-]CC" : "BsMuMuTrackIsoK",
+                                                  "[B0 ->  p+  p~-  K+ ^pi-]CC" : "BsMuMuTrackIsopi",
+                                                  }, }, 
+                                                ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                            ) # closes Strippingline
+
+        self.B2PhiKh_Line = StrippingLine(B2PhiKh_name+"Line",
+                                          prescale = config["B2PhiKhPrescale"],
+                                          postscale = config["Postscale"],
+                                          MDSTFlag = config["MDSTflag"], 
+                                          selection = self.selB2PhiKh,
+                                          RelatedInfoTools = [
+                                                { "Type" : "RelInfoConeVariables",
+                                                  "ConeAngle" : 0.5,
+                                                  "Variables" : [],
+                                                  "Location"  : "ConeIso05B0",
+                                                  "DaughterLocations" : {
+                                                  "[B0 -> ^K+  K-  K+  pi-]CC" : "ConeIso05K1",
+                                                  "[B0 ->  K+ ^K-  K+  pi-]CC" : "ConeIso05K2",
+                                                  "[B0 ->  K+  K- ^K+  pi-]CC" : "ConeIso05K3",
+                                                  "[B0 ->  K+  K-  K+ ^pi-]CC" : "ConeIso05pi",
+                                                  }, },
+                                                { "Type" : "RelInfoConeVariables",
+                                                  "ConeAngle" : 1.0,
+                                                  "Variables" : [],
+                                                  "Location"  : "ConeIso10B0",
+                                                  "DaughterLocations" : {
+                                                  "[B0 -> ^K+  K-  K+  pi-]CC" : "ConeIso10K1",
+                                                  "[B0 ->  K+ ^K-  K+  pi-]CC" : "ConeIso10K2",
+                                                  "[B0 ->  K+  K- ^K+  pi-]CC" : "ConeIso10K3",
+                                                  "[B0 ->  K+  K-  K+ ^pi-]CC" : "ConeIso10pi",
+                                                  }, },
+                                                { "Type" : "RelInfoConeVariables",
+                                                  "ConeAngle" : 1.5,
+                                                  "Variables" : [],
+                                                  "Location"  : "ConeIso15B0",
+                                                  "DaughterLocations" : {
+                                                  "[B0 -> ^K+  K-  K+  pi-]CC" : "ConeIso15K1",
+                                                  "[B0 ->  K+ ^K-  K+  pi-]CC" : "ConeIso15K2",
+                                                  "[B0 ->  K+  K- ^K+  pi-]CC" : "ConeIso15K3",
+                                                  "[B0 ->  K+  K-  K+ ^pi-]CC" : "ConeIso15pi",
+                                                  }, },
+                                                { "Type": "RelInfoTrackIsolationBDT",
+                                                  "Variables" : 0,
+                                                  "DaughterLocations" : {
+                                                  "[B0 -> ^K+  K-  K+  pi-]CC" : "TrackIsoBDTK1",
+                                                  "[B0 ->  K+ ^K-  K+  pi-]CC" : "TrackIsoBDTK2",
+                                                  "[B0 ->  K+  K- ^K+  pi-]CC" : "TrackIsoBDTK3",
+                                                  "[B0 ->  K+  K-  K+ ^pi-]CC" : "TrackIsoBDTpi",
+                                                  }, },                                               
+                                                { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                                  "Variables" : [],
+                                                  "IsoTwoBody" : True,
+                                                  "DaughterLocations" : {
+                                                  "[B0 -> ^K+  K-  K+  pi-]CC" : "BsMuMuTrackIsoK1",
+                                                  "[B0 ->  K+ ^K-  K+  pi-]CC" : "BsMuMuTrackIsoK2",
+                                                  "[B0 ->  K+  K- ^K+  pi-]CC" : "BsMuMuTrackIsoK3",
+                                                  "[B0 ->  K+  K-  K+ ^pi-]CC" : "BsMuMuTrackIsopi",
+                                                  }, },
+                                                ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                            ) # closes Strippingline
+
+#############################################################################
+
+        self.registerLine(self.B24p_Line)
+        self.registerLine(self.B2JpsiKpi_Line)
+        self.registerLine(self.B2PhiKh_Line)
+       
+#############################################################################
+
+    def makeB24p(self,name): # to select B(s) -> p p p p 
+
+        B24p = DaVinci__N4BodyDecays("Combine"+name)
+        B24p.DecayDescriptors = [ "B0 -> p+ p+ p~- p~-","[B0 -> p+ p+ p+ p~-]cc" ]
+        B24p.DaughtersCuts = { "p+" : self.TrackCuts + " & ((PIDp-PIDpi)>0)" + " & ((PIDp-PIDK)>-5)" }
+            
+        B24p.Combination12Cut  = self.CommonCombi12Cuts 
+        B24p.Combination123Cut = self.CommonCombi123Cuts    
+        B24p.CombinationCut    = self.CommonCombiCuts    
+        B24p.MotherCut         = self.MotherCuts
+    
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        #_myProtons = DataOnDemand(Location = "Phys/StdNoPIDsProtons/Particles")
+    
+        return Selection(name, Algorithm = B24p, RequiredSelections = [ _myProtons ])
+
+#############################################################################
+        
+    def makeB2JpsiKpi(self,name,config): # to select B(s) -> J/psi K+ pi- , Bd -> J/psi K*0 , Bs -> J/psi Phi 
+        
+        B2JpsiKpi = DaVinci__N4BodyDecays("Combine"+name)
+        B2JpsiKpi.DecayDescriptors = [ "[B0 -> p+ p~- K+ pi-]cc" ]
+        B2JpsiKpi.DaughtersCuts = { "p+"  : self.TrackCuts,
+                                    "K+"  : self.TrackCuts,
+                                    "pi-" : self.TrackCuts }
+    
+        B2JpsiKpi.Combination12Cut  = self.CommonCombi12Cuts + " & ( in_range(%(mJpsiMin)s*MeV,AM12,%(mJpsiMax)s*MeV) )" %config
+        B2JpsiKpi.Combination123Cut = self.CommonCombi123Cuts
+        B2JpsiKpi.CombinationCut    = self.CommonCombiCuts
+        B2JpsiKpi.MotherCut         = self.MotherCuts
+       
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myKaons   = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")    
+        _myPions   = DataOnDemand(Location = "Phys/StdNoPIDsPions/Particles")
+    
+        return Selection(name, Algorithm = B2JpsiKpi, RequiredSelections = [ _myProtons, _myKaons, _myPions ])
+
+#############################################################################
+
+    def makeB2PhiKh(self,name,config): # to select Bs -> Phi Phi and Bd -> Phi K*0
+    
+        B2PhiKh = DaVinci__N4BodyDecays("Combine"+name)
+        B2PhiKh.DecayDescriptors = [ "[B0 -> K+ K- K+ pi-]cc" ]
+        B2PhiKh.DaughtersCuts = { "K+"  : self.TrackCuts,
+                                  "pi-" : self.TrackCuts }
+    
+        B2PhiKh.Combination12Cut  = self.CommonCombi12Cuts
+        B2PhiKh.Combination123Cut = self.CommonCombi123Cuts + " & ( (AM12 < %(mKstMax)s*MeV) | (AM23 < %(mKstMax)s*MeV) )" %config
+        B2PhiKh.CombinationCut    = self.CommonCombiCuts +    " & ( (AM14 < %(mKstMax)s*MeV) | (AM34 < %(mKstMax)s*MeV) )" %config
+        B2PhiKh.MotherCut         = self.MotherCuts
+        
+        _myKaons = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")    
+        _myPions = DataOnDemand(Location = "Phys/StdNoPIDsPions/Particles")
+            
+        return Selection(name, Algorithm = B2PhiKh, RequiredSelections = [ _myKaons, _myPions ])
+       
+#############################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2CharmlessInclusive.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2CharmlessInclusive.py
new file mode 100644
index 000000000..eb760c668
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2CharmlessInclusive.py
@@ -0,0 +1,420 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+B->charmless quasi 2-body selection
+'''
+
+__author__ = ['Fred Blanc', 'Luca Pescatore']
+__date__ = '23/01/2019'
+__version__ = '$Revision: 3.0 $'
+
+__all__ = ( 'B2CharmlessInclusive',
+            'makeLightResList',
+            'makeB2Q2B4piAllX0',
+            'makeB2Q2B3piAllX0',
+            'makeB2Q2BKSX',
+            'default_config')
+
+name = 'B2CharmlessInclusive'
+
+default_config = {
+    'NAME'        : 'B2CharmlessInclusive',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'B2CharmlessInclusive',
+    'CONFIG'      : { 'Q2BPrescale'     : 1.0,
+
+                      # Photon cuts
+                      'Photon_Res_PT_Min' : 400.0,
+                      'Photon_CL_Min'     : 0.2,
+
+                      # Pio cuts
+                      'Pi0_Res_PT_Min'  : 600.,  # Pt cut on a pi0 with is grandaughter of the B
+
+                      # KS cuts                    
+                      'KS0_LL_MassWindow'       : 40.0,
+                      'KS0_DD_MassWindow'       : 50.0,
+                      'KS0_LL_FDChi2'           : 10.,
+                      'KS0_DD_FDChi2'           : 90.,
+                      'KS0_MinPT'               : 1500,
+                      'KS0_Child_Trk_Chi2'      : 6.,
+                      
+                      
+                      'Q2BTrkGhostProb' : 0.5,
+                      'Q2BTrkMinIPChi2' : 16.,
+                      'Q2BTrkMinPT'     : 500,
+                      'Q2BTrkMinHiPT'   : 1500.,
+                      'Q2BResMinPT'     : 600,
+                      'Q2BResMinHiPT'   : 1500.,
+                      'Q2BResMaxMass'   : 1100.,
+                      'Q2BResVtxChi2DOF': 6.,
+                      'Q2BBMinPT'       : 2500.,
+                      'Q2BBMinM3pi'     : 4500.,
+                      'Q2BBMinM4pi'     : 4000.,
+                      'Q2BBMaxM3pi'     : 6700.,
+                      'Q2BBMaxM4pi'     : 5700.,
+                      'Q2BBDIRA'        : 0.995,
+                      'Q2BBVtxChi2DOF'  : 6.            
+                      },
+    'STREAMS'     : ['Bhadron']     ## This stream puts it into mDST
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, SimpleSelection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdNoPIDsPions, StdLooseAllPhotons, StdLooseMergedPi0, StdLooseResolvedPi0
+from StandardParticles import StdLooseKsDD, StdLooseKsLL
+
+class B2CharmlessInclusive(LineBuilder) :
+    """
+    Builder for B2CharmlessInclusive
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        self.name = name
+        LineBuilder.__init__(self, name, config)
+
+        cuts = default_config['CONFIG']
+
+        ## Single particle cuts definition
+        trackCuts = "(MIPCHI2DV(PRIMARY) > %(Q2BTrkMinIPChi2)s) & (TRGHOSTPROB < %(Q2BTrkGhostProb)s) & (PT > %(Q2BTrkMinPT)s)" % cuts
+        gamma_for_Res_Cuts = "(PT > %(Photon_Res_PT_Min)s*MeV) & (CL > %(Photon_CL_Min)s)" % cuts
+        pi0_for_Res_Cuts = "(PT > %(Pi0_Res_PT_Min)s*MeV)" % cuts
+        KS_DD_Cuts="(PT > %(KS0_MinPT)s*MeV) & (ADMASS('KS0')<%(KS0_DD_MassWindow)s*MeV) & (BPVVDCHI2>%(KS0_DD_FDChi2)s) " % cuts
+        KS_LL_Cuts="(PT > %(KS0_MinPT)s*MeV) & (ADMASS('KS0')<%(KS0_LL_MassWindow)s*MeV) " % cuts
+        KS_ChildCuts= "(CHILDCUT((TRCHI2DOF<%(KS0_Child_Trk_Chi2)s),1)) & (CHILDCUT((TRCHI2DOF<%(KS0_Child_Trk_Chi2)s),2))"% cuts
+        KS_DD_ChildCuts= "(CHILDCUT((TRGHOSTPROB<%(Q2BTrkGhostProb)s),1)) & (CHILDCUT((TRGHOSTPROB<%(Q2BTrkGhostProb)s),2))"% cuts
+        
+        KS_DDCuts = '&'.join([KS_DD_Cuts, KS_ChildCuts, KS_DD_ChildCuts])
+        KS_LLCuts = '&'.join([KS_LL_Cuts, KS_ChildCuts])
+
+        self.TrackList = SimpleSelection(
+                            'TrackList' + self.name,
+                            FilterDesktop,
+                            [StdNoPIDsPions],
+                            Code = trackCuts
+                                       )
+
+        self.Gamma_for_Res_List = SimpleSelection( 'Gamma_for_Res_List' + self.name,
+                                    FilterDesktop,
+                                    [StdLooseAllPhotons],
+                                    Code = gamma_for_Res_Cuts
+                                    )
+
+        self.Pi0_for_Res_List = SimpleSelection( 'Pi0_for_Res_List' + self.name,
+                                    FilterDesktop,
+                                    [StdLooseResolvedPi0, StdLooseMergedPi0],
+                                    Code = pi0_for_Res_Cuts
+                                    )
+
+        self.TrackList_HiPt = SimpleSelection( 'TrackList_HiPt' + self.name,
+                                         FilterDesktop,
+                                         [self.TrackList],
+                                         Code="(PT > %(Q2BTrkMinHiPT)s)" % config
+                                         )
+
+        ## Modified to add neutrals to the "pipi"
+        self.LightResList = makeLightResList( name="DiTracksForCharmlessB" + self.name,
+                                            trkList=self.TrackList,
+                                            gammaList=self.Gamma_for_Res_List,
+                                            pi0List=self.Pi0_for_Res_List,
+                                            MinPTCut = config['Q2BResMinPT'],
+                                            MaxMassCut = config['Q2BResMaxMass'],
+                                            VtxChi2DOFCut = config['Q2BResVtxChi2DOF'] )
+
+        self.LightResList_HiPt = SimpleSelection( 'DiTracksHiPtForCharmlessB' + self.name,
+                                           FilterDesktop,
+                                           [self.LightResList],
+                                           Code="(PT > %(Q2BResMinHiPT)s)" % config )
+                                           
+                                           
+        ## Modified to add KS
+        self.KSList_DD=SimpleSelection( 'KSList_DD'+ self.name,
+                                         FilterDesktop,
+                                         [StdLooseKsDD],
+                                         Code=KS_DDCuts
+                                       )
+        self.KSList_LL=SimpleSelection( 'KSList_LL'+ self.name,
+                                         FilterDesktop,
+                                         [StdLooseKsLL],
+                                         Code=KS_LLCuts
+                                       )
+
+
+        ## 4pi line modified to add neutrals
+        B2Q2B4piX0Name = self.name + "4piAllX0Selection"
+        self.B2CharmlessQ2B4piX0 = makeB2Q2B4piAllX0( B2Q2B4piX0Name,
+                                               diTrkList     = self.LightResList,
+                                               MinPTCut      = config['Q2BBMinPT'],
+                                               MinMassCut    = config['Q2BBMinM4pi'],
+                                               MaxMassCut    = config['Q2BBMaxM4pi'],
+                                               DIRACut       = config['Q2BBDIRA'],
+                                               VtxChi2DOFCut = config['Q2BBVtxChi2DOF'] )
+
+        self.Q2B4piX0Line = StrippingLine( B2Q2B4piX0Name+"Line",
+                                         prescale = config['Q2BPrescale'],
+                                         selection = tisTosSelection(self.B2CharmlessQ2B4piX0),
+                                         RelatedInfoTools = getRelInfo4pi()
+                                         )
+
+        ## 3pi line modified to add neutrals
+        B2Q2B3piX0Name = self.name + "3piAllX0Selection"
+        self.B2CharmlessQ2B3piX0 = makeB2Q2B3piAllX0( B2Q2B3piX0Name,
+                                               trkList       = self.TrackList_HiPt,
+                                               diTrkList     = self.LightResList_HiPt,
+                                               MinPTCut      = config['Q2BBMinPT'],
+                                               MinMassCut    = config['Q2BBMinM3pi'],
+                                               MaxMassCut    = config['Q2BBMaxM3pi'],
+                                               DIRACut       = config['Q2BBDIRA'],
+                                               VtxChi2DOFCut = config['Q2BBVtxChi2DOF'] )
+
+        self.Q2B3piX0Line = StrippingLine( B2Q2B3piX0Name+"Line",
+                                         prescale = config['Q2BPrescale'],
+                                         selection = tisTosSelection(self.B2CharmlessQ2B3piX0),
+                                         RelatedInfoTools = getRelInfo3pi()
+                                         )
+                                         
+        B2Q2BKSX_LLName = self.name + "KSX_LLSelection"
+        self.B2CharmlessQ2KSX_LL=makeB2Q2BKSX(B2Q2BKSX_LLName,
+                                                      kSList       = self.KSList_LL,
+                                                      diTrkList     = self.LightResList_HiPt,
+                                                      MinPTCut      = config['Q2BBMinPT'],
+                                                      MinMassCut    = config['Q2BBMinM3pi'],
+                                                      MaxMassCut    = config['Q2BBMaxM3pi'],
+                                                      DIRACut       = config['Q2BBDIRA'],
+                                                      VtxChi2DOFCut = config['Q2BBVtxChi2DOF'] )
+                                                      
+        self.Q2KSX_LL_Line=StrippingLine( B2Q2BKSX_LLName+"Line",
+                                         prescale = config['Q2BPrescale'],
+                                         selection = tisTosSelection(self.B2CharmlessQ2KSX_LL),
+                                         RelatedInfoTools = getRelInfoKSX()
+                                         )
+                                         
+        B2Q2BKSX_DDName = self.name + "KSX_DDSelection"
+        self.B2CharmlessQ2KSX_DD=makeB2Q2BKSX(B2Q2BKSX_DDName,
+                                                      kSList       = self.KSList_DD,
+                                                      diTrkList     = self.LightResList_HiPt,
+                                                      MinPTCut      = config['Q2BBMinPT'],
+                                                      MinMassCut    = config['Q2BBMinM3pi'],
+                                                      MaxMassCut    = config['Q2BBMaxM3pi'],
+                                                      DIRACut       = config['Q2BBDIRA'],
+                                                      VtxChi2DOFCut = config['Q2BBVtxChi2DOF'] )
+                                                      
+        self.Q2KSX_DD_Line=StrippingLine( B2Q2BKSX_DDName+"Line",
+                                         prescale = config['Q2BPrescale'],
+                                         selection = tisTosSelection(self.B2CharmlessQ2KSX_DD),
+                                         RelatedInfoTools = getRelInfoKSX()
+                                         )
+                                            
+
+        self.registerLine(self.Q2B4piX0Line)
+        self.registerLine(self.Q2B3piX0Line)
+        self.registerLine(self.Q2KSX_LL_Line)
+        self.registerLine(self.Q2KSX_DD_Line)
+
+def makeLightResList( name,
+                     trkList,
+                     gammaList,
+                     pi0List,
+                     MinPTCut,
+                     MaxMassCut,
+                     VtxChi2DOFCut ) :
+    """
+    Di-track or di-track + neutral selection
+    """
+    _diTrackPreVertexCuts = "(APT> %(MinPTCut)s) & (AM< %(MaxMassCut)s)" %locals()
+    _diTrackPostVertexCuts = "(VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s)" %locals()
+
+    PiPi = SimpleSelection(name+"_2body", CombineParticles,
+                           [ trkList ],
+                           DecayDescriptors=["rho(770)0 -> pi+ pi-"],
+                           CombinationCut = _diTrackPreVertexCuts,
+                           MotherCut = _diTrackPostVertexCuts
+                           )
+    
+    PiPiGamma = SimpleSelection(name+"_gamma", CombineParticles,
+                           [ trkList, gammaList ],
+                           DecayDescriptors=["rho(770)0 -> pi+ pi- gamma"],
+                           CombinationCut = _diTrackPreVertexCuts,
+                           MotherCut = _diTrackPostVertexCuts
+                           )
+    
+    PiPiPi0 = SimpleSelection(name+"_pi0", CombineParticles,
+                           [ trkList, pi0List ],
+                           DecayDescriptors=["rho(770)0 -> pi+ pi- pi0"],
+                           CombinationCut = _diTrackPreVertexCuts,
+                           MotherCut = _diTrackPostVertexCuts
+                           )
+
+    return MergedSelection( "Merge" + name, RequiredSelections =  [ PiPi, PiPiGamma, PiPiPi0 ] )
+
+    #return SimpleSelection(name, CombineParticles,
+    #                       [ trkList, gammaList, pi0List ],
+    #                       DecayDescriptors=["rho(770)0 -> pi+ pi-", "rho(770)0 -> pi+ pi- pi0", "rho(770)0 -> pi+ pi- gamma"],
+    #                       CombinationCut = _diTrackPreVertexCuts,
+    #                       MotherCut = _diTrackPostVertexCuts
+    #                       )
+
+def makeB2Q2B4piAllX0( name,
+                  diTrkList,
+                  MinPTCut,
+                  MinMassCut,
+                  MaxMassCut,
+                  DIRACut,
+                  VtxChi2DOFCut ) :
+    """
+    Charmless to 4pi + neutrals selection with missing mass
+    """
+
+    _B2Q2B4piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2Q2B4piPreVertexCuts += " & ( APT > %(MinPTCut)s )" %locals()
+
+    _B2Q2B4piPostVertexCuts = "(VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) & (BPVDIRA > %(DIRACut)s)" %locals()
+
+    return SimpleSelection(name, CombineParticles, [ diTrkList ]
+                           , DecayDescriptor="B0 -> rho(770)0 rho(770)0"
+                           , MotherCut = _B2Q2B4piPostVertexCuts
+                           , CombinationCut = _B2Q2B4piPreVertexCuts
+                           )
+
+
+def makeB2Q2B3piAllX0( name,
+                       trkList,
+                       diTrkList,
+                       MinPTCut,
+                       MinMassCut,
+                       MaxMassCut,
+                       DIRACut,
+                       VtxChi2DOFCut ) :
+    """
+    Charmless to 3pi + neutrals selection with missing mass
+    """
+
+    _B2Q2B3piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2Q2B3piPreVertexCuts += " & ( APT > %(MinPTCut)s )" %locals()
+
+    _B2Q2B3piPostVertexCuts = "(VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) & (BPVDIRA > %(DIRACut)s)" %locals()
+
+    return SimpleSelection(name, CombineParticles, [ diTrkList, trkList ]
+                           , DecayDescriptors = [ "[B+ -> rho(770)0 pi+]cc" ]
+                           , MotherCut = _B2Q2B3piPostVertexCuts
+                           , CombinationCut = _B2Q2B3piPreVertexCuts
+                           )
+
+
+
+def makeB2Q2BKSX( name,
+                  kSList,
+                  diTrkList,
+                  MinPTCut,
+                  MinMassCut,
+                  MaxMassCut,
+                  DIRACut,
+                  VtxChi2DOFCut ) :
+    """
+    Charmless to KSX, where X is a light resonance reconstructed as rho
+    """
+
+    _B2Q2BKSXPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2Q2BKSXPreVertexCuts += " & ( APT > %(MinPTCut)s )" %locals()
+
+    _B2Q2BKSXPostVertexCuts = "(VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s) & (BPVDIRA > %(DIRACut)s)" %locals()
+
+    return SimpleSelection(name, CombineParticles, [ diTrkList, kSList]
+                           , DecayDescriptor="B0 -> rho(770)0 KS0"
+                           , MotherCut = _B2Q2BKSXPostVertexCuts
+                           , CombinationCut = _B2Q2BKSXPreVertexCuts
+                           )
+
+def getRelInfo4pi():
+    relInfo = []
+    for coneAngle in [0.8,1.0,1.3,1.7]:
+        conestr = str(coneAngle).replace('.','')
+        relInfo += [
+        { "Type"         : "RelInfoConeVariables",
+             "IgnoreUnmatchedDescriptors" : True,
+             "ConeAngle"    : coneAngle,
+             "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM', 'CONEDELTAETA'],
+             "DaughterLocations" : {
+                "^[B0 -> (rho(770)0 -> pi+ pi- {X0}) (rho(770)0 -> pi+ pi- {X0}) ]CC" : 'P2ConeVar%s_B' % conestr,
+                "[B0 -> ^(rho(770)0 -> pi+ pi- {X0}) (rho(770)0 -> pi+ pi- {X0}) ]CC" : 'P2ConeVar%s_X1' % conestr,
+                "[B0 -> (rho(770)0 -> pi+ pi- {X0}) ^(rho(770)0 -> pi+ pi- {X0}) ]CC" : 'P2ConeVar%s_X2' % conestr,
+                "[B0 -> (rho(770)0 -> ^pi+ pi- {X0}) (rho(770)0 -> pi+ pi- {X0}) ]CC" : 'P2ConeVar%s_X11' % conestr,
+                "[B0 -> (rho(770)0 -> pi+ ^pi- {X0}) (rho(770)0 -> pi+ pi- {X0}) ]CC" : 'P2ConeVar%s_X12' % conestr,
+                "[B0 -> (rho(770)0 -> pi+ pi- {X0}) (rho(770)0 -> ^pi+ pi- {X0}) ]CC" : 'P2ConeVar%s_X21' % conestr,
+                "[B0 -> (rho(770)0 -> pi+ pi- {X0}) (rho(770)0 -> pi+ ^pi- {X0}) ]CC" : 'P2ConeVar%s_X22' % conestr
+         } }       ]
+    relInfo += [ { "Type" : "RelInfoVertexIsolation", "Location": "VertexIsoInfo" } ]
+    return relInfo
+
+def getRelInfo3pi():
+    relInfo = []
+    for coneAngle in [0.8,1.0,1.3,1.7]:
+        conestr = str(coneAngle).replace('.','')
+        relInfo += [
+        { "Type"         : "RelInfoConeVariables",
+             "IgnoreUnmatchedDescriptors" : True,
+             "ConeAngle"    : coneAngle,
+             "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM', 'CONEDELTAETA'],
+             "DaughterLocations" : {
+                "^[B+ -> (rho(770)0 -> pi+ pi- {X0}) pi+ ]CC" : 'P2ConeVar%s_B' % conestr,
+                "[B+ -> ^(rho(770)0 -> pi+ pi- {X0}) pi+ ]CC" : 'P2ConeVar%s_X1' % conestr,
+                "[B+ -> (rho(770)0 -> pi+ pi- {X0}) ^pi+ ]CC" : 'P2ConeVar%s_X2' % conestr,
+                "[B+ -> (rho(770)0 -> ^pi+ pi- {X0}) pi+ ]CC" : 'P2ConeVar%s_X11' % conestr,
+                "[B+ -> (rho(770)0 -> pi+ ^pi- {X0}) pi+ ]CC" : 'P2ConeVar%s_X12' % conestr
+        } }       ]
+        relInfo += [ { "Type" : "RelInfoVertexIsolation", "Location": "VertexIsoInfo" } ]
+        return relInfo
+
+def getRelInfoKSX() :
+    """
+    Create a RelInfoConeVariables dictionary for the given angle
+    """
+    relInfo = []
+    for coneAngle in [0.8,1.0,1.3,1.7]:
+        conestr = str(coneAngle).replace('.','')
+        relInfo += [
+        { "Type"         : "RelInfoConeVariables",
+             "IgnoreUnmatchedDescriptors" : True
+             ,"ConeAngle"    : coneAngle
+             ,"Variables"         : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM', 'CONEDELTAETA']
+             ,'Location'          : 'ConeVar%s_B' % conestr
+             , "DaughterLocations" : { 
+                 "^[B0 -> (rho(770)0 -> pi+ pi- {X0}) KS0]CC" : 'ConeVar%s_B' % conestr,
+                 "[B0 -> ^(rho(770)0 -> pi+ pi- {X0}) KS0]CC" : 'ConeVar%s_X' % conestr,                      
+                 "[B0 -> (rho(770)0 -> pi+ pi- {X0}) ^KS0]CC" : 'ConeVar%s_KS' % conestr,
+                 "[B0 -> (rho(770)0 -> ^pi+ pi- {X0}) KS0]CC" : 'ConeVar%s_X1' % conestr,
+                 "[B0 -> (rho(770)0 -> pi+ ^pi- {X0}) KS0]CC" : 'ConeVar%s_X2' % conestr
+        } }]
+        relInfo += [ { "Type" : "RelInfoVertexIsolation", "Location": "VertexIsoInfo" } ]
+        return relInfo
+
+def makeTISTOSFilter(name):
+    specs = {'Hlt1(Two)?Track.*Decision%TOS':0}
+    from Configurables import TisTosParticleTagger
+    tisTosFilter = TisTosParticleTagger(name+'TISTOSFilter')
+    tisTosFilter.TisTosSpecs = specs
+    tisTosFilter.ProjectTracksToCalo = False
+    tisTosFilter.CaloClustForCharged = False
+    tisTosFilter.CaloClustForNeutral = False
+    tisTosFilter.TOSFrac = {4:0.0, 5:0.0}
+    return tisTosFilter
+
+def tisTosSelection(sel):
+    '''Filters Selection sel to be TOS OR TIS.'''
+    tisTosFilter = makeTISTOSFilter(sel.name())
+    return Selection(sel.name()+'TISTOS', Algorithm=tisTosFilter, RequiredSelections=[sel])
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2HHBDT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2HHBDT.py
new file mode 100644
index 000000000..0c12af83c
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2HHBDT.py
@@ -0,0 +1,175 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting B -> hh'
+
+Authors: Stefano Perazzini
+"""
+
+########################################################################
+__author__ = ['Stefano Perazzini']
+__date__ = '21/08/2012'
+__version__ = '$Revision: 1.5 $'
+
+__all__ = ('B2HHBDTLines',
+           'makeB2HHBDT',
+           'applyBDT',
+           'default_config')
+
+from Gaudi.Configuration import *
+
+from GaudiKernel.SystemOfUnits import *
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles                     import StdNoPIDsPions
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+
+
+default_config = {
+    'NAME'        : 'B2HHBDT',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'B2HHBDTLines',
+    'CONFIG'      : { 'PrescaleB2HHBDT' : 1.,
+                      'TrChi2'          : 4,
+                      'TrGhostProb'     : 3,
+                      'PionPT'          : 1000,
+                      'SumPT'           : 4500,
+                      'DOCACHI2'        : 9,
+                      'BIPCHI2'         : 9,
+                      'BDIRA'           : 0.99,
+                      'BPT'             : 0,
+                      'BMassWinLow'     : 4700,
+                      'BMassWinHigh'    : 6200,
+                      'BMassLow'        : 4800,
+                      'BMassHigh'       : 6200,
+                      'PionIPCHI2'      : 16,
+                      'BFDCHI2'         : 100,
+                      'BDTCut'          : -1,
+                      'BDTWeightsFile'  : "$TMVAWEIGHTSROOT/data/B2HH_BDT_v1r5.xml"
+                    },
+    'STREAMS'     : ['BhadronCompleteEvent']
+}
+
+
+
+## Change decay descriptor and re-fit decay tree
+
+class B2HHBDTLines( LineBuilder ) :
+    """Class defining the Hb -> hh stripping lines"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        B2HHBDTName   = "B2HH"
+
+        # make the various stripping selections
+        self.B2HHBDT = makeB2HHBDT( B2HHBDTName,
+                                    config['TrChi2'],
+                                    config['TrGhostProb'],
+                                    config['PionPT'],
+                                    config['SumPT'],
+                                    config['DOCACHI2'],      
+                                    config['BIPCHI2'],       
+                                    config['BDIRA'],         
+                                    config['BPT'],           
+                                    config['BMassWinLow'],   
+                                    config['BMassWinHigh'],  
+                                    config['PionIPCHI2'],    
+                                    config['BFDCHI2'],
+                                    config['BMassLow'],
+                                    config['BMassHigh']       
+                                  )
+
+        #self.lineB2HHBkg = StrippingLine( B2HHBDTName+"BkgLine",
+        #                                  prescale  = config['PrescaleB2HHBDT'],
+        #                                  selection = self.B2HHBDT,
+        #                                  EnableFlavourTagging = True,
+        #                                  MDSTFlag = True )
+
+        _bdtVars = { "minPT"      : "MINTREE(ABSID=='pi+',PT) / GeV",
+                     "minIPCHI2"  : "MINTREE(ABSID=='pi+',MIPCHI2DV(PRIMARY))",
+                     "maxPT"      : "MAXTREE(ABSID=='pi+',PT) / GeV",
+                     "maxIPCHI2"  : "MAXTREE(ABSID=='pi+',MIPCHI2DV(PRIMARY))",
+                     "doca"       : "PFUNA ( ADOCA ( 1 , 2 ) )",
+                     "vertexCHI2" : "VFASPF(VCHI2/VDOF)",
+                     "bPT"        : "PT / GeV",
+                     "bIPCHI2"    : "BPVIPCHI2()",
+                     "bFDCHI2"    : "BPVVDCHI2" }
+
+        self.CutBDT  = applyBDT( "CutBDT_" + B2HHBDTName,
+                                 SelB2HHBDT     = self.B2HHBDT,
+                                 BDTVars        = _bdtVars,
+                                 BDTCutValue    = config['BDTCut'],
+                                 BDTWeightsFile = config['BDTWeightsFile']
+                               )
+
+
+        self.lineB2HHBDT = StrippingLine( B2HHBDTName+"BDTLine",
+                                          prescale  = config['PrescaleB2HHBDT'],
+                                          selection = self.CutBDT,
+                                          EnableFlavourTagging = True,
+                                          MDSTFlag = True )
+
+        self.registerLine(self.lineB2HHBDT)
+        #self.registerLine(self.lineB2HHBkg)
+
+def makeB2HHBDT( name,
+                 trChi2,trGhostProb,minPT,sumPT,docachi2,
+                 bipchi2,bdira,bpt,massWinLow,massWinHigh,pionipchi2,bfdchi2,
+                 massLow,massHigh) :
+
+    _daughters_cuts = "(TRGHOSTPROB < %(trGhostProb)s) & (TRCHI2DOF < %(trChi2)s) & (PT > %(minPT)s * MeV) & (MIPCHI2DV(PRIMARY) > %(pionipchi2)s )" %locals()
+
+    _combination_cuts = "( (APT1 + APT2) > %(sumPT)s ) & ( AM > %(massWinLow)s ) & ( AM < %(massWinHigh)s ) & ( ACUTDOCACHI2( %(docachi2)s, '' ) )" %locals()
+
+    _mother_cuts = "( PT > %(bpt)s ) & ( BPVDIRA > %(bdira)s ) & ( BPVIPCHI2() < %(bipchi2)s ) & ( BPVVDCHI2 > %(bfdchi2)s ) & ( M > %(massLow)s * MeV ) & ( M < %(massHigh)s * MeV )" %locals()
+
+
+    CombineB2HHBDT = CombineParticles( DecayDescriptor = 'B0 -> pi+ pi-',
+                                       DaughtersCuts = { "pi+" : _daughters_cuts },
+                                       CombinationCut = _combination_cuts,
+                                       MotherCut = _mother_cuts,
+                                       ReFitPVs = True )
+
+    return Selection( name,
+                      Algorithm = CombineB2HHBDT,
+                      RequiredSelections = [ StdNoPIDsPions ] )
+
+
+def applyBDT( name,
+              SelB2HHBDT,
+              BDTVars,
+              BDTCutValue,
+              BDTWeightsFile ):
+
+    from MVADictHelpers import addTMVAclassifierValue
+    from Configurables import FilterDesktop as MVAFilterDesktop
+
+    _FilterB = MVAFilterDesktop( name + "Filter",
+                                 Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + str(BDTCutValue)  )
+
+    addTMVAclassifierValue( Component = _FilterB,
+                            XMLFile   = BDTWeightsFile,
+                            Variables = BDTVars,
+                            ToolName  = name )
+
+    return Selection( name,
+                      Algorithm =  _FilterB,
+                      RequiredSelections = [ SelB2HHBDT ] )
+
+
+########################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2HHPi0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2HHPi0.py
new file mode 100644
index 000000000..3386e547f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2HHPi0.py
@@ -0,0 +1,197 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = "Regis Lefevre, Daniel O'Hanlon"
+__date__ = '22/01/2019'
+__version__ = '$Revision: 1.91 $'
+
+'''
+Stripping selection for B -> h h pi0
+'''
+#################################################################
+#  This strip is used both for Bd -> pi pi pi0 and Bs -> K pi pi0
+#  B Mass window : 4200 to 6400 MeV/c2 
+#  2 lines : one for merged, one for resolved pi0
+#################################################################
+
+__all__ = ('StrippingB2HHPi0Conf',
+           'makeB2HHPi0R',
+           'makeB2HHPi0M',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdNoPIDsPions,StdLooseMergedPi0,StdLooseResolvedPi0
+
+default_config = {
+    'NAME'        : 'B2HHPi0',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'StrippingB2HHPi0Conf',
+    'CONFIG'      : { 'PiMinPT'              : 500,
+                      'PiMinP'               : 5000,
+                      'PiMinTrackProb'       : 0.000001,
+                      'PiMaxGhostProb'       : 0.5,
+                      'PiMinIPChi2'          : 25,
+                      'Pi0MinPT_M'           : 2500,
+                      'Pi0MinPT_R'           : 1500,
+                      'ResPi0MinGamCL'       : 0.2,
+                      'BMinM'                : 4200,
+                      'BMaxM'                : 6400,
+                      'BMinPT_M'             : 3000,
+                      'BMinPT_R'             : 2500,
+                      'BMinVtxProb'          : 0.001,
+                      'BMaxIPChi2'           : 9,
+                      'BMinDIRA'             : 0.99995,
+                      'BMinVVDChi2'          : 64,
+                      'MergedLinePrescale'   : 1.,
+                      'MergedLinePostscale'  : 1.,
+                      'ResolvedLinePrescale' : 1.,
+                      'ResolvedLinePostscale': 1.,
+                      'HLT1Dec'              : 'Hlt1TrackAllL0Decision|Hlt1TrackPhotonDecision',
+                      'HLT2Dec'              : 'Hlt2Topo[234]Body.*Decision|Hlt2IncPhiDecision',
+                      },
+    'STREAMS'     : ['Bhadron']
+    }
+
+class StrippingB2HHPi0Conf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+##############################################################
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        myPions       = StdNoPIDsPions
+        myMergedPi0   = StdLooseMergedPi0
+        myResolvedPi0 = StdLooseResolvedPi0
+
+        Hlt1Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT1Dec'],
+                      'Preambulo' : ["from LoKiCore.functions import *"]}
+
+        Hlt2Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT2Dec'],
+                      'Preambulo' : ["from LoKiCore.functions import *"]}
+
+        #---------------------------------------
+        # RelatedInfo
+
+        relinfo = [ { "Type" : "RelInfoConeVariables"
+                    , "ConeAngle" : 1.5
+                    , "TracksLocation" : "/Event/Phys/StdNoPIDsPions"
+                    , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPXASYM', 'CONEPYASYM', 'CONEPZASYM', 'CONEPASYM', 'CONEPTASYM', 'CONEDELTAETA', 'CONEDELTAPHI']
+                    , "Location"  : 'P2ConeVar15' },
+                    { "Type" : "RelInfoConeVariables"
+                    , "ConeAngle" : 1.0
+                    , "TracksLocation" : "/Event/Phys/StdNoPIDsPions"
+                    , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPXASYM', 'CONEPYASYM', 'CONEPZASYM', 'CONEPASYM', 'CONEPTASYM', 'CONEDELTAETA', 'CONEDELTAPHI']
+                    , "Location"  : 'P2ConeVar10' },
+                    { "Type" : "RelInfoConeVariables"
+                    , "ConeAngle" : 1.7
+                    , "TracksLocation" : "/Event/Phys/StdNoPIDsPions"
+                    , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPXASYM', 'CONEPYASYM', 'CONEPZASYM', 'CONEPASYM', 'CONEPTASYM', 'CONEDELTAETA', 'CONEDELTAPHI']
+                    , "Location"  : 'P2ConeVar17' },
+                    { "Type" : "RelInfoConeVariables"
+                    , "ConeAngle" : 2.0
+                    , "TracksLocation" : "/Event/Phys/StdNoPIDsPions"
+                    , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPXASYM', 'CONEPYASYM', 'CONEPZASYM', 'CONEPASYM', 'CONEPTASYM', 'CONEDELTAETA', 'CONEDELTAPHI']
+                    , "Location"  : 'P2ConeVar20' },
+                    { "Type"      : "RelInfoVertexIsolation"
+                    , "Location"  : 'VtxIsolationVar'}
+                  ]
+
+        #---------------------------------------
+        # B -> HHPi0 selections
+        self.selresolved = makeB2HHPi0R( name + 'R',
+	                                 config,
+                                         DecayDescriptor = 'B0 -> pi+ pi- pi0',
+					 inputSel = [myPions, myResolvedPi0]
+                                         )
+        self.selmerged = makeB2HHPi0M( name + 'M',
+	                               config,
+                                       DecayDescriptor = 'B0 -> pi+ pi- pi0',
+                                       inputSel = [myPions, myMergedPi0]
+                                       )
+        #---------------------------------------
+        # Stripping lines
+        self.B2HHPi0R_line = StrippingLine(name + "_R" %locals()['config'],
+                                           prescale = config['ResolvedLinePrescale'],
+                                           postscale = config['ResolvedLinePostscale'],
+                                           selection = self.selresolved,
+                                           EnableFlavourTagging = True,
+                                           RequiredRawEvents = ["Calo"],
+                                           #HLT1 = Hlt1Filter,
+                                           #HLT2 = Hlt2Filter,
+                                           RelatedInfoTools = relinfo,
+                                           )
+        self.B2HHPi0M_line = StrippingLine(name + "_M" %locals()['config'],
+                                           prescale = config['MergedLinePrescale'],
+                                           postscale = config['MergedLinePostscale'],
+                                           selection = self.selmerged,
+                                           EnableFlavourTagging = True,
+                                           RequiredRawEvents = ["Calo"],
+                                           RelatedInfoTools = relinfo,
+                                           )
+        # register lines
+        self.registerLine(self.B2HHPi0R_line)
+        self.registerLine(self.B2HHPi0M_line)
+
+##############################################################
+def makeB2HHPi0R( name,
+                  config,
+                  DecayDescriptor,
+                  inputSel
+                  ) :
+
+    _piCuts = "(PT>%(PiMinPT)s *MeV) & (P>%(PiMinP)s *MeV) & (TRPCHI2>%(PiMinTrackProb)s) & (TRGHOSTPROB<%(PiMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(PiMinIPChi2)s)" % locals()['config']
+    _pi0Cuts = "(PT>%(Pi0MinPT_R)s *MeV) & (CHILD(CL,1)>%(ResPi0MinGamCL)s) & (CHILD(CL,2)>%(ResPi0MinGamCL)s)" % locals()['config']
+    _daughterCuts = { 'pi+' : _piCuts, 'pi-' : _piCuts, 'pi0' : _pi0Cuts }
+    _combCuts = "(AM>%(BMinM)s *MeV) & (AM<%(BMaxM)s *MeV)" % locals()['config']
+    _motherCuts = "(PT>%(BMinPT_R)s *MeV) & (VFASPF(VPCHI2)>%(BMinVtxProb)s) & (BPVVDCHI2>%(BMinVVDChi2)s) & (BPVIPCHI2()<%(BMaxIPChi2)s) & (BPVDIRA>%(BMinDIRA)s)" % locals()['config']
+
+    _B = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts,
+                           ReFitPVs = True 
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _B,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
+def makeB2HHPi0M( name,
+                  config,
+                  DecayDescriptor,
+                  inputSel
+                  ) :
+
+    _piCuts = "(PT>%(PiMinPT)s *MeV) & (P>%(PiMinP)s *MeV) & (TRPCHI2>%(PiMinTrackProb)s) & (TRGHOSTPROB<%(PiMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(PiMinIPChi2)s)" % locals()['config']
+    _pi0Cuts = "(PT>%(Pi0MinPT_M)s *MeV)" % locals()['config']
+    _daughterCuts = { 'pi+' : _piCuts, 'pi-' : _piCuts, 'pi0' : _pi0Cuts }
+    _combCuts = "(AM>%(BMinM)s *MeV) & (AM<%(BMaxM)s *MeV)" % locals()['config']
+    _motherCuts = "(PT>%(BMinPT_M)s *MeV) & (VFASPF(VPCHI2)>%(BMinVtxProb)s) & (BPVVDCHI2>%(BMinVVDChi2)s) & (BPVIPCHI2()<%(BMaxIPChi2)s) & (BPVDIRA>%(BMinDIRA)s)" % locals()['config']
+
+    _B = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts,
+                           ReFitPVs = True 
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _B,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2KShh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2KShh.py
new file mode 100644
index 000000000..228c72973
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2KShh.py
@@ -0,0 +1,329 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of B->KShh stripping Selections and StrippingLines.
+Provides functions to build KS->DD, KS->LL, KS->LD and B selections.
+Provides class B2KShhConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Selections based on previous version B2KShh line but optimised for DP analysis.
+Exported symbols (use python help!):
+   - B2KShhConf
+   - default_config
+"""
+
+__author__ = ['Thomas Latham','Rafael Coutinho']
+__date__ = '24/11/2016'
+__version__ = 'Stripping24r1/Stripping26r1'
+__all__ = {'B2KShhConf',
+           'default_config'}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdAllNoPIDsPions as Pions
+
+default_config = {
+    'NAME'        : 'B2KShh',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'B2KShhConf',
+    'CONFIG'      : {'Trk_Chi2'                : 4.0,
+                     'Trk_GhostProb'           : 0.5,
+                     'KS_DD_MassWindow'        : 30.0,
+                     'KS_DD_VtxChi2'           : 12.0,
+                     'KS_DD_FDChi2'            : 50.0,
+                     'KS_DD_Pmin'              : 6000.0,
+                     'KS_LD_MassWindow'        : 25.0,
+                     'KS_LD_VtxChi2'           : 12.0,
+                     'KS_LD_FDChi2'            : 50.0,
+                     'KS_LD_Pmin'              : 6000.0,
+                     'KS_LL_MassWindow'        : 20.0,
+                     'KS_LL_VtxChi2'           : 12.0,
+                     'KS_LL_FDChi2'            : 80.0,
+                     'KS_LL_Pmin'              : 0.0,
+                     'B_Mlow'                  : 1279.0,
+                     'B_Mhigh'                 : 921.0,
+                     'B_APTmin'                : 1000.0,
+                     'BDaug_MedPT_PT'          : 800.0,
+                     'BDaug_MaxDOCAChi2'       : 25.0,
+                     'BDaug_DD_PTsum'          : 4200.0,
+                     'BDaug_LD_PTsum'          : 4200.0,
+                     'BDaug_LL_PTsum'          : 3000.0,
+                     'B_PTmin'                 : 1500.0,
+                     'B_VtxChi2'               : 12.0,
+                     'KS_FD_Z'                 : 15.,
+                     'B_DD_Dira'               : 0.999,
+                     'B_LD_Dira'               : 0.999,
+                     'B_LL_Dira'               : 0.999,
+                     'B_DD_IPChi2'             : 6.0,
+                     'B_LD_IPChi2'             : 7.0,
+                     'B_LL_IPChi2'             : 8.0,
+                     'B_DD_FDChi2'             : 50.0,
+                     'B_LD_FDChi2'             : 50.0,
+                     'B_LL_FDChi2'             : 50.0,
+                     'BDaug_DD_IPChi2sum'      : 50.0,
+                     'BDaug_LD_IPChi2sum'      : 50.0,
+                     'BDaug_LL_IPChi2sum'      : 50.0,
+                     'GEC_MaxTracks'           : 250,
+                     'ConeAngles'              : [ 1.0, 1.5, 1.7, 2.0 ],
+                     # Run1 Triggers
+                     #'HLT1Dec'                 : 'Hlt1TrackAllL0Decision',
+                     #'HLT2Dec'                 : 'Hlt2Topo[234]Body.*Decision',
+                     # Run2 Triggers
+                     'HLT1Dec'                 : 'Hlt1(Two)?TrackMVADecision|Hlt1(Phi)?IncPhiDecision',
+                     'HLT2Dec'                 : 'Hlt2Topo[234]BodyDecision|Hlt2(Phi)?IncPhiDecision',
+                     'FlavourTagging'          : True,
+                     'MDST'                    : False,
+                     'Prescale'                : 1.0,
+                     'Prescale_SameSign'       : 1.0,
+                     'Postscale'               : 1.0
+                     },
+    'STREAMS'     : {
+                     'Bhadron' : [
+                         'StrippingB2KShh_DD_Run2_OS_Line',
+                         'StrippingB2KShh_LL_Run2_OS_Line',
+                         'StrippingB2KShh_LD_Run2_OS_Line',
+                         'StrippingB2KShh_DD_Run2_SS_Line',
+                         'StrippingB2KShh_LL_Run2_SS_Line',
+                         'StrippingB2KShh_LD_Run2_SS_Line',
+                         ]
+                     }
+    }
+
+class B2KShhConf(LineBuilder) :
+    """
+    Builder of B->KShh stripping Selection and StrippingLine.
+    Constructs B -> KS h+ h- Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> b2kshhConf  = B2KShhConf('B2KShhTest',config)
+    >>> b2kshhLines = b2kshhConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selKS2DD               : KS -> Down Down Selection object
+    selKS2LL               : KS -> Long Long Selection object
+    selKS2LD               : KS -> Long Down Selection object
+    selB2KSDDhh            : B -> KS(DD) h+ h- Selection object
+    selB2KSLLhh            : B -> KS(LL) h+ h- Selection object
+    selB2KSLDhh            : B -> KS(LD) h+ h- Selection object
+    selB2KSDDhh_SameSign   : B -> KS(DD) h+(-) h+(-) Selection object
+    selB2KSLLhh_SameSign   : B -> KS(LL) h+(-) h+(-) Selection object
+    selB2KSLDhh_SameSign   : B -> KS(LD) h+(-) h+(-) Selection object
+    dd_line                : StrippingLine made out of selB2KSDDhh
+    ll_line                : StrippingLine made out of selB2KSLLhh
+    ld_line                : StrippingLine made out of selB2KSLDhh
+    dd_line_same           : StrippingLine made out of selB2KSDDhh_SameSign
+    ll_line_same           : StrippingLine made out of selB2KSLLhh_SameSign
+    ld_line_same           : StrippingLine made out of selB2KSLDhh_SameSign
+    lines                  : List of lines, [dd_line, ll_line, ld_line, dd_line_same, ll_line_same, ld_line_same]
+
+    Exports as class data member:
+    B2KShhConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        _ks_types = [ 'DD', 'LL', 'LD' ]
+        _years = [ 'Run2' ]
+        _signs = [ 'OS', 'SS' ]
+
+        GECFilter = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        Hlt1Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT1Dec'],
+                     'Preambulo' : ["from LoKiCore.functions import *"]}
+                          
+        Hlt2Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT2Dec'],
+                     'Preambulo' : ["from LoKiCore.functions import *"]}
+
+        # the related info tools
+        relinfo = [ self.getRelInfoConeTool( angle ) for angle in config['ConeAngles'] ]
+        relinfo.append( self.getRelInfoVtxIsoTool() )
+
+        # the input charged particles
+        self.pions = Pions
+
+        # build the various KS input lists
+        self.selKS = {}
+        for ks_type in _ks_types :
+            self.selKS[ks_type] = self.makeKS( 'KSfor'+name+ks_type, ks_type, config )
+
+        # build the various B's
+        _selB = {}
+        _mylines = {}
+        for ks_type in _ks_types :
+            _selB[ks_type] = {}
+            _mylines[ks_type] = {}
+
+            for year in _years :
+                _selB[ks_type][year] = {}
+                _mylines[ks_type][year] = {}
+
+                for sign in _signs :
+
+                    _linename = name+'_'+ks_type+'_'+year+'_'+sign+'_Line'
+
+                    _selB[ks_type][year][sign] = self.makeB2KShh( name, ks_type, year, sign, config )
+
+                    # Main Algorithm initialisation
+                    _flavourFlag = config['FlavourTagging']
+                    if sign == 'SS' : 
+                        _flavourFlag = False
+
+                    _mylines[ks_type][year][sign] = StrippingLine(_linename,
+                                           prescale = config['Prescale'],
+                                           postscale = config['Postscale'],
+                                           selection = _selB[ks_type][year][sign],
+                                           HLT1 = Hlt1Filter,
+                                           HLT2 = Hlt2Filter,
+                                           FILTER = GECFilter,
+                                           RelatedInfoTools = relinfo, 
+                                           EnableFlavourTagging = _flavourFlag,
+                                           MDSTFlag = config['MDST']
+                                           )
+        
+
+                    self.registerLine(_mylines[ks_type][year][sign])
+
+
+    def makeKS( self, name, ks_type, config ) :
+        # define all the cuts
+        _massCut          = "(ADMASS('KS0')<%s*MeV)"         % config['KS_%s_MassWindow'%ks_type]
+        _vtxCut           = "(VFASPF(VCHI2)<%s)"             % config['KS_%s_VtxChi2'%ks_type]
+        _fdCut            = "(BPVVDCHI2>%s)"                 % config['KS_%s_FDChi2'%ks_type]
+        _momCut           = "(P>%s*MeV)"                     % config['KS_%s_Pmin'%ks_type]
+        _trkChi2Cut1      = "(CHILDCUT((TRCHI2DOF<%s),1))"   % config['Trk_Chi2']
+        _trkChi2Cut2      = "(CHILDCUT((TRCHI2DOF<%s),2))"   % config['Trk_Chi2']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))" % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))" % config['Trk_GhostProb']
+
+        _allCuts = _trkChi2Cut1
+        _allCuts += '&'+_trkChi2Cut2
+
+        if ks_type == 'LL' :
+            _allCuts += '&'+_trkGhostProbCut1
+            _allCuts += '&'+_trkGhostProbCut2
+        else :
+            _allCuts += '&'+_momCut
+
+        _allCuts += '&'+_massCut
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_fdCut
+
+        # get the KS's to filter
+        if ks_type == 'LL' :
+            _stdKS = DataOnDemand( Location = 'Phys/StdVeryLooseKs%s/Particles' % ks_type )
+        else :
+            _stdKS = DataOnDemand( Location = 'Phys/StdLooseKs%s/Particles' % ks_type )
+
+        # make the filter
+        _filterKS = FilterDesktop( Code = _allCuts )
+
+        # make and return the Selection object
+        return Selection( name, Algorithm = _filterKS, RequiredSelections = [_stdKS] )
+
+
+    def makeB2KShh( self, name, ks_type, year, sign, config ) :
+        """
+        Create and return either a B -> KS h+ h- Selection object, or a B -> KS h+(-) h+(-) Same Sign Selection Object
+        Arguments:
+        name             : name of the Selection.
+        ks_type          : type of the KS, e.g. DD
+        year             : the year for which we are making the selection
+        sign             : whether we use opposite-sign or same-sign h's
+        config           : config dictionary
+        """
+
+        _trkChi2Cut      = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+        _trkGhostProbCut = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+
+        _daughtersCuts = _trkChi2Cut+'&'+_trkGhostProbCut
+
+        _massCutLow       = "(AM>(5279-%s)*MeV)"        % config['B_Mlow']
+        _massCutHigh      = "(AM<(5279+%s)*MeV)"        % config['B_Mhigh']
+        _aptCut           = "(APT>%s*MeV)"              % config['B_APTmin']
+        _daugPtSumCut     = "((APT1+APT2+APT3)>%s*MeV)" % config['BDaug_%s_PTsum' % ks_type]
+        _daugMedPtCut     = "(ANUM(PT>%s*MeV)>=2)"      % config['BDaug_MedPT_PT']
+        _maxDoca12Chi2Cut = "(ACHI2DOCA(1,2)<%s)"       % config['BDaug_MaxDOCAChi2']
+        _maxDoca13Chi2Cut = "(ACHI2DOCA(1,3)<%s)"       % config['BDaug_MaxDOCAChi2']
+        _maxDoca23Chi2Cut = "(ACHI2DOCA(2,3)<%s)"       % config['BDaug_MaxDOCAChi2']
+
+        _comb12Cuts = _massCutHigh+'&'+_maxDoca12Chi2Cut
+        _combCuts = _daugPtSumCut+'&'+_massCutLow+'&'+_massCutHigh+'&'+_aptCut+'&'+_daugMedPtCut+'&'+_maxDoca13Chi2Cut+'&'+_maxDoca23Chi2Cut
+
+        _ptCut            = "(PT>%s*MeV)"                                    % config['B_PTmin']
+        _vtxChi2Cut       = "(VFASPF(VCHI2)<%s)"                             % config['B_VtxChi2']
+        _KSdiffZ          = "((CHILD(VFASPF(VZ),3) - VFASPF(VZ))>%s*mm)"     % config['KS_FD_Z']
+        _diraCut          = "(BPVDIRA>%s)"                                   % config['B_%s_Dira' % ks_type]
+        _ipChi2Cut        = "(BPVIPCHI2()<%s)"                               % config['B_%s_IPChi2' % ks_type]
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                                 % config['B_%s_FDChi2' % ks_type]
+        _ipChi2SumCut     = "(SUMTREE(BPVIPCHI2(),(ABSID=='pi+'),0.0) > %s)" % config['BDaug_%s_IPChi2sum' % ks_type]
+
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut+'&'+_KSdiffZ+'&'+_diraCut+'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_ipChi2SumCut
+
+        _B = DaVinci__N3BodyDecays()
+
+        if sign == 'OS' :
+            _B.DecayDescriptors = [ "B0 -> pi+ pi- KS0" ]
+        else:
+            _B.DecayDescriptors = [ "B0 -> pi+ pi+ KS0", "B0 -> pi- pi- KS0" ]
+
+        _B.DaughtersCuts    = { "pi+" : _daughtersCuts }
+        _B.Combination12Cut = _comb12Cuts
+        _B.CombinationCut   = _combCuts
+        _B.MotherCut        = _motherCuts
+        _B.ReFitPVs         = True 
+
+        _selname = name + '_' + ks_type + '_' + year + '_' + sign + '_Presel'
+
+        return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selKS[ks_type], self.pions ])
+
+
+    @staticmethod
+    def getRelInfoConeTool( angle ) :
+        """
+        Create a RelInfoConeVariables dictionary for the given angle
+        """
+        angle_str = str(angle)
+        angle_str = angle_str.replace('.','')
+        tool = {
+                  "Type"              : "RelInfoConeVariables"
+                , "ConeAngle"         : angle
+                , "Variables"         : ['CONEANGLE', 'CONEMULT', 'CONEPXASYM', 'CONEPYASYM', 'CONEPZASYM', 'CONEPASYM', 'CONEPTASYM', 'CONEDELTAETA', 'CONEDELTAPHI']
+                , 'Location'          : 'ConeVar%s_B' % angle_str
+                , "DaughterLocations" : { "B0 -> Meson Meson ^KS0" : 'ConeVar%s_KS' % angle_str }
+               }
+        return tool
+
+
+    @staticmethod
+    def getRelInfoVtxIsoTool() :
+        """
+        Create a RelInfoVertexIsolation dictionary
+        """
+        tool = {
+                  "Type"              : "RelInfoVertexIsolation"
+                , "Variables"         : ['VTXISONUMVTX', 'VTXISODCHI2ONETRACK', 'VTXISODCHI2MASSONETRACK', 'VTXISODCHI2TWOTRACK', 'VTXISODCHI2MASSTWOTRACK']
+                , 'Location'          : 'VtxIsolationVar_B'
+                , "DaughterLocations" : { "B0 -> Meson Meson ^KS0" : 'VtxIsolationVar_KS' }
+               }
+        return tool
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2KShhh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2KShhh.py
new file mode 100644
index 000000000..dfb6166db
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2KShhh.py
@@ -0,0 +1,281 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of B->KShhh
+   KSpipipi
+   KSKpipi
+   KSKKpi
+   KSKKK
+'''
+########################################################################
+
+__author__ = ['Maurizio Martinelli']
+__date__ = '3/11/2015'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('B2KShhhConf',
+           'default_config'
+           )
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, DaVinci__N4BodyDecays
+from StandardParticles                     import StdNoPIDsPions, StdNoPIDsKaons # ipchi2 cut
+from StandardParticles                     import StdLooseKsDD, StdLooseKsLL
+
+from PhysSelPython.Wrappers      import Selection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+
+from Configurables import FilterDesktop
+
+from GaudiKernel.SystemOfUnits import GeV, MeV, picosecond, mm
+
+
+default_config = {
+    'NAME'        : 'B2KShhh',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'B2KSHHHLines',
+    'CONFIG'      : { 'PrescaleB2PiPiPiKSLL' : 1,
+                      'PrescaleB2KPiPiKSLL'  : 1,
+                      'PrescaleB2KKPiKSLL'   : 1,
+                      'PrescaleB2KKKKSLL'    : 1,
+                      'PrescaleB2PiPiPiKSDD' : 1,
+                      'PrescaleB2KPiPiKSDD'  : 1,
+                      'PrescaleB2KKPiKSDD'   : 1,
+                      'PrescaleB2KKKKSDD'    : 1,
+                      # KS (DD)
+                      'MinDz_DD'             : 0 * mm,
+                      'MaxDz_DD'             : 9999 * mm,
+                      'KSCutDIRA_DD'         : 0.999,
+                      'KSCutMass_DD'         : 50 * MeV,
+                      'KSCutFDChi2_DD'       : 5,
+                      # KS (LL)
+                      'MinDz_LL'             : 0 * mm,
+                      'MaxDz_LL'             : 9999 * mm,
+                      'KSCutDIRA_LL'         : 0.999,
+                      'KSCutMass_LL'         : 35 * MeV,
+                      'KSCutFDChi2_LL'       : 5,
+                      # B -> KSHHH
+                      'TrChi2'               : 4,
+                      'TrGhostProb'          : 0.4,
+                      'MinTrkPT'             : 500 * MeV,
+                      'MinTrkP'              : 1.5 * GeV,
+                      'MinTrkIPChi2'         : 4,
+                      'HighPIDK'             : 0,
+                      'LowPIDK'              : 0,
+                      'MaxADOCACHI2'         : 10.0,
+                      'CombMassLow'          : 4500 * MeV,
+                      'CombMassHigh'         : 7200 * MeV,
+                      'MinCombPT'            : 1.5 * GeV,
+                      'MinVPT'               : 1.5 * GeV,
+                      'MaxVCHI2NDOF'         : 12.0,
+                      'MinBPVDIRA'           : 0.99995,
+                      'MinBPVTAU'            : 0.1 * picosecond,
+                      'MassLow'              : 4700 * MeV,
+                      'MassHigh'             : 7000 * MeV,
+                      # HLT filters, only process events firing triggers matching the RegEx
+                      # 2012 Triggers
+                      #'Hlt1Filter'          : 'Hlt1TrackAllL0Decision',
+                      #'Hlt2Filter'          : 'Hlt2Topo[234]Body.*Decision',
+                      # 2015 Triggers
+                      'Hlt1Filter'           : 'Hlt1(Two)?TrackMVADecision',
+                      'Hlt2Filter'           : 'Hlt2Topo[234]BodyDecision',
+                    },
+    'STREAMS'     : ['Bhadron']
+    }
+
+class B2KSHHHLines( LineBuilder ) :
+    """Class defining the B -> h h h KS stripping lines"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.KS = {'DD': Selection( "SelKSDDFor"+name,
+                                    Algorithm = self.KSFilter('KSDDFor'+name,
+                                                              config['MinDz_DD'],
+                                                              config['MaxDz_DD'],
+                                                              config['KSCutDIRA_DD'],
+                                                              config['KSCutMass_DD'],
+                                                              config['KSCutFDChi2_DD']),
+                                    RequiredSelections = [StdLooseKsDD]),
+                   'LL': Selection( "SelKSLLFor"+name,
+                                    Algorithm = self.KSFilter('KSLLFor'+name,
+                                                              config['MinDz_LL'],
+                                                              config['MaxDz_LL'],
+                                                              config['KSCutDIRA_LL'],
+                                                              config['KSCutMass_LL'],
+                                                              config['KSCutFDChi2_LL']),
+                                    RequiredSelections = [StdLooseKsLL]) }
+
+        self.B2KSHHH, self.lineB2KSHHH = {}, {}
+
+        decays = { 'PiPiPiKS'   : ['[B+ -> pi+ pi- pi+ KS0]cc'],
+                   'KPiPiKS'    : ['[B+ -> pi+ K- pi+ KS0]cc', '[B+ -> pi+ pi- K+ KS0]cc'],
+                   'KKPiKS'     : ['[B+ -> pi+ K- K+ KS0]cc', '[B+ -> K+ pi- K+ KS0]cc'],
+                   'KKKKS'      : ['[B+ -> K+ K- K+ KS0]cc'],
+                     }
+
+        for decay, decayDescriptors in decays.iteritems():
+            # make the various stripping selections
+            B2KSHHHName   = name + "_" + decay.replace('KS','_')
+
+            amKSPi = (134.97 + 497.611) * MeV
+            amKSK = (497.614 + 497.611 ) * MeV
+            amKS = 497.611 * MeV
+            am34 = amKSPi if decay == 'PiPiPiKS' else amKSK
+            inputs = [ StdNoPIDsPions ] if decay == 'PiPiPiKS' else [ StdNoPIDsPions, StdNoPIDsKaons ]
+
+            # use both LL and DD KS
+            for ksName, ksCands in self.KS.iteritems():
+                # Create the B candidate
+                self.B2KSHHH[decay+ksName] = self.makeB2KSHHH(B2KSHHHName+ksName,
+                                                            decayDescriptors,
+                                                            config['TrChi2'],
+                                                            config['TrGhostProb'],
+                                                            config['MinTrkPT'],
+                                                            config['MinTrkP'],
+                                                            config['MinTrkIPChi2'],
+                                                            config['HighPIDK'],
+                                                            config['LowPIDK'],
+                                                            am34,
+                                                            amKS,
+                                                            config['CombMassLow'],
+                                                            config['CombMassHigh'],
+                                                            config['MaxADOCACHI2'],
+                                                            config['MinCombPT'],
+                                                            config['MassLow'],
+                                                            config['MassHigh'],
+                                                            config['MinVPT'],
+                                                            config['MaxVCHI2NDOF'],
+                                                            config['MinBPVDIRA'],
+                                                            config['MinBPVTAU'],
+                                                            inputs+[ksCands]
+                                                            )
+
+                # Create the stripping line
+                Hlt1Filter = {'Code' : "HLT_PASS_RE('%s')" % config['Hlt1Filter'],
+                              'Preambulo' : ["from LoKiCore.functions import *"]} if config['Hlt1Filter'] != None else None
+
+                Hlt2Filter = {'Code' : "HLT_PASS_RE('%s')" % config['Hlt2Filter'],
+                              'Preambulo' : ["from LoKiCore.functions import *"]} if config['Hlt2Filter'] != None else None
+
+                RelInfo = self.getRelInfo()
+                self.lineB2KSHHH[decay+ksName] = StrippingLine(B2KSHHHName+ksName+"Line",
+                                                            prescale  = config['PrescaleB2'+decay+ksName],
+                                                            selection = self.B2KSHHH[decay+ksName],
+                                                            HLT1 = Hlt1Filter,
+                                                            HLT2 = Hlt2Filter,
+                                                            RelatedInfoTools = RelInfo )
+
+                # Register the line
+                self.registerLine(self.lineB2KSHHH[decay+ksName])
+        # end loop on decay modes
+
+    def KSFilter(self, _name,
+                 minDz, maxDz,
+                 KSCutDIRA, KSCutMass, KSCutFDChi2 ) :
+        _code = " (BPVVDZ > %(minDz)s ) " \
+                "&(BPVVDZ < %(maxDz)s ) " \
+                "&(BPVDIRA > %(KSCutDIRA)s ) " \
+                "&(ADMASS('KS0') < %(KSCutMass)s ) " \
+                "&(BPVVDCHI2> %(KSCutFDChi2)s )" % locals()
+        _KsFilter = FilterDesktop(name = _name, Code = _code)
+        return _KsFilter
+
+    def makeB2KSHHH( self, name, decayDescriptors,
+                   trChi2,trGhostProb,minPT,minP,minIPChi2,
+                   highPIDK, lowPIDK,
+                   am34, am4, amMin, amMax,
+                   maxDocaChi2, minCombPT,
+                   vmMin, vmMax, minVPT,  maxVChi, minbpvDira, minLT,
+                   inputSel = [ StdNoPIDsPions, StdNoPIDsKaons ]) :
+        """
+          Create and return a B -> KSHHH (H=K,pi) Selection object.
+          Arguments:
+          name            : name of the Selection.
+          DecayDescriptor : DecayDescriptor.
+          trChi2          : maximum tracks chi2
+          trGhostProb     : maximum tracks ghost probability
+          minPT           : minimum tracks PT
+          minP           : minimum tracks P
+          minIPChi2       : minimum tracks IPChi2
+          highPIDK        : maximum PIDk for pions
+          lowPIDK         : minimum PIDk for kaons
+          am34            : phase space limit on 2-body combinations mass
+          am4             : phase space limit on 3-body combinations mass
+          amMin           : minimum 4-body combination mass
+          amMax           : maximum 4-body combination mass
+          minPT           : minimum 4-body combination PT
+          maxDocaChi2     : maximum 2-tracks DocaChi2
+          mMin            : minimum vertex mass
+          mMax            : maximum vertex mass
+          minVPT          : minimum vertex PT
+          maxVChi         : maximum vertex chi2
+          minbpvDira      : minimum DIRA wrt best PV
+          minLT           : minimum lifetime wrt best PV
+          inputSel        : input selections
+        """
+
+        _daughters_cuts = " (TRGHOSTPROB < %(trGhostProb)s)" \
+                          "&(TRCHI2DOF < %(trChi2)s)" \
+                          "&(PT > %(minPT)s)" \
+                          "&(P > %(minP)s)" \
+                          "&(MIPCHI2DV(PRIMARY) > %(minIPChi2)s )" %locals()
+        _pidPi = "&(PIDK < %(highPIDK)s)" %locals()
+        _pidK  = "&(PIDK > %(lowPIDK)s)" %locals()
+
+
+        _c12_cuts = (" ( AM < (%(amMax)s - %(am34)s) ) " \
+                     "&( ACHI2DOCA(1,2) < %(maxDocaChi2)s ) " %locals() )
+        _c123_cuts =(" ( AM < (%(amMax)s - %(am4)s) ) " \
+                     "&( ACHI2DOCA(1,3) < %(maxDocaChi2)s ) " \
+                     "&( ACHI2DOCA(2,3) < %(maxDocaChi2)s ) " %locals() )
+        _combination_cuts =  (" (in_range( %(amMin)s, AM, %(amMax)s )) " \
+                              "&( (APT1+APT2+APT3+APT4) > %(minPT)s )" \
+                              "&( ACHI2DOCA(1,4) < %(maxDocaChi2)s ) " \
+                              "&( ACHI2DOCA(2,4) < %(maxDocaChi2)s ) " \
+                              "&( ACHI2DOCA(3,4) < %(maxDocaChi2)s ) " %locals() )
+        _mother_cuts = (" (in_range( %(vmMin)s, M, %(vmMax)s )) " \
+                        "&(PT > %(minVPT)s)" \
+                        "&(VFASPF(VCHI2PDOF) < %(maxVChi)s)" \
+                        "&(BPVDIRA > %(minbpvDira)s )" \
+                        "&(BPVLTIME() > %(minLT)s )" %locals() )
+
+        CombineB2KSHHH = DaVinci__N4BodyDecays(DecayDescriptors = decayDescriptors,
+                                              DaughtersCuts = { "pi+" : _daughters_cuts+_pidPi, "K+" : _daughters_cuts+_pidK },
+                                              Combination12Cut = _c12_cuts, Combination123Cut = _c123_cuts,
+                                              CombinationCut = _combination_cuts,
+                                              MotherCut = _mother_cuts)
+
+        return Selection(name,
+                         Algorithm = CombineB2KSHHH,
+                         RequiredSelections = inputSel )
+
+    def getRelInfo(self):
+        relInfo = []
+        for coneAngle in [0.8,1.0,1.3,1.7]:
+            relInfo += [
+            { "Type"         : "RelInfoConeVariables",
+              "ConeAngle"    : coneAngle,
+              "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+              "DaughterLocations" : { "[B+ -> ^X+ X- X+ KS0]CC" : 'P2ConeVar%s_1' % str(coneAngle).replace('.',''),
+                                      "[B+ -> X+ ^X- X+ KS0]CC" : 'P2ConeVar%s_2' % str(coneAngle).replace('.',''),
+                                      "[B+ -> X+ X- ^X+ KS0]CC" : 'P2ConeVar%s_3' % str(coneAngle).replace('.','') } }
+                        ]
+        relInfo += [ { "Type" : "RelInfoVertexIsolation", "Location": "VertexIsoInfo" } ]
+        return relInfo
+
+
+########################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2Kpi0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2Kpi0.py
new file mode 100644
index 000000000..424c19206
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2Kpi0.py
@@ -0,0 +1,238 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping selections for
+    B+ -> K+ pi0
+    B0 -> K0 pi0
+using merged pi0s
+"""
+
+__author__  = "Jason E Andrews"
+__date__    = "11/11/2015"
+__version__ = "1.0"
+__all__     = ( "default_config",
+                "B2Kpi0Lines",
+                "filterPi0",
+                "filterK",
+                "filterK0",
+                "makeB2Kpi0Line",
+                "relInfoCVDict",
+                "relInfoNeutralCVDict",
+                "relInfoVtxDict"
+                )
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+from StandardParticles import StdNoPIDsKaons, StdLooseMergedPi0, StdLooseKsLL
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+from GaudiKernel.SystemOfUnits   import MeV
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+default_config = {
+    "NAME"        : "B2Kpi0Lines",
+    "WGs"         : [ "BnoC" ],
+    "BUILDERTYPE" : "B2Kpi0Lines",
+    "STREAMS"     : [ "BhadronCompleteEvent" ],
+    "CONFIG" : { "checkPV" : True,
+                 "L0Filter"      : "L0_CHANNEL('Photon')|L0_CHANNEL('Electron')",
+                 "pi0VoidFilter" : "(CONTAINS('Phys/StdLooseMergedPi0/Particles')>0)",
+                 "pi0Config"     :
+                 { "pi0PT_min"     : 3500*MeV,
+                   "pi0P_min"      : 5000*MeV },
+                 "K+Config"      :
+                 { "K+PT_min"      : 1200*MeV,
+                   "K+P_min"       : 12000*MeV,
+                   "K+IPChi2_min"  : 50,
+                   "K+PID_min"     : -0.5 },
+                 "KS0Config"     :
+                 { "KSPT_min"      : 500*MeV,
+                   "KSP_min"       : 8000*MeV,
+                   "KSMass_delta"  : 15*MeV,
+                   "KSVChi2DOF_max": 15,
+                   "KSIPChi2_min"  : 10 },
+                 "B2Kpi0Config"  :
+                 { "prescale"      : 1.0,
+                   "Hlt1Filter"    : "HLT_PASS('Hlt1TrackMVADecision')",
+                   "Hlt2Filter"    : None,#"HLT_PASS('Hlt2B2Kpi0Decision')",
+                   "BMass_min"     : 4000*MeV,
+                   "BMass_max"     : 6200*MeV,
+                   "ASumPT_min"    : 6500*MeV,
+                   "BPT_min"       : 5000*MeV,
+                   "MTDOCAChi2_max": 8.0 },
+                 "B2K0pi0Config" :
+                 { "prescale"      : 1.0,
+                   "Hlt1Filter"    : "HLT_PASS_RE('Hlt1(Two)?TrackMVADecision')",
+                   "Hlt2Filter"    : None,#"HLT_PASS('Hlt2B2K0pi0Decision')",
+                   "BMass_min"     : 4000*MeV,
+                   "BMass_max"     : 6200*MeV,
+                   "ASumPT_min"    : 5000*MeV,
+                   "BPT_min"       : 4000*MeV,
+                   "MTDOCAChi2_max": 10.0 },
+                 }
+    }
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+class B2Kpi0Lines(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+    def __init__(self, name, config) :
+        self.name = name
+        LineBuilder.__init__(self, name, config)
+        ### Merged pi0's ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        self.filteredPi0 = filterPi0( config["pi0Config"] )
+        ### B2K+pi0 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        self.filteredK = filterK( config["K+Config"] )
+        self.B2Kpi0Line = makeB2Kpi0Line("B2Kpi0",
+                                         config,
+                                         config["B2Kpi0Config"],
+                                         "[B+ -> K+ pi0]cc",
+                                         { "K+" : "ALL", "pi0" : "ALL" },
+                                         { "[B+ -> ^K+ pi0]CC" : "K" },
+                                         [ self.filteredK, self.filteredPi0 ] )
+        self.registerLine( self.B2Kpi0Line )
+        ### B2K0pi0 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        self.filteredKS0 = filterKS0( config["KS0Config"] )
+        self.B2K0pi0Line = makeB2Kpi0Line("B2K0pi0",
+                                          config,
+                                          config["B2K0pi0Config"],
+                                          "B0 -> KS0 pi0",
+                                          { "KS0" : "ALL", "pi0" : "ALL" },
+                                          { "B0 -> ^KS0 pi0" : "K0" },
+                                         [ self.filteredKS0, self.filteredPi0 ] )
+        self.registerLine( self.B2K0pi0Line )        
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def filterPi0( pi0Conf ) :
+    
+    __configuration_keys__ = ("pi0PT_min", "pi0P_min")
+    checkConfig( __configuration_keys__, pi0Conf )
+    
+    particleFilter = FilterDesktop(
+        Code = "(PT > %(pi0PT_min)s) & (P > %(pi0P_min)s)" % locals()["pi0Conf"] )
+    return Selection("filteredPi0s", Algorithm = particleFilter,
+                     RequiredSelections = [ StdLooseMergedPi0 ] )
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def filterK( KConf ) :
+
+    __configuration_keys__ = ("K+PT_min", "K+P_min", "K+IPChi2_min", "K+PID_min")
+    checkConfig( __configuration_keys__, KConf )
+
+    cutString = "(PT > %(K+PT_min)s) & (P > %(K+P_min)s)"\
+                " & (MIPCHI2DV(PRIMARY) > %(K+IPChi2_min)s)"\
+                " & (PIDK > %(K+PID_min)s)" % locals()["KConf"]
+    particleFilter = FilterDesktop( Code = cutString )
+    return Selection("filteredK", Algorithm = particleFilter,
+                     RequiredSelections = [ StdNoPIDsKaons ] )
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def filterKS0( KS0Conf ) :
+
+    __configuration_keys__ = ("KSPT_min", "KSP_min", "KSMass_delta",
+                              "KSVChi2DOF_max", "KSIPChi2_min")
+    checkConfig( __configuration_keys__, KS0Conf )
+
+    cutString = "(PT > %(KSPT_min)s) & (P > %(KSP_min)s)"\
+                " & (ADMASS('KS0') < %(KSMass_delta)s)"\
+                " & (VFASPF(VCHI2PDOF) < %(KSVChi2DOF_max)s)"\
+                " & (MIPCHI2DV(PRIMARY) > %(KSIPChi2_min)s)" % locals()["KS0Conf"]
+    particleFilter = FilterDesktop( Code = cutString )
+    return Selection("filteredKS0", Algorithm = particleFilter,
+                     RequiredSelections = [ StdLooseKsLL ] )
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def makeB2Kpi0Line( name,
+                    conf,
+                    lineConf,
+                    decayDescriptor,
+                    daughtersCuts,
+                    daughterIsoDicts,
+                    inputs ) :
+
+    __configuration_keys__ = ( "prescale",
+                               "Hlt1Filter",
+                               "Hlt2Filter",
+                               "BMass_min",
+                               "BMass_max",
+                               "ASumPT_min",
+                               "BPT_min",
+                               "MTDOCAChi2_max")
+    checkConfig( __configuration_keys__, lineConf )
+    
+    _combCuts = "(in_range(%(BMass_min)s, AM, %(BMass_max)s))"\
+                " & (ASUM(PT)> %(ASumPT_min)s)" % locals()["lineConf"]
+    _motherCuts = "(PT>%(BPT_min)s)"\
+                  " & (MTDOCACHI2(1)<%(MTDOCAChi2_max)s)" % locals()["lineConf"]
+    combiner = CombineParticles( DecayDescriptor = decayDescriptor,
+                                 MotherCut = _motherCuts,
+                                 CombinationCut = _combCuts,
+                                 DaughtersCuts = daughtersCuts,
+                                 ParticleCombiners = { "" : "ParticleAdder" } )
+
+    selector = Selection( name + "Selection", Algorithm = combiner,
+                          RequiredSelections = inputs )
+
+    return StrippingLine(
+        name + "Line",
+        prescale = lineConf["prescale"],
+        L0DU = conf["L0Filter"],
+        HLT1 = lineConf["Hlt1Filter"],
+        HLT2 = lineConf["Hlt2Filter"],
+        FILTER = conf["pi0VoidFilter"],
+        checkPV = conf["checkPV"],
+        #RequiredRawEvents = [ "Calo" ],
+        selection = selector,
+        RelatedInfoTools = [ relInfoCVDict( 1.7,  daughterIsoDicts ),
+                             relInfoCVDict( 1.35, daughterIsoDicts ),
+                             relInfoCVDict( 1.0,  daughterIsoDicts ),
+                             relInfoVtxDict( daughterIsoDicts ),
+                             relInfoNeutralCVDict( 1.7,  daughterIsoDicts ),
+                             relInfoNeutralCVDict( 1.35, daughterIsoDicts ),
+                             relInfoNeutralCVDict( 1.0,  daughterIsoDicts ),
+                             ]
+        )
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def relInfoCVDict( angle = 1, DauDict = {} ):
+    ModifiedDauDict = DauDict.copy()
+    for flag, name in ModifiedDauDict.iteritems():
+        ModifiedDauDict[flag] = 'maps/coneIso_' + name + '/' + str(angle)
+    return { 'Type'             : 'RelInfoConeVariables',
+             'ConeAngle'        : angle,
+             'Variables'        : [ 'CONEANGLE', 'CONEMULT',
+                                    'CONEP', 'CONEPASYM',
+                                    'CONEPT', 'CONEPTASYM' ],
+             'DaughterLocations': ModifiedDauDict,
+             'Location'         : 'maps/coneIso_B/' + str(angle) }
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def relInfoNeutralCVDict( angle = 1, DauDict = {} ):
+    ModifiedDauDict = DauDict.copy()
+    for flag, name in ModifiedDauDict.iteritems():
+        ModifiedDauDict[flag] = 'maps/neutralConeIso_' + name + '/' + str(angle)
+    return { 'Type'             : 'RelInfoConeVariablesForEW',
+             'ConeAngle'        : angle,
+             'Variables'        : [ 'EWCONEANGLE', 'EWCONENMULT',
+                                    'EWCONENVP',   'EWCONENSP',
+                                    'EWCONENVPT',  'EWCONENSPT',
+                                    'EWCONENPX', 'EWCONENPY', 'EWCONENPZ' ],
+             'DaughterLocations': ModifiedDauDict,
+             'Location'         : 'maps/neutralConeIso_B/' + str(angle) }
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def relInfoVtxDict( DauDict = {} ):
+    ModifiedDauDict = DauDict.copy()
+    for flag, name in ModifiedDauDict.iteritems():
+        ModifiedDauDict[flag] = 'maps/vtxIso_' + name
+    return { 'Type'             : 'RelInfoVertexIsolation',
+             'Variables'        : [ 'VTXISONUMVTX',
+                                    'VTXISODCHI2ONETRACK', 'VTXISODCHI2MASSONETRACK',
+                                    'VTXISODCHI2TWOTRACK', 'VTXISODCHI2MASSTWOTRACK',
+                                    ],
+             'DaughterLocations': ModifiedDauDict,
+             'Location'         : 'maps/vtxIso_B' }
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2Ksthh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2Ksthh.py
new file mode 100644
index 000000000..129d87925
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2Ksthh.py
@@ -0,0 +1,222 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of B(d,s) -> K*0(892) hh', with K*0(892) -> K+ pi-.
+Provides class B2KsthhConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Exported symbols (use python help!):
+   - B2KsthhConf
+"""
+
+__author__ = ['Rafael Coutinho']
+__date__ = '07/04/2015'
+__version__ = 'Stripping26'
+__all__ = {'B2KsthhConf',
+           'default_config'}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdLoosePions as Pions
+
+default_config = {
+    'NAME'        : 'B2Ksthh',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'B2KsthhConf',
+    'CONFIG'      : {'Trk_Chi2'                : 4.0,
+                     'Trk_GhostProb'           : 0.4,
+                     'Kstar_MassLo'            : 0.0,
+                     'Kstar_MassHi'            : 5000.0,
+                     'B_Mlow'                  : 1279.0,
+                     'B_Mhigh'                 : 921.0,
+                     'B_APTmin'                : 1000.0,
+                     'B_PTmin'                 : 1500.0,
+                     'BDaug_MedPT_PT'          : 800.0,
+                     'BDaug_MaxPT_IP'          : 0.05,
+                     'BDaug_PTsum'             : 3000.0,
+                     'B_IPCHI2sum'             : 50.0,
+                     'B_VtxChi2'               : 12.0,
+                     'B_Dira'                  : 0.999,
+                     'B_IPCHI2wrtPV'           : 8.0,
+                     'B_FDwrtPV'               : 1.0,
+                     'B_FDChi2'                : 50.0,
+                     'GEC_MaxTracks'           : 250,
+                     'ConeAngle10'             : 1.0, 
+                     'ConeAngle15'             : 1.5, 
+                     'ConeAngle17'             : 1.7, 
+                     'HLT1Dec'                 : 'Hlt1(Two)?TrackMVADecision',
+                     'HLT2Dec'                 : 'Hlt2Topo[234]BodyDecision',
+                     'Prescale'                : 1.0,
+                     'Postscale'               : 1.0
+                     },
+    'STREAMS' : ['Bhadron']
+    }
+
+class B2KsthhConf(LineBuilder) :
+    """
+    Builder of B(d,s)->Ksthh stripping Selection and StrippingLine.
+    Constructs B0 -> Kst0 h+ h- Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> b2ksthhConf = B2KsthhConf('B2KsthhTest',config)
+    >>> b2ksthhLines = b2ksthhConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selKst2Kpi             : Kst -> K pi Selection object
+    selB2Ksthh             : B(d,s) -> Kst0 h+ h- Selection object
+    line                   : StrippingLine made out of selB2Ksthh
+    lines                  : List of lines, [line]
+
+    Exports as class data member:
+    B2KsthhConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        Hlt1Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT1Dec'],
+                     'Preambulo' : ["from LoKiCore.functions import *"]}
+                          
+        Hlt2Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT2Dec'],
+                     'Preambulo' : ["from LoKiCore.functions import *"]}
+                          
+        relInfo    = [ { "Type" : "RelInfoConeVariables" 
+                      , "ConeAngle" : config['ConeAngle10']
+                      , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'] 
+                      , 'Location'  : 'P2ConeVar10_B'
+                      , "DaughterLocations" : { "[B0 -> ^pi+ pi- (K*(892)0 -> K+ pi-)]CC" : 'P2ConeVar10_1',
+                                                "[B0 -> pi+ ^pi- (K*(892)0 -> K+ pi-)]CC" : 'P2ConeVar10_2',
+                                                "[B0 -> pi+ pi- (K*(892)0 -> ^K+ pi-)]CC" : 'P2ConeVar10_3',
+                                                "[B0 -> pi+ pi- (K*(892)0 -> K+ ^pi-)]CC" : 'P2ConeVar10_4'} },
+                      { "Type" : "RelInfoConeVariables"
+                      , "ConeAngle" : config['ConeAngle15'] 
+                      , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM']
+                      , 'Location'  : 'P2ConeVar15_B'
+                      , "DaughterLocations" : { "[B0 -> ^pi+ pi- (K*(892)0 -> K+ pi-)]CC" : 'P2ConeVar15_1',
+                                                "[B0 -> pi+ ^pi- (K*(892)0 -> K+ pi-)]CC" : 'P2ConeVar15_2',
+                                                "[B0 -> pi+ pi- (K*(892)0 -> ^K+ pi-)]CC" : 'P2ConeVar15_3',
+                                                "[B0 -> pi+ pi- (K*(892)0 -> K+ ^pi-)]CC" : 'P2ConeVar15_4'} },
+                      { "Type" : "RelInfoConeVariables"
+                      , "ConeAngle" : config['ConeAngle17'] 
+                      , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM']
+                      , 'Location'  : 'P2ConeVar17_B'
+                      , "DaughterLocations" : { "[B0 -> ^pi+ pi- (K*(892)0 -> K+ pi-)]CC" : 'P2ConeVar17_1',
+                                                "[B0 -> pi+ ^pi- (K*(892)0 -> K+ pi-)]CC" : 'P2ConeVar17_2',
+                                                "[B0 -> pi+ pi- (K*(892)0 -> ^K+ pi-)]CC" : 'P2ConeVar17_3',
+                                                "[B0 -> pi+ pi- (K*(892)0 -> K+ ^pi-)]CC" : 'P2ConeVar17_4'} },
+                      { "Type"      : "RelInfoVertexIsolation"
+                      , "Location"  : 'VtxIsolationVar'}
+                     ]
+
+        self.pions = Pions
+
+        self.makeKst2Kpi( 'Kstfor'+name, config )
+
+        self.makeB2Ksthh( name, config )
+
+        line = StrippingLine(name+"Line",
+                                     prescale  = config['Prescale'],
+                                     postscale = config['Postscale'],
+                                     selection = self.selB2Ksthh,
+                                     HLT1 = Hlt1Filter,
+                                     HLT2 = Hlt2Filter,
+                                     FILTER = GECCode, 
+                                     RelatedInfoTools = relInfo, 
+                                     MDSTFlag = False
+                                     )
+
+        self.registerLine(line)
+        
+    def makeKst2Kpi( self, name, config ) :
+        # define all the cuts
+        _trkChi2Cut1      = "(CHILDCUT((TRCHI2DOF<%s),1))"   % config['Trk_Chi2']
+        _trkChi2Cut2      = "(CHILDCUT((TRCHI2DOF<%s),2))"   % config['Trk_Chi2']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))" % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))" % config['Trk_GhostProb']
+
+        _allCuts  = _trkChi2Cut1
+        _allCuts += '&'+_trkChi2Cut2
+        _allCuts += '&'+_trkGhostProbCut1
+        _allCuts += '&'+_trkGhostProbCut2
+
+        # make the filter
+        _filterKst2Kpi = FilterDesktop( Code = _allCuts )
+
+        _stdKst2Kpi = DataOnDemand(Location="Phys/StdVeryLooseDetachedKst2Kpi/Particles")
+
+        # make and store the Selection object
+        self.selKst2Kpi = Selection( name, Algorithm = _filterKst2Kpi, RequiredSelections = [_stdKst2Kpi] ) 
+
+
+    def makeB2Ksthh( self, name, config ) :
+        """
+        Create and store either a B(d,s) -> Kst0 h+ h- Selection object
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _trkChi2Cut      = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+        _trkGhostProbCut = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+
+        _daughtersCuts = _trkChi2Cut
+        _daughtersCuts += '&'+_trkGhostProbCut
+
+        _massCutLow       = "(AM>(5279-%s)*MeV)"                                                        % config['B_Mlow']
+        _massCutHigh      = "(AM<(5279+%s)*MeV)"                                                        % config['B_Mhigh']
+        _aptCut           = "(APT>%s*MeV)"                                                              % config['B_APTmin']
+        _daugMedPtCut     = "(ANUM(PT>%s*MeV)>=2)"                                                      % config['BDaug_MedPT_PT']
+        _daugMaxPtIPCut   = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)"                                          % config['BDaug_MaxPT_IP']
+        _daugPtSumCut     = "((APT1+APT2+APT3)>%s*MeV)"                                                 % config['BDaug_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+
+        _ptCut            = "(PT>%s*MeV)"                                                               % config['B_PTmin']
+        _vtxChi2Cut       = "(VFASPF(VCHI2)<%s)"                                                        % config['B_VtxChi2']
+        _diraCut          = "(BPVDIRA>%s)"                                                              % config['B_Dira']
+        _ipChi2Cut        = "(MIPCHI2DV(PRIMARY)<%s)"                                                   % config['B_IPCHI2wrtPV']
+        _fdCut            = "(VFASPF(VMINVDDV(PRIMARY))>%s)"                                            % config['B_FDwrtPV']
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                                                            % config['B_FDChi2']
+        _ipChi2SumCut     = "(SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='pi+') | (ABSID=='pi-')),0.0) > %s)"  % config['B_IPCHI2sum']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+        _motherCuts += '&'+_ipChi2SumCut
+
+        _B = CombineParticles()
+        _B.DaughtersCuts = { "pi+" : _daughtersCuts }
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        _B.DecayDescriptors = [ "[B0 -> pi+ pi- K*(892)0]cc" ]
+
+        self.selB2Ksthh = Selection (name, Algorithm = _B, RequiredSelections = [ self.selKst2Kpi, self.pions ])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2LambdapppLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2LambdapppLines.py
new file mode 100644
index 000000000..d4f0eaacd
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2LambdapppLines.py
@@ -0,0 +1,481 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of B+->Lambdappp stripping Selections and StrippingLines.
+Provides functions to build Lambda0->DD, Lambda0->LL, and Lambda0->LD selections.
+Stripping20 with an inclusive approach for B+->Lambdappp modes.
+Provides class B2LambdapppLinesConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Exported symbols (use python help!):
+   - B2LambdapppLinesConf
+"""
+
+__author__ = ["La Wang"]
+__date__ = '05/02/2021'
+__version__ = 'Stripping29r2p2'
+__all__ = 'B2LambdapppLinesConf'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdLooseProtons as Protons
+
+'''
+StrippingReport                                                INFO Event 160000, Good event 160000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |_StrippingGlobal_                                            |  0.3256|       521|       |   9.091|
+ |_StrippingSequenceStreamBhadron_                             |  0.3256|       521|       |   9.074|
+ |!StrippingB2LambdapppDDLine                                  |  0.1862|       298|  1.846|   5.646|
+ |!StrippingB2LambdapppLLLine                                  |  0.0356|        57|  1.912|   1.082|
+ |!StrippingB2LambdapppLDLine                                  |  0.0063|        10|  1.900|   0.575|
+ |!StrippingB2LambdapppDDSSLine                                |  0.1212|       194|  1.804|   0.114|
+ |!StrippingB2LambdapppLLSSLine                                |  0.0244|        39|  1.744|   0.074|
+ |!StrippingB2LambdapppLDSSLine                                |  0.0044|         7|  1.286|   0.073|
+ |!StrippingB2LambdapppDDLine_TIMING                           |  0.1862|       298|  1.846|   0.102|
+ |!StrippingB2LambdapppLLLine_TIMING                           |  0.0356|        57|  1.912|   0.065|
+ |!StrippingB2LambdapppLDLine_TIMING                           |  0.0063|        10|  1.900|   0.065|
+ |!StrippingB2LambdapppDDSSLine_TIMING                         |  0.1212|       194|  1.804|   0.090|
+ |!StrippingB2LambdapppLLSSLine_TIMING                         |  0.0244|        39|  1.744|   0.062|
+ |!StrippingB2LambdapppLDSSLine_TIMING                         |  0.0044|         7|  1.286|   0.059|
+'''
+
+default_config = {
+    'NAME' : 'B2Lambdappp',
+    'WGs'  : ['BnoC'],
+    'BUILDERTYPE' : 'B2LambdapppLinesConf',
+    'CONFIG' : {'Trk_Chi2'                 : 3.0,    
+                'Trk_GhostProb'            : 0.5,     
+                'Lambda_DD_MassWindow'     : 20.0,    
+                'Lambda_DD_VtxChi2'        : 9.0,     
+                'Lambda_DD_FDChi2'         : 50.0,    
+                'Lambda_DD_FD'             : 300.0,   
+                'Lambda_DD_Pmin'           : 5000.0,  
+                'Lambda_LL_MassWindow'     : 20.0,    
+                'Lambda_LL_VtxChi2'        : 9.0,     
+                'Lambda_LL_FDChi2'         : 0.0,     
+                'Lambda_LD_MassWindow'     : 25.0,    
+                'Lambda_LD_VtxChi2'        : 16.0,    
+                'Lambda_LD_FDChi2'         : 50.0,    
+                'Lambda_LD_FD'             : 300.0,   
+                'Lambda_LD_Pmin'           : 5000.0,  
+                'B0_Mlow'                  : 779.0,   
+                'B0_Mhigh'                 : 1921.0,   
+                'B0_APTmin'                : 1000.0,  
+                'B0_PTmin'                 : 1050,    
+                'B0Daug_MedPT_PT'          : 450.0,   
+                'B0Daug_MaxPT_IP'          : 0.05,   
+                'B0Daug_DD_maxDocaChi2'    : 16.0,
+                'B0Daug_LL_maxDocaChi2'    : 5.0,
+                'B0Daug_LD_maxDocaChi2'    : 5.0,
+                'B0Daug_DD_PTsum'          : 2000.0,
+                'B0Daug_LL_PTsum'          : 3000.0,
+                'B0Daug_LD_PTsum'          : 4200.0,
+                'B0_VtxChi2'               : 16.0,
+                'B0_Dira'               : 0.9990,
+                'B0_DD_IPCHI2wrtPV'        : 25.0,
+                'B0_LL_IPCHI2wrtPV'        : 25.0,
+                'B0_LD_IPCHI2wrtPV'        : 15.0,
+                'B0_FDwrtPV'               : 0.8,
+                'B0_DD_FDChi2'             : 0.5,
+                'B0_LL_FDChi2'             : 0.5,
+                'B0_LD_FDChi2'             : 30.0,
+                'GEC_MaxTracks'            : 250,
+                # 2012 Triggers
+                #'HLT1Dec'                  : 'Hlt1TrackAllL0Decision',
+                #'HLT2Dec'                  : 'Hlt2Topo[234]Body.*Decision',
+                # 2015 Triggers
+                #'HLT1Dec'                  : 'Hlt1(Two)?TrackMVADecision',
+                #'HLT2Dec'                  : 'Hlt2Topo[234]BodyDecision',
+                'Prescale'                 : 1.0,
+                'Postscale'                : 1.0,
+                'RelatedInfoTools' : [    { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.7, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar17'
+                                            }, 
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.5, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar15'
+                                            }, 
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.0, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar10'
+                                            },
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 0.8, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar08'
+                                            },
+                                          { "Type" : "RelInfoVertexIsolation",
+                                            "Location" : "VtxIsolationVar"
+                                            }
+                                          ]
+                },
+    'STREAMS' : ['Bhadron']
+    }
+
+class B2LambdapppLinesConf(LineBuilder) :
+    """
+    Builder of B+ ->Lambdappp stripping Selection and StrippingLine.
+    Constructs B+ -> Lambda p+ p+ p~- Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> B2LambdapppLinesConf = B2LambdapppLinesConf('B2LambdapppTest',config)
+    >>> B0LambdapppLines = B2LambdapppLinesConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selLambda2DD           : Lambda0 -> Down Down Selection object
+    selLambda2LL           : Lambda0 -> Long Long Selection object
+    selLambda2LD           : Lambda0 -> Long Down Selection object
+
+    selB2LambdapppDD           : B+ -> Lambda0(DD) p+ p+ p~- Selection object
+    selB2LambdapppLL           : B+ -> Lambda0(LL) p+ p+ p~- Selection object
+    selB2LambdapppLD           : B+ -> Lambda0(LD) p+ p+ p~- Selection object
+
+    B2LambdapppDDLine             : StrippingLine made out of selB2LambdapppDD
+    B2LambdapppLLLine             : StrippingLine made out of selB2LambdapppLL
+    B2LambdapppLDLine             : StrippingLine made out of selB2LambdapppLD
+
+    lines   : List of lines, [B2LambdapppDDLine,B2LambdapppLLLine,B2LambdapppLDLine]
+
+    Exports as class data member:
+    B2LambdapppLinesConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        #self.hlt1Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT1Dec'],
+        #                   'Preambulo' : ["from LoKiCore.functions import *"]}
+        #self.hlt2Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT2Dec'],
+        #                   'Preambulo' : ["from LoKiCore.functions import *"]}
+
+        self.protons   = Protons
+        
+        self.makeLambda2DD( 'Lambda0DD', config )
+        self.makeLambda2LL( 'Lambda0LL', config )
+        self.makeLambda2LD( 'Lambda0LD', config )
+
+
+        namesSelections = [ (name + 'DD', self.makeB2LambdapppDD(name + 'DD', config)),
+                            (name + 'LL', self.makeB2LambdapppLL(name + 'LL', config)),
+                            (name + 'LD', self.makeB2LambdapppLD(name + 'LD', config)),
+
+                            (name + 'DDSS', self.makeB2LambdapppDD(name + 'DDSS', config)),
+                            (name + 'LLSS', self.makeB2LambdapppLL(name + 'LLSS', config)),
+                            (name + 'LDSS', self.makeB2LambdapppLD(name + 'LDSS', config)),
+                          ]
+
+        # make lines
+        
+        for selName, sel in namesSelections:
+
+            extra = {}
+
+            #if 'SS' in selName:
+                #extra['HLT1'] = self.hlt1Filter
+                #extra['HLT2'] = self.hlt2Filter
+
+            line = StrippingLine(selName + 'Line',
+                                 selection = sel,
+                                 prescale = config['Prescale'],
+                                 postscale = config['Postscale'],
+                                 RelatedInfoTools = config['RelatedInfoTools'], 
+                                 FILTER = GECCode,
+                                 **extra) 
+
+            self.registerLine(line)
+
+    def makeLambda2DD( self, name, config ) :
+        # define all the cuts
+        _massCut          = "(ADMASS('Lambda0')<%s*MeV)"      % config['Lambda_DD_MassWindow']
+        _vtxCut           = "(VFASPF(VCHI2)<%s)   "           % config['Lambda_DD_VtxChi2']
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                  % config['Lambda_DD_FDChi2']
+        _momCut           = "(P>%s*MeV)"                      % config['Lambda_DD_Pmin']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"  % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"  % config['Trk_GhostProb']
+
+        _allCuts = _momCut
+        _allCuts += '&'+_massCut
+        _allCuts += '&'+_vtxCut 
+        _allCuts += '&'+_fdChi2Cut
+        #_allCuts += '&'+_trkGhostProbCut1
+        #_allCuts += '&'+_trkGhostProbCut2
+
+        # get the Lambda0's to filter
+        _stdLambdaDD = DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")
+        
+        # make the filter
+        _filterLambdaDD = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        self.selLambda2DD = Selection( name, Algorithm = _filterLambdaDD, RequiredSelections = [_stdLambdaDD] )
+
+        return self.selLambda2DD
+
+    def makeLambda2LL( self, name, config ) : 
+        # define all the cuts
+        _massCut    = "(ADMASS('Lambda0')<%s*MeV)"           % config['Lambda_LL_MassWindow']
+        _vtxCut     = "(VFASPF(VCHI2)<%s)"                   % config['Lambda_LL_VtxChi2']
+        _trkChi2Cut1 = "(CHILDCUT((TRCHI2DOF<%s),1))"        % config['Trk_Chi2']
+        _trkChi2Cut2 = "(CHILDCUT((TRCHI2DOF<%s),2))"        % config['Trk_Chi2']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))" % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))" % config['Trk_GhostProb']
+
+        _allCuts = _massCut
+        _allCuts += '&'+_trkChi2Cut1
+        _allCuts += '&'+_trkChi2Cut2
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_trkGhostProbCut1
+        _allCuts += '&'+_trkGhostProbCut2
+
+        # get the Lambda's to filter
+        _stdLambdaLL = DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")
+
+        # make the filter
+        _filterLambdaLL = FilterDesktop( Code = _allCuts )
+        
+        # make and store the Selection object
+        self.selLambda2LL = Selection( name, Algorithm = _filterLambdaLL, RequiredSelections = [_stdLambdaLL] )
+
+        return self.selLambda2LL
+
+    def makeLambda2LD( self, name, config ) :
+        # define all the cuts
+        _massCut          = "(ADMASS('Lambda0')<%s*MeV)"      % config['Lambda_DD_MassWindow']
+        _vtxCut           = "(VFASPF(VCHI2)<%s)   "           % config['Lambda_DD_VtxChi2']
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                  % config['Lambda_DD_FDChi2']
+        _momCut           = "(P>%s*MeV)"                      % config['Lambda_DD_Pmin']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"  % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"  % config['Trk_GhostProb']
+
+        _allCuts = _momCut
+        _allCuts += '&'+_massCut
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_fdChi2Cut
+        #_allCuts += '&'+_trkGhostProbCut1
+        #_allCuts += '&'+_trkGhostProbCut2
+
+        # get the Lambda0's to filter
+        _stdLambdaLD = DataOnDemand(Location = "Phys/StdLooseLambdaLD/Particles")
+        
+        # make the filter
+        _filterLambdaLD = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        self.selLambda2LD = Selection( name, Algorithm = _filterLambdaLD, RequiredSelections = [_stdLambdaLD] )
+
+        return self.selLambda2LD
+
+    def makeB2LambdapppDD( self, name, config ) :
+        """
+        Create and store a B+ ->Lambda0(DD) p+ p+ p~- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5279-%s)*MeV)"               % config['B0_Mlow']
+        _massCutHigh    = "(AM<(5279+%s)*MeV)"               % config['B0_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['B0_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['B0Daug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['B0Daug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['B0Daug_DD_maxDocaChi2']
+        _daugPtSumCut   = "((APT1+APT2+APT3+APT4)>%s*MeV)"        % config['B0Daug_DD_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut    
+        _combCuts += '&'+_daugMedPtCut    
+        _combCuts += '&'+_massCutLow     
+        _combCuts += '&'+_massCutHigh     
+        #_combCuts += '&'+_daugMaxPtIPCut  # does not work properly 
+        _combCuts += '&'+_maxDocaChi2Cut  
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['B0_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B0_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['B0_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B0_DD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B0_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B0_DD_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut 
+        _motherCuts += '&'+_diraCut  
+        _motherCuts += '&'+_ipChi2Cut 
+        _motherCuts += '&'+_fdCut #lookhere
+        _motherCuts += '&'+_fdChi2Cut 
+
+        _B0 = CombineParticles()
+
+        if 'SS' in name: # Same sign
+            _B0.DecayDescriptors = [ "[B+ -> p+ p+ p+ Lambda0]cc", "[B+ -> p~- p~- p~- Lambda0]cc"]
+        else:
+            _B0.DecayDescriptors = [ "[B+ -> Lambda0 p+ p+ p~-]cc" ]
+
+        _trkGhostProbCut  = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+        _trkChi2Cut       = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+
+        _daughtersCuts = _trkChi2Cut + '&' + _trkGhostProbCut
+
+        _B0.DaughtersCuts = { "p+" : _daughtersCuts }
+        _B0.CombinationCut =  _combCuts
+        _B0.MotherCut = _motherCuts
+        _B0.ReFitPVs = True
+        
+        _B0Conf = _B0.configurable(name + '_combined')
+
+        if 'SS' in name: # Same sign
+            self.selB2LambdapppDDSS = Selection (name, Algorithm = _B0Conf, RequiredSelections = [self.selLambda2DD, self.protons ])
+            return self.selB2LambdapppDDSS
+        else:
+            self.selB2LambdapppDD = Selection (name, Algorithm = _B0Conf, RequiredSelections = [self.selLambda2DD, self.protons ])
+            return self.selB2LambdapppDD
+
+    def makeB2LambdapppLL( self, name, config ) :
+        """
+        Create and store a B+ -> Lambda0(LL) p+ p+ p~- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5279-%s)*MeV)"               % config['B0_Mlow']
+        _massCutHigh    = "(AM<(5279+%s)*MeV)"               % config['B0_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['B0_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['B0Daug_MedPT_PT']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['B0Daug_LL_maxDocaChi2']
+        _daugPtSumCut   = "((APT1+APT2+APT3+APT4)>%s*MeV)"        % config['B0Daug_LL_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        _combCuts += '&'+_maxDocaChi2Cut
+        
+        _ptCut      = "(PT>%s*MeV)"                    % config['B0_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B0_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['B0_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B0_LL_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B0_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B0_LL_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdChi2Cut
+        _motherCuts += '&'+_fdCut
+
+        _B0 = CombineParticles()
+
+        if 'SS' in name: # Same sign
+            _B0.DecayDescriptors = [ "[B+ -> p+ p+ p+ Lambda0]cc", "[B+ -> p~- p~- p~- Lambda0]cc"]
+        else:
+            _B0.DecayDescriptors = [ "[B+ -> Lambda0 p+ p+ p~-]cc" ]
+
+        _trkGhostProbCut  = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+        _trkChi2Cut       = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+
+        _daughtersCuts = _trkChi2Cut + '&' + _trkGhostProbCut
+
+        _B0.DaughtersCuts = { "p+" : _daughtersCuts }
+        _B0.CombinationCut = _combCuts
+        _B0.MotherCut = _motherCuts
+        _B0.ReFitPVs = True
+        
+        _B0Conf = _B0.configurable(name + '_combined')
+
+        if 'SS' in name: # Same sign
+            self.selB2LambdapppLLSS = Selection (name, Algorithm = _B0Conf, RequiredSelections = [self.selLambda2LL, self.protons  ])
+            return self.selB2LambdapppLLSS
+        else:
+            self.selB2LambdapppLL = Selection (name, Algorithm = _B0Conf, RequiredSelections = [self.selLambda2LL, self.protons  ])
+            return self.selB2LambdapppLL
+
+    def makeB2LambdapppLD( self, name, config ) :
+        """
+        Create and store a B+ ->Lambda0(LD) p+ p+ p~- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5279-%s)*MeV)"               % config['B0_Mlow']
+        _massCutHigh    = "(AM<(5279+%s)*MeV)"               % config['B0_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['B0_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['B0Daug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['B0Daug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['B0Daug_LD_maxDocaChi2']
+        _daugPtSumCut   = "((APT1+APT2+APT3+APT4)>%s*MeV)"        % config['B0Daug_LD_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['B0_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B0_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['B0_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B0_LD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B0_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B0_LD_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _B0 = CombineParticles()
+
+        if 'SS' in name: # Same sign
+            _B0.DecayDescriptors = [ "[B+ -> p+ p+ p+ Lambda0]cc", "[B+ -> p~- p~- p~- Lambda0]cc"]
+        else:
+            _B0.DecayDescriptors = [ "[B+ -> Lambda0 p+ p+ p~-]cc" ]
+
+        _trkGhostProbCut  = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+        _trkChi2Cut       = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+
+        _daughtersCuts = _trkChi2Cut + '&' + _trkGhostProbCut
+
+        _B0.DaughtersCuts = { "p+" : _daughtersCuts }
+        _B0.CombinationCut = _combCuts
+        _B0.MotherCut = _motherCuts
+        _B0.ReFitPVs = True
+        
+        _B0Conf = _B0.configurable(name + '_combined')
+
+        if 'SS' in name: # Same sign
+            self.selB2LambdapppLDSS = Selection (name, Algorithm = _B0Conf, RequiredSelections = [self.selLambda2LD, self.protons ])
+            return self.selB2LambdapppLDSS
+        else:
+            self.selB2LambdapppLD = Selection (name, Algorithm = _B0Conf, RequiredSelections = [self.selLambda2LD, self.protons ])
+            return self.selB2LambdapppLD
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2TwoBaryons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2TwoBaryons.py
new file mode 100644
index 000000000..08190c752
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2TwoBaryons.py
@@ -0,0 +1,555 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting Bd,s -> baryon antibaryon.
+For now it only contains options for Bd,s -> p pbar
+(ultimately it will also select Bd,s -> p Lambda_bar, Lambda Lambda_bar).
+
+Authors: Eduardo Rodrigues
+"""
+
+########################################################################
+__author__ = ['Eduardo Rodrigues', 'John Beddow', 'Christoph Hombach', 'Yanxi Zhang']
+__date__ = '18/01/2014'
+__version__ = '$Revision: 1.6 $'
+
+__all__ = ('B2TwoBaryonLines',
+           'makeB2PPbar',
+           'makeB2PPSameSign',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles                     import StdLooseProtons
+from StandardParticles import StdNoPIDsPions as Pions
+from CommonParticles.StdLooseLambda import StdLooseLambdaLL, StdLooseLambdaDD
+from PhysSelPython.Wrappers      import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, ns
+
+default_config = { 'NAME'              : 'B2TwoBaryons',
+                   'WGs'               : ['BnoC'],
+                   'BUILDERTYPE'       : 'B2TwoBaryonLines',
+                   'STREAMS'           : [ 'BhadronCompleteEvent' ],
+                   'CONFIG'            :  {
+                   'PrescaleB2PPbar'   : 1,
+                   'MinPTB2PPbar'      : 900,
+                   'MinIPChi2B2PPbar'  : 10,
+                   #'TrChi2'            : 4,
+                   'PIDppi'            : -1,
+                   'PIDpk'             : -2,
+                   'MaxPTB2PPbar'      : 2100,
+                   'MaxDaughtPB2PPbar' : 300000,
+                   'MaxIPChi2B2PPbar'  : 25,
+                   'CombMassWindow'    : 200,
+                   'VertexChi2B2PPbar' : 9,
+                   'BPTB2PPbar'        : 1100,
+                   'BIPChi2B2PPbar'    : 16,
+                   'BDIRA'             : 0.9997,
+                   'MaxGhostProb'      : 0.4,
+#                   'RelatedInfoTools'  : [ { "Type" : "RelInfoConeVariables",
+ #                    	   		       "ConeAngle" : 1.4,
+  #                                             "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+   #                                            "RecursionLevel" : 1,
+#					       "Location"  : 'ConeVar14'	       	 
+ #                                            },		
+  #                                           { "Type" : "RelInfoConeVariables",
+#				               "ConeAngle" : 1.2,
+ #                                              "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+#					       "RecursionLevel" : 1,                                               
+#					       "Location"  : 'ConeVar12'
+ #                                            },
+  #                                           { "Type" : "RelInfoConeVariables",
+#					       "ConeAngle" : 1.0,
+ #                                              "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+  #                                             "RecursionLevel" : 1,
+#					       "Location"  : 'ConeVar10'
+ #                                            },
+  #                                           { "Type" : "RelInfoConeVariables",
+   #                                            "ConeAngle" : 0.8,
+#					       "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+#					       "RecursionLevel" : 1,
+ #                                              "Location"  : 'ConeVar08'
+#			                     },
+#					     { "Type" : "RelInfoConeVariables",
+ #                                              "ConeAngle" : 0.6,
+#					       "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+#					       "RecursionLevel" : 1,
+ #                                              "Location"  : 'ConeVar06'
+#			                     },
+ #                                            { "Type" : "RelInfoVertexIsolation",
+  #                                             "Location" : "VtxIsolationVar"
+   #                                          }
+    #                                       ],
+     #              'ExtraInfoTools'    : [ { "Type" : "ConeVariables"
+      #                                       , "ConeAngle" : 0.6
+       #                                      , "ConeNumber" : 1
+        #                                     , "Variables" : ['angle', 'mult', 'ptasy']},
+         #                                  { "Type" : "ConeVariables"
+          #                                   , "ConeAngle" : 0.8
+           #                                  , "ConeNumber" : 2
+            #                                 , "Variables" : ['angle', 'mult', 'ptasy']},
+             #                              { "Type" : "ConeVariables"
+              #                               , "ConeAngle" : 1.0
+               #                              , "ConeNumber" : 3
+                #                             , "Variables" : ['angle', 'mult', 'ptasy']},
+                 #                          {'Type' : 'VertexIsolation'}
+                  #                         ] ,
+                   'Bs0_APT_Min'                :   2.0*GeV
+                   , 'Bs0_AM_Max'                 :   700*MeV
+                   , 'Bs0_ADOCAMAX_Long_Max'        : 5*mm
+                   , 'Bs0_BPVDIRA_Long_Min'         : 0.9
+                   , 'Bs0_BPVIPCHI2_Long_Max'       : 25
+                   , 'Bs0_VtxChi2_NDF_Long_Max'     : 16
+                   , 'Bs0_BPVVDCHI2_Long_Min'       : 4
+                   ,
+                   'Trk_Chi2'                 : 3.0,
+                   'Lambda_DD_MassWindow'     : 20.0, 
+                   'Lambda_DD_VtxChi2'        : 12.0,
+                   'Lambda_DD_FDChi2'         : 50.0,
+                   'Lambda_DD_FD'             : 300.0,
+                   'Lambda_DD_Pmin'           : 8000.0,
+                   'Lambda_LL_MassWindow'     : 15.0,
+                   'Lambda_LL_VtxChi2'        : 12.0,
+                   'Lambda_LL_FDChi2'         : 50.0,
+                   'B_Mlow'                  : 500.0,
+                   'B_Mhigh'                 : 500.0,
+                   'B_2bodyMlow'             : 800.0,
+                   'B_2bodyMhigh'            : 800.0,
+                   'B_APTmin'                : 1000.0,
+                   'B_PTmin'                 : 1500.0,
+                   'BDaug_MedPT_PT'          : 800.0,
+                   'BDaug_MaxPT_IP'          : 0.05,
+                   'BDaug_DD_maxDocaChi2'    : 5.0,
+                   'BDaug_LL_maxDocaChi2'    : 5.0,
+                   'BDaug_DD_PTsum'          : 4200.0,
+                   'BDaug_LL_PTsum'          : 3000.0,
+                   'B_DD_PTMin'             : 500.0,
+                   'B_LL_PTMin'             : 500.0,
+                   'B_VtxChi2'               : 12.0,
+                   'B_DD_Dira'               : 0.995,
+                   'B_LL_Dira'               : 0.995,
+                   'B_DD_IPCHI2wrtPV'        : 8.0,
+                   'B_LL_IPCHI2wrtPV'        : 8.0,
+                   'B_FDwrtPV'               : 1.0,
+                   'B_DD_FDChi2'             : 50.0,
+                   'B_LL_FDChi2'             : 50.0,
+                   'GEC_MaxTracks'           : 250,
+                   'Prescale'                : 1.0,
+                   'Postscale'               : 1.0,
+                   'MVAResponseLL'           : 0.95,
+                   'MVAResponseDD'           : 0.97,
+                   }
+                   }
+
+class B2TwoBaryonLines( LineBuilder ) :
+    """Class defining the Bd,s -> baryon antibaryon stripping line"""
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__( self,name,config ) :        
+        
+        LineBuilder.__init__(self, name, config)
+        
+        B2PPbarName  = name + "B2PPbar"
+
+        B2PPSameSignName  = name + "B2PPSameSign"
+
+        B2Lp_dd_name    = name+'B2PLambdabarDD'
+        B2Lp_ll_name    = name+'B2PLambdabarLL'
+
+        GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+        self.pions   = Pions
+
+        self.selLambda2DD = self.makeLambda2DD( 'Lambda0DDBLines', config )
+        self.selLambda2LL = self.makeLambda2LL( 'Lambda0LLBLines', config )
+
+        self.selB2LpDD = self.makeB2LpDD( B2Lp_dd_name, config )
+        self.selB2LpLL = self.makeB2LpLL( B2Lp_ll_name, config )
+
+#        self.selB2LpLLMVA = self.makeB2LpLLMVA( B2Lp_ll_name+"_MVA", config )
+#        self.selB2LpDDMVA = self.makeB2LpDDMVA( B2Lp_dd_name+"_MVA", config )
+
+        self.B2PPbar = self.makeB2PPbar( B2PPbarName,
+                                    config['MinPTB2PPbar'],
+                                    #config['TrChi2'],
+                                    config['PIDppi'],
+                                    config['PIDpk'],
+                                    config['MinIPChi2B2PPbar'],
+                                    config['MaxIPChi2B2PPbar'],
+                                    config['CombMassWindow'],
+                                    config['MaxPTB2PPbar'], 
+                                    config['MaxDaughtPB2PPbar'],	            
+                                    config['VertexChi2B2PPbar'],
+                                    config['BIPChi2B2PPbar'],
+                                    config['BPTB2PPbar'],
+                                    config['BDIRA'],
+                                    config['MaxGhostProb']
+                                    )
+
+        """self.B2PPSameSign = self.makeB2PPSameSign( B2PPSameSignName,
+                                         config['MinPTB2PPbar'],
+                                         #config['TrChi2'],
+                                         config['PIDppi'],
+                                         config['PIDpk'],
+                                         config['MinIPChi2B2PPbar'],
+                                         config['MaxIPChi2B2PPbar'],
+                                         config['CombMassWindow'],
+                                         config['MaxPTB2PPbar'], 
+                                         config['MaxDaughtPB2PPbar'],	            
+                                         config['VertexChi2B2PPbar'],
+                                         config['BIPChi2B2PPbar'],
+                                         config['BPTB2PPbar'],
+                                         config['BDIRA'],
+                                         config['MaxGhostProb']
+                                         )
+"""
+        self.B2Lp_dd_line = StrippingLine(B2Lp_dd_name+"Line",
+                                         prescale = config['Prescale'],
+                                         postscale = config['Postscale'],
+                                         selection = self.selB2LpDD,
+                                         FILTER = GECCode,
+#                                         RelatedInfoTools = config['RelatedInfoTools'],
+                                         #ExtraInfoTools = config['ExtraInfoTools'],
+                                         #ExtraInfoDaughters = [self.selB2LpDD]
+                                         )
+        self.B2Lp_ll_line = StrippingLine(B2Lp_ll_name+"Line",
+                                         prescale = config['Prescale'],
+                                         postscale = config['Postscale'],
+                                         selection =  self.selB2LpLL,
+                                         FILTER = GECCode,
+ #                                        RelatedInfoTools = config['RelatedInfoTools'],
+                                         #ExtraInfoTools = config['ExtraInfoTools'],
+                                         #ExtraInfoDaughters = [self.selB2LpLL]
+                                         )
+        #for alg in config['RelatedInfoTools']:
+        #    alg['TopSelection'] = self.selB2LpLLMVA
+#        self.B2Lp_ll_MVAline = StrippingLine(B2Lp_ll_name+"_MVALine",
+#                                          prescale = config['Prescale'],
+#                                          postscale = config['Postscale'],
+#                                          selection =  self.selB2LpLLMVA,
+#                                          FILTER = GECCode,
+#                                          RelatedInfoTools = config['RelatedInfoTools'],
+                                          #ExtraInfoTools = config['ExtraInfoTools'],
+                                          #ExtraInfoDaughters = [self.selB2LpLLMVA]
+#                                          )
+#        self.B2Lp_dd_MVAline = StrippingLine(B2Lp_dd_name+"_MVALine",
+#                                             prescale = config['Prescale'],
+#                                             postscale = config['Postscale'],
+#                                             selection =  self.selB2LpDDMVA,
+#                                             FILTER = GECCode,
+#                                             RelatedInfoTools = config['RelatedInfoTools'],
+                                             #ExtraInfoTools = config['ExtraInfoTools'],
+                                             #ExtraInfoDaughters = [self.selB2LpLLMVA]
+#                                             )
+        
+
+
+        self.lineB2PPbar = StrippingLine( B2PPbarName+"Line",
+                                          prescale = config['PrescaleB2PPbar'],
+                                          selection = self.B2PPbar,)
+ #                                         RelatedInfoTools = config['RelatedInfoTools']
+         
+        #self.lineB2PPSameSign = StrippingLine( B2PPSameSignName+"Line",
+        #                                  prescale = config['PrescaleB2PPbar'],
+        #                                  selection = self.B2PPSameSign,
+        #                                  RelatedInfoTools = config['RelatedInfoTools'])
+         
+
+            
+        ## Some generic cuts for Bs0.
+        ## Vertex chi2 cut depends on number of daughters:
+        ##      (2 dau => 1 NDF; 3 dau => 3 NDF; 4 dau => 5 NDF)
+        _strCutComb_Long = "(ADAMASS(5.1*GeV)<1.1*%(Bs0_AM_Max)s)" \
+                           "& (APT>%(Bs0_APT_Min)s)" \
+                           "& (ADOCAMAX('')<%(Bs0_ADOCAMAX_Long_Max)s)" % config
+        _strCutMoth_Long  = "(ADMASS(5.1*GeV)<%(Bs0_AM_Max)s)" \
+                            "& (BPVVDCHI2 > %(Bs0_BPVVDCHI2_Long_Min)s)" \
+                            "& (BPVIPCHI2()< %(Bs0_BPVIPCHI2_Long_Max)s)" \
+                            "& (BPVDIRA > %(Bs0_BPVDIRA_Long_Min)s)" % config
+        
+        _strChi2Moth_Long = "(VFASPF(VCHI2/VDOF)<%(Bs0_VtxChi2_NDF_Long_Max)s)" % config
+        
+        _strCutMoth_Long = _strChi2Moth_Long + '&' + _strCutMoth_Long
+        
+
+        #make Bs0
+        """
+        Bs0 -> Lambda0 Lambda~0
+        """
+        self.combineBs04LLDD = self.makeBs0(name+'CombineBsLLDD', [ self.selLambda2LL,self.selLambda2DD] , '[B_s0 -> Lambda0 Lambda~0]cc', _strCutComb_Long, _strCutMoth_Long)
+        self.lineBs04LLDD = StrippingLine(name = name+'Bs2LambdabarLambda', prescale = 1.0, postscale = 1.0, selection = self.combineBs04LLDD)
+
+        self.registerLine(self.B2Lp_dd_line)
+        self.registerLine(self.B2Lp_ll_line)
+#        self.registerLine(self.B2Lp_ll_MVAline)
+#        self.registerLine(self.B2Lp_dd_MVAline)
+        self.registerLine(self.lineB2PPbar)
+        self.registerLine(self.lineBs04LLDD)
+
+    def makeBs0(self, localName, inputSelections, decay, cutComb, cutMoth) :
+           _combineBs0 = CombineParticles( DecayDescriptor = decay, CombinationCut = cutComb, MotherCut = cutMoth )
+           return Selection ( localName, Algorithm = _combineBs0, RequiredSelections = inputSelections)
+
+    def makeB2PPbar( self,
+                     name,
+                     minPT,
+                     #trChi2,
+                     pidPPi, pidPK, minIPChi2, maxIPChi2,
+                     combMassWindow, maxPT, maxP,
+                     vertexChi2, bIPChi2, bPT, bDIRA, maxGhostProb ) :
+
+        #_daughters_cuts = "(PT > %(minPT)s * MeV) & (TRCHI2DOF < %(trChi2)s) & ((PIDp-PIDpi) > %(pidPPi)s) & ( (PIDp-PIDK) > %(pidPK)s ) & (MIPCHI2DV(PRIMARY) > %(minIPChi2)s)" %locals()
+        _daughters_cuts = "(PT > %(minPT)s * MeV) & (P < %(maxP)s * MeV) & ((PIDp-PIDpi) > %(pidPPi)s) & ( (PIDp-PIDK) > %(pidPK)s ) & (MIPCHI2DV(PRIMARY) > %(minIPChi2)s) & (TRGHP < %(maxGhostProb)s )" %locals()
+        _combination_cuts = "( (ADAMASS('B0') < %(combMassWindow)s * MeV) | (ADAMASS('B_s0') < %(combMassWindow)s * MeV) ) & ( AMAXCHILD(MAXTREE('p+'==ABSID,PT)) > %(maxPT)s * MeV ) & ( AMAXCHILD(MAXTREE('p+'==ABSID,MIPCHI2DV(PRIMARY))) > %(maxIPChi2)s )" %locals()
+        _mother_cuts = "(PT > %(bPT)s * MeV) & ( VFASPF(VCHI2PDOF) < %(vertexChi2)s ) & ( BPVDIRA > %(bDIRA)s ) & ( BPVIPCHI2() < %(bIPChi2)s )" %locals()
+
+        CombineB2PPbar = CombineParticles(DecayDescriptor = 'B0 -> p+ p~-',
+                                       DaughtersCuts = { "p+" : _daughters_cuts },
+                                       CombinationCut = _combination_cuts,
+                                       MotherCut = _mother_cuts )
+
+        return Selection( name,
+                          Algorithm = CombineB2PPbar,
+                          RequiredSelections = [ StdLooseProtons ] )
+
+    ########################################################################  
+    def makeB2PPSameSign( self,
+                          name,
+                          minPT,
+                          #trChi2,
+                          pidPPi, pidPK, minIPChi2, maxIPChi2,
+                          combMassWindow, maxPT, maxP,
+                          vertexChi2, bIPChi2, bPT, bDIRA, maxGhostProb ) :
+        
+        #_daughters_cuts = "(PT > %(minPT)s * MeV) & (TRCHI2DOF < %(trChi2)s) & ((PIDp-PIDpi) > %(pidPPi)s) & ( (PIDp-PIDK) > %(pidPK)s ) & (MIPCHI2DV(PRIMARY) > %(minIPChi2)s)" %locals()
+        _daughters_cuts = "(PT > %(minPT)s * MeV) & (P < %(maxP)s * MeV) & ((PIDp-PIDpi) > %(pidPPi)s) & ( (PIDp-PIDK) > %(pidPK)s ) & (MIPCHI2DV(PRIMARY) > %(minIPChi2)s) & (TRGHP < %(maxGhostProb)s )" %locals()
+        _combination_cuts = "( (ADAMASS('B0') < %(combMassWindow)s * MeV) | (ADAMASS('B_s0') < %(combMassWindow)s * MeV) ) & ( AMAXCHILD(MAXTREE('p+'==ABSID,PT)) > %(maxPT)s * MeV ) & ( AMAXCHILD(MAXTREE('p+'==ABSID,MIPCHI2DV(PRIMARY))) > %(maxIPChi2)s )" %locals()
+        _mother_cuts = "(PT > %(bPT)s * MeV) & ( VFASPF(VCHI2PDOF) < %(vertexChi2)s ) & ( BPVDIRA > %(bDIRA)s ) & ( BPVIPCHI2() < %(bIPChi2)s )" %locals()
+        
+        CombineB2PPSameSign = CombineParticles( DecayDescriptor = ['B0 -> p+ p+', 'B0 -> p~- p~-'], 
+                                                DaughtersCuts = { "p+" : _daughters_cuts },
+                                                CombinationCut = _combination_cuts,
+                                                MotherCut = _mother_cuts )
+
+        return Selection( name,
+                          Algorithm = CombineB2PPSameSign,
+                          RequiredSelections = [ StdLooseProtons ] )
+
+    ###################################################################################
+
+    def makeLambda2DD( self, name, config ) :
+        # define all the cuts
+        _massCut   = "(ADMASS('Lambda0')<%s*MeV)"      % config['Lambda_DD_MassWindow']
+        _vtxCut    = "(VFASPF(VCHI2)<%s)   "           % config['Lambda_DD_VtxChi2']
+        _fdChi2Cut = "(BPVVDCHI2>%s)"                  % config['Lambda_DD_FDChi2']
+        _fdCut     = "(VFASPF(VMINVDDV(PRIMARY))>%s)"  % config['Lambda_DD_FD']
+        _momCut    = "(P>%s*MeV)"                      % config['Lambda_DD_Pmin']
+    
+        _allCuts = _momCut+'&'+_massCut+'&'+_vtxCut+'&'+_fdCut+'&'+_fdChi2Cut
+    
+        # get the Lambda0's to filter
+        _stdLambdaDD = DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")
+    
+        # make the filter
+        _filterLambdaDD = FilterDesktop( Code = _allCuts )
+    
+        # make and store the Selection object
+        return Selection( name, Algorithm = _filterLambdaDD, RequiredSelections = [_stdLambdaDD] )
+    
+    def makeLambda2LL( self, name, config ) :
+        # define all the cuts
+        _massCut    = "(ADMASS('Lambda0')<%s*MeV)" % config['Lambda_LL_MassWindow']
+        _vtxCut     = "(VFASPF(VCHI2)<%s)"         % config['Lambda_LL_VtxChi2']
+        _fdCut      = "(BPVVDCHI2>%s)"             % config['Lambda_LL_FDChi2']
+        _trkChi2Cut1 = "(CHILDCUT((TRCHI2DOF<%s),1))" % config['Trk_Chi2']
+        _trkChi2Cut2 = "(CHILDCUT((TRCHI2DOF<%s),2))" % config['Trk_Chi2']
+        _allCuts = _massCut+'&'+_trkChi2Cut1+'&'+_trkChi2Cut2+'&'+_vtxCut+'&'+_fdCut
+    
+        # get the Lambda's to filter
+        _stdLambdaLL = DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")
+
+        # make the filter
+        _filterLambdaLL = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        return Selection( name, Algorithm = _filterLambdaLL, RequiredSelections = [_stdLambdaLL] )
+
+
+    def makeB2LpDD( self, name, config ) :
+        """
+        Create and store a B ->Lambda~0(DD) p+  Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+        
+        _massCutLow     = "(AM>(5620-%s)*MeV)"               % config['B_2bodyMlow']
+        _massCutHigh    = "(AM<(5620+%s)*MeV)"               % config['B_2bodyMhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['B_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['BDaug_MedPT_PT']
+#        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['BDaug_MaxPT_IP']  #Causes DaVinci to "Hang"
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['BDaug_DD_maxDocaChi2']
+        _daugPtSumCut   = "(APT1>%s*MeV)"                    % config['B_DD_PTMin']
+    
+        #_combCuts = _aptCut+'&'+_daugPtSumCut+'&'+_daugMedPtCut+'&'+_massCutLow+'&'+_massCutHigh+'&'+_daugMaxPtIPCut+'&'+_maxDocaChi2Cut
+        _combCuts = _aptCut+'&'+_daugPtSumCut+'&'+_daugMedPtCut+'&'+_massCutLow+'&'+_massCutHigh+'&'+_maxDocaChi2Cut
+    
+        _ptCut      = "(PT>%s*MeV)"                    % config['B_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['B_DD_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_DD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B_DD_FDChi2']
+        
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut+'&'+_diraCut+'&'+_ipChi2Cut+'&'+_fdCut+'&'+_fdChi2Cut
+    
+        _B = CombineParticles()
+        _B.DecayDescriptors = [ "B- -> p~- Lambda0", "B+ -> p+ Lambda~0"]
+        _B.DaughtersCuts = { "p+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+    
+        return Selection (name, Algorithm = _B, RequiredSelections = [self.selLambda2DD, StdLooseProtons ])
+
+    def makeB2LpLL( self, name, config ) :
+        """
+        Create and store a B -> Lambda~0(LL) p+  Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+    
+        _massCutLow     = "(AM>(5279-%s)*MeV)"               % config['B_2bodyMlow']
+        _massCutHigh    = "(AM<(5279+%s)*MeV)"               % config['B_2bodyMhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['B_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['BDaug_MedPT_PT']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['BDaug_LL_maxDocaChi2']
+        _daugPtSumCut   = "(APT1>%s*MeV)"                   % config['B_LL_PTMin']
+    
+        _combCuts = _aptCut+'&'+_daugPtSumCut+'&'+_daugMedPtCut+'&'+_massCutLow+'&'+_massCutHigh+'&'+_maxDocaChi2Cut
+        
+        _ptCut      = "(PT>%s*MeV)"                    % config['B_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['B_LL_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_LL_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B_LL_FDChi2']
+    
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut+'&'+_diraCut+'&'+_ipChi2Cut+'&'+_fdCut+'&'+_fdChi2Cut
+    
+        _B = CombineParticles()
+        _B.DecayDescriptors = [ "B- -> p~- Lambda0", "B+ -> p+ Lambda~0" ]
+        _B.DaughtersCuts = { "p+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+        
+        return Selection (name, Algorithm = _B, RequiredSelections = [self.selLambda2LL, StdLooseProtons  ])
+    
+                                                                                                                        
+#    def makeB2LpLLMVA( self,  name, config ):
+#        """
+#        Select B -> Lambda~0 p+ event by MVA selcetion
+#        """
+#        from Configurables import CombineParticles as CP
+#        #Selection
+#        _B = CP("B2LpLLMVA")
+#        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['BDaug_LL_maxDocaChi2']
+#        _daugPtSumCut   = "(APT1>%s*MeV)"                   % config['B_LL_PTMin']
+
+        #_B.DecayDescriptors = [ "B- -> p~- ( Lambda0 -> p+ pi- )", "B+ -> p+ ( Lambda~0 -> p~- pi+ )" ]
+#        _B.DecayDescriptors = [ "B- -> p~- Lambda0", "B+ -> p+ Lambda~0" ] 
+#        _B.CombinationCut = "(ADAMASS('B-')<500*MeV)&"+_maxDocaChi2Cut+'&'+_daugPtSumCut
+#        _B.MotherCut = "VALUE('LoKi::Hybrid::DictValue/MVAResponse') >  %s" % config['MVAResponseLL']
+#        #_B.MotherCut = 'ALL'
+#        # get the Lambda's to filter
+#        _stdLambdaLL = DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")
+
+#        # make the filter
+#        _filterLambdaLL = FilterDesktop( Code = "ALL" )
+
+#        #Configure tool
+#        from MVADictHelpers import addTMVAclassifierValue
+#        xmldir = "$TMVAWEIGHTSROOT/data/"
+#        #xmldir = "./"
+
+#        Vars =    {"log(B_LoKi_VCHI2NDOF)" : "log(VFASPF(VCHI2))",
+#                   "log(B_LoKi_BPVIPCHI2)"       : "log(MIPCHI2DV(PRIMARY))",
+#                   "B_LoKi_BPVDIRA"             : "BPVDIRA",
+#                   "log(B_LoKi_FDwrtPV)"           : "log(VFASPF(VMINVDDV(PRIMARY)))",
+#                   "log(B_LoKi_FDChi2)"      : "log(BPVVDCHI2)",
+#                   "log(B_LoKi_PT)"           : "log(PT)",
+#                   "log(pB_LoKi_PT)"          : "log(CHILD(PT,1))",
+#                   "log(pL_LoKi_PT)"          : "log(CHILD( CHILD(PT,1) ,2))",
+#                   "log(L_LoKi_P)"           : "log(CHILD(P,2))",
+#                   "log(L_LoKi_Mass)"            : "log(ADMASS('Lambda0'))",
+#                   "log(L_LoKi_VtxChi2)" : "log(CHILD(VFASPF(VCHI2),2))",
+#                   "log(L_LoKi_FDChi2)"      : "log(CHILD(BPVVDCHI2,2))",
+#                   "log(pL_LoKi_TrkChi2)"     : "log(CHILD(CHILD(TRCHI2DOF,2),2))",
+#                   "log(pi_LoKi_TrkChi2)"     : "log(CHILD(CHILD(TRCHI2DOF,1),2))",
+#                   } 
+#        addTMVAclassifierValue(Component = _B ,
+#                              XMLFile = xmldir+"B2pLambda_LL_BDT_v1r4.xml",
+#                              Variables = Vars,
+#                              ToolName = "MVAResponse",
+#                              )
+##        return Selection (name, Algorithm = _B, RequiredSelections = [self.selLambda2LL, StdLooseProtons  ])
+#        return Selection (name, Algorithm = _B, RequiredSelections = [_stdLambdaLL, StdLooseProtons  ])
+#    def makeB2LpDDMVA( self,  name, config ):
+#        """
+#        Select B -> Lambda~0 p+ event by MVA selcetion
+#        """
+#        from Configurables import CombineParticles as CP
+#        #Selection
+#        _B = CP("B2LpDDMVA")
+#        _daugPtSumCut   = "(APT1>%s*MeV)"                   % config['B_DD_PTMin']
+#        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['BDaug_DD_maxDocaChi2']
+##        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['BDaug_MaxPT_IP'] #Causes DaVinci to "hang"
+#        #_B.DecayDescriptors = [ "B- -> p~- ( Lambda0 -> p+ pi- )", "B+ -> p+ ( Lambda~0 -> p~- pi+ )" ]
+#        _B.DecayDescriptors = [ "B- -> p~- Lambda0", "B+ -> p+ Lambda~0" ]
+#        _B.CombinationCut = "(ADAMASS('B-')<500*MeV)&"+_maxDocaChi2Cut+'&'+_daugPtSumCut
+#        _B.MotherCut = "VALUE('LoKi::Hybrid::DictValue/MVAResponse')>  %s" % config['MVAResponseDD']
+#        #_B.MotherCut = 'ALL'
+#        # get the Lambda's to filter
+#        _stdLambdaDD = DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")
+#        
+#        # make the filter
+#        _filterLambdaDD = FilterDesktop( Code = "ALL" )
+#        
+#        #Configure tool
+#        from MVADictHelpers import addTMVAclassifierValue
+#        xmldir = "$TMVAWEIGHTSROOT/data/"
+#        #xmldir = "./"
+#        
+#        Vars =    {"log(B_LoKi_VCHI2NDOF)" : "log(VFASPF(VCHI2))",
+#                   "log(B_LoKi_BPVIPCHI2)"       : "log(MIPCHI2DV(PRIMARY))",
+#                   "B_LoKi_BPVDIRA"             : "BPVDIRA",
+#                   "log(B_LoKi_FDwrtPV)"           : "log(VFASPF(VMINVDDV(PRIMARY)))",
+#                   "log(B_LoKi_FDChi2)"      : "log(BPVVDCHI2)",
+#                   "log(B_LoKi_PT)"           : "log(PT)",
+#                   "log(pB_LoKi_PT)"          : "log(CHILD(PT,1))",
+#                   "log(pL_LoKi_PT)"          : "log(CHILD( CHILD(PT,1) ,2))",
+#                   "log(L_LoKi_P)"           : "log(CHILD(P,2))",
+#                   "log(L_LoKi_Mass)"            : "log(ADMASS('Lambda0'))",
+#                   "log(L_LoKi_VtxChi2)" : "log(CHILD(VFASPF(VCHI2),2))",
+#                   "log(L_LoKi_FDChi2)"      : "log(CHILD(BPVVDCHI2,2))",
+#                   "log(pL_LoKi_TrkChi2)"     : "log(CHILD(CHILD(TRCHI2DOF,2),2))",
+#                   "log(pi_LoKi_TrkChi2)"     : "log(CHILD(CHILD(TRCHI2DOF,1),2))",
+#                                      }
+#        
+#        addTMVAclassifierValue(Component = _B ,
+#                               XMLFile = xmldir+"B2pLambda_DD_BDT_v1r4.xml",
+#                               Variables = Vars,
+#                               ToolName = "MVAResponse",
+#                               )
+#        return Selection (name, Algorithm = _B, RequiredSelections = [_stdLambdaDD, StdLooseProtons  ])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2XEta.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2XEta.py
new file mode 100644
index 000000000..782c3bc95
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2XEta.py
@@ -0,0 +1,899 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Bd->KS eta('), Lb ->Lambda eta('), Lb ->pKeta(')  stripping Selections and StrippingLines.
+Provides functions to build KS->DD, KS->LL, lambda->LL, lambda->DD, eta', eta, Bd, Lambda_b0  selections.
+Provides class B2XEtaConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+"""
+
+__author__ = ['Timothy Williams']
+__date__ = '1/12/2016'
+__version__ = 'Stripping26r1'
+__all__ = ('B2XEtaConf',
+           'default_config')
+
+default_config = {
+    'NAME'         : 'B2XEta',
+    'WGs'          : ['BnoC'],
+    'BUILDERTYPE'  : 'B2XEtaConf',
+    'CONFIG'       : {
+                  'Trk_Chi2'                : 4.0,
+                  'Trk_PT'                  : 300.0,
+                  'Trk_GP'                  : 0.5,
+                  'pK_PT'                   : 500., #1000.
+                  'pK_IPCHI2'               : 20.,
+                  'ProbNNCut'               : 0.1,
+                  'kstar_daug_PT'           : 500.,
+                  'KS_DD_MassWindow'        : 23.0,
+                  'KS_DD_VtxChi2'           : 15.0, 
+                  'KS_DD_FDChi2'            : 20.0,
+                  'KS_DD_PTmin'             : 1200.0,
+                  'KS_LL_MassWindow'        : 14.0,
+                  'KS_LL_VtxChi2'           : 15.0,  
+                  'KS_LL_FDChi2'            : 50.0,
+                  'KS_LL_PTmin'             : 1200.0,
+                  'L_DD_MassWindow'         : 20.0,
+                  'L_DD_VtxChi2'            : 15.0,
+                  'L_DD_PTmin'              : 1000.0,
+                  'L_LL_MassWindow'         : 15.0,
+                  'L_LL_VtxChi2'            : 15.0,
+                  'L_LL_PTmin'              : 1000.0,
+                  'Kstar_PTmin'             : 1200.0,
+                  'Kstar_massWdw'           : 100.0,
+                  'Kstar_vtxChi2'           : 9.0,
+                  'Kstar_ipChi2'            : 5.0,
+                  'eta_PT'                  : 2000,
+                  'eta_MassWindow'          : 200.0,
+                  'etaforetap_MassWindow'   : 75.0,
+                  'eta_vtxChi2'             : 10.,
+                  'eta_DOCA'                : 10.0, #20
+                  'gamma_PT'                : 500, #photons from eta
+                  'eta_prime_MassWindow'    : 150.0,
+                  'eta_prime_PT'            : 2000.0,
+                  'eta_prime_vtxChi2'       : 10.0,
+                  'eta_prime_DOCA'          : 10.0, #15
+                  'B_MassWindow'            : 750.0,
+                  'B_PTmin'                 : 1500.0,
+                  'BDaug_DD_maxDocaChi2'    : 15.0, #20 
+                  'BDaug_LL_maxDocaChi2'    : 15.0,  #20
+                  'B_VtxChi2'               : 15.0,
+                  'B_Dira'                  : 0.9995,
+                  'B_IPCHI2'                : 20.0,
+                  'B_eta_IPCHI2'            : 6.0, 
+                  'Lb_MassWindow'           : 750.0,
+                  'Lb_PTmin'                : 1000.0,
+                  'LbDaug_DD_maxDocaChi2'   : 15.0, #20
+                  'LbDaug_LL_maxDocaChi2'   : 15.0, #20
+                  'Lb_VtxChi2'              : 15.0,
+                  'Lb_Dira'                 : 0.9995,
+                  'Lb_IPCHI2'               : 20.0,
+                  'Lb_eta_IPCHI2'           : 6.0,
+                  'GEC_MaxTracks'           : 250,
+                  'Prescale'                : 1.0,
+                  'Postscale'               : 1.0,
+                  'etaGG_Prescale'          : 0.0
+                  #'TCKs'                : ('0x00470032','0x00790038')
+                  #'TCKs'                : ('0x00470032','0x00790038','0x007E003A','0x0097003D','0x407E003A','0x4097003D','0x00990042','0x00AC0046','0x40990042','0x40AC0046')
+                  },
+    'STREAMS'     : ['Bhadron']
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiKernel import SystemOfUnits as Units
+from PhysSelPython.Wrappers import DataOnDemand, Selection, SelectionSequence, MergedSelection
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays
+#from Configurables import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+#from PhysConf.Selections import PrintSelection
+#from MVADictHelpers import *
+#from Configurables import LoKi__ODINFilter as ODINFilter
+#from Configurables import LoKi__Hybrid__DictValue as DictValue
+#from Configurables import LoKi__Hybrid__DictTransform_TMVATransform_ as TMVAClassifier
+#from Configurables import LoKi__Hybrid__DictOfFunctors
+
+from StandardParticles import StdLoosePions as Pions
+from StandardParticles import StdLooseKaons as Kaons
+from StandardParticles import StdLooseProtons as Protons
+from StandardParticles import StdLooseAllPhotons as Photons
+from StandardParticles import StdLooseResolvedEta as Eta
+from StandardParticles import StdLooseEta2gg as WideEta
+from StandardParticles import StdLooseResolvedPi0 as PiZero
+
+_KsLL=DataOnDemand("Phys/StdLooseKsLL/Particles")
+_KsDD=DataOnDemand("Phys/StdLooseKsDD/Particles")
+_lambdaLL=DataOnDemand(Location='Phys/StdLooseLambdaLL/Particles')
+_lambdaDD=DataOnDemand("Phys/StdLooseLambdaDD/Particles")
+_kstar=DataOnDemand("Phys/StdLooseKstar2Kpi/Particles")
+
+
+class B2XEtaConf(LineBuilder) :
+    """
+    Builder of B->XEta stripping Selection and StrippingLine.
+    Constructs B -> KS eta' and Lb -> Lambda eta' Selections and StrippingLines from a configuration dictionary.
+    
+    Exports as instance data members:
+    selKS2DD               : KS -> Down Down Selection object
+    selKS2LL               : KS -> Long Long Selection object
+    selL2LL                : Lambda -> Long Long Selection Object
+    selL2DD                : Lambda -> Down Down Selection Object
+    selRho                 : rho -> pi+ pi- Selection Object
+    selEtap                : eta' Selection Object
+    selB2KSDDEtap          : B -> KS(DD) eta' Selection object
+    selB2KSLLEtap          : B -> KS(LL) eta' Selection object
+    selLb2LDDEtap          : Lb -> Lambda(DD) eta' Selection Object
+    selLb2LLLEtap          : Lb -> Lambda(LL) eta' Selection Object
+    B2etap_DD_line         : StrippingLine made from selB2KSDDhh
+    B2etap_LL_line         : StrippingLine made from selB2KSLLhh
+    Lb2etap_DD_line        : StrippingLine made from selLb2LLDDEtap
+    Lb2etap_LL_line        : StrippingLine made from selLb2DDEtap
+    lines                  : List of lines, [dd_line, ll_line]
+
+    Exports as class data member:
+    B2KShhConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        
+        LineBuilder.__init__(self,name,config)
+
+        B2etap_LL_name = name+'B2etapKSLL'
+        B2etap_DD_name = name+'B2etapKSDD'
+        B2etaGG_LL_name = name+'B2etaGGKSLL'
+        B2etaGG_DD_name = name+'B2etaGGKSDD'
+        B2eta3Pi_LL_name = name+'B2eta3piKSLL'
+        B2eta3Pi_DD_name = name+'B2eta3piKSDD'
+        Lb2etap_LL_name = name+'Lb2etapLLL'
+        Lb2etap_DD_name = name+'Lb2etapLDD'
+        Lb2etaGG_LL_name = name+'Lb2etaGGLLL'
+        Lb2etaGG_DD_name = name+'Lb2etaGGLDD'
+        Lb2eta3Pi_LL_name = name+'Lb2eta3piLLL'
+        Lb2eta3Pi_DD_name = name+'Lb2eta3piLDD'
+
+        B2etap_Kst_name = name+'B2etapKstar'
+        B2etaGG_Kst_name = name+'B2etaGGKstar'
+        B2eta3Pi_Kst_name = name+'B2eta3piKstar'
+        Lb2etap_pK_name = name+'Lb2pKetap'
+        Lb2etaGG_pK_name = name+'Lb2pKetaGG'
+        Lb2eta3Pi_pK_name = name+'Lb2pKeta3pi'
+ 
+        GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        #TCKFilters  = {'Code' : "(in_range( %s, ODIN_TCK, %s )) | (in_range( %s, ODIN_TCK, %s )) | (in_range( %s, ODIN_TCK, %s )) | (in_range( %s, ODIN_TCK, %s )) | (in_range( %s, ODIN_TCK, %s ))" % config['TCKs'],
+        #               'Preambulo' : ["from LoKiCore.functions import *"]}
+        #TCKFilters  = {'Code' : "(in_range( %s, ODIN_TCK, %s ))" % config['TCKs'],
+        #               'Preambulo' : ["from LoKiCore.functions import *"]}
+        
+        Hlt1Filter = "(HLT_PASS_RE('Hlt1(Two)?TrackMVADecision'))"
+        Hlt2Filter = "(HLT_PASS_RE('Hlt2Topo[234]BodyDecision'))"
+
+        _tagging=True
+        self.refitPVs=True
+        
+        self.pions = Pions
+        self.kaons = Kaons
+        self.protons = Protons
+        self.photons = Photons
+        self.eta = Eta
+        self.wideeta=WideEta
+        self.pizero = PiZero
+
+        self.daughters = MergedSelection("DaughtersFor" + name, RequiredSelections = [ self.pions, self.photons, self.pizero] )
+
+        self.makeKS2LL( 'KSfor'+B2etap_LL_name, config )
+        self.makeKS2DD( 'KSfor'+B2etap_DD_name, config )        
+        self.makeL2LL( 'Lambdafor'+Lb2etap_LL_name,config)
+        self.makeL2DD('Lambdafor'+Lb2etap_DD_name,config)
+
+        self.makeFilterKaons( 'KaonsFor'+Lb2etap_pK_name, config )
+        self.makeFilterProtons( 'ProtonsFor'+Lb2etap_pK_name, config )
+        self.makeFilterKstar( 'KstarFor'+B2etap_Kst_name, config )
+
+        self.makeEtaGG('EtaGGfor'+name,config)
+        self.makeEta3Pi('Eta3Pifor'+name,config)
+        self.makeEtaforEtap('EtaforEtapfor'+name,config)
+        self.makeEtap('Etapfor'+name,config)
+
+
+        self.makeB2KSLLetap(B2etap_LL_name, config)
+        self.makeB2KSDDetap(B2etap_DD_name,config)
+        self.makeB2KSLLetaGG(B2etaGG_LL_name, config)
+        self.makeB2KSDDetaGG(B2etaGG_DD_name, config)
+        self.makeB2KSLLeta3Pi(B2eta3Pi_LL_name, config)
+        self.makeB2KSDDeta3Pi(B2eta3Pi_DD_name, config) 
+        self.makeLb2LLLetap(Lb2etap_LL_name,config)
+        self.makeLb2LDDetap(Lb2etap_DD_name,config)
+        self.makeLb2LLLetaGG(Lb2etaGG_LL_name, config)
+        self.makeLb2LDDetaGG(Lb2etaGG_DD_name, config)    
+        self.makeLb2LLLeta3Pi(Lb2eta3Pi_LL_name, config)
+        self.makeLb2LDDeta3Pi(Lb2eta3Pi_DD_name, config)
+
+        self.makeB2Kstetap(B2etap_Kst_name, config)
+        self.makeB2KstetaGG(B2etaGG_Kst_name, config)
+        self.makeB2Ksteta3Pi(B2eta3Pi_Kst_name, config)
+        self.makeLb2pKetap(Lb2etap_pK_name, config)
+        self.makeLb2pKetaGG(Lb2etaGG_pK_name, config)
+        self.makeLb2pKeta3Pi(Lb2eta3Pi_pK_name, config)
+
+        self.B2etap_LL_line = StrippingLine(B2etap_LL_name+'Line',
+                                            prescale = config['Prescale'],
+                                            postscale = config['Postscale'],
+                                            selection = self.selB2KSLLetap,
+                                            HLT1 = Hlt1Filter,
+                                            FILTER = GECCode,
+                                            EnableFlavourTagging=_tagging
+                                            )
+        self.B2etap_DD_line = StrippingLine(B2etap_DD_name+'Line',
+                                            prescale = config['Prescale'],
+                                            postscale = config['Postscale'],
+                                            selection = self.selB2KSDDetap,
+                                            HLT1 = Hlt1Filter,
+                                            FILTER = GECCode,
+                                            EnableFlavourTagging=_tagging
+                                            )
+        self.B2etaGG_LL_line = StrippingLine(B2etaGG_LL_name+'Line',
+                                             prescale = config['etaGG_Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selB2KSLLetaGG,
+                                             FILTER = GECCode,
+                                             EnableFlavourTagging=_tagging
+                                             )
+        self.B2etaGG_DD_line = StrippingLine(B2etaGG_DD_name+'Line',
+                                             prescale = config['etaGG_Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selB2KSDDetaGG,
+                                             FILTER = GECCode,
+                                             EnableFlavourTagging=_tagging
+                                             )
+        self.B2eta3Pi_LL_line = StrippingLine(B2eta3Pi_LL_name+'Line',
+                                              prescale = config['Prescale'],
+                                              postscale = config['Postscale'],
+                                              selection = self.selB2KSLLeta3Pi,
+                                              HLT1 = Hlt1Filter,
+                                              FILTER = GECCode,
+                                              EnableFlavourTagging=_tagging
+                                              )
+        self.B2eta3Pi_DD_line = StrippingLine(B2eta3Pi_DD_name+'Line',
+                                              prescale = config['Prescale'],
+                                              postscale = config['Postscale'],
+                                              selection = self.selB2KSDDeta3Pi,
+                                              HLT1 = Hlt1Filter,
+                                              FILTER = GECCode,
+                                              EnableFlavourTagging=_tagging
+                                              )        
+        self.Lb2etap_LL_line = StrippingLine(Lb2etap_LL_name+'Line',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selLb2LLLetap,
+                                             FILTER = GECCode,
+                                             EnableFlavourTagging=_tagging
+                                             )
+        self.Lb2etap_DD_line = StrippingLine(Lb2etap_DD_name+'Line',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selLb2LDDetap,
+                                             FILTER = GECCode,
+                                             EnableFlavourTagging=_tagging
+                                             )
+        self.Lb2etaGG_LL_line = StrippingLine(Lb2etaGG_LL_name+'Line',
+                                              prescale = config['etaGG_Prescale'],
+                                              postscale = config['Postscale'],
+                                              selection = self.selLb2LLLetaGG,
+                                              FILTER = GECCode,
+                                              EnableFlavourTagging=_tagging
+                                              )
+        self.Lb2etaGG_DD_line = StrippingLine(Lb2etaGG_DD_name+'Line',
+                                              prescale = config['etaGG_Prescale'],
+                                              postscale = config['Postscale'],
+                                              selection = self.selLb2LDDetaGG,
+                                              FILTER = GECCode,
+                                              EnableFlavourTagging=_tagging
+                                              )        
+        self.Lb2eta3Pi_LL_line = StrippingLine(Lb2eta3Pi_LL_name+'Line',
+                                               prescale = config['Prescale'],
+                                               postscale = config['Postscale'],
+                                               selection = self.selLb2LLLeta3Pi,
+                                               FILTER = GECCode,
+                                               EnableFlavourTagging=_tagging
+                                               )
+        self.Lb2eta3Pi_DD_line = StrippingLine(Lb2eta3Pi_DD_name+'Line',
+                                               prescale = config['Prescale'],
+                                               postscale = config['Postscale'],
+                                               selection = self.selLb2LDDeta3Pi,
+                                               FILTER = GECCode,
+                                               EnableFlavourTagging=_tagging
+                                               )
+
+        self.B2etap_Kst_line = StrippingLine(B2etap_Kst_name+'Line',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selB2etapKst,
+                                             HLT1 = Hlt1Filter,
+                                             HLT2 = Hlt2Filter,
+                                             FILTER = GECCode,
+                                             #ODIN = TCKFilters,
+                                             EnableFlavourTagging=_tagging
+                                             )
+        self.B2etaGG_Kst_line = StrippingLine(B2etaGG_Kst_name+'Line',
+                                             prescale = config['etaGG_Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selB2etaGGKst,
+                                             FILTER = GECCode,
+                                             EnableFlavourTagging=_tagging
+                                             )
+        self.B2eta3Pi_Kst_line = StrippingLine(B2eta3Pi_Kst_name+'Line',
+                                               prescale = config['Prescale'],
+                                               postscale = config['Postscale'],
+                                               selection = self.selB2eta3PiKst,
+                                               HLT1 = Hlt1Filter,
+                                               FILTER = GECCode,
+                                               EnableFlavourTagging=_tagging
+                                               )
+        self.Lb2etap_pK_line = StrippingLine(Lb2etap_pK_name+'Line',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selLb2pKetap,
+                                             HLT1= Hlt1Filter,
+                                             HLT2 = Hlt2Filter,
+                                             FILTER = GECCode,
+                                             EnableFlavourTagging=_tagging
+                                             )
+        self.Lb2etaGG_pK_line = StrippingLine(Lb2etaGG_pK_name+'Line',
+                                              prescale = config['etaGG_Prescale'],
+                                              postscale = config['Postscale'],
+                                              selection = self.selLb2pKetaGG,
+                                              FILTER = GECCode,
+                                              EnableFlavourTagging=_tagging
+                                              )
+        self.Lb2eta3Pi_pK_line = StrippingLine(Lb2eta3Pi_pK_name+'Line',
+                                               prescale = config['Prescale'],
+                                               postscale = config['Postscale'],
+                                               selection = self.selLb2pKeta3Pi,
+                                               HLT1 = Hlt1Filter,
+                                               FILTER = GECCode,
+                                               EnableFlavourTagging=_tagging
+                                               )
+        
+        self.registerLine(self.B2etap_LL_line)
+        self.registerLine(self.B2etap_DD_line)
+        self.registerLine(self.B2etaGG_LL_line)
+        self.registerLine(self.B2etaGG_DD_line)
+        self.registerLine(self.B2eta3Pi_LL_line)
+        self.registerLine(self.B2eta3Pi_DD_line)        
+        self.registerLine(self.Lb2etap_LL_line)
+        self.registerLine(self.Lb2etap_DD_line)
+        self.registerLine(self.Lb2etaGG_LL_line)
+        self.registerLine(self.Lb2etaGG_DD_line)
+        self.registerLine(self.Lb2eta3Pi_LL_line)
+        self.registerLine(self.Lb2eta3Pi_DD_line)
+
+        self.registerLine(self.B2etap_Kst_line)
+        self.registerLine(self.B2etaGG_Kst_line)
+        self.registerLine(self.B2eta3Pi_Kst_line)
+        self.registerLine(self.Lb2etap_pK_line)
+        self.registerLine(self.Lb2etaGG_pK_line)
+        self.registerLine(self.Lb2eta3Pi_pK_line)
+
+    def makeKS2LL( self, name, config):
+
+        _massCut = "(ADMASS('KS0')<%s*MeV)"            % config['KS_LL_MassWindow']
+        _vtxCut  = "(VFASPF(VCHI2/VDOF)<%s)"           % config['KS_LL_VtxChi2']
+        _fdCut   = "(BPVVDCHI2>%s)"                    % config['KS_LL_FDChi2']
+        _momCut = "(PT>%s*MeV)"                        % config['KS_LL_PTmin']
+        
+        _trackChi2_1 = "(CHILDCUT((TRCHI2DOF<%s),1))"  % config['Trk_Chi2']
+        _trackChi2_2 = "(CHILDCUT((TRCHI2DOF<%s),2))"  % config['Trk_Chi2']
+        _track_PT_1 = "(CHILDCUT((PT>%s*MeV),1))"      % config['Trk_PT']
+        _track_PT_2 = "(CHILDCUT((PT>%s*MeV),2))"      % config['Trk_PT']
+        _track_GP_1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"    % config['Trk_GP']
+        _track_GP_2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"    % config['Trk_GP']
+        _track_PID_1 = "(CHILDCUT((PROBNNpi>%s),1))"      % config['ProbNNCut']
+        _track_PID_2 = "(CHILDCUT((PROBNNpi>%s),2))"      % config['ProbNNCut']
+        
+        _allCuts =_momCut+'&'+_massCut+'&'+_vtxCut+'&'+_fdCut+'&'+_trackChi2_1+'&'+_trackChi2_2+'&'+_track_PT_1+'&'+_track_PT_2+'&'+_track_GP_1+'&'+_track_GP_2+'&'+_track_PID_1+'&'+_track_PID_2
+
+        _KSLLFilter=FilterDesktop(Code=_allCuts)
+        self.selKS2LL=Selection( name, Algorithm=_KSLLFilter, RequiredSelections=[_KsLL])
+
+    def makeKS2DD( self, name, config):
+        
+        _massCut = "(ADMASS('KS0')<%s*MeV)"            % config['KS_DD_MassWindow']
+        _vtxCut  = "(VFASPF(VCHI2/VDOF)<%s)"           % config['KS_DD_VtxChi2']
+        _fdCut   = "(BPVVDCHI2>%s)"                    % config['KS_DD_FDChi2']
+        _momCut  = "(PT>%s*MeV)"                       % config['KS_DD_PTmin']
+        
+        _trackChi2_1 = "(CHILDCUT((TRCHI2DOF<%s),1))"  % config['Trk_Chi2']
+        _trackChi2_2 = "(CHILDCUT((TRCHI2DOF<%s),2))"  % config['Trk_Chi2']
+        _track_PT_1 = "(CHILDCUT((PT>%s*MeV),1))"      % config['Trk_PT']
+        _track_PT_2 = "(CHILDCUT((PT>%s*MeV),2))"      % config['Trk_PT']
+        _track_GP_1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"    % config['Trk_GP']
+        _track_GP_2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"    % config['Trk_GP']
+        _track_PID_1 = "(CHILDCUT((PROBNNpi>%s),1))"      % config['ProbNNCut']
+        _track_PID_2 = "(CHILDCUT((PROBNNpi>%s),2))"      % config['ProbNNCut']
+        
+        _allCuts = _momCut+'&'+_massCut+'&'+_vtxCut+'&'+_fdCut+'&'+_trackChi2_1+'&'+_trackChi2_2+'&'+_track_PT_1+'&'+_track_PT_2+'&'+_track_GP_1+'&'+_track_GP_2+'&'+_track_PID_1+'&'+_track_PID_2
+
+        _KSDDFilter=FilterDesktop(Code=_allCuts)
+        self.selKS2DD=Selection( name, Algorithm=_KSDDFilter, RequiredSelections=[_KsDD])
+
+    def makeL2LL( self, name, config):
+    
+        _massCut = "(ADMASS('Lambda0')<%s*MeV)"        % config['L_LL_MassWindow']
+        _vtxCut  = "(VFASPF(VCHI2/VDOF)<%s)"           % config['L_LL_VtxChi2']
+        _momCut = "(PT>%s*MeV)"                        % config['L_LL_PTmin']
+
+        _trackChi2_1 = "(CHILDCUT((TRCHI2DOF<%s),1))"  % config['Trk_Chi2']
+        _trackChi2_2 = "(CHILDCUT((TRCHI2DOF<%s),2))"  % config['Trk_Chi2']
+        _track_PT_1 = "(CHILDCUT((PT>%s*MeV),1))"      % config['Trk_PT']
+        _track_PT_2 = "(CHILDCUT((PT>%s*MeV),2))"      % config['Trk_PT']
+        _track_GP_1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"    % config['Trk_GP']
+        _track_GP_2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"    % config['Trk_GP']
+        #_track_PID_1 = "(CHILDCUT((PROBNNp>%s),1))"      % config['ProbNNCut']
+        #_track_PID_2 = "(CHILDCUT((PROBNNpi>%s),2))"      % config['ProbNNCut']
+        
+        _allCuts =_momCut+'&'+_massCut+'&'+_vtxCut+'&'+_trackChi2_1+'&'+_trackChi2_2+'&'+_track_PT_1+'&'+_track_PT_2+'&'+_track_GP_1+'&'+_track_GP_2
+        
+        _LLLFilter=FilterDesktop(Code=_allCuts)
+        self.selL2LL=Selection( name, Algorithm=_LLLFilter, RequiredSelections=[_lambdaLL])
+        
+    def makeL2DD( self, name, config):
+        
+        _massCut = "(ADMASS('Lambda0')<%s*MeV)"        % config['L_DD_MassWindow']
+        _vtxCut  = "(VFASPF(VCHI2/VDOF)<%s)"           % config['L_DD_VtxChi2']
+        _momCut  = "(PT>%s*MeV)"                       % config['L_DD_PTmin']
+        
+        _trackChi2_1 = "(CHILDCUT((TRCHI2DOF<%s),1))"  % config['Trk_Chi2']
+        _trackChi2_2 = "(CHILDCUT((TRCHI2DOF<%s),2))"  % config['Trk_Chi2']        
+        _track_PT_1 = "(CHILDCUT((PT>%s*MeV),1))"      % config['Trk_PT']
+        _track_PT_2 = "(CHILDCUT((PT>%s*MeV),2))"      % config['Trk_PT']
+        _track_GP_1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"    % config['Trk_GP']
+        _track_GP_2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"    % config['Trk_GP']
+        #_track_PID_1 = "(CHILDCUT((PROBNNp>%s),1))"      % config['ProbNNCut']
+        #_track_PID_2 = "(CHILDCUT((PROBNNpi>%s),2))"      % config['ProbNNCut']
+        
+        _allCuts = _momCut+'&'+_massCut+'&'+_vtxCut+'&'+_trackChi2_1+'&'+_trackChi2_2+'&'+_track_PT_1+'&'+_track_PT_2+'&'+_track_GP_1+'&'+_track_GP_2
+        
+        _LDDFilter=FilterDesktop(Code=_allCuts)
+        self.selL2DD=Selection( name, Algorithm=_LDDFilter, RequiredSelections=[_lambdaDD])
+
+    def makeFilterKaons( self, name, config):
+
+        _momCut = "(PT>%s*MeV)"           % config['pK_PT']
+        _GPCut = "(TRGHOSTPROB<%s)"       % config['Trk_GP']
+        _PIDCut = "(PROBNNk>%s)"          % config['ProbNNCut']
+        _IPChi2_Cut = "(BPVIPCHI2()>%s)"  % config['pK_IPCHI2']
+
+        _allCuts = _momCut+'&'+_GPCut+'&'+_PIDCut+'&'+_IPChi2_Cut
+
+        _kaonFilter=FilterDesktop(Code=_allCuts)
+        self.selKaons = Selection( name, Algorithm=_kaonFilter, RequiredSelections=[self.kaons] )
+
+    def makeFilterProtons( self, name, config):
+
+        _momCut = "(PT>%s*MeV)"           % config['pK_PT']
+        _GPCut = "(TRGHOSTPROB<%s)"       % config['Trk_GP']
+        _PIDCut = "(PROBNNp>%s)"          % config['ProbNNCut']
+        _IPChi2_Cut = "(BPVIPCHI2()>%s)"  % config['pK_IPCHI2']
+        
+        _allCuts = _momCut+'&'+_GPCut+'&'+_PIDCut+'&'+_IPChi2_Cut
+
+        _protonFilter=FilterDesktop(Code=_allCuts)
+        self.selProtons = Selection( name, Algorithm=_protonFilter, RequiredSelections=[self.protons] )
+
+    def makeFilterKstar( self, name, config):
+        _massCut = "(ADMASS('K*(892)0')<%s*MeV)"                      % config['Kstar_massWdw']
+        _momCut = "(PT>%s*MeV)"                                       % config['Kstar_PTmin']
+        _vtxCut  = "(VFASPF(VCHI2/VDOF)<%s)"                          % config['Kstar_vtxChi2']
+        _IPChi2Cut = "(BPVIPCHI2()>%s)"                               % config['Kstar_ipChi2']
+              
+        _trackChi2_1 = "(CHILDCUT((TRCHI2DOF<%s),1))"                 % config['Trk_Chi2']
+        _trackChi2_2 = "(CHILDCUT((TRCHI2DOF<%s),2))"                 % config['Trk_Chi2']        
+        _track_PT_1 = "(CHILDCUT((PT>%s*MeV),1))"                     % config['kstar_daug_PT']
+        _track_PT_2 = "(CHILDCUT((PT>%s*MeV),2))"                     % config['kstar_daug_PT']
+        _track_GP_1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"                % config['Trk_GP']
+        _track_GP_2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"                % config['Trk_GP']
+        _track_PID_1 = "(INTREE((ABSID=='pi-') & (PROBNNpi>%s)))"     % config['ProbNNCut']
+        _track_PID_2 = "(INTREE((ABSID=='K+') & (PROBNNk>%s)))"       % config['ProbNNCut']
+        
+        _allCuts = _massCut+'&'+_vtxCut+'&'+_momCut+'&'+_IPChi2Cut+'&'+_trackChi2_1+'&'+_trackChi2_2+'&'+_track_PT_1+'&'+_track_PT_2+'&'+_track_GP_1+'&'+_track_GP_2+'&'+_track_PID_1+'&'+_track_PID_2
+
+        _kstarFilter=FilterDesktop(Code=_allCuts)
+        self.selKstar = Selection( name, Algorithm=_kstarFilter, RequiredSelections=[_kstar] )
+
+    def makeEtaGG( self, name, config):
+        
+        _etaPTCut = "(PT>%s*MeV)"                      % config['eta_PT']
+        _gammaPT1 = "(CHILDCUT((PT>%s*MeV),1))"        % config['gamma_PT']
+        _gammaPT2 = "(CHILDCUT((PT>%s*MeV),2))"        % config['gamma_PT']
+        
+        _allCuts = _etaPTCut+'&'+_gammaPT1+'&'+_gammaPT2
+        
+        _etaFilter = FilterDesktop(Code=_allCuts)
+        self.selEtaGG=Selection(name, Algorithm=_etaFilter, RequiredSelections=[self.eta])
+
+    def makeEtaforEtap(self, name, config):
+        _etaforetapMassCut= "(ADMASS('eta')<%s*MeV)"  %config['etaforetap_MassWindow']
+        
+        _etaforetapFilter=FilterDesktop(Code=_etaforetapMassCut)
+
+        self.selEtaforEtap=Selection(name, Algorithm=_etaforetapFilter,RequiredSelections=[self.wideeta])
+        
+    def makeEta3Pi(self,name,config):
+
+        _PTCut = "(PT>%s*MeV)"                         % config['eta_PT']
+        _massCut = "(ADAMASS('eta')<%s*MeV)"           % config['eta_MassWindow']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['eta_vtxChi2']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['eta_DOCA']
+
+        _track_PT="(PT>%s*MeV)"                        % config['Trk_PT']
+        _track_Chi2="(TRCHI2DOF<%s)"                   % config['Trk_Chi2']
+        _track_GPCut ="(TRGHOSTPROB<%s)"               % config['Trk_GP']
+        _track_PIDCut = "(PROBNNpi>%s)"                % config['ProbNNCut']
+        
+        _allCuts = _PTCut+'&'+_vtxCut
+        _trackCuts = _track_PT+'&'+_track_Chi2+'&'+_track_GPCut+'&'+_track_PIDCut
+        _combCuts=_massCut+'&'+_docaCut
+        _combCut12Doca="ACHI2DOCA(1,2)<%s"                     % config['eta_DOCA']
+        _combCut12Vtx="(VFASPF(VCHI2/VDOF)<%s)"            % config['eta_vtxChi2']
+        _combCut12=_combCut12Doca
+        
+        #_eta3Pi=CombineParticles("eta3Pi",
+        _eta3Pi=DaVinci__N3BodyDecays(DecayDescriptor = "eta -> pi+ pi- pi0",
+                                      Combination12Cut = _combCut12,
+                                      CombinationCut=_combCuts,
+                                      MotherCut=_allCuts,
+                                      DaughtersCuts = { "pi+" : _trackCuts, "pi-" : _trackCuts})
+        
+        self.selEta3Pi = Selection(name, Algorithm=_eta3Pi, RequiredSelections=[self.daughters])
+        
+    def makeEtap( self, name, config):
+      
+        _massCut = "(ADAMASS('eta_prime')<%s*MeV)"     % config['eta_prime_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['eta_prime_PT']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['eta_prime_vtxChi2']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['eta_prime_DOCA']
+        _track_PT="(PT>%s*MeV)"                        % config['Trk_PT']
+        _track_Chi2="(TRCHI2DOF<%s)"                   % config['Trk_Chi2']
+        _track_GPCut ="(TRGHOSTPROB<%s)"               % config['Trk_GP']
+        _track_PIDCut = "(PROBNNpi>%s)"                % config['ProbNNCut']
+
+        _allCuts = _PTCut+'&'+_vtxCut
+        _trackCuts = _track_PT+'&'+_track_Chi2+'&'+_track_GPCut+'&'+_track_PIDCut
+        _combCuts=_massCut+'&'+_docaCut
+        _combCut12Doca="ACHI2DOCA(1,2)<%s"                     % config['eta_prime_DOCA']
+        _combCut12Vtx="(VFASPF(VCHI2/VDOF)<%s)"            % config['eta_prime_vtxChi2']
+        _combCut12=_combCut12Doca
+        
+        #_etap=CombineParticles("etap",
+        _etap=DaVinci__N3BodyDecays(DecayDescriptors = ["eta_prime -> pi+ pi- gamma", "eta_prime -> pi+ pi- eta"],
+                                    Combination12Cut = _combCut12,
+                                    CombinationCut=_combCuts,
+                                    MotherCut=_allCuts,
+                                    DaughtersCuts = { "pi+" : _trackCuts, "pi-" : _trackCuts})
+        
+        self.selEtap = Selection(name, Algorithm=_etap, RequiredSelections=[self.daughters,self.selEtaforEtap])
+        #printable=PrintSelection(self.selEtap)
+        
+    def makeB2KSLLetap( self, name, config):
+
+        _massCut = "(ADAMASS('B0')<%s*MeV)"            % config['B_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['B_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['BDaug_LL_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['B_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['B_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['B_IPCHI2']
+        
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_vtxCut+'&'+_diraCut+'&'+_IPChi2Cut
+        
+        _b2etapksLL = CombineParticles(DecayDescriptor = "B0 -> KS0 eta_prime",
+                                       CombinationCut = _combCuts,
+                                       MotherCut = _allCuts,
+                                       ReFitPVs = self.refitPVs )
+        self.selB2KSLLetap = Selection( name, Algorithm=_b2etapksLL, RequiredSelections=[self.selKS2LL, self.selEtap])
+
+    def makeB2KSDDetap( self, name, config):
+
+        _massCut = "(ADAMASS('B0')<%s*MeV)"            % config['B_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['B_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['BDaug_DD_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['B_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['B_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['B_IPCHI2']
+        
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_vtxCut+'&'+_diraCut+'&'+_IPChi2Cut
+        
+        _b2etapksDD = CombineParticles(DecayDescriptor = "B0 -> KS0 eta_prime",
+                                       CombinationCut = _combCuts,
+                                       MotherCut = _allCuts,
+                                       ReFitPVs = self.refitPVs )
+        self.selB2KSDDetap = Selection( name, Algorithm=_b2etapksDD, RequiredSelections=[self.selKS2DD, self.selEtap])
+
+
+    def makeB2KSLLetaGG( self, name, config):
+
+        _massCut = "(ADAMASS('B0')<%s*MeV)"            % config['B_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['B_PTmin']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['B_eta_IPCHI2']
+                
+        _combCuts = _massCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut
+        
+        _b2etaGGksLL = CombineParticles(DecayDescriptor = "B0 -> KS0 eta",
+                                        CombinationCut = _combCuts,
+                                        MotherCut = _allCuts,
+                                        ReFitPVs = self.refitPVs )
+        self.selB2KSLLetaGG = Selection( name, Algorithm=_b2etaGGksLL, RequiredSelections=[self.selKS2LL, self.selEtaGG])
+        
+    def makeB2KSDDetaGG( self, name, config):
+        
+        _massCut = "(ADAMASS('B0')<%s*MeV)"            % config['B_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['B_PTmin']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['B_eta_IPCHI2']
+                
+        _combCuts = _massCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut
+        
+        _b2etaGGksDD = CombineParticles(DecayDescriptor = "B0 -> KS0 eta",
+                                        CombinationCut = _combCuts,
+                                        MotherCut = _allCuts,
+                                        ReFitPVs = self.refitPVs )
+        self.selB2KSDDetaGG = Selection( name, Algorithm=_b2etaGGksDD, RequiredSelections=[self.selKS2DD, self.selEtaGG])
+        
+    def makeB2KSLLeta3Pi( self, name, config):
+
+        _massCut = "(ADAMASS('B0')<%s*MeV)"            % config['B_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['B_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['BDaug_LL_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['B_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['B_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['B_IPCHI2']
+                
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut+'&'+_vtxCut+'&'+_diraCut
+        
+        _b2etaksLL = CombineParticles(DecayDescriptor = "B0 -> KS0 eta",
+                                      CombinationCut = _combCuts,
+                                      MotherCut = _allCuts,
+                                      ReFitPVs = self.refitPVs )
+        self.selB2KSLLeta3Pi = Selection( name, Algorithm=_b2etaksLL, RequiredSelections=[self.selKS2LL, self.selEta3Pi])
+        
+    def makeB2KSDDeta3Pi( self, name, config):
+
+        _massCut = "(ADAMASS('B0')<%s*MeV)"            % config['B_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['B_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['BDaug_DD_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['B_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['B_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['B_IPCHI2']
+                
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut+'&'+_vtxCut+'&'+_diraCut
+        
+        _b2eta3PiksDD = CombineParticles(DecayDescriptor = "B0 -> KS0 eta",
+                                         CombinationCut = _combCuts,
+                                         MotherCut = _allCuts,
+                                         ReFitPVs = self.refitPVs )
+        self.selB2KSDDeta3Pi = Selection( name, Algorithm=_b2eta3PiksDD, RequiredSelections=[self.selKS2DD, self.selEta3Pi])       
+        
+    
+    def makeLb2LLLetap( self, name, config):
+
+        _massCut = "(ADAMASS('Lambda_b0')<%s*MeV)"     % config['Lb_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['Lb_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['LbDaug_LL_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['Lb_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['Lb_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['Lb_IPCHI2']
+        
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_vtxCut+'&'+_diraCut+'&'+_IPChi2Cut
+                
+        _Lb2etapLLL = CombineParticles(DecayDescriptor = "[Lambda_b0 -> Lambda0 eta_prime]cc",
+                                       CombinationCut = _combCuts,
+                                       MotherCut = _allCuts,
+                                       ReFitPVs = self.refitPVs )
+        self.selLb2LLLetap = Selection( name, Algorithm=_Lb2etapLLL, RequiredSelections=[self.selL2LL, self.selEtap])
+        
+    def makeLb2LDDetap( self, name, config):
+
+        _massCut = "(ADAMASS('Lambda_b0')<%s*MeV)"     % config['Lb_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['Lb_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['LbDaug_DD_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['Lb_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['Lb_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['Lb_IPCHI2']
+        
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_vtxCut+'&'+_diraCut+'&'+_IPChi2Cut
+        
+        _Lb2etapLDD = CombineParticles(DecayDescriptor = "[Lambda_b0 -> Lambda0 eta_prime]cc",
+                                       CombinationCut = _combCuts,
+                                       MotherCut = _allCuts )
+        self.selLb2LDDetap = Selection( name, Algorithm=_Lb2etapLDD, RequiredSelections=[self.selL2DD, self.selEtap])
+
+    def makeLb2LLLetaGG( self, name, config):
+
+        _massCut = "(ADAMASS('Lambda_b0')<%s*MeV)"     % config['Lb_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['Lb_PTmin']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['Lb_eta_IPCHI2']
+        
+        _combCuts = _massCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut
+        
+        _Lb2etaGGLLL = CombineParticles(DecayDescriptor = "[Lambda_b0 -> Lambda0 eta]cc",
+                                        CombinationCut = _combCuts,
+                                        MotherCut = _allCuts,
+                                        ReFitPVs = self.refitPVs )
+        self.selLb2LLLetaGG = Selection( name, Algorithm=_Lb2etaGGLLL, RequiredSelections=[self.selL2LL, self.selEtaGG])
+        
+    def makeLb2LDDetaGG( self, name, config):
+
+        _massCut = "(ADAMASS('Lambda_b0')<%s*MeV)"     % config['Lb_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['Lb_PTmin']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['Lb_eta_IPCHI2']
+        
+        _combCuts = _massCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut
+        
+        _Lb2etaGGLDD = CombineParticles(DecayDescriptor = "[Lambda_b0 -> Lambda0 eta]cc",
+                                        CombinationCut = _combCuts,
+                                        MotherCut = _allCuts,
+                                        ReFitPVs = self.refitPVs )
+        self.selLb2LDDetaGG = Selection( name, Algorithm=_Lb2etaGGLDD, RequiredSelections=[self.selL2DD, self.selEtaGG])
+        
+    def makeLb2LLLeta3Pi( self, name, config):
+
+        _massCut = "(ADAMASS('Lambda_b0')<%s*MeV)"     % config['Lb_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['Lb_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['LbDaug_LL_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['Lb_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['Lb_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['Lb_IPCHI2']
+        
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut+'&'+_vtxCut+'&'+_diraCut
+        
+        _Lb2eta3PiLLL = CombineParticles(DecayDescriptor = "[Lambda_b0 -> Lambda0 eta]cc",
+                                         CombinationCut = _combCuts,
+                                         MotherCut = _allCuts,
+                                         ReFitPVs = self.refitPVs )
+        self.selLb2LLLeta3Pi = Selection( name, Algorithm=_Lb2eta3PiLLL, RequiredSelections=[self.selL2LL, self.selEta3Pi])
+        
+    def makeLb2LDDeta3Pi( self, name, config):
+
+        _massCut = "(ADAMASS('Lambda_b0')<%s*MeV)"     % config['Lb_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['Lb_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['LbDaug_DD_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['Lb_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['Lb_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['Lb_IPCHI2']
+        
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut+'&'+_vtxCut+'&'+_diraCut
+        
+        _Lb2eta3PiLDD = CombineParticles(DecayDescriptor = "[Lambda_b0 -> Lambda0 eta]cc",
+                                         CombinationCut = _combCuts,
+                                         MotherCut = _allCuts,
+                                         ReFitPVs = self.refitPVs )
+        self.selLb2LDDeta3Pi = Selection( name, Algorithm=_Lb2eta3PiLDD, RequiredSelections=[self.selL2DD, self.selEta3Pi])
+
+
+    def makeB2Kstetap(self, name, config):
+        _massCut = "(ADAMASS('B0')<%s*MeV)"            % config['B_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['B_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['BDaug_LL_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['B_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['B_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['B_IPCHI2']
+        
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_vtxCut+'&'+_diraCut+'&'+_IPChi2Cut
+                
+        _b2etapKst = CombineParticles(DecayDescriptor = "[B0 ->  K*(892)0 eta_prime]cc",
+                                      CombinationCut = _combCuts,
+                                      MotherCut = _allCuts,
+                                      ReFitPVs = self.refitPVs )
+        self.selB2etapKst = Selection( name, Algorithm=_b2etapKst, RequiredSelections=[self.selKstar, self.selEtap])
+        
+    def makeB2KstetaGG(self, name, config):
+        _massCut = "(ADAMASS('B0')<%s*MeV)"            % config['B_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['B_PTmin']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['B_eta_IPCHI2']
+        
+        _combCuts = _massCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut
+        
+        _b2etaGGKst = CombineParticles(DecayDescriptor = "[B0 -> K*(892)0 eta]cc",
+                                       CombinationCut = _combCuts,
+                                       MotherCut = _allCuts,
+                                       ReFitPVs = self.refitPVs )
+        self.selB2etaGGKst = Selection( name, Algorithm=_b2etaGGKst, RequiredSelections=[self.selKstar, self.selEtaGG])
+        
+    def makeB2Ksteta3Pi(self, name, config):
+        _massCut = "(ADAMASS('B0')<%s*MeV)"            % config['B_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['B_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['BDaug_LL_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['B_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['B_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['B_IPCHI2']
+        
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut+'&'+_vtxCut+'&'+_diraCut
+                
+        _b2eta3PiKst = CombineParticles(DecayDescriptor = "[B0 -> K*(892)0 eta]cc",
+                                        CombinationCut = _combCuts,
+                                        MotherCut = _allCuts,
+                                        ReFitPVs = self.refitPVs )
+        self.selB2eta3PiKst = Selection( name, Algorithm=_b2eta3PiKst, RequiredSelections=[self.selKstar, self.selEta3Pi])
+        
+    def makeLb2pKetap(self, name, config):
+        _massCut = "(ADAMASS('Lambda_b0')<%s*MeV)"     % config['Lb_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['Lb_PTmin']
+        _docaCut = "(ACUTDOCACHI2(%s,''))"                 % config['LbDaug_LL_maxDocaChi2']
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['Lb_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['Lb_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['Lb_IPCHI2']
+        
+        _combCuts = _massCut+'&'+_docaCut
+        _allCuts = _PTCut+'&'+_vtxCut+'&'+_diraCut+'&'+_IPChi2Cut
+        _combCut12Doca="ACHI2DOCA(1,2)<%s"                     % config['LbDaug_LL_maxDocaChi2']
+        _combCut12Vtx="(VFASPF(VCHI2/VDOF)<%s)"            % config['Lb_VtxChi2']
+        _combCut12=_combCut12Doca
+        
+        _Lb2pKetap = DaVinci__N3BodyDecays(DecayDescriptor = "[Lambda_b0 -> p+ K- eta_prime]cc",
+                                           Combination12Cut = _combCut12,
+                                           CombinationCut = _combCuts,
+                                           MotherCut = _allCuts,
+                                           ReFitPVs = self.refitPVs )
+        self.selLb2pKetap = Selection( name, Algorithm=_Lb2pKetap, RequiredSelections=[self.selProtons, self.selKaons, self.selEtap])
+        
+    def makeLb2pKetaGG(self, name, config):
+        _massCut = "(ADAMASS('Lambda_b0')<%s*MeV)"     % config['Lb_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['Lb_PTmin']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['Lb_eta_IPCHI2']
+        
+        _combCuts = _massCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut
+        _combCut12="ACHI2DOCA(1,2)<%s"                     % config['LbDaug_LL_maxDocaChi2']
+               
+        _Lb2pKetaGG = DaVinci__N3BodyDecays(DecayDescriptor = "[Lambda_b0 -> p+ K- eta]cc",
+                                            Combination12Cut = _combCut12,
+                                            CombinationCut = _combCuts,
+                                            MotherCut = _allCuts,
+                                            ReFitPVs = self.refitPVs )
+        self.selLb2pKetaGG = Selection( name, Algorithm=_Lb2pKetaGG, RequiredSelections=[self.selProtons, self.selKaons, self.selEtaGG])
+        
+    def makeLb2pKeta3Pi(self, name, config):
+        _massCut = "(ADAMASS('Lambda_b0')<%s*MeV)"     % config['Lb_MassWindow']
+        _PTCut = "(PT>%s*MeV)"                         % config['Lb_PTmin']
+
+        _vtxCut = "(VFASPF(VCHI2/VDOF)<%s)"            % config['Lb_VtxChi2']
+        _diraCut = "(BPVDIRA>%s)"                      % config['Lb_Dira']
+        _IPChi2Cut = "(BPVIPCHI2()<%s)"                % config['Lb_IPCHI2']
+        _combCuts = _massCut
+        _allCuts = _PTCut+'&'+_IPChi2Cut+'&'+_vtxCut+'&'+_diraCut
+        _combCut12Doca="ACHI2DOCA(1,2)<%s"                     % config['LbDaug_LL_maxDocaChi2']
+        _combCut12Vtx="(VFASPF(VCHI2/VDOF)<%s)"            % config['Lb_VtxChi2']
+        _combCut12=_combCut12Doca
+        
+        _Lb2pKeta3Pi = DaVinci__N3BodyDecays(DecayDescriptor = "[Lambda_b0 -> p+ K- eta]cc",
+                                             Combination12Cut = _combCut12,
+                                             CombinationCut = _combCuts,
+                                             MotherCut = _allCuts,
+                                             ReFitPVs = self.refitPVs )
+        self.selLb2pKeta3Pi = Selection( name, Algorithm=_Lb2pKeta3Pi, RequiredSelections=[self.selProtons, self.selKaons, self.selEta3Pi])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2a1Pi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2a1Pi.py
new file mode 100644
index 000000000..2aa1978f4
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2a1Pi.py
@@ -0,0 +1,212 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting B0->a1 pi
+'''
+
+__author__=['Daniel Vieira, Jibo He']
+__date__ = '01/12/2016'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'B02a1PiBDTConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'                 :  'B02a1PiBDT',
+    'BUILDERTYPE'          :  'B02a1PiBDTConf',
+    'CONFIG'    : {
+        'a1PionCuts'       : "(PROBNNpi > 0.1) & (PT > 200*MeV) & (TRGHOSTPROB<0.4) &  (MIPCHI2DV(PRIMARY) > 2.)",
+        'BachelorPionCuts' : "(PROBNNpi > 0.1) & (PT > 1000*MeV) & (TRGHOSTPROB<0.4) &  (MIPCHI2DV(PRIMARY) > 2.)",
+        'a1ComCuts'        : "(ADAMASS('a_1(1260)+') < 800 *MeV)",
+        'a1Cuts'           : """
+                             (MIPCHI2DV(PRIMARY) > 2.)
+                             & (VFASPF(VCHI2) < 50.)
+                             & (PT > 1.*GeV)
+                             """ ,
+        'B0ComCuts'        : "(ADAMASS('B0') < 500 *MeV)",
+        'B0MomCuts'        : """
+		             (VFASPF(VCHI2) < 50.) 
+			     & (BPVDIRA> 0.99) 
+			     & (BPVIPCHI2()<30) 
+			     & (VFASPF(VMINVDCHI2DV(PRIMARY)) > 10)
+			     & (PT > 2.*GeV )
+	                     """,
+        'B02a1PiMVACut'    :  "-0.0",
+        'B02a1PiXmlFile'   :  "$TMVAWEIGHTSROOT/data/B02a1Pi_BDT_v1r1.xml", 
+        'Prescale'         : 1.
+        },
+    'STREAMS'              : ['Bhadron'],
+    'WGs'                  : ['BnoC']
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import DaVinci__N4BodyDecays
+
+class B02a1PiBDTConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        """
+        a1
+        """
+
+        self.Sela1Pions = self.createSubSel( OutputList = self.name + "Sela1Pions",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllNoPIDsPions/Particles' ), 
+                                           Cuts = config['a1PionCuts']
+                                           )
+        
+        self.Sela12PiPiPi = self.createCombinationSel( OutputList = self.name + "Sela12PiPiPi",
+                                                    DaughterLists = [ self.Sela1Pions ],
+                                                    DecayDescriptor = "[a_1(1260)+ -> pi- pi+ pi+]cc",
+						    PreVertexCuts  = config['a1ComCuts'],
+                                                    PostVertexCuts = config['a1Cuts']
+                                                    )
+
+        """
+        Bachelor Pion 
+        """
+        self.SelBachelorPion = self.createSubSel( OutputList = self.name + "SelBachelorPion",
+                                         InputList =  DataOnDemand(Location = 'Phys/StdAllNoPIDsPions/Particles' ), 
+                                         Cuts = config['BachelorPionCuts']
+                                         )
+
+        """
+        B0 -> a1(1260)+ pi-  
+        """
+        self.SelB02a1Pi = self.createCombinationSel( OutputList = self.name + "SelB02a1Pi",
+                                                        DecayDescriptor = "[B0 -> pi- a_1(1260)+]cc",
+                                                        DaughterLists = [ self.SelBachelorPion, self.Sela12PiPiPi ],                    
+                                                        PreVertexCuts  = config['B0ComCuts'],
+                                                        PostVertexCuts = config['B0MomCuts'] )
+                
+        """
+        Apply MVA
+        """
+        self.B02a1PiVars = {
+            'Pion1_IPCHI2_OWNPV'        : " CHILD(MIPCHI2DV(), 1) ",
+            'Pion2_IPCHI2_OWNPV'        : " CHILD(MIPCHI2DV(), 2, 1) ",
+            'Pion3_IPCHI2_OWNPV'        : " CHILD(MIPCHI2DV(), 2, 2) ",
+            'Pion4_IPCHI2_OWNPV'        : " CHILD(MIPCHI2DV(), 2, 3) ", 
+            'Pion1_PT'                  : " CHILD(PT, 1) ",
+            'Pion2_PT'                  : " CHILD(PT, 2, 1) ",
+            'Pion3_PT'                  : " CHILD(PT, 2, 2) ",
+            'Pion4_PT'                  : " CHILD(PT, 2, 3) ",
+
+            'sqrt(Pion1_IPCHI2_OWNPV+Pion2_IPCHI2_OWNPV+Pion3_IPCHI2_OWNPV+Pion4_IPCHI2_OWNPV)'                 : "sqrt( CHILD(MIPCHI2DV(), 1)+CHILD(MIPCHI2DV(), 2, 1)+CHILD(MIPCHI2DV(), 2, 2)+CHILD(MIPCHI2DV(), 2, 3))",
+
+            'a1_PT'                     : " CHILD(PT, 2 ) ",
+            'a1_IPCHI2_OWNPV'           : " CHILD(MIPCHI2DV(), 2 ) ",
+            'a1_ENDVERTEX_CHI2'         : " CHILD(VFASPF(VCHI2), 2)",
+            
+            'B0_PT'                     : " PT ",
+            'B0_IPCHI2_OWNPV'           : " BPVIPCHI2() ", 
+            'B0_ENDVERTEX_CHI2'         : " VFASPF(VCHI2) ",
+            'B0_FDCHI2_OWNPV'           : " VFASPF(VMINVDCHI2DV(PRIMARY)) ",
+            'B0_DIRA_OWNPV'             : " BPVDIRA "
+            }
+
+
+        self.MvaB02a1Pi = self.applyMVA( self.name + "MvaB02a1Pi",
+                                             SelB        = self.SelB02a1Pi,
+                                             MVAVars     = self.B02a1PiVars,
+                                             MVACutValue = config['B02a1PiMVACut'], 
+                                             MVAxmlFile  = config['B02a1PiXmlFile']
+                                             )
+        
+        self.B02a1PiBDTLine = StrippingLine( self.name + 'Line',                                                
+                                                prescale  = config['Prescale'],
+                                                #algos     = [ self.SelB02a1Pi ],
+                                                algos     = [ self.MvaB02a1Pi ],
+                                                EnableFlavourTagging = True
+                                                )
+        self.registerLine( self.B02a1PiBDTLine )
+        
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+
+    def createN4BodySel( self, OutputList,
+                         DecayDescriptor,
+                         DaughterLists,
+                         DaughterCuts = {} ,
+                         ComAMCuts      = "AALL",
+                         PreVertexCuts  = "AALL",
+                         PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = DaVinci__N4BodyDecays ( DecayDescriptor = DecayDescriptor,      
+                                           DaughtersCuts = DaughterCuts,
+                                           Combination12Cut  = ComAMCuts + "&" + "( ACHI2DOCA(1,2)<20 )",
+                                           Combination123Cut = ComAMCuts + "&" + "( ACHI2DOCA(1,3)<20 ) & ( ACHI2DOCA(2,3)<20 )",
+                                           CombinationCut = "( ACHI2DOCA(1,4)<20 ) & ( ACHI2DOCA(2,4)<20 ) & ( ACHI2DOCA(3,4)<20 )" + " & " + PreVertexCuts,
+                                           MotherCut = PostVertexCuts,
+                                           ReFitPVs = False )
+
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2hhpipiPhsSpcCut.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2hhpipiPhsSpcCut.py
new file mode 100644
index 000000000..b443cf564
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2hhpipiPhsSpcCut.py
@@ -0,0 +1,252 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting B0-> pi+ pi- pi+ pi- within the charmless region of the phase space
+'''
+
+__author__=['Daniel Vieira']
+__date__ = '29/11/2018'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'B2hhpipiPhsSpcCutConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'                 :  'B2hhpipiPhsSpcCut',
+    'BUILDERTYPE'          :  'B2hhpipiPhsSpcCutConf',
+    'CONFIG'    : {
+        '4PionCuts'         : "(PT > 200*MeV) & (PROBNNpi > 0.03) & (MIPCHI2DV(PRIMARY)> 1.5) & (TRGHOSTPROB < 0.4) & (TRCHI2DOF<3)",
+        '2PionCuts'         : "(PT > 200*MeV) & (PROBNNpi > 0.1) & (MIPCHI2DV(PRIMARY)> 2) & (TRGHOSTPROB < 0.4) & (TRCHI2DOF<3)",
+        'KaonCuts'          : "(PT > 200*MeV) & (PROBNNk > 0.1) & (MIPCHI2DV(PRIMARY)> 2) & (TRGHOSTPROB < 0.4) & (TRCHI2DOF<3)",
+        'B0KKpipiComCuts'   : """
+			     ((ADAMASS('B0') < 300 *MeV)
+			     | (ADAMASS('B_s0') < 300 *MeV))
+			     & (AMAXDOCA('') < 0.2 *mm)
+			     & (((AMASS(1,2) < 1864.83 *MeV)
+			     & (AMASS(3,4) < 1864.83 *MeV))
+			     | ((AMASS(1,4) < 1864.83 *MeV)
+			     & (AMASS(2,3) < 1864.83 *MeV))
+			     | (AMASS(1,2,3) < 1869.65 *MeV)
+			     | (AMASS(1,2,4) < 1869.65 *MeV)
+			     | (AMASS(1,3,4) < 1869.65 *MeV)
+			     | (AMASS(2,3,4) < 1869.65 *MeV))
+                             """,
+        'B0ComCuts'        : """
+			     (ADAMASS('B0') < 300 *MeV)
+			     & (AMAXDOCA('') < 0.2 *mm)
+			     & (((AMASS(1,2) < 1864.83 *MeV)
+			     & (AMASS(3,4) < 1864.83 *MeV))
+			     | ((AMASS(1,4) < 1864.83 *MeV)
+		             & (AMASS(2,3) < 1864.83 *MeV))
+			     | (AMASS(1,2,3) < 1869.65 *MeV)
+			     | (AMASS(1,2,4) < 1869.65 *MeV)
+			     | (AMASS(1,3,4) < 1869.65 *MeV)
+			     | (AMASS(2,3,4) < 1869.65 *MeV))
+                             """,
+        'B0MomCuts'        : """
+		             (VFASPF(VCHI2) < 30.)
+			     & (BPVDIRA> 0.999)
+			     & (BPVVDCHI2 > 10.)
+			     & (BPVIPCHI2()<30)
+			     & (PT > 2.*GeV )
+	                     """,
+        'B24piMVACut'      : "-.03",
+        'B2KKpipiMVACut'   : ".05",
+        'B2hhpipiXmlFile'  : "$TMVAWEIGHTSROOT/data/B2hhpipi_v1r0.xml",
+        'Prescale'         : 1.
+        },
+    'STREAMS'              : { 'Bhadron'              : ['StrippingB2hhpipiPhsSpcCut4piLine'],
+                               'BhadronCompleteEvent' : ['StrippingB2hhpipiPhsSpcCutKKpipiLine']
+                             },
+    'WGs'                  : ['BnoC']
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import DaVinci__N4BodyDecays
+
+class B2hhpipiPhsSpcCutConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ):
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+
+        """
+        4 Pion
+        """
+        self.SelBachelorPion = self.createSubSel( OutputList = self.name + "SelBachelorPion",
+                                         InputList =  DataOnDemand(Location = 'Phys/StdAllNoPIDsPions/Particles' ),
+                                         Cuts = config['4PionCuts']
+                                         )
+        """
+        2 Pion 
+        """
+        self.SelBachelor2Pion = self.createSubSel( OutputList = self.name + "SelBachelor2Pion",
+                                         InputList =  DataOnDemand(Location = 'Phys/StdAllNoPIDsPions/Particles' ),
+                                         Cuts = config['2PionCuts']
+                                         )
+
+        """
+        Kaon 
+        """
+        self.SelBachelorKaon = self.createSubSel( OutputList = self.name + "SelBachelorKaon",
+                                         InputList =  DataOnDemand(Location = 'Phys/StdAllNoPIDsKaons/Particles' ),
+                                         Cuts = config['KaonCuts']
+                                         )
+
+        """
+        B0 -> pi+ pi- pi+ pi-
+        """
+        self.SelB24piPhsSpcCut = self.createCombinationSel( OutputList = self.name + "SelB24piPhsSpcCut",
+                                                        DecayDescriptor = "[B0 -> pi+ pi- pi+ pi-]cc",
+                                                        DaughterLists = [ self.SelBachelorPion ],
+                                                        PreVertexCuts  = config['B0ComCuts'],
+                                                        PostVertexCuts = config['B0MomCuts'] )
+                
+        """
+        B0 -> K+ K- pi+ pi-
+        """
+        self.SelB2KKpipiPhsSpcCut = self.createCombinationSel( OutputList = self.name + "SelB2KKpipiPhsSpcCut",
+                                                        DecayDescriptor = "[B0 -> K+ K- pi+ pi-]cc",
+                                                        DaughterLists = [ self.SelBachelorKaon, self.SelBachelor2Pion ],
+                                                        PreVertexCuts  = config['B0KKpipiComCuts'],
+                                                        PostVertexCuts = config['B0MomCuts'] )
+
+        """
+        Apply MVA
+        """
+        self.B2hhpipiVars = {
+            'Pion1_IPCHI2_OWNPV'        : " CHILD(MIPCHI2DV(), 1) ",
+            'Pion2_IPCHI2_OWNPV'        : " CHILD(MIPCHI2DV(), 2) ",
+            'Pion3_IPCHI2_OWNPV'        : " CHILD(MIPCHI2DV(), 3) ",
+            'Pion4_IPCHI2_OWNPV'        : " CHILD(MIPCHI2DV(), 4) ",
+            'Pion1_PT'                  : " CHILD(PT, 1) ",
+            'Pion2_PT'                  : " CHILD(PT, 2) ",
+            'Pion3_PT'                  : " CHILD(PT, 3) ",
+            'Pion4_PT'                  : " CHILD(PT, 4) ",
+
+            'sqrt(Pion1_IPCHI2_OWNPV+Pion2_IPCHI2_OWNPV+Pion3_IPCHI2_OWNPV+Pion4_IPCHI2_OWNPV)'                 : "sqrt( CHILD(MIPCHI2DV(), 1)+CHILD(MIPCHI2DV(), 2)+CHILD(MIPCHI2DV(), 3)+CHILD(MIPCHI2DV(), 4))",
+            
+            'B0_PT'                     : " PT ",
+            'B0_IPCHI2_OWNPV'           : " BPVIPCHI2() ",
+            'B0_ENDVERTEX_CHI2'         : " VFASPF(VCHI2) ",
+            'B0_FDCHI2_OWNPV'           : " VFASPF(VMINVDCHI2DV(PRIMARY)) ",
+            'B0_DIRA_OWNPV'             : " BPVDIRA "
+            }
+
+
+        self.MvaB24pi = self.applyMVA( self.name + "MvaB24pi",
+                                             SelB        = self.SelB24piPhsSpcCut,
+                                             MVAVars     = self.B2hhpipiVars,
+                                             MVACutValue = config['B24piMVACut'],
+                                             MVAxmlFile  = config['B2hhpipiXmlFile']
+                                             )
+        
+        self.MvaB2KKpipi = self.applyMVA( self.name + "MvaB2KKpipi",
+                                             SelB        = self.SelB2KKpipiPhsSpcCut,
+                                             MVAVars     = self.B2hhpipiVars,
+                                             MVACutValue = config['B2KKpipiMVACut'],
+                                             MVAxmlFile  = config['B2hhpipiXmlFile']
+                                             )
+        
+        self.B24piPhsSpcCutLine = StrippingLine( self.name + '4piLine',
+                                                prescale  = config['Prescale'],
+                                                algos     = [ self.MvaB24pi ],
+                                                EnableFlavourTagging = True
+                                                )
+        self.registerLine( self.B24piPhsSpcCutLine )
+        
+        self.B2KKpipiPhsSpcCutLine = StrippingLine( self.name + 'KKpipiLine',
+                                                prescale  = config['Prescale'],
+                                                algos     = [ self.MvaB2KKpipi ],
+                                                EnableFlavourTagging = True
+                                                )
+        self.registerLine( self.B2KKpipiPhsSpcCutLine )
+        
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+
+    def createN4BodySel( self, OutputList,
+                         DecayDescriptor,
+                         DaughterLists,
+                         DaughterCuts = {} ,
+                         ComAMCuts      = "AALL",
+                         PreVertexCuts  = "AALL",
+                         PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = DaVinci__N4BodyDecays ( DecayDescriptor = DecayDescriptor,
+                                           DaughtersCuts = DaughterCuts,
+                                           Combination12Cut  = ComAMCuts + "&" + "( ACHI2DOCA(1,2)<20 )",
+                                           Combination123Cut = ComAMCuts + "&" + "( ACHI2DOCA(1,3)<20 ) & ( ACHI2DOCA(2,3)<20 )",
+                                           CombinationCut = "( ACHI2DOCA(1,4)<20 ) & ( ACHI2DOCA(2,4)<20 ) & ( ACHI2DOCA(3,4)<20 )" + " & " + PreVertexCuts,
+                                           MotherCut = PostVertexCuts,
+                                           ReFitPVs = False )
+
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2pphh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2pphh.py
new file mode 100755
index 000000000..26db6d676
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingB2pphh.py
@@ -0,0 +1,207 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingBu2pphh.py,v 1.0 2013-12-19$
+'''
+Module for construction of B->pphh 
+   ppKK
+   pppipi
+   ppKpi
+'''
+
+__author__ = ['Roberta Cardinale']
+__date__ = '18/12/2013'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('B2pphhConf',
+           'default_config'
+           )
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+#from Configurables import DaVinci__N4BodyDecays
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+from StandardParticles import StdAllNoPIDsKaons, StdAllNoPIDsPions, StdAllNoPIDsProtons
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter as VoidFilter
+
+default_config = {
+    'NAME' : 'B2pphh',
+    'WGs'  : ['BnoC'],
+    'BUILDERTYPE' : 'B2pphhConf',
+    'CONFIG' : { 'MaxTrSIZE'             : 10000 ,      ## GEC maximim recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG)
+    'CombMass12Max_kk'         : 4700.0,
+    'CombMass12Max_kpi'         : 5000.0,
+    'CombMass12Max_pipi'         : 5350.0,
+    'd_achi2doca12'             : 20.0,
+    'd_achi2doca13'             : 20.0,
+    'd_achi2doca14'             : 20.0,
+    'd_achi2doca23'             : 20.0,
+    'd_achi2doca24'             : 20.0,
+    'd_achi2doca34'             : 20.0,
+    'p_PTSUM'               : 750.0,
+    'p_PSUM'               : 7000.0,
+    'p_PTMIN'              : 400.0,
+    'p_PMIN'              : 4.0,
+    'p_PROBNNpPROD'        : 0.01,
+    'CombMass123Max'         : 5600.0,
+    'CombMassMax'         : 5.60,
+    'CombMassMin'         : 5.00,
+    'MassMax'             : 5.55,
+    'MassMin'             : 5.05,
+    '4h_PTSUM'            : 3000.0,
+    'B_DIRA'              : .9999 ,   
+    '4h_AMAXDOCA'                : 0.25 ,     
+    'B_CHI2'              : 25.0 ,    
+    'B_PT'                 : 1000.,
+    'B_MIPDV'              : 0.2,
+    'PionCuts' : "HASRICH & (P > 1500*MeV) & (PT > 300*MeV) & (MIPCHI2DV(PRIMARY) > 8.0) & (TRGHOSTPROB < 0.5) & (PROBNNpi > 0.10)",
+    'KaonCuts' : "HASRICH & (P > 1500*MeV) & (PT > 300*MeV) & (MIPCHI2DV(PRIMARY) > 5.0) & (TRGHOSTPROB < 0.5) & (PROBNNk > 0.05)",
+    'ProtonCuts' : "HASRICH & (P > 1500*MeV) & (PT > 300*MeV) & (MIPCHI2DV(PRIMARY) > 3.0) & (TRGHOSTPROB < 0.5) & (PROBNNp > 0.05)",
+    'Prescaleppkk'  : 1.0,
+    'Prescalepppipi'  : 1.0,
+    'Prescaleppkpi'  : 1.0
+    },
+    'STREAMS' : {'Bhadron' : ['StrippingB2pphh_kkLine',
+                              'StrippingB2pphh_kpiLine',
+                              'StrippingB2pphh_pipiLine']}
+    }
+
+
+default_name = "B2pphh"
+
+class B2pphhConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+        self.PionForB2pphh = self.createSubSel( OutputList = "PionFor" + self.name,
+                                                InputList = DataOnDemand(Location = 'Phys/StdAllNoPIDsPions/Particles'),
+                                                Cuts = config['PionCuts'])
+        self.ProtonForB2pphh = self.createSubSel( OutputList = "ProtonFor" + self.name,
+                                                  InputList = DataOnDemand(Location = 'Phys/StdAllNoPIDsProtons/Particles'),
+                                                  Cuts = config['ProtonCuts'])
+
+        self.KaonForB2pphh = self.createSubSel( OutputList = "KaonFor" + self.name,
+                                                InputList = DataOnDemand(Location = 'Phys/StdAllNoPIDsKaons/Particles'),
+                                                Cuts = config['KaonCuts'])
+        
+        self.makeBpppipi()
+        self.makeBppkpi()
+        self.makeBppkk()
+        
+
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createCombinationSel (self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {},
+                              Combination12Cut = {},
+                              Combination123Cut = {},
+                              PreVertexCuts = "AALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True) :
+        
+        combiner = DaVinci__N4BodyDecays( DecayDescriptor = DecayDescriptor,
+                                          DaughtersCuts = DaughterCuts,
+                                          MotherCut = PostVertexCuts,
+                                          CombinationCut = PreVertexCuts,
+                                          Combination12Cut = Combination12Cut,
+                                          Combination123Cut = Combination123Cut,
+                                          ReFitPVs = ReFitPVs)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+    
+    
+
+
+    def makeBppkk(self):
+        Bppkk = self.createCombinationSel (OutputList = "ppkk" + self.name,
+                                           DecayDescriptor  = "B_s0 -> p+ p~- K+ K-",
+                                           DaughterLists = [self.ProtonForB2pphh, self.KaonForB2pphh],
+                                           Combination12Cut = "((AM < %(CombMass12Max_kk)s*MeV) & (ASUM(PT)> %(p_PTSUM)s * MeV) & (ASUM(P)> %(p_PSUM)s*MeV) & ( (  AFUNCHILD(1,P) > %(p_PMIN)s * GeV) | ( AFUNCHILD(2,P) > %(p_PMIN)s * GeV ) ) & ( (  AFUNCHILD(1,PT) > %(p_PTMIN)s * MeV) | ( AFUNCHILD(2,PT) > %(p_PTMIN)s * MeV ) ) & (AFUNCHILD(1,PROBNNp) * AFUNCHILD(2,PROBNNp) > %(p_PROBNNpPROD)s ) & (ACHI2DOCA(1,2) < %(d_achi2doca12)s ))"%self.config,
+                                           Combination123Cut = "((AM < %(CombMass123Max)s * MeV)  & (ACHI2DOCA(1,3) < %(d_achi2doca13)s )  & (ACHI2DOCA(2,3) < %(d_achi2doca23)s ))"%self.config,
+                                           PreVertexCuts = " ((AMAXDOCA('LoKi::TrgDistanceCalculator') < %(4h_AMAXDOCA)s) & (in_range ( %(CombMassMin)s * GeV , AM , %(CombMassMax)s * GeV)) & (ACHI2DOCA(1,4) < %(d_achi2doca14)s )  & (ACHI2DOCA(2,4) < %(d_achi2doca24)s )  & (ACHI2DOCA(3,4) < %(d_achi2doca34)s ))" %self.config,
+                                           PostVertexCuts ="((BPVDIRA > %(B_DIRA)s) & (VFASPF(VCHI2) < %(B_CHI2)s) & (SUMTREE(PT,((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='K+') | (ABSID=='K-')),0.0) > %(4h_PTSUM)s*MeV) & (PT > %(B_PT)s * MeV) & (MIPDV(PRIMARY) < %(B_MIPDV)s*mm) & (in_range (%(MassMin)s * GeV , M , %(MassMax)s * GeV )))" %self.config,
+                                           ReFitPVs = True)
+        
+        BppkkLine = StrippingLine( self.name + '_kkLine',
+                                   prescale   = 1,
+                                   #HLT = "(HLT_PASS_RE('Hlt1TrackAllL0Decision') & HLT_PASS_RE('Hlt2Topo[234]Body.*Decision'))",
+                                   FILTER = {"Code":"(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 200 )",
+                                             "Preambulo":["from LoKiTracks.decorators import *"]},
+                                   algos     = [ Bppkk ],
+                                   EnableFlavourTagging = True,
+                                   MDSTFlag = True)
+        
+        self.registerLine(BppkkLine)
+        
+        
+        
+    def makeBppkpi(self):
+        Bppkpi = self.createCombinationSel (OutputList = "ppkpi" + self.name,
+                                            DecayDescriptor  = "[B0 -> p+ p~- K+ pi-]cc",
+                                            DaughterLists = [self.ProtonForB2pphh, self.PionForB2pphh, self.KaonForB2pphh],
+                                            Combination12Cut = "((AM < %(CombMass12Max_kpi)s*MeV) & (ASUM(PT)> %(p_PTSUM)s*MeV) & (ASUM(P)> %(p_PSUM)s* MeV) & ( (  AFUNCHILD(1,P) > %(p_PMIN)s * GeV) | ( AFUNCHILD(2,P) > %(p_PMIN)s * GeV ) ) & ( (  AFUNCHILD(1,PT) > %(p_PTMIN)s * MeV) | ( AFUNCHILD(2,PT) > %(p_PTMIN)s * MeV ) ) & (AFUNCHILD(1,PROBNNp) * AFUNCHILD(2,PROBNNp) > %(p_PROBNNpPROD)s )  & (ACHI2DOCA(1,2) < %(d_achi2doca12)s ))" %self.config,
+                                            Combination123Cut = "((AM < %(CombMass123Max)s * MeV)  & (ACHI2DOCA(1,3) < %(d_achi2doca13)s )  & (ACHI2DOCA(2,3) < %(d_achi2doca23)s ))" %self.config,
+                                            PreVertexCuts = "((AMAXDOCA('LoKi::TrgDistanceCalculator') < %(4h_AMAXDOCA)s) & (in_range (%(CombMassMin)s * GeV , AM , %(CombMassMax)s * GeV))  & (ACHI2DOCA(1,4) < %(d_achi2doca14)s )  & (ACHI2DOCA(2,4) < %(d_achi2doca24)s )  & (ACHI2DOCA(3, 4) < %(d_achi2doca34)s ))" %self.config,
+                                            PostVertexCuts ="((BPVDIRA > %(B_DIRA)s) & (VFASPF(VCHI2) < %(B_CHI2)s) & (SUMTREE(PT,((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='K+') | (ABSID=='K-') | (ABSID=='pi+') | (ABSID=='pi-')),0.0) > %(4h_PTSUM)s*MeV) & (PT > %(B_PT)s*MeV) & (MIPDV(PRIMARY) < %(B_MIPDV)s*mm) & (in_range (%(MassMin)s * GeV , M , %(MassMax)s * GeV)))" %self.config,
+                                            ReFitPVs = True)         
+        BppkpiLine = StrippingLine( self.name + '_kpiLine',
+                                    prescale   = 1,
+                                    #HLT = "(HLT_PASS_RE('Hlt1TrackAllL0Decision') & HLT_PASS_RE('Hlt2Topo[234]Body.*Decision'))",
+                                    FILTER = {"Code":"(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 200 )",
+                                              "Preambulo":["from LoKiTracks.decorators import *"]},
+                                    algos     = [ Bppkpi ],
+                                    EnableFlavourTagging = True,
+                                    MDSTFlag = True)
+        
+        self.registerLine(BppkpiLine)
+        
+    def makeBpppipi(self):
+        Bpppipi = self.createCombinationSel (OutputList = "Bpppipi" + self.name,
+                                             DecayDescriptor  = "B0 -> p+ p~- pi+ pi-",
+                                             DaughterLists = [self.ProtonForB2pphh, self.PionForB2pphh],
+                                             Combination12Cut = "((AM < %(CombMass12Max_pipi)s*MeV) & (ASUM(PT)> %(p_PTSUM)s*MeV) & (ASUM(P)> %(p_PSUM)s* MeV) & ( (  AFUNCHILD(1,P) > %(p_PMIN)s * GeV) | ( AFUNCHILD(2,P) > %(p_PMIN)s * GeV ) ) & ( (  AFUNCHILD(1,PT) > %(p_PTMIN)s * MeV) | ( AFUNCHILD(2,PT) > %(p_PTMIN)s * MeV ) ) & (AFUNCHILD(1,PROBNNp) * AFUNCHILD(2,PROBNNp) > %(p_PROBNNpPROD)s )  & (ACHI2DOCA(1,2) < %(d_achi2doca12)s ))" %self.config,
+                                             Combination123Cut = "((AM < %(CombMass123Max)s * MeV) & (ACHI2DOCA(1,3) < %(d_achi2doca13)s )  & (ACHI2DOCA(2,3) < %(d_achi2doca23)s ))" %self.config,
+                                             PreVertexCuts = "((AMAXDOCA('LoKi::TrgDistanceCalculator') < %(4h_AMAXDOCA)s) & (in_range( %(CombMassMin)s *GeV, AM , %(CombMassMax)s *GeV))  & (ACHI2DOCA(1,4) < %(d_achi2doca14)s )  & (ACHI2DOCA(2,4) < %(d_achi2doca24)s )  & (ACHI2DOCA(3, 4) < %(d_achi2doca34)s ))" %self.config,
+                                             PostVertexCuts ="((BPVDIRA > %(B_DIRA)s) & (VFASPF(VCHI2) < %(B_CHI2)s) & (SUMTREE(PT,((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='pi+') | (ABSID=='pi-')),0.0) > %(4h_PTSUM)s*MeV) & (PT > %(B_PT)s* MeV) & (MIPDV(PRIMARY) < %(B_MIPDV)s*mm) & (in_range ( %(MassMin)s * GeV , M , %(MassMax)s * GeV)))" %self.config,
+                                             ReFitPVs = True)
+        
+        BpppipiLine = StrippingLine( self.name + '_pipiLine',
+                                     prescale   = 1,
+                                     #HLT = "(HLT_PASS_RE('Hlt1TrackAllL0Decision') & HLT_PASS_RE('Hlt2Topo[234]Body.*Decision'))",
+                                     FILTER = {"Code":"(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 200 )",
+                                               "Preambulo":["from LoKiTracks.decorators import *"]},
+                                     algos      = [ Bpppipi ],
+                                     EnableFlavourTagging = True,
+                                     MDSTFlag = True)
+        
+        self.registerLine(BpppipiLine) 
+       
+       
+       
+       
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBc2hhh_BnoC.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBc2hhh_BnoC.py
new file mode 100644
index 000000000..57d96de37
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBc2hhh_BnoC.py
@@ -0,0 +1,1109 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+ # $Id: StrippingBc2hhh_BnoC.py,v 1.5 2015-07-31$
+'''
+Module for construction of Bc->hhh from:   
+     Exclusive lines to reconstruct the pipipi, Kpipi, KKpi, KKK, pppi and ppK decay modes.
+     
+Exported symbols (use python help!):
+   - Bc2hhhBuilder
+   - makepipipi_excl  
+   - makeKpipi_excl  
+   - makeKKpi_excl  
+   - makeKKK_excl  
+   - makepppi_excl  
+   - makeppK_excl  
+'''
+
+__author__ = ['Alvaro Gomes', 'Adlene Hicheur']
+__date__ = '31/08/2014'
+__version__ = '$Revision: 1.5 $'
+
+__all__ = ('Bc2hhhBuilder',
+           'makepipipi_excl', 
+           'makeKpipi_excl', 
+           'makeKKpi_excl', 
+           'makeKKK_excl', 
+           'makepppi_excl', 
+           'makeppK_excl', 
+     )
+
+"""
+B_c+ -> h+h+h- channels
+"""
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+
+import StandardParticles
+
+if hasattr(StandardParticles, "StdAllNoPIDsKaons"):
+  from StandardParticles import StdAllNoPIDsKaons as StdNoPIDsKaons
+else:
+  from StandardParticles import StdNoPIDsKaons as StdNoPIDsKaons
+
+if hasattr(StandardParticles, "StdAllNoPIDsPions"):
+  from StandardParticles import StdAllNoPIDsPions as StdNoPIDsPions
+else:
+  from StandardParticles import StdNoPIDsPions as StdNoPIDsPions
+
+if hasattr(StandardParticles, "StdAllLooseProtons"):
+  from StandardParticles import StdAllLooseProtons as StdLooseProtons
+else:
+  from StandardParticles import StdLooseProtons as StdLooseProtons
+
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter as VoidFilter
+
+default_config = {
+    'NAME'        : 'Bc2hhh',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Bc2hhhBuilder',
+    'CONFIG'      : { 'MaxTrSIZE'             : 200,      ## GEC maximim recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG)
+                      '_h_PT'                 : 300.,     ## tracks min PT
+                      '_h_P'                  : 2500.,    ## tracks min P  
+                      '_h_IPCHI2'             : 1.,       ## min tracks IP wrt OWNPV
+                      '_h_TRCHI2DOF'          : 4.0,      ## max tracks CHI2DOF
+                      '_h_TRGHP'              : .5,        ## Track Ghost Probability     
+                      '_3h_DOCA'              : .2,       ## max DOCA between h and 2h 
+                      '_3h_PTmax'             : 1500,     ## min PT of the 3h highest PT track
+                      '_3h_DIRA'              : .9999,   ## min cos angle between 3h momentum and PV decay direction   
+                      '_3h_FDCHI2'            : 150.,     ## min 3h FDCHI2 wrt best 3h PV  
+                      '_3h_SVPV'              : 1.5,      ## Distance between sv and pv
+                      '_3h_CHI2'              : 40.0,     ## max 3h vertex CHI2 
+                      '_3h_IPCHI2'            : 10.,      ## max 3h IP CHI2 wrt best 3h PV
+                      '_3h_PT'                : 1000.,    ## min 3h PT   
+                      '_3h_PTsum'             : 4500.,    ## min of 3h tracks PT sum 
+                      '_3h_Psum'              : 22000.,   ## min of 3h tracks P sum 
+                      '_3h_PVIPCHI2sum'       : 200.,     ## min of the 3h tracks IP wrt best 3h PV
+                      '_3h_TRKCHIDOFmin'      : 3.0,       ## max track CHI2DOF for the track with smalest CHI2DOF
+                      '_3h_Mmax'              : 6502.,     ## max 3h mass for exclusive lines
+                      '_3h_Mmin'              : 5998.,     ## min 3h mass for exclusive KKK lines
+                      '_bu3h_Mmax'            : 5502.,     ## min buto3h mass for exclusive lines
+                      '_bu3h_Mmin'            : 5098.,     ## min buto3h mass for exclusive lines
+                      '_probnnpi'             : .15,       ## PROBNNpi for pion tracks. WARNING: DO NOT APPLY THIS CUT FOR PIPIPI OR KPIPI LINES
+                      '_probnnk'              : .20,       ## PROBNNk for kaon tracks.
+                      '_probnnp'              : .05,       ## PROBNNp for proton tracks.
+                      'pipipi_exclLinePrescale'  : 1.0,
+                      'pipipi_exclLinePostscale' : 1.0,
+                      'Kpipi_exclLinePrescale'   : 1.0,
+                      'Kpipi_exclLinePostscale'  : 1.0,
+                      'KKpi_exclLinePrescale'    : 1.0,
+                      'KKpi_exclLinePostscale'   : 1.0,
+                      'KKK_exclLinePrescale'     : 1.0,
+                      'KKK_exclLinePostscale'    : 1.0,
+                      'pppi_exclLinePrescale'    : 1.0,
+                      'pppi_exclLinePostscale'   : 1.0,
+                      'ppK_exclLinePrescale'     : 1.0,
+                      'ppK_exclLinePostscale'    : 1.0,
+                    }, 
+    'STREAMS'     : ['Bhadron']
+}
+
+filter = {'Code' :
+          "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG)"\
+          " < %s )" \
+          % default_config['CONFIG']['MaxTrSIZE'],
+          'Preambulo' : [ "from LoKiTracks.decorators import *",
+                                      'from LoKiCore.functions    import *' ]
+}
+
+default_name = "Bc2hhh"
+
+class Bc2hhhBuilder(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        _pipipi_exclName = name + '_pipipi_excl'
+        _Kpipi_exclName = name + '_Kpipi_excl'
+        _KKpi_exclName = name + '_KKpi_excl'
+        _KKK_exclName = name + '_KKK_excl'
+        _pppi_exclName = name + '_pppi_excl'
+        _ppK_exclName = name + '_ppK_excl'
+
+        self.selpipipi = makepipipi_excl( 'pipipiexclFor' + _pipipi_exclName + 'Sel', 
+                             _h_PT           = config['_h_PT'],
+                             _h_P            = config['_h_P'],
+                             _h_IPCHI2       = config['_h_IPCHI2'],
+                             _h_TRCHI2DOF    = config['_h_TRCHI2DOF'],
+                             _h_TRGHP       = config['_h_TRGHP'],
+                             _3h_DOCA        = config['_3h_DOCA'],
+                             _3h_PTmax       = config['_3h_PTmax'],
+                             _3h_DIRA        = config['_3h_DIRA'],
+                             _3h_FDCHI2      = config['_3h_FDCHI2'],
+                             _3h_SVPV   = config['_3h_SVPV'],
+                             _3h_CHI2        = config['_3h_CHI2'],
+                             _3h_IPCHI2      = config['_3h_IPCHI2'],
+                             _3h_PT          = config['_3h_PT'],
+                             _3h_PTsum       = config['_3h_PTsum'],
+                             _3h_Psum        = config['_3h_Psum'],
+                             _3h_PVIPCHI2sum = config['_3h_PVIPCHI2sum'],
+                             _3h_TRKCHIDOFmin= config['_3h_TRKCHIDOFmin'],
+                             _3h_Mmin     = config['_3h_Mmin'],
+                             _3h_Mmax     = config['_3h_Mmax'],
+                             _bu3h_Mmin   = config['_bu3h_Mmin'],
+                             _bu3h_Mmax   = config['_bu3h_Mmax'])
+
+        self.selKpipi = makeKpipi_excl( 'KpipiexclFor' + _Kpipi_exclName + 'Sel', 
+                             _h_PT           = config['_h_PT'],
+                             _h_P            = config['_h_P'],
+                             _h_IPCHI2       = config['_h_IPCHI2'],
+                             _h_TRCHI2DOF    = config['_h_TRCHI2DOF'],
+                             _h_TRGHP       = config['_h_TRGHP'],
+                             _3h_DOCA        = config['_3h_DOCA'],
+                             _3h_PTmax       = config['_3h_PTmax'],
+                             _3h_DIRA        = config['_3h_DIRA'],
+                             _3h_FDCHI2      = config['_3h_FDCHI2'],
+                             _3h_SVPV   = config['_3h_SVPV'],
+                             _3h_CHI2        = config['_3h_CHI2'],
+                             _3h_IPCHI2      = config['_3h_IPCHI2'],
+                             _3h_PT          = config['_3h_PT'],
+                             _3h_PTsum       = config['_3h_PTsum'],
+                             _3h_Psum        = config['_3h_Psum'],
+                             _3h_PVIPCHI2sum = config['_3h_PVIPCHI2sum'],
+                             _3h_TRKCHIDOFmin= config['_3h_TRKCHIDOFmin'],
+                             _3h_Mmin     = config['_3h_Mmin'],
+                             _3h_Mmax     = config['_3h_Mmax'],
+                             _bu3h_Mmin   = config['_bu3h_Mmin'],
+                             _bu3h_Mmax   = config['_bu3h_Mmax'],
+                             _probnnk     = config['_probnnk'])                                          
+
+        self.selKKpi = makeKKpi_excl( 'KKpiexclFor' + _KKpi_exclName + 'Sel', 
+                             _h_PT           = config['_h_PT'],
+                             _h_P            = config['_h_P'],
+                             _h_IPCHI2       = config['_h_IPCHI2'],
+                             _h_TRCHI2DOF    = config['_h_TRCHI2DOF'],
+                             _h_TRGHP       = config['_h_TRGHP'],
+                             _3h_DOCA        = config['_3h_DOCA'],
+                             _3h_PTmax       = config['_3h_PTmax'],
+                             _3h_DIRA        = config['_3h_DIRA'],
+                             _3h_FDCHI2      = config['_3h_FDCHI2'],
+                             _3h_SVPV   = config['_3h_SVPV'],
+                             _3h_CHI2        = config['_3h_CHI2'],
+                             _3h_IPCHI2      = config['_3h_IPCHI2'],
+                             _3h_PT          = config['_3h_PT'],
+                             _3h_PTsum       = config['_3h_PTsum'],
+                             _3h_Psum        = config['_3h_Psum'],
+                             _3h_PVIPCHI2sum = config['_3h_PVIPCHI2sum'],
+                             _3h_TRKCHIDOFmin= config['_3h_TRKCHIDOFmin'],
+                             _3h_Mmin     = config['_3h_Mmin'],
+                             _3h_Mmax     = config['_3h_Mmax'],
+                             _bu3h_Mmin   = config['_bu3h_Mmin'],
+                             _bu3h_Mmax   = config['_bu3h_Mmax'],
+                             _probnnpi    = config['_probnnpi'],
+                             _probnnk     = config['_probnnk'])
+
+        self.selKKK = makeKKK_excl( 'KKKexclFor' + _KKK_exclName + 'Sel', 
+                             _h_PT           = config['_h_PT'],
+                             _h_P            = config['_h_P'],
+                             _h_IPCHI2       = config['_h_IPCHI2'],
+                             _h_TRCHI2DOF    = config['_h_TRCHI2DOF'],
+                             _h_TRGHP       = config['_h_TRGHP'],
+                             _3h_DOCA        = config['_3h_DOCA'],
+                             _3h_PTmax       = config['_3h_PTmax'],
+                             _3h_DIRA        = config['_3h_DIRA'],
+                             _3h_FDCHI2      = config['_3h_FDCHI2'],
+                             _3h_SVPV   = config['_3h_SVPV'],
+                             _3h_CHI2        = config['_3h_CHI2'],
+                             _3h_IPCHI2      = config['_3h_IPCHI2'],
+                             _3h_PT          = config['_3h_PT'],
+                             _3h_PTsum       = config['_3h_PTsum'],
+                             _3h_Psum        = config['_3h_Psum'],
+                             _3h_PVIPCHI2sum = config['_3h_PVIPCHI2sum'],
+                             _3h_TRKCHIDOFmin= config['_3h_TRKCHIDOFmin'],
+                             _3h_Mmin     = config['_3h_Mmin'],
+                             _3h_Mmax     = config['_3h_Mmax'],
+                             _bu3h_Mmin   = config['_bu3h_Mmin'],
+                             _bu3h_Mmax   = config['_bu3h_Mmax'],
+                             _probnnk     = config['_probnnk'])
+
+        self.selpppi = makepppi_excl( 'pppiexclFor' + _pppi_exclName + 'Sel', 
+                             _h_PT           = config['_h_PT'],
+                             _h_P            = config['_h_P'],
+                             _h_IPCHI2       = config['_h_IPCHI2'],
+                             _h_TRCHI2DOF    = config['_h_TRCHI2DOF'],
+                             _h_TRGHP       = config['_h_TRGHP'],
+                             _3h_DOCA        = config['_3h_DOCA'],
+                             _3h_PTmax       = config['_3h_PTmax'],
+                             _3h_DIRA        = config['_3h_DIRA'],
+                             _3h_FDCHI2      = config['_3h_FDCHI2'],
+                             _3h_SVPV   = config['_3h_SVPV'],
+                             _3h_CHI2        = config['_3h_CHI2'],
+                             _3h_IPCHI2      = config['_3h_IPCHI2'],
+                             _3h_PT          = config['_3h_PT'],
+                             _3h_PTsum       = config['_3h_PTsum'],
+                             _3h_Psum        = config['_3h_Psum'],
+                             _3h_PVIPCHI2sum = config['_3h_PVIPCHI2sum'],
+                             _3h_TRKCHIDOFmin= config['_3h_TRKCHIDOFmin'],
+                             _3h_Mmin     = config['_3h_Mmin'],
+                             _3h_Mmax     = config['_3h_Mmax'],
+                             _bu3h_Mmin   = config['_bu3h_Mmin'],
+                             _bu3h_Mmax   = config['_bu3h_Mmax'],
+                             _probnnpi    = config['_probnnpi'],
+                             _probnnp     = config['_probnnp'])
+
+        self.selppK = makeppK_excl( 'ppKexclFor' + _ppK_exclName + 'Sel', 
+                             _h_PT           = config['_h_PT'],
+                             _h_P            = config['_h_P'],
+                             _h_IPCHI2       = config['_h_IPCHI2'],
+                             _h_TRCHI2DOF    = config['_h_TRCHI2DOF'],
+                             _h_TRGHP       = config['_h_TRGHP'],       
+                             _3h_DOCA        = config['_3h_DOCA'],
+                             _3h_PTmax       = config['_3h_PTmax'],
+                             _3h_DIRA        = config['_3h_DIRA'],
+                             _3h_FDCHI2      = config['_3h_FDCHI2'],
+                             _3h_SVPV   = config['_3h_SVPV'],
+                             _3h_CHI2        = config['_3h_CHI2'],
+                             _3h_IPCHI2      = config['_3h_IPCHI2'],
+                             _3h_PT          = config['_3h_PT'],
+                             _3h_PTsum       = config['_3h_PTsum'],
+                             _3h_Psum        = config['_3h_Psum'],
+                             _3h_PVIPCHI2sum = config['_3h_PVIPCHI2sum'],
+                             _3h_TRKCHIDOFmin= config['_3h_TRKCHIDOFmin'],
+                             _3h_Mmin     = config['_3h_Mmin'],
+                             _3h_Mmax     = config['_3h_Mmax'],
+                             _bu3h_Mmin   = config['_bu3h_Mmin'],
+                             _bu3h_Mmax   = config['_bu3h_Mmax'],
+                             _probnnk     = config['_probnnk'],
+                             _probnnp     = config['_probnnp'])
+
+  
+        self.algospipipi = []
+        self.algospipipi.append(self.selpipipi)
+
+        self.algosKpipi = []
+        self.algosKpipi.append(self.selKpipi)
+
+        self.algosKKpi = []
+        self.algosKKpi.append(self.selKKpi)
+
+        self.algosKKK = []
+        self.algosKKK.append(self.selKKK)
+
+        self.algospppi = []
+        self.algospppi.append(self.selpppi)
+
+        self.algosppK = []
+        self.algosppK.append(self.selppK) 
+  
+
+        self.linepipipi_excl = StrippingLine( _pipipi_exclName + 'Line',
+                                     prescale   = config['pipipi_exclLinePrescale'],
+                                     postscale  = config['pipipi_exclLinePostscale'],
+                                     algos      = self.algospipipi,
+                                     FILTER = filter,
+                                     RelatedInfoTools = [
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^pi+ pi- pi+]CC" : "ConeIso05pi1",
+                                                 "[B_c+ -> pi+ ^pi- pi+]CC" : "ConeIso05pi2",
+                                                 "[B_c+ -> pi+ pi- ^pi+]CC" : "ConeIso05pi3",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^pi+ pi- pi+]CC" : "ConeIso10pi1",
+                                                 "[B_c+ -> pi+ ^pi- pi+]CC" : "ConeIso10pi2",
+                                                 "[B_c+ -> pi+ pi- ^pi+]CC" : "ConeIso10pi3",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^pi+ pi- pi+]CC" : "ConeIso15pi1",
+                                                 "[B_c+ -> pi+ ^pi- pi+]CC" : "ConeIso15pi2",
+                                                 "[B_c+ -> pi+ pi- ^pi+]CC" : "ConeIso15pi3",
+                                             }
+},
+                                       { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 2.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^pi+ pi- pi+]CC" : "ConeIso20pi1",
+                                                 "[B_c+ -> pi+ ^pi- pi+]CC" : "ConeIso20pi2",
+                                                 "[B_c+ -> pi+ pi- ^pi+]CC" : "ConeIso20pi3",
+                                             }
+},
+                                           { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 0.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^pi+ pi- pi+]CC" : "NConeIso05pi1",
+                                                 "[B_c+ -> pi+ ^pi- pi+]CC" : "NConeIso05pi2",
+                                                 "[B_c+ -> pi+ pi- ^pi+]CC" : "NConeIso05pi3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^pi+ pi- pi+]CC" : "NConeIso10pi1",
+                                                 "[B_c+ -> pi+ ^pi- pi+]CC" : "NConeIso10pi2",
+                                                 "[B_c+ -> pi+ pi- ^pi+]CC" : "NConeIso10pi3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^pi+ pi- pi+]CC" : "NConeIso15pi1",
+                                                 "[B_c+ -> pi+ ^pi- pi+]CC" : "NConeIso15pi2",
+                                                 "[B_c+ -> pi+ pi- ^pi+]CC" : "NConeIso15pi3",
+                                             }
+                                           },
+                                       { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 2.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^pi+ pi- pi+]CC" : "NConeIso20pi1",
+                                                 "[B_c+ -> pi+ ^pi- pi+]CC" : "NConeIso20pi2",
+                                                 "[B_c+ -> pi+ pi- ^pi+]CC" : "NConeIso20pi3",
+                                             }
+                                           },
+                                       { "Type"           : "RelInfoVertexIsolation",
+                                            "Location"       : "VertexIsoInfo"} 
+                                     ]
+
+)
+
+        self.lineKpipi_excl = StrippingLine( _Kpipi_exclName + 'Line',
+                                     prescale   = config['Kpipi_exclLinePrescale'],
+                                     postscale  = config['Kpipi_exclLinePostscale'],
+                                     algos      = self.algosKpipi,
+                                     FILTER = filter,
+                                     RelatedInfoTools = [
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ pi- pi+]CC" : "ConeIso05K",
+                                                 "[B_c+ -> K+ ^pi- pi+]CC" : "ConeIso05pi1",
+                                                 "[B_c+ -> K+ pi- ^pi+]CC" : "ConeIso05pi2",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ pi- pi+]CC" : "ConeIso10K",
+                                                 "[B_c+ -> K+ ^pi- pi+]CC" : "ConeIso10pi1",
+                                                 "[B_c+ -> K+ pi- ^pi+]CC" : "ConeIso10pi2",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ pi- pi+]CC" : "ConeIso15K",
+                                                 "[B_c+ -> K+ ^pi- pi+]CC" : "ConeIso15pi1",
+                                                 "[B_c+ -> K+ pi- ^pi+]CC" : "ConeIso15pi2",
+                                             }
+},
+                                       { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 2.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ pi- pi+]CC" : "ConeIso20K",
+                                                 "[B_c+ -> K+ ^pi- pi+]CC" : "ConeIso20pi1",
+                                                 "[B_c+ -> K+ pi- ^pi+]CC" : "ConeIso20pi2",
+                                             }
+},
+                                           { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 0.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ pi- pi+]CC" : "NConeIso05K",
+                                                 "[B_c+ -> K+ ^pi- pi+]CC" : "NConeIso05pi1",
+                                                 "[B_c+ -> K+ pi- ^pi+]CC" : "NConeIso05pi2",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ pi- pi+]CC" : "NConeIso10K",
+                                                 "[B_c+ -> K+ ^pi- pi+]CC" : "NConeIso10pi1",
+                                                 "[B_c+ -> K+ pi- ^pi+]CC" : "NConeIso10pi2",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ pi- pi+]CC" : "NConeIso15K",
+                                                 "[B_c+ -> K+ ^pi- pi+]CC" : "NConeIso15pi1",
+                                                 "[B_c+ -> K+ pi- ^pi+]CC" : "NConeIso15pi2",
+                                             }
+                                           },
+                                       { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 2.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ pi- pi+]CC" : "NConeIso20K",
+                                                 "[B_c+ -> K+ ^pi- pi+]CC" : "NConeIso20pi1",
+                                                 "[B_c+ -> K+ pi- ^pi+]CC" : "NConeIso20pi2",
+                                             }
+                                           },
+                                       { "Type"           : "RelInfoVertexIsolation",
+                                            "Location"       : "VertexIsoInfo"} 
+ ]
+)
+
+        self.lineKKpi_excl = StrippingLine( _KKpi_exclName + 'Line',
+                                     prescale   = config['KKpi_exclLinePrescale'],
+                                     postscale  = config['KKpi_exclLinePostscale'],
+                                     algos      = self.algosKKpi,
+                                     FILTER = filter,
+                                     RelatedInfoTools = [
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- pi+]CC" : "ConeIso05K1",
+                                                 "[B_c+ -> K+ ^K- pi+]CC" : "ConeIso05K2",
+                                                 "[B_c+ -> K+ K- ^pi+]CC" : "ConeIso05pi",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- pi+]CC" : "ConeIso10K1",
+                                                 "[B_c+ -> K+ ^K- pi+]CC" : "ConeIso10K2",
+                                                 "[B_c+ -> K+ K- ^pi+]CC" : "ConeIso10pi",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- pi+]CC" : "ConeIso15K1",
+                                                 "[B_c+ -> K+ ^K- pi+]CC" : "ConeIso15K2",
+                                                 "[B_c+ -> K+ K- ^pi+]CC" : "ConeIso15pi",
+                                             }
+},
+                                       { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 2.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- pi+]CC" : "ConeIso20K1",
+                                                 "[B_c+ -> K+ ^K- pi+]CC" : "ConeIso20K2",
+                                                 "[B_c+ -> K+ K- ^pi+]CC" : "ConeIso20pi",
+                                             }
+},
+                                           { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 0.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- pi+]CC" : "NConeIso05K1",
+                                                 "[B_c+ -> K+ ^K- pi+]CC" : "NConeIso05K2",
+                                                 "[B_c+ -> K+ K- ^pi+]CC" : "NConeIso05pi",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- pi+]CC" : "NConeIso10K1",
+                                                 "[B_c+ -> K+ ^K- pi+]CC" : "NConeIso10K2",
+                                                 "[B_c+ -> K+ K- ^pi+]CC" : "NConeIso10pi",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- pi+]CC" : "NConeIso15K1",
+                                                 "[B_c+ -> K+ ^K- pi+]CC" : "NConeIso15K2",
+                                                 "[B_c+ -> K+ K- ^pi+]CC" : "NConeIso15pi",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 2.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- pi+]CC" : "NConeIso20K1",
+                                                 "[B_c+ -> K+ ^K- pi+]CC" : "NConeIso20K2",
+                                                 "[B_c+ -> K+ K- ^pi+]CC" : "NConeIso20pi",
+                                             }
+                                           },
+                                       { "Type"           : "RelInfoVertexIsolation",
+                                            "Location"       : "VertexIsoInfo"} 
+                                     ]
+)
+
+        self.lineKKK_excl = StrippingLine( _KKK_exclName + 'Line',
+                                     prescale   = config['KKK_exclLinePrescale'],
+                                     postscale  = config['KKK_exclLinePostscale'],
+                                     algos      = self.algosKKK,
+                                     FILTER = filter,
+                                     RelatedInfoTools = [
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- K+]CC" : "ConeIso05K1",
+                                                 "[B_c+ -> K+ ^K- K+]CC" : "ConeIso05K2",
+                                                 "[B_c+ -> K+ K- ^K+]CC" : "ConeIso05K3",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- K+]CC" : "ConeIso10K1",
+                                                 "[B_c+ -> K+ ^K- K+]CC" : "ConeIso10K2",
+                                                 "[B_c+ -> K+ K- ^K+]CC" : "ConeIso10K3",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- K+]CC" : "ConeIso15K1",
+                                                 "[B_c+ -> K+ ^K- K+]CC" : "ConeIso15K2",
+                                                 "[B_c+ -> K+ K- ^K+]CC" : "ConeIso15K3",
+                                             }
+},
+                                       { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 2.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- K+]CC" : "ConeIso20K1",
+                                                 "[B_c+ -> K+ ^K- K+]CC" : "ConeIso20K2",
+                                                 "[B_c+ -> K+ K- ^K+]CC" : "ConeIso20K3",
+                                             }
+},
+                                           { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 0.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- K+]CC" : "NConeIso05K1",
+                                                 "[B_c+ -> K+ ^K- K+]CC" : "NConeIso05K2",
+                                                 "[B_c+ -> K+ K- ^K+]CC" : "NConeIso05K3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- K+]CC" : "NConeIso10K1",
+                                                 "[B_c+ -> K+ ^K- K+]CC" : "NConeIso10K2",
+                                                 "[B_c+ -> K+ K- ^K+]CC" : "NConeIso10K3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- K+]CC" : "NConeIso15K1",
+                                                 "[B_c+ -> K+ ^K- K+]CC" : "NConeIso15K2",
+                                                 "[B_c+ -> K+ K- ^K+]CC" : "NConeIso15K3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 2.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^K+ K- K+]CC" : "NConeIso20K1",
+                                                 "[B_c+ -> K+ ^K- K+]CC" : "NConeIso20K2",
+                                                 "[B_c+ -> K+ K- ^K+]CC" : "NConeIso20K3",
+                                             }
+                                           },
+                                       { "Type"           : "RelInfoVertexIsolation",
+                                            "Location"       : "VertexIsoInfo"} 
+                                     ]
+)
+
+        self.linepppi_excl = StrippingLine( _pppi_exclName + 'Line',
+                                     prescale   = config['pppi_exclLinePrescale'],
+                                     postscale  = config['pppi_exclLinePostscale'],
+                                     algos      = self.algospppi,
+                                     FILTER = filter,
+                                     RelatedInfoTools = [
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- pi+]CC" : "ConeIso05p1",
+                                                 "[B_c+ -> p+ ^p~- pi+]CC" : "ConeIso05p2",
+                                                 "[B_c+ -> p+ p~- ^pi+]CC" : "ConeIso05pi",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- pi+]CC" : "ConeIso10p1",
+                                                 "[B_c+ -> p+ ^p~- pi+]CC" : "ConeIso10p2",
+                                                 "[B_c+ -> p+ p~- ^pi+]CC" : "ConeIso10pi",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- pi+]CC" : "ConeIso15p1",
+                                                 "[B_c+ -> p+ ^p~- pi+]CC" : "ConeIso15p2",
+                                                 "[B_c+ -> p+ p~- ^pi+]CC" : "ConeIso15pi",
+                                             }
+},
+                                       { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 2.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- pi+]CC" : "ConeIso20p1",
+                                                 "[B_c+ -> p+ ^p~- pi+]CC" : "ConeIso20p2",
+                                                 "[B_c+ -> p+ p~- ^pi+]CC" : "ConeIso20pi",
+                                             }
+},
+                                           { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 0.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- pi+]CC" : "NConeIso05p1",
+                                                 "[B_c+ -> p+ ^p~- pi+]CC" : "NConeIso05p2",
+                                                 "[B_c+ -> p+ p~- ^pi+]CC" : "NConeIso05pi",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- pi+]CC" : "NConeIso10p1",
+                                                 "[B_c+ -> p+ ^p~- pi+]CC" : "NConeIso10p2",
+                                                 "[B_c+ -> p+ p~- ^pi+]CC" : "NConeIso10pi",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- pi+]CC" : "NConeIso15p1",
+                                                 "[B_c+ -> p+ ^p~- pi+]CC" : "NConeIso15p2",
+                                                 "[B_c+ -> p+ p~- ^pi+]CC" : "NConeIso15pi",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 2.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- pi+]CC" : "NConeIso20p1",
+                                                 "[B_c+ -> p+ ^p~- pi+]CC" : "NConeIso20p2",
+                                                 "[B_c+ -> p+ p~- ^pi+]CC" : "NConeIso20pi",
+                                             }
+                                           },
+                                       { "Type"           : "RelInfoVertexIsolation",
+                                            "Location"       : "VertexIsoInfo"} 
+                                     ]
+)
+        
+        self.lineppK_excl = StrippingLine( _ppK_exclName + 'Line',
+                                     prescale   = config['ppK_exclLinePrescale'],
+                                     postscale  = config['ppK_exclLinePostscale'],
+                                     algos      = self.algosppK,
+                                     FILTER = filter,
+                                     RelatedInfoTools = [
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- K+]CC" : "ConeIso05p1",
+                                                 "[B_c+ -> p+ ^p~- K+]CC" : "ConeIso05p2",
+                                                 "[B_c+ -> p+ p~- ^K+]CC" : "ConeIso05K",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- K+]CC" : "ConeIso10p1",
+                                                 "[B_c+ -> p+ ^p~- K+]CC" : "ConeIso10p2",
+                                                 "[B_c+ -> p+ p~- ^K+]CC" : "ConeIso10K",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- K+]CC" : "ConeIso15p1",
+                                                 "[B_c+ -> p+ ^p~- K+]CC" : "ConeIso15p2",
+                                                 "[B_c+ -> p+ p~- ^K+]CC" : "ConeIso15K",
+                                             }
+},
+                                       { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 2.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- K+]CC" : "ConeIso20p1",
+                                                 "[B_c+ -> p+ ^p~- K+]CC" : "ConeIso20p2",
+                                                 "[B_c+ -> p+ p~- ^K+]CC" : "ConeIso20K",
+                                             }
+},
+                                           { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 0.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- K+]CC" : "NConeIso05p1",
+                                                 "[B_c+ -> p+ ^p~- K+]CC" : "NConeIso05p2",
+                                                 "[B_c+ -> p+ p~- ^K+]CC" : "NConeIso05K",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- K+]CC" : "NConeIso10p1",
+                                                 "[B_c+ -> p+ ^p~- K+]CC" : "NConeIso10p2",
+                                                 "[B_c+ -> p+ p~- ^K+]CC" : "NConeIso10K",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- K+]CC" : "NConeIso15p1",
+                                                 "[B_c+ -> p+ ^p~- K+]CC" : "NConeIso15p2",
+                                                 "[B_c+ -> p+ p~- ^K+]CC" : "NConeIso15K",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 2.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B_c+ -> ^p+ p~- K+]CC" : "NConeIso20p1",
+                                                 "[B_c+ -> p+ ^p~- K+]CC" : "NConeIso20p2",
+                                                 "[B_c+ -> p+ p~- ^K+]CC" : "NConeIso20K",
+                                             }
+                                           },
+                                       { "Type"           : "RelInfoVertexIsolation",
+                                            "Location"       : "VertexIsoInfo"} 
+                                     ]
+)
+
+        self.registerLine(self.linepipipi_excl)
+        self.registerLine(self.lineKpipi_excl)
+        self.registerLine(self.lineKKpi_excl)
+        self.registerLine(self.lineKKK_excl)
+        self.registerLine(self.linepppi_excl)
+        self.registerLine(self.lineppK_excl)
+
+def makepipipi_excl(name,
+                    _h_PT,
+                    _h_P,
+                    _h_IPCHI2,
+                    _h_TRCHI2DOF,
+                    _h_TRGHP,      
+                    _3h_DOCA,
+                    _3h_PTmax,
+                    _3h_DIRA,
+                    _3h_FDCHI2,
+                    _3h_SVPV,
+                    _3h_CHI2,
+                    _3h_IPCHI2,
+                    _3h_PT,
+                    _3h_PTsum,
+                    _3h_Psum,
+                    _3h_PVIPCHI2sum,
+                    _3h_TRKCHIDOFmin,
+                    _3h_Mmin,
+                    _3h_Mmax,
+                    _bu3h_Mmin,
+                    _bu3h_Mmax) :
+
+    _daughtersCuts = {"pi+" : "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals()}
+    _combinationCut = "(((AM < %(_3h_Mmax)s*MeV) & (AM > %(_3h_Mmin)s*MeV)) | ((AM < %(_bu3h_Mmax)s*MeV) & (AM > %(_bu3h_Mmin)s*MeV))) \
+                    & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_3h_DOCA)s)" % locals()
+    _motherCut = "(MAXTREE(((ABSID=='pi+') | (ABSID=='pi-')),PT) > %(_3h_PTmax)s*MeV) \
+               & (BPVDIRA > %(_3h_DIRA)s) \
+               & (BPVVDCHI2 > %(_3h_FDCHI2)s) \
+               & (VFASPF(VMINVDDV(PRIMARY)) > %(_3h_SVPV)s) \
+               & (VFASPF(VCHI2) < %(_3h_CHI2)s) \
+               & (MIPCHI2DV(PRIMARY) < %(_3h_IPCHI2)s) \
+               & (PT > %(_3h_PT)s*MeV) \
+               & (SUMTREE(PT,(('pi+'==ABSID) | ('pi-'==ABSID)),0.0) > %(_3h_PTsum)s*MeV) \
+               & (SUMTREE(P,(('pi+'==ABSID) | ('pi-'==ABSID)),0.0) > %(_3h_Psum)s*MeV) \
+               & (SUMTREE(MIPCHI2DV(PRIMARY),(('pi+'==ABSID) | ('pi-'==ABSID)),0.0) > %(_3h_PVIPCHI2sum)s) \
+               & (MINTREE((('pi+'==ABSID) | ('pi-'==ABSID)),TRCHI2DOF) < %(_3h_TRKCHIDOFmin)s)" % locals()
+   
+    _pipipi=CombineParticles()
+    _pipipi.DecayDescriptors  = ["[B_c+ -> pi+ pi- pi+]cc"]
+    _pipipi.MotherCut         = _motherCut
+    _pipipi.CombinationCut    = _combinationCut
+    _pipipi.DaughtersCuts     = _daughtersCuts
+
+    return Selection ( name,
+                       Algorithm = _pipipi,
+                       RequiredSelections = [StdNoPIDsPions])
+
+def makeKpipi_excl(name,
+                   _h_PT,
+                   _h_P,
+                   _h_IPCHI2,
+                   _h_TRCHI2DOF,
+                   _h_TRGHP,      
+                   _3h_DOCA,
+                   _3h_PTmax,
+                   _3h_DIRA,
+                   _3h_FDCHI2,
+                   _3h_SVPV,
+                   _3h_CHI2,
+                   _3h_IPCHI2,
+                   _3h_PT,
+                   _3h_PTsum,
+                   _3h_Psum,
+                   _3h_PVIPCHI2sum,
+                   _3h_TRKCHIDOFmin,
+                   _3h_Mmin,
+                   _3h_Mmax,
+                   _bu3h_Mmin,
+                   _bu3h_Mmax,
+                   _probnnk) :
+
+    _daughtersCuts = {"K+" : "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (PROBNNk > %(_probnnk)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals(),
+                      "pi+": "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals()}
+    _combinationCut = "(((AM < %(_3h_Mmax)s*MeV) & (AM > %(_3h_Mmin)s*MeV)) | ((AM < %(_bu3h_Mmax)s*MeV) & (AM > %(_bu3h_Mmin)s*MeV))) \
+                    & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_3h_DOCA)s)" % locals()
+    _motherCut = "(MAXTREE(((ABSID=='K+') | (ABSID=='K-') | ('pi+'==ABSID) | ('pi-'==ABSID)),PT) > %(_3h_PTmax)s*MeV) \
+               & (BPVDIRA > %(_3h_DIRA)s) \
+               & (BPVVDCHI2 > %(_3h_FDCHI2)s) \
+               & (VFASPF(VMINVDDV(PRIMARY)) > %(_3h_SVPV)s) \
+               & (VFASPF(VCHI2) < %(_3h_CHI2)s) \
+               & (MIPCHI2DV(PRIMARY) < %(_3h_IPCHI2)s) \
+               & (PT > %(_3h_PT)s*MeV) \
+               & (SUMTREE(PT,((ABSID=='K+') | (ABSID=='K-') | ('pi+'==ABSID) | ('pi-'==ABSID)),0.0) > %(_3h_PTsum)s*MeV) \
+               & (SUMTREE(P,((ABSID=='K+') | (ABSID=='K-') | ('pi+'==ABSID) | ('pi-'==ABSID)),0.0) > %(_3h_Psum)s*MeV) \
+               & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='K+') | (ABSID=='K-') | ('pi+'==ABSID) | ('pi-'==ABSID)),0.0) > %(_3h_PVIPCHI2sum)s) \
+               & (MINTREE((('K+'==ABSID) | ('K-'==ABSID) | ('pi+'==ABSID) | ('pi-'==ABSID)),TRCHI2DOF) < %(_3h_TRKCHIDOFmin)s)" % locals()
+   
+    _Kpipi=CombineParticles()
+    _Kpipi.DecayDescriptors  = ["[B_c+ -> K+ pi- pi+]cc"]
+    _Kpipi.MotherCut         = _motherCut
+    _Kpipi.CombinationCut    = _combinationCut
+    _Kpipi.DaughtersCuts     = _daughtersCuts
+
+    return Selection ( name,
+                       Algorithm = _Kpipi,
+                       RequiredSelections = [StdNoPIDsPions, StdNoPIDsKaons])
+
+def makeKKpi_excl(name,
+                  _h_PT,
+                  _h_P,
+                  _h_IPCHI2,
+                  _h_TRCHI2DOF,
+                  _h_TRGHP,      
+                  _3h_DOCA,
+                  _3h_PTmax,
+                  _3h_DIRA,
+                  _3h_FDCHI2,
+                  _3h_SVPV,
+                  _3h_CHI2,
+                  _3h_IPCHI2,
+                  _3h_PT,
+                  _3h_PTsum,
+                  _3h_Psum,
+                  _3h_PVIPCHI2sum,
+                  _3h_TRKCHIDOFmin,
+                  _3h_Mmin,
+                  _3h_Mmax,
+                  _bu3h_Mmin,
+                  _bu3h_Mmax,
+                  _probnnpi,
+                  _probnnk) :
+
+    _daughtersCuts = {"K+" : "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (PROBNNk > %(_probnnk)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals(),
+                      "pi+" : "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (PROBNNpi > %(_probnnpi)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals()}
+    _combinationCut = "(((AM < %(_3h_Mmax)s*MeV) & (AM > %(_3h_Mmin)s*MeV)) | ((AM < %(_bu3h_Mmax)s*MeV) & (AM > %(_bu3h_Mmin)s*MeV))) \
+                    & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_3h_DOCA)s)" % locals()
+    _motherCut = "(MAXTREE(((ABSID=='K+') | (ABSID=='K-') | ('pi+'==ABSID) | ('pi-'==ABSID)),PT) > %(_3h_PTmax)s*MeV) \
+               & (BPVDIRA > %(_3h_DIRA)s) \
+               & (BPVVDCHI2 > %(_3h_FDCHI2)s) \
+               & (VFASPF(VMINVDDV(PRIMARY)) > %(_3h_SVPV)s) \
+               & (VFASPF(VCHI2) < %(_3h_CHI2)s) \
+               & (MIPCHI2DV(PRIMARY) < %(_3h_IPCHI2)s) \
+               & (PT > %(_3h_PT)s*MeV) \
+               & (SUMTREE(PT,((ABSID=='K+') | (ABSID=='K-') | ('pi+'==ABSID) | ('pi-'==ABSID)),0.0) > %(_3h_PTsum)s*MeV) \
+               & (SUMTREE(P,((ABSID=='K+') | (ABSID=='K-') | ('pi+'==ABSID) | ('pi-'==ABSID)),0.0) > %(_3h_Psum)s*MeV) \
+               & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='K+') | (ABSID=='K-') | ('pi+'==ABSID) | ('pi-'==ABSID)),0.0) > %(_3h_PVIPCHI2sum)s) \
+               & (MINTREE((('K+'==ABSID) | ('K-'==ABSID) | ('pi+'==ABSID) | ('pi-'==ABSID)),TRCHI2DOF) < %(_3h_TRKCHIDOFmin)s)" % locals()
+   
+    _KKpi=CombineParticles()
+    _KKpi.DecayDescriptors  = ["[B_c+ -> K+ K- pi+]cc"]
+    _KKpi.MotherCut         = _motherCut
+    _KKpi.CombinationCut    = _combinationCut
+    _KKpi.DaughtersCuts     = _daughtersCuts
+
+    return Selection ( name,
+                       Algorithm = _KKpi,
+                       RequiredSelections = [StdNoPIDsPions, StdNoPIDsKaons])
+
+def makeKKK_excl(name,
+                 _h_PT,
+                 _h_P,
+                 _h_IPCHI2,
+                 _h_TRCHI2DOF,
+                 _h_TRGHP,      
+                 _3h_DOCA,
+                 _3h_PTmax,
+                 _3h_DIRA,
+                 _3h_FDCHI2,
+                 _3h_SVPV,
+                 _3h_CHI2,
+                 _3h_IPCHI2,
+                 _3h_PT,
+                 _3h_PTsum,
+                 _3h_Psum,
+                 _3h_PVIPCHI2sum,
+                 _3h_TRKCHIDOFmin,
+                 _3h_Mmin,
+                 _3h_Mmax,
+                 _bu3h_Mmin,
+                 _bu3h_Mmax,
+                 _probnnk) :
+
+    _daughtersCuts = {"K+" : "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (PROBNNk > %(_probnnk)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals()}
+    _combinationCut = "(((AM < %(_3h_Mmax)s*MeV) & (AM > %(_3h_Mmin)s*MeV)) | ((AM < %(_bu3h_Mmax)s*MeV) & (AM > %(_bu3h_Mmin)s*MeV))) \
+                    & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_3h_DOCA)s)" % locals()
+    _motherCut = "(MAXTREE(((ABSID=='K+') | (ABSID=='K-')),PT) > %(_3h_PTmax)s*MeV) \
+               & (BPVDIRA > %(_3h_DIRA)s) \
+               & (BPVVDCHI2 > %(_3h_FDCHI2)s) \
+               & (VFASPF(VMINVDDV(PRIMARY)) > %(_3h_SVPV)s) \
+               & (VFASPF(VCHI2) < %(_3h_CHI2)s) \
+               & (MIPCHI2DV(PRIMARY) < %(_3h_IPCHI2)s) \
+               & (PT > %(_3h_PT)s*MeV) \
+               & (SUMTREE(PT,((ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_PTsum)s*MeV) \
+               & (SUMTREE(P,((ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_Psum)s*MeV) \
+               & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_PVIPCHI2sum)s) \
+               & (MINTREE((('K+'==ABSID) | ('K-'==ABSID)),TRCHI2DOF) < %(_3h_TRKCHIDOFmin)s)" % locals()
+   
+    _KKK=CombineParticles()
+    _KKK.DecayDescriptors  = ["[B_c+ -> K+ K- K+]cc"]
+    _KKK.MotherCut         = _motherCut
+    _KKK.CombinationCut    = _combinationCut
+    _KKK.DaughtersCuts     = _daughtersCuts
+
+    return Selection ( name,
+                       Algorithm = _KKK,
+                       RequiredSelections = [StdNoPIDsKaons])
+
+def makepppi_excl(name,
+                  _h_PT,
+                  _h_P,
+                  _h_IPCHI2,
+                  _h_TRCHI2DOF,
+                  _h_TRGHP,            
+                  _3h_DOCA,
+                  _3h_PTmax,
+                  _3h_DIRA,
+                  _3h_FDCHI2,
+                  _3h_SVPV,
+                  _3h_CHI2,
+                  _3h_IPCHI2,
+                  _3h_PT,
+                  _3h_PTsum,
+                  _3h_Psum,
+                  _3h_PVIPCHI2sum,
+                  _3h_TRKCHIDOFmin,
+                  _3h_Mmin,
+                  _3h_Mmax,
+                  _bu3h_Mmin,
+                  _bu3h_Mmax,
+                  _probnnpi,
+                  _probnnp) :
+
+    _daughtersCuts = {"p+" : "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (PROBNNp > %(_probnnp)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals(),
+                      "pi+" :  "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (PROBNNpi > %(_probnnpi)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals()}
+    _combinationCut = "(((AM < %(_3h_Mmax)s*MeV) & (AM > %(_3h_Mmin)s*MeV)) | ((AM < %(_bu3h_Mmax)s*MeV) & (AM > %(_bu3h_Mmin)s*MeV))) \
+                    & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_3h_DOCA)s)" % locals()
+    _motherCut = "(MAXTREE(((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='pi+') | (ABSID=='pi-')),PT) > %(_3h_PTmax)s*MeV) \
+               & (BPVDIRA > %(_3h_DIRA)s) \
+               & (BPVVDCHI2 > %(_3h_FDCHI2)s) \
+               & (VFASPF(VMINVDDV(PRIMARY)) > %(_3h_SVPV)s) \
+               & (VFASPF(VCHI2) < %(_3h_CHI2)s) \
+               & (MIPCHI2DV(PRIMARY) < %(_3h_IPCHI2)s) \
+               & (PT > %(_3h_PT)s*MeV) \
+               & (SUMTREE(PT,((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='pi+') | (ABSID=='pi-')),0.0) > %(_3h_PTsum)s*MeV) \
+               & (SUMTREE(P,((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='pi+') | (ABSID=='pi-')),0.0) > %(_3h_Psum)s*MeV) \
+               & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='pi+') | (ABSID=='pi-')),0.0) > %(_3h_PVIPCHI2sum)s) \
+               & (MINTREE(((ABSID=='p+') |(ABSID=='p~-') |('pi+'==ABSID) | ('pi-'==ABSID)),TRCHI2DOF) < %(_3h_TRKCHIDOFmin)s)" % locals()
+   
+    _pppi=CombineParticles()
+    _pppi.DecayDescriptors  = ["[B_c+ -> p+ p~- pi+]cc"]
+    _pppi.MotherCut         = _motherCut
+    _pppi.CombinationCut    = _combinationCut
+    _pppi.DaughtersCuts     = _daughtersCuts
+
+    return Selection ( name,
+                       Algorithm = _pppi,
+                       RequiredSelections = [StdNoPIDsPions, StdLooseProtons])
+
+def makeppK_excl(name,
+                 _h_PT,
+                 _h_P,
+                 _h_IPCHI2,
+                 _h_TRCHI2DOF,
+                 _h_TRGHP,            
+                 _3h_DOCA,
+                 _3h_PTmax,
+                 _3h_DIRA,
+                 _3h_FDCHI2,
+                 _3h_SVPV,
+                 _3h_CHI2,
+                 _3h_IPCHI2,
+                 _3h_PT,
+                 _3h_PTsum,
+                 _3h_Psum,
+                 _3h_PVIPCHI2sum,
+                 _3h_TRKCHIDOFmin,
+                 _3h_Mmin,
+                 _3h_Mmax,
+                 _bu3h_Mmin,
+                 _bu3h_Mmax,
+                 _probnnk,
+                 _probnnp) :
+
+    _daughtersCuts = {"p+" : "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (PROBNNp > %(_probnnp)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals(),
+                      "K+" :  "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (PROBNNk > %(_probnnk)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals()}
+    _combinationCut = "(((AM < %(_3h_Mmax)s*MeV) & (AM > %(_3h_Mmin)s*MeV)) | ((AM < %(_bu3h_Mmax)s*MeV) & (AM > %(_bu3h_Mmin)s*MeV))) \
+                    & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_3h_DOCA)s)" % locals()
+    _motherCut = "(MAXTREE(((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='K+') | (ABSID=='K-')),PT) > %(_3h_PTmax)s*MeV) \
+               & (BPVDIRA > %(_3h_DIRA)s) \
+               & (BPVVDCHI2 > %(_3h_FDCHI2)s) \
+               & (VFASPF(VMINVDDV(PRIMARY)) > %(_3h_SVPV)s) \
+               & (VFASPF(VCHI2) < %(_3h_CHI2)s) \
+               & (MIPCHI2DV(PRIMARY) < %(_3h_IPCHI2)s) \
+               & (PT > %(_3h_PT)s*MeV) \
+               & (SUMTREE(PT,((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_PTsum)s*MeV) \
+               & (SUMTREE(P,((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_Psum)s*MeV) \
+               & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_PVIPCHI2sum)s) \
+               & (MINTREE(((ABSID=='p+') |(ABSID=='p~-') |('K+'==ABSID) | ('K-'==ABSID)),TRCHI2DOF) < %(_3h_TRKCHIDOFmin)s)" % locals()
+   
+    _ppK=CombineParticles()
+    _ppK.DecayDescriptors  = ["[B_c+ -> p+ p~- K+]cc"]
+    _ppK.MotherCut         = _motherCut
+    _ppK.CombinationCut    = _combinationCut
+    _ppK.DaughtersCuts     = _daughtersCuts
+
+    return Selection ( name,
+                       Algorithm = _ppK,
+                       RequiredSelections = [StdNoPIDsKaons, StdLooseProtons])
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2KKhh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2KKhh.py
new file mode 100644
index 000000000..27902f3f3
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2KKhh.py
@@ -0,0 +1,190 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Bs->quasi 2-body selection
+Note: This script borrows heavily from that constructed by
+Fred Blanc in the B2CharmlessQuasi2Body selection
+
+Designed to look for KKhh final states with KK around the
+phi mass
+
+2016-11-21:
+Updated for Run2 HLT line names, adding the HLT2 inclusive phi line.
+2016-11-22:
+Loosened kinematic cuts and track IP chi2 back to S20 values.
+'''
+
+__author__ = ['Sean Benson','Adam Morris','Laurence Carson']
+__date__ = '22/11/2016'
+__version__ = '3.2'
+
+__all__ = ( 'BsPhiRhoConf',
+            'mkDiTrackList',
+            'mkKKTrackList',
+            'mkBs2PRKKhh' )
+
+default_config = {
+    'NAME'        : 'BsPhiRho',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'BsPhiRhoConf',
+    'CONFIG'      : {'PRPrescale'     : 1.,
+                     'PRResMinPT'     : 900.,
+                     'PRResMinP'      : 1.,
+                     'PRResMinMass'   : 0.,
+                     'PRResMaxMass'   : 4000.,
+                     'PRResVtxChiDOF' : 9.,
+                     'PRBMinM'        : 4800.,
+                     'PRBMaxM'        : 5600.,
+                     'PRPhiWindow'    : 25.,
+                     'PRBVtxChi2DOF'  : 9.,
+                     'PRIPCHI2'       : 20,
+                     },
+    'STREAMS'     : ['Bhadron']
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdNoPIDsPions
+
+name = "BsPhiRho"
+
+class BsPhiRhoConf(LineBuilder) :
+    """
+    Builder for BsPhiRho
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+	self.name = name
+        LineBuilder.__init__(self, name, config)
+
+        self.hlt1Filter = "( HLT_PASS_RE('Hlt1(Two)?TrackMVADecision') )"
+        self.hlt2Filter = "( HLT_PASS_RE('Hlt2Topo[234]BodyDecision') | HLT_PASS_RE('Hlt2(Phi)?IncPhiDecision') )"
+        _trkFilter = FilterDesktop(Code = "(TRGHOSTPROB < 0.45) & (PT>500.*MeV) & (TRCHI2DOF < 3.5) & (MIPCHI2DV(PRIMARY) > 4.5)")
+        
+	self.TrackListhh = Selection( 'TrackList' + self.name,
+                                    Algorithm = _trkFilter,
+                                    RequiredSelections = [StdNoPIDsPions])
+
+        self.DiTrackList = mkDiTrackList( name="DiTracksForCharmlessB" + self.name,
+                                            trkList=self.TrackListhh,
+                                            MinPTCut = config['PRResMinPT'],
+                                            MinPCut = config['PRResMinP'],
+                                            MinMassCut = config['PRResMinMass'],
+                                            MaxMassCut = config['PRResMaxMass'],
+                                            VtxChi2DOFCut = config['PRResVtxChiDOF'] )
+
+        self.KKTrackList = mkKKTrackList( name="KKTracksForCharmlessB"+ self.name,
+                                            MinPTCut = config['PRResMinPT'],
+                                            MinPCut = config['PRResMinP'],
+                                            PhiWindowMassCut = config['PRPhiWindow'] )
+
+	Bs2PRName = self.name
+        self.B2CharmlessPRKKhh = mkBs2PRKKhh( Bs2PRName,
+                                               diTrkList=self.DiTrackList,
+                                               diTrkListKK=self.KKTrackList,
+                                               MinMassCut = config['PRBMinM'],
+                                               MaxMassCut = config['PRBMaxM'],
+                                               VtxChi2DOFCut = config['PRBVtxChi2DOF'],
+                                               BIPchi2Cut = config['PRIPCHI2'])
+
+        self.PRKKhhLine = StrippingLine( Bs2PRName+"Line",
+                                         prescale = config['PRPrescale'],
+                                         HLT1 = self.hlt1Filter,
+                                         HLT2 = self.hlt2Filter,
+                                         selection = self.B2CharmlessPRKKhh, EnableFlavourTagging = True,
+                                         RelatedInfoTools = [ { "Type"         : "RelInfoConeVariables",
+                                                                "ConeAngle"    : 0.8,
+                                                                "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                                "TopSelection" : self.TrackListhh,
+                                                                "Location"     : 'P2ConeVar08' },
+                                                              { "Type"         : "RelInfoConeVariables",
+                                                                "ConeAngle"    : 1.0,
+                                                                "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                                "TopSelection" : self.TrackListhh,
+                                                                "Location"     : 'P2ConeVar10' },
+                                                              { "Type"         : "RelInfoConeVariables",
+                                                                "ConeAngle"    : 1.3,
+                                                                "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                                "TopSelection" : self.TrackListhh,
+                                                                "Location"     : 'P2ConeVar13' },
+                                                              { "Type"         : "RelInfoConeVariables",
+                                                                "ConeAngle"    : 1.7,
+                                                                "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                                "TopSelection" : self.TrackListhh,
+                                                                "Location"     : 'P2ConeVar17' },
+                                                              { "Type"         : "RelInfoVertexIsolation",
+                                                                "Location"     : "VertexIsoInfo" } ] )
+
+        self.registerLine(self.PRKKhhLine)
+
+def mkDiTrackList( name,
+                     trkList,
+                     MinPTCut,
+                     MinPCut,
+                     MinMassCut,
+                     MaxMassCut,
+                     VtxChi2DOFCut ) :
+    """
+    Di-track selection
+    """
+    _diTrackPreVertexCuts = "(APT> %(MinPTCut)s *MeV) & (AP> %(MinPCut)s *GeV) & in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" % locals()
+    _diTrackPostVertexCuts = "(VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s )"% locals()
+    
+    _combineDiTrack = CombineParticles( DecayDescriptor="rho(770)0 -> pi+ pi-",
+					CombinationCut = _diTrackPreVertexCuts,
+                                         MotherCut = _diTrackPostVertexCuts )
+
+    return Selection(name,
+                     Algorithm = _combineDiTrack,
+                     RequiredSelections = [ trkList ] )
+
+def mkKKTrackList( name,
+                     MinPTCut,
+                     MinPCut,
+                     PhiWindowMassCut ) :
+    """
+    KK selection
+    """
+
+    _code = "(ADMASS('phi(1020)')< %(PhiWindowMassCut)s *MeV) & (PT> %(MinPTCut)s *MeV) & (P> %(MinPCut)s *GeV)" % locals()
+    _stdPhi = DataOnDemand(Location="Phys/StdTightPhi2KK/Particles")
+    _phiFilter = FilterDesktop(Code = _code)
+
+    return Selection (name,
+                      Algorithm = _phiFilter,
+                      RequiredSelections = [_stdPhi])
+
+def mkBs2PRKKhh( name,
+                  diTrkList,
+                  diTrkListKK,
+                  MinMassCut,
+                  MaxMassCut,
+                  VtxChi2DOFCut,
+                 BIPchi2Cut) :
+    """
+    Bs to KKhh selection
+    """
+    _B2PRPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" % locals()
+    _B2PRPostVertexCuts = "(BPVDIRA > 0.9999) & (MIPCHI2DV(PRIMARY) < %(BIPchi2Cut)s) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s )" % locals()
+
+    _combineB2PR = CombineParticles( DecayDescriptor="B0 -> phi(1020) rho(770)0",
+                                      MotherCut = _B2PRPostVertexCuts,
+                                      CombinationCut = _B2PRPreVertexCuts )
+
+
+    return Selection(name,
+                     Algorithm = _combineB2PR,
+                     RequiredSelections = [ diTrkList, diTrkListKK ])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2KSKS_Run2.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2KSKS_Run2.py
new file mode 100644
index 000000000..12f1d5a15
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2KSKS_Run2.py
@@ -0,0 +1,198 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+"""
+Module for construction of Bs->KSKS (including the Bd mass region) stripping Selections and StrippingLines.
+Provides functions to build, KS->LL (from StdLooseKsLL), KS->DD (from StdLooseKsDD), Bs->KSLL KSLL (BsLL), Bs->KSLL KSDD (BsLD) and Bs->KSDD KSDD (BsDD) selections.
+Provides class Bs2KSKSConf, which constructs the Selections and StrippingLines given a configuration dictionary. 
+Exported symbols (use python help!):
+    - Bs2KSKSConf
+"""
+
+__author__ = ['Moritz Demmer','Timon Schmelzer']
+__date__ = '13/09/2016'
+__version__ = 'Run2'
+__all__ = {'Bs2KSKSConf', 'default_config'}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdNoPIDsPions as Pions
+from StandardParticles import StdNoPIDsDownPions as DownPions
+
+
+default_config = {
+    'NAME'        : 'Bs2KSKS',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Bs2KSKSConf',
+    'CONFIG'      : { 'KS0_LL_MassWindow'       : 50.0,
+                      'KS0_DD_MassWindow'       : 80.0,
+                      'KS0_LL_FDChi2'           : 5,
+                      'KS0_DD_FDChi2'           : 5,
+                      'KS0_Dira'                : 0.999,
+                      ##################################################
+                      'B_M_Min'                 : 4000,
+                      'B_M_Max'                 : 6500,
+                      'B_LL_Doca'               : 1,
+                      'B_LD_Doca'               : 4,
+                      'B_DD_Doca'               : 4,
+                      'B_LL_VtxChi2'            : 20.0,
+                      'B_LD_VtxChi2'            : 30.0,
+                      'B_DD_VtxChi2'            : 40.0,
+                      'B_Dira'                  : 0.999,
+                      ##################################################
+                      'Trk_Chi2'                : 4,
+                      'Trk_Ghost'               : 0.5
+                     },
+    'STREAMS'     : ['Bhadron'],
+    }
+
+
+class Bs2KSKSConf(LineBuilder) :
+    """
+    Builder of B->KSKS stripping Selection and StrippingLine.
+    Constructs B -> KS KS Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> bs2ksksConf = Bs2KSKSConf('Bs2KSKSTest',config)
+    >>> bs2ksksLines = bs2ksksConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+
+    selKS2LL               : KS -> Long Long Selection object
+
+    selKS2DD              : KS -> Downstream Downstream Selection object
+
+    selBs2KSLLKSLL            : B -> KS(LL) KS(LL) Selection object
+    ll_line                : StrippingLine made out of selBs2KSLLKSLL
+    lines                  : List of lines, [ll_line]
+
+    selBs2KSLLKSDD           : B -> KS(LL) KS(DD) Selection object
+    ld_line                : StrippingLine made out of selBs2KSLLKSDD
+    lines                  : List of lines, [ld_line]
+
+    selBs2KSDDKSDD            : B -> KS(DD) KS(DD) Selection object
+    dd_line                : StrippingLine made out of selBs2KSDDKSDD
+    lines                  : List of lines, [dd_line]
+
+    Exports as class data member:
+    Bs2KSKSConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        ll_name = name+'_LL'
+        dd_name = name+'_DD'
+        ld_name = name+'_LD'
+
+        # self.makeKS2DD( 'KSfor'+dd_name, config )
+        self.KS_LL = self.makeKS( 'KSfor' + ll_name, 'LL', config )
+        self.KS_DD = self.makeKS( 'KSfor' + dd_name, 'DD', config )
+
+
+        # self.Bs2KSLLKSLL = makeBs2KSLLKSLL( ll_name, config )
+        self.ll_line = StrippingLine(ll_name+'_Run2_Line',
+            selection =  self.makeBs2KSKS( ll_name, 'LL', config )
+            )
+
+        # self.Bs2KSLLKSDD = makeBs2KSLLKSDD( ld_name, config )
+        self.ld_line = StrippingLine(ld_name+'_Run2_Line',
+            selection =  self.makeBs2KSKS( ld_name, 'LD', config )
+            )
+
+        # self.Bs2KSDDKSDD = makeBs2KSDDKSDD( dd_name, config )
+        self.dd_line = StrippingLine(dd_name+'_Run2_Line',
+            selection =  self.makeBs2KSKS( dd_name, 'DD', config )
+            )
+
+        # Register Lines
+        self.registerLine(self.ll_line)
+        self.registerLine(self.dd_line)
+        self.registerLine(self.ld_line)
+
+
+
+    def makeKS( self, name, ks_type, config ) :
+        # Define all the cuts
+        _mass_cut     = "(ADMASS('KS0')<{}*MeV)".format( config['KS0_' + ks_type + '_MassWindow'] )
+        _fd_cut       = "(BPVVDCHI2>{})".format(         config['KS0_' + ks_type + '_FDChi2'] )
+
+        _trkchi2_cut_1 = "(CHILDCUT((TRCHI2DOF<{}),1))".format(    config['Trk_Chi2'] )
+        _trkchi2_cut_2 = "(CHILDCUT((TRCHI2DOF<{}),2))".format(    config['Trk_Chi2'] )
+        _trkghost_cut_1 = "(CHILDCUT((TRGHOSTPROB<{}),1))".format( config['Trk_Ghost'] )
+        _trkghost_cut_2 = "(CHILDCUT((TRGHOSTPROB<{}),2))".format( config['Trk_Ghost'] )
+
+        # Combine the cut
+        _all_cuts = '&'.join([_mass_cut, _fd_cut,  # _dira_cut,
+                              _trkchi2_cut_1, _trkchi2_cut_2])
+
+        if ks_type == 'LL':
+           _all_cuts = '&'.join([_all_cuts, _trkghost_cut_1, _trkghost_cut_2])
+
+        # Get the KS's to filter
+        _stdKS = DataOnDemand( Location = 'Phys/StdLooseKs' + ks_type + '/Particles' )
+
+        # Make the filter
+        _filterKS = FilterDesktop( Code = _all_cuts )
+
+        return Selection( 'selKS_' + ks_type + '_' + name, Algorithm = _filterKS,
+                          RequiredSelections = [_stdKS] )
+
+
+
+    def makeBs2KSKS( self, name, ks_type, config ) :
+        _mass_min_cut = "(AM>{}*MeV)".format(          config['B_M_Min'] )
+        _mass_max_cut = "(AM<{}*MeV)".format(          config['B_M_Max'] )
+        _doca_cut     = "(ACUTDOCA({}*mm,''))".format( config['B_' + ks_type + '_Doca'] )
+
+        _combCuts = '&'.join( [_mass_min_cut, _mass_max_cut, _doca_cut] )
+
+
+        _vtx_cut  = "(VFASPF(VCHI2)<{})".format( config['B_' + ks_type + '_VtxChi2'] )
+        _dira_cut = "(BPVDIRA>{})".format(       config['B_Dira'] )
+        
+        _motherCuts = '&'.join([ _vtx_cut, _dira_cut])
+        
+        if ks_type == 'LD':
+          _motherCuts += " & INTREE((ABSID=='pi+') & (ISLONG)) & INTREE((ABSID=='pi+') & (ISDOWN))"
+        
+        _B = CombineParticles()
+        _B.DecayDescriptors = [ "B_s0 -> KS0 KS0" ]
+
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        if ks_type == 'LL':
+          return Selection(name, Algorithm = _B, RequiredSelections = [ self.KS_LL ])
+        if ks_type == 'LD':
+          return Selection(name, Algorithm = _B, RequiredSelections = [ self.KS_LL, self.KS_DD ])
+        if ks_type == 'DD':
+          return Selection(name, Algorithm = _B, RequiredSelections = [ self.KS_DD ])
+
+# StdLooseKsDD:
+# DaughtersCuts {'pi+': '(P > 2.*GeV) & (MIPCHI2DV(PRIMARY) > 4.)'}
+# CombinationCut  (ADAMASS('KS0') < 80.*MeV) & (ADOCACHI2CUT(25, ''))
+# MotherCut (ADMASS('KS0') < 64.*MeV) & (VFASPF(VCHI2) < 25.)
+
+# StdLooseKsLL:
+# DaughtersCuts {'pi+': '(P > 2.*GeV) & (MIPCHI2DV(PRIMARY) > 9.)'}
+# CombinationCut  (ADAMASS('KS0') < 50.*MeV) & (ADOCACHI2CUT(25, ''))
+# MotherCut (ADMASS('KS0') < 35.*MeV) & (VFASPF(VCHI2) < 25.)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2Kst_0Kst_0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2Kst_0Kst_0.py
new file mode 100644
index 000000000..ca6004dff
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2Kst_0Kst_0.py
@@ -0,0 +1,237 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of Bs-->K*_0(1430)0 K*_0(1430)~0 stripping selections and lines
+
+Exported symbols (use python help!):
+   - StrippingBs2Kst_0Kst_0Conf
+   - makeBs2Kst_0Kst_0
+   - makeKst_02Kpi
+'''
+
+__author__ = ['Brais Sanmartin Sedes']
+__date__ = '12/11/2015'
+__version__= '5.1'
+
+__all__=('StrippingBs2Kst_0Kst_0Conf',
+         'makeBs2Kst_0Kst_0',
+         'makeKst_02Kpi',
+         'default_config')
+
+
+
+default_config = {
+     'NAME'        : 'Bs2K0stK0st',
+     'WGs'         : ['BnoC'],
+     'BUILDERTYPE' : 'StrippingBs2Kst_0Kst_0Conf',
+     'CONFIG'      : {"KaonPT"         : 500.0,
+                      "KaonIPCHI2"     : 9.,
+                      "PionPT"         : 500.0,
+                      "PionIPCHI2"     : 9.,
+                      "PionPIDK"       : 0.,
+                      "KstarVCHI2"     : 9.0,
+                      "KstarPT"        : 900.0,
+                      "KaonPIDK"       : 2.0,
+                      "KstarMassWin"   : 800.0,
+                      "KstarAPT"       : 800.0,
+                      "BMassWin"       : 500.0,
+                      "BVCHI2"         : 15.0,
+                      "BDOCA"          : 0.3,
+                      "BIPCHI2"        : 25.,
+                      "BFDistanceCHI2" : 81.,
+                      "SumPT"          : 5000,
+                      "MaxGHOSTPROB"   : 0.8,
+                      "BDIRA"          : 0.99
+                                          },
+     'STREAMS'     : ['BhadronCompleteEvent']
+     }
+
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+from CommonParticles.Utils import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, SelectionSequence, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+default_name = "Bs2Kst_0Kst_0"
+
+
+class StrippingBs2Kst_0Kst_0Conf(LineBuilder):
+     """
+     Builder of:
+     - Bs-> Kst_0(1430)0 anti-Kst_0(1430)0 stripping line (Bs2Kst_0Kst_0)
+     
+
+     Usage:
+     >>> config = { .... }
+     >>> bsConf = StrippingBs2KstKst_0Conf('Bs2KstKst_0Test',config)
+     >>> bsLines = bsConf.lines
+     >>> for line in line :
+     >>>  print line.name(), line.outputLocation()
+     The lines can be used directly to build a StrippingStream object.
+
+
+     Exports as instance data members:
+     selKst_02Kpi             : nominal Kst_0->Kpi Selection object
+     selBs2Kst_0Kst_0         : nominal Bs -> Kst_0(1430)(K+pi-) anti-Kst_0(1430)(K-pi+) Selection object
+     Bs2Kst_0Kst_0_line         : StrippingLine made out of selBs2Kst_0Kst_0
+     
+     lines                    : List of lines, [Bs2Kst_0Kst_0_line]
+    
+     Exports as class data member:
+     StrippingBs2Kst_0Kst_0Conf.__configuration_keys__ : List of required configuration parameters.
+     """
+
+     __configuration_keys__ = default_config['CONFIG'].keys()
+
+     def __init__(self, name, config) :
+
+          LineBuilder.__init__(self, name, config)
+
+          Kst_0Kst_0_name = name+"Nominal"
+
+
+          self.selKst_02Kpi = makeKst_02Kpi('Kst_02KpiFor'+name,
+                                        KaonPT = config['KaonPT'],
+                                        KaonIPCHI2 = config['KaonIPCHI2'],
+                                        PionPT = config['PionPT'],
+                                        PionIPCHI2 = config['PionIPCHI2'],
+                                        KstarPT = config["KstarPT"],
+                                        KstarAPT = config["KstarAPT"],
+                                        KaonPIDK = config['KaonPIDK'],
+                                        KstarVCHI2 = config['KstarVCHI2'],
+                                        KstarMassWin = config['KstarMassWin'],
+                                        PionPIDK = config['PionPIDK'],
+                                        MaxGHOSTPROB = config['MaxGHOSTPROB'])
+
+
+
+          self.selBs2Kst_0Kst_0 = makeBs2Kst_0Kst_0(Kst_0Kst_0_name,
+                                            Kst_0sel = self.selKst_02Kpi,
+                                            BMassWin = config['BMassWin'],
+                                            BVCHI2 = config['BVCHI2'],
+                                            BDOCA = config['BDOCA'],
+                                            BIPCHI2 = config['BIPCHI2'],
+                                            BFDistanceCHI2 = config['BFDistanceCHI2'],
+                                            SumPT = config['SumPT'],
+                                            BDIRA = config['BDIRA'])
+          
+        
+          self.Bs2Kst_0Kst_0_line = StrippingLine(Kst_0Kst_0_name+"Line",
+                                              prescale = 1,
+                                              postscale = 1,
+                                              algos = [ self.selBs2Kst_0Kst_0 ],
+                                              EnableFlavourTagging = True,
+                                              MDSTFlag = False)
+        
+
+          self.registerLine(self.Bs2Kst_0Kst_0_line)
+
+
+
+
+        
+def makeKst_02Kpi(name,
+                KaonPT,
+                KaonIPCHI2,
+                PionPT,
+                PionIPCHI2,
+                KstarPT,
+                KstarAPT,
+                KaonPIDK,
+                KstarVCHI2,
+                KstarMassWin,
+                PionPIDK,
+                MaxGHOSTPROB):
+
+    """
+    Create and return a Kstar_0(1430) -> K+pi- Selection object.
+    Starts from DataOnDemand 'Phys/StdLoosePions' and 'Phys/StdLooseKaons'.
+    Arguments:
+    name             : name of the Selection.
+    KaonPT           : Minimum transverse momentum of K (MeV).
+    KaonIPCHI2       : Minimum impact parameter chi2 of K.
+    PionPT           : Minimum transverse momentum of pi (MeV).
+    PionIPCHI2       : Minimum impact parameter chi2 of pi.
+    PionPIDK         : Maximum PID_{K-pi} of pi.
+    KstarPT          : Minimum transverse momentum of Kstar (MeV).
+    KstarAPT         : Minimum transverse momentum of Kpi (MeV).
+    KaonPIDK         : Minimum PID_{K-pi} of K.
+    KstarVCHI2       : Maximum Kstar vertex chi2 per degree of freedom.
+    KstarMassWin     : Kstar invariant mass window around PDG mass value (MeV).
+    MaxGHOSTPROB     : Maximum Ghost Probability
+    """
+
+
+    _stdKaons = DataOnDemand(Location="Phys/StdLooseKaons/Particles")
+    _stdPions = DataOnDemand(Location="Phys/StdLoosePions/Particles")
+
+
+    _Kstar_02Kpi = CombineParticles ()
+
+    _Kstar_02Kpi.DecayDescriptor = "[K*_0(1430)0 -> K+ pi-]cc"
+    _Kstar_02Kpi.DaughtersCuts = {"K+" : "(PT > %(KaonPT)s *MeV) & (PIDK > %(KaonPIDK)s) & (MIPCHI2DV(PRIMARY)> %(KaonIPCHI2)s) & (TRGHOSTPROB < %(MaxGHOSTPROB)s)"% locals()
+                                ,"pi-" : "(PT > %(PionPT)s *MeV) & (PIDK < %(PionPIDK)s) & (MIPCHI2DV(PRIMARY)> %(PionIPCHI2)s) & (TRGHOSTPROB < %(MaxGHOSTPROB)s)"% locals()}
+                                
+    _Kstar_02Kpi.CombinationCut = "(ADAMASS('K*_0(1430)0') < %(KstarMassWin)s *MeV) & (APT > %(KstarAPT)s *MeV)"% locals()
+    _Kstar_02Kpi.MotherCut = "(VFASPF(VCHI2/VDOF)< %(KstarVCHI2)s) & (PT > %(KstarPT)s *MeV)"% locals()
+
+
+
+    return Selection (name,
+                      Algorithm = _Kstar_02Kpi,
+                      RequiredSelections = [_stdKaons,_stdPions])
+
+
+
+
+def makeBs2Kst_0Kst_0(name,
+                  Kst_0sel,
+                  BMassWin,
+                  BVCHI2,
+                  BDOCA,
+                  BIPCHI2,
+                  BFDistanceCHI2,
+                  SumPT,
+                  BDIRA):
+
+       """
+       Create and return a Bs -> Kstar_0(1430)(Kpi) anti-Kstar_0(1430)(Kpi) Selection object.
+       Arguments:
+       name           : name of the Selection.
+       Kst_0sel       : Kst_0(1430) -> K+pi- Selection object.
+       BMassWin       : Bs invariant mass window around PDG mass value (MeV).
+       BVCHI2         : Maximum Bs vertex chi2 per degree of freedom.
+       BDOCA          : Maximum Bs DOCA.
+       BFDistanceCHI2 : Minimum Bs Flight Distance chi2.
+       SumPT          : Sum|pT| of the daughters.
+       """ 
+       
+       _motherCuts = " (VFASPF(VCHI2/VDOF) < %(BVCHI2)s) & (MIPCHI2DV(PRIMARY)< %(BIPCHI2)s) & (BPVVDCHI2 > %(BFDistanceCHI2)s) & (BPVDIRA > %(BDIRA)s)"% locals()
+       _combinationCut = "(ADAMASS('B_s0') < %(BMassWin)s *MeV) & (AMAXDOCA('',False)< %(BDOCA)s *mm) "\
+                         "& ( (AMINCHILD(PT,ID=='K+') + AMINCHILD(PT,ID=='K-') + AMINCHILD(PT,ID=='pi-') + AMINCHILD(PT,ID=='pi+'))> %(SumPT)s *MeV)" % locals() 
+
+       _Bs = CombineParticles()
+       _Bs.DecayDescriptor = "B_s0 -> K*_0(1430)0 K*_0(1430)~0"
+       _Bs.CombinationCut = _combinationCut
+       _Bs.MotherCut = _motherCuts
+
+       _Bs.ReFitPVs = True
+
+       return Selection ( name,
+                          Algorithm = _Bs,
+                          RequiredSelections = [Kst_0sel])
+
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2PhiKst0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2PhiKst0.py
new file mode 100644
index 000000000..5e3e6cbdf
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2PhiKst0.py
@@ -0,0 +1,253 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of Bs-->PhiK*0 stripping selections and lines
+
+Exported symbols (use python help!):
+   - StrippingBs2PhiKstConf
+   - makeBs2PhiKst
+   - makeKst2Kpi
+   - makePhi2KK
+'''
+
+__author__ = ['Brais Sanmartin Sedes']
+__date__ = '01/12/2015'
+__version__= '5.0'
+
+__all__=('StrippingBs2PhiKstConf',
+         'makeBs2PhiKst',
+         'makeKst2Kpi',
+         'makePhi2KK',
+	 'default_config')
+
+
+default_config = {
+	"NAME"	      	: "Bs2PhiKst",
+	"WGs"	      	: ['BnoC'],
+	"BUILDERTYPE" 	: 'StrippingBs2PhiKstConf',
+	"CONFIG"	: {"KaonPT"                : 500.0, 
+                           "KaonIPCHI2"            : 9.,    
+                           "KaonPIDK"              : 0.,    
+                           "PionPT"                : 500.0, 
+                           "PionIPCHI2"            : 9.,    
+                           "PionPIDK"              : 10.,    
+                           "PhiVCHI2"              : 9.,    
+                           "PhiPT"                 : 900.0, 
+                           "PhiMassWin"            : 25.0,  
+                           "KstarVCHI2"            : 9.0,   
+                           "KstarPT"               : 900.0, 
+                           "KstarMassWin"          : 150.0, 
+                           "BMassWin"              : 500.0, 
+                           "BVCHI2"                : 15.0,  
+                           "BDOCA"                 : 0.3,   
+                           "BDIRA"                    : 0.99     
+          					            },
+	"STREAMS"	: ['Bhadron']
+	}
+
+
+
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+from CommonParticles.Utils import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, SelectionSequence, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+default_name = "Bs2PhiKst"
+
+
+class StrippingBs2PhiKstConf(LineBuilder):
+     """
+     Builder of:
+     - Bs-> Phi Kst0 stripping line (Bs2PhiKst)
+
+     Usage:
+     >>> config = { .... }
+     >>> bsConf = StrippingBs2PhiKstConf('Bs2PhiKstTest',config)
+     >>> bsLines = bsConf.lines
+     >>> for line in line :
+     >>>  print line.name(), line.outputLocation()
+     The lines can be used directly to build a StrippingStream object.
+
+
+     Exports as instance data members:
+     selKst2Kpi               : nominal Kst->Kpi Selection object
+     selBs2KstKst             : nominal Bs -> Kst(K+pi-) anti-Kst(K-pi+) Selection object
+     Bs2KstKst_line           : StrippingLine made out of selBs2KstKst
+     lines                    : List of lines, [Bs2KstKst_line]
+    
+     Exports as class data member:
+     StrippingBs2PhiKstConf.__configuration_keys__ : List of required configuration parameters.
+     """
+ 
+     __configuration_keys__ = default_config['CONFIG'].keys()
+
+     def __init__(self, name, config) :
+
+          LineBuilder.__init__(self, name, config)
+
+          PhiKst_name = name+"Nominal"
+
+          self.selKst2Kpi = makeKst2Kpi('Kst2KpiFor'+name,
+                                        KaonPT = config['KaonPT'],
+                                        KaonIPCHI2 = config['KaonIPCHI2'],
+                                        PionPT = config['PionPT'],
+                                        PionIPCHI2 = config['PionIPCHI2'],
+                                        PionPIDK = config['PionPIDK'],
+                                        KstarPT = config["KstarPT"],
+                                        KaonPIDK = config['KaonPIDK'],
+                                        KstarVCHI2 = config['KstarVCHI2'],
+                                        KstarMassWin = config['KstarMassWin'])
+
+          self.selPhi2KK = makePhi2KK('Phi2KKFor'+name,
+                                    KaonPT = config['KaonPT'],
+                                    KaonIPCHI2 = config['KaonIPCHI2'],
+                                    KaonPIDK = config['KaonPIDK'],
+                                    PhiMassWin = config['PhiMassWin'],
+                                    PhiPT = config['PhiPT'],
+                                    PhiVCHI2 = config['PhiVCHI2'])
+          
+          self.selBs2PhiKst = makeBs2PhiKst(PhiKst_name,
+                                            Phisel = self.selPhi2KK,
+                                            Kstsel = self.selKst2Kpi,
+                                            BMassWin = config['BMassWin'],
+                                            BVCHI2 = config['BVCHI2'],
+                                            BDOCA = config['BDOCA'],
+                                            BDIRA = config['BDIRA'])
+          
+          self.Bs2PhiKst_line = StrippingLine(PhiKst_name+"Line",
+                                              prescale = 1,
+                                              postscale = 1,
+                                              algos = [ self.selBs2PhiKst ]
+                                              )
+
+          self.registerLine(self.Bs2PhiKst_line)
+
+
+def makePhi2KK( name,
+                KaonPT,
+                KaonIPCHI2,
+                KaonPIDK,
+                PhiMassWin,
+                PhiPT,
+                PhiVCHI2):
+
+    """
+    Create and return a Phi -> KK Selection object.
+    Starts from DataOnDemand 'Phys/StdLoosePhi2KK'.
+    Arguments:
+    name             : name of the Selection.
+    KaonPT           : Minimum transverse momentum of K (MeV).
+    KaonIPCHI2       : Minimum impact parameter chi2 of K.
+    KaonPIDK         : Minimum PID_{K-pi} of K.
+    PhiPT            : Minimum transverse momentum of Phi (MeV).
+    PhiMassWin       : Phi invariant mass window around PDG mass value (MeV).
+    PhiVCHI2         : Maximum Phi vertex chi2 (per degree of freedom?)
+    """
+
+    _stdKaons = DataOnDemand(Location="Phys/StdLooseKaons/Particles")
+
+    _Phi2KK = CombineParticles()
+    _Phi2KK.DecayDescriptor = "phi(1020) -> K+ K-"
+
+    _Phi2KK.DaughtersCuts = {"K+": "(PT>%(KaonPT)s*MeV)&(MIPCHI2DV(PRIMARY)>%(KaonIPCHI2)s)&(PIDK > %(KaonPIDK)s)" % locals()}
+
+    _Phi2KK.CombinationCut = "(ADAMASS('phi(1020)') < %(PhiMassWin)s *MeV)"% locals()
+    _Phi2KK.MotherCut = "(VFASPF(VCHI2/VDOF)< %(PhiVCHI2)s) & (PT > %(PhiPT)s *MeV)"% locals()
+
+
+
+    return Selection (name,
+                      Algorithm = _Phi2KK,
+                      RequiredSelections = [_stdKaons])
+
+
+
+def makeKst2Kpi(name,
+                KaonPT,
+                KaonIPCHI2,
+                PionPT,
+                PionIPCHI2,
+                PionPIDK,
+                KstarPT,
+                KaonPIDK,
+                KstarVCHI2,
+                KstarMassWin):
+
+    """
+    Create and return a Kstar -> K+pi- Selection object.
+    Starts from DataOnDemand 'Phys/StdVeryLooseKaons'.
+    Arguments:
+    name             : name of the Selection.
+    KaonPT           : Minimum transverse momentum of K (MeV).
+    KaonIPCHI2       : Minimum impact parameter chi2 of K.
+    PionPT           : Minimum transverse momentum of pi (MeV).
+    PionIPCHI2       : Minimum impact parameter chi2 of pi.
+    PionPIDK         : Maximum PID_{K-pi} of pi.
+    KstarPT          : Minimum transverse momentum of Kstar (MeV).
+    KaonPIDK         : Minimum PID_{K-pi} of K.
+    KstarVCHI2       : Maximum Kstar vertex chi2 per degree of freedom.
+    KstarMassWin     : Kstar invariant mass window around PDG mass value (MeV).
+    """
+
+    _stdKaons = DataOnDemand(Location="Phys/StdLooseKaons/Particles")
+    _stdPions = DataOnDemand(Location="Phys/StdLoosePions/Particles")
+
+    _Kstar2Kpi = CombineParticles()
+
+    _Kstar2Kpi.DecayDescriptor = "[K*(892)0 -> K+ pi-]cc"
+    _Kstar2Kpi.DaughtersCuts = {"K+" : "(PT > %(KaonPT)s *MeV) & (PIDK > %(KaonPIDK)s) & (MIPCHI2DV(PRIMARY)> %(KaonIPCHI2)s)" % locals()
+                                ,"pi-" : "(PT > %(PionPT)s *MeV) & (PIDK < %(PionPIDK)s) & (MIPCHI2DV(PRIMARY)> %(PionIPCHI2)s)"% locals()}
+
+    _Kstar2Kpi.CombinationCut = "(ADAMASS('K*(892)0') < %(KstarMassWin)s *MeV)"% locals()
+    _Kstar2Kpi.MotherCut = "(VFASPF(VCHI2/VDOF)< %(KstarVCHI2)s) & (PT > %(KstarPT)s *MeV)"% locals()
+
+
+    return Selection (name,
+                      Algorithm = _Kstar2Kpi,
+                      RequiredSelections = [_stdKaons,_stdPions])
+
+
+def makeBs2PhiKst(name,
+                  Phisel,
+                  Kstsel,
+                  BMassWin,
+                  BVCHI2,
+                  BDOCA,
+                  BDIRA):
+       """
+       Create and return a Bs -> Phi (KK) Kstar (Kpi) Selection object.
+       Arguments:
+       name        : name of the Selection.
+       Phisel      : Phi -> K+K- Selection object.
+       Kstsel      : Kst -> K+pi- Selection object.
+       BMassWin    : Bs invariant mass window around PDG mass value (MeV).
+       BVCHI2      : Maximum Bs vertex chi2 per degree of freedom.
+       BDOCA       : Maximum Bs DOCA.
+       """ 
+       
+       _motherCuts = "(VFASPF(VCHI2/VDOF) < %(BVCHI2)s) & (BPVDIRA > %(BDIRA)s)"% locals()
+       _combinationCut = "(ADAMASS('B_s0') < %(BMassWin)s *MeV) & (AMAXDOCA('',False)< %(BDOCA)s *mm)" % locals() 
+
+       _Bs = CombineParticles()
+       _Bs.DecayDescriptor = "[B_s0 -> phi(1020) K*(892)~0]cc"
+       _Bs.CombinationCut = _combinationCut
+       _Bs.MotherCut = _motherCuts
+
+       _Bs.ReFitPVs = True
+
+
+       return Selection ( name,
+                          Algorithm = _Bs,
+                          RequiredSelections = [Phisel,Kstsel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2PhiPhi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2PhiPhi.py
new file mode 100644
index 000000000..0604557df
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBs2PhiPhi.py
@@ -0,0 +1,239 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingBs2PhiPhi.py, 2010-10-25 01:15 schleich Exp $
+
+'''
+Bs -> phi phi stripping selection.
+
+Provides class StrippingBs2PhiPhiConf with methods to return stripping line objects.
+
+Exports the following stripping lines as instance data members:
+- Bs2PhiPhiLine      : main line with phi mass window of +/- 25 MeV/cc
+- Bs2PhiPhiWideLine  : prescaled phi sideband line with MM(phi) < 1100 MeV/cc
+- Bs2PhiPhiUpLine  : same as nominal line but enforces at least one upstream kaon
+- lines              : list with lines
+'''
+
+__author__  = [ 'Sean Benson' ]
+__date__    = '2013/08/15'
+__version__    = '3.0'
+
+
+'''
+Bs->PhiPhi stripping selection
+'''
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+import StandardParticles
+#from StandardParticles import StdLooseANNKaons as MyLooseKaons
+from StandardParticles import StdLooseANNUpKaons as MyLooseUpKaons
+#if hasattr(StandardParticles, "StdAllLooseKaons"):
+#  from StandardParticles import StdAllLooseKaons as MyLooseKaons
+#else:
+#  from StandardParticles import StdLooseKaons as MyLooseKaons
+from StandardParticles import StdAllLooseANNKaons as MyLooseKaons
+
+default_config = {
+    'NAME'        : 'BetaSBs2PhiPhi',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'StrippingBs2PhiPhiConf',
+    'CONFIG'      : {'KaonPT'              : 400      # MeV/c
+                     , 'KaonIPCHI2'          : 0.0      # adimensional
+                     , 'PhiPT'               : 0        # MeV/c
+                     , 'PhiPTsq'             : 1.2      # GeV*GeV/cc
+                     , 'PhiVertexCHI2pDOF'   : 15       # adimensional
+                     , 'PhiMassWindow'       : 25       # MeV/cc
+                     , 'PhiMassMax'          : 1090     # MeV/cc
+                     , 'BsVertexCHI2pDOF'    : 15       # adimensional
+                     , 'BsMassWindow'        : 300      # MeV/cc
+                     , 'WidePrescale'        : 0.15     # adimensional
+                     },
+    'STREAMS'     : { 'BhadronCompleteEvent' : ['StrippingBetaSBs2PhiPhiLine',
+                                                #'StrippingBetaSBs2PhiPhiUpLine'
+                                                ],
+                      'Bhadron'              : ['StrippingBetaSBs2PhiPhiWideLine']
+                    }
+    }
+
+class StrippingBs2PhiPhiConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+      LineBuilder.__init__(self, name, config)
+
+      self.Bs2PhiPhiLine     = self._Bs2PhiPhi_X_Line( name,        config, False )
+      self.Bs2PhiPhiWideLine = self._Bs2PhiPhi_X_Line( name+"Wide", config, True )
+#      self.Bs2PhiPhiUpLine   = self._Bs2PhiPhiUp_X_Line( name+"Up", config )
+      self.registerLine( self.Bs2PhiPhiLine )
+      self.registerLine( self.Bs2PhiPhiWideLine )
+#      self.registerLine( self.Bs2PhiPhiUpLine )
+
+
+    def _Bs2PhiPhi_X_Line( self, name, config, wide ) :
+
+            Phi2KK_DC = "(TRGHOSTPROB < 0.5) & (PT>%(KaonPT)s*MeV)&(MIPCHI2DV(PRIMARY)>%(KaonIPCHI2)s)" % config
+            Phi2KK_CC = "(AM<(%(PhiMassMax)s+30)*MeV)" % config
+            #Phi2KK_CC = "(AM<(%(PhiMassMax)s+30)*MeV)&(ADOCACHI2CUT(40, ''))" % config
+
+            Phi2KK_MassCut = ""
+            if wide == False :
+              Phi2KK_MassCut = "&(ADMASS('phi(1020)')<%(PhiMassWindow)s*MeV)" % config
+            else :
+              Phi2KK_MassCut = "&(MM<%(PhiMassMax)s*MeV)" % config
+
+            Phi2KK_MC = "(VFASPF(VCHI2/VDOF)<%(PhiVertexCHI2pDOF)s)" % config + Phi2KK_MassCut
+
+            Bs2PhiPhi_DC = "(PT>%(PhiPT)s*MeV)" % config
+            Bs2PhiPhi_CC = "(ADAMASS('B_s0')<((%(BsMassWindow)s+30)*MeV))&(ACHILD(PT,1)*ACHILD(PT,2)>%(PhiPTsq)s*GeV*GeV)" % config
+            Bs2PhiPhi_MC = "(BPVDIRA > 0.999) & (VFASPF(VCHI2/VDOF)<%(BsVertexCHI2pDOF)s)&(ADMASS('B_s0')<%(BsMassWindow)s*MeV)" % config
+            ps = 1.0
+            if wide == True :
+              ps = config['WidePrescale']
+
+    	    #print "Cuts for "+name+"Line"
+            #print Phi2KK_DC
+            #print Phi2KK_CC
+            #print Phi2KK_MC
+
+    	    #print Bs2PhiPhi_DC
+    	    #print Bs2PhiPhi_CC
+    	    #print Bs2PhiPhi_MC
+            #print "Prescale: ", ps
+
+	    #_stdLooseKaons = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")
+
+            _Bs2PhiPhiLooseDetachedPhi2KK = CombineParticles(
+                            DecayDescriptor = "phi(1020) -> K+ K-"
+                          , DaughtersCuts = {"K+": Phi2KK_DC}
+                          , CombinationCut = Phi2KK_CC
+                          , MotherCut = Phi2KK_MC
+                       )
+
+
+            _Bs2PhiPhi = CombineParticles(
+             DecayDescriptor =  "B_s0 -> phi(1020) phi(1020)"
+    	    , DaughtersCuts   = {"phi(1020)" : Bs2PhiPhi_DC}
+            , CombinationCut  = Bs2PhiPhi_CC
+            , MotherCut       = Bs2PhiPhi_MC
+            )
+
+
+            Bs2PhiPhiLooseDetachedPhi2KK = Selection(
+		name+ "_LoosePhi2KK",
+		Algorithm = _Bs2PhiPhiLooseDetachedPhi2KK,
+		RequiredSelections = [MyLooseKaons])
+            Bs2PhiPhi = Selection(
+		 name,
+		 Algorithm = _Bs2PhiPhi,
+		 RequiredSelections = [Bs2PhiPhiLooseDetachedPhi2KK])
+
+            if wide == True:
+      	      return StrippingLine(name+"Line"
+                , prescale = ps
+                , postscale = 1
+                , selection = Bs2PhiPhi
+                , EnableFlavourTagging = True,
+                RelatedInfoTools = [ 
+                    { "Type"         : "RelInfoConeVariables",
+                    "ConeAngle"    : 0.8,
+                    "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                    "DaughterLocations" : { "B_s0 -> (phi(1020) -> ^K+  K- ) ( phi(1020) ->  K+  K- )" : 'P2ConeVar08_1',
+                                            "B_s0 -> (phi(1020) ->  K+ ^K- ) ( phi(1020) ->  K+  K- )" : 'P2ConeVar08_2',
+                                            "B_s0 -> (phi(1020) ->  K+  K- ) ( phi(1020) -> ^K+  K- )" : 'P2ConeVar08_3',
+                                            "B_s0 -> (phi(1020) ->  K+  K- ) ( phi(1020) ->  K+ ^K- )" : 'P2ConeVar08_4' } },
+                    { "Type"         : "RelInfoConeVariables",
+                    "ConeAngle"    : 1.0,
+                    "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                    "DaughterLocations" : { "B_s0 -> (phi(1020) -> ^K+  K- ) ( phi(1020) ->  K+  K- )" : 'P2ConeVar10_1',
+                                            "B_s0 -> (phi(1020) ->  K+ ^K- ) ( phi(1020) ->  K+  K- )" : 'P2ConeVar10_2',
+                                            "B_s0 -> (phi(1020) ->  K+  K- ) ( phi(1020) -> ^K+  K- )" : 'P2ConeVar10_3',
+                                            "B_s0 -> (phi(1020) ->  K+  K- ) ( phi(1020) ->  K+ ^K- )" : 'P2ConeVar10_4' } },
+                    { "Type"         : "RelInfoConeVariables",
+                    "ConeAngle"    : 1.3,
+                    "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                    "DaughterLocations" : { "B_s0 -> (phi(1020) -> ^K+  K- ) ( phi(1020) ->  K+  K- )" : 'P2ConeVar13_1',
+                                            "B_s0 -> (phi(1020) ->  K+ ^K- ) ( phi(1020) ->  K+  K- )" : 'P2ConeVar13_2',
+                                            "B_s0 -> (phi(1020) ->  K+  K- ) ( phi(1020) -> ^K+  K- )" : 'P2ConeVar13_3',
+                                            "B_s0 -> (phi(1020) ->  K+  K- ) ( phi(1020) ->  K+ ^K- )" : 'P2ConeVar13_4' } },
+                    { "Type"         : "RelInfoConeVariables",
+                    "ConeAngle"    : 1.7,
+                    "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                    "DaughterLocations" : { "B_s0 -> (phi(1020) -> ^K+  K- ) ( phi(1020) ->  K+  K- )" : 'P2ConeVar17_1',
+                                            "B_s0 -> (phi(1020) ->  K+ ^K- ) ( phi(1020) ->  K+  K- )" : 'P2ConeVar17_2',
+                                            "B_s0 -> (phi(1020) ->  K+  K- ) ( phi(1020) -> ^K+  K- )" : 'P2ConeVar17_3',
+                                            "B_s0 -> (phi(1020) ->  K+  K- ) ( phi(1020) ->  K+ ^K- )" : 'P2ConeVar17_4' } },
+                    { "Type"         : "RelInfoVertexIsolation", "Location"     : "VertexIsoInfo" } ]
+              )
+            else:
+              return StrippingLine(name+"Line"
+                , prescale = ps
+                , postscale = 1
+                , selection = Bs2PhiPhi
+                , EnableFlavourTagging = True
+                #, RequiredRawEvents = ['Trigger', 'Muon', 'Calo', 'Rich', 'Velo', 'Tracker'])
+                , RequiredRawEvents = ['Velo'])
+
+
+"""
+    def _Bs2PhiPhiUp_X_Line( self, name, config ) :
+
+            Phi2KK_DC = "(TRGHOSTPROB < 0.5) & (PT>%(KaonPT)s*MeV)&(MIPCHI2DV(PRIMARY)>%(KaonIPCHI2)s)" % config
+            Phi2KK_CC = "(AM<(%(PhiMassMax)s+30)*MeV)" % config
+            #Phi2KK_CC = "(AM<(%(PhiMassMax)s+30)*MeV)&(ADOCACHI2CUT(40, ''))" % config
+
+            UpAddition = "(INTREE( HASTRACK & ISUP ) & INTREE( HASTRACK & ISLONG )) & "
+
+            Phi2KK_MassCut = "&(ADMASS('phi(1020)')<%(PhiMassWindow)s*MeV)" % config
+
+            Phi2KK_MC = "(VFASPF(VCHI2/VDOF)<%(PhiVertexCHI2pDOF)s)" % config + Phi2KK_MassCut
+
+            Bs2PhiPhi_DC = "(PT>%(PhiPT)s*MeV)" % config
+            Bs2PhiPhi_CC = "(ADAMASS('B_s0')<((%(BsMassWindow)s+30)*MeV))&(ACHILD(PT,1)*ACHILD(PT,2)>%(PhiPTsq)s*GeV*GeV)" % config
+            Bs2PhiPhi_MC = UpAddition+"(BPVDIRA > 0.999) & (VFASPF(VCHI2/VDOF)<%(BsVertexCHI2pDOF)s)&(ADMASS('B_s0')<%(BsMassWindow)s*MeV)" % config
+
+            _Bs2PhiPhiLooseAllDetachedPhi2KK = CombineParticles(
+                            DecayDescriptor = "phi(1020) -> K+ K-"
+                          , DaughtersCuts = {"K+": Phi2KK_DC}
+                          , CombinationCut = Phi2KK_CC
+                          , MotherCut = Phi2KK_MC
+                       )
+
+            _Bs2PhiPhiAll = CombineParticles(
+             DecayDescriptor =  "B_s0 -> phi(1020) phi(1020)"
+    	    , DaughtersCuts   = {"phi(1020)" : Bs2PhiPhi_DC}
+            , CombinationCut  = Bs2PhiPhi_CC
+            , MotherCut       = Bs2PhiPhi_MC
+            )
+
+
+            Bs2PhiPhiLooseAllDetachedPhi2KK = Selection(
+		name+ "_LooseAllPhi2KK",
+		Algorithm = _Bs2PhiPhiLooseAllDetachedPhi2KK,
+		RequiredSelections = [MyLooseKaons,MyLooseUpKaons])
+            Bs2PhiPhiAll = Selection(
+		 name,
+		 Algorithm = _Bs2PhiPhiAll,
+		 RequiredSelections = [Bs2PhiPhiLooseAllDetachedPhi2KK])
+
+            return StrippingLine(name+"Line"
+              , prescale = 1
+              , postscale = 1
+              , selection = Bs2PhiPhiAll
+              , EnableFlavourTagging = True
+              #, RequiredRawEvents = ['Trigger', 'Muon', 'Calo', 'Rich', 'Velo', 'Tracker'])
+              , RequiredRawEvents = ['Velo'])
+"""
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2KSh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2KSh.py
new file mode 100644
index 000000000..9782d4fef
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2KSh.py
@@ -0,0 +1,333 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Bu->KSh stripping Selections and StrippingLines.
+Provides functions to build KS->DD, KS->LL, Bu selections.
+Provides class Bu2KShConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Selections based on previous version of the line by Jussara Miranda.
+Exported symbols (use python help!):
+   - Bu2KShConf
+"""
+
+__author__ = ["Aurelien Martens","Ganrong Wang"]
+__date__ = '16/12/2020'
+__version__ = 'Stripping28'
+__all__ = 'Bu2KShConf'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdNoPIDsPions as Pions
+
+default_config = {
+    'NAME' : 'Bu2KSh',
+    'WGs'  : ['BnoC'],
+    'BUILDERTYPE' : 'Bu2KShConf',
+    'CONFIG' : {'Trk_Chi2'                : 3.0,
+                'Trk_GhostProb'           : 0.5,
+                'KS_DD_MassWindow'        : 30.0,
+                'KS_DD_VtxChi2'           : 10.0,
+                'KS_DD_FDChi2'            : 50.0,
+                'KS_DD_Pmin'              : 8000.0,
+                'KS_DD_Ptmin'             : 1000.0,
+                'KS_LL_MassWindow'        : 15.0,
+                'KS_LL_VtxChi2'           : 10.0,
+                'KS_LL_FDChi2'            : 100.0,
+                'Bach_Ptmin'              : 1000.0,
+                'B_Mlow'                  : 500.0,
+                'B_Mhigh'                 : 1500.0,
+                'B_Pmin'                  : 25000.0,
+                'BDaug_MaxPT_IP'          : 0.05,
+                'BDaug_DD_PTsum'          : 4000.0,
+                'BDaug_LL_PTsum'          : 4000.0,
+                'B_VtxChi2'               : 6.0,
+                'B_Dira'                  : 0.9995,
+                'B_DD_IPCHI2wrtPV'        : 10.0,
+                'B_LL_IPCHI2wrtPV'        : 10.0,
+                'B_FDwrtPV'               : 1.0,
+                'B_DD_FDChi2'             : 50.0,
+                'B_LL_FDChi2'             : 50.0,
+                'GEC_MaxTracks'           : 250,
+                # 2012 Trigger
+                #'HLT1Dec'                  : 'Hlt1TrackAllL0Decision',
+                #'HLT2Dec'                  : 'Hlt2Topo[234]Body.*Decision',
+                # 2015 Triggers
+                'HLT1Dec'                  : 'Hlt1(Two)?TrackMVADecision',
+                'HLT2Dec'                  : 'Hlt2Topo[234]BodyDecision',
+                'Prescale'                 : 1.0,
+                'Postscale'                : 1.0,
+                'RelatedInfoTools' : [    { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.7, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar17'
+                                            }, 
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.5, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar15'
+                                            }, 
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.0, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar10'
+                                            },
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 0.8, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar08'
+                                            },
+                                          { "Type" : "RelInfoVertexIsolation",
+                                            "Location" : "VtxIsolationVar"
+                                            }
+                                          ]
+                },
+    'STREAMS' : ['Bhadron']
+    }
+
+class Bu2KShConf(LineBuilder) :
+    """
+    Builder of Bu->KSh stripping Selection and StrippingLine.
+    Constructs B+ -> KS h+ Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> bu2kshConf = Bu2KShConf('Bu2KShTest',config)
+    >>> bu2kshLines = bu2kshConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selKS2DD           : KS -> Down Down Selection object
+    selKS2LL           : KS -> Long Long Selection object
+ 
+    selBu2KSDDh            : B -> KS(DD) h- Selection object
+    selBu2KSLLh            : B -> KS(LL) h- Selection object        
+
+    B_dd_line             : StrippingLine made out of selBu2KSDDh
+    B_ll_line             : StrippingLine made out of selBu2KSLLh
+
+    lines                  : List of lines, [B_dd_line, B_ll_line]
+
+    Exports as class data member:
+    Bu2KShConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        self.hlt1Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT1Dec'],
+                           'Preambulo' : ["from LoKiCore.functions import *"]}
+        self.hlt2Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT2Dec'],
+                           'Preambulo' : ["from LoKiCore.functions import *"]}
+
+        self.pions   = Pions
+
+        self.makeKS2DD( 'KSforDDBLines', config )
+        self.makeKS2LL( 'KSforLLBLines', config )
+
+        self.makeH( 'HforBLines', config )
+
+        namesSelections = [ (name + 'DD', self.makeBu2KSDDh(name + 'DD', config)),
+                            (name + 'LL', self.makeBu2KSLLh(name + 'LL', config)),
+                          ]
+
+        # make lines
+
+        for selName, sel in namesSelections:
+
+            extra = {}
+
+#            extra['HLT1'] = self.hlt1Filter
+#            extra['HLT2'] = self.hlt2Filter
+
+            line = StrippingLine(selName + 'Line',
+                                 selection = sel,
+                                 prescale = config['Prescale'],
+                                 postscale = config['Postscale'],
+                                 RelatedInfoTools = config['RelatedInfoTools'], 
+                                 FILTER = GECCode,
+                                 **extra) 
+
+            self.registerLine(line)
+
+    def makeKS2DD( self, name, config ) :
+        # define all the cuts
+        _massCut          = "(ADMASS('KS0')<%s*MeV)"      % config['KS_DD_MassWindow']
+        _vtxCut           = "(VFASPF(VCHI2)<%s)   "           % config['KS_DD_VtxChi2']
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                  % config['KS_DD_FDChi2']
+        _momCut           = "(P>%s*MeV)"                      % config['KS_DD_Pmin']
+        _ptCut            = "(PT>%s*MeV)"                     % config['KS_DD_Ptmin']
+
+        _allCuts = _momCut
+        _allCuts += '&'+_massCut
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_fdChi2Cut
+        _allCuts += '&'+_ptCut
+
+        # get the KS's to filter
+        _stdKSDD = DataOnDemand(Location = "Phys/StdLooseKsDD/Particles")
+        
+        # make the filter
+        _filterKSDD = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        self.selKS2DD = Selection( name, Algorithm = _filterKSDD, RequiredSelections = [_stdKSDD] )
+
+        return self.selKS2DD
+
+    def makeKS2LL( self, name, config ) : 
+        # define all the cuts
+        _massCut    = "(ADMASS('KS0')<%s*MeV)"               % config['KS_LL_MassWindow']
+        _vtxCut     = "(VFASPF(VCHI2)<%s)"                   % config['KS_LL_VtxChi2']
+        _fdCut      = "(BPVVDCHI2>%s)"                       % config['KS_LL_FDChi2']
+        _momCut     = "(P>%s*MeV)"                           % config['KS_DD_Pmin']
+        _ptCut      = "(PT>%s*MeV)"                          % config['KS_DD_Ptmin']
+        _trkChi2Cut1 = "(CHILDCUT((TRCHI2DOF<%s),1))"        % config['Trk_Chi2']
+        _trkChi2Cut2 = "(CHILDCUT((TRCHI2DOF<%s),2))"        % config['Trk_Chi2']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))" % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))" % config['Trk_GhostProb']
+
+        _allCuts = _momCut
+        _allCuts += '&'+_trkGhostProbCut1
+        _allCuts += '&'+_trkGhostProbCut2
+        _allCuts += '&'+_ptCut
+        _allCuts += '&'+_massCut
+        _allCuts += '&'+_trkChi2Cut1
+        _allCuts += '&'+_trkChi2Cut2
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_fdCut
+		
+        # get the KS's to filter
+        _stdKSLL = DataOnDemand(Location = "Phys/StdVeryLooseKsLL/Particles")
+
+        # make the filter
+        _filterKSLL = FilterDesktop( Code = _allCuts )
+        
+        # make and store the Selection object
+        self.selKS2LL = Selection( name, Algorithm = _filterKSLL, RequiredSelections = [_stdKSLL] )
+
+        return self.selKS2LL
+
+    def makeH( self, name, config ) :
+        # define all the cuts
+        _bachPtCut          = "(PT>%s*MeV)"              % config['Bach_Ptmin']
+        _trkChi2Cut         = "(TRCHI2DOF<%s)"           % config['Trk_Chi2']
+        _trkGPCut           = "(TRGHOSTPROB<%s)"         % config['Trk_GhostProb']
+
+        _allCuts = _bachPtCut
+        _allCuts += '&'+_trkChi2Cut
+        _allCuts += '&'+_trkGPCut
+
+        
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        self.selH = Selection( name, Algorithm = _filterH, RequiredSelections = [self.pions] )
+
+        return self.selH
+
+    def makeBu2KSDDh( self, name, config ) :
+        """
+        Create and store a Bu ->KS(DD) h+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5279-%s)*MeV)"               % config['B_Mlow']
+        _massCutHigh    = "(AM<(5279+%s)*MeV)"               % config['B_Mhigh']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['BDaug_MaxPT_IP']
+        _daugPtSumCut   = "((APT1+APT2)>%s*MeV)"             % config['BDaug_DD_PTsum']
+
+        _combCuts = _massCutLow
+        _combCuts += '&'+_massCutHigh
+        _combCuts += '&'+_daugPtSumCut
+        #_combCuts += '&'+_daugMaxPtIPCut # does not work properly
+
+        _pCut      = "(P>%s*MeV)"                      % config['B_Pmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['B_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_DD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B_DD_FDChi2']
+
+        _motherCuts = _pCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _B = CombineParticles()
+        _B.DecayDescriptors = [ "B+ -> pi+ KS0", "B- -> pi- KS0"]
+        _B.DaughtersCuts = { "pi+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+        _B.ReFitPVs = True
+        
+        self.selBu2KSDDh = Selection (name, Algorithm = _B, RequiredSelections = [self.selKS2DD, self.selH])
+
+        return self.selBu2KSDDh
+
+    def makeBu2KSLLh( self, name, config ) :
+        """
+        Create and store a Bu -> KS(LL) h+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5279-%s)*MeV)"               % config['B_Mlow']
+        _massCutHigh    = "(AM<(5279+%s)*MeV)"               % config['B_Mhigh']
+#        _daugMaxPtIPCut   = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)"             % config['BDaug_MaxPT_IP']
+        _daugPtSumCut   = "(APT1+APT2>%s*MeV)"               % config['BDaug_LL_PTsum']
+
+        _combCuts = _daugPtSumCut
+#        _combCuts += '&'+_daugMaxPtIPCut # does not work properly
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+
+        _pCut      = "(P>%s*MeV)"                      % config['B_Pmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['B_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_LL_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B_LL_FDChi2']
+
+        _motherCuts = _pCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _B = CombineParticles()
+        _B.DecayDescriptors = [ "B+ -> pi+ KS0", "B- -> pi- KS0" ]
+        _B.DaughtersCuts = { "pi+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+        _B.ReFitPVs = True
+        
+        self.selBu2KSLLh = Selection (name, Algorithm = _B, RequiredSelections = [self.selKS2LL, self.selH])
+
+        return self.selBu2KSLLh
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2Ksthh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2Ksthh.py
new file mode 100644
index 000000000..fb4330051
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2Ksthh.py
@@ -0,0 +1,404 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of B+/- -> K*+/-(892) hh', with K*(892) -> KS pi.
+Provides functions to build KS->DD and KS->LL selections.
+Provides class Bu2KsthhConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Exported symbols (use python help!):
+   - Bu2KsthhConf
+"""
+
+__author__ = ['Rafael Coutinho']
+__date__ = '07/04/2015'
+__version__ = 'Stripping26'
+__all__ = {'Bu2KsthhConf',
+           'default_config'}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdLoosePions as Pions
+
+default_config = {
+    'NAME'        : 'Bu2Ksthh',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Bu2KsthhConf',
+    'CONFIG'      : {'Trk_Long_Chi2'           : 4.0,
+                     'Trk_Long_GhostProb'      : 0.4,
+                     'Trk_Down_Chi2'           : 4.0,
+                     'Trk_Down_GhostProb'      : 0.5,
+                     'KS_DD_MassWindow'        : 30.0,
+                     'KS_DD_VtxChi2'           : 12.0,
+                     'KS_DD_FDChi2'            : 50.0,
+                     'KS_LL_MassWindow'        : 20.0,
+                     'KS_LL_VtxChi2'           : 12.0,
+                     'KS_LL_FDChi2'            : 80.0,
+                     'Kstar_MassLo'            : 0.0,
+                     'Kstar_MassHi'            : 5000.0,
+                     'B_Mlow'                  : 1279.0,
+                     'B_Mhigh'                 : 921.0,
+                     'B_APTmin'                : 1000.0,
+                     'B_PTmin'                 : 1500.0,
+                     'BDaug_MedPT_PT'          : 800.0,
+                     'BDaug_MaxPT_IP'          : 0.05,
+                     'BDaug_DD_maxDocaChi2'    : 5.0,
+                     'BDaug_LL_maxDocaChi2'    : 5.0,
+                     'BDaug_DD_PTsum'          : 3000.0,
+                     'BDaug_LL_PTsum'          : 3000.0,
+                     'B_DD_IPCHI2sum'          : 50.0,
+                     'B_VtxChi2'               : 12.0,
+                     'B_DD_Dira'               : 0.999,
+                     'B_LL_Dira'               : 0.9999,
+                     'B_DD_IPCHI2wrtPV'        : 8.0,
+                     'B_LL_IPCHI2wrtPV'        : 8.0,
+                     'B_DD_FDwrtPV'            : 1.0,
+                     'B_LL_FDwrtPV'            : 1.0,
+                     'B_DD_FDChi2'             : 50.0,
+                     'B_LL_FDChi2'             : 50.0,
+                     'GEC_MaxTracks'           : 250,
+                     'ConeAngle10'             : 1.0, 
+                     'ConeAngle15'             : 1.5, 
+                     'ConeAngle17'             : 1.7, 
+                     'HLT1Dec'                 : 'Hlt1(Two)?TrackMVADecision',
+                     'HLT2Dec'                 : 'Hlt2Topo[234]BodyDecision',
+                     'Prescale'                : 1.0,
+                     'Postscale'               : 1.0
+                     },
+    'STREAMS' : ['Bhadron']
+    }
+
+class Bu2KsthhConf(LineBuilder) :
+    """
+    Builder of Bu->Ksthh stripping Selection and StrippingLine.
+    Constructs B+/- -> Kst+/- h+ h- Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> bu2ksthhConf = Bu2KsthhConf('Bu2KsthhTest',config)
+    >>> bu2ksthhLines = bu2ksthhConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selKS2DD               : KS -> Down Down Selection object
+    selKS2LL               : KS -> Long Long Selection object
+    selKst2KSDDpi          : Kst -> KS pi - Down Down Selection object
+    selKst2KSLLpi          : Kst -> KS pi - Long Long Selection object
+    selBu2KstDDhh          : Bu -> Kst(DD) h+ h- Selection object
+    selBu2KstLLhh          : Bu -> Kst(LL) h+ h- Selection object
+    dd_line                : StrippingLine made out of selBu2KstDDhh
+    ll_line                : StrippingLine made out of selBu2KstLLhh
+    lines                  : List of lines, [dd_line, ll_line]
+
+    Exports as class data member:
+    Bu2KsthhConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        dd_name = name+'DD'
+        ll_name = name+'LL'
+
+        GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        Hlt1Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT1Dec'],
+                     'Preambulo' : ["from LoKiCore.functions import *"]}
+                          
+        Hlt2Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT2Dec'],
+                     'Preambulo' : ["from LoKiCore.functions import *"]}
+                          
+        relInfo    = [ { "Type" : "RelInfoConeVariables" 
+                      , "ConeAngle" : config['ConeAngle10']
+                      , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'] 
+                      , 'Location'  : 'P2ConeVar10_B'
+                      , "DaughterLocations" : { "[B+ -> ^pi+ pi- (K*(892)+ -> KS0 pi+)]CC" : 'P2ConeVar10_1',
+                                                "[B+ -> pi+ ^pi- (K*(892)+ -> KS0 pi+)]CC" : 'P2ConeVar10_2',
+                                                "[B+ -> pi+ pi- (K*(892)+ -> ^KS0 pi+)]CC" : 'P2ConeVar10_3',
+                                                "[B+ -> pi+ pi- (K*(892)+ -> KS0 ^pi+)]CC" : 'P2ConeVar10_4'} },
+                      { "Type" : "RelInfoConeVariables"
+                      , "ConeAngle" : config['ConeAngle15'] 
+                      , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM']
+                      , 'Location'  : 'P2ConeVar15_B'
+                      , "DaughterLocations" : { "[B+ -> ^pi+ pi- (K*(892)+ -> KS0 pi+)]CC" : 'P2ConeVar15_1',
+                                                "[B+ -> pi+ ^pi- (K*(892)+ -> KS0 pi+)]CC" : 'P2ConeVar15_2',
+                                                "[B+ -> pi+ pi- (K*(892)+ -> ^KS0 pi+)]CC" : 'P2ConeVar15_3',
+                                                "[B+ -> pi+ pi- (K*(892)+ -> KS0 ^pi+)]CC" : 'P2ConeVar15_4'} },
+                      { "Type" : "RelInfoConeVariables"
+                      , "ConeAngle" : config['ConeAngle17'] 
+                      , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM']
+                      , 'Location'  : 'P2ConeVar17_B'
+                      , "DaughterLocations" : { "[B+ -> ^pi+ pi- (K*(892)+ -> KS0 pi+)]CC" : 'P2ConeVar17_1',
+                                                "[B+ -> pi+ ^pi- (K*(892)+ -> KS0 pi+)]CC" : 'P2ConeVar17_2',
+                                                "[B+ -> pi+ pi- (K*(892)+ -> ^KS0 pi+)]CC" : 'P2ConeVar17_3',
+                                                "[B+ -> pi+ pi- (K*(892)+ -> KS0 ^pi+)]CC" : 'P2ConeVar17_4'} },
+                      { "Type"      : "RelInfoVertexIsolation"
+                      , "Location"  : 'VtxIsolationVar'}
+                     ]
+
+        self.pions = Pions
+
+        self.makeKS2DD( 'KSfor'+dd_name, config )
+        self.makeKS2LL( 'KSfor'+ll_name, config )
+
+        self.makeKst2KSDDpi( 'Kstfor'+dd_name, config )
+        self.makeKst2KSLLpi( 'Kstfor'+ll_name, config )
+
+        self.makeBu2KstDDhh( dd_name, config )
+        self.makeBu2KstLLhh( ll_name, config )
+
+        self.dd_line = StrippingLine(dd_name+"Line",
+                                     prescale  = config['Prescale'],
+                                     postscale = config['Postscale'],
+                                     selection = self.selBu2KstDDhh,
+                                     HLT1 = Hlt1Filter,
+                                     HLT2 = Hlt2Filter,
+                                     FILTER = GECCode, 
+                                     RelatedInfoTools = relInfo, 
+                                     EnableFlavourTagging = True, 
+                                     MDSTFlag = False
+                                     )
+        self.ll_line = StrippingLine(ll_name+"Line",
+                                     prescale  = config['Prescale'],
+                                     postscale = config['Postscale'],
+                                     selection = self.selBu2KstLLhh,
+                                     HLT1 = Hlt1Filter,
+                                     HLT2 = Hlt2Filter,
+                                     FILTER = GECCode,
+                                     RelatedInfoTools = relInfo, 
+                                     EnableFlavourTagging = True, 
+                                     MDSTFlag = False
+                                     )
+
+        self.registerLine(self.dd_line)
+        self.registerLine(self.ll_line)
+        
+    def makeKS2DD( self, name, config ) :
+        # define all the cuts
+        _massCut = "(ADMASS('KS0')<%s*MeV)" % config['KS_DD_MassWindow']
+        _vtxCut  = "(VFASPF(VCHI2)<%s)"     % config['KS_DD_VtxChi2']
+        _fdCut   = "(BPVVDCHI2>%s)"         % config['KS_DD_FDChi2']
+        _trkChi2Cut1      = "(CHILDCUT((TRCHI2DOF<%s),1))"   % config['Trk_Down_Chi2']
+        _trkChi2Cut2      = "(CHILDCUT((TRCHI2DOF<%s),2))"   % config['Trk_Down_Chi2']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))" % config['Trk_Down_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))" % config['Trk_Down_GhostProb']
+
+        _allCuts = _massCut
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_fdCut
+        _allCuts += '&'+_trkChi2Cut1
+        _allCuts += '&'+_trkChi2Cut2
+        _allCuts += '&'+_trkGhostProbCut1
+        _allCuts += '&'+_trkGhostProbCut2
+
+        # get the KS's to filter
+        _stdKSDD = DataOnDemand( Location = "Phys/StdLooseKsDD/Particles" )
+
+        # make the filter
+        _filterKSDD = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        self.selKS2DD = Selection( name, Algorithm = _filterKSDD, RequiredSelections = [_stdKSDD] )
+
+
+    def makeKS2LL( self, name, config ) :
+        # define all the cuts
+        _massCut          = "(ADMASS('KS0')<%s*MeV)"         % config['KS_LL_MassWindow']
+        _vtxCut           = "(VFASPF(VCHI2)<%s)"             % config['KS_LL_VtxChi2']
+        _fdCut            = "(BPVVDCHI2>%s)"                 % config['KS_LL_FDChi2']
+        _trkChi2Cut1      = "(CHILDCUT((TRCHI2DOF<%s),1))"   % config['Trk_Long_Chi2']
+        _trkChi2Cut2      = "(CHILDCUT((TRCHI2DOF<%s),2))"   % config['Trk_Long_Chi2']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))" % config['Trk_Long_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))" % config['Trk_Long_GhostProb']
+
+        _allCuts = _massCut
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_fdCut
+        _allCuts += '&'+_trkChi2Cut1
+        _allCuts += '&'+_trkChi2Cut2
+        _allCuts += '&'+_trkGhostProbCut1
+        _allCuts += '&'+_trkGhostProbCut2
+
+        # get the KS's to filter
+        _stdKSLL = DataOnDemand( Location = "Phys/StdLooseKsLL/Particles" )
+
+        # make the filter
+        _filterKSLL = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        self.selKS2LL = Selection( name, Algorithm = _filterKSLL, RequiredSelections = [_stdKSLL] )
+
+
+    def makeKst2KSDDpi( self, name, config ) :
+        # define all the cuts
+        _massCutLo = "(AM > %s*MeV)" % config['Kstar_MassLo']
+        _massCutHi = "(AM < %s*MeV)" % config['Kstar_MassHi']
+
+        _trkChi2Cut      = "(TRCHI2DOF<%s)"   % config['Trk_Long_Chi2']
+        _trkGhostProbCut = "(TRGHOSTPROB<%s)" % config['Trk_Long_GhostProb']
+
+        _daughtersCuts = _trkChi2Cut
+        _daughtersCuts += '&'+_trkGhostProbCut
+      
+        _allCuts = _massCutLo
+        _allCuts += '&'+_massCutHi
+
+        # make the filter
+        _filterKst2KSDDpi = CombineParticles()
+        _filterKst2KSDDpi.DecayDescriptor = "[K*(892)+ -> KS0 pi+]cc"
+        _filterKst2KSDDpi.CombinationCut = _allCuts 
+        _filterKst2KSDDpi.DaughtersCuts = { "pi+" : _daughtersCuts }
+        _filterKst2KSDDpi.MotherCut = "ALL"
+
+        # make and store the Selection object
+        self.selKst2KSDDpi = Selection( name, Algorithm = _filterKst2KSDDpi, RequiredSelections = [self.selKS2DD, self.pions] ) 
+
+    def makeKst2KSLLpi( self, name, config ) :
+        # define all the cuts
+        _massCutLo = "(AM > %s*MeV)" % config['Kstar_MassLo']
+        _massCutHi = "(AM < %s*MeV)" % config['Kstar_MassHi']
+
+        _trkChi2Cut      = "(TRCHI2DOF<%s)"   % config['Trk_Long_Chi2']
+        _trkGhostProbCut = "(TRGHOSTPROB<%s)" % config['Trk_Long_GhostProb']
+
+        _daughtersCuts = _trkChi2Cut
+        _daughtersCuts += '&'+_trkGhostProbCut
+      
+        _allCuts = _massCutLo
+        _allCuts += '&'+_massCutHi
+
+        # make the filter
+        _filterKst2KSLLpi = CombineParticles()
+        _filterKst2KSLLpi.DecayDescriptor = "[K*(892)+ -> KS0 pi+]cc"
+        _filterKst2KSLLpi.CombinationCut = _allCuts 
+        _filterKst2KSLLpi.DaughtersCuts = { "pi+" : _daughtersCuts }
+        _filterKst2KSLLpi.MotherCut = "ALL"
+
+        # make and store the Selection object
+        self.selKst2KSLLpi = Selection( name, Algorithm = _filterKst2KSLLpi, RequiredSelections = [self.selKS2LL, self.pions] ) 
+
+
+    def makeBu2KstDDhh( self, name, config ) :
+        """
+        Create and store either a B+ -> Kst(DD)+ h+ h- Selection object
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _trkChi2Cut      = "(TRCHI2DOF<%s)"   % config['Trk_Long_Chi2']
+        _trkGhostProbCut = "(TRGHOSTPROB<%s)" % config['Trk_Long_GhostProb']
+
+        _daughtersCuts = _trkChi2Cut
+        _daughtersCuts += '&'+_trkGhostProbCut
+
+        _massCutLow       = "(AM>(5279-%s)*MeV)"                                                        % config['B_Mlow']
+        _massCutHigh      = "(AM<(5279+%s)*MeV)"                                                        % config['B_Mhigh']
+        _aptCut           = "(APT>%s*MeV)"                                                              % config['B_APTmin']
+        _daugMedPtCut     = "(ANUM(PT>%s*MeV)>=2)"                                                      % config['BDaug_MedPT_PT']
+        _daugMaxPtIPCut   = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)"                                          % config['BDaug_MaxPT_IP']
+        _maxDocaChi2Cut   = "(ACUTDOCACHI2(%s,''))"                                                     % config['BDaug_DD_maxDocaChi2']
+        _daugPtSumCut     = "((APT1+APT2+APT3)>%s*MeV)"                                                 % config['BDaug_DD_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut            = "(PT>%s*MeV)"                                                               % config['B_PTmin']
+        _vtxChi2Cut       = "(VFASPF(VCHI2)<%s)"                                                        % config['B_VtxChi2']
+        _diraCut          = "(BPVDIRA>%s)"                                                              % config['B_DD_Dira']
+        _ipChi2Cut        = "(MIPCHI2DV(PRIMARY)<%s)"                                                   % config['B_DD_IPCHI2wrtPV']
+        _fdCut            = "(VFASPF(VMINVDDV(PRIMARY))>%s)"                                            % config['B_DD_FDwrtPV']
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                                                            % config['B_DD_FDChi2']
+        _ipChi2SumCut     = "(SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='pi+') | (ABSID=='pi-')),0.0) > %s)"  % config['B_DD_IPCHI2sum']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+        _motherCuts += '&'+_ipChi2SumCut
+
+        _B = CombineParticles()
+        _B.DaughtersCuts = { "pi+" : _daughtersCuts }
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        _B.DecayDescriptors = [ "[B+ -> pi+ pi- K*(892)+]cc" ]
+
+        self.selBu2KstDDhh = Selection (name, Algorithm = _B, RequiredSelections = [ self.selKst2KSDDpi, self.pions ])
+
+
+    def makeBu2KstLLhh( self, name, config ) :
+        """
+        Create and store either a B+ -> Kst(LL)+ h+ h- Selection object
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _trkChi2Cut      = "(TRCHI2DOF<%s)"   % config['Trk_Long_Chi2']
+        _trkGhostProbCut = "(TRGHOSTPROB<%s)" % config['Trk_Long_GhostProb']
+
+        _daughtersCuts = _trkChi2Cut
+        _daughtersCuts += '&'+_trkGhostProbCut
+
+        _massCutLow     = "(AM>(5279-%s)*MeV)"               % config['B_Mlow']
+        _massCutHigh    = "(AM<(5279+%s)*MeV)"               % config['B_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['B_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['BDaug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['BDaug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['BDaug_LL_maxDocaChi2']
+        _daugPtSumCut   = "((APT1+APT2+APT3)>%s*MeV)"        % config['BDaug_LL_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['B_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['B_LL_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_LL_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B_LL_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B_LL_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _B = CombineParticles()
+        _B.DaughtersCuts = { "pi+" : _daughtersCuts }
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        _B.DecayDescriptors = [ "[B+ -> pi+ pi- K*(892)+]cc" ]
+
+        self.selBu2KstLLhh = Selection (name, Algorithm = _B, RequiredSelections = [ self.selKst2KSLLpi, self.pions ])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2hhh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2hhh.py
new file mode 100644
index 000000000..da5abd81e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2hhh.py
@@ -0,0 +1,639 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+ # $Id: StrippingBu2hhh.py,v 6.0 2017-05-19 Rio team $
+'''
+Module for construction of Bu->hhh from:   
+   Inclusive KKK line for light decay modes (pipipi, Kpipi, KKpi and KKK) 
+   Inclusive KpKpKp line for same-sign kaons of light decay modes (pipipi, Kpipi, KKpi and KKK) 
+   Inclusive pph line for heavy modes (pppi, ppK)
+
+Exported symbols (use python help!):
+   - Bu2hhhBuilder
+   - makeKKK_incl  
+   - makeKpKpKp_incl  
+   - makepph_incl
+'''
+
+__author__ = ['Irina Nasteva', 'Jussara Miranda', 'Alvaro Gomes']
+__date__ = '19/05/2017'
+__version__ = 'Stripping29'
+
+__all__ = ('Bu2hhhBuilder',
+           'makeKKK_incl', 
+           'makeKpKpKp_incl', 
+           'makepph_incl', 
+     )
+
+
+config_params = {
+    'MaxTrSIZE'             : 200 ,      ## GEC maximim recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG)
+    '_h_PT'                 : 100. ,     ## tracks min PT
+    '_h_P'                  : 1500. ,    ## tracks min P  
+    '_h_IPCHI2'             : 1. ,       ## min tracks IP wrt OWNPV
+    '_h_TRCHI2DOF'          : 4.0 ,      ## max tracks CHI2DOF
+    '_h_TRGHP'             : .5,       ## Track GhostProbability     
+    '_3h_DOCA'              : .2 ,       ## max DOCA between h and 2h 
+    '_3h_PTmax'             : 1500 ,     ## min PT of the 3h highest PT track
+    '_3h_DIRA'              : .99998 ,   ## min cos angle between 3h momentum and PV decay direction   
+    '_3h_FDCHI2'            : 500. ,     ## min 3h FDCHI2 wrt best 3h PV  
+    '_3h_PVDOCAmin'         : 3.0 ,      ## min value of the 3h doca wrt any PV
+    '_3h_CHI2'              : 12.0 ,     ## max 3h vertex CHI2 
+    '_3h_IPCHI2'            : 10. ,      ## max 3h IP CHI2 wrt best 3h PV
+    '_3h_PT'                : 1000. ,    ## min 3h PT   
+    '_3h_PTsum'             : 4500. ,    ## min of 3h tracks PT sum 
+    '_3h_Psum'              : 20000. ,   ## min of 3h tracks P sum 
+    '_3h_PVIPCHI2sum'       : 500. ,     ## min of the 3h tracks IP wrt best 3h PV
+    '_3h_TRKCHIDOFmin'      : 3.0,       ## max track CHI2DOF for the track with smalest CHI2DOF
+    '_3h_CORRMmax'          : 7000. ,    ## max corrected mass for 3h candidate  
+    '_3h_CORRMmin'          : 4000. ,    ## min corrected mass for 3h candidate   
+    '_3hKKK_Mmax'           : 6300. ,    ## max 3h mass for inclusive KKK line       
+    '_3hKKK_Mmin'           : 5050. ,    ## min 3h mass for inclusive KKK line
+    '_3hpph_deltaMmax'      : 400,       ## max 3h mass difference for inclusive ppK line
+    '_3hpph_deltaMmin'      : 200,       ## min 3h mass difference for inclusive ppK line 
+    'KKK_inclLinePrescale'  : 1.0,
+    'KKK_inclLinePostscale' : 1.0,
+    'KpKpKp_inclLinePrescale'  : 1.0,
+    'KpKpKp_inclLinePostscale' : 1.0,
+    'pph_inclLinePrescale'  : 1.0,
+    'pph_inclLinePostscale' : 1.0
+    }
+
+
+"""
+B+ -> h+h-h+ channels
+"""
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+
+import StandardParticles
+
+if hasattr(StandardParticles, "StdAllNoPIDsKaons"):
+  from StandardParticles import StdAllNoPIDsKaons as StdNoPIDsKaons
+else:
+  from StandardParticles import StdNoPIDsKaons as StdNoPIDsKaons
+
+if hasattr(StandardParticles, "StdAllLooseProtons"):
+  from StandardParticles import StdAllLooseProtons as StdLooseProtons
+else:
+  from StandardParticles import StdLooseProtons as StdLooseProtons
+
+
+
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter as VoidFilter
+
+
+default_config = {
+    'NAME'        : 'Bu2hhh',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Bu2hhhBuilder',
+    'CONFIG'      : { 'MaxTrSIZE'             : 200 ,      ## GEC maximim recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG)
+                      '_h_PT'                 : 100. ,     ## tracks min PT
+                      '_h_P'                  : 1500. ,    ## tracks min P  
+                      '_h_IPCHI2'             : 1. ,       ## min tracks IP wrt OWNPV
+                      '_h_TRCHI2DOF'          : 4.0 ,      ## max tracks CHI2DOF
+                      '_h_TRGHP'             : .5,       ## Track GhostProbability     
+                      '_3h_DOCA'              : .2 ,       ## max DOCA between h and 2h 
+                      '_3h_PTmax'             : 1500 ,     ## min PT of the 3h highest PT track
+                      '_3h_DIRA'              : .99998 ,   ## min cos angle between 3h momentum and PV decay direction   
+                      '_3h_FDCHI2'            : 500. ,     ## min 3h FDCHI2 wrt best 3h PV  
+                      '_3h_PVDOCAmin'         : 3.0 ,      ## min value of the 3h doca wrt any PV
+                      '_3h_CHI2'              : 12.0 ,     ## max 3h vertex CHI2 
+                      '_3h_IPCHI2'            : 10. ,      ## max 3h IP CHI2 wrt best 3h PV
+                      '_3h_PT'                : 1000. ,    ## min 3h PT   
+                      '_3h_PTsum'             : 4500. ,    ## min of 3h tracks PT sum 
+                      '_3h_Psum'              : 20000. ,   ## min of 3h tracks P sum 
+                      '_3h_PVIPCHI2sum'       : 500. ,     ## min of the 3h tracks IP wrt best 3h PV
+                      '_3h_TRKCHIDOFmin'      : 3.0,       ## max track CHI2DOF for the track with smalest CHI2DOF
+                      '_3h_CORRMmax'          : 7000. ,    ## max corrected mass for 3h candidate  
+                      '_3h_CORRMmin'          : 4000. ,    ## min corrected mass for 3h candidate   
+                      '_3hKKK_Mmax'           : 6300. ,    ## max 3h mass for inclusive KKK line       
+                      '_3hKKK_Mmin'           : 5050. ,    ## min 3h mass for inclusive KKK line
+                      '_3hpph_deltaMmax'      : 400,       ## max 3h mass difference for inclusive ppK line
+                      '_3hpph_deltaMmin'      : 200,       ## min 3h mass difference for inclusive ppK line 
+                      'KKK_inclLinePrescale'  : 1.0,
+                      'KKK_inclLinePostscale' : 1.0,
+                      'KpKpKp_inclLinePrescale'  : 1.0,
+                      'KpKpKp_inclLinePostscale' : 1.0,
+                      'pph_inclLinePrescale'  : 1.0,
+                      'pph_inclLinePostscale' : 1.0
+                    },
+    'STREAMS'      : ['Bhadron']
+}
+
+filter = {'Code' :
+          "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG)"\
+          " < %s )" \
+          % config_params['MaxTrSIZE'],
+          'Preambulo' : [ "from LoKiTracks.decorators import *",
+                                      'from LoKiCore.functions    import *' ]
+}
+
+default_name = "Bu2hhh"
+
+class Bu2hhhBuilder(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        _KKK_inclName = name + '_KKK_incl'
+        _KpKpKp_inclName = name + '_KKK_samesign'
+        _pph_inclName = name + '_pph_incl'
+  
+        
+        self.selKKK = makeKKK_incl( 'KKKinclFor' + _KKK_inclName + 'Sel', 
+                                    _h_PT           = config['_h_PT'],
+                                    _h_P            = config['_h_P'],
+                                    _h_IPCHI2       = config['_h_IPCHI2'],
+                                    _h_TRCHI2DOF    = config['_h_TRCHI2DOF'],
+                                    _h_TRGHP       = config['_h_TRGHP'],
+                                    _3h_DOCA        = config['_3h_DOCA'],
+                                    _3h_PTmax       = config['_3h_PTmax'],
+                                    _3h_DIRA        = config['_3h_DIRA'],
+                                    _3h_FDCHI2      = config['_3h_FDCHI2'],
+                                    _3h_PVDOCAmin   = config['_3h_PVDOCAmin'],
+                                    _3h_CHI2        = config['_3h_CHI2'],
+                                    _3h_IPCHI2      = config['_3h_IPCHI2'],
+                                    _3h_PT          = config['_3h_PT'],
+                                    _3h_PTsum       = config['_3h_PTsum'],
+                                    _3h_Psum        = config['_3h_Psum'],
+                                    _3h_PVIPCHI2sum = config['_3h_PVIPCHI2sum'],
+                                    _3h_TRKCHIDOFmin= config['_3h_TRKCHIDOFmin'],
+                                    _3h_CORRMmax    = config['_3h_CORRMmax'],
+                                    _3h_CORRMmin    = config['_3h_CORRMmin'],
+                                    _3hKKK_Mmin     = config['_3hKKK_Mmin'],
+                                    _3hKKK_Mmax     = config['_3hKKK_Mmax'])
+        
+        self.selKpKpKp = makeKpKpKp_incl( 'KpKpKpinclFor' + _KpKpKp_inclName + 'Sel', 
+                                          _h_PT           = config['_h_PT'],
+                                          _h_P            = config['_h_P'],
+                                          _h_IPCHI2       = config['_h_IPCHI2'],
+                                          _h_TRCHI2DOF    = config['_h_TRCHI2DOF'],
+                                          _h_TRGHP       = config['_h_TRGHP'],
+                                          _3h_DOCA        = config['_3h_DOCA'],
+                                          _3h_PTmax       = config['_3h_PTmax'],
+                                          _3h_DIRA        = config['_3h_DIRA'],
+                                          _3h_FDCHI2      = config['_3h_FDCHI2'],
+                                          _3h_PVDOCAmin   = config['_3h_PVDOCAmin'],
+                                          _3h_CHI2        = config['_3h_CHI2'],
+                                          _3h_IPCHI2      = config['_3h_IPCHI2'],
+                                          _3h_PT          = config['_3h_PT'],
+                                          _3h_PTsum       = config['_3h_PTsum'],
+                                          _3h_Psum        = config['_3h_Psum'],
+                                          _3h_PVIPCHI2sum = config['_3h_PVIPCHI2sum'],
+                                          _3h_TRKCHIDOFmin= config['_3h_TRKCHIDOFmin'],
+                                          _3h_CORRMmax    = config['_3h_CORRMmax'],
+                                          _3h_CORRMmin    = config['_3h_CORRMmin'],
+                                          _3hKKK_Mmin     = config['_3hKKK_Mmin'],
+                                          _3hKKK_Mmax     = config['_3hKKK_Mmax'])
+        
+        self.selpph = makepph_incl( 'pphinclFor' + _pph_inclName + 'Sel', 
+                                    _h_PT           = config['_h_PT'],
+                                    _h_P            = config['_h_P'],
+                                    _h_IPCHI2       = config['_h_IPCHI2'],
+                                    _h_TRCHI2DOF    = config['_h_TRCHI2DOF'],
+                                    _h_TRGHP       = config['_h_TRGHP'],       
+                                    _3h_DOCA        = config['_3h_DOCA'],
+                                    _3h_PTmax       = config['_3h_PTmax'],
+                                    _3h_DIRA        = config['_3h_DIRA'],
+                                    _3h_FDCHI2      = config['_3h_FDCHI2'],
+                                    _3h_PVDOCAmin   = config['_3h_PVDOCAmin'],
+                                    _3h_CHI2        = config['_3h_CHI2'],
+                                    _3h_IPCHI2      = config['_3h_IPCHI2'],
+                                    _3h_PT          = config['_3h_PT'],
+                                    _3h_PTsum       = config['_3h_PTsum'],
+                                    _3h_Psum        = config['_3h_Psum'],
+                                    _3h_PVIPCHI2sum = config['_3h_PVIPCHI2sum'],
+                                    _3h_TRKCHIDOFmin= config['_3h_TRKCHIDOFmin'],
+                                    _3h_CORRMmax    = config['_3h_CORRMmax'],
+                                    _3h_CORRMmin    = config['_3h_CORRMmin'],
+                                    _3hpph_deltaMmax= config['_3hpph_deltaMmax'],
+                                    _3hpph_deltaMmin= config['_3hpph_deltaMmin'])
+        
+  
+        self.algosKKK = []
+        self.algosKKK.append(self.selKKK)
+        
+        self.algosKpKpKp = []
+        self.algosKpKpKp.append(self.selKpKpKp)
+        
+        self.algospph = []
+        self.algospph.append(self.selpph) 
+  
+        
+        self.lineKKK_incl = StrippingLine( _KKK_inclName + 'Line',
+                                           prescale   = config['KKK_inclLinePrescale'],
+                                           postscale  = config['KKK_inclLinePostscale'],
+                                           algos      = self.algosKKK,
+                                           EnableFlavourTagging = True,
+                                           FILTER = filter,
+                                           RelatedInfoTools = [
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso05B',
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K-]CC" : "ConeIso05h1",
+                                                 "[B+ -> K+ ^K+ K-]CC" : "ConeIso05h2",
+                                                 "[B+ -> K+ K+ ^K-]CC" : "ConeIso05h3",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso10B',
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K-]CC" : "ConeIso10h1",
+                                                 "[B+ -> K+ ^K+ K-]CC" : "ConeIso10h2",
+                                                 "[B+ -> K+ K+ ^K-]CC" : "ConeIso10h3",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso15B',
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K-]CC" : "ConeIso15h1",
+                                                 "[B+ -> K+ ^K+ K-]CC" : "ConeIso15h2",
+                                                 "[B+ -> K+ K+ ^K-]CC" : "ConeIso15h3",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 2.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K-]CC" : "ConeIso20h1",
+                                                 "[B+ -> K+ ^K+ K-]CC" : "ConeIso20h2",
+                                                 "[B+ -> K+ K+ ^K-]CC" : "ConeIso20h3",
+                                             }
+},
+                                           { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 0.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K-]CC" : "NConeIso05h1",
+                                                 "[B+ -> K+ ^K+ K-]CC" : "NConeIso05h2",
+                                                 "[B+ -> K+ K+ ^K-]CC" : "NConeIso05h3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K-]CC" : "NConeIso10h1",
+                                                 "[B+ -> K+ ^K+ K-]CC" : "NConeIso10h2",
+                                                 "[B+ -> K+ K+ ^K-]CC" : "NConeIso10h3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K-]CC" : "NConeIso15h1",
+                                                 "[B+ -> K+ ^K+ K-]CC" : "NConeIso15h2",
+                                                 "[B+ -> K+ K+ ^K-]CC" : "NConeIso15h3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 2.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K-]CC" : "NConeIso20h1",
+                                                 "[B+ -> K+ ^K+ K-]CC" : "NConeIso20h2",
+                                                 "[B+ -> K+ K+ ^K-]CC" : "NConeIso20h3",
+                                             }
+                                           },
+                                          { "Type"           : "RelInfoVertexIsolation",
+                                            "Location"       : "VertexIsoInfo"} 
+                                     ]
+)
+        
+        self.lineKpKpKp_incl = StrippingLine( _KpKpKp_inclName + 'Line',
+                                              prescale   = config['KpKpKp_inclLinePrescale'],
+                                              postscale  = config['KpKpKp_inclLinePostscale'],
+                                              algos      = self.algosKpKpKp,
+                                              EnableFlavourTagging = True,
+                                              FILTER = filter,
+                                              RelatedInfoTools = [
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K+]CC" : "ConeIso05h1",
+                                                 "[B+ -> K+ ^K+ K+]CC" : "ConeIso05h2",
+                                                 "[B+ -> K+ K+ ^K+]CC" : "ConeIso05h3",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K+]CC" : "ConeIso10h1",
+                                                 "[B+ -> K+ ^K+ K+]CC" : "ConeIso10h2",
+                                                 "[B+ -> K+ K+ ^K+]CC" : "ConeIso10h3",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K+]CC" : "ConeIso15h1",
+                                                 "[B+ -> K+ ^K+ K+]CC" : "ConeIso15h2",
+                                                 "[B+ -> K+ K+ ^K+]CC" : "ConeIso15h3",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 2.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K+]CC" : "ConeIso20h1",
+                                                 "[B+ -> K+ ^K+ K+]CC" : "ConeIso20h2",
+                                                 "[B+ -> K+ K+ ^K+]CC" : "ConeIso20h3",
+                                             }
+},
+                                           { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 0.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K+]CC" : "NConeIso05h1",
+                                                 "[B+ -> K+ ^K+ K+]CC" : "NConeIso05h2",
+                                                 "[B+ -> K+ K+ ^K+]CC" : "NConeIso05h3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K+]CC" : "NConeIso10h1",
+                                                 "[B+ -> K+ ^K+ K+]CC" : "NConeIso10h2",
+                                                 "[B+ -> K+ K+ ^K+]CC" : "NConeIso10h3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K+]CC" : "NConeIso15h1",
+                                                 "[B+ -> K+ ^K+ K+]CC" : "NConeIso15h2",
+                                                 "[B+ -> K+ K+ ^K+]CC" : "NConeIso15h3",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 2.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^K+ K+ K+]CC" : "NConeIso20h1",
+                                                 "[B+ -> K+ ^K+ K+]CC" : "NConeIso20h2",
+                                                 "[B+ -> K+ K+ ^K+]CC" : "NConeIso20h3",
+                                             }
+                                           },
+                                          { "Type"           : "RelInfoVertexIsolation",
+                                            "Location"       : "VertexIsoInfo"}                                                 
+                                     ]
+)
+        
+        self.linepph_incl = StrippingLine( _pph_inclName + 'Line',
+                                           prescale   = config['pph_inclLinePrescale'],
+                                           postscale  = config['pph_inclLinePostscale'],
+                                           algos      = self.algospph,
+                                           EnableFlavourTagging = True,
+                                           FILTER = filter,
+                                           RelatedInfoTools = [
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^p+ p~- K+]CC" : "ConeIso05p1",
+                                                 "[B+ -> p+ ^p~- K+]CC" : "ConeIso05p2",
+                                                 "[B+ -> p+ p~- ^K+]CC" : "ConeIso05h",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^p+ p~- K+]CC" : "ConeIso10p1",
+                                                 "[B+ -> p+ ^p~- K+]CC" : "ConeIso10p2",
+                                                 "[B+ -> p+ p~- ^K+]CC" : "ConeIso10h",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^p+ p~- K+]CC" : "ConeIso15p1",
+                                                 "[B+ -> p+ ^p~- K+]CC" : "ConeIso15p2",
+                                                 "[B+ -> p+ p~- ^K+]CC" : "ConeIso15h",
+                                             }
+},
+                                          { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 2.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM'],
+                                              'Location'  : 'ConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^p+ p~- K+]CC" : "ConeIso20p1",
+                                                 "[B+ -> p+ ^p~- K+]CC" : "ConeIso20p2",
+                                                 "[B+ -> p+ p~- ^K+]CC" : "ConeIso20h",
+                                             }
+},
+                                           { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 0.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso05B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^p+ p~- K+]CC" : "NConeIso05p1",
+                                                 "[B+ -> p+ ^p~- K+]CC" : "NConeIso05p2",
+                                                 "[B+ -> p+ p~- ^K+]CC" : "NConeIso05h",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso10B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^p+ p~- K+]CC" : "NConeIso10p1",
+                                                 "[B+ -> p+ ^p~- K+]CC" : "NConeIso10p2",
+                                                 "[B+ -> p+ p~- ^K+]CC" : "NConeIso10h",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 1.5, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso15B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^p+ p~- K+]CC" : "NConeIso15p1",
+                                                 "[B+ -> p+ ^p~- K+]CC" : "NConeIso15p2",
+                                                 "[B+ -> p+ p~- ^K+]CC" : "NConeIso15h",
+                                             }
+                                           },
+                                          { 'Type' : 'RelInfoConeVariablesForEW', 'ConeAngle' : 2.0, 'Variables' : ['EWCONEANGLE','EWCONENPX','EWCONENPY','EWCONENPZ','EWCONENMULT', 'EWCONENVPT', 'EWCONENSPT', 'EWCONENVP', 'EWCONENSP'],
+                                              'Location'  : 'NConeIso20B', 
+                                             "DaughterLocations" : {
+                                                 "[B+ -> ^p+ p~- K+]CC" : "NConeIso20p1",
+                                                 "[B+ -> p+ ^p~- K+]CC" : "NConeIso20p2",
+                                                 "[B+ -> p+ p~- ^K+]CC" : "NConeIso20h",
+                                             }
+                                           },
+                                          { "Type"           : "RelInfoVertexIsolation",
+                                            "Location"       : "VertexIsoInfo"} 
+                                     ]
+)
+        
+        self.registerLine(self.lineKKK_incl)
+        self.registerLine(self.lineKpKpKp_incl)
+        self.registerLine(self.linepph_incl)
+        
+        
+def makeKKK_incl(name,
+                 _h_PT,
+                 _h_P,
+                 _h_IPCHI2,
+                 _h_TRCHI2DOF,
+                 _h_TRGHP,      
+                 _3h_DOCA,
+                 _3h_PTmax,
+                 _3h_DIRA,
+                 _3h_FDCHI2,
+                 _3h_PVDOCAmin,
+                 _3h_CHI2,
+                 _3h_IPCHI2,
+                 _3h_PT,
+                 _3h_PTsum,
+                 _3h_Psum,
+                 _3h_PVIPCHI2sum,
+                 _3h_TRKCHIDOFmin,
+                 _3h_CORRMmax,
+                 _3h_CORRMmin,
+                 _3hKKK_Mmin,
+                 _3hKKK_Mmax) :
+  
+  _daughtersCuts = {"K+" : "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals()}
+  _combinationCut = "(AM < %(_3hKKK_Mmax)s*MeV) \
+                     & (AM > %(_3hKKK_Mmin)s*MeV) \
+                     & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_3h_DOCA)s)" % locals()
+  _motherCut = "(MAXTREE(((ABSID=='K+') | (ABSID=='K-')),PT) > %(_3h_PTmax)s*MeV) \
+                & (BPVDIRA > %(_3h_DIRA)s) \
+                & (BPVVDCHI2 > %(_3h_FDCHI2)s) \
+                & (VFASPF(VMINVDDV(PRIMARY)) > %(_3h_PVDOCAmin)s) \
+                & (VFASPF(VCHI2) < %(_3h_CHI2)s) \
+                & (MIPCHI2DV(PRIMARY) < %(_3h_IPCHI2)s) \
+                & (PT > %(_3h_PT)s*MeV) \
+                & (SUMTREE(PT,((ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_PTsum)s*MeV) \
+                & (SUMTREE(P,((ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_Psum)s*MeV) \
+                & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_PVIPCHI2sum)s) \
+                & (MINTREE((('K+'==ABSID) | ('K-'==ABSID)),TRCHI2DOF) < %(_3h_TRKCHIDOFmin)s) \
+                & (BPVCORRM < %(_3h_CORRMmax)s * MeV)& (BPVCORRM > %(_3h_CORRMmin)s*MeV)" % locals()
+  
+  _KKK=CombineParticles()
+  _KKK.DecayDescriptors  = ["[B+ -> K+ K+ K-]cc"]
+  _KKK.MotherCut         = _motherCut
+  _KKK.CombinationCut    = _combinationCut
+  _KKK.DaughtersCuts     = _daughtersCuts
+  
+  return Selection ( name,
+                     Algorithm = _KKK,
+                     RequiredSelections = [StdNoPIDsKaons])
+
+
+def makeKpKpKp_incl(name,
+                    _h_PT,
+                    _h_P,
+                    _h_IPCHI2,
+                    _h_TRCHI2DOF,
+                    _h_TRGHP,      
+                    _3h_DOCA,
+                    _3h_PTmax,
+                    _3h_DIRA,
+                    _3h_FDCHI2,
+                    _3h_PVDOCAmin,
+                    _3h_CHI2,
+                    _3h_IPCHI2,
+                    _3h_PT,
+                    _3h_PTsum,
+                    _3h_Psum,
+                    _3h_PVIPCHI2sum,
+                    _3h_TRKCHIDOFmin,
+                    _3h_CORRMmax,
+                    _3h_CORRMmin,
+                    _3hKKK_Mmin,
+                    _3hKKK_Mmax) :
+  
+  _daughtersCuts = {"K+" : "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals()}
+  _combinationCut = "(AM < %(_3hKKK_Mmax)s*MeV) \
+                     & (AM > %(_3hKKK_Mmin)s*MeV) \
+                     & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_3h_DOCA)s)" % locals()
+  _motherCut = "(MAXTREE(((ABSID=='K+') | (ABSID=='K-')),PT) > %(_3h_PTmax)s*MeV) \
+                & (BPVDIRA > %(_3h_DIRA)s) \
+                & (BPVVDCHI2 > %(_3h_FDCHI2)s) \
+                & (VFASPF(VMINVDDV(PRIMARY)) > %(_3h_PVDOCAmin)s) \
+                & (VFASPF(VCHI2) < %(_3h_CHI2)s) \
+                & (MIPCHI2DV(PRIMARY) < %(_3h_IPCHI2)s) \
+                & (PT > %(_3h_PT)s*MeV) \
+                & (SUMTREE(PT,((ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_PTsum)s*MeV) \
+                & (SUMTREE(P,((ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_Psum)s*MeV) \
+                & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_PVIPCHI2sum)s) \
+                & (MINTREE((('K+'==ABSID) | ('K-'==ABSID)),TRCHI2DOF) < %(_3h_TRKCHIDOFmin)s) \
+                & (BPVCORRM < %(_3h_CORRMmax)s * MeV)& (BPVCORRM > %(_3h_CORRMmin)s*MeV)" % locals()
+  
+  _KpKpKp=CombineParticles()
+  _KpKpKp.DecayDescriptors  = ["[B+ -> K+ K+ K+]cc"]
+  _KpKpKp.MotherCut         = _motherCut
+  _KpKpKp.CombinationCut    = _combinationCut
+  _KpKpKp.DaughtersCuts     = _daughtersCuts
+  
+  return Selection ( name,
+                     Algorithm = _KpKpKp,
+                     RequiredSelections = [StdNoPIDsKaons])
+
+
+def makepph_incl(name,
+                 _h_PT,
+                 _h_P,
+                 _h_IPCHI2,
+                 _h_TRCHI2DOF,
+                 _h_TRGHP,            
+                 _3h_DOCA,
+                 _3h_PTmax,
+                 _3h_DIRA,
+                 _3h_FDCHI2,
+                 _3h_PVDOCAmin,
+                 _3h_CHI2,
+                 _3h_IPCHI2,
+                 _3h_PT,
+                 _3h_PTsum,
+                 _3h_Psum,
+                 _3h_PVIPCHI2sum,
+                 _3h_TRKCHIDOFmin,
+                 _3h_CORRMmax,
+                 _3h_CORRMmin,
+                 _3hpph_deltaMmax,
+                 _3hpph_deltaMmin) :
+  
+  _daughtersCuts = {"p+" : "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals(),
+                    "K+" :  "(PT > %(_h_PT)s*MeV) \
+                             & (P > %(_h_P)s*MeV) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (TRGHOSTPROB < %(_h_TRGHP)s)" % locals()}
+  _combinationCut = "(AM < (5279.15 + %(_3hpph_deltaMmax)s)*MeV) \
+                     & (AM > (5279.15 - %(_3hpph_deltaMmin)s)*MeV) \
+                     & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_3h_DOCA)s)" % locals()
+  _motherCut = "(MAXTREE(((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='K+') | (ABSID=='K-')),PT) > %(_3h_PTmax)s*MeV) \
+                & (BPVDIRA > %(_3h_DIRA)s) \
+                & (BPVVDCHI2 > %(_3h_FDCHI2)s) \
+                & (VFASPF(VMINVDDV(PRIMARY)) > %(_3h_PVDOCAmin)s) \
+                & (VFASPF(VCHI2) < %(_3h_CHI2)s) \
+                & (MIPCHI2DV(PRIMARY) < %(_3h_IPCHI2)s) \
+                & (PT > %(_3h_PT)s*MeV) \
+                & (SUMTREE(PT,((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_PTsum)s*MeV) \
+                & (SUMTREE(P,((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_Psum)s*MeV) \
+                & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='p+') |(ABSID=='p~-') |(ABSID=='K+') | (ABSID=='K-')),0.0) > %(_3h_PVIPCHI2sum)s) \
+                & (MINTREE(((ABSID=='p+') |(ABSID=='p~-') |('K+'==ABSID) | ('K-'==ABSID)),TRCHI2DOF) < %(_3h_TRKCHIDOFmin)s) \
+                & (BPVCORRM < %(_3h_CORRMmax)s * MeV)& (BPVCORRM > %(_3h_CORRMmin)s*MeV)" % locals()
+  
+  _pph=CombineParticles()
+  _pph.DecayDescriptors  = ["[B+ -> p+ p~- K+]cc"]
+  _pph.MotherCut         = _motherCut
+  _pph.CombinationCut    = _combinationCut
+  _pph.DaughtersCuts     = _daughtersCuts
+  
+  return Selection ( name,
+                     Algorithm = _pph,
+                     RequiredSelections = [StdNoPIDsKaons,StdLooseProtons])
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2rho0rhoPlus.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2rho0rhoPlus.py
new file mode 100644
index 000000000..28c9ae693
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingBu2rho0rhoPlus.py
@@ -0,0 +1,534 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for B+ -> rho0 rho+
+Ported from StrippingArchive/Stripping21
+Lines for both resolved and merged pi0's
+Lines for both long and upstream tracks
+"""
+
+__author__  = "Jason E Andrews"
+__date__    = "26/11/2016"
+__version__ = "4.0"
+__all__     = ( "default_config",
+                "StrippingBu2rho0rhoPlusConf" )
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import ( StdAllNoPIDsPions, StdNoPIDsUpPions,
+                                StdLooseMergedPi0, StdLooseResolvedPi0 )
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+default_config = {
+    "NAME"        : "Bu2rho0rhoPlus",
+    "WGs"         : [ "BnoC" ],
+    "BUILDERTYPE" : "StrippingBu2rho0rhoPlusConf",
+    "STREAMS"     : { "Bhadron" : [ "StrippingBu2rho0rhoPlusMergedLine",
+                                    "StrippingBu2rho0rhoPlusResolvedLine",
+                                    "StrippingBu2rho0rhoPlusUpMergedLine",
+                                    "StrippingBu2rho0rhoPlusUpResolvedLine", ] },
+    "CONFIG"      : { "isMC"           : False,  # True = no Hlt filter
+                      "refitPVs"       : True,
+                      
+                      "vetoTrISMUON"   : True,   # ~ISMUON causes errors?
+                      "trMinIPChi2"    : 4,
+                      "trUpMinIPChi2"  : 8,
+                      "trMinProbNNpi"  : 0.0,
+                      "trMaxChi2Dof"   : 3.0,
+                      "trMaxGhostProb" : 0.5,
+
+                      "longLines"     : { "rhoCombMassMax"        : 1300,   # MeV
+                                          "rhoCombMassMin"        : 100,    # MeV
+                                          "rhoMothMassMax"        : 1200,   # MeV
+                                          "rhoMothMassMin"        : 200,    # MeV
+                                          "rho0MinVChi2Dof"       : 14,
+                                          
+                                          "pi0ResMinCL"           :-1000,
+                                          "pi0ResMinP"            : 3500,   # MeV
+                                          "pi0ResMinPT"           : 400,    # MeV
+                                          "piPRhoPResMinIPChi2"   : 20,
+                                          "rho0ResMinIPChi2"      : 20,
+                                          "rho0ResMinFDChi2"      : 27,
+                                          "rhoPResMinP"           : 7000,   # MeV
+                                          "rhoPResMinPT"          : 1000,   # MeV
+                                          
+                                          "BuResCombMassWindow"   : 650,    # MeV
+                                          "BuResMaxTrIPChi2Min"   : 40,
+                                          "BuResMaxTrPTMin"       : 1900,   # MeV
+                                          "BuResSumTrPTMin"       : 3800,   # MeV
+                                          "BuResMinVChi2Dof"      : 8,
+                                          "BuResMothMassWindow"   : 600,    # MeV
+                                          "BuResMinFDChi2"        : 120,
+                                          "BuResMaxIPChi2"        : 30,
+                                          "BuResMinDira"          : 0.9998,
+                                          "BuResMinPT"            : 1000,   # MeV
+                                          
+                                          "pi0MgdMinPT"           : 1900,   # MeV
+                                          "piPRhoPMgdMinPT"       : 960,    # MeV
+                                          "rho0MgdDauMinPT"       : 100,    # MeV
+                                          "rho0MgdMinIPChi2"      : 33,
+                                          "rho0MgdMinFDChi2"      : 25,
+                                          "rho0MgdMaxTrIPChi2Min" : 20,
+                                          
+                                          "BuMgdCombMassMin"      : 3900,   # MeV
+                                          "BuMgdCombMassMax"      : 7150,   # MeV
+                                          "BuMgdMaxTrIPChi2Min"   : 20,
+                                          "BuMgdMinFDChi2"        : 120,
+                                          "BuMgdMaxIPChi2"        : 450,
+                                          "BuMgdMinVChi2Dof"      : 8,
+                                          "BuMgdMothMassMin"      : 4000,   # MeV
+                                          "BuMgdMothMassMax"      : 7000,   # MeV
+                                          "BuMgdMinDira"          : 0.9997,
+                                          "BuMgdMinPT"            : 4000,   # MeV
+                                          },
+                      "upstreamLines" : { "rhoCombMassMax"        : 1300,   # MeV
+                                          "rhoCombMassMin"        : 100,    # MeV
+                                          "rhoMothMassMax"        : 1200,   # MeV
+                                          "rhoMothMassMin"        : 200,    # MeV
+                                          "rho0MinVChi2Dof"       : 14,
+                                          
+                                          "pi0ResMinCL"           :-1000,
+                                          "pi0ResMinP"            : 1000,   # MeV
+                                          "pi0ResMinPT"           : 400,    # MeV
+                                          "piPRhoPResMinIPChi2"   : 10,
+                                          "rho0ResMinIPChi2"      : 55,
+                                          "rho0ResMinFDChi2"      : 55,
+                                          "rhoPResMinP"           : 9000,   # MeV
+                                          "rhoPResMinPT"          : 1400,   # MeV
+                                          
+                                          "BuResCombMassWindow"   : 650,    # MeV
+                                          "BuResMaxTrIPChi2Min"   : 0,
+                                          "BuResMaxTrPTMin"       : 1600,   # MeV
+                                          "BuResSumTrPTMin"       : 3500,   # MeV
+                                          "BuResMinVChi2Dof"      : 8,
+                                          "BuResMothMassWindow"   : 600,    # MeV
+                                          "BuResMinFDChi2"        : 55,
+                                          "BuResMaxIPChi2"        : 20,
+                                          "BuResMinDira"          : 0.9998,
+                                          "BuResMinPT"            : 1500,   # MeV
+                                          
+                                          "pi0MgdMinPT"           : 0,      # MeV
+                                          "piPRhoPMgdMinPT"       : 0,      # MeV
+                                          "rho0MgdDauMinPT"       : 0,      # MeV
+                                          "rho0MgdMinIPChi2"      : 55,
+                                          "rho0MgdMinFDChi2"      : 55,
+                                          "rho0MgdMaxTrIPChi2Min" : 55,
+                                          
+                                          "BuMgdCombMassMin"      : 3900,   # MeV
+                                          "BuMgdCombMassMax"      : 7150,   # MeV
+                                          "BuMgdMaxTrIPChi2Min"   : 55,
+                                          "BuMgdMinFDChi2"        : 55,
+                                          "BuMgdMaxIPChi2"        : 55,
+                                          "BuMgdMinVChi2Dof"      : 8,
+                                          "BuMgdMothMassMin"      : 4000,   # MeV
+                                          "BuMgdMothMassMax"      : 7000,   # MeV
+                                          "BuMgdMinDira"          : 0.999,
+                                          "BuMgdMinPT"            : 5000,   # MeV
+                                          },
+                      
+                      "PrescaleBu2rho0rhoPlusResolved"   : 1.0,
+                      "PrescaleBu2rho0rhoPlusMerged"     : 1.0,
+                      "PrescaleBu2rho0rhoPlusUpResolved" : 1.0,
+                      "PrescaleBu2rho0rhoPlusUpMerged"   : 1.0
+                      }
+    }
+
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+class StrippingBu2rho0rhoPlusConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::    
+    def __init__(self, name, config) :
+        self.name = name
+        LineBuilder.__init__(self, name, config)
+        modeName = "Bu2rho0rhoPlus"
+        ### filters :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        mgdVoidFilter = "(CONTAINS('Phys/StdLooseMergedPi0/Particles')>0)"
+        resVoidFilter = "(CONTAINS('Phys/StdLooseResolvedPi0/Particles')>0)"
+
+        hlt1Filter = None
+        hlt2Filter = None
+        if not config["isMC"]:
+            hlt1Filter     = "HLT_PASS_RE('Hlt1(Two)?TrackMVADecision')"
+            hlt2Filter   = "HLT_PASS_RE('Hlt2Topo[23]BodyDecision')"
+        ### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        longTracksCuts      = ""
+        upAndLongTracksCuts = ""
+        if config["vetoTrISMUON"]:
+            longTracksCuts      += "(~ISMUON) &"
+            upAndLongTracksCuts += "(~ISMUON) &"
+        longTracksCuts      += "(MIPCHI2DV(PRIMARY) > %(trMinIPChi2)s)"\
+                               " & (PROBNNpi > %(trMinProbNNpi)s)"\
+                               " & (TRCHI2DOF < %(trMaxChi2Dof)s)"\
+                               " & (TRGHOSTPROB < %(trMaxGhostProb)s)"\
+                               % locals()["config"]
+        upAndLongTracksCuts += "(MIPCHI2DV(PRIMARY) > %(trUpMinIPChi2)s)"\
+                               " & (PROBNNpi > %(trMinProbNNpi)s)"\
+                               " & (TRCHI2DOF < %(trMaxChi2Dof)s)"\
+                               " & (TRGHOSTPROB < %(trMaxGhostProb)s)"\
+                               % locals()["config"]
+        ### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        longTracksFilter = FilterDesktop( Code = longTracksCuts )
+        longTracks = Selection( "longTracksFor" + self.name,
+                                Algorithm = longTracksFilter,
+                                RequiredSelections = [ StdAllNoPIDsPions ] )        
+        upAndLongTracksFilter = FilterDesktop( Code = upAndLongTracksCuts )
+        upAndLongTracks = Selection( "upAndLongTracksFor" + self.name,
+                                     Algorithm = upAndLongTracksFilter,
+                                     RequiredSelections = [ StdAllNoPIDsPions,
+                                                            StdNoPIDsUpPions ] )
+        ### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        daughterIsoDict = { "[B+ -> ^rho(770)0  rho(770)+]CC" : "rho0",
+                            "[B+ ->  rho(770)0 ^rho(770)+]CC" : "rhoP",
+                            }
+        ### long tracks :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        selBuMgdLong, mgdDaughters = makeBu2rho0rhoPlus(
+            modeName + "Merged",
+            config["longLines"],
+            [ longTracks ],
+            [ StdLooseMergedPi0 ],
+            merged = True,
+            refit = config["refitPVs"] )
+        
+        self.Bu2rho0rhoPlusMergedLine = StrippingLine(
+            modeName + "MergedLine",
+            prescale = config["PrescaleBu2rho0rhoPlusMerged"],
+            HLT1 = hlt1Filter,
+            HLT2 = hlt2Filter,
+            FILTER = mgdVoidFilter,
+            checkPV = True,
+            RelatedInfoTools = [ relInfoCVDict( 1.7,  daughterIsoDict ),
+                                 relInfoCVDict( 1.35, daughterIsoDict ),
+                                 relInfoCVDict( 1.0,  daughterIsoDict ),
+                                 relInfoVtxDict( daughterIsoDict ),
+                                 ],
+            # RelatedInfoTools = relInfoToolList( selBuMgdLong, mgdDaughters ),
+            # RequiredRawEvents = [ 'Calo' ],
+            selection = selBuMgdLong )
+        
+        self.registerLine( self.Bu2rho0rhoPlusMergedLine )            
+        ### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        selBuResLong, resDaughters = makeBu2rho0rhoPlus(
+            modeName + "Resolved",
+            config["longLines"],
+            [ longTracks ],
+            [ StdLooseResolvedPi0 ],
+            merged = False,
+            refit = config["refitPVs"] )
+        
+        self.Bu2rho0rhoPlusResolvedLine = StrippingLine(
+            modeName + "ResolvedLine",
+            prescale = config["PrescaleBu2rho0rhoPlusResolved"],
+            HLT1 = hlt1Filter,
+            HLT2 = hlt2Filter,
+            FILTER = resVoidFilter,
+            checkPV = True,
+            RelatedInfoTools = [ relInfoCVDict( 1.7,  daughterIsoDict ),
+                                 relInfoCVDict( 1.35, daughterIsoDict ),
+                                 relInfoCVDict( 1.0,  daughterIsoDict ),
+                                 relInfoVtxDict( daughterIsoDict ),
+                                 ],
+            # RelatedInfoTools = relInfoToolList( selBuResLong, resDaughters ),
+            # RequiredRawEvents = [ 'Calo' ],
+            selection = selBuResLong )
+        
+        self.registerLine( self.Bu2rho0rhoPlusResolvedLine )
+        ### upstream ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        selBuMgdUp, mgdUpDaughters = makeBu2rho0rhoPlus(
+            modeName + "UpMerged",
+            config["upstreamLines"],
+            [ upAndLongTracks ],
+            [ StdLooseMergedPi0 ],
+            merged = True,
+            upstream = True,
+            refit = config["refitPVs"] )
+        
+        self.Bu2rho0rhoPlusUpMergedLine = StrippingLine(
+            modeName + "UpMergedLine",
+            prescale = config["PrescaleBu2rho0rhoPlusUpMerged"],
+            HLT1 = hlt1Filter,
+            HLT2 = hlt2Filter,
+            FILTER = mgdVoidFilter,
+            checkPV = True,
+            RelatedInfoTools = [ relInfoCVDict( 1.7,  daughterIsoDict ),
+                                 relInfoCVDict( 1.35, daughterIsoDict ),
+                                 relInfoCVDict( 1.0,  daughterIsoDict ),
+                                 relInfoVtxDict( daughterIsoDict ),
+                                 ],
+            # RelatedInfoTools = relInfoToolList( selBuMgdUp, mgdUpDaughters ),
+            # RequiredRawEvents = [ 'Calo' ],
+            selection = selBuMgdUp )
+        
+        self.registerLine( self.Bu2rho0rhoPlusUpMergedLine )            
+        ### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+        selBuResUp, resUpDaughters = makeBu2rho0rhoPlus(
+            modeName + "UpResolved",
+            config["upstreamLines"],
+            [ upAndLongTracks ],
+            [ StdLooseResolvedPi0 ],
+            merged = False,
+            upstream = True,
+            refit = config["refitPVs"] )
+        
+        self.Bu2rho0rhoPlusUpResolvedLine = StrippingLine(
+            modeName + "UpResolvedLine",
+            prescale = config["PrescaleBu2rho0rhoPlusUpResolved"],
+            HLT1 = hlt1Filter,
+            HLT2 = hlt2Filter,
+            FILTER = resVoidFilter,
+            checkPV = True,
+            RelatedInfoTools = [ relInfoCVDict( 1.7,  daughterIsoDict ),
+                                 relInfoCVDict( 1.35, daughterIsoDict ),
+                                 relInfoCVDict( 1.0,  daughterIsoDict ),
+                                 relInfoVtxDict( daughterIsoDict ),
+                                 ],
+            # RelatedInfoTools = relInfoToolList( selBuResUp, resUpDaughters ),
+            # RequiredRawEvents = [ 'Calo' ],
+            selection = selBuResUp )
+        
+        self.registerLine( self.Bu2rho0rhoPlusUpResolvedLine )
+### helper functions ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def makeRho0( name ,
+              config,
+              tracks,
+              merged = True ) :
+    ### -------------------------------------------------------------------------
+    combCuts = "(AM > %(rhoCombMassMin)s)"\
+               " & (AM < %(rhoCombMassMax)s)" % locals()["config"]
+    ### -------------------------------------------------------------------------
+    DaughtersCuts = {}
+    
+    motherCuts = "(MIPCHI2DV(PRIMARY) > %(rho0ResMinIPChi2)s)"\
+                 " & (BPVVDCHI2 > %(rho0ResMinFDChi2)s)"\
+                 " & (M > %(rhoMothMassMin)s) & (M < %(rhoMothMassMax)s)"\
+                 " & (VFASPF(VCHI2/VDOF) < %(rho0MinVChi2Dof)s)"\
+                 % locals()["config"]
+    ### -------------------------------------------------------------------------
+    if merged:
+        DaughtersCuts = { "pi+" : "PT > %(rho0MgdDauMinPT)s" % locals()["config"],
+                          "pi-" : "PT > %(rho0MgdDauMinPT)s" % locals()["config"] }
+        motherCuts = "(MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))"\
+                     " > %(rho0MgdMaxTrIPChi2Min)s)"\
+                     " & (MIPCHI2DV(PRIMARY) > %(rho0MgdMinIPChi2)s)"\
+                     " & (BPVVDCHI2 > %(rho0MgdMinFDChi2)s)"\
+                     " & (M > %(rhoMothMassMin)s) & (M < %(rhoMothMassMax)s)"\
+                     " & (VFASPF(VCHI2/VDOF) < %(rho0MinVChi2Dof)s)"\
+                     % locals()["config"]
+    ### -------------------------------------------------------------------------
+    rho0 = CombineParticles( DecayDescriptor = "rho(770)0 -> pi+ pi-",
+                             DaughtersCuts = DaughtersCuts,
+                             CombinationCut = combCuts,
+                             MotherCut = motherCuts,
+                             ParticleCombiners = { "" : "OfflineVertexFitter" } )
+    ### -------------------------------------------------------------------------
+    return Selection( name,
+                      Algorithm = rho0,
+                      RequiredSelections = tracks )
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def makeRhoP( name,
+              config,
+              tracks,
+              pi0s,
+              merged = True ) :
+    ### -------------------------------------------------------------------------
+    combCuts = "(AM > %(rhoCombMassMin)s)"\
+               " & (AM < %(rhoCombMassMax)s)" % locals()["config"]
+    ### -------------------------------------------------------------------------
+    DaughtersCuts = { "pi+" : "(MIPCHI2DV(PRIMARY) > %(piPRhoPResMinIPChi2)s)"
+                      % locals()["config"],
+                      "pi0" : "(CL > %(pi0ResMinCL)s) & (P > %(pi0ResMinP)s)"\
+                      " & (PT > %(pi0ResMinPT)s)" % locals()["config"] }
+    
+    motherCuts = "(M > %(rhoMothMassMin)s) & (M < %(rhoMothMassMax)s)"\
+                 " & (P > %(rhoPResMinP)s) & (PT > %(rhoPResMinPT)s)"\
+                 % locals()["config"]
+    ### -------------------------------------------------------------------------    
+    if merged:
+        DaughtersCuts = { "pi+" : "(PT > %(piPRhoPMgdMinPT)s)" % locals()["config"],
+                          "pi0" : "(PT > %(pi0MgdMinPT)s)" % locals()["config"] }
+        motherCuts = "ALL"
+    ### -------------------------------------------------------------------------
+    rhoP = CombineParticles( DecayDescriptor = "[rho(770)+ -> pi+ pi0]cc",
+                             DaughtersCuts = DaughtersCuts,
+                             CombinationCut = combCuts,
+                             MotherCut = motherCuts,
+                             ParticleCombiners = { "" : "ParticleAdder" } )
+    ### -------------------------------------------------------------------------
+    return Selection( name,
+                      Algorithm = rhoP,
+                      RequiredSelections = tracks + pi0s )
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def makeBu2rho0rhoPlus( name,
+                        config,
+                        tracks,
+                        pi0s,
+                        merged = True,
+                        upstream = False,
+                        refit = True ) :
+    __configuration_keys__ = (
+        "rhoCombMassMax",     
+        "rhoCombMassMin",     
+        "rhoMothMassMax",     
+        "rhoMothMassMin",     
+        "rho0MinVChi2Dof",    
+        
+        "pi0ResMinCL",
+        "pi0ResMinP",
+        "pi0ResMinPT",
+        "piPRhoPResMinIPChi2",
+        "rho0ResMinIPChi2", 
+        "rho0ResMinFDChi2",
+        "rhoPResMinP",
+        "rhoPResMinPT",
+                              
+        "BuResCombMassWindow",
+        "BuResMaxTrIPChi2Min",
+        "BuResMaxTrPTMin",
+        "BuResSumTrPTMin",    
+        "BuResMinVChi2Dof",   
+        "BuResMothMassWindow",
+        "BuResMinFDChi2",
+        "BuResMaxIPChi2",
+        "BuResMinDira",
+        "BuResMinPT",
+                              
+        "pi0MgdMinPT",
+        "piPRhoPMgdMinPT",
+        "rho0MgdDauMinPT",    
+        "rho0MgdMinIPChi2", 
+        "rho0MgdMinFDChi2",
+        "rho0MgdMaxTrIPChi2Min",
+
+        "BuMgdCombMassMin",   
+        "BuMgdCombMassMax",   
+        "BuMgdMaxTrIPChi2Min",
+        "BuMgdMinFDChi2",
+        "BuMgdMaxIPChi2",
+        "BuMgdMinVChi2Dof",   
+        "BuMgdMothMassMin",   
+        "BuMgdMothMassMax",   
+        "BuMgdMinDira",
+        "BuMgdMinPT",
+        )
+
+    checkConfig( __configuration_keys__, config )
+
+    ### -------------------------------------------------------------------------
+    rho0 = makeRho0( "rho0For" + name, config, tracks, merged = merged )
+    rhoP = makeRhoP( "rhoPFor" + name, config, tracks, pi0s, merged = merged )
+    ### -------------------------------------------------------------------------
+    combCuts = "(ADAMASS('B0') < %(BuResCombMassWindow)s)"\
+               " & (APT > %(BuResMinPT)s)" % locals()["config"]
+    
+    motherCuts = "(SUMTREE('pi+'==ABSID,PT) > %(BuResSumTrPTMin)s)"\
+                 " & (ADMASS('B+') < %(BuResMothMassWindow)s)"\
+                 " & (MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))"\
+                 " > %(BuResMaxTrIPChi2Min)s)"\
+                 " & (MAXTREE('pi+'==ABSID,PT) > %(BuResMaxTrPTMin)s)"\
+                 " & (BPVVDCHI2 > %(BuResMinFDChi2)s)"\
+                 " & (MIPCHI2DV(PRIMARY) < %(BuResMaxIPChi2)s)"\
+                 " & (BPVDIRA > %(BuResMinDira)s)"\
+                 " & (VFASPF(VCHI2/VDOF) < %(BuResMinVChi2Dof)s)"\
+                 % locals()["config"]
+    ### -------------------------------------------------------------------------
+    if merged:
+        combCuts = "(AM > %(BuMgdCombMassMin)s) & (AM < %(BuMgdCombMassMax)s)"\
+                   " & (APT > %(BuMgdMinPT)s)"\
+                   % locals()["config"]
+        motherCuts = "(MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))"\
+                     " > %(BuMgdMaxTrIPChi2Min)s)"\
+                     " & (M > %(BuMgdMothMassMin)s) & (M < %(BuMgdMothMassMax)s)"\
+                     " & (BPVVDCHI2 > %(BuMgdMinFDChi2)s)"\
+                     " & (MIPCHI2DV(PRIMARY) < %(BuMgdMaxIPChi2)s)"\
+                     " & (BPVDIRA > %(BuMgdMinDira)s)"\
+                     " & (VFASPF(VCHI2/VDOF) < %(BuMgdMinVChi2Dof)s)"\
+                     % locals()["config"]
+    ### -------------------------------------------------------------------------
+    if upstream:
+        motherCuts = "(INTREE( HASTRACK & ISUP )) & " + motherCuts
+    ### -------------------------------------------------------------------------
+    Bu = CombineParticles( DecayDescriptor = "[B+ -> rho(770)0 rho(770)+]cc",
+                           CombinationCut = combCuts,
+                           MotherCut = motherCuts,
+                           ReFitPVs = refit,
+                           ParticleCombiners = { "" : "OfflineVertexFitter" } )
+    ### -------------------------------------------------------------------------
+    daughters = [ rho0, rhoP ]
+    return ( Selection( name + "Sel", Algorithm = Bu, RequiredSelections = daughters ),
+             daughters )
+
+# ### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+# def relInfoCVDict( angle = 1, selections = None, recursion = 0 ):
+#     Locations = {}
+#     for index, sel in enumerate(selections):
+#         Locations[sel] = 'maps/' + str(angle) + '/' + str(index)
+#     return { 'Type'           : 'RelInfoConeVariables',
+#              'ConeAngle'      : angle,
+#              'Variables'      : [ 'CONEANGLE', 'CONEMULT',
+#                                   'CONEP', 'CONEPASYM',
+#                                   'CONEPT', 'CONEPTASYM' ],
+#              'RecursionLevel' : recursion,
+#              'Locations'      : Locations }
+# ### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+# def relInfoVtxDict( selections = None, recursion = 0 ):
+#     Locations = {}
+#     for index, sel in enumerate(selections):
+#         Locations[sel] = 'maps/vtx/' + str(index)
+#     return { 'Type'           : 'RelInfoVertexIsolation',
+#              'Variables'      : [ 'VTXISONUMVTX',
+#                                   'VTXISODCHI2ONETRACK', 'VTXISODCHI2MASSONETRACK',
+#                                   'VTXISODCHI2TWOTRACK', 'VTXISODCHI2MASSTWOTRACK' ],
+#              'RecursionLevel' : recursion,
+#              'Locations'      : Locations }
+# ### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+# def relInfoToolList( mother, daughters ):
+#     return [ relInfoCVDict( angle = 1.70,
+#                             selections = [ mother ] + daughters,
+#                             recursion = 1),
+#              relInfoCVDict( angle = 1.35,
+#                             selections = [ mother ] + daughters,
+#                             recursion = 1),
+#              relInfoCVDict( angle = 1.00,
+#                             selections = [ mother ] + daughters,
+#                             recursion = 1),
+#              relInfoVtxDict( selections = [ mother ] + daughters, recursion = 1 )
+#              ]
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def relInfoCVDict( angle = 1, DauDict = {} ):
+    ModifiedDauDict = DauDict.copy()
+    for flag, name in ModifiedDauDict.iteritems():
+        ModifiedDauDict[flag] = 'maps/coneIso_' + name + '/' + str(angle)
+    return { 'Type'             : 'RelInfoConeVariables',
+             'ConeAngle'        : angle,
+             'Variables'        : [ 'CONEANGLE', 'CONEMULT',
+                                    'CONEP', 'CONEPASYM',
+                                    'CONEPT', 'CONEPTASYM' ],
+             'DaughterLocations': ModifiedDauDict,
+             'Location'         : 'maps/coneIso_B/' + str(angle) }
+### :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+def relInfoVtxDict( DauDict = {} ):
+    ModifiedDauDict = DauDict.copy()
+    for flag, name in ModifiedDauDict.iteritems():
+        ModifiedDauDict[flag] = 'maps/vtxIso_' + name
+    return { 'Type'             : 'RelInfoVertexIsolation',
+             'Variables'        : [ 'VTXISONUMVTX',
+                                    'VTXISODCHI2ONETRACK', 'VTXISODCHI2MASSONETRACK',
+                                    'VTXISODCHI2TWOTRACK', 'VTXISODCHI2MASSTWOTRACK',
+                                    ],
+             'DaughterLocations': ModifiedDauDict,
+             'Location'         : 'maps/vtxIso_B' }
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingButo5h.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingButo5h.py
new file mode 100644
index 000000000..a824adf3b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingButo5h.py
@@ -0,0 +1,431 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of Bu->5h from:   
+   Exclusive 5pi line
+   Exclusive K4pi line
+   Exclusive pp3pi line
+   Exclusive ppKpipi line
+
+Exported symbols (use python help!):
+   - Buto5hBuilder
+   - make5pi_excl  
+   - makeK4pi_excl
+   - makepp3pi_excl
+   - makeppKpipi_excl
+'''
+
+__author__ = ['Luiz Gustavo de Oliveira', 'Alvaro Gomes', 'Bruno Souza de Paula']
+__date__ = '22/Aug/2014'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('Buto5hBuilder',
+           'make5pi_excl', 
+           'makeK4pi_excl', 
+           'makepp3pi_excl', 
+           'makeppKpipi_excl', 
+           'default_config'
+	   )
+
+# Selecting Cuts 
+
+config_params = {
+    'MaxTrSIZE'             : 200 ,    
+    '_h_PT'                 : 250. ,
+    '_h_IPCHI2'             : 6. ,     
+    '_h_TRCHI2DOF'          : 1.7 ,    
+    '_h_TRGHP'              : 0.2 , 
+    '_5h_DOCA'              : .14 ,    
+    '_5h_DIRA'              : .99999 , 
+    '_5h_FDCHI2'            : 500. ,   
+    '_5h_CHI2'              : 12. ,
+    '_5h_PT'                : 1000. ,
+    '_5h_PVIPCHI2sum'       : 400. ,
+    '_5h_Mmax'              : 5679. ,
+    '_5h_Mmin'              : 5079. ,
+    '_probnnpi'             : .15,
+    '_probnnk'              : .20,
+    '_probnnp'              : .05,
+    '5pi_exclLinePrescale'  : 1.0,
+    '5pi_exclLinePostscale' : 1.0,
+    'K4pi_exclLinePrescale' : 1.0,
+    'K4pi_exclLinePostscale': 1.0,
+    'pp3pi_exclLinePrescale' : 1.0,
+    'pp3pi_exclLinePostscale': 1.0,
+    'ppKpipi_exclLinePrescale' : 1.0,
+    'ppKpipi_exclLinePostscale': 1.0
+    }
+
+default_config = {
+  'NAME'        : 'Buto5h',
+  'WGs'         : ['BnoC'],
+  'BUILDERTYPE' : 'Buto5hBuilder',
+  'CONFIG'      : config_params,
+  'STREAMS'     : ['Bhadron']
+}
+
+"""
+B+ -> h+ h+ h+ h- h- channels
+"""
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+
+import StandardParticles
+
+# Selecting Std All No PIDs containers
+if hasattr(StandardParticles, "StdAllNoPIDsKaons"):
+  from StandardParticles import StdAllNoPIDsKaons as StdNoPIDsKaons
+else:
+  from StandardParticles import StdNoPIDsKaons as StdNoPIDsKaons
+
+if hasattr(StandardParticles, "StdAllNoPIDsPions"):
+  from StandardParticles import StdAllNoPIDsPions as StdNoPIDsPions
+else:
+  from StandardParticles import StdNoPIDsPions as StdNoPIDsPions
+
+if hasattr(StandardParticles, "StdAllLooseProtons"):
+  from StandardParticles import StdAllLooseProtons as StdLooseProtons
+else:
+  from StandardParticles import StdLooseProtons as StdLooseProtons
+
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter as VoidFilter
+
+default_name = "Buto5h"
+
+class Buto5hBuilder(LineBuilder) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+      LineBuilder.__init__(self, name, config)
+
+      _5pi_exclName = name + '_5pi_excl'
+      _K4pi_exclName = name + '_K4pi_excl'
+      _pp3pi_exclName = name + '_pp3pi_excl'
+      _ppKpipi_exclName = name + '_ppKpipi_excl'
+
+      self.sel5pi = make5pi_excl( '5piexclFor' + _5pi_exclName + 'Sel', 
+			   _h_PT           = config['_h_PT'],
+			   _h_IPCHI2       = config['_h_IPCHI2'],
+			   _h_TRCHI2DOF    = config['_h_TRCHI2DOF'], 
+                           _h_TRGHP        = config['_h_TRGHP'],
+			   _5h_DOCA	 = config['_5h_DOCA'],        
+			   _5h_DIRA	 = config['_5h_DIRA'],        
+			   _5h_FDCHI2	 = config['_5h_FDCHI2'],      
+			   _5h_CHI2        = config['_5h_CHI2'], 
+                           _5h_PT        = config['_5h_PT'],
+			   _5h_PVIPCHI2sum = config['_5h_PVIPCHI2sum'], 
+			   _5h_Mmax     = config['_5h_Mmax'],         
+                           _probnnpi    = config['_probnnpi'],
+			   _5h_Mmin     = config['_5h_Mmin'])     
+
+      self.selK4pi = makeK4pi_excl( 'K4piexclFor' + _K4pi_exclName + 'Sel', 
+			   _h_PT           = config['_h_PT'],
+			   _h_IPCHI2       = config['_h_IPCHI2'],
+			   _h_TRCHI2DOF    = config['_h_TRCHI2DOF'], 
+                           _h_TRGHP        = config['_h_TRGHP'],
+			   _5h_DOCA	 = config['_5h_DOCA'],        
+			   _5h_DIRA	 = config['_5h_DIRA'],        
+			   _5h_FDCHI2	 = config['_5h_FDCHI2'],      
+			   _5h_CHI2        = config['_5h_CHI2'], 
+                           _5h_PT        = config['_5h_PT'],
+			   _5h_PVIPCHI2sum = config['_5h_PVIPCHI2sum'], 
+			   _5h_Mmax    = config['_5h_Mmax'],
+                           _probnnpi    = config['_probnnpi'],
+                           _probnnk    = config['_probnnk'],                                    
+			   _5h_Mmin    = config['_5h_Mmin'] )    
+
+      self.selpp3pi = makepp3pi_excl( 'pp3piexclFor' + _pp3pi_exclName + 'Sel', 
+			   _h_PT           = config['_h_PT'],
+			   _h_IPCHI2       = config['_h_IPCHI2'],
+			   _h_TRCHI2DOF    = config['_h_TRCHI2DOF'], 
+                           _h_TRGHP        = config['_h_TRGHP'],
+			   _5h_DOCA	 = config['_5h_DOCA'],        
+			   _5h_DIRA	 = config['_5h_DIRA'],        
+			   _5h_FDCHI2	 = config['_5h_FDCHI2'],      
+			   _5h_CHI2        = config['_5h_CHI2'], 
+                           _5h_PT        = config['_5h_PT'],
+			   _5h_PVIPCHI2sum = config['_5h_PVIPCHI2sum'], 
+			   _5h_Mmax    = config['_5h_Mmax'],
+                           _probnnpi    = config['_probnnpi'],
+                           _probnnp    = config['_probnnp'],                                      
+			   _5h_Mmin    = config['_5h_Mmin'] )    
+
+      self.selppKpipi = makeppKpipi_excl( 'ppKpipiexclFor' + _ppKpipi_exclName + 'Sel', 
+			   _h_PT           = config['_h_PT'],
+			   _h_IPCHI2       = config['_h_IPCHI2'],
+			   _h_TRCHI2DOF    = config['_h_TRCHI2DOF'], 
+                           _h_TRGHP        = config['_h_TRGHP'],
+			   _5h_DOCA	 = config['_5h_DOCA'],        
+			   _5h_DIRA	 = config['_5h_DIRA'],        
+			   _5h_FDCHI2	 = config['_5h_FDCHI2'],      
+			   _5h_CHI2        = config['_5h_CHI2'], 
+                           _5h_PT        = config['_5h_PT'],
+			   _5h_PVIPCHI2sum = config['_5h_PVIPCHI2sum'], 
+			   _5h_Mmax    = config['_5h_Mmax'],
+                           _probnnpi    = config['_probnnpi'],
+                           _probnnk    = config['_probnnk'],
+                           _probnnp    = config['_probnnp'],                                        
+			   _5h_Mmin    = config['_5h_Mmin'] )    
+
+      self.gECFilter = globalEventCutFilter(name + 'GlobalEVventCutFilter', MaxTrSIZE = config['MaxTrSIZE'])
+      
+      self.algos5pi = []
+      if self.gECFilter != None  : self.algos5pi.append(self.gECFilter)
+
+      self.algos5pi.append(self.sel5pi)
+      
+      self.algosK4pi = []
+      if self.gECFilter != None : self.algosK4pi.append(self.gECFilter)
+
+      self.algosK4pi.append(self.selK4pi)	
+
+      self.algospp3pi = []
+      if self.gECFilter != None : self.algospp3pi.append(self.gECFilter)
+
+      self.algospp3pi.append(self.selpp3pi)	
+
+      self.algosppKpipi = []
+      if self.gECFilter != None : self.algosppKpipi.append(self.gECFilter)
+
+      self.algosppKpipi.append(self.selppKpipi)	
+
+      self.line5pi_excl = StrippingLine( _5pi_exclName + 'Line',
+                                      prescale   = config['5pi_exclLinePrescale'],
+                                      postscale  = config['5pi_exclLinePostscale'],
+                                      algos      = self.algos5pi)
+   
+      self.lineK4pi_excl = StrippingLine( _K4pi_exclName + 'Line',
+                                      prescale   = config['K4pi_exclLinePrescale'],
+                                      postscale  = config['K4pi_exclLinePostscale'],
+                                      algos      = self.algosK4pi)
+
+      self.linepp3pi_excl = StrippingLine( _pp3pi_exclName + 'Line',
+                                      prescale   = config['pp3pi_exclLinePrescale'],
+                                      postscale  = config['pp3pi_exclLinePostscale'],
+                                      algos      = self.algospp3pi)
+
+      self.lineppKpipi_excl = StrippingLine( _ppKpipi_exclName + 'Line',
+                                      prescale   = config['ppKpipi_exclLinePrescale'],
+                                      postscale  = config['ppKpipi_exclLinePostscale'],
+                                      algos      = self.algosppKpipi)
+
+      self.registerLine(self.line5pi_excl)
+      self.registerLine(self.lineK4pi_excl)
+      self.registerLine(self.linepp3pi_excl)
+      self.registerLine(self.lineppKpipi_excl)
+
+def make5pi_excl(name,
+                 _h_PT,
+                 _h_IPCHI2,
+                 _h_TRCHI2DOF,
+                 _h_TRGHP,
+                 _5h_DOCA,
+                 _5h_DIRA,
+                 _5h_FDCHI2,
+                 _5h_CHI2,
+                 _5h_PT,
+                 _5h_PVIPCHI2sum,
+                 _5h_Mmin,
+                 _5h_Mmax,
+                 _probnnpi) :
+
+    _daughtersCuts = {"pi+": " (PT > %(_h_PT)s*MeV)  \
+                             & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                             & (PROBNNpi > %(_probnnpi)s) \
+                             & (TRGHP < %(_h_TRGHP)s) " % locals()}
+    _combinationCut = "(AM < %(_5h_Mmax)s*MeV) \
+                     & (AM > %(_5h_Mmin)s*MeV) \
+		     & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_5h_DOCA)s)" % locals()
+    _motherCut = " (BPVDIRA > %(_5h_DIRA)s) \
+		 & (BPVVDCHI2 > %(_5h_FDCHI2)s) \
+		 & (VFASPF(VCHI2) < %(_5h_CHI2)s) \
+                 & (PT > %(_5h_PT)s*MeV) \
+		 & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='pi+') | (ABSID=='pi-')),0.0) > %(_5h_PVIPCHI2sum)s) " \
+                 % locals()
+
+    _5pi=CombineParticles()
+    _5pi.DecayDescriptors  = ["[B+ -> pi+ pi+ pi+ pi- pi-]cc"]
+    _5pi.MotherCut         = _motherCut
+    _5pi.CombinationCut    = _combinationCut
+    _5pi.DaughtersCuts     = _daughtersCuts
+
+    return Selection ( name,
+                       Algorithm = _5pi,
+                       RequiredSelections = [StdNoPIDsPions])
+
+def makeK4pi_excl(name,
+                  _h_PT,
+                  _h_IPCHI2,
+                  _h_TRCHI2DOF,
+                  _h_TRGHP,
+                  _5h_DOCA,
+                  _5h_DIRA,
+                  _5h_FDCHI2,
+                  _5h_CHI2,
+                  _5h_PT,
+                  _5h_PVIPCHI2sum,
+                  _5h_Mmin,
+                  _5h_Mmax,
+                  _probnnpi,
+                  _probnnk) :
+
+    _daughtersCuts = {"pi+" : " (PT > %(_h_PT)s*MeV)  \
+                              & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                              & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                              & (PROBNNpi > %(_probnnpi)s) \
+                              & (TRGHP < %(_h_TRGHP)s) " % locals(),
+                      "K+"  : " (PT > %(_h_PT)s*MeV)  \
+                              & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                              & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                              & (PROBNNk > %(_probnnk)s) \
+                              & (TRGHP < %(_h_TRGHP)s) " % locals()}
+    _combinationCut = " (AM < %(_5h_Mmax)s*MeV) \
+                      & (AM > %(_5h_Mmin)s*MeV) \
+		      & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_5h_DOCA)s)" % locals()
+    _motherCut = " (BPVDIRA > %(_5h_DIRA)s) \
+		 & (BPVVDCHI2 > %(_5h_FDCHI2)s) \
+		 & (VFASPF(VCHI2) < %(_5h_CHI2)s) \
+                 & (PT > %(_5h_PT)s*MeV) \
+		 & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='pi+') | (ABSID=='pi-') | (ABSID=='K+') | (ABSID=='K-')),0.0) > %(_5h_PVIPCHI2sum)s) " \
+                 % locals()
+    
+    _K4pi=CombineParticles()
+    _K4pi.DecayDescriptors  = ["[B+ -> K+ pi+ pi+ pi- pi-]cc"]
+    _K4pi.MotherCut         = _motherCut
+    _K4pi.CombinationCut    = _combinationCut
+    _K4pi.DaughtersCuts     = _daughtersCuts
+
+    return Selection ( name,
+                       Algorithm = _K4pi,
+                       RequiredSelections = [StdNoPIDsPions, StdNoPIDsKaons])
+
+def makepp3pi_excl(name,
+                   _h_PT,
+                   _h_IPCHI2,
+                   _h_TRCHI2DOF,
+                   _h_TRGHP,
+                   _5h_DOCA,
+                   _5h_DIRA,
+                   _5h_FDCHI2,
+                   _5h_CHI2,
+                   _5h_PT,
+                   _5h_PVIPCHI2sum,
+                   _5h_Mmin,
+                   _5h_Mmax,
+                   _probnnpi,
+                   _probnnp) :
+
+    _daughtersCuts = {"pi+" : " (PT > %(_h_PT)s*MeV)  \
+                              & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                              & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                              & (PROBNNpi > %(_probnnpi)s) \
+                              & (TRGHP < %(_h_TRGHP)s) " % locals(),
+                      "p+"  : " (PT > %(_h_PT)s*MeV)  \
+                              & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                              & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                              & (PROBNNp > %(_probnnp)s) \
+                              & (TRGHP < %(_h_TRGHP)s) " % locals()}
+    _combinationCut = " (AM < %(_5h_Mmax)s*MeV) \
+                      & (AM > %(_5h_Mmin)s*MeV) \
+		      & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_5h_DOCA)s)" % locals()
+    _motherCut = " (BPVDIRA > %(_5h_DIRA)s) \
+		 & (BPVVDCHI2 > %(_5h_FDCHI2)s) \
+		 & (VFASPF(VCHI2) < %(_5h_CHI2)s) \
+                 & (PT > %(_5h_PT)s*MeV) \
+		 & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='pi+') | (ABSID=='pi-') | (ABSID=='p+') | (ABSID=='p~-')),0.0) > %(_5h_PVIPCHI2sum)s) " \
+                 % locals()
+    
+    _pp3pi=CombineParticles()
+    _pp3pi.DecayDescriptors  = ["[B+ -> p+ p~- pi+ pi+ pi-]cc"]
+    _pp3pi.MotherCut         = _motherCut
+    _pp3pi.CombinationCut    = _combinationCut
+    _pp3pi.DaughtersCuts     = _daughtersCuts
+
+    return Selection ( name,
+                       Algorithm = _pp3pi,
+                       RequiredSelections = [StdNoPIDsPions, StdLooseProtons])
+
+def makeppKpipi_excl(name,
+                     _h_PT,
+                     _h_IPCHI2,
+                     _h_TRCHI2DOF,
+                     _h_TRGHP,
+                     _5h_DOCA,
+                     _5h_DIRA,
+                     _5h_FDCHI2,
+                     _5h_CHI2,
+                     _5h_PT,
+                     _5h_PVIPCHI2sum,
+                     _5h_Mmin,
+                     _5h_Mmax,
+                     _probnnpi,
+                     _probnnk,
+                     _probnnp) :
+
+    _daughtersCuts = {"pi+" : " (PT > %(_h_PT)s*MeV)  \
+                              & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                              & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                              & (PROBNNpi > %(_probnnpi)s) \
+                              & (TRGHP < %(_h_TRGHP)s) " % locals(),
+                      "p+"  : " (PT > %(_h_PT)s*MeV)  \
+                              & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                              & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                              & (PROBNNp > %(_probnnp)s) \
+                              & (TRGHP < %(_h_TRGHP)s) " % locals(),
+                      "K+"  : " (PT > %(_h_PT)s*MeV)  \
+                              & (TRCHI2DOF < %(_h_TRCHI2DOF)s) \
+                              & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
+                              & (PROBNNk > %(_probnnk)s) \
+                              & (TRGHP < %(_h_TRGHP)s) " % locals()}
+    _combinationCut = " (AM < %(_5h_Mmax)s*MeV) \
+                      & (AM > %(_5h_Mmin)s*MeV) \
+		      & (AMAXDOCA('LoKi::TrgDistanceCalculator') < %(_5h_DOCA)s)" % locals()
+    _motherCut = " (BPVDIRA > %(_5h_DIRA)s) \
+		 & (BPVVDCHI2 > %(_5h_FDCHI2)s) \
+		 & (VFASPF(VCHI2) < %(_5h_CHI2)s) \
+                 & (PT > %(_5h_PT)s*MeV) \
+		 & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='K+') | (ABSID=='K-') | (ABSID=='pi+') | (ABSID=='pi-') | (ABSID=='p+') | (ABSID=='p~-')),0.0) > %(_5h_PVIPCHI2sum)s) " \
+                 % locals()
+    
+    _ppKpipi=CombineParticles()
+    _ppKpipi.DecayDescriptors  = ["[B+ -> p+ p~- K+ pi+ pi-]cc"]
+    _ppKpipi.MotherCut         = _motherCut
+    _ppKpipi.CombinationCut    = _combinationCut
+    _ppKpipi.DaughtersCuts     = _daughtersCuts
+
+    return Selection ( name,
+                       Algorithm = _ppKpipi,
+                       RequiredSelections = [StdNoPIDsPions, StdLooseProtons, StdNoPIDsKaons])
+
+def globalEventCutFilter(name, 
+	                 MaxTrSIZE = None 
+	                 ) :
+  
+  if MaxTrSIZE == None : return None
+  
+  _code = ""
+  from Configurables import LoKi__VoidFilter as VoidFilter
+  from Configurables import LoKi__Hybrid__CoreFactory as CoreFactory
+  modules = CoreFactory('CoreFactory').Modules
+  for i in ['LoKiTracks.decorators']:
+     if i not in modules : modules.append(i)
+  if MaxTrSIZE != None : _code += "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(MaxTrSIZE)s )" %locals()
+
+  globalFilter= VoidFilter(name)
+  globalFilter.Code = _code
+  
+  return globalFilter
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingD2HHBDT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingD2HHBDT.py
new file mode 100644
index 000000000..c417e9b2b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingD2HHBDT.py
@@ -0,0 +1,177 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting B -> hh'
+
+Authors: Stefano Perazzini
+"""
+
+########################################################################
+__author__ = ['Stefano Perazzini']
+__date__ = '21/08/2012'
+__version__ = '$Revision: 1.5 $'
+
+__all__ = ('D2HHBDTLines',
+           'makeD2HHBDT',
+           'default_config')
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles                     import StdNoPIDsKaons, StdAllNoPIDsPions
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+
+
+default_config = {
+    'WGs'         : ['BnoC'],
+    'NAME'        : 'D2HHBDT',
+    'BUILDERTYPE' : 'D2HHBDTLines',
+    'CONFIG'      : {'PrescaleD2HHBDT' : 1.,
+                     'PrescaleDSt'     : 1.,
+                     'PostscaleD02HH'  : 0.1,
+                     'PostscaleDSt'    : 0.3,
+                     'MinPT'           : 1000,
+                     'MinIP'           : 0.12,
+                     'TrChi2'          : 3,
+                     'TrGhostProb'     : 0.5,
+                     'CombMassLow'     : 1000,
+                     'CombMassHigh'    : 2800,
+                     'DOCA'            : 0.1,
+                     'BPT'             : 1200,
+                     'BIP'             : 0.12,
+                     'BTAU'            : 0.,
+                     'MassLow'         : 1800,
+                     'MassHigh'        : 2600,
+                     'BDTCut'          : -0.3,
+                     'BDTWeightsFile'  : "$TMVAWEIGHTSROOT/data/B2HH_BDT_v1r4.xml",
+                     'VertexChi2'      : 64
+                    },
+    'STREAMS'     : ['Charm']
+    }
+
+
+## Change decay descriptor and re-fit decay tree
+
+class D2HHBDTLines( LineBuilder ) :
+    """Class defining the Hb -> hh stripping lines"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        D2HHBDTName   = "D2HHBDT"
+
+        # make the various stripping selections
+        self.D2HHBDT = makeD2HHBDT( D2HHBDTName,
+                                    config['TrChi2'],
+                                    config['TrGhostProb'],
+                                    config['MinPT'],
+                                    config['MinIP'],
+                                    config['CombMassLow'],
+                                    config['CombMassHigh'],
+                                    config['DOCA'],
+                                    config['BPT'],
+                                    config['BIP'],
+                                    config['BTAU'],
+                                    config['MassLow'],
+                                    config['MassHigh']
+                                  )
+
+        self.CutBDT  = applyBDT( "CutBDT_" + D2HHBDTName,
+                                 LineName       = D2HHBDTName + "Line",
+                                 SelD2HHBDT     = self.D2HHBDT,
+                                 BDTCutValue    = config['BDTCut'],
+                                 BDTWeightsFile = config['BDTWeightsFile']
+                               )
+
+        self.lineD2HHBDT = StrippingLine( D2HHBDTName+"Line",
+                                          prescale  = config['PrescaleD2HHBDT'],
+                                          postscale = config['PostscaleD02HH'],
+                                          selection = self.CutBDT )
+
+        self.registerLine(self.lineD2HHBDT)
+
+        self.DStD0Pi = makeDStD0Pi( name = "DStD0Pi_"+D2HHBDTName,
+                                    cut  = config['VertexChi2'],
+                                    presel = self.lineD2HHBDT.selection())
+
+        self.lineDStD0PiD2HHBDT = StrippingLine( "DStD0PiWith"+D2HHBDTName+"Line",
+                                                 prescale  = config['PrescaleDSt'],
+                                                 postscale = config['PostscaleDSt'],
+                                                 selection = self.DStD0Pi )
+
+        self.registerLine(self.lineDStD0PiD2HHBDT)
+
+def makeD2HHBDT( name,
+                 trChi2,trGhostProb,minPT,minIP,
+                 combMassLow,combMassHigh,doca,
+                 bPT,bIP,bTAU,massLow,massHigh ) :
+
+    _daughters_cuts = "(TRGHOSTPROB < %(trGhostProb)s) & (TRCHI2DOF < %(trChi2)s) & (PT > %(minPT)s * MeV) & ( MIPDV(PRIMARY) > %(minIP)s )" %locals()
+
+    _combination_cuts = "( AMAXDOCA('') < %(doca)s ) & ( AM > %(combMassLow)s * MeV ) & ( AM < %(combMassHigh)s * MeV )" %locals()
+
+    _mother_cuts = "( PT > %(bPT)s * MeV ) & ( M > %(massLow)s * MeV ) & ( M < %(massHigh)s * MeV ) & ( BPVIP() < %(bIP)s ) & ( BPVLTIME() > %(bTAU)s )" %locals()
+
+    CombineD2HHBDT = CombineParticles( DecayDescriptor = 'D0 -> K+ K-',
+                                       DaughtersCuts = { "K+" : _daughters_cuts },
+                                       CombinationCut = _combination_cuts,
+                                       MotherCut = _mother_cuts,
+                                       ReFitPVs = True )
+
+    return Selection( name,
+                      Algorithm = CombineD2HHBDT,
+                      RequiredSelections = [ StdNoPIDsKaons ] )
+
+def makeDStD0Pi( name, cut, presel):
+
+    _mother_cuts = "(VFASPF(VCHI2) < %(cut)s) & ( M < 2800 * MeV ) & ( M - M1 < 170 * MeV )" %locals()
+
+    CombineDStD0Pi = CombineParticles( DecayDescriptors = [ 'D*(2010)- -> D0 pi-',
+                                                            'D*(2010)+ -> D0 pi+' ],
+                                       MotherCut = _mother_cuts )
+
+    return Selection( name,
+                      Algorithm = CombineDStD0Pi,
+                      RequiredSelections = [ presel, StdAllNoPIDsPions ])
+
+def applyBDT( name,
+              LineName,
+              SelD2HHBDT,
+              BDTCutValue,
+              BDTWeightsFile ):
+
+    _FilterD2HH = FilterDesktop( Code = "FILTER('D2hhBDTSelection/D2hhBDT')" )
+
+    BDTSel = Selection( name,
+                        Algorithm = _FilterD2HH,
+                        RequiredSelections = [ SelD2HHBDT ]
+                        )
+
+    """
+    Name is special here, since this is the last algorithm,
+    whose name seems to be the one of the stripping line....
+    """
+    from Configurables import D2hhBDTSelection
+    MyBDT = D2hhBDTSelection( LineName + '.D2hhBDT' )
+    MyBDT.BDTCut = BDTCutValue
+    MyBDT.BDTWeightsFile = BDTWeightsFile
+
+    return BDTSel
+
+
+########################################################################
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingHb2Charged2Body.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingHb2Charged2Body.py
new file mode 100644
index 000000000..46b1a83a3
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingHb2Charged2Body.py
@@ -0,0 +1,118 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting B -> hh'
+
+Authors: Stefano Perazzini, Lars Eklumd
+"""
+
+########################################################################
+__author__ = ['Stefano Perazzini', 'Lars Eklund']
+__date__ = '21/08/2012'
+__version__ = '$Revision: 1.5 $'
+
+__all__ = ('Hb2Charged2BodyLines',
+           'makeB2Charged2Body',
+           'default_config')
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from StandardParticles                     import StdNoPIDsPions, StdLooseProtons, StdLooseKaons
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+
+
+default_config = {
+    'NAME'        : 'Hb2Charged2Body',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Hb2Charged2BodyLines',
+    'CONFIG'      : {'PrescaleB2Charged2Body'  : 1,
+                     'MinPTB2Charged2Body'     : 1000,
+                     'MinIPChi2B2Charged2Body' : 12,
+                     'TrChi2'                  : 4,
+                     'TrGhostProb'             : 0.5,
+                     'MaxPTB2Charged2Body'     : 1400,
+                     'MaxIPChi2B2Charged2Body' : 40,
+                     'CombMassLow'             : 4600,
+                     'CombMassHigh'            : 6000,
+                     'DOCA'                    : 0.08,
+                     'BPT'                     : 1200,
+                     'BIPChi2B2Charged2Body'   : 12,
+                     'BTAU'                    : 0.0006,
+                     'MassLow'                 : 4800,
+                     'MassHigh'                : 5800
+                    },
+    'STREAMS'     : ['BhadronCompleteEvent']
+}
+
+class Hb2Charged2BodyLines( LineBuilder ) :
+    """Class defining the Hb -> hh stripping lines"""
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__( self,name,config ) :        
+        
+        LineBuilder.__init__(self, name, config)
+        
+        B2Charged2BodyName   = name + "B2Charged2Body"
+        
+        # make the various stripping selections
+        self.B2Charged2Body = makeB2Charged2Body( B2Charged2BodyName,
+                                                  config['TrChi2'],
+                                                  config['TrGhostProb'],
+                                                  config['MinPTB2Charged2Body'],
+                                                  config['MinIPChi2B2Charged2Body'],
+                                                  config['MaxPTB2Charged2Body'],
+                                                  config['MaxIPChi2B2Charged2Body'],
+                                                  config['CombMassLow'],
+                                                  config['CombMassHigh'],
+                                                  config['DOCA'],
+                                                  config['BPT'],
+                                                  config['BIPChi2B2Charged2Body'],
+                                                  config['BTAU'],
+                                                  config['MassLow'],
+                                                  config['MassHigh']
+                                                )
+        
+        self.lineB2Charged2Body = StrippingLine( B2Charged2BodyName+"Line",
+                                                 prescale  = config['PrescaleB2Charged2Body'],
+                                                 selection = self.B2Charged2Body,
+                                                 EnableFlavourTagging = False,
+                                                 #RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker"])
+                                                 RequiredRawEvents = ["Velo"])  
+
+        self.registerLine(self.lineB2Charged2Body)
+
+def makeB2Charged2Body( name, 
+                        trChi2,trGhostProb,minPT,minIPChi2,
+                        maxPT,maxIPChi2,combMassLow,combMassHigh,doca,
+                        bPT,bIPChi2,bTAU,massLow,massHigh ) : 
+    
+    _daughters_cuts = "(TRGHOSTPROB < %(trGhostProb)s) & (TRCHI2DOF < %(trChi2)s) & (PT > %(minPT)s * MeV) & ( MIPCHI2DV(PRIMARY) > %(minIPChi2)s  )" %locals()
+    
+    _combination_cuts = "(AMAXCHILD(MAXTREE('pi+'==ABSID,PT)) > %(maxPT)s ) & ( AMAXCHILD(MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))) > %(maxIPChi2)s ) & (AMAXDOCA('') < %(doca)s ) & (AM > %(combMassLow)s * MeV) & (AM < %(combMassHigh)s * MeV)" %locals()
+    
+    _mother_cuts = "(PT > %(bPT)s * MeV) & (M > %(massLow)s * MeV) & (M < %(massHigh)s * MeV) & ( BPVIPCHI2() < %(bIPChi2)s ) & (BPVLTIME() > %(bTAU)s )" %locals()
+    
+    CombineHb2Charged2Body = CombineParticles( DecayDescriptor = 'B0 -> pi+ pi-',
+                                               DaughtersCuts = { "pi+" : _daughters_cuts },
+                                               CombinationCut = _combination_cuts,
+                                               MotherCut = _mother_cuts )
+    
+    return Selection( name,
+                      Algorithm = CombineHb2Charged2Body,
+                      RequiredSelections = [ StdNoPIDsPions ] )    
+
+
+########################################################################  
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingHb2V0V0h.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingHb2V0V0h.py
new file mode 100644
index 000000000..7279fc2ce
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingHb2V0V0h.py
@@ -0,0 +1,413 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Hb->V0V0h stripping Selections and StrippingLines.
+Provides functions to build KS(Lambda)->DD, KS(Lambda)->LL and B selections.
+Provides class Hb2V0V0hConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Exported symbols (use python help!):
+   - Hb2V0V0hConf
+"""
+
+__author__ = ['Rafael Coutinho', 'Timon Schmelzer', 'Moritz Demmer']
+__date__ = '10/02/2017'
+__version__ = 'Stripping28'
+__all__ = 'Hb2V0V0hConf'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdAllNoPIDsPions as Pions
+
+default_config = {
+    'NAME'        : 'Hb2V0V0h',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Hb2V0V0hConf',
+    'CONFIG'      : {
+                  'Trk_Chi2'                : 4.0,
+                  'Trk_GhostProb'           : 0.5,
+                  'V0_DD_MassWindow'        : 30.0,
+                  'V0_DD_VtxChi2'           : 12.0,
+                  'V0_DD_FDChi2'            : 50.0,
+                  'V0_LL_MassWindow'        : 20.0,
+                  'V0_LL_VtxChi2'           : 12.0,
+                  'V0_LL_FDChi2'            : 80.0,
+                  'B_Mlow'                  : 1279.0,
+                  'B_Mhigh'                 : 921.0,
+                  'Hb_Mlow'                 : 400.0,
+                  'Hb_Mhigh'                : 400.0,
+                  'B_APTmin'                : 1000.0,
+                  'B_Dira'                  : 0.999,
+                  'B_VtxChi2'               : 12.0,
+                  'B_FDChi2'                : 50.0,
+                  'B_IPCHI2wrtPV'           : 12.0,
+                  'GEC_MaxTracks'           : 250,
+                  'HLT1Dec'                 : 'Hlt1(Two)?TrackMVADecision',
+                  'HLT2Dec'                 : 'Hlt2Topo[234]BodyDecision',
+                  'Prescale'                : 1.0,
+                  'Prescale_SameSign'       : 1.0,
+                  'Postscale'               : 1.0,
+                  'RelatedInfoTools'        : [ { "Type" : "RelInfoConeVariables"
+                                                , "ConeAngle" : 1.0
+                                                , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM']
+                                                , "Location"  : 'P2ConeVar1'},
+                                                { "Type" : "RelInfoConeVariables"
+                                                , "ConeAngle" : 1.5
+                                                , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM']
+                                                , "Location"  : 'P2ConeVar2'},
+                                                { "Type" : "RelInfoConeVariables"
+                                                , "ConeAngle" : 1.7
+                                                , "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM']
+                                                , "Location"  : 'P2ConeVar3'},
+                                                {'Type' : 'RelInfoVertexIsolation'
+                                                , 'Location': "VtxIsolationInfo"  }
+                                                ]
+                  },
+    'STREAMS'     : [ 'Bhadron' ]
+    }
+
+class Hb2V0V0hConf(LineBuilder) :
+    """
+    Builder of Hb->V0V0h stripping Selection and StrippingLine.
+    Constructs Hb -> V0 V0 h Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> hb2v0v0hConf  = Hb2V0V0hConf('Hb22V0V0hTest',config)
+    >>> hb2v0v0hLines = hb2v0v0hConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selKS2DD               : KS -> Down Down Selection object
+    selKS2LL               : KS -> Long Long Selection object
+    selKS2LD               : KS -> Long Down Selection object
+    selB2KSDDhh            : B -> KS(DD) h+ h- Selection object
+    selB2KSLLhh            : B -> KS(LL) h+ h- Selection object
+    selB2KSLDhh            : B -> KS(LD) h+ h- Selection object
+    selB2KSDDhh_SameSign   : B -> KS(DD) h+(-) h+(-) Selection object
+    selB2KSLLhh_SameSign   : B -> KS(LL) h+(-) h+(-) Selection object
+    selB2KSLDhh_SameSign   : B -> KS(LD) h+(-) h+(-) Selection object
+    dd_line                : StrippingLine made out of selB2KSDDhh
+    ll_line                : StrippingLine made out of selB2KSLLhh
+    ld_line                : StrippingLine made out of selB2KSLDhh
+    dd_line_same           : StrippingLine made out of selB2KSDDhh_SameSign
+    ll_line_same           : StrippingLine made out of selB2KSLLhh_SameSign
+    ld_line_same           : StrippingLine made out of selB2KSLDhh_SameSign
+    lines                  : List of lines, [dd_line, ll_line, ld_line, dd_line_same, ll_line_same, ld_line_same]
+
+    Exports as class data member:
+    B2KShhConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        Hlt1Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT1Dec'],
+                     'Preambulo' : ["from LoKiCore.functions import *"]}
+                          
+        Hlt2Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT2Dec'],
+                     'Preambulo' : ["from LoKiCore.functions import *"]}
+                          
+        # the input charged particles
+        self.pions = Pions
+
+        _v0_configs = ['KS', 'Lz']
+        _v0_types   = ['DD', 'LL']
+
+        # build the various V0 input lists
+        self.selV0 = {}
+        for v0_config in _v0_configs :
+            self.selV0[v0_config] = {}
+            for v0_type in _v0_types :
+                self.selV0[v0_config][v0_type] = self.makeV0( 'V0for'+name+v0_config+v0_type, v0_config, v0_type, config )
+
+        # build the V0V0h modes
+        _v0v0_types = ['KSKS', 'KSLz', 'LzLz']
+        _v0v0_combs = [ 'LL', 'LD', 'DL', 'DD' ]
+
+        _selV0V0h  = {}
+        _mylines_V0V0h = {}
+        for v0v0_type in _v0v0_types :
+            _selV0V0h[v0v0_type]  = {}
+            _mylines_V0V0h[v0v0_type] = {}
+            for v0v0_comb in _v0v0_combs :
+                if ((v0v0_type != 'KSKS') | (v0v0_type != 'LzLz')) & (v0v0_comb != 'DL') :    
+                    _selV0V0h[v0v0_type][v0v0_comb] = self.makeHb2V0V0h( name+v0v0_type+v0v0_comb+'h', v0v0_type, v0v0_comb, config )
+
+                    _linename = name+'_'+v0v0_type+'h'+v0v0_comb+'_Line'
+
+                    _mylines_V0V0h[v0v0_type][v0v0_comb] = StrippingLine(_linename,
+                                           prescale = config['Prescale'],
+                                           postscale = config['Postscale'],
+                                           selection = _selV0V0h[v0v0_type][v0v0_comb],
+                                           FILTER = GECCode,
+                                           HLT1 = Hlt1Filter,
+                                           HLT2 = Hlt2Filter,
+                                           RelatedInfoTools = config['RelatedInfoTools'], 
+                                           EnableFlavourTagging = False,
+                                           MDSTFlag = False
+                                           )
+
+                    self.registerLine(_mylines_V0V0h[v0v0_type][v0v0_comb])
+
+        # build the V0V0V0 modes
+        _v0v0v0_types = ['KSKSKS', 'KSKSLz', 'LzLzKS', 'LzLzLz']
+        _v0v0v0_combs = [ 'LLL', 'LLD', 'LDL', 'LDD', 'DDL', 'DDD']
+
+        _selV0V0V0 = {}
+        _mylines_V0V0V0 = {}
+        for v0v0v0_type in _v0v0v0_types :
+            _selV0V0V0[v0v0v0_type] = {}
+            _mylines_V0V0V0[v0v0v0_type] = {}
+            for v0v0v0_comb in _v0v0v0_combs :
+                if ((v0v0v0_type != 'KSKSKS') | (v0v0v0_type != 'LzLzLz')) & ((v0v0v0_comb != 'LDL') | (v0v0v0_comb != 'DDL')) :
+                    _selV0V0V0[v0v0v0_type][v0v0v0_comb] = self.makeHb2V0V0V0( name+v0v0v0_type+v0v0v0_comb, v0v0v0_type, v0v0v0_comb, config )
+
+                    _linename = name+'_'+v0v0v0_type+v0v0v0_comb+'_Line'
+
+                    _mylines_V0V0V0[v0v0v0_type][v0v0v0_comb] = StrippingLine(_linename,
+                                           prescale = config['Prescale'],
+                                           postscale = config['Postscale'],
+                                           selection = _selV0V0V0[v0v0v0_type][v0v0v0_comb],
+                                           FILTER = GECCode,
+                                           RelatedInfoTools = config['RelatedInfoTools'], 
+                                           EnableFlavourTagging = True,
+                                           MDSTFlag = False
+                                           )
+
+                    self.registerLine(_mylines_V0V0V0[v0v0v0_type][v0v0v0_comb])
+
+
+    def makeV0( self, name, v0_config, v0_type, config ) :
+
+        # define all the cuts
+        if v0_config != 'Lz':
+            _massCut          = "(ADMASS('KS0')<%s*MeV)"     % config['V0_%s_MassWindow'%v0_type]
+        else :
+            _massCut          = "(ADMASS('Lambda0')<%s*MeV)" % config['V0_%s_MassWindow'%v0_type]
+        _vtxCut           = "(VFASPF(VCHI2)<%s)"             % config['V0_%s_VtxChi2'%v0_type]
+        _fdCut            = "(BPVVDCHI2>%s)"                 % config['V0_%s_FDChi2'%v0_type]
+        _trkChi2Cut1      = "(CHILDCUT((TRCHI2DOF<%s),1))"   % config['Trk_Chi2']
+        _trkChi2Cut2      = "(CHILDCUT((TRCHI2DOF<%s),2))"   % config['Trk_Chi2']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))" % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))" % config['Trk_GhostProb']
+
+        _allCuts = _massCut
+
+        _allCuts += '&'+_trkChi2Cut1
+        _allCuts += '&'+_trkChi2Cut2
+
+        if v0_type == 'LL' :
+            _allCuts += '&'+_trkGhostProbCut1
+            _allCuts += '&'+_trkGhostProbCut2
+
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_fdCut
+
+        # get the V0's to filter
+        if v0_config == 'KS' :
+            _stdV0 = DataOnDemand( Location = 'Phys/StdLooseKs%s/Particles' % v0_type )
+        else :
+            _stdV0 = DataOnDemand( Location = 'Phys/StdLooseLambda%s/Particles' % v0_type )
+
+        # make the filter
+        _filterV0 = FilterDesktop( Code = _allCuts )
+
+        # make and return the Selection object
+        return Selection( name, Algorithm = _filterV0, RequiredSelections = [_stdV0] )
+
+
+    def makeHb2V0V0h( self, name, v0v0_type, v0v0_comb, config ) :
+        """
+        Create and store either a Hb+ -> V0(LL,DD) V0 (LL,DD) h+ Selection object
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _trkChi2Cut      = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+        _trkGhostProbCut = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+
+        _daughtersCuts = _trkChi2Cut+'&'+_trkGhostProbCut
+
+        if v0v0_comb != 'KSLz':
+            _massCutLow     = "(AM>(5279-%s)*MeV)"           % config['B_Mlow']
+            _massCutHigh    = "(AM<(5279+%s)*MeV)"           % config['B_Mhigh']
+        else :
+            _massCutLow     = "(AM>(5791-%s)*MeV)"           % config['Hb_Mlow']
+            _massCutHigh    = "(AM<(5791+%s)*MeV)"           % config['Hb_Mhigh']
+
+        _aptCut         = "(APT>%s*MeV)"                     % config['B_APTmin']
+
+        _combCuts = _massCutLow+'&'+_massCutHigh+'&'+_aptCut
+
+        _diraCut        = "(BPVDIRA>%s)"                     % config['B_Dira']
+        _vtxChi2Cut     = "(VFASPF(VCHI2)<%s)"               % config['B_VtxChi2']
+        _fdChi2Cut      = "(BPVVDCHI2>%s)"                   % config['B_FDChi2']
+        _ipChi2Cut      = "(MIPCHI2DV(PRIMARY)<%s)"          % config['B_IPCHI2wrtPV']
+
+        _motherCuts = _diraCut +'&'+_vtxChi2Cut +'&'+_fdChi2Cut+'&'+_ipChi2Cut
+
+        if v0v0_comb == 'LL' : 
+            _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 2))"
+        elif v0v0_comb == 'LD' :
+            _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2))"
+        elif v0v0_comb == 'DL' :
+            _motherCuts += "& (CHILDCUT(CHILDCUT(ISDOWN, 2), 1)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 2))"
+        else :
+            _motherCuts += "& (CHILDCUT(CHILDCUT(ISDOWN, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2))"
+
+        _B = CombineParticles()
+        _B.DaughtersCuts = { "pi+" : _daughtersCuts }
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+        _B.ReFitPVs       = True 
+
+        _selname = name + '_' + v0v0_type + '_' + v0v0_comb + '_Sel'
+
+        if v0v0_type == 'KSKS' :
+            _B.DecayDescriptors = [ "[B+ -> KS0 KS0 pi+]cc" ]
+            if v0v0_comb == 'LL' : 
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'], self.pions ])
+            elif v0v0_comb == 'LD' :
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'], self.selV0['KS']['DD'], self.pions ])
+            else :
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['DD'], self.pions ])
+
+        elif v0v0_type == 'KSLz' :
+            _B.DecayDescriptors = [ "[Xi_b- -> KS0 Lambda0 pi-]cc" ]
+            if v0v0_comb == 'LL' : 
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'], self.selV0['Lz']['LL'], self.pions ])
+            elif v0v0_comb == 'LD' :
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'], self.selV0['Lz']['DD'], self.pions ])
+            elif v0v0_comb == 'DL' :
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['DD'], self.selV0['Lz']['LL'], self.pions ])
+            else :
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['DD'], self.selV0['Lz']['DD'], self.pions ])
+
+        else :
+            _B.DecayDescriptors = [ "[B+ -> Lambda0 Lambda0 pi+]cc" ]
+            if v0v0_comb == 'LL' : 
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['LL'], self.pions ])
+            elif v0v0_comb == 'LD' :
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['LL'], self.selV0['Lz']['DD'], self.pions ])
+            else :
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['DD'], self.pions ])
+
+
+    def makeHb2V0V0V0( self, name, v0v0v0_type, v0v0v0_comb, config ) :
+        """
+        Create and store either a B -> V0(LL, DD) V0(LL, DD) V0(LL, DD) Selection object
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        if (v0v0v0_comb != 'KSKSLz') | (v0v0v0_comb != 'LzLzLz') :
+            _massCutLow       = "(AM>(5279-%s)*MeV)"                                                    % config['B_Mlow']
+            _massCutHigh      = "(AM<(5279+%s)*MeV)"                                                    % config['B_Mhigh']
+        else : 
+            _massCutLow       = "(AM>(5619-%s)*MeV)"                                                    % config['Hb_Mlow']
+            _massCutHigh      = "(AM<(5619+%s)*MeV)"                                                    % config['Hb_Mhigh']
+
+        _aptCut           = "(APT>%s*MeV)"                                                              % config['B_APTmin']
+
+        _combCuts = _massCutLow+'&'+_massCutHigh+'&'+_aptCut
+
+        _diraCut          = "(BPVDIRA>%s)"                                                              % config['B_Dira']
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                                                            % config['B_FDChi2']
+        _ipChi2Cut        = "(MIPCHI2DV(PRIMARY)<%s)"                                                   % config['B_IPCHI2wrtPV']
+
+        _motherCuts = _diraCut +'&'+_fdChi2Cut+'&'+_ipChi2Cut
+
+        if v0v0v0_comb == 'LLL' : 
+            _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 2)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 3))"
+        elif v0v0v0_comb == 'LLD' :
+            _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 2)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 3))"
+        elif v0v0v0_comb == 'LDL' :
+            _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 3))"
+        elif v0v0v0_comb == 'LDD' :
+            _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 3))"
+        elif v0v0v0_comb == 'DDL' :
+            _motherCuts += "& (CHILDCUT(CHILDCUT(ISDOWN, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 3))"
+        else :
+            _motherCuts += "& (CHILDCUT(CHILDCUT(ISDOWN, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 3))"
+
+        _B = CombineParticles()
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+        _B.ReFitPVs       = True 
+
+        _selname = name + '_' + v0v0v0_type + '_' + v0v0v0_comb + '_Sel'
+
+        if v0v0v0_type == 'KSKSKS' in name:
+            _B.DecayDescriptors = [ "B0 -> KS0 KS0 KS0" ]
+            if v0v0v0_comb == 'LLL':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'] ])
+            elif v0v0v0_comb == 'LLD':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'], self.selV0['KS']['DD'] ])
+            elif v0v0v0_comb == 'LDD':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'], self.selV0['KS']['DD'] ])
+            else:
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['DD'] ])
+
+        elif v0v0v0_type == 'KSKSLz' :
+            _B.DecayDescriptors = [ "Lambda_b0 -> KS0 KS0 Lambda0" ]
+            if v0v0v0_comb == 'LLL':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'], self.selV0['Lz']['LL'] ])
+            elif v0v0v0_comb == 'LLD':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'], self.selV0['Lz']['DD'] ])
+            elif v0v0v0_comb == 'LDL':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'], self.selV0['KS']['DD'], self.selV0['Lz']['LL'] ])
+            elif v0v0v0_comb == 'LDD':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['LL'], self.selV0['KS']['DD'], self.selV0['Lz']['DD'] ])
+            elif v0v0v0_comb == 'DDL':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['DD'], self.selV0['Lz']['LL'] ])
+            else:
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['KS']['DD'], self.selV0['Lz']['DD'] ])
+            
+        elif "LzLzKS" in name:
+            _B.DecayDescriptors = [ "B0 -> KS0 Lambda0 Lambda0" ]
+            if v0v0v0_comb == 'LLL':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['LL'], self.selV0['KS']['LL'] ])
+            elif v0v0v0_comb == 'LLD':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['LL'], self.selV0['KS']['DD'] ])
+            elif v0v0v0_comb == 'LDL':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['LL'], self.selV0['Lz']['DD'], self.selV0['KS']['LL'] ])
+            elif v0v0v0_comb == 'LDD':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['LL'], self.selV0['Lz']['DD'], self.selV0['KS']['DD'] ])
+            elif v0v0v0_comb == 'DDL':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['DD'], self.selV0['KS']['LL'] ])
+            else:
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['DD'], self.selV0['KS']['DD'] ])
+            
+        else:
+            _B.DecayDescriptors = [ "Lambda_b0 -> Lambda0 Lambda0 Lambda0" ]
+            if v0v0v0_comb == 'LLL':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['LL'] ])
+            elif v0v0v0_comb == 'LLD':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['LL'], self.selV0['Lz']['DD'] ])
+            elif v0v0v0_comb == 'LDD':
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['LL'], self.selV0['Lz']['DD'] ])
+            else:
+                return Selection (_selname, Algorithm = _B, RequiredSelections = [ self.selV0['Lz']['DD'] ])
+            
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingLb2V0hh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingLb2V0hh.py
new file mode 100644
index 000000000..918d539f1
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingLb2V0hh.py
@@ -0,0 +1,630 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Lb->V0h(h) stripping Selections and StrippingLines.
+Provides functions to build Lambda0->DD, Lambda0->LL, and Lambda0->LD selections.
+Stripping20 with an inclusive approach for Lb->Lambda h(h) modes.
+Provides class Lb2V0hhConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Selections based on previous version of the line by Jussara Miranda.
+Exported symbols (use python help!):
+   - Lb2V0hhConf
+"""
+
+__author__ = ["Thomas Latham", "Rafael Coutinho", "Christian Voss", "Christoph Hombach", "Daniel O'Hanlon"]
+__date__ = '11/01/2017'
+__version__ = 'Stripping28'
+__all__ = 'Lb2V0hhConf'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdNoPIDsPions as Pions
+
+default_config = {
+    'NAME' : 'Lb2V0h',
+    'WGs'  : ['BnoC'],
+    'BUILDERTYPE' : 'Lb2V0hhConf',
+    'CONFIG' : {'Trk_Chi2'                 : 3.0,
+                'Trk_GhostProb'            : 0.5,
+                'Lambda_DD_MassWindow'     : 25.0,
+                'Lambda_DD_VtxChi2'        : 15.0,
+                'Lambda_DD_FDChi2'         : 50.0,
+                'Lambda_DD_FD'             : 300.0,
+                'Lambda_DD_Pmin'           : 5000.0,
+                'Lambda_LL_MassWindow'     : 20.0,
+                'Lambda_LL_VtxChi2'        : 15.0,
+                'Lambda_LL_FDChi2'         : 80.0,
+                'Lambda_LD_MassWindow'     : 25.0,
+                'Lambda_LD_VtxChi2'        : 15.0,
+                'Lambda_LD_FDChi2'         : 50.0,
+                'Lambda_LD_FD'             : 300.0,
+                'Lambda_LD_Pmin'           : 5000.0,
+                'Lb_Mlow'                  : 1319.0,
+                'Lb_Mhigh'                 : 600.0,
+                'Lb_2bodyMlow'             : 800.0,
+                'Lb_2bodyMhigh'            : 800.0,
+                'Lb_APTmin'                : 1000.0,
+                'Lb_PTmin'                 : 800.0,
+                'LbDaug_MedPT_PT'          : 800.0,
+                'LbDaug_MaxPT_IP'          : 0.05,
+                'LbDaug_DD_maxDocaChi2'    : 5.0,
+                'LbDaug_LL_maxDocaChi2'    : 5.0,
+                'LbDaug_LD_maxDocaChi2'    : 5.0,
+                'LbDaug_DD_PTsum'          : 4200.0,
+                'LbDaug_LL_PTsum'          : 3000.0,
+                'LbDaug_LD_PTsum'          : 4200.0,
+                'Lbh_DD_PTMin'             : 500.0,
+                'Lbh_LL_PTMin'             : 500.0,
+                'Lbh_LD_PTMin'             : 500.0,
+                'Lb_VtxChi2'               : 12.0,
+                'Lb_DD_Dira'               : 0.995,
+                'Lb_LL_Dira'               : 0.995,
+                'Lb_LD_Dira'               : 0.995,
+                'Lb_DD_IPCHI2wrtPV'        : 15.0,
+                'Lb_LL_IPCHI2wrtPV'        : 15.0,
+                'Lb_LD_IPCHI2wrtPV'        : 15.0,
+                'Lb_FDwrtPV'               : 1.0,
+                'Lb_DD_FDChi2'             : 30.0,
+                'Lb_LL_FDChi2'             : 30.0,
+                'Lb_LD_FDChi2'             : 30.0,
+                'GEC_MaxTracks'            : 250,
+                # 2012 Triggers
+                #'HLT1Dec'                  : 'Hlt1TrackAllL0Decision',
+                #'HLT2Dec'                  : 'Hlt2Topo[234]Body.*Decision',
+                # 2015 Triggers
+                'HLT1Dec'                  : 'Hlt1(Two)?TrackMVADecision',
+                'HLT2Dec'                  : 'Hlt2Topo[234]BodyDecision',
+                'Prescale'                 : 1.0,
+                'Postscale'                : 1.0,
+                'RelatedInfoTools' : [    { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.7, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar17'
+                                            }, 
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.5, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar15'
+                                            }, 
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.0, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar10'
+                                            },
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 0.8, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar08'
+                                            },
+                                          { "Type" : "RelInfoVertexIsolation",
+                                            "Location" : "VtxIsolationVar"
+                                            }
+                                          ]
+                },
+    'STREAMS' : ['Bhadron']
+    }
+
+class Lb2V0hhConf(LineBuilder) :
+    """
+    Builder of Lb->V0h(h) stripping Selection and StrippingLine.
+    Constructs Lb -> V0 (h+) h- Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> lb2v0hhConf = LB2V0hhConf('Lb2V0hhTest',config)
+    >>> lb2v0hhLines = lb2v0hhConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selLambda2DD           : Lambda0 -> Down Down Selection object
+    selLambda2LL           : Lambda0 -> Long Long Selection object
+    selLambda2LD           : Lambda0 -> Long Down Selection object
+
+    selLb2V0DDhh           : Lb -> Lambda0(DD) h+ h- Selection object
+    selLb2V0LLhh           : Lb -> Lambda0(LL) h+ h- Selection object
+    selLb2V0LDhh           : Lb -> Lambda0(LD) h+ h- Selection object            
+    selLb2V0DDh            : Lb -> Lambda0(DD) h- Selection object
+    selLb2V0LLh            : Lb -> Lambda0(LL) h- Selection object 
+    selLb2V0LDh            : Lb -> Lambda0(LD) h- Selection object        
+
+    Lb_dd_line             : StrippingLine made out of selLb2V0DDhh
+    Lb_ll_line             : StrippingLine made out of selLb2V0LLhh 
+    Lb_ld_line             : StrippingLine made out of selLb2V0LDhh
+
+    lines                  : List of lines, [Lb_dd_line, Lb_ll_line, Lb_ld_line]
+
+    Exports as class data member:
+    Lb2V0hhConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        self.hlt1Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT1Dec'],
+                           'Preambulo' : ["from LoKiCore.functions import *"]}
+        self.hlt2Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT2Dec'],
+                           'Preambulo' : ["from LoKiCore.functions import *"]}
+
+        self.pions   = Pions
+
+        self.makeLambda2DD( 'Lambda0DDLbLines', config )
+        self.makeLambda2LL( 'Lambda0LLLbLines', config )
+        self.makeLambda2LD( 'Lambda0LDLbLines', config )
+
+        namesSelections = [ (name + 'DD', self.makeLb2V0DDh(name + 'DD', config)),
+                            (name + 'LL', self.makeLb2V0LLh(name + 'LL', config)),
+                            (name + 'LD', self.makeLb2V0LDh(name + 'LD', config)),
+
+                            (name + 'hDD', self.makeLb2V0DDhh(name + 'hDD', config)),
+                            (name + 'hLL', self.makeLb2V0LLhh(name + 'hLL', config)),
+                            (name + 'hLD', self.makeLb2V0LDhh(name + 'hLD', config)),
+
+                            (name + 'hDDSS', self.makeLb2V0DDhh(name + 'hDDSS', config)),
+                            (name + 'hLLSS', self.makeLb2V0LLhh(name + 'hLLSS', config)),
+                            (name + 'hLDSS', self.makeLb2V0LDhh(name + 'hLDSS', config)),
+                          ]
+
+        # make lines
+
+        for selName, sel in namesSelections:
+
+            extra = {}
+
+            if 'SS' in selName:
+                extra['HLT1'] = self.hlt1Filter
+                extra['HLT2'] = self.hlt2Filter
+
+            line = StrippingLine(selName + 'Line',
+                                 selection = sel,
+                                 prescale = config['Prescale'],
+                                 postscale = config['Postscale'],
+                                 RelatedInfoTools = config['RelatedInfoTools'], 
+                                 FILTER = GECCode,
+                                 **extra) 
+
+            self.registerLine(line)
+
+    def makeLambda2DD( self, name, config ) :
+        # define all the cuts
+        _massCut          = "(ADMASS('Lambda0')<%s*MeV)"      % config['Lambda_DD_MassWindow']
+        _vtxCut           = "(VFASPF(VCHI2)<%s)   "           % config['Lambda_DD_VtxChi2']
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                  % config['Lambda_DD_FDChi2']
+        _momCut           = "(P>%s*MeV)"                      % config['Lambda_DD_Pmin']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"  % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"  % config['Trk_GhostProb']
+
+        _allCuts = _momCut
+        _allCuts += '&'+_massCut
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_fdChi2Cut
+        #_allCuts += '&'+_trkGhostProbCut1
+        #_allCuts += '&'+_trkGhostProbCut2
+
+        # get the Lambda0's to filter
+        _stdLambdaDD = DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")
+        
+        # make the filter
+        _filterLambdaDD = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        self.selLambda2DD = Selection( name, Algorithm = _filterLambdaDD, RequiredSelections = [_stdLambdaDD] )
+
+        return self.selLambda2DD
+
+    def makeLambda2LL( self, name, config ) : 
+        # define all the cuts
+        _massCut    = "(ADMASS('Lambda0')<%s*MeV)"           % config['Lambda_LL_MassWindow']
+        _vtxCut     = "(VFASPF(VCHI2)<%s)"                   % config['Lambda_LL_VtxChi2']
+        _trkChi2Cut1 = "(CHILDCUT((TRCHI2DOF<%s),1))"        % config['Trk_Chi2']
+        _trkChi2Cut2 = "(CHILDCUT((TRCHI2DOF<%s),2))"        % config['Trk_Chi2']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))" % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))" % config['Trk_GhostProb']
+
+        _allCuts = _massCut
+        _allCuts += '&'+_trkChi2Cut1
+        _allCuts += '&'+_trkChi2Cut2
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_trkGhostProbCut1
+        _allCuts += '&'+_trkGhostProbCut2
+
+        # get the Lambda's to filter
+        _stdLambdaLL = DataOnDemand(Location = "Phys/StdVeryLooseLambdaLL/Particles")
+
+        # make the filter
+        _filterLambdaLL = FilterDesktop( Code = _allCuts )
+        
+        # make and store the Selection object
+        self.selLambda2LL = Selection( name, Algorithm = _filterLambdaLL, RequiredSelections = [_stdLambdaLL] )
+
+        return self.selLambda2LL
+
+    def makeLambda2LD( self, name, config ) :
+        # define all the cuts
+        _massCut          = "(ADMASS('Lambda0')<%s*MeV)"      % config['Lambda_DD_MassWindow']
+        _vtxCut           = "(VFASPF(VCHI2)<%s)   "           % config['Lambda_DD_VtxChi2']
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                  % config['Lambda_DD_FDChi2']
+        _momCut           = "(P>%s*MeV)"                      % config['Lambda_DD_Pmin']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"  % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"  % config['Trk_GhostProb']
+
+        _allCuts = _momCut
+        _allCuts += '&'+_massCut
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_fdChi2Cut
+        #_allCuts += '&'+_trkGhostProbCut1
+        #_allCuts += '&'+_trkGhostProbCut2
+
+        # get the Lambda0's to filter
+        _stdLambdaLD = DataOnDemand(Location = "Phys/StdLooseLambdaLD/Particles")
+        
+        # make the filter
+        _filterLambdaLD = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        self.selLambda2LD = Selection( name, Algorithm = _filterLambdaLD, RequiredSelections = [_stdLambdaLD] )
+
+        return self.selLambda2LD
+
+    def makeLb2V0DDh( self, name, config ) :
+        """
+        Create and store a Lb ->Lambda0(DD) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_2bodyMlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_2bodyMhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['LbDaug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_DD_maxDocaChi2']
+        _daugPtSumCut   = "(APT1>%s*MeV)"                    % config['Lbh_DD_PTMin']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_DD_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_DD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_DD_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _Lb = CombineParticles()
+        _Lb.DecayDescriptors = [ "Lambda_b0 -> pi- Lambda0", "Lambda_b~0 -> pi+ Lambda~0"]
+        _Lb.DaughtersCuts = { "pi+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+        
+        self.selLb2V0DDh = Selection (name, Algorithm = _Lb, RequiredSelections = [self.selLambda2DD, self.pions ])
+
+        return self.selLb2V0DDh
+
+    def makeLb2V0DDhh( self, name, config ) :
+        """
+        Create and store a Lb ->Lambda0(DD) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_Mlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['LbDaug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_DD_maxDocaChi2']
+        _daugPtSumCut   = "((APT1+APT2+APT3)>%s*MeV)"        % config['LbDaug_DD_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_DD_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_DD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_DD_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _Lb = CombineParticles()
+
+        if 'SS' in name: # Same sign
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> pi+ pi+ Lambda0", "Lambda_b~0 -> pi+ pi+ Lambda~0",
+                                     "Lambda_b0 -> pi- pi- Lambda0", "Lambda_b~0 -> pi- pi- Lambda~0"]
+
+        else:
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> pi+ pi- Lambda0", "Lambda_b~0 -> pi+ pi- Lambda~0"]
+
+        _trkGhostProbCut  = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+        _trkChi2Cut       = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+
+        _daughtersCuts = _trkChi2Cut + '&' + _trkGhostProbCut
+
+        _Lb.DaughtersCuts = { "pi+" : _daughtersCuts }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+        
+        _LbConf = _Lb.configurable(name + '_combined')
+
+        if 'SS' in name: # Same sign
+            self.selLb2V0DDhhSS = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2DD, self.pions ])
+            return self.selLb2V0DDhhSS
+        else:
+            self.selLb2V0DDhh = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2DD, self.pions ])
+            return self.selLb2V0DDhh
+
+    def makeLb2V0LLh( self, name, config ) :
+        """
+        Create and store a Lb -> Lambda0(LL) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_2bodyMlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_2bodyMhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_LL_maxDocaChi2']
+        _daugPtSumCut   = "(APT1>%s*MeV)"                    % config['Lbh_LL_PTMin']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_LL_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_LL_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_LL_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _Lb = CombineParticles()
+        _Lb.DecayDescriptors = [ "Lambda_b0 -> pi- Lambda0", "Lambda_b~0 -> pi+ Lambda~0" ]
+        _Lb.DaughtersCuts = { "pi+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+        
+        self.selLb2V0LLh = Selection (name, Algorithm = _Lb, RequiredSelections = [self.selLambda2LL, self.pions  ])
+
+        return self.selLb2V0LLh
+
+    def makeLb2V0LLhh( self, name, config ) :
+        """
+        Create and store a Lb -> Lambda0(LL) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_Mlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_LL_maxDocaChi2']
+        _daugPtSumCut   = "((APT1+APT2+APT3)>%s*MeV)"        % config['LbDaug_LL_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        _combCuts += '&'+_maxDocaChi2Cut
+        
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_LL_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_LL_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_LL_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdChi2Cut
+        _motherCuts += '&'+_fdCut
+
+        _Lb = CombineParticles()
+
+        if 'SS' in name: # Same sign
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> pi+ pi+ Lambda0", "Lambda_b~0 -> pi+ pi+ Lambda~0",
+                                     "Lambda_b0 -> pi- pi- Lambda0", "Lambda_b~0 -> pi- pi- Lambda~0"]
+
+        else:
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> pi+ pi- Lambda0", "Lambda_b~0 -> pi+ pi- Lambda~0"]
+
+        _trkGhostProbCut  = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+        _trkChi2Cut       = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+
+        _daughtersCuts = _trkChi2Cut + '&' + _trkGhostProbCut
+
+        _Lb.DaughtersCuts = { "pi+" : _daughtersCuts }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+        
+        _LbConf = _Lb.configurable(name + '_combined')
+
+        if 'SS' in name: # Same sign
+            self.selLb2V0LLhhSS = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2LL, self.pions  ])
+            return self.selLb2V0LLhhSS
+        else:
+            self.selLb2V0LLhh = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2LL, self.pions  ])
+            return self.selLb2V0LLhh
+
+    def makeLb2V0LDh( self, name, config ) :
+        """
+        Create and store a Lb ->Lambda0(LD) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_2bodyMlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_2bodyMhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['LbDaug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_LD_maxDocaChi2']
+        _daugPtSumCut   = "(APT1>%s*MeV)"                    % config['Lbh_LD_PTMin']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_LD_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_LD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_LD_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _Lb = CombineParticles()
+        _Lb.DecayDescriptors = [ "Lambda_b0 -> pi- Lambda0", "Lambda_b~0 -> pi+ Lambda~0"]
+        _Lb.DaughtersCuts = { "pi+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+
+        self.selLb2V0LDh = Selection (name, Algorithm = _Lb, RequiredSelections = [self.selLambda2LD, self.pions ])
+
+        return self.selLb2V0LDh
+
+    def makeLb2V0LDhh( self, name, config ) :
+        """
+        Create and store a Lb ->Lambda0(LD) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_Mlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['LbDaug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_LD_maxDocaChi2']
+        _daugPtSumCut   = "((APT1+APT2+APT3)>%s*MeV)"        % config['LbDaug_LD_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_LD_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_LD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_LD_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _Lb = CombineParticles()
+
+        if 'SS' in name: # Same sign
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> pi+ pi+ Lambda0", "Lambda_b~0 -> pi+ pi+ Lambda~0",
+                                     "Lambda_b0 -> pi- pi- Lambda0", "Lambda_b~0 -> pi- pi- Lambda~0"]
+
+        else:
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> pi+ pi- Lambda0", "Lambda_b~0 -> pi+ pi- Lambda~0"]
+
+        _trkGhostProbCut  = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+        _trkChi2Cut       = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+
+        _daughtersCuts = _trkChi2Cut + '&' + _trkGhostProbCut
+
+        _Lb.DaughtersCuts = { "pi+" : _daughtersCuts }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+        
+        _LbConf = _Lb.configurable(name + '_combined')
+
+        if 'SS' in name: # Same sign
+            self.selLb2V0LDhhSS = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2LD, self.pions ])
+            return self.selLb2V0LDhhSS
+        else:
+            self.selLb2V0LDhh = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2LD, self.pions ])
+            return self.selLb2V0LDhh
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingLb2V0pp.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingLb2V0pp.py
new file mode 100644
index 000000000..5c742b718
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingLb2V0pp.py
@@ -0,0 +1,632 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Lb->V0h(h) stripping Selections and StrippingLines.
+Provides functions to build Lambda0->DD, Lambda0->LL, and Lambda0->LD selections.
+Stripping20 with an inclusive approach for Lb->Lambda h(h) modes.
+Provides class Lb2V0ppConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Line based on Lb2V0ph by ["Thomas Latham", "Rafael Coutinho", "Christian Voss", "Christoph Hombach", "Daniel O'Hanlon"]
+Exported symbols (use python help!):
+   - Lb2V0ppConf
+"""
+
+__author__ = ["Vladimir Macko"]
+__date__ = '06/01/2019'
+__version__ = 'Stripping29r2p1' 
+__all__ = 'Lb2V0ppConf'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdLooseProtons as Protons
+
+default_config = {
+    'NAME' : 'Lb2V0p',
+    'WGs'  : ['BnoC'],
+    'BUILDERTYPE' : 'Lb2V0ppConf',
+    'CONFIG' : {'Trk_Chi2'                 : 3.0,    
+                'Trk_GhostProb'            : 0.5,     
+                'Lambda_DD_MassWindow'     : 20.0,    
+                'Lambda_DD_VtxChi2'        : 9.0,     
+                'Lambda_DD_FDChi2'         : 50.0,    
+                'Lambda_DD_FD'             : 300.0,   
+                'Lambda_DD_Pmin'           : 5000.0,  
+                'Lambda_LL_MassWindow'     : 20.0,    
+                'Lambda_LL_VtxChi2'        : 9.0,     
+                'Lambda_LL_FDChi2'         : 0.0,     
+                'Lambda_LD_MassWindow'     : 25.0,    
+                'Lambda_LD_VtxChi2'        : 16.0,    
+                'Lambda_LD_FDChi2'         : 50.0,    
+                'Lambda_LD_FD'             : 300.0,   
+                'Lambda_LD_Pmin'           : 5000.0,  
+                'Lb_Mlow'                  : 419.0,   
+                'Lb_Mhigh'                 : 581.0,   
+                'Lb_2bodyMlow'             : 800.0,   
+                'Lb_2bodyMhigh'            : 800.0,   
+                'Lb_APTmin'                : 1000.0,  
+                'Lb_PTmin'                 : 1050,    
+                'LbDaug_MedPT_PT'          : 450.0,   
+                'LbDaug_MaxPT_IP'          : 0.05,   
+                'LbDaug_DD_maxDocaChi2'    : 16.0,    
+                'LbDaug_LL_maxDocaChi2'    : 5.0,     
+                'LbDaug_LD_maxDocaChi2'    : 5.0,     
+                'LbDaug_DD_PTsum'          : 2000.0,  
+                'LbDaug_LL_PTsum'          : 3000.0, 
+                'LbDaug_LD_PTsum'          : 4200.0,  
+                'Lbh_DD_PTMin'             : 0.0,    
+                'Lbh_LL_PTMin'             : 0.0,    
+                'Lbh_LD_PTMin'             : 500.0,   
+                'Lb_VtxChi2'               : 16.0,    
+                'Lb_DD_Dira'               : 0.9990,  
+                'Lb_LL_Dira'               : 0.9990,  
+                'Lb_LD_Dira'               : 0.9990, 
+                'Lb_DD_IPCHI2wrtPV'        : 25.0,   
+                'Lb_LL_IPCHI2wrtPV'        : 25.0,   
+                'Lb_LD_IPCHI2wrtPV'        : 15.0,    
+                'Lb_FDwrtPV'               : 0.8,    
+                'Lb_DD_FDChi2'             : 0.5,    
+                'Lb_LL_FDChi2'             : 0.5,    
+                'Lb_LD_FDChi2'             : 30.0,  
+                'GEC_MaxTracks'            : 250,    
+                # 2012 Triggers
+                #'HLT1Dec'                  : 'Hlt1TrackAllL0Decision',
+                #'HLT2Dec'                  : 'Hlt2Topo[234]Body.*Decision',
+                # 2015 Triggers
+                #'HLT1Dec'                  : 'Hlt1(Two)?TrackMVADecision',
+                #'HLT2Dec'                  : 'Hlt2Topo[234]BodyDecision',
+                'Prescale'                 : 1.0,
+                'Postscale'                : 1.0,
+                'RelatedInfoTools' : [    { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.7, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar17'
+                                            }, 
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.5, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar15'
+                                            }, 
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 1.0, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar10'
+                                            },
+                                          { "Type" : "RelInfoConeVariables", 
+                                            "ConeAngle" : 0.8, 
+                                            "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                            "Location"  : 'ConeVar08'
+                                            },
+                                          { "Type" : "RelInfoVertexIsolation",
+                                            "Location" : "VtxIsolationVar"
+                                            }
+                                          ]
+                },
+    'STREAMS' : ['Bhadron']
+    }
+
+class Lb2V0ppConf(LineBuilder) :
+    """
+    Builder of Lb->V0h(h) stripping Selection and StrippingLine.
+    Constructs Lb -> V0 (h+) h- Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> Lb2V0ppConf = Lb2V0ppConf('Lb2V0ppTest',config)
+    >>> lb2v0hhLines = Lb2V0ppConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selLambda2DD           : Lambda0 -> Down Down Selection object
+    selLambda2LL           : Lambda0 -> Long Long Selection object
+    selLambda2LD           : Lambda0 -> Long Down Selection object
+
+    selLb2V0DDpp           : Lb -> Lambda0(DD) h+ h- Selection object
+    selLb2V0LLpp           : Lb -> Lambda0(LL) h+ h- Selection object
+    selLb2V0LDpp           : Lb -> Lambda0(LD) h+ h- Selection object            
+    selLb2V0DDp            : Lb -> Lambda0(DD) h- Selection object
+    selLb2V0LLp            : Lb -> Lambda0(LL) h- Selection object 
+    selLb2V0LDp            : Lb -> Lambda0(LD) h- Selection object        
+
+    Lb_dd_line             : StrippingLine made out of selLb2V0DDpp
+    Lb_ll_line             : StrippingLine made out of selLb2V0LLpp 
+    Lb_ld_line             : StrippingLine made out of selLb2V0LDpp
+
+    lines                  : List of lines, [Lb_dd_line, Lb_ll_line, Lb_ld_line]
+
+    Exports as class data member:
+    Lb2V0ppConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        #self.hlt1Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT1Dec'],
+        #                   'Preambulo' : ["from LoKiCore.functions import *"]}
+        #self.hlt2Filter = {'Code' : "HLT_PASS_RE('%s')" % config['HLT2Dec'],
+        #                   'Preambulo' : ["from LoKiCore.functions import *"]}
+
+        self.protons   = Protons
+
+        self.makeLambda2DD( 'Lambda0ppDDLbLines', config )
+        self.makeLambda2LL( 'Lambda0ppLLLbLines', config )
+        self.makeLambda2LD( 'Lambda0ppLDLbLines', config )
+
+
+        namesSelections = [ (name + 'DD', self.makeLb2V0DDp(name + 'DD', config)),
+                            (name + 'LL', self.makeLb2V0LLp(name + 'LL', config)),
+                            (name + 'LD', self.makeLb2V0LDp(name + 'LD', config)),
+
+                            (name + 'pDD', self.makeLb2V0DDpp(name + 'pDD', config)),
+                            (name + 'pLL', self.makeLb2V0LLpp(name + 'pLL', config)),
+                            (name + 'pLD', self.makeLb2V0LDpp(name + 'pLD', config)),
+
+                            (name + 'pDDSS', self.makeLb2V0DDpp(name + 'pDDSS', config)),
+                            (name + 'pLLSS', self.makeLb2V0LLpp(name + 'pLLSS', config)),
+                            (name + 'pLDSS', self.makeLb2V0LDpp(name + 'pLDSS', config)),
+                          ]
+
+        # make lines
+        
+        for selName, sel in namesSelections:
+
+            extra = {}
+
+            #if 'SS' in selName:
+                #extra['HLT1'] = self.hlt1Filter
+                #extra['HLT2'] = self.hlt2Filter
+
+            line = StrippingLine(selName + 'Line',
+                                 selection = sel,
+                                 prescale = config['Prescale'],
+                                 postscale = config['Postscale'],
+                                 RelatedInfoTools = config['RelatedInfoTools'], 
+                                 FILTER = GECCode,
+                                 **extra) 
+
+            self.registerLine(line)
+
+    def makeLambda2DD( self, name, config ) :
+        # define all the cuts
+        _massCut          = "(ADMASS('Lambda0')<%s*MeV)"      % config['Lambda_DD_MassWindow']
+        _vtxCut           = "(VFASPF(VCHI2)<%s)   "           % config['Lambda_DD_VtxChi2']
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                  % config['Lambda_DD_FDChi2']
+        _momCut           = "(P>%s*MeV)"                      % config['Lambda_DD_Pmin']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"  % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"  % config['Trk_GhostProb']
+
+        _allCuts = _momCut
+        _allCuts += '&'+_massCut
+        _allCuts += '&'+_vtxCut 
+        _allCuts += '&'+_fdChi2Cut
+        #_allCuts += '&'+_trkGhostProbCut1
+        #_allCuts += '&'+_trkGhostProbCut2
+
+        # get the Lambda0's to filter
+        _stdLambdaDD = DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")
+        
+        # make the filter
+        _filterLambdaDD = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        self.selLambda2DD = Selection( name, Algorithm = _filterLambdaDD, RequiredSelections = [_stdLambdaDD] )
+
+        return self.selLambda2DD
+
+    def makeLambda2LL( self, name, config ) : 
+        # define all the cuts
+        _massCut    = "(ADMASS('Lambda0')<%s*MeV)"           % config['Lambda_LL_MassWindow']
+        _vtxCut     = "(VFASPF(VCHI2)<%s)"                   % config['Lambda_LL_VtxChi2']
+        _trkChi2Cut1 = "(CHILDCUT((TRCHI2DOF<%s),1))"        % config['Trk_Chi2']
+        _trkChi2Cut2 = "(CHILDCUT((TRCHI2DOF<%s),2))"        % config['Trk_Chi2']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))" % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))" % config['Trk_GhostProb']
+
+        _allCuts = _massCut
+        _allCuts += '&'+_trkChi2Cut1
+        _allCuts += '&'+_trkChi2Cut2
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_trkGhostProbCut1
+        _allCuts += '&'+_trkGhostProbCut2
+
+        # get the Lambda's to filter
+        _stdLambdaLL = DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")
+
+        # make the filter
+        _filterLambdaLL = FilterDesktop( Code = _allCuts )
+        
+        # make and store the Selection object
+        self.selLambda2LL = Selection( name, Algorithm = _filterLambdaLL, RequiredSelections = [_stdLambdaLL] )
+
+        return self.selLambda2LL
+
+    def makeLambda2LD( self, name, config ) :
+        # define all the cuts
+        _massCut          = "(ADMASS('Lambda0')<%s*MeV)"      % config['Lambda_DD_MassWindow']
+        _vtxCut           = "(VFASPF(VCHI2)<%s)   "           % config['Lambda_DD_VtxChi2']
+        _fdChi2Cut        = "(BPVVDCHI2>%s)"                  % config['Lambda_DD_FDChi2']
+        _momCut           = "(P>%s*MeV)"                      % config['Lambda_DD_Pmin']
+        _trkGhostProbCut1 = "(CHILDCUT((TRGHOSTPROB<%s),1))"  % config['Trk_GhostProb']
+        _trkGhostProbCut2 = "(CHILDCUT((TRGHOSTPROB<%s),2))"  % config['Trk_GhostProb']
+
+        _allCuts = _momCut
+        _allCuts += '&'+_massCut
+        _allCuts += '&'+_vtxCut
+        _allCuts += '&'+_fdChi2Cut
+        #_allCuts += '&'+_trkGhostProbCut1
+        #_allCuts += '&'+_trkGhostProbCut2
+
+        # get the Lambda0's to filter
+        _stdLambdaLD = DataOnDemand(Location = "Phys/StdLooseLambdaLD/Particles")
+        
+        # make the filter
+        _filterLambdaLD = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        self.selLambda2LD = Selection( name, Algorithm = _filterLambdaLD, RequiredSelections = [_stdLambdaLD] )
+
+        return self.selLambda2LD
+
+    def makeLb2V0DDp( self, name, config ) :
+        """
+        Create and store a Lb ->Lambda0(DD) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_2bodyMlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_2bodyMhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['LbDaug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_DD_maxDocaChi2']
+        _daugPtSumCut   = "(APT1>%s*MeV)"                    % config['Lbh_DD_PTMin']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_DD_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_DD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_DD_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _Lb = CombineParticles()
+        _Lb.DecayDescriptors = [ "Lambda_b0 -> p~- Lambda0", "Lambda_b~0 -> p+ Lambda~0"]
+        _Lb.DaughtersCuts = { "p+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+        
+        self.selLb2V0DDp = Selection (name, Algorithm = _Lb, RequiredSelections = [self.selLambda2DD, self.protons ])
+
+        return self.selLb2V0DDp
+
+    def makeLb2V0DDpp( self, name, config ) :
+        """
+        Create and store a Lb ->Lambda0(DD) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_Mlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['LbDaug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_DD_maxDocaChi2']
+        _daugPtSumCut   = "((APT1+APT2+APT3)>%s*MeV)"        % config['LbDaug_DD_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut    
+        _combCuts += '&'+_daugMedPtCut    
+        _combCuts += '&'+_massCutLow     
+        _combCuts += '&'+_massCutHigh     
+        #_combCuts += '&'+_daugMaxPtIPCut  # does not work properly 
+        _combCuts += '&'+_maxDocaChi2Cut  
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_DD_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_DD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_DD_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut 
+        _motherCuts += '&'+_diraCut  
+        _motherCuts += '&'+_ipChi2Cut 
+        _motherCuts += '&'+_fdCut #lookhere
+        _motherCuts += '&'+_fdChi2Cut 
+
+        _Lb = CombineParticles()
+
+        if 'SS' in name: # Same sign
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> p+ p+ Lambda0", "Lambda_b~0 -> p+ p+ Lambda~0",
+                                     "Lambda_b0 -> p~- p~- Lambda0", "Lambda_b~0 -> p~- p~- Lambda~0"]
+
+        else:
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> p+ p~- Lambda0", "Lambda_b~0 -> p+ p~- Lambda~0"]
+
+        _trkGhostProbCut  = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+        _trkChi2Cut       = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+
+        _daughtersCuts = _trkChi2Cut + '&' + _trkGhostProbCut
+
+        _Lb.DaughtersCuts = { "p+" : _daughtersCuts }
+        _Lb.CombinationCut =  _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+        
+        _LbConf = _Lb.configurable(name + '_combined')
+
+        if 'SS' in name: # Same sign
+            self.selLb2V0DDppSS = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2DD, self.protons ])
+            return self.selLb2V0DDppSS
+        else:
+            self.selLb2V0DDpp = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2DD, self.protons ])
+            return self.selLb2V0DDpp
+
+    def makeLb2V0LLp( self, name, config ) :
+        """
+        Create and store a Lb -> Lambda0(LL) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_2bodyMlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_2bodyMhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_LL_maxDocaChi2']
+        _daugPtSumCut   = "(APT1>%s*MeV)"                    % config['Lbh_LL_PTMin']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_LL_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_LL_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_LL_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _Lb = CombineParticles()
+        _Lb.DecayDescriptors = [ "Lambda_b0 -> p~- Lambda0", "Lambda_b~0 -> p+ Lambda~0" ]
+        _Lb.DaughtersCuts = { "p+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+        
+        self.selLb2V0LLp = Selection (name, Algorithm = _Lb, RequiredSelections = [self.selLambda2LL, self.protons  ])
+
+        return self.selLb2V0LLp
+
+    def makeLb2V0LLpp( self, name, config ) :
+        """
+        Create and store a Lb -> Lambda0(LL) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_Mlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_LL_maxDocaChi2']
+        _daugPtSumCut   = "((APT1+APT2+APT3)>%s*MeV)"        % config['LbDaug_LL_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        _combCuts += '&'+_maxDocaChi2Cut
+        
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_LL_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_LL_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_LL_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdChi2Cut
+        _motherCuts += '&'+_fdCut
+
+        _Lb = CombineParticles()
+
+        if 'SS' in name: # Same sign
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> p+ p+ Lambda0", "Lambda_b~0 -> p+ p+ Lambda~0",
+                                     "Lambda_b0 -> p~- p~- Lambda0", "Lambda_b~0 -> p~- p~- Lambda~0"]
+
+        else:
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> p+ p~- Lambda0", "Lambda_b~0 -> p+ p~- Lambda~0"]
+
+        _trkGhostProbCut  = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+        _trkChi2Cut       = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+
+        _daughtersCuts = _trkChi2Cut + '&' + _trkGhostProbCut
+
+        _Lb.DaughtersCuts = { "p+" : _daughtersCuts }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+        
+        _LbConf = _Lb.configurable(name + '_combined')
+
+        if 'SS' in name: # Same sign
+            self.selLb2V0LLppSS = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2LL, self.protons  ])
+            return self.selLb2V0LLppSS
+        else:
+            self.selLb2V0LLpp = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2LL, self.protons  ])
+            return self.selLb2V0LLpp
+
+    def makeLb2V0LDp( self, name, config ) :
+        """
+        Create and store a Lb ->Lambda0(LD) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_2bodyMlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_2bodyMhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['LbDaug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_LD_maxDocaChi2']
+        _daugPtSumCut   = "(APT1>%s*MeV)"                    % config['Lbh_LD_PTMin']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_LD_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_LD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_LD_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdCut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _Lb = CombineParticles()
+        _Lb.DecayDescriptors = [ "Lambda_b0 -> p~- Lambda0", "Lambda_b~0 -> p+ Lambda~0"]
+        _Lb.DaughtersCuts = { "p+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+
+        self.selLb2V0LDp = Selection (name, Algorithm = _Lb, RequiredSelections = [self.selLambda2LD, self.protons ])
+
+        return self.selLb2V0LDp
+
+    def makeLb2V0LDpp( self, name, config ) :
+        """
+        Create and store a Lb ->Lambda0(LD) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"               % config['Lb_Mlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"               % config['Lb_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                     % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['LbDaug_MedPT_PT']
+        _daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['LbDaug_MaxPT_IP']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"            % config['LbDaug_LD_maxDocaChi2']
+        _daugPtSumCut   = "((APT1+APT2+APT3)>%s*MeV)"        % config['LbDaug_LD_PTsum']
+
+        _combCuts = _aptCut
+        _combCuts += '&'+_daugPtSumCut
+        _combCuts += '&'+_daugMedPtCut
+        _combCuts += '&'+_massCutLow
+        _combCuts += '&'+_massCutHigh
+        #_combCuts += '&'+_daugMaxPtIPCut
+        _combCuts += '&'+_maxDocaChi2Cut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Lb_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Lb_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['Lb_LD_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['Lb_LD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Lb_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Lb_LD_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&'+_vtxChi2Cut
+        _motherCuts += '&'+_diraCut
+        _motherCuts += '&'+_ipChi2Cut
+        _motherCuts += '&'+_fdChi2Cut
+
+        _Lb = CombineParticles()
+
+        if 'SS' in name: # Same sign
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> p+ p+ Lambda0", "Lambda_b~0 -> p+ p+ Lambda~0",
+                                     "Lambda_b0 -> p~- p~- Lambda0", "Lambda_b~0 -> p~- p~- Lambda~0"]
+
+        else:
+
+            _Lb.DecayDescriptors = [ "Lambda_b0 -> p+ p~- Lambda0", "Lambda_b~0 -> p+ pi- Lambda~0"]
+
+        _trkGhostProbCut  = "(TRGHOSTPROB<%s)" % config['Trk_GhostProb']
+        _trkChi2Cut       = "(TRCHI2DOF<%s)"   % config['Trk_Chi2']
+
+        _daughtersCuts = _trkChi2Cut + '&' + _trkGhostProbCut
+
+        _Lb.DaughtersCuts = { "p+" : _daughtersCuts }
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+        
+        _LbConf = _Lb.configurable(name + '_combined')
+
+        if 'SS' in name: # Same sign
+            self.selLb2V0LDppSS = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2LD, self.protons ])
+            return self.selLb2V0LDppSS
+        else:
+            self.selLb2V0LDpp = Selection (name, Algorithm = _LbConf, RequiredSelections = [self.selLambda2LD, self.protons ])
+            return self.selLb2V0LDpp
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb23ph.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb23ph.py
new file mode 100644
index 000000000..221731fb4
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb23ph.py
@@ -0,0 +1,182 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Xb->ppph Stripping Selections and StrippingLines.
+Provides class Xb23phConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Exported symbols (use python help!):
+   - Xb23phConf
+"""
+
+__author__  = ['Jinlin Fu', 'Maurizio Martinelli','Andrea Merli']
+__date__    = '12/11/2015'
+__version__ = 'v1r0'
+__all__     = {'Xb23phConf',
+               'default_config'}
+
+from Gaudi.Configuration                   import *
+from PhysSelPython.Wrappers                import Selection
+from StrippingConf.StrippingLine           import StrippingLine
+from StrippingUtils.Utils                  import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, DaVinci__N4BodyDecays
+
+from StandardParticles                     import StdNoPIDsPions     as Pions
+from StandardParticles                     import StdLooseANNProtons as Protons
+
+default_config = {
+    'NAME'        : 'Xb23ph',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Xb23phConf',
+    'CONFIG'      : {'Trk_MaxChi2Ndof'   : 4.0,
+                     'Trk_MaxGhostProb'  : 0.4,
+                     'Trk_MinIPChi2'     : 16.0,
+                     'Trk_MinP'          : 1500.0,
+                     'Trk_MinProbNNp'    : 0.05,
+                     'Xb_MinSumPTppi'    : 1500.0,
+                     'Xb_MinSumPTppipi'  : 2500.0,
+                     'Xb_MinM_4body'     : 5195.0,
+                     'Xb_MaxM_4body'     : 6405.0,
+                     'Xb_MinSumPT_4body' : 3500.0,
+                     'Xb_MinPT_4body'    : 1500.0,
+                     'Xb_MaxDOCAChi2'    : 20.0,
+                     'Xb_MaxVtxChi2'     : 20.0,
+                     'Xb_MinFDChi2'      : 50.0,
+                     'Xb_MaxIPChi2'      : 16.0,
+                     'Xb_MinDira'        : 0.9999,
+                     'ConeAngles'        : [0.8,1.0,1.3,1.7],
+                     'ConeInputs'        : {'Displaced' : ['/Event/Phys/StdNoPIDsPions'], 'Long': ['/Event/Phys/StdAllNoPIDsPions'] },
+                     'ConeVariables'     : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                     'Prescale'          : 1.0,
+                     'Postscale'         : 1.0
+                     },
+    'STREAMS'     : ['Bhadron']
+    }
+
+class Xb23phConf(LineBuilder) :
+    """
+    Builder of Xb -> ppph Stripping Selection and StrippingLine.
+    Constructs Xb -> ppph Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config              = { .... }
+    >>> Xb23phConf  = Xb23phConf('Xb23phTest', config)
+    >>> Xb23phLines = Xb23phConf.lines
+    >>> for line in Xb23phLines :
+    >>>   print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selXb2ppph   : Xb -> ppph
+    lineXb2ppph  : StrippingLine made out of selXb2ppph
+    lines        : List of lines, [lineXb2ppph]
+
+    Exports as class data member:
+    Xb23phConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.pion      = Pions
+        self.proton    = Protons
+
+        trkFilterP     = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Trk_MinP)s)         & \
+                                               (PROBNNp            > %(Trk_MinProbNNp)s)' % config )
+
+        trkFilterPi    = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Trk_MinP)s)' % config )
+
+        self.myPions   = Selection( 'PionsFor'+name,
+                                    Algorithm = trkFilterPi,
+                                    RequiredSelections = [self.pion] )
+
+        self.myProtons = Selection( 'ProtonsFor'+name,
+                                    Algorithm = trkFilterP,
+                                    RequiredSelections = [self.proton] )
+
+        self.makeXb2ppph(name+'_4body', config)
+
+        self.defineRelatedInfoTools(config)
+
+        self.lineXb2ppph = StrippingLine('Xb2ppphLine',
+                                         prescale         = config['Prescale'],
+                                         postscale        = config['Postscale'],
+                                         selection        = self.selXb2ppph,
+					 RelatedInfoTools = self.RelatedInfoTools )
+
+        self.registerLine(self.lineXb2ppph)
+
+    def makeXb2ppph(self, name, config) :
+        # Define all the cuts
+        _mass12CutPreVtx          = '(AM < (%s - 280)*MeV)'                                   % config['Xb_MaxM_4body']
+        _sumpt12CutPreVtx         = '( (APT1 + APT2) > %s*MeV)'                               % config['Xb_MinSumPTppi']
+        _doca12chi2CutPreVtx      = '(ACHI2DOCA(1,2) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _combCuts12               = _mass12CutPreVtx+' & '+_sumpt12CutPreVtx+' & '+_doca12chi2CutPreVtx
+
+        _mass123CutPreVtx         = '(AM < (%s - 140)*MeV)'                                   % config['Xb_MaxM_4body']
+        _sumpt123CutPreVtx        = '( (APT1 + APT2 + APT3) > %s*MeV)'                        % config['Xb_MinSumPTppipi']
+        _doca123chi2CutPreVtx13   = '(ACHI2DOCA(1,3) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _doca123chi2CutPreVtx23   = '(ACHI2DOCA(2,3) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _combCuts123              = _mass123CutPreVtx+' & '+_sumpt123CutPreVtx+' & '+_doca123chi2CutPreVtx13+' & '+_doca123chi2CutPreVtx23
+
+        _wmass3pKCutPreVtx        = "(AWM('p+','p~-','p+','K-') > %s*MeV)"                    % config['Xb_MinM_4body']
+        _massCutPreVtx            = '(AM             < %s*MeV)'                               % config['Xb_MaxM_4body']
+        _sumptCutPreVtx           = '( (APT1 + APT2 + APT3 + APT4) > %s*MeV)'                 % config['Xb_MinSumPT_4body']
+        _ptCutPreVtx              = '(APT            > %s*MeV)'                               % config['Xb_MinPT_4body']
+        _docachi2CutPreVtx14      = '(ACHI2DOCA(1,4) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _docachi2CutPreVtx24      = '(ACHI2DOCA(2,4) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _docachi2CutPreVtx34      = '(ACHI2DOCA(3,4) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _massCutsPreVtx           = _massCutPreVtx+' & '+_wmass3pKCutPreVtx
+        _combCuts                 = _massCutsPreVtx+' & '+_sumptCutPreVtx+' & '+_ptCutPreVtx+' & '+\
+                                    _docachi2CutPreVtx14+' & '+_docachi2CutPreVtx24+' & '+_docachi2CutPreVtx34
+
+        _vtxChi2CutPostVtx        = '(VFASPF(VCHI2)  < %s)'                                   % config['Xb_MaxVtxChi2']
+        _fdChi2CutPostVtx         = '(BPVVDCHI2      > %s)'                                   % config['Xb_MinFDChi2']
+        _diraCutPostVtx           = '(BPVDIRA        > %s)'                                   % config['Xb_MinDira']
+        _ipChi2CutPostVtx         = '(BPVIPCHI2()    < %s)'                                   % config['Xb_MaxIPChi2']
+        _motherCuts               = _vtxChi2CutPostVtx+' & '+_fdChi2CutPostVtx+' & '+_diraCutPostVtx+' & '+_ipChi2CutPostVtx
+
+        _Xb                       = DaVinci__N4BodyDecays()
+        _Xb.Combination12Cut      = _combCuts12
+        _Xb.Combination123Cut     = _combCuts123
+        _Xb.CombinationCut        = _combCuts
+        _Xb.MotherCut             = _motherCuts
+        _Xb.DecayDescriptor       = "[Lambda_b0 -> p+ p~- p+ pi-]cc"
+        _Xb.ReFitPVs              = True
+
+        self.selXb2ppph           = Selection(name, Algorithm = _Xb, RequiredSelections = [self.myProtons, self.myPions])
+
+    def defineRelatedInfoTools(self, config):
+        self.RelatedInfoTools = []
+
+        for Angle in config['ConeAngles']:
+            for Name,Inputs in config["ConeInputs"].iteritems():
+                self.RelatedInfoTools.append({ "Type"              :    "RelInfoConeVariables",
+                                               "ConeAngle"         :    Angle,
+                                               "Variables"         :    config["ConeVariables"],
+                                               "Inputs"            :    Inputs,
+                                               "Location"          :    self.getConeVarLocation(Angle,0,Name),
+                                               "DaughterLocations" :    { '[Lambda_b0 -> ^p+ p~- p+ pi-]CC' : self.getConeVarLocation(Angle,1,Name),
+                                                                          '[Lambda_b0 -> p+ ^p~- p+ pi-]CC' : self.getConeVarLocation(Angle,2,Name),
+                                                                          '[Lambda_b0 -> p+ p~- ^p+ pi-]CC' : self.getConeVarLocation(Angle,3,Name),
+                                                                          '[Lambda_b0 -> p+ p~- p+ ^pi-]CC' : self.getConeVarLocation(Angle,4,Name)} } )
+        self.RelatedInfoTools.append({ "Type"           : "RelInfoVertexIsolation",
+                                       "Location"       : "VertexIsoInfo" })
+                
+    def getConeVarLocation(self,angle,num,name):
+        return "ConeVar{angle}_{num}_{name}".format(angle=str(angle).replace('.',''),num=str(num),name=name)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2p3h.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2p3h.py
new file mode 100644
index 000000000..93239ecb9
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2p3h.py
@@ -0,0 +1,182 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Xb->phhh Stripping Selections and StrippingLines.
+Provides class Xb2p3hConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Exported symbols (use python help!):
+   - Xb2p3hConf
+"""
+
+__author__  = ['Jan Mickelle V. Maratas', 'Stephane Monteil','Andrea Merli']
+__date__    = '01/04/2016'
+__version__ = 'v1r0'
+__all__     = {'Xb2phhhConf',
+               'default_config'}
+
+from Gaudi.Configuration                   import *
+from PhysSelPython.Wrappers                import Selection
+from StrippingConf.StrippingLine           import StrippingLine
+from StrippingUtils.Utils                  import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, DaVinci__N4BodyDecays
+
+from StandardParticles                     import StdNoPIDsPions     as Pions
+from StandardParticles                     import StdLooseANNProtons as Protons
+
+default_config = {
+    'NAME'        : 'Xb2phhh',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Xb2phhhConf',
+    'CONFIG'      : {'Trk_MaxChi2Ndof'   : 4.0,
+                     'Trk_MaxGhostProb'  : 0.4,
+                     'Trk_MinIPChi2'     : 16.0,
+                     'Trk_MinP'          : 1500.0,
+                     'Trk_MinProbNNp'    : 0.05,
+                     'Xb_MinSumPTppi'    : 1500.0,
+                     'Xb_MinSumPTppipi'  : 2500.0,
+                     'Xb_MinM_4body'     : 5195.0,
+                     'Xb_MaxM_4body'     : 6405.0,
+                     'Xb_MinSumPT_4body' : 3500.0,
+                     'Xb_MinPT_4body'    : 1500.0,
+                     'Xb_MaxDOCAChi2'    : 20.0,
+                     'Xb_MaxVtxChi2'     : 20.0,
+                     'Xb_MinFDChi2'      : 50.0,
+                     'Xb_MaxIPChi2'      : 16.0,
+                     'Xb_MinDira'        : 0.9999,
+                     'ConeAngles'        : [0.8,1.0,1.3,1.7],
+                     'ConeInputs'        : {'Displaced' : ['/Event/Phys/StdNoPIDsPions'], 'Long': ['/Event/Phys/StdAllNoPIDsPions'] },
+                     'ConeVariables'     : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                     'Prescale'          : 1.0,
+                     'Postscale'         : 1.0
+                     },
+    'STREAMS'     : ['Bhadron']
+    }
+
+class Xb2phhhConf(LineBuilder) :
+    """
+    Builder of Xb -> phhh Stripping Selection and StrippingLine.
+    Constructs Xb -> phhh Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config              = { .... }
+    >>> Xb2phhhConf  = Xb2phhhConf('Xb23phTest', config)
+    >>> Xb2phhhLines = Xb2phhhConf.lines
+    >>> for line in Xb2p3hLines :
+    >>>   print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selXb2phhh   : Xb -> phhh
+    lineXb2phhh  : StrippingLine made out of selXb2phhh
+    lines        : List of lines, [lineXb2phhh]
+
+    Exports as class data member:
+    Xb2phhhConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.pion      = Pions
+        self.proton    = Protons
+
+        trkFilterP     = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Trk_MinP)s)         & \
+                                               (PROBNNp            > %(Trk_MinProbNNp)s)' % config )
+
+        trkFilterPi    = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Trk_MinP)s)' % config )
+
+        self.myPions   = Selection( 'PionsFor'+name,
+                                    Algorithm = trkFilterPi,
+                                    RequiredSelections = [self.pion] )
+
+        self.myProtons = Selection( 'ProtonsFor'+name,
+                                    Algorithm = trkFilterP,
+                                    RequiredSelections = [self.proton] )
+
+        self.makeXb2phhh(name+'_4body', config)
+
+        self.defineRelatedInfoTools(config)
+
+        self.lineXb2phhh = StrippingLine(name+'Line',
+                                         prescale         = config['Prescale'],
+                                         postscale        = config['Postscale'],
+                                         selection        = self.selXb2phhh,
+					 RelatedInfoTools = self.RelatedInfoTools )
+        
+        self.registerLine(self.lineXb2phhh)
+        
+    def makeXb2phhh(self, name, config) :
+        # Define all the cuts
+        _mass12CutPreVtx          = '(AM < (%s - 280)*MeV)'                                   % config['Xb_MaxM_4body']
+        _sumpt12CutPreVtx         = '( (APT1 + APT2) > %s*MeV)'                               % config['Xb_MinSumPTppi']
+        _doca12chi2CutPreVtx      = '(ACHI2DOCA(1,2) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _combCuts12               = _mass12CutPreVtx+' & '+_sumpt12CutPreVtx+' & '+_doca12chi2CutPreVtx
+        
+        _mass123CutPreVtx         = '(AM < (%s - 140)*MeV)'                                   % config['Xb_MaxM_4body']
+        _sumpt123CutPreVtx        = '( (APT1 + APT2 + APT3) > %s*MeV)'                        % config['Xb_MinSumPTppipi']
+        _doca123chi2CutPreVtx13   = '(ACHI2DOCA(1,3) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _doca123chi2CutPreVtx23   = '(ACHI2DOCA(2,3) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _combCuts123              = _mass123CutPreVtx+' & '+_sumpt123CutPreVtx+' & '+_doca123chi2CutPreVtx13+' & '+_doca123chi2CutPreVtx23
+        
+        _wmass3pKCutPreVtx        = "(AWM('p+','p~-','p+','K-') > %s*MeV)"                    % config['Xb_MinM_4body']
+        _massCutPreVtx            = '(AM             < %s*MeV)'                               % config['Xb_MaxM_4body']
+        _sumptCutPreVtx           = '( (APT1 + APT2 + APT3 + APT4) > %s*MeV)'                 % config['Xb_MinSumPT_4body']
+        _ptCutPreVtx              = '(APT            > %s*MeV)'                               % config['Xb_MinPT_4body']
+        _docachi2CutPreVtx14      = '(ACHI2DOCA(1,4) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _docachi2CutPreVtx24      = '(ACHI2DOCA(2,4) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _docachi2CutPreVtx34      = '(ACHI2DOCA(3,4) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _massCutsPreVtx           = _massCutPreVtx+' & '+_wmass3pKCutPreVtx
+        _combCuts                 = _massCutsPreVtx+' & '+_sumptCutPreVtx+' & '+_ptCutPreVtx+' & '+\
+                                    _docachi2CutPreVtx14+' & '+_docachi2CutPreVtx24+' & '+_docachi2CutPreVtx34
+        
+        _vtxChi2CutPostVtx        = '(VFASPF(VCHI2)  < %s)'                                   % config['Xb_MaxVtxChi2']
+        _fdChi2CutPostVtx         = '(BPVVDCHI2      > %s)'                                   % config['Xb_MinFDChi2']
+        _diraCutPostVtx           = '(BPVDIRA        > %s)'                                   % config['Xb_MinDira']
+        _ipChi2CutPostVtx         = '(BPVIPCHI2()    < %s)'                                   % config['Xb_MaxIPChi2']
+        _motherCuts               = _vtxChi2CutPostVtx+' & '+_fdChi2CutPostVtx+' & '+_diraCutPostVtx+' & '+_ipChi2CutPostVtx
+        
+        _Xb                       = DaVinci__N4BodyDecays()
+        _Xb.Combination12Cut      = _combCuts12
+        _Xb.Combination123Cut     = _combCuts123
+        _Xb.CombinationCut        = _combCuts
+        _Xb.MotherCut             = _motherCuts
+        _Xb.DecayDescriptor       = "[Lambda_b0 -> p+ pi- pi+ pi-]cc"
+        _Xb.ReFitPVs              = True
+        
+        self.selXb2phhh           = Selection(name, Algorithm = _Xb, RequiredSelections = [self.myProtons, self.myPions])
+
+    def defineRelatedInfoTools(self, config):
+        self.RelatedInfoTools = []
+
+        for Angle in config['ConeAngles']:
+            for Name,Inputs in config["ConeInputs"].iteritems():
+                self.RelatedInfoTools.append({ "Type"              :    "RelInfoConeVariables",
+                                               "ConeAngle"         :    Angle,
+                                               "Variables"         :    config["ConeVariables"],
+                                               "Inputs"            :    Inputs,
+                                               "Location"          :    self.getConeVarLocation(Angle,0,Name),
+                                               "DaughterLocations" :    { '[Lambda_b0 -> ^p+ pi- pi+ pi-]CC' : self.getConeVarLocation(Angle,1,Name),
+                                                                          '[Lambda_b0 -> p+ ^pi- pi+ pi-]CC' : self.getConeVarLocation(Angle,2,Name),
+                                                                          '[Lambda_b0 -> p+ pi- ^pi+ pi-]CC' : self.getConeVarLocation(Angle,3,Name),
+                                                                          '[Lambda_b0 -> p+ pi- pi+ ^pi-]CC' : self.getConeVarLocation(Angle,4,Name)} } )
+        self.RelatedInfoTools.append({ "Type"           : "RelInfoVertexIsolation",
+                                       "Location"       : "VertexIsoInfo" })
+                
+    def getConeVarLocation(self,angle,num,name):
+        return "ConeVar{angle}_{num}_{name}".format(angle=str(angle).replace('.',''),num=str(num),name=name)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2p3h_raw.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2p3h_raw.py
new file mode 100644
index 000000000..09cf02dc6
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2p3h_raw.py
@@ -0,0 +1,190 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+"""
+This line is a clone of Xb2p3h line, but it is rerun with Raw Event Banks saved. 06/04/21 G. Sarpis
+To avoid any confusion or backwards compatibility issues, all class names are renamed with +'_raw'
+The original authors of this line are: Jan Mickelle V. Maratas, Stephane Monteil, Andrea Merli.
+Original description below:
+
+Module for construction of Xb->phhh Stripping Selections and StrippingLines.
+Provides class Xb2p3hConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Exported symbols (use python help!):
+   - Xb2p3hConf
+"""
+
+__author__  = ['Gediminas Sarpis', 'Hendrik Jage']
+__date__    = '06/04/2021'
+__version__ = 'v1r0'
+__all__     = {'Xb2phhhrawConf',
+               'default_config'}
+
+from Gaudi.Configuration                   import *
+from PhysSelPython.Wrappers                import Selection
+from StrippingConf.StrippingLine           import StrippingLine
+from StrippingUtils.Utils                  import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, DaVinci__N4BodyDecays
+
+from StandardParticles                     import StdNoPIDsPions     as Pions
+from StandardParticles                     import StdLooseANNProtons as Protons
+
+default_config = {
+    'NAME'        : 'Xb2phhh_raw',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Xb2phhhConf_raw',
+    'CONFIG'      : {'Trk_MaxChi2Ndof'   : 4.0,
+                     'Trk_MaxGhostProb'  : 0.4,
+                     'Trk_MinIPChi2'     : 16.0,
+                     'Trk_MinP'          : 1500.0,
+                     'Trk_MinProbNNp'    : 0.05,
+                     'Xb_MinSumPTppi'    : 1500.0,
+                     'Xb_MinSumPTppipi'  : 2500.0,
+                     'Xb_MinM_4body'     : 5195.0,
+                     'Xb_MaxM_4body'     : 6405.0,
+                     'Xb_MinSumPT_4body' : 3500.0,
+                     'Xb_MinPT_4body'    : 1500.0,
+                     'Xb_MaxDOCAChi2'    : 20.0,
+                     'Xb_MaxVtxChi2'     : 20.0,
+                     'Xb_MinFDChi2'      : 50.0,
+                     'Xb_MaxIPChi2'      : 16.0,
+                     'Xb_MinDira'        : 0.9999,
+                     'ConeAngles'        : [0.8,1.0,1.3,1.7],
+                     'ConeInputs'        : {'Displaced' : ['/Event/Phys/StdNoPIDsPions'], 'Long': ['/Event/Phys/StdAllNoPIDsPions'] },
+                     'ConeVariables'     : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                     'Prescale'          : 1.0,
+                     'Postscale'         : 1.0,
+                     'RequiredRawEvents' : ["Calo", "Rich", "Velo", "Tracker"]  # Wasn't included in the original - G. Sarpis
+                     
+                     },
+    'STREAMS'     : ['Bhadron']
+    }
+
+class Xb2phhhConf_raw(LineBuilder) :
+    """
+    Builder of Xb -> phhh Stripping Selection and StrippingLine.
+    Constructs Xb -> phhh Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config              = { .... }
+    >>> Xb2phhhConf_raw  = Xb2phhhConf_raw('Xb23phTest', config)
+    >>> Xb2phhhLines_raw = Xb2phhhConf_raw.lines
+    >>> for line in Xb2p3hLines_raw :
+    >>>   print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selXb2phhh_raw   : Xb -> phhh
+    lineXb2phhh_raw  : StrippingLine made out of selXb2phhh_raw
+    lines        : List of lines, [lineXb2phhh_raw]
+
+    Exports as class data member:
+    Xb2phhhConf_raw.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.pion      = Pions
+        self.proton    = Protons
+
+        trkFilterP     = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Trk_MinP)s)         & \
+                                               (PROBNNp            > %(Trk_MinProbNNp)s)' % config )
+
+        trkFilterPi    = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Trk_MinP)s)' % config )
+
+        self.myPions   = Selection( 'PionsFor'+name,
+                                    Algorithm = trkFilterPi,
+                                    RequiredSelections = [self.pion] )
+
+        self.myProtons = Selection( 'ProtonsFor'+name,
+                                    Algorithm = trkFilterP,
+                                    RequiredSelections = [self.proton] )
+
+        self.makeXb2phhh_raw(name+'_4body', config)
+
+        self.defineRelatedInfoTools(config)
+
+        self.lineXb2phhh_raw = StrippingLine(name+'Line',
+                                         prescale         = config['Prescale'],
+                                         postscale        = config['Postscale'],
+                                         selection        = self.selXb2phhh_raw,
+					 RelatedInfoTools = self.RelatedInfoTools,
+                                         RequiredRawEvents = config['RequiredRawEvents'])
+        
+        self.registerLine(self.lineXb2phhh_raw)
+        
+    def makeXb2phhh_raw(self, name, config) :
+        # Define all the cuts
+        _mass12CutPreVtx          = '(AM < (%s - 280)*MeV)'                                   % config['Xb_MaxM_4body']
+        _sumpt12CutPreVtx         = '( (APT1 + APT2) > %s*MeV)'                               % config['Xb_MinSumPTppi']
+        _doca12chi2CutPreVtx      = '(ACHI2DOCA(1,2) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _combCuts12               = _mass12CutPreVtx+' & '+_sumpt12CutPreVtx+' & '+_doca12chi2CutPreVtx
+        
+        _mass123CutPreVtx         = '(AM < (%s - 140)*MeV)'                                   % config['Xb_MaxM_4body']
+        _sumpt123CutPreVtx        = '( (APT1 + APT2 + APT3) > %s*MeV)'                        % config['Xb_MinSumPTppipi']
+        _doca123chi2CutPreVtx13   = '(ACHI2DOCA(1,3) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _doca123chi2CutPreVtx23   = '(ACHI2DOCA(2,3) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _combCuts123              = _mass123CutPreVtx+' & '+_sumpt123CutPreVtx+' & '+_doca123chi2CutPreVtx13+' & '+_doca123chi2CutPreVtx23
+        
+        _wmass3pKCutPreVtx        = "(AWM('p+','p~-','p+','K-') > %s*MeV)"                    % config['Xb_MinM_4body']
+        _massCutPreVtx            = '(AM             < %s*MeV)'                               % config['Xb_MaxM_4body']
+        _sumptCutPreVtx           = '( (APT1 + APT2 + APT3 + APT4) > %s*MeV)'                 % config['Xb_MinSumPT_4body']
+        _ptCutPreVtx              = '(APT            > %s*MeV)'                               % config['Xb_MinPT_4body']
+        _docachi2CutPreVtx14      = '(ACHI2DOCA(1,4) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _docachi2CutPreVtx24      = '(ACHI2DOCA(2,4) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _docachi2CutPreVtx34      = '(ACHI2DOCA(3,4) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _massCutsPreVtx           = _massCutPreVtx+' & '+_wmass3pKCutPreVtx
+        _combCuts                 = _massCutsPreVtx+' & '+_sumptCutPreVtx+' & '+_ptCutPreVtx+' & '+\
+                                    _docachi2CutPreVtx14+' & '+_docachi2CutPreVtx24+' & '+_docachi2CutPreVtx34
+        
+        _vtxChi2CutPostVtx        = '(VFASPF(VCHI2)  < %s)'                                   % config['Xb_MaxVtxChi2']
+        _fdChi2CutPostVtx         = '(BPVVDCHI2      > %s)'                                   % config['Xb_MinFDChi2']
+        _diraCutPostVtx           = '(BPVDIRA        > %s)'                                   % config['Xb_MinDira']
+        _ipChi2CutPostVtx         = '(BPVIPCHI2()    < %s)'                                   % config['Xb_MaxIPChi2']
+        _motherCuts               = _vtxChi2CutPostVtx+' & '+_fdChi2CutPostVtx+' & '+_diraCutPostVtx+' & '+_ipChi2CutPostVtx
+        
+        _Xb                       = DaVinci__N4BodyDecays()
+        _Xb.Combination12Cut      = _combCuts12
+        _Xb.Combination123Cut     = _combCuts123
+        _Xb.CombinationCut        = _combCuts
+        _Xb.MotherCut             = _motherCuts
+        _Xb.DecayDescriptor       = "[Lambda_b0 -> p+ pi- pi+ pi-]cc"
+        _Xb.ReFitPVs              = True
+        
+        self.selXb2phhh_raw           = Selection(name, Algorithm = _Xb, RequiredSelections = [self.myProtons, self.myPions])
+
+    def defineRelatedInfoTools(self, config):
+        self.RelatedInfoTools = []
+
+        for Angle in config['ConeAngles']:
+            for Name,Inputs in config["ConeInputs"].iteritems():
+                self.RelatedInfoTools.append({ "Type"              :    "RelInfoConeVariables",
+                                               "ConeAngle"         :    Angle,
+                                               "Variables"         :    config["ConeVariables"],
+                                               "Inputs"            :    Inputs,
+                                               "Location"          :    self.getConeVarLocation(Angle,0,Name),
+                                               "DaughterLocations" :    { '[Lambda_b0 -> ^p+ pi- pi+ pi-]CC' : self.getConeVarLocation(Angle,1,Name),
+                                                                          '[Lambda_b0 -> p+ ^pi- pi+ pi-]CC' : self.getConeVarLocation(Angle,2,Name),
+                                                                          '[Lambda_b0 -> p+ pi- ^pi+ pi-]CC' : self.getConeVarLocation(Angle,3,Name),
+                                                                          '[Lambda_b0 -> p+ pi- pi+ ^pi-]CC' : self.getConeVarLocation(Angle,4,Name)} } )
+        self.RelatedInfoTools.append({ "Type"           : "RelInfoVertexIsolation",
+                                       "Location"       : "VertexIsoInfo" })
+                
+    def getConeVarLocation(self,angle,num,name):
+        return "ConeVar{angle}_{num}_{name}".format(angle=str(angle).replace('.',''),num=str(num),name=name)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2phh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2phh.py
new file mode 100644
index 000000000..936887afc
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXb2phh.py
@@ -0,0 +1,172 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Xb->phh Stripping Selections and StrippingLines.
+Provides class Xb2phhConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Exported symbols (use python help!):
+   - Xb2phhConf
+"""
+
+__author__  = ['Jan Mickelle V. Maratas', 'Stephane Monteil', 'Thomas Latham']
+__date__    = '24/11/2016'
+__version__ = 'v1r0'
+__all__     = {'Xb2phhConf',
+               'default_config'}
+
+from Gaudi.Configuration                   import *
+from PhysSelPython.Wrappers                import Selection
+from StrippingConf.StrippingLine           import StrippingLine
+from StrippingUtils.Utils                  import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, DaVinci__N3BodyDecays
+
+from StandardParticles                     import StdNoPIDsPions     as Pions
+from StandardParticles                     import StdLooseANNProtons as Protons
+
+default_config = {
+    'NAME'        : 'Xb2phh',
+    'WGs'         : ['BnoC'],
+    'BUILDERTYPE' : 'Xb2phhConf',
+    'CONFIG'      : {'Trk_MaxChi2Ndof'   : 3.0,
+                     'Trk_MaxGhostProb'  : 0.4,
+                     'Trk_MinIPChi2'     : 16.0,
+                     'Trk_MinP'          : 1500.0,
+                     'Trk_MinProbNNp'    : 0.05,
+                     'Xb_MinSumPTppi'    : 1500.0,
+                     'Xb_MinM'           : 5195.0,
+                     'Xb_MaxM'           : 6405.0,
+                     'Xb_MinSumPT'       : 3500.0,
+                     'Xb_MinPT'          : 1500.0,
+                     'Xb_MaxDOCAChi2'    : 20.0,
+                     'Xb_MaxVtxChi2'     : 20.0,
+                     'Xb_MinFDChi2'      : 50.0,
+                     'Xb_MaxIPChi2'      : 16.0,
+                     'Xb_MinDira'        : 0.9999,
+                     'Prescale'          : 1.0,
+                     'Postscale'         : 1.0
+                     },
+    'STREAMS'     : ['Bhadron']
+    }
+
+class Xb2phhConf(LineBuilder) :
+    """
+    Builder of Xb -> phh Stripping Selection and StrippingLine.
+    Constructs Xb -> phh Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config              = { .... }
+    >>> Xb2phhConf  = Xb2phhConf('Xb2phhTest', config)
+    >>> Xb2phhLines = Xb2phhConf.lines
+    >>> for line in Xb2phhLines :
+    >>>   print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selXb2phh    : Xb -> phh
+    lineXb2phh   : StrippingLine made out of selXb2phh
+    lines        : List of lines, [lineXb2phh]
+
+    Exports as class data member:
+    Xb2phhConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.pion      = Pions
+        self.proton    = Protons
+
+        trkFilterP     = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Trk_MinP)s)         & \
+                                               (PROBNNp            > %(Trk_MinProbNNp)s)' % config )
+
+        trkFilterPi    = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Trk_MinP)s)' % config )
+
+        self.myPions   = Selection( 'PionsFor'+name,
+                                    Algorithm = trkFilterPi,
+                                    RequiredSelections = [self.pion] )
+
+        self.myProtons = Selection( 'ProtonsFor'+name,
+                                    Algorithm = trkFilterP,
+                                    RequiredSelections = [self.proton] )
+
+        self.makeXb2phh (name, config)
+
+        self.lineXb2phh  = StrippingLine(name+'Line',
+                                         prescale         = config['Prescale'],
+                                         postscale        = config['Postscale'],
+                                         selection        = self.selXb2phh,
+                                         RelatedInfoTools = [ { "Type"           : "RelInfoConeVariables",
+                                                                "ConeAngle"      : 0.8,
+                                                                "Inputs"         : [ '/Event/Phys/StdNoPIDsPions' ],
+                                                                "Variables"      : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                                "Location"       : 'P2ConeVar1' },
+                                                              { "Type"           : "RelInfoConeVariables",
+                                                                "ConeAngle"      : 1.0,
+                                                                "Inputs"         : [ '/Event/Phys/StdNoPIDsPions' ],
+                                                                "Variables"      : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                                "Location"       : 'P2ConeVar2' },
+                                                              { "Type"           : "RelInfoConeVariables",
+                                                                "ConeAngle"      : 1.3,
+                                                                "Inputs"         : [ '/Event/Phys/StdNoPIDsPions' ],
+                                                                "Variables"      : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                                "Location"       : 'P2ConeVar3' },
+                                                              { "Type"           : "RelInfoConeVariables",
+                                                                "ConeAngle"      : 1.7,
+                                                                "Inputs"         : [ '/Event/Phys/StdNoPIDsPions' ],
+                                                                "Variables"      : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                                "Location"       : 'P2ConeVar4' },
+                                                              { "Type"           : "RelInfoVertexIsolation",
+                                                                "Location"       : "VertexIsoInfo"} ] )
+
+        self.registerLine(self.lineXb2phh )
+
+
+    def makeXb2phh (self, name, config) :
+        # Define all the cuts
+        _mass12CutPreVtx          = '(AM < (%s - 140)*MeV)'                                   % config['Xb_MaxM']
+        _sumpt12CutPreVtx         = '( (APT1 + APT2) > %s*MeV)'                               % config['Xb_MinSumPTppi']
+        _doca12chi2CutPreVtx      = '(ACHI2DOCA(1,2) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _combCuts12               = _mass12CutPreVtx+' & '+_sumpt12CutPreVtx+' & '+_doca12chi2CutPreVtx
+
+        _wmassp2KCutPreVtx        = "(AWM('p+','K-','K-') > %s*MeV)"                          % config['Xb_MinM']
+        _massCutPreVtx            = '(AM             < %s*MeV)'                               % config['Xb_MaxM']
+        _sumptCutPreVtx           = '( (APT1 + APT2 + APT3) > %s*MeV)'                        % config['Xb_MinSumPT']
+        _ptCutPreVtx              = '(APT            > %s*MeV)'                               % config['Xb_MinPT']
+        _docachi2CutPreVtx13      = '(ACHI2DOCA(1,3) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _docachi2CutPreVtx23      = '(ACHI2DOCA(2,3) < %s)'                                   % config['Xb_MaxDOCAChi2']
+        _massCutsPreVtx           = _massCutPreVtx+' & '+_wmassp2KCutPreVtx
+        _combCuts                 = _massCutsPreVtx+' & '+_sumptCutPreVtx+' & '+_ptCutPreVtx+' & '+\
+                                    _docachi2CutPreVtx13+' & '+_docachi2CutPreVtx23
+
+        _vtxChi2CutPostVtx        = '(VFASPF(VCHI2)  < %s)'                                   % config['Xb_MaxVtxChi2']
+        _fdChi2CutPostVtx         = '(BPVVDCHI2      > %s)'                                   % config['Xb_MinFDChi2']
+        _diraCutPostVtx           = '(BPVDIRA        > %s)'                                   % config['Xb_MinDira']
+        _ipChi2CutPostVtx         = '(BPVIPCHI2()    < %s)'                                   % config['Xb_MaxIPChi2']
+        _motherCuts               = _vtxChi2CutPostVtx+' & '+_fdChi2CutPostVtx+' & '+_diraCutPostVtx+' & '+_ipChi2CutPostVtx
+
+        _Xb                       = DaVinci__N3BodyDecays()
+        _Xb.Combination12Cut      = _combCuts12
+        _Xb.CombinationCut        = _combCuts
+        _Xb.MotherCut             = _motherCuts
+        _Xb.DecayDescriptors      = [ '[Xi_b- -> p+ pi- pi-]cc', '[Xi_b~+ -> p+ pi+ pi-]cc', '[Xi_b~+ -> p+ pi+ pi+]cc' ]
+        _Xb.ReFitPVs              = True
+
+        self.selXb2phh            = Selection(name, Algorithm = _Xb, RequiredSelections = [self.myProtons, self.myPions])
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXib2LbXLb2ph.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXib2LbXLb2ph.py
new file mode 100644
index 000000000..836258945
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/StrippingXib2LbXLb2ph.py
@@ -0,0 +1,211 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting Xib -> Lb pi/mu, Lb -> p h
+
+Authors: Ao Xu
+"""
+
+__author__ = ["Ao Xu"]
+__date__ = "06/09/2021"
+__version__ = "1.0"
+
+__all__ = ("Xib2LbXLb2phLines",
+           "default_config")
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+from StandardParticles import (StdAllNoPIDsPions,
+                               StdAllNoPIDsProtons,
+                               StdAllLooseMuons)
+
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder, checkConfig
+
+
+
+default_config = {
+    "NAME"        : "Xib2LbXLb2ph",
+    "WGs"         : ["BnoC"],
+    "BUILDERTYPE" : "Xib2LbXLb2phLines",
+    "CONFIG"      : { "PrescaleXib2LbX"  : 1,
+                      "MinPTLb2ph_h"     : 1000,
+                      "MinPTLb2ph_p"     : 1000,
+                      "MinPTXib2LbX_h"   : 100,
+                      "MinIPChi2Lb2ph"   : 8,
+                      "MinIPChi2Xib2LbX" : 4,
+                      "TrChi2"           : 4,
+                      "TrGhostProb"      : 0.5,
+                      "MaxPTLb2ph"       : 1500,
+                      "MaxIPChi2Lb2ph"   : 12,
+                      "DOCA"             : 0.08,
+                      "VCHI2"            : 10,
+                      "XibVCHI2"         : 25,
+                      "BVDCHI2"          : 100,
+                      "BPT"              : 1500,
+                      "XibPT"            : 1500,
+                      "BTAU"             : 0.0006,
+                      "LbCombMassLow"    : 4900,
+                      "LbCombMassHigh"   : 6200,
+                      "LbMassLow"        : 5000,
+                      "LbMassHigh"       : 6100,
+                      "XibCombMassLow"   : 5100,
+                      "XibCombMassHigh"  : 6300,
+                      "XibMassLow"       : 5200,
+                      "XibMassHigh"      : 6200,
+                      "ConeAngles"       : [ 1.0, 1.5, 1.7, 2.0 ] },
+    "STREAMS"     : [ "Bhadron" ]
+}
+
+
+
+class Xib2LbXLb2phLines( LineBuilder ) :
+    """Class defining the Xib -> Lb pi/mu, Lb -> ph stripping lines"""
+
+    __configuration_keys__ = default_config["CONFIG"].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        # inputs
+        pion_filter = FilterDesktop( Code = require_all(
+            "TRGHOSTPROB < {}".format(config["TrGhostProb"]),
+            "TRCHI2DOF < {}".format(config["TrChi2"]),
+            "PT > {} * MeV".format(config["MinPTLb2ph_h"]),
+            "MIPCHI2DV(PRIMARY) > {}".format(config["MinIPChi2Lb2ph"])) )
+        self.pions = Selection( "pions_for_"+name,
+                                 Algorithm = pion_filter,
+                                 RequiredSelections = [StdAllNoPIDsPions] )
+        proton_filter = FilterDesktop( Code = require_all(
+            "TRGHOSTPROB < {}".format(config["TrGhostProb"]),
+            "TRCHI2DOF < {}".format(config["TrChi2"]),
+            "PT > {} * MeV".format(config["MinPTLb2ph_p"]),
+            "MIPCHI2DV(PRIMARY) > {}".format(config["MinIPChi2Lb2ph"])) )
+        self.protons = Selection( "protons_for_"+name,
+                                  Algorithm = proton_filter,
+                                  RequiredSelections = [StdAllNoPIDsProtons] )
+        soft_pion_filter = FilterDesktop( Code = require_all(
+            "TRGHOSTPROB < {}".format(config["TrGhostProb"]),
+            "TRCHI2DOF < {}".format(config["TrChi2"]),
+            "PT > {} * MeV".format(config["MinPTXib2LbX_h"]),
+            "MIPCHI2DV(PRIMARY) > {}".format(config["MinIPChi2Xib2LbX"])) )
+        self.soft_pions = Selection( "soft_pions_for_"+name,
+                                     Algorithm = soft_pion_filter,
+                                     RequiredSelections = [StdAllNoPIDsPions] )
+        muon_filter = FilterDesktop( Code = require_all(
+            "TRGHOSTPROB < {}".format(config["TrGhostProb"]),
+            "TRCHI2DOF < {}".format(config["TrChi2"]),
+            "PT > {} * MeV".format(config["MinPTXib2LbX_h"]),
+            "MIPCHI2DV(PRIMARY) > {}".format(config["MinIPChi2Xib2LbX"])) )
+        self.muons = Selection( "muons_for_"+name,
+                                Algorithm = muon_filter,
+                                RequiredSelections = [StdAllLooseMuons] )
+
+        # Lb -> p h
+        Lb2phName = name + "Lb2ph"
+        self.lb = self._make_lb(Lb2phName,config)
+
+        # Xib- -> Lb pi-
+        decay = "[Xi_b- -> Lambda_b0 pi-]cc"
+        inputs = [self.lb,self.soft_pions]
+        line_name = name + "Xib2LbPiLb2ph"
+        xib2lbpi_rs = self._make_xib(line_name,decay,inputs,config)
+        self._make_line(line_name,xib2lbpi_rs,config["PrescaleXib2LbX"])
+
+        # (WS) Xib- -> Lb pi+
+        decay = "[Xi_b- -> Lambda_b0 pi+]cc"
+        inputs = [self.lb,self.soft_pions]
+        line_name = name + "Xib2LbPiWSLb2ph"
+        xib2lbpi_ws = self._make_xib(line_name,decay,inputs,config)
+        self._make_line(line_name,xib2lbpi_ws,config["PrescaleXib2LbX"])
+
+        # Xib- -> Lb mu- (nu)
+        decay = "[Xi_b- -> Lambda_b0 mu-]cc"
+        inputs = [self.lb,self.muons]
+        line_name = name + "Xib2LbMuLb2ph"
+        xib2lbmu_rs = self._make_xib(line_name,decay,inputs,config)
+        self._make_line(line_name,xib2lbmu_rs,config["PrescaleXib2LbX"])
+
+        # (WS) Xib- -> Lb mu+ (nu)
+        decay = "[Xi_b- -> Lambda_b0 mu+]cc"
+        inputs = [self.lb,self.muons]
+        line_name = name + "Xib2LbMuWSLb2ph"
+        xib2lbmu_ws = self._make_xib(line_name,decay,inputs,config)
+        self._make_line(line_name,xib2lbmu_ws,config["PrescaleXib2LbX"])
+
+
+    def _make_lb(self,name,config):
+        """make Lb -> p h decay
+        """
+        cc = require_all(
+                "AMAXDOCA('') < {}".format(config["DOCA"]),
+                "AM > {} * MeV".format(config["LbCombMassLow"]),
+                "AM < {} * MeV".format(config["LbCombMassHigh"]) )
+        mc = require_all(
+                "MAXTREE(((ABSID=='p+')|(ABSID=='pi+')),PT) > {} * MeV".format(config["MaxPTLb2ph"]),
+                "MAXTREE(((ABSID=='p+')|(ABSID=='pi+')),MIPCHI2DV(PRIMARY)) > {}".format(config["MaxIPChi2Lb2ph"]),
+                "PT > {} * MeV".format(config["BPT"]),
+                "VFASPF(VCHI2) < {}".format(config["VCHI2"]),
+                "BPVVDCHI2 > {}".format(config["BVDCHI2"]),
+                "BPVLTIME() > {}".format(config["BTAU"]),
+                "M > {} * MeV".format(config["LbMassLow"]),
+                "M < {} * MeV".format(config["LbMassHigh"]) )
+        combine_lb2ph = CombineParticles( DecayDescriptors = ["[Lambda_b0 -> p+ pi-]cc"],
+                CombinationCut = cc,
+                MotherCut = mc )
+
+        return Selection( name,
+                          Algorithm = combine_lb2ph,
+                          RequiredSelections = [ self.protons, self.pions ] )
+
+
+    def _make_xib(self,name,decay,inputs,config):
+        """make Xib -> Lb X decay
+        """
+        cc = require_all(
+                "AM > {} * MeV".format(config["XibCombMassLow"]),
+                "AM < {} * MeV".format(config["XibCombMassHigh"]) )
+        mc = require_all(
+                "PT > {} * MeV".format(config["XibPT"]),
+                "VFASPF(VCHI2) < {}".format(config["XibVCHI2"]),
+                "M > {} * MeV".format(config["XibMassLow"]),
+                "M < {} * MeV".format(config["XibMassHigh"]) )
+        combine_xib2lbx = CombineParticles( DecayDescriptors = [decay],
+                CombinationCut = cc,
+                MotherCut = mc )
+
+        return Selection( name,
+                          Algorithm = combine_xib2lbx,
+                          RequiredSelections = inputs )
+
+
+    def _make_line(self,name,selection,prescale):
+        """make the stripping line
+        """
+        line = StrippingLine( name+"Line",
+                              prescale  = prescale,
+                              selection = selection,
+                              EnableFlavourTagging = False,
+                              RequiredRawEvents = ["Velo"] )
+
+        self.registerLine(line)
+
+
+
+def require_all(*cuts):
+    """
+    return string of "and" of inputs
+    """
+    cuts = ["({})".format(c) for c in cuts]
+    return " & ".join(cuts)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/__init__.py
new file mode 100644
index 000000000..9d02d6715
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingBnoC/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ('StrippingB2LambdapppLines', 'StrippingBu2KSh', 'StrippingXb2p3h_raw', 'StrippingXib2LbXLb2ph')
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingCharmFromBSemiForHadronAsy.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingCharmFromBSemiForHadronAsy.py
new file mode 100644
index 000000000..f2300f0a4
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingCharmFromBSemiForHadronAsy.py
@@ -0,0 +1,423 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Partially reconstructed charm from B,
+with muon and slow pion(s) tags.
+Includes
+- D0 -> K3pi with muon and D* tag
+- Lambda_c+ -> pKpi with muon and Lambda_c* tags
+"""
+__author__ = ['Mika Vesterinen']
+__date__ = '10/03/2013'
+__version__ = '$Revision: 0.0 $'
+
+from Gaudi.Configuration import *
+
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLoosePions, StdLoosePions, StdLooseMuons, StdLooseKaons, StdLooseProtons
+from Configurables import TisTosParticleTagger
+
+__all__ = ('CharmFromBSemiForHadronAsyAllLinesConf',
+           'TOSFilter',
+           'default_config')
+
+default_config = {
+        'NAME'        : 'CharmFromBSemiForHadronAsy',
+        'WGs'         : ['ALL'],
+        'BUILDERTYPE' : 'CharmFromBSemiForHadronAsyAllLinesConf',
+        'CONFIG'      : {
+            "prescale_LbRS" : 1.0
+            ,"prescale_LbWS" : 0.2 
+            ,"prescale_D0to3piRS" : 1.0
+            ,"prescale_D0to3piWS" : 0.2
+            ,"prescale_D0toK2piRS" : 1.0
+            ,"prescale_D0toK2piWS" : 0.2 
+            #### common to all modes
+            ,"GEC_nLongTrk" : 250. # adimensional
+            ,"GHOSTPROB_MAX" : 0.35 #adimensional
+            ,"Mu_PT" : 800. # MeV
+            ,"H_PT"  : 250. # MeV
+            ,"Pi_PIDKMax" : 6. # adimensional
+            ,"K_PIDKMin"  : 6. # adimensional
+            ,"Slowpi_PIDKMax" : 10. # adimensional
+            ,"Slowpi_PIDeMax" : 99. # adimensional
+            ,"Slowpi_PTMin"   : 200. # MeV
+            ##### specific to D0 modes
+            ,"MuPi_SUMPT_MIN" : 1300. # MeV
+            ,"MuPi_DOCACHI2_MAX" : 8.0 # adimensional
+            ,"MuPi_CHI2NDOF_MAX" : 3.0 # adimensional
+            ,"MuPi_DIRA_MIN" : -99. # adimensional
+            ,"MuPi_FDCHI2_MIN" : 20. # adimensional
+            ,"D0to3H_REQUIRE_TOS" : True # bool
+            ,"D0to3H_DOCACHI2_MAX" : 10. # adimensional
+            ,"D0to3H_VCHI2NDF_MAX" : 3.0 # adimensional
+            ,"D0to3H_SUMPT_MIN" : 1800. # MeV
+            ,"D0to3H_DZ" : 2.0 # mm
+            ,"D0to3H_3pi_DeltaMass_MAX" : 350. # MeV
+            ,"D0to3H_K2pi_DeltaMass_MAX" : 250. # MeV
+            ,"D0to3H_3pi_MASS_MIN" : 900. # MeV
+            ,"D0to3H_3pi_MASS_MAX" : 1400. # MeV
+            ,"D0to3H_K2pi_MASS_MIN" : 1300. # MeV
+            ,"D0to3H_K2pi_MASS_MAX" : 1800. # MeV
+            ,"D0to3H_B_MASS_MIN" : 1800. # MeV
+            ,"D0to3H_B_MASS_MAX" : 4900. # MeV
+            ,"D0to3H_B_DIRA_MIN" : 0.99 # adimensional
+            ,"D0to3H_B_VCHI2NDF_MAX" : 15. # adimensional
+            ,"D0to3H_B_DOCACHI2_MAX" : 50. # adimensional
+            #### specific to Lambda_c+ modes
+            ,"PiPi_MASS_MAX" : 500.  # MeV
+            ,"PiPi_DOCACHI2_MAX" : 15. # adimensional
+            ,"PiPi_CHI2NDF" : 3. # adimensional
+            ,"PiPi_SUMPT_MIN" : 600.  # MeV
+            ,"MuPiPi_DOCACHI2_MAX" : 15. 
+            ,"MuPiPi_CHI2NDF": 3.
+            ,"MuPiPi_FDCHI2_MIN" : 20. # adimensional
+            ,"Lc2Kpi_REQUIRE_TOS" : True # bool
+            ,"Lc2Kpi_DOCACHI2_MAX" : 10. # adimensional
+            ,"Lc2Kpi_VCHI2NDF_MAX" : 3.0 # adimensional
+            ,"Lc2Kpi_SUMPT_MIN" : 1500.  # MeV
+            ,"Lc2Kpi_FDCHI2_MIN" : 20. # adimensional
+            ,"Lc2Kpi_MASS_MIN" : 800.  # MeV
+            ,"Lc2Kpi_MASS_MAX" : 1350. # MeV
+            ,"Lc2Kpi_DeltaMass_MAX" : 700. # MeV
+            ,"Lc2Kpi_DZ" : 1.0 # mm
+            ,"Lc2Kpi_B_MASS_MIN" : 2200. # MeV
+            ,"Lc2Kpi_B_MASS_MAX" : 4300. # MeV
+            ,"Lc2Kpi_B_FDCHI2_MIN" : 20. # adimensional
+            ,"Lc2Kpi_B_DIRA_MIN" : 0.99 # adimensional
+            ,"Lc2Kpi_B_DOCACHI2_MAX" : 50. # adimensional
+            ,"Lc2Kpi_B_VCHI2NDF_MAX" : 15. # adimensional
+            },
+        'STREAMS'     : ["CharmCompleteEvent"]
+}
+
+class CharmFromBSemiForHadronAsyAllLinesConf(LineBuilder) :
+    """
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    __confdict__={}
+    
+    def __init__(self, _name, config) :
+
+        LineBuilder.__init__(self, _name, config)
+        self.__confdict__=config
+        
+        ### define the global event cuts
+        ### max number of long tracks
+        GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" %config ,
+                 "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        ### define the muon cuts
+        self.MuonCuts = "(PT > %(Mu_PT)s *MeV) & (TRGHOSTPROB < %(GHOSTPROB_MAX)s) & (PIDmu > 0)" %config
+        self.PionCuts = "(PT > %(H_PT)s *MeV) & (TRGHOSTPROB < %(GHOSTPROB_MAX)s) & (PIDK < %(Pi_PIDKMax)s)" %config 
+        self.KaonCuts = "(PT > %(H_PT)s *MeV) & (TRGHOSTPROB < %(GHOSTPROB_MAX)s) & (PIDK > %(K_PIDKMin)s)" %config 
+        self.SlowpionCuts = "(PT > %(Slowpi_PTMin)s*MeV) & (TRGHOSTPROB < %(GHOSTPROB_MAX)s) & (PIDe < %(Slowpi_PIDeMax)s)"\
+                          "& (PIDK < %(Slowpi_PIDKMax)s)" %config
+        
+        self.Muons = Selection( "Mufor" + _name,
+                                Algorithm = FilterDesktop(name = "MuFilterFor"+_name, Code = self.MuonCuts ),
+                                RequiredSelections = [StdLooseMuons])
+        
+        self.Pions = Selection( "Pifor" + _name,
+                                Algorithm = FilterDesktop(name = "PiFilterFor"+_name, Code = self.PionCuts),
+                                RequiredSelections = [StdLoosePions])
+
+        self.Kaons = Selection( "Kfor" + _name,
+                                Algorithm = FilterDesktop(name = "KFilterFor"+_name, Code = self.KaonCuts),
+                                RequiredSelections = [StdLooseKaons])
+
+        self.Slowpions = Selection( "Slowpifor" + _name,
+                                    Algorithm = FilterDesktop(name = "SlowpiFilterFor"+_name, Code = self.SlowpionCuts),
+                                    RequiredSelections = [StdLoosePions])
+        #### D0 -> K3pi lines
+        
+        self.D0to3pi_RS = D0To3HMaker("D0To3piRSFor"+_name
+                                      ,config["D0to3H_3pi_MASS_MIN"],config["D0to3H_3pi_MASS_MAX"]
+                                      ,config
+                                      ,[self.Pions]
+                                      ,['[D0 -> pi+ pi- pi+]cc'])
+
+        self.D0to3pi_WS = D0To3HMaker("D0To3piWSFor"+_name
+                                      ,config["D0to3H_3pi_MASS_MIN"],config["D0to3H_3pi_MASS_MAX"]
+                                      ,config
+                                      ,[self.Pions]
+                                      ,['[D0 -> pi+ pi- pi+]cc','[D0 -> pi+ pi+ pi+]cc'])
+        
+        self.D0toK2pi_RS = D0To3HMaker("D0ToK2piRSFor"+_name
+                                       ,config["D0to3H_K2pi_MASS_MIN"],config["D0to3H_K2pi_MASS_MAX"]
+                                       ,config,[self.Kaons,self.Pions]
+                                       ,['[D0 -> K- pi+ pi-]cc','[D0 -> K- pi+ pi+]cc'])
+
+        self.D0toK2pi_WS = D0To3HMaker("D0ToK2piWSFor"+_name
+                                       ,config["D0to3H_K2pi_MASS_MIN"],config["D0to3H_K2pi_MASS_MAX"]
+                                       ,config,[self.Kaons,self.Pions]
+                                       ,['[D0 -> K- pi+ pi-]cc',
+                                         '[D0 -> K- pi+ pi+]cc',
+                                         '[D0 -> K- pi- pi-]cc',
+                                         '[D0 -> K+ pi+ pi-]cc',
+                                         '[D0 -> K+ pi+ pi+]cc',
+                                         '[D0 -> K+ pi- pi-]cc'])
+
+        self.MuPi_RS = MuPiMaker("MuPiRSFor"+_name
+                                 ,config
+                                 ,[self.Muons,self.Slowpions]
+                                 ,['[K*(892)+ -> mu+ pi-]cc'])
+
+        self.MuPi_WS = MuPiMaker("MuPiWSFor"+_name
+                                 ,config
+                                 ,[self.Muons,self.Slowpions]
+                                 ,['[K*(892)+ -> mu+ pi-]cc',
+                                   '[K*(892)+ -> mu- pi+]cc',
+                                   '[K*(892)+ -> mu+ pi+]cc',
+                                   '[K*(892)+ -> mu- pi-]cc'])
+
+        self.BtoDstarMuD0to3pi_RS = BtoDstarMuMaker("BtoDstarMuD0to3pi_RSFor"+_name
+                                                    ,config["D0to3H_3pi_DeltaMass_MAX"]
+                                                    ,config
+                                                    ,[self.MuPi_RS,self.D0to3pi_RS]
+                                                    ,['[B0 -> D~0 K*(892)+]cc'])
+
+        self.BtoDstarMuD0to3pi_WS = BtoDstarMuMaker("BtoDstarMuD0to3pi_WSFor"+_name
+                                                    ,config["D0to3H_3pi_DeltaMass_MAX"]
+                                                    ,config
+                                                    ,[self.MuPi_WS,self.D0to3pi_WS]
+                                                    ,['[B0 -> D~0 K*(892)+]cc'])
+        
+        self.BtoDstarMuD0toK2pi_RS = BtoDstarMuMaker("BtoDstarMuD0toK2pi_RSFor"+_name
+                                                     ,config["D0to3H_K2pi_DeltaMass_MAX"]
+                                                     ,config
+                                                     ,[self.MuPi_RS,self.D0toK2pi_RS]
+                                                     ,['[B0 -> D~0 K*(892)+]cc'])
+
+        self.BtoDstarMuD0toK2pi_WS = BtoDstarMuMaker("BtoDstarMuD0toK2pi_WSFor"+_name
+                                                     ,config["D0to3H_K2pi_DeltaMass_MAX"]
+                                                     ,config
+                                                     ,[self.MuPi_WS,self.D0toK2pi_WS]
+                                                     ,['[B0 -> D~0 K*(892)+]cc'])
+        
+        self.B2DstarMuD0to3piRSLine = StrippingLine(_name+'_B2DstarMuD0to3piRS',
+                                                    prescale = config["prescale_D0to3piRS"],
+                                                    FILTER=GECs,
+                                                    selection = self.BtoDstarMuD0to3pi_RS)
+
+        self.B2DstarMuD0to3piWSLine = StrippingLine(_name+'_B2DstarMuD0to3piWS',
+                                                    prescale = config["prescale_D0to3piWS"],
+                                                    FILTER=GECs,
+                                                    selection = self.BtoDstarMuD0to3pi_WS)
+        
+        self.B2DstarMuD0toK2piRSLine = StrippingLine(_name+'_B2DstarMuD0toK2piRS',
+                                                    prescale = config["prescale_D0toK2piRS"],
+                                                    FILTER=GECs,
+                                                    selection = self.BtoDstarMuD0toK2pi_RS)
+
+        self.B2DstarMuD0toK2piWSLine = StrippingLine(_name+'_B2DstarMuD0toK2piWS',
+                                                    prescale = config["prescale_D0toK2piWS"],
+                                                    FILTER=GECs,
+                                                    selection = self.BtoDstarMuD0toK2pi_WS)
+        
+        
+        ###################### Lambda_c lines ##########################
+        
+        self.LcToKpi_RS = LcToKpiMaker("LcToKpiRSFor"+_name,config,[self.Kaons,self.Pions],['[Lambda_c+ -> K- pi+]cc'])
+        self.LcToKpi_WS = LcToKpiMaker("LcToKpiWSFor"+_name,config,[self.Kaons,self.Pions],
+                                        ['[Lambda_c+ -> K- pi+]cc','[Lambda_c+ -> K+ pi-]cc','[Lambda_c+ -> K+ pi+]cc','[Lambda_c+ -> K- pi-]cc'])
+        
+        self.PiPi_RS = PiPiMaker("PiPiRSFor"+_name,config,[self.Slowpions],['rho(770)0 -> pi+ pi-'])
+        self.PiPi_WS = PiPiMaker("PiPiWSFor"+_name,config,[self.Slowpions],['rho(770)0 -> pi+ pi-','rho(770)0 -> pi+ pi+','rho(770)0 -> pi- pi-'])
+
+        self.MuPiPi_RS = MuPiPiMaker("MuPiPiRSFor"+_name,config,[self.Muons,self.PiPi_RS],['[K*(892)+ -> mu+ rho(770)0]cc'])
+        self.MuPiPi_WS = MuPiPiMaker("MuPiPiWSFor"+_name,config,[self.Muons,self.PiPi_WS],['[K*(892)+ -> mu+ rho(770)0]cc',
+                                                                                           '[K*(892)+ -> mu- rho(770)0]cc'])
+
+        self.Lb_RS = LbMaker("LbRSFor"+_name,config,[self.MuPiPi_RS,self.LcToKpi_RS],['[Lambda_b0 -> Lambda_c+ K*(892)-]cc'])
+        self.Lb_WS = LbMaker("LbWSFor"+_name,config,[self.MuPiPi_WS,self.LcToKpi_WS],['[Lambda_b0 -> Lambda_c+ K*(892)-]cc'])
+
+        self.LbRSLine = StrippingLine(_name+'_LbToLcStarMuLcToKpiRS',
+                                      prescale = config["prescale_LbRS"],
+                                      FILTER=GECs,
+                                      selection = self.Lb_RS)
+        
+        self.LbWSLine = StrippingLine(_name+'_LbToLcStarMuLcToKpiWS',
+                                      prescale = config["prescale_LbWS"],
+                                      FILTER=GECs,
+                                       selection = self.Lb_WS)
+
+        ######## register lines 
+        
+        self.registerLine(self.B2DstarMuD0to3piRSLine)        
+        self.registerLine(self.B2DstarMuD0to3piWSLine)        
+        self.registerLine(self.B2DstarMuD0toK2piRSLine)        
+        self.registerLine(self.B2DstarMuD0toK2piWSLine)        
+        self.registerLine(self.LbRSLine)        
+        self.registerLine(self.LbWSLine)        
+        
+def MuPiMaker(_combName,config,_RequiredSelections,_decayDescriptors):
+    _CombinationCut = "(ACHILD(PT,1)+ACHILD(PT,2) > %(MuPi_SUMPT_MIN)s *MeV)"\
+                      "& (ADOCACHI2CUT(%(MuPi_DOCACHI2_MAX)s, ''))" %config
+    _MotherCut = "(VFASPF(VCHI2/VDOF) < %(MuPi_CHI2NDOF_MAX)s)"\
+                 "& (BPVDIRA> %(MuPi_DIRA_MIN)s)"\
+                 "& (BPVVDCHI2 > %(MuPi_FDCHI2_MIN)s)" %config
+    _comb = CombineParticles( name = "Comb"+_combName,
+                              DecayDescriptors = _decayDescriptors,
+                              CombinationCut = _CombinationCut,
+                              MotherCut = _MotherCut)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = _comb,
+                    RequiredSelections = _RequiredSelections)
+    return sel
+
+def BtoDstarMuMaker(_combName,DeltaMass_MAX,config,_RequiredSelections,_decayDescriptors):
+    preambulo = ['PXD0 = ACHILD(PX,1)',
+                 'PYD0 = ACHILD(PY,1)',
+                 'PZD0 = ACHILD(PZ,1)',
+                 'ED0  = ACHILD(E,1)',
+                 'PXPI = ACHILD(CHILD(PX,2),2)',
+                 'PYPI = ACHILD(CHILD(PY,2),2)',
+                 'PZPI = ACHILD(CHILD(PZ,2),2)',
+                 'EPI  = ACHILD(CHILD(E,2),2)',
+                 'MD0PI = sqrt((EPI+ED0)**2 - (PXPI+PXD0)**2 - (PYPI+PYD0)**2 - (PZPI+PZD0)**2)',
+                 'DELTA_MASS = MD0PI - ACHILD(M,1)']
+    _CombinationCut = "(DELTA_MASS < %s *MeV)" %DeltaMass_MAX
+    _CombinationCut += "& (ADOCACHI2CUT(%(D0to3H_B_DOCACHI2_MAX)s, ''))" %config 
+    _MotherCut = "(M > %(D0to3H_B_MASS_MIN)s *MeV) & (M < %(D0to3H_B_MASS_MAX)s *MeV)"\
+                 "& (MINTREE((ABSID=='D0'),VFASPF(VZ)) - MINTREE((ABSID=='K*(892)+'),VFASPF(VZ)) > %(D0to3H_DZ)s *mm )"\
+                 "& (VFASPF(VCHI2/VDOF) < %(D0to3H_B_VCHI2NDF_MAX)s)"\
+                 "& (BPVDIRA> %(D0to3H_B_DIRA_MIN)s)" %config
+    _comb = CombineParticles( name = "Comb"+_combName,
+                              Preambulo = preambulo,
+                              DecayDescriptors = _decayDescriptors,
+                              CombinationCut = _CombinationCut,
+                              MotherCut = _MotherCut)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = _comb,
+                    RequiredSelections = _RequiredSelections)
+    if config["D0to3H_REQUIRE_TOS"] == True:
+        sel_Hlt1TOS = TOSFilter( "Sel"+_combName+"_Hlt1TOS"
+                                 ,sel
+                                 ,"Hlt1.*Decision%TOS")
+        sel_Hlt2TOS = TOSFilter( "Sel"+_combName+"_Hlt2TOS"
+                                 ,sel_Hlt1TOS
+                                 ,"Hlt2.*Decision%TOS")
+        return sel_Hlt2TOS
+    else:
+        return sel
+
+def D0To3HMaker(_combName,MASS_MIN,MASS_MAX,config,_RequiredSelections,_decayDescriptors):
+    _CombinationCut = "(AM+10 > %s *MeV) & (AM-10 < %s *MeV)" %(MASS_MIN,MASS_MAX)
+    _CombinationCut = _CombinationCut + "& (ADOCACHI2CUT(%(D0to3H_DOCACHI2_MAX)s, ''))"\
+                      "& (ACHILD(PT,1) + ACHILD(PT,2) + ACHILD(PT,3) > %(D0to3H_SUMPT_MIN)s)" %config
+    ### different mass cut depending on whether we miss a pion or a kaon
+    _MotherCut = "(M > %s *MeV) & (M < %s *MeV)" %(MASS_MIN,MASS_MAX)
+    _MotherCut = _MotherCut + "& (VFASPF(VCHI2/VDOF)< %(D0to3H_VCHI2NDF_MAX)s)" %config 
+    _comb = CombineParticles( name = "Comb"+_combName,
+                              DecayDescriptors = _decayDescriptors,
+                              CombinationCut = _CombinationCut,
+                              MotherCut = _MotherCut)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = _comb,
+                    RequiredSelections = _RequiredSelections)
+    return sel
+
+
+
+def PiPiMaker(_combName,config,_RequiredSelections,_decayDescriptors):
+    comb = CombineParticles(name="Comb"+_combName,
+                            DecayDescriptors = _decayDescriptors, 
+                            CombinationCut = "(AM < %(PiPi_MASS_MAX)s*MeV)"\
+                            "& (ACUTDOCACHI2(%(PiPi_DOCACHI2_MAX)s,''))"\
+                            "& (ACHILD(PT,1) + ACHILD(PT,2) > %(PiPi_SUMPT_MIN)s *MeV)" % config, 
+                            MotherCut = "(VFASPF(VCHI2/VDOF)< %(PiPi_CHI2NDF)s)" % config)        
+    sel = Selection("Sel"+_combName,
+                    Algorithm = comb,
+                    RequiredSelections = _RequiredSelections)
+    return sel
+
+def MuPiPiMaker(_combName,config,_RequiredSelections,_decayDescriptors):
+    comb = CombineParticles(name="Comb"+_combName,
+                            DecayDescriptors = _decayDescriptors, 
+                            CombinationCut = "(ACUTDOCACHI2(%(MuPiPi_DOCACHI2_MAX)s,''))" % config,
+                            MotherCut = "(VFASPF(VCHI2/VDOF)< %(MuPiPi_CHI2NDF)s)"\
+                            "& (BPVVDCHI2 > %(MuPiPi_FDCHI2_MIN)s)" %config)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = comb,
+                    RequiredSelections = _RequiredSelections)
+    return sel
+
+def LcToKpiMaker(_combName,config,_RequiredSelections,_decayDescriptors):
+    ### Cuts on the Kpi combination
+    ### sumpt, mass and docachi2 cuts
+    _CombinationCut = "(ACHILD(PT,1)+ACHILD(PT,2) > %(Lc2Kpi_SUMPT_MIN)s *MeV)"\
+                      "& (AM+10 > %(Lc2Kpi_MASS_MIN)s *MeV)"\
+                      "& (AM-10 < %(Lc2Kpi_MASS_MAX)s *MeV)"\
+                      "& (ADOCACHI2CUT(%(Lc2Kpi_DOCACHI2_MAX)s, ''))" % config
+    ### mass, vertex quality and FD cuts
+    _MotherCut = "(M > %(Lc2Kpi_MASS_MIN)s *MeV)"\
+                 "& (M < %(Lc2Kpi_MASS_MAX)s *MeV)"\
+                 "& (VFASPF(VCHI2/VDOF)< %(Lc2Kpi_VCHI2NDF_MAX)s)"\
+                 "& (BPVVDCHI2 > %(Lc2Kpi_FDCHI2_MIN)s)" % config
+    _comb = CombineParticles( name = "Comb"+_combName,
+                              DecayDescriptors = _decayDescriptors,
+                              CombinationCut = _CombinationCut,
+                              MotherCut = _MotherCut)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = _comb,
+                    RequiredSelections = _RequiredSelections)
+    return sel
+
+def LbMaker(_combName,config,_RequiredSelections,_decayDescriptors):
+    preambulo = ['PXLC = ACHILD(PX,1)',
+                 'PYLC = ACHILD(PY,1)',
+                 'PZLC = ACHILD(PZ,1)',
+                 'ELC  = ACHILD(E,1)',
+                 'PXPIPI = ACHILD(CHILD(PX,2),2)',
+                 'PYPIPI = ACHILD(CHILD(PY,2),2)',
+                 'PZPIPI = ACHILD(CHILD(PZ,2),2)',
+                 'EPIPI = ACHILD(CHILD(E,2),2)',
+                 'MLCPIPI = sqrt((EPIPI+ELC)**2 - (PXPIPI+PXLC)**2 - (PYPIPI+PYLC)**2 - (PZPIPI+PZLC)**2)',
+                 'DELTA_MASS_LC = MLCPIPI - ACHILD(M,1)']
+    comb = CombineParticles(name="Comb"+_combName,
+                            DecayDescriptors = _decayDescriptors,
+                            Preambulo = preambulo,
+                            CombinationCut = "(DELTA_MASS_LC < %(Lc2Kpi_DeltaMass_MAX)s *MeV)"\
+                            "& (AM > %(Lc2Kpi_B_MASS_MIN)s *MeV)  & (AM < %(Lc2Kpi_B_MASS_MAX)s *MeV)"\
+                            "& (ACUTDOCACHI2(%(Lc2Kpi_B_DOCACHI2_MAX)s,''))" % config,
+                            MotherCut = "(M > %(Lc2Kpi_B_MASS_MIN)s  *MeV) & (M < %(Lc2Kpi_B_MASS_MAX)s  *MeV)"\
+                            "& (MINTREE((ABSID=='Lambda_c+'),VFASPF(VZ)) - MINTREE((ABSID=='K*(892)-'),VFASPF(VZ)) > %(Lc2Kpi_DZ)s *mm )"\
+                            "& (VFASPF(VCHI2/VDOF) < %(Lc2Kpi_B_VCHI2NDF_MAX)s)"
+                            "& (BPVDIRA> %(Lc2Kpi_B_DIRA_MIN)s)"\
+                            "& (BPVVDCHI2 > %(Lc2Kpi_B_FDCHI2_MIN)s)" %config)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = comb,
+                    RequiredSelections = _RequiredSelections)
+    if config["Lc2Kpi_REQUIRE_TOS"] == True:
+        sel_Hlt1TOS = TOSFilter( "Sel"+_combName+"_Hlt1TOS"
+                                 ,sel
+                                 ,"Hlt1.*Decision%TOS")
+        sel_Hlt2TOS = TOSFilter( "Sel"+_combName+"_Hlt2TOS"
+                                 ,sel_Hlt1TOS
+                                 ,"Hlt2.*Decision%TOS")
+        return sel_Hlt2TOS
+    else:
+        return sel
+        
+def TOSFilter( name, _input, _trigger ) :
+    from Configurables import TisTosParticleTagger
+    _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+    _tisTosFilter.TisTosSpecs = { _trigger : 0 }
+    return Selection( name
+                      , Algorithm = _tisTosFilter
+                      , RequiredSelections = [ _input ]
+                      )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingCharmFromBSemiForProtonPID.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingCharmFromBSemiForProtonPID.py
new file mode 100644
index 000000000..d6f2788bb
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingCharmFromBSemiForProtonPID.py
@@ -0,0 +1,129 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Select a Lambda_c -> pKpi signal without a PID
+requirement on the proton.
+Lambda_c has a muon tag, i.e.,
+Lambda_b0 -> Lambda_c- mu+.
+"""
+__author__ = ['Mika Vesterinen']
+__date__ = '19/03/2013'
+__version__ = '$Revision: 0.0 $'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseKaons, StdLooseProtons, StdNoPIDsProtons
+
+__all__ = ('CharmFromBSemiForProtonPIDAllLinesConf',
+           'default_config')
+
+default_config = {
+    'NAME'        : 'CharmFromBSemiForProtonPID',
+    'WGs'         : ['ALL'],
+    'BUILDERTYPE' : 'CharmFromBSemiForProtonPIDAllLinesConf',
+    'CONFIG'      : {
+        "prescale"              : 1 # adimensional
+        ,"GEC_nLongTrk"         : 250 # adimensional
+        ,"MAXGHOSTPROB"         : 0.35 # adimensional
+        ,"Mu_PT"                : 1000 # MeV
+        ,"Pi_PIDKMax"           : -2 # adimensional
+        ,"K_PIDKMin"            : 8 # adimensional
+        ,"H_PT"                 : 300 # MeV
+        ,"LambdaC_MASSWIN"      : 80 # MeV
+        ,"LambdaC_PTSUM"        : 2000 # MeV
+        ,"LambdaC_DOCACHI2_MAX" : 6 # adimensional
+        ,"LambdaC_VCHI2NDF"     : 3 # adimensional
+        ,"LambdaC_FDCHI2"       : 20 # adimensional
+        ,"LambdaC_DIRA"         : 0.99 # adimensional
+        ,"LambdaC_DZ"           : 0.5 # mm
+        ,"LambdaB_MASS_MIN"     : 3000 # MeV
+        ,"LambdaB_MASS_MAX"     : 5000 # MeV
+        ,"LambdaB_DOCACHI2_MAX" : 6 # adimensional
+        ,"LambdaB_DIRA"         : 0.999 # adimensional
+        ,"LambdaB_VCHI2NDF"     : 3 # adimentional
+        },
+    "STREAMS":["PID"]
+}
+        
+class CharmFromBSemiForProtonPIDAllLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+        
+    def __init__(self, _name, config) :
+
+        LineBuilder.__init__(self, _name, config)
+        self.__confdict__=config
+
+        #### define the cuts for the Lambda_b0 daughter tracks
+        self.MuonCuts = "(TRGHOSTPROB < %(MAXGHOSTPROB)s) & (PIDmu > 0) & (PT > %(Mu_PT)s *MeV)" % self.__confdict__
+        self.PionCuts = "(TRGHOSTPROB < %(MAXGHOSTPROB)s) & (PIDK < %(Pi_PIDKMax)s) & (PT > %(H_PT)s *MeV)" % self.__confdict__ 
+        self.KaonCuts = "(TRGHOSTPROB < %(MAXGHOSTPROB)s) & (PIDK > %(K_PIDKMin)s) & (PT > %(H_PT)s *MeV)" % self.__confdict__ 
+        self.ProtonCuts = "(TRGHOSTPROB < %(MAXGHOSTPROB)s) & (PT > %(H_PT)s *MeV)" % self.__confdict__
+
+        #### Define the combination cuts 
+        self.LambdaC_CombinationCut = "(ADAMASS('Lambda_c+') < %(LambdaC_MASSWIN)s *MeV)"\
+                              "& (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > %(LambdaC_PTSUM)s *MeV)"\
+                              "& (ADOCACHI2CUT(%(LambdaC_DOCACHI2_MAX)s, ''))" % self.__confdict__
+
+        self.LambdaC_MotherCut = "(ADMASS('Lambda_c+') < %(LambdaC_MASSWIN)s *MeV)"\
+                                 "& (VFASPF(VCHI2/VDOF) < %(LambdaC_VCHI2NDF)s) " \
+                                 "& (BPVVDCHI2 > %(LambdaC_FDCHI2)s)"\
+                                 "& (BPVDIRA> %(LambdaC_DIRA)s)" % self.__confdict__ 
+
+        self.LambdaB_CombinationCut = "(AM > %(LambdaB_MASS_MIN)s *MeV)"\
+                                      "& (AM < %(LambdaB_MASS_MAX)s *MeV)"\
+                                      "& (ADOCACHI2CUT(%(LambdaB_DOCACHI2_MAX)s, ''))" % self.__confdict__ 
+
+        self.LambdaB_MotherCut = "( MINTREE((ABSID=='Lambda_c+'),VFASPF(VZ)) - VFASPF(VZ) > %(LambdaC_DZ)s *mm )"\
+                                 "& (BPVDIRA> %(LambdaB_DIRA)s)"\
+                                 "& (VFASPF(VCHI2/VDOF) < %(LambdaB_VCHI2NDF)s)" % self.__confdict__ 
+
+        #### make the Lambda_c -> p K pi 
+        
+        self.comb_Lc2PKPi = CombineParticles(DecayDescriptors = ['[Lambda_c+ -> p+ K- pi+]cc'],
+                                             DaughtersCuts = { "pi+" : self.PionCuts,
+                                                               "K-"  : self.KaonCuts,
+                                                               "p+"  : self.ProtonCuts},
+                                             CombinationCut = self.LambdaC_CombinationCut,
+                                             MotherCut = self.LambdaC_MotherCut)
+        
+        self.sel_Lc2PKPi = Selection(name="SelLc2PKPiFor"+_name,
+                                     Algorithm = self.comb_Lc2PKPi,
+                                     RequiredSelections = [StdLoosePions,StdLooseKaons,StdNoPIDsProtons])
+
+        #### combine the Lambda_c -> p K pi with a muon
+        
+        self.comb_Lb2LcMuNu = CombineParticles(DecayDescriptor = '[Lambda_b0 -> Lambda_c+ mu-]cc',
+                                               DaughtersCuts = {"mu-" : self.MuonCuts},
+                                               CombinationCut = self.LambdaB_CombinationCut,
+                                               MotherCut = self.LambdaB_MotherCut)
+                                               
+        self.sel_Lb2LcMuNu = Selection(name="sel_Lb2LcMuNu"+_name,
+                                       Algorithm = self.comb_Lb2LcMuNu,
+                                       RequiredSelections = [self.sel_Lc2PKPi,StdLooseMuons])
+
+        #### define the GECs
+        GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s)" % self.__confdict__ ,
+                 "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        #### make the line
+        self.StrippingLine = StrippingLine(_name+'_LbToLcMuNuLcToPKPi',
+                                           prescale = config['prescale'],
+                                           FILTER=GECs,
+                                           selection = self.sel_Lb2LcMuNu)
+        self.registerLine(self.StrippingLine)
+
+## the end
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0.py
new file mode 100644
index 000000000..7f696004e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0.py
@@ -0,0 +1,150 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Regis Lefevre'
+__date__ = '16/07/2014'
+__version__ = '$Revision: 1.6 $'
+
+'''
+Stripping selection for D0 -> K pi pi0 
+'''
+####################################################################
+# Stripping selection for D0 -> K pi pi0 
+#  2 lines : one for merged, one for resolved pi0
+####################################################################
+
+__all__ = ('StrippingD02KPiPi0Conf',
+           'makeD02KPiPi0R',
+           'makeD02KPiPi0M',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdTightPions,StdTightKaons,StdLooseMergedPi0,StdLooseResolvedPi0
+
+default_config = {
+    'NAME'        : 'D02KPiPi0',
+    'WGs'         : ['ALL'],
+    'BUILDERTYPE' : 'StrippingD02KPiPi0Conf',
+    'CONFIG'      : {   'TrackMinPT_M'         : 300       # MeV
+                       ,'TrackMinPT_R'         : 600       # MeV
+                       ,'TrackMinTrackProb'    : 0.000001  # unitless
+                       ,'TrackMaxGhostProb'    : 0.3       # unitless
+                       ,'TrackMinIPChi2'       : 16        # unitless
+                       ,'Pi0MinPT_M'           : 2000      # MeV
+                       ,'Pi0MinPT_R'           : 1000      # MeV
+                       ,'ResPi0MinGamCL'       : 0.2       # unitless
+                       ,'D0MinM'               : 1600      # MeV
+                       ,'D0MaxM'               : 2100      # MeV
+                       ,'D0MinVtxProb'         : 0.001     # unitless
+                       ,'D0MaxIPChi2'          : 9         # unitless
+                       ,'D0MinDIRA'            : 0.9999    # unitless
+                       ,'D0MinVVDChi2'         : 64        # unitless
+                       ,'MergedLinePrescale'   : 0.5       # unitless
+                       ,'MergedLinePostscale'  : 1.        # unitless
+                       ,'ResolvedLinePrescale' : 0.5       # unitless
+                       ,'ResolvedLinePostscale': 1.        # unitless
+                      },
+    'STREAMS'     : ['CharmCompleteEvent']
+    }
+
+class StrippingD02KPiPi0Conf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        myPions       = StdTightPions
+        myKaons       = StdTightKaons
+        myMergedPi0   = StdLooseMergedPi0
+        myResolvedPi0 = StdLooseResolvedPi0
+
+        #---------------------------------------
+        # B -> HHPi0 selections
+        self.selresolved = makeD02KPiPi0R( name + 'R',
+                                           config,
+                                           DecayDescriptor = '[D0 -> K- pi+ pi0]cc',
+                                           inputSel = [myKaons, myPions, myResolvedPi0]
+                                           )
+        self.selmerged = makeD02KPiPi0M( name + 'M',
+                                         config,
+                                         DecayDescriptor = '[D0 -> K- pi+ pi0]cc',
+                                         inputSel = [myKaons, myPions, myMergedPi0]
+                                         )
+        #---------------------------------------
+        # Stripping lines
+        self.D02KPiPi0R_line = StrippingLine(name + "_R" %locals()['config'],
+                                             prescale = config['ResolvedLinePrescale'],
+                                             postscale = config['ResolvedLinePostscale'],
+                                             RequiredRawEvents = ["Calo"],
+                                             selection = self.selresolved
+                                             )
+        self.D02KPiPi0M_line = StrippingLine(name + "_M" %locals()['config'],
+                                             prescale = config['MergedLinePrescale'],
+                                             postscale = config['MergedLinePostscale'],
+                                             RequiredRawEvents = ["Calo"],
+                                             selection = self.selmerged
+                                             )
+        # register lines
+        self.registerLine(self.D02KPiPi0R_line)
+        self.registerLine(self.D02KPiPi0M_line)
+
+##############################################################
+def makeD02KPiPi0R( name,
+                  config,
+                  DecayDescriptor,
+                  inputSel
+                  ) :
+
+    _TrackCuts    = "(PT>%(TrackMinPT_R)s *MeV) & (TRPCHI2>%(TrackMinTrackProb)s) & (TRGHOSTPROB<%(TrackMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPChi2)s)" %locals()['config']    
+    _pi0Cuts      = "(PT>%(Pi0MinPT_R)s *MeV) & (CHILD(CL,1)>%(ResPi0MinGamCL)s) & (CHILD(CL,2)>%(ResPi0MinGamCL)s)" %locals()['config']
+    _daughterCuts = { 'K-' : _TrackCuts, 'pi+' : _TrackCuts, 'pi0' : _pi0Cuts }
+    _combCuts     = "(AM>%(D0MinM)s *MeV) & (AM<%(D0MaxM)s *MeV)" % locals()['config']
+    _motherCuts   = "(VFASPF(VPCHI2)>%(D0MinVtxProb)s) & (BPVVDCHI2>%(D0MinVVDChi2)s) & (BPVIPCHI2()<%(D0MaxIPChi2)s) & (BPVDIRA>%(D0MinDIRA)s)" % locals()['config']
+
+    _D = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _D,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
+def makeD02KPiPi0M( name,
+                  config,
+                  DecayDescriptor,
+                  inputSel
+                  ) :
+
+    _TrackCuts    = "(PT>%(TrackMinPT_M)s *MeV) & (TRPCHI2>%(TrackMinTrackProb)s) & (TRGHOSTPROB<%(TrackMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPChi2)s)" %locals()['config']    
+    _pi0Cuts      = "(PT>%(Pi0MinPT_M)s *MeV)" %locals()['config']
+    _daughterCuts = { 'K-' : _TrackCuts, 'pi+' : _TrackCuts, 'pi0' : _pi0Cuts }
+    _combCuts     = "(AM>%(D0MinM)s *MeV) & (AM<%(D0MaxM)s *MeV)" % locals()['config']
+    _motherCuts   = "(VFASPF(VPCHI2)>%(D0MinVtxProb)s) & (BPVVDCHI2>%(D0MinVVDChi2)s) & (BPVIPCHI2()<%(D0MaxIPChi2)s) & (BPVDIRA>%(D0MinDIRA)s)" % locals()['config']
+
+    _D = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _D,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0DalitzPartReco.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0DalitzPartReco.py
new file mode 100644
index 000000000..c94a21506
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0DalitzPartReco.py
@@ -0,0 +1,241 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Greg Ciezarek','Liang Sun','Adam Davis']
+__date__ = '18/05/2017'
+__version__ = '$Revision: 0.01 $'
+
+'''
+D* -> D0 pis, D0 -> K- pi+ pi0, pi0 -> e e gamma, photon and one electron unreconstructed 
+'''
+# =============================================================================
+##
+# D* -> D0 pis, D0 -> K- pi+ pi0, pi0 -> e e gamma, photon and one electron unreconstructed
+#
+
+"""
+Stripping lines for  
+
+Last modification $Date: 18/05/2017 $
+               by $Author: gciezare$
+"""
+__all__ = ('D2KPiPi0_PartRecoBuilder',
+           'TOSFilter',
+           'default_config')
+
+default_config = {
+    'D2KPiPi0_PartReco' : {
+        'WGs'         : ['ALL'],
+        'BUILDERTYPE' : 'D2KPiPi0_PartRecoBuilder',
+        'CONFIG'      :  {
+            "KLepMassLow"     : 500  , #MeV
+            "KLepMassHigh"    : 2500 , #MeV
+            "DELTA_MASS_MAX"  : 190  , #MeV
+            "TRGHOSTPROB"     : 0.35 ,#adimensional
+            "ElectronPIDe"    : 5.  ,
+            "ElectronPT"      : 000  ,#MeV
+            "HadronPT"          : 800. ,#MeV
+            "KaonPIDK"        : 5.   ,#adimensional
+            "PionPIDK"        : -1.   ,#adimensional
+            "HadronMINIPCHI2"   : 9    ,#adimensional
+            "BVCHI2DOF"       : 6   ,#adminensional
+            "BDIRA"           : 0.999,#adminensional
+            "BFDCHI2HIGH"     : 100. ,#adimensional
+            "BPVVDZcut"       : 0.0  , #mm
+            #slow pion
+            "Slowpion_PT"     : 300 #MeV
+            ,"Slowpion_TRGHOSTPROB" : 0.35 #adimensional
+            ,"Slowpion_PIDe" : 5 #adimensional
+            ,"TOSFilter" : { 'Hlt2CharmHad.*HHX.*Decision%TOS' : 0}  #adimensional
+            },
+        'STREAMS'     : ['CharmCompleteEvent']	  
+        }
+    }
+from Gaudi.Configuration import *
+from StrippingUtils.Utils import LineBuilder
+
+import logging
+
+class D2KPiPi0_PartRecoBuilder(LineBuilder):
+    """
+    Definition of D* tagged D0 -> H- mu+(e+) nu stripping
+    """
+    
+    __configuration_keys__ = default_config['D2KPiPi0_PartReco']['CONFIG'].keys()
+    
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+        self._config=config
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        
+        #self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+        #              "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        self._electronSel=None
+        self._electronFilter()
+        
+        self._slowpionSel =None
+        self._pionSel=None
+        self._kaonSel=None
+        self._kaonFilter()
+        self._pionFilter()
+        self._slowpionFilter()
+        
+        self.registerLine(self._D2KENuLine())
+        #self.registerLine(self._D2KENuSSLine())
+
+    def _NominalKSelection( self ):
+        return "  (PT> %(HadronPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK  > %(KaonPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(HadronMINIPCHI2)s )"
+
+    def _NominalPiSelection( self ):
+        #        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+        return " (PT> %(HadronPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK < %(PionPIDK)s) "\
+               "& (MIPCHI2DV(PRIMARY)> %(HadronMINIPCHI2)s )"
+
+    def _NominalSlowPiSelection( self ):
+        #        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+        return " (PT> %(Slowpion_PT)s *MeV)"\
+               "& (TRGHOSTPROB < %(Slowpion_TRGHOSTPROB)s)"\
+               "& (PIDe < %(Slowpion_PIDe)s) & (MIPCHI2DV(PRIMARY)< 9.0) "
+
+    def _NominalElectronSelection( self ):
+        return " (PT> %(ElectronPT)s *MeV) & (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+                "& (PIDe > %(ElectronPIDe)s)"
+
+    ######--######
+    def _electronFilter( self ):
+        if self._electronSel is not None:
+            return self._electronSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseElectrons
+        _el = FilterDesktop( Code = self._NominalElectronSelection() % self._config )
+        _electronSel=Selection("Electron_for"+self._name,
+                         Algorithm=_el,
+                         RequiredSelections = [StdLooseElectrons])
+        
+        self._electronSel=_electronSel
+        
+        return _electronSel
+
+    ######--######
+
+    def _pionFilter( self ):
+        if self._pionSel is not None:
+            return self._pionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _ka = FilterDesktop( Code = self._NominalPiSelection() % self._config )
+        _kaSel=Selection("Pi_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdLoosePions])
+        self._pionSel=_kaSel
+        return _kaSel
+
+    ######Kaon Filter######
+    def _kaonFilter( self ):
+        if self._kaonSel is not None:
+            return self._kaonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseKaons
+        
+        _ka = FilterDesktop( Code = self._NominalKSelection() % self._config )
+        _kaSel=Selection("K_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdLooseKaons])
+        self._kaonSel=_kaSel
+        return _kaSel
+
+    ######Slow Pion Filter######
+    def _slowpionFilter( self ):
+        if self._slowpionSel is not None:
+            return self._slowpionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLoosePions
+        
+        _ka = FilterDesktop( Code = self._NominalSlowPiSelection() % self._config )
+        _kaSel=Selection("pis_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdAllLoosePions])
+        self._slowpionSel=_kaSel
+        return _kaSel
+
+    ## OPPOSITE SIGN hl (SIGNAL)
+    def _D2KENuLine( self ):
+        return self.DstarMaker("D2KPiPi0_PartReco",["[D0 -> K- pi+ e+]cc","[D0 -> K- pi+ e-]cc"], self._kaonFilter(), self._pionFilter(), self._electronFilter())
+
+    #def _D2KENuSSLine( self ):
+    #    return self.DstarMaker("D2KESS",["[D0 -> K- pi+ e-]cc"], self._kaonFilter(), self._pionFilter(), self._electronFilter())
+
+    def DstarMaker(self, _name, _D0Decays, kfiler, pifilter, lfilter):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StrippingConf.StrippingLine import StrippingLine
+        
+        _KMu = CombineParticles(
+            DecayDescriptors = _D0Decays,
+            CombinationCut = "(AM>%(KLepMassLow)s*MeV) & (AM<%(KLepMassHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s )"\
+            "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)"\
+            "& (BPVDIRA > %(BDIRA)s)"\
+            "& (BPVVDZ > %(BPVVDZcut)s)"
+            #            "& (BPVVD > %(VDCut)s)"
+            #" & (ratio > 0.0)"
+            % self._config,
+            ReFitPVs = True
+            )
+            
+        _D0Sel=Selection("SelD0_for"+_name,
+                         Algorithm=_KMu,
+                         RequiredSelections = [lfilter, kfiler, pifilter])
+
+
+        DstComb = CombineParticles( #name = "CombDst"+_name,
+                DecayDescriptors = ['[D*(2010)+ -> D0 pi+]cc'],
+                CombinationCut = "(AM - ACHILD(M,1) < %(DELTA_MASS_MAX)s+5 *MeV) & (ADOCACHI2CUT(20,''))" %self._config,
+                MotherCut = "(M - CHILD(M,1) < %(DELTA_MASS_MAX)s *MeV) & (VFASPF(VCHI2/VDOF) < 9.0)" %self._config
+                )
+        DstSel = Selection("SelDst"+_name,
+                Algorithm = DstComb,
+                RequiredSelections = [_D0Sel,self._slowpionFilter()])
+
+        _tosFilter = self._config['TOSFilter']
+        DstSelTOS = TOSFilter( "SelDstHMu_Hlt2TOS"+_name
+                ,DstSel
+                ,_tosFilter)
+    
+        Line = StrippingLine(_name+'Line',
+                prescale = 1.,
+                RequiredRawEvents = ["Calo","Tracker","Velo"],
+                selection = DstSelTOS) 
+        return Line
+                                                    
+def TOSFilter( name, _input, _specs ) :
+    from Configurables import TisTosParticleTagger
+    from PhysSelPython.Wrappers import Selection 
+    _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+    _tisTosFilter.TisTosSpecs = _specs 
+    return Selection( name
+                      , Algorithm = _tisTosFilter
+                      , RequiredSelections = [ _input ]
+                      )        
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0ForPid.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0ForPid.py
new file mode 100644
index 000000000..d839753c3
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD02KPiPi0ForPid.py
@@ -0,0 +1,111 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Max Chefdeville'
+__date__ = '03/09/2021'
+__version__ = '$Revision: 1.0 $'
+
+'''
+Stripping selection for D0 -> K pi pi0
+'''
+####################################################################
+# Stripping selection for D0 -> K pi pi0
+# copy of the module StrippingD02KPiPi0.py from Regis Lefevre
+# modif: remove photon PID cut, enlarge resolved pi0 sidebands,
+#        remove line for merged pi0s and prescale (0.5) on resolved pi0 line
+####################################################################
+
+__all__ = ('StrippingD02KPiPi0ForPidConf',
+           'makeD02KPiPi0R',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdTightPions,StdTightKaons,StdLoosePi02gg
+
+default_config = {
+    'NAME'        : 'D02KPiPi0ForPid',
+    'WGs'         : ['Calib'],
+    'BUILDERTYPE' : 'StrippingD02KPiPi0ForPidConf',
+    'CONFIG'      : {   'TrackMinPT_R'         : 600       # MeV
+                       ,'TrackMinTrackProb'    : 0.000001  # unitless
+                       ,'TrackMaxGhostProb'    : 0.3       # unitless
+                       ,'TrackMinIPChi2'       : 16        # unitless
+                       ,'Pi0MinPT_R'           : 1000      # MeV
+                       ,'ResPi0MinGamCL'       : 0.0       # unitless
+                       ,'D0MinM'               : 1600      # MeV
+                       ,'D0MaxM'               : 2100      # MeV
+                       ,'D0MinVtxProb'         : 0.001     # unitless
+                       ,'D0MaxIPChi2'          : 9         # unitless
+                       ,'D0MinDIRA'            : 0.9999    # unitless
+                       ,'D0MinVVDChi2'         : 64        # unitless
+                       ,'ResolvedLinePrescale' : 1.        # unitless
+                       ,'ResolvedLinePostscale': 1.        # unitless
+                      },
+    'STREAMS'     : ['CharmCompleteEvent']
+    }
+
+class StrippingD02KPiPi0ForPidConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        myPions       = StdTightPions
+        myKaons       = StdTightKaons
+        myResolvedPi0 = StdLoosePi02gg
+
+        #---------------------------------------
+        # B -> HHPi0 selections
+        self.selresolved = makeD02KPiPi0R( name + 'R',
+                                           config,
+                                           DecayDescriptor = '[D0 -> K- pi+ pi0]cc',
+                                           inputSel = [myKaons, myPions, myResolvedPi0]
+                                           )
+        #---------------------------------------
+        # Stripping lines
+        self.D02KPiPi0R_line = StrippingLine(name + "_R" %locals()['config'],
+                                             prescale = config['ResolvedLinePrescale'],
+                                             postscale = config['ResolvedLinePostscale'],
+                                             RequiredRawEvents = ["Calo"],
+                                             selection = self.selresolved
+                                             )
+        # register lines
+        self.registerLine(self.D02KPiPi0R_line)
+
+##############################################################
+def makeD02KPiPi0R( name,
+                  config,
+                  DecayDescriptor,
+                  inputSel
+                  ) :
+
+    _TrackCuts    = "(PT>%(TrackMinPT_R)s *MeV) & (TRPCHI2>%(TrackMinTrackProb)s) & (TRGHOSTPROB<%(TrackMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPChi2)s)" %locals()['config']    
+    _pi0Cuts      = "(PT>%(Pi0MinPT_R)s *MeV) & (CHILD(CL,1)>%(ResPi0MinGamCL)s) & (CHILD(CL,2)>%(ResPi0MinGamCL)s)" %locals()['config']
+    _daughterCuts = { 'K-' : _TrackCuts, 'pi+' : _TrackCuts, 'pi0' : _pi0Cuts }
+    _combCuts     = "(AM>%(D0MinM)s *MeV) & (AM<%(D0MaxM)s *MeV)" % locals()['config']
+    _motherCuts   = "(VFASPF(VPCHI2)>%(D0MinVtxProb)s) & (BPVVDCHI2>%(D0MinVVDChi2)s) & (BPVIPCHI2()<%(D0MaxIPChi2)s) & (BPVDIRA>%(D0MinDIRA)s)" % locals()['config']
+
+    _D = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _D,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD0ForBXX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD0ForBXX.py
new file mode 100644
index 000000000..b2cdd1d41
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingD0ForBXX.py
@@ -0,0 +1,196 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+#$Id$
+__author__ = ['Liming Zhang']
+__date__ = '20/05/2010'
+__version__ = '$Revision: 1.4 $'
+"""
+D0->Kpi and D0->K3pi selections for pi tracking efficinecy check
+"""
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseKaons, StdLooseProtons, StdAllLoosePions
+
+
+name = 'confD0forBXX'
+
+__all__ = ('D0forBXXConf',
+           'makeDst2D0Pi',
+           'TOSFilter',
+           'confdict')
+default_config = {
+  'D0forBXX' : {
+    'WGs'         : ['Semileptonic'],
+    'BUILDERTYPE' : 'D0forBXXLinesConf',
+    'CONFIG'      :{
+      "PreScale"      : 0.005   # adimensiional        
+      ,"PreScaleRS"   : 1.0    # adimensiional
+      ,"PreScaleWS"   : 0.2    # adimensiional
+      ,"MINIPCHI2"     : 9.0   # adimensiional
+      ,"TRCHI2"        : 3.0   # adimensiional
+      ,"KaonPIDK"      : 4.0   # adimensiional
+      ,"PionPIDK"      : 10.0   # adimensiional
+      ,"PT"            : 300.0  # MeV
+      ,"D0DIRA"        : 0.9999    # adimensiional
+      ,"D0DIRAK3Pi"    : 0.9999    # adimensiional        
+      ,"FDCHI2"        : 100.0   # adimensiional
+      ,"D0AMassWin"    : 100.0   # MeV
+      ,"D0MassWin"     : 80.0  # MeV
+      ,"D0IP"          : 0.2    #mm
+      ,"D0K3PiIP"      : 0.2    #mm        
+      ,"D0VCHI2DOF"    : 6.0   # adimensiional
+      ,"DDocaChi2Max" : 20   #adimensiional
+    },
+    'STREAMS'     : ['Semileptonic']   
+  }
+}
+
+
+class D0forBXXLinesConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    __confdict__={}
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+
+        self.PiCut = "(TRCHI2DOF < %(TRCHI2)s) & (P>2.0*GeV) & (PT > %(PT)s *MeV)"\
+                     "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s) &  (PIDK< %(PionPIDK)s)" % self.__confdict__
+        self.KCut = "(TRCHI2DOF < %(TRCHI2)s) & (PT > %(PT)s *MeV) & (P>2.0*GeV) "\
+                    "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)  &  (PIDK> %(KaonPIDK)s)" % self.__confdict__
+
+        self.seld02kpi = Selection("D02KPifor" + name,
+                                   Algorithm = self._D02KPi(),
+                                   RequiredSelections = [ StdLooseKaons, StdLoosePions ])
+        self.seld02k3pi = Selection("D02K3Pifor" + name,
+                                   Algorithm = self._D02K3Pi(),
+                                   RequiredSelections = [ StdLooseKaons, StdLoosePions ])
+
+        self.seld02k2pi = Selection("D02K2Pifor" + name,
+                                    Algorithm = self._D02K2Pi(),
+                                    RequiredSelections = [ StdLooseKaons, StdLoosePions ])
+
+        self.seldstrs = makeDst2D0Pi("DstRSwD0K2Pi" + name,
+                                  DecayDescriptor = '[D*(2010)+ -> D0 pi+]cc',
+                                  DaughterLists = [ self.seld02k2pi, StdAllLoosePions ])
+
+        self.seldstws = makeDst2D0Pi("DstWSwD0K2Pi" + name,
+                                     DecayDescriptor = '[D*(2010)- -> D0 pi-]cc',
+                                     DaughterLists = [ self.seld02k2pi, StdAllLoosePions ])
+                                     
+        self.seldstrs_tos = TOSFilter( "DstRSwD0K2Pi_TOS" + name,
+                                     self.seldstrs,
+                                     "Hlt2Global")
+
+        self.seldstws_tos = TOSFilter( "DstWSwD0K2Pi_TOS" + name,
+                                     self.seldstws,
+                                     "Hlt2Global")        
+        
+        self.D02KPiLine = StrippingLine('D02KPi' + name + 'Line'
+                                        , prescale = config['PreScale']
+                                        , selection = self.seld02kpi
+                                        )
+        self.D02K3PiLine = StrippingLine('D02K3Pi' + name + 'Line'
+                                         , prescale = config['PreScale']
+                                         , selection = self.seld02k3pi
+                                        )
+
+        self.DstRSLine = StrippingLine('DstRSwD02K2Pi' + name + 'Line'
+                                       , prescale = config['PreScaleRS']
+                                       , selection = self.seldstrs_tos
+                                       )
+        
+        self.DstWSLine = StrippingLine('DstWSwD02K2Pi' + name + 'Line'
+                                       , prescale = config['PreScaleWS']
+                                       , selection = self.seldstws_tos
+                                       )        
+        
+        self.registerLine(self.D02KPiLine)
+        self.registerLine(self.D02K3PiLine)
+        self.registerLine(self.DstRSLine)
+        self.registerLine(self.DstWSLine)
+        
+    def _D02KPi( self ):
+        _decayDescriptor = '[D0 -> pi+ K-]cc'
+        _combinationCut = "(ADAMASS('D0') < %(D0AMassWin)s *MeV) & (APT > 1500*MeV) & (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _daughtersCuts = {  "pi+" : self.PiCut,
+                            "K+" :  self.KCut  }
+        _motherCut = "(VFASPF(VCHI2/VDOF) < %(D0VCHI2DOF)s) & (BPVIP()< %(D0IP)s *mm)" \
+                        "& (BPVVDCHI2 > %(FDCHI2)s) & (BPVDIRA> %(D0DIRA)s) & (ADMASS('D0') < %(D0MassWin)s *MeV)"  % self.__confdict__
+        return CombineParticles(DecayDescriptor = _decayDescriptor,
+                                DaughtersCuts = _daughtersCuts,
+                                CombinationCut = _combinationCut,
+                                MotherCut = _motherCut,
+                                )
+    def _D02K2Pi( self ):
+        _decayDescriptors = ['[D0 -> pi+ pi- K-]cc']
+        _combinationCut = "(AM>1.4*GeV) & (AM<1.7*GeV) & (AM12>575.5*MeV) & (AM12<975.5*MeV) & (APT > 3000*MeV) & (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _daughtersCuts = {  "pi+" : "(TRCHI2DOF < %(TRCHI2)s) & (P>2.0*GeV) & (PT > 400 *MeV)"\
+                     "& (MIPCHI2DV(PRIMARY)> 4.0) &  (PIDK< %(PionPIDK)s) & (PIDmu< 10)" % self.__confdict__,
+                            "K+" :  "(TRCHI2DOF < %(TRCHI2)s) & (PT > 400 *MeV) & (P>2.0*GeV) "\
+                    "& (MIPCHI2DV(PRIMARY)> 4.0)  &  (PIDK> %(KaonPIDK)s)" % self.__confdict__  }
+        _motherCut = "(VFASPF(VCHI2/VDOF)<6.0) & (BPVVD>4*mm) & (BPVVDCHI2>120) & (BPVDIRA>0.9997) & (BPVIPCHI2()<25.)"
+        return CombineParticles(DecayDescriptors = _decayDescriptors,
+                                DaughtersCuts = _daughtersCuts,
+                                CombinationCut = _combinationCut,
+                                MotherCut = _motherCut,
+                                )
+
+    def _D02K3Pi( self ):
+        _decayDescriptor = '[D0 -> K- pi+ pi- pi+]cc' 
+        _combinationCut = "(ADAMASS('D0') < %(D0AMassWin)s *MeV) & (APT > 1500.*MeV) &  (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _daughtersCuts = { "pi+" : "  (PT > 250 *MeV) & (P>2.0*GeV)"\
+                           "& (TRCHI2DOF < %(TRCHI2)s)" % self.__confdict__,
+                           "K+" :  self.KCut }
+        _motherCut = " (ADMASS('D0') < %(D0MassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(D0VCHI2DOF)s) " \
+                     "& (INTREE((ABSID=='pi+')& (PT > %(PT)s *MeV) &(MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s) & (PIDK< %(PionPIDK)s)))"  \
+                     "& (BPVVDCHI2 > %(FDCHI2)s) &  (BPVDIRA> %(D0DIRAK3Pi)s) & (BPVIP()< %(D0K3PiIP)s *mm)"  % self.__confdict__
+        return CombineParticles( DecayDescriptor = _decayDescriptor,
+                                 DaughtersCuts = _daughtersCuts,
+                                 CombinationCut = _combinationCut,
+                                 MotherCut = _motherCut)
+
+
+def makeDst2D0Pi(name,
+                 DecayDescriptor,
+                 DaughterLists):
+    #    _decayDescriptor = '[D*(2010)+ -> D0 pi+]cc'
+    _combinationCut = "(AM-AM1-139.57*MeV<40.0*MeV) & (APT>3.0*GeV)"
+    _daughtersCuts = { "pi+" : "(PT > 250*MeV) & (TRCHI2DOF < 3.0) & (MIPDV(PRIMARY)< 0.3*mm) & (MIPCHI2DV(PRIMARY)<4.0) & (PIDK < 10)"}
+    _motherCut = "(VFASPF(VCHI2/VDOF)<5.0) & (BPVVDCHI2 < 25) & (BPVIPCHI2() < 25.)"# & (MINTREE((ABSID=='D0') , VFASPF(VZ))-VFASPF(VZ) > 3 *mm )"
+    _dst = CombineParticles(DecayDescriptor = DecayDescriptor,
+                            DaughtersCuts = _daughtersCuts,
+                            CombinationCut = _combinationCut,
+                            MotherCut = _motherCut,
+                            )        
+    return Selection(name,
+                     Algorithm = _dst,
+                     RequiredSelections = DaughterLists)
+
+    
+def TOSFilter( name = None, sel = None, trigger = None ):
+    """
+    Function to return a selection object, filtering for TOS candidates from input selection
+    """
+    from Configurables import TisTosParticleTagger
+
+    _filter = TisTosParticleTagger(name+"_TriggerTos")
+    _filter.TisTosSpecs = { trigger+"%TOS" : 0 }
+    _filter.NoRegex = True
+
+    _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = [ sel ], Algorithm = _filter )
+    return _sel
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDst2D0Pi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDst2D0Pi.py
new file mode 100644
index 000000000..bc830a2ab
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDst2D0Pi.py
@@ -0,0 +1,312 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Max Chefdeville'
+__date__ = '06/09/2021'
+__version__ = '$Revision: 1.2 $'
+
+'''
+Stripping selection for D*+ -> [D0 -> K pi gamma] pi+
++ selection for D*+ -> [D0 -> K pi eta] pi+
++ selection for D*+ -> [D0 -> K pi pi0] pi+
+'''
+####################################################################
+# Stripping selection for D*+ -> [D0 -> K pi gamma] pi+
+#  line intended to measure PID performance of isPhoton
+#  by measuring pi0's reco'ed as photons
+# Selections taken from Regis Lefevre D02Kpipi0 lines for the D0
+# and from TURCAL for the D*0
+# +
+# Stripping selection for D*+ -> [D0 -> K pi [eta -> gamma gamma]] pi+
+# first PID sample of eta2gg in whole LHCb dataset
+# selections aligned with D02Kpipi0 from Regis Lefevre
+# +
+# Stripping selection for D*+ -> [D0 -> K pi [pi0 -> gamma gamma]] pi+
+# this improves on the D02Kpipi0 line from Regis Lefevre:
+# no photon PID cut, wider pi0 mass window, no prescale, slow-pion match
+####################################################################
+
+__all__ = ('StrippingDst2D0PiConf',
+           'makeD02KPiGamma',
+           'makeD02KPiEta',
+           'makeD02KPiPi0',           
+           'makeDst2D0Pi',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdTightPions,StdTightKaons,StdLooseAllPhotons,StdNoPIDsPions,StdLooseEta2gg,StdLoosePi02gg
+
+default_config = {
+    'NAME'        : 'Dst2D0Pi',
+    'WGs'         : ['Calib'],
+    'BUILDERTYPE' : 'StrippingDst2D0PiConf',
+    'CONFIG'      : {    'TrackMinPT'              : 300       # MeV
+                        ,'TrackMinTrackProb'       : 0.000001  # unitless
+                        ,'TrackMaxGhostProb'       : 0.3       # unitless
+                        ,'TrackMinIPChi2'          : 16        # unitless
+                        ,'GammaMinPT'              : 2000      # MeV
+                        ,'D0MinM'                  : 1600      # MeV
+                        ,'D0MaxM'                  : 2100      # MeV
+                        ,'D0MinVtxProb'            : 0.001     # unitless
+                        ,'D0MaxIPChi2'             : 9         # unitless
+                        ,'D0MinDIRA'               : 0.9999    # unitless
+                        ,'D0MinVVDChi2'            : 64        # unitless
+                        ,'SoftPionMaxIPChi2'       : 16        # unitless
+                        ,'Dst_PT_MIN'              : 4000      # MeV
+                        ,'Dst_dAM_MIN'             : 95.421    # MeV
+                        ,'Dst_dAM_MAX'             : 195.421   # MeV
+                        ,'Dst_dM_MIN'              : 135.421   # MeV
+                        ,'Dst_dM_MAX'              : 155.421   # MeV
+                        ,'Dst_VCHI2PDOF_MAX'       : 9         # unitless
+                        ,'Dst_VVDCHI2_MAX'         : 16        # unitless
+                        ,'Dst_VIPCHI2_MAX'         : 9         # unitless
+                        ,'Dst2D0PiLinePrescale'    : 1      # unitless
+                        ,'Dst2D0PiLinePostscale'   : 1      # unitless
+
+                        ,'EtaMinPT'                   : 1500   # MeV
+                        ,'EtaMassMin'                 : 450    # MeV
+                        ,'EtaMassMax'                 : 650    # MeV
+                        ,'Dst2D0etaPiLinePrescale'    : 1      # unitless
+                        ,'Dst2D0etaPiLinePostscale'   : 1      # unitless
+
+                        ,'Pi0MinPT'                   : 1000   # MeV
+                        ,'Pi0MassMin'                 : 70     # MeV (= nocut)
+                        ,'Pi0MassMax'                 : 200    # MeV (= nocut)
+                        ,'Dst2D0pi0PiLinePrescale'    : 1      # unitless
+                        ,'Dst2D0pi0PiLinePostscale'   : 1      # unitless
+                      },
+    'STREAMS'     : ['CharmCompleteEvent']
+    }
+
+class StrippingDst2D0PiConf(LineBuilder) :
+
+    __configuration_keys__ = (  'TrackMinPT'
+                               ,'TrackMinTrackProb'
+                               ,'TrackMaxGhostProb'
+                               ,'TrackMinIPChi2'
+                               ,'GammaMinPT'
+                               ,'D0MinM'
+                               ,'D0MaxM'
+                               ,'D0MinVtxProb'
+                               ,'D0MaxIPChi2'
+                               ,'D0MinDIRA'
+                               ,'D0MinVVDChi2'
+                               ,'SoftPionMaxIPChi2'
+                               ,'Dst_PT_MIN'
+                               ,'Dst_dAM_MIN'
+                               ,'Dst_dAM_MAX'
+                               ,'Dst_dM_MIN'
+                               ,'Dst_dM_MAX'
+                               ,'Dst_VCHI2PDOF_MAX'
+                               ,'Dst_VVDCHI2_MAX'
+                               ,'Dst_VIPCHI2_MAX'
+                               ,'Dst2D0PiLinePrescale'
+                               ,'Dst2D0PiLinePostscale'
+                               ,'EtaMinPT'
+                               ,'EtaMassMin'
+                               ,'EtaMassMax'
+                               ,'Dst2D0etaPiLinePrescale'
+                               ,'Dst2D0etaPiLinePostscale'
+                               ,'Pi0MinPT'
+                               ,'Pi0MassMin'
+                               ,'Pi0MassMax'
+                               ,'Dst2D0pi0PiLinePrescale'
+                               ,'Dst2D0pi0PiLinePostscale'
+                               )
+
+##############################################################
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        myPions       = StdTightPions
+        mySoftPions   = StdNoPIDsPions
+        myKaons       = StdTightKaons
+        myGammas      = StdLooseAllPhotons
+        myEtas        = StdLooseEta2gg
+        myPi0s        = StdLoosePi02gg
+
+        #---------------------------------------
+        # D -> HHGamma selections
+        self.seld0 = makeD02KPiGamma( 'D0_' + name ,
+                                      config,
+                                      DecayDescriptor = '[D0 -> K- pi+ gamma]cc',
+                                      inputSel = [myKaons, myPions, myGammas]
+                                      )
+
+        #---------------------------------------
+        # Dst -> DPi selections
+        self.seldst = makeDst2D0Pi( 'Dst_' + name ,
+                                    config,
+                                    DecayDescriptor = '[D*(2010)+ -> D0 pi+]cc',
+                                    inputSel = [self.seld0, mySoftPions]
+                                    )
+
+        #---------------------------------------
+        # Stripping lines
+        self.Dst2D0Pi_line = StrippingLine(name %locals()['config'],
+                                           prescale = config['Dst2D0PiLinePrescale'],
+                                           postscale = config['Dst2D0PiLinePostscale'],
+                                           RequiredRawEvents = ["Calo"],
+                                           selection = self.seldst
+                                           )
+        # register lines
+        self.registerLine(self.Dst2D0Pi_line)
+
+        #---------------------------------------
+        # D -> HHEta selections
+        self.seld0eta = makeD02KPiEta( 'D0eta_' + name ,
+                                       config,
+                                       DecayDescriptor = '[D0 -> K- pi+ eta]cc',
+                                       inputSel = [myKaons, myPions, myEtas]
+                                       )
+
+        #---------------------------------------
+        # Dst -> DPi selections
+        self.seldsteta = makeDst2D0Pi( 'Dsteta_' + name ,
+                                       config,
+                                       DecayDescriptor = '[D*(2010)+ -> D0 pi+]cc',
+                                       inputSel = [self.seld0eta, mySoftPions]
+                                       )
+
+        #---------------------------------------
+        # Stripping lines
+        self.Dst2D0etaPi_line = StrippingLine(name %locals()['config'] + "_D02KPiEta",
+                                              prescale = config['Dst2D0etaPiLinePrescale'],
+                                              postscale = config['Dst2D0etaPiLinePostscale'],
+                                              RequiredRawEvents = ["Calo"],
+                                              selection = self.seldsteta
+                                              )
+        # register lines
+        self.registerLine(self.Dst2D0etaPi_line)
+
+        #---------------------------------------
+        # D -> HHPi0 selections
+        self.seld0pi0 = makeD02KPiPi0( 'D0pi0_' + name ,
+                                       config,
+                                       DecayDescriptor = '[D0 -> K- pi+ pi0]cc',
+                                       inputSel = [myKaons, myPions, myPi0s]
+                                       )
+
+        #---------------------------------------
+        # Dst -> DPi selections
+        self.seldstpi0 = makeDst2D0Pi( 'Dstpi0_' + name ,
+                                       config,
+                                       DecayDescriptor = '[D*(2010)+ -> D0 pi+]cc',
+                                       inputSel = [self.seld0pi0, mySoftPions]
+                                       )
+
+        #---------------------------------------
+        # Stripping lines
+        self.Dst2D0pi0Pi_line = StrippingLine(name %locals()['config'] + "_D02KPiPi0",
+                                              prescale = config['Dst2D0pi0PiLinePrescale'],
+                                              postscale = config['Dst2D0pi0PiLinePostscale'],
+                                              RequiredRawEvents = ["Calo"],
+                                              selection = self.seldstpi0
+                                              )
+        # register lines
+        self.registerLine(self.Dst2D0pi0Pi_line)
+
+##############################################################
+def makeD02KPiGamma( name,
+                     config,
+                     DecayDescriptor,
+                     inputSel
+                     ) :
+
+    _TrackCuts    = "(PT>%(TrackMinPT)s *MeV) & (TRPCHI2>%(TrackMinTrackProb)s) & (TRGHOSTPROB<%(TrackMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPChi2)s)" %locals()['config']    
+    _gammaCuts    = "(PT>%(GammaMinPT)s *MeV)" %locals()['config']
+    _daughterCuts = { 'K-' : _TrackCuts, 'pi+' : _TrackCuts, 'gamma' : _gammaCuts }
+    _combCuts     = "(AM>%(D0MinM)s *MeV) & (AM<%(D0MaxM)s *MeV)" % locals()['config']
+    _motherCuts   = "(VFASPF(VPCHI2)>%(D0MinVtxProb)s) & (BPVVDCHI2>%(D0MinVVDChi2)s) & (BPVIPCHI2()<%(D0MaxIPChi2)s) & (BPVDIRA>%(D0MinDIRA)s)" % locals()['config']
+
+    _D = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _D,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
+def makeD02KPiEta( name,
+                   config,
+                   DecayDescriptor,
+                   inputSel
+                   ) :
+
+    _TrackCuts    = "(PT>%(TrackMinPT)s *MeV) & (TRPCHI2>%(TrackMinTrackProb)s) & (TRGHOSTPROB<%(TrackMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPChi2)s)" %locals()['config']    
+    _etaCuts    = "(PT>%(EtaMinPT)s *MeV) & (in_range(%(EtaMassMin)s,M,%(EtaMassMax)s))" %locals()['config']
+    _daughterCuts = { 'K-' : _TrackCuts, 'pi+' : _TrackCuts, 'eta' : _etaCuts }
+    _combCuts     = "(AM>%(D0MinM)s *MeV) & (AM<%(D0MaxM)s *MeV)" % locals()['config']
+    _motherCuts   = "(VFASPF(VPCHI2)>%(D0MinVtxProb)s) & (BPVVDCHI2>%(D0MinVVDChi2)s) & (BPVIPCHI2()<%(D0MaxIPChi2)s) & (BPVDIRA>%(D0MinDIRA)s)" % locals()['config']
+
+    _D = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _D,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
+def makeD02KPiPi0( name,
+                   config,
+                   DecayDescriptor,
+                   inputSel
+                   ) :
+
+    _TrackCuts    = "(PT>%(TrackMinPT)s *MeV) & (TRPCHI2>%(TrackMinTrackProb)s) & (TRGHOSTPROB<%(TrackMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPChi2)s)" %locals()['config']    
+    _etaCuts    = "(PT>%(Pi0MinPT)s *MeV) & (in_range(%(Pi0MassMin)s,M,%(Pi0MassMax)s))" %locals()['config']
+    _daughterCuts = { 'K-' : _TrackCuts, 'pi+' : _TrackCuts, 'eta' : _etaCuts }
+    _combCuts     = "(AM>%(D0MinM)s *MeV) & (AM<%(D0MaxM)s *MeV)" % locals()['config']
+    _motherCuts   = "(VFASPF(VPCHI2)>%(D0MinVtxProb)s) & (BPVVDCHI2>%(D0MinVVDChi2)s) & (BPVIPCHI2()<%(D0MaxIPChi2)s) & (BPVDIRA>%(D0MinDIRA)s)" % locals()['config']
+
+    _D = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _D,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
+def makeDst2D0Pi( name,
+                  config,
+                  DecayDescriptor,
+                  inputSel
+                  ) :
+
+    _SoftPionCuts = "(MIPCHI2DV(PRIMARY)<%(SoftPionMaxIPChi2)s)" %locals()['config']
+    _daughterCuts = { 'pi+' : _SoftPionCuts }
+    _combCuts     = "(in_range( %(Dst_dAM_MIN)s *MeV, (AM - AM1), %(Dst_dAM_MAX)s *MeV))" % locals()['config']
+    _motherCuts   = "(PT > %(Dst_PT_MIN)s) & (VFASPF(VCHI2PDOF) < %(Dst_VCHI2PDOF_MAX)s) & (BPVVDCHI2 < %(Dst_VVDCHI2_MAX)s) & (BPVIPCHI2() < %(Dst_VIPCHI2_MAX)s) & (in_range( %(Dst_dM_MIN)s *MeV, (M - M1), %(Dst_dM_MAX)s *MeV))" % locals()['config']
+
+    _Dst = CombineParticles( DecayDescriptor = DecayDescriptor,
+                             MotherCut = _motherCuts,
+                             CombinationCut = _combCuts,
+                             DaughtersCuts = _daughterCuts
+                             )
+
+    return Selection( name+'Sel',
+                      Algorithm = _Dst,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDstarD02KShhForTrackingEff.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDstarD02KShhForTrackingEff.py
new file mode 100644
index 000000000..23dbfc8d8
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDstarD02KShhForTrackingEff.py
@@ -0,0 +1,296 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Marco Adinolfi']
+__date__ = '22/08/2012'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = ('DstarD02KShh_ForTrackingEffBuilder',
+           'default_config',
+           'filterDaughters',
+           'makeD0',
+           'makeDstar')
+
+default_config = {
+        'NAME' : 'DstarD02KShhForTrackingEff',
+        'BUILDERTYPE' : 'DstarD02KShh_ForTrackingEffBuilder',
+        'CONFIG' : {'LongTrackGEC'          :    150
+                  , 'Trk_PT_MIN'            :  600.0
+                  , 'Trk_P_MIN'             :10000.0
+                  , 'Trk_GHOST_MAX'         :    0.4
+                  , 'Pair_AMINDOCA_MAX'     :    0.1
+                  , 'Pair_BPVVD_MIN'        :    0.0
+                  , 'Pair_SumAPT_MIN'       : 2500.0
+                  , 'Pair_BPVCORRM_MAX'     : 3000.0
+                  , 'TrkPt_SlowPion'        :    0.0
+                  , 'TrkP_SlowPion'         : 3000.0
+                  , 'TrkChi2_SlowPion'      :    2.25
+                  , 'TrkChi2_MAX_Child_MAX' :    2.25
+                  , 'KAON_PIDK_MIN'         :    3.0
+                  , 'PION_PIDK_MAX'         :    0.0
+                  , 'IPCHI2_MAX_Child_MIN'  :   16.0
+                  , 'IPCHI2_PiSlow_MAX'     :    9.0
+                  , 'PairMaxDoca_Dstar'     :  100.0
+                  , 'PT_Dstar_MIN'          : 2500.0
+                  , 'DIRA_D0_MIN'           :    0.999
+                  , 'FDCHI2_D0_MIN'         :   80.0
+                  , 'VCHI2_D0_MAX'          :    4.0
+                  , 'M_MIN'                 :    0.0
+                  , 'M_MAX'                 : 1800.0
+                  , 'PhiM_MIN'              : 1000.0
+                  , 'PhiM_MAX'              : 1040.0
+                  , 'DeltaM_MIN'            :    0.0
+                  , 'DeltaM_MAX'            :  250.0
+                  , 'HLTFILTER'             : "(HLT_PASS_RE('Hlt2CharmHadD02HHXDst.*Decision')|HLT_PASS('Hlt2(Phi)?IncPhiDecision'))"
+                  , 'Hlt2TisTosSpec'        : { 'Hlt2CharmHadD02HHXDst.*Decision%TOS' : 0, 'Hlt2(Phi)?IncPhiDecision%TOS' : 0}
+                  , 'KKprescale'            :    1.0
+                  , 'PiPiprescale'          :    0.1
+                  , 'KPlusPiMinusprescale'  :    0.1
+                  , 'KMinusPiPlusprescale'  :    0.1
+                  , 'postscale'             :    1.0
+                  },
+        'WGs' : ['ALL'],
+        'STREAMS' : ['CharmCompleteEvent']
+                }
+
+from Gaudi.Configuration                   import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers                import Selection, DataOnDemand
+from StrippingConf.StrippingLine           import StrippingLine
+from StrippingUtils.Utils                  import LineBuilder
+from Configurables import TisTosParticleTagger
+
+name = "DstarD02KShh_ForTrackingEff"
+
+class DstarD02KShh_ForTrackingEffBuilder(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+
+        # Set up global event cuts.
+        # Conceptually these come first, although the place where they're
+        # inserted into the line is at the bottom of the code.
+        _globalEventCuts = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(LongTrackGEC)s )" % config,
+                            "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        # Select all kaons and pions.
+        self.selDauKaon = filterKaons('KFor'+name, 'Phys/StdLooseKaons/Particles',
+                                          config['TrkChi2_MAX_Child_MAX'],
+                                          config['Trk_PT_MIN'],
+                                          config['Trk_P_MIN'],
+                                          config['Trk_GHOST_MAX'],
+                                          config['KAON_PIDK_MIN'],
+                                          config['IPCHI2_MAX_Child_MIN'])
+        self.selDauPion = filterPions('PiFor'+name, 'Phys/StdLoosePions/Particles',
+                                          config['TrkChi2_MAX_Child_MAX'],
+                                          config['Trk_PT_MIN'],
+                                          config['Trk_P_MIN'],
+                                          config['Trk_GHOST_MAX'],
+                                          config['PION_PIDK_MAX'],
+                                          config['IPCHI2_MAX_Child_MIN'])
+
+        self.selDauPP = [self.selDauPion]
+        self.selDauKK = [self.selDauKaon]
+        self.selDauKP = [self.selDauKaon,self.selDauPion]
+        
+        # Now make the various decays of the D0
+        strDecaysPiPi         = ["D0 -> pi+ pi-"]
+        strDecaysKPlusPiMinus = ["D0 -> K+ pi-"]
+        strDecaysKMinusPiPlus = ["D0 -> K- pi+"]
+        strDecaysKK           = ["D0 -> K+ K-"]
+        
+        self.selD0PiPi         = makeD0('D02PiPi'        + name, strDecaysPiPi,         self.selDauPP, config['Pair_SumAPT_MIN'], config['Pair_AMINDOCA_MAX'], config['Pair_BPVVD_MIN'], config['Pair_BPVCORRM_MAX'], config['FDCHI2_D0_MIN'], config['DIRA_D0_MIN'],config['M_MIN'], config['M_MAX'], config['VCHI2_D0_MAX'])
+        self.selD0KK           = makeD0('D02KK'          + name, strDecaysKK  ,         self.selDauKK, config['Pair_SumAPT_MIN'], config['Pair_AMINDOCA_MAX'], config['Pair_BPVVD_MIN'], config['Pair_BPVCORRM_MAX'], config['FDCHI2_D0_MIN'], config['DIRA_D0_MIN'],config['PhiM_MIN'], config['PhiM_MAX'], config['VCHI2_D0_MAX'])
+        self.selD0KMinusPiPlus         = makeD0('D02KMinusPiPlus'        + name, strDecaysKMinusPiPlus,self.selDauKP, config['Pair_SumAPT_MIN'], config['Pair_AMINDOCA_MAX'], config['Pair_BPVVD_MIN'], config['Pair_BPVCORRM_MAX'], config['FDCHI2_D0_MIN'], config['DIRA_D0_MIN'],config['M_MIN'], config['M_MAX'], config['VCHI2_D0_MAX'])
+        self.selD0KPlusPiMinus         = makeD0('D02KPlusPiMinus'        + name, strDecaysKPlusPiMinus,self.selDauKP, config['Pair_SumAPT_MIN'], config['Pair_AMINDOCA_MAX'], config['Pair_BPVVD_MIN'], config['Pair_BPVCORRM_MAX'], config['FDCHI2_D0_MIN'], config['DIRA_D0_MIN'],config['M_MIN'], config['M_MAX'], config['VCHI2_D0_MAX'])
+
+
+
+        # Now make the D* -> D)0 pi
+        self.selDstarPiPi         = makeDstar('Dstar_PiPi'         + name, [self.selD0PiPi],         config['IPCHI2_PiSlow_MAX'], config['PairMaxDoca_Dstar'], config['PT_Dstar_MIN'], config['DeltaM_MIN'], config['DeltaM_MAX'])
+        self.selDstarKK           = makeDstar('Dstar_KK'           + name, [self.selD0KK],           config['IPCHI2_PiSlow_MAX'], config['PairMaxDoca_Dstar'], config['PT_Dstar_MIN'], config['DeltaM_MIN'], config['DeltaM_MAX'])
+        self.selDstarKPlusPiMinus = makeDstar('Dstar_KPlusPiMinus' + name, [self.selD0KPlusPiMinus], config['IPCHI2_PiSlow_MAX'], config['PairMaxDoca_Dstar'], config['PT_Dstar_MIN'], config['DeltaM_MIN'], config['DeltaM_MAX'])
+        self.selDstarKMinusPiPlus = makeDstar('Dstar_KMinusPiPlus' + name, [self.selD0KMinusPiPlus], config['IPCHI2_PiSlow_MAX'], config['PairMaxDoca_Dstar'], config['PT_Dstar_MIN'], config['DeltaM_MIN'], config['DeltaM_MAX'])
+
+
+        self.selDstarPiPi_TisTos = makeTisTos(name+'SelDstarPiPi'
+                                   , selection = self.selDstarPiPi
+                                   , hltTisTosSpec = config['Hlt2TisTosSpec'])
+        self.selDstarKK_TisTos = makeTisTos(name+'SelDstarKK'
+                                   , selection = self.selDstarKK
+                                   , hltTisTosSpec = config['Hlt2TisTosSpec'])
+        self.selDstarKPlusPiMinus_TisTos = makeTisTos(name+'SelDstarKPlusPiMinus'
+                                   , selection = self.selDstarKPlusPiMinus
+                                   , hltTisTosSpec = config['Hlt2TisTosSpec'])
+        self.selDstarKMinusPiPlus_TisTos = makeTisTos(name+'SelDstarKMinusPiPlus'
+                                   , selection = self.selDstarKMinusPiPlus
+                                   , hltTisTosSpec = config['Hlt2TisTosSpec'])
+
+        
+        # Make the stripping lines
+        self.linePiPi          = StrippingLine(name+'PiPiLine',
+                                               FILTER    = _globalEventCuts,
+                                               prescale  = config['PiPiprescale'],
+                                               postscale = config['postscale'],
+                                               RequiredRawEvents = ["Tracker","Velo"],
+                                               HLT2 = config['HLTFILTER'],
+                                               selection = self.selDstarPiPi_TisTos)
+        self.lineKK            = StrippingLine(name + 'KKLine',
+                                               FILTER    = _globalEventCuts,
+                                               prescale  = config['KKprescale'],
+                                               postscale = config['postscale'],
+                                               RequiredRawEvents = ["Tracker","Velo"],
+                                               HLT2 = config['HLTFILTER'],
+                                               selection = self.selDstarKK_TisTos)
+        self.lineKPlusPiMinus  = StrippingLine(name+'KPlusPiMinusLine',
+                                               FILTER    = _globalEventCuts,
+                                               prescale  = config['KPlusPiMinusprescale'],
+                                               postscale = config['postscale'],
+                                               RequiredRawEvents = ["Tracker","Velo"],
+                                               HLT2 = config['HLTFILTER'],
+                                               selection = self.selDstarKPlusPiMinus_TisTos)
+        self.lineKMinusPiPlus  = StrippingLine(name+'KMinusPiPlusLine',
+                                               FILTER    = _globalEventCuts,
+                                               prescale  = config['KMinusPiPlusprescale'],
+                                               postscale = config['postscale'],
+                                               RequiredRawEvents = ["Tracker","Velo"],
+                                               HLT2 = config['HLTFILTER'],
+                                               selection = self.selDstarKMinusPiPlus_TisTos)
+
+        self.registerLine(self.linePiPi)
+        self.registerLine(self.lineKK)
+        self.registerLine(self.lineKPlusPiMinus)
+        self.registerLine(self.lineKMinusPiPlus)
+
+        
+def filterPions(name, inputName, TrkChi2_MAX_Child_MAX, Trk_PT_MIN, Trk_P_MIN,Trk_GHOST_MAX,PION_PIDK_MAX,IPCHI2_MAX_Child_MIN):
+    """
+    Apply cuts to daughters of D0
+    """
+    _strCutChi2   = "(TRCHI2DOF < %(TrkChi2_MAX_Child_MAX)s)"     % locals()
+    _strCutPT     = "(PT > %(Trk_PT_MIN)s)"                       % locals()
+    _strCutP      = "(P  > %(Trk_P_MIN)s)"                        % locals()
+    _strCutPID    = "(PIDK  < %(PION_PIDK_MAX)s)"                 % locals()
+    _strCutGHOST  = "(TRGHP  < %(Trk_GHOST_MAX)s)"                % locals()
+    _strCutIPChi2 = "(MIPCHI2DV(PRIMARY)> %(IPCHI2_MAX_Child_MIN)s)" % locals()
+    
+    _strCuts = '((~ISMUON)&' + _strCutChi2 + '&' + _strCutPT + '&' + _strCutP \
+                   + '&' + _strCutPID \
+                   + '&' + _strCutGHOST + '&' + _strCutIPChi2 + ')'
+    _trackFilter = FilterDesktop(Code = _strCuts)
+    inputTracks = DataOnDemand(Location = inputName)
+    return Selection(name,
+                     Algorithm          = _trackFilter,
+                     RequiredSelections = [inputTracks])
+                     
+def filterKaons(name, inputName, TrkChi2_MAX_Child_MAX, Trk_PT_MIN, Trk_P_MIN,Trk_GHOST_MAX,KAON_PIDK_MIN, IPCHI2_MAX_Child_MIN):
+    """
+    Apply cuts to daughters of D0
+    """
+    _strCutChi2   = "(TRCHI2DOF < %(TrkChi2_MAX_Child_MAX)s)"     % locals()
+    _strCutPT     = "(PT > %(Trk_PT_MIN)s)"                       % locals()
+    _strCutP      = "(P  > %(Trk_P_MIN)s)"                        % locals()
+    _strCutPID    = "(PIDK  > %(KAON_PIDK_MIN)s)"                 % locals()
+    _strCutGHOST  = "(TRGHP  < %(Trk_GHOST_MAX)s)"                % locals()
+    _strCutIPChi2 = "(MIPCHI2DV(PRIMARY)> %(IPCHI2_MAX_Child_MIN)s)" % locals()
+    
+    _strCuts = '((~ISMUON)&' + _strCutChi2 + '&' + _strCutPT + '&' + _strCutP \
+                   + '&' + _strCutPID \
+                   + '&' + _strCutGHOST + '&' + _strCutIPChi2 + ')'
+    _trackFilter = FilterDesktop(Code = _strCuts)
+    inputTracks = DataOnDemand(Location = inputName)
+    return Selection(name,
+                     Algorithm          = _trackFilter,
+                     RequiredSelections = [inputTracks])                     
+
+def makeD0(name, inputDecayDescriptors, inputDaughters, Pair_SumAPT_MIN, Pair_AMINDOCA_MAX, Pair_BPVVD_MIN, Pair_BPVCORRM_MAX, FDCHI2_D0_MIN, DIRA_D0_MIN,M_MIN, M_MAX, VCHI2_D0_MAX):
+    """
+    Given lists of D0 daughter tracks  reconstruct D0 -> h+ h-.
+    The same routine works for all final states.
+    """
+
+    _combCutsMass = "(AM<1200*MeV)" 
+    _combCutsPT   = "((APT1+APT2)> %(Pair_SumAPT_MIN)s)"                                % locals()
+    _combCutsDOCA = "(AMINDOCA('LoKi::TrgDistanceCalculator') < %(Pair_AMINDOCA_MAX)s)" % locals()
+    _combCutsPV   = "(AALLSAMEBPV(-1,-1,-1))"
+    
+    _combCuts = '(' + _combCutsMass + '&' + _combCutsPT + '&' \
+                    + _combCutsDOCA + '&' + _combCutsPV + ')'
+    
+    _motherCutsFD       = '(BPVVD> %(Pair_BPVVD_MIN)s)'            % locals()
+    _motherCutsCorrMass = '(BPVCORRM < %(Pair_BPVCORRM_MAX)s)'     % locals()
+    _motherCutsFDChi2   = '(BPVVDCHI2> %(FDCHI2_D0_MIN)s)'         % locals()
+    _motherCutsDira     = '(BPVDIRA > %(DIRA_D0_MIN)s)'            % locals()
+    _motherCutsMass_MIN     = '(M > %(M_MIN)s)'                        % locals()
+    _motherCutsMass_MAX     = '(M < %(M_MAX)s)'                        % locals()
+    _motherCutsVtx      = '(VFASPF(VCHI2PDOF) < %(VCHI2_D0_MAX)s)' % locals()
+    
+    _motherCuts = '(' + _motherCutsFD           + '&' + \
+                        _motherCutsCorrMass     + '&' + \
+                        _motherCutsFDChi2       + '&' + \
+                        _motherCutsDira         + '&' + \
+                        _motherCutsMass_MIN     + '&' + \
+                        _motherCutsMass_MAX     + '&' + \
+                        _motherCutsVtx          + ')'
+    
+    _D0 = CombineParticles(DecayDescriptors = inputDecayDescriptors,
+                            CombinationCut   = _combCuts,
+                            MotherCut        = _motherCuts)
+    return Selection(name,
+                     Algorithm = _D0,
+                     RequiredSelections = inputDaughters)
+
+def makeDstar(name, inputD0, IPCHI2_PiSlow_MAX, PairMaxDoca_Dstar, PT_Dstar_MIN, DeltaM_MIN, DeltaM_MAX):
+    """
+    Given a list of D0, try to make D*+ -> D0 pi+
+    """
+    _softPi = DataOnDemand(Location = 'Phys/StdAllLoosePions/Particles')
+    
+    
+    _cutsSoftPi = '( MIPCHI2DV(PRIMARY) < %(IPCHI2_PiSlow_MAX)s)' % locals()
+    
+    _cutsDstarCombBase = '(AALLSAMEBPV(-1,-1,-1))' 
+    _cutsDstarCombDoca = "((AMAXDOCA('LoKi::TrgDistanceCalculator') < %(PairMaxDoca_Dstar)s))" % locals()
+    
+    _cutsDstarComb = '(' + _cutsDstarCombBase + '&' + \
+                           _cutsDstarCombDoca + ')'
+    
+    
+    _cutsDstarMothPT       = '(PT > %(PT_Dstar_MIN)s)' % locals()
+    _cutsDstarMothMassLow  = "(M-MAXTREE('D0'==ABSID,M)>%(DeltaM_MIN)s)" % locals()
+    _cutsDstarMothMassHigh = "(M-MAXTREE('D0'==ABSID,M)<%(DeltaM_MAX)s)" % locals()
+    
+    _cutsDstarMoth = '(' + _cutsDstarMothPT + '&' + \
+                     _cutsDstarMothMassLow  + '&' + \
+                     _cutsDstarMothMassHigh + ')'
+    
+    _Dstar = CombineParticles(DecayDescriptors = ["D*(2010)+ -> D0 pi+", "D*(2010)- -> D0 pi-"],
+                              DaughtersCuts    = {"pi+" : _cutsSoftPi},
+                              CombinationCut   = _cutsDstarComb,
+                              MotherCut        = _cutsDstarMoth)
+    return Selection(name,
+                     Algorithm = _Dstar,
+                     RequiredSelections = inputD0 + [_softPi])
+                     
+def makeTisTos( name, selection, hltTisTosSpec = { } ) :
+    outSel = selection
+    if len(hltTisTosSpec) > 0:
+        _tisTosFilter = TisTosParticleTagger( name + 'TisTos'
+                                              , TisTosSpecs = hltTisTosSpec )
+
+        outSel = Selection( name
+                            , Algorithm = _tisTosFilter
+                            , RequiredSelections = [ selection ] )
+
+    return outSel
+    
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDstarD02hhPi0PartRecoForPhotonCalib.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDstarD02hhPi0PartRecoForPhotonCalib.py
new file mode 100644
index 000000000..c9565f9c9
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingDstarD02hhPi0PartRecoForPhotonCalib.py
@@ -0,0 +1,348 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for D*+ - > D0 (h h gamma x) pi+ 
+
+Missing is photon from pi0->gamma gamma
+For soft photon calibration within SoftPhotonApplications (SPA) 
+
+Authors: Jolanta Brodzicka, Marcello Rotondo
+
+In (summer) 2019 campaign2:
+For S24r2 S28r2 S29r2p1 2019 campaign2: release tight HH VDCHI2 (!!!)
+"""
+
+########################################################################
+__author__ = ['Jolanta Brodzicka', 'Marcello Rotondo']
+__date__ = '07/12/2017'
+__version__ = '$Revision: 3.0 $'
+
+__all__ = ('DstarD2hhGammaCalib',
+           'TOSFilter',
+           'default_config')
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from StandardParticles                     import StdAllNoPIDsPions, StdNoPIDsPions, StdNoPIDsKaons
+from StandardParticles                     import StdLooseAllPhotons, StdLooseResolvedPi0, StdLooseMergedPi0
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+
+from Configurables import FilterDesktop
+
+from GaudiKernel.SystemOfUnits import GeV, MeV, picosecond, mm
+
+default_config = {
+    'NAME'        : 'DstarD2hhGammaCalib',
+    'WGs'         : ['Charm'],
+    'BUILDERTYPE' : 'DstarD2hhGammaCalib',
+    'CONFIG'      : { 'PrescaleDstarD2KPiGamma' : 1,
+                      'PrescaleDstarD2KKGamma'  : 1,
+                      # Gamma
+                      'photonPT'                : 350 * MeV, #StdLooseAllPhotons #200->350 for 2017 in 2019 campaign2
+                      'MinPhotonCL'             : 0.25, #added in 2019 campaign2
+                      # HH
+                      'TrChi2'                  : 4,
+                      'TrGhostProb'             : 0.5,
+                      'MinTrkPT'                : 500 * MeV, 
+                      'MinTrkIPChi2'            : 10,
+                      'HighPIDK'                : -5, #pions #-1 ->-5 for 2017 in 2019 campaign2
+                      'LowPIDK'                 :  5, #kaons
+                      'CombMassLow_HH'          : 500 * MeV,
+                      'CombMassHigh_HH'         : 1820 * MeV,
+                      'MinCombPT'               : 2.0 * GeV, 
+                      'MaxADOCACHI2'            : 10.0,
+                      'MinVDCHI2_HHComb'        : 300.0, #1000->300 (!!!) in 2019 campaign2
+                      'MassLow_HH'              : 600 * MeV,
+                      'MassHigh_HH'             : 1810 * MeV,
+                      'MaxVCHI2NDOF_HH'         : 10.0, 
+                      'MinVDCHI2_HH'            : 500.0, #1000->500 (!!!) in 2019 campaign2
+                      # D0 -> HH Gamma
+                      'CombMassLow'             : 1330 * MeV,#1380 -> 1330 in 2019 campaign2
+                      'CombMassHigh'            : 2220 * MeV,#2120 -> 2220 in 2019 campaign2
+                      'MassLow'                 : 1350 * MeV,#1400 -> 1350 in 2019 campaign2
+                      'MassHigh'                : 2200 * MeV,#2100 -> 2200 in 2019 campaign2
+                      'MinPT'                   : 2.5 * GeV, 
+                      'MaxVCHI2NDOF'            : 10.0,
+                      'MinBPVDIRA'              : 0.995, 
+                      'MinBPVTAU'               : 0.1 * picosecond, 
+                      'MaxIPChi2'               : 15, 
+                      # D* -> D0 pi+
+                      'PiSoft_PT_MIN'           : 250 * MeV,
+                      'Daug_TRCHI2DOF_MAX'      : 3,
+                      'Dstar_AMDiff_MAX'        : 180 * MeV,
+                      'Dstar_VCHI2VDOF_MAX'     : 15.0,
+                      'Dstar_MDiff_MAX'         : 165 * MeV, #160 -> 165 in 2019 campaign2
+                      # HLT filters, only process events firing triggers matching the RegEx
+                      'Hlt1Filter': None,
+                      'Hlt2Filter': None, #"HLT_PASS_RE('Hlt2CharmHadInclDst2PiD02HHXBDTDecision')", 
+                      'Hlt1Tos': {'Hlt1.*Track.*Decision%TOS' : 0}, 
+                      #'Hlt2Tos': {'Hlt2CharmHadInclDst2PiD02HHXBDTDecision%TOS' : 0, 'Hlt2PhiIncPhiDecision%TOS' : 0}
+                      'Hlt2Tos': {'Hlt2CharmHadInclDst2PiD02HHXBDTDecision%TOS' : 0}
+                    },
+    'STREAMS'     : ['CharmCompleteEvent']
+    }
+
+class DstarD2hhGammaCalib( LineBuilder ) :
+    """Class defining the D*+ -> (D0 -> (X->h h) gamma) pi+ stripping lines"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        # Select photons
+        self.selPhotons = {'': self.makePhoton('GammaFor'+name,
+                                                config['photonPT'],
+                                                config['MinPhotonCL'])}
+
+        self.HHForD2XGamma, self.D2XGamma, self.Dst2D0pi, self.lineDstarD2XGamma = {}, {}, {}, {}
+
+        decays = { 'KPiGamma'   : {'HHdesc': ['K*(892)0 -> K- pi+', 'K*(892)0 -> K+ pi-'], 'D0desc': ['D0 -> K*(892)0 gamma'] },
+                   'KKGamma'    : {'HHdesc': ['phi(1020) -> K+ K-'], 'D0desc': ['D0 -> phi(1020) gamma'] },
+                     }
+
+        for decay, decayDescriptors in decays.iteritems():
+            # make the various stripping selections
+            DstarD2XGammaName   = name + "DstarD2" + decay
+            D2XGammaName   = name + "D2" + decay
+            HHCombName   = name + "HHForD2" + decay
+
+            inputs = [ StdNoPIDsKaons ] if decays == 'KKGamma' else [ StdNoPIDsPions, StdNoPIDsKaons ]
+
+            # Create the 2-body candidate
+            self.HHForD2XGamma[decay] = self.makeHH(HHCombName,
+                                                     decayDescriptors['HHdesc'],
+                                                     config['TrChi2'],
+                                                     config['TrGhostProb'],
+                                                     config['MinTrkPT'],
+                                                     config['MinTrkIPChi2'],
+                                                     config['HighPIDK'],
+                                                     config['LowPIDK'],
+                                                     config['CombMassLow_HH'],
+                                                     config['CombMassHigh_HH'],
+                                                     config['MinCombPT'],
+                                                     config['MaxADOCACHI2'],
+                                                     config['MinVDCHI2_HHComb'],
+                                                     config['MassLow_HH'],
+                                                     config['MassHigh_HH'],
+                                                     config['MaxVCHI2NDOF_HH'],
+                                                     config['MinVDCHI2_HH'],
+                                                     inputs
+                                                     )
+
+            for phName, photons in self.selPhotons.iteritems():
+
+                # Create the D0 candidate
+                self.D2XGamma[decay+phName] = self.makeD2XGamma(D2XGammaName+phName,
+                                                                decayDescriptors['D0desc'],
+                                                                config['CombMassLow'],
+                                                                config['CombMassHigh'],
+                                                                config['MassLow'],
+                                                                config['MassHigh'],
+                                                                config['MinPT'],
+                                                                config['MaxVCHI2NDOF'],
+                                                                config['MinBPVDIRA'],
+                                                                config['MinBPVTAU'],
+                                                                config['MaxIPChi2'],
+                                                                inputSel = [self.HHForD2XGamma[decay], photons]
+                                                                )
+
+                # Create the D* candidate
+                self.Dst2D0pi[decay+phName] = self.makeDstar2D0Pi(DstarD2XGammaName+phName,
+                                                                  config,
+                                                                  ['D*(2010)+ -> D0 pi+', 'D*(2010)- -> D0 pi-'],
+                                                                  inputSel = [self.D2XGamma[decay+phName], StdAllNoPIDsPions], 
+                                                                  Hlt1TOS = config['Hlt1Tos'],
+                                                                  Hlt2TOS = config['Hlt2Tos'] )
+
+                # Create the stripping line
+                self.lineDstarD2XGamma[decay+phName] = StrippingLine(DstarD2XGammaName+phName+"Line",
+                                                                     prescale  = config['PrescaleDstarD2'+decay+phName],
+                                                                     selection = self.Dst2D0pi[decay+phName],
+                                                                     HLT1 = config['Hlt1Filter'],
+                                                                     HLT2 = config['Hlt2Filter'],
+                                                                     )
+
+                # Register the line
+                self.registerLine(self.lineDstarD2XGamma[decay+phName])
+        # end loop on decay modes
+
+    def makePhoton(self, name, photonPT, MinPhotonCL):
+        """Create photon Selection object starting from DataOnDemand 'Phys/StdLooseAllPhotons'.
+
+        @arg name: name of the Selection.
+        @arg photonPT: PT of the photon
+
+        @return: Selection object
+
+        """
+        # Prepare selection
+        _code = " (PT> %(photonPT)s*MeV)" \
+                "&(CL> %(MinPhotonCL)s)" % locals()
+        _gammaFilter = FilterDesktop(name = "GammaFilter_"+name, Code=_code)
+        _stdGamma = StdLooseAllPhotons
+        return Selection(name, Algorithm=_gammaFilter, RequiredSelections=[_stdGamma])
+
+
+    def makeHH(self, name, decayDescriptors,
+               trChi2,trGhostProb,minTrkPT,minIPChi2,
+               highPIDK, lowPIDK,
+               amMin, amMax, minPT, maxDocaChi2, minVDChi2comb,
+               vmMin, vmMax, maxVChi, minVDChi2, inputSel) :
+        """
+          Create and return a X -> HH (H=K,pi) Selection object.
+          Arguments:
+          name             : name of the Selection.
+          DecayDescriptors : DecayDescriptors.
+          trChi2           : maximum tracks chi2
+          trGhostProb      : maximum tracks ghost probability
+          minPT            : minimum tracks PT
+          minIPChi2        : minimum tracks IPChi2
+          highPIDK         : maximum PIDk for pions
+          lowPIDK          : minimum PIDk for kaons
+          amMin            : minimum combination mass
+          amMax            : maximum combination mass
+          minPT            : minimum combination PT
+          maxDocaChi2      : maximum 2-tracks DocaChi2
+          minVDChi2comb    : minimum vertex distance chi2
+          vmMax            : maximum vertex mass
+          maxVChi          : maximum vertex chi2
+          minVDChi2        : minimum vertex distance chi2
+          inputSel         : input selections
+        """
+
+        _daughters_cuts = " (TRGHOSTPROB < %(trGhostProb)s)" \
+                          "&(TRCHI2DOF < %(trChi2)s)" \
+                          "&(PT > %(minTrkPT)s)" \
+                          "&(MIPCHI2DV(PRIMARY) > %(minIPChi2)s )" %locals()
+        _pidPi = "&(PIDK < %(highPIDK)s)" %locals()
+        _pidK  = "&(PIDK > %(lowPIDK)s)" %locals()
+
+        _combination_cuts =  (" (in_range( %(amMin)s, AM, %(amMax)s ) ) " \
+                              "&( (APT1+APT2) > %(minPT)s )"  \
+                              "&( ACHI2DOCA(1,2) < %(maxDocaChi2)s )" %locals() )
+
+        _mother_cuts = (" (in_range( %(vmMin)s, M, %(vmMax)s )) " \
+                        "&(VFASPF(VCHI2PDOF) < %(maxVChi)s)" \
+                        "&( BPVVDCHI2 > %(minVDChi2)s )" %locals() )
+
+        CombineX2HH = CombineParticles(DecayDescriptors = decayDescriptors,
+                                       DaughtersCuts = { "pi+" : _daughters_cuts+_pidPi, "K+" : _daughters_cuts+_pidK },
+                                       CombinationCut = _combination_cuts,
+                                       MotherCut = _mother_cuts)
+
+        return Selection(name,
+                         Algorithm = CombineX2HH,
+                         RequiredSelections = inputSel )
+
+
+    def makeD2XGamma( self, name, decayDescriptors,
+                      amMin, amMax,
+                      vmMin, vmMax, minPT, maxVChi, minbpvDira, minLT, maxIPChi,
+                      inputSel ) :
+        """
+          Create and return a D0 -> X Gamma (X=resonance) Selection object.
+          Arguments:
+          name            : name of the Selection.
+          DecayDescriptors: DecayDescriptors.
+          amMin           : minimum combination mass
+          amMax           : maximum combination mass
+          vmMin           : minimum vertex mass
+          vmMax           : maximum vertex mass
+          minPT           : minimum vertex PT
+          maxVChi         : maximum vertex chi2
+          minLT           : minimum lifetime wrt best PV
+          maxIPChi        : maximum IP chi2 wrt best PV
+          inputSel        : input selections
+        """
+
+        _combination_cuts =  (" (in_range( %(amMin)s, AM, %(amMax)s )) " %locals() )
+        _mother_cuts = (" (in_range( %(vmMin)s* MeV, M, %(vmMax)s )) " \
+                        "&(PT > %(minPT)s)" \
+                        "&(VFASPF(VCHI2PDOF) < %(maxVChi)s)" \
+                        "&(BPVDIRA > %(minbpvDira)s )" \
+                        "&(BPVLTIME() > %(minLT)s )" \
+                        "&(BPVIPCHI2() < %(maxIPChi)s )" %locals() )
+
+        CombineD2XGamma = CombineParticles(DecayDescriptors = decayDescriptors,
+                                           CombinationCut = _combination_cuts,
+                                           MotherCut = _mother_cuts)
+
+        return Selection(name,
+                         Algorithm = CombineD2XGamma,
+                         RequiredSelections = inputSel )
+
+
+    def makeDstar2D0Pi(self, name,
+                       config,
+                       DecayDescriptors,
+                       inputSel,
+                       Hlt1TOS,   
+                       Hlt2TOS) : 
+        """
+          Create and return a D* -> D0 pi Selection object.
+          Arguments:
+          name        : name of the Selection.
+          config      : dictionary of cut values.
+          DecayDescriptor: DecayDescriptor.
+          inputSel    : input selections
+        """
+
+        def makeTISTOS( name, _input, _hlttos ) :
+            from Configurables import TisTosParticleTagger
+            _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+            _tisTosFilter.TisTosSpecs = _hlttos
+            return Selection( name
+                              , Algorithm = _tisTosFilter
+                              , RequiredSelections = [ _input ]
+                              )        
+
+        daugCuts = "(PT > %(PiSoft_PT_MIN)s)" \
+                   "&(TRCHI2DOF < %(Daug_TRCHI2DOF_MAX)s)" % locals()['config']
+
+        combCuts = "((AM - AM1) < %(Dstar_AMDiff_MAX)s)" % locals()['config']
+        dstarCuts = " (VFASPF(VCHI2/VDOF) < %(Dstar_VCHI2VDOF_MAX)s)" \
+                    "&((M - M1) < %(Dstar_MDiff_MAX)s)" % locals()['config']
+
+        _Dstar = CombineParticles(DecayDescriptors = DecayDescriptors,
+                                  DaughtersCuts = { "pi+" : daugCuts },
+                                  CombinationCut = combCuts,
+                                  MotherCut = dstarCuts )
+
+
+        _sel = Selection(name+'Sel',
+                         Algorithm = _Dstar,
+                         RequiredSelections = inputSel
+                         )
+
+
+#        return Selection(name+'Sel',
+#                         Algorithm = _Dstar,
+#                         RequiredSelections = inputSel
+#                         )
+
+        _selDstarHlt1TOS = makeTISTOS( name + "DstarHlt1TOS"
+                                    , _sel
+                                    , Hlt1TOS
+                                            )
+        _selDstarHlt2TOS = makeTISTOS( name + "DstarHlt2TOS"
+                                            , _selDstarHlt1TOS
+                                            , Hlt2TOS
+                                            )
+       
+        return _selDstarHlt2TOS
+
+########################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingElectronID.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingElectronID.py
new file mode 100644
index 000000000..303a20f8e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingElectronID.py
@@ -0,0 +1,358 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for electron ID studies, including one
+Tag-And-Probe line for lifetime biased Jpsi->ee
+
+To include it:
+
+from StrippingSelections.StrippingElectronID import ElectronIDConf
+StrippingElectronIDConf =  ElectronIDConf( name = 'Jpsi2eeForElectronID', config = ElectronIDConf.config_default )
+stream.appendLines( [
+    StrippingElectronIDConf.line
+    ])
+'''
+
+__author__=['Jibo He','Vitalii Lisovskyi']
+__date__ = '21/06/2021'
+__version__= '$Revision: 1.2 $'
+
+
+__all__ = (
+    'ElectronIDConf',
+    'makeEE',
+    'default_config'
+    )
+
+
+config_default =  {
+        'JpsiLinePrescale'            :   0, #.5   ,
+        'JpsiLineHltFilter'           : None    ,
+
+        'Both_PT'                 :  500.   ,  # MeV
+        'Both_P'                  : 3000.   ,  # MeV
+        'Both_TRCHI2DOF'          :    5.   ,
+        'Both_MIPCHI2'            :    9.   ,
+
+        'Tag_PT'                  : 1500.   ,  # MeV
+        'Tag_P'                   : 6000.   ,  # MeV
+        'Tag_PIDe'                :    5.   ,
+        'Tag_MIPCHI2'             :    9.   ,
+
+        'Probe_PT'                :  500.   ,  # MeV
+        'Probe_P'                 : 3000.   ,  # MeV
+        'Probe_MIPCHI2'           :    9.   ,
+
+        'eeCombMinMass'           : 2100.   ,  # MeV
+        'eeCombMaxMass'           : 4300.   ,  # MeV
+        'eeVCHI2PDOF'             :    9.   ,
+        'eeMinMass'               : 2200.   ,  # MeV
+        'eeMaxMass'               : 4200.   ,  # MeV
+
+        'JpsiLineCut'             : "(PT>2.*GeV) & (BPVDLS>50) ",
+
+        'Bu2JpsieeKLine_Prescale'  :  1,
+        'Bu2JpsieeKLine_HltFilter' : None,
+        'Bu2JpsieeKLine_KaonCut'   : "(TRCHI2DOF<4) & (PT>1.0*GeV) & (P>3.0*GeV) & (PIDK>5) & (BPVIPCHI2()>9)", #  & (PIDK >0)
+        'Bu2JpsieeKLine_JpsiCut'   : "(BPVDLS>4)",
+        'Bu2JpsieeKLine_BuComCut'  : "in_range(4.1*GeV,AM,6.1*GeV)",
+        'Bu2JpsieeKLine_BuMomCut'  : "in_range(4.2*GeV,M, 6.0*GeV) & (VFASPF(VCHI2PDOF)<9)",
+
+        'Bu2JpsieeKLine_notagID_Prescale'  :  1,
+        'Bu2JpsieeKLine_notagID_HltFilter' : None,
+        'Bu2JpsieeKLine_notagID_KaonCut'   : "(TRCHI2DOF<4) & (PT>1.0*GeV) & (P>3.0*GeV) & (PIDK>5) & (BPVIPCHI2()>9)", #  & (PIDK >0)
+        'Bu2JpsieeKLine_notagID_JpsiCut'   : "(BPVDLS>4)",
+        'Bu2JpsieeKLine_notagID_BuComCut'  : "in_range(3.6*GeV,AM,8.*GeV)",
+        'Bu2JpsieeKLine_notagID_BuMomCut'  : "(PT>3200) & (VFASPF(VCHI2PDOF)<9) & in_range(4.5*GeV,DTF_FUN(M,True,'J/psi(1S)'),6.0*GeV)"
+        #'Bu2JpsieeKLine_notagID_BuMomCut'  : "in_range(4.2*GeV,M, 6.0*GeV) & (VFASPF(VCHI2PDOF)<6) & (PT>3000)",
+        }
+
+default_config = {
+    'NAME'        : 'ElectronIDCalib',
+    'WGs'         : ['Calib'],
+    'BUILDERTYPE' : 'ElectronIDConf',
+    'CONFIG'      : config_default,
+    'STREAMS'     : { 'Leptonic' : ['StrippingElectronIDCalibBu2JpsiK_notagIDLine'], 'BhadronCompleteEvent' : ['StrippingElectronIDCalibBu2JpsiKLine'] }
+    }
+
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class ElectronIDConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config ):
+
+        LineBuilder.__init__(self, name, config)
+
+        self.name = name
+        self.config = config
+
+        self.JpsiList= makeEE( 'eeFor'+self.name,
+                                    #
+                                    Both_PT = config['Both_PT'],
+                                    Both_P = config['Both_P'],
+                                    Both_TRCHI2DOF = config['Both_TRCHI2DOF'],
+                                    Both_MIPCHI2 = config['Both_MIPCHI2'],
+                                    #
+                                    Tag_PT = config['Tag_PT'],
+                                    Tag_P = config['Tag_P'],
+                                    Tag_PIDe = config['Tag_PIDe'],
+                                    Tag_MIPCHI2 = config['Tag_MIPCHI2'],
+                                    #
+                                    Probe_PT = config['Probe_PT'],
+                                    Probe_P = config['Probe_P'],
+                                    Probe_MIPCHI2 = config['Probe_MIPCHI2'],
+                                    #
+                                    eeCombMinMass = config['eeCombMinMass'],
+                                    eeCombMaxMass = config['eeCombMaxMass'],
+                                    eeVCHI2PDOF = config['eeVCHI2PDOF'],
+                                    eeMinMass = config['eeMinMass'],
+                                    eeMaxMass = config['eeMaxMass']
+                                    )
+
+        self.JpsiList_notagID= makeEE_notagID( 'ee_notagIDFor'+self.name,
+                                    #
+                                    Both_PT = config['Both_PT'],
+                                    Both_P = config['Both_P'],
+                                    Both_TRCHI2DOF = config['Both_TRCHI2DOF'],
+                                    Both_MIPCHI2 = config['Both_MIPCHI2'],
+                                    #
+                                    Tag_PT = config['Tag_PT'],
+                                    Tag_P = config['Tag_P'],
+                                    #Tag_PIDe = config['Tag_PIDe'],
+                                    Tag_MIPCHI2 = config['Tag_MIPCHI2'],
+                                    #
+                                    Probe_PT = config['Probe_PT'],
+                                    Probe_P = config['Probe_P'],
+                                    Probe_MIPCHI2 = config['Probe_MIPCHI2'],
+                                    #
+                                    eeCombMinMass = config['eeCombMinMass'],
+                                    eeCombMaxMass = config['eeCombMaxMass'],
+                                    eeVCHI2PDOF = config['eeVCHI2PDOF'],
+                                    eeMinMass = config['eeMinMass'],
+                                    eeMaxMass = config['eeMaxMass']
+                                    )
+
+        self.makeJpsi2eeLine()
+        self.makeBu2JpsieeKLine()
+        self.makeBu2JpsieeKLine_notagID()
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = True)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+
+
+    def makeJpsi2eeLine( self ):
+
+        Jpsi2eeForElectronID = self.createSubSel(  OutputList = self.JpsiList.name() + "ForJpsi2eeLine",
+                                                   InputList  = self.JpsiList,
+                                                   Cuts = self.config['JpsiLineCut'] )
+
+
+        Jpsi2eeForElectronIDLine = StrippingLine( self.name + "JpsiLine",
+                                                  HLT       = self.config['JpsiLineHltFilter'],
+                                                  algos = [ Jpsi2eeForElectronID ],
+                                                  prescale = self.config['JpsiLinePrescale']
+                                                  )
+
+        self.registerLine( Jpsi2eeForElectronIDLine )
+
+
+    def makeBu2JpsieeKLine( self ):
+
+        from StandardParticles import StdTightKaons
+
+        Bu2JpsieeK = self.createCombinationSel(
+            OutputList = "Bu2JpsieeKFor" + self.name,
+            DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+            DaughterLists = [ self.JpsiList, StdTightKaons ],
+                DaughterCuts = { "J/psi(1S)" :  self.config['Bu2JpsieeKLine_JpsiCut'],
+                                 "K+"        :  self.config['Bu2JpsieeKLine_KaonCut']},
+                PreVertexCuts = self.config['Bu2JpsieeKLine_BuComCut'],
+                PostVertexCuts = self.config['Bu2JpsieeKLine_BuMomCut'] )
+
+        Bu2JpsieeKLine = StrippingLine( self.name + "Bu2JpsiKLine",
+                                        HLT       = self.config['Bu2JpsieeKLine_HltFilter'],
+                                        algos = [ Bu2JpsieeK ] ,
+                                        RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                        prescale = self.config["Bu2JpsieeKLine_Prescale"]
+                                        )
+        self.registerLine( Bu2JpsieeKLine )
+
+    def makeBu2JpsieeKLine_notagID( self ):
+
+        from StandardParticles import StdTightKaons
+
+        Bu2JpsieeK_notagID = self.createCombinationSel(
+            OutputList = "Bu2JpsieeK_notagIDFor" + self.name,
+            DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+            DaughterLists = [ self.JpsiList_notagID, StdTightKaons ],
+                DaughterCuts = { "J/psi(1S)" :  self.config['Bu2JpsieeKLine_notagID_JpsiCut'],
+                                 "K+"        :  self.config['Bu2JpsieeKLine_notagID_KaonCut']},
+                PreVertexCuts = self.config['Bu2JpsieeKLine_notagID_BuComCut'],
+                PostVertexCuts = self.config['Bu2JpsieeKLine_notagID_BuMomCut'] )
+
+        Bu2JpsieeKLine_notagID = StrippingLine( self.name + "Bu2JpsiK_notagIDLine",
+                                        HLT       = self.config['Bu2JpsieeKLine_notagID_HltFilter'],
+                                        algos = [ Bu2JpsieeK_notagID ] ,
+                                        RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                        prescale = self.config["Bu2JpsieeKLine_notagID_Prescale"]
+                                        )
+        self.registerLine( Bu2JpsieeKLine_notagID )
+
+def makeEE( name,
+            #
+            Both_PT,
+            Both_P,
+            Both_TRCHI2DOF,
+            Both_MIPCHI2,
+            #
+            Tag_PT,
+            Tag_P,
+            Tag_PIDe,
+            Tag_MIPCHI2,
+            #
+            Probe_PT,
+            Probe_P,
+            Probe_MIPCHI2,
+            #
+            eeCombMinMass,
+            eeCombMaxMass,
+            eeVCHI2PDOF,
+            eeMinMass,
+            eeMaxMass
+            ):
+
+    from StandardParticles import StdNoPIDsElectrons as NoPIDsElectronsForElectronID
+
+    InAccCuts = "(0.5<PPINFO(LHCb.ProtoParticle.InAccEcal,-1))"
+
+    BothCuts = "(PT> %(Both_PT)s *MeV)"\
+               " & (TRCHI2DOF < %(Both_TRCHI2DOF)s)"\
+               " & (MINTREE('e+'==ABSID,BPVIPCHI2())> %(Both_MIPCHI2)s )" % locals()
+
+    EEComCut = "(in_range(%(eeCombMinMass)s *MeV, AM, %(eeCombMaxMass)s *MeV))" % locals()
+
+    EEMomCut = "(VFASPF(VCHI2)< %(eeVCHI2PDOF)s)"\
+               " & (in_range(%(eeMinMass)s *MeV, MM, %(eeMaxMass)s *MeV))" % locals()
+
+    Tag1Cuts = "(CHILDCUT((PT>%(Tag_PT)s*MeV),1)) & (CHILDCUT((PIDe>%(Tag_PIDe)s),1)) & (CHILDCUT((P>%(Tag_P)s*MeV),1))"\
+               " & (CHILDCUT((BPVIPCHI2()> %(Tag_MIPCHI2)s),1))" % locals()
+    Tag2Cuts = "(CHILDCUT((PT>%(Tag_PT)s*MeV),2)) & (CHILDCUT((PIDe>%(Tag_PIDe)s),2)) & (CHILDCUT((P>%(Tag_P)s*MeV),2))"\
+               " & (CHILDCUT((BPVIPCHI2()> %(Tag_MIPCHI2)s),2))" % locals()
+
+    Probe1Cuts = "(CHILDCUT((PT>%(Probe_PT)s*MeV),1)) & (CHILDCUT((P>%(Probe_P)s*MeV),1))"\
+                 " & (CHILDCUT((BPVIPCHI2()> %(Probe_MIPCHI2)s),1))" % locals()
+    Probe2Cuts = "(CHILDCUT((PT>%(Probe_PT)s*MeV),2)) & (CHILDCUT((P>%(Probe_P)s*MeV),2))"\
+                 " & (CHILDCUT((BPVIPCHI2()> %(Probe_MIPCHI2)s),2))" % locals()
+
+    Tag1Probe2Cuts = Tag1Cuts + " & " + Probe2Cuts
+    Tag2Probe1Cuts = Tag2Cuts + " & " + Probe1Cuts
+
+    _EE = CombineParticles( DecayDescriptor = "J/psi(1S) -> e+ e-",
+                            DaughtersCuts = {"e+" : InAccCuts + "&" + BothCuts },
+                            CombinationCut = EEComCut,
+                            MotherCut = EEMomCut + " & ( ( " + Tag1Probe2Cuts + " ) | (" + Tag2Probe1Cuts + " ) ) "
+                            )
+
+    return Selection( name,
+                      Algorithm = _EE,
+                      RequiredSelections = [ NoPIDsElectronsForElectronID ]
+                      )
+
+
+def makeEE_notagID( name,
+            #
+            Both_PT,
+            Both_P,
+            Both_TRCHI2DOF,
+            Both_MIPCHI2,
+            #
+            Tag_PT,
+            Tag_P,
+            #Tag_PIDe,
+            Tag_MIPCHI2,
+            #
+            Probe_PT,
+            Probe_P,
+            Probe_MIPCHI2,
+            #
+            eeCombMinMass,
+            eeCombMaxMass,
+            eeVCHI2PDOF,
+            eeMinMass,
+            eeMaxMass
+            ):
+
+    from StandardParticles import StdNoPIDsElectrons as NoPIDsElectronsForElectronID
+
+    InAccCuts = "(ALL)"#"(0.5<PPINFO(LHCb.ProtoParticle.InAccEcal,-1))"
+
+    BothCuts = "(PT> %(Both_PT)s *MeV)"\
+               " & (TRCHI2DOF < %(Both_TRCHI2DOF)s)"\
+               " & (MINTREE('e+'==ABSID,BPVIPCHI2())> %(Both_MIPCHI2)s )" % locals()
+
+    EEComCut = "(in_range(%(eeCombMinMass)s *MeV, AM, %(eeCombMaxMass)s *MeV))" % locals()
+
+    EEMomCut = "(VFASPF(VCHI2)< %(eeVCHI2PDOF)s)"\
+               " & (in_range(%(eeMinMass)s *MeV, MM, %(eeMaxMass)s *MeV))" % locals()
+
+    Tag1Cuts = "(CHILDCUT((PT>%(Tag_PT)s*MeV),1)) & (CHILDCUT((P>%(Tag_P)s*MeV),1))"\
+               " & (CHILDCUT((BPVIPCHI2()> %(Tag_MIPCHI2)s),1))" % locals()
+    Tag2Cuts = "(CHILDCUT((PT>%(Tag_PT)s*MeV),2)) & (CHILDCUT((P>%(Tag_P)s*MeV),2))"\
+               " & (CHILDCUT((BPVIPCHI2()> %(Tag_MIPCHI2)s),2))" % locals()
+
+    Probe1Cuts = "(CHILDCUT((PT>%(Probe_PT)s*MeV),1)) & (CHILDCUT((P>%(Probe_P)s*MeV),1))"\
+                 " & (CHILDCUT((BPVIPCHI2()> %(Probe_MIPCHI2)s),1))" % locals()
+    Probe2Cuts = "(CHILDCUT((PT>%(Probe_PT)s*MeV),2)) & (CHILDCUT((P>%(Probe_P)s*MeV),2))"\
+                 " & (CHILDCUT((BPVIPCHI2()> %(Probe_MIPCHI2)s),2))" % locals()
+
+    Tag1Probe2Cuts = Tag1Cuts + " & " + Probe2Cuts
+    Tag2Probe1Cuts = Tag2Cuts + " & " + Probe1Cuts
+
+    _EE = CombineParticles( DecayDescriptor = "J/psi(1S) -> e+ e-",
+                            DaughtersCuts = {"e+" : InAccCuts + "&" + BothCuts },
+                            CombinationCut = EEComCut,
+                            MotherCut = EEMomCut + " & ( ( " + Tag1Probe2Cuts + " ) | (" + Tag2Probe1Cuts + " ) ) "
+                            )
+
+    return Selection( name,
+                      Algorithm = _EE,
+                      RequiredSelections = [ NoPIDsElectronsForElectronID ]
+                      )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingElectronRecoEff.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingElectronRecoEff.py
new file mode 100644
index 000000000..253be2b58
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingElectronRecoEff.py
@@ -0,0 +1,976 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping line to mimic Electron Track Reconstruction Efficiency HLT2 line
+Tag and probe with VELO info for J/psi -> ee
+'''
+
+__author__=['Adam Davis','Laurent Dufour','V. V. Gligorov']
+__date__='14/1/2018'
+__version__='$Revision: 1.4 $'
+
+__all__ = (
+    'StrippingElectronRecoEffLines',
+    'default_config',
+    'TOSFilter'
+    )
+
+from Gaudi.Configuration import *
+from GaudiKernel.SystemOfUnits import GeV, MeV, mm
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, Hlt1Selection, Hlt2Selection, L0Selection #now exist
+from PhysConf.Selections import Hlt2TOSSelection
+from PhysConf.Selections import Hlt1TOSSelection
+from PhysConf.Selections import L0TOSSelection
+from PhysSelPython.Wrappers import DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+
+## for velo tracking
+from SelPy.utils import ( UniquelyNamedObject,
+                          ClonableObject,
+                          SelectionBase )
+from Configurables import (DecodeVeloRawBuffer, FastVeloTracking, TrackPrepareVelo, 
+                           NoPIDsParticleMaker, DataOnDemandSvc, ChargedProtoParticleMaker, 
+                           PrTrackAssociator, DelegatingTrackSelector, TrackContainerCopy, TrackAssociator,
+                          TrackStateInitAlg, TrackStateInitTool) 
+from TrackFitter.ConfiguredFitters import (ConfiguredEventFitter,
+                                           ConfiguredForwardStraightLineEventFitter)
+ 
+default_config = {'NAME': 'ElectronRecoEff',
+                  'WGs' : ['Calib'],
+                  'BUILDERTYPE':'StrippingElectronRecoEffLines',
+                  'CONFIG': {# from HLT line
+    'TrackGEC'             : 150,
+    # #velo options
+    'DoVeloDecoding'       : False,
+    "VeloFitter"           : "SimplifiedGeometry",
+    "VeloMINIP"            : 0.04 * mm,
+    "VeloTrackChi2"        : 5.0,
+    "EtaMinVelo"           : 1.9,
+    "EtaMaxVelo"           : 5.1,
+    #
+    'SharedChild'          : {'TrChi2Mu'   :   5,
+                              'TrChi2Ele'  :   5,
+                              'TrChi2Kaon' :   5,
+                              'TrChi2Pion' :   5,
+                              'IPMu'       :   0.0 * mm,
+                              'IPEle'      :   0.0 * mm,
+                              'IPKaon'     :   0.0 * mm,
+                              'IPPion'     :   0.0 * mm,
+                              'IPChi2Mu'   :   12,
+                              'IPChi2Ele'  :   12,
+                              'IPChi2Kaon' :   12,
+                              'IPChi2Pion' :   36,
+                              'EtaMinMu'   :   1.8,
+                              'EtaMinEle'  :   1.8,
+                              'EtaMaxMu'   :   5.1,
+                              'EtaMaxEle'  :   5.1,
+                              'ProbNNe'    :   0.2,
+                              'ProbNNmu'   :   0.5,
+                              'ProbNNk'    :   0.2,
+                              'ProbNNpi'   :   0.8,
+                              'PtMu'       :   1200 * MeV,
+                              'PtEle'      :   1200 * MeV,
+                              'PtKaon'     :   500 * MeV,
+                              'PtPion'     :   1000 * MeV },
+    'LooseSharedChild'     : {'TrChi2Mu'   :   5,
+                              'TrChi2Ele'  :   5,
+                              'TrChi2Kaon' :   5,
+                              'TrChi2Pion' :   5,
+                              'IPMu'       :   0.0 * mm,
+                              'IPEle'      :   0.0 * mm,
+                              'IPKaon'     :   0.0 * mm,
+                              'IPPion'     :   0.0 * mm,
+                              'IPChi2Mu'   :   8,
+                              'IPChi2Ele'  :   8,
+                              'EtaMinMu'   :   1.8,
+                              'EtaMinEle'  :   1.8,
+                              'EtaMaxMu'   :   5.1,
+                              'EtaMaxEle'  :   5.1,
+                              'ProbNNe'    :   0.2,
+                              'ProbNNmu'   :   0.2,
+                              'ProbNNk'    :   0.1,
+                              'PtMu'       :   1000 * MeV,
+                              'PtEle'      :   1000 * MeV,
+                              'PtKaon'     :   500 * MeV},
+    'DetachedPhi':            {"K_IPCHI2":   7,
+                               "K_PIDK":   1,
+                               "K_PT":   200,
+                               "PHI_PT": 400,
+                               "AMMIN":   900,
+                               "AMMAX":   1100,
+                               "MMIN":  980,
+                               "MMAX":  1050,
+                               "VCHI2":   100,
+                               "PHI_IPCHI2": 4
+                                },
+    "DetachedKstar":         {"K_PT": 250*MeV,
+                              "K_PROBNNk": 0.1,
+                              "Pi_PROBNNpi": 0.1,
+                              "Pi_PT": 250*MeV,
+                              "Pi_IPCHI2": 8,
+                              "K_IPCHI2": 8,
+                              "APTMIN": 500,
+                              "AMMIN": 600*MeV,
+                              "AMMAX": 1050*MeV,
+                              "MMIN": 750*MeV,
+                              "MMAX": 1000*MeV,
+                              "VCHI2": 20,
+                              "KST_IPCHI2": 4
+                              
+                              },
+    'DetachedEEK'          : {'AMTAP'      :   6000*MeV,
+                              'VCHI2TAP'   :   22,
+                              'MLOW'       :   5000.*MeV,
+                              'MHIGH'      :   5700.*MeV,
+                              'bmass_ip_constraint': -2.5,
+                              'overlapCut' :   0.95,
+                              'probePcutMin' : 750*MeV,
+                              'probePcutMax' : 150000*MeV,
+                              'TisTosSpec' :   {"Hlt1TrackMVA.*Decision%TOS":0}
+                              },
+    'DetachedEEKstar'          : {'AMTAP'      :   6000*MeV,
+                              'VCHI2TAP'   :   22,
+                              'MLOW'       :   5000.*MeV,
+                              'MHIGH'      :   5700.*MeV,
+                              'bmass_ip_constraint': -2.0,
+                              'overlapCut' :   0.95,
+                              'probePcutMin' : 750*MeV,
+                              'probePcutMax' : 150000*MeV,
+                              'TisTosSpec' :   {"Hlt1TrackMVA.*Decision%TOS":0}
+                              },
+    'DetachedEEPhi'          : {'AMTAP'      :   6000*MeV,
+                              'VCHI2TAP'   :   22,
+                              'MLOW'       :   5000.*MeV,
+                              'MHIGH'      :   5700.*MeV,
+                              'bmass_ip_constraint': -2.0,
+                              'overlapCut' :   0.95,
+                              'probePcutMin' : 750*MeV,
+                              'probePcutMax' : 150000*MeV,
+                              'TisTosSpec' :   {"Hlt1TrackMVA.*Decision%TOS":0}
+                              },
+    'DetachedMuMuK'        : {'AMTAP'      :   6000*MeV,
+                              'VCHI2TAP'   :   20,
+                              'MLOW'       :   5000.*MeV,                              
+                              'MHIGH'      :   5700.*MeV,
+                              'bmass_ip_constraint': -2.75,
+                              'probePcutMin' : 750*MeV,
+                              'probePcutMax' : 150000*MeV,
+                              "POINTINGMASSMAX" : 7200*MeV,
+                              "POINTINGMASSMIN": 3200*MeV,
+                              'TisTosSpec' :   {"Hlt1Track(Muon)?MVA.*Decision%TOS":0}
+                              },
+    'DetachedMuMuKstar'        : {'AMTAP'      :   6000*MeV,
+                              'VCHI2TAP'   :   20,
+                              'MLOW'       :   5000.*MeV,                              
+                              'MHIGH'      :   5700.*MeV,
+                              'bmass_ip_constraint': -2.5,
+                              'probePcutMin' : 750*MeV,
+                              'probePcutMax' : 150000*MeV,
+                              "POINTINGMASSMAX" : 7000*MeV,
+                              "POINTINGMASSMIN": 3500*MeV,
+                              'TisTosSpec' :   {"Hlt1Track(Muon)?MVA.*Decision%TOS":0}
+                              },
+    'DetachedMuMuPhi'        : {'AMTAP'      :   6000*MeV,
+                              'VCHI2TAP'   :   20,
+                              'MLOW'       :   5000.*MeV,                              
+                              'MHIGH'      :   5700.*MeV,
+                              'bmass_ip_constraint': -1.0,
+                              'probePcutMin' : 750*MeV,
+                              'probePcutMax' : 150000*MeV,
+                              "POINTINGMASSMAX" : 7000*MeV,
+                              "POINTINGMASSMIN": 3500*MeV,
+                              'TisTosSpec' :   {"Hlt1Track(Muon)?MVA.*Decision%TOS":0}
+                              },
+    'DetachedMuK'          : {'AM'         :   5400*MeV,
+                              'VCHI2'      :   10,
+                              'VDCHI2'     :   100,
+                              'DIRA'       :   0.95,
+                              "bCandFlightDist"          : 4.0*mm,
+                              'TisTosSpec' :   {"Hlt1Track(Muon)?MVA.*Decision%TOS":0}
+                              },
+    'DetachedMuPhi'          : {'AM'         :   5400*MeV,
+                              'VCHI2'      :   10,
+                              'VDCHI2'     :   100,
+                              'DIRA'       :   0.95,
+                              "bCandFlightDist"          : 3.0*mm,
+                              'TisTosSpec' :   {"Hlt1Track(Muon)?MVA.*Decision%TOS":0}
+                              },
+    'DetachedMuKstar'          : {'AM'         :   5400*MeV,
+                              'VCHI2'      :   10,
+                              'VDCHI2'     :   100,
+                              'DIRA'       :   0.95,
+                              "bCandFlightDist"          : 3.0*mm,
+                              'TisTosSpec' :   {"Hlt1Track(Muon)?MVA.*Decision%TOS":0}
+                              },
+
+    'DetachedEK'           : {'AM'         :   5500*MeV,
+                              'VCHI2'      :   10,
+                              'VDCHI2'     :   36,
+                              'DIRA'       :   0.95,
+                              "bCandFlightDist"          : 4.0*mm,
+                              'TisTosSpec' :   {"Hlt1TrackMVA.*Decision%TOS":0}
+                              },
+    
+    'DetachedEKstar'           : {'AM'         :   5500*MeV,
+                              'VCHI2'      :   10,
+                              'VDCHI2'     :   36,
+                              'DIRA'       :   0.95,
+                              "bCandFlightDist"          : 3.0*mm,
+                              'TisTosSpec' :   {"Hlt1TrackMVA.*Decision%TOS":0}
+                              },
+    'DetachedEPhi'           : {'AM'         :   5500*MeV,
+                              'VCHI2'      :   10,
+                              'VDCHI2'     :   36,
+                              'DIRA'       :   0.90,
+                              "bCandFlightDist"          : 3.0*mm,
+                              'TisTosSpec' :   {"Hlt1TrackMVA.*Decision%TOS":0}
+                              },
+    'L0TOS'                : {"DetachedMuK": "L0MuonDecision",
+                              "DetachedEK": "L0ElectronDecision"},
+    # The next decisions are "DECs"
+    'L0Req'                : {'DetachedEK'   : "L0_CHANNEL_RE('Electron')", # this is TOS!
+                              'DetachedMuK'  : "L0_CHANNEL_RE('Muon|Hadron')", # this is TOS!
+                              
+                              "DetachedMuKstar": "L0_CHANNEL_RE('Muon|Hadron')", # this is DEC!
+                              "DetachedMuPhi": "L0_CHANNEL_RE('Muon|Hadron')", # this is DEC!
+                              
+                              "DetachedEKstar" :"L0_CHANNEL_RE('Electron')", # this is DEC!
+                              "DetachedEPhi" :"L0_CHANNEL_RE('Muon|Electron|Hadron')" }, # this is DEC!
+    
+    'Hlt1Req'              : {'DetachedEKstar'  : "Hlt1TrackMVA.*Decision",
+                              'DetachedEPhi'  : "Hlt1TrackMVA.*Decision",
+                              'DetachedEK'   : "Hlt1TrackMVA.*Decision",
+                              'DetachedMuPhi': "Hlt1Track*MVA.*Decision",
+                              'DetachedMuKstar': "Hlt1Track*MVA.*Decision",
+                              'DetachedMuK'  : "Hlt1Track*MVA.*Decision"
+                              },
+    
+    'Hlt2Req'               : {'DetachedEK' : "Hlt2Topo(E)?2BodyDecision",
+                               'DetachedEKstar' : "Hlt2Topo(E)?2BodyDecision",
+                               'DetachedEPhi' : "Hlt2Topo(E)?2BodyDecision",
+                               'DetachedMuK' : "Hlt2Topo(Mu)?2BodyDecision",
+                               'DetachedMuKstar' : "Hlt2Topo(Mu)?2BodyDecision",
+                               'DetachedMuPhi' : "Hlt2Topo(Mu)?2BodyDecision",
+                               }
+                  
+    },
+              'STREAMS' : ['BhadronCompleteEvent']
+              }
+
+
+
+from StandardParticles import StdNoPIDsMuons as Hlt2Muons
+from StandardParticles import StdNoPIDsElectrons as Hlt2Electrons
+from StandardParticles import StdAllLooseKaons as Hlt2Kaons
+from StandardParticles import StdAllLoosePions as Hlt2Pions
+
+class StrippingElectronRecoEffLines(LineBuilder):
+    """
+    Stripping 'replica' for HLT electron reconstruction efficiency trigger
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self,name,config):        
+        LineBuilder.__init__(self, name, config)
+        
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        self._config = config
+        self.name = name
+        
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(TrackGEC)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        self._DetachedElectrons=None
+        self._LooseDetachedElectrons=None
+        self._LooseDetachedMuons=None
+        self._DetachedKaons=None
+        self._DetachedMuons = None
+        
+        # Composite tags
+        self._DetachedKstars=False
+        self._DetachedPhis=None
+        
+        ###### the velo tracking (from D2K3pi line from mika)        
+        self.VeloProtoOutputLocation = 'Rec/ProtoP/VeloProtosFor%s'%self.name
+        self.VeloTrackOutputLocation="Rec/Track/MyVeloFor%s"%self.name
+        self.FittedVeloTrackOutputLocation = "Rec/Track/PreparedVeloFor%s"%self.name        
+        self.VeloTracks = self.MakeVeloTracks([])
+        
+        self.Hlt2ProbeElectrons = self.MakeVeloParticles("VeloElectrons","electrons",self.VeloTracks)
+        self.Hlt2ProbeMuons = self.MakeVeloParticles("VeloMuons","muons",self.VeloTracks)
+        
+        ###rest of it.
+        self.DetachedEKPair("DetachedEKPair")
+        self.DetachedEKstarPair("DetachedEKstarPair")
+        self.DetachedEPhiPair("DetachedEPhiPair")
+        
+        self.DetachedMuKPair("DetachedMuKPair")
+        self.DetachedMuKstarPair("DetachedMuKstarPair")
+        self.DetachedMuPhiPair("DetachedMuPhiPair")
+        
+        #actual registration of the lines
+        self.registerLine( self.DetachedEEKPair("DetachedEEKPair") )
+        self.registerLine( self.DetachedEEKstarPair("DetachedEEKstarPair") )
+        self.registerLine( self.DetachedEEPhiPair("DetachedEEPhiPair") );
+        
+        self.registerLine(self.DetachedMuMuKPair("DetachedMuMuKPair"))
+        self.registerLine(self.DetachedMuMuKstarPair("DetachedMuMuKstarPair"))
+        self.registerLine(self.DetachedMuMuPhiPair("DetachedMuMuPhiPair"))
+        
+        self.combine_particles_mumuk = None;
+        self.combine_particles_eek = None;
+
+
+    def _DetachedElectronFilter(self):
+        if not self._DetachedElectrons:
+            code = "(MIPCHI2DV(PRIMARY)>%(IPChi2Ele)s) & (PT> %(PtEle)s) & \
+            (TRCHI2DOF<%(TrChi2Ele)s)  & in_range(%(EtaMinEle)s, ETA, %(EtaMaxEle)s) & (PROBNNe > %(ProbNNe)s)"%self._config['SharedChild']
+            _DetachedElectrons = Selection("DetachedElectrons_For_"+self.name,
+                                           Algorithm = FilterDesktop(Code = code),
+                                           RequiredSelections = [Hlt2Electrons]
+                                           )
+            self._DetachedElectrons  = _DetachedElectrons
+        return self._DetachedElectrons
+
+    def _LooseDetachedElectronFilter(self):
+        if not self._LooseDetachedElectrons:
+            code = "(MIPCHI2DV(PRIMARY)>%(IPChi2Ele)s) & (PT> %(PtEle)s) & " \
+            "(TRCHI2DOF<%(TrChi2Ele)s)  & " \
+            "in_range(%(EtaMinEle)s, ETA, %(EtaMaxEle)s) &" \
+            " (PROBNNe > %(ProbNNe)s)" % self._config['LooseSharedChild']
+            _DetachedElectrons = Selection("LooseDetachedElectrons_For_"+self.name,
+                                           Algorithm = FilterDesktop(Code = code),
+                                           RequiredSelections = [Hlt2Electrons]
+                                           )
+            self._LooseDetachedElectrons  = _DetachedElectrons
+        return self._LooseDetachedElectrons
+    
+    def _DetachedKaonFilter(self):
+        if not self._DetachedKaons:
+            code = ("(MIPCHI2DV(PRIMARY)>%(IPChi2Kaon)s) & (PT> %(PtKaon)s) & \
+            (TRCHI2DOF<%(TrChi2Kaon)s) & (PROBNNk > %(ProbNNk)s)")%self._config['SharedChild']
+            _DetachedKaons = Selection("DetachedKaons_For_"+self.name,
+                                       Algorithm = FilterDesktop(Code = code),
+                                       RequiredSelections = [Hlt2Kaons])
+            self._DetachedKaons = _DetachedKaons
+        return self._DetachedKaons
+
+    def _DetachedKstarFilter(self):
+        if not self._DetachedKstars:
+            dc = {'K-' : "(MIPCHI2DV(PRIMARY)>%(K_IPCHI2)s) & (PROBNNk>%(K_PROBNNk)s) & (PT>%(K_PT)s)" % (self._config['DetachedKstar']), 
+                  'pi+' : "(MIPCHI2DV(PRIMARY)>%(Pi_IPCHI2)s) & (PROBNNpi>%(Pi_PROBNNpi)s) & (PT>%(Pi_PT)s)" % (self._config['DetachedKstar'])}
+            cc = ("in_range(%(AMMIN)s, AM, %(AMMAX)s) & (APT>%(APTMIN)s)") % self._config['DetachedKstar']
+            mc = ("in_range(%(MMIN)s, M, %(MMAX)s) & (VFASPF(VCHI2) < %(VCHI2)s) & (MIPCHI2DV(PRIMARY)>%(KST_IPCHI2)s)") % self._config['DetachedKstar']        
+            _DetachedKstarCreator = CombineParticles(
+                DecayDescriptors = ['[K*(892)0 -> K- pi+]cc'],
+                DaughtersCuts = dc,
+                CombinationCut = cc,
+                MotherCut = mc,
+                )
+            
+            _DetachedKstars = Selection("DetachedKstars_For_"+self.name,
+                                       Algorithm = _DetachedKstarCreator,
+                                       RequiredSelections = [Hlt2Kaons, Hlt2Pions])
+            self._DetachedKstars = _DetachedKstars
+            
+        return self._DetachedKstars
+    
+    def _DetachedPhiFilter(self):
+        if not self._DetachedPhis:
+            from PhysSelPython.Wrappers import Selection
+            
+            dc = {'K-' : ("(MIPCHI2DV(PRIMARY)>%(K_IPCHI2)s) & "\
+                         "(PIDK>%(K_PIDK)s) & (PT>%(K_PT)s)") % (self._config['DetachedPhi'])
+                  }
+            cc = ("in_range(%(AMMIN)s,AM,%(AMMAX)s) & (APT>%(PHI_PT)s)") % (self._config['DetachedPhi'])
+            mc = ("in_range(%(MMIN)s,M,%(MMAX)s) & " \
+                    "(VFASPF(VCHI2) < %(VCHI2)s) & "\
+                    " (MIPCHI2DV(PRIMARY)>%(PHI_IPCHI2)s)") % (self._config['DetachedPhi'])
+            _DetachedPhiCreator = CombineParticles(
+                DecayDescriptors = ['phi(1020) -> K- K+'],
+                DaughtersCuts = dc,
+                CombinationCut = cc,
+                MotherCut = mc,
+                )
+            _DetachedPhis = Selection("DetachedPhis_For_"+self.name,
+                                       Algorithm = _DetachedPhiCreator,
+                                       RequiredSelections = [Hlt2Kaons])
+            self._DetachedPhis = _DetachedPhis
+        
+        return self._DetachedPhis
+    
+    def DetachedEKPair(self,_name):
+        dc = {'K+' : "ALL", 'e+' : "ALL"}
+        cc = ("(AM < %(AM)s)")%self._config['DetachedEK']
+        mc = ("(VFASPF(VCHI2) < %(VCHI2)s) &  (BPVVDCHI2 > %(VDCHI2)s) " \
+              " & (VFASPF(VMINVDDV(PRIMARY)) > %(bCandFlightDist)s )") % self._config['DetachedEK']
+        
+        _DetachedEKPair = CombineParticles(
+            DecayDescriptors = ['[J/psi(1S) -> e+ K-]cc',
+                                '[J/psi(1S) -> e+ K+]cc'],
+            DaughtersCuts = dc,
+            CombinationCut = cc,
+            MotherCut = mc,
+            )
+        
+        _DetachedEKPairSel = Selection("SelKE_for_"+_name,
+                                            Algorithm = _DetachedEKPair,
+                                            RequiredSelections = [self._DetachedKaonFilter(),
+                                                                  self._DetachedElectronFilter()
+                                                                  ]
+                                            )
+        L0Filtered_DetachedEKPairSel = L0TOSSelection(_DetachedEKPairSel, 
+                                            self._config["L0TOS"]['DetachedEK'],
+                                            name='EK_L0Decision_for_'+_name)
+        
+        EK_HLT1Selection = Hlt1TOSSelection(L0Filtered_DetachedEKPairSel, 
+                                            self._config["Hlt1Req"]['DetachedEK'],
+                                            name='EK_HLT1Selection_for_'+_name)
+        EK_HLT2Selection = Hlt2TOSSelection(EK_HLT1Selection,
+                                            self._config["Hlt2Req"]['DetachedEK'],
+                                            name='EK_HLT2Selection_for_'+_name)
+        
+        self._DetachedEKPairSel = EK_HLT2Selection;
+        
+    def DetachedEKstarPair(self,_name):
+        dc = {'e+' : "ALL"}
+        cc = ("(AM < %(AM)s)") % self._config['DetachedEKstar']
+        mc = ("(VFASPF(VCHI2) < %(VCHI2)s) " \
+              " & (BPVVDCHI2 > %(VDCHI2)s) " \
+              " & (VFASPF(VMINVDDV(PRIMARY)) > %(bCandFlightDist)s )") % self._config['DetachedEKstar']
+
+        _DetachedEKstarPair = CombineParticles(
+            DecayDescriptors = ["[J/psi(1S) -> e+ K*(892)0]cc",
+                                "[J/psi(1S) -> e- K*(892)0]cc"],
+            DaughtersCuts = dc,
+            CombinationCut = cc,
+            MotherCut = mc,            
+            )
+        EKstar_L0sel = L0Selection('EKstar_L0Selection_for_'+_name,
+                                   '%(DetachedEKstar)s' % self._config['L0Req'])
+        
+        L0Filtered_DetachedEKstarPairSel = Selection("SelEKstar_for_"+_name,
+                                             Algorithm = _DetachedEKstarPair,
+                                             RequiredSelections = [self._DetachedKstarFilter(),
+                                                                   self._DetachedElectronFilter(),
+                                                                   EKstar_L0sel
+                                                                   ]
+                                             )
+        
+        EKstar_HLT1Selection = Hlt1TOSSelection(L0Filtered_DetachedEKstarPairSel, 
+                                            self._config["Hlt1Req"]['DetachedEKstar'],
+                                            name='EKstar_HLT1Selection_for_'+_name)
+        EKstar_HLT2Selection = Hlt2TOSSelection(EKstar_HLT1Selection,
+                                            self._config["Hlt2Req"]['DetachedEKstar'],
+                                            name='EKstar_HLT2Selection_for_'+_name)
+        
+        self._DetachedEKstarPairSel = EKstar_HLT2Selection
+    
+    
+    def DetachedEPhiPair(self,_name):
+        dc = {'e+' : "ALL"}
+        cc = ("(AM < %(AM)s)") % self._config['DetachedEPhi']
+        mc = ("(VFASPF(VCHI2) < %(VCHI2)s) " \
+              " & (BPVVDCHI2 > %(VDCHI2)s) " \
+              " & (VFASPF(VMINVDDV(PRIMARY)) > %(bCandFlightDist)s )") % self._config['DetachedEPhi']
+
+        _DetachedEPhiPair = CombineParticles(
+            DecayDescriptors = ["[J/psi(1S) -> e+ phi(1020)]cc"],
+            DaughtersCuts = dc,
+            CombinationCut = cc,
+            MotherCut = mc,
+            )
+        EPhi_L0sel = L0Selection('EPhi_L0Selection_for_'+_name,
+                                 '%(DetachedEPhi)s' % self._config['L0Req'])
+        
+        L0Filtered_DetachedEPhiPairSel = Selection("SelEPhi_for_"+_name,
+                                             Algorithm = _DetachedEPhiPair,
+                                             RequiredSelections = [self._DetachedPhiFilter(),
+                                                                   self._DetachedElectronFilter(),
+                                                                   EPhi_L0sel
+                                                                   ]
+                                             )
+        
+        EPhi_HLT1Selection = Hlt1TOSSelection(L0Filtered_DetachedEPhiPairSel, 
+                                            self._config["Hlt1Req"]['DetachedEPhi'],
+                                            name='EPhi_HLT1Selection_for_'+_name)
+        EPhi_HLT2Selection = Hlt2TOSSelection(EPhi_HLT1Selection,
+                                            self._config["Hlt2Req"]['DetachedEPhi'],
+                                            name='EPhi_HLT2Selection_for_'+_name)
+        
+        self._DetachedEPhiPairSel = EPhi_HLT2Selection
+        
+    def getCPForEEK(self, config_key="DetachedEEK"):
+        dc = {"e+" : "ALL", "J/psi(1S)" : "ALL"}
+        cc = "(AM < %(AMTAP)s)" % self._config[config_key]
+        mc = "(VFASPF(VCHI2) < %(VCHI2TAP)s) & " \
+             "(log(B_MASS_CONSTRAINT_IP) < %(bmass_ip_constraint)s) & " \
+             "in_range(%(MLOW)s, BMassFromConstraint, %(MHIGH)s) & " \
+             "in_range(%(probePcutMin)s,Probe_Momentum_From_Mass_constraint,%(probePcutMax)s)" % self._config[config_key]
+        # "& (MAXOVERLAP( (ABSID == 'e+') | (ABSID=='K-') ) < %(overlapCut)s)"
+        
+        preambulo = [  # With thanks to L. Dufour!
+            'from numpy import inner',  # if you want you can also calculate all inner products yourself.
+            'TagKaonMomentumVector    = [CHILD(CHILD(PX,2), 1), CHILD(CHILD(PY,2),1), CHILD(CHILD(PZ,2),1)]',
+            'TagKaonEnergy            = CHILD(CHILD(E,2),1)',
+            #
+            'TagElectronMomentumVector    = [CHILD(CHILD(PX,1), 1), CHILD(CHILD(PY,1),1), CHILD(CHILD(PZ,1),1)]',
+            'TagElectronEnergy = CHILD(CHILD(E,1), 1)',
+            #
+            'ProbeElectron    = [CHILD(PX,2),CHILD(PY,2),CHILD(PZ,2)]',
+            'ProbeUnnormalised = ProbeElectron[:]',
+            'ProbeElectron = [ProbeUnnormalised[i]/CHILD(P,2) for i in range (0,3)]',
+            #
+            'TagPCosineTheta = inner(ProbeElectron, TagElectronMomentumVector)',  # |p_tag| Cos(Theta)
+            #
+            'Electron_M = 0.511',  # in MeV
+            #
+            # ideally would replace the 3096.9 with a functor to get the PDG mass for the J/Psi(1S) in MeV
+            # (there must be a functor for this PDG mass...)
+            'Probe_Momentum_From_Mass_constraint = 0.5*(3096.9**2 - Electron_M**2 - Electron_M**2)/(TagElectronEnergy - TagPCosineTheta)',
+            'JPsi_momentum = [ Probe_Momentum_From_Mass_constraint*ProbeElectron[i] + TagElectronMomentumVector[i] for i in range (0,3)]',
+            'JPsi_energy = TagElectronEnergy + math.sqrt(Electron_M**2 + Probe_Momentum_From_Mass_constraint**2)',
+            'BMassFromConstraint = math.sqrt( (JPsi_energy+TagKaonEnergy)**2 - (JPsi_momentum[0]+TagKaonMomentumVector[0])**2 -(JPsi_momentum[1]+TagKaonMomentumVector[1])**2 - (JPsi_momentum[2]+TagKaonMomentumVector[2])**2)',
+            # #new from Laurent
+            "mass_constraint_b_momentum_vector = [ TagKaonMomentumVector[i] + JPsi_momentum[i] for i in range (0,3)]",
+            "mass_constraint_b_momentum = math.sqrt(mass_constraint_b_momentum_vector[0]**2 + mass_constraint_b_momentum_vector[1]**2 + mass_constraint_b_momentum_vector[2]**2)",
+            "normalised_mass_constraint_b_momentum_vector = [mass_constraint_b_momentum_vector[i]/mass_constraint_b_momentum for i in range (0,3)]",
+            "B_ENDVERTEX_POSITION = [VFASPF(VX), VFASPF(VY), VFASPF(VZ)]",
+            "B_PV_POSITION = [BPV(VX),BPV(VY),BPV(VZ)]",
+            "LambdaFactor = - (inner([VFASPF(VX)-BPV(VX), VFASPF(VY)-BPV(VY), VFASPF(VZ)-BPV(VZ)], normalised_mass_constraint_b_momentum_vector))",
+            "B_MASS_CONSTRAINT_IP_VECTOR = [(B_ENDVERTEX_POSITION[i] + LambdaFactor * normalised_mass_constraint_b_momentum_vector[i]) - B_PV_POSITION[i] for i in range (0,3)]",
+            "B_MASS_CONSTRAINT_IP = math.sqrt(B_MASS_CONSTRAINT_IP_VECTOR[0]**2+B_MASS_CONSTRAINT_IP_VECTOR[1]**2+B_MASS_CONSTRAINT_IP_VECTOR[2]**2)",
+            ]
+        
+        return CombineParticles(
+            DecayDescriptors=["B+ -> J/psi(1S) e+", "B- -> J/psi(1S) e-"],
+            DaughtersCuts=dc,
+            CombinationCut=cc,
+            MotherCut=mc,
+            Preambulo=preambulo
+            )
+        
+
+    def DetachedEEKPair(self,_name):
+        configuration = self._config[ "DetachedEEK" ]
+        
+        _DetachedEEKPair= self.getCPForEEK("DetachedEEK")
+        _DetachedEEKPair_Sel = Selection("SelEEK_for_"+_name,
+                                         Algorithm = _DetachedEEKPair,
+                                         RequiredSelections = [self._DetachedEKPairSel,
+                                                               self.Hlt2ProbeElectrons
+                                                               ]
+                                         )
+        
+        line = StrippingLine(_name+"Line",
+                             prescale = 1.0,
+                             FILTER = self.GECs,
+                             RequiredRawEvents = ["Velo","Calo"],
+                             selection = _DetachedEEKPair_Sel
+                             )
+
+        return line
+
+    def DetachedEEKstarPair(self,_name):
+        configuration = self._config[ "DetachedEEKstar" ]
+        
+        _DetachedEEKstarPair = self.getCPForEEK("DetachedEEKstar")
+        _DetachedEEKstarPair_Sel = Selection("SelEEKstar_for_"+_name,
+                                         Algorithm = _DetachedEEKstarPair,
+                                         RequiredSelections = [self._DetachedEKstarPairSel,
+                                                               self.Hlt2ProbeElectrons
+                                                               ]
+                                         )
+        
+        line = StrippingLine(_name+"Line",
+                             prescale = 1.0,
+                             FILTER = self.GECs,
+                             RequiredRawEvents = ["Velo","Calo"],
+                             selection = _DetachedEEKstarPair_Sel
+                             )
+
+        return line
+
+    def DetachedEEPhiPair(self,_name):
+        configuration = self._config[ "DetachedEEPhi" ]
+        
+        _DetachedEEPhiPair = self.getCPForEEK("DetachedEEPhi")
+        _DetachedEEPhiPair_Sel = Selection("SelEEPhi_for_"+_name,
+                                         Algorithm = _DetachedEEPhiPair,
+                                         RequiredSelections = [self._DetachedEPhiPairSel,
+                                                               self.Hlt2ProbeElectrons
+                                                               ]
+                                         )
+        
+        line = StrippingLine(_name+"Line",
+                             prescale = 1.0,
+                             FILTER = self.GECs,
+                             RequiredRawEvents = ["Velo","Calo"],
+                             selection = _DetachedEEPhiPair_Sel
+                             )
+
+        return line
+
+    def _DetachedMuonFilter(self):
+        if not self._DetachedMuons:
+            from PhysSelPython.Wrappers import Selection
+            
+            code = ("(MIPDV(PRIMARY)>%(IPMu)s) & (MIPCHI2DV(PRIMARY)>%(IPChi2Mu)s) & (PT> %(PtMu)s) & \
+            (TRCHI2DOF<%(TrChi2Mu)s)  & in_range(%(EtaMinMu)s, ETA, %(EtaMaxMu)s) & (PROBNNmu > %(ProbNNmu)s)")%self._config['SharedChild']
+            
+            _DetachedMuons= Selection("DetachedMuons_For_"+self.name,
+                                      Algorithm = FilterDesktop(Code = code),
+                                      RequiredSelections = [Hlt2Muons])
+            self._DetachedMuons = _DetachedMuons
+        
+        return self._DetachedMuons
+    
+    def _LooseDetachedMuonFilter(self):
+        if not self._LooseDetachedMuons:
+            code = ("(MIPDV(PRIMARY)>%(IPMu)s) & (MIPCHI2DV(PRIMARY)>%(IPChi2Mu)s) & (PT> %(PtMu)s) & \
+            (TRCHI2DOF<%(TrChi2Mu)s)  & in_range(%(EtaMinMu)s, ETA, %(EtaMaxMu)s) " \
+            "& (PROBNNmu > %(ProbNNmu)s)")%self._config['LooseSharedChild']
+            
+            _DetachedMuons = Selection("LooseDetachedMuons_For_"+self.name,
+                                      Algorithm = FilterDesktop(Code = code),
+                                      RequiredSelections = [Hlt2Muons])
+            self._LooseDetachedMuons = _DetachedMuons
+        
+        return self._LooseDetachedMuons
+    
+    def DetachedMuKPair(self,_name):
+        dc = {'K+' : "ALL", 'mu+' : "ALL"}
+        cc = ("(AM < %(AM)s)")%self._config['DetachedMuK']
+        mc = ("(VFASPF(VCHI2) < %(VCHI2)s) & (BPVDIRA > %(DIRA)s) " \
+              "& (BPVVDCHI2 > %(VDCHI2)s) & " \
+              "(VFASPF(VMINVDDV(PRIMARY)) > %(bCandFlightDist)s )") % self._config['DetachedMuK']
+
+        _DetachedMuKPair = CombineParticles(
+            DecayDescriptors = ["[J/psi(1S) -> mu+ K-]cc","[J/psi(1S) -> mu+ K+]cc"],
+            DaughtersCuts = dc,
+            CombinationCut = cc,
+            MotherCut = mc,
+            )
+        
+        NoTrigger_DetachedMuKPairSel = Selection("SelMuK_for_"+_name,
+                                             Algorithm = _DetachedMuKPair,
+                                             RequiredSelections = [self._DetachedKaonFilter(),
+                                                                   self._DetachedMuonFilter()
+                                                                   ]
+                                             )
+        
+        MuK_L0TOSSelection = L0TOSSelection(NoTrigger_DetachedMuKPairSel, 
+                                            self._config["L0TOS"]['DetachedMuK'],
+                                            name='MuK_L0TOSSelection_for_'+_name)
+        
+        MuK_HLT1Selection = Hlt1TOSSelection(MuK_L0TOSSelection, 
+                                            self._config["Hlt1Req"]['DetachedMuK'],
+                                            name='MuK_HLT1Selection_for_'+_name)
+        
+        MuK_HLT2Selection = Hlt2TOSSelection(MuK_HLT1Selection,
+                                            self._config["Hlt2Req"]['DetachedMuK'],
+                                            name='MuK_HLT2Selection_for_'+_name)
+        
+        self._DetachedMuKPairSel = MuK_HLT2Selection
+       
+    def DetachedMuKstarPair(self,_name):
+        dc = {'mu+' : "ALL"}
+        cc = ("(AM < %(AM)s)") % self._config['DetachedMuKstar']
+        mc = ("(VFASPF(VCHI2) < %(VCHI2)s) & (BPVDIRA > %(DIRA)s) " \
+              " & (BPVVDCHI2 > %(VDCHI2)s)  " \
+              " & (VFASPF(VMINVDDV(PRIMARY)) > %(bCandFlightDist)s )") % self._config['DetachedMuKstar']
+
+        _DetachedMuKstarPair = CombineParticles(
+            DecayDescriptors = ["[J/psi(1S) -> mu+ K*(892)0]cc",
+                                "[J/psi(1S) -> mu- K*(892)0]cc"],
+            DaughtersCuts = dc,
+            CombinationCut = cc,
+            MotherCut = mc,            
+            )
+        MuKstar_L0sel = L0Selection('MuKstar_L0Selection','%(DetachedMuKstar)s' % self._config['L0Req'])
+        
+        L0Filtered_DetachedMuKstarPairSel = Selection("SelMuKstar_for_"+_name,
+                                             Algorithm = _DetachedMuKstarPair,
+                                             RequiredSelections = [self._DetachedKstarFilter(),
+                                                                   self._DetachedMuonFilter(),
+                                                                   MuKstar_L0sel
+                                                                   ]
+                                             )
+        
+        MuKstar_HLT1Selection = Hlt1TOSSelection(L0Filtered_DetachedMuKstarPairSel, 
+                                            self._config["Hlt1Req"]['DetachedMuKstar'],
+                                            name='MuKstar_HLT1Selection')
+        
+        MuKstar_HLT2Selection = Hlt2TOSSelection(MuKstar_HLT1Selection,
+                                            self._config["Hlt2Req"]['DetachedMuKstar'],
+                                            name='MuKstar_HLT2Selection')
+        
+        self._DetachedMuKstarPairSel = MuKstar_HLT2Selection
+    
+    def DetachedMuPhiPair(self,_name):
+        dc = {'mu+' : "ALL"}
+        cc = ("(AM < %(AM)s)") % self._config['DetachedMuK']
+        mc = ("(VFASPF(VCHI2) < %(VCHI2)s) & (BPVDIRA > %(DIRA)s) & "\
+              " (BPVVDCHI2 > %(VDCHI2)s) & " \
+              "(VFASPF(VMINVDDV(PRIMARY)) > %(bCandFlightDist)s )") % self._config['DetachedMuPhi']
+
+        _DetachedMuPhiPair = CombineParticles(
+            DecayDescriptors = ["[J/psi(1S) -> mu+ phi(1020)]cc"],
+            DaughtersCuts = dc,
+            CombinationCut = cc,
+            MotherCut = mc,
+            )
+        
+        L0sel = L0Selection('MuPhi_L0Selection','%(DetachedMuPhi)s' % self._config['L0Req'])
+        L0Filtered_DetachedMuPhiPairSel = Selection("SelMuPhi_for_"+_name,
+                                             Algorithm = _DetachedMuPhiPair,
+                                             RequiredSelections = [self._DetachedPhiFilter(),
+                                                                   self._LooseDetachedMuonFilter(),
+                                                                   L0sel
+                                                                   ]
+                                             )
+        
+        MuPhi_HLT1Selection = Hlt1TOSSelection(L0Filtered_DetachedMuPhiPairSel, 
+                                            self._config["Hlt1Req"]['DetachedMuPhi'],
+                                            name='MuPhi_HLT1Selection_for_'+_name)
+        MuPhi_HLT2Selection = Hlt2TOSSelection(MuPhi_HLT1Selection,
+                                            self._config["Hlt2Req"]['DetachedMuPhi'],
+                                            name='MuPhi_HLT2Selection_for_'+_name)
+        
+        self._DetachedMuPhiPairSel = MuPhi_HLT2Selection
+    
+    def getCPForMuMuK(self, config_key="DetachedMuMuK"):
+        dc = {"mu+" : "ALL", "J/psi(1S)" : "ALL"}
+        cc = "(AM < %(AMTAP)s)"%self._config[config_key]
+        mc = "(VFASPF(VCHI2) < %(VCHI2TAP)s) & (log(B_MASS_CONSTRAINT_IP) < %(bmass_ip_constraint)s) & in_range(%(MLOW)s, BMassFromConstraint, %(MHIGH)s) & in_range(%(probePcutMin)s,Probe_Momentum_From_Mass_constraint,%(probePcutMax)s)"%self._config[config_key]        
+        preambulo =  [ # With thanks to L. Dufour!
+            'from numpy import inner', #if you want you can also calculate all inner products yourself.
+            'TagKaonMomentumVector    = [CHILD(CHILD(PX,2), 1), CHILD(CHILD(PY,2),1), CHILD(CHILD(PZ,2),1)]',
+            'TagKaonEnergy            = CHILD(CHILD(E,2),1)',
+            #
+            'TagMuonMomentumVector    = [CHILD(CHILD(PX,1), 1), CHILD(CHILD(PY,1),1), CHILD(CHILD(PZ,1),1)]',
+            'TagMuonEnergy = CHILD(CHILD(E,1), 1)',
+            #
+            'ProbeMuon    = [CHILD(PX,2),CHILD(PY,2),CHILD(PZ,2)]',
+            'ProbeUnnormalised = ProbeMuon[:]',
+            'ProbeMuon = [ProbeUnnormalised[i]/CHILD(P,2) for i in range (0,3)]',
+            #
+            'TagPCosineTheta = inner(ProbeMuon, TagMuonMomentumVector)', # |p_tag| Cos(Theta)
+            #
+            'Muon_M = 105.658', # in MeV
+            #
+            # ideally would replace the 3096.9 with a functor to get the PDG mass for the J/Psi(1S) in MeV
+            # (there must be a functor for this PDG mass...)
+            'Probe_Momentum_From_Mass_constraint = 0.5*(3096.9**2 - Muon_M**2 - Muon_M**2)/(TagMuonEnergy - TagPCosineTheta)',
+            'JPsi_momentum = [ Probe_Momentum_From_Mass_constraint*ProbeMuon[i] + TagMuonMomentumVector[i] for i in range (0,3)]',
+            'JPsi_energy = TagMuonEnergy + math.sqrt(Muon_M**2 + Probe_Momentum_From_Mass_constraint**2)',
+            'BMassFromConstraint = math.sqrt( (JPsi_energy+TagKaonEnergy)**2 - (JPsi_momentum[0]+TagKaonMomentumVector[0])**2 -(JPsi_momentum[1]+TagKaonMomentumVector[1])**2 - (JPsi_momentum[2]+TagKaonMomentumVector[2])**2)',
+            #
+            "mass_constraint_b_momentum_vector = [ TagKaonMomentumVector[i] + JPsi_momentum[i] for i in range (0,3)]",
+            "mass_constraint_b_momentum = math.sqrt(mass_constraint_b_momentum_vector[0]**2 + mass_constraint_b_momentum_vector[1]**2 + mass_constraint_b_momentum_vector[2]**2)",
+            "normalised_mass_constraint_b_momentum_vector = [mass_constraint_b_momentum_vector[i]/mass_constraint_b_momentum for i in range (0,3)]",
+            "B_ENDVERTEX_POSITION = [VFASPF(VX), VFASPF(VY), VFASPF(VZ)]",
+            "B_PV_POSITION = [BPV(VX),BPV(VY),BPV(VZ)]",
+            "LambdaFactor = - (inner([VFASPF(VX)-BPV(VX), VFASPF(VY)-BPV(VY), VFASPF(VZ)-BPV(VZ)], normalised_mass_constraint_b_momentum_vector))",
+            "B_MASS_CONSTRAINT_IP_VECTOR = [(B_ENDVERTEX_POSITION[i] + LambdaFactor * normalised_mass_constraint_b_momentum_vector[i]) - B_PV_POSITION[i] for i in range (0,3)]",
+            "B_MASS_CONSTRAINT_IP = math.sqrt(B_MASS_CONSTRAINT_IP_VECTOR[0]**2+B_MASS_CONSTRAINT_IP_VECTOR[1]**2+B_MASS_CONSTRAINT_IP_VECTOR[2]**2)"
+            ]
+
+        return CombineParticles(
+            DecayDescriptors = ["B+ -> J/psi(1S) mu+",
+                                "B- -> J/psi(1S) mu-"],
+            DaughtersCuts = dc,
+            CombinationCut = cc,
+            MotherCut = mc,
+            Preambulo = preambulo
+            )
+    
+    def DetachedMuMuKPair(self,_name):
+        combine_particles_mumuk = self.getCPForMuMuK("DetachedMuMuK");
+        
+        _DetatchedMuMuK_Sel = Selection("SelMuMuK_for_"+_name,
+                                        Algorithm = combine_particles_mumuk,
+                                        RequiredSelections = [self._DetachedMuKPairSel,
+                                                              self.Hlt2ProbeMuons])
+        
+        PVMassFilteredSel = Selection("MassFilterSel"+_name,
+                                      Algorithm = FilterDesktop(Code = "(in_range(%(POINTINGMASSMIN)s, POINTINGMASS ( LoKi.Child.Selector(0), LoKi.Child.Selector(1), LoKi.Child.Selector(2) ), %(POINTINGMASSMAX)s))" %self._config["DetachedMuMuK"]) ,
+                                      RequiredSelections = [_DetatchedMuMuK_Sel]
+                                      )
+                                     
+        line = StrippingLine(_name+"Line",
+                             prescale = 1.0,
+                             FILTER = self.GECs,
+                             RequiredRawEvents = ["Velo","Muon"],
+                             selection = PVMassFilteredSel)
+
+        return line
+    
+    def DetachedMuMuKstarPair(self,_name):
+        combine_particles_mumukstar = self.getCPForMuMuK("DetachedMuMuKstar");
+        
+        _DetatchedMuMuKstar_Sel = Selection("SelMuMuKstar_for_"+_name,
+                                        Algorithm = combine_particles_mumukstar,
+                                        RequiredSelections = [self._DetachedMuKstarPairSel,
+                                                              self.Hlt2ProbeMuons])
+        
+        PVMassFilteredSel = Selection("MassFilterSel"+_name,
+                                      Algorithm = FilterDesktop(Code = "(in_range(%(POINTINGMASSMIN)s, POINTINGMASS ( LoKi.Child.Selector(0), LoKi.Child.Selector(1), LoKi.Child.Selector(2) ), %(POINTINGMASSMAX)s))" %self._config["DetachedMuMuKstar"]) ,
+                                      RequiredSelections = [_DetatchedMuMuKstar_Sel]
+                                      )
+         
+        line = StrippingLine(_name+"Line",
+                             prescale = 1.0,
+                             FILTER = self.GECs,
+                             RequiredRawEvents = ["Velo","Muon"],
+                             selection = PVMassFilteredSel)
+
+
+        return line
+    
+    def DetachedMuMuPhiPair(self,_name):
+        combine_particles_mumuphi = self.getCPForMuMuK("DetachedMuMuPhi");
+        
+        _DetatchedMuMuPhi_Sel = Selection("SelMuMuPhi_for_"+_name,
+                                        Algorithm = combine_particles_mumuphi,
+                                        RequiredSelections = [self._DetachedMuPhiPairSel,
+                                                              self.Hlt2ProbeMuons])
+        
+        PVMassFilteredSel = Selection("MassFilterSel"+_name,
+                                      Algorithm = FilterDesktop(Code = "(in_range(%(POINTINGMASSMIN)s, POINTINGMASS ( LoKi.Child.Selector(0), LoKi.Child.Selector(1), LoKi.Child.Selector(2) ), %(POINTINGMASSMAX)s))" %self._config["DetachedMuMuPhi"]) ,
+                                      RequiredSelections = [_DetatchedMuMuPhi_Sel]
+                                      )
+         
+        line = StrippingLine(_name+"Line",
+                             prescale = 1.0,
+                             FILTER = self.GECs,
+                             RequiredRawEvents = ["Velo","Muon"],
+                             selection = PVMassFilteredSel)
+
+
+        return line
+
+    ##### velo tracking ####
+    def MakeVeloTracks(self,prefilter):        
+        if self._config["DoVeloDecoding"]:
+            from DAQSys.Decoders import DecoderDB
+            from DAQSys.DecoderClass import decodersForBank
+            decs=[]
+            vdec=DecoderDB["DecodeVeloRawBuffer/createBothVeloClusters"]
+            vdec.Active=True
+            DecoderDB["DecodeVeloRawBuffer/createVeloClusters"].Active=False
+            DecoderDB["DecodeVeloRawBuffer/createVeloLiteClusters"].Active=False
+            decs=decs+[vdec]
+            VeloDecoding = GaudiSequencer("RecoDecodingSeq")
+            VeloDecoding.Members += [d.setup() for d in decs ]
+        
+        MyFastVeloTracking = FastVeloTracking("For%sFastVelo"%self.name,
+                                              OutputTracksName=self.VeloTrackOutputLocation)
+        MyFastVeloTracking.OnlyForward = True
+        MyFastVeloTracking.ResetUsedFlags = True
+        ### prepare for fitting
+        preve = TrackStateInitAlg("For%sInitSeedFit"%self.name,
+                                  TrackLocation = self.VeloTrackOutputLocation)
+        preve.StateInitTool.VeloFitterName = "FastVeloFitLHCbIDs"
+        copyVelo = TrackContainerCopy( "For%sCopyVelo"%self.name )
+        copyVelo.inputLocations = [self.VeloTrackOutputLocation]
+        copyVelo.outputLocation = self.FittedVeloTrackOutputLocation
+        
+        ### fitting
+        if self._config["VeloFitter"] == "SimplifiedGeometry":
+            MyVeloFit = ConfiguredEventFitter(Name="For%sVeloRefitterAlg"%self.name,
+                                              TracksInContainer=self.FittedVeloTrackOutputLocation,
+                                              SimplifiedGeometry = True)
+        else:
+            MyVeloFit = ConfiguredEventFitter(Name="For%sVeloRefitterAlg"%self.name,
+                                              TracksInContainer=self.FittedVeloTrackOutputLocation,
+                                              SimplifiedGeometry=False)
+            
+        #### making the proto particles
+        MakeVeloProtos = ChargedProtoParticleMaker('For%sVeloProtoMaker'%self.name)
+        MakeVeloProtos.Inputs=[self.FittedVeloTrackOutputLocation]
+        MakeVeloProtos.Output = self.VeloProtoOutputLocation
+        MakeVeloProtos.addTool( DelegatingTrackSelector, name="TrackSelector" )
+        MakeVeloProtos.TrackSelector.TrackTypes = [ "Velo" ]
+    
+        #### the full sequence
+        makeparts = GaudiSequencer('For%sMakeVeloTracksGS'%self.name)
+        
+        if self._config["DoVeloDecoding"]:
+            makeparts.Members += [ VeloDecoding ] 
+        
+        makeparts.Members += [ MyFastVeloTracking ] 
+        makeparts.Members += [ preve ] 
+        makeparts.Members += [ copyVelo ] 
+        makeparts.Members += [ MyVeloFit ] 
+        makeparts.Members += [ MakeVeloProtos ] 
+    
+        #### some python magic to make this appear like a "Selection"
+        return GSWrapper(name="For%sWrappedVeloTrackingFor"%self.name,
+                         sequencer=makeparts,
+                         output=self.VeloProtoOutputLocation,
+                         requiredSelections =  prefilter)
+
+    def MakeVeloParticles(self,name,
+                          particle, 
+                          protoParticlesMaker):        
+        particleMaker =  NoPIDsParticleMaker("For%sParticleMaker%s"%(self.name,name) , Particle = particle, AddBremPhotonTo = [])
+        particleMaker.Input = self.VeloProtoOutputLocation
+
+        DataOnDemandSvc().AlgMap.update( {
+                "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(),
+                "/Event/Phys/" + particleMaker.name() + '/Vertices'  : particleMaker.getFullName()
+                } )
+
+        AllVeloParticles = Selection("For%sSelAllVeloParts%s"%(self.name,name), 
+                                     Algorithm = particleMaker, 
+                                     RequiredSelections = [protoParticlesMaker], InputDataSetter=None)
+        
+        ### filter on the IP of the velo tracks
+        return Selection("For%sSelVeloParts%s"%(self.name,name), 
+                     Algorithm = FilterDesktop(Code="(MIPDV(PRIMARY) > %(VeloMINIP)s) & " \
+                                                    "(TRCHI2DOF<%(VeloTrackChi2)s) & " \
+                                                    "in_range(%(EtaMinVelo)s, ETA, %(EtaMaxVelo)s)" %self._config),
+                     RequiredSelections = [AllVeloParticles])
+                             
+#####Tos filter from B2DMuNuXUtils
+""" Is this still used?? """
+def TOSFilter( name = None, sel = None, trigger = None ):
+    if len(trigger) == 0:
+        return sel
+    from Configurables import TisTosParticleTagger
+    _filter = TisTosParticleTagger(name+"_TriggerTos")
+    _filter.TisTosSpecs = trigger
+    _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = [ sel ], Algorithm = _filter )
+    return _sel
+###### OTHER FUNCTIONS ###############
+class GSWrapper(UniquelyNamedObject,
+                ClonableObject,
+                SelectionBase) :
+    
+    def __init__(self, name, sequencer, output, requiredSelections) :
+        UniquelyNamedObject.__init__(self, name)
+        ClonableObject.__init__(self, locals())
+        SelectionBase.__init__(self,
+                               algorithm = sequencer,
+                               outputLocation = output,
+                               requiredSelections = requiredSelections )        
+            
+
+
+###the end
+
+
+#StrippingElectronRecoEffLines("test", default_config);
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingEta2MuMuGamma.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingEta2MuMuGamma.py
new file mode 100644
index 000000000..ba277b09e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingEta2MuMuGamma.py
@@ -0,0 +1,151 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Max Chefdeville'
+__date__ = '19/03/2021'
+__version__ = '$Revision: 1.1 $'
+
+'''
+Stripping selection for eta -> mu+ mu- gamma where the photon is reconstructed as an e+e- pair
+'''
+####################################################################
+# Stripping selection for eta -> (KS0 -> mu+ mu-) gamma
+#  line intended to control radiative decays with converted photons
+####################################################################
+
+__all__ = ('StrippingEta2MuMuGammaConf',
+           'makeMuMu',
+           'makeMuMuGamma',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdTightPions,StdTightKaons,StdLooseAllPhotons,StdNoPIDsPions, StdLooseEta2gg
+from StandardParticles import StdAllLooseGammaDD, StdAllLooseGammaLL, StdAllLooseMuons
+
+default_config = {
+    'NAME'        : 'Eta2MuMuGamma',
+    'WGs'         : ['Calib'],
+    'BUILDERTYPE' : 'StrippingEta2MuMuGammaConf',
+    'CONFIG'      : { 'MuProbNNmu'         : 0.2    # MeV
+                     ,'MuPT'               : 500    # MeV                     
+                     ,'MuIPChi2'           : 6      # unitless
+                     ,'FDChi2'             : 45     # unitless
+                     ,'K0_PT'              : 1000   # unitless
+                     ,'GPT'                : 500    # MeV
+                     ,'K0MassMin'          : 0      # MeV
+                     ,'K0MassMax'          : 1000   # MeV
+                     ,'EtaMassMin'         : 0      # MeV
+                     ,'EtaMassMax'         : 1000   # MeV
+                     ,'MMG_LinePrescale'   : 1      # unitless
+                     ,'MMG_LinePostscale'  : 1      # unitless                         
+                     },
+    'STREAMS'     : ['CharmCompleteEvent']
+    }
+
+class StrippingEta2MuMuGammaConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        myMuons       = StdAllLooseMuons
+        myGammaDD     = StdAllLooseGammaDD
+        myGammaLL     = StdAllLooseGammaLL        
+
+        #---------------------------------------        
+        # K0 -> MuMu selections
+        self.selK0 = makeMuMu( 'K0_' + name ,
+                               config,
+                               DecayDescriptor = 'KS0 -> mu+ mu-',
+                               inputSel = [myMuons]
+                               )
+
+        #---------------------------------------        
+        # eta -> K0 GammaDD selections
+        self.selEtaDD = makeMuMuGamma( 'EtaDD_' + name ,
+                                       config,
+                                       DecayDescriptor = 'eta -> KS0 gamma',
+                                       inputSel = [self.selK0, myGammaDD]
+                                       )
+
+        # Stripping lines
+        self.MMGDD_line = StrippingLine(name %locals()['config'] + "_DD",
+                                        prescale = config['MMG_LinePrescale'],
+                                        postscale = config['MMG_LinePostscale'],
+                                        selection = self.selEtaDD
+                                        )
+        # register lines
+        self.registerLine(self.MMGDD_line)
+
+        #---------------------------------------
+        # eta -> K0 GammaLL selections
+        self.selEtaLL = makeMuMuGamma( 'EtaLL_' + name ,
+                                       config,
+                                       DecayDescriptor = 'eta -> KS0 gamma',
+                                       inputSel = [self.selK0, myGammaLL]
+                                       )
+
+        self.MMGLL_line = StrippingLine(name %locals()['config'] + "_LL",
+                                        prescale = config['MMG_LinePrescale'],
+                                        postscale = config['MMG_LinePostscale'],
+                                        selection = self.selEtaLL
+                                        )
+        # register lines
+        self.registerLine(self.MMGLL_line)
+
+def makeMuMu( name,
+              config,
+              DecayDescriptor,
+              inputSel
+              ) :
+
+    _TrackCuts    = "(PT > %(MuPT)s *MeV) & (PROBNNmu > %(MuProbNNmu)s) & (MIPCHI2DV(PRIMARY) < %(MuIPChi2)s)" %locals()['config']
+    _daughterCuts = { 'mu-' : _TrackCuts, 'mu+' : _TrackCuts}
+    _combCuts     = "(AM > %(K0MassMin)s *MeV) & (AM<%(K0MassMax)s *MeV) & (APT>%(K0_PT)s *MeV)" % locals()['config']
+    _motherCuts   = "(BPVVDCHI2<%(FDChi2)s)" % locals()['config']
+
+    _K0 = CombineParticles( DecayDescriptor = DecayDescriptor,
+                            MotherCut = _motherCuts,
+                            CombinationCut = _combCuts,
+                            DaughtersCuts = _daughterCuts
+                            )
+
+    return Selection( name+'Sel',
+                      Algorithm = _K0,
+                      RequiredSelections = inputSel
+                      )
+
+def makeMuMuGamma( name,
+             config,
+             DecayDescriptor,
+             inputSel
+             ) :
+
+    _GammaCuts = "(PT > %(GPT)s)" %locals()['config']
+    _daughterCuts = { 'gamma' : _GammaCuts }
+    _combCuts     = "(AM > %(EtaMassMin)s *MeV) & (AM<%(EtaMassMax)s *MeV)" % locals()['config']
+    _motherCuts   = "ALL" % locals()['config']
+
+    _MMG = CombineParticles( DecayDescriptor = DecayDescriptor,
+                             MotherCut = _motherCuts,
+                             CombinationCut = _combCuts,
+                             DaughtersCuts = _daughterCuts
+                             )
+
+    return Selection( name+'Sel',
+                      Algorithm = _MMG,
+                      RequiredSelections = inputSel
+                      )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingJPsiForSL.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingJPsiForSL.py
new file mode 100644
index 000000000..72aeb8101
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingJPsiForSL.py
@@ -0,0 +1,132 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping line for J/psi -> mu mu candidates where only one muon is identified.
+The psi must also vertex with another track such that the combination
+is consistent with a fully/partially reconstructed B->J/psi X decay.
+For measuring muon detection asymmetries for the semileptonic asymmetry analyses.
+"""
+__author__ = ['Mika Vesterinen']
+__date__ = '25/06/2012'
+__version__ = '$Revision: 0.1 $'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseKaons, StdLooseProtons, StdNoPIDsPions, StdNoPIDsMuons, StdLooseMergedPi0,StdLooseResolvedPi0,StdLooseElectrons,StdNoPIDsKaons
+from Configurables import TisTosParticleTagger
+
+__all__ = ('JPsiForSLAllLinesConf',
+           'confdict')
+
+default_config = {
+    'NAME'        : 'JPsiForSL',
+    'WGs'         : ['Semileptonic'],
+    'BUILDERTYPE' : 'JPsiForSLAllLinesConf',
+    'CONFIG'      : {
+        "PrescaleSemiIncJpsi2mumu" : 1.0 ## adimensional
+        ,"TrackGhostProbMax" : 0.35 # adimensional
+        ,"MuonGhostProbMax" : 0.5 # adimensional
+        ,"MuonPT" : 1200. # MeV
+        ,"MuonP" : 6000. # MeV
+        ,"MuonChi2" : 3. # adimensional
+        ,"MuonIPChi2" : 4. # adimensional
+        ,"TrackPT" : 500. # MeV
+        ,"TrackP" : 3000. # MeV
+        ,"TrackChi2" : 3. # adimensional
+        ,"TrackIPChi2" : 9. # adimensional
+        ,"PsiMasswinPreFit" : 150 # MeV
+        ,"PsiDocaChi2Max" : 10 # adimensional
+        ,"PsiVChi2NdofMax" : 4. # adimensional
+        ,"PsiMasswin" : 140 # MeV
+        ,"PsiPT" : 500 # MeV
+        ,"PsiFDChi2Min" : 100 # adimensional
+        ,"PsiDIRAMin" : 0.99 # adimensional
+        ,"BCombMassMin" : 3400 # MeV
+        ,"BCombMassMax" : 6000 # MeV
+        ,"BDocaChi2Max" : 10. # adimensional
+        ,"BVChi2NdofMax" : 3. # adimensional
+        ,"BPTMin" : 800. # MeV
+        ,"BFDChi2Min" : 200. # adimensional
+        ,"BDIRAMin" : 0.9995 # adimensional
+        ,"nLongTrackMax" : 250 # adimensional
+        },
+    'STREAMS'     : ['Semileptonic']
+}
+
+
+class JPsiForSLAllLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+
+        #### muon selection
+        Muon_cuts = "(PT > %(MuonPT)s) & (P> %(MuonP)s)"\
+                    "& (TRCHI2DOF < %(MuonChi2)s)"\
+                     "& (TRGHOSTPROB < %(MuonGhostProbMax)s)"\
+                    "& (MIPCHI2DV(PRIMARY)> %(MuonIPChi2)s)" % config
+        self.muons = Selection( "Muons_for_" + name,
+                                Algorithm = FilterDesktop(Code = Muon_cuts),
+                                RequiredSelections = [StdNoPIDsMuons])
+
+        #### additional track selection
+        Track_cuts = "(PT > %(TrackPT)s) & (P> %(TrackP)s)"\
+                     "& (TRCHI2DOF < %(TrackChi2)s)"\
+                     "& (TRGHOSTPROB < %(TrackGhostProbMax)s)"\
+                     "& (MIPCHI2DV(PRIMARY)> %(TrackIPChi2)s)" % config
+        self.tracks = Selection( "Tracks_for_" + name,
+                                 Algorithm = FilterDesktop(Code = Track_cuts),
+                                 RequiredSelections = [StdNoPIDsKaons]
+                                 )
+
+        #### J/psi->mumu selection
+        self.JPsi_to_mumu = CombineParticles(DecayDescriptor = "J/psi(1S) -> mu+ mu-",                                         
+                                             CombinationCut = "(ADAMASS('J/psi(1S)')<%(PsiMasswinPreFit)s) & (ADOCACHI2CUT(%(PsiDocaChi2Max)s,''))" %config,
+                                             MotherCut = "(INTREE( (ABSID=='mu+') & ISMUON ) )"\
+                                             "& (VFASPF(VCHI2/VDOF)< %(PsiVChi2NdofMax)s)"\
+                                             "& (ADMASS('J/psi(1S)')< %(PsiMasswin)s)"
+                                             " & (SUMTREE( PT,  ISBASIC )>%(PsiPT)s)"\
+                                             "& (BPVVDCHI2 > %(PsiFDChi2Min)s) & (BPVDIRA>%(PsiDIRAMin)s)" %config
+                                             )
+        self.Sel_JPsi_to_mumu = Selection ("JPsi_to_mumu_for_"+name,
+                                           Algorithm = self.JPsi_to_mumu,
+                                           RequiredSelections = [self.muons])
+        
+        
+        #### B -> J/psi + >=1 track selection
+        self.B_to_JPsi_track = CombineParticles(DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",                                         
+                                                CombinationCut = "(AM > %(BCombMassMin)s) & (AM < %(BCombMassMax)s) & (ADOCACHI2CUT(%(BDocaChi2Max)s,''))" %config,
+                                                MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVChi2NdofMax)s)"\
+                                                " & (SUMTREE( PT,  ISBASIC )>%(BPTMin)s) & (BPVVDCHI2 > %(BFDChi2Min)s) & (BPVDIRA>%(BDIRAMin)s)" %config
+                                                )
+        
+        self.Sel_B_to_JPsi_track = Selection( "B_to_JPsi_track_For" + name,
+                                              Algorithm = self.B_to_JPsi_track,
+                                              RequiredSelections = [self.Sel_JPsi_to_mumu,self.tracks]
+                                              )
+
+        #### GECs
+        GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(nLongTrackMax)s )" %config,
+                 "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        #### register the line
+        self.registerLine(StrippingLine("SemiIncJpsi2mumu" + name + "Line",
+                                        prescale = config["PrescaleSemiIncJpsi2mumu"],
+                                        FILTER=GECs,
+                                        selection = self.Sel_B_to_JPsi_track))
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingK23PiForDownstreamTrackEff.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingK23PiForDownstreamTrackEff.py
new file mode 100644
index 000000000..69d0fc7df
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingK23PiForDownstreamTrackEff.py
@@ -0,0 +1,477 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping lines to measure K+ -> pi+ pi- pi+, to measure the downstream tracking efficiency, with
+one missing pion, using the corrected mass
+'''
+
+__author__=['Michel De Cian']
+__date__ = '19/12/2018'
+__version__= '$Revision: 1.0 $'
+
+default_config = {
+    'NAME'        : 'K23PiForDownstreamTrackEff',
+    'WGs'         : ['Calib'],
+    'BUILDERTYPE' : 'K23PiForDownstreamTrackEffConf',
+    'CONFIG'      : {
+
+    ### Pion (also the probe)
+    ### Pion (not the probe)
+    'PionIPCHI2'                 : 16.0,
+    'PionMinP'                   : 1500,
+    'PionMinPT'                  : 125,
+    'PionProbNNghost'            : 0.25,
+    'PionProbNNpi'               : 0.6,
+    'PionProbNNp'                : 0.1, # against Lambda decays
+    ### Dipion
+    'DipionMinPT'                : 300,
+    'DipionMinP'                 : 3000,
+    'DipionMinMassNarrow'        : 275,
+    'DipionMaxMassNarrow'        : 500,
+    'DipionMinMassWide'          : 260,
+    'DipionMaxMassWide'          : 600,
+    'DipionMaxMCorrNarrow'       : 600,
+    'DipionMaxMCorrWide'         : 700,
+    'DipionMCorrPseudoErrNarrow' : 30,
+    'DipionMCorrPseudoErrWide'   : 100,
+    'DipionVertexChi2PerDoF'     : 2, # for a two-track vertex, it peaks at 0
+    'DipionFlightDistanceChi2'   : 100,
+    'DipionMinVertexZ'           : 100.0,
+    'DipionMaxVertexZ'           : 2200.0,
+    'DipionDira'                 : 0.9995,
+    ### Tripion
+    'TripionMinMass'             : 450,
+    'TripionMaxMass'             : 550,
+    'TripionVertexChi2PerDoF'    : 5,
+    'TripionFlightDistanceChi2'  : 100,
+    'TripionMinVertexZ'          : 0,
+    'TripionMaxVertexZ'          : 2200,
+    
+    ### Prescales
+    'DipionSSNarrowDownstreamPrescale'  : 1.0,
+    'DipionSSNarrowLongPrescale'        : 0.2,
+    'DipionSSWidePrescale'              : 0.05,
+    'DipionOSNarrowDownstreamPrescale'  : 0.4,
+    'DipionOSNarrowLongPrescale'        : 0.2,
+    'DipionOSWidePrescale'              : 0.05,
+    'TripionSSPrescale'                 : 1.0,
+    'TripionOSPrescale'                 : 1.0
+
+
+    },
+    'STREAMS'     :  [ 'BhadronCompleteEvent' ]
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class K23PiForDownstreamTrackEffConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        
+        self.name = name
+        self.config = config
+
+        
+        
+        self._downPionSel = None
+        self._downPionFilter()
+        
+        self._longPionSel = None
+        self._longPionFilter()
+        
+        self._dipionSelSSNarrowDownstream = None
+        self._dipionSelSSNarrowLong = None
+        self._dipionSelSSWide = None
+        #self._dipionFilterSS()
+
+        self._dipionSelOSNarrowDownstream = None
+        self._dipionSelOSNarrowLong = None
+        self._dipionSelOSWide = None
+        #self._dipionFilterOS()
+                
+        #self._tripionSelDipionSS = None
+        #self._tripionFilterDipionSS()
+        
+        #self._tripionSelDipionOS = None
+        #self._tripionFilterDipionOS()
+
+       
+
+        # some calculation for the major contribution to the corrected mass error
+        self.mCorrCalc =  [ "from LoKiPhys.decorators import *",
+                            # This is a simplified version of the corrected mass error calculation (only taking the uncertainty on the SV into account)
+                            "invSqMassPt   =  1/sqrt( M*M +  BPVPTFLIGHT*BPVPTFLIGHT )",
+                            "dMcorrdPt     =  0.5 * invSqMassPt * 2 * BPVPTFLIGHT + 1",
+                            "A             =  PX*(VFASPF(VX) - BPV(VX))+ PY*(VFASPF(VY) - BPV(VY)) + PZ*(VFASPF(VZ) - BPV(VZ))", 
+                            "B             =  (VFASPF(VX) - BPV(VX))*(VFASPF(VX) - BPV(VX)) + (VFASPF(VY) - BPV(VY))*(VFASPF(VY) - BPV(VY)) + (VFASPF(VZ) - BPV(VZ))*(VFASPF(VZ) - BPV(VZ))",
+                            "dAdx_sv       =  PX",
+                            "dAdy_sv       =  PY",
+                            "dAdz_sv       =  PZ",
+                            "dBdx_sv       =  2*(VFASPF(VX) - BPV(VX))", 
+                            "dBdy_sv       =  2*(VFASPF(VY) - BPV(VY))",
+                            "dBdz_sv       =  2*(VFASPF(VZ) - BPV(VZ))",
+                            "dMcdx_sv      =  dMcorrdPt * 1/BPVPTFLIGHT * -0.5 * (2*A*B*dAdx_sv - A*A*dBdx_sv)/(B*B)",
+                            "dMcdy_sv      =  dMcorrdPt * 1/BPVPTFLIGHT * -0.5 * (2*A*B*dAdy_sv - A*A*dBdy_sv)/(B*B)",
+                            "dMcdz_sv      =  dMcorrdPt * 1/BPVPTFLIGHT * -0.5 * (2*A*B*dAdz_sv - A*A*dBdz_sv)/(B*B)",
+                            "errxx         =  VFASPF(VCOV2(0,0)) * dMcdx_sv * dMcdx_sv",
+                            "erryy         =  VFASPF(VCOV2(1,1)) * dMcdy_sv * dMcdy_sv",
+                            "errzz         =  VFASPF(VCOV2(2,2)) * dMcdz_sv * dMcdz_sv",
+                            "errxy         =  2*VFASPF(VCOV2(0,1)) * dMcdx_sv * dMcdy_sv",
+                            "errxz         =  2*VFASPF(VCOV2(0,2)) * dMcdx_sv * dMcdz_sv",
+                            "erryz         =  2*VFASPF(VCOV2(1,2)) * dMcdy_sv * dMcdz_sv",
+                            "PSEUDOERR     = sqrt( errxx + erryy + errzz + errxy + errxz + erryz)",
+                            # corrected mass with a missing pion (instead of a neutrino)
+                            "MCORRPi       = (BPVCORRM - BPVPTFLIGHT) + sqrt(BPVPTFLIGHT*BPVPTFLIGHT + 139.57*139.57)"
+                            ]
+        
+        self.registerLine( self._KPiPi_DipionSSNarrow_Downstream_line() )
+        self.registerLine( self._KPiPi_DipionSSNarrow_Long_line() )
+        self.registerLine( self._KPiPi_DipionSSWide_line() )
+        self.registerLine( self._KPiPi_DipionOSNarrow_Downstream_line() )
+        self.registerLine( self._KPiPi_DipionOSNarrow_Long_line() )
+        self.registerLine( self._KPiPi_DipionOSWide_line() )
+        self.registerLine( self._KPiPiPi_DipionSS_line() )
+        self.registerLine( self._KPiPiPi_DipionOS_line() )
+        
+
+    ### The lines
+    def _KPiPi_DipionSSNarrow_Downstream_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'_K2PiPiDipionSSNarrow_Downstream_Line',
+                             prescale =  self.config["DipionSSNarrowDownstreamPrescale"],
+                             RequiredRawEvents = ["Trigger","Calo","Velo","Tracker"],
+                             algos = [ self._dipionFilterSSNarrowDownstream()])
+
+    def _KPiPi_DipionSSNarrow_Long_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'_K2PiPiDipionSSNarrow_Long_Line',
+                             prescale =  self.config["DipionSSNarrowLongPrescale"],
+                             RequiredRawEvents = ["Trigger","Calo","Velo","Tracker"],
+                             algos = [ self._dipionFilterSSNarrowLong()])
+
+    def _KPiPi_DipionSSWide_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'_K2PiPiDipionSSWide_Line',
+                             prescale =  self.config["DipionSSWidePrescale"],
+                             RequiredRawEvents = ["Trigger","Calo","Velo","Tracker"],
+                             algos = [ self._dipionFilterSSWide()])
+    
+    def _KPiPi_DipionOSNarrow_Downstream_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'_K2PiPiDipionOSNarrow_Downstream_Line',
+                             prescale =  self.config["DipionOSNarrowDownstreamPrescale"],
+                             RequiredRawEvents = ["Trigger","Calo","Velo","Tracker"],
+                             algos = [ self._dipionFilterOSNarrowDownstream()])
+
+    def _KPiPi_DipionOSNarrow_Long_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'_K2PiPiDipionOSNarrow_Long_Line',
+                             prescale =  self.config["DipionOSNarrowLongPrescale"],
+                             RequiredRawEvents = ["Trigger","Calo","Velo","Tracker"],
+                             algos = [ self._dipionFilterOSNarrowLong()])
+
+    def _KPiPi_DipionOSWide_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'_K2PiPiDipionOSWide_Line',
+                             prescale =  self.config["DipionOSWidePrescale"],
+                             RequiredRawEvents = ["Trigger","Calo","Velo","Tracker"],
+                             algos = [ self._dipionFilterOSWide()])
+
+    def _KPiPiPi_DipionSS_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'_K2PiPiPiDipionSS_Line',
+                             prescale =  self.config["TripionSSPrescale"],
+                             RequiredRawEvents = ["Trigger","Calo","Velo","Tracker"],
+                             algos = [ self._tripionFilterDipionSS()])
+
+    def _KPiPiPi_DipionOS_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'_K2PiPiPiDipionOS_Line',
+                             prescale =  self.config["TripionOSPrescale"],
+                             RequiredRawEvents = ["Trigger","Calo","Velo","Tracker"],
+                             algos = [ self._tripionFilterDipionOS()])
+        
+
+
+    ### The particle (and composite) selection criteria
+    #def _pionSelection( self ):
+    #    return
+    
+    def _tagPionSelection( self ):
+        return "(P > %(PionMinP)s ) & (PT > %(PionMinPT)s ) & (PROBNNghost < %(PionProbNNghost)s ) & (PROBNNpi > %(PionProbNNpi)s ) & (MIPCHI2DV(PRIMARY) > %(PionIPCHI2)s ) & (PROBNNp < %(PionProbNNp)s )"
+
+    def _dipionSelectionNarrow( self ):
+        return "(M > %(DipionMinMassNarrow)s )  & (M < %(DipionMaxMassNarrow)s ) & (VFASPF(VCHI2/VDOF) < %(DipionVertexChi2PerDoF)s )"\
+               " & (BPVVDCHI2 > %(DipionFlightDistanceChi2)s ) & (VFASPF(VZ) > %(DipionMinVertexZ)s ) & (VFASPF(VZ) < %(DipionMaxVertexZ)s )" \
+               " & (PT > %(DipionMinPT)s ) & (P > %(DipionMinP)s ) & (BPVDIRA > %(DipionDira)s ) & ( MCORRPi < %(DipionMaxMCorrNarrow)s )" \
+               " & (PSEUDOERR < %(DipionMCorrPseudoErrNarrow)s )"
+    
+    def _dipionSelectionWide( self ):
+        return "(M > %(DipionMinMassWide)s )  & (M < %(DipionMaxMassWide)s ) & (VFASPF(VCHI2/VDOF) < %(DipionVertexChi2PerDoF)s )"\
+               " & (BPVVDCHI2 > %(DipionFlightDistanceChi2)s ) & (VFASPF(VZ) > %(DipionMinVertexZ)s ) & (VFASPF(VZ) < %(DipionMaxVertexZ)s )" \
+               " & (PT > %(DipionMinPT)s ) & (P > %(DipionMinP)s ) & (BPVDIRA > %(DipionDira)s ) & ( MCORRPi < %(DipionMaxMCorrWide)s )" \
+               " & (PSEUDOERR < %(DipionMCorrPseudoErrWide)s )"
+    
+    def _tripionSelection( self ):
+        return "(M > %(TripionMinMass)s )  & (M < %(TripionMaxMass)s ) & (VFASPF(VCHI2/VDOF) < %(TripionVertexChi2PerDoF)s )"\
+               " & (BPVVDCHI2 > %(TripionFlightDistanceChi2)s ) & (VFASPF(VZ) > %(TripionMinVertexZ)s ) & (VFASPF(VZ) < %(TripionMaxVertexZ)s )"
+
+
+    ### Filter the pions
+    def _downPionFilter( self ):
+        if self._downPionSel is not None:
+            return self._downPionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsDownPions
+        
+        _pi = FilterDesktop( Code = 'ALL' )
+        _piSel=Selection("DownPi_for"+self._name,
+                         Algorithm=_pi,
+                         RequiredSelections = [StdNoPIDsDownPions])
+        self._downPionSel=_piSel
+        return _piSel
+    
+    def _longPionFilter( self ):
+        if self._longPionSel is not None:
+            return self._longPionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsPions
+        
+        _pi = FilterDesktop( Code = "(MIPCHI2DV(PRIMARY) > 49.0)" )
+        _piSel=Selection("LongPi_for"+self._name,
+                         Algorithm=_pi,
+                         RequiredSelections = [StdNoPIDsPions])
+        self._longPionSel=_piSel
+        return _piSel
+
+
+    #### Dipion ####
+    def _dipionFilterSSNarrowDownstream( self ):
+        if self._dipionSelSSNarrowDownstream is not None:
+           return self._dipionSelSSNarrowDownstream
+       
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+        _k2pipi = CombineParticles(
+            DecayDescriptors = [ "[phi(1020) -> pi+ pi+]cc" ] ,
+            DaughtersCuts    = { "pi+" : self._tagPionSelection()  %self._config },
+            CombinationCut = "AALL",
+            MotherCut       =  self._dipionSelectionNarrow() %self._config
+            )
+
+        _k2pipi.Preambulo = self.mCorrCalc
+        
+
+        _dipionSel=Selection("Kplus2PiPiSSNarrowDownstream_for"+self._name,
+                             Algorithm= _k2pipi,
+                             RequiredSelections = [self._downPionFilter()])
+      
+        self._dipionSelSSNarrowDownstream = _dipionSel
+      
+        return _dipionSel
+
+    def _dipionFilterSSNarrowLong( self ):
+        if self._dipionSelSSNarrowLong is not None:
+           return self._dipionSelSSNarrowLong
+       
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+        _k2pipi = CombineParticles(
+            DecayDescriptors = [ "[phi(1020) -> pi+ pi+]cc" ] ,
+            DaughtersCuts    = { "pi+" : self._tagPionSelection()  %self._config },
+            CombinationCut = "AALL",
+            MotherCut       =  self._dipionSelectionNarrow() %self._config
+            )
+
+        _k2pipi.Preambulo = self.mCorrCalc
+        
+
+        _dipionSel=Selection("Kplus2PiPiSSNarrowLong_for"+self._name,
+                             Algorithm= _k2pipi,
+                             RequiredSelections = [self._longPionFilter()])
+      
+        self._dipionSelSSNarrowLong = _dipionSel
+      
+        return _dipionSel
+
+
+    def _dipionFilterSSWide( self ):
+        if self._dipionSelSSWide is not None:
+           return self._dipionSelSSWide
+       
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+        _k2pipi = CombineParticles(
+            DecayDescriptors = [ "[phi(1020) -> pi+ pi+]cc" ] ,
+            DaughtersCuts    = { "pi+" : self._tagPionSelection()  %self._config },
+            CombinationCut = "AALL",
+            MotherCut       =  self._dipionSelectionWide() %self._config
+            )
+
+        _k2pipi.Preambulo = self.mCorrCalc
+
+        _dipionSel=Selection("Kplus2PiPiSSWide_for"+self._name,
+                             Algorithm= _k2pipi,
+                             RequiredSelections = [self._downPionFilter(), self._longPionFilter()])
+      
+        self._dipionSelSSWide = _dipionSel
+      
+        return _dipionSel
+    
+
+    #### Dipion ####
+    def _dipionFilterOSNarrowDownstream( self ):
+        if self._dipionSelOSNarrowDownstream is not None:
+           return self._dipionSelOSNarrowDownstream
+       
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+        # Cut out the Kshort
+        mCut = self._dipionSelectionNarrow() + " & (ADMASS('KS0') > 40)"
+        
+        _k2pipi = CombineParticles(
+            DecayDescriptors = [ "phi(1020) -> pi+ pi-" ] ,
+            DaughtersCuts    = { "pi+" : self._tagPionSelection()  %self._config,
+                                 "pi-" : self._tagPionSelection()  %self._config },
+            CombinationCut = "AALL",
+            MotherCut       = mCut  %self._config
+            )
+
+        _k2pipi.Preambulo = self.mCorrCalc
+        
+        _dipionSel=Selection("Kplus2PiPiOSNarrowDownstream_for"+self._name,
+                             Algorithm= _k2pipi,
+                             RequiredSelections = [self._downPionFilter()])
+      
+        self._dipionSelOSNarrowDownstream = _dipionSel
+      
+        return _dipionSel
+
+    def _dipionFilterOSNarrowLong( self ):
+        if self._dipionSelOSNarrowLong is not None:
+           return self._dipionSelOSNarrowLong
+       
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+        # Cut out the Kshort
+        mCut = self._dipionSelectionNarrow() + " & (ADMASS('KS0') > 40)"
+        
+        _k2pipi = CombineParticles(
+            DecayDescriptors = [ "phi(1020) -> pi+ pi-" ] ,
+            DaughtersCuts    = { "pi+" : self._tagPionSelection()  %self._config,
+                                 "pi-" : self._tagPionSelection()  %self._config },
+            CombinationCut = "AALL",
+            MotherCut       = mCut  %self._config
+            )
+
+        _k2pipi.Preambulo = self.mCorrCalc
+        
+        _dipionSel=Selection("Kplus2PiPiOSNarrowLong_for"+self._name,
+                             Algorithm= _k2pipi,
+                             RequiredSelections = [self._longPionFilter()])
+      
+        self._dipionSelOSNarrowLong = _dipionSel
+      
+        return _dipionSel
+
+    def _dipionFilterOSWide( self ):
+        if self._dipionSelOSWide is not None:
+           return self._dipionSelOSWide
+       
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+        # Cut out the Kshort
+        mCut = self._dipionSelectionWide() + " & (ADMASS('KS0') > 40)"
+        
+        _k2pipi = CombineParticles(
+            DecayDescriptors = [ "phi(1020) -> pi+ pi-" ] ,
+            DaughtersCuts    = { "pi+" : self._tagPionSelection()  %self._config,
+                                 "pi-" : self._tagPionSelection()  %self._config },
+            CombinationCut = "AALL",
+            MotherCut       = mCut  %self._config
+            )
+
+        _k2pipi.Preambulo = self.mCorrCalc
+        
+        _dipionSel=Selection("Kplus2PiPiOSWide_for"+self._name,
+                             Algorithm= _k2pipi,
+                             RequiredSelections = [self._downPionFilter(), self._longPionFilter()])
+      
+        self._dipionSelOSWide = _dipionSel
+      
+        return _dipionSel
+
+    #### Tripion ####
+    def _tripionFilterDipionSS( self ):
+        #if self._tripionSelDipionSS is not None:
+        #   return self._tripionSelDipionSS
+       
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+
+        _k2pipipi = CombineParticles(
+            DecayDescriptors = [ "[K+ -> phi(1020) pi-]cc" ] ,
+            CombinationCut = "AALL",
+            MotherCut       = self._tripionSelection() %self._config
+            )
+
+        _tripionSel=Selection("Kplus2PiPiPi_DipionSS_for"+self._name,
+                              Algorithm= _k2pipipi,
+                              RequiredSelections = [self._downPionFilter(), self._longPionFilter(), self._dipionSelSSWide])
+      
+        #self._tripionSelDipionSS = _tripionSel
+        
+        return _tripionSel
+
+    #### Tripion ####
+    def _tripionFilterDipionOS( self ):
+        #if self._tripionSelDipionOS is not None:
+        #   return self._tripionSelDipionOS
+       
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+
+        _k2pipipi = CombineParticles(
+            DecayDescriptors = [ "[K+ -> phi(1020) pi+]cc" ] ,
+            CombinationCut = "AALL",
+            MotherCut       = self._tripionSelection() %self._config
+            )
+
+        _tripionSel=Selection("Kplus2PiPiPi_DipionOS_for"+self._name,
+                              Algorithm= _k2pipipi,
+                              RequiredSelections = [self._downPionFilter(), self._longPionFilter(), self._dipionSelOSWide])
+      
+        #self._tripionSelDipionOS = _tripionSel
+        
+        return _tripionSel
+    
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingLowPtMuID.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingLowPtMuID.py
new file mode 100644
index 000000000..3f9d5238e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingLowPtMuID.py
@@ -0,0 +1,90 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+## #####################################################################
+# A stripping selection for muon identification calibration trough
+# the study of J/psi(1S) -> mu+ mu-
+## #####################################################################
+
+'''
+largely cloned from line written by 'S.Furcas', 'G.Lanfranchi', 'M.Palutan', 'A.Sarti', 'D.Milanes', 'MuID Team'
+'''
+
+__author__  = [ 'G.Ciezarek', ]
+__date__    = '03/12/2015'
+__version__ = '$Revision: 1.0 $'
+
+__all__     = ( 'LowPTMuConf',
+                'makeLowPTSelection',
+                'default_config'
+                )
+
+default_config = {
+    'NAME'        : 'LowPTMuID',
+    'WGs'         : ['ALL'],
+    'BUILDERTYPE' : 'LowPTMuConf',
+    'CONFIG'      : {'Prescale'           : 1,
+                     'MassWindow'         : 200,
+                     'ProbeIPCHI2'        : 25,
+                     'TagIPCHI2'          : 45,
+                     'TagPT'              : 1000,
+                     'VertexCHI2'         : 5,
+                     'FDCHI2'             : 225,
+                     'DIRA'               : 0.9995
+                      
+                     },
+    'STREAMS'     :  ['PID']
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StrippingConf.StrippingLine import StrippingLine
+from PhysSelPython.Wrappers import DataOnDemand, Selection, SelectionSequence, MergedSelection
+from Configurables import LoKi__VoidFilter as VoidFilter
+from Configurables import LoKi__Hybrid__CoreFactory as CoreFactory
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import  StdAllNoPIDsMuons
+
+class LowPTMuConf( LineBuilder ):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ) :
+        LineBuilder.__init__( self, name, config )
+        
+        self.config=config
+
+
+        self.selStdAllNoPIDMuons = StdAllNoPIDsMuons 
+        #Detached
+        self.sel_DetachedLowPT  = makeLowPTSelection( name + "_JpsiFromBLowPTCombine", self.selStdAllNoPIDMuons,self )
+        self.line_DetachedLowPT = StrippingLine( name + '_JpsiFromBLowPT', 
+                                                 prescale = config[ 'Prescale' ], 
+                                                 selection = self.sel_DetachedLowPT, 
+                                                 RequiredRawEvents = ["Muon"]
+                                                 ) 
+        self.registerLine( self.line_DetachedLowPT )
+
+
+
+'''
+Selection Makers
+'''
+def makeLowPTSelection( name, muons,self):
+
+    mucocut = '(MIPCHI2DV(PRIMARY)>%(ProbeIPCHI2)s)' 
+    combination = CombineParticles( DecayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                    DaughtersCuts = { 'mu+' : mucocut % self.config, 'mu-' : mucocut % self.config},
+                                    CombinationCut = "(ADAMASS('J/psi(1S)')<%(MassWindow)s*MeV)" % self.config,
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)<%(VertexCHI2)s) & (BPVVDCHI2 > %(FDCHI2)s) & (BPVDIRA > %(DIRA)s) & ( ( (CHILDCUT(ISMUON,1)) & (CHILDCUT((PT>%(TagPT)s),1)) & (CHILDCUT((MIPCHI2DV(PRIMARY)>%(TagIPCHI2)s),1)) ) | ((CHILDCUT(ISMUON,2)) & (CHILDCUT((PT>%(TagPT)s),2)) & (CHILDCUT((MIPCHI2DV(PRIMARY)>%(TagIPCHI2)s),2)) ) ) " % self.config
+                                    )
+    return Selection( name, 
+                      Algorithm = combination,
+                      RequiredSelections = [muons] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingMuIDCalib.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingMuIDCalib.py
new file mode 100644
index 000000000..232b5dbc4
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingMuIDCalib.py
@@ -0,0 +1,421 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+## #####################################################################
+# A stripping selection for muon identification calibration trough
+# the study of J/psi(1S) -> mu+ mu-
+## #####################################################################
+
+'''
+This line can be invoked by doing:
+
+from StrippingSelections.StrippingMuIDCalib import MuIDCalibConf as builder
+from StrippingSelections.StrippingMuIDCalib import config_params as config_params
+lb = builder( 'MuIDCalib', config_params )
+
+'''
+
+__author__  = [ 'S.Furcas', 'G.Lanfranchi', 'M.Palutan', 'A.Sarti', 'D.Milanes', 'MuID Team' ]
+__date__    = '23/08/2011'
+__version__ = '$Revision: 1.5 $'
+
+__all__     = ( 'MuIDCalibConf',
+                'makePromptSelection',
+                'makeDetachedSelection',
+                'makeDetachedNoMIPSelection', 
+                'makeDetachedNoMIPNoPCutSelection', 
+                'makeDetachedNoMIPHiPSelection', 
+                'makeDetachedNoMIPKSelection',
+                'makeLambdacSelection',
+                'makeTISTOS',
+                'default_config'
+                )
+
+default_config = {
+    'NAME'        : 'MuIDCalib',
+    'WGs'         : ['ALL'],
+    'BUILDERTYPE' : 'MuIDCalibConf',
+    'CONFIG'      : {'PromptPrescale'           : 0., #not used anymore 0.08 old prescale
+                     'DetachedPrescale'         : 0.,
+                     'DetachedNoMIPPrescale'    : 1, #0.3,
+                     'DetachedNoMIPHiPPrescale' : 0.,
+                     'DetachedNoMIPKPrescale'   : 1.,
+                     'FromLambdacPrescale'      : 1.,
+                     'KFromLambdacPrescale'     : 0.,
+                     'PiFromLambdacPrescale'    : 0.,
+                     'PFromLambdacPrescale'     : 0.,
+                     'KISMUONFromLambdacPrescale' : 0.,
+                     'PiISMUONFromLambdacPrescale': 0.,
+                     'PISMUONFromLambdacPrescale' : 0.},
+    'STREAMS'     :  { 'PID' : ['StrippingMuIDCalib_JpsiFromBNoPIDNoMip', 
+                                'StrippingMuIDCalib_JpsiKFromBNoPIDNoMip', 
+                                'StrippingMuIDCalib_FromLambdacDecay'] }
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StrippingConf.StrippingLine import StrippingLine
+from PhysSelPython.Wrappers import DataOnDemand, Selection, SelectionSequence, MergedSelection
+from Configurables import LoKi__VoidFilter as VoidFilter
+from Configurables import LoKi__Hybrid__CoreFactory as CoreFactory
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdNoPIDsKaons, StdNoPIDsMuons, StdNoPIDsPions, StdNoPIDsProtons
+from StandardParticles import StdAllNoPIDsKaons, StdAllNoPIDsMuons, StdAllNoPIDsPions, StdAllNoPIDsProtons
+
+class MuIDCalibConf( LineBuilder ):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ) :
+        LineBuilder.__init__( self, name, config )
+
+
+        self.selStdAllNoPIDMuons = StdAllNoPIDsMuons 
+        self.selStdNoPIDMuons    = StdNoPIDsMuons 
+        #self.selStdNoPIDMuons_L0   = makeTISTOS( name + "muons_L0"  , self.selStdNoPIDMuons   ,   "L0.*Physics.*Decision%TIS"   )
+        #self.selStdNoPIDMuons_Hlt1 = makeTISTOS( name + "muons_Hlt1", self.selStdNoPIDMuons_L0,   "Hlt1.*Physics.*Decision%TIS" )
+        #self.selStdNoPIDMuons_Hlt2 = makeTISTOS( name + "muons_Hlt2", self.selStdNoPIDMuons_Hlt1, "Hlt2.*Physics.*Decision%TIS" )
+
+        self.selStdNoPIDKaons    = StdNoPIDsKaons 
+        self.selStdNoPIDPions    = StdNoPIDsPions
+        self.selStdNoPIDProtons  = StdNoPIDsProtons
+
+        #Prompt line
+        self.sel_Prompt  = makePromptSelection( name + "_Combine", self.selStdAllNoPIDMuons )
+        self.line_Prompt = StrippingLine( name + '_JpsiNoPID', 
+                                          prescale = config[ 'PromptPrescale' ], 
+                                          selection = self.sel_Prompt, 
+                                          RequiredRawEvents = ["Muon"],
+                                          RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_Prompt.algorithm().DecayDescriptor)  ] 
+                                          ) 
+
+        #Detached
+        self.sel_Detached  = makeDetachedSelection( name + "_FromBCombine", self.selStdNoPIDMuons)
+        self.line_Detached = StrippingLine( name + '_JpsiFromBNoPID', 
+                                            prescale = config[ 'DetachedPrescale' ], 
+                                            selection = self.sel_Detached, 
+                                            RequiredRawEvents = ["Muon"],
+                                            RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_Detached.algorithm().DecayDescriptor)  ]
+                                            ) 
+
+        self.sel_DetachedNoMIP  = makeDetachedNoMIPSelection( name + "_FromBNoMipCombine", self.selStdNoPIDMuons )
+        self.line_DetachedNoMIP = StrippingLine( name + '_JpsiFromBNoPIDNoMip', 
+                                                 prescale = config[ 'DetachedNoMIPPrescale' ], 
+                                                 selection = self.sel_DetachedNoMIP, 
+                                                 RequiredRawEvents = ["Muon"],
+                                                 RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_DetachedNoMIP.algorithm().DecayDescriptor)  ]
+                                                 ) 
+                 
+        self.sel_DetachedNoMIPHiP  = makeDetachedNoMIPHiPSelection( name + "_FromBNoMipHiPCombine", self.selStdNoPIDMuons )
+        self.line_DetachedNoMIPHiP = StrippingLine( name + '_JpsiFromBNoPIDNoMipHiP', 
+                                                    prescale = config[ 'DetachedNoMIPHiPPrescale' ], 
+                                                    selection = self.sel_DetachedNoMIPHiP, 
+                                                    RequiredRawEvents = ["Muon"],
+                                                    RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_DetachedNoMIPHiP.algorithm().DecayDescriptor)  ]
+                                                    ) 
+
+        self.sel_DetachedNoMIPNoPCut  = makeDetachedNoMIPNoPCutSelection( name + "_FromBNoMipCombineNoPCut", self.selStdNoPIDMuons )
+        self.sel_DetachedNoMIPK  = makeDetachedNoMIPKSelection( name + "_FromBNoMipWithKCombine", self.sel_DetachedNoMIPNoPCut, self.selStdNoPIDKaons )
+        self.line_DetachedNoMIPK = StrippingLine( name + '_JpsiKFromBNoPIDNoMip', 
+                                                  prescale = config[ 'DetachedNoMIPKPrescale' ], 
+                                                  selection = self.sel_DetachedNoMIPK, 
+                                                  MDSTFlag = True,
+                                                  RequiredRawEvents = ["Muon"],
+                                                  RelatedInfoTools = [  addRelInfoMuonIsolation('[B+ ->  ( J/psi(1S) -> mu+ mu-) K+ ]CC')  ]
+                                                  ) 
+
+        #lambda_c
+        self.sel_Lambdac = makeLambdacSelection( name + '_FromLambdac', "", self.selStdNoPIDPions, self.selStdNoPIDKaons, self.selStdNoPIDProtons)
+        self.line_Lambdac = StrippingLine( name + '_FromLambdacDecay', 
+                                           prescale = config[ 'FromLambdacPrescale' ], 
+                                           selection = self.sel_Lambdac, 
+                                           MDSTFlag = True,
+                                           RequiredRawEvents = ["Muon"],
+                                           RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_Lambdac.algorithm().DecayDescriptor)  ]
+                                           ) 
+
+        self.sel_PiLambdac = makeLambdacSelection( name + '_PiFromLambdac', "pion", self.selStdNoPIDPions, self.selStdNoPIDKaons, self.selStdNoPIDProtons)
+        self.line_PiLambdac = StrippingLine( name + '_PiFromLambdacDecay', 
+                                             prescale = config[ 'PiFromLambdacPrescale' ], 
+                                             selection = self.sel_PiLambdac, 
+                                             RequiredRawEvents = ["Muon"],
+                                             RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_PiLambdac.algorithm().DecayDescriptor)  ]
+                                             ) 
+
+        self.sel_KLambdac = makeLambdacSelection( name + '_KFromLambdac', "kaon", self.selStdNoPIDPions, self.selStdNoPIDKaons, self.selStdNoPIDProtons)
+        self.line_KLambdac = StrippingLine( name + '_KFromLambdacDecay', 
+                                            prescale = config[ 'KFromLambdacPrescale' ], 
+                                            selection = self.sel_KLambdac, 
+                                            RequiredRawEvents = ["Muon"],
+                                            RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_KLambdac.algorithm().DecayDescriptor)  ]
+                                            ) 
+
+        self.sel_PLambdac = makeLambdacSelection( name + '_PFromLambdac', "proton", self.selStdNoPIDPions, self.selStdNoPIDKaons, self.selStdNoPIDProtons)
+        self.line_PLambdac = StrippingLine( name + '_PFromLambdacDecay', 
+                                            prescale = config[ 'PFromLambdacPrescale' ], 
+                                            selection = self.sel_PLambdac, 
+                                            RequiredRawEvents = ["Muon"],
+                                            RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_PLambdac.algorithm().DecayDescriptor)  ]
+                                            ) 
+
+        self.sel_PiISMUONLambdac = makeLambdacSelection( name + '_PiISMUONFromLambdac', "pionISMUON", 
+                                                         self.selStdNoPIDPions, self.selStdNoPIDKaons, self.selStdNoPIDProtons)
+        self.line_PiISMUONLambdac = StrippingLine( name + '_PiISMUONFromLambdacDecay', 
+                                                   prescale = config[ 'PiISMUONFromLambdacPrescale' ], 
+                                                   selection = self.sel_PiISMUONLambdac, 
+                                                   RequiredRawEvents = ["Muon"],
+                                                   RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_PiISMUONLambdac.algorithm().DecayDescriptor)  ]
+                                                   ) 
+
+        self.sel_KISMUONLambdac = makeLambdacSelection( name + '_KISMUONFromLambdac', "kaonISMUON", 
+                                                        self.selStdNoPIDPions, self.selStdNoPIDKaons, self.selStdNoPIDProtons)
+        self.line_KISMUONLambdac = StrippingLine( name + '_KISMUONFromLambdacDecay', 
+                                                  prescale = config[ 'KISMUONFromLambdacPrescale' ], 
+                                                  selection = self.sel_KISMUONLambdac, 
+                                                  RequiredRawEvents = ["Muon"],
+                                                  RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_KISMUONLambdac.algorithm().DecayDescriptor)  ]
+                                                  ) 
+
+        self.sel_PISMUONLambdac = makeLambdacSelection( name + '_PISMUONFromLambdac', "protonISMUON"
+                                                        , self.selStdNoPIDPions, self.selStdNoPIDKaons, self.selStdNoPIDProtons)
+        self.line_PISMUONLambdac = StrippingLine( name + '_PISMUONFromLambdacDecay', 
+                                                  prescale = config[ 'PISMUONFromLambdacPrescale' ], 
+                                                  selection = self.sel_PISMUONLambdac, 
+                                                  RequiredRawEvents = ["Muon"],
+                                                  RelatedInfoTools = [addRelInfoMuonIsolation(self.sel_PISMUONLambdac.algorithm().DecayDescriptor)  ]
+                                                  ) 
+
+        #self.registerLine( self.line_Prompt )
+        #self.registerLine( self.line_Detached )
+        self.registerLine( self.line_DetachedNoMIP )
+        #self.registerLine( self.line_DetachedNoMIPHiP )
+        self.registerLine( self.line_DetachedNoMIPK )
+        self.registerLine( self.line_Lambdac )
+        #self.registerLine( self.line_PiLambdac )
+        #self.registerLine( self.line_KLambdac )
+        #self.registerLine( self.line_PLambdac )
+        #self.registerLine( self.line_PiISMUONLambdac )
+        #self.registerLine( self.line_KISMUONLambdac )
+        #self.registerLine( self.line_PISMUONLambdac )
+
+
+
+'''
+Selection Makers
+'''
+def makePromptSelection( name, muons ):
+    '''
+    Create Jpsi -> mumu candidates out of no pid muons
+    TAG:: IsMuon and P>6Gev and Pt>1.5 GeV
+    PROBE:: Ecal (-10,1000) and Hcal (1000,4000) energy filtered
+    '''
+    mucocut = '(0.5<PPINFO(LHCb.ProtoParticle.InAccMuon,-1)) & (P>3*GeV) & (PT>800*MeV) & (TRCHI2DOF<3) & (ISLONG)'
+    tag1cuts = " (CHILDCUT(ISMUON,1)) & (CHILDCUT((P>6*GeV),1)) & (CHILDCUT((PT>1.5*GeV),1)) "
+    tag2cuts = " (CHILDCUT(ISMUON,2)) & (CHILDCUT((P>6*GeV),2)) & (CHILDCUT((PT>1.5*GeV),2)) "
+    probe2cuts = " ( (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloEcalE,-10000)<1000*MeV),2)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloHcalE,-10000)<4000*MeV),2)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloEcalE,-10000)>-10*MeV),2)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloHcalE,-10000)>1000*MeV),2)) ) "
+    probe1cuts = " ( (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloEcalE,-10000)<1000*MeV),1)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloHcalE,-10000)<4000*MeV),1)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloEcalE,-10000)>-10*MeV),1)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloHcalE,-10000)>1000*MeV),1)) )  "
+    child1cuts = tag1cuts + " & " + probe2cuts + " & " + probe1cuts
+    child2cuts = tag2cuts + " & " + probe1cuts + " & " + probe2cuts
+
+    combination = CombineParticles( DecayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                    DaughtersCuts = { 'mu+' : mucocut , 'mu-' : mucocut },
+                                    CombinationCut = "(ADAMASS('J/psi(1S)')<200*MeV)",
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)<5) & ( " + child1cuts + " | " + child2cuts + " ) "
+                                    )
+    return Selection( name, 
+                      Algorithm = combination,
+                      RequiredSelections = [muons] )
+
+
+def makeDetachedSelection( name, muons ):
+    '''
+    Create b -> Jpsi -> mumu candidates out of no pid muons
+    TAG:: IsMuon and P>6Gev and Pt>1.5 GeV
+    PROBE:: Ecal (-10,1000) and Hcal (1000,4000) energy filtered
+    '''
+    mucocut = '(0.5<PPINFO(LHCb.ProtoParticle.InAccMuon,-1)) & (P>3*GeV) & (PT>800*MeV) & (TRCHI2DOF<3) & (ISLONG) &(MIPDV(PRIMARY)>0.050) & (MIPCHI2DV(PRIMARY)>25)'
+    tag1cuts = " (CHILDCUT(ISMUON,1)) & (CHILDCUT((P>6*GeV),1)) & (CHILDCUT((PT>1.5*GeV),1)) & (CHILDCUT((MIPDV(PRIMARY)>0.12),1)) "
+    tag2cuts = " (CHILDCUT(ISMUON,2)) & (CHILDCUT((P>6*GeV),2)) & (CHILDCUT((PT>1.5*GeV),2)) & (CHILDCUT((MIPDV(PRIMARY)>0.12),2)) "
+    probe2cuts = " ( (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloEcalE,-10000)<1000*MeV),2)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloHcalE,-10000)<4000*MeV),2)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloEcalE,-10000)>-10*MeV),2)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloHcalE,-10000)>1000*MeV),2)) ) "
+    probe1cuts = " ( (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloEcalE,-10000)<1000*MeV),1)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloHcalE,-10000)<4000*MeV),1)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloEcalE,-10000)>-10*MeV),1)) & (CHILDCUT((PPINFO(LHCb.ProtoParticle.CaloHcalE,-10000)>1000*MeV),1)) )  "
+    child1cuts = tag1cuts + " & " + probe2cuts 
+    child2cuts = tag2cuts + " & " + probe1cuts 
+
+    combination = CombineParticles( DecayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                    DaughtersCuts = { 'mu+' : mucocut , 'mu-' : mucocut },
+                                    CombinationCut = "(ADAMASS('J/psi(1S)')<200*MeV)",
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)<5) & (BPVVDCHI2 > 225) & ( ( " + child1cuts + " ) | (" + child2cuts + " ) ) "
+                                    )
+    return Selection( name, 
+                      Algorithm = combination,
+                      RequiredSelections = [muons] )
+
+
+def makeDetachedNoMIPSelection( name, muons ):
+    '''
+    Create b -> Jpsi -> mumu candidates out of no pid muons without mip cuts
+    TAG:: IsMuon and P>6Gev and Pt>1.5 GeV & IpChi2>10
+    '''
+    #(0.5<PPINFO(LHCb.ProtoParticle.InAccMuon,-1)) &
+    mucocut = '(P>3*GeV) & (PT>800*MeV) & (TRCHI2DOF<3) & (ISLONG) & (MIPCHI2DV(PRIMARY)>10)'
+    tag1cuts = " (CHILDCUT(ISMUON,1)) & (CHILDCUT((P>6*GeV),1)) & (CHILDCUT((PT>1.5*GeV),1)) & (CHILDCUT((MIPCHI2DV(PRIMARY)>25),1)) "
+    tag2cuts = " (CHILDCUT(ISMUON,2)) & (CHILDCUT((P>6*GeV),2)) & (CHILDCUT((PT>1.5*GeV),2)) & (CHILDCUT((MIPCHI2DV(PRIMARY)>25),2)) "
+
+    combination = CombineParticles( DecayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                    DaughtersCuts = { 'mu+' : mucocut , 'mu-' : mucocut },
+                                    CombinationCut = "(ADAMASS('J/psi(1S)')<200*MeV)",
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)<5) & (BPVVDCHI2 > 225) & ( ( " + tag1cuts + " ) | (" + tag2cuts + " ) ) "
+                                    )
+    return Selection( name, 
+                      Algorithm = combination,
+                      RequiredSelections = [muons] )
+
+def makeDetachedNoMIPNoPCutSelection( name, muons ):
+    '''
+    Create b -> Jpsi -> mumu candidates out of no pid muons without mip cuts
+    TAG:: IsMuon and P>6Gev and Pt>1.5 GeV & IpChi2>10
+    '''
+    #(0.5<PPINFO(LHCb.ProtoParticle.InAccMuon,-1)) & '(P>3*GeV) & (PT>800*MeV)
+    mucocut = '(TRCHI2DOF<3) & (ISLONG) & (MIPCHI2DV(PRIMARY)>10)'
+    tag1cuts = " (CHILDCUT(ISMUON,1)) & (CHILDCUT((P>6*GeV),1)) & (CHILDCUT((PT>1.5*GeV),1)) & (CHILDCUT((MIPCHI2DV(PRIMARY)>25),1)) "
+    tag2cuts = " (CHILDCUT(ISMUON,2)) & (CHILDCUT((P>6*GeV),2)) & (CHILDCUT((PT>1.5*GeV),2)) & (CHILDCUT((MIPCHI2DV(PRIMARY)>25),2)) "
+
+    combination = CombineParticles( DecayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                    DaughtersCuts = { 'mu+' : mucocut , 'mu-' : mucocut },
+                                    CombinationCut = "(ADAMASS('J/psi(1S)')<200*MeV)",
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)<5) & (BPVVDCHI2 > 225) & ( ( " + tag1cuts + " ) | (" + tag2cuts + " ) ) "
+                                    )
+    return Selection( name, 
+                      Algorithm = combination,
+                      RequiredSelections = [muons] )
+
+def makeDetachedNoMIPHiPSelection( name, muons ):
+    '''
+    Create b -> Jpsi -> mumu candidates out of no pid muons without mip cuts
+    TAG:: IsMuon and P>6Gev and Pt>1.5 GeV & IpChi2>10
+    '''
+    #(0.5<PPINFO(LHCb.ProtoParticle.InAccMuon,-1)) &
+    mucocut = '(P>3*GeV) & (PT>800*MeV) & (TRCHI2DOF<3) & (ISLONG) & (MIPCHI2DV(PRIMARY)>10)'
+    tag1cuts = " (CHILDCUT(ISMUON,1)) & (CHILDCUT((P>6*GeV),1)) & (CHILDCUT((PT>1.5*GeV),1)) & (CHILDCUT((MIPCHI2DV(PRIMARY)>25),1)) "
+    tag2cuts = " (CHILDCUT(ISMUON,2)) & (CHILDCUT((P>6*GeV),2)) & (CHILDCUT((PT>1.5*GeV),2)) & (CHILDCUT((MIPCHI2DV(PRIMARY)>25),2)) "
+
+    probe1cuts = "(CHILDCUT(P>40*GeV,1))"
+    probe2cuts = "(CHILDCUT(P>40*GeV,2))"
+
+    child1cuts = tag1cuts + " & " + probe2cuts 
+    child2cuts = tag2cuts + " & " + probe1cuts 
+
+    combination = CombineParticles( DecayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                    DaughtersCuts = { 'mu+' : mucocut , 'mu-' : mucocut },
+                                    CombinationCut = "(ADAMASS('J/psi(1S)')<200*MeV)",
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)<5) & (BPVVDCHI2 > 225) & ( ( " + child1cuts + " ) | (" + child2cuts + " ) ) "
+                                    )
+    return Selection( name, 
+                      Algorithm = combination,
+                      RequiredSelections = [muons] )
+
+
+def makeDetachedNoMIPKSelection( name, jpsis, kaons ):
+    jpsi_cuts = "(VFASPF(VCHI2/VDOF)<5) &  (MIPCHI2DV(PRIMARY)>25)"
+    combination = CombineParticles( DecayDescriptor = '[B+ -> J/psi(1S) K+]cc',
+                                    DaughtersCuts = { "K+": "(MIPCHI2DV(PRIMARY)>25)" , 'J/psi(1S)' : jpsi_cuts },
+                                    CombinationCut = "ADAMASS('B+') < 500.*MeV",
+                                    MotherCut = "(BPVIPCHI2()<25)"
+                                    )
+    return Selection( name, 
+                      Algorithm = combination,
+                      RequiredSelections = [ jpsis, kaons ] )
+
+
+def makeLambdacSelection( name, line, pions, kaons, protons ) :
+    daucuts = "( PT>250*MeV ) & ( P>2*GeV ) & ( MIPCHI2DV(PRIMARY)>8. ) & ( TRPCHI2>0.0001 )"
+    kcuts   = daucuts
+    picuts  = daucuts
+    pcuts   = daucuts
+
+    kPID   = " & ( (PIDK - PIDpi)>10.0 )"
+    piPID  = " & ( (PIDK - PIDpi)<-5.0 )"
+    pPID   = " & ( (PIDp - PIDpi)>10.0 )"
+    ismuon = " & (ISMUON)"
+
+    if( line.startswith( "pion" ) ) :
+        kcuts += kPID
+        pcuts += pPID
+        if( line.endswith( "ISMUON" ) ) :
+            picuts += ismuon
+    if( line.startswith( "kaon" ) ) :
+        picuts += piPID
+        pcuts  += pPID
+        if( line.endswith( "ISMUON" ) ) :
+            kcuts += ismuon
+    if( line.startswith( "proton" ) ) :
+        kcuts  += kPID
+        picuts += piPID
+        if( line.endswith( "ISMUON" ) ) :
+            pcuts += ismuon
+
+    combcuts = "( ADAMASS('Lambda_c+')<150*MeV ) & ( APT>1.*GeV ) & ( ADOCACHI2CUT(50, '') )"
+    momcuts  = "( M > 2.240*GeV ) & ( M<2.330*GeV ) & ( VFASPF(VCHI2/VDOF)<8 ) & ( BPVDIRA>0.99999 ) & ( MIPCHI2DV(PRIMARY)<4. )"
+    momcuts += " & in_range( 0.85*GeV, M13, 0.95*GeV ) & ( (WM( 'K-' , 'pi+' , 'pi+' )>1.89*GeV) |  (WM( 'K-' , 'pi+' , 'pi+' )<1.80*GeV) )" #D+->Kpipi removal
+    LambdaC = CombineParticles ( 
+        DecayDescriptor = "[Lambda_c+ -> K- p+ pi+]cc",
+        DaughtersCuts = {
+            "K-"  : kcuts,
+            "p+"  : pcuts,
+            "pi+" : picuts
+            },
+        CombinationCut = combcuts,
+        MotherCut = momcuts
+        )
+
+    return Selection( name, 
+                      Algorithm = LambdaC,
+                      RequiredSelections = [ pions, kaons, protons ] )
+
+
+def makeTISTOS( name, sel, trigger ) :
+    from Configurables import TisTosParticleTagger
+    tisTosFilter = TisTosParticleTagger( name + "_Tagger" )
+    tisTosFilter.TisTosSpecs = { trigger : 0 }
+    tisTosFilter.ProjectTracksToCalo = False
+    tisTosFilter.CaloClustForCharged = False
+    tisTosFilter.CaloClustForNeutral = False
+    #tisTosFilter.TOSFrac = { 4:0.0, 5:0.0 }
+    return Selection( name,
+                      Algorithm = tisTosFilter,
+                      RequiredSelections = [ sel ]
+                      )
+
+
+
+def addRelInfoMuonIsolation( decdes ):    
+    import re
+    _DauLoc={}
+    _daughters = re.match(r'(.*)->([ |\[]*)([^\]]+)(.*)', decdes)
+    if _daughters:    
+        _particles = _daughters.group(3).split()
+        _ip=1
+        _gp=1
+        for _p in _particles:
+            if re.match(r'(pi|p|K|e|mu)[\+|-]',_p):
+                _key= _daughters.group(1)+"->"+_daughters.group(2)
+                _jp=1
+                for _p2 in _particles:
+                    _key+=" "
+                    if _jp==_ip: _key+="^"
+                    _key+=_p2
+                    _jp=_jp+1
+                _key+=_daughters.group(4).replace("cc","CC")
+                _DauLoc[_key] = "MudetIso"+str(_gp)
+                _gp=_gp+1
+            _ip=_ip+1
+    else:
+        return {}
+    return {  "Type" : "RelInfoMuonIsolation", "DaughterLocations" : _DauLoc}
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingNoPIDDstarWithD02RSKPi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingNoPIDDstarWithD02RSKPi.py
new file mode 100644
index 000000000..7a14ae486
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingNoPIDDstarWithD02RSKPi.py
@@ -0,0 +1,237 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingNoPIDDstarWithD02RSKPi.py,v 1.1 2010-09-03 22:38:21 pxing Exp $
+
+__author__  = ['Philip Xing', 'Andrew Powell']
+__date__    = '23rd August 2012'
+__version__ = '$Revision: 7.0 $'
+
+'''
+Configurable for the RICH calibration using D*+ -> pi+ D0( K- pi+).
+
+'''
+
+__all__ =('NoPIDDstarWithD02RSKPiConf','default_config')
+
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+from GaudiKernel.SystemOfUnits import mm, cm , MeV, GeV
+## from Configurables import FilterDesktop, CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsKaons, StdAllNoPIDsPions
+
+
+default_config =  {
+    'NAME'       : 'noPIDDstar',
+    'WGs'        : ['Calib'],
+    'BUILDERTYPE': 'NoPIDDstarWithD02RSKPiConf',
+    'CONFIG'     :{
+
+      'DaugPt'           : 250 * MeV      ## GeV
+    , 'DaugP'            : 2.0 * GeV      ## GeV
+    , 'DaugIPChi2'       : 16             ## unitless
+    , 'DaugTrkChi2'      : 4              ## unitless
+    , 'D0MassWin'        : 100 * MeV       ## MeV
+    , 'D0Pt'             : 1.6 * GeV  #1.5    ## GeV
+    , 'D0VtxChi2Ndof'    : 10 #13             ## unitless
+    , 'D0FDChi2'         : 49             ## unitless
+    , 'D0BPVDira'        : 0.9999         ## unitless
+    , 'D0IPChi2'         : 30             ## unit
+    , 'SlowPiPt'         : 150 * MeV      ## MeV
+    , 'SlowPiTrkChi2'    : 4              ## unitless
+    , 'DstarPt'          : 2.2 * GeV      ## GeV
+    , 'DstarVtxChi2Ndof' : 13             ## unitless
+    , 'DeltaM_Min'       : 130 * MeV      ## MeV
+    , 'DeltaM_Max'       : 155 * MeV      ## MeV
+    ##
+    , 'DCS_WrongMass'    : 25 * MeV       ## MeV (3 sigma veto)
+    , 'KK_WrongMass'     : 25 * MeV       ## MeV (3 sigma veto)
+    , 'PiPi_WrongMass'   : 25 * MeV       ## MeV (3 sigma veto)
+    ##
+    , 'Prescale'         : 1.00          ## unitless
+    , 'Postscale'        : 1.00           ## unitless
+    ##
+    , 'Monitor'          : False          ## Activate the monitoring?
+      },
+    'STREAMS'     :['Charm']
+
+}
+class NoPIDDstarWithD02RSKPiConf(LineBuilder) :
+    """
+    Definition of prompt D*+ -> D0( K- pi+) pi+ stripping lines.
+    The the main user method is Lines(), which returns a list of the
+    StrippingLine objects defined and configured by this configurable.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.selD02KPi = D0(name,
+                            config,
+                            Monitor=config['Monitor']
+                            )
+
+        self.selDstar2D0Pi = Dstar(name,
+                                   self.selD02KPi,
+                                   config,
+                                   Monitor=config['Monitor']
+                                   )
+
+        # 'StripDstarNoPIDsWithD02RSKPiLine'
+        self.Dstar2D0Pi_line = StrippingLine(name+'Line',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selDstar2D0Pi,
+                                             RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                             #RelatedInfoTools = [  addRelInfoMuonIsolation('[D*(2010)+ ->  ( D0 -> K- pi+ ) pi+]CC')  ]
+                                             # takes too much of the timing
+                                             )
+
+        self.registerLine(self.Dstar2D0Pi_line)
+
+
+def D0 ( name,
+         config,
+         Monitor
+         ) :
+    """
+    Selection for D0
+    """
+
+    _D0 = CombineParticles()
+    _D0.DecayDescriptor = "[D0 -> K- pi+]cc"
+    dauCutStr = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s)" %locals()['config']
+    _D0.DaughtersCuts = { "K+" : dauCutStr,
+                          "pi+" : dauCutStr
+                          }
+    _D0.CombinationCut = "(ADAMASS('D0')<85 * MeV)" %locals()['config']
+    mothercut = """
+    (PT>%(D0Pt)s)
+    & (VFASPF(VCHI2PDOF)<%(D0VtxChi2Ndof)s)
+    & (BPVVDCHI2>%(D0FDChi2)s)
+    & (BPVDIRA>%(D0BPVDira)s)
+    & (BPVIPCHI2()<%(D0IPChi2)s)
+    & (ADMASS('D0') < %(D0MassWin)s )
+    & ( ADWM( 'D0' , WM( 'pi-' , 'K+') ) > %(DCS_WrongMass)s)
+    """
+# take these out as they shape the sidebands
+   # & ( ADWM( 'D0' , WM( 'K-' , 'K+') ) > %(KK_WrongMass)s)
+   # & ( ADWM( 'D0' , WM( 'pi-' , 'pi+') ) > %(PiPi_WrongMass)s)
+   # """
+    _D0.MotherCut = mothercut %locals()['config']
+
+    if Monitor != None :
+        _D0.Preambulo    = [
+            ## define historam type (shortcut)
+            "Histo  = Gaudi.Histo1DDef"  ,
+            ## monitor LL-case
+            "mass     = monitor ( M / GeV , Histo ( 'D0' , 1.79 , 1.94 , 100 ) , 'M'     ) " ,
+            "pT       = monitor ( PT / GeV , Histo ( 'D0' , 0.00 , 20.0 , 100 ) , 'pT'   ) " ,
+            "y        = monitor ( Y , Histo ( 'D0' , 1.60 , 5.40 , 100 ) , 'y'           ) "
+            ]
+        _D0.Monitor       = True
+        _D0.HistoProduce  = True
+        _D0.MotherMonitor = """ process ( mass )
+        >> process ( pT )
+        >> process ( y )
+        >> EMPTY
+            """
+
+    D0 = Selection("SelD02RSKPiFor"+name,
+                   Algorithm = _D0,
+                   RequiredSelections = [StdAllNoPIDsKaons,
+                                         StdAllNoPIDsPions])
+    return D0
+
+def Dstar ( name,
+            D0Sel,
+            config,
+            Monitor) :
+    """
+    Selection for D*
+    """
+
+    _DSt = CombineParticles()
+    _DSt.DecayDescriptor = "[D*(2010)+ -> D0 pi+]cc"
+    slowPiCuts = "(PT>%(SlowPiPt)s) & (TRCHI2DOF < %(SlowPiTrkChi2)s)" %locals()['config']
+    d0Cuts = "ALL"
+    _DSt.DaughtersCuts   = { 'pi+' : slowPiCuts, 'D0' : d0Cuts }
+    combcut = """
+    (APT>%(DstarPt)s)
+    & (ADAMASS('D*(2010)+')<75)
+    & (AM - AM1 < 165 * MeV)
+    """
+    _DSt.CombinationCut = combcut %locals()['config']
+    mothercut = """
+    (VFASPF(VCHI2PDOF)<%(DstarVtxChi2Ndof)s)
+    & (M-MAXTREE('D0'==ABSID,M)<%(DeltaM_Max)s)
+    & (M-MAXTREE('D0'==ABSID,M)>%(DeltaM_Min)s)
+    """
+    _DSt.MotherCut =  mothercut %locals()['config']
+
+    if Monitor != None :
+        _DSt.Preambulo    = [
+            ## define historam type (shortcut)
+            "Histo  = Gaudi.Histo1DDef"  ,
+            ## monitor LL-case
+            "mass     = monitor ( M / GeV ,    Histo ( 'DSt' , 1.93 , 2.09 , 100 ) , 'M'     ) " ,
+            "deltaM   = monitor ( M - M1 /MeV, Histo ( 'DSt' , 135  , 160  , 50  ) , 'DeltaM') " ,
+            "pT       = monitor ( PT / GeV ,   Histo ( 'DSt' , 0.00 , 20.0 , 100 ) , 'pT'    ) " ,
+            "y        = monitor ( Y ,          Histo ( 'DSt' , 1.60 , 5.40 , 100 ) , 'y'     ) "
+            ]
+        _DSt.Monitor       = True
+        _DSt.HistoProduce  = True
+        _DSt.MotherMonitor = """ process ( mass )
+        >> process ( deltaM )
+        >> process ( pT )
+        >> process ( y )
+        >> EMPTY
+        """
+
+    DSt = Selection("SelDSt2D0PiFor"+name,
+                    Algorithm = _DSt,
+                    RequiredSelections = [StdAllNoPIDsPions,
+                                          D0Sel])
+
+    return DSt
+
+
+
+def addRelInfoMuonIsolation( decdes ):
+    import re
+    _DauLoc={}
+    _daughters = re.match(r'(.*)->([ |\[]*)([^\]]+)(.*)', decdes)
+    if _daughters:
+        _particles = _daughters.group(3).split()
+        _ip=1
+        _gp=1
+        for _p in _particles:
+            if re.match(r'(pi|p|K|e|mu)[\+|-]',_p):
+                _key= _daughters.group(1)+"->"+_daughters.group(2)
+                _jp=1
+                for _p2 in _particles:
+                    _key+=" "
+                    if _jp==_ip: _key+="^"
+                    _key+=_p2
+                    _jp=_jp+1
+                _key+=_daughters.group(4).replace("cc","CC")
+                _DauLoc[_key] = "MudetIso"+str(_gp)
+                _gp=_gp+1
+            _ip=_ip+1
+    else:
+        return {}
+    return {  "Type" : "RelInfoMuonIsolation", "DaughterLocations" : _DauLoc}
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingNoPIDDstarWithD02RSKPi_Brem.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingNoPIDDstarWithD02RSKPi_Brem.py
new file mode 100644
index 000000000..20b00347b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingNoPIDDstarWithD02RSKPi_Brem.py
@@ -0,0 +1,705 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__  = 'Vitalii Lisovskyi'
+__date__    = '15/03/2021'
+__version__ = '$Revision: 0.0 $'
+__all__ =('NoPIDDstarWithD02RSKPi_bremConf','default_config')
+
+'''
+Configurable for the RICH calibration using D*+ -> pi+ D0( K- pi+) for hadron->electron misID with bremsstrahlung photons added.
+'''
+
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+from GaudiKernel.SystemOfUnits import mm, cm , MeV, GeV
+## from Configurables import FilterDesktop, CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsKaons, StdAllNoPIDsPions, StdAllNoPIDsElectrons
+
+from Gaudi.Configuration   import *
+from Configurables         import NoPIDsParticleMaker, CombinedParticleMaker
+from CommonParticles.Utils import trackSelector, updateDoD
+
+default_config =  {
+    'NAME'       : 'noPIDDstar_brem',
+    'WGs'        : ['Calib'],
+    'BUILDERTYPE': 'NoPIDDstarWithD02RSKPi_bremConf',
+    'CONFIG'     :{
+
+      'DaugPt'           : 250 * MeV      ## GeV
+    , 'DaugP'            : 2.0 * GeV      ## GeV
+    , 'DaugIPChi2'       : 16             ## unitless
+    , 'DaugTrkChi2'      : 4 # 5              ## unitless
+    , 'D0MassWin'        : 500 * MeV       ## 75 MeV
+    , 'D0Pt'             : 1.6 * GeV # 1.5 * GeV      ## GeV
+    , 'D0VtxChi2Ndof'    : 10 # 13             ## unitless
+    , 'D0FDChi2'         : 49             ## unitless
+    , 'D0BPVDira'        : 0.9999         ## unitless
+    , 'D0IPChi2'         : 30             ## unit
+    , 'SlowPiPt'         : 150 * MeV      ## MeV
+    , 'SlowPiTrkChi2'    : 4              ## unitless
+    , 'DstarPt'          : 2.2 * GeV      ## GeV
+    , 'DstarVtxChi2Ndof' : 13             ## unitless
+    , 'DeltaM_Min'       : 130 * MeV      ## MeV
+    , 'DeltaM_Max'       : 155 * MeV      ## MeV
+    ##
+    , 'DCS_WrongMass'    : 25 * MeV       ## MeV (3 sigma veto)
+    , 'KK_WrongMass'     : 25 * MeV       ## MeV (3 sigma veto)
+    , 'PiPi_WrongMass'   : 25 * MeV       ## MeV (3 sigma veto)
+    ##
+    , 'Prescale'         : 1 #0.800          ## unitless
+    , 'Postscale'        : 1.00           ## unitless
+    ##
+    , 'Monitor'          : False          ## Activate the monitoring?
+      },
+    'STREAMS'     : ['Charm']#['PID']
+
+}
+
+class NoPIDDstarWithD02RSKPi_bremConf(LineBuilder) :
+    """
+    Definition of prompt D*+ -> D0( K- pi+) pi+ stripping lines.
+    The the main user method is Lines(), which returns a list of the
+    StrippingLine objects defined and configured by this configurable.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.selbrempion_PMaker = brempion_PMaker(name+"_brempion_PMaker",
+                            config
+                            )
+
+        self.selbremkaon_PMaker = bremkaon_PMaker(name+"_bremkaon_PMaker",
+                            config
+                            )
+
+        # self.selbrempion_asE = brempion_CombMaker(name+"_brempion_asE",
+        #                     config
+        #                     )
+
+        # 1 brem builders
+
+        self.selD02KPi_BremPi = D0_pi(name+"_BremPi", brem=1,
+                            config=config, pions=self.selbrempion_PMaker,
+                            Monitor=config['Monitor']
+                            )
+
+        self.selD02KPi_BremPiasE = D0_piasE(name+"_BremPiasE", brem=1,
+                            config=config, #pions=self.selbrempion_asE,
+                            Monitor=config['Monitor']
+                            )
+
+        self.selD02KPi_BremK = D0_K(name+"_BremK", brem=1,
+                            config=config, kaons=self.selbremkaon_PMaker,
+                            Monitor=config['Monitor']
+                            )
+
+        self.selD02KPi_BremKasE = D0_KasE(name+"_BremKasE", brem=1,
+                            config=config, #pions=self.selbrempion_asE,
+                            Monitor=config['Monitor']
+                            )
+
+        # 0 brem builders
+
+        self.selD02KPi_noBremPi = D0_pi(name+"_noBremPi", brem=0,
+                            config=config, pions=self.selbrempion_PMaker,
+                            Monitor=config['Monitor']
+                            )
+
+        self.selD02KPi_noBremPiasE = D0_piasE(name+"_noBremPiasE", brem=0,
+                            config=config, #pions=self.selbrempion_asE,
+                            Monitor=config['Monitor']
+                            )
+
+        self.selD02KPi_noBremK = D0_K(name+"_noBremK", brem=0,
+                            config=config, kaons=self.selbremkaon_PMaker,
+                            Monitor=config['Monitor']
+                            )
+
+        self.selD02KPi_noBremKasE = D0_KasE(name+"_noBremKasE", brem=0,
+                            config=config, #pions=self.selbrempion_asE,
+                            Monitor=config['Monitor']
+                            )
+
+        # 1 brem Dstar
+        self.selDstar2D0Pi_BremPi = Dstar(name+"_BremPi",
+                                   self.selD02KPi_BremPi,
+                                   1, 0,
+                                   config,
+                                   Monitor=config['Monitor']
+                                   )
+
+        self.selDstar2D0Pi_BremPiasE = Dstar(name+"_BremPiasE",
+                                   self.selD02KPi_BremPiasE,
+                                   1, 1,
+                                   config,
+                                   Monitor=config['Monitor']
+                                   )
+
+        self.selDstar2D0Pi_BremK = Dstar(name+"_BremK",
+                                   self.selD02KPi_BremK,
+                                   1, 0,
+                                   config,
+                                   Monitor=config['Monitor']
+                                   )
+
+        self.selDstar2D0Pi_BremKasE = Dstar(name+"_BremKasE",
+                                   self.selD02KPi_BremKasE,
+                                   1, 1,
+                                   config,
+                                   Monitor=config['Monitor']
+                                   )
+
+        # 0 brem Dstar
+        self.selDstar2D0Pi_noBremPi = Dstar(name+"_noBremPi",
+                                   self.selD02KPi_noBremPi,
+                                   0, 0,
+                                   config,
+                                   Monitor=config['Monitor']
+                                   )
+
+        self.selDstar2D0Pi_noBremPiasE = Dstar(name+"_noBremPiasE",
+                                   self.selD02KPi_noBremPiasE,
+                                   0, 1,
+                                   config,
+                                   Monitor=config['Monitor']
+                                   )
+
+        self.selDstar2D0Pi_noBremK = Dstar(name+"_noBremK",
+                                   self.selD02KPi_noBremK,
+                                   0, 0,
+                                   config,
+                                   Monitor=config['Monitor']
+                                   )
+
+        self.selDstar2D0Pi_noBremKasE = Dstar(name+"_noBremKasE",
+                                   self.selD02KPi_noBremKasE,
+                                   0, 1,
+                                   config,
+                                   Monitor=config['Monitor']
+                                   )
+
+
+        # define stripping lines
+
+        self.Dstar2D0Pi_BremPi_line = StrippingLine(name+'Pion1BremLine',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selDstar2D0Pi_BremPi,
+                                             RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                             RelatedInfoTools = [  addRelInfoMuonIsolation('[D*(2010)+ ->  ( D0 -> K- pi+ ) pi+]CC')  ]
+                                             )
+
+        self.Dstar2D0Pi_BremPiasE_line = StrippingLine(name+'PionasE1BremLine',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selDstar2D0Pi_BremPiasE,
+                                             RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                             RelatedInfoTools = [  addRelInfoMuonIsolation('[D*(2010)+ ->  ( D0 -> K- e+ ) pi+]CC')  ]
+                                             )
+
+        self.Dstar2D0Pi_BremKasE_line = StrippingLine(name+'KaonasE1BremLine',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selDstar2D0Pi_BremKasE,
+                                             RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                             RelatedInfoTools = [  addRelInfoMuonIsolation('[D*(2010)+ ->  ( D0 -> e- pi+ ) pi+]CC')  ]
+                                             )
+
+
+        self.Dstar2D0Pi_BremK_line = StrippingLine(name+'Kaon1BremLine',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selDstar2D0Pi_BremK,
+                                             RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                             RelatedInfoTools = [  addRelInfoMuonIsolation('[D*(2010)+ ->  ( D0 -> K- pi+ ) pi+]CC')  ]
+                                             )
+#
+        self.Dstar2D0Pi_noBremPi_line = StrippingLine(name+'Pion0BremLine',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selDstar2D0Pi_noBremPi,
+                                             RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                             RelatedInfoTools = [  addRelInfoMuonIsolation('[D*(2010)+ ->  ( D0 -> K- pi+ ) pi+]CC')  ]
+                                             )
+
+        self.Dstar2D0Pi_noBremPiasE_line = StrippingLine(name+'PionasE0BremLine',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selDstar2D0Pi_noBremPiasE,
+                                             RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                             RelatedInfoTools = [  addRelInfoMuonIsolation('[D*(2010)+ ->  ( D0 -> K- e+ ) pi+]CC')  ]
+                                             )
+
+        self.Dstar2D0Pi_noBremKasE_line = StrippingLine(name+'KaonasE0BremLine',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selDstar2D0Pi_noBremKasE,
+                                             RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                             RelatedInfoTools = [  addRelInfoMuonIsolation('[D*(2010)+ ->  ( D0 -> e- pi+ ) pi+]CC')  ]
+                                             )
+
+
+        self.Dstar2D0Pi_noBremK_line = StrippingLine(name+'Kaon0BremLine',
+                                             prescale = config['Prescale'],
+                                             postscale = config['Postscale'],
+                                             selection = self.selDstar2D0Pi_noBremK,
+                                             RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                             RelatedInfoTools = [  addRelInfoMuonIsolation('[D*(2010)+ ->  ( D0 -> K- pi+ ) pi+]CC')  ]
+                                             )
+
+        self.registerLine(self.Dstar2D0Pi_BremPi_line)
+        self.registerLine(self.Dstar2D0Pi_BremPiasE_line)
+        self.registerLine(self.Dstar2D0Pi_BremK_line)
+        self.registerLine(self.Dstar2D0Pi_BremKasE_line)
+        self.registerLine(self.Dstar2D0Pi_noBremPi_line)
+        self.registerLine(self.Dstar2D0Pi_noBremPiasE_line)
+        self.registerLine(self.Dstar2D0Pi_noBremK_line)
+        self.registerLine(self.Dstar2D0Pi_noBremKasE_line)
+
+
+def D0_pi ( name,
+         pions,
+         brem,
+         config,
+         Monitor
+         ) :
+    """
+    Selection for D0 with brem added to the pion
+    """
+    #first, build pions with brem
+
+
+    ## create the algorithm
+    # algorithm_pi =  NoPIDsParticleMaker ( 'StdAllNoPIDsBremPions' ,
+    #                                    Particle = 'pion'  )
+    # algorithm_pi.AddBremPhotonTo = ['pi+']
+    # # configure the track selector
+    # selector_pi = trackSelector ( algorithm_pi )
+    # ## configure Data-On-Demand service
+    # updateDoD ( algorithm_pi )
+    # ## finally: define the symbol
+    # StdAllNoPIDsBremPions = AutomaticData(Location = 'Phys/StdAllNoPIDsBremPions/Particles')  #algorithm_pi
+
+
+    _D0 = CombineParticles()
+    _D0.DecayDescriptor = "[D0 -> K- pi+]cc"
+    dauCutStr = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s)" %locals()['config']
+    if brem:
+        dauCutStr_brem1 = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s) & (PINFO(LHCb.Particle.HasBremAdded,0.)> 0)" %locals()['config']
+    else:
+        dauCutStr_brem1 = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s) & (PINFO(LHCb.Particle.HasBremAdded,0.)== 0)" %locals()['config']
+    #brem1 = "& (PINFO(LHCb::Particle::HasBremAdded,0.)> 0)"
+    _D0.DaughtersCuts = { "K+" : dauCutStr,
+                          "pi+" : dauCutStr_brem1
+                          }
+    _D0.CombinationCut = "(ADAMASS('D0')<550 * MeV)" %locals()['config']
+    if not brem:
+        _D0.CombinationCut = "(ADAMASS('D0')<100 * MeV)"
+    mothercut = """
+    (PT>%(D0Pt)s)
+    & (VFASPF(VCHI2PDOF)<%(D0VtxChi2Ndof)s)
+    & (BPVVDCHI2>%(D0FDChi2)s)
+    & (BPVDIRA>%(D0BPVDira)s)
+    & (BPVIPCHI2()<%(D0IPChi2)s)
+    & (ADMASS('D0') < %(D0MassWin)s )
+    """
+    #    & ( ADWM( 'D0' , WM( 'pi-' , 'K+') ) > %(DCS_WrongMass)s)
+# take these out as they shape the sidebands
+   # & ( ADWM( 'D0' , WM( 'K-' , 'K+') ) > %(KK_WrongMass)s)
+   # & ( ADWM( 'D0' , WM( 'pi-' , 'pi+') ) > %(PiPi_WrongMass)s)
+   # """
+    _D0.MotherCut = mothercut %locals()['config']
+
+    # if Monitor != None :
+    #     _D0.Preambulo    = [
+    #         ## define historam type (shortcut)
+    #         "Histo  = Gaudi.Histo1DDef"  ,
+    #         ## monitor LL-case
+    #         "mass     = monitor ( M / GeV , Histo ( 'D0' , 1.79 , 1.94 , 100 ) , 'M'     ) " ,
+    #         "pT       = monitor ( PT / GeV , Histo ( 'D0' , 0.00 , 20.0 , 100 ) , 'pT'   ) " ,
+    #         "y        = monitor ( Y , Histo ( 'D0' , 1.60 , 5.40 , 100 ) , 'y'           ) "
+    #         ]
+    #     _D0.Monitor       = True
+    #     _D0.HistoProduce  = True
+    #     _D0.MotherMonitor = """ process ( mass )
+    #     >> process ( pT )
+    #     >> process ( y )
+    #     >> EMPTY
+    #         """
+
+    D0 = Selection("SelD02RSKPiFor"+name,
+                   Algorithm = _D0,
+                   RequiredSelections = [StdAllNoPIDsKaons, pions])
+    return D0
+
+
+def D0_piasE ( name,
+         #pions,
+         brem,
+         config,
+         Monitor
+         ) :
+    """
+    Selection for D0 with brem added to the pion
+    """
+
+    _D0 = CombineParticles()
+    _D0.DecayDescriptor = "[D0 -> K- e+]cc"
+    dauCutStr = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s)" %locals()['config']
+    if brem:
+        dauCutStr_brem1 = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s) & (PINFO(LHCb.Particle.HasBremAdded,0.)> 0)" %locals()['config']
+    else:
+        dauCutStr_brem1 = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s) & (PINFO(LHCb.Particle.HasBremAdded,0.)== 0)" %locals()['config']
+    #brem1 = "& (PINFO(LHCb::Particle::HasBremAdded,0.)> 0)"
+    _D0.DaughtersCuts = { "K+" : dauCutStr,
+                          "e+" : dauCutStr_brem1
+                          }
+    _D0.CombinationCut = "(APT>0)" %locals()['config']
+    # if not brem:
+    #     _D0.CombinationCut = "(ADAMASS('D0')<100 * MeV)"
+    mothercut = """
+    (PT>%(D0Pt)s)
+    & (VFASPF(VCHI2PDOF)<%(D0VtxChi2Ndof)s)
+    & (BPVVDCHI2>%(D0FDChi2)s)
+    & (BPVDIRA>%(D0BPVDira)s)
+    & (BPVIPCHI2()<%(D0IPChi2)s)
+    & (ADWM( 'D0' , WM( 'K-' , 'pi+') )<500 * MeV)
+    """
+#    & ( ADWM( 'D0' , WM( 'pi-' , 'K+') ) > %(DCS_WrongMass)s)
+# take these out as they shape the sidebands
+   # & ( ADWM( 'D0' , WM( 'K-' , 'K+') ) > %(KK_WrongMass)s)
+   # & ( ADWM( 'D0' , WM( 'pi-' , 'pi+') ) > %(PiPi_WrongMass)s)
+   # """
+    _D0.MotherCut = mothercut %locals()['config']
+    if not brem:
+        _D0.MotherCut += " & (ADWM( 'D0' , WM( 'K-' , 'pi+') )<100 * MeV)"
+    # if Monitor != None :
+    #     _D0.Preambulo    = [
+    #         ## define historam type (shortcut)
+    #         "Histo  = Gaudi.Histo1DDef"  ,
+    #         ## monitor LL-case
+    #         "mass     = monitor ( M / GeV , Histo ( 'D0' , 1.79 , 1.94 , 100 ) , 'M'     ) " ,
+    #         "pT       = monitor ( PT / GeV , Histo ( 'D0' , 0.00 , 20.0 , 100 ) , 'pT'   ) " ,
+    #         "y        = monitor ( Y , Histo ( 'D0' , 1.60 , 5.40 , 100 ) , 'y'           ) "
+    #         ]
+    #     _D0.Monitor       = True
+    #     _D0.HistoProduce  = True
+    #     _D0.MotherMonitor = """ process ( mass )
+    #     >> process ( pT )
+    #     >> process ( y )
+    #     >> EMPTY
+    #         """
+
+    D0 = Selection("SelD02RSKPiFor"+name,
+                   Algorithm = _D0,
+                   RequiredSelections = [StdAllNoPIDsKaons, StdAllNoPIDsElectrons])
+    return D0
+
+def D0_K ( name,
+         kaons,
+         brem,
+         config,
+         Monitor
+         ) :
+    """
+    Selection for D0 with brem added to the kaon
+    """
+    #first, build pions with brem
+
+    ## create the algorithm
+    # algorithm_K =  NoPIDsParticleMaker ( 'StdAllNoPIDsBremKaons' ,
+    #                                    Particle = 'kaon'  )
+    # algorithm_K.AddBremPhotonTo = ['K+']
+    # # configure the track selector
+    # selector_K = trackSelector ( algorithm_K )
+    # ## configure Data-On-Demand service
+    # updateDoD ( algorithm_K )
+    # ## finally: define the symbol
+    # StdAllNoPIDsBremKaons = AutomaticData(Location = 'Phys/StdAllNoPIDsBremKaons/Particles')   #StdAllNoPIDsBremKaons = algorithm_K
+
+
+    _D0 = CombineParticles()
+    _D0.DecayDescriptor = "[D0 -> K- pi+]cc"
+    dauCutStr = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s)" %locals()['config']
+    if brem:
+        dauCutStr_brem1 = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s) & (PINFO(LHCb.Particle.HasBremAdded,0.)> 0)" %locals()['config']
+    else:
+        dauCutStr_brem1 = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s) & (PINFO(LHCb.Particle.HasBremAdded,0.)== 0)" %locals()['config']
+    #brem1 = "& (PINFO(LHCb::Particle::HasBremAdded,0.)> 0)"
+    _D0.DaughtersCuts = { "K+" : dauCutStr_brem1,
+                          "pi+" : dauCutStr
+                          }
+    _D0.CombinationCut = "(ADAMASS('D0')<550 * MeV)" %locals()['config']
+    if not brem:
+        _D0.CombinationCut = "(ADAMASS('D0')<100 * MeV)"
+    mothercut = """
+    (PT>%(D0Pt)s)
+    & (VFASPF(VCHI2PDOF)<%(D0VtxChi2Ndof)s)
+    & (BPVVDCHI2>%(D0FDChi2)s)
+    & (BPVDIRA>%(D0BPVDira)s)
+    & (BPVIPCHI2()<%(D0IPChi2)s)
+    & (ADMASS('D0') < %(D0MassWin)s )
+    """
+#    & ( ADWM( 'D0' , WM( 'pi-' , 'K+') ) > %(DCS_WrongMass)s)
+# take these out as they shape the sidebands
+   # & ( ADWM( 'D0' , WM( 'K-' , 'K+') ) > %(KK_WrongMass)s)
+   # & ( ADWM( 'D0' , WM( 'pi-' , 'pi+') ) > %(PiPi_WrongMass)s)
+   # """
+    _D0.MotherCut = mothercut %locals()['config']
+    # if not brem:
+    #     _D0.MotherCut += " & (ADWM( 'D0' , WM( 'K-' , 'pi+') )<100 * MeV)"
+    # if Monitor != None :
+    #     _D0.Preambulo    = [
+    #         ## define historam type (shortcut)
+    #         "Histo  = Gaudi.Histo1DDef"  ,
+    #         ## monitor LL-case
+    #         "mass     = monitor ( M / GeV , Histo ( 'D0' , 1.79 , 1.94 , 100 ) , 'M'     ) " ,
+    #         "pT       = monitor ( PT / GeV , Histo ( 'D0' , 0.00 , 20.0 , 100 ) , 'pT'   ) " ,
+    #         "y        = monitor ( Y , Histo ( 'D0' , 1.60 , 5.40 , 100 ) , 'y'           ) "
+    #         ]
+    #     _D0.Monitor       = True
+    #     _D0.HistoProduce  = True
+    #     _D0.MotherMonitor = """ process ( mass )
+    #     >> process ( pT )
+    #     >> process ( y )
+    #     >> EMPTY
+    #         """
+
+    D0 = Selection("SelD02RSKPiFor"+name,
+                   Algorithm = _D0,
+                   RequiredSelections = [kaons, StdAllNoPIDsPions])
+    return D0
+
+def D0_KasE ( name,
+         #pions,
+         brem,
+         config,
+         Monitor
+         ) :
+    """
+    Selection for D0 with brem added to the kaon
+    """
+
+    _D0 = CombineParticles()
+    _D0.DecayDescriptor = "[D0 -> e- pi+]cc"
+    dauCutStr = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s)" %locals()['config']
+    if brem:
+        dauCutStr_brem1 = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s) & (PINFO(LHCb.Particle.HasBremAdded,0.)> 0)" %locals()['config']
+    else:
+        dauCutStr_brem1 = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s) & (PINFO(LHCb.Particle.HasBremAdded,0.)== 0)" %locals()['config']
+    #brem1 = "& (PINFO(LHCb::Particle::HasBremAdded,0.)> 0)"
+    _D0.DaughtersCuts = { "pi+" : dauCutStr,
+                          "e+" : dauCutStr_brem1
+                          }
+    _D0.CombinationCut = "(APT>0)" %locals()['config']
+
+    mothercut = """
+    (PT>%(D0Pt)s)
+    & (VFASPF(VCHI2PDOF)<%(D0VtxChi2Ndof)s)
+    & (BPVVDCHI2>%(D0FDChi2)s)
+    & (BPVDIRA>%(D0BPVDira)s)
+    & (BPVIPCHI2()<%(D0IPChi2)s)
+    & (ADWM( 'D0' , WM( 'K-' , 'pi+') )<550 * MeV)
+    """
+#    & ( ADWM( 'D0' , WM( 'pi-' , 'K+') ) > %(DCS_WrongMass)s)
+# take these out as they shape the sidebands
+   # & ( ADWM( 'D0' , WM( 'K-' , 'K+') ) > %(KK_WrongMass)s)
+   # & ( ADWM( 'D0' , WM( 'pi-' , 'pi+') ) > %(PiPi_WrongMass)s)
+   # """
+    _D0.MotherCut = mothercut %locals()['config']
+    if not brem:
+        _D0.MotherCut += " & (ADWM( 'D0' , WM( 'K-' , 'pi+') )<100 * MeV)"
+    # if Monitor != None :
+    #     _D0.Preambulo    = [
+    #         ## define historam type (shortcut)
+    #         "Histo  = Gaudi.Histo1DDef"  ,
+    #         ## monitor LL-case
+    #         "mass     = monitor ( M / GeV , Histo ( 'D0' , 1.79 , 1.94 , 100 ) , 'M'     ) " ,
+    #         "pT       = monitor ( PT / GeV , Histo ( 'D0' , 0.00 , 20.0 , 100 ) , 'pT'   ) " ,
+    #         "y        = monitor ( Y , Histo ( 'D0' , 1.60 , 5.40 , 100 ) , 'y'           ) "
+    #         ]
+    #     _D0.Monitor       = True
+    #     _D0.HistoProduce  = True
+    #     _D0.MotherMonitor = """ process ( mass )
+    #     >> process ( pT )
+    #     >> process ( y )
+    #     >> EMPTY
+    #         """
+
+    D0 = Selection("SelD02RSKPiFor"+name,
+                   Algorithm = _D0,
+                   RequiredSelections = [StdAllNoPIDsPions, StdAllNoPIDsElectrons])
+    return D0
+
+
+
+def Dstar ( name,
+            D0Sel,
+            brem,
+            asE,
+            config,
+            Monitor) :
+    """
+    Selection for D*
+    """
+
+    _DSt = CombineParticles()
+    _DSt.DecayDescriptor = "[D*(2010)+ -> D0 pi+]cc"
+    slowPiCuts = "(PT>%(SlowPiPt)s) & (TRCHI2DOF < %(SlowPiTrkChi2)s)" %locals()['config']
+    d0Cuts = "ALL"
+    _DSt.DaughtersCuts   = { 'pi+' : slowPiCuts, 'D0' : d0Cuts }
+    combcut = """
+    (APT>%(DstarPt)s)
+    & (ADAMASS('D*(2010)+')<500)
+    & (AM - AM1 < 200 * MeV)
+    """
+    #was: 75, 165 MeV
+    _DSt.CombinationCut = combcut %locals()['config']
+    if (not brem) and (not asE):
+        _DSt.CombinationCut += " & (ADAMASS('D*(2010)+')<75 * MeV) & (AM - AM1 < 200 * MeV)"
+    if (not brem) and asE:
+        _DSt.CombinationCut += " & (ADAMASS('D*(2010)+')<500 * MeV) & (AM - AM1 < 225 * MeV)"
+    mothercut = """
+    (VFASPF(VCHI2PDOF)<%(DstarVtxChi2Ndof)s)
+    & (M-MAXTREE('D0'==ABSID,M)<%(DeltaM_Max)s)
+    & (M-MAXTREE('D0'==ABSID,M)>%(DeltaM_Min)s)
+    """
+    _DSt.MotherCut =  mothercut %locals()['config']
+
+    # if Monitor != None :
+    #     _DSt.Preambulo    = [
+    #         ## define historam type (shortcut)
+    #         "Histo  = Gaudi.Histo1DDef"  ,
+    #         ## monitor LL-case
+    #         "mass     = monitor ( M / GeV ,    Histo ( 'DSt' , 1.93 , 2.09 , 100 ) , 'M'     ) " ,
+    #         "deltaM   = monitor ( M - M1 /MeV, Histo ( 'DSt' , 135  , 160  , 50  ) , 'DeltaM') " ,
+    #         "pT       = monitor ( PT / GeV ,   Histo ( 'DSt' , 0.00 , 20.0 , 100 ) , 'pT'    ) " ,
+    #         "y        = monitor ( Y ,          Histo ( 'DSt' , 1.60 , 5.40 , 100 ) , 'y'     ) "
+    #         ]
+    #     _DSt.Monitor       = True
+    #     _DSt.HistoProduce  = True
+    #     _DSt.MotherMonitor = """ process ( mass )
+    #     >> process ( deltaM )
+    #     >> process ( pT )
+    #     >> process ( y )
+    #     >> EMPTY
+    #     """
+
+    DSt = Selection("SelDSt2D0PiFor"+name,
+                    Algorithm = _DSt,
+                    RequiredSelections = [StdAllNoPIDsPions,
+                                          D0Sel])
+
+    return DSt
+
+
+
+def brempion_PMaker ( name,
+         config
+         ) :
+    """
+    Selection for pions with brem adder via NoPIDsParticleMaker
+    """
+    #first, build pions with brem
+
+
+    ## create the algorithm
+    algorithm_pi =  NoPIDsParticleMaker ( 'StdAllNoPIDsBremPions' ,
+                                       Particle = 'pion'  )
+    algorithm_pi.AddBremPhotonTo = ['pi+']
+    # configure the track selector
+    selector_pi = trackSelector ( algorithm_pi )
+    ## configure Data-On-Demand service
+    updateDoD ( algorithm_pi )
+    ## finally: define the symbol
+    StdAllNoPIDsBremPions = AutomaticData(Location = 'Phys/StdAllNoPIDsBremPions/Particles')  #algorithm_pi
+
+    return StdAllNoPIDsBremPions
+#
+# def brempion_CombMaker ( name,
+#          config
+#          ) :
+#     """
+#     Selection for pions reconstructed in the same manner as Std Electrons
+#     """
+#     #first, build pions with brem
+#
+#
+#     ## create the algorithm
+#     algorithm_pi =  CombinedParticleMaker ( 'StdAllNoPIDsBremPionsAsE' ,
+#                                        Particle = 'electron'  )
+#     #algorithm_pi.AddBremPhotonTo = ['pi+']
+#     # configure the track selector
+#     selector_pi = trackSelector ( algorithm_pi )
+#     ## configure Data-On-Demand service
+#     updateDoD ( algorithm_pi )
+#     ## finally: define the symbol
+#     StdAllNoPIDsBremPions = AutomaticData(Location = 'Phys/StdAllNoPIDsBremPionsAsE/Particles')  #algorithm_pi
+#
+#     return StdAllNoPIDsBremPions
+
+
+def bremkaon_PMaker ( name,
+         config
+         ) :
+    """
+    Selection for D0 with brem added to the kaon
+    """
+    #first, build pions with brem
+
+    ## create the algorithm
+    algorithm_K =  NoPIDsParticleMaker ( 'StdAllNoPIDsBremKaons' ,
+                                       Particle = 'kaon'  )
+    algorithm_K.AddBremPhotonTo = ['K+']
+    # configure the track selector
+    selector_K = trackSelector ( algorithm_K )
+    ## configure Data-On-Demand service
+    updateDoD ( algorithm_K )
+    ## finally: define the symbol
+    StdAllNoPIDsBremKaons = AutomaticData(Location = 'Phys/StdAllNoPIDsBremKaons/Particles')   #StdAllNoPIDsBremKaons = algorithm_K
+
+    return StdAllNoPIDsBremKaons
+
+
+def addRelInfoMuonIsolation( decdes ):
+    import re
+    _DauLoc={}
+    _daughters = re.match(r'(.*)->([ |\[]*)([^\]]+)(.*)', decdes)
+    if _daughters:
+        _particles = _daughters.group(3).split()
+        _ip=1
+        _gp=1
+        for _p in _particles:
+            if re.match(r'(pi|p|K|e|mu)[\+|-]',_p):
+                _key= _daughters.group(1)+"->"+_daughters.group(2)
+                _jp=1
+                for _p2 in _particles:
+                    _key+=" "
+                    if _jp==_ip: _key+="^"
+                    _key+=_p2
+                    _jp=_jp+1
+                _key+=_daughters.group(4).replace("cc","CC")
+                _DauLoc[_key] = "MudetIso"+str(_gp)
+                _gp=_gp+1
+            _ip=_ip+1
+    else:
+        return {}
+    return {  "Type" : "RelInfoMuonIsolation", "DaughterLocations" : _DauLoc}
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingPIDCalib.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingPIDCalib.py
new file mode 100644
index 000000000..ba38db610
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingPIDCalib.py
@@ -0,0 +1,546 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+################################################################################
+## StrippingPIDCalib.py                                                       ##
+## Lucio Anderlini, Sneha Malde, Barbara Sciascia                             ##
+##                                                                            ##
+## LineBuilder to create StrippingLines for the calibration samples used in   ##
+## PIDCalib. Only single-vertex decays are defined here. Dedicated line       ##
+## builders are defined for other samples (such as D* and Lb decay chains).   ##
+##                                                                            ##
+## Implemented lines:                                                         ##
+##  . StrippingPIDCalibJpsi2MuMuLine                                          ##
+##  . StrippingPIDCalibBu2KMuMuLine                                           ##
+##  . StrippingPIDCalibL02ppiLowPLine                                         ##
+##  . StrippingPIDCalibL02ppiHighPLine                                        ##
+##  . StrippingPIDCalibJpsi2eeLine                                            ##
+##  . StrippingPIDCalibBu2KeeLine                                             ##
+##                                                                            ##
+################################################################################
+
+
+'''
+Module defining PIDCalib single-vertex stripping lines
+'''
+
+__author__  = ['Lucio Anderlini']
+__date__    =  '25/02/2015'
+__version__ =  '$Revision: 1.0 $'
+
+
+__all__ = (
+    'PIDCalibLineBuilder',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              : 'PIDCalib',
+    'WGs'               : [ 'ALL' ],
+    'BUILDERTYPE'       : 'PIDCalibLineBuilder',
+    'STREAMS'           : [ 'PID' ],
+    'CONFIG'            : {
+      'Jpsi2MuMu'       : { # Replaces old StrippingMuIDCalib_JpsiKFromBNoPIDNoMip
+        'Prescale'      : 1.0
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : True
+        , 'HLT1'        : "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'HLT2'        : "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "J/psi(1S) -> mu+ mu-"
+        , 'TagAndProbeIndices' : [ 1, 2 ]
+        , 'InputTES'    : [ 'Phys/StdNoPIDsMuons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'mu+' : "(ISLONG) & (P>3*GeV) & (PT>800*MeV) & (MIPCHI2DV(PRIMARY)>10) & (TRCHI2DOF<3)"
+          }
+        , 'TagAndProbeCut'     :
+            "(ACHILDCUT(ISMUON, #tag)) & (ACHILD(P, #tag) > 6*GeV) & (ACHILD(PT, #tag) > 1.5*GeV) & (ACHILD(MIPCHI2DV(PRIMARY), #tag) > 25)"
+        , 'CombinationCut'     :
+            "(in_range(3096-200, AM, 3096+200)) & (ACHI2DOCA(1,2) < 10)"
+        , 'MotherCut'          :
+            "(VFASPF(VCHI2)<5) & (BPVVDCHI2 > 225)"
+      },
+
+
+      'Bu2KMuMu'       : {
+        'Prescale'      : 1.0
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : True
+        , 'HLT1'        : "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'HLT2'        : "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "[B+ -> mu+ mu- K+]cc"
+        , 'TagAndProbeIndices' : [ 1, 2 ]
+        , 'InputTES'    : [ 'Phys/StdNoPIDsKaons/Particles', 'Phys/StdNoPIDsMuons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'mu+' : "(MIPCHI2DV(PRIMARY)>10)",
+            'K+'  : "(MIPCHI2DV(PRIMARY)>25)"
+          }
+        , 'TagAndProbeCut'     :
+            "(ACHILDCUT(ISMUON, #tag)) & (ACHILD(P, #tag) > 6*GeV) & (ACHILD(PT, #tag) > 1.5*GeV) & (ACHILD(MIPCHI2DV(PRIMARY), #tag) > 25)"
+        , 'Combination12Cut'   :
+            "(in_range(3096-200, AM, 3096+200)) & (ACHI2DOCA(1,2) < 100)"
+        , 'CombinationCut'     :
+            "(in_range(5279-500, AM, 5279+500)) & (ACHI2DOCA(1,3) < 100) & (ACHI2DOCA(2,3) < 100)"
+        , 'MotherCut'          :
+#            "(VFASPF(VCHI2)<10)"
+            "(VFASPF(VCHI2)<100) & (BPVVDCHI2 > 25) & (BPVIPCHI2()<25)"
+      },
+
+
+      'L02ppi' : {
+        'Prescale'      : .14
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : False
+        , 'HLT1'        : "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'HLT2'        : "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "[Lambda0 -> p+ pi-]cc"
+        , 'InputTES'    : [ 'Phys/StdAllNoPIDsPions/Particles', 
+                                   'Phys/StdAllNoPIDsProtons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'p+'               : "( 2.0 * GeV < P ) &  ( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 35 )",
+            'pi-'              : "( 2.0 * GeV < P ) &  ( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 35 )"
+          }
+        , 'CombinationCut'     :
+            "(AM < 1.5 * GeV) & (ACHI2DOCA(1,2) < 20)"
+        , 'MotherCut'          : (
+            "   ( ADMASS ( 'Lambda0') < 25 ) " + 
+            " & ( in_range ( 0 , VFASPF ( VCHI2 ) , 16 ) )" + 
+            " & ( VFASPF ( VZ ) < 2200 ) "  +
+            " & ( in_range ( 0 , BPVLTFITCHI2() , 49 ) )" + 
+            " & ( BPVLTIME() * c_light > 5  ) " +
+            " & ( ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > 20 )"
+          )
+      },
+
+      'L02ppiHighPT' : {
+        'CloneLine' : "L02ppi"
+        , 'Prescale'  : 1.0
+        , 'DaughtersCuts'       : {
+            'p+'               : "(PT > 3.5*GeV) & ( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )",
+            'pi-'              : "( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )"
+          }
+      },
+
+      'L02ppiVeryHighPT' : {
+        'CloneLine' : "L02ppi"
+        , 'Prescale'  : 1.0
+        , 'DaughtersCuts'       : {
+            'p+'               : "(PT > 10*GeV) & ( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )",
+            'pi-'              : "( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )"
+          }
+      },
+
+      'L02ppiIsMuon' : {
+        'CloneLine' : "L02ppi"
+        , 'Prescale'  : 1.0
+        , 'DaughtersCuts'       : {
+            'p+'               : "(ISMUON) & ( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )",
+            'pi-'              : "( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )"
+          }
+      },
+
+      'L02ppiDD' : {
+        'CloneLine' : "L02ppi"
+        , 'Prescale'  : .14
+        , 'InputTES'    : [ 'Phys/StdNoPIDsDownPions/Particles', 
+                                   'Phys/StdNoPIDsDownProtons/Particles' ]
+      },
+
+      'L02ppiDDHighPT' : {
+        'CloneLine' : "L02ppiHighPT"
+        , 'Prescale'  : 1.0
+        , 'InputTES'    : [ 'Phys/StdNoPIDsDownPions/Particles', 
+                                   'Phys/StdNoPIDsDownProtons/Particles' ]
+      },
+
+      'L02ppiDDVeryHighPT' : {
+        'CloneLine' : "L02ppiVeryHighPT"
+        , 'Prescale'  : 1.0
+        , 'InputTES'    : [ 'Phys/StdNoPIDsDownPions/Particles', 
+                                   'Phys/StdNoPIDsDownProtons/Particles' ]
+      },
+
+      'Jpsi2ee'       : { 
+        'Prescale'      : 1.0
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Calo']
+        , 'MDST.DST'    : True
+        , 'HLT1'        : "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'HLT2'        : "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "J/psi(1S) -> e+ e-"
+        , 'TagAndProbeIndices' : [ 1, 2 ]
+        , 'InputTES'           : [ 'Phys/StdNoPIDsElectrons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'e+' : "( P > 3*GeV ) & ( PT > 500*MeV ) & (BPVIPCHI2()> 9.0)  " 
+          }
+        , 'TagAndProbeCut'     :
+            "(ACHILD(PIDe, #tag) > 5.0) & (ACHILD(PT, #tag) > 1500*MeV) & (ACHILD(P, #tag) > 6*GeV) "
+        , 'CombinationCut'     :
+            "(APT > 1.2*GeV) & (in_range(2100, AM, 4300)) & (ACHI2DOCA(1,2) < 18)"
+        , 'MotherCut'          :
+            "(VFASPF(VCHI2)<9) & (PT > 2*GeV) & (BPVVDCHI2 > 50)"
+      },
+
+      'Bu2Kee'       : {
+        'Prescale'      : 1.0
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Calo']
+        , 'MDST.DST'    : True
+        , 'HLT1'        : "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'HLT2'        : "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "[B+ -> e+ e- K+]cc"
+        , 'TagAndProbeIndices' : [ 1, 2 ]
+        , 'InputTES'           : [ 'Phys/StdTightKaons/Particles', 'Phys/StdNoPIDsElectrons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'e+'  : "( P  > 3*GeV )   & ( PT > 500*MeV ) & (BPVIPCHI2()> 9.0) ",
+            'K+'  : "( PT > 1.0*GeV ) & (BPVIPCHI2()> 9.0) & (PIDK > 0)"
+          }
+        , 'TagAndProbeCut'     :
+            "(ACHILD(PIDe, #tag) > 5.0) & (ACHILD(PT, #tag) > 1500) & (ACHILD(P, #tag) > 6*GeV) "
+        , 'Combination12Cut'   :
+            "(in_range(2100, AM, 4300)) & (ACHI2DOCA(1,2) < 9)"
+        , 'CombinationCut'     :
+            "(in_range(5279-1200, AM, 5279+1000)) & (ACHI2DOCA(1,3) < 18) & (ACHI2DOCA(2,3) < 18)"
+        , 'MotherCut'          :
+            "(VFASPF(VCHI2)<18) & (BPVVDCHI2 > 25)"
+      },
+
+      'Bu2Jpsi_mumuK' :  {
+        'Prescale'       : 1.0
+        , 'CheckPV'      : True
+        , 'RawEvent'    : ['Calo']
+        , 'MDST.DST'    : True
+        , 'HLT1'        : "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'HLT2'        : "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "[B+ -> J/psi(1S) K+]cc"
+        , 'DecayDescriptorJpsi': "J/psi(1S) -> mu+ mu-"
+        , 'InputTES'    : [ 'Phys/StdNoPIDsKaons/Particles' ]
+        , 'InputTESJpsi': [ 'Phys/StdNoPIDsMuons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'mu+' : "(BPVIPCHI2()> 10.0) ",
+            'K+'  : "(MIPCHI2DV(PRIMARY)>25)"
+          }
+        , 'TagAndProbeCut'     :
+            "(ACHILDCUT(ISMUON, #tag)) & (ACHILD(P, #tag) > 6*GeV) & (ACHILD(PT, #tag) > 1.5*GeV) & (ACHILD(MIPCHI2DV(PRIMARY), #tag) > 25)"
+        , 'JpsiCombinationCut' :
+            "(ADAMASS('J/psi(1S)')<200*MeV)"
+        , 'JpsiMotherCut'      :
+            "(VFASPF(VCHI2/VDOF)<5) & (BPVVDCHI2 > 225) "
+        , 'CombinationCut'     :
+            "ADAMASS('B+') < 500.*MeV"
+        , 'MotherCut'          :
+            "(BPVIPCHI2()<25)"
+      },
+
+      'Bu2Jpsi_eeK' :  {
+        'Prescale'       : 1.0
+        , 'CheckPV'      : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : True
+        , 'HLT1'        : "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'HLT2'        : "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "[B+ -> J/psi(1S) K+]cc"
+        , 'DecayDescriptorJpsi': "J/psi(1S) -> e+ e-"
+        , 'InputTES'           : [ 'Phys/StdTightKaons/Particles' ]
+        , 'InputTESJpsi'       : [ 'Phys/StdNoPIDsElectrons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'e+'  : "( P  > 3*GeV )   & ( PT > 500*MeV ) & (BPVIPCHI2()> 9.0) ",
+            'K+'  : "( PT > 1.0*GeV ) & (BPVIPCHI2()> 9.0) & ( PIDK > 0 )",
+            'J/psi(1S)' : "(BPVDLS > 5)"
+
+          }
+        , 'TagAndProbeCut'     :
+            "(ACHILD(PIDe, #tag) > 5.0) & (ACHILD(PT, #tag) > 1500) & (ACHILD(P, #tag) > 6*GeV) "
+        , 'JpsiCombinationCut' :
+            "(in_range(2100, AM, 4300))"
+        , 'JpsiMotherCut'      :
+            "(VFASPF(VCHI2)< 9.0) & (in_range(2200.0 *MeV, MM, 4200.0 *MeV)) "
+        , 'CombinationCut'     :
+            "in_range(4.1*GeV,AM,6.1*GeV)"
+        , 'MotherCut'          :
+            "(VFASPF(VCHI2PDOF)<9) & in_range(4.2*GeV,M, 6.0*GeV)"
+      },
+
+
+      'Ks02pipi'      :{
+        'Prescale'      : 0.024
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : False
+        , 'HLT1'        : "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'HLT2'        : "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'       : "KS0 -> pi+ pi-"
+        , 'InputTES'              : ['Phys/StdNoPIDsPions/Particles']
+        , 'DaughtersCuts'         : {
+            'pi+' : " ( 2.0 * GeV < P ) & ( MIPCHI2DV(PRIMARY) > 25 )"
+          }
+        , 'CombinationCut'        : " ( ADAMASS('KS0') < 100 ) & (ACHI2DOCA(1,2) < 20 )"
+        , 'MotherCut'             : (
+            "( ADMASS ( 'KS0') < 50 ) & "+
+            " in_range ( 0 , VFASPF ( VCHI2 ) , 16 ) & " + 
+            " ( VFASPF ( VZ ) < 2200 ) & " + 
+            " (BPVVDCHI2 > 25) & " +
+            " ( ADWM( 'Lambda0' , WM( 'p+' , 'pi-') ) > 9 ) & " + 
+            " ( ADWM( 'Lambda0' , WM( 'pi+' , 'p~-') ) > 9 )"
+          )
+      },
+    
+      'Ks02pipiDD' : {
+        'CloneLine'    : 'Ks02pipi'
+        , 'Prescale'   : 0.024
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : False
+        , 'HLT1'        : "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'HLT2'        : "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'InputTES'   : ['Phys/StdNoPIDsDownPions/Particles']
+        , 'MotherCut'             : (
+            "( ADMASS ( 'KS0') < 50 ) & "+
+            " in_range ( 0 , VFASPF ( VCHI2 ) , 16 ) & " + 
+            " ( VFASPF ( VZ ) < 2200 ) & " + 
+            " (BPVVDCHI2 > 25) & " +
+            " ( ADWM( 'Lambda0' , WM( 'p+' , 'pi-') ) > 18 ) & " + 
+            " ( ADWM( 'Lambda0' , WM( 'pi+' , 'p~-') ) > 18 )"
+        )
+      },
+    
+      'Lc2pKpi' : {
+        'Prescale':   1.0
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : False
+        , 'HLT1'        : "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'HLT2'        : "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'InputTES' : [  'Phys/StdNoPIDsKaons/Particles' , 
+                          'Phys/StdNoPIDsPions/Particles' , 
+                          'Phys/StdNoPIDsProtons/Particles' 
+                       ]
+        , 'DecayDescriptor' : "[Lambda_c+ -> K- p+ pi+]cc"
+        , 'DaughtersCuts' : {
+          'K+'    : '( PT>250*MeV ) & ( P>2*GeV ) & ( TRPCHI2>0.0001 ) & ( MIPCHI2DV(PRIMARY)>8. ) ' 
+          , 'p+'  : '( PT>250*MeV ) & ( P>2*GeV ) & ( TRPCHI2>0.0001 ) & ( MIPCHI2DV(PRIMARY)>8. ) ' 
+          , 'pi+' : '( PT>250*MeV ) & ( P>2*GeV ) & ( TRPCHI2>0.0001 ) & ( MIPCHI2DV(PRIMARY)>8. ) '
+          }
+        , 'Combination12Cut' : "( ACHI2DOCA(1,2) < 25 )"
+        , 'CombinationCut'   : "( ADAMASS('Lambda_c+')<150*MeV ) & ( APT>1.*GeV ) & ( ADOCACHI2CUT(50, '') )"
+        , 'MotherCut'        : (
+            "( M > 2.240*GeV ) & " +
+            " ( M<2.330*GeV ) & " +
+            " ( VFASPF(VCHI2/VDOF)<8 ) & " +
+            " ( BPVDIRA>0.99999 ) & " +
+            " ( MIPCHI2DV(PRIMARY)<4. ) & " +
+            " in_range( 0.85*GeV, M13, 0.95*GeV ) & " +
+            " ( (WM( 'K-' , 'pi+' , 'pi+' )>1.89*GeV) | (WM( 'K-' , 'pi+' , 'pi+' )<1.80*GeV) )"
+        )
+    }
+  }
+}
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import DaVinci__N3BodyDecays 
+
+class PIDCalibLineBuilder(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+##==============================================================================
+## PIDCalibLineBuilder constructor
+##==============================================================================
+    def __init__(self, name, config ): 
+      
+      LineBuilder.__init__(self, name, config)
+      self.name = name 
+      self.config = config
+
+      self.registerLine ( self.buildPIDLine ( 'Jpsi2MuMu'    , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'Bu2KMuMu'     , bodies = 3) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppi'   , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiHighPT'  , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiVeryHighPT'  , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiDD' , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiDDHighPT', bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiDDVeryHighPT', bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiIsMuon' , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'Jpsi2ee'      , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'Bu2Kee'       , bodies = 3) )
+      self.registerLine ( self.buildPIDLine ( 'Ks02pipi'     , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'Ks02pipiDD'   , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'Lc2pKpi'      , bodies = 3) )
+      self.registerLine ( self.buildPIDLineWithJpsi ( 'Bu2Jpsi_mumuK' ) )
+      self.registerLine ( self.buildPIDLineWithJpsi (  'Bu2Jpsi_eeK'  ) )
+
+
+##==============================================================================
+## PIDCalibLineBuilder::_builderTagProbeCut 
+##    takes as input a cutPattern defining tag and probe requirements using 
+##    #tag and #probe key words which are replaced by tge indices of the 
+##    tag and probe particles as defined in the configuration dictionary.
+##    Tag and probe tracks are then swapped and the resulting cuts AND-ed.
+##==============================================================================
+    def _buildTagProbeCut(self, cutPattern, indices):
+      "service function to swap tag and probe and build the combination cut"
+      cut  = '(('
+      cut +=  cutPattern.replace('#tag',indices[0]).replace('#probe',indices[1])
+      cut += ")|("
+      cut +=  cutPattern.replace('#tag',indices[1]).replace('#probe',indices[0])
+      cut += "))"
+      return cut
+
+
+##==============================================================================
+## PIDCalibLineBuilder::_resolveCloning 
+##    check if the config declares a "CloneLine" keyword, if yes it clones the 
+##    pointed line, if the latter declares a "CloneLine" keyword imports from
+##    that the missing keywords and so on.
+##    Returns a _copy_ of the updated dictionary
+##==============================================================================
+    def _resolveCloning(self, configRowId):
+      from copy import copy
+      _config = copy(self.config [ configRowId ])
+      ## If the line inherit another line clones and updates the dictionary
+      while 'CloneLine' in _config:
+###        print "Cloning " + configRowId + " from " + _config['CloneLine']
+        _newConfig = {}
+        _newConfig.update ( self.config[_config['CloneLine']] ) 
+        del _config['CloneLine']
+        _newConfig.update ( _config )
+        _config = _newConfig
+      return _config
+
+
+##==============================================================================
+## PIDCalibLineBuilder::buildPIDLine
+##   Parses the configuration dictionary to build the lines as defined in the 
+##   configuration dictionaries
+##==============================================================================
+    def buildPIDLine(self, configRowId, bodies):
+      "Parses the configuration dictionary to build the line"
+
+      ## Resolves possible clone statements
+      _config = self._resolveCloning(configRowId)
+      
+      ## Selects the algorithm according to the number of bodies
+      _algorithm = None
+      if (bodies == 2)   :
+        _algorithm = CombineParticles(self.name + configRowId + 'Algorithm')
+      elif (bodies == 3) :
+        #_algorithm = DaVinci__N3BodyDecays(self.name + configRowId + 'Line')
+        _algorithm = DaVinci__N3BodyDecays(self.name + configRowId + 'Algorithm')
+        _algorithm.Combination12Cut = _config['Combination12Cut']
+
+      ## Prepares the tag&probe cut if needed
+      _combinationCut = _config['CombinationCut']
+      if 'TagAndProbeIndices' in _config:   ## Tag & Probe defined
+        _id = [str(x) for x in _config['TagAndProbeIndices']]
+        _combinationCut += ' & '
+        _combinationCut += self._buildTagProbeCut(_config['TagAndProbeCut'], _id)
+
+###        print _combinationCut
+
+      _algorithm.CombinationCut  = _combinationCut
+      _algorithm.DaughtersCuts   = _config['DaughtersCuts']
+      _algorithm.MotherCut       = _config['MotherCut']
+      _algorithm.DecayDescriptor = _config['DecayDescriptor']
+      
+      _requiredSelections = [DataOnDemand(x) for x in _config['InputTES']]
+      _selection = Selection(self.name + configRowId + 'Selection'
+                              , Algorithm = _algorithm
+                              , RequiredSelections = _requiredSelections
+                            )
+
+      _line = StrippingLine( self.name + configRowId + 'Line'
+                              , prescale = _config['Prescale']
+                              , checkPV  = _config['CheckPV']
+                              , EnableFlavourTagging = False
+                              , RequiredRawEvents    = _config['RawEvent']
+                              , MDSTFlag             = _config['MDST.DST']
+                              , HLT1                 = _config['HLT1'] 
+                              , HLT2                 = _config['HLT2'] 
+                              , algos    = [ _selection ]
+                           )
+      
+      return _line
+
+##==============================================================================
+## PIDCalibLineBuilder::buildPIDLineWithJpsi
+##   Parses the configuration dictionary to build the lines as defined in the 
+##   configuration dictionaries, this function allows two subsequent fits,
+##   and uses the output of the former as input of the latter
+##==============================================================================
+    def buildPIDLineWithJpsi(self, configRowId):
+      ## Resolves possible clone statements
+      _config = self._resolveCloning(configRowId)
+
+      ## Prepares the tag&probe cut if needed
+      _combinationCutJpsi = _config['JpsiCombinationCut']
+      _combinationCut     = _config['CombinationCut']
+
+      if 'TagAndProbeCut' in _config:
+        _id = ["1", "2"]
+        _combinationCutJpsi += ' & '
+        _combinationCutJpsi += self._buildTagProbeCut(_config['TagAndProbeCut'], _id)
+
+        ###print _combinationCut
+
+      _algorithmJpsi = CombineParticles(self.name + configRowId + 'JpsiAlgorithm')
+
+      _algorithmJpsi.CombinationCut  = _combinationCutJpsi
+      _algorithmJpsi.DaughtersCuts   = _config['DaughtersCuts']
+      _algorithmJpsi.MotherCut       = _config['JpsiMotherCut']
+      _algorithmJpsi.DecayDescriptor = _config['DecayDescriptorJpsi']
+      
+      _requiredSelections = [DataOnDemand(x) for x in _config['InputTESJpsi']]
+      _selectionJpsi = Selection(self.name + configRowId + 'SelectionJpsi'
+                                  , Algorithm = _algorithmJpsi
+                                  , RequiredSelections = _requiredSelections
+                                )
+
+      _algorithm = CombineParticles(self.name + configRowId + 'Algorithm')
+
+      _algorithm.CombinationCut  = _combinationCut
+      _algorithm.DaughtersCuts   = _config['DaughtersCuts']
+      _algorithm.MotherCut       = _config['MotherCut']
+      _algorithm.DecayDescriptor = _config['DecayDescriptor']
+      
+      _requiredSelections = [_selectionJpsi] + [DataOnDemand(x) for x in _config['InputTES']]
+      _selection = Selection(self.name + configRowId + 'Selection'
+                              , Algorithm = _algorithm
+                              , RequiredSelections = _requiredSelections
+                            )
+
+      _line = StrippingLine( self.name + configRowId + 'Line'
+                              , prescale = _config['Prescale']
+                              , checkPV  = _config['CheckPV']
+                              , EnableFlavourTagging = False
+                              , RequiredRawEvents    = _config['RawEvent']
+                              , MDSTFlag             = _config['MDST.DST']
+                              , HLT1                 = _config['HLT1'] 
+                              , HLT2                 = _config['HLT2'] 
+                              , algos    = [ _selection ]
+                           )
+      
+      return _line
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingProtonAsym.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingProtonAsym.py
new file mode 100644
index 000000000..84abf652a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingProtonAsym.py
@@ -0,0 +1,735 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping line for selection of prompt
+
+    B0 -> Lambda_c~- p+ pi- pi+
+    B+ -> Lambda_c~- p+ pi- pi+ pi+
+    Lambda_b0 -> Lambda_c+ pi-
+    Lambda_b0 -> Lambda_c+ pi- pi+ pi-
+    Sigma_c++ -> Lambda_c+ pi+
+    Sigma_c0 -> Lambda_c+ pi-
+    Lambda_c(2595)+ -> Lambda_c+ pi- pi+
+
+and their charge conjugates for proton detection asymmetry measurements.
+As such, the Lambda_c+ decays are partially reconstructed as
+
+    Lambda_c+ -> K- pi+
+
+The intention is that the yields of the modes can be measured without the
+explicit reconstruction of the proton from the Lambda_c, and then measured
+again after explicit reconstruction.
+The ratio of the two yields is the proton reconstructione efficiency, and the
+ratio of this between proton and antiprotons is the proton detection asymmetry.
+
+Responsible: Alex Pearce <alex.pearce@cern.ch>
+Modified by Paolo Gandini to include full reconstruction and reduce rates
+Date: 21/08/2014
+"""
+
+from GaudiKernel.SystemOfUnits import MeV, mm
+from Configurables import CombineParticles, FilterDesktop
+from StandardParticles import (
+    StdLooseANNKaons,
+    StdLooseANNPions,
+    StdLooseANNProtons,
+    StdAllNoPIDsProtons
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+__all__ = [
+    "default_config",
+    "ProtonAsymBuilder"
+]
+
+# Dictionary of cut variables and values
+default_config = {
+    "NAME": "ProtonAsym",
+    "WGs": ["ALL"],
+    "BUILDERTYPE": "ProtonAsymBuilder",
+    "CONFIG": {
+        # Are the candidates to be stored on microDST, as opposed to full?
+        "MicroDST":  True,
+
+        # Prescales and postscales set the fraction of candidates to randomly
+        # throw away before and after stripping, respectively
+        "PrescaleBd2LcppipiLc2Kpi": 1.0,
+        "PostscaleBd2LcppipiLc2Kpi": 1.0,
+        "PrescaleBu2LcppipipiLc2Kpi": 1.0,
+        "PostscaleBu2LcppipipiLc2Kpi": 1.0,
+        "PrescaleLb2LcpiLc2Kpi": 1.0,
+        "PostscaleLb2LcpiLc2Kpi": 1.0,
+        "PrescaleLb2LcpipipiLc2Kpi": 1.0,
+        "PostscaleLb2LcpipipiLc2Kpi": 1.0,
+        "PrescaleSc2LcpipLc2Kpi": 1.0,
+        "PostscaleSc2LcpipLc2Kpi": 1.0,
+        "PrescaleSc2LcpimLc2Kpi": 1.0,
+        "PostscaleSc2LcpimLc2Kpi": 1.0,
+        "PrescaleLcst2LcpipiLc2Kpi": 1.0,
+        "PostscaleLcst2LcpipiLc2Kpi": 1.0,
+
+        # HLT filters require the events passing the line to have a positive
+        # decision on the trigger line(s) matching the regex
+        "HLTBd2LcppipiLc2Kpi": None,
+        "HLTBu2LcppipipiLc2Kpi": None,
+        "HLTLb2LcpiLc2Kpi": None,
+        "HLTLb2LcpipipiLc2Kpi": None,
+        "HLTSc2LcpipLc2Kpi": "HLT_PASS_RE('Hlt2.*CharmHadD02HHXDst.*Decision')",
+        "HLTSc2LcpimLc2Kpi": "HLT_PASS_RE('Hlt2.*CharmHadD02HHXDst.*Decision')",
+        "HLTLcst2LcpipiLc2Kpi": None,
+
+        # Partial Lambda_c mass window, taken from TGenPhaseSpace studies
+        "LcPartialMassMin": 700*MeV, #620 is the minimum -> cut a bit harder where most of bkg is
+        "LcPartialMassMax": 1360*MeV,
+        # Minimum sum of Lambda_c daughters' tranverse momentum
+        "LcPartialPTSum": 1500.0*MeV,
+        # Minimum Lambda_c flight distance fit quality per DOF
+        "LcPartialFDCHI2": 36.0, #50
+        # Maximum Lambda_c pairwise daughter distance of closest approach
+        "LcPartialDOCACHI2": 25.0, #20
+        # Maximum Lambda_c vertex fit quality per DOF
+        "LcPartialVCHI2DOF": 10.0, #50
+
+        # Partial Sigma_c mass window, taken from TGenPhaseSpace studies
+        "ScPartialMassMin": 1000*MeV,
+        "ScPartialMassMax": 1600*MeV,
+        # Minimum Lambda_c vertex displacement wrt Sigma_c vertex along z
+        "ScMinZ": 0.2*mm,
+        # Sigma_c maximum vertex quality per DOF
+        "ScVCHI2DOF": 10.0, #15
+        # Maximum Sigma_c impact parameter chi2
+        "ScBPVIPCHI2": 15.0, #20
+
+        # Partial Lambda_c* mass window, taken from TGenPhaseSpace studies
+        "LcstPartialMassMin": 1300*MeV,
+        "LcstPartialMassMax": 1660*MeV,
+        # Minimum Lambda_c vertex displacement wrt Lambda_c* vertex along z
+        "LcstMinZ": 0.2*mm,
+        # Lambda_c* maximum vertex quality per DOF
+        "LcstVCHI2DOF": 10.0,
+        # Maximum Lambda_c* impact parameter chi2
+        "LcstBPVIPCHI2": 15.0, #20
+
+        # Partial Lambda_b0 mass window, taken from TGenPhaseSpace studies
+        "LbToLc1piPartialMassMin": 3000*MeV,
+        "LbToLc3piPartialMassMin": 3500*MeV,
+        "LbPartialMassMax": 4700*MeV,
+        # Minimum transverse momentum of combined daughters
+        "LbPTSum": 2000*MeV,
+        # Lambda_b0 maximum vertex quality
+        "LbVCHI2DOF": 20.0, #15.00
+        # Minimum Lambda_c vertex displacement wrt Lambda_b vertex along z
+        "LbMinZ": 0.2*mm,
+        # Maximum Lambda_b impact parameter chi2
+        "LbBPVIPCHI2": 15.0, #20
+        # Minimum Lambda_b flight distance fit quality per DOF
+        "LbFDCHI2": 36.0, #50    
+
+        # Partial B0/B+ mass window, taken from TGenPhaseSpace studies
+        "BPartialMassMin": 3500*MeV,
+        "BPartialMassMax": 4350*MeV,
+        # Minimum transverse momentum of combined daughters
+        "BPTSum": 2000*MeV,
+        # B0/B+ maximum vertex quality
+        "BVCHI2DOF": 20.0, #15
+        # Minimum Lambda_c vertex displacement wrt B0/B+ vertex along z
+        "BMinZ": 0.2*mm,
+        # Maximum B0/B+ impact parameter chi2
+        "BBPVIPCHI2": 15.0, #20
+        # Minimum B0/B+ flight distance fit quality per DOF
+        "BFDCHI2": 36.0, #50
+
+        # Minimum final state track momentum
+        "TrackP": 1000.0*MeV, #3000
+        # Minimum final state track transverse momentum
+        "TrackPT": 100.0*MeV, #500
+        # Maximum final state track impact parameter chi^2
+        "TrackIPCHI2": 12.0, #20
+        # Minimum Kaon ANN PID
+        "ProbNNk": 0.2,
+        # Minimum Pion ANN PID
+        "ProbNNpi": 0.2,
+        # Minimum Proton ANN PID
+        "ProbNNp": 0.2,
+
+        #Window for full reconstruction
+        "LcMinWin": 2206*MeV,
+        "LcMaxWin": 2366*MeV,
+
+        "BuMinWin": 5000*MeV,
+        "BuMaxWin": 6500*MeV,
+        "LbMinWin": 5200*MeV,
+        "LbMaxWin": 6500*MeV,
+        "ScMinWin": 2053*MeV,
+        "ScMaxWin": 2753*MeV,
+        "LcstMinWin": 2292*MeV,
+        "LcstMaxWin": 2892*MeV
+             
+    },
+    "STREAMS": {
+        "CharmCompleteEvent": [
+            "StrippingBd2LcppipiLc2KpiProtonAsymLine",
+            "StrippingBu2LcppipipiLc2KpiProtonAsymLine",
+            "StrippingLb2LcpiLc2KpiProtonAsymLine",
+            "StrippingLb2LcpipipiLc2KpiProtonAsymLine",
+            "StrippingSc2LcpipLc2KpiProtonAsymLine",
+            "StrippingSc2LcpimLc2KpiProtonAsymLine",
+            "StrippingLcst2LcpipiLc2KpiProtonAsymLine",
+            "StrippingBd2LcppipiLc2pKpiProtonAsymLine",
+            "StrippingBu2LcppipipiLc2pKpiProtonAsymLine",
+            "StrippingLb2LcpiLc2pKpiProtonAsymLine",
+            "StrippingLb2LcpipipiLc2pKpiProtonAsymLine",
+            "StrippingSc2LcpipLc2pKpiProtonAsymLine",
+            "StrippingSc2LcpimLc2pKpiProtonAsymLine",
+            "StrippingLcst2LcpipiLc2pKpiProtonAsymLine"
+        ]
+    }
+}
+
+class ProtonAsymBuilder(LineBuilder):
+    """Creates a LineBuilder object containing proton asym stripping lines."""
+    # Decay descriptors
+    bd_decay = "[B0 -> Lambda_c~- p+ pi- pi+]cc"
+    bu_decay = "[B+ -> Lambda_c~- p+ pi- pi+ pi+]cc"
+    lb_1pi_decay = "[Lambda_b0 -> Lambda_c+ pi-]cc"
+    lb_3pi_decay = "[Lambda_b0 -> Lambda_c+ pi- pi+ pi-]cc"
+    sc_pip_decay = "[Sigma_c++ -> Lambda_c+ pi+]cc"
+    sc_pim_decay = "[Sigma_c0 -> Lambda_c+ pi-]cc"
+    lcst_decay = "[Lambda_c(2595)+ -> Lambda_c+ pi- pi+]cc"
+    lc_partial_decay = "[Lambda_c+ -> K- pi+]cc"
+    lc_full_decay = "[Lambda_c+ -> p+ K- pi+]cc"
+
+    bd_decay_full = "[B0 -> B0 p~-]cc"
+    bu_decay_full = "[B+ -> B+ p~-]cc"
+    lb_1pi_decay_full = "[Lambda_b0 -> Lambda_b0 p+]cc"
+    lb_3pi_decay_full = "[Lambda_b0 -> Lambda_b0 p+]cc"
+    sc_pip_decay_full = "[Sigma_c++ -> Sigma_c++ p+]cc"
+    sc_pim_decay_full = "[Sigma_c0 -> Sigma_c0 p+]cc"
+    lcst_decay_full = "[Lambda_c(2595)+ -> Lambda_c(2595)+ p+]cc"
+ 
+
+    # Allowed configuration keys
+    __configuration_keys__ = default_config["CONFIG"].keys()
+
+    def __init__(self, name, config):
+        """Initialise a LineBuilder instance registered with this line.
+
+        Keyword arguments:
+        name -- String passed to the LineBuilder constructor
+        config -- Dictionary of cuts to apply
+        """
+        self.name = name
+        self.config = config
+
+        # Initialise the parent LineBuilder
+        LineBuilder.__init__(self, self.name, self.config)
+
+        # Final state cut strings
+        track_cuts = [
+            "P > {0[TrackP]}",
+            "PT > {0[TrackPT]}",
+            "MIPCHI2DV(PRIMARY) > {0[TrackIPCHI2]}",
+        ]
+        kaon_cuts = cut_string(track_cuts + [
+            "PROBNNk > {0[ProbNNk]}"
+        ], self.config)
+        pion_cuts = cut_string(track_cuts + [
+            "PROBNNpi > {0[ProbNNpi]}"
+        ], self.config)
+        proton_cuts = cut_string(track_cuts + [
+            "PROBNNp > {0[ProbNNp]}"
+        ], self.config)
+
+        # Create final state filters
+        self.kaons = Selection(
+            name="KaonSelectionFor{0}".format(name),
+            Algorithm=FilterDesktop(
+                name="KaonFilterFor{0}".format(name),
+                Code=kaon_cuts
+            ),
+            RequiredSelections=[StdLooseANNKaons]
+        )
+        self.pions = Selection(
+            name="PionSelectionFor{0}".format(name),
+            Algorithm=FilterDesktop(
+                name="PionFilterFor{0}".format(name),
+                Code=pion_cuts
+            ),
+            RequiredSelections=[StdLooseANNPions]
+        )
+        self.protons = Selection(
+            name="ProtonSelectionFor{0}".format(name),
+            Algorithm=FilterDesktop(
+                name="ProtonFilterFor{0}".format(name),
+                Code=proton_cuts
+            ),
+            RequiredSelections=[StdLooseANNProtons]
+        )
+
+
+
+        # Lambda_c selection
+        lc = self.make_partial_lc("LcSelectionFor{0}".format(self.name))
+
+        # B+/B0 selection
+        b_combination_cuts = cut_string([
+            "AM - 10 > {0[BPartialMassMin]}",
+            "AM + 10 < {0[BPartialMassMax]}",
+            "APT > {0[BPTSum]}"
+        ], self.config)
+        b_mother_cuts = cut_string([
+            "M > {0[BPartialMassMin]}",
+            "M < {0[BPartialMassMax]}",
+            "BPVIPCHI2() < {0[BBPVIPCHI2]}",
+            "VFASPF(VCHI2/VDOF) < {0[BVCHI2DOF]}",
+            "(CHILD(VFASPF(VZ), 1) - VFASPF(VZ)) > {0[BMinZ]}",
+            "BPVVDCHI2 > {0[BFDCHI2]}"
+        ], self.config)
+        bd = self.make_partial_mother(
+            "BdSelectionFor{0}".format(self.name),
+            self.bd_decay,
+            [lc, self.pions, self.protons],
+            b_combination_cuts,
+            b_mother_cuts
+        )
+        bu = self.make_partial_mother(
+            "BuSelectionFor{0}".format(self.name),
+            self.bu_decay,
+            [lc, self.pions, self.protons],
+            b_combination_cuts,
+            b_mother_cuts
+        )
+
+        # Lambda_b selections
+        lb_combination_cuts = cut_string([
+            "AM + 20 < {0[LbPartialMassMax]}",
+            "APT > {0[LbPTSum]}"
+        ], self.config)
+        lb_mother_cuts = cut_string([
+            "M < {0[LbPartialMassMax]}",
+            "BPVIPCHI2() < {0[LbBPVIPCHI2]}",
+            "VFASPF(VCHI2/VDOF) < {0[LbVCHI2DOF]}",
+            "(CHILD(VFASPF(VZ), 1) - VFASPF(VZ)) > {0[LbMinZ]}",
+            "BPVVDCHI2 > {0[LbFDCHI2]}"
+        ], self.config)
+        # 1pi and 3pi modes have different mass thresholds
+        lb_1pi_combination_cuts = cut_string([
+            "AM - 20 > {0[LbToLc1piPartialMassMin]}",
+            lb_combination_cuts
+        ], self.config)
+        lb_3pi_combination_cuts = cut_string([
+            "AM - 20 > {0[LbToLc3piPartialMassMin]}",
+            lb_combination_cuts
+        ], self.config)
+        lb_1pi_mother_cuts = cut_string([
+            "M > {0[LbToLc1piPartialMassMin]}",
+            lb_mother_cuts
+        ], self.config)
+        lb_3pi_mother_cuts = cut_string([
+            "M > {0[LbToLc3piPartialMassMin]}",
+            lb_mother_cuts
+        ], self.config)
+        lb_1pi = self.make_partial_mother(
+            "Lb1PiSelectionFor{0}".format(self.name),
+            self.lb_1pi_decay,
+            [lc, self.pions],
+            lb_1pi_combination_cuts,
+            lb_1pi_mother_cuts
+        )
+        lb_3pi = self.make_partial_mother(
+            "Lb3PiSelectionFor{0}".format(self.name),
+            self.lb_3pi_decay,
+            [lc, self.pions],
+            lb_3pi_combination_cuts,
+            lb_3pi_mother_cuts
+        )
+
+        # Sigma_c selections
+        sc_combination_cuts = cut_string([
+            "AM - 20 > {0[ScPartialMassMin]}",
+            "AM + 20 < {0[ScPartialMassMax]}"
+        ], self.config)
+        sc_mother_cuts = cut_string([
+            "M > {0[ScPartialMassMin]}",
+            "M < {0[ScPartialMassMax]}",
+            "BPVIPCHI2() < {0[ScBPVIPCHI2]}",
+            "VFASPF(VCHI2/VDOF) < {0[ScVCHI2DOF]}",
+            "(CHILD(VFASPF(VZ), 1) - VFASPF(VZ)) > {0[ScMinZ]}"
+        ], self.config)
+        sc_pip = self.make_partial_mother(
+            "ScPipSelectionFor{0}".format(self.name),
+            self.sc_pip_decay,
+            [lc, self.pions],
+            sc_combination_cuts,
+            sc_mother_cuts
+        )
+        sc_pim = self.make_partial_mother(
+            "ScPimSelectionFor{0}".format(self.name),
+            self.sc_pim_decay,
+            [lc, self.pions],
+            sc_combination_cuts,
+            sc_mother_cuts
+        )
+
+        # Lambda_c* selections
+        lcst_combination_cuts = cut_string([
+            "AM - 20 > {0[LcstPartialMassMin]}",
+            "AM + 20 < {0[LcstPartialMassMax]}"
+        ], self.config)
+        lcst_mother_cuts = cut_string([
+            "M > {0[LcstPartialMassMin]}",
+            "M < {0[LcstPartialMassMax]}",
+            "BPVIPCHI2() < {0[LcstBPVIPCHI2]}",
+            "VFASPF(VCHI2/VDOF) < {0[LcstVCHI2DOF]}",
+            "(CHILD(VFASPF(VZ), 1) - VFASPF(VZ)) > {0[LcstMinZ]}"
+        ], self.config)
+        lcst = self.make_partial_mother(
+            "LcstSelectionFor{0}".format(self.name),
+            self.lcst_decay,
+            [lc, self.pions],
+            lcst_combination_cuts,
+            lcst_mother_cuts
+        )
+
+
+
+
+
+
+
+
+
+
+        #Make Full lines
+        b_combination_cuts_full = cut_string([
+            "AM - 20 > {0[BuMinWin]}",
+            "AM + 20 < {0[BuMaxWin]}",
+            "sqrt(((ACHILD(CHILD(E,1),1)+ACHILD(E,2))**2)-((ACHILD(CHILD(PX,1),1)+ACHILD(PX,2))**2)-((ACHILD(CHILD(PY,1),1)+ACHILD(PY,2))**2)-((ACHILD(CHILD(PZ,1),1)+ACHILD(PZ,2))**2))-20>{0[LcMinWin]}",
+            "sqrt(((ACHILD(CHILD(E,1),1)+ACHILD(E,2))**2)-((ACHILD(CHILD(PX,1),1)+ACHILD(PX,2))**2)-((ACHILD(CHILD(PY,1),1)+ACHILD(PY,2))**2)-((ACHILD(CHILD(PZ,1),1)+ACHILD(PZ,2))**2))+20<{0[LcMaxWin]}"
+            ], self.config)
+        b_mother_cuts_full = cut_string([
+            "M > {0[BuMinWin]}",
+            "M < {0[BuMaxWin]}",
+            "sqrt(((CHILD(CHILD(E,1),1)+CHILD(E,2))**2)-((CHILD(CHILD(PX,1),1)+CHILD(PX,2))**2)-((CHILD(CHILD(PY,1),1)+CHILD(PY,2))**2)-((CHILD(CHILD(PZ,1),1)+CHILD(PZ,2))**2))>{0[LcMinWin]}",
+            "sqrt(((CHILD(CHILD(E,1),1)+CHILD(E,2))**2)-((CHILD(CHILD(PX,1),1)+CHILD(PX,2))**2)-((CHILD(CHILD(PY,1),1)+CHILD(PY,2))**2)-((CHILD(CHILD(PZ,1),1)+CHILD(PZ,2))**2))<{0[LcMaxWin]}"
+            ], self.config)
+        bd_full= self.make_full_mother(        
+            "BdSelectionFullFor{0}".format(self.name),
+            self.bd_decay_full,
+            [bd, StdAllNoPIDsProtons],
+            b_combination_cuts_full,
+            b_mother_cuts_full
+            )
+        bu_full = self.make_full_mother(
+            "BuSelectionFullFor{0}".format(self.name),
+            self.bu_decay_full,
+            [bu, StdAllNoPIDsProtons],
+            b_combination_cuts_full,
+            b_mother_cuts_full
+            )            
+        lb_combination_cuts_full = cut_string([
+            "AM - 20 > {0[LbMinWin]}",
+            "AM + 20 < {0[LbMaxWin]}",
+            "sqrt(((ACHILD(CHILD(E,1),1)+ACHILD(E,2))**2)-((ACHILD(CHILD(PX,1),1)+ACHILD(PX,2))**2)-((ACHILD(CHILD(PY,1),1)+ACHILD(PY,2))**2)-((ACHILD(CHILD(PZ,1),1)+ACHILD(PZ,2))**2))-20>{0[LcMinWin]}",
+            "sqrt(((ACHILD(CHILD(E,1),1)+ACHILD(E,2))**2)-((ACHILD(CHILD(PX,1),1)+ACHILD(PX,2))**2)-((ACHILD(CHILD(PY,1),1)+ACHILD(PY,2))**2)-((ACHILD(CHILD(PZ,1),1)+ACHILD(PZ,2))**2))+20<{0[LcMaxWin]}"
+            ], self.config)
+        lb_mother_cuts_full = cut_string([
+            "M > {0[LbMinWin]}",
+            "M < {0[LbMaxWin]}",
+            "sqrt(((CHILD(CHILD(E,1),1)+CHILD(E,2))**2)-((CHILD(CHILD(PX,1),1)+CHILD(PX,2))**2)-((CHILD(CHILD(PY,1),1)+CHILD(PY,2))**2)-((CHILD(CHILD(PZ,1),1)+CHILD(PZ,2))**2))>{0[LcMinWin]}",
+            "sqrt(((CHILD(CHILD(E,1),1)+CHILD(E,2))**2)-((CHILD(CHILD(PX,1),1)+CHILD(PX,2))**2)-((CHILD(CHILD(PY,1),1)+CHILD(PY,2))**2)-((CHILD(CHILD(PZ,1),1)+CHILD(PZ,2))**2))<{0[LcMaxWin]}"
+            ], self.config)
+        lb_1pi_full = self.make_full_mother(
+            "Lb1PiSelectionFullFor{0}".format(self.name),
+            self.lb_1pi_decay_full,
+            [lb_1pi, StdAllNoPIDsProtons],
+            lb_combination_cuts_full,
+            lb_mother_cuts_full
+            )
+        lb_3pi_full = self.make_full_mother(
+            "Lb3PiSelectionFullFor{0}".format(self.name),
+            self.lb_3pi_decay_full,
+            [lb_3pi, StdAllNoPIDsProtons],
+            lb_combination_cuts_full,
+            lb_mother_cuts_full
+            )
+        sc_combination_cuts_full = cut_string([
+            "AM - 20 > {0[ScMinWin]}",
+            "AM + 20 < {0[ScMaxWin]}",
+            "sqrt(((ACHILD(CHILD(E,1),1)+ACHILD(E,2))**2)-((ACHILD(CHILD(PX,1),1)+ACHILD(PX,2))**2)-((ACHILD(CHILD(PY,1),1)+ACHILD(PY,2))**2)-((ACHILD(CHILD(PZ,1),1)+ACHILD(PZ,2))**2))-20>{0[LcMinWin]}",
+            "sqrt(((ACHILD(CHILD(E,1),1)+ACHILD(E,2))**2)-((ACHILD(CHILD(PX,1),1)+ACHILD(PX,2))**2)-((ACHILD(CHILD(PY,1),1)+ACHILD(PY,2))**2)-((ACHILD(CHILD(PZ,1),1)+ACHILD(PZ,2))**2))+20<{0[LcMaxWin]}"
+            ], self.config)
+        sc_mother_cuts_full = cut_string([
+            "M > {0[ScMinWin]}",
+            "M < {0[ScMaxWin]}",
+            "sqrt(((CHILD(CHILD(E,1),1)+CHILD(E,2))**2)-((CHILD(CHILD(PX,1),1)+CHILD(PX,2))**2)-((CHILD(CHILD(PY,1),1)+CHILD(PY,2))**2)-((CHILD(CHILD(PZ,1),1)+CHILD(PZ,2))**2))>{0[LcMinWin]}",
+            "sqrt(((CHILD(CHILD(E,1),1)+CHILD(E,2))**2)-((CHILD(CHILD(PX,1),1)+CHILD(PX,2))**2)-((CHILD(CHILD(PY,1),1)+CHILD(PY,2))**2)-((CHILD(CHILD(PZ,1),1)+CHILD(PZ,2))**2))<{0[LcMaxWin]}"
+            ], self.config)
+        sc_pip_full = self.make_full_mother(
+            "ScPipSelectionFullFor{0}".format(self.name),
+            self.sc_pip_decay_full,
+            [sc_pip, StdAllNoPIDsProtons],
+            sc_combination_cuts_full,
+            sc_mother_cuts_full
+            )
+        sc_pim_full = self.make_full_mother(
+            "ScPimSelectionFullFor{0}".format(self.name),
+            self.sc_pim_decay_full,
+            [sc_pim, StdAllNoPIDsProtons],
+            sc_combination_cuts_full,
+            sc_mother_cuts_full
+            )
+        lcst_combination_cuts_full = cut_string([
+            "AM - 20 > {0[LcstMinWin]}",
+            "AM + 20 < {0[LcstMaxWin]}",
+            "sqrt(((ACHILD(CHILD(E,1),1)+ACHILD(E,2))**2)-((ACHILD(CHILD(PX,1),1)+ACHILD(PX,2))**2)-((ACHILD(CHILD(PY,1),1)+ACHILD(PY,2))**2)-((ACHILD(CHILD(PZ,1),1)+ACHILD(PZ,2))**2))-20>{0[LcMinWin]}",
+            "sqrt(((ACHILD(CHILD(E,1),1)+ACHILD(E,2))**2)-((ACHILD(CHILD(PX,1),1)+ACHILD(PX,2))**2)-((ACHILD(CHILD(PY,1),1)+ACHILD(PY,2))**2)-((ACHILD(CHILD(PZ,1),1)+ACHILD(PZ,2))**2))+20<{0[LcMaxWin]}"
+            ], self.config)
+        lcst_mother_cuts_full = cut_string([
+            "M > {0[LcstMinWin]}",
+            "M < {0[LcstMaxWin]}",
+            "sqrt(((CHILD(CHILD(E,1),1)+CHILD(E,2))**2)-((CHILD(CHILD(PX,1),1)+CHILD(PX,2))**2)-((CHILD(CHILD(PY,1),1)+CHILD(PY,2))**2)-((CHILD(CHILD(PZ,1),1)+CHILD(PZ,2))**2))>{0[LcMinWin]}",
+            "sqrt(((CHILD(CHILD(E,1),1)+CHILD(E,2))**2)-((CHILD(CHILD(PX,1),1)+CHILD(PX,2))**2)-((CHILD(CHILD(PY,1),1)+CHILD(PY,2))**2)-((CHILD(CHILD(PZ,1),1)+CHILD(PZ,2))**2))<{0[LcMaxWin]}"
+            ], self.config)
+        lcst_full = self.make_full_mother(
+            "LcstSelectionFullFor{0}".format(self.name),
+            self.lcst_decay_full,
+            [lcst, StdAllNoPIDsProtons],
+            lcst_combination_cuts_full,
+            lcst_mother_cuts_full
+            )
+                        
+
+
+
+
+
+        # Create the stripping lines, first partial..
+        bd_partial_line = self.make_line("Bd2LcppipiLc2Kpi", bd)
+        bu_partial_line = self.make_line("Bu2LcppipipiLc2Kpi", bu)
+        lb_partial_1pi_line = self.make_line("Lb2LcpiLc2Kpi", lb_1pi)
+        lb_partial_3pi_line = self.make_line("Lb2LcpipipiLc2Kpi", lb_3pi)
+        sc_partial_pip_line = self.make_line("Sc2LcpipLc2Kpi", sc_pip)
+        sc_partial_pim_line = self.make_line("Sc2LcpimLc2Kpi", sc_pim)
+        lcst_partial_line = self.make_line("Lcst2LcpipiLc2Kpi", lcst)
+        # .. then full
+        bd_full_line = self.make_line("Bd2LcppipiLc2pKpi", bd_full)
+        bu_full_line = self.make_line("Bu2LcppipipiLc2pKpi", bu_full)
+        lb_full_1pi_line = self.make_line("Lb2LcpiLc2pKpi", lb_1pi_full)
+        lb_full_3pi_line = self.make_line("Lb2LcpipipiLc2pKpi", lb_3pi_full)
+        sc_full_pip_line = self.make_line("Sc2LcpipLc2pKpi", sc_pip_full)
+        sc_full_pim_line = self.make_line("Sc2LcpimLc2pKpi", sc_pim_full)
+        lcst_full_line = self.make_line("Lcst2LcpipiLc2pKpi", lcst_full)
+
+
+
+        # Make the lines visible to the LineBuilder
+        self.registerLine(bu_partial_line)
+        self.registerLine(bd_partial_line)
+        self.registerLine(lb_partial_1pi_line)
+        self.registerLine(lb_partial_3pi_line)
+        self.registerLine(sc_partial_pip_line)
+        self.registerLine(sc_partial_pim_line)
+        self.registerLine(lcst_partial_line)
+
+        # Don't need to save the full reconstruction on DST, all tracks are
+        # stored anyway
+        #if self.config["MicroDST"]:
+        #    self.registerLine(bu_full_line)
+        #    self.registerLine(bd_full_line)
+        #    self.registerLine(lb_full_1pi_line)
+        #    self.registerLine(lb_full_3pi_line)
+        #    self.registerLine(sc_full_pip_line)
+        #    self.registerLine(sc_full_pim_line)
+        #    self.registerLine(lcst_full_line)
+        self.registerLine(bu_full_line)
+        self.registerLine(bd_full_line)
+        self.registerLine(lb_full_1pi_line)
+        self.registerLine(lb_full_3pi_line)
+        self.registerLine(sc_full_pip_line)
+        self.registerLine(sc_full_pim_line)
+        self.registerLine(lcst_full_line)     
+
+
+    def make_line(self, name, selection):
+        """Return StrippingLine object for the line.
+
+        The line is prescaled and postscaled by the value of the
+        `Prescale` and `Postscale` config keys, respectively.
+        Keyword arguments:
+        name -- String to call the StrippingLine instance
+        selection -- Selection instance
+        """
+        # The fully reconstructed lines have no pre/postscales
+        if "Lc2pKpi" in name:
+            prescale = 1.0
+            postscale = 1.0
+        else:
+            prescale = self.config["Prescale{0}".format(name)]
+            postscale = self.config["Postscale{0}".format(name)]
+        # The full lines share the triggers of the partial
+        hlt = self.config["HLT{0}".format(name.replace("Lc2pKpi", "Lc2Kpi"))]
+        return StrippingLine(
+            "{0}{1}Line".format(name, self.name),
+            prescale=prescale,
+            postscale=postscale,
+            selection=selection,
+            HLT2=hlt
+        )
+
+
+
+    def make_full_mother(self, name, decay, required_selections,
+                         combination_cuts, mother_cuts):
+
+        mother = CombineParticles(
+            name="CombineFull{0}".format(name),
+            DecayDescriptors=[decay],                       
+            CombinationCut=combination_cuts,
+            MotherCut=mother_cuts
+            )
+        selection = Selection(
+            name="Full{0}".format(name),
+            Algorithm=mother,
+            RequiredSelections=required_selections
+            )
+        return selection
+
+
+
+
+    def make_partial_mother(self, name, decay, required_selections,
+                            combination_cuts, mother_cuts):
+        """Return Selection object for mother decay to partial Lambda_c.
+
+        The selection requires that the analytic solution for the missing
+        proton momentum is real, i.e. that the discriminant of the quadratic
+        solution is positive.
+        Keyword arguments:
+        name -- String to call the mother Selection instance
+        decay -- Decay descriptor for the decay
+        required_selections -- Required Selection instances for daughters
+        combination_cuts -- Pre-fit cuts on combined daughters
+        mother_cuts -- Post-fit cuts on the mother
+        """
+        # Define the discriminant to cut on
+        preambulo = [
+            "from GaudiKernel.SystemOfUnits import MeV",
+            # Reference PDG 2012 mass values in MeV
+            "LAMBDAC_M =  2286.46*MeV",
+            "LAMBDAC_M_SQ =  LAMBDAC_M*LAMBDAC_M",
+            "PROTON_M =  938.27*MeV",
+            "PROTON_M_SQ =  PROTON_M*PROTON_M",
+            # Flight direction of Lambda_c
+            "Lc_dirx = CHILD(VFASPF(VX), 1) - VFASPF(VX)",
+            "Lc_diry = CHILD(VFASPF(VY), 1) - VFASPF(VY)",
+            "Lc_dirz = CHILD(VFASPF(VZ), 1) - VFASPF(VZ)",
+            # Get the magnitude of flight direction vector, then normalise it
+            "Lc_dir_mag = ((Lc_dirx*Lc_dirx) + (Lc_diry*Lc_diry) + (Lc_dirz*Lc_dirz))**0.5",
+            "Lc_dirx /= 1.0*Lc_dir_mag",
+            "Lc_diry /= 1.0*Lc_dir_mag",
+            "Lc_dirz /= 1.0*Lc_dir_mag",
+            # Three-momentum of the Lambda_c h1+h2 pair
+            "h1h2_px = CHILD(CHILD(PX, 1), 1) + CHILD(CHILD(PX, 2), 1)",
+            "h1h2_py = CHILD(CHILD(PY, 1), 1) + CHILD(CHILD(PY, 2), 1)",
+            "h1h2_pz = CHILD(CHILD(PZ, 1), 1) + CHILD(CHILD(PZ, 2), 1)",
+            # Longitudinal momentum of Lambda_c h1+h2 pair is the dot product of the
+            # Lambda_c flight direction with the h1+h2 momentum vector
+            "h1h2_pL = (Lc_dirx*h1h2_px) + (Lc_diry*h1h2_py) + (Lc_dirz*h1h2_pz)",
+            # Transverse momentum of Lambda_c h1+h2 pair, which is he total h1+h2
+            # momentum, minus the component along the Lambda_c direction
+            "h1h2_pTx = h1h2_px - (h1h2_pL*Lc_dirx)",
+            "h1h2_pTy = h1h2_py - (h1h2_pL*Lc_diry)",
+            "h1h2_pTz = h1h2_pz - (h1h2_pL*Lc_dirz)",
+            # Square of the magnitude of the transverse momentum of the Lambda_c h1+h2 pair
+            "h1h2_pT2 = (h1h2_pTx*h1h2_pTx) + (h1h2_pTy*h1h2_pTy) + (h1h2_pTz*h1h2_pTz)",
+            # Energy squared of Lambda_c h1+h2 pair
+            "h1h2_E2 = (CHILD(CHILD(E, 1), 1) + CHILD(CHILD(E, 2), 1))**2",
+            # This has no phyiscal meaning, its just a common term in the quadratic
+            # m(Lambda_c) == m(h1+h2) as we only reconstruct Lambda_c -> h1 h2
+            "delta_mass = LAMBDAC_M_SQ - (CHILD(M, 1)**2) - PROTON_M_SQ - (2*h1h2_pT2)",
+            "a = ((h1h2_pL*h1h2_pL/h1h2_E2) - 1)",
+            "b = delta_mass*h1h2_pL/h1h2_E2",
+            "c = (delta_mass*delta_mass/(4*h1h2_E2)) - PROTON_M_SQ - h1h2_pT2",
+            "discriminant = (b*b) - (4*a*c)"
+        ]
+        mother = CombineParticles(
+            name="Combine{0}".format(name),
+            DecayDescriptors=[decay, self.lc_partial_decay],
+            Preambulo=preambulo,
+            CombinationCut=combination_cuts,
+            MotherCut=cut_string([
+                "discriminant > 0",
+                mother_cuts
+            ], {})
+        )
+        selection = Selection(
+            name=name,
+            Algorithm=mother,
+            RequiredSelections=required_selections
+        )
+        return selection
+
+    def make_partial_lc(self, name):
+        """Return Selection object for Lambda_c+ -> K- pi+ decay.
+
+        This is a partial reconstruction, omitting a p+.
+        Keyword arguments:
+        name -- String to call the Lambda_c selection instance.
+        """
+        # Pre-fit cuts on combined daughters
+        lc_combination_cuts = cut_string([
+            # Slightly larger mass window pre-fit
+            "AM - 20 > {0[LcPartialMassMin]}",
+            "AM + 20 < {0[LcPartialMassMax]}",
+            "APT > {0[LcPartialPTSum]}",
+            "ADOCACHI2CUT({0[LcPartialDOCACHI2]}, '')"
+        ], self.config)
+        # Post-fit cuts on mother
+        lc_mother_cuts = cut_string([
+            "M > {0[LcPartialMassMin]}",
+            "M < {0[LcPartialMassMax]}",
+            "VFASPF(VCHI2/VDOF) < {0[LcPartialVCHI2DOF]}",
+            "BPVVDCHI2 > {0[LcPartialFDCHI2]}"
+        ], self.config)
+        lc = CombineParticles(
+            name="CombinePartial{0}".format(name),
+            DecayDescriptors=[self.lc_partial_decay],
+            CombinationCut=lc_combination_cuts,
+            MotherCut=lc_mother_cuts
+        )
+        selection = Selection(
+            name,
+            Algorithm=lc,
+            RequiredSelections=[
+                self.kaons,
+                self.pions
+            ]
+        )
+        return selection
+
+
+def cut_string(cuts, config):
+    """Return a cut string composed of cuts with values from config.
+
+    Example usage:
+        config = {"D0PT": 1000.0, "D0DOCA": 0.5}
+        cuts = ["PT > {0[D0PT]}", "ADOCACHI2CUT < {0[D0DOCA]}"]
+        cut_string(cuts, config)
+        => (PT > 1000.0) & (D0DOCA < 0.5)"
+    Keyword arguments:
+    cuts -- List of cuts with str.format placeholders for values
+    config -- Dictionary of cut values with keys as placeholders in `cuts`
+    """
+    return "({0})".format(") & (".join(cuts).format(config))
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingSigmacForPID.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingSigmacForPID.py
new file mode 100644
index 000000000..1ef52d60e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingSigmacForPID.py
@@ -0,0 +1,408 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+__author__  = 'Laurence Carson'
+__date__    = '2013-03-24'
+# =============================================================================
+__all__ = (
+    'SigmacForPIDConf',
+    'default_config'
+    )
+# =============================================================================
+"""
+Stripping selection for Sigma_c -> Lambda_c(->p K pi)pi, without PID cuts
+on the proton from Lambda_c. Adapted from SigmaCForPromptCharm line in
+StrippingPromptCharm.py.
+"""
+from Gaudi.Configuration import *
+from GaudiKernel.SystemOfUnits             import GeV, MeV, mm
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import   Selection, MergedSelection
+from StandardParticles      import ( StdNoPIDsPions     ,
+                                     StdLoosePions      ,
+                                     StdLooseKaons      ,
+                                     StdNoPIDsProtons    ,  
+                                     ## for soft pion from Sigma_c
+                                     StdAllNoPIDsPions  
+                                    )
+
+
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+# =============================================================================
+## Define the default configuration
+_default_configuration_ = {
+    #
+    #
+    ## PT-cuts
+    #
+    'pT(Lc+)'          :  3.0 * GeV ,    ## pt-cut for  prompt   Lc+
+    #
+    # Selection of basic particles
+    #
+    'TrackCuts'       : """
+    ( TRCHI2DOF < 4     ) &
+    ( PT > 250 * MeV    ) &
+    ( TRGHOSTPROB < 0.5 ) & 
+    in_range  ( 2 , ETA , 5 )
+    """ ,
+    'BasicCuts'       : ' & ( 9 < MIPCHI2DV() ) ' ,
+    'KaonCuts'        : ' & ( 2 < PIDK  - PIDpi ) & ( -5 < PIDK  - PIDp ) '   ,
+    'PionCuts'        : ' & ( 2 < PIDpi - PIDK  ) & ( -5 < PIDpi - PIDp  ) '   ,
+    'SlowPionCuts'    : ' TRCHI2DOF < 5 '                                     ,
+    #
+    # Global Event cuts
+    #
+    'CheckPV'         : True ,
+    #
+    # Technicalities:
+    #
+    'Preambulo'       : [
+    # shortcut for chi2 of vertex fit
+    'chi2vx = VFASPF(VCHI2) '                    ,
+    # shortcut for the c*tau
+    "from GaudiKernel.PhysicalConstants import c_light" ,
+    "ctau_9   = BPVLTIME (   9 ) * c_light "  , ## use the embedded cut for chi2(LifetimeFit)<9
+    ] ,
+    ## monitoring ?
+    'Monitor'     : False ,
+    ## prescale
+    'SigmaCPrescale'         : 1.0 ,  
+    ## ========================================================================
+    }
+
+default_config = {
+  'NAME' : 'SigmacForPID',
+  'BUILDERTYPE' : 'SigmacForPIDConf',
+  'CONFIG'      : _default_configuration_  ,
+  'STREAMS' : [ 'PID' ],
+  'WGs' : [ 'ALL' ]
+}
+
+
+# =============================================================================
+# use a bit faster fitter 
+FITTER = 'LoKi::VertexFitter:PUBLIC'
+## ============================================================================
+class SigmacForPIDConf(LineBuilder) :
+    """
+    Helper class to configure the line
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+
+    ## constructor
+    def __init__ ( self , name , config ) :
+        """
+        Constructor
+        """
+        # check the names
+        if not name : name = 'PID'
+
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+
+        if isinstance ( config , dict ):
+            _config.update ( config )
+            LineBuilder.__init__( self , name , _config )
+        else :
+            LineBuilder.__init__( self , name ,  config )
+
+        ## private set of selections
+        self.__selections_ = {}
+
+        LineBuilder.__init__( self , name , _config )
+
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {}
+
+        self.__selections_[ self.name() ]['CONFIG'] = deepcopy ( _config )
+
+        keys = _config.keys()
+        for key in keys :
+
+            if not key in _default_configuration_ :
+                raise KeyError("Invalid key is specified: '%s'" % key )
+
+        for line in self._lines_PID() :
+            self.registerLine(line)
+
+    ## get the selections
+    def _selections_private ( self ) :
+
+        sel = self._selections ( 'Selections' )
+        if sel : return sel
+
+        sel =  [ self.LamC           () ,
+                 self.SigC           () ,
+                ]
+
+        return self._add_selection ( 'Selections' , sel )
+
+    ## get the selection, associated with some nickname name
+    def _selection ( self , nick ) :
+        """
+        Get the selection, associated with some nickname name
+        """
+
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {}
+
+        return self.__selections_[ self.name() ].get( nick , None )
+
+    ## add the selection, associated with some nickname name
+    def _add_selection ( self , nick , sel ) :
+        """
+        add the selection, associated with some nickname name
+        """
+        if not self.__selections_.has_key ( self.name() ) : self.__selections_[ self.name() ] = {}
+
+        if self.__selections_[ self.name()].has_key( nick ) :
+            raise AttributeError , "Selection '%s'already exists " % nick
+
+        self.__selections_[ self.name() ][ nick ] = sel
+
+        return sel
+
+
+    ## get the lines
+    def _lines_PID   ( self ) :
+        """
+        Get the lines
+        """
+        sel = self._selection ( 'PIDLines' )
+        if sel : return sel
+        #
+        sel = [
+            StrippingLine (
+            self.name() + "Line" ,
+            prescale = self['SigmaCPrescale'] , 
+            checkPV  = self['CheckPV'       ] ,
+            algos    =     [ self.SigC ()   ]
+            )          
+            ]
+        #
+        return self._add_selection ( 'PIDLines' , sel )
+
+
+    ## get all stripping lines
+    def _lines_private ( self ) :
+        """
+        get the lines
+        """
+        return self._lines_PID ()
+
+    def trackCuts    ( self ) : return                    self [ 'TrackCuts'    ]
+    def basicCuts    ( self ) : return self.trackCuts() + self [ 'BasicCuts'    ]
+    def kaonCuts     ( self ) : return self.basicCuts() + self [ 'KaonCuts'     ]
+    def pionCuts     ( self ) : return self.basicCuts() + self [ 'PionCuts'     ]
+    def protonCuts   ( self ) : return self.basicCuts()
+    def slowPionCuts ( self ) : return                    self [ 'SlowPionCuts' ]
+  
+    ## get the selection of kaons
+    def kaons ( self ) :
+        """
+        Get the kaons
+        """
+        sel = self._selection ( 'KaonSelection')
+        if sel : return sel
+
+        _KaonFilter = FilterDesktop ( Code = """
+        ( 'K+'  == ABSID ) & ( %s )
+        """ % self.kaonCuts() )
+        #
+        sel = Selection (
+            'SelKaonsFor'      + self.name() ,
+            Algorithm          = _KaonFilter ,
+            RequiredSelections = [ StdLooseKaons ]
+            )
+
+        return self._add_selection ( 'KaonSelection' , sel )
+
+    ## get the pion selection
+    def pions ( self ) :
+        """
+        Get the pions
+        """
+        sel = self._selection ( 'PionSelection')
+        if sel : return sel
+
+        _PionFilter = FilterDesktop (
+            Code = """
+            ( 'pi+' == ABSID ) & ( %s )
+            """ % self.pionCuts() )
+        #
+        sel = Selection (
+            'SelPionsFor'      + self.name() ,
+            Algorithm          = _PionFilter ,
+            RequiredSelections = [ StdLoosePions ]
+            )
+        #
+        return self._add_selection ( 'PionSelection' , sel )
+
+
+    ## get the proton selection
+    def protons ( self ) :
+        """
+        Get the proton selection
+        """
+        sel = self._selection ( 'ProtonSelection')
+        if sel : return sel
+
+        _ProtonFilter = FilterDesktop (
+            Code = """
+            ( 'p+'  == ABSID ) & ( %s )
+            """ % self.protonCuts() )
+
+        sel = Selection (
+            'SelProtonsFor' + self.name() ,
+            Algorithm          = _ProtonFilter ,
+            RequiredSelections = [ StdNoPIDsProtons ]
+            )
+        #
+        return self._add_selection ( 'ProtonSelection' , sel )
+
+    ## get the meson selection
+    def mesons ( self ) :
+        """
+        Get the meson ( kaon + pion ) selection
+        """
+        sel = self._selection ( 'MesonSelection')
+        if sel : return sel
+
+        #
+        sel = MergedSelection (
+            'SelBasicMesonsFor' + self.name() ,
+            RequiredSelections = [ self.pions() , self.kaons() ]
+            )
+        #
+        return self._add_selection ( 'MesonSelection' , sel )
+
+    ## get the common preambulo:
+    def preambulo ( self ) : return self['Preambulo']
+
+  
+    # =============================================================================
+    # Lambda_C -> ( pKpi )  selection
+    # =============================================================================
+    def LamC ( self ) :
+
+        sel = self._selection ( 'LambdaCForPID_Selection' )
+        if sel : return sel
+
+        cmb = CombineParticles(
+            ##
+            Monitor      = self['Monitor'] ,
+            HistoProduce = self['Monitor'] ,
+            ##
+            DecayDescriptors = [
+            " [ Lambda_c+ -> p+  K-  pi+ ]cc" ,
+            ] ,
+            ##
+            Preambulo = self.preambulo() + [
+            "hpKpi = Gaudi.Histo1DDef ( 'mass p K pi' , 2240 , 2340 , 60 )"
+            ] ,
+            ##
+            CombinationCut = """
+            ( ADAMASS('Lambda_c+') < 55 * MeV ) &
+            ( APT > %s )
+            """ % ( 0.95 * self['pT(Lc+)' ] ) ,
+            ##
+            MotherCut      = """
+            ( chi2vx  < 25 )                   &
+            ( PT      > %s                   ) &
+            ( ADMASS('Lambda_c+') < 40 * MeV ) &
+            ( ctau_9 > 100 * micrometer      )
+            """ %  self [ 'pT(Lc+)' ] , 
+            ##
+            MotherMonitor  = """
+            process ( monitor ( M , hpKpi , 'mass p K pi ' ) ) >> ~EMPTY
+            """ , 
+            #
+            ## make the selection faster
+            #
+            ParticleCombiners = {'' : FITTER } ,
+            #
+            )
+
+        # convert it to selection
+        sel = Selection (
+            "SelLambdaCFor" + self.name()       ,
+            Algorithm          = cmb               ,
+            RequiredSelections = [ self.mesons  () ,
+                                   self.protons () ]
+            )
+
+        return self._add_selection( 'LambdaCForPID_Selection' ,  sel )
+
+       
+    # =============================================================================
+    # Sigma_C -> Lambda_C pi selection
+    # =============================================================================
+    def SigC ( self ) :
+
+        sel = self._selection ( 'SigmaCForPID_Selection' )
+        if sel : return sel
+
+        cmb = CombineParticles(
+            ##
+            Monitor      = self['Monitor'] ,
+            HistoProduce = self['Monitor'] ,
+            ##
+            DecayDescriptors = [
+            " [ Sigma_c0  -> Lambda_c+ pi- ]cc" ,
+            " [ Sigma_c++ -> Lambda_c+ pi+ ]cc" ,
+            ] ,
+            ##
+            DaughtersCuts = {
+            #'Lambda_c+' : ' INTREE ( good_proton ) ' , 
+            'pi+'       :  self.slowPionCuts()
+            } ,
+            ##
+            Preambulo = self.preambulo() + [
+            "hDmSigC = Gaudi.Histo1DDef ( 'dm(Sigma_c)' , 100 , 270 , 150 )"
+            ] ,
+            ##
+            CombinationCut = """
+            ( AM - AM1 < 270 * MeV )
+            """ ,
+            ##
+            MotherCut      = """
+            ( chi2vx  < 16 )
+            """ ,
+            ##
+            MotherMonitor  = """
+            process ( monitor ( M-M1 , hDmSigC , 'dm(Sigma_c)' ) ) >> ~EMPTY
+            """ ,
+            #
+            ## make the selection faster
+            #
+            ParticleCombiners = {'' : FITTER } ,
+            #
+            )
+
+        # convert it to selection
+        sel = Selection (
+            "SelSigmaCFor"     +   self.name()       ,
+            Algorithm          =   cmb               ,
+            RequiredSelections = [ self.LamC    ()   ,
+                                   StdAllNoPIDsPions ] ## slow prompt pion!
+            )
+
+        return self._add_selection( 'SigmaCForPID_Selection' ,  sel )
+ 
+  
+# =============================================================================
+# The END
+# =============================================================================
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffD0ToK3Pi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffD0ToK3Pi.py
new file mode 100644
index 000000000..84ab27da6
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffD0ToK3Pi.py
@@ -0,0 +1,392 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Mika Vesterinen']
+__date__ = '23/07/2014'
+__version__ = '$Revision: 5.0 $'
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseKaons, StdLoosePions, StdLooseProtons,StdAllLoosePions,StdAllNoPIDsPions
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from SelPy.utils import ( UniquelyNamedObject,
+                          ClonableObject,
+                          SelectionBase )
+from Configurables import (DecodeVeloRawBuffer, FastVeloTracking, TrackPrepareVelo, 
+                           NoPIDsParticleMaker, DataOnDemandSvc, ChargedProtoParticleMaker, 
+                           PrTrackAssociator, DelegatingTrackSelector, TrackContainerCopy, TrackAssociator,
+                          TrackStateInitAlg, TrackStateInitTool) 
+from TrackFitter.ConfiguredFitters import (ConfiguredEventFitter,
+                                           ConfiguredForwardStraightLineEventFitter)
+    
+
+__all__ = ('TrackEffD0ToK3PiAllLinesConf',
+           'TOSFilter',
+           'default_config')
+
+default_config = {
+        'NAME'        : 'TrackEffD0ToK3Pi',
+        'WGs'         : ['ALL'],
+        'BUILDERTYPE' : 'TrackEffD0ToK3PiAllLinesConf',
+        'STREAMS':["CharmCompleteEvent"],
+        'CONFIG'      : {
+            "HLT2" : "HLT_PASS_RE('Hlt2.*CharmHad.*HHX.*Decision')",
+            "TTSpecs" : {'Hlt2.*CharmHad.*HHX.*Decision%TOS':0},
+            "VeloLineForTiming":False,
+            "VeloFitter":"SimplifiedGeometry",
+            "DoVeloDecoding": False,
+            "RequireDstFirst":False,
+            "Dst_MAX_M":2.035*GeV,
+            "Dst_MAX_DTFCHI2":3.0,
+            "Sc_MAX_M":2.5*GeV,
+            "Sc_MAX_DTFCHI2":3.0,
+            "D0_MIN_FD":5.0*mm,
+            "LC_MIN_FD":2.0*mm,
+            "D0_MAX_DOCA":0.05*mm,
+            "VeloMINIP":0.05*mm,
+            "Kaon_MIN_PIDK":7,
+            "Pion_MAX_PIDK":4
+            }
+    }
+class TrackEffD0ToK3PiAllLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+        self.name = name
+        
+
+        ##### long track kaons and pions
+        self.PionCuts = "(PIDK < %(Pion_MAX_PIDK)s) & (TRGHOSTPROB < 0.35)" %config
+        self.KaonCuts = "(PIDK > %(Kaon_MIN_PIDK)s) & (TRGHOSTPROB < 0.35)" %config
+        
+        SelLongPions = Selection("SelLongPionsFor"+name,
+                                 Algorithm = FilterDesktop(name="LongPionFilterFor"+name,
+                                                           Code=self.PionCuts),
+                                 RequiredSelections = [StdLoosePions])
+        
+        SelLongKaons = Selection("SelLongKaonsFor"+name,
+                                 Algorithm = FilterDesktop(name="LongKaonFilterFor"+name,
+                                                           Code=self.KaonCuts),
+                                 RequiredSelections = [StdLooseKaons])
+        
+        ###### the velo tracking
+        self.VeloProtoOutputLocation = 'Rec/ProtoP/VeloProtosFor%s'%self.name
+        self.VeloTrackOutputLocation="Rec/Track/MyVeloFor%s"%self.name
+        self.FittedVeloTrackOutputLocation = "Rec/Track/PreparedVeloFor%s"%self.name
+        
+        self.VeloTracks = self.MakeVeloTracks([]) 
+        self.VeloPions = self.MakeVeloParticles("VeloPions","pion",self.VeloTracks)
+        self.VeloKaons = self.MakeVeloParticles("VeloKaons","kaon",self.VeloTracks)
+        self.VeloProtons = self.MakeVeloParticles("VeloProtons","proton",self.VeloTracks)
+        
+        ##################### MAKE THE LINES #############
+        
+        self.MissingPion4BodyLine = self.MakeLine("%sMissingPion4Body"%self.name,
+                                                  ['[K*(892)+ -> K- pi+ pi+]cc','[K*(892)+ -> K- pi+ pi-]cc','[K*(892)+ -> K- pi- pi-]cc'],## RS-A, RS-B , SS
+                                                  [SelLongKaons,SelLongPions],
+                                                  ['[D0 -> K*(892)+ pi+]cc','[D0 -> K*(892)+ pi-]cc'], ## allow both probe charges
+                                                  ["[D*(2010)+ -> D0 pi+]cc","[D*(2010)+ -> D~0 pi+]cc"], ## add also wrong sign
+                                                  ['[K*_0(1430)0 -> K*(892)+ pi-]cc','[K*_0(1430)0 -> K*(892)+ pi+]cc'], ## allow also wrong sign StdAllNoPIDs "pions"
+                                                  self.VeloPions)
+
+        self.MissingKaon4BodyLine = self.MakeLine("%sMissingKaon4Body"%self.name,
+                                                  ['[K*(892)+ -> pi+ pi+ pi-]cc','[K*(892)+ -> pi+ pi+ pi+]cc'],## RS, SS
+                                                  [SelLongPions],
+                                                  ['[D0 -> K*(892)+ K+]cc','[D0 -> K*(892)+ K-]cc'], ## allow both probe charges
+                                                  ["[D*(2010)+ -> D0 pi+]cc","[D*(2010)+ -> D~0 pi+]cc"], ## add also wrong sign
+                                                  ['[K*_0(1430)0 -> K*(892)+ pi-]cc','[K*_0(1430)0 -> K*(892)+ pi+]cc'], ## allow also wrong sign StdAllNoPIDs "pions"
+                                                  self.VeloKaons)
+        
+        self.MissingProtonLine = self.MakeLine("%sMissingProton"%self.name,
+                                               ['[K*(892)+ -> K- pi+]cc','[K*(892)+ -> K- pi-]cc'], ## RS, SS
+                                               [SelLongKaons, SelLongPions],
+                                               ['[Lambda_c+ -> K*(892)+ p+]cc','[Lambda_c+ -> K*(892)+ p~-]cc'],## both probe charges
+                                               ['[Sigma_c0 -> Lambda_c+ pi+]cc','[Sigma_c0 -> Lambda_c+ pi-]cc'], ## Allows Sigma_c0 and Sigma_c++
+                                               ['[K*_0(1430)0 -> K*(892)+ pi-]cc','[K*_0(1430)0 -> K*(892)+ pi+]cc'], ## allow also wrong sign StdAllNoPIDs "pions"
+                                               self.VeloProtons)
+
+        if config["VeloLineForTiming"] == True:
+            self.registerLine(StrippingLine("VeloLine"+name,selection=self.VeloPions))
+            
+        ### these are the partially reconstructed signals
+        self.registerLine(self.MissingKaon4BodyLine[0])
+        self.registerLine(self.MissingPion4BodyLine[0])
+        self.registerLine(self.MissingProtonLine[0])
+        
+        ### and these contain the candidate matching long tracks
+        self.registerLine(self.MissingPion4BodyLine[1])
+        self.registerLine(self.MissingKaon4BodyLine[1])
+        self.registerLine(self.MissingProtonLine[1])
+
+    
+    #### function to make the stripping line
+    def MakeLine(self,
+                 name,
+                 KstDecayDescriptors,
+                 KstRequirements,
+                 D0DecayDescriptor,
+                 DstDecayDescriptors,
+                 MatchDecayDescriptor,
+                 Probes):
+        
+        #########################################################
+        ## DEFINE ALL OF THE CUTS
+        #########################################################
+        
+        MatchingLongTrackCuts = "(ISLONG) & (TRGHOSTPROB < 0.35)"
+        D0CombinationCut = "(AMAXDOCA('') < %(D0_MAX_DOCA)s )" %self.__confdict__
+        SlowpionCuts = "(MIPCHI2DV(PRIMARY) < 9) & (PIDe < 5) & (PT > 300*MeV)"
+        #DstPrelimComboCuts = "(AM - ACHILD(M,1) < 225*MeV) & (AALLSAMEBPV)"
+        DstPrelimComboCuts = "(APT > 3500*MeV) & (AALLSAMEBPV(-1,-1,-1))"
+        if '4Body' in name:
+            D0Preambulo = ["mfit = DTF_FUN(M,True,'D0')"]
+            KstCombinationCut = "(APT > 2000*MeV) & (AM < 1800*MeV)"\
+                "& (AM - ACHILD(M,1) - ACHILD(M,2) - ACHILD(M,3) > 100*MeV)"\
+                "& (ANUM(PT > 500*MeV)>=2)"\
+                "& (AMAXCHILD(MIPCHI2DV(PRIMARY)) > 30)"\
+                "& (ADOCACHI2CUT(10,''))"
+            if "MissingKaon" in name:
+                KstCombinationCut += '& (AM < 1400*MeV)'
+            KstMotherCut = '(VFASPF(VZ) > %(D0_MIN_FD)s) & (BPVDIRA > 0.99) & (VFASPF(VCHI2/VDOF)< 3.0)' %self.__confdict__
+            D0MotherCut ='(abs(DTF_FUN(M,True) - 1865) < 250*MeV)'
+            DstMotherCut = "(in_range ( 2 * GeV , mfit , %(Dst_MAX_M)s )) & (DTF_CHI2NDOF(True,'D0') < %(Dst_MAX_DTFCHI2)s)" %self.__confdict__
+        elif 'Proton' in name:
+            D0Preambulo = ["mfit = DTF_FUN(M,True,'Lambda_c+')"]
+            KstCombinationCut = '(APT > 1500*MeV) & (AM < 1500*MeV)'\
+                '& (AM - ACHILD(M,1) - ACHILD(M,2) > 100*MeV)'\
+                '& (ANUM(PT > 500*MeV)>=2)'\
+                "& (AMAXCHILD(MIPCHI2DV(PRIMARY)) > 30)"\
+                "& (ADOCACHI2CUT(15,''))"
+            KstMotherCut = '(VFASPF(VZ) > %(LC_MIN_FD)s) & (BPVDIRA > 0.99) & (VFASPF(VCHI2/VDOF)< 3.0)' %self.__confdict__
+            D0MotherCut ='(abs(DTF_FUN(M,True) - 2286) < 250*MeV)'
+            DstMotherCut = "(in_range ( 2.4 * GeV , mfit , %(Sc_MAX_M)s )) & (DTF_CHI2NDOF(True,'Lambda_c+') < %(Sc_MAX_DTFCHI2)s)" %self.__confdict__
+        else:
+            print name + ' = Bad line name'
+        
+        #########################################################
+        ## STEP 1: 
+        ## make the partially reconstructed D0/Lamda_c candidate
+        #########################################################
+            
+        CombKst = CombineParticles(name="For%sCombKst"%name,
+                                   DecayDescriptors = KstDecayDescriptors,
+                                   CombinationCut = KstCombinationCut,
+                                   MotherCut = KstMotherCut)
+        
+        SelKst = Selection('For%sSelKst'%name,
+                           Algorithm = CombKst,
+                           RequiredSelections = KstRequirements)
+    
+        #########################################################
+        ## STEP 2 (OPTIONAL): 
+        ## Does this make an "inclusive D*" candidate?
+        #########################################################
+        if self.__confdict__["RequireDstFirst"]:
+
+            CombDstarPrelim = CombineParticles(name = "For%sCombDstarPrelimFor"%name,
+                                               DecayDescriptors = ["[D*(2010)+ -> K*(892)+ pi+]cc"],
+                                               DaughtersCuts = {"pi+": SlowpionCuts},
+                                               CombinationCut = DstPrelimComboCuts,
+                                               MotherCut = "ALL")
+            SelDstarPrelim = Selection("For%sSelDstarPrelimfor"%name,
+                                       Algorithm = CombDstarPrelim,
+                                       RequiredSelections = [SelKst,StdAllLoosePions])
+        
+            SelDstarPrelimTOS = TOSFilter( "For%sSelDstarPrelimTOS"%name
+                                           ,SelDstarPrelim
+                                           ,self.__confdict__["TTSpecs"])
+
+        #########################################################
+        ## STEP 3: 
+        ## Add the probe velo track to the D0
+        #########################################################
+    
+        CombD0 = CombineParticles(name="For%sCombD0"%name,
+                                  Preambulo = D0Preambulo,
+                                  DecayDescriptors = D0DecayDescriptor,
+                                  CombinationCut = D0CombinationCut,
+                                  MotherCut = D0MotherCut)
+    
+        if self.__confdict__["RequireDstFirst"]:
+            SelD0 = Selection('For%sSelD0'%name,
+                              Algorithm = CombD0,
+                              RequiredSelections = [SelDstarPrelimTOS,SelKst,Probes])
+        else:
+            SelD0 = Selection('For%sSelD0'%name,
+                              Algorithm = CombD0,
+                              RequiredSelections = [SelKst,Probes])
+            
+        #########################################################
+        ## STEP 4: 
+        ## Build a D* candidate
+        #########################################################
+            
+        
+
+        CombDstar = CombineParticles(name = "For%sCombDstar"%name,
+                                     DecayDescriptors = DstDecayDescriptors,
+                                     DaughtersCuts = {"pi+": SlowpionCuts},
+                                     CombinationCut = DstPrelimComboCuts,
+                                     MotherCut = DstMotherCut)
+        
+        SelDstar = Selection("For%sSelDstarf"%name,
+                             Algorithm = CombDstar,
+                             RequiredSelections = [SelD0,StdAllLoosePions])
+        
+        SelDstarTOS = TOSFilter( "For%sSelDstarTOS"%name
+                                 ,SelDstar
+                                 ,self.__confdict__["TTSpecs"])
+        
+        
+        #########################################################
+        ## STEP 5: 
+        ## Find any interesting matching long tracks
+        #########################################################
+
+        CombD0MatchLong = CombineParticles(name="For%sCombD0MatchLong"%name,
+                                           DaughtersCuts = {"pi+":MatchingLongTrackCuts},
+                                           DecayDescriptors = MatchDecayDescriptor,
+                                           CombinationCut = "(AMAXDOCA('') < 0.10 * mm )",
+                                           MotherCut = "ALL")
+        
+        SelD0MatchLong = Selection('For%sSelD0MatchLong'%name,
+                                   Algorithm = CombD0MatchLong,
+                                   RequiredSelections = [SelDstarTOS,SelKst,StdAllNoPIDsPions])
+
+        #########################################################
+        ## STEP 6: 
+        ## Make the stripping lines
+        #########################################################
+        
+        LineDstar = StrippingLine(name, 
+                                  FILTER = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 180 )",
+                                             "Preambulo": ["from LoKiTracks.decorators import *"]},
+                                  HLT2 = self.__confdict__["HLT2"],
+                                  selection = SelDstarTOS) 
+        
+        LineMatchLong = StrippingLine(name+'MatchLong', 
+                                      FILTER = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 180 )",
+                                                 "Preambulo": ["from LoKiTracks.decorators import *"]},
+                                      HLT2 = self.__confdict__["HLT2"],
+                                      selection = SelD0MatchLong)
+        return [LineDstar,LineMatchLong]
+
+
+    def MakeVeloTracks(self,prefilter):
+        
+        if self.__confdict__["DoVeloDecoding"]:
+            from DAQSys.Decoders import DecoderDB
+            from DAQSys.DecoderClass import decodersForBank
+            decs=[]
+            vdec=DecoderDB["DecodeVeloRawBuffer/createBothVeloClusters"]
+            vdec.Active=True
+            DecoderDB["DecodeVeloRawBuffer/createVeloClusters"].Active=False
+            DecoderDB["DecodeVeloRawBuffer/createVeloLiteClusters"].Active=False
+            decs=decs+[vdec]
+            VeloDecoding = GaudiSequencer("RecoDecodingSeq")
+            VeloDecoding.Members += [d.setup() for d in decs ]
+        
+        MyFastVeloTracking = FastVeloTracking("For%sFastVelo"%self.name,OutputTracksName=self.VeloTrackOutputLocation)
+        MyFastVeloTracking.OnlyForward = True
+        MyFastVeloTracking.ResetUsedFlags = True
+        ### prepare for fitting
+        preve = TrackStateInitAlg("For%sInitSeedFit"%self.name,TrackLocation = self.VeloTrackOutputLocation)
+        preve.StateInitTool.VeloFitterName = "FastVeloFitLHCbIDs"
+        copyVelo = TrackContainerCopy( "For%sCopyVelo"%self.name )
+        copyVelo.inputLocations = [self.VeloTrackOutputLocation]
+        copyVelo.outputLocation = self.FittedVeloTrackOutputLocation
+        
+        ### fitting
+        if self.__confdict__["VeloFitter"] == "ForwardStraightLine":
+            MyVeloFit = ConfiguredForwardStraightLineEventFitter(Name="For%sVeloRefitterAlg"%self.name,
+                                                                 TracksInContainer=self.FittedVeloTrackOutputLocation)
+        elif self.__confdict__["VeloFitter"] == "SimplifiedGeometry":
+            MyVeloFit = ConfiguredEventFitter(Name="For%sVeloRefitterAlg"%self.name,
+                                              TracksInContainer=self.FittedVeloTrackOutputLocation,
+                                              SimplifiedGeometry = True)
+        else:
+            MyVeloFit = ConfiguredEventFitter(Name="For%sVeloRefitterAlg"%self.name,
+                                              TracksInContainer=self.FittedVeloTrackOutputLocation)
+            
+        #### making the proto particles
+        MakeVeloProtos = ChargedProtoParticleMaker('For%sVeloProtoMaker'%self.name)
+        MakeVeloProtos.Inputs=[self.FittedVeloTrackOutputLocation]
+        MakeVeloProtos.Output = self.VeloProtoOutputLocation
+        MakeVeloProtos.addTool( DelegatingTrackSelector, name="TrackSelector" )
+        MakeVeloProtos.TrackSelector.TrackTypes = [ "Velo" ]
+    
+        #### the full sequence
+        makeparts = GaudiSequencer('For%sMakeVeloTracksGS'%self.name)
+        if self.__confdict__["DoVeloDecoding"]:
+            makeparts.Members += [ VeloDecoding ] 
+        makeparts.Members += [ MyFastVeloTracking ] 
+        makeparts.Members += [ preve ] 
+        makeparts.Members += [ copyVelo ] 
+        makeparts.Members += [ MyVeloFit ] 
+        makeparts.Members += [ MakeVeloProtos ] 
+    
+        #### some python magic to maek this appear like a "Selection"
+        return GSWrapper(name="For%sWrappedVeloTrackingFor"%self.name,
+                         sequencer=makeparts,
+                         output=self.VeloProtoOutputLocation,
+                         requiredSelections =  prefilter)
+
+    def MakeVeloParticles(self,name,
+                          particle, 
+                          protoParticlesMaker):
+        
+        particleMaker =  NoPIDsParticleMaker("For%sParticleMaker%s"%(self.name,name) , Particle = particle)
+        particleMaker.Input = self.VeloProtoOutputLocation
+        
+        DataOnDemandSvc().AlgMap.update( {
+                "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(),
+                "/Event/Phys/" + particleMaker.name() + '/Vertices'  : particleMaker.getFullName()
+                } )
+        
+        AllVeloParticles = Selection("For%sSelAllVeloParts%s"%(self.name,name), 
+                                     Algorithm = particleMaker, 
+                                     RequiredSelections = [protoParticlesMaker], InputDataSetter=None)
+        
+        ### filter on the IP of the velo tracks
+        return Selection("For%sSelVeloParts%s"%(self.name,name), 
+                         Algorithm = FilterDesktop(name+"For%sFilterVeloTrackIP%s"%(self.name,name), 
+                                                   Code="(MIPDV(PRIMARY) > %(VeloMINIP)s)" %self.__confdict__),
+                         RequiredSelections = [AllVeloParticles])
+    
+###### OTHER FUNCTIONS ###############
+class GSWrapper(UniquelyNamedObject,
+                ClonableObject,
+                SelectionBase) :
+    
+    def __init__(self, name, sequencer, output, requiredSelections) :
+        UniquelyNamedObject.__init__(self, name)
+        ClonableObject.__init__(self, locals())
+        SelectionBase.__init__(self,
+                               algorithm = sequencer,
+                               outputLocation = output,
+                               requiredSelections = requiredSelections )
+def TOSFilter( name = None, sel = None, trigger = None ):
+    if len(trigger) == 0:
+        return sel
+    from Configurables import TisTosParticleTagger
+    _filter = TisTosParticleTagger(name+"_TriggerTos")
+    _filter.TisTosSpecs = trigger
+    _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = [ sel ], Algorithm = _filter )
+    return _sel
+###### OTHER FUNCTIONS ###############
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffD0ToKPi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffD0ToKPi.py
new file mode 100644
index 000000000..16f407539
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffD0ToKPi.py
@@ -0,0 +1,220 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Mika Vesterinen']
+__date__ = '09/11/2015'
+__version__ = '$Revision: 0.0 $'
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection 
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseKaons, StdLoosePions, StdAllLoosePions,StdAllNoPIDsPions
+from SelPy.utils import ( UniquelyNamedObject,
+                          ClonableObject,
+                          SelectionBase )
+from Configurables import (NoPIDsParticleMaker, DataOnDemandSvc, ChargedProtoParticleMaker,
+                           DelegatingTrackSelector)
+
+__all__ = ('TrackEffD0ToKPiAllLinesConf',
+           'TOSFilter',
+           'default_config')
+
+default_config = {
+    'NAME'        : 'TrackEffD0ToKPi',
+    'WGs'         : ['ALL'],
+    'BUILDERTYPE' : 'TrackEffD0ToKPiAllLinesConf',
+    'STREAMS':["CharmCompleteEvent"],
+    'CONFIG'      : {
+        "Monitor":False,
+        "HLT1" :"HLT_PASS_RE('Hlt1TrackMVADecision')",
+        "HLT2" :"HLT_PASS_RE('Hlt2TrackEff_D0.*Decision')",
+        "TTSpecs" :{'Hlt1TrackMVADecision%TOS':0,'Hlt2TrackEff_D0.*Decision%TOS':0},
+        "Tag_MIN_PT":1000.,
+        "VeloMINIPCHI2":4.0,
+        "Kaon_MIN_PIDK":0,
+        "Pion_MAX_PIDK":20,
+        "Dst_M_MAX":2100,
+        "Dst_DTFCHI2_MAX":10
+        }
+    }
+
+class TrackEffD0ToKPiAllLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    __confdict__={}
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+        
+        
+        self.TagCommonCuts = "(PT > %(Tag_MIN_PT)s*MeV)" %self.__confdict__
+
+        self.PionCuts = self.TagCommonCuts + "&(PIDK < %(Pion_MAX_PIDK)s)" %self.__confdict__
+        
+        self.KaonCuts = self.TagCommonCuts + "&(PIDK > %(Kaon_MIN_PIDK)s)" %self.__confdict__
+        
+        self.SelLongPions = Selection("SelLongPionsFor"+name,
+                                      Algorithm = FilterDesktop(name="LongPionFilterFor"+name,
+                                                                Code=self.PionCuts),
+                                      RequiredSelections = [StdLoosePions])
+        
+        self.SelLongKaons = Selection("SelLongKaonsFor"+name,
+                                      Algorithm = FilterDesktop(name="LongKaonFilterFor"+name,
+                                                                Code=self.KaonCuts),
+                                      RequiredSelections = [StdLooseKaons])
+
+        self.VeloTrackInputLocaton = 'Rec/Track/FittedHLT1VeloTracks'
+        self.VeloProtoOutputLocation = 'Rec/ProtoP/VeloProtosFor%s'%self.name()
+        
+        self.VeloTracks = self.MakeVeloProtos([]) 
+        self.VeloPions = self.MakeVeloParticles("VeloPions","pion",self.VeloTracks)
+        self.VeloKaons = self.MakeVeloParticles("VeloKaons","kaon",self.VeloTracks)
+        
+        
+        self.MissingPion2BodyLine = self.MakeLine(name+"_PionProbe",
+                                                  ['[D0 -> K- pi+]cc','[D~0 -> K+ pi+]cc'], 
+                                                  ["[D*(2010)+ -> D0 pi+]cc"],
+                                                  [self.SelLongKaons,self.VeloPions])
+
+        self.MissingKaon2BodyLine = self.MakeLine(name+"_KaonProbe",
+                                                  ['[D0 -> K+ pi+]cc','[D~0 -> K+ pi-]cc'], 
+                                                  ["[D*(2010)+ -> D0 pi+]cc"],
+                                                  [self.SelLongPions,self.VeloKaons])
+                
+        self.registerLine(self.MissingPion2BodyLine)
+        self.registerLine(self.MissingKaon2BodyLine)        
+
+    def MakeLine(self,name,
+                 D0DecayDescriptor,
+                 DstDecayDescriptors,
+                 D0Requirements):
+        
+        
+        D0CombinationCut = "(AM > 0.1*GeV) & (AM < 3.0*GeV)"
+        D0CombinationCut += " & (AMAXDOCA('') < 0.05 * mm)"
+        D0CombinationCut += " & (ACHILD(MIPDV(PRIMARY),1)+ACHILD(MIPDV(PRIMARY),2) > 0.2*mm)" 
+        D0MotherCut  = "(VFASPF(VZ) > 2*mm) & (VFASPF(VCHI2/VDOF) < 4.0)"
+        SlowpionCuts = "(MIPCHI2DV(PRIMARY) < 9)" 
+        DstMotherCut = "(PT > 1*MeV)" 
+
+        CombD0 = CombineParticles(name="CombD0for"+name,
+                                  DecayDescriptors = D0DecayDescriptor,
+                                  CombinationCut = D0CombinationCut,
+                                  MotherCut = D0MotherCut)
+        
+        SelD0 = Selection('SelD0for'+name,
+                          Algorithm = CombD0,
+                          RequiredSelections = D0Requirements)
+
+        CombDstar = CombineParticles(name = "CombDstarFor"+name,
+                                     DecayDescriptors = DstDecayDescriptors,
+                                     DaughtersCuts = {"pi+": SlowpionCuts},
+                                     CombinationCut = "(AALLSAMEBPV(-1,-1,-1))",
+                                     MotherCut = DstMotherCut)
+    
+        SelDstar = Selection("SelDstarfor"+name,
+                             Algorithm = CombDstar,
+                             RequiredSelections = [SelD0,StdAllLoosePions])
+        
+        SelDstarTOS = TOSFilter("TOSDstarfor"+name,
+                                SelDstar,
+                                self.__confdict__["TTSpecs"])
+        
+        MassFilter =FilterDesktop(name="MassFilter"+name, 
+                                  Code="(DTF_CHI2NDOF(True,'D0') < %(Dst_DTFCHI2_MAX)s) & (DTF_FUN( M ,True,'D0') < %(Dst_M_MAX)s)" %self.__confdict__)
+     
+        MassFilterSel = Selection("MassFilterSel"+name,
+                                  Algorithm = MassFilter,
+                                  RequiredSelections = [SelDstarTOS])
+
+        if self.__confdict__["Monitor"]:
+            MassFilter.Preambulo    = [
+                "Histo  = Gaudi.Histo1DDef"  ,
+                "mass     = monitor ( DTF_FUN( M ,True,'D0') ,             Histo ( 'Title' , 2000. , 2100. , 100 ) , 'HistoNameInMemory'    ) "
+                ]
+            MassFilter.Monitor      = True  ,
+            MassFilter.HistoProduce = True  ,
+            MassFilter.PostMonitor  = """ process ( mass ) >> EMPTY """                                                                                                        
+        LineDstar = StrippingLine(name, 
+                                  HLT1 = self.__confdict__["HLT1"],
+                                  HLT2 = self.__confdict__["HLT2"],
+                                  selection = MassFilterSel)
+        
+        return LineDstar
+        
+    def MakeVeloProtos(self,prefilter):
+                    
+        #### making the proto particles
+        MakeVeloProtos = ChargedProtoParticleMaker('For%sVeloProtoMaker'%self.name())
+        MakeVeloProtos.Inputs = [self.VeloTrackInputLocaton] 
+        MakeVeloProtos.Output = self.VeloProtoOutputLocation
+        MakeVeloProtos.addTool( DelegatingTrackSelector, name="TrackSelector" )
+        MakeVeloProtos.TrackSelector.TrackTypes = [ "Velo" ]
+    
+        #### the full sequence
+        makeparts = GaudiSequencer('For%sMakeVeloProtosGS'%self.name())
+        makeparts.Members += [ MakeVeloProtos ] 
+    
+        #### some python magic to maek this appear like a "Selection"
+        return GSWrapper(name="For%sWrappedVeloTrackingFor"%self.name(),
+                         sequencer=makeparts,
+                         output=self.VeloProtoOutputLocation,
+                         requiredSelections =  prefilter)
+
+    def MakeVeloParticles(self,name,
+                          particle, 
+                          protoParticlesMaker):
+        
+        particleMaker =  NoPIDsParticleMaker("For%sParticleMaker%s"%(self.name(),name) , Particle = particle)
+        particleMaker.Input = self.VeloProtoOutputLocation
+        
+        DataOnDemandSvc().AlgMap.update( {
+                "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(),
+                "/Event/Phys/" + particleMaker.name() + '/Vertices'  : particleMaker.getFullName()
+                } )
+        
+        AllVeloParticles = Selection("For%sSelAllVeloParts%s"%(self.name(),name), 
+                                     Algorithm = particleMaker, 
+                                     RequiredSelections = [protoParticlesMaker], InputDataSetter=None)
+        
+        ### filter on the IP of the velo tracks
+        return Selection("For%sSelVeloParts%s"%(self.name(),name), 
+                         Algorithm = FilterDesktop(name+"For%sFilterVeloTrackIP%s"%(self.name(),name), 
+                                                   Code="(MIPCHI2DV(PRIMARY) > %(VeloMINIPCHI2)s)" %self.__confdict__),
+                         RequiredSelections = [AllVeloParticles])
+
+########## TISTOS FILTERING ##################################
+def TOSFilter( name = None, sel = None, trigger = None ):
+    if len(trigger) == 0:
+        return sel
+    from Configurables import TisTosParticleTagger
+    _filter = TisTosParticleTagger(name+"_TriggerTos")
+    _filter.TisTosSpecs = trigger
+    _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = [ sel ], Algorithm = _filter )
+    return _sel
+
+class GSWrapper(UniquelyNamedObject,
+                ClonableObject,
+                SelectionBase) :
+    
+    def __init__(self, name, sequencer, output, requiredSelections) :
+        UniquelyNamedObject.__init__(self, name)
+        ClonableObject.__init__(self, locals())
+        SelectionBase.__init__(self,
+                               algorithm = sequencer,
+                               outputLocation = output,
+                               requiredSelections = requiredSelections )
+        
+        
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffDownMuon.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffDownMuon.py
new file mode 100755
index 000000000..65d118f6c
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffDownMuon.py
@@ -0,0 +1,602 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+## #####################################################################
+# A stripping selection for Downstream J/psi->mu+mu- decays
+# To be used for tracking studies
+#
+# @authors G. Krocker, P. Seyfert, S. Wandernoth
+# @date 2010-Aug-17
+#
+# @authors P. Seyfert, A. Jaeger
+# @date 2011-Mar-17
+#
+# @author M. Kolpin
+# @date 2015-Mar-23
+#
+# @author R. Kopecna
+# @date 2019-Apr-15
+#
+#######################################################################
+
+__author__ = ['Renata Kopecna']
+__date__ = '15/04/2019'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = ('StrippingTrackEffDownMuonConf',
+           'default_config',
+	   'selMuonPParts',
+           'makeMyMuons',
+           'DownJPsi',
+            'makeResonanceMuMuTrackEff',
+           'DownZ',
+           'DownUpsilon',
+           'longTrackFilter',
+           'chargeFilterProbe',
+           'chargeFilterTag',
+           'selHlt1Jpsi',
+           'selHlt2Jpsi',
+           'trackingDownPreFilter'
+           )
+
+#FIXME Write includes in a cleaner way
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+from DAQSys.DecoderClass import Decoder
+from Configurables import GaudiSequencer
+from Configurables import UnpackTrack, ChargedProtoParticleMaker, DelegatingTrackSelector, TrackSelector, BestPIDParticleMaker
+from TrackFitter.ConfiguredFitters import ConfiguredFit
+from Configurables import TrackStateInitAlg
+from StrippingConf.StrippingLine import StrippingLine
+from Configurables import ChargedProtoParticleAddMuonInfo, MuonIDAlgLite
+from MuonID import ConfiguredMuonIDs
+from Configurables import ChargedProtoCombineDLLsAlg, ProtoParticleMUONFilter
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdLooseMuons
+
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter
+from os import environ
+from Gaudi.Configuration import *
+import GaudiKernel.ProcessJobOptions
+from GaudiKernel.SystemOfUnits import mm
+
+from GaudiConfUtils.ConfigurableGenerators import TisTosParticleTagger
+from StandardParticles import StdAllLooseMuons
+from Configurables import GaudiSequencer
+from Configurables import TrackToDST
+from Configurables import TrackSys
+from Configurables import PatSeeding, PatSeedingTool, PatLongLivedTracking
+from PhysSelPython.Wrappers import AutomaticData
+# Get the fitters
+from TrackFitter.ConfiguredFitters import ConfiguredFit, ConfiguredFitSeed, ConfiguredFitDownstream
+from PatAlgorithms import PatAlgConf
+
+from SelPy.utils import ( UniquelyNamedObject,
+                          ClonableObject,
+                          SelectionBase )
+
+
+default_config = {
+    'NAME'        : 'TrackEffDownMuon',
+    'WGs'         : ['Calib'],
+    'BUILDERTYPE' : 'StrippingTrackEffDownMuonConf',
+    'CONFIG'      : {
+            #Mother paramteres #TODO organize here
+			'JpsiMassPreComb'	: 2000.     #MeV
+		,	'JpsiMassPostComb'	: 200.      #MeV
+		,	'JpsiDoca'		: 5.        #mm
+		,	'JpsiVertexChi2'	: 5.        #adimensional
+		,	'UpsilonMassPreComb'	: 100000.   #MeV
+		,	'UpsilonMassPostComb'	: 1500.     #MeV
+		,	'ZMassPreComb'		: 100000.   #MeV
+		,	'ZMassPostComb'		: 1500.     #MeV
+            #Mu parameters (kept from previous versions)
+ 		,	'SeedingMinP'		: 1500.      #MeV
+		,	'DataType'		: '2011'     #TODO
+		,	'TrChi2'		: 10.        #adimensional
+		,	'MuMom'			: 2.         #GeV
+		,	'MuTMom'		: 0.2        #GeV
+		,	'UpsilonMuMom'		: 0.         #GeV, dummy
+		,	'UpsilonMuTMom'		: 0.5        #GeV
+		,	'ZMuMinEta'		: 2.         #adimensional
+		,	'ZMuMaxEta'		: 4.5        #adimensional
+		,	'ZMuMom'		: 0.         #GeV
+		,	'ZMuTMom'		: 20.        #GeV
+            #Probe parameters
+		,   'JpsiProbePt'          	: 0.5        #GeV
+		,   'JpsiProbeP'           	: 5.         #GeV, dummy
+		,   'JpsiProbeTrackChi2'   	: 10.        #adimensional
+            #Tag parameters
+		,       'JpsiTagPt'            	: 0.7    #GeV
+		,       'JpsiTagP'             	: 5.     #GeV
+		,       'JpsiTagMinIP'         	: 0.5    #mm
+		,       'JpsiTagPID'           	: -2.    #adimensional
+		,       'JpsiTagTrackChi2'      : 10.    #adimensional
+            #Prescale
+		,	'NominalLinePrescale'    : 0.5
+		,	'NominalLinePostscale'   : 1.
+		,	'ValidationLinePrescale' : 0.0015 # 0.5 in stripping15: 0.1 gives 1.42% retention rate , ValidationLine further prescaled
+		,	'ValidationLinePostscale': 1.
+		,	'JpsiLinePrescale'       : 1.
+		,	'JpsiLinePostscale'      : 1.
+		,	'ZLinePrescale'          : 1.
+		,	'ZLinePostscale'         : 1.
+		,	'UpsilonLinePrescale'    : 1.
+		,	'UpsilonLinePostscale'   : 1.
+            #Trigger
+		,   'JpsiHlt1Filter'        : 'Hlt1.*Decision'
+            	,   'JpsiHlt2Filter'        : 'Hlt2.*Decision'
+		,	'HLT1TisTosSpecs'       : { "Hlt1TrackMuonDecision%TOS" : 0, "Hlt1SingleMuonNoIPDecision%TOS" : 0} #no reg. expression allowed(see selHlt1Jpsi )
+		,	'ZHLT1TisTosSpecs'      : { "Hlt1SingleMuonHighPTDecision%TOS" : 0} #no reg. expression allowed(see selHlt1Jpsi )
+		,	'UpsilonHLT1TisTosSpecs': { "Hlt1SingleMuonHighPTDecision%TOS" : 0} #no reg. expression allowed(see selHlt1Jpsi )
+		,	'HLT1PassOnAll'         : True
+		,	'HLT2TisTosSpecs'       : { "Hlt2SingleMuon.*Decision%TOS" : 0, "Hlt2TrackEffDiMuonDownstream.*Decision%TOS" : 0 } #reg. expression allowed
+		,	'ZHLT2TisTosSpecs'      : { "Hlt2SingleMuonHighPTDecision%TOS" : 0 } #reg. expression allowed
+		,	'UpsilonHLT2TisTosSpecs': { "Hlt2SingleMuonLowPTDecision%TOS" : 0} #reg. expression allowed
+		,	'HLT2PassOnAll'        : False
+    },
+    'STREAMS'     : { 'Dimuon' : ['StrippingTrackEffDownMuonNominalLine'
+	                           ,'StrippingTrackEffDownMuonValidationLine'
+                                   ,'StrippingTrackEffDownMuonLine1'
+                                   ,'StrippingTrackEffDownMuonLine2'
+                                   #,'StrippingTrackEffDownMuonZLine'
+                                   ,'StrippingTrackEffDownMuonUpsilonLine']
+                               }
+    }
+
+
+class StrippingTrackEffDownMuonConf(LineBuilder):
+    """
+    Definition of Downstream J/Psi stripping.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+          LineBuilder.__init__(self, name, config)
+          nominal_name = name + 'Nominal'
+          valid_name = name + 'Validation'
+          Z_name = name + 'Z'
+          Upsilon_name = name + 'Upsilon'
+
+          self.TisTosPreFilter1Jpsi = selHlt1Jpsi('TisTosFilter1Jpsi'+name, HLT1TisTosSpecs = config['HLT1TisTosSpecs'], HLT1PassOnAll = config['HLT1PassOnAll'])
+          self.TisTosPreFilter2Jpsi = selHlt2Jpsi('TisTosFilter2Jpsi'+name, hlt1Filter = self.TisTosPreFilter1Jpsi, HLT2TisTosSpecs = config['HLT2TisTosSpecs'], HLT2PassOnAll = config['HLT2PassOnAll'])
+
+          self.TisTosPreFilter1Z = selHlt1Jpsi('TisTosFilter1Z'+name, HLT1TisTosSpecs = config['ZHLT1TisTosSpecs'], HLT1PassOnAll = config['HLT1PassOnAll'])
+          self.TisTosPreFilter2Z = selHlt2Jpsi('TisTosFilter2Z'+name, hlt1Filter = self.TisTosPreFilter1Z, HLT2TisTosSpecs = config['ZHLT2TisTosSpecs'], HLT2PassOnAll = config['HLT2PassOnAll'])
+
+          self.TisTosPreFilter1Upsilon = selHlt1Jpsi('TisTosFilter1Upsilon'+name, HLT1TisTosSpecs = config['UpsilonHLT1TisTosSpecs'], HLT1PassOnAll = config['HLT1PassOnAll'])
+          self.TisTosPreFilter2Upsilon = selHlt2Jpsi('TisTosFilter2Upsilon'+name, hlt1Filter = self.TisTosPreFilter1Upsilon, HLT2TisTosSpecs = config['UpsilonHLT2TisTosSpecs'], HLT2PassOnAll = config['HLT2PassOnAll'])
+
+          self.TrackingPreFilter = trackingDownPreFilter(nominal_name, self.TisTosPreFilter2Jpsi, config['SeedingMinP'])
+          self.DownMuProtoPFilter = selMuonPParts(nominal_name, config['DataType'], self.TrackingPreFilter)
+          self.DownMuPFilter = makeMyMuons(nominal_name, self.DownMuProtoPFilter)
+          self.DownJpsiFilter = DownJPsi( 'DownJpsiSel'+nominal_name, self.DownMuPFilter, config['TrChi2'],
+          		config['MuTMom'], config['MuMom'], config['JpsiMassPreComb'], config['JpsiDoca'],
+          		config['JpsiMassPostComb'], config['JpsiVertexChi2'] )
+
+          self.ZTrackingPreFilter = trackingDownPreFilter( Z_name, self.TisTosPreFilter2Z, config['SeedingMinP'])
+          self.ZDownMuProtoPFilter = selMuonPParts(Z_name, config['DataType'], self.ZTrackingPreFilter)
+          self.ZDownMuPFilter = makeMyMuons(Z_name, self.ZDownMuProtoPFilter)
+          self.DownZFilter = DownZ( 'DownSel'+Z_name, self.ZDownMuPFilter,
+          		config['ZMuMom'], config['ZMuTMom'], config['ZMuMinEta'], config['ZMuMaxEta'],
+          		config['ZMassPreComb'], config['ZMassPostComb'], )
+
+          self.UpsilonTrackingPreFilter = trackingDownPreFilter( Upsilon_name, self.TisTosPreFilter2Upsilon, config['SeedingMinP'])
+          self.UpsilonDownMuProtoPFilter = selMuonPParts(Upsilon_name, config['DataType'], self.UpsilonTrackingPreFilter)
+          self.UpsilonDownMuPFilter = makeMyMuons(Upsilon_name, self.UpsilonDownMuProtoPFilter)
+          self.DownUpsilonFilter = DownUpsilon( 'DownSel'+Upsilon_name, self.UpsilonDownMuPFilter,
+          		config['UpsilonMuMom'], config['UpsilonMuTMom'],
+          		config['UpsilonMassPreComb'], config['UpsilonMassPostComb'], )
+
+        # ##########################################
+        # Please keep p and pT in [GeV], rest in [MeV]
+          tagCut = "(TRCHI2DOF < %(JpsiTagTrackChi2)s) & (PT > %(JpsiTagPt)s*GeV) & (P > %(JpsiTagP)s*GeV) & (PIDmu >%(JpsiTagPID)s ) & (MIPDV(PRIMARY)>%(JpsiTagMinIP)s) " % config
+          probeCut =  "(TRCHI2DOF < %(JpsiProbeTrackChi2)s) & (PT > %(JpsiProbePt)s*GeV) & (P > %(JpsiProbeP)s*GeV)" % config
+          JpsiCombCut = "(AMAXDOCA('') < %(JpsiDoca)s*mm)" % config
+          JpsiMotherCut = "(VFASPF(VCHI2/VDOF) < %(JpsiVertexChi2)s)" % config
+
+        # ####################################
+
+        # RECONSTRUCT TAG-TRACKS
+          self.longbothJpsi =  longtrackFilter( name+'LongJpsiBoth',  partSource = StdLooseMuons, tagCut = tagCut)
+          self.longMinusJpsi = chargeFilterTag( name+'LongJpsiMinus', partSource = self.TisTosPreFilter2Jpsi, charge = -1, tagCut = tagCut)
+          self.longPlusJpsi =  chargeFilterTag( name+'LongJpsiPlus',  partSource = self.TisTosPreFilter2Jpsi, charge = 1,  tagCut = tagCut)
+
+        # RECONSTRUCT PROBE-TRACKS
+          self.DownMuonMinusJpsi = chargeFilterProbe(name+'DownMuonMinusJpsi', partSource = self.DownMuPFilter, charge = -1, probeCut = probeCut)
+          self.DownMuonPlusJpsi =  chargeFilterProbe(name+'DownMuonJpsiPlus',  partSource = self.DownMuPFilter, charge = 1,  probeCut = probeCut)
+        #############1
+        # def makeResonanceMuMuTrackEff(name, resonanceName, decayDescriptor, plusCharge, minusCharge,
+        # mode, massWin, vertexChi2, resonancePT, DownMuonPT, longPT, longMuonPID, longMuonMinIPCHI2, longMuonTrackCHI2):
+
+        # J/psi -> mu mu, tag-and-probe
+          self.makeJpsiDownMuonTrackEff1 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuTrackEff1',
+                                                               resonanceName = 'J/psi(1S)',
+                                                               decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                               plusCharge = self.DownMuonPlusJpsi,
+                                                               minusCharge = self.longMinusJpsi,
+                                                               mode = 1,
+                                                               MassPreComb = config['JpsiMassPreComb'],
+                                                               MassPostComb = config['JpsiMassPostComb'],
+                                                               combCut = JpsiCombCut,
+                                                               motherCut = JpsiMotherCut)
+        # J/psi -> mu mu, probe-and-tag
+          self.makeJpsiDownMuonTrackEff2 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuTrackEff2',
+                                                               resonanceName = 'J/psi(1S)',
+                                                               decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                               minusCharge = self.DownMuonMinusJpsi,
+                                                               plusCharge = self.longPlusJpsi,
+                                                               mode = 2,
+                                                               MassPreComb = config['JpsiMassPreComb'],
+                                                               MassPostComb = config['JpsiMassPostComb'],
+                                                               combCut = JpsiCombCut,
+                                                               motherCut = JpsiMotherCut)
+        #
+          self.nominal_line =  StrippingLine(nominal_name + 'Line'
+                                             , prescale = config['NominalLinePrescale']
+                                             , postscale = config['NominalLinePostscale']
+                                             , algos=[self.DownJpsiFilter]
+                                             , HLT1 = "HLT_PASS_RE('%(JpsiHlt1Filter)s')" % config
+                                             , HLT2 = "HLT_PASS_RE('%(JpsiHlt2Filter)s')" % config
+                                             )
+
+          self.nominal_line1 =  StrippingLine(name + 'Line1'
+                                             , prescale = config['NominalLinePrescale']
+                                             , postscale = config['NominalLinePostscale']
+                                             , selection = self.makeJpsiDownMuonTrackEff1
+                                             , HLT1 = "HLT_PASS_RE('%(JpsiHlt1Filter)s')" % config
+                                             , HLT2 = "HLT_PASS_RE('%(JpsiHlt2Filter)s')" % config
+                                             )
+
+          self.nominal_line2 =  StrippingLine(name + 'Line2'
+                                             , prescale = config['NominalLinePrescale']
+                                             , postscale = config['NominalLinePostscale']
+                                             , selection = self.makeJpsiDownMuonTrackEff2
+                                             , HLT1 = "HLT_PASS_RE('%(JpsiHlt1Filter)s')" % config
+                                             , HLT2 = "HLT_PASS_RE('%(JpsiHlt2Filter)s')" % config
+                                             )
+
+          self.valid_line = StrippingLine(valid_name + 'Line', prescale = config['ValidationLinePrescale'], postscale = config['ValidationLinePostscale'], algos=[self.TisTosPreFilter2Jpsi])
+
+          self.Z_line =  StrippingLine(Z_name + 'Line',  prescale = config['ZLinePrescale'], postscale = config['ZLinePostscale'], algos=[self.DownZFilter])
+
+          self.Upsilon_line =  StrippingLine(Upsilon_name + 'Line',  prescale = config['UpsilonLinePrescale'], postscale = config['UpsilonLinePostscale'], algos=[self.DownUpsilonFilter])
+
+          self.registerLine(self.nominal_line1)
+          self.registerLine(self.nominal_line2)
+          self.registerLine(self.nominal_line)
+          self.registerLine(self.valid_line)
+          self.registerLine(self.Z_line)
+          self.registerLine(self.Upsilon_line)
+
+
+# ########################################################################################
+# Make the protoparticles
+# ########################################################################################
+def selMuonPParts(name, DataType, downstreamSeq):
+   """
+       Make ProtoParticles out of Downstream tracks
+   """
+   unpacker = UnpackTrack(name+"UnpackTrack")  #TODO do we need this or is it here for historical reason ?
+   unpacker.InputName="pRec/"+name+"_Downstream/FittedTracks"
+   unpacker.OutputName="Rec/"+name+"_Downstream/FittedTracks"
+
+   cm=ConfiguredMuonIDs.ConfiguredMuonIDs( DataType ) #data=DaVinci().getProp("DataType"))
+   idalg = cm.configureMuonIDAlgLite(name+"IDalg")
+   idalg.TracksLocations = ["Rec/"+name+"_Downstream/FittedTracks"]
+   idalg.MuonIDLocation = "Rec/"+name+"_Muon/DownstreamMuonPID"
+   idalg.MuonTrackLocation = "Rec/"+name+"_Track/MuonForDownstream" # I would call it FromDownstream
+
+   downprotoseq = GaudiSequencer(name+"ProtoPSeq")
+   downprotos = ChargedProtoParticleMaker(name+"ProtoPMaker")
+   downprotos.Inputs = ["Rec/"+name+"_Downstream/FittedTracks"]
+   downprotos.Output = "Rec/ProtoP/"+name+"_ProtoPMaker/ProtoParticles"
+   downprotos.addTool( DelegatingTrackSelector, name="TrackSelector" )
+   #tracktypes = [ "Long","Upstream","Downstream","Ttrack","Velo","VeloR" ] # only downstream needed
+   tracktypes = ["Downstream"]
+   #if (trackcont == "Best") :
+   #	tracktypes = [ "Long" ]
+   downprotos.TrackSelector.TrackTypes = tracktypes
+   selector = downprotos.TrackSelector
+   for tsname in tracktypes:
+   	selector.addTool(TrackSelector,name=tsname)
+   	ts = getattr(selector,tsname)
+   	# Set Cuts
+   	ts.TrackTypes = [tsname]
+#	ts.MinNDoF = 1
+   	ts.MaxChi2Cut = 10
+
+   addmuonpid = ChargedProtoParticleAddMuonInfo(name+"addmuoninfo")
+   addmuonpid.InputMuonPIDLocation = "Rec/"+name+"_Muon/DownstreamMuonPID"
+   addmuonpid.ProtoParticleLocation = "Rec/ProtoP/"+name+"_ProtoPMaker/ProtoParticles"
+   #addmuonpid.OutputLevel = 0
+   combinedll = ChargedProtoCombineDLLsAlg(name+"CombineDLL")
+   combinedll.ProtoParticleLocation = "Rec/ProtoP/"+name+"_ProtoPMaker/ProtoParticles"
+   #combinedll.OutputLevel = 0
+   # DST post treatment
+   #TrackToDST(name+"TrackToDST").TracksInContainer = "Rec/Downstream/Tracks"
+   #downprotoseq.Members += [ TrackToDST(name+"TrackToDST"), downprotos, addmuonpid, combinedll ]
+   downprotoseq.Members += [ downprotos, addmuonpid, combinedll ]
+#
+   DataOnDemandSvc().AlgMap.update( {
+                "/Event/Rec/"+name+"_Downstream/Tracks" : unpacker.getFullName(),
+                "/Event/Rec/"+name+"_Muon/DownstreamMuonPID" : idalg.getFullName(),
+#                "/Event/Rec/ProtoP/"+name+"ProtoPMaker" : downprotoseq.getFullName()
+		} )
+
+   return GSWrapper(name="WrappedDownMuonProtoPSeqFor"+name,    #TODO: Why do we need a GSWrapper?
+                    sequencer=downprotoseq,
+                    output='Rec/ProtoP/' + name +'_ProtoPMaker/ProtoParticles',
+                    requiredSelections = [ downstreamSeq])
+   #     return Selection(name+"_SelPParts", Algorithm = DownMuonPParts, OutputBranch="Rec/ProtoP", Extension="ProtoParticles",RequiredSelections=[downstreamSeq], InputDataSetter=None)
+
+def makeMyMuons(name, protoParticlesMaker):
+   """
+     Make Particles out of the DOWN muon ProtoParticles
+   """
+   particleMaker =  BestPIDParticleMaker(name+"ParticleMaker" , Particle = "muon")
+   particleMaker.addTool(ProtoParticleMUONFilter,name="muon")
+   particleMaker.muon.Selection = ["RequiresDet='MUON' IsMuonLoose=True"]
+   particleMaker.Particles = [ "muon" ]
+   particleMaker.Input = "Rec/ProtoP/"+name+"_ProtoPMaker/ProtoParticles"
+   #particleMaker.OutputLevel = 0
+
+   DataOnDemandSvc().AlgMap.update( {
+           "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(),
+           "/Event/Phys/" + particleMaker.name() + '/Vertices'  : particleMaker.getFullName()
+   } )
+
+   return Selection(name+"SelDownMuonParts", Algorithm = particleMaker, RequiredSelections = [protoParticlesMaker], InputDataSetter=None)
+#
+
+#########################################################################################
+
+def makeResonanceMuMuTrackEff( name, resonanceName, decayDescriptor, minusCharge, plusCharge , mode , MassPreComb , MassPostComb, combCut, motherCut ):
+
+   #self.makeMyMuons("DownMuonsForTrackEff", "Downstream")
+   DownMuonResonance = CombineParticles()
+   DownMuonResonance.configurable('_'+name)
+   DownMuonResonance.DecayDescriptor = decayDescriptor
+   DownMuonResonance.OutputLevel = 4
+
+   if(mode == 1):
+       #DownMuonResonance.DaughtersCuts = {"mu+": tagCut,
+       #                                   "mu-": probeCut}
+       DownMuonResonance.CombinationCut = "(ADAMASS('%(resonanceName)s') < %(MassPreComb)s * MeV) & %(combCut)s" % locals()# (AMAXDOCA('') < %(Doca)s*mm) )" % locals()
+       DownMuonResonance.MotherCut = "(ADMASS('%(resonanceName)s') < %(MassPostComb)s * MeV) & %(motherCut)s" % locals()
+       return Selection( name, Algorithm = DownMuonResonance, RequiredSelections = [minusCharge, plusCharge] )
+
+   if(mode == 2):
+       #DownMuonResonance.DaughtersCuts = {"mu-": tagCut  % locals(),
+       #                                   "mu+": probeCut  % locals() }
+       DownMuonResonance.CombinationCut = "(ADAMASS('%(resonanceName)s') < %(MassPreComb)s * MeV) & %(combCut)s" % locals()# (AMAXDOCA('') < %(Doca)s*mm) )" % locals()
+       DownMuonResonance.MotherCut = "(ADMASS('%(resonanceName)s') < %(MassPostComb)s * MeV) & %(motherCut)s" % locals()
+       return Selection( name, Algorithm = DownMuonResonance, RequiredSelections = [plusCharge, minusCharge] )
+
+#########################################################################################
+def DownJPsi( name, #TODO unify it, big time
+		protoPartSel,
+		TrChi2,
+		MuTMom,
+		MuMom,
+		MassPreComb,
+		Doca,
+		MassPostComb,
+		VertChi2 ) :
+   #self.makeMyMuons("DownMuonsForTrackEff", "Downstream")
+
+   _MuCuts =  "((TRCHI2DOF < %(TrChi2)s) & (PT > %(MuTMom)s*GeV) & (P > %(MuMom)s*GeV) )" % locals()
+   _CombinationCuts = "((ADAMASS('J/psi(1S)') < %(MassPreComb)s * MeV) & (AMAXDOCA('') < %(Doca)s*mm) )" % locals()
+   _MotherCuts = "((ADMASS('J/psi(1S)') < %(MassPostComb)s * MeV) & (VFASPF(VCHI2/VDOF) < %(VertChi2)s))" % locals()
+
+   _MyDownJpsis = CombineParticles( DecayDescriptor = "J/psi(1S) -> mu+ mu-" ,
+   DaughtersCuts = { "mu+": _MuCuts,  "mu-": _MuCuts }, CombinationCut = _CombinationCuts, MotherCut = _MotherCuts)
+
+   return Selection ( name,
+                      Algorithm = _MyDownJpsis,
+                      RequiredSelections = [protoPartSel])
+
+
+#########################################################################################
+
+def DownZ( name,
+		protoPartSel,
+		MuMom,
+		MuTMom,
+		MuMinEta,
+		MuMaxEta,
+		MassPreComb,
+		MassPostComb) :
+   #self.makeMyMuons("DownMuonsForTrackEff", "Downstream")
+
+   _MuCuts =  "((ETA < %(MuMaxEta)s*MeV) & (ETA > %(MuMinEta)s*MeV) & (P > %(MuMom)s*GeV) & (PT > %(MuTMom)s*GeV) )" % locals()
+   _CombinationCuts = "((ADAMASS('Z0') < %(MassPreComb)s * MeV))" % locals()
+   _MotherCuts = "((ADMASS('Z0') < %(MassPostComb)s * MeV))" % locals()
+
+   _MyDownZ = CombineParticles( DecayDescriptor = "Z0 -> mu+ mu-" ,
+   DaughtersCuts = { "mu+": _MuCuts,  "mu-": _MuCuts }, CombinationCut = _CombinationCuts, MotherCut = _MotherCuts)
+
+   return Selection ( name,
+                      Algorithm = _MyDownZ,
+                      RequiredSelections = [protoPartSel])
+
+#########################################################################################
+def DownUpsilon( name,
+		protoPartSel,
+		MuMom,
+		MuTMom,
+		MassPreComb,
+		MassPostComb) :
+   #self.makeMyMuons("DownMuonsForTrackEff", "Downstream")
+
+   _MuCuts =  "( (P > %(MuMom)s*MeV) & (PT > %(MuTMom)s*MeV) )" % locals()
+   _CombinationCuts = "((ADAMASS('Z0') < %(MassPreComb)s * MeV))" % locals()
+   _MotherCuts = "((ADMASS('Upsilon(1S)') < %(MassPostComb)s * MeV))" % locals()
+
+   _MyDownZ = CombineParticles( DecayDescriptor = "Upsilon(1S) -> mu+ mu-" , #TODO
+   DaughtersCuts = { "mu+": _MuCuts,  "mu-": _MuCuts }, CombinationCut = _CombinationCuts, MotherCut = _MotherCuts)
+
+   return Selection ( name,
+                      Algorithm = _MyDownZ,
+                      RequiredSelections = [protoPartSel])
+
+# ##########################
+# high quality muons
+# ##########################
+def longtrackFilter(name, partSource, tagCut):
+    """
+        Select plus or minus charge for longtrack
+    """
+    Filter = FilterDesktop() #there is maybe a change needed
+    myFilter1 = Filter.configurable("mylongFilter1")
+    myFilter1.Code = tagCut
+
+    return Selection( name+'_longFilter'+'LongMu', Algorithm = myFilter1, RequiredSelections = [  partSource ] )
+
+# ########################################################################################
+# Charge filter, that filters, well, the charge and takes the particles from the right source (long or DownMuon)
+# Applies tag and probe cuts
+# ########################################################################################
+def chargeFilterProbe(name, partSource, charge, probeCut):
+    """
+    Select plus or minus charge for DownMuon or long track
+    """
+    Filter = FilterDesktop() #there is maybe a change needed
+    myFilter1 = Filter.configurable(name+"myFilter1")
+    if(charge == -1):
+        myFilter1.Code = "(Q < 0) & "
+    if(charge == 1):
+        myFilter1.Code = "(Q > 0) & "
+
+    myFilter1.Code += probeCut #Tried to add this cut into DownMuonParts, however, zero speed gain
+
+    return Selection( name+'_chargeFilter'+'DownMuon', Algorithm = myFilter1, RequiredSelections = [  partSource ] )
+# ########################################################################################
+def chargeFilterTag(name, partSource, charge, tagCut):  #TagCut not used anymore, kept here in case
+
+    """
+    Select plus or minus charge for DownMuon or long track
+    """
+    Filter = FilterDesktop() #there is maybe a change needed
+    myFilter2 = Filter.configurable(name+"myFilter2")
+    if(charge == -1):
+        myFilter2.Code = "(Q < 0)"
+    if(charge == 1):
+        myFilter2.Code = "(Q > 0)"
+
+    return Selection( name+'_chargeFilter'+'LongMu', Algorithm = myFilter2, RequiredSelections = [  partSource ] )
+# ################################################################
+
+#"""
+#Define TisTos Prefilters
+##"""
+
+# ########################################################################################
+# HLT 1 lines we run on
+# ########################################################################################
+def selHlt1Jpsi(name, HLT1TisTosSpecs, HLT1PassOnAll):
+   """
+   Filter the long track muon to be TOS on a HLT1 single muon trigger,
+   for J/psi selection
+   """
+   Hlt1Jpsi = TisTosParticleTagger()
+   Hlt1Jpsi.TisTosSpecs = HLT1TisTosSpecs
+   Hlt1Jpsi.ProjectTracksToCalo = False
+   Hlt1Jpsi.CaloClustForCharged = False
+   Hlt1Jpsi.CaloClustForNeutral = False
+   Hlt1Jpsi.TOSFrac = { 4:0.0, 5:0.0 }
+   Hlt1Jpsi.NoRegex = True
+   Hlt1Jpsi.PassOnAll = HLT1PassOnAll
+
+   return Selection(name+"_SelHlt1Jpsi", Algorithm = Hlt1Jpsi, RequiredSelections = [ StdAllLooseMuons ])
+# ########################################################################################
+# HLT 2 lines we run on
+# ########################################################################################
+def selHlt2Jpsi(name, hlt1Filter, HLT2TisTosSpecs, HLT2PassOnAll):
+   """
+   Filter the long track muon to be TOS on a HLT2 single muon trigger,
+   for J/psi selection
+   """
+   Hlt2Jpsi = TisTosParticleTagger()
+   Hlt2Jpsi.TisTosSpecs =HLT2TisTosSpecs
+   Hlt2Jpsi.ProjectTracksToCalo = False
+   Hlt2Jpsi.CaloClustForCharged = False
+   Hlt2Jpsi.CaloClustForNeutral = False
+   Hlt2Jpsi.TOSFrac = { 4:0.0, 5:0.0 }
+   Hlt2Jpsi.NoRegex = False
+   Hlt2Jpsi.PassOnAll = HLT2PassOnAll
+
+   return Selection(name+"_SelHlt2Jpsi", Algorithm = Hlt2Jpsi, RequiredSelections = [ hlt1Filter ])
+##########################################################
+
+
+def trackingDownPreFilter(name, prefilter, seedcut):
+    #Test code for debugging
+    #Jpsi_already_there = LoKi__VoidFilter("Jpsi_already_there")
+    #Jpsi_already_there.Code = "1 <= CONTAINS('Rec/Track/Downstream')"
+
+    #Jpsi_not_yet_there = LoKi__VoidFilter("Jpsi_not_yet_there")
+    #Jpsi_not_yet_there.Code = "1 > CONTAINS('Rec/Track/Downstream')"
+
+    TrackToDST(name+"_DownTrackToDST").TracksInContainer = "Rec/"+name+"_Downstream/FittedTracks"
+
+    jpsidotracking=GaudiSequencer("DownTrackingFor" + name)
+
+    #Add seed tracking
+    DownSeeding = PatSeeding(name+"_DownSeeding")
+    DownSeeding.OutputTracksName = "Rec/"+name+"_DownSeeding/Tracks"
+    PatAlgConf.SeedingConf().configureAlg( SeedAlg = DownSeeding )
+    #DownSeeding.addTool(PatSeedingTool, name=name+"_PatSeedingTool")
+    #DownSeeding.addTool(PatSeedingTool)
+    #PatSeedingTool(name+"_PatSeedingTool").MinMomentum = seedcut
+    seedtoolname = name+"_PatSeedingTool"
+    DownSeeding.addTool(PatSeedingTool, name=seedtoolname)
+    seedtool = getattr(DownSeeding, seedtoolname)
+    seedtool.MinMomentum = seedcut
+
+    jpsidotracking.Members += [DownSeeding]
+    #Add Seed Fit
+    jpsidotracking.Members += [GaudiSequencer(name+"_TrackSeedFitSeq")]
+    #AddPatLongLivedTracking
+    downstreamTracking = PatLongLivedTracking(name+"_PatLongLivedTracking")
+    downstreamTracking.InputLocation = DownSeeding.OutputTracksName
+    downstreamTracking.OutputLocation = 'Rec/'+name+'_Downstream/Tracks'
+    jpsidotracking.Members += [ downstreamTracking ];
+    #AddDownstreamFitSeq
+    DownInitAlg = TrackStateInitAlg(name+"_InitSeedDownstream")
+    jpsidotracking.Members += [DownInitAlg]
+    DownInitAlg.TrackLocation = "Rec/"+name+"_Downstream/Tracks"
+    downstreamFit = ConfiguredFitDownstream(name+"_FitDownstream")
+    downstreamFit.TracksInContainer = 'Rec/'+name+'_Downstream/Tracks'
+    downstreamFit.TracksOutContainer = 'Rec/'+name+'_Downstream/FittedTracks'
+    jpsidotracking.Members += [downstreamFit]
+    jpsidotracking.Members += [TrackToDST(name+"_DownTrackToDST")]
+
+    return GSWrapper(name="WrappedDownstreamTracking"+name,
+                     sequencer=jpsidotracking,
+                     output='Rec/'+name+'_Downstream/FittedTracks',
+                     requiredSelections = [ prefilter])
+
+
+
+class GSWrapper(UniquelyNamedObject,
+                ClonableObject,
+                SelectionBase) :
+
+    def __init__(self, name, sequencer, output, requiredSelections) :
+        UniquelyNamedObject.__init__(self, name)
+        ClonableObject.__init__(self, locals())
+        SelectionBase.__init__(self,
+                               algorithm = sequencer,
+                               outputLocation = output,
+                               requiredSelections = requiredSelections )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffMuonTT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffMuonTT.py
new file mode 100644
index 000000000..4f18c2014
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffMuonTT.py
@@ -0,0 +1,897 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+###'''
+###Module for construction of Jpsi -> mu mu /  Upsilon -> mu mu /  Z -> mu mu / B -> J/psi K to be used to measure tracking efficiency.
+###Provides functions to build a Jpsi / Upsilon / Z / B selection , with a long track and a muonTT track.
+###Provides class StrippingTrackEffMuonTTConf, which constructs the Selections and
+###StrippingLines given a configuration dictionary.
+###Original autor: Michel De Cian
+###Exported symbols (use python help!):
+###           - StrippingTrackEffMuonTTConf
+###           - selFilterLongParts
+###           - selMakeMuonTT
+###           - selMuonTTPParts
+###           - selMuonTTParts
+###           - selHlt1Jpsi
+###           - selHlt1Upsilon
+###           - selHlt1Z
+###           - selHlt2Jpsi
+###           - selHlt2Upsilon
+###           - selHlt2Z
+###           - selHlt2BJpsiKMu
+###           - selHlt2BJpsiKK
+###           - chargeFilter
+###           - makeResonanceMuMuTrackEff
+###           - makeBJpsiKTrackEff
+###           - filterHLT2ForBJpsiK
+###
+###'''
+# @author M. Kolpin
+# @date 2015-Mar-23
+#
+# @author R. Kopecna
+# @date 2019-Jan-25
+#
+__author__ = ['Renata Kopecna']
+__date__ = '15/04/2019'
+__version__ = '$Revision: 2.0 $'
+
+
+__all__ = ('StrippingTrackEffMuonTTConf',
+           'default_config',
+           'selFilterLongParts',
+           'selMakeMuonTT',
+           'selMuonTTPParts',
+           'selMuonTTParts',
+           'selHlt1Jpsi',
+           'selHlt1Upsilon',
+           'selHlt1Z',
+           'selHlt2Jpsi',
+           'selHlt2Upsilon',
+           'selHlt2Z',
+           'selHlt2BJpsiKMu',
+           'selHlt2BJpsiKK',
+           'chargeFilterProbe',
+           'chargeFilterTag',
+           'makeResonanceMuMuTrackEff',
+           'makeBJpsiKTrackEff',
+           'filterHLT2ForBJpsiK')
+
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import Selection, DataOnDemand, ChargedProtoParticleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StrippingUtils.Utils import LineBuilder, checkConfig
+from StandardParticles import StdLooseKaons, StdLooseMuons, StdAllLooseMuons
+
+
+from Configurables import (MuonCombRec,
+                           MuonTTTrack,
+			   MuonHitDecode,
+                           PatAddTTCoord,
+                           TrackMasterFitter,
+                           TrackMasterExtrapolator,
+                           TrackSelector,
+                           NoPIDsParticleMaker,
+                           TisTosParticleTagger
+                           )
+
+
+#default_name = 'TrackEffMuonTT'
+
+default_config = {
+    'NAME'        : 'TrackEffMuonTT',
+    'WGs'         : ['Calib'],
+    'BUILDERTYPE' : 'StrippingTrackEffMuonTTConf',
+    'CONFIG'      : {
+            #Mother paramteres
+			'JpsiMassWin'   	    : 500., #MeV
+			'JpsiPt'                    : 1., 	#GeV
+			'JpsiMinIP'                 : 0.8, 	#mm
+			'JpsiVertexChi2'            : 2.0,  	#adimensional
+			'JpsiLowMultMassWin'   	    : 500., 	#MeV
+			'JpsiLowMultPt'             : 0., 	#GeV, dummy
+			'UpsilonMassWin'            : 1500, 	#MeV
+			'UpsilonVertexChi2'         : 5., 	#adimensional
+			'ZMassWin'                  : 40000,	#MeV
+			'ZPt'                       : 0., 	#GeV
+			'ZVertexChi2'               : 5., 	#adimensional
+			'BMassWin'                  : 500,	#MeV
+			'BJpsiVertexChi2'           : 5,	#mm, #TODO ask about this value
+            #Probe paramteres
+			'JpsiProbePt'               : 0.5, 	#GeV
+			'JpsiProbeP'                : 5.0, 	#GeV
+			'JpsiLowMultProbePt'        : 0.5, 	#GeV
+			'UpsilonProbePt'            : 0.5, 	#GeV
+			'ZProbePt'                  : 0.5, 	#GeV
+            #Tag parameters
+			'JpsiTagPt'                 : 1.3, 	#GeV
+			'JpsiTagP'                  : 10.,	#GeV
+			'JpsiTagPID'                : -2.,	#adimensional
+			'JpsiTagTrackChi2'          : 5., 	#adimensional
+			'JpsiLowMultTagPt'          : 0.5, 	#GeV
+			'JpsiLowMultTagP'           : 0., 	#GeV, dummy
+			'JpsiLowMultTagTrackChi2'   : 5., 	#adimensional #TODO: defualt long track chi2/ndof cut in Run I is 3
+			'UpsilonTagPt'              : 1., 	#GeV
+			'UpsilonTagPID'             : 2.,	#adimensional
+			'ZTagPt'                    : 10., 	#GeV
+			'ZTagPID'                   : 2.,	#adimensional
+            #Hlt
+            		'JpsiHlt1Filter'              : 'Hlt1.*Decision',
+		        'JpsiHlt2Filter'       	      : 'Hlt2.*Decision',
+			'JpsiHlt1Triggers'            :  { "Hlt1TrackMuonDecision%TOS" : 0},
+			'JpsiHlt2Triggers'            :  { "Hlt2SingleMuon.*Decision%TOS" : 0, "Hlt2TrackEffDiMuonMuonTT.*Decision%TOS" : 0},
+		        'Hlt1PassOnAll'               : True,
+	        	'JpsiLowMultHlt1Filter'       : 'Hlt1.*Decision',
+		        'JpsiLowMultHlt1Triggers'     : {"Hlt1LowMultMuonDecision%TOS" : 0},
+		        'JpsiLowMultHlt2Triggers'     : {"Hlt2LowMultMuonDecision%TOS" : 0},
+		        'JpsiLowMultHlt2Filter'       : 'Hlt2.*Decision',
+		        'Hlt2PassOnAllLowMult'        : False,
+			'UpsilonHlt1Triggers'         :  { "Hlt1SingleMuonHighPTDecision%TOS" : 0},
+			'UpsilonHlt2Triggers'         :  { "Hlt2SingleMuonLowPTDecision%TOS" : 0},
+			'ZHlt1Triggers'               :  { "Hlt1SingleMuonHighPTDecision%TOS" : 0},
+			'ZHlt2Triggers'               :  { "Hlt2EWSingleMuonVHighPtDecision%TOS" : 0},
+			'BJpsiKHlt2TriggersTUS'       :  { "Hlt2TopoMu2BodyDecision%TUS" : 0}, #TUS is not a typo!
+			'BJpsiKHlt2TriggersTOS'       :  { "Hlt2TopoMu2BodyDecision%TOS" : 0},
+            #Prescale
+			'JpsiPrescale'                : 1.,
+			'JpsiLowMultPrescale'         : 1.,
+			'UpsilonPrescale'             : 1.,
+			'ZPrescale'                   : 1.,
+			'BJpsiKPrescale'              : 1.,
+			'Postscale'                   : 1.
+                    },
+    'STREAMS'     : { 'Dimuon' : [ 'StrippingTrackEffMuonTT_JpsiLine1'
+                                  ,'StrippingTrackEffMuonTT_JpsiLine2'
+				  ,'StrippingTrackEffMuonTT_JpsiLowMultLine1'
+				  ,'StrippingTrackEffMuonTT_JpsiLowMultLine2'
+                                  ,'StrippingTrackEffMuonTT_UpsilonLine1'
+                                  ,'StrippingTrackEffMuonTT_UpsilonLine2'
+                                  ,'StrippingTrackEffMuonTT_ZLine1'
+                                  ,'StrippingTrackEffMuonTT_ZLine2'
+                                  ,'StrippingTrackEffMuonTT_BJpsiKLine1'
+                                  ,'StrippingTrackEffMuonTT_BJpsiKLine2']
+                     }
+    }
+
+
+class StrippingTrackEffMuonTTConf(LineBuilder) :
+    """
+    Builder of Jpsi->mu mu, Upsilon-> mu mu, Z-> mu mu and B -> J/psi K stripping Selection and StrippingLine for measuring the tracking efficiency.
+    Constructs the Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> TrackEffMuonTTConfig = { .... }
+    >>> from StrippingSelections import StrippingTrackEffMuonTT
+    >>> confTrackEffMuonTT = StrippingTrackEffMuonTT.StrippingTrackEffMuonTTConf(name = "bla", config = TrackEffMuonTTConfig)
+    >>> stream.appendLines( confTrackEffMuonTT.lines() )
+    And:
+    >>> trackEffLines = confTrackEffMuonTT.lines()
+    >>> for line in trackEffLines :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Lines of interest:
+
+    TrackEffMuonTT_JpsiLine1       : Jpsi-> mu mu, long: minus, muonTT: plus
+    TrackEffMuonTT_JpsiLine2       : Jpsi-> mu mu, long: plus, muonTT: minus
+    TrackEffMuonTT_JpsiLowMultLine1: Jpsi-> mu mu, long: minus, muonTT: plus
+    TrackEffMuonTT_JpsiLowMultLine2: Jpsi-> mu mu, long: plus, muonTT: minus
+    TrackEffMuonTT_UpsilonLine1    : Upsilon-> mu mu, long: minus, muonTT: plus
+    TrackEffMuonTT_UpsilonLine2    : Upsilon-> mu mu, long: plus, muonTT: minus
+
+    TrackEffMuonTT_ZLine1          : Z-> mu mu, long: minus, muonTT: plus
+    TrackEffMuonTT_ZLine2          : Z-> mu mu, long: plus, muonTT: minus
+
+    TrackEffMuonTT_BJpsiKLine1     : B->Jpsi K, long: minus, muon: plus
+    TrackEffMuonTT_BJpsiKLine2     : B->Jpsi K, long: plus, muon: minus
+
+    lines                          : List of all lines
+
+    Exports as class data member:
+    StrippingTrackEffMuonTTConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config = None):
+
+        LineBuilder.__init__(self, name, config)
+
+
+        # ########################################################################################
+        # -->
+        # --> INITIALIZING ALL THE OBJECTS NEEDED TO FORM THE LINES <--
+        # -->
+        # ########################################################################################
+
+        # initialize all the general things
+        # idea: initialize the first object, that will be called, pass it to the second one, etc.
+
+        # ##########################################
+        # Please keep p and pT in [GeV], rest in [MeV]
+        tagCut =    "(TRCHI2DOF < %(JpsiTagTrackChi2)s) & (PT > %(JpsiTagPt)s*GeV) & (P > %(JpsiTagP)s*GeV) & (PIDmu >%(JpsiTagPID)s )" % config
+        probeCut =  "(PT > %(JpsiProbePt)s*GeV) & (P > %(JpsiProbeP)s*GeV)" % config
+        JpsiCut =   "(VFASPF(VCHI2/VDOF) < %(JpsiVertexChi2)s) & (MIPDV(PRIMARY) < %(JpsiMinIP)s) & (PT > %(JpsiPt)s*GeV)" % config
+
+        LowMultTagCut =    "(TRCHI2DOF < %(JpsiLowMultTagTrackChi2)s) & (PT > %(JpsiLowMultTagPt)s*GeV) & (P > %(JpsiLowMultTagP)s*GeV) " % config
+        LowMultProbeCut =  "(PT > %(JpsiLowMultProbePt)s*GeV)" % config
+        LowMultJpsiCut =   " (PT > %(JpsiLowMultPt)s*GeV)" % config #TODO inverse cut in case of a non-zero PT cut
+
+        ZTagCut =   "(PT >%(ZTagPt)s*GeV )& (PIDmu >%(ZTagPID)s )"  % config
+        ZProbeCut = "(PT > %(ZProbePt)s*GeV)" % config
+        ZCut =      "(VFASPF(VCHI2/VDOF) < %(ZVertexChi2)s) &  (PT > %(ZPt)s*GeV)" % config
+
+        UpsilonTagCut =   "(PT >%(UpsilonTagPt)s*GeV )& (PIDmu >%(UpsilonTagPID)s )" % config
+        UpsilonProbeCut = "(PT > %(UpsilonProbePt)s*GeV)" % config
+        UpsilonCut =      "(VFASPF(VCHI2/VDOF) < %(UpsilonVertexChi2)s)" % config
+
+        Kcut =      "(P > 1000) & (PT > 800) & (PIDK > 0) & (TRCHI2DOF < 5.0) & (MIPDV(PRIMARY) > 0.1*mm)" #TODO
+        BJpsiKCut = "(VFASPF(VCHI2/VDOF) < %(BJpsiVertexChi2)s) & (PT > %(JpsiPt)s*GeV)" % config
+
+        # ##########################################
+        # make the muonTT tracks (two instances, as the Z has a different seed station for the muon system than the rest)
+        self.SelMakeMuonTTJpsi = 	selMakeMuonTT(name+'Jpsi', XTolParam = 25.0, MaxChi2TolParam = 7.0, MinAxProjParam = 5.5, MajAxProjParam = 25.0, seedStation = 2)
+	self.SelMakeMuonTTJpsiLowMult = selMakeMuonTT(name+'JpsiLowMult', XTolParam = 25.0, MaxChi2TolParam = 7.0, MinAxProjParam = 5.5, MajAxProjParam = 25.0, seedStation = 2)
+        self.SelMakeMuonTTZ = 		selMakeMuonTT(name+'Z', XTolParam = 25.0, MaxChi2TolParam = 7.0, MinAxProjParam = 5.5, MajAxProjParam = 25.0, seedStation = 4)
+
+        self.SelMuonTTPPartsJpsi = 	  selMuonTTPParts(name+'Jpsi',        muonTTTrackMaker = self.SelMakeMuonTTJpsi )
+	self.SelMuonTTPPartsJpsiLowMult = selMuonTTPParts(name+'JpsiLowMult', muonTTTrackMaker = self.SelMakeMuonTTJpsiLowMult ) ## CHECKME
+        self.SelMuonTTPPartsZ = 	  selMuonTTPParts(name+'Z',           muonTTTrackMaker = self.SelMakeMuonTTZ )
+
+        self.SelMuonTTPartsJpsi = 	 selMuonTTParts(name+'Jpsi',        protoParticlesMaker = self.SelMuonTTPPartsJpsi )
+	self.SelMuonTTPartsJpsiLowMult = selMuonTTParts(name+'JpsiLowMult', protoParticlesMaker = self.SelMuonTTPPartsJpsiLowMult ) ## CHECKME 
+        self.SelMuonTTPartsZ = 		 selMuonTTParts(name+'Z',           protoParticlesMaker = self.SelMuonTTPPartsZ )
+
+        self.SelFilterLongPartsMuJpsi = 	selFilterLongParts(name = name+'Jpsi',       filterName = 'MuJpsi',    tagCut = tagCut,       selection = [StdLooseMuons],    muon = True )
+        self.SelFilterLongPartsMuJpsiLowMult = 	selFilterLongParts(name = name+'JpsiLowMult',filterName = 'MuLowMult', tagCut = LowMultTagCut,selection = [StdAllLooseMuons], muon = True )
+        self.SelFilterLongPartsMuUpsilonZ  = 	selFilterLongParts(name = name+'UpsilonZ',   filterName = 'MuUpsilonZ',tagCut = ZTagCut,      selection = [StdAllLooseMuons], muon = True )
+
+
+        # ##########################################
+
+        # ####################################
+        # J/psis
+        self.SelHlt1JpsiMinus = selHlt1Jpsi(name+'JpsiMinus', longPartsFilter = self.SelFilterLongPartsMuJpsi, triggers = config['JpsiHlt1Triggers'], passonall = config['Hlt1PassOnAll'])
+        self.SelHlt1JpsiPlus =  selHlt1Jpsi(name+'JpsiPlus',  longPartsFilter = self.SelFilterLongPartsMuJpsi, triggers = config['JpsiHlt1Triggers'], passonall = config['Hlt1PassOnAll'])
+        self.SelHlt2JpsiMinus = selHlt2Jpsi(name+'JpsiMinus', hlt1Filter = self.SelHlt1JpsiMinus, triggers = config['JpsiHlt2Triggers'])
+        self.SelHlt2JpsiPlus =  selHlt2Jpsi(name+'JpsiPlus',  hlt1Filter = self.SelHlt1JpsiPlus,  triggers = config['JpsiHlt2Triggers'])
+
+        self.muonTTMinusJpsi = chargeFilterProbe(name+'MuonTTJpsiMinus', partSource = self.SelMuonTTPartsJpsi, charge = -1, probeCut = probeCut)
+        self.muonTTPlusJpsi =  chargeFilterProbe(name+'MuonTTJpsiPlus',  partSource = self.SelMuonTTPartsJpsi, charge = 1,  probeCut = probeCut)
+        self.longMinusJpsi =   chargeFilterTag	(name+'LongJpsiMinus', 	 partSource = self.SelHlt2JpsiMinus,   charge = -1, tagCut = tagCut)
+        self.longPlusJpsi =    chargeFilterTag	(name+'LongJpsiPlus',  	 partSource = self.SelHlt2JpsiPlus,    charge = 1,  tagCut = tagCut)
+	# ####################################
+        # J/psis low multiplicity
+        self.SelHlt1JpsiLowMultMinus = selHlt1Jpsi(name+'JpsiLowMultMinus', longPartsFilter = self.SelFilterLongPartsMuJpsiLowMult, triggers = config['JpsiLowMultHlt1Triggers'], passonall = config['Hlt1PassOnAll'])
+        self.SelHlt1JpsiLowMultPlus =  selHlt1Jpsi(name+'JpsiLowMultPlus',  longPartsFilter = self.SelFilterLongPartsMuJpsiLowMult, triggers = config['JpsiLowMultHlt1Triggers'], passonall = config['Hlt1PassOnAll'])
+        self.SelHlt2JpsiLowMultMinus = selHlt2Jpsi(name+'JpsiLowMultMinus', hlt1Filter = self.SelHlt1JpsiLowMultMinus, triggers = config['JpsiLowMultHlt2Triggers'],passonall = config["Hlt2PassOnAllLowMult"])
+        self.SelHlt2JpsiLowMultPlus =  selHlt2Jpsi(name+'JpsiLowMultPlus',  hlt1Filter = self.SelHlt1JpsiLowMultPlus,  triggers = config['JpsiLowMultHlt2Triggers'],passonall = config["Hlt2PassOnAllLowMult"])
+
+        self.muonTTMinusJpsiLowMult = chargeFilterProbe	(name+'MuonTTJpsiLowMultMinus', partSource = self.SelMuonTTPartsJpsiLowMult, charge = -1, probeCut = LowMultProbeCut)
+        self.muonTTPlusJpsiLowMult =  chargeFilterProbe	(name+'MuonTTJpsiLowMultPlus',  partSource = self.SelMuonTTPartsJpsiLowMult, charge = 1,  probeCut = LowMultProbeCut)
+        self.longMinusJpsiLowMult =   chargeFilterTag	(name+'LongJpsiLowMultMinus',   partSource = self.SelHlt2JpsiLowMultMinus,   charge = -1, tagCut = LowMultTagCut)
+        self.longPlusJpsiLowMult =    chargeFilterTag	(name+'LongJpsiLowMultPlus',	partSource = self.SelHlt2JpsiLowMultPlus,    charge = 1,  tagCut = LowMultTagCut)
+        # ##########################################
+        # Upsilons
+        self.SelHlt1UpsilonMinus = selHlt1Upsilon(name+'UpsilonMinus', longPartsFilter = self.SelFilterLongPartsMuUpsilonZ, triggers = config['UpsilonHlt1Triggers'])
+        self.SelHlt1UpsilonPlus =  selHlt1Upsilon(name+'UpsilonPlus',  longPartsFilter = self.SelFilterLongPartsMuUpsilonZ, triggers = config['UpsilonHlt1Triggers'])
+        self.SelHlt2UpsilonMinus = selHlt2Upsilon(name+'UpsilonMinus', hlt1Filter = self.SelHlt1UpsilonMinus, triggers = config['UpsilonHlt2Triggers'])
+        self.SelHlt2UpsilonPlus =  selHlt2Upsilon(name+'UpsilonPlus',  hlt1Filter = self.SelHlt1UpsilonPlus,  triggers = config['UpsilonHlt2Triggers'])
+
+        self.muonTTPlusUpsilon =  chargeFilterProbe (name+'MuonTTUpsilonPlus',  partSource = self.SelMuonTTPartsJpsi,  charge = 1,  probeCut = UpsilonProbeCut)
+        self.muonTTMinusUpsilon = chargeFilterProbe (name+'MuonTTUpsilonMinus', partSource = self.SelMuonTTPartsJpsi,  charge = -1, probeCut = UpsilonProbeCut)
+        self.longPlusUpsilon =    chargeFilterTag   (name+'LongUpsilonPlus',	partSource = self.SelHlt2UpsilonPlus,  charge = 1,  tagCut = UpsilonTagCut)
+        self.longMinusUpsilon =   chargeFilterTag   (name+'LongUpsilonMinus',	partSource = self.SelHlt2UpsilonMinus, charge = -1, tagCut = UpsilonTagCut)
+        # ##########################################
+        # Zs
+        self.SelHlt1ZMinus = selHlt1Z(name+'ZMinus', longPartsFilter = self.SelFilterLongPartsMuUpsilonZ, triggers = config['ZHlt1Triggers'])
+        self.SelHlt1ZPlus =  selHlt1Z(name+'ZPlus',  longPartsFilter = self.SelFilterLongPartsMuUpsilonZ, triggers = config['ZHlt1Triggers'])
+        self.SelHlt2ZMinus = selHlt2Z(name+'ZMinus', hlt1Filter = self.SelHlt1ZMinus, triggers = config['ZHlt2Triggers'])
+        self.SelHlt2ZPlus =  selHlt2Z(name+'ZPlus',  hlt1Filter = self.SelHlt1ZPlus,  triggers = config['ZHlt2Triggers'])
+
+        self.muonTTPlusZ =  chargeFilterProbe(name+'MuonTTZPlus',   partSource = self.SelMuonTTPartsZ, charge = 1,  probeCut = ZProbeCut)
+        self.muonTTMinusZ = chargeFilterProbe(name+'MuonTTZMinus',  partSource = self.SelMuonTTPartsZ, charge = -1, probeCut = ZProbeCut)
+        self.longPlusZ =    chargeFilterTag  (name+'LongZPlus',	    partSource = self.SelHlt2ZPlus,    charge = 1,  tagCut = ZTagCut)
+        self.longMinusZ =   chargeFilterTag  (name+'LongZMinus',    partSource = self.SelHlt2ZMinus,   charge = -1, tagCut = ZTagCut)
+        # ##########################################
+
+        # B-> J/psi K
+        # first for the J/psi object
+        self.SelHlt1BJpsiKMinus = selHlt1Jpsi(name+'BJpsiKMinus', longPartsFilter = self.SelFilterLongPartsMuJpsi, triggers = config['JpsiHlt1Triggers'], passonall = config['Hlt1PassOnAll']) # HLT1 is the same as for Jpsis!
+        self.SelHlt1BJpsiKPlus =  selHlt1Jpsi(name+'BJpsiKPlus',  longPartsFilter = self.SelFilterLongPartsMuJpsi, triggers = config['JpsiHlt1Triggers'], passonall = config['Hlt1PassOnAll'])
+        self.SelHlt2BJpsiKMinus = selHlt2BJpsiKMu(name+'BJpsiKMinus', hlt1Filter = self.SelHlt1BJpsiKMinus, triggers = config['BJpsiKHlt2TriggersTUS'])
+        self.SelHlt2BJpsiKPlus =  selHlt2BJpsiKMu(name+'BJpsiKPlus',  hlt1Filter = self.SelHlt1BJpsiKPlus,  triggers = config['BJpsiKHlt2TriggersTUS'])
+
+        # and now for the K (no distinction for charged needed, will be done automatically be the decay descriptor)
+        self.SelFilterLongPartsBJpsiKK = selFilterLongParts(name = name+'BJpsiK',filterName = 'KJpsiK',tagCut = Kcut, selection = [StdLooseKaons], muon = False )
+        self.SelHlt2BJpsiKK = selHlt2BJpsiKK( name+'BJpsiK',longPartsFilter = self.SelFilterLongPartsBJpsiKK, triggers = config['BJpsiKHlt2TriggersTUS'])
+
+        self.muonTTPlusBJpsiK =  chargeFilterProbe(name+'MuonTTBJpsiKPlus',  partSource = self.SelMuonTTPartsJpsi, charge = 1,  probeCut = probeCut)
+        self.muonTTMinusBJpsiK = chargeFilterProbe(name+'MuonTTBJpsiKMinus', partSource = self.SelMuonTTPartsJpsi, charge = -1, probeCut = probeCut)
+        self.longPlusBJpsiK =    chargeFilterTag  (name+'LongBJpsiKPlus',    partSource = self.SelHlt2BJpsiKPlus,  charge = 1,  tagCut = tagCut)
+        self.longMinusBJpsiK =   chargeFilterTag  (name+'LongBJpsiKMinus',   partSource = self.SelHlt2BJpsiKMinus, charge = -1, tagCut = tagCut)
+
+        # J/psi -> mu mu, tag-and-probe
+        self.makeJpsiMuMuTrackEff1 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuTrackEff1',
+                                                               resonanceName = 'J/psi(1S)',
+                                                               decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                               plusCharge = self.muonTTPlusJpsi,
+                                                               minusCharge = self.longMinusJpsi,
+                                                               mode = 1,
+                                                               massWin = config['JpsiMassWin'],
+                                                               resonanceCut = JpsiCut)
+        # J/psi -> mu mu, probe-and-tag
+        self.makeJpsiMuMuTrackEff2 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuTrackEff2',
+                                                               resonanceName = 'J/psi(1S)',
+                                                               decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                               minusCharge = self.muonTTMinusJpsi,
+                                                               plusCharge = self.longPlusJpsi,
+                                                               mode = 2,
+                                                               massWin = config['JpsiMassWin'],
+                                                               resonanceCut = JpsiCut)
+        # ##################################################################################################################  # J/psi -> mu mu, low mult, tag-and-probe
+        self.makeJpsiMuMuLowMultTrackEff1 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuLowMultTrackEff1',
+                                                                      resonanceName = 'J/psi(1S)',
+                                                                      decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                                      plusCharge = self.muonTTPlusJpsiLowMult,
+                                                                      minusCharge = self.longMinusJpsiLowMult,
+                                                                      mode = 1,
+                                                                      massWin = config['JpsiMassWin'],
+                                                                      resonanceCut = LowMultJpsiCut) ## CHECKME
+        # J/psi -> mu mu, low mult probe-and-tag
+        self.makeJpsiMuMuLowMultTrackEff2 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuLowMultTrackEff2',
+                                                                      resonanceName = 'J/psi(1S)',
+                                                                      decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                                      minusCharge = self.muonTTMinusJpsiLowMult,
+                                                                      plusCharge = self.longPlusJpsiLowMult,
+                                                                      mode = 2,
+                                                                      massWin = config['JpsiMassWin'],
+                                                                      resonanceCut = LowMultJpsiCut)
+        # ##################################################################################################################
+        # # Upsilon -> mu mu, tag-and-probe
+        self.makeUpsilonMuMuTrackEff1 = makeResonanceMuMuTrackEff(name+'_MakeUpsilonMuMuTrackEff1',
+                                                                  resonanceName = 'Upsilon(1S)',
+                                                                  decayDescriptor = 'Upsilon(1S) -> mu+ mu-',
+                                                                  plusCharge = self.muonTTPlusUpsilon,
+                                                                  minusCharge = self.longMinusUpsilon,
+                                                                  mode = 1,
+                                                                  massWin = config['UpsilonMassWin'],
+                                                                   resonanceCut = UpsilonCut)
+        # Upsilon -> mu mu, probe-and-tag
+        self.makeUpsilonMuMuTrackEff2 = makeResonanceMuMuTrackEff(name+'_MakeUpsilonMuMuTrackEff2',
+                                                                  resonanceName = 'Upsilon(1S)',
+                                                                  decayDescriptor = 'Upsilon(1S) -> mu+ mu-',
+                                                                  plusCharge = self.longPlusUpsilon,
+                                                                  minusCharge = self.muonTTMinusUpsilon,
+                                                                  mode = 2,
+                                                                  massWin = config['UpsilonMassWin'],
+                                                                  resonanceCut = UpsilonCut)
+        # ##################################################################################################################
+        # Z -> mu mu, tag-and-probe
+        self.makeZMuMuTrackEff1 = makeResonanceMuMuTrackEff(name+'_MakeZMuMuTrackEff1',
+                                                            resonanceName = 'Z0',
+                                                            decayDescriptor = 'Z0 -> mu+ mu-',
+                                                            plusCharge = self.muonTTPlusZ,
+                                                            minusCharge = self.longMinusZ,
+                                                            mode = 1,
+                                                            massWin = config['ZMassWin'],
+                                                            resonanceCut = ZCut)
+        # Z -> mu mu, probe-and-tag
+        self.makeZMuMuTrackEff2 = makeResonanceMuMuTrackEff(name+'_MakeZMuMuTrackEff2',
+                                                            resonanceName = 'Z0',
+                                                            decayDescriptor = 'Z0 -> mu+ mu-',
+                                                            plusCharge = self.longPlusZ,
+                                                            minusCharge = self.muonTTMinusZ,
+                                                            mode = 2,
+                                                            massWin = config['ZMassWin'],
+                                                            resonanceCut = ZCut)
+        # ##################################################################################################################
+        # B -> J/psi K exclusive, tag-and-probe
+        self.makeJpsiMuMuForBJpsiKTrackEff1 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuForBJpsiKTrackEff1',
+                                                                        resonanceName = 'J/psi(1S)',
+                                                                        decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                                        plusCharge = self.muonTTPlusBJpsiK ,
+                                                                        minusCharge = self.longMinusBJpsiK,
+                                                                        mode = 1,
+                                                                        massWin = config['JpsiMassWin'],
+                                                                        resonanceCut = BJpsiKCut)
+        self.makeBJpsiKTrackEff1 = makeBJpsiKTrackEff(name+'_MakeBJpsiKTrackEff1',
+                                                      JpsiSel = self.makeJpsiMuMuForBJpsiKTrackEff1,
+                                                      KSel = self.SelHlt2BJpsiKK,
+                                                      massWin = config['BMassWin'],
+                                                      vertexChi2 = config['BJpsiVertexChi2'])
+        self.BJpsiKHLT2Filter1 = filterHLT2ForBJpsiK( name+'_BJpsiKHLT2Filter1', BJpsiKSel = self.makeBJpsiKTrackEff1, triggers = config['BJpsiKHlt2TriggersTOS']) # Event must be filtered to be sure its TOS on the tag muon and the Kaon
+
+        # B -> J/psi K exclusive, probe-and-tag
+        self.makeJpsiMuMuForBJpsiKTrackEff2 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuForBJpsiKTrackEff2',
+                                                                        resonanceName = 'J/psi(1S)',
+                                                                        decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                                        plusCharge = self.longPlusBJpsiK ,
+                                                                        minusCharge = self.muonTTMinusBJpsiK,
+                                                                        mode = 2,
+                                                                        massWin = config['JpsiMassWin'],
+                                                                        resonanceCut = BJpsiKCut)
+
+        self.makeBJpsiKTrackEff2 = makeBJpsiKTrackEff(name+'_MakeBJpsiKTrackEff2',
+                                                      JpsiSel = self.makeJpsiMuMuForBJpsiKTrackEff2,
+                                                      KSel = self.SelHlt2BJpsiKK,
+                                                      massWin = config['BMassWin'],
+                                                      vertexChi2 = config['BJpsiVertexChi2'])
+
+        self.BJpsiKHLT2Filter2 = filterHLT2ForBJpsiK( name+'_BJpsiKHLT2Filter2', BJpsiKSel = self.makeBJpsiKTrackEff2, triggers = config['BJpsiKHlt2TriggersTOS'])  # Event must be filtered to be sure its TOS on the tag muon and the Kaon
+        # # ##################################################################################################################
+
+
+
+        ################################################
+        # Jpsi -> mu mu stripping lines (long + muonTT)
+        ################################################
+        self.TrackEffMuonTTJpsi_line1 = StrippingLine(name+'_JpsiLine1',
+                                                      prescale = config['JpsiPrescale'],
+                                                      postscale = config['Postscale'],
+                                                      HLT1 = "HLT_PASS_RE('%(JpsiHlt1Filter)s')" % config,
+                                                      HLT2 = "HLT_PASS_RE('%(JpsiHlt2Filter)s')" % config,
+                                                      selection = self.makeJpsiMuMuTrackEff1)
+
+
+        self.TrackEffMuonTTJpsi_line2 = StrippingLine(name+'_JpsiLine2',
+                                                      prescale = config['JpsiPrescale'],
+                                                      postscale = config['Postscale'],
+                                                      HLT1 = "HLT_PASS_RE('%(JpsiHlt1Filter)s')" % config,
+                                                      HLT2 = "HLT_PASS_RE('%(JpsiHlt2Filter)s')" % config,
+                                                      selection = self.makeJpsiMuMuTrackEff2)
+
+ 		################################################
+        # Jpsi -> mu mu low multiplicity stripping lines (long + muonTT)
+        ################################################
+        self.TrackEffMuonTTJpsiLowMult_line1 = StrippingLine(name+'_JpsiLowMultLine1',
+                                                      prescale = config['JpsiLowMultPrescale'],
+                                                      postscale = config['Postscale'],
+                                                      HLT1 = "HLT_PASS_RE('%(JpsiLowMultHlt1Filter)s')" % config,
+                                                      HLT2 = "HLT_PASS_RE('%(JpsiLowMultHlt2Filter)s')" % config,
+                                                      selection = self.makeJpsiMuMuLowMultTrackEff1,
+                                                      checkPV = False)
+
+
+        self.TrackEffMuonTTJpsiLowMult_line2 = StrippingLine(name+'_JpsiLowMultLine2',
+                                                      prescale = config['JpsiLowMultPrescale'],
+                                                      postscale = config['Postscale'],
+                                                      HLT1 = "HLT_PASS_RE('%(JpsiLowMultHlt1Filter)s')" % config,
+                                                      HLT2 = "HLT_PASS_RE('%(JpsiLowMultHlt2Filter)s')" % config,
+                                                      selection = self.makeJpsiMuMuLowMultTrackEff2,
+                                                      checkPV = False)
+
+        ################################################
+        # Upsilon -> mu mu stripping lines (long + muonTT)
+        ################################################
+        self.TrackEffMuonTTUpsilon_line1 = StrippingLine(name+'_UpsilonLine1',
+                                                         prescale = config['UpsilonPrescale'],
+                                                         postscale = config['Postscale'],
+                                                         selection = self.makeUpsilonMuMuTrackEff1)
+
+
+        self.TrackEffMuonTTUpsilon_line2 = StrippingLine(name+'_UpsilonLine2',
+                                                         prescale = config['UpsilonPrescale'],
+                                                         postscale = config['Postscale'],
+                                                         selection = self.makeUpsilonMuMuTrackEff2)
+
+
+        ################################################
+        # Z -> mu mu stripping lines (long + muonTT)
+        ################################################
+        self.TrackEffMuonTTZ_line1 = StrippingLine(name+'_ZLine1',
+                                                   prescale = config['ZPrescale'],
+                                                   postscale = config['Postscale'],
+                                                   selection = self.makeZMuMuTrackEff1)
+
+
+
+        self.TrackEffMuonTTZ_line2 = StrippingLine(name+'_ZLine2',
+                                                   prescale = config['ZPrescale'],
+                                                   postscale = config['Postscale'],
+                                                   selection = self.makeZMuMuTrackEff2)
+
+        ################################################
+        # B -> J/psi K stripping lines (long + muonTT + long)
+        ################################################
+        self.TrackEffMuonTTBJpsiK_line1 = StrippingLine(name+'_BJpsiKLine1',
+                                                        prescale = config['BJpsiKPrescale'],
+                                                        postscale = config['Postscale'],
+                                                        #HLT = "HLT_PASS('Hlt2MuTrackDecision')",
+                                                        selection = self.BJpsiKHLT2Filter1
+                                                        )
+
+        self.TrackEffMuonTTBJpsiK_line2 = StrippingLine(name+'_BJpsiKLine2',
+                                                        prescale = config['BJpsiKPrescale'],
+                                                        postscale = config['Postscale'],
+                                                        #HLT = "HLT_PASS('Hlt2MuTrackDecision')",
+                                                        selection = self.BJpsiKHLT2Filter2)
+
+
+        ################################################
+        # register the lines
+        ################################################
+        self.registerLine( self.TrackEffMuonTTJpsi_line1 )
+        self.registerLine( self.TrackEffMuonTTJpsi_line2 )
+	self.registerLine( self.TrackEffMuonTTJpsiLowMult_line1 )
+        self.registerLine( self.TrackEffMuonTTJpsiLowMult_line2 )
+        self.registerLine( self.TrackEffMuonTTUpsilon_line1 )
+        self.registerLine( self.TrackEffMuonTTUpsilon_line2 )
+        self.registerLine( self.TrackEffMuonTTZ_line1 )
+        self.registerLine( self.TrackEffMuonTTZ_line2 )
+        self.registerLine( self.TrackEffMuonTTBJpsiK_line1 )
+        self.registerLine( self.TrackEffMuonTTBJpsiK_line2 )
+
+
+
+# ########################################################################################
+# -->
+# --> PREPARE THE LONG TRACKS <--
+# -->
+# ########################################################################################
+
+# ########################################################################################
+# The long track preparation, including hard coded cuts
+# ########################################################################################
+
+def selFilterLongParts(name, filterName, tagCut, selection, muon = True ): 
+    """
+    Get Muons from StdLooseMuons for detached Jpsi
+    """
+    Filter = FilterDesktop()
+    FilterLongPartsMu = Filter.configurable(name+filterName)
+    if (muon):  FilterLongPartsMu.Code = "(HASMUON) & (ISMUON) & "
+    else: FilterLongPartsMu.Code = "((~HASMUON) | (~ISMUON)) &"
+    FilterLongPartsMu.Code += tagCut
+
+    return Selection(name+"_SelFilterLongParts"+filterName, Algorithm = FilterLongPartsMu, RequiredSelections = selection)
+
+# ########################################################################################
+# -->
+# --> PATTERN RECOGNITION AND MUONTT TRACK MAKING <--
+# -->
+# ########################################################################################
+
+# ########################################################################################
+# The pattern recognition -> muonTT track stuff
+# ########################################################################################
+def selMakeMuonTT(name, XTolParam, MaxChi2TolParam, MinAxProjParam, MajAxProjParam, seedStation):
+    """
+    Make a muonTT track out of hits in the muon station and TT, and give it some options to configure
+    """
+    MakeMuonTT = MuonTTTrack(name+"MakeMuonTT")
+    MakeMuonTT.ToolName = "MuonCombRec"
+    MakeMuonTT.addTool( MuonCombRec )
+    MakeMuonTT.MuonCombRec.MeasureTime = True
+    MakeMuonTT.MuonCombRec.CloneKiller = False
+    MakeMuonTT.MuonCombRec.SkipStation = -1 # -1=no skip, 0=M1, 1=M2, 2=M3, 3=M4, 4=M5
+    MakeMuonTT.MuonCombRec.DecodingTool = "MuonHitDecode"
+    MakeMuonTT.MuonCombRec.PadRecTool = "MuonPadFromCoord"
+    MakeMuonTT.MuonCombRec.ClusterTool = "MuonFakeClustering" # to enable: "MuonClusterRec"
+    MakeMuonTT.MuonCombRec.PhysicsTiming = True
+    MakeMuonTT.MuonCombRec.AssumeCosmics = False
+    MakeMuonTT.MuonCombRec.AssumePhysics = True
+    MakeMuonTT.MuonCombRec.StrongCloneKiller = False
+    MakeMuonTT.MuonCombRec.SeedStation = seedStation # default seet station is M5
+    MakeMuonTT.MuonCombRec.addTool( MuonHitDecode, ("MuonHitDecode") )
+    MakeMuonTT.MuonCombRec.MuonHitDecode.SkipHWNumber = True
+    # #############################################################
+    MakeMuonTT.addTool( PatAddTTCoord )
+    MakeMuonTT.PatAddTTCoord.YTolSlope = 400000.0
+    MakeMuonTT.PatAddTTCoord.XTol = XTolParam
+    MakeMuonTT.PatAddTTCoord.XTolSlope = 400000.0
+    MakeMuonTT.PatAddTTCoord.MinAxProj = MinAxProjParam
+    MakeMuonTT.PatAddTTCoord.MajAxProj = MajAxProjParam
+    MakeMuonTT.PatAddTTCoord.MaxChi2Tol = MaxChi2TolParam
+    # ################################################################
+    MakeMuonTT.addTool( TrackMasterFitter)
+    MakeMuonTT.TrackMasterFitter.MaterialLocator = "SimplifiedMaterialLocator"
+    MakeMuonTT.addTool( TrackMasterExtrapolator )
+    MakeMuonTT.TrackMasterExtrapolator.MaterialLocator = "SimplifiedMaterialLocator"
+    # ################################################################
+    MakeMuonTT.AddTTHits = True
+    MakeMuonTT.MC = False
+    MakeMuonTT.OutputLevel = 4
+    #
+    #return Selection(name+"_SelMakeMuonTT", Algorithm = MakeMuonTT,  InputDataSetter=None)
+    return Selection(name+"_SelMakeMuonTT", Algorithm = MakeMuonTT,  OutputBranch='Rec', Extension='Tracks', InputDataSetter=None)
+
+# ########################################################################################
+# Make the protoparticles
+# ########################################################################################
+def selMuonTTPParts(name, muonTTTrackMaker):
+    """
+    Make ProtoParticles out of muonTT tracks
+    """
+    return ChargedProtoParticleSelection(name+"_SelMuonTTPParts", RequiredSelections=[muonTTTrackMaker] )
+# ################################################################
+def selMuonTTParts(name, protoParticlesMaker):
+    """
+    Make Particles out of the muonTT ProtoParticles
+    """
+    MuonTTParts = NoPIDsParticleMaker(name+"MuonTTParts")
+    MuonTTParts.Particle = 'muon'
+    MuonTTParts.addTool( TrackSelector )
+    MuonTTParts.TrackSelector.TrackTypes = [ "Long" ]
+    MuonTTParts.Input =  "Rec/"+name+"_SelMuonTTPParts/ProtoParticles"
+    MuonTTParts.OutputLevel = 4
+#
+    return Selection(name+"_SelMuonTTParts", Algorithm = MuonTTParts, RequiredSelections = [protoParticlesMaker], InputDataSetter=None)
+# ########################################################################################
+
+
+# ########################################################################################
+# -->
+# --> HLT STUFF <--
+# -->
+# ########################################################################################
+
+
+# ########################################################################################
+# HLT 1 lines we run on
+# ########################################################################################
+def selHlt1Jpsi(name, longPartsFilter, triggers, passonall):
+    """
+    Filter the long track muon to be TOS on a HLT1 single muon trigger, for J/psi selection
+    """
+    Hlt1Jpsi = TisTosParticleTagger(name+"Hlt1Jpsi")
+    Hlt1Jpsi.TisTosSpecs = triggers
+    Hlt1Jpsi.ProjectTracksToCalo = False
+    Hlt1Jpsi.CaloClustForCharged = False
+    Hlt1Jpsi.CaloClustForNeutral = False
+    Hlt1Jpsi.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt1Jpsi.NoRegex = True
+    Hlt1Jpsi.PassOnAll = passonall
+#
+    return Selection(name+"_SelHlt1Jpsi", Algorithm = Hlt1Jpsi, RequiredSelections = [ longPartsFilter ])
+# ################################################################
+def selHlt1Upsilon(name, longPartsFilter, triggers):
+    """
+    Filter the long track muon to be TOS on a HLT1 single muon trigger, for Upsilon selection
+    """
+    Hlt1Upsilon = TisTosParticleTagger(name+"Hlt1Upsilon")
+    Hlt1Upsilon.TisTosSpecs = triggers
+    Hlt1Upsilon.ProjectTracksToCalo = False
+    Hlt1Upsilon.CaloClustForCharged = False
+    Hlt1Upsilon.CaloClustForNeutral = False
+    Hlt1Upsilon.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt1Upsilon.NoRegex = True
+    #Hlt1Upsilon.PassOnAll = True # TESTING!
+#
+    return Selection(name+"_SelHlt1Upsilon", Algorithm = Hlt1Upsilon, RequiredSelections = [ longPartsFilter ])
+# ################################################################
+def selHlt1Z(name, longPartsFilter, triggers):
+    """
+    Filter the long track muon to be TOS on a HLT1 single muon trigger, for Z selection
+    """
+    Hlt1Z = TisTosParticleTagger(name+"Hlt1Z")
+    Hlt1Z.TisTosSpecs = triggers
+    Hlt1Z.ProjectTracksToCalo = False
+    Hlt1Z.CaloClustForCharged = False
+    Hlt1Z.CaloClustForNeutral = False
+    Hlt1Z.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt1Z.NoRegex = True
+#
+    return Selection(name+"_SelHlt1Z", Algorithm = Hlt1Z, RequiredSelections = [ longPartsFilter ])
+# ################################################################
+
+# ########################################################################################
+# HLT 2 lines we run on
+# ########################################################################################
+def selHlt2Jpsi(name, hlt1Filter, triggers, passonall = False):
+    """
+    Filter the long track muon to be TOS on a HLT2 single muon trigger, for J/psi selection
+    """
+    Hlt2Jpsi = TisTosParticleTagger(name+"Hlt2Jpsi")
+    Hlt2Jpsi.TisTosSpecs = triggers
+    Hlt2Jpsi.ProjectTracksToCalo = False
+    Hlt2Jpsi.CaloClustForCharged = False
+    Hlt2Jpsi.CaloClustForNeutral = False
+    Hlt2Jpsi.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2Jpsi.NoRegex = False
+    Hlt2Jpsi.PassOnAll = passonall
+#
+    return Selection(name+"_SelHlt2Jpsi", Algorithm = Hlt2Jpsi, RequiredSelections = [ hlt1Filter ])
+# ################################################################
+def selHlt2Upsilon(name, hlt1Filter, triggers):
+    """
+    Filter the long track muon to be TOS on a HLT2 single muon trigger, for Upsilon selection
+    """
+    Hlt2Upsilon = TisTosParticleTagger(name+"Hlt2Upsilon")
+    #Hlt2Upsilon.TisTosSpecs = { "Hlt2SingleMuonLowPTDecision%TOS" : 0}
+    Hlt2Upsilon.TisTosSpecs = triggers
+    Hlt2Upsilon.ProjectTracksToCalo = False
+    Hlt2Upsilon.CaloClustForCharged = False
+    Hlt2Upsilon.CaloClustForNeutral = False
+    Hlt2Upsilon.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2Upsilon.NoRegex = True
+    #Hlt2Upsilon.PassOnAll = True # TESTING!
+#
+    return Selection(name+"_SelHlt2Upsilon", Algorithm = Hlt2Upsilon, RequiredSelections = [ hlt1Filter ])
+# ################################################################
+def selHlt2Z(name, hlt1Filter, triggers):
+    """
+    Filter the long track muon to be TOS on a HLT2 single muon trigger, for Z selection
+    """
+    Hlt2Z = TisTosParticleTagger(name+"Hlt2Z")
+    #Hlt2Z.TisTosSpecs = { "Hlt2SingleMuonHighPTDecision%TOS" : 0}
+    Hlt2Z.TisTosSpecs = triggers
+    Hlt2Z.ProjectTracksToCalo = False
+    Hlt2Z.CaloClustForCharged = False
+    Hlt2Z.CaloClustForNeutral = False
+    Hlt2Z.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2Z.NoRegex = True
+    #Hlt2Z.PassOnAll = True # TESTING!
+#
+    return Selection(name+"_SelHlt2Z", Algorithm = Hlt2Z, RequiredSelections = [ hlt1Filter ])
+# ################################################################
+def selHlt2BJpsiKMu(name, hlt1Filter, triggers):
+    """
+    Filter the long track muon to be TUS on a HLT2 mu+track trigger, for B->J/psi K selection (mainly a speed up)
+    """
+    Hlt2BJpsiKMu = TisTosParticleTagger(name+"Hlt2BJpsiKMu")
+    Hlt2BJpsiKMu.TisTosSpecs = triggers
+    Hlt2BJpsiKMu.ProjectTracksToCalo = False
+    Hlt2BJpsiKMu.CaloClustForCharged = False
+    Hlt2BJpsiKMu.CaloClustForNeutral = False
+    Hlt2BJpsiKMu.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2BJpsiKMu.NoRegex = True
+    #Hlt2BJpsiKMu.PassOnAll = True # TESTING!
+#
+    return Selection(name+"_SelHlt2BJpsiKMu", Algorithm = Hlt2BJpsiKMu, RequiredSelections = [ hlt1Filter ])
+# ################################################################
+def selHlt2BJpsiKK(name, longPartsFilter, triggers): # No HLT1 needed, as event in HLT1 already triggered with single muon
+    """
+    Filter the long track Kaon to be TUS on a HLT2 mu+track trigger, for B->J/psi K selection (mainly a speed up)
+    """
+    Hlt2BJpsiKK = TisTosParticleTagger(name+"Hlt2BJpsiKK")
+    Hlt2BJpsiKK.TisTosSpecs = triggers
+    Hlt2BJpsiKK.ProjectTracksToCalo = False
+    Hlt2BJpsiKK.CaloClustForCharged = False
+    Hlt2BJpsiKK.CaloClustForNeutral = False
+    Hlt2BJpsiKK.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2BJpsiKK.NoRegex = True
+    #Hlt2BJpsiKK.PassOnAll = True # TESTING!
+    #
+    return Selection(name+"_SelHlt2BJpsiKK", Algorithm = Hlt2BJpsiKK, RequiredSelections = [ longPartsFilter ])
+# ########################################################################################
+
+# ########################################################################################
+# -->
+# --> FILTERS AND RESONANCE MAKERS <--
+# -->
+# ########################################################################################
+
+
+# ########################################################################################
+# Charge filter, that filters, well, the charge and takes the particles from the right source (long or muonTT)
+# Applies tag and probe cuts
+# ########################################################################################
+def chargeFilterProbe(name, partSource, charge, probeCut):
+    """
+    Select plus or minus charge for muonTT or long track
+    """
+    Filter = FilterDesktop() #there is maybe a change needed
+    myFilter1 = Filter.configurable(name+"myFilter1")
+    if(charge == -1):
+        myFilter1.Code = "(Q < 0) & "
+    if(charge == 1):
+        myFilter1.Code = "(Q > 0) & "
+
+    myFilter1.Code += probeCut #Tried to add this cut into MuonTTParts, however, zero speed gain
+
+    return Selection( name+'_chargeFilter'+'MuonTT', Algorithm = myFilter1, RequiredSelections = [  partSource ] )
+# ########################################################################################
+def chargeFilterTag(name, partSource, charge, tagCut):  #TagCut not used anymore, kept here in case
+
+    """
+    Select plus or minus charge for muonTT or long track
+    """
+    Filter = FilterDesktop() #there is maybe a change needed
+    myFilter2 = Filter.configurable(name+"myFilter2")
+    if(charge == -1):
+        myFilter2.Code = "(Q < 0)"
+    if(charge == 1):
+        myFilter2.Code = "(Q > 0)"
+
+    return Selection( name+'_chargeFilter'+'LongMu', Algorithm = myFilter2, RequiredSelections = [  partSource ] )
+# ################################################################
+
+
+# ########################################################################################
+# Resonance maker, that fits two muons to a resonance (J/psi, Upsilon, Z)
+# ########################################################################################
+def makeResonanceMuMuTrackEff(name, resonanceName, decayDescriptor, plusCharge, minusCharge,
+                              mode, massWin, resonanceCut):
+    """
+    Create and return a Resonance -> mu mu Selection object, with one track a long track
+    and the other a MuonTT track.
+    Arguments:
+    name                 : name of the selection
+    resonanceName        : name of the resonance
+    decayDescriptor      : decayDescriptor of the decay
+    plusCharge           : algorithm for selection positvely charged tracks (cuts done at chargeFilterProbe/tag)
+    minusCharge          : algorithm for selection negatively charged tracks (cuts done at chargeFilterProbe/tag)
+    mode                 : Tag(-)-and-Probe(+) (1) or  Tag(+)-and-Probe(-) (2)
+    massWin              : mass window around J/psi mass (PostComb)
+    resonanceCut         : cut applied on the mother resonance
+    """
+
+    massWinCombCut = 2 * massWin #MassPreComb
+
+    Combine = CombineParticles()
+    MuonTTResonance = Combine.configurable(name+"MuonTTResonance")
+    MuonTTResonance.DecayDescriptor = decayDescriptor
+
+    MuonTTResonance.OutputLevel = 4
+
+    if(mode == 1):
+        MuonTTResonance.CombinationCut ="ADAMASS('%(resonanceName)s') < %(massWinCombCut)s" % locals()
+        MuonTTResonance.MotherCut = "(ADMASS('%(resonanceName)s') < %(massWin)s) & %(resonanceCut)s"  % locals()
+
+        return Selection( name, Algorithm = MuonTTResonance, RequiredSelections = [minusCharge, plusCharge] )
+
+    if(mode == 2):
+        MuonTTResonance.CombinationCut ="ADAMASS('%(resonanceName)s') < %(massWinCombCut)s" % locals()
+        MuonTTResonance.MotherCut = "(ADMASS('%(resonanceName)s') < %(massWin)s) & %(resonanceCut)s"  % locals()
+
+        return Selection( name, Algorithm = MuonTTResonance, RequiredSelections = [plusCharge, minusCharge] )
+
+# ################################################################
+
+# ########################################################################################
+# Make a B->J/psi K out of a J/psi and a K
+# ########################################################################################
+def makeBJpsiKTrackEff(name, JpsiSel, KSel, massWin, vertexChi2):
+    """
+    Create and return a B -> J/psi K Selection object, with a J/psi (long+muonTT) and a Kaon.
+
+    Arguments:
+    name                 : name of the selection
+    massWin              : width of the mass window
+    vertexChi2           : vertexChi2/ndof for vertex
+    """
+
+    massWinCombCut = 2 * massWin
+
+    Combine = CombineParticles()
+    MuonTTBJpsiK = Combine.configurable(name+"BJpsiK")
+    MuonTTBJpsiK.DecayDescriptor = "[B+ -> J/psi(1S) K+]cc"
+
+    MuonTTBJpsiK.OutputLevel = 4
+
+    MuonTTBJpsiK.DaughtersCuts = {"J/psi(1S)"	:	"DMASS('J/psi(1S)') < 500" , #TODO: un-hardcode
+                                  "K+"          :	'ALL' }
+
+    MuonTTBJpsiK.CombinationCut = "ADAMASS('B+') < %(massWinCombCut)s" % locals()
+    MuonTTBJpsiK.MotherCut = "(ADMASS('B+') < %(massWin)s) & (VFASPF(VCHI2/VDOF) < %(vertexChi2)s) & (BPVDIRA > 0.95)" % locals()
+
+    return Selection( name, Algorithm = MuonTTBJpsiK, RequiredSelections = [ KSel, JpsiSel ] )
+# ################################################################
+
+# ########################################################################################
+# Filter the B->J/psi K to be triggered on the long muon and the Kaon
+# ########################################################################################
+def filterHLT2ForBJpsiK(name, BJpsiKSel, triggers):
+    """
+    Filter B->J/psi K to be triggered on mu+track for the long track muon and Kaon
+    """
+    Hlt2BJpsiK = TisTosParticleTagger(name+"_Hlt2BJpsiK")
+    #Hlt2BJpsiK.TisTosSpecs = { "Hlt2MuTrackDecision%TOS" : 0}
+    Hlt2BJpsiK.TisTosSpecs = triggers
+    Hlt2BJpsiK.ProjectTracksToCalo = False
+    Hlt2BJpsiK.CaloClustForCharged = False
+    Hlt2BJpsiK.CaloClustForNeutral = False
+    Hlt2BJpsiK.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2BJpsiK.NoRegex = True
+    #Hlt2BJpsiK.PassOnAll = True
+    return Selection( name, Algorithm = Hlt2BJpsiK, RequiredSelections = [BJpsiKSel] )
+# ########################################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffVeloMuon.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffVeloMuon.py
new file mode 100644
index 000000000..bd0266cd2
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingTrackEffVeloMuon.py
@@ -0,0 +1,449 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+#
+# A stripping selection for VeloMuon from J/Psi->mu+mu-,
+# Upsilon->mu+mu-, Z->mu+mu- decays
+# To be used for tracking studies
+#
+# @authors G. Krocker, P. Seyfert, S. Wandernoth
+# @date 2010-Aug-17
+#
+# @authors P. Seyfert, A. Jaeger
+# @date 2011-Mar-17
+# 
+# @author M. Kolpin
+# @date 2015-Mar-23
+#
+# @author R. Kopecna
+# @date 2019-Apr-15
+#
+###############################################################################
+__author__ = ['Flavio Archilli']
+__date__ = '30/10/2019'
+__version__ = '$Revision: 0.1 $'
+
+__all__ = ('StrippingTrackEffVeloMuonConf',
+           'default_config'
+           )
+
+default_config = {
+    'NAME'        : 'TrackEffVeloMuon',
+    'WGs'         : ['ALL'],
+    'BUILDERTYPE' : 'StrippingTrackEffVeloMuonConf',
+    'CONFIG'      : {
+         'Jpsi': {"ResonanceName":   "J/psi(1S)"
+              ,   "DecayDescriptor": "J/psi(1S) -> mu+ mu-"
+              ,   "CombPT" :             0.5 # GeV
+              ,   "TrP" :            5. # GeV
+              ,   "TrPT":            0.5 # GeV
+              ,   "TrChi2":          5.0 # adimensional
+              ,   "LongP":           7. # GeV
+              ,   "LongPT":          0.5 # GeV
+              ,   "LongChi2":        3.0 
+              ,   "LongMinIP":       0.2 # mm
+              ,   "VertChi2":        2.0
+              ,   "MuDLL"   :        -1.
+              ,   "MassPreComb":     1000. # MeV
+              ,   "MassPostComb":    500. # MeV
+              ,   "Prescale":        1
+              ,   "Postscale":       1
+              ,   "Hlt1Filter":      'Hlt1.*Decision'
+              ,   "Hlt2Filter":      'Hlt2.*Decision'
+              ,   "HLT1TisTosSpecs": { "Hlt1TrackMuonDecision%TOS" : 0, "Hlt1SingleMuonNoIPDecision%TOS" : 0 }
+              ,   "HLT1PassOnAll":   True
+              ,   "HLT2TisTosSpecs": { "Hlt2SingleMuon.*Decision%TOS" : 0, "Hlt2TrackEffDiMuonVeloMuon.*Decision%TOS" : 0 }
+              ,   "HLT2PassOnAll":   False
+              ,   "vemucut"      :   "(TRCHI2DOF < %(TrChi2)s) & (PT > %(TrPT)s*GeV) & (P > %(TrP)s*GeV)"
+              ,   "longcut"      :   "(TRCHI2DOF < %(LongChi2)s) & (P > %(LongP)s*GeV) & (PIDmu > %(MuDLL)s) & (MIPDV(PRIMARY)>%(LongMinIP)s*mm)"
+              ,   "resonancecut" :   "(VFASPF(VCHI2/VDOF) < %(VertChi2)s) & (PT > %(CombPT)s*GeV)"
+              ,   "linename"     :   "Line"
+              },
+         "Upsilon": { "ResonanceName":   "Upsilon(1S)"
+                  ,   "DecayDescriptor": "Upsilon(1S) -> mu+ mu-"
+                  ,   "CombPT" :             0.5 # GeV
+                  ,   "TrP" :            0. # GeV
+                  ,   "TrPT":            0.5 # GeV
+                  ,   "TrChi2":          5.
+                  ,   "LongP":           7. # GeV
+                  ,   "LongPT":          0.5 # GeV
+                  ,   "LongChi2":        3.
+                  ,   "VertChi2":        10000.
+                  ,   "MuDLL"   :        1.
+                  ,   "MassPreComb":     100000. # MeV
+                  ,   "MassPostComb":    1500. # MeV
+                  ,   "Prescale":        1
+                  ,   "Postscale":       1
+                  ,   "Hlt1Filter":      'Hlt1.*Decision'
+                  ,   "Hlt2Filter":      'Hlt2.*Decision'
+                  ,   "HLT1TisTosSpecs": { "Hlt1SingleMuonHighPTDecision%TOS" : 0 }
+                  ,   "HLT1PassOnAll":   True
+                  ,   "HLT2TisTosSpecs": { "Hlt2SingleMuonLowPTDecision%TOS" : 0 }
+                  ,   "HLT2PassOnAll":   False
+                  ,   "vemucut"      :   "((PT > %(TrPT)s*GeV))"
+                  ,   "longcut"      :   "((PT > %(LongPT)s*GeV))"
+                  ,   "resonancecut" :   "(PT > %(CombPT)s*GeV)"
+                  ,   "linename"     :   "UpsilonLine"
+                      },
+         "Z": {    "ResonanceName":   "Z0"
+               ,   "DecayDescriptor": "Z0 -> mu+ mu-"
+               ,   "CombPT" :             0.5 # GeV
+               ,   "TrP" :            0. # GeV
+               ,   "TrPT":            20. # GeV
+               ,   "TrChi2":          5.
+               ,   "LongP":           7. # GeV
+               ,   "LongPT":          0.5 # GeV
+               ,   "LongChi2":        3.
+               ,   "TrMinEta":        2.0
+               ,   "TrMaxEta":        4.5
+               ,   "LongMinEta":        2.0
+               ,   "LongMaxEta":        4.5
+               ,   "VertChi2":        10000. 
+               ,   "MuDLL"   :        1.
+               ,   "MassPreComb":     100000. # MeV
+               ,   "MassPostComb":    40000. # MeV
+               ,   "Prescale":        1
+               ,   "Postscale":       1
+               ,   "Hlt1Filter":      'Hlt1.*Decision'
+               ,   "Hlt2Filter":      'Hlt2.*Decision'
+               ,   "HLT1TisTosSpecs": { "Hlt1SingleMuonHighPTDecision%TOS" : 0 }
+               ,   "HLT1PassOnAll":   True
+               ,   "HLT2TisTosSpecs": { "Hlt2SingleMuonHighPTDecision%TOS" : 0 }
+               ,   "HLT2PassOnAll":   False
+               ,   "vemucut"      :   "((PT > %(TrPT)s*GeV) & (ETA > %(TrMinEta)s) & (ETA < %(TrMaxEta)s) )"
+               ,   "longcut"      :   "((PT > %(LongPT)s*GeV) & (ETA > %(LongMinEta)s) & (ETA < %(LongMaxEta)s) )"
+               ,   "resonancecut" :   "(PT > %(CombPT)s*GeV)"
+               ,   "linename"     :   "ZLine"
+               }                        
+         },
+    'STREAMS'     : { 'Dimuon' : ['StrippingTrackEffVeloMuonLine1',
+                                       'StrippingTrackEffVeloMuonLine2',
+                                       'StrippingTrackEffVeloMuonZLine1',
+                                       'StrippingTrackEffVeloMuonZLine2',
+                                       'StrippingTrackEffVeloMuonUpsilonLine1',
+                                       'StrippingTrackEffVeloMuonUpsilonLine2']
+                      }
+}
+
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+from Configurables import CombineParticles	
+from PhysSelPython.Wrappers import Selection, SelectionSequence, DataOnDemand
+from Configurables import ChargedProtoParticleMaker, NoPIDsParticleMaker, DataOnDemandSvc, DelegatingTrackSelector, TrackSelector, CombinedParticleMaker, BestPIDParticleMaker
+from Configurables import FastVeloTracking
+  
+from StrippingConf.StrippingLine import StrippingLine
+from Configurables import TrackStateInitAlg, TrackEventFitter, TrackPrepareVelo,TrackContainerCopy, Tf__PatVeloSpaceTool, StandaloneMuonRec
+from Configurables import TrackCloneFinder
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseMuons
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, TisTosParticleTagger
+
+from Configurables import GaudiSequencer
+from Configurables import TrackSys
+from PhysSelPython.Wrappers import AutomaticData
+from TrackFitter.ConfiguredFitters import ConfiguredFit
+
+from Configurables import TrackEventCloneKiller,VeloMuonBuilder
+from Configurables import TrackEventFitter, TrackMasterFitter
+from Configurables import TrackKalmanFilter, TrackMasterExtrapolator
+
+from SelPy.utils import ( UniquelyNamedObject,
+                          ClonableObject,
+                          SelectionBase )
+
+
+
+class StrippingTrackEffVeloMuonConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+        _lines = []
+        _lines += self.buildTrackEffVeloMuonLine( "Jpsi" ) #two lines per call one for positive probes and one for negative probes 
+        _lines += self.buildTrackEffVeloMuonLine( "Upsilon" )
+        _lines += self.buildTrackEffVeloMuonLine( "Z" )
+        for _line in _lines:
+            self.registerLine(_line)
+
+    def buildTrackEffVeloMuonLine(self, confLine):
+
+        _config = self.config[confLine]
+        _lines = []
+        TrackingPreFilter = self.VeloMuonBuilder(self.name+"_"+confLine,
+                                                 [ ]) 
+        VeloMuProtoPFilter = self.selMuonPParts(self.name+"_"+confLine,
+                                                TrackingPreFilter)
+        VeloMuPFilter = self.makeMyMuons(self.name+"_"+confLine,
+                                         VeloMuProtoPFilter)
+
+        longMuons = self.longtrackFilter( self.name+"_"+confLine+"_Longs",
+                                               muCut = _config["longcut"] % _config)
+        
+
+        LongMuHlt1 = self.selHlt1('TisTosFilter1'+confLine+'for'+self.name,
+                                                preFilter = longMuons,
+                                                HLT1TisTosSpecs = _config['HLT1TisTosSpecs'],
+                                                HLT1PassOnAll = _config['HLT1PassOnAll'])
+
+        LongMuHlt2 = self.selHlt2('TisTosFilter2'+confLine+'for'+self.name,
+                                                HLT1Filter = LongMuHlt1,
+                                                HLT2TisTosSpecs = _config['HLT2TisTosSpecs'],
+                                                HLT2PassOnAll = _config['HLT2PassOnAll'])
+        
+
+        _lines.append(self.buildPerCharge( confLine,
+                                           velomuons = VeloMuPFilter,
+                                           longmuons = LongMuHlt2,
+                                           charge = 1) ) 
+        
+        _lines.append(self.buildPerCharge( confLine,
+                                  velomuons = VeloMuPFilter,
+                                  longmuons = LongMuHlt2,
+                                  charge = -1) )        
+
+        return _lines
+        
+    def buildPerCharge(self, confLine, velomuons, longmuons, charge):
+
+        _config = self.config[confLine]
+        
+        _pchargeCut = None
+        _tchargeCut = None
+        _tagCharge = None
+        _probeCharge = None
+        _chargename = None
+        _linename = _config["linename"]
+        if (charge > 0):
+            pchargeCut = "& (Q > 0)"    
+            tchargeCut = "& (Q < 0)"    
+            _tagCharge = "Minus"
+            _probeCharge = "Plus"
+            _chargename = "1"
+        else:
+            pchargeCut = "& (Q < 0)"    
+            tchargeCut = "& (Q > 0)"    
+            _probeCharge = "Minus"
+            _tagCharge = "Plus"
+            _chargename = "2"
+            
+        _probeCut = _config["vemucut"] % _config
+        _probeCut += pchargeCut
+
+        _tagCut = _config["longcut"] % _config
+        _tagCut += tchargeCut
+
+
+        _pfilter = FilterDesktop().configurable(self.name+confLine+"probeFilter"+_probeCharge)
+        _pfilter.Code = _probeCut
+        _probe  = Selection(self.name+confLine+"FilteredVeloMuon"+_probeCharge,
+                            Algorithm = _pfilter,
+                            RequiredSelections = [velomuons])
+
+        _tfilter = FilterDesktop().configurable(self.name+confLine+"tagFilter"+_probeCharge)
+        _tfilter.Code = _tagCut
+        _tag  = Selection(self.name+confLine+"FilteredLong"+_tagCharge,
+                          Algorithm = _tfilter,
+                          RequiredSelections = [longmuons])
+
+        _algo = self.makeResonanceVeloMuTrackEff(self.name + confLine + "VeloMuJpsiSel" + _chargename,
+                                                 confLine = confLine,
+                                                 tagmuon = _tag,
+                                                 probemuon = _probe)
+
+        _line =  StrippingLine(self.name + _linename + _chargename
+                               , prescale = _config['Prescale']
+                               , postscale = _config['Postscale']
+                               , algos=[_algo]
+                               , RequiredRawEvents = ["Trigger","Muon","Velo","Tracker"]
+                               , HLT1 = "HLT_PASS_RE('%(Hlt1Filter)s')" % _config
+                               , HLT2 = "HLT_PASS_RE('%(Hlt2Filter)s')" % _config
+                               , MDSTFlag = True)
+
+        return _line
+        
+    ########################
+    # Probe Muon 
+    ########################
+
+    def VeloMuonBuilder(self, localname, prefilter):
+        
+        VeloMuonBuilder1 = VeloMuonBuilder("VeloMuonBuilder"+localname)
+        VeloMuonBuilder1.OutputLevel = 6
+        VeloMuonBuilder1.MuonLocation = "Rec/Track/"+localname+"MuonStandalone"
+        VeloMuonBuilder1.VeloLocation = "Rec/Track/"+localname+"UnFittedVelo"
+        VeloMuonBuilder1.lhcbids = 4
+        VeloMuonBuilder1.OutputLocation = "Rec/VeloMuon/"+localname+"Tracks"
+        
+        preve = TrackPrepareVelo(localname+"preve")
+        preve.inputLocation = "Rec/"+localname+"_Track/Velo"
+        preve.outputLocation = "Rec/Track/"+localname+"UnFittedVelo"
+        preve.bestLocation = ""
+        alg = GaudiSequencer("VeloMuonTrackingFor"+localname,
+                             Members = [ FastVeloTracking(localname+"FastVelo",OutputTracksName="Rec/"+localname+"_Track/Velo"),
+                                         preve, 
+                                         StandaloneMuonRec(localname+"MuonStandalone",OutputMuonTracksName="Rec/Track/"+localname+"MuonStandalone"),
+                                         VeloMuonBuilder1]
+                             )
+
+
+        return GSWrapper(name="WrappedVeloMuonTracking"+localname,
+                         sequencer=alg,
+                         output='Rec/VeloMuon/'+localname+'Tracks',
+                         requiredSelections =  prefilter)
+
+    
+
+    def selMuonPParts(self, localname, preSequence):
+        """
+        Make ProtoParticles out of VeloMuon tracks
+        """
+        veloprotos = ChargedProtoParticleMaker(localname+"ProtoPMaker")
+        veloprotos.Inputs = ["Rec/VeloMuon/"+localname+"Tracks"]
+        veloprotos.Output = "Rec/ProtoP/ProtoPMaker/"+localname+"ProtoParticles"
+        veloprotos.addTool( DelegatingTrackSelector, name="TrackSelector" )
+        tracktypes = [ "Long" ]
+        veloprotos.TrackSelector.TrackTypes = tracktypes
+        selector = veloprotos.TrackSelector
+        for tsname in tracktypes:
+            selector.addTool(TrackSelector,name=tsname)
+            ts = getattr(selector,tsname)
+            ts.TrackTypes = [tsname]
+
+        veloprotoseq = GaudiSequencer(localname+"ProtoPSeq")
+        veloprotoseq.Members += [ veloprotos ]
+
+        return GSWrapper(name="WrappedVeloMuonProtoPSeqFor" + localname,
+                         sequencer=veloprotoseq,
+                         output='Rec/ProtoP/ProtoPMaker/'+localname+'ProtoParticles',
+                         requiredSelections = [preSequence])
+    
+    
+    def makeMyMuons(self, localname, protoParticlesMaker):
+        """
+        Make Particles out of the muon ProtoParticles
+        """
+        particleMaker =  NoPIDsParticleMaker(localname+"ParticleMaker" , Particle = "Muon")
+        particleMaker.Input = "Rec/ProtoP/ProtoPMaker/"+localname+"ProtoParticles"
+
+
+        DataOnDemandSvc().AlgMap.update( {
+            "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(),
+            "/Event/Phys/" + particleMaker.name() + '/Vertices'  : particleMaker.getFullName() 
+            } )
+        
+
+        return Selection(localname+"SelVeloMuonParts",
+                         Algorithm = particleMaker,
+                         RequiredSelections = [protoParticlesMaker],
+                         InputDataSetter=None)
+
+
+    ########################
+    # Tag Muon 
+    ########################
+
+    def longtrackFilter(self, localname, muCut):
+        """
+        Select plus or minus charge for longtrack
+        """
+        _filter = FilterDesktop().configurable("LongTrackFilter")
+        _filter.Code = muCut
+
+        return Selection( localname+'_longFilter'+'LongMu',
+                          Algorithm = _filter,
+                          RequiredSelections = [ StdLooseMuons ] )
+
+    def selHlt1(self, localname, preFilter, HLT1TisTosSpecs, HLT1PassOnAll):
+        """
+        Filter the long track muon to be TOS on a HLT1 single muon trigger,
+        """
+
+        Hlt1Jpsi = TisTosParticleTagger(
+            TisTosSpecs = HLT1TisTosSpecs
+            ,ProjectTracksToCalo = False
+            ,CaloClustForCharged = False
+            ,CaloClustForNeutral = False
+            ,TOSFrac = { 4:0.0, 5:0.0 }
+            ,NoRegex = True
+            )
+        Hlt1Jpsi.PassOnAll = HLT1PassOnAll
+        return Selection(localname+"_SelHlt1Jpsi",
+                         Algorithm = Hlt1Jpsi,
+                         RequiredSelections = [ preFilter ])
+
+    def selHlt2(self, localname, HLT1Filter, HLT2TisTosSpecs, HLT2PassOnAll):
+        """
+        Filter the long track muon to be TOS on a HLT2 single muon trigger,
+        """
+
+        Hlt2Jpsi = TisTosParticleTagger(
+            TisTosSpecs = HLT2TisTosSpecs
+            ,ProjectTracksToCalo = False
+            ,CaloClustForCharged = False
+            ,CaloClustForNeutral = False
+            ,TOSFrac = { 4:0.0, 5:0.0 }
+            ,NoRegex = False
+            )
+        Hlt2Jpsi.PassOnAll = HLT2PassOnAll
+        return Selection(localname+"_SelHlt2Jpsi",
+                         Algorithm = Hlt2Jpsi,
+                         RequiredSelections = [ HLT1Filter ])
+
+
+    ########################
+    # make the resonance 
+    ########################
+
+
+    def makeResonanceVeloMuTrackEff(self, localname, confLine, tagmuon, probemuon):                                    
+        """
+        Create and return a Resonance -> mu mu Selection object, with one track a long track
+        and the other a MuonVelo track.
+        Arguments:
+        name                 : name of the selection
+        ResonanceName        : name of the resonance
+        DecayDescriptor      : decayDescriptor of the decay
+        plusCharge           : algorithm for selection positvely charged tracks
+        minusCharge          : algorithm for selection negatively charged tracks
+        """    
+        _config = self.config[confLine]
+        
+        MuonVeloResonance = CombineParticles('_'+localname)
+        MuonVeloResonance.DecayDescriptor = _config["DecayDescriptor"]
+        MuonVeloResonance.OutputLevel = 4 
+
+        MuonVeloResonance.CombinationCut = "ADAMASS('%(ResonanceName)s')<%(MassPreComb)s*MeV" % _config
+        _resonancecut = "(ADMASS('%(ResonanceName)s')<%(MassPostComb)s*MeV) &" % _config
+        _resonancecut+= _config["resonancecut"] % _config
+        MuonVeloResonance.MotherCut = _resonancecut
+                    
+        return Selection(localname, Algorithm = MuonVeloResonance, RequiredSelections = [tagmuon, probemuon] )
+    
+
+
+class GSWrapper(UniquelyNamedObject,
+                ClonableObject,
+                SelectionBase) :
+    
+    def __init__(self, name, sequencer, output, requiredSelections) :
+        UniquelyNamedObject.__init__(self, name)
+        ClonableObject.__init__(self, locals())
+        SelectionBase.__init__(self,
+                               algorithm = sequencer,
+                               outputLocation = output,
+                               requiredSelections = requiredSelections )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingV0ForPID.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingV0ForPID.py
new file mode 100755
index 000000000..fd6214e8b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/StrippingV0ForPID.py
@@ -0,0 +1,991 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# @file StripingSelections/StrippingV0ForPID.py
+#
+# Configuration file for PID V0 ( K0S and  Lambda0) stripping.
+#
+# This series of stripping lines are designed for the purpose of PID
+# calibration/monitoring of the RICH and MUON systems. Tracks from these
+# samples will be used to determine ID and mis-ID in each of these
+# sub-detectors. In order to enhance the number of tracks reconstructed in
+# the periphery of phase-space, the selections are binned in terms of the
+# V0's rapidity and pT. Each bin is then assigned its own
+# pre-scale.
+# 
+#
+# Acknowledgements:
+#
+# Vanya Belyaev
+# The selection cuts used in this series of lines are essentially a tightened
+# version of those developed by Vanya Belyaev for the original V0 stripping
+# performed in 2009 at /sqrt{s} = 0.9 TeV. Furthermore, the selection code
+# borrows heavily on his original stripping lines (StrippingV0Conf).
+#
+# For more information see:
+#
+#  http://indico.cern.ch/conferenceDisplay.py?confId=74536
+#  http://indico.cern.ch/materialDisplay.py?contribId=13&sessionId=2&materialId=0&confId=78767
+#
+# @author Andrew Powell a.powell1@physics.ox.ac.uk
+# @date 2010-09-05
+# =============================================================================
+"""
+Usage:
+ >>> stream = ...
+ >>> from StrippingSelections.StrippingV0ForPID import StrippingV0ForPIDConf as builder_v0
+ >>> from StrippingSelections.StrippingV0ForPID import default_config as config_v0
+ >>> lb_v0  = builder_v0( name='noPIDV0', config=config_v0)
+ >>> stream.appendLines( lb_v0.lines()  )
+ 
+Results from running over:
+$STRIPPINGSELECTIONSROOT/tests/data/Reco13c_Run124134.py
+
+StrippingReport                                                INFO Event 100000, Good event 100000
+|                                    *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+|!StrippingK0SLLLinenoPIDV0                         |  0.3290|       329|  1.116|   0.388|
+|!StrippingK0SDDLinenoPIDV0                         |  0.3190|       319|  1.135|   0.931|
+|!StrippingLam0LLLine1noPIDV0                       |  0.5050|       505|  1.085|   2.783|
+|!StrippingLam0LLLine2noPIDV0                       |  0.2960|       296|  1.017|  16.511|
+|!StrippingLam0DDLinenoPIDV0                        |  0.2920|       292|  1.051|   4.443|
+|!StrippingLam0LLIsMUONLine1noPIDV0                 |  0.1640|       164|  1.043|   0.117|
+|!StrippingLam0LLIsMUONLine2noPIDV0                 |  0.0080|         8|  1.000|   0.116|
+|!StrippingLam0DDIsMUONLinenoPIDV0                  |  0.1270|       127|  1.031|  39.297|                
+"""
+# =============================================================================
+__author__  = 'Andrew Powell a.powell1@physics.ox.ac.uk'
+__date__    = '27-08-2011'
+__version__ = '$Revision: 1.7 $'
+__all__ = ('StrippingV0ForPIDConf','default_config')
+# =============================================================================
+
+from Gaudi.Configuration       import *
+from LHCbKernel.Configuration  import *
+from GaudiKernel.SystemOfUnits import mm, cm , MeV, GeV
+
+# =============================================================================
+# @class StrippingV0ForPIDConf
+#
+# Configurable for PID V0 ( K0S and  Lambda0 ) stripping.
+##
+# @author Andrew Powell a.powell1@physics.ox.ac.uk
+# @date 2010-09-05
+# =============================================================================
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand        
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsPions, StdNoPIDsDownPions, StdAllNoPIDsProtons, StdNoPIDsDownProtons
+
+#import logging
+#log = logging.getLogger('StrippingPromptCharm')
+
+# =============================================================================
+## Define the default configuration
+_default_configuration_ = {
+    'TrackChi2'            :  5       ,          ## Track Chi2/ndof quality 
+    'VertexChi2'           :  16      ,          ## Cut on Vertex chi2-quality
+    'DeltaMassK0S'         :  50 * MeV,          ## Mass-window (half)-width for K0S 
+    'DeltaMassLambda'      :  25 * MeV,          ## Mass-window (half)-width for Lambda 
+    'MaxZ'                 : 220 * cm ,          ## Maximal allowed vertex Z-position
+    'DaughtersIPChi2'      :  25      ,          ## minimal IP-chi2 for daughter particles  
+    'LTimeFitChi2'         :  49      ,          ## Chi2 from LifeTime Fitter
+    ##
+    'WrongMassK0S'         :   9 * MeV,          ## Mass-window (half)-width for ppi hypthesis
+    'WrongMassK0S_DD'      :  18 * MeV,          ## Mass-window (half)-width for ppi hypthesis (DD-case)
+    ##
+    'WrongMassLambda'      :  20 * MeV,          ## Mass-window (half)-width for pipi hypthesis
+    'WrongMassLambda_DD'   :  40 * MeV,          ## Mass-window (half)-width for pipi hypthesis (DD-case)
+    ##
+    'CTauK0S'              :   1 * mm ,          ## Cut on c*tau for K0S 
+    'CTauK0S_DD'           :  10 * mm ,          ## Cut on c*tau for K0S (DD-case)
+    ##
+    'CTauLambda0'          :   5 * mm ,          ## Cut on c*tau for Lambda0
+    'CTauLambda0_DD'       :  20 * mm ,          ## Cut on c*tau for Lambda0 (DD-case)
+    ##
+    'Proton_IsMUONCut'     :  "(INTREE( (ABSID=='p+') & ISMUON ) )" , 
+    ## 
+    # Technicalities:
+    ##
+    'Monitor'              :  False    ,          ## Activate the monitoring ?
+    ##
+    "HLT"                  : "HLT_PASS_RE('Hlt1MB.*Decision')" ,  ## HLT-cut
+    ##
+    'Preambulo'       : [
+    ## import c_light
+    "from GaudiKernel.PhysicalConstants import c_light" ,
+    ## define DD-category of K0S 
+    "DD =    CHILDCUT ( ISDOWN , 1 ) & CHILDCUT ( ISDOWN , 2 ) " ,
+    ## define LL-category of K0S 
+    "LL =    CHILDCUT ( ISLONG , 1 ) & CHILDCUT ( ISLONG , 2 ) "
+    ] ,
+    'KS0LL_Prescale'           : 0.020 ,
+    'KS0DD_Prescale'           : 0.024 , 
+    'LamLL_Prescale_LoP'       : 0.140 , 
+    'LamLL_Prescale_HiP'       : 1.000 ,
+    'LamDD_Prescale'           : 0.100 , 
+    'LamLLIsMUON_Prescale_LoP' : 1.000 ,
+    'LamLLIsMUON_Prescale_HiP' : 1.000 ,
+    'LamDDIsMUON_Prescale'     : 1.000   
+
+    }
+
+## the mandatory element
+
+default_config ={
+    'NAME'        :   'VznoPID'       ,
+    'WGs'         : [ 'ALL'] ,
+    'CONFIG'      : _default_configuration_  , 
+    'BUILDERTYPE' :   'StrippingV0ForPIDConf'            ,
+    'STREAMS'     :  [ 'PID']
+              }    
+
+
+
+# =============================================================================
+class StrippingV0ForPIDConf(LineBuilder) :    
+    """
+    Helper class to configure 'V0ForPID'-lines
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    ## get the default configuration 
+    #@staticmethod
+    def defaultConfiguration( key = None ) :
+        
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+        if key : return _config[ key ]
+        return _config
+    
+    ## constructor
+    def __init__(self, name, config) :
+        """
+        Constructor
+        """        
+                
+        self._name            = name
+
+        self._trackChi2       = config[ 'TrackChi2' ]
+        self._vertexChi2      = config[ 'VertexChi2' ]
+        self._deltaMassK0S    = config[ 'DeltaMassK0S' ]
+        self._deltaMassLambda = config[ 'DeltaMassLambda' ]
+        self._maxZ            = config[ 'MaxZ' ]
+        self._daughtersIPChi2 = config[ 'DaughtersIPChi2' ]
+        self._lTimeFitChi2    = config[ 'LTimeFitChi2' ]
+        
+        self._wrongMassK0S       = config[ 'WrongMassK0S' ]
+        self._wrongMassK0S_DD    = config[ 'WrongMassK0S_DD' ]
+        self._wrongMassLambda    = config[ 'WrongMassLambda' ]
+        self._wrongMassLambda_DD = config[ 'WrongMassLambda_DD' ] 
+        
+        self._cTauK0S        = config[ 'CTauK0S' ]
+        self._cTauK0S_DD     = config[ 'CTauK0S_DD' ]
+        self._cTauLambda0    = config[ 'CTauLambda0' ]
+        self._cTauLambda0_DD = config[ 'CTauLambda0_DD' ]
+
+        self._protonIsmuon   = config[ 'Proton_IsMUONCut' ]
+        
+        self._KS0LLPrescale            = config[ 'KS0LL_Prescale' ]
+        self._KS0DDPrescale            = config[ 'KS0DD_Prescale' ] 
+        self._LamLLPrescale_HiP        = config[ 'LamLL_Prescale_HiP' ]
+        self._LamLLPrescale_LoP        = config[ 'LamLL_Prescale_LoP' ]
+        self._LamDDPrescale            = config[ 'LamDD_Prescale' ]
+        self._LamLLIsMUONPrescale_HiP  = config[ 'LamLLIsMUON_Prescale_HiP' ]
+        self._LamLLIsMUONPrescale_LoP  = config[ 'LamLLIsMUON_Prescale_LoP' ]
+        self._LamDDIsMUONPrescale      = config[ 'LamDDIsMUON_Prescale' ]
+
+        self._monitor      = config[ 'Monitor' ]
+        self._hlt          = config[ 'HLT' ]
+        self._Preambulo    = config[ 'Preambulo' ]
+        
+       
+        LineBuilder.__init__( self , name , config )
+        
+        for line in self._lines_inner() :
+            self.registerLine(line)
+
+    def _lines_inner ( self ) :
+        if hasattr ( self , '_Lines' ) : return self._Lines
+
+        self._Lines = [
+            ##
+            StrippingLine (
+            "K0SLLLine" + self._name ,
+            prescale   = self._KS0LLPrescale ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.K0S_LL_Bin1() ],
+            RequiredRawEvents = ["Muon"],    
+            RelatedInfoTools = [ addRelInfoMuonIsolation("KS0 -> pi+ pi-")  ]  
+            ) ,
+            ## 
+            StrippingLine (
+            "K0SDDLine" + self._name ,
+            prescale   = self._KS0DDPrescale ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.K0S_DD_Bin1() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [ addRelInfoMuonIsolation("KS0 -> pi+ pi-")  ] 
+            ) ,
+            ## 
+            StrippingLine (
+            "Lam0LLLine1" + self._name ,
+            prescale   = self._LamLLPrescale_LoP ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_LL_Bin1() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ]     
+                ) ,
+            ## 
+            StrippingLine (
+            "Lam0LLLine2" + self._name ,
+            prescale   = self._LamLLPrescale_HiP ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_LL_Bin2() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            ) ,
+            ## 
+            StrippingLine (
+            "Lam0DDLine" + self._name ,
+            prescale   = self._LamDDPrescale ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_DD_Bin1() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            ),
+            ## 
+            StrippingLine (
+            "Lam0LLIsMUONLine1" + self._name ,
+            prescale   = self._LamLLIsMUONPrescale_LoP ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_LL_Bin1_IsMUON() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            )
+            ,
+            ## 
+            StrippingLine (
+            "Lam0LLIsMUONLine2" + self._name ,
+            prescale   = self._LamLLIsMUONPrescale_HiP ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_LL_Bin2_IsMUON() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            )
+            ,
+            ## 
+            StrippingLine (
+            "Lam0DDIsMUONLine" + self._name ,
+            prescale   = self._LamDDIsMUONPrescale ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_DD_Bin1_IsMUON() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            )
+            ]
+
+        return self._Lines
+    
+    def K0S ( self ) :
+        """
+        Selection for K0S 
+        """
+        if hasattr ( self , 'K0S_LL' ) :
+            return self.K0S_LL
+
+        _K0S = CombineParticles(
+            #self.name + "StripK0S" ,
+            DecayDescriptor = "KS0 -> pi+ pi-" ,
+            Preambulo       = self._Preambulo,
+            DaughtersCuts   = {
+            '' : self._k0s_daughtersCuts ()
+            } ,
+            CombinationCut  = "AM < 1.0 * GeV " , 
+            MotherCut       = self._k0s_motherCut()
+            )
+
+        if self._monitor == True :
+            _K0S.Preambulo       += [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'K0S, LL-case' , 0.45 , 0.55 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _K0S.Monitor         = True ,
+            _K0S.HistoProduce    = True ,
+            _K0S.MotherMonitor = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+        
+        self.K0S_LL = Selection("SelK0S2PiPi_LL_" + self._name,
+                                Algorithm = _K0S,
+                                RequiredSelections = [ StdAllNoPIDsPions ]) 
+            
+        return self.K0S_LL
+
+    def K0SDD ( self ) :
+        """
+        Selection for K0S DD 
+        """
+        if hasattr ( self , 'K0S_DD' ) :
+            return self.K0S_DD
+        
+        _K0SDD = CombineParticles(
+            #self.name + "StripK0S_DD" ,
+            DecayDescriptor = "KS0 -> pi+ pi-" ,
+            Preambulo       = self._Preambulo,
+            DaughtersCuts   = {
+            '' : self._k0s_daughtersCuts ()
+            } ,
+            CombinationCut  = "AM < 1.0 * GeV " ,
+            MotherCut       = self._k0s_motherCut()
+            )
+
+        if self._monitor == True :
+            _K0SDD.Preambulo       += [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massDD     = monitor ( M / GeV ,             Histo ( 'K0S, DD-case' , 0.45 , 0.55 , 100 ) , 'M_DD'    ) " ,
+                "p1DD       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'K0S, DD-case' , 0.00 , 120 ,  100 ) , 'p1_DD'   ) " ,
+                "p2DD       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'K0S, DD-case' , 0.00 , 120 ,  100 ) , 'p2_DD'   ) " ,
+                ]
+            _K0SDD.Monitor         = True ,
+            _K0SDD.HistoProduce    = True ,
+            _K0SDD.MotherMonitor = """ process ( massDD )
+            >> process ( p1DD )
+            >> process ( p2DD )
+            >> EMPTY
+            """
+        
+        self.K0S_DD = Selection("SelK0S2PiPi_DD_" + self._name,
+                                Algorithm = _K0SDD,
+                                RequiredSelections = [ StdNoPIDsDownPions ]) 
+
+        return self.K0S_DD
+
+    def Lam0 ( self ) :
+        """
+        Selection for Lam0 
+        """
+        if hasattr ( self , 'Lam0_LL' ) :
+            return self.Lam0_LL
+
+        _Lam0 = CombineParticles(
+            #self.name + "StripLam0" ,
+            DecayDescriptor = "[ Lambda0 -> p+ pi-]cc" ,
+            Preambulo       = self._Preambulo,
+            DaughtersCuts   = {
+            '' : self._lam0_daughtersCuts ()
+            } ,
+            CombinationCut  = "AM < 1.5 * GeV " ,
+            MotherCut       = self._lam0_motherCut()
+            )
+
+        if  self._monitor == True :
+            _Lam0.Preambulo       += [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0.Monitor         = True ,
+            _Lam0.HistoProduce    = True ,
+            _Lam0.MotherMonitor = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+        
+
+        self.Lam0_LL = Selection("SelLam02PPi_LL" + self._name,
+                                 Algorithm = _Lam0,
+                                 RequiredSelections = [ StdAllNoPIDsPions, StdAllNoPIDsProtons ]) 
+
+        return self.Lam0_LL
+
+    def Lam0DD ( self ) :
+        """
+        Selection for Lam0 DD 
+        """
+        if hasattr ( self , 'Lam0_DD' ) :
+            return self.Lam0_DD
+
+        _Lam0DD = CombineParticles(
+            #self.name + "StripLam0_DD" ,
+            DecayDescriptor = "[ Lambda0 -> p+ pi-]cc" ,
+            Preambulo       = self._Preambulo,
+            DaughtersCuts   = {
+            '' : self._lam0_daughtersCuts (),
+            } ,
+            CombinationCut  = "AM < 1.5 * GeV " ,
+            MotherCut       = self._lam0_motherCut()        
+            )
+
+        if  self._monitor == True :
+            _Lam0DD.Preambulo       += [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massDD     = monitor ( M / GeV ,             Histo ( 'Lambda0, DD-case' , 1.080 , 1.140 , 100 ) , 'M_DD'    ) " ,
+                "p1DD       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p1_DD'   ) " ,
+                "p2DD       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p2_DD'   ) " ,
+                ]
+            _Lam0DD.Monitor         = True ,
+            _Lam0DD.HistoProduce    = True ,
+            _Lam0DD.MotherMonitor = """ process ( massDD )
+            >> process ( p1DD )
+            >> process ( p2DD )
+            >> EMPTY
+            """
+        self.Lam0_DD = Selection("SelLam02PiPi_DD" + self._name ,
+                                 Algorithm = _Lam0DD,
+                                 RequiredSelections = [ StdNoPIDsDownPions , StdNoPIDsDownProtons]) 
+        
+        return self.Lam0_DD
+
+    def K0S_LL_Bin1 ( self ) :
+        """
+        Selection for K0S LL Bin1
+        """
+        if hasattr(self, 'K0S_LL_Bin1_V0ForPID') :
+            return self.K0S_LL_Bin1_V0ForPID
+
+        K0S = self.K0S()
+        _K0S_LL_Bin1_Filter = FilterDesktop (
+            #self.name + 'K0S_LL_Bin1_Filter' ,
+            Code         = self._k0s_bin1Cut_LL()
+            )
+
+        if self._monitor == True :
+            _K0S_LL_Bin1_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'K0S, LL-case' , 0.45 , 0.55 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _K0S_LL_Bin1_Filter.Monitor      = True  ,
+            _K0S_LL_Bin1_Filter.HistoProduce = True  ,
+            _K0S_LL_Bin1_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.K0S_LL_Bin1_V0ForPID = Selection(
+            "SelK0S_LL_Bin1" + self._name,
+            Algorithm          = _K0S_LL_Bin1_Filter,
+            RequiredSelections = [ K0S ]
+            )
+        return self.K0S_LL_Bin1_V0ForPID
+
+    def K0S_DD_Bin1 ( self ) :
+        """
+        Selection for K0S DD Bin1
+        """
+        if hasattr(self, 'K0S_DD_Bin1_V0ForPID') :
+            return self.K0S_DD_Bin1_V0ForPID
+
+        _K0S_DD_Bin1_Filter = FilterDesktop (
+            #self.name + 'K0S_DD_Bin1_Filter' ,
+            Code         = self._k0s_bin1Cut_DD()
+            )
+
+        if self._monitor == True :
+            _K0S_DD_Bin1_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor DD-case
+                "massDD     = monitor ( M / GeV ,             Histo ( 'K0S, DD-case' , 0.45 , 0.55 , 100 ) , 'M_DD'    ) " ,
+                "p1DD       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'K0S, DD-case' , 0.00 , 120 ,  100 ) , 'p1_DD'   ) " ,
+                "p2DD       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'K0S, DD-case' , 0.00 , 120 ,  100 ) , 'p2_DD'   ) " ,
+                ]
+            _K0S_DD_Bin1_Filter.Monitor      = True  ,
+            _K0S_DD_Bin1_Filter.HistoProduce = True  ,
+            _K0S_DD_Bin1_Filter.PostMonitor  = """ process ( massDD )
+            >> process ( p1DD )
+            >> process ( p2DD )
+            >> EMPTY
+            """
+
+        self.K0S_DD_Bin1_V0ForPID = Selection(
+            "SelK0S_DD_Bin1" + self._name,
+            Algorithm          = _K0S_DD_Bin1_Filter,
+            RequiredSelections = [ self.K0SDD() ]
+            )
+        return self.K0S_DD_Bin1_V0ForPID
+
+
+    def Lam0_LL_Bin1 ( self ) :
+        """
+        Selection for Lam0 LL Bin1
+        """
+        if hasattr(self, 'Lam0_LL_Bin1_V0ForPID') :
+            return self.Lam0_LL_Bin1_V0ForPID
+
+        Lam0 = self.Lam0()
+        _Lam0_LL_Bin1_Filter = FilterDesktop (
+            #self.name + 'Lam0_LL_Bin1_Filter' ,
+            Code         = self._lam0_bin1Cut_LL()
+            )
+        
+        if self._monitor == True :
+            _Lam0_LL_Bin1_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0_LL_Bin1_Filter.Monitor      = True  ,
+            _Lam0_LL_Bin1_Filter.HistoProduce = True ,
+            _Lam0_LL_Bin1_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Lam0_LL_Bin1_V0ForPID = Selection(
+            "SelLam0_LL_Bin1" + self._name,
+            Algorithm          = _Lam0_LL_Bin1_Filter,
+            RequiredSelections = [ Lam0 ]
+            )
+        return self.Lam0_LL_Bin1_V0ForPID
+
+    def Lam0_LL_Bin2 ( self ) :
+        """
+        Selection for Lam0 LL Bin2
+        """
+        if hasattr(self, 'Lam0_LL_Bin2_V0ForPID') :
+            return self.Lam0_LL_Bin2_V0ForPID
+
+        Lam0 = self.Lam0()
+        _Lam0_LL_Bin2_Filter = FilterDesktop (
+            #self.name + 'Lam0_LL_Bin2_Filter' ,
+            Code         = self._lam0_bin2Cut_LL()
+            )
+
+        if self._monitor == True :
+            _Lam0_LL_Bin2_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0_LL_Bin2_Filter.Monitor      = True  ,
+            _Lam0_LL_Bin2_Filter.HistoProduce = True  ,
+            _Lam0_LL_Bin2_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Lam0_LL_Bin2_V0ForPID = Selection(
+            "SelLam0_LL_Bin2" + self._name,
+            Algorithm          = _Lam0_LL_Bin2_Filter,
+            RequiredSelections = [ Lam0 ]
+            )
+        return self.Lam0_LL_Bin2_V0ForPID
+
+
+    def Lam0_LL_Bin1_IsMUON ( self ) :
+        """
+        Selection for Lam0 LL Bin1
+        """
+        if hasattr(self, 'Lam0_LL_Bin1_IsMUON_V0ForPID') :
+            return self.Lam0_LL_Bin1_IsMUON_V0ForPID
+        
+        Lam0 = self.Lam0()
+        _Lam0_LL_Bin1_IsMUON_Filter = FilterDesktop (
+            #self.name + 'Lam0_LL_Bin1_Filter' ,
+            Code         = self._lam0_bin1Cut_LL_IsMUON()
+            )
+
+        if self._monitor == True :
+            _Lam0_LL_Bin1_IsMUON_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0_LL_Bin1_IsMUON_Filter.Monitor      = True  ,
+            _Lam0_LL_Bin1_IsMUON_Filter.HistoProduce = True ,
+            _Lam0_LL_Bin1_IsMUON_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Lam0_LL_Bin1_IsMUON_V0ForPID = Selection(
+            "SelLam0_LL_Bin1_ISMUON" + self._name,
+            Algorithm          = _Lam0_LL_Bin1_IsMUON_Filter,
+            RequiredSelections = [ Lam0 ]
+            )
+        return self.Lam0_LL_Bin1_IsMUON_V0ForPID
+
+    def Lam0_LL_Bin2_IsMUON ( self ) :
+        """
+        Selection for Lam0 LL Bin2
+        """
+        if hasattr(self, 'Lam0_LL_Bin2_IsMUON_V0ForPID') :
+            return self.Lam0_LL_Bin2_IsMUON_V0ForPID
+        
+        Lam0 = self.Lam0()
+        _Lam0_LL_Bin2_IsMUON_Filter = FilterDesktop (
+            #self.name + 'Lam0_LL_Bin2_Filter' ,
+            Code         = self._lam0_bin2Cut_LL_IsMUON()
+            )
+        
+        if self._monitor == True :
+            _Lam0_LL_Bin2_IsMUON_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0_LL_Bin2_IsMUON_Filter.Monitor      = True  ,
+            _Lam0_LL_Bin2_IsMUON_Filter.HistoProduce = True  ,
+            _Lam0_LL_Bin2_IsMUON_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Lam0_LL_Bin2_IsMUON_V0ForPID = Selection(
+            "SelLam0_LL_Bin2_ISMUON" + self._name,
+            Algorithm          = _Lam0_LL_Bin2_IsMUON_Filter,
+            RequiredSelections = [ Lam0 ]
+            )
+        return self.Lam0_LL_Bin2_IsMUON_V0ForPID
+
+    def Lam0_DD_Bin1 ( self ) :
+        """
+        Selection for Lam0 DD Bin1
+        """
+        if hasattr(self, 'Lam0_DD_Bin1_V0ForPID') :
+            return self.Lam0_DD_Bin1_V0ForPID
+        
+        Lam0DD = self.Lam0DD()
+        _Lam0_DD_Bin1_Filter = FilterDesktop (
+            ##
+            #self.name + 'Lam0_DD_Bin1_Filter' ,
+            ##
+            Code         = self._lam0_bin1Cut_DD()
+            )
+        
+        if self._monitor == True :
+            _Lam0_DD_Bin1_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor DD-case
+                "massDD     = monitor ( M / GeV ,             Histo ( 'Lambda0, DD-case' , 1.080 , 1.140 , 100 ) , 'M_DD'    ) " ,
+                "p1DD       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p1_DD'   ) " ,
+                "p2DD       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p2_DD'   ) " ,
+                ]
+            _Lam0_DD_Bin1_Filter.Monitor      = True  ,
+            _Lam0_DD_Bin1_Filter.HistoProduce = True ,
+            _Lam0_DD_Bin1_Filter.PostMonitor  = """ process ( massDD )
+            >> process ( p1DD )
+            >> process ( p2DD )
+            >> EMPTY
+            """
+
+        self.Lam0_DD_Bin1_V0ForPID = Selection(
+            "SelLam0_DD_Bin1" + self._name,
+            Algorithm          = _Lam0_DD_Bin1_Filter,
+            RequiredSelections = [ Lam0DD ]
+            )
+        return self.Lam0_DD_Bin1_V0ForPID
+
+    def Lam0_DD_Bin1_IsMUON ( self ) :
+        """
+        Selection for Lam0 DD Bin1
+        """
+        if hasattr(self, 'Lam0_DD_Bin1_IsMUON_V0ForPID') :
+            return self.Lam0_DD_Bin1_IsMUON_V0ForPID
+        
+        Lam0DD = self.Lam0DD()
+        _Lam0_DD_Bin1_IsMUON_Filter = FilterDesktop (
+            ##
+            #self.name + 'Lam0_DD_Bin1_Filter' ,
+            ##
+            Code         = self._lam0_bin1Cut_LL_IsMUON()
+            )
+        
+        if self._monitor == True :
+            _Lam0_DD_Bin1_IsMUON_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor DD-case
+                "massDD     = monitor ( M / GeV ,             Histo ( 'Lambda0, DD-case' , 1.080 , 1.140 , 100 ) , 'M_DD'    ) " ,
+                "p1DD       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p1_DD'   ) " ,
+                "p2DD       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p2_DD'   ) " ,
+                ]
+            _Lam0_DD_Bin1_IsMUON_Filter.Monitor      = True  ,
+            _Lam0_DD_Bin1_IsMUON_Filter.HistoProduce = True ,
+            _Lam0_DD_Bin1_IsMUON_Filter.PostMonitor  = """ process ( massDD )
+            >> process ( p1DD )
+            >> process ( p2DD )
+            >> EMPTY
+            """
+
+        self.Lam0_DD_Bin1_IsMUON_V0ForPID = Selection(
+            "SelLam0_DD_Bin1_ISMUON" + self._name,
+            Algorithm          = _Lam0_DD_Bin1_IsMUON_Filter,
+            RequiredSelections = [ Lam0DD ]
+            )
+        return self.Lam0_DD_Bin1_IsMUON_V0ForPID
+
+    def trackChi2       ( self ) : return self._trackChi2
+    def daughtersIPChi2 ( self ) : return self._daughtersIPChi2
+    
+    ## define daughter cuts for K0S 
+    def _k0s_daughtersCuts ( self ) :
+        """
+        Define 'DaughtersCuts' for K0S
+        """
+        cuts = """
+        ( 2.0 * GeV < P )
+        & ( ISLONG | ISDOWN )
+        & ( TRCHI2DOF < %g )
+        & ( MIPCHI2DV(PRIMARY) > %g )
+        """
+        cuts = cuts %( self._trackChi2, self._daughtersIPChi2 )
+        return cuts.replace ( '\n' , ' ' ) 
+    
+    ## define daughter cuts for Lambda0
+    def _lam0_daughtersCuts ( self ) :
+        """
+        Define 'DaughtersCuts' for Lambda0
+        """
+        return self._k0s_daughtersCuts () 
+
+    ## define "MotherCut" for K0s 
+    def _k0s_motherCut      ( self ) :
+        """
+        Define 'MotherCut' for K0S
+        """
+        cut       = """
+        ( ADMASS ( 'KS0') < %g  )
+        & in_range ( 0 , VFASPF ( VCHI2 ) ,  %g   )
+        & ( VFASPF ( VZ   ) < %g          )
+        & in_range ( 0 , BPVLTFITCHI2()   ,  %g )
+        & ( BPVLTIME()*c_light > switch ( DD , %g , %g ) )
+        & ( ADWM( 'Lambda0' , WM( 'p+' , 'pi-') ) > switch( DD, %g , %g ) )
+        & ( ADWM( 'Lambda0' , WM( 'pi+' , 'p~-') ) > switch( DD, %g , %g ) )
+        """
+        cut = cut %(self._deltaMassK0S,
+                    self._vertexChi2,
+                    self._maxZ,
+                    self._lTimeFitChi2,
+                    self._cTauK0S_DD,
+                    self._cTauK0S,
+                    self._wrongMassK0S_DD,
+                    self._wrongMassK0S,
+                    self._wrongMassK0S_DD,
+                    self._wrongMassK0S
+                    )
+        
+        return cut.replace ( '\n' , ' ' )  
+    
+    ## define "MotherCut" for Lambda0
+    def _lam0_motherCut      ( self ) :
+        """
+        Define 'MotherCut' for Lambda0
+        """
+        cut       = """
+        ( ADMASS ( 'Lambda0')   < %g )
+        & in_range ( 0 , VFASPF ( VCHI2 ) ,  %g   )
+        & ( VFASPF ( VZ       ) < %g            )
+        & in_range ( 0 , BPVLTFITCHI2()   ,  %g )
+        & ( BPVLTIME()*c_light > switch ( DD , %g , %g ) )
+        & ( ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > switch( DD, %g  , %g ) ) 
+        """
+        cut = cut %(self._deltaMassLambda,
+                    self._vertexChi2,
+                    self._maxZ,
+                    self._lTimeFitChi2,
+                    self._cTauLambda0_DD,
+                    self._cTauLambda0,
+                    self._wrongMassLambda_DD,
+                    self._wrongMassLambda
+                    )
+        
+        return cut.replace ( '\n' , ' ' ) 
+        
+
+    ## define "Bin1 Cut" for K0S LL
+    def _k0s_bin1Cut_LL ( self ) :
+        """
+        Define 'Bin1 Cut' for K0S LL
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+    ## define "Bin1 Cut" for Lambda0 LL
+    def _lam0_bin1Cut_LL ( self ) :
+        """
+        Define 'Bin1 Cut' for Lambda0 LL
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+    ## define "Bin2 Cut" for Lambda0 LL
+    def _lam0_bin2Cut_LL ( self ) :
+        """
+        Define 'Bin2 Cut' for Lambda0 LL
+        """
+        cut       = """
+        (INTREE( (ABSID=='p+') & ( P > 40 * GeV ) ) )
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+
+    ## define "Bin1 IsMUON Cut" for Lambda0 LL 
+    def _lam0_bin1Cut_LL_IsMUON ( self ) :
+        """
+        Define 'Bin1 Cut' for Lambda0 LL
+        """
+        cut       = """
+        (INTREE( (ABSID=='p+') & ISMUON ) )
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+    ## define "Bin1 IsMUON Cut" for Lambda0 LL 
+    def _lam0_bin2Cut_LL_IsMUON ( self ) :
+        """
+        Define 'Bin2 Cut' for Lambda0 LL
+        """
+        cut       = """
+        (INTREE( (ABSID=='p+') & ( ISMUON & (P > 40 * GeV) ) ) )
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+
+    ## define "Bin1 Cut" for K0S DD
+    def _k0s_bin1Cut_DD ( self ) :
+        """
+        Define 'Bin1 Cut' for K0S DD
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+ 
+
+    ## define "Bin1 Cut" for Lambda0 DD
+    def _lam0_bin1Cut_DD ( self ) :
+        """
+        Define 'Bin1 Cut' for Lambda0 DD
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+
+if '__main__' == __name__ :
+
+    print __doc__
+    print 'Author : %s ' % __author__
+    print 'Date   : %s ' % __date__
+    print __version__
+
+    conf = StrippingV0ForPIDConf()
+    
+    print conf
+
+    props = [ 'DaughtersCuts'   ,
+              'CombinationCut'  ,
+              'MotherCut'       ,
+              'DecayDescriptor' ,
+              'DecayDescriptors'] 
+                           
+    for l in conf.K0S     () : print __enroll__ ( l , lst = props ) 
+    for l in conf.Lambda0 () : print __enroll__ ( l , lst = props )
+    
+
+def addRelInfoMuonIsolation( decdes ):    
+    import re
+    _DauLoc={}
+    _daughters = re.match(r'(.*)->([ |\[]*)([^\]]+)(.*)', decdes)
+    if _daughters:    
+        _particles = _daughters.group(3).split()
+        _ip=1
+        _gp=1
+        for _p in _particles:
+            if re.match(r'(pi|p|K|e|mu)[\+|-]',_p):
+                _key= _daughters.group(1)+"->"+_daughters.group(2)
+                _jp=1
+                for _p2 in _particles:
+                    _key+=" "
+                    if _jp==_ip: _key+="^"
+                    _key+=_p2
+                    _jp=_jp+1
+                _key+=_daughters.group(4).replace("cc","CC")
+                _DauLoc[_key] = "MudetIso"+str(_gp)
+                _gp=_gp+1
+            _ip=_ip+1
+    else:
+        return {}
+    return {  "Type" : "RelInfoMuonIsolation", "DaughterLocations" : _DauLoc}
+
+
+# =============================================================================
+# The END 
+# =============================================================================
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/__init__.py
new file mode 100644
index 000000000..7098e5ded
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCalib/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ('StrippingDst2D0Pi', 'StrippingElectronID', 'StrippingEta2MuMuGamma', 'StrippingNoPIDDstarWithD02RSKPi', 'StrippingNoPIDDstarWithD02RSKPi_Brem')
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingB2ppipiSigmacmm_Lcpi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingB2ppipiSigmacmm_Lcpi.py
new file mode 100644
index 000000000..50dc884a7
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingB2ppipiSigmacmm_Lcpi.py
@@ -0,0 +1,1089 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+''' Module for construction of B+->Sigma_c~--(2455) p pi+pi+ with Sigma_c~--(2455) -> Lc- pi-, it includes:
+  - B->Sigma_c-- p pi+ pi+ with Sigma-- -> Lc- pi- (partially reconstructed)
+  - B->Sigma_c-- p pi+ pi+ with Sigma-- -> Lc- pi- with Lc- -> p- K+ pi- (fully reconstructed)
+Provides functions to build selections for physics analysis.
+Provides class StrippingB2ppipiSigmacmm_Lcpi_Conf, which constructs the selections and stripping lines given a configuration dictionary.
+
+
+Exported symbols (use python help):
+  - 'StrippingB2ppipiSigmacmm_Lcpi_Conf'
+  - 'makeThreePart'
+  - 'makeFourPart'
+  - 'makeSigmacmm2Lcpi'
+  - 'makeB2ppipiSigmacmm'
+'''
+
+__author__ = ['Andrea Contu']
+__date__ = '24/07/2014'
+__version__ = '$Revision: 3.0 $'
+
+__all__ = ('StrippingB2ppipiSigmacmm_Lcpi_Conf'
+           ,'makepifromSigmacmm'
+           ,'makeThreePart'
+           ,'makeThreePartWS_SC'
+           ,'makeFourPart'
+           ,'makeFourPartWS'
+           ,'makeFourPartWS_SC'
+           ,'makeSigmacmm2Lcpi'
+           ,'makeB2ppipiSigmacmm'
+           ,'makeB2ppipiSigmacmm_FourPart'
+           ,'makeB2ppipiSigmacmm_FourPart_WS'
+           ,'makeB2ppipiSigmacmm_FourPart_WS_SC'
+           ,'default_config'
+           )
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, ConjugateNeutralPID, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import checkConfig, LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from copy import copy
+
+name='StrippingB2ppipiSigmacmm_Lcpi'
+
+# What follows documents the cuts to
+# be implemented by the Stripping team in
+# StrippingSettings (valid for Stripping 17,
+# 26/08/2011).
+
+
+default_config = {
+  'NAME': 'B2ppipiSigmacmm_Lcpi',
+  'WGs' : ['Charm'],
+  'BUILDERTYPE' : 'StrippingB2ppipiSigmacmm_Lcpi_Conf',
+  'STREAMS' : [ 'Charm' ],
+  'CONFIG' : {
+  'protonMINP':10.0*GeV
+  ,'protonMINIPCHI2':8.0
+  ,'protonMINPT': 500.0*MeV
+  ,'protonMINPIDp':6.0
+  ,'protonMINPIDp_K':-5.0
+  ,'pionMINP':5.0*GeV
+  ,'pionMINPT':400.0*MeV
+  ,'pionMINIPCHI2':8.0
+  ,'piSigmaMINP':2.0*GeV
+  ,'piSigmaMINPT':150.0*MeV
+  ,'piSigmaMAXP':10000.0*GeV
+  ,'piSigmaMAXPT':1000.0*GeV
+  ,'piSigmaMINIPCHI2':8.0
+  ,'ApplyDeltaMCut' : False
+  ,'DelmUpper':3.0*GeV
+  ,'DelmLower':0.0
+  ,'BMassWind':200.0*MeV
+  ,'BMassWindClosed':500.0*MeV
+  ,'LcMassWind':100.0*MeV
+  ,'threepartMassLow':1.5*GeV
+  ,'threepartMassHigh':2.8*GeV
+  ,'fourpartMassLow':1.8*GeV
+  ,'fourpartMassHigh':3.0*GeV
+  ,'threepartMAXDOCA':0.15*mm
+  ,'fourpartMAXDOCA':0.15*mm
+  ,'threepartVtxChi2DOF':5.0
+  ,'fourpartVtxChi2DOF':5.0
+  ,'BMAXDOCA':0.20*mm
+  ,'SigmaMAXDOCA':0.20*mm
+  ,'BVtxChi2DOF':5.0
+  ,'fourpartFDChi2':49.0
+  ,'threepartFDChi2':49.0
+  ,'threepartMinIPChi2':6.0
+  ,'fourpartMinIPChi2':6.0
+  ,'threepartPT':1.0*GeV
+  ,'fourpartPT':1.0*GeV
+  ,'BFDChi2':64.0
+  ,'SigmaFDChi2':64.0
+  ,'SigmaVtxChi2DOF':5.0
+  ,'SigmaLcDeltaMlow':0.0*MeV
+  ,'SigmaLcDeltaMhigh':1.0*GeV
+  ,'SigmaPT':0.15*GeV
+  ,'LcFDChi2':64.0
+  ,'LcVtxChi2DOF':5.0
+  ,'BDIRA':0.9995
+  ,'TrackChi2DOF':3.0
+  ,'ApplyPionPIDK':True
+  ,'PionPIDK':0.0
+  ,'CheckPV':True
+  ,'ApplyGECs':False
+  ,'MaxLongTracks':200
+  ,'ApplyGhostProbCut' :True
+  ,'GhostProbCut':0.5
+  ,'UseTOS': True
+  ,'Hlt2TOS': { "Hlt2.*Decision%TOS" : 0 }
+  ,'NoPIDs' : False
+  ,'Prescalefourpart':1.0
+  ,'Postscalefourpart':1.0
+  ,'PrescaleComplete':1.0
+  ,'PostscaleComplete':1.0
+  ,'PrescaleCompleteNorm':1.0
+  ,'PostscaleCompleteNorm':1.0
+      }
+    }
+
+
+
+class StrippingB2ppipiSigmacmm_Lcpi_Conf(LineBuilder):
+  """
+  Constructor of  of B+->Sigma_c~--(2455) p pi+pi+ with Sigma_c~--(2455) -> Lc- pi- stripping selections / stripping lines for
+  physics analysis (Lc absolute BF measurement).
+  Selections and StrippingLines created from a configuration dictionary.
+  Usage:
+  >>> someconfig = {...}
+  >>> myConf = StrippingB2ppipiSigmacmm_Lcpi_Conf( name="StrippingB2ppipiSigmacmm_Lcpi_first", config=someconfig )
+  >>> myLines = myConf.lines()
+  >>> for line in myLines :
+  >>>  print line.name(), line.outputLocation()
+  The lines can be used directly to build a StrippingStream object.
+
+  Exports as class data member:
+    StrippingB2ppipiSigmacmm_Lcpi_Conf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+
+    selpifromSigmacmm = makepifromSigmacmm(
+       name = name
+      ,MINP = config['piSigmaMINP']
+      ,MINPT = config['piSigmaMINPT']
+      ,MAXP = config['piSigmaMAXP']
+      ,MAXPT = config['piSigmaMAXPT']
+      ,MINIPCHI2 = config['piSigmaMINIPCHI2']
+      ,trackChi2DOF = config['TrackChi2DOF']
+      )
+    
+    selThreePart = makeThreePart(
+      name = name
+      ,pMINP = config['protonMINP']
+      ,pMINPT = config['protonMINPT']
+      ,pMINIPCHI2 = config['protonMINIPCHI2']
+      ,pMINPIDp = config['protonMINPIDp']
+      ,pMINPIDp_K = config['protonMINPIDp_K']
+      ,piMINP = config['pionMINP']
+      ,piMINPT = config['pionMINPT']
+      ,piMINIPCHI2 = config['pionMINIPCHI2']
+      ,trackChi2DOF = config['TrackChi2DOF']
+      ,applyPionPIDK = config['ApplyPionPIDK']
+      ,pionPIDK = config['PionPIDK']
+      ,applyGhostProbCut = config['ApplyGhostProbCut']
+      ,ghostProbCut = config['GhostProbCut']
+      ,threepartMassLow = config['threepartMassLow']
+      ,threepartMassHigh = config['threepartMassHigh']
+      ,threepartMAXDOCA = config['threepartMAXDOCA']
+      ,threepartVtxChi2DOF = config['threepartVtxChi2DOF']
+      ,threepartFDChi2 = config['threepartFDChi2']
+      ,threepartPT = config['threepartPT']
+      ,threepartMinIPChi2 = config['threepartMinIPChi2']
+      ,noPIDs = config['NoPIDs']
+      )
+      
+    selThreePartWS_SC = makeThreePartWS_SC(
+      name = name
+      ,pMINP = config['protonMINP']
+      ,pMINPT = config['protonMINPT']
+      ,pMINIPCHI2 = config['protonMINIPCHI2']
+      ,pMINPIDp = config['protonMINPIDp']
+      ,pMINPIDp_K = config['protonMINPIDp_K']
+      ,piMINP = config['pionMINP']
+      ,piMINPT = config['pionMINPT']
+      ,piMINIPCHI2 = config['pionMINIPCHI2']
+      ,trackChi2DOF = config['TrackChi2DOF']
+      ,applyPionPIDK = config['ApplyPionPIDK']
+      ,pionPIDK = config['PionPIDK']
+      ,applyGhostProbCut = config['ApplyGhostProbCut']
+      ,ghostProbCut = config['GhostProbCut']
+      ,threepartMassLow = config['threepartMassLow']
+      ,threepartMassHigh = config['threepartMassHigh']
+      ,threepartMAXDOCA = config['threepartMAXDOCA']
+      ,threepartVtxChi2DOF = config['threepartVtxChi2DOF']
+      ,threepartFDChi2 = config['threepartFDChi2']
+      ,threepartPT = config['threepartPT']
+      ,threepartMinIPChi2 = config['threepartMinIPChi2']
+      ,noPIDs = config['NoPIDs']
+      )
+    
+    selThreePartSc0 = makeThreePartSc0(
+      name = name
+      ,pMINP = config['protonMINP']
+      ,pMINPT = config['protonMINPT']
+      ,pMINIPCHI2 = config['protonMINIPCHI2']
+      ,pMINPIDp = config['protonMINPIDp']
+      ,pMINPIDp_K = config['protonMINPIDp_K']
+      ,piMINP = config['pionMINP']
+      ,piMINPT = config['pionMINPT']
+      ,piMINIPCHI2 = config['pionMINIPCHI2']
+      ,trackChi2DOF = config['TrackChi2DOF']
+      ,applyPionPIDK = config['ApplyPionPIDK']
+      ,pionPIDK = config['PionPIDK']
+      ,applyGhostProbCut = config['ApplyGhostProbCut']
+      ,ghostProbCut = config['GhostProbCut']
+      ,threepartMassLow = config['threepartMassLow']
+      ,threepartMassHigh = config['threepartMassHigh']
+      ,threepartMAXDOCA = config['threepartMAXDOCA']
+      ,threepartVtxChi2DOF = config['threepartVtxChi2DOF']
+      ,threepartFDChi2 = config['threepartFDChi2']
+      ,threepartPT = config['threepartPT']
+      ,threepartMinIPChi2 = config['threepartMinIPChi2']
+      ,noPIDs = config['NoPIDs']
+      )
+    
+    selFourPart = makeFourPart(
+      name = name
+      ,selectionthree = selThreePart
+      ,selectionpiSigma = selpifromSigmacmm
+      ,fourpartMassLow = config["fourpartMassLow"]
+      ,fourpartMassHigh = config["fourpartMassHigh"]
+      ,fourpartMAXDOCA = config["fourpartMAXDOCA"]
+      ,fourpartVtxChi2DOF = config["fourpartVtxChi2DOF"]
+      ,fourpartFDChi2 = config["fourpartFDChi2"]
+      ,fourpartPT = config['fourpartPT']
+      ,fourpartMinIPChi2 = config['fourpartMinIPChi2']
+      ,ApplyDeltaMCut = config['ApplyDeltaMCut']
+      ,DelmUpper = config['DelmUpper']
+      ,DelmLower = config['DelmLower']
+      ,UseTOS = config['UseTOS']
+      ,Hlt2TOS = config['Hlt2TOS']
+      )
+    
+    selFourPartWS = makeFourPartWS(
+      name = name
+      ,selectionthree = selThreePart
+      ,selectionpiSigma = selpifromSigmacmm
+      ,fourpartMassLow = config["fourpartMassLow"]
+      ,fourpartMassHigh = config["fourpartMassHigh"]
+      ,fourpartMAXDOCA = config["fourpartMAXDOCA"]
+      ,fourpartVtxChi2DOF = config["fourpartVtxChi2DOF"]
+      ,fourpartFDChi2 = config["fourpartFDChi2"]
+      ,fourpartPT = config['fourpartPT']
+      ,fourpartMinIPChi2 = config['fourpartMinIPChi2']
+      ,ApplyDeltaMCut = config['ApplyDeltaMCut']
+      ,DelmUpper = config['DelmUpper']
+      ,DelmLower = config['DelmLower']
+      ,UseTOS = config['UseTOS']
+      ,Hlt2TOS = config['Hlt2TOS']
+      )
+    
+    selFourPartWS_SC = makeFourPartWS_SC(
+      name = name
+      ,selectionthree = selThreePartWS_SC
+      ,selectionpiSigma = selpifromSigmacmm
+      ,fourpartMassLow = config["fourpartMassLow"]
+      ,fourpartMassHigh = config["fourpartMassHigh"]
+      ,fourpartMAXDOCA = config["fourpartMAXDOCA"]
+      ,fourpartVtxChi2DOF = config["fourpartVtxChi2DOF"]
+      ,fourpartFDChi2 = config["fourpartFDChi2"]
+      ,fourpartPT = config['fourpartPT']
+      ,fourpartMinIPChi2 = config['fourpartMinIPChi2']
+      ,ApplyDeltaMCut = config['ApplyDeltaMCut']
+      ,DelmUpper = config['DelmUpper']
+      ,DelmLower = config['DelmLower']
+      ,UseTOS = config['UseTOS']
+      ,Hlt2TOS = config['Hlt2TOS']
+      )
+    
+    selSigmacmm2Lcpi = makeSigmacmm2Lcpi(
+      name = name
+      ,selection = selpifromSigmacmm
+      ,LcMassWind = config['LcMassWind']
+      ,LcFDChi2 = config['LcFDChi2']
+      ,LcVtxChi2DOF = config['LcVtxChi2DOF']
+      ,SigmaMAXDOCA = config['SigmaMAXDOCA']
+      ,SigmaFDChi2 = config['SigmaFDChi2']
+      ,SigmaVtxChi2DOF = config['SigmaVtxChi2DOF']
+      ,SigmaLcDeltaMlow = config['SigmaLcDeltaMlow']
+      ,SigmaLcDeltaMhigh = config['SigmaLcDeltaMhigh']
+      ,SigmaPT = config['SigmaPT']
+      )
+    
+    selSigmac02Lcpi = makeSigmac02Lcpi(
+      name = name
+      ,selection = selpifromSigmacmm
+      ,LcMassWind = config['LcMassWind']
+      ,LcFDChi2 = config['LcFDChi2']
+      ,LcVtxChi2DOF = config['LcVtxChi2DOF']
+      ,SigmaMAXDOCA = config['SigmaMAXDOCA']
+      ,SigmaFDChi2 = config['SigmaFDChi2']
+      ,SigmaVtxChi2DOF = config['SigmaVtxChi2DOF']
+      ,SigmaLcDeltaMlow = config['SigmaLcDeltaMlow']
+      ,SigmaLcDeltaMhigh = config['SigmaLcDeltaMhigh']
+      ,SigmaPT = config['SigmaPT']
+      )
+    
+    selB2ppipiSigmacmm = makeB2ppipiSigmacmm(
+      name = name
+      ,selectionthree = selThreePart
+      ,selectionSigma = selSigmacmm2Lcpi
+      ,BMassWind = config['BMassWindClosed']
+      ,BMAXDOCA = config['BMAXDOCA']
+      ,BVtxChi2DOF = config['BVtxChi2DOF']
+      ,BFDChi2 = config['BFDChi2']
+      ,BDIRA = config['BDIRA']
+      )
+    
+    selB2ppipiSigmac0 = makeB2ppipiSigmac0(
+      name = name
+      ,selectionthree = selThreePartSc0
+      ,selectionSigma = selSigmac02Lcpi
+      ,BMassWind = config['BMassWindClosed']
+      ,BMAXDOCA = config['BMAXDOCA']
+      ,BVtxChi2DOF = config['BVtxChi2DOF']
+      ,BFDChi2 = config['BFDChi2']
+      ,BDIRA = config['BDIRA']
+      )
+    
+    
+    selB2ppipiSigmacmm_FourPart = makeB2ppipiSigmacmm_FourPart(
+      name = name
+      ,selectionfour = selFourPart
+      ,BMassWind = config['BMassWind']
+      ,BMAXDOCA = config['BMAXDOCA']
+      ,BVtxChi2DOF = config['BVtxChi2DOF']
+      ,BFDChi2 = config['BFDChi2']
+      ,BDIRA = config['BDIRA']
+      ,LcMassWind = config['LcMassWind']
+      ,LcVtxChi2DOF = config['LcVtxChi2DOF']
+      ,LcFDChi2 = config['LcFDChi2']
+      )
+      
+    selB2ppipiSigmacmm_FourPart_WS = makeB2ppipiSigmacmm_FourPart_WS(
+      name = name
+      ,selectionfour = selFourPartWS
+      ,BMassWind = config['BMassWind']
+      ,BMAXDOCA = config['BMAXDOCA']
+      ,BVtxChi2DOF = config['BVtxChi2DOF']
+      ,BFDChi2 = config['BFDChi2']
+      ,BDIRA = config['BDIRA']
+      ,LcMassWind = config['LcMassWind']
+      ,LcVtxChi2DOF = config['LcVtxChi2DOF']
+      ,LcFDChi2 = config['LcFDChi2']
+      )
+
+    selB2ppipiSigmacmm_FourPart_WS_SC = makeB2ppipiSigmacmm_FourPart_WS_SC(
+        name = name
+              ,selectionfour = selFourPartWS_SC
+              ,BMassWind = config['BMassWind']
+              ,BMAXDOCA = config['BMAXDOCA']
+              ,BVtxChi2DOF = config['BVtxChi2DOF']
+              ,BFDChi2 = config['BFDChi2']
+              ,BDIRA = config['BDIRA']
+              ,LcMassWind = config['LcMassWind']
+              ,LcVtxChi2DOF = config['LcVtxChi2DOF']
+              ,LcFDChi2 = config['LcFDChi2']
+              )
+    
+    _GECfilter = None
+    
+    
+    
+    if config['ApplyGECs']:
+      _filter = ""
+
+      nLong = config["MaxLongTracks"]
+      if nLong is not None:
+        if _filter != "":
+          _filter+=" & "
+        _filter += "( recSummaryTrack(LHCb.RecSummary.nLongTracks,TrLONG) < %s )" %nLong
+
+      if _filter != "":
+        _GECfilter = {'Code' : _filter,
+                      'Preambulo' : ["from LoKiTracks.decorators import *",
+                                     'from LoKiNumbers.decorators    import *',
+                                     'from LoKiCore.functions    import *']
+                      }
+
+
+    self.line_fourpart = StrippingLine(
+      name+"_PartReco_Line"
+      ,prescale=config['Prescalefourpart']
+      ,postscale=config['Postscalefourpart']
+      ,selection=selFourPart
+      ,checkPV=config['CheckPV']
+      ,FILTER=_GECfilter)
+    self.registerLine(self.line_fourpart)
+    
+    
+    self.line_fourpartWS = StrippingLine(
+      name+"_PartRecoWS_Line"
+      ,prescale=config['Prescalefourpart']
+      ,postscale=config['Postscalefourpart']
+      ,selection=selFourPartWS
+      ,checkPV=config['CheckPV']
+      ,FILTER=_GECfilter)
+    self.registerLine(self.line_fourpartWS)
+    
+    self.line_fourpartWS_SC = StrippingLine(
+      name+"_PartRecoWS_SC_Line"
+      ,prescale=config['Prescalefourpart']
+      ,postscale=config['Postscalefourpart']
+      ,selection=selFourPartWS_SC
+      ,checkPV=config['CheckPV']
+      ,FILTER=_GECfilter)
+    self.registerLine(self.line_fourpartWS_SC)
+    
+    self.line_B2ppipiSigmacmm= StrippingLine(
+      name+"_Closed_Line"
+      ,prescale=config['PrescaleCompleteNorm']
+      ,postscale=config['PostscaleCompleteNorm']
+      ,selection=selB2ppipiSigmacmm
+      ,checkPV=config['CheckPV']
+      ,FILTER=_GECfilter)
+    self.registerLine(self.line_B2ppipiSigmacmm)
+    
+    
+    self.line_B2ppipiSigmac0= StrippingLine(
+      name+"_Neutral_Closed_Line"
+      ,prescale=config['PrescaleCompleteNorm']
+      ,postscale=config['PostscaleCompleteNorm']
+      ,selection=selB2ppipiSigmac0
+      ,checkPV=config['CheckPV']
+      ,FILTER=_GECfilter)
+    self.registerLine(self.line_B2ppipiSigmac0)
+    
+    self.line_B2ppipiSigmacmm_FourPart= StrippingLine(
+      name+"_Closed_Line_FourPart"
+      ,prescale=config['PrescaleComplete']
+      ,postscale=config['PostscaleComplete']
+      ,selection=selB2ppipiSigmacmm_FourPart
+      ,checkPV=config['CheckPV']
+      ,FILTER=_GECfilter)
+    self.registerLine(self.line_B2ppipiSigmacmm_FourPart)
+    
+    self.line_B2ppipiSigmacmm_FourPart_WS= StrippingLine(
+      name+"_Closed_Line_FourPart_WS"
+      ,prescale=config['PrescaleComplete']
+      ,postscale=config['PostscaleComplete']
+      ,selection=selB2ppipiSigmacmm_FourPart_WS
+      ,checkPV=config['CheckPV']
+      ,FILTER=_GECfilter)
+    self.registerLine(self.line_B2ppipiSigmacmm_FourPart_WS)
+
+    self.line_B2ppipiSigmacmm_FourPart_WS_SC= StrippingLine(
+            name+"_Closed_Line_FourPart_WS_SC"
+                  ,prescale=config['PrescaleComplete']
+                  ,postscale=config['PostscaleComplete']
+                  ,selection=selB2ppipiSigmacmm_FourPart_WS_SC
+                  ,checkPV=config['CheckPV']
+                  ,FILTER=_GECfilter)
+    self.registerLine(self.line_B2ppipiSigmacmm_FourPart_WS_SC)
+
+def makepifromSigmacmm(
+       name
+      ,MINP
+      ,MINPT
+      ,MAXP
+      ,MAXPT
+      ,MINIPCHI2
+      ,trackChi2DOF
+      ):
+  _cuts = "(TRCHI2DOF<%(trackChi2DOF)s)" \
+              " &(PT>%(MINPT)s)&(P>%(MINP)s)" \
+              " &(PT<%(MAXPT)s)&(P<%(MAXP)s)" \
+              " & (MIPCHI2DV(PRIMARY)>%(MINIPCHI2)s)" \
+              %locals()
+  
+  from StandardParticles import StdAllNoPIDsPions
+  
+  _filter = FilterDesktop(Code = _cuts)
+  
+  _selection = Selection('pifromSigmamm_'+name
+                          ,Algorithm=_filter
+                          ,RequiredSelections=[StdAllNoPIDsPions])
+  return _selection
+
+def makeThreePart(
+      name
+      ,pMINP
+      ,pMINPT
+      ,pMINIPCHI2
+      ,pMINPIDp
+      ,pMINPIDp_K
+      ,piMINP
+      ,piMINPT
+      ,piMINIPCHI2
+      ,trackChi2DOF
+      ,applyPionPIDK
+      ,pionPIDK
+      ,applyGhostProbCut
+      ,ghostProbCut
+      ,threepartMassLow
+      ,threepartMassHigh
+      ,threepartMAXDOCA
+      ,threepartVtxChi2DOF
+      ,threepartFDChi2
+      ,threepartPT
+      ,threepartMinIPChi2
+      ,noPIDs
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(threepartMAXDOCA)s) & (APT>%(threepartPT)s) & (AM<%(threepartMassHigh)s) & (AM>%(threepartMassLow)s)" %locals()
+  _prefitCuts12 = "(ADOCA(1,2)<%(threepartMAXDOCA)s) & (AM<%(threepartMassHigh)s)" %locals()
+
+  _motherCuts = "(PT>%(threepartPT)s) & (VFASPF(VCHI2/VDOF)<%(threepartVtxChi2DOF)s) & " \
+                "(VFASPF(VMINVDCHI2DV(PRIMARY))>%(threepartFDChi2)s) & " \
+                "(M<%(threepartMassHigh)s) & (M>%(threepartMassLow)s) & " \
+                "(MIPCHI2DV(PRIMARY)>%(threepartMinIPChi2)s)" %locals()
+
+  _pionCuts = "(PT>%(piMINPT)s)&(P>%(piMINP)s)" \
+              " & (TRCHI2DOF<%(trackChi2DOF)s)" \
+              " & (MIPCHI2DV(PRIMARY)>%(piMINIPCHI2)s)" \
+              %locals()
+  if applyPionPIDK:
+    _tmpc = "((PIDK-PIDpi)<%(pionPIDK)s)" %locals()
+    _pionCuts = _pionCuts + " & "+_tmpc
+     
+  _protonCuts = "(PT>%(pMINPT)s)&(P>%(pMINP)s) & (TRCHI2DOF<%(trackChi2DOF)s) " \
+              " & (MIPCHI2DV(PRIMARY)>%(pMINIPCHI2)s) & ((PIDp-PIDpi)>%(pMINPIDp)s) & ((PIDp-PIDK)>%(pMINPIDp_K)s)" \
+              %locals()
+              
+  if applyGhostProbCut:
+    _ghostCut = "( TRGHOSTPROB < %(ghostProbCut)s )" %locals()
+    _pionCuts = _pionCuts + " & "+_ghostCut
+     
+  from StandardParticles import StdLoosePions, StdLooseProtons, StdNoPIDsPions, StdNoPIDsProtons
+  
+  _combpart = DaVinci__N3BodyDecays(DecayDescriptor = "[D+ -> p+ pi+ pi+]cc"
+                               ,Combination12Cut = _prefitCuts12
+                               ,CombinationCut = _prefitCuts
+                               ,MotherCut = _motherCuts
+                               ,DaughtersCuts = {"p+":_protonCuts,"pi+":_pionCuts}
+                               )
+  _myprotons = StdLooseProtons
+  _mypions = StdLoosePions
+  if noPIDs:
+    _myprotons = StdNoPIDsProtons
+    _mypions = StdNoPIDsPions
+  _selection = Selection('threepart_'+name
+                          ,Algorithm=_combpart
+                          ,RequiredSelections=[_myprotons,_mypions])
+  return _selection
+
+def makeThreePartWS_SC(
+      name
+      ,pMINP
+      ,pMINPT
+      ,pMINIPCHI2
+      ,pMINPIDp
+      ,pMINPIDp_K
+      ,piMINP
+      ,piMINPT
+      ,piMINIPCHI2
+      ,trackChi2DOF
+      ,applyPionPIDK
+      ,pionPIDK
+      ,applyGhostProbCut
+      ,ghostProbCut
+      ,threepartMassLow
+      ,threepartMassHigh
+      ,threepartMAXDOCA
+      ,threepartVtxChi2DOF
+      ,threepartFDChi2
+      ,threepartPT
+      ,threepartMinIPChi2
+      ,noPIDs
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(threepartMAXDOCA)s) & (APT>%(threepartPT)s) & (AM<%(threepartMassHigh)s) & (AM>%(threepartMassLow)s)" %locals()
+  _prefitCuts12 = "(ADOCA(1,2)<%(threepartMAXDOCA)s) & (AM<%(threepartMassHigh)s)" %locals()
+
+  _motherCuts = "(PT>%(threepartPT)s) & (VFASPF(VCHI2/VDOF)<%(threepartVtxChi2DOF)s) & " \
+                "(VFASPF(VMINVDCHI2DV(PRIMARY))>%(threepartFDChi2)s) & " \
+                "(M<%(threepartMassHigh)s) & (M>%(threepartMassLow)s) & " \
+                "(MIPCHI2DV(PRIMARY)>%(threepartMinIPChi2)s)" %locals()
+
+  _pionCuts = "(PT>%(piMINPT)s)&(P>%(piMINP)s)" \
+              " & (TRCHI2DOF<%(trackChi2DOF)s)" \
+              " & (MIPCHI2DV(PRIMARY)>%(piMINIPCHI2)s)" \
+              %locals()
+  if applyPionPIDK:
+    _tmpc = "((PIDK-PIDpi)<%(pionPIDK)s)" %locals()
+    _pionCuts = _pionCuts + " & "+_tmpc
+     
+  _protonCuts = "(PT>%(pMINPT)s)&(P>%(pMINP)s) & (TRCHI2DOF<%(trackChi2DOF)s) " \
+              " & (MIPCHI2DV(PRIMARY)>%(pMINIPCHI2)s) & ((PIDp-PIDpi)>%(pMINPIDp)s) & ((PIDp-PIDK)>%(pMINPIDp_K)s)" \
+              %locals()
+              
+  if applyGhostProbCut:
+    _ghostCut = "( TRGHOSTPROB < %(ghostProbCut)s )" %locals()
+    _pionCuts = _pionCuts + " & "+_ghostCut
+     
+  from StandardParticles import StdLoosePions, StdLooseProtons, StdNoPIDsPions, StdNoPIDsProtons
+  
+  _combpart = DaVinci__N3BodyDecays(DecayDescriptor = "[D+ -> p~- pi+ pi+]cc"
+                               ,Combination12Cut = _prefitCuts12
+                               ,CombinationCut = _prefitCuts
+                               ,MotherCut = _motherCuts
+                               ,DaughtersCuts = {"p+":_protonCuts,"pi+":_pionCuts}
+                               )
+  _myprotons = StdLooseProtons
+  _mypions = StdLoosePions
+  if noPIDs:
+    _myprotons = StdNoPIDsProtons
+    _mypions = StdNoPIDsPions
+  _selection = Selection('threepartWS_SC_'+name
+                          ,Algorithm=_combpart
+                          ,RequiredSelections=[_myprotons,_mypions])
+  return _selection
+
+
+def makeThreePartSc0(
+      name
+      ,pMINP
+      ,pMINPT
+      ,pMINIPCHI2
+      ,pMINPIDp
+      ,pMINPIDp_K
+      ,piMINP
+      ,piMINPT
+      ,piMINIPCHI2
+      ,trackChi2DOF
+      ,applyPionPIDK
+      ,pionPIDK
+      ,applyGhostProbCut
+      ,ghostProbCut
+      ,threepartMassLow
+      ,threepartMassHigh
+      ,threepartMAXDOCA
+      ,threepartVtxChi2DOF
+      ,threepartFDChi2
+      ,threepartPT
+      ,threepartMinIPChi2
+      ,noPIDs
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(threepartMAXDOCA)s) & (APT>%(threepartPT)s) & (AM<%(threepartMassHigh)s) & (AM>%(threepartMassLow)s)" %locals()
+  _prefitCuts12 = "(ADOCA(1,2)<%(threepartMAXDOCA)s) & (AM<%(threepartMassHigh)s)" %locals()
+
+  _motherCuts = "(PT>%(threepartPT)s) & (VFASPF(VCHI2/VDOF)<%(threepartVtxChi2DOF)s) & " \
+                "(VFASPF(VMINVDCHI2DV(PRIMARY))>%(threepartFDChi2)s) & " \
+                "(M<%(threepartMassHigh)s) & (M>%(threepartMassLow)s) & " \
+                "(MIPCHI2DV(PRIMARY)>%(threepartMinIPChi2)s)" %locals()
+
+  _pionCuts = "(PT>%(piMINPT)s)&(P>%(piMINP)s)" \
+              " & (TRCHI2DOF<%(trackChi2DOF)s)" \
+              " & (MIPCHI2DV(PRIMARY)>%(piMINIPCHI2)s)" \
+              %locals()
+  if applyPionPIDK:
+    _tmpc = "((PIDK-PIDpi)<%(pionPIDK)s)" %locals()
+    _pionCuts = _pionCuts + " & "+_tmpc
+     
+  _protonCuts = "(PT>%(pMINPT)s)&(P>%(pMINP)s) & (TRCHI2DOF<%(trackChi2DOF)s) " \
+              " & (MIPCHI2DV(PRIMARY)>%(pMINIPCHI2)s) & ((PIDp-PIDpi)>%(pMINPIDp)s) & ((PIDp-PIDK)>%(pMINPIDp_K)s)" \
+              %locals()
+              
+  if applyGhostProbCut:
+    _ghostCut = "( TRGHOSTPROB < %(ghostProbCut)s )" %locals()
+    _pionCuts = _pionCuts + " & "+_ghostCut
+     
+  from StandardParticles import StdLoosePions, StdLooseProtons, StdNoPIDsPions, StdNoPIDsProtons
+  
+  _combpart = DaVinci__N3BodyDecays(DecayDescriptor = "[D+ -> p+ pi+ pi-]cc"
+                               ,Combination12Cut = _prefitCuts12
+                               ,CombinationCut = _prefitCuts
+                               ,MotherCut = _motherCuts
+                               ,DaughtersCuts = {"p+":_protonCuts,"pi+":_pionCuts}
+                               )
+  _myprotons = StdLooseProtons
+  _mypions = StdLoosePions
+  if noPIDs:
+    _myprotons = StdNoPIDsProtons
+    _mypions = StdNoPIDsPions
+  _selection = Selection('threepartSc0_'+name
+                          ,Algorithm=_combpart
+                          ,RequiredSelections=[_myprotons,_mypions])
+  return _selection
+
+def makeSigmacmm2Lcpi(
+  name
+  ,selection
+  ,LcMassWind
+  ,LcFDChi2
+  ,LcVtxChi2DOF
+  ,SigmaMAXDOCA
+  ,SigmaFDChi2
+  ,SigmaVtxChi2DOF
+  ,SigmaLcDeltaMlow
+  ,SigmaLcDeltaMhigh
+  ,SigmaPT
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(SigmaMAXDOCA)s) & (APT>%(SigmaPT)s)" %locals()
+  
+  _LcCuts = "(ADMASS('Lambda_c~-')<%(LcMassWind)s) & (VFASPF(VCHI2/VDOF)<%(LcVtxChi2DOF)s) & (BPVVDCHI2>%(LcFDChi2)s) " %locals()
+
+  _motherCuts = "(VFASPF(VCHI2/VDOF)<%(SigmaVtxChi2DOF)s) & " \
+                "(BPVVDCHI2>%(SigmaFDChi2)s) & (PT>%(SigmaPT)s) &" \
+                 "((M-M1)>%(SigmaLcDeltaMlow)s) & ((M-M1)<%(SigmaLcDeltaMhigh)s)" %locals()
+
+  _combpart = CombineParticles (
+    DecayDescriptor="[Sigma_c~-- -> Lambda_c~- pi-]cc"
+    ,CombinationCut = _prefitCuts
+    ,MotherCut = _motherCuts
+    ,DaughtersCuts = {"Lambda_c~-":_LcCuts, "pi-" : "ALL"}
+    )
+  mylcs=DataOnDemand( Location = 'Phys/StdLooseLambdac2PKPi/Particles' )
+  _selection = Selection(
+    'Sigmacmm2Lcpi'+name
+    ,Algorithm=_combpart
+    ,RequiredSelections=[mylcs, selection]
+    )
+  return _selection
+
+def makeSigmac02Lcpi(
+  name
+  ,selection
+  ,LcMassWind
+  ,LcFDChi2
+  ,LcVtxChi2DOF
+  ,SigmaMAXDOCA
+  ,SigmaFDChi2
+  ,SigmaVtxChi2DOF
+  ,SigmaLcDeltaMlow
+  ,SigmaLcDeltaMhigh
+  ,SigmaPT
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(SigmaMAXDOCA)s) & (APT>%(SigmaPT)s)" %locals()
+  
+  _LcCuts = "(ADMASS('Lambda_c~-')<%(LcMassWind)s) & (VFASPF(VCHI2/VDOF)<%(LcVtxChi2DOF)s) & (BPVVDCHI2>%(LcFDChi2)s) " %locals()
+
+  _motherCuts = "(VFASPF(VCHI2/VDOF)<%(SigmaVtxChi2DOF)s) & " \
+                "(BPVVDCHI2>%(SigmaFDChi2)s) & (PT>%(SigmaPT)s) &" \
+                 "((M-M1)>%(SigmaLcDeltaMlow)s) & ((M-M1)<%(SigmaLcDeltaMhigh)s)" %locals()
+
+  _combpart = CombineParticles (
+    DecayDescriptor="[Sigma_c0 -> Lambda_c+ pi-]cc"
+    ,CombinationCut = _prefitCuts
+    ,MotherCut = _motherCuts
+    ,DaughtersCuts = {"Lambda_c+":_LcCuts, "pi-" : "ALL"}
+    )
+  mylcs=DataOnDemand( Location = 'Phys/StdLooseLambdac2PKPi/Particles' )
+  _selection = Selection(
+    'Sigmac02Lcpi'+name
+    ,Algorithm=_combpart
+    ,RequiredSelections=[mylcs, selection]
+    )
+  return _selection
+
+def makeFourPart(
+  name
+  ,selectionthree
+  ,selectionpiSigma
+  ,fourpartMassLow
+  ,fourpartMassHigh
+  ,fourpartMAXDOCA
+  ,fourpartVtxChi2DOF
+  ,fourpartFDChi2
+  ,fourpartPT
+  ,fourpartMinIPChi2
+  ,ApplyDeltaMCut
+  ,DelmUpper
+  ,DelmLower
+  ,UseTOS
+  ,Hlt2TOS
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(fourpartMAXDOCA)s) & (APT>%(fourpartPT)s)" %locals()
+
+  _motherCuts = "(VFASPF(VCHI2/VDOF)<%(fourpartVtxChi2DOF)s) & (MIPCHI2DV(PRIMARY)>%(fourpartMinIPChi2)s) & " \
+                "(VFASPF(VMINVDCHI2DV(PRIMARY))>%(fourpartFDChi2)s) & (PT>%(fourpartPT)s) & " \
+                  "((M)>%(fourpartMassLow)s) & ((M)<%(fourpartMassHigh)s)"%locals()
+
+  if(ApplyDeltaMCut):
+    _deltamcut="((M-M2)>%(DelmLower)s) & ((M-M2)<%(DelmUpper)s)"%locals()
+    _motherCuts=motherCuts+" & "+_deltamcut
+    
+  _combpart = CombineParticles (
+    DecayDescriptor="[B+ -> pi- D+]cc"
+    ,CombinationCut = _prefitCuts
+    ,MotherCut = _motherCuts
+    ,DaughtersCuts = {"pi-": "ALL", "D+" : "ALL"}
+    )
+
+  _selection = Selection(
+    'fourpart'+name
+    ,Algorithm=_combpart
+    ,RequiredSelections=[selectionthree, selectionpiSigma]
+    )
+  if not UseTOS:
+    return _selection
+  else:
+    _selectionTOS = makeTISTOS('fourpart'+ name + "TOS"
+                                            , _selection
+                                            , Hlt2TOS
+                                            )
+    return _selectionTOS
+
+
+def makeFourPartWS(
+  name
+  ,selectionthree
+  ,selectionpiSigma
+  ,fourpartMassLow
+  ,fourpartMassHigh
+  ,fourpartMAXDOCA
+  ,fourpartVtxChi2DOF
+  ,fourpartFDChi2
+  ,fourpartPT
+  ,fourpartMinIPChi2
+  ,ApplyDeltaMCut
+  ,DelmUpper
+  ,DelmLower
+  ,UseTOS
+  ,Hlt2TOS
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(fourpartMAXDOCA)s) & (APT>%(fourpartPT)s)" %locals()
+
+  _motherCuts = "(VFASPF(VCHI2/VDOF)<%(fourpartVtxChi2DOF)s) & (MIPCHI2DV(PRIMARY)>%(fourpartMinIPChi2)s) & " \
+                "(VFASPF(VMINVDCHI2DV(PRIMARY))>%(fourpartFDChi2)s) & (PT>%(fourpartPT)s) & " \
+                  "((M)>%(fourpartMassLow)s) & ((M)<%(fourpartMassHigh)s)"%locals()
+
+  if(ApplyDeltaMCut):
+    _deltamcut="((M-M2)>%(DelmLower)s) & ((M-M2)<%(DelmUpper)s)"%locals()
+    _motherCuts=motherCuts+" & "+_deltamcut
+    
+  _combpart = CombineParticles (
+    DecayDescriptor="[B+ -> pi+ D+]cc"
+    ,CombinationCut = _prefitCuts
+    ,MotherCut = _motherCuts
+    ,DaughtersCuts = {"pi+": "ALL", "D+" : "ALL"}
+    )
+
+  _selection = Selection(
+    'fourpartWS'+name
+    ,Algorithm=_combpart
+    ,RequiredSelections=[selectionthree, selectionpiSigma]
+    )
+  if not UseTOS:
+    return _selection
+  else:
+    _selectionTOS = makeTISTOS( 'fourpartWS'+name + "TOS"
+                                            , _selection
+                                            , Hlt2TOS
+                                            )
+    return _selectionTOS
+
+
+def makeFourPartWS_SC(
+  name
+  ,selectionthree
+  ,selectionpiSigma
+  ,fourpartMassLow
+  ,fourpartMassHigh
+  ,fourpartMAXDOCA
+  ,fourpartVtxChi2DOF
+  ,fourpartFDChi2
+  ,fourpartPT
+  ,fourpartMinIPChi2
+  ,ApplyDeltaMCut
+  ,DelmUpper
+  ,DelmLower
+  ,UseTOS
+  ,Hlt2TOS
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(fourpartMAXDOCA)s) & (APT>%(fourpartPT)s)" %locals()
+
+  _motherCuts = "(VFASPF(VCHI2/VDOF)<%(fourpartVtxChi2DOF)s) & (MIPCHI2DV(PRIMARY)>%(fourpartMinIPChi2)s) & " \
+                "(VFASPF(VMINVDCHI2DV(PRIMARY))>%(fourpartFDChi2)s) & (PT>%(fourpartPT)s) & " \
+                  "((M)>%(fourpartMassLow)s) & ((M)<%(fourpartMassHigh)s)"%locals()
+
+  if(ApplyDeltaMCut):
+    _deltamcut="((M-M2)>%(DelmLower)s) & ((M-M2)<%(DelmUpper)s)"%locals()
+    _motherCuts=motherCuts+" & "+_deltamcut
+    
+  _combpart = CombineParticles (
+    DecayDescriptor="[B+ -> pi+ D+]cc"
+    ,CombinationCut = _prefitCuts
+    ,MotherCut = _motherCuts
+    ,DaughtersCuts = {"pi+": "ALL", "D+" : "ALL"}
+    )
+
+  _selection = Selection(
+    'fourpartWS_SC'+name
+    ,Algorithm=_combpart
+    ,RequiredSelections=[selectionthree, selectionpiSigma]
+    )
+  if not UseTOS:
+    return _selection
+  else:
+    _selectionTOS = makeTISTOS( 'fourpartWS_SC'+name + "TOS"
+                                            , _selection
+                                            , Hlt2TOS
+                                            )
+    return _selectionTOS
+
+def makeB2ppipiSigmacmm(
+  name
+  ,selectionthree
+  ,selectionSigma
+  ,BMassWind
+  ,BMAXDOCA
+  ,BVtxChi2DOF
+  ,BFDChi2
+  ,BDIRA
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(BMAXDOCA)s)" %locals()
+
+  _motherCuts = "(ADMASS('B+')<%(BMassWind)s) & " \
+                "(BPVVDCHI2>%(BFDChi2)s) & (BPVDIRA>%(BDIRA)s) & " \
+                 "(VFASPF(VCHI2/VDOF)<%(BVtxChi2DOF)s)" %locals()
+
+  _combpart = CombineParticles (
+    DecayDescriptor="[B+ -> Sigma_c~-- D+]cc"
+    ,CombinationCut = _prefitCuts
+    ,MotherCut = _motherCuts
+    ,DaughtersCuts = {"Sigma_c~--": "ALL", "D+" : "ALL"}
+    )
+
+  _selection = Selection(
+    'B2ppipiSigmacmm'+name
+    ,Algorithm=_combpart
+    ,RequiredSelections=[selectionthree, selectionSigma]
+    )
+  return _selection
+
+def makeB2ppipiSigmac0(
+  name
+  ,selectionthree
+  ,selectionSigma
+  ,BMassWind
+  ,BMAXDOCA
+  ,BVtxChi2DOF
+  ,BFDChi2
+  ,BDIRA
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(BMAXDOCA)s)" %locals()
+
+  _motherCuts = "(ADMASS('B+')<%(BMassWind)s) & " \
+                "(BPVVDCHI2>%(BFDChi2)s) & (BPVDIRA>%(BDIRA)s) & " \
+                 "(VFASPF(VCHI2/VDOF)<%(BVtxChi2DOF)s)" %locals()
+
+  _combpart = CombineParticles (
+    DecayDescriptors=["[B+ -> Sigma_c0 D+]cc","[B+ -> Sigma_c~0 D+]cc"]
+    ,CombinationCut = _prefitCuts
+    ,MotherCut = _motherCuts
+    ,DaughtersCuts = {"Sigma_c0": "ALL", "D+" : "ALL"}
+    )
+
+  _selection = Selection(
+    'B2ppipiSigmac0'+name
+    ,Algorithm=_combpart
+    ,RequiredSelections=[selectionthree, selectionSigma]
+    )
+  return _selection
+  
+def makeB2ppipiSigmacmm_FourPart(
+  name
+  ,selectionfour
+  ,BMassWind
+  ,BMAXDOCA
+  ,BVtxChi2DOF
+  ,BFDChi2
+  ,BDIRA
+  ,LcMassWind
+  ,LcVtxChi2DOF
+  ,LcFDChi2
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(BMAXDOCA)s)" %locals()
+
+  _motherCuts = "(ADMASS('B+')<%(BMassWind)s) & " \
+                "(BPVVDCHI2>%(BFDChi2)s) & (BPVDIRA>%(BDIRA)s) & " \
+                 "(VFASPF(VCHI2/VDOF)<%(BVtxChi2DOF)s)" %locals()
+  _LcCuts = "(ADMASS('Lambda_c~-')<%(LcMassWind)s) & " \
+                "(BPVVDCHI2>%(LcFDChi2)s) & " \
+                 "(VFASPF(VCHI2/VDOF)<%(LcVtxChi2DOF)s)" %locals()
+  _combpart = CombineParticles (
+    DecayDescriptor="[B0 -> Lambda_c~- B+]cc"
+    ,CombinationCut = _prefitCuts
+    ,MotherCut = _motherCuts
+    ,DaughtersCuts = {"Lambda_c~-": _LcCuts, "B+" : "ALL"}
+    )
+  mylcs=DataOnDemand( Location = 'Phys/StdLooseLambdac2PKPi/Particles' )
+  _selection = Selection(
+    'B2ppipiSigmacmm_FourPart'+name
+    ,Algorithm=_combpart
+    ,RequiredSelections=[selectionfour, mylcs]
+    )
+  return _selection
+
+def makeB2ppipiSigmacmm_FourPart_WS(
+  name
+  ,selectionfour
+  ,BMassWind
+  ,BMAXDOCA
+  ,BVtxChi2DOF
+  ,BFDChi2
+  ,BDIRA
+  ,LcMassWind
+  ,LcVtxChi2DOF
+  ,LcFDChi2
+  ):
+  _prefitCuts = "(AMAXDOCA('')<%(BMAXDOCA)s)" %locals()
+
+  _motherCuts = "(ADMASS('B+')<%(BMassWind)s) & " \
+                "(BPVVDCHI2>%(BFDChi2)s) & (BPVDIRA>%(BDIRA)s) & " \
+                 "(VFASPF(VCHI2/VDOF)<%(BVtxChi2DOF)s)" %locals()
+  _LcCuts = "(ADMASS('Lambda_c~-')<%(LcMassWind)s) & " \
+                "(BPVVDCHI2>%(LcFDChi2)s) & " \
+                 "(VFASPF(VCHI2/VDOF)<%(LcVtxChi2DOF)s)" %locals()
+  _combpart = CombineParticles (
+    DecayDescriptor="[B0 -> Lambda_c~- B+]cc"
+    ,CombinationCut = _prefitCuts
+    ,MotherCut = _motherCuts
+    ,DaughtersCuts = {"Lambda_c~-": _LcCuts, "B+" : "ALL"}
+    )
+  mylcs=DataOnDemand( Location = 'Phys/StdLooseLambdac2PKPi/Particles' )
+  _selection = Selection(
+    'B2ppipiSigmacmm_FourPart_WS'+name
+    ,Algorithm=_combpart
+    ,RequiredSelections=[selectionfour, mylcs]
+    )
+  return _selection
+
+
+def makeB2ppipiSigmacmm_FourPart_WS_SC(
+    name
+      ,selectionfour
+      ,BMassWind
+      ,BMAXDOCA
+      ,BVtxChi2DOF
+      ,BFDChi2
+      ,BDIRA
+      ,LcMassWind
+      ,LcVtxChi2DOF
+      ,LcFDChi2
+    ):
+  _prefitCuts = "(AMAXDOCA('')<%(BMAXDOCA)s)" %locals()
+
+  _motherCuts = "(ADMASS('B+')<%(BMassWind)s) & " \
+                                    "(BPVVDCHI2>%(BFDChi2)s) & (BPVDIRA>%(BDIRA)s) & " \
+                                                     "(VFASPF(VCHI2/VDOF)<%(BVtxChi2DOF)s)" %locals()
+  _LcCuts = "(ADMASS('Lambda_c~-')<%(LcMassWind)s) & " \
+                                  "(BPVVDCHI2>%(LcFDChi2)s) & " \
+                                                   "(VFASPF(VCHI2/VDOF)<%(LcVtxChi2DOF)s)" %locals()
+  _combpart = CombineParticles (
+                DecayDescriptor="[B0 -> Lambda_c~- B+]cc"
+                    ,CombinationCut = _prefitCuts
+                    ,MotherCut = _motherCuts
+                ,DaughtersCuts = {"Lambda_c~-": _LcCuts, "B+" : "ALL"}
+                    )
+  mylcs=DataOnDemand( Location = 'Phys/StdLooseLambdac2PKPi/Particles' )
+  _selection = Selection(
+                    'B2ppipiSigmacmm_FourPart_WS_SC'+name
+                        ,Algorithm=_combpart
+                        ,RequiredSelections=[selectionfour, mylcs]
+                        )
+  return _selection
+
+def makeTISTOS( name, _input, _hlttos ) :
+  from Configurables import TisTosParticleTagger
+  _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+  _tisTosFilter.TisTosSpecs = _hlttos
+  return Selection( name
+           , Algorithm = _tisTosFilter
+           , RequiredSelections = [ _input ]
+            )        
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingBs2st2pKpipipi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingBs2st2pKpipipi.py
new file mode 100644
index 000000000..b4a7dd5fa
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingBs2st2pKpipipi.py
@@ -0,0 +1,237 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+"""
+Module for construction of Bs2st selection with B+ to ppipipi (missing Lambda c)
+Bs2st2pKpipipiLine : Bs2* -> K- (B+ -> p+ pi+ pi+ pi- X )
+Bs2st2pKpipipiSSLine : Bs2* -> K+ (B+ -> p+ pi+ pi+ pi- X )
+Bs2st2pKpipipiWSLine : Bs2* -> K- (B+ -> p+ pi+ pi- pi- X )
+Bs2st2pKpipipiWSSSLine : Bs2* -> K+ (B+ -> p+ pi+ pi- pi- X )
+"""
+
+__author__  = ['Matt Rudolph']
+__date__    = '2021/3/14'
+__version__ = 'v1r0'
+__all__     = {'Bs2st2pKpipipiConf',
+               'default_config'}
+
+from Gaudi.Configuration                   import *
+from PhysSelPython.Wrappers                import Selection
+from StrippingConf.StrippingLine           import StrippingLine
+from StrippingUtils.Utils                  import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, DaVinci__N4BodyDecays, CombineParticles
+
+from StandardParticles                     import StdLooseANNPions
+from StandardParticles                     import StdAllLooseANNKaons
+from StandardParticles                     import StdLooseANNProtons
+
+default_config = {
+    'NAME'        : 'Bs2st2pKpipipi',
+    'WGs'         : ['Charm'],
+    'BUILDERTYPE' : 'Bs2st2pKpipipiConf',
+    'CONFIG'      : {'Trk_MaxChi2Ndof'   : 4.0,
+                     'Trk_MaxGhostProb'  : 0.4,
+                     'Trk_MinIPChi2'     : 16.0,
+                     'Trk_MinP'          : 1000.0,
+                     'Trk_MinProbNNp'    : 0.1,
+                     'Trk_MinProbNNpi'   : 0.1,
+                     'Km_MaxIPChi2'      : 4,
+                     'Km_MinPT'          : 600,
+                     'Km_MinProbNNk'     : 0.2,
+                     'B_MinM_4body'     : 2400.0,
+                     'B_MaxM_4body'     : 3000.0,
+                     'B_MinSumPT_4body' : 4000.0,
+                     'B_MinPT_4body'    : 2000.0,
+                     'B_MaxDOCAChi2'    : 20.0,
+                     'B_MaxVtxChi2'     : 3.0,
+                     'B_MinVDChi2'      : 120.0,
+                     'B_MinDira'        : 0.999,
+                     'BK_MaxDM'          : 700.0,
+                     'Km_MinPperp'       : 70.0,
+                     'Km_MaxPperp'       : 315.0,
+                     'BK_MaxPVDZ'        : 1.0,
+                     'BK_MinPT'          : 50.0,
+                     'Prescale'          : 1.0,
+                     'Postscale'         : 1.0
+                     },
+    'STREAMS'     : ['CharmCompleteEvent']
+    }
+
+class Bs2st2pKpipipiConf(LineBuilder) :
+    """
+    Builder of Bs2st -> K- (B+ -> ppipipiX) and associated charge flipped stripping lines.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+
+        trkFilterP     = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Trk_MinP)s)         & \
+                                               (PROBNNp            > %(Trk_MinProbNNp)s)' % config )
+
+        trkFilterPi    = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Trk_MinP)s)         & \
+                                               (PROBNNpi            > %(Trk_MinProbNNpi)s)' % config )
+
+        trkFilterK = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) < %(Km_MaxIPChi2)s) & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (PT                  > %(Km_MinPT)s)         & \
+                                               (PROBNNk            > %(Km_MinProbNNk)s)' % config )
+
+
+        self.myProtons = Selection( 'ProtonsFor'+name,
+                                    Algorithm = trkFilterP,
+                                    RequiredSelections = [StdLooseANNProtons] )
+        
+        self.myPions   = Selection( 'PionsFor'+name,
+                                    Algorithm = trkFilterPi,
+                                    RequiredSelections = [StdLooseANNPions] )
+        
+        self.myKaons = Selection( 'KaonsFor'+name,
+                                    Algorithm = trkFilterK,
+                                    RequiredSelections = [StdAllLooseANNKaons] )
+
+        self.makeB2ppipipi(name, config)
+
+        self.makeBs2st2BK(name, config)
+
+        self.lineBs2st2pKpipipi = StrippingLine(name+'Line',
+                                         prescale         = config['Prescale'],
+                                         postscale        = config['Postscale'],
+                                         selection        = self.SelBs2pKpipipi)
+        
+        self.lineBs2st2pKpipipiSS = StrippingLine(name+'SSLine',
+                                         prescale         = config['Prescale'],
+                                         postscale        = config['Postscale'],
+                                         selection        = self.SelBs2pKpipipiSS)
+        
+        self.registerLine(self.lineBs2st2pKpipipi)
+        self.registerLine(self.lineBs2st2pKpipipiSS)
+        
+        self.lineBs2st2pKpipipiWS = StrippingLine(name+'WSLine',
+                                               prescale         = config['Prescale'],
+                                               postscale        = config['Postscale'],
+                                               selection        = self.SelBs2pKpipipiWS)
+        
+        self.lineBs2st2pKpipipiWSSS = StrippingLine(name+'WSSSLine',
+                                                 prescale         = config['Prescale'],
+                                                 postscale        = config['Postscale'],
+                                                 selection        = self.SelBs2pKpipipiWSSS)
+        
+        self.registerLine(self.lineBs2st2pKpipipiWS)
+        self.registerLine(self.lineBs2st2pKpipipiWSSS)
+        
+        
+    def makeB2ppipipi(self, name, config) :
+        '''Make the ppipipi combinations, both ++ (for B+-> Lc- p+ (3pi)+) and 0 total charge'''
+        
+        # Define all the cuts
+        _mass12CutPreVtx          = '(AM < (%s - 280)*MeV)'                                   % config['B_MaxM_4body']
+        _doca12chi2CutPreVtx      = '(ACHI2DOCA(1,2) < %s)'                                   % config['B_MaxDOCAChi2']
+        _combCuts12               = _mass12CutPreVtx+' & '+_doca12chi2CutPreVtx
+        
+        _mass123CutPreVtx         = '(AM < (%s - 140)*MeV)'                                   % config['B_MaxM_4body']
+        _doca123chi2CutPreVtx13   = '(ACHI2DOCA(1,3) < %s)'                                   % config['B_MaxDOCAChi2']
+        _doca123chi2CutPreVtx23   = '(ACHI2DOCA(2,3) < %s)'                                   % config['B_MaxDOCAChi2']
+        _combCuts123              = _mass123CutPreVtx+' & '+_doca123chi2CutPreVtx13+' & '+_doca123chi2CutPreVtx23
+        
+        
+        _massCutPreVtx            = '(AM > %s*MeV) & (AM             < %s*MeV)'               % (config['B_MinM_4body'], config['B_MaxM_4body'])
+        _sumptCutPreVtx           = '( (APT1 + APT2 + APT3 + APT4) > %s*MeV)'                 % config['B_MinSumPT_4body']
+        _ptCutPreVtx              = '(APT            > %s*MeV)'                               % config['B_MinPT_4body']
+        _docachi2CutPreVtx14      = '(ACHI2DOCA(1,4) < %s)'                                   % config['B_MaxDOCAChi2']
+        _docachi2CutPreVtx24      = '(ACHI2DOCA(2,4) < %s)'                                   % config['B_MaxDOCAChi2']
+        _docachi2CutPreVtx34      = '(ACHI2DOCA(3,4) < %s)'                                   % config['B_MaxDOCAChi2']
+        _combCuts                 = _massCutPreVtx+' & '+_sumptCutPreVtx+' & '+_ptCutPreVtx+' & '+\
+                                    _docachi2CutPreVtx14+' & '+_docachi2CutPreVtx24+' & '+_docachi2CutPreVtx34
+        
+        _vtxChi2CutPostVtx        = '(VFASPF(VCHI2/VDOF)  < %s)'                                   % config['B_MaxVtxChi2']
+        _fdChi2CutPostVtx         = '(BPVVDCHI2      > %s)'                                   % config['B_MinVDChi2']
+        _diraCutPostVtx           = '(BPVDIRA        > %s)'                                   % config['B_MinDira']
+        _motherCuts               = _vtxChi2CutPostVtx+' & '+_fdChi2CutPostVtx+' & '+_diraCutPostVtx
+        
+        _B                       = DaVinci__N4BodyDecays()
+        _B.Combination12Cut      = _combCuts12
+        _B.Combination123Cut     = _combCuts123
+        _B.CombinationCut        = _combCuts
+        _B.MotherCut             = _motherCuts
+        _B.DecayDescriptor       = "[B+ -> p+ pi- pi+ pi-]cc"
+        _B.ReFitPVs              = True
+
+        _B_pp                       = DaVinci__N4BodyDecays()
+        _B_pp.Combination12Cut      = _combCuts12
+        _B_pp.Combination123Cut     = _combCuts123
+        _B_pp.CombinationCut        = _combCuts
+        _B_pp.MotherCut             = _motherCuts
+        _B_pp.DecayDescriptor       = "[B+ -> p+ pi+ pi+ pi-]cc"
+        _B_pp.ReFitPVs              = True
+        
+        self.selB2ppipipi           = Selection("ppipipi_for_"+name, Algorithm = _B, RequiredSelections = [self.myProtons, self.myPions])
+        self.selB2ppipipi_plusplus  = Selection("ppipipi_pp_for_"+name, Algorithm = _B_pp, RequiredSelections = [self.myProtons, self.myPions])
+        
+    def makeBs2st2BK(self, name, config):
+        '''Make the BK opposite and same sign combinations for B -> ppipipi'''
+        _dmCut = '(AM - AM1 < %s*MeV)' % config['BK_MaxDM']
+        
+        _pperpMaxCut = '(Km_pperp < %s*MeV)' % config['Km_MaxPperp']
+        _pperpMinCut = '(Km_pperp > %s*MeV)' % config['Km_MinPperp']
+        _pperpCut = _pperpMaxCut + ' & ' + _pperpMinCut
+        
+        _pvzCut = '(abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),2))< %s*mm)' % config['BK_MaxPVDZ']
+        
+        _ptCut = '(PT > %s*MeV)' % config['BK_MinPT']
+        
+        self.Bs2pKpipipi = CombineParticles( DecayDescriptor = "[B*_s20 -> B+ K-]cc")
+        self.Bs2pKpipipi.CombinationCut = _dmCut + ' & ' + _pperpCut + ' & ' + _pvzCut
+        self.Bs2pKpipipi.MotherCut      = _ptCut
+        self.Bs2pKpipipi.ReFitPVs       = False
+
+        ## Calculates the K- momentum perpendicular to B direction. Bs2* decays have a max at ~280 MeV
+        self.Bs2pKpipipi.Preambulo = [ "from LoKiPhys.decorators import *",
+                                    "dx = (ACHILD(VFASPF(VX),1)-ACHILD(BPV(VX),1))",
+                                    "dy = (ACHILD(VFASPF(VY),1)-ACHILD(BPV(VY),1))",
+                                    "dz = (ACHILD(VFASPF(VZ),1)-ACHILD(BPV(VZ),1))",
+                                    "norm = (max(sqrt(dx*dx+dy*dy+dz*dz),0))",
+                                    "B_xdir  = ((dx)/norm)",
+                                    "B_ydir  = ((dy)/norm)",
+                                    "B_zdir  = ((dz)/norm)",
+                                    "pcos = (B_xdir*ACHILD(PX,2) + B_ydir*ACHILD(PY,2) + B_zdir*ACHILD(PZ,2))",
+                                    "Km_pperp = sqrt(ACHILD(P2,2) - pow(pcos,2))",
+        ]
+        
+        self.SelBs2pKpipipi = Selection(name,
+                                      Algorithm          = self.Bs2pKpipipi,
+                                      RequiredSelections = [self.selB2ppipipi_plusplus, self.myKaons])
+
+        self.Bs2pKpipipiSS = CombineParticles( DecayDescriptor = "[B*_s20 -> B+ K+]cc")
+        self.Bs2pKpipipiSS.CombinationCut = self.Bs2pKpipipi.CombinationCut
+        self.Bs2pKpipipiSS.MotherCut      = self.Bs2pKpipipi.MotherCut
+        self.Bs2pKpipipiSS.ReFitPVs       = self.Bs2pKpipipi.ReFitPVs
+        self.Bs2pKpipipiSS.Preambulo      = self.Bs2pKpipipi.Preambulo
+        
+        self.SelBs2pKpipipiSS = Selection(name + "SS",
+                                       Algorithm          = self.Bs2pKpipipiSS,
+                                       RequiredSelections = [self.selB2ppipipi_plusplus, self.myKaons])
+
+        ## WS (0 charge) B versions
+        self.SelBs2pKpipipiWS = Selection(name + "WS",
+                                      Algorithm          = self.Bs2pKpipipi,
+                                      RequiredSelections = [self.selB2ppipipi, self.myKaons])
+        self.SelBs2pKpipipiWSSS = Selection(name + "WSSS",
+                                       Algorithm          = self.Bs2pKpipipiSS,
+                                       RequiredSelections = [self.selB2ppipipi, self.myKaons])
+        
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingChargedHyperons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingChargedHyperons.py
new file mode 100644
index 000000000..f63b98517
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingChargedHyperons.py
@@ -0,0 +1,324 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping line for Omega --> Lambda,K and Xi --> Lambda pi derived from
+  Stripping line for HeavyBaryons studies : Xi_b-, Xi_b0 and Omega_b-
+  Author: Yasmine Amhis
+
+Updated for Run 2 from Run1 version; the only changes are in format
+'''
+__author__ = ['Mike Sokoloff, Laurence Carson']
+__date__ = '21/06/2015'
+__version__ = '$Revision: 1.0 $'
+__all__ = ('StrippingChargedHyperonsConf'
+           ,'default_config')
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons
+from StandardParticles import  StdAllLoosePions, StdAllLooseKaons
+
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from PhysSelPython.Wrappers import MultiSelectionSequence
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, mm, picosecond
+
+
+default_name='ChargedHyperons'
+    #### This is the dictionary of all tunable cuts ########
+default_config={
+      'NAME'        :   'ChargedHyperons',
+      'WGs'         :   ['Charm'],
+      'BUILDERTYPE' : 'StrippingChargedHyperonsConf',
+      'STREAMS'     : ['CharmCompleteEvent'],
+      'CONFIG'      : {
+                     'TRCHI2DOFMax'           : 3.0
+                   , 'PionPIDK'               :  5.0
+                   , 'KaonPIDK'               :  -5.0
+                   , 'XiMassWindow'           :  25 * MeV
+                   , 'OmegaMassWindow'        :  25 * MeV
+                   , 'LambdaLLMinDecayTime'   :  5.0 * picosecond
+                   , 'LambdaLLVtxChi2Max'     :   5.0
+                   , 'LambdaDDVtxChi2Max'     :   5.0
+                   , 'LambdaLLMassWin'        : 5.7 * MeV
+                   , 'LambdaDDMassWin'        : 5.7 * MeV
+                   , 'LambdaLLMinVZ'          : -100. * mm
+                   , 'LambdaLLMaxVZ'          :  400. * mm
+                   , 'LambdaDDMinVZ'          :  400. * mm
+                   , 'LambdaDDMaxVZ'          : 2275. * mm
+                   , 'TrGhostProbMax'         :  0.25
+                   , 'ProbNNkMin'             :  0.20
+                   , 'ProbNNpMinLL'           :  0.20
+                   , 'ProbNNpMinDD'           :  0.05
+                   , 'Bachelor_PT_MIN'        : 100 * MeV
+                   , 'Bachelor_BPVIPCHI2_MIN' : 100.
+                   , 'LambdaDeltaZ_MIN'       :  5.0 * mm
+                   , 'Hyperon_BPVLTIME_MIN'   :  5.0 * picosecond
+                   , 'PostVertexChi2_MIN'     :  5.0
+                   , 'LambdaPr_PT_MIN'        : 500. * MeV
+                   , 'LambdaPi_PT_MIN'        : 100. * MeV
+      } ## end of 'CONFIG' 
+}  ## end of default_config
+#-------------------------------------------------------------------------------------------------------------
+class StrippingChargedHyperonsConf(LineBuilder) :
+
+       __configuration_keys__ = default_config['CONFIG'].keys()
+
+       def __init__(self, name, config) :
+           LineBuilder.__init__(self, name, config)
+           self.name = name
+           self.config = config
+	
+
+       
+           self.LongPionsList = MergedSelection("LongPionsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")]) # take all long tracks
+ 
+           
+           self.DownstreamPionsList = MergedSelection("DownstreamPionsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")]) # take all long tracks
+ 
+           self.LongKaonsList = MergedSelection("LongKaonsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")]) # take all long tracks
+ 
+           
+           self.DownstreamKaonsList = MergedSelection("DownstreamKaonsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseDownKaons/Particles")]) # take all long tracks
+ 
+           
+
+           self.GoodLongPionsList = self.createSubSel( OutputList = "GoodLongPionsFor" + self.name,
+                                               InputList = self.LongPionsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                               " & (TRGHOSTPROB <%(TrGhostProbMax)s )" \
+                                               " & (PIDK < %(PionPIDK)s )" % self.config )
+
+
+           self.GoodDownstreamPionsList = self.createSubSel( OutputList = "GoodDownstreamPionsFor" + self.name,
+                                               InputList = self.DownstreamPionsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                               " & (PIDK < %(PionPIDK)s )" % self.config )
+
+           self.GoodLongKaonsList = self.createSubSel( OutputList = "GoodLongKaonsFor" + self.name,
+                                               InputList = self.LongKaonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                               " & (TRGHOSTPROB < %(TrGhostProbMax)s )" \
+                                               " & (PROBNNk > %(ProbNNkMin)s )" \
+                                               " & (PIDK > %(KaonPIDK)s )" % self.config )
+
+
+           self.GoodDownstreamKaonsList = self.createSubSel( OutputList = "GoodDownstreamKaonsFor" + self.name,
+                                               InputList = self.DownstreamKaonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                               " & (PROBNNk > %(ProbNNkMin)s )" \
+                                               " & (PIDK > %(KaonPIDK)s )" % self.config )
+
+
+           
+           
+           
+           self.LambdaListLooseDD = MergedSelection("StdLooseDDLambdaFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")])
+
+           self.LambdaListLooseLL = MergedSelection("StdLooseLLLambdaFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")])
+
+           self.LambdaListLL =  self.createSubSel(OutputList = "LambdaLLFor" + self.name,
+                                                InputList = self.LambdaListLooseLL ,
+                                                Cuts = "(MAXTREE('p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                                                "& (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                                                "& (MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMinLL)s ) "\
+                                                "& (MINTREE('pi-'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                                                "& (MINTREE('p+'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                                                "& (ADMASS('Lambda0') < %(LambdaLLMassWin)s ) "
+                                                "& (VFASPF(VCHI2/VDOF) < %(LambdaLLVtxChi2Max)s ) "\
+                                                "& (VFASPF(VZ) > %(LambdaLLMinVZ)s ) " \
+                                                "& (VFASPF(VZ) < %(LambdaLLMaxVZ)s ) " \
+                                                "& (BPVLTIME() > %(LambdaLLMinDecayTime)s )" % self.config \
+                                                )
+           
+           self.LambdaListDD =  self.createSubSel(OutputList = "LambdaDDFor" + self.name,
+                                                InputList = self.LambdaListLooseDD ,
+                                                Cuts = "(MAXTREE('p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                                                "& (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                                                "& (MAXTREE('p+'==ABSID, PROBNNp) > %(ProbNNpMinDD)s ) "\
+                                                "& (ADMASS('Lambda0') < %(LambdaDDMassWin)s ) " \
+                                                "& (VFASPF(VCHI2/VDOF) <  %(LambdaDDVtxChi2Max)s ) "\
+                                                "& (VFASPF(VZ) < %(LambdaDDMaxVZ)s ) " \
+                                                "& (VFASPF(VZ) > %(LambdaDDMinVZ)s )" % self.config \
+                                                )
+
+           self.LambdaList = MergedSelection("LambdaFor" + self.name,
+                                             RequiredSelections = [self.LambdaListLL, self.LambdaListDD]
+                                             )
+           
+           self.XiminusList = self.makeXiminus()
+           self.OmegaminusList = self.makeOmegaminus()
+           
+       def createSubSel( self, OutputList, InputList, Cuts ) :
+           '''create a selection using a FilterDesktop'''
+           filter = FilterDesktop(Code = Cuts)
+           return Selection( OutputList,
+                             Algorithm = filter,
+                             RequiredSelections = [ InputList ] ) 
+       def createCombinationSel( self, OutputList,
+                                 DecayDescriptor,
+                                 DaughterLists,
+                                 DaughterCuts = {} ,
+                                 PreVertexCuts = "ALL",
+                                 PostVertexCuts = "ALL" ) :
+           '''create a selection using a ParticleCombiner with a single decay descriptor'''
+           combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                        DaughtersCuts = DaughterCuts,
+                                        MotherCut = PostVertexCuts,
+                                        CombinationCut = PreVertexCuts,
+                                        ReFitPVs = True)
+           return Selection ( OutputList,
+                              Algorithm = combiner,
+                              RequiredSelections = DaughterLists)
+       
+
+
+#------------------------------------------------------------------------------------------
+
+       def makeXiminus( self ):
+            
+              ''' Make a Xi minus candidate from long tracks '''
+              Ximinus2LambdaPiLLL = self.createCombinationSel(OutputList = "Ximinus2LambdaPiLLL"+ self.name,
+                                                           DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.LambdaListLL],
+                                                           DaughterCuts    = {"pi-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi-') < %(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(PostVertexChi2_MIN)s ) & "\
+                                                                             " (BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s)  & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s)"% self.config
+                                                           )
+              
+            
+              ''' Make a Xi minus candidate  from a LambdaDD and along pion'''
+              Ximinus2LambdaPiDDL = self.createCombinationSel(OutputList = "Ximinus2LambdaPiDDL"+ self.name,
+                                                           DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.LambdaListDD],
+                                                           DaughterCuts    = {"pi-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi-') < %(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s) &"\
+                                                                             "(BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+                                                           ) 
+            
+              ''' Make a Xi minus candidate  from downstream tracks'''
+              Ximinus2LambdaPiDDD = self.createCombinationSel(OutputList = "Ximinus2LambdaPiDDD"+ self.name,
+                                                           DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamPionsList, self.LambdaListDD],
+                                                           DaughterCuts    = {"pi-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi-') < %(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s ) &"\
+                                                                             "(BPVLTIME() >  %(Hyperon_BPVLTIME_MIN)s ) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+
+                                                           )
+## Ximinus2LambdaPi is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+              Ximinus2LambdaPi = MergedSelection("Ximinus2LambdaPi"+self.name,
+                                                 #RequiredSelections = [Ximinus2LambdaPiLLL,Ximinus2LambdaPiDDL,Ximinus2LambdaPiDDD] )
+                                                 RequiredSelections = [Ximinus2LambdaPiDDD] ) #Keep only DDD lines in S29
+
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## Ximinus2Lambda2PiSelection is *also* a Selection, but it is "more selective" 
+## than  Ximinus2LambdaPi in the sense that it passes only events when something
+## is in the output list
+              Ximinus2LambdaPiSelection = Selection( "Ximinus2LambdaPiSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Ximinus2LambdaPi]) 
+              Ximinus2LambdaPiLine = StrippingLine (self.name + "Ximinus2LambdaPi",
+                                                         algos = [Ximinus2LambdaPiSelection])
+              self.registerLine (Ximinus2LambdaPiLine)
+
+##  --------------------  end of makeXiminus  ------------
+#------------------------------------------------------------------------------------------
+
+       def makeOmegaminus( self ):
+            
+              ''' Make an Omega minus candidate '''
+              Omegaminus2LambdaKLLL = self.createCombinationSel(OutputList = "Omegaminus2LambdaKLLL"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+                                                           DaughterLists   = [self.GoodLongKaonsList, self.LambdaListLL],
+                                                           DaughterCuts    = {"K-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s) &"\
+                                                                             "(BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+                                                           )
+             
+            
+              ''' Make an Omega minus candidate '''
+              Omegaminus2LambdaKDDL = self.createCombinationSel(OutputList = "Omegaminus2LambdaKDDL"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+                                                           DaughterLists   = [self.GoodLongKaonsList, self.LambdaListDD],
+                                                           DaughterCuts    = {"K-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s) &"\
+                                                                             "(BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+                                                           )
+             
+              ''' Make an Omega minus candidate '''
+              Omegaminus2LambdaKDDD = self.createCombinationSel(OutputList = "Omegaminus2LambdaKDDD"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamKaonsList, self.LambdaListDD],
+                                                           DaughterCuts    = {"K-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s) &"\
+                                                                             "(BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+                                                           )
+
+
+## Omegaminus2LambdaK is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+
+
+              Omegaminus2LambdaK = MergedSelection("Omegaminus2LambdaK"+self.name,
+                                                 #RequiredSelections = [Omegaminus2LambdaKLLL,Omegaminus2LambdaKDDL,Omegaminus2LambdaKDDD] )
+                                                 RequiredSelections = [Omegaminus2LambdaKDDL,Omegaminus2LambdaKDDD] ) #Keep only DDL and DDD lines in S29
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## Omegaminus2Lambda2PiSelection is *also* a Selection, but it is "more selective" 
+## than  Omegaminus2LambdaK in the sense that it passes only events when something
+## is in the output list
+              Omegaminus2LambdaKSelection = Selection( "Omegaminus2LambdaKSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Omegaminus2LambdaK])
+              Omegaminus2LambdaKLine = StrippingLine (self.name + "Omegaminus2LambdaK",
+                                                         algos = [Omegaminus2LambdaKSelection])
+              self.registerLine (Omegaminus2LambdaKLine)
+
+##  --------------------  end of makeOmegaminus  ------------
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharm2PPX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharm2PPX.py
new file mode 100644
index 000000000..23a69ab1c
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharm2PPX.py
@@ -0,0 +1,415 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+    Exotic six-quarks (hexa-quarks) with charm or strange: [c(s)u(d)][ud][ud] decaying to two same-sign protons
+    - Hc++ -> pp (exch , Cabibbo-suppr.)
+    - Hc++ -> ppK-pi+
+    - Hc+ -> ppK- (exch)
+    - Hc+ -> ppK-pi+pi-
+    - Hs+ -> pppi- : LLL and DDD
+"""
+
+
+__author__ = ['Ivan Polyakov']
+__date__ = ['17/11/2016']
+
+__all__ = (
+    'default_config',
+    'StrippingCharm2PPXConf' ##???
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from Configurables import CombineParticles, FilterDesktop
+#from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop, DaVinci__N3BodyDecays
+from StandardParticles import (
+    StdAllNoPIDsProtons,
+    StdAllNoPIDsKaons,
+    StdAllNoPIDsPions,
+    StdNoPIDsDownProtons,
+    StdNoPIDsDownPions,
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME': 'Charm2PPX',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingCharm2PPXConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        'Daug_All_CloneDist_MIN': 5000,
+        'Daug_All_TrChostProb_MAX': 0.5,
+        # Minimum transverse momentum all daughters must satisfy
+        'Daug_All_PT_MIN': 200.0*MeV,
+        # Minimum transverse momentum at least 1 daughter must satisfy
+        'Daug_1ofAll_PT_MIN': 700*MeV, # 500.0*MeV, # 1000
+        'HsDaug_1ofAll_PT_MIN': -500.0*MeV, # 1000
+        # Minimum best primary vertex IP chi^2 all daughters must satisfy
+        'Daug_All_BPVIPCHI2_MIN': 4.0,
+        'Daug_All_MIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 1 daughter must satisfy
+        'Daug_1ofAll_BPVIPCHI2_MIN': 9.0, # 9.0
+        'HsDaug_1ofAll_BPVIPCHI2_MIN': 9.0, # 9.0
+        'HsDownDaug_1ofAll_BPVIPCHI2_MIN': -9.0, #
+        # Minimum daughter momentum
+        'Daug_P_MIN': 3.2*GeV,
+        'Proton_P_MIN': 10.0*GeV,
+        'Proton_PT_MIN': 300.0*MeV, # -250*MeV,
+        # Maximum daughter momentum
+        'Daug_P_MAX': 100.0*GeV,
+        # Minimum daughter pseudorapidity
+        'Daug_ETA_MIN': 2.0,
+        # Maximum daughter pseudorapidity
+        'Daug_ETA_MAX': 4.9,
+        # Minimum daughter proton ProbNN
+        'Proton_ProbNN_MIN': 0.1,
+        'Proton_ProbNNpi_MAX': 0.55, #0.5
+        'Proton_ProbNNk_MAX': 0.8, #0.8
+        'Proton_1ofAll_ProbNN_MIN': 0.5,
+        'HsProton_1ofAll_ProbNN_MIN': 0.5,
+        # Minimum daughter kaon ProbNN
+        'Kaon_ProbNN_MIN': 0.1,
+        # Maximum daughter pion ProbNN
+        'Pion_ProbNN_MIN': 0.1,
+
+        # Hc maximum mass
+        'Comb_MASS_MAX': 3500*MeV , # 3350*MeV,
+        'HsComb_MASS_MAX': 2125*MeV,
+        # Maximum distance of closest approach of daughters
+        'Comb_ADOCACHI2_MAX': 16,
+        'HsComb_ADOCACHI2_MAX': 16,
+        # Maximum Hc vertex chi^2 per vertex fit DoF
+        'Hc_VCHI2VDOF_MAX': 25.0,
+        'Hs_VCHI2VDOF_MAX': 25.0,
+        # Maximum angle between Hc momentum and Hc direction of flight
+        'Hc_BPVIPCHI2_MAX': 16,
+        'Hs_BPVIPCHI2_MAX': 16,
+        # Primary vertex displacement requirement, that the Hc is some sigma
+        # away from the PV and it has a minimum flight time
+        'Hc_BPVVDCHI2_MIN': 9.0,
+        'Hc_BPVCTAU_MIN': 0.*mm, # 0.03*mm,
+        'Hs_BPVVDCHI2_MIN': 9.0,
+        'HsDown_BPVVDCHI2_MIN': 4.0,
+        'Hs_BPVCTAU_MIN': 0.1*mm,
+        # Hc minimum transverse momenta
+        'Hc_PT_MIN': -1000*MeV,
+        'Hs_PT_MIN': -1000*MeV,
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleHc2PP': 1.0,
+        'PrescaleHc2PPKPi': 1.0,
+        'PrescaleHc2PPK': 1.0,
+        'PrescaleHc2PPKPiPi': 1.0,
+        'PrescaleHs2PPPi': 1.0,
+        # Fraction of candidates to randomly throw after before stripping
+        'PostscaleHc2PP': 1.0,
+        'PostscaleHc2PPKPi': 1.0,
+        'PostscaleHc2PPK': 1.0,
+        'PostscaleHc2PPKPiPi': 1.0,
+        'PostscaleHs2PPPi': 1.0,
+    }
+}
+
+class StrippingCharm2PPXConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    Hc2pp = ['[Sigma_c++ -> p+ p+]cc']
+    Hc2ppkpi = ['[Sigma_c++ -> p+ p+ K- pi+]cc']
+    Hc2ppk = ['[Sigma_c+ -> p+ p+ K-]cc']
+    Hc2ppkpipi = ['[Sigma_c+ -> p+ p+ K- pi+ pi-]cc']
+
+    Hs2pppi = ['[Sigma_c+ -> p+ p+ pi-]cc']
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        # Line names
+        hc2pp_name = '{0}Hc2PP'.format(name)
+        hc2ppkpi_name = '{0}Hc2PPKPi'.format(name)
+        hc2ppk_name = '{0}Hc2PPK'.format(name)
+        hc2ppkpipi_name = '{0}Hc2PPKPiPi'.format(name)
+        
+        hs2pppi_name = '{0}Hs2PPPi'.format(name)
+        hs2pppiDown_name = '{0}Hs2PPPiDown'.format(name)
+
+        # Build pion, kaon, and proton cut strings
+        daugCuts = (
+            '(PT > {0[Daug_All_PT_MIN]})'
+            ' & (CLONEDIST > {0[Daug_All_CloneDist_MIN]} )'
+            ' & (TRGHOSTPROB < {0[Daug_All_TrChostProb_MAX]})'
+            ' & (MIPCHI2DV() > {0[Daug_All_MIPCHI2_MIN]})'
+        ).format(self.config)
+        pidFiducialCuts = (
+            '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+            '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+            ' & HASRICH'
+        ).format(self.config)
+        protonPIDCuts = (
+            pidFiducialCuts +
+            '& (PROBNNp > {0[Proton_ProbNN_MIN]})'
+            '& (PROBNNpi < {0[Proton_ProbNNpi_MAX]})'
+            '& (PROBNNk < {0[Proton_ProbNNk_MAX]})'
+            '& (P > {0[Proton_P_MIN]})'
+            '& (PT > {0[Proton_PT_MIN]})'
+        ).format(self.config)
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& (PROBNNk > {0[Kaon_ProbNN_MIN]})'
+        ).format(self.config)
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& (PROBNNpi > {0[Pion_ProbNN_MIN]})'
+        ).format(self.config)
+
+        pionCuts = '{0} & {1}'.format(daugCuts, pionPIDCuts)
+        kaonCuts = '{0} & {1}'.format(daugCuts, kaonPIDCuts)
+        protonCuts = '{0} & {1}'.format(daugCuts, protonPIDCuts)
+
+        # Filter StdAllNoPIDs particles
+        self.inPions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterPionsFor{0}'.format(name),
+                Code=pionCuts
+            ),
+            RequiredSelections=[StdAllNoPIDsPions]
+        )
+        self.inKaons = Selection(
+            'KaonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterKaonsFor{0}'.format(name),
+                Code=kaonCuts
+            ),
+            RequiredSelections=[StdAllNoPIDsKaons]
+        )
+        self.inProtons = Selection(
+            'ProtonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterProtonsFor{0}'.format(name),
+                Code=protonCuts
+            ),
+            RequiredSelections=[StdAllNoPIDsProtons]
+        )
+        self.inDownPions = Selection(
+            'DownPionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterDownPionsFor{0}'.format(name),
+                Code=pionCuts
+            ),
+            RequiredSelections=[StdNoPIDsDownPions]
+        )
+        self.inDownProtons = Selection(
+            'DownProtonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterDownProtonsFor{0}'.format(name),
+                Code=protonCuts
+            ),
+            RequiredSelections=[StdNoPIDsDownProtons]
+        )
+
+        self.selHc2PP = self.makeHc2PPX(
+            name=hc2pp_name,
+            inputSel=[self.inProtons],
+            decDescriptors=self.Hc2pp
+        )
+
+        self.selHc2PPKPi = self.makeHc2PPX(
+            name=hc2ppkpi_name,
+            inputSel=[self.inProtons, self.inKaons, self.inPions ],
+            decDescriptors=self.Hc2ppkpi
+        )
+
+        self.selHc2PPK = self.makeHc2PPX(
+            name=hc2ppk_name,
+            inputSel=[self.inProtons, self.inKaons ],
+            decDescriptors=self.Hc2ppk
+        )
+
+        self.selHc2PPKPiPi = self.makeHc2PPX(
+            name=hc2ppkpipi_name,
+            inputSel=[self.inProtons, self.inKaons, self.inPions ],
+            decDescriptors=self.Hc2ppkpipi
+        )
+
+        self.selHs2PPPi = self.makeHs2PPX(
+            name=hs2pppi_name,
+            inputSel=[self.inProtons, self.inPions ],
+            decDescriptors=self.Hs2pppi,
+            mipchi2_cut = config['HsDaug_1ofAll_BPVIPCHI2_MIN'],
+            vdchi2_cut = config['Hs_BPVVDCHI2_MIN'],
+        )
+
+        self.selHs2PPPiDown = self.makeHs2PPX(
+            name=hs2pppiDown_name,
+            inputSel=[self.inDownProtons, self.inDownPions ],
+            decDescriptors=self.Hs2pppi,
+            mipchi2_cut = config['HsDownDaug_1ofAll_BPVIPCHI2_MIN'],
+            vdchi2_cut = config['HsDown_BPVVDCHI2_MIN'],
+        )
+
+        ### lines
+
+        self.line_Hc2PP = self.make_line(
+            name='{0}Line'.format(hc2pp_name),
+            selection=self.selHc2PP,
+            prescale=config['PrescaleHc2PP'],
+            postscale=config['PostscaleHc2PP'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Hc2PPKPi = self.make_line(
+            name='{0}Line'.format(hc2ppkpi_name),
+            selection=self.selHc2PPKPi,
+            prescale=config['PrescaleHc2PPKPi'],
+            postscale=config['PostscaleHc2PPKPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Hc2PPK = self.make_line(
+            name='{0}Line'.format(hc2ppk_name),
+            selection=self.selHc2PPK,
+            prescale=config['PrescaleHc2PPK'],
+            postscale=config['PostscaleHc2PPK'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Hc2PPKPiPi = self.make_line(
+            name='{0}Line'.format(hc2ppkpipi_name),
+            selection=self.selHc2PPKPiPi,
+            prescale=config['PrescaleHc2PPKPiPi'],
+            postscale=config['PostscaleHc2PPKPiPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Hs2PPPi = self.make_line(
+            name='{0}Line'.format(hs2pppi_name),
+            selection=self.selHs2PPPi,
+            prescale=config['PrescaleHs2PPPi'],
+            postscale=config['PostscaleHs2PPPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Hs2PPPiDown = self.make_line(
+            name='{0}Line'.format(hs2pppiDown_name),
+            selection=self.selHs2PPPiDown,
+            prescale=config['PrescaleHs2PPPi'],
+            postscale=config['PostscaleHs2PPPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeHc2PPX(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a Hc -> p+ p+ X decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+
+        combCuts = (
+            '(AMAXCHILD(PT) > {0[Daug_1ofAll_PT_MIN]})'
+            ' & (AMAXCHILD(PROBNNp) > {0[Proton_1ofAll_ProbNN_MIN]})'
+            ' & (AMAXCHILD(BPVIPCHI2()) > {0[Daug_1ofAll_BPVIPCHI2_MIN]})'
+            " & (ACUTDOCACHI2({0[Comb_ADOCACHI2_MAX]}, ''))"
+        ).format(self.config)
+
+        HcCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[Hc_VCHI2VDOF_MAX]})'
+            ' & (BPVVDCHI2 > {0[Hc_BPVVDCHI2_MIN]})'
+            ' & (BPVLTIME(9)*c_light > {0[Hc_BPVCTAU_MIN]})'
+            ' & (M < {0[Comb_MASS_MAX]})'
+#            ' & (BPVIPCHI2() < {0[Hc_BPVIPCHI2_MAX]})'
+#            ' & (PT > {0[Hc_PT_MIN]})'
+        ).format(self.config)
+
+        _Hc = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            CombinationCut=combCuts,
+            MotherCut=HcCuts
+        )
+
+        return Selection(name, Algorithm=_Hc, RequiredSelections=inputSel)
+
+    def makeHs2PPX(self, name, inputSel, decDescriptors, mipchi2_cut, vdchi2_cut):
+        """Return a Selection instance for a Hs -> p+ p+ X decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+
+        combCuts = (
+            '(AMAXCHILD(PT) > {0[HsDaug_1ofAll_PT_MIN]})'
+            ' & (AMAXCHILD(PROBNNp) > {0[HsProton_1ofAll_ProbNN_MIN]})'
+            ' & (AMAXCHILD(BPVIPCHI2()) > {1})'
+            " & (ACUTDOCACHI2({0[HsComb_ADOCACHI2_MAX]}, ''))"
+        ).format(self.config,mipchi2_cut)
+
+        HsCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[Hs_VCHI2VDOF_MAX]})'
+            ' & (BPVVDCHI2 > {1})'
+            ' & (BPVLTIME(9)*c_light > {0[Hs_BPVCTAU_MIN]})'
+            ' & (M < {0[HsComb_MASS_MAX]})'
+#            ' & (BPVIPCHI2() < {0[Hs_BPVIPCHI2_MAX]})'
+#            ' & (PT > {0[Hs_PT_MIN]})'
+        ).format(self.config,vdchi2_cut)
+
+        _Hs = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            CombinationCut=combCuts,
+            MotherCut=HsCuts
+        )
+
+        return Selection(name, Algorithm=_Hs, RequiredSelections=inputSel)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmForVub.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmForVub.py
new file mode 100644
index 000000000..d1d29c70e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmForVub.py
@@ -0,0 +1,484 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingDstarD02KMuNu.py,v 1.0 2011-02-17 12:53:17 gmcgrego Exp $
+'''
+The format of this stripping line is borrowed very heavily from the StrippingDstarD02KMuNu
+line, by Grant McGregor.
+Stripping of four channels: D*->D0(KMuNu)pi, D*->D0(PiMuNu)pi, D+->K*0(K+pi-)MuNu and D+->Rho(pi+pi-)MuNu for the determination of Vub.
+'''
+
+__author__ = ['Patrick Owen']
+__date__ = '8/12/2011'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = ('CharmForVubConf',
+           'makeMuons',
+	   'makeKaonsFromB',
+	   'makePions',
+	   'makeKstar',
+           'makeDplus2VMuNu',
+           'makeBtoDplusVMuNu',
+           'makeD02HMuNu',
+           'makeBtoD',
+           'makeDstarD02HMuNu')
+
+from Gaudi.Configuration import *
+from Configurables import SubstitutePID
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseMuons, StdLooseKaons, StdAllLoosePions, StdLoosePions
+
+default_config = {
+   'NAME'        : 'CharmForVub',
+   'WGs' : ['Charm'],
+   'BUILDERTYPE' : 'CharmForVubConf',
+   'STREAMS' : [ 'Charm' ],
+   'CONFIG' : {'TRACK_MINIPCHI2' : 6,
+    'KAON_PIDK' : 3.,
+    'KAON_MinPT' : 600.,
+    'Kstar_MinPT' : 600.,
+    'Kstar_MassMax' : 1040.,
+    'Kstar_MassMin' : 750.,
+    'Rho_MinPT' : 600.,
+    'Rho_MassMax' : 1020,
+    'Rho_MassMin' : 530.,
+    'MUON_MinPT' : 800.,
+    'MUON_PIDmu' : 0,
+    'PION_MinPT' : 600.,
+    'PION_PIDmu' : -1.,
+    'PION_PIDK' : 0,
+    'PAIR_SumPTMin' : 2800.,
+    'D_MassMax' : 1950.,
+    'D_DOCA' : 0.07,
+    'D_MinP' : 20000.,
+    'D0_FD'  :  4.0,
+    'Dplus_FD'  :  4.0,
+    'D_MCORR_MIN'  : 1400.,
+    'D_MCORR_MAX'  : 2700.,
+    'D_BPVVDZ' : 0.,
+    'D_VtxChi2' : 9.,
+    'BtoD_DeltaMass_MIN' : 2700.,
+    'BtoD_DeltaMass_MAX' : 3700.,
+    'B_DIRA' : 0.9994,
+    'B_FDCHI2' : 100,
+    'Dstar_MassMin' : 300.,
+    'Dstar_DOCA' : 0.4,
+    'Dstar_VtxChi2' : 9.,
+    'Dstar_DeltaMass' : 200.,
+    'HLT_FILTER_VMuNu' : "(HLT_PASS_RE('Hlt2CharmSemilepD02HMuNu_.*Decision') | HLT_PASS_RE('Hlt2Topo.*Decision'))",
+    'HLT_FILTER_HMuNu' : "(HLT_PASS_RE('Hlt2CharmSemilepD02HMuNu_.*Decision') | HLT_PASS_RE('Hlt2CharmHadD02HHXDst_.*Decision'))",
+    #Pre and postscale
+    'VLinePrescale' : 1.0,
+    'HLinePrescale' : 1.0}
+}
+
+default_name = "CharmForVub"
+
+class CharmForVubConf(LineBuilder) :
+    """
+    Builder of pre-scaled D*->D0(HMuNu)pi, B->(D+->K*0(K+pi-)MuNu)+(3)track and B->(D+->Rho(pi+pi-)MuNu+(3)track stripping Selection and StrippingLine.
+
+    Exports as instance data members:
+    selKaons                   : Kaons for D+->K*0(K+pi-)MuNu
+    selMuons                   : Muons for D*->D0(HMuNu)pi, D+->K*0(K+pi-)MuNu and D+->Rho(pi+pi-)MuNu
+    selPions                   : Hard pions from D0/D+ 
+    selSlowPions               : Soft pions from D*+
+    selKstar                   : K*0 for D+->K*0MuNu
+    selRho                     : Rho0 for D+->RhoMuNu
+    selDplus2KstarMuNu         : D+->K*Mu+Nu  selection object
+    selDplus2RhoMuNu           : D+->RhoMu+Nu  selection object
+    selD02HMuNu               : D0->PiMu+Nu  selection object
+    selDstarD02HMuNu          : D*+->D0(HMuNu)pi+ selection object
+    selBtoDplus2RhoMuNu        : B->(D+->RhoMu+Nu)+tracks  selection object
+    selBtoDplusD02HMuNu       : B->(D+->D+->K*Mu+Nu)+tracks selection object
+    prescaled_KstarMuNu        : StrippingLine made out of selBtoDplusVMuNu
+    prescaled_HMuNu           : StrippingLine made out of selDstarD02HMuNu 
+    lines                      : List of lines
+
+    Exports as class data member:
+    CharmForVub.__configuration_keys__ : List of required configuration parameters.
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        prescaled_name = name
+
+        self.selMuons = makeMuons( 'MuonsFor'+prescaled_name, 
+				     MUON_MinPT = config['MUON_MinPT'],
+                                     MUON_PIDmu = config['MUON_PIDmu'])
+
+        self.selMuonsFromB = makeMuonsFromB( 'MuonsFromBFor'+prescaled_name,
+                                     muonSel = self.selMuons, 
+                                     TRACK_MINIPCHI2 = config['TRACK_MINIPCHI2'])
+
+
+
+        self.selKaons = makeKaons( 'KaonsFor'+prescaled_name, 
+				     KAON_PIDK = config['KAON_PIDK'], 
+				     KAON_MinPT = config['KAON_MinPT'])
+
+        self.selKaonsFromB = makeKaonsFromB( 'KaonsFromBFor'+prescaled_name,
+                                     kaonSel = self.selKaons,
+                                     TRACK_MINIPCHI2 = config['TRACK_MINIPCHI2'])
+
+        self.selPions = makePions( 'PionsFor'+prescaled_name, 
+				     PION_PIDmu = config['PION_PIDmu'],
+                                     PION_PIDK = config['PION_PIDK'],
+                                     PION_MinPT = config['PION_MinPT'])
+
+        self.selPionsFromB = makePionsFromB( 'PionsFromBFor'+prescaled_name,
+                                     pionSel = self.selPions,
+                                     TRACK_MINIPCHI2 = config['TRACK_MINIPCHI2'])
+
+        self.selSlowPions = makeSlowPions( 'SlowPionsFor'+prescaled_name, 
+				     PION_PIDmu = config['PION_PIDmu'])
+
+
+        self.selRho = makeRho( 'RhoFor'+prescaled_name, 
+                                     pionFromBSel = self.selPionsFromB,
+				     Rho_MinPT = config['Rho_MinPT'],
+				     Rho_MassMax = config['Rho_MassMax'],
+				     Rho_MassMin = config['Rho_MassMin'])
+
+        self.selKstar = makeKstar( 'KstarFor'+prescaled_name, 
+                                     pionFromBSel = self.selPionsFromB,
+                                     kaonFromBSel = self.selKaonsFromB,
+				     Kstar_MinPT = config['Kstar_MinPT'],
+				     Kstar_MassMax = config['Kstar_MassMax'],
+				     Kstar_MassMin = config['Kstar_MassMin'])
+
+
+
+        self.selDplus2VMuNu = makeDplus2VMuNu('Dplus2VMuNuFor'+prescaled_name,  
+                                            muonFromBSel = self.selMuonsFromB, 
+                                            RhoSel = self.selRho,
+                                            KstarSel = self.selKstar,
+					    PAIR_SumPTMin = config['PAIR_SumPTMin'],
+                                            D_MassMax = config['D_MassMax'],
+                                            D_DOCA = config['D_DOCA'],
+                                            D_MinP = config['D_MinP'],
+					    Dplus_FD = config['Dplus_FD'],
+					    D_MCORR_MIN = config['D_MCORR_MIN'],
+					    D_MCORR_MAX = config['D_MCORR_MAX'],
+                                            D_BPVVDZ = config['D_BPVVDZ'],
+                                            D_VtxChi2 = config['D_VtxChi2'])
+
+        self.selBtoDplusVMuNu = makeBtoDplusVMuNu('BtoDplusVMuNu'+prescaled_name,  
+                                            Dplus2VMuNuSel = self.selDplus2VMuNu, 
+                                            PionsFromBSel = self.selPionsFromB,
+                                            BtoD_DeltaMass_MIN = config['BtoD_DeltaMass_MIN'],
+                                            BtoD_DeltaMass_MAX = config['BtoD_DeltaMass_MAX'],
+                                            B_DIRA = config['B_DIRA'],
+                                            B_FDCHI2 = config['B_FDCHI2'])
+
+
+
+        self.selD02HMuNu = makeD02HMuNu('D0HMuNuFor'+prescaled_name,  
+                                            muonSel = self.selMuons, 
+                                            pionSel = self.selPions,
+                                            kaonSel = self.selKaons,
+					    PAIR_SumPTMin = config['PAIR_SumPTMin'],
+                                            D_MassMax = config['D_MassMax'],
+                                            D_DOCA = config['D_DOCA'],
+                                            D_MinP = config['D_MinP'],
+                                            D0_FD = config['D0_FD'],
+				            D_MCORR_MIN = config['D_MCORR_MIN'],
+					    D_MCORR_MAX = config['D_MCORR_MAX'],
+                                            D_BPVVDZ = config['D_BPVVDZ'],
+                                            D_VtxChi2 = config['D_VtxChi2'])
+
+        self.selDstarD02HMuNu = makeDstarD02HMuNu('DstarD0HMuNuFor'+prescaled_name,  
+                                            D02HMuNuSel = self.selD02HMuNu,
+					    slowPionSel = self.selSlowPions,
+                                            Dstar_MassMin = config['Dstar_MassMin'],
+                                            Dstar_DOCA = config['Dstar_DOCA'],
+                                            Dstar_VtxChi2 = config['Dstar_VtxChi2'],
+                                            Dstar_DeltaMass = config['Dstar_DeltaMass'])
+
+
+
+        self.prescaled_lineVMuNu = StrippingLine(prescaled_name+"VMuNuLine",
+		prescale = config['VLinePrescale'],
+                HLT2=config['HLT_FILTER_VMuNu'],
+                selection = self.selBtoDplusVMuNu
+		)
+        self.prescaled_lineHMuNu = StrippingLine(prescaled_name+"HMuNuLine",
+                prescale = config['HLinePrescale'],
+                HLT2=config['HLT_FILTER_HMuNu'],
+                selection = self.selDstarD02HMuNu
+                )
+        self.registerLine(self.prescaled_lineVMuNu)
+        self.registerLine(self.prescaled_lineHMuNu)
+
+
+def makeMuons(name, 
+              MUON_MinPT,
+              MUON_PIDmu) :
+    """
+    Create muons for all channels
+    """
+    _code = " ( 'mu+'  == ABSID ) & ISMUON & (PT > %(MUON_MinPT)s *MeV) & (PIDmu > %(MUON_PIDmu)s )" % locals()
+    _muonFilter = FilterDesktop (Code = _code ) 
+    return Selection (name,
+	              Algorithm = _muonFilter,
+		      RequiredSelections = [StdLooseMuons]) 
+
+def makeMuonsFromB(name,
+              muonSel, 
+              TRACK_MINIPCHI2) :
+    """
+    Create muons for all channels
+    """
+    _code = "(MIPCHI2DV(PRIMARY) > %(TRACK_MINIPCHI2)s )" % locals()
+    _muonFilter = FilterDesktop (Code = _code ) 
+    return Selection (name,
+	              Algorithm = _muonFilter,
+		      RequiredSelections = [muonSel]) 
+
+
+def makeKaons(name,
+	  KAON_PIDK,
+	  KAON_MinPT) :
+    """
+    Create kaons for Dplus->K*MuNu
+    """
+    _code = " ( 'K+'  == ABSID ) &  "\
+    "( %(KAON_PIDK)s < PIDK - PIDpi) & (PT > %(KAON_MinPT)s *MeV)" % locals()
+    _kaonFilter = FilterDesktop (Code = _code ) 
+    return Selection (name,
+	              Algorithm = _kaonFilter,
+		      RequiredSelections = [StdLooseKaons]) 
+
+def makeKaonsFromB(name,
+          kaonSel, 
+          TRACK_MINIPCHI2) :
+    """
+    Create hard kaons for all channels.
+    """
+    _code = "(MIPCHI2DV(PRIMARY) > %(TRACK_MINIPCHI2)s )" % locals()
+    _kaonFromBFilter = FilterDesktop (Code = _code ) 
+    return Selection (name,
+	              Algorithm = _kaonFromBFilter,
+		      RequiredSelections = [kaonSel]) 
+
+def makePions(name, 
+	  PION_PIDmu,
+          PION_PIDK,
+          PION_MinPT) :
+    """
+    Create hard pions for all channels
+    """
+    _code = "(PT > %(PION_MinPT)s ) & (PIDK < %(PION_PIDK)s ) & ( %(PION_PIDmu)s < PIDpi - PIDmu) " % locals()
+    _pionFilter = FilterDesktop (Code = _code ) 
+    return Selection (name,
+	              Algorithm = _pionFilter,
+		      RequiredSelections = [StdLoosePions]) 
+
+def makePionsFromB(name,
+          pionSel, 
+          TRACK_MINIPCHI2) :
+    """
+    Create hard pions for all channels
+    """
+    _code = "(MIPCHI2DV(PRIMARY) > %(TRACK_MINIPCHI2)s )" % locals()
+    _pionFromBFilter = FilterDesktop (Code = _code ) 
+    return Selection (name,
+	              Algorithm = _pionFromBFilter,
+		      RequiredSelections = [pionSel]) 
+
+def makeSlowPions(name, 
+	  PION_PIDmu) :
+    """
+    Create soft pions for D*->D0 pi
+    """
+    _code = "( %(PION_PIDmu)s < PIDpi - PIDmu) " % locals()
+    _slowPionFilter = FilterDesktop (Code = _code ) 
+    return Selection (name,
+	              Algorithm = _slowPionFilter,
+		      RequiredSelections = [StdAllLoosePions]) 
+
+
+
+def makeRho(name,
+                   pionFromBSel,
+		   Rho_MinPT,
+		   Rho_MassMax,
+		   Rho_MassMin) :
+    """
+    Create and return a Rho selection object.
+    """
+    _combinationCuts = "(AM < %(Rho_MassMax)s *MeV) "\
+        "& (AM > %(Rho_MassMin)s *MeV) " % locals()
+    _motherCuts = "(PT > %(Rho_MinPT)s *MeV) " % locals()
+    _Rho = CombineParticles( DecayDescriptor = "rho(770)0 -> pi- pi+",
+                            MotherCut = _motherCuts,
+                            CombinationCut = _combinationCuts)
+
+    return Selection (name,
+                      Algorithm = _Rho,
+                      RequiredSelections = [pionFromBSel])
+
+
+def makeKstar(name,
+                   pionFromBSel,
+		   kaonFromBSel,
+		   Kstar_MinPT,
+		   Kstar_MassMax,
+		   Kstar_MassMin) :
+    """
+    Create and return a Kstar selection object.
+    """
+    _combinationCuts = "(AM < %(Kstar_MassMax)s *MeV) "\
+        "& (AM > %(Kstar_MassMin)s *MeV) " % locals()
+    _motherCuts = "(PT > %(Kstar_MinPT)s *MeV)  " % locals()
+    _Kstar = CombineParticles( DecayDescriptor = "[K*(892)0 -> K- pi+]cc",
+                            MotherCut = _motherCuts,
+                            CombinationCut = _combinationCuts)
+
+    return Selection (name,
+                      Algorithm = _Kstar,
+                      RequiredSelections = [kaonFromBSel,pionFromBSel])
+
+def makeDplus2VMuNu(name,
+                   muonFromBSel,
+                   RhoSel,
+		   KstarSel,
+		   PAIR_SumPTMin,
+		   D_MassMax,
+		   D_DOCA,
+		   D_MinP,
+		   Dplus_FD,
+		   D_MCORR_MIN,
+		   D_MCORR_MAX,
+		   D_BPVVDZ,
+		   D_VtxChi2) :
+    """
+    Create and return a D+ -> VMuNu selection object.
+    """
+    
+    hadrons = MergedSelection("MergedVectorHadrons"+name,
+                                RequiredSelections = [KstarSel,RhoSel])
+
+
+    _combinationCuts = "(AM < %(D_MassMax)s *MeV) "\
+    "& ((APT1+APT2) > %(PAIR_SumPTMin)s *MeV) "\
+    "& (AMAXDOCA('') < %(D_DOCA)s *mm )" % locals()
+    _motherCuts = "(P > %(D_MinP)s *MeV)  "\
+    "& (BPVVD > %(Dplus_FD)s *mm) "\
+    "& (in_range(%(D_MCORR_MIN)s *MeV ,BPVCORRM,%(D_MCORR_MAX)s *MeV)) "\
+    "& (BPVVDZ > %(D_BPVVDZ)s *mm) "\
+    "& (VFASPF(VCHI2/VDOF)<%(D_VtxChi2)s) " % locals()
+    _Dplus2VMuNu = CombineParticles( DecayDescriptors = [
+                                         "[D+ -> mu+ K*(892)0]cc",
+                                         "[D+ -> mu+ rho(770)0]cc"],
+                            MotherCut = _motherCuts,
+			    CombinationCut = _combinationCuts )
+
+    return Selection (name,
+                      Algorithm = _Dplus2VMuNu,
+                      RequiredSelections = [muonFromBSel,hadrons])
+
+def makeBtoDplusVMuNu(name,
+                   Dplus2VMuNuSel,
+		   PionsFromBSel,
+                   BtoD_DeltaMass_MIN,
+                   BtoD_DeltaMass_MAX,
+                   B_DIRA,
+                   B_FDCHI2)  :
+    """
+    Create and return a B-> D + (3) track selection object.
+    """
+    _motherCuts = "(in_range(%(BtoD_DeltaMass_MIN)s *MeV ,( M - CHILD(M,1) ),%(BtoD_DeltaMass_MAX)s *MeV)) "\
+                  " & (BPVDIRA > %(B_DIRA)s)"\
+                  " & (BPVVDCHI2 > %(B_FDCHI2)s)" % locals()
+    _BtoDplus2KstarMuNu = CombineParticles( DecayDescriptors = [
+                                         " [B0 -> D+ pi-]cc" ,
+					 " [B0 -> D+ pi- pi+ pi-]cc"
+					 ],					 
+                            MotherCut = _motherCuts)
+    return Selection (name,
+                      Algorithm = _BtoDplus2KstarMuNu,
+                      RequiredSelections = [Dplus2VMuNuSel, PionsFromBSel])
+
+
+
+def makeD02HMuNu(name,
+                   muonSel,
+		   pionSel,
+                   kaonSel,
+		   PAIR_SumPTMin,
+		   D_MassMax,
+		   D_DOCA,
+		   D_MinP,
+		   D0_FD,
+		   D_MCORR_MIN,
+		   D_MCORR_MAX,
+		   D_BPVVDZ,
+		   D_VtxChi2) :
+
+    hadrons = MergedSelection("MergedScalarHadrons"+name,
+                                RequiredSelections = [pionSel,kaonSel])
+
+    """
+    Create and return a D0 -> HMuNu selection object.
+    """
+    _combinationCuts = "(AM < %(D_MassMax)s *MeV) "\
+    "& ((APT1+APT2) > %(PAIR_SumPTMin)s *MeV) "\
+    "& (AMAXDOCA('') < %(D_DOCA)s *mm )" % locals()
+    _motherCuts = "(P > %(D_MinP)s *MeV)  "\
+    "& (BPVVD > %(D0_FD)s *mm) "\
+    "& (in_range(%(D_MCORR_MIN)s *MeV ,BPVCORRM,%(D_MCORR_MAX)s *MeV)) "\
+    "& (BPVVDZ > %(D_BPVVDZ)s *mm) "\
+    "& (VFASPF(VCHI2/VDOF)<%(D_VtxChi2)s) " % locals()
+    _D02HMuNu = CombineParticles( DecayDescriptors = ["[D0 -> mu+ pi-]cc",
+                                                      "[D0 -> mu+ pi+]cc",
+                                                      "[D0 -> mu+ K+]cc",
+                                                      "[D0 -> mu+ K-]cc"
+                                                     ],
+                            MotherCut = _motherCuts,
+			    CombinationCut = _combinationCuts )
+
+    return Selection (name,
+                      Algorithm = _D02HMuNu,
+                      RequiredSelections = [muonSel,hadrons])
+
+def makeDstarD02HMuNu(name,
+                   D02HMuNuSel,
+		   slowPionSel,
+		   Dstar_MassMin,
+		   Dstar_DOCA,
+		   Dstar_VtxChi2,
+		   Dstar_DeltaMass)  :
+    """
+    Create and return a D* -> pi D0(HMuNu) selection object.
+    """
+    _combinationCuts = "(AM > %(Dstar_MassMin)s *MeV) "\
+    "& (AMAXDOCA('') < %(Dstar_DOCA)s *mm)" % locals()
+    _motherCuts = " (VFASPF(VCHI2/VDOF)< %(Dstar_VtxChi2)s ) & ( ( M - CHILD(M,1) ) < %(Dstar_DeltaMass)s *MeV )  " % locals()
+
+    _DstarD02HMuNu = CombineParticles( DecayDescriptors = [
+                                         " [D*(2010)+ -> D0 pi+]cc" ,
+					 " [D*(2010)- -> D0 pi-]cc"
+					 ],					 
+                            MotherCut = _motherCuts,
+			    CombinationCut = _combinationCuts )
+
+    return Selection (name,
+                      Algorithm = _DstarD02HMuNu,
+                      RequiredSelections = [D02HMuNuSel, slowPionSel])
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmFromBSemi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmFromBSemi.py
new file mode 100644
index 000000000..d2ad7ea93
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmFromBSemi.py
@@ -0,0 +1,1329 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for selecting charm decays from semileptonic B decays.
+Following decays are included:
+* D0 -> HHKs,HHPi0,HHHH,KsKs,HHKsPi0 (also lines with D* tag)
+* D+ -> HHH(some),HKs,HMuMu,HHHPi0,HHHKs
+* Lc+ -> pHH, pKs, pMuMu, HLambda
+"""
+__author__ = ['Mika Vesterinen']
+__date__ = '08/03/2012'
+__version__ = '$Revision: 0.9 $'
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from GaudiConfUtils.ConfigurableGenerators  import DaVinci__N4BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseElectrons, StdLooseMuons, StdAllLooseMuons, StdLooseKaons, StdLooseProtons, StdNoPIDsPions, StdLooseMergedPi0, StdLooseResolvedPi0, StdAllNoPIDsPions, StdNoPIDsUpPions, StdLooseAllPhotons, StdAllLooseGammaLL, StdAllLooseGammaDD
+from Configurables import ConjugateNeutralPID
+from PhysSelPython.Wrappers import MergedSelection
+
+__all__ = ('CharmFromBSemiAllLinesConf',
+           'makeb2DMuX',
+           'makeb2DX',
+           'makeDstar',
+           'TOSFilter',
+           'confdict')
+
+default_config = {
+    'NAME' : 'CharmFromBSemi',
+    'BUILDERTYPE' : 'CharmFromBSemiAllLinesConf',
+    'STREAMS' : ['Charm'] ,
+    'WGs'    : ['Charm'],
+    'CONFIG':{
+    "GEC_nLongTrk"   : 250    # adimensional
+    ,"TTSpecs"      : {'Hlt1.*Track.*Decision%TOS':0,'Hlt2Topo.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0,"Hlt2Global%TIS":0}
+    ,"HLT2"   : "HLT_PASS_RE('Hlt2.*SingleMuon.*Decision') | HLT_PASS_RE('Hlt2Topo.*Decision')"
+    ,"TrGhostProbMax": 0.5    # adimensional
+    ,"MinBMass"      : 2500   # MeV
+    ,"MaxBMass"      : 7500   # MeV
+    ,"MINIPCHI2"     : 9.0    # adimensiional
+    ,"TRCHI2"        : 4.0    # adimensiional
+    ,"KaonPIDK"      : 4.0    # adimensiional
+    ,"PionPIDK"      : 10.0   # adimensiional
+    ,"PionPIDKTight" : 4.0    # adimensiional
+    ,"MuonIPCHI2"    : 4.0    # adimensiional
+    ,"MuonPT"        : 600.0  # MeV
+    ,"KPiPT"         : 250.0  # MeV
+    ,"DsDIRA"        : 0.99   # adimensiional
+    ,"DsFDCHI2"      : 100.0  # adimensiional
+    ,"DsMassWin"     : 80.0   # MeV
+    ,"DsAMassWin"    : 100.0  # MeV
+    ,"Dto4h_MassWin" : 60.0   # MeV
+    ,"Dto4h_AMassWin": 65.0   # MeV
+    ,"DsIP"          : 7.4    # mm
+    ,"DsVCHI2DOF"    : 6.0    # adimensiional
+    ,"PIDmu"         : -0.0   # adimensiional
+    ,"BDIRA"         : 0.999  # adimensiional
+    ,"BVCHI2DOF"     : 6.0    # adimensiional
+    ,"DZ"            : 0      #mm
+    ,"DDocaChi2Max"  : 20     #adimensiional
+    ,"Dto4hADocaChi2Max"  : 7     #adimensiional
+    ,"MINIPCHI2Loose": 4.0   #adimensiional
+    ,"KaonPIDKloose" : -5     #adimensiional
+    ,'KSCutZFDFromD' :   10.0  #mm
+    ,'KSLLPMin'         : 2000  ## MeV
+    ,'KSLLPTMin'        : 200   ## MeV
+    ,'KSDDPMin'         : 2000  ## MeV
+    ,'KSDDPTMin'        : 200   ## MeV
+    ,'KSLLCutMass'      : 35    ## MeV
+    ,'KSDDCutMass'      : 35    ## MeV
+    ,'KSLLCutFDChi2'    : 100   ## unitless
+    ,'KSDDCutFDChi2'    : 100   ## unitless
+    ,'KSDaugTrackChi2'  : 4     ## max chi2/ndf for Ks daughter tracks
+    ,'KSVertexChi2'     : 6     ## max chi2/ndf for Ks vertex
+    ,'KSCutDIRA'        : 0.99  ## unitless
+    ,'LambdaLLPMin'       : 2000 ## MeV
+    ,'LambdaLLPTMin'      : 500  ## MeV
+    ,'LambdaLLCutMass'    : 30   ## MeV
+    ,'LambdaLLCutFDChi2'  : 100  ## unitless
+    ,'LambdaDDPMin'       : 3000 ## MeV
+    ,'LambdaDDPTMin'      : 800  ## MeV
+    ,'LambdaDDCutMass'    : 30   ## MeV
+    ,'LambdaDDCutFDChi2'  : 100  ## unitless
+    ,'LambdaCutDIRA'      : 0.99 ## unitless
+    ,'LambdaDaugTrackChi2': 4    ## unitless
+    ,'LambdaVertexChi2'   : 6    ## max chi2/ndf for Lambda0 vertex
+    ,"Pi0PtMin"         : 1000   # Minimum Pt of pi0 (MeV)
+    ,"Pi0PMin"          : 2000   # Minimum P of pi0 (MeV)
+    ,"PhotonCL"         : 0.25   # Confidence level for Pi0 photons
+    ,"D02HHPi0AMassWin" : 220  # MeV (mass window for combination)
+    ,"D02HHPi0MassWin"  : 210  # MeV (mass window after vertex fit)
+    ,"D02KSHHPi0AMassWin" : 260  # MeV (mass window for combination)
+    ,"D02KSHHPi0MassWin"  : 230  # MeV (mass window after vertex fit)
+    ,"D02KSHHPi0_D0PTComb"	: 1000 # MeV (PT of D0 combination)
+    ,"D02KSHHPi0_D0PT"	: 1000 # MeV (PT of D0 combination)
+    ,"D02KSHHPi0_PTSUMLoose"  : 1000 # MeV (sum PT of D0 daughters)
+    ,"D02HHPi0DocaCut"  : 6.0    # mm
+    ,"Dstar_Chi2"       :  8.0 ## unitless
+    ,"Dstar_SoftPion_PIDe" : 2. ## unitless
+    ,"Dstar_SoftPion_PT" : 80. ## MeV ###
+    ,"Dstar_wideDMCutLower" : 0. ## MeV
+    ,"Dstar_wideDMCutUpper" : 170. ## MeV
+    ,"PTSUMLoose"  : 1400. ## MeV
+    ,"PTSUM"       : 1800. ## MeV
+    ,"PTSUM_HHPi0" : 1800. ## MeV
+    #Photons
+    ,"PhotonPT"                : 1500 ## MeV
+    ,"MaxConvPhLLMass"         : 100 ## MeV
+    ,"MaxConvPhLLChi"          : 9
+    ,"MinConvPhLLPT"           : 800 ## MeV
+    ,"MaxConvPhDDMass"         : 100 ## MeV
+    ,"MaxConvPhDDChi"          : 9
+    ,"MinConvPhDDPT"           : 800 ## MeV
+      # X -> HH
+    ,'CombMassLow_HH'          : 0 ## MeV
+    ,'CombMassHigh_HH'         : 1820 ## MeV
+    ,'MassLow_HH'              : 0 ## MeV
+    ,'MassHigh_HH'             : 1810 ## MeV
+    ,'MaxVCHI2NDOF_HH'         : 10.0
+    ,'MinVDCHI2_HH'            : 1000.0
+      # D0 -> X Gamma
+    ,'D02HHGammaAMassWin'      : 220  # MeV (mass window for combination)
+    ,'D02HHGammaMassWin'       : 210  # MeV (mass window after vertex fit)
+    ,'PTSUM_HHGamma'           : 1800. ## MeV
+    ,"DtoXgammaADocaChi2Max"   : 10     #adimensiional
+      #Prescales
+    ,'D0decaysPrescale'        : 1
+    ,'D0radiativePrescale'     : 1
+    ,'D02HHHHPrescale'         : 1
+    ,'b2DstarMuXPrescale'      : 1
+    ,'DsdecaysPrescale'        : 1
+    ,'Ds2HHHHPrescale'         : 1
+    ,"Lc2HHPrescale"           : 1
+    ,"Lc2HHHPrescale"          : 1
+        }
+        }
+
+class CharmFromBSemiAllLinesConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    __confdict__={}
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+
+        GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                     "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        Dstar_cuts = {
+            "Dstar_Chi2" : config["Dstar_Chi2"],
+            "Dstar_SoftPion_PIDe" : config["Dstar_SoftPion_PIDe"],
+            "Dstar_SoftPion_PT" : config["Dstar_SoftPion_PT"],
+            "Dstar_wideDMCutLower" : config["Dstar_wideDMCutLower"],
+            "Dstar_wideDMCutUpper" : config["Dstar_wideDMCutUpper"]
+            }
+        BCuts = {'BVCHI2DOF': config['BVCHI2DOF'],
+                 'BDIRA': config['BDIRA'],
+                 'MinBMass': config['MinBMass'],
+                 'MaxBMass': config['MaxBMass'],
+                 'DZ': config['DZ'],
+                 "TTSpecs":config["TTSpecs"]}
+
+        ##########################################################################
+        ## FINAL STATE PARTICLE SELECTION ##
+        ##########################################################################
+
+        self.selmuon = Selection( "SelMufor" + name,
+                                  Algorithm = self._muonFilter("Mufor"+name),
+                                  RequiredSelections = [StdLooseMuons])
+
+        self.selKaon = Selection( "SelKfor" + name,
+                                  Algorithm = self._kaonFilter("Kfor"+name),
+                                  RequiredSelections = [StdLooseKaons])
+
+        self.selPion = Selection( "SelPifor" + name,
+                                  Algorithm = self._pionFilter("Pifor"+name),
+                                  RequiredSelections = [StdLoosePions])
+
+        self.selProton = Selection( "SelProtonfor" + name,
+                                    Algorithm = self._protonFilter("Protonfor"+name),
+                                    RequiredSelections = [StdLooseProtons])
+
+        self.selPionTight = Selection( "SelPiTightfor" + name,
+                                       Algorithm = FilterDesktop( name = "PiTightFor"+name,
+                                                                  Code = "(TRCHI2DOF < %(TRCHI2)s) & (P>2.0*GeV) & (PT > %(KPiPT)s *MeV)"\
+                                                                      "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s) &  (PIDK< %(PionPIDKTight)s)" % self.__confdict__ ),
+                                       RequiredSelections = [StdLoosePions])
+
+        self.selPionloose = Selection( "SelPiloosefor" + name,
+                                       Algorithm = self._pionlooseFilter("Piloosefor"+name),
+                                       RequiredSelections = [StdNoPIDsPions])
+
+        self.selKaonloose = Selection( "SelKloosefor" + name,
+                                       Algorithm = self._kaonlooseFilter("Kloosefor"+name),
+                                       RequiredSelections = [StdLooseKaons])
+
+        self.AllKaonsAndPions = MergedSelection("SelAllKaonsAndPionsFor"+name,
+                                                RequiredSelections = [ self.selKaon,self.selPion])
+
+
+        self.selPi0Resolved = Selection( "SelPi0Resolvedfor" + name,
+                                         Algorithm = self._Pi0ResolvedFilter("Pi0Resolvedfor"+name),
+                                         RequiredSelections = [StdLooseResolvedPi0])
+
+        self.selPi0Merged = Selection( "SelPi0Mergedfor" + name,
+                                       Algorithm = self._Pi0MergedFilter("PiMergedfor"+name),
+                                       RequiredSelections = [StdLooseMergedPi0])
+
+        self.AllPi0s = MergedSelection("SelAllPi0sFor"+name,
+                                       RequiredSelections = [ self.selPi0Resolved,self.selPi0Merged])
+
+        self.selGamma = Selection("SelGammaFor"+name,
+                                  Algorithm = self._PhotonFilter("GammaFor"+name),
+                                  RequiredSelections = [ StdLooseAllPhotons ] )
+        self.selGammaResLL = Selection("SelGammaResLLFor"+name,
+                                       Algorithm = self._PhotonConvLLFilter("GammaLLFor"+name),
+                                       RequiredSelections = [ StdAllLooseGammaLL ] )
+        self.selGammaResDD = Selection("SelGammaResDDFor"+name,
+                                       Algorithm = self._PhotonConvDDFilter("GammaDDFor"+name),
+                                       RequiredSelections = [ StdAllLooseGammaDD ] )
+        self.AllGammas = MergedSelection("SelAllGammasFor"+name,
+                                         RequiredSelections = [self.selGamma, self.selGammaResLL, self.selGammaResDD] )
+
+        self.selSlowPion = DataOnDemand(Location = 'Phys/StdAllLoosePions/Particles')
+        self.selSlowPionUp = DataOnDemand(Location = 'Phys/StdLooseANNUpPions/Particles')
+        self.selSlowPionAll = MergedSelection("AllSlowPionfor", RequiredSelections = [self.selSlowPion,self.selSlowPionUp])
+
+        self.selKSLL = Selection("SelKsLLfor"+name,
+                                 Algorithm = self._KsLLFilter("KsLLfor"+name),
+                                 RequiredSelections = [DataOnDemand("Phys/StdLooseKsLL/Particles")])
+
+        self.selKSDD = Selection("SelKsDDfor"+name,
+                                 Algorithm = self._KsDDFilter("KsDDfor"+name),
+                                 RequiredSelections = [DataOnDemand("Phys/StdLooseKsDD/Particles")])
+
+        self.selKSLLNoFDChi2 = Selection("SelKsLLNoFDChi2for"+name,
+                                 Algorithm = self._KsLLNoFDChi2Filter("KsLLNoFDChi2for"+name),
+                                 RequiredSelections = [DataOnDemand("Phys/StdVeryLooseKsLL/Particles")])
+
+        self.selKSDDNoFDChi2 = Selection("SelKsDDNoFDChi2for"+name,
+                                 Algorithm = self._KsDDNoFDChi2Filter("KsDDNoFDChi2for"+name),
+                                 RequiredSelections = [DataOnDemand("Phys/StdLooseKsDD/Particles")])
+
+        self.combLooseKsLL = CombineParticles ("KsLLCombFor"+name,
+                                               DecayDescriptor = "KS0 -> pi+ pi-",
+                                               CombinationCut = "(ADAMASS('KS0') < 27.*MeV) & (ADOCACHI2CUT(25, '')) ",
+                                               MotherCut = "(ADMASS('KS0') < 25.*MeV) & ( BPVLTIME() > 3.0*ps) & (VFASPF(VCHI2) < 9.)")
+
+        self.selLooseKsLL = Selection("SelKsLLFor"+name,
+                                      Algorithm = self.combLooseKsLL,
+                                      RequiredSelections = [ StdAllNoPIDsPions ])
+
+        self.combKsLU_PosLong = CombineParticles("KsLUComb_PosLongFor"+name,
+                                                 DecayDescriptor = "KS0 -> pi+ pi-",
+                                                 DaughtersCuts = { "pi+" : "(ISLONG)",
+                                                                   "pi-" : "(ISUP)" } ,
+                                                 CombinationCut = "(ADAMASS('KS0') < 27.*MeV) & (ADOCACHI2CUT(25, '')) ",
+                                                 MotherCut = "(ADMASS('KS0') < 25.*MeV) & ( BPVLTIME() > 3.0*ps) & (VFASPF(VCHI2) < 9.)")
+
+        self.combKsLU_NegLong = CombineParticles("KsLUComb_NegLongFor"+name,
+                                                 DecayDescriptor = "KS0 -> pi+ pi-",
+                                                 DaughtersCuts = { "pi+" : "(ISUP)",
+                                                                   "pi-" : "(ISLONG)" } ,
+                                                 CombinationCut = "(ADAMASS('KS0') < 27.*MeV) & (ADOCACHI2CUT(25, '')) ",
+                                                 MotherCut = "(ADMASS('KS0') < 25.*MeV) & ( BPVLTIME() > 3.0*ps) & (VFASPF(VCHI2) < 9.)")
+
+        self.selKsLU_PosLong = Selection("SelKsLU_PosLongFor"+name,
+                                         Algorithm = self.combKsLU_PosLong,
+                                         RequiredSelections = [ StdAllNoPIDsPions,StdNoPIDsUpPions])
+
+        self.selKsLU_NegLong = Selection("SelKsLU_NegLongFor"+name,
+                                         Algorithm = self.combKsLU_NegLong,
+                                         RequiredSelections = [ StdAllNoPIDsPions,StdNoPIDsUpPions])
+
+        self.selAllKs_Loose = MergedSelection("SelMergedAllKsLooseFor"+name,
+                                              RequiredSelections = [ self.selKsLU_PosLong,self.selKsLU_NegLong,self.selLooseKsLL,self.selKSDD])
+
+        _stdLooseLambdaLL = DataOnDemand("Phys/StdLooseLambdaLL/Particles")
+        _stdLooseLambdaDD = DataOnDemand("Phys/StdLooseLambdaDD/Particles")
+
+        self.selLambdaLL = Selection("SelLambdaLLfor"+name,
+                                 Algorithm = self._LambdaLLFilter("LambdaLLfor"+name),
+                                 RequiredSelections = [_stdLooseLambdaLL])
+
+        self.selLambdaDD = Selection("SelLambdaDDfor"+name,
+                                 Algorithm = self._LambdaDDFilter("LambdaDDfor"+name),
+                                 RequiredSelections = [_stdLooseLambdaDD])
+
+        self.selAllLambda = MergedSelection("SelAllLambdaFor"+name,
+                                            RequiredSelections = [ self.selLambdaLL,self.selLambdaDD])
+
+        ##########################################################################
+        ## D0 -> KsKs ##
+        ## Contact: Mika Vesterinen
+        ##########################################################################
+
+        BCutsKsKs = BCuts.copy()
+        BCutsKsKs["DZ"] = -9999
+
+        self.sel_D0_to_KsKs = Selection('SelD02KsKsfor'+name,
+                                        Algorithm = self._D02KsKsFilter(['D0 -> KS0 KS0'],'D02KsKsfor'+name),
+                                        RequiredSelections = [self.selAllKs_Loose])
+        self.sel_Dstar_to_KsKs = makeDstar('Dstar_KsKs_For'+name,self.sel_D0_to_KsKs,self.selSlowPion,Dstar_cuts)
+
+        self.selb2D0MuXKsKs = makeb2DMuX('b2D0MuXKsKs' + name,
+                                         [ '[B- -> D0 mu-]cc', '[B+ -> D0 mu+]cc' ],
+                                         self.selmuon,self.sel_D0_to_KsKs,BCuts)
+
+        self.selb2DstarMuXKsKs = makeb2DMuX('b2DstarMuXKsKs' + name,
+                                            [ '[B0 -> D*(2010)+ mu-]cc', '[B0 -> D*(2010)+ mu+]cc' ],
+                                            self.selmuon,self.sel_Dstar_to_KsKs,BCuts)
+
+        ##########################################################################
+        ## D0 -> 4H SELECTION ##
+        ## Contact: Maurizio Martinelli
+        ##########################################################################
+
+        self.sel_D0_to_4Pi = Selection( 'Sel_D0_to_4Pi_for' + name,
+                                        Algorithm = self._D02HHHHFilter(['D0 -> pi- pi+ pi- pi+'],'D0_to_4Pi_for' + name),
+                                        RequiredSelections = [self.selPion] )
+        self.sel_Dstar_to_4Pi = makeDstar('Dstar_4PiFor'+name,self.sel_D0_to_4Pi,self.selSlowPion,Dstar_cuts)
+
+
+        self.sel_D0_to_K3Pi = Selection( 'Sel_D0_to_K3Pi_for' + name,
+                                         Algorithm = self._D02HHHHFilter(['[D0 -> K- pi+ pi- pi+]cc'],'D0_to_K3Pi_for' + name),
+                                         RequiredSelections = [self.selPion,self.selKaon] )
+        self.sel_Dstar_to_K3Pi = makeDstar('Dstar_K3PiFor'+name,self.sel_D0_to_K3Pi,self.selSlowPion,Dstar_cuts)
+
+
+        self.sel_D0_to_2K2Pi = Selection( 'Sel_D0_to_2K2Pi_for' + name,
+                                          Algorithm = self._D02HHHHFilter(['D0 -> K- K+ pi- pi+'],'D0_to_2K2Pi_for' + name),
+                                          RequiredSelections = [self.selPion,self.selKaon] )
+        self.sel_Dstar_to_2K2Pi = makeDstar('Dstar_2K2PiFor'+name,self.sel_D0_to_2K2Pi,self.selSlowPion,Dstar_cuts)
+
+        self.sel_D0_to_3KPi = Selection( 'Sel_D0_to_3KPi_for' + name,
+                                         Algorithm = self._D02HHHHFilter(['[D0 -> K- K+ K- pi+]cc'],'D0_to_3KPi_for' + name),
+                                         RequiredSelections = [self.selPion,self.selKaon] )
+        self.sel_Dstar_to_3KPi = makeDstar('Dstar_3KPiFor'+name,self.sel_D0_to_3KPi,self.selSlowPion,Dstar_cuts)
+
+        BDecays = [ '[B- -> D0 mu-]cc', '[B+ -> D0 mu+]cc' ]
+        self.selb2D0MuXK3Pi = makeb2DMuX('b2D0MuXK3Pi' + name,BDecays,self.selmuon,self.sel_D0_to_K3Pi ,BCuts)
+        self.selb2D0MuX4Pi = makeb2DMuX('b2D0MuX4Pi' + name,BDecays,self.selmuon,self.sel_D0_to_4Pi,BCuts)
+        self.selb2D0MuX2K2Pi = makeb2DMuX('b2D0MuX2K2Pi' + name,BDecays,self.selmuon,self.sel_D0_to_2K2Pi,BCuts)
+        self.selb2D0MuX3KPi = makeb2DMuX('b2D0MuX3KPi' + name,BDecays,self.selmuon,self.sel_D0_to_3KPi,BCuts)
+
+        BDecays = [ '[B~0 -> D*(2010)+ mu-]cc', '[B~0 -> D*(2010)+ mu+]cc' ]
+        self.selb2DstarMuXK3Pi = makeb2DMuX('b2DstarMuXK3Pi' + name,BDecays,self.selmuon,self.sel_Dstar_to_K3Pi ,BCuts)
+        self.selb2DstarMuX4Pi = makeb2DMuX('b2DstarMuX4Pi' + name,BDecays,self.selmuon,self.sel_Dstar_to_4Pi,BCuts)
+        self.selb2DstarMuX2K2Pi = makeb2DMuX('b2DstarMuX2K2Pi' + name,BDecays,self.selmuon,self.sel_Dstar_to_2K2Pi,BCuts)
+        self.selb2DstarMuX3KPi = makeb2DMuX('b2DstarMuX3KPi' + name,BDecays,self.selmuon,self.sel_Dstar_to_3KPi,BCuts)
+
+        ##########################################################################
+        ## D0 -> HHKs ##
+        ## Contact: Stephanie Reichert
+        ##########################################################################
+
+        BCutsKsHH = BCuts.copy()
+        BCutsKsHH["DZ"] = -9999
+
+        ### ks Pi Pi
+        self.seld02KsPiPiLL = Selection( 'SelD02KsPiPiLLfor' + name,
+                                         Algorithm = self._D02KsHHFilter(['[D0 -> KS0 pi+ pi-]cc'],'D02KsPiPiLLfor' + name),
+                                         RequiredSelections = [self.selKSLLNoFDChi2,self.selPionloose] )
+        self.selDstar_2KsPiPiLL = makeDstar('DstarPiPiLLFor'+name,self.seld02KsPiPiLL,self.selSlowPion,Dstar_cuts,True)
+
+        self.seld02KsPiPiDD = Selection( 'SelD02KsPiPiDDfor' + name,
+                                         Algorithm = self._D02KsHHFilter(['[D0 -> KS0 pi+ pi-]cc'],'D02KsPiPiDDfor' + name),
+                                         RequiredSelections = [self.selKSDDNoFDChi2,self.selPionloose] )
+        self.selDstar_2KsPiPiDD = makeDstar('DstarPiPiDDFor'+name,self.seld02KsPiPiDD,self.selSlowPion,Dstar_cuts,True)
+
+        ### ks K K
+        self.seld02KsKKLL = Selection( 'SelD02KsKKLLfor' + name,
+                                       Algorithm = self._D02KsHHFilter(['[D0 -> KS0 K+ K-]cc'],'D02KsKKLLfor' + name),
+                                       RequiredSelections = [self.selKSLLNoFDChi2,self.selKaonloose] )
+        self.selDstar_2KsKKLL = makeDstar('DstarKKLLFor'+name,self.seld02KsKKLL,self.selSlowPion,Dstar_cuts,True)
+
+        self.seld02KsKKDD = Selection( 'SelD02KsKKDDfor' + name,
+                                       Algorithm = self._D02KsHHFilter(['[D0 -> KS0 K+ K-]cc'],'D02KsKKDDfor' + name),
+                                       RequiredSelections = [self.selKSDDNoFDChi2,self.selKaonloose] )
+        self.selDstar_2KsKKDD = makeDstar('DstarKKDDFor'+name,self.seld02KsKKDD,self.selSlowPion,Dstar_cuts,True)
+
+        ### ks K Pi
+        self.seld02KsKPiLL = Selection( 'SelD02KsKPiLLfor' + name,
+                                        Algorithm = self._D02KsHHFilter(['[D0 -> KS0 K- pi+]cc','[D0 -> KS0 K+ pi-]cc'],'D02KsKPiLLfor' + name),
+                                        RequiredSelections = [self.selKSLLNoFDChi2,self.selPionloose,self.selKaonloose] )
+        self.selDstar_2KsKPiLL = makeDstar('DstarKPiLLFor'+name,self.seld02KsKPiLL,self.selSlowPion,Dstar_cuts,True)
+
+        self.seld02KsKPiDD = Selection( 'SelD02KsKPiDDfor' + name,
+                                        Algorithm = self._D02KsHHFilter(['[D0 -> KS0 K- pi+]cc','[D0 -> KS0 K+ pi-]cc'],'D02KsKPiDDfor' + name),
+                                        RequiredSelections = [self.selKSDDNoFDChi2,self.selPionloose,self.selKaonloose] )
+        self.selDstar_2KsKPiDD = makeDstar('DstarKPiDDFor'+name,self.seld02KsKPiDD,self.selSlowPion,Dstar_cuts,True)
+
+        BDecays = [ '[B- -> D0 mu-]cc']
+        self.selb2D0MuXKsPiPiLL = makeb2DMuX('b2D0MuXKsPiPiLL' + name,BDecays,self.selmuon,self.seld02KsPiPiLL,BCutsKsHH)
+        self.selb2D0MuXKsPiPiDD = makeb2DMuX('b2D0MuXKsPiPiDD' + name,BDecays,self.selmuon,self.seld02KsPiPiDD,BCutsKsHH)
+        self.selb2D0MuXKsKKLL = makeb2DMuX('b2D0MuXKsKKLL' + name,BDecays,self.selmuon,self.seld02KsKKLL,BCutsKsHH)
+        self.selb2D0MuXKsKKDD = makeb2DMuX('b2D0MuXKsKKDD' + name,BDecays,self.selmuon,self.seld02KsKKDD,BCutsKsHH)
+        BDecays = [ '[B- -> D0 mu-]cc'] # since already have both D0 -> KS0 K-pi+ and KS0 K+pi-
+        self.selb2D0MuXKsKPiLL = makeb2DMuX('b2D0MuXKsKPiLL' + name,BDecays,self.selmuon,self.seld02KsKPiLL,BCutsKsHH)
+        self.selb2D0MuXKsKPiDD = makeb2DMuX('b2D0MuXKsKPiDD' + name,BDecays,self.selmuon,self.seld02KsKPiDD,BCutsKsHH)
+
+        #### Dstar
+        BDecays = [ '[B~0 -> D*(2010)+ mu-]cc', '[B~0 -> D*(2010)+ mu+]cc' ]
+        self.selb2DstarMuXKsPiPiLL = makeb2DMuX('b2DstarMuXKsPiPiLL'+name,BDecays,self.selmuon,self.selDstar_2KsPiPiLL,BCutsKsHH)
+        self.selb2DstarMuXKsPiPiDD = makeb2DMuX('b2DstarMuXKsPiPiDD'+name,BDecays,self.selmuon,self.selDstar_2KsPiPiDD,BCutsKsHH)
+        self.selb2DstarMuXKsKKLL = makeb2DMuX('b2DstarMuXKsKKLL'+name,BDecays,self.selmuon,self.selDstar_2KsKKLL,BCutsKsHH)
+        self.selb2DstarMuXKsKKDD = makeb2DMuX('b2DstarMuXKsKKDD'+name,BDecays,self.selmuon,self.selDstar_2KsKKDD,BCutsKsHH)
+        self.selb2DstarMuXKsKPiLL = makeb2DMuX('b2DstarMuXKsKPiLL'+name,BDecays,self.selmuon,self.selDstar_2KsKPiLL,BCutsKsHH)
+        self.selb2DstarMuXKsKPiDD = makeb2DMuX('b2DstarMuXKsKPiDD'+name,BDecays,self.selmuon,self.selDstar_2KsKPiDD,BCutsKsHH)
+
+        ##########################################################################
+        ## D0 -> HHKsPi0 ##
+        ## Contact: Daniel Johnson
+        ##########################################################################
+
+        ### ks Pi Pi Pi0 (merged PI0)
+        self.seld02KsPiPiPi0MergedLL = Selection( 'SelD02KsPiPiPi0MergedLLfor' + name,
+                                         Algorithm = self._D02KsHHPi0Filter(['[D0 -> KS0 pi+ pi- pi0]cc'],'D02KsPiPiPi0MergedLLfor' + name),
+                                         RequiredSelections = [self.selKSLL,self.selPionloose,self.selPi0Merged] )
+        self.selDstar_2KsPiPiPi0MergedLL = makeDstar('DstarPiPiPi0MergedLLFor'+name,self.seld02KsPiPiPi0MergedLL,self.selSlowPion,Dstar_cuts,True)
+
+        self.seld02KsPiPiPi0MergedDD = Selection( 'SelD02KsPiPiPi0MergedDDfor' + name,
+                                         Algorithm = self._D02KsHHPi0Filter(['[D0 -> KS0 pi+ pi- pi0]cc'],'D02KsPiPiPi0MergedDDfor' + name),
+                                         RequiredSelections = [self.selKSDD,self.selPionloose,self.selPi0Merged] )
+        self.selDstar_2KsPiPiPi0MergedDD = makeDstar('DstarPiPiPi0MergedDDFor'+name,self.seld02KsPiPiPi0MergedDD,self.selSlowPion,Dstar_cuts,True)
+        ### ks Pi Pi Pi0 (resolved PI0)
+        self.seld02KsPiPiPi0ResolvedLL = Selection( 'SelD02KsPiPiPi0ResolvedLLfor' + name,
+                                         Algorithm = self._D02KsHHPi0Filter(['[D0 -> KS0 pi+ pi- pi0]cc'],'D02KsPiPiPi0ResolvedLLfor' + name),
+                                         RequiredSelections = [self.selKSLL,self.selPionloose,self.selPi0Resolved] )
+        self.selDstar_2KsPiPiPi0ResolvedLL = makeDstar('DstarPiPiPi0ResolvedLLFor'+name,self.seld02KsPiPiPi0ResolvedLL,self.selSlowPion,Dstar_cuts,True)
+
+        self.seld02KsPiPiPi0ResolvedDD = Selection( 'SelD02KsPiPiPi0ResolvedDDfor' + name,
+                                         Algorithm = self._D02KsHHPi0Filter(['[D0 -> KS0 pi+ pi- pi0]cc'],'D02KsPiPiPi0ResolvedDDfor' + name),
+                                         RequiredSelections = [self.selKSDD,self.selPionloose,self.selPi0Resolved] )
+        self.selDstar_2KsPiPiPi0ResolvedDD = makeDstar('DstarPiPiPi0ResolvedDDFor'+name,self.seld02KsPiPiPi0ResolvedDD,self.selSlowPion,Dstar_cuts,True)
+
+        BDecays = [ '[B- -> D0 mu-]cc']
+        self.selb2D0MuXKsPiPiPi0MergedLL = makeb2DMuX('b2D0MuXKsPiPiPi0MergedLL' + name,BDecays,self.selmuon,self.seld02KsPiPiPi0MergedLL,BCuts)
+        self.selb2D0MuXKsPiPiPi0MergedDD = makeb2DMuX('b2D0MuXKsPiPiPi0MergedDD' + name,BDecays,self.selmuon,self.seld02KsPiPiPi0MergedDD,BCuts)
+        self.selb2D0MuXKsPiPiPi0ResolvedLL = makeb2DMuX('b2D0MuXKsPiPiPi0ResolvedLL' + name,BDecays,self.selmuon,self.seld02KsPiPiPi0ResolvedLL,BCuts)
+        self.selb2D0MuXKsPiPiPi0ResolvedDD = makeb2DMuX('b2D0MuXKsPiPiPi0ResolvedDD' + name,BDecays,self.selmuon,self.seld02KsPiPiPi0ResolvedDD,BCuts)
+
+        BDecays = [ '[B~0 -> D*(2010)+ mu-]cc', '[B~0 -> D*(2010)+ mu+]cc' ]
+        self.selb2DstarMuXKsPiPiPi0MergedLL = makeb2DMuX('b2DstarMuXKsPiPiPi0MergedLL' + name,BDecays,self.selmuon,self.selDstar_2KsPiPiPi0MergedLL,BCuts)
+        self.selb2DstarMuXKsPiPiPi0MergedDD = makeb2DMuX('b2DstarMuXKsPiPiPi0MergedDD' + name,BDecays,self.selmuon,self.selDstar_2KsPiPiPi0MergedDD,BCuts)
+        self.selb2DstarMuXKsPiPiPi0ResolvedLL = makeb2DMuX('b2DstarMuXKsPiPiPi0ResolvedLL' + name,BDecays,self.selmuon,self.selDstar_2KsPiPiPi0ResolvedLL,BCuts)
+        self.selb2DstarMuXKsPiPiPi0ResolvedDD = makeb2DMuX('b2DstarMuXKsPiPiPi0ResolvedDD' + name,BDecays,self.selmuon,self.selDstar_2KsPiPiPi0ResolvedDD,BCuts)
+
+        ##########################################################################
+        ## D0 -> HHPi0 ##
+        ## Contact: Mika Vesterinen
+        ##########################################################################
+
+        self.CombD0ToHH_SEED = CombineParticles("CombD0ToHH_SEED_for"+name,
+                                                DecayDescriptors = ["K*(892)0 -> pi+ pi-",
+                                                                    "K*(892)0 -> K+ K-",
+                                                                    "K*(892)0 -> K- pi+",
+                                                                    "K*(892)0 -> K+ pi-"],
+                                                CombinationCut = "(ACHILD(PT,1)+ACHILD(PT,2) > 1500*MeV)"\
+                                                    "& (AM < 2000*MeV)"\
+                                                    "& (AM - ACHILD(M,1)-ACHILD(M,2) > 50*MeV)"\
+                                                    "& (ADOCACHI2CUT(25, ''))"\
+                                                    "& (ACHILD(MIPDV(PRIMARY),1)+ACHILD(MIPDV(PRIMARY),2) > 0.5*mm)",
+                                                MotherCut = "(VFASPF(VCHI2PDOF) < 4.0) & (BPVVD > 3*mm) & (BPVDIRA > 0.99)")
+
+        self.SelD0ToHH_SEED = Selection("SelD0ToHH_SEED_for"+name,
+                                        Algorithm = self.CombD0ToHH_SEED,
+                                        RequiredSelections = [self.AllKaonsAndPions])
+
+        self.selD0ToHHPi0 = self.GenericCharmMaker('DToHHPi0For'+name,
+                                                   ["[D0 -> K*(892)0 pi0]cc"],
+                                                   "(ADAMASS('D+') < 180*MeV) & (ACHILD(PT,1)+ACHILD(PT,2)> 2500*MeV)",
+                                                   "(abs(DTF_FUN(M,False,'pi0')-1865) < 150*MeV)",
+                                                   [self.SelD0ToHH_SEED,self.AllPi0s])
+
+        self.selDstar_D0ToHHPi0 = makeDstar('DstarD0ToHHPi0For'+name,self.selD0ToHHPi0,self.selSlowPion,Dstar_cuts)
+
+        BDecays = [ '[B- -> D0 mu-]cc', '[B+ -> D0 mu+]cc' ]
+        self.selb2D0MuXHHPi0 = makeb2DMuX('b2D0MuXHHPi0'+name,
+                                          [ '[B- -> D0 mu-]cc', '[B+ -> D0 mu+]cc' ],
+                                          self.selmuon,self.selD0ToHHPi0,BCuts)
+
+        self.selb2DstarMuXHHPi0 = makeb2DMuX('b2DstarMuXHHPi0'+name,
+                                             [ '[B~0 -> D*(2010)+ mu-]cc','[B~0 -> D*(2010)+ mu+]cc'],
+                                             self.selmuon,self.selDstar_D0ToHHPi0,BCuts)
+
+        ##########################################################################
+        ## D+ -> HHH(Ks/Pi0) ##
+        ## Contact: Maurizo Martinelli
+        ##########################################################################
+
+        self.CombDToHHH_SEED = CombineParticles("CombDToHHH_SEED",
+                                                DecayDescriptors = ["[K*(892)+ -> pi+ pi- pi+]cc",
+                                                                    "[K*(892)+ -> K+ K- pi+]cc",
+                                                                    "[K*(892)+ -> K- pi+ pi+]cc",
+                                                                    "[K*(892)+ -> K+ pi+ pi-]cc",
+                                                                    "[K*(892)+ -> K+ K+ pi-]cc",
+                                                                    "[K*(892)+ -> K- K+ K+]cc"],
+                                                CombinationCut = "(ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > 2000*MeV)"\
+                                                    "& (AM < 2000*MeV)"\
+                                                    "& (AM - ACHILD(M,1)-ACHILD(M,2)-ACHILD(M,3) > 50*MeV)"\
+                                                    "& (ADOCACHI2CUT(25, ''))"\
+                                                    "& (ACHILD(MIPDV(PRIMARY),1)+ACHILD(MIPDV(PRIMARY),2)+ACHILD(MIPDV(PRIMARY),3) > 1.0*mm)",
+                                                MotherCut = "(VFASPF(VCHI2PDOF) < 4.0) & (BPVVD > 5*mm)")
+
+        self.SelDToHHH_SEED = Selection("SelDToHHH_SEED",
+                                        Algorithm = self.CombDToHHH_SEED,
+                                        RequiredSelections = [self.AllKaonsAndPions])
+
+        self.selDToHHHPi0 = self.GenericCharmMaker('DToHHHPi0For'+name,
+                                                   ["[D+ -> K*(892)+ pi0]cc"],
+                                                   "(DAMASS('D_s+') < 120 *MeV) & (DAMASS('D+')> -120 *MeV)"\
+                                                       "& (ACHILD(PT,1)+ACHILD(PT,2)> 3000*MeV)",
+                                                   "  (DTF_FUN(M,False,'pi0') > 1869-110*MeV)"\
+                                                       "& (DTF_FUN(M,False,'pi0') < 1968+110*MeV)",
+                                                   [self.SelDToHHH_SEED,self.AllPi0s])
+
+        self.selDToHHHKs = self.GenericCharmMaker('DToHHHKsFor'+name,
+                                                  ["[D+ -> K*(892)+ KS0]cc"],
+                                                  "(DAMASS('D_s+') < 90 *MeV) & (DAMASS('D+')> -90 *MeV)"\
+                                                      "& (ACHILD(PT,1)+ACHILD(PT,2)> 3000*MeV)"\
+                                                      "& (ACHILD(VFASPF(VZ),2)-ACHILD(VFASPF(VZ),1) > 5*mm)",
+                                                  "  (DTF_FUN(M,False,'KS0') > 1869-80*MeV)"\
+                                                      "& (DTF_FUN(M,False,'KS0') < 1968+80*MeV)",
+                                                  [self.SelDToHHH_SEED,self.selAllKs_Loose])
+
+        self.selb2DpMuX_HHHPi0 = makeb2DMuX('b2D0MuX_HHHPi0' + name,[ '[B~0 -> D+ mu-]cc'],self.selmuon,self.selDToHHHPi0,BCuts)
+        self.selb2DpMuX_HHHKs = makeb2DMuX('b2D0MuX_HHHKs' + name,[ '[B~0 -> D+ mu-]cc'],self.selmuon,self.selDToHHHKs,BCuts)
+
+        ##########################################################################
+        ## D+ -> HHH/HKs/HMuMu ##
+        ## Contact: Mika Vesterinen
+        ##########################################################################
+
+        self.selds2KKPiDCS = self._D2HHHFilter('Ds2KKPiDCSfor'+name,['[D+ -> K+ K+ pi-]cc'],[self.selKaon,self.selPion])
+        self.selds2KKK = self._D2HHHFilter('Ds2KKKfor'+name,['[D+ -> K+ K+ K-]cc'],[self.selKaon])
+
+        self.selds2KsK = Selection( 'SelDs2KsKfor' + name,
+                                      Algorithm = self._Ds2KsHFilter(['[D+ -> KS0 K+]cc'],'Ds2KsLLKfor' + name),
+                                      RequiredSelections = [self.selKaon, self.selAllKs_Loose] )
+
+        self.selds2KsPi = Selection( 'SelDs2KsPifor' + name,
+                                     Algorithm = self._Ds2KsHFilter(['[D+ -> KS0 pi+]cc'],'Ds2KsLLPifor' + name),
+                                     RequiredSelections = [self.selPion, self.selAllKs_Loose] )
+
+        self.sel_D_to_HMuMu = Selection( 'SelDs2HMuMufor' + name,
+                                         Algorithm = self._Ds2HMuMuFilter([ '[D+ -> pi+ mu+ mu-]cc','[D+ -> K+ mu+ mu-]cc' ],'Ds2HMuMufor' + name),
+                                         RequiredSelections = [self.selmuon,self.AllKaonsAndPions])
+
+        BDecays = [ '[B~0 -> D+ mu-]cc', '[B~0 -> D+ mu+]cc' ]
+        self.selb2DsMuXKKPiDCS = makeb2DMuX('b2DsMuXKKPiDCS'+name,BDecays,self.selmuon,self.selds2KKPiDCS,BCuts)
+        self.selb2DsMuXKKK = makeb2DMuX('b2DsMuXKKK'+name,BDecays,self.selmuon,self.selds2KKK,BCuts)
+        self.selb2DsMuXKsK = makeb2DMuX('b2DsMuXKsK'+name,BDecays,self.selmuon,self.selds2KsK,BCuts)
+        self.selb2DsMuXKsPi = makeb2DMuX('b2DsMuXKsPi'+name,BDecays,self.selmuon,self.selds2KsPi,BCuts)
+        self.selb2DsMuXHMuMu = makeb2DMuX('b2DsMuXHMuMu'+name,BDecays,self.selmuon,self.sel_D_to_HMuMu,BCuts)
+
+        ##########################################################################
+        ## Lc-X ##
+        ## Contact: Alex Pearce, Luca Pescatore
+        ##########################################################################
+
+        self.selLc2L0Pi = Selection( 'SelLc2LambdaPifor' + name,
+                                     Algorithm = self._Lc2L0HFilter([ '[Lambda_c+ -> Lambda0 pi+]cc' ],'Lc2LambdaPifor' + name),
+                                     RequiredSelections = [self.selPion, self.selAllLambda])
+
+        self.selLc2L0K = Selection( 'SelLc2LambdaKfor' + name,
+                                    Algorithm = self._Lc2L0HFilter([ '[Lambda_c+ -> Lambda0 K+]cc' ],'Lc2LambdaKfor' + name),
+                                    RequiredSelections = [self.selKaon, self.selAllLambda])
+
+        self.selLc2pKK = Selection( 'SelLc2pKKfor' + name,
+                                    Algorithm = self._Lc2pHHFilter([ '[Lambda_c+ -> p+ K- K+]cc' ],'Lc2pKKfor' + name),
+                                    RequiredSelections = [self.selKaon, self.selProton])
+
+        self.selLc2pPiPi = Selection( 'SelLc2pPiPifor' + name,
+                                      Algorithm = self._Lc2pHHFilter([ '[Lambda_c+ -> p+ pi- pi+]cc' ],'Lc2pPiPifor' + name),
+                                      RequiredSelections = [self.selPionTight, self.selProton])## tighter pion PID needed here to reduce retention
+
+        self.selLc2pMuMu = Selection( 'SelLc2pMuMufor' + name,
+                                      Algorithm = self._Lc2pHHFilter([ '[Lambda_c+ -> p+ mu- mu+]cc', '[Lambda_c+ -> p+ mu+ mu+]cc',
+                                          '[Lambda_c+ -> p~- mu+ mu-]cc', '[Lambda_c+ -> p~- mu+ mu+]cc' ],'Lc2pMuMufor' + name),
+                                      RequiredSelections = [StdAllLooseMuons, self.selProton])
+
+        self.selLc2pEE = Selection( 'SelLc2pEEfor' + name,
+                                      Algorithm = self._Lc2pHHFilter([ '[Lambda_c+ -> p+ e- e+]cc', '[Lambda_c+ -> p+ e+ e+]cc',
+                                          '[Lambda_c+ -> p~- e+ e-]cc', '[Lambda_c+ -> p~- e+ e+]cc' ],'Lc2pEEfor' + name),
+                                      RequiredSelections = [StdLooseElectrons, self.selProton])
+
+        self.selLc2pEMu = Selection( 'SelLc2pEMufor' + name,
+                                      Algorithm = self._Lc2pHHFilter([ '[Lambda_c+ -> p+ e- mu+]cc', '[Lambda_c+ -> p+ e+ mu+]cc',
+                                          '[Lambda_c+ -> p~- e+ mu-]cc', '[Lambda_c+ -> p~- e+ mu+]cc' ],'Lc2pEMufor' + name),
+                                      RequiredSelections = [StdAllLooseMuons, StdLooseElectrons, self.selProton])
+
+        self.selLc2pMuE = Selection( 'SelLc2pMuEfor' + name,
+                                      Algorithm = self._Lc2pHHFilter([ '[Lambda_c+ -> p+ mu- e+]cc', '[Lambda_c+ -> p+ mu+ e+]cc',
+                                          '[Lambda_c+ -> p~- mu+ e-]cc', '[Lambda_c+ -> p~- mu+ e+]cc' ],'Lc2pMuEfor' + name),
+                                      RequiredSelections = [StdAllLooseMuons, StdLooseElectrons, self.selProton])
+
+        self.selLc2pKpi = Selection( 'SelLc2PKPifor' + name,
+                                     Algorithm = self._Lc2pHHFilter([ '[Lambda_c+ -> p+ K- pi+]cc' ],'Lc2PKPifor' + name),
+                                     RequiredSelections = [self.selKaon, self.selPion, self.selProton ] )
+
+        self.selLc2pKpiDCS = Selection( 'SelLc2PKPiDCSfor' + name,
+                                        Algorithm = self._Lc2pHHFilter([ '[Lambda_c+ -> p+ pi- K+]cc' ],'Lc2PKPiDCSfor' + name),
+                                        RequiredSelections = [self.selKaon, self.selPion, self.selProton ] )
+
+        self.sel_Lc2pKs = Selection("selLc2pKsfor"+name,
+                                    Algorithm =  self._Lc2pKsFilter( ['[Lambda_c+ -> p+ KS0]cc'], 'Lc2pKsfor' + name),
+                                    RequiredSelections = [self.selProton, self.selAllKs_Loose ] )
+
+
+        BDecays = [ '[Lambda_b0 -> Lambda_c+ mu-]cc', '[Lambda_b0 -> Lambda_c+ mu+]cc']
+        self.selb2Lc2L0PiMuX = makeb2DMuX('b2Lc2L0PiMuX' + name,BDecays,self.selmuon,self.selLc2L0Pi,BCuts)
+        self.selb2Lc2L0KMuX = makeb2DMuX('b2Lc2L0KMuX' + name,BDecays,self.selmuon,self.selLc2L0K,BCuts)
+        self.selb2LcMuX = makeb2DMuX('b2LcMuX' + name,BDecays,self.selmuon, self.selLc2pKpi ,BCuts)
+        self.selb2LcDCSMuX = makeb2DMuX('b2LcDCSMuX' + name, BDecays,self.selmuon,self.selLc2pKpiDCS,BCuts)
+        self.selb2Lc2pPiPiMuX = makeb2DMuX('b2Lc2pPiPiMuX' + name, BDecays,self.selmuon,self.selLc2pPiPi,BCuts)
+        self.selb2Lc2pMuMuMuX = makeb2DMuX('b2Lc2pMuMuX' + name, BDecays,self.selmuon,self.selLc2pMuMu,BCuts)
+        self.selb2Lc2pEEMuX = makeb2DMuX('b2Lc2pEEX' + name, BDecays,self.selmuon,self.selLc2pEE,BCuts)
+        self.selb2Lc2pEMuMuX = makeb2DMuX('b2Lc2pEMuX' + name, BDecays,self.selmuon,self.selLc2pEMu,BCuts)
+        self.selb2Lc2pMuEMuX = makeb2DMuX('b2Lc2pMuEX' + name, BDecays,self.selmuon,self.selLc2pMuE,BCuts)
+        self.selb2Lc2pKKMuX = makeb2DMuX('b2Lc2pKKMuX' + name, BDecays,self.selmuon,self.selLc2pKK,BCuts)
+        self.selb2LcMuXpKs = makeb2DMuX('b2LcMuXpKs' + name,BDecays,self.selmuon, self.sel_Lc2pKs,BCuts)
+
+        ##########################################################################
+        ## D0 -> X gamma SELECTION ##
+        ## Contact: Maurizio Martinelli
+        ##########################################################################
+
+        # Two-body combinations
+        self.sel_X_to_PiPi = self._makeHHForD2XGamma('X_to_PiPi_for'+ name, ['rho(770)0 -> pi+ pi-'], [self.selPion])
+        self.sel_X_to_KPi  = self._makeHHForD2XGamma('X_to_KPi_for'+ name , ['K*(892)0 -> K- pi+', 'K*(892)0 -> K+ pi-'], [self.selPion, self.selKaon])
+        self.sel_X_to_KK   = self._makeHHForD2XGamma('X_to_KK_for'+ name  , ['phi(1020) -> K+ K-'], [self.selKaon])
+        # D0 candidate
+        self.sel_D0_to_PiPiGamma = self._D02XGammaFilter('D0_to_PiPiGamma_for' + name, ['D0 -> rho(770)0 gamma'], [self.sel_X_to_PiPi, self.AllGammas] )
+        self.sel_D0_to_KPiGamma  = self._D02XGammaFilter('D0_to_KPiGamma_for' + name , ['D0 -> K*(892)0 gamma'] , [self.sel_X_to_KPi , self.AllGammas] )
+        self.sel_D0_to_KKGamma   = self._D02XGammaFilter('D0_to_KKGamma_for' + name  , ['D0 -> phi(1020) gamma'], [self.sel_X_to_KK  , self.AllGammas] )
+        # D* candidate
+        self.sel_Dstar_to_PiPiGamma = makeDstar('Dstar_PiPiGammaFor'+name,self.sel_D0_to_PiPiGamma,self.selSlowPion,Dstar_cuts)
+        self.sel_Dstar_to_KPiGamma  = makeDstar('Dstar_KPiGammaFor'+name ,self.sel_D0_to_KPiGamma ,self.selSlowPion,Dstar_cuts)
+        self.sel_Dstar_to_KKGamma   = makeDstar('Dstar_KKGammaFor'+name  ,self.sel_D0_to_KKGamma  ,self.selSlowPion,Dstar_cuts)
+        # B->D0muX candidate
+        BDecays = [ '[B- -> D0 mu-]cc', '[B+ -> D0 mu+]cc' ]
+        self.selb2D0MuXPiPiGamma = makeb2DMuX('b2D0MuXPiPiGamma' + name,BDecays,self.selmuon,self.sel_D0_to_PiPiGamma ,BCuts)
+        self.selb2D0MuXKPiGamma  = makeb2DMuX('b2D0MuXKPiGamma'  + name,BDecays,self.selmuon,self.sel_D0_to_KPiGamma  ,BCuts)
+        self.selb2D0MuXKKGamma   = makeb2DMuX('b2D0MuXKKGamma'   + name,BDecays,self.selmuon,self.sel_D0_to_KKGamma   ,BCuts)
+        # B->D*muX candidate
+        BDecays = [ '[B~0 -> D*(2010)+ mu-]cc', '[B~0 -> D*(2010)+ mu+]cc' ]
+        self.selb2DstarMuXPiPiGamma = makeb2DMuX('b2DstarMuXPiPiGamma' + name,BDecays,self.selmuon,self.sel_Dstar_to_PiPiGamma,BCuts)
+        self.selb2DstarMuXKPiGamma  = makeb2DMuX('b2DstarMuXKPiGamma'  + name,BDecays,self.selmuon,self.sel_Dstar_to_KPiGamma ,BCuts)
+        self.selb2DstarMuXKKGamma   = makeb2DMuX('b2DstarMuXKKGamma'   + name,BDecays,self.selmuon,self.sel_Dstar_to_KKGamma  ,BCuts)
+
+        ##########################################################################
+        ## Line registration ##
+        ##########################################################################
+
+        ########### D0 decays
+        for line in [['b2D0MuXHHPi0',self.selb2D0MuXHHPi0],
+                     ['b2D0MuXKsPiPiPi0MergedLL',self.selb2D0MuXKsPiPiPi0MergedLL],
+                     ['b2D0MuXKsPiPiPi0MergedDD',self.selb2D0MuXKsPiPiPi0MergedDD],
+                     ['b2D0MuXKsPiPiPi0ResolvedLL',self.selb2D0MuXKsPiPiPi0ResolvedLL],
+                     ['b2D0MuXKsPiPiPi0ResolvedDD',self.selb2D0MuXKsPiPiPi0ResolvedDD],
+                     ['b2D0MuXKsKs',self.selb2D0MuXKsKs]
+                     ]:
+            self.registerLine( StrippingLine('%s%sLine'%(line[0],name),
+                                             prescale = config['D0decaysPrescale'],
+                                             FILTER = GECs,
+                                             HLT2 = config["HLT2"],
+                                             selection = line[1]))
+
+        for line in [['b2D0MuXKsPiPiLL',self.selb2D0MuXKsPiPiLL],
+                     ['b2D0MuXKsPiPiDD',self.selb2D0MuXKsPiPiDD],
+                     ['b2D0MuXKsKKLL',self.selb2D0MuXKsKKLL],
+                     ['b2D0MuXKsKKDD',self.selb2D0MuXKsKKDD],
+                     ['b2D0MuXKsKPiLL',self.selb2D0MuXKsKPiLL],
+                     ['b2D0MuXKsKPiDD',self.selb2D0MuXKsKPiDD],
+                     ]:
+            self.registerLine( StrippingLine('%s%sLine'%(line[0],name),
+                                             prescale = config['D0decaysPrescale'],
+                                             FILTER = GECs,
+                                             HLT2 = config["HLT2"],
+                                             selection = line[1],
+                                             RelatedInfoTools = self._getRelInfoD3BodyKsHH()))
+
+        ########### D0 radiative decays
+        for line in [['b2D0MuXPiPiGamma',self.selb2D0MuXPiPiGamma],
+                     ['b2D0MuXKPiGamma',self.selb2D0MuXKPiGamma],
+                     ['b2D0MuXKKGamma',self.selb2D0MuXKKGamma]
+                     ]:
+            self.registerLine( StrippingLine('%s%sLine'%(line[0],name),
+                                             prescale = config['D0radiativePrescale'],
+                                             FILTER = GECs,
+                                             HLT2 = config["HLT2"],
+                                             selection = line[1]))
+
+        ########### D0 4Body decays
+        for line in [['b2D0MuXK3Pi',self.selb2D0MuXK3Pi],
+                     ['b2D0MuX4Pi',self.selb2D0MuX4Pi],
+                     ['b2D0MuX2K2Pi',self.selb2D0MuX2K2Pi],
+                     ['b2D0MuX3KPi',self.selb2D0MuX3KPi]
+                     ]:
+            self.registerLine( StrippingLine('%s%sLine'%(line[0],name),
+                                             prescale = config['D02HHHHPrescale'],
+                                             FILTER = GECs,
+                                             HLT2 = config["HLT2"],
+                                             selection = line[1],
+                                             RelatedInfoTools = self._getRelInfoD4Body()))
+
+        ########### D* decays
+        for line in [['b2DstarMuXHHPi0',self.selb2DstarMuXHHPi0],
+                     ['b2DstarMuXKsPiPiPi0MergedLL',self.selb2DstarMuXKsPiPiPi0MergedLL],
+                     ['b2DstarMuXKsPiPiPi0MergedDD',self.selb2DstarMuXKsPiPiPi0MergedDD],
+                     ['b2DstarMuXKsPiPiPi0ResolvedLL',self.selb2DstarMuXKsPiPiPi0ResolvedLL],
+                     ['b2DstarMuXKsPiPiPi0ResolvedDD',self.selb2DstarMuXKsPiPiPi0ResolvedDD],
+                     ['b2DstarMuXK3Pi',self.selb2DstarMuXK3Pi],
+                     ['b2DstarMuX4Pi',self.selb2DstarMuX4Pi],
+                     ['b2DstarMuX2K2Pi',self.selb2DstarMuX2K2Pi],
+                     ['b2DstarMuX3KPi',self.selb2DstarMuX3KPi],
+                     ['b2DstarMuXKsKs',self.selb2DstarMuXKsKs],
+                     ['b2DstarMuXPiPiGamma',self.selb2DstarMuXPiPiGamma],
+                     ['b2DstarMuXKPiGamma',self.selb2DstarMuXKPiGamma],
+                     ['b2DstarMuXKKGamma',self.selb2DstarMuXKKGamma]
+                     ]:
+            self.registerLine( StrippingLine('%s%sLine'%(line[0],name),
+                                             prescale = config['b2DstarMuXPrescale'],
+                                             FILTER = GECs,
+                                             HLT2 = config["HLT2"],
+                                             selection = line[1]))
+
+        for line in [
+                     ['b2DstarMuXKsPiPiLL',self.selb2DstarMuXKsPiPiLL],
+                     ['b2DstarMuXKsPiPiDD',self.selb2DstarMuXKsPiPiDD],
+                     ['b2DstarMuXKsKKLL',self.selb2DstarMuXKsKKLL],
+                     ['b2DstarMuXKsKKDD',self.selb2DstarMuXKsKKDD],
+                     ['b2DstarMuXKsKPiLL',self.selb2DstarMuXKsKPiLL],
+                     ['b2DstarMuXKsKPiDD',self.selb2DstarMuXKsKPiDD],
+                     ]:
+            self.registerLine( StrippingLine('%s%sLine'%(line[0],name),
+                                             prescale = config['b2DstarMuXPrescale'],
+                                             FILTER = GECs,
+                                             HLT2 = config["HLT2"],
+                                             selection = line[1],
+                                             RelatedInfoTools = self._getRelInfoDstarD3BodyKsHH()))
+
+        ########### D(s)+ decays
+        for line in [['b2DpMuXKKPiDCS',self.selb2DsMuXKKPiDCS],
+                     ['b2DpMuXKKK',self.selb2DsMuXKKK],
+                     ['b2DpMuXKsK',self.selb2DsMuXKsK],
+                     ['b2DpMuXKsPi',self.selb2DsMuXKsPi],
+                     ['b2DpMuXHMuMu',self.selb2DsMuXHMuMu]]:
+            self.registerLine( StrippingLine('%s%sLine'%(line[0],name),
+                                             prescale = config['DsdecaysPrescale'],
+                                             FILTER = GECs,
+                                             HLT2 = config["HLT2"],
+                                             selection = line[1]))
+        ########### D(s)+ 4Body decays
+        for line in [['b2DpMuXHHHKs',self.selb2DpMuX_HHHKs],
+                     ['b2DpMuXHHHPi0',self.selb2DpMuX_HHHPi0]]:
+            self.registerLine( StrippingLine('%s%sLine'%(line[0],name),
+                                             prescale = config['Ds2HHHHPrescale'],
+                                             FILTER = GECs,
+                                             HLT2 = config["HLT2"],
+                                             selection = line[1]))
+
+        ########## Lambda_c+ -> decays
+        for line in [['b2LcMuXL0Pi',self.selb2Lc2L0PiMuX],
+                     ['b2LcMuXL0K',self.selb2Lc2L0KMuX],
+                     ['b2LcMuXpKs',self.selb2LcMuXpKs]]:
+            self.registerLine( StrippingLine('%s%sLine'%(line[0],name),
+                                             prescale = config['Lc2HHPrescale'],
+                                             FILTER = GECs,
+                                             HLT2 = config["HLT2"],
+                                             selection = line[1]))
+
+        for line in [['b2LcMuX',self.selb2LcMuX],
+                     ['b2LcMuXDCS',self.selb2LcDCSMuX],
+                     ['b2LcMuXpPiPi',self.selb2Lc2pPiPiMuX],
+                     ['b2LcMuXpKK',self.selb2Lc2pKKMuX],
+                     ['b2LcMuXpMuMu',self.selb2Lc2pMuMuMuX],
+                     ['b2LcMuXpEE',self.selb2Lc2pEEMuX],
+                     ['b2LcMuXpEMu',self.selb2Lc2pEMuMuX],
+                     ['b2LcMuXpMuE',self.selb2Lc2pMuEMuX]]:
+            self.registerLine( StrippingLine('%s%sLine'%(line[0],name),
+                                             prescale = config['Lc2HHHPrescale'],
+                                             FILTER = GECs,
+                                             HLT2 = config["HLT2"],
+                                             selection = line[1],
+                                             RelatedInfoTools = self._getRelInfoD3Body()))
+
+
+    def _muonFilter( self , _name):
+        _code = "(PT > %(MuonPT)s *MeV) & (P> 3.0*GeV)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (TRCHI2DOF< %(TRCHI2)s) & (MIPCHI2DV(PRIMARY)> %(MuonIPCHI2)s)"\
+                "& (PIDmu > %(PIDmu)s)" % self.__confdict__
+        _mu = FilterDesktop( name = _name, Code = _code )
+        return _mu
+
+    def _pionFilter( self , _name):
+        _code = "  (TRCHI2DOF < %(TRCHI2)s) & (P>2.0*GeV) & (PT > %(KPiPT)s *MeV)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s) &  (PIDK< %(PionPIDK)s)" % self.__confdict__
+        _pi = FilterDesktop( name = _name, Code = _code )
+        return _pi
+
+    def _kaonFilter( self , _name ):
+        _code = "  (TRCHI2DOF < %(TRCHI2)s) & (P>2.0*GeV) & (PT > %(KPiPT)s *MeV)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s) &  (PIDK> %(KaonPIDK)s)" % self.__confdict__
+        _ka = FilterDesktop( name = _name, Code = _code )
+        return _ka
+
+    def _protonFilter( self, _name ):
+        _code = "(TRCHI2DOF < %(TRCHI2)s) & (PT > %(KPiPT)s *MeV) & (P>2.0*GeV)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)  &  (PIDp> %(KaonPIDK)s) & (PIDp-PIDK>1.0e-10)" % self.__confdict__
+        _pr = FilterDesktop( name = _name, Code = _code)
+        return _pr
+
+    def _kaonlooseFilter( self, _name ):
+        _code = "  (TRCHI2DOF < %(TRCHI2)s) & (P>2.0*GeV) & (PT > %(KPiPT)s *MeV)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2Loose)s) &  (PIDK> %(KaonPIDKloose)s)" % self.__confdict__
+        _kal = FilterDesktop( name = _name, Code = _code )
+        return _kal
+
+    def _pionlooseFilter( self , _name):
+        _code = "  (TRCHI2DOF < %(TRCHI2)s) & (P>2.0*GeV) & (PT > %(KPiPT)s *MeV)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2Loose)s)" % self.__confdict__
+        _pil = FilterDesktop( name = _name, Code = _code )
+        return _pil
+
+    def _Pi0ResolvedFilter( self, _name):
+        _code = "(PT> %(Pi0PtMin)s *MeV) & (P> %(Pi0PMin)s *MeV)"\
+                "& (CHILD(CL,1)> %(PhotonCL)s) & (CHILD(CL,2)> %(PhotonCL)s)" % self.__confdict__
+        _pil = FilterDesktop( name = _name, Code = _code )
+        return _pil
+
+    def _Pi0MergedFilter( self, _name):
+        _code = "(PT> %(Pi0PtMin)s *MeV) & (P> %(Pi0PMin)s *MeV)" % self.__confdict__
+        _pil = FilterDesktop( name = _name, Code = _code )
+        return _pil
+
+    def _KsDDFilter( self, _name):
+        _code = " (P> %(KSDDPMin)s *MeV) & (PT> %(KSDDPTMin)s *MeV)" \
+                " & (ADMASS('KS0') < %(KSDDCutMass)s *MeV) & (BPVVDCHI2> %(KSDDCutFDChi2)s)" \
+                " & CHILDCUT((TRCHI2DOF < %(KSDaugTrackChi2)s),1)" \
+                " & CHILDCUT((TRCHI2DOF < %(KSDaugTrackChi2)s),2)" \
+                " & (VFASPF(VCHI2PDOF) < %(KSVertexChi2)s)" \
+                " & (BPVDIRA > %(KSCutDIRA)s)" % self.__confdict__
+        _pil = FilterDesktop( name = _name, Code = _code)
+        return _pil
+
+    def _KsLLFilter( self, _name):
+        _code = " (P> %(KSLLPMin)s *MeV) & (PT> %(KSLLPTMin)s *MeV)" \
+                " & (ADMASS('KS0') < %(KSLLCutMass)s *MeV) & (BPVVDCHI2> %(KSLLCutFDChi2)s)" \
+                " & CHILDCUT((TRCHI2DOF < %(KSDaugTrackChi2)s),1)" \
+                " & CHILDCUT((TRCHI2DOF < %(KSDaugTrackChi2)s),2)" \
+                " & CHILDCUT((TRGHOSTPROB< %(TrGhostProbMax)s),1)"\
+                " & CHILDCUT((TRGHOSTPROB< %(TrGhostProbMax)s),2)"\
+                " & (VFASPF(VCHI2PDOF) < %(KSVertexChi2)s)" \
+                " & (BPVDIRA > %(KSCutDIRA)s )" % self.__confdict__
+        _pil = FilterDesktop( name = _name, Code = _code)
+        return _pil
+
+    def _KsDDNoFDChi2Filter( self, _name):
+        _code = " (P> %(KSDDPMin)s *MeV) & (PT> %(KSDDPTMin)s *MeV)" \
+                " & (ADMASS('KS0') < %(KSDDCutMass)s *MeV)" \
+                " & CHILDCUT((TRCHI2DOF < %(KSDaugTrackChi2)s),1)" \
+                " & CHILDCUT((TRCHI2DOF < %(KSDaugTrackChi2)s),2)" \
+                " & (VFASPF(VCHI2PDOF) < %(KSVertexChi2)s)" \
+                " & (BPVDIRA > %(KSCutDIRA)s)" % self.__confdict__
+        _pil = FilterDesktop( name = _name, Code = _code)
+        return _pil
+
+    def _KsLLNoFDChi2Filter( self, _name):
+        _code = " (P> %(KSLLPMin)s *MeV) & (PT> %(KSLLPTMin)s *MeV)" \
+                " & (ADMASS('KS0') < %(KSLLCutMass)s *MeV)" \
+                " & CHILDCUT((TRCHI2DOF < %(KSDaugTrackChi2)s),1)" \
+                " & CHILDCUT((TRCHI2DOF < %(KSDaugTrackChi2)s),2)" \
+                " & CHILDCUT((TRGHOSTPROB< %(TrGhostProbMax)s),1)"\
+                " & CHILDCUT((TRGHOSTPROB< %(TrGhostProbMax)s),2)"\
+                " & (VFASPF(VCHI2PDOF) < %(KSVertexChi2)s)" \
+                " & (BPVDIRA > %(KSCutDIRA)s )" % self.__confdict__
+        _pil = FilterDesktop( name = _name, Code = _code)
+        return _pil
+
+    def _LambdaLLFilter( self, _name):
+        _code = " (P> %(LambdaLLPMin)s *MeV) & (PT> %(LambdaLLPTMin)s *MeV)" \
+                " & (ADMASS('Lambda0') < %(LambdaLLCutMass)s *MeV) & (BPVVDCHI2> %(LambdaLLCutFDChi2)s)" \
+                " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),1)" \
+                " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),2)" \
+                " & CHILDCUT((TRGHOSTPROB< %(TrGhostProbMax)s),1)"\
+                " & CHILDCUT((TRGHOSTPROB< %(TrGhostProbMax)s),2)"\
+                " & (VFASPF(VCHI2PDOF) < %(LambdaVertexChi2)s)" \
+                " & (BPVDIRA > %(LambdaCutDIRA)s )" % self.__confdict__
+        _pil = FilterDesktop( name = _name, Code = _code)
+        return _pil
+
+    def _LambdaDDFilter( self , _name):
+        _code = " (P> %(LambdaDDPMin)s *MeV) & (PT> %(LambdaDDPTMin)s *MeV)" \
+                " & (ADMASS('Lambda0') < %(LambdaDDCutMass)s *MeV) & (BPVVDCHI2> %(LambdaDDCutFDChi2)s)" \
+                " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),1)" \
+                " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),2)" \
+                " & (VFASPF(VCHI2PDOF) < %(LambdaVertexChi2)s)" \
+                " & (BPVDIRA > %(LambdaCutDIRA)s )" % self.__confdict__
+        _pil = FilterDesktop( name = _name, Code = _code)
+        return _pil
+
+    def _PhotonFilter( self, _name):
+        _code = "(PT> %(PhotonPT)s * MeV)" % self.__confdict__
+        _ph = FilterDesktop( name = _name, Code = _code)
+        return _ph
+
+    def _PhotonConvLLFilter( self, _name):
+        _code = " ( MM < %(MaxConvPhLLMass)s * MeV ) " \
+                "&( HASVERTEX ) " \
+                "&( VFASPF(VCHI2/VDOF)<%(MaxConvPhLLChi)s ) " \
+                "&( PT >  %(MinConvPhLLPT)s * MeV)" % self.__confdict__
+        _phConv = FilterDesktop(name = _name, Code = _code)
+        return _phConv
+
+
+    def _PhotonConvDDFilter( self, _name):
+        _code = " ( MM < %(MaxConvPhDDMass)s * MeV ) " \
+                "&( HASVERTEX ) " \
+                "&( VFASPF(VCHI2/VDOF)<%(MaxConvPhDDChi)s ) " \
+                "&( PT >  %(MinConvPhDDPT)s * MeV)" % self.__confdict__
+        _phConv = FilterDesktop(name = _name, Code = _code)
+        return _phConv
+
+    def _D02HHHHFilter( self , _decayDescriptors,_name):
+        '''
+        _combinationCut = "(ADAMASS('D0') < %(Dto4h_AMassWin)s *MeV)"\
+                          "& (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3)+ACHILD(PT,4) > %(PTSUM)s *MeV)"\
+                          "& (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _motherCut = " (ADMASS('D0') < %(Dto4h_MassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                     "& (SUMTREE( PT,  ISBASIC )> %(PTSUM)s*MeV)"\
+                     "& (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.__confdict__
+        _d02hhhh = CombineParticles( name = _name,
+                                     DecayDescriptors = _decayDescriptors,
+                                     CombinationCut = _combinationCut,
+                                     MotherCut = _motherCut)
+        '''
+        _c12_cuts = (" ( AM < (1865+%(Dto4h_AMassWin)s - 279)* MeV ) " \
+                     "&( ACHI2DOCA(1,2) < %(Dto4hADocaChi2Max)s ) " %self.__confdict__ )
+        _c123_cuts =(" ( AM < (1865+%(Dto4h_AMassWin)s - 139.5)* MeV ) " \
+                     "&( ACHI2DOCA(1,3) < %(Dto4hADocaChi2Max)s ) " \
+                     "&( ACHI2DOCA(2,3) < %(Dto4hADocaChi2Max)s ) " %self.__confdict__ )
+        _combination_cuts =  (" (ADAMASS('D0') < %(Dto4h_AMassWin)s *MeV) " \
+                              "&( (APT1+APT2+APT3+APT4) > %(PTSUM)s )" \
+                              "&( ACHI2DOCA(1,4) < %(Dto4hADocaChi2Max)s ) " \
+                              "&( ACHI2DOCA(2,4) < %(Dto4hADocaChi2Max)s ) " \
+                              "&( ACHI2DOCA(3,4) < %(Dto4hADocaChi2Max)s ) " %self.__confdict__ )
+        _mother_cuts = (" (ADMASS('D0') < %(Dto4h_MassWin)s *MeV) " \
+                        "&(VFASPF(VCHI2PDOF) < %(DsVCHI2DOF)s)" \
+                        "&(SUMTREE( PT,  ISBASIC )> %(PTSUM)s*MeV)" \
+                        "&(BPVVDCHI2 > %(DsFDCHI2)s)" \
+                        "&(BPVDIRA > %(DsDIRA)s )" %self.__confdict__ )
+
+        _d02hhhh = DaVinci__N4BodyDecays(DecayDescriptors = _decayDescriptors,
+                                         Combination12Cut = _c12_cuts, Combination123Cut = _c123_cuts,
+                                         CombinationCut = _combination_cuts,
+                                         MotherCut = _mother_cuts)
+
+        return _d02hhhh
+
+
+    def _Ds2HMuMuFilter( self , _decayDescriptors, _name):
+        _combinationCut = "(DAMASS('D_s+') < %(DsAMassWin)s *MeV) & (DAMASS('D+')> -%(DsAMassWin)s *MeV)"\
+                          "& (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > %(PTSUM)s *MeV)"\
+                          "& (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _motherCut = " (DMASS('D_s+') < %(DsMassWin)s *MeV) & (DMASS('D+') > -%(DsMassWin)s *MeV)"\
+                     "& (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                     "& (SUMTREE( PT,  ISBASIC )> %(PTSUM)s*MeV)"\
+                     "& (BPVVDCHI2 > %(DsFDCHI2)s)"\
+                     "&  (BPVDIRA> %(DsDIRA)s)"  % self.__confdict__
+        _ds2hmumu = CombineParticles( name = _name,
+                                      DecayDescriptors = _decayDescriptors,
+                                      CombinationCut = _combinationCut,
+                                      MotherCut = _motherCut)
+        return _ds2hmumu
+
+    def _Ds2KsHFilter( self , _decayDescriptors, _name):
+        _combinationCut = "(DAMASS('D_s+') < %(DsAMassWin)s *MeV) & (DAMASS('D+')> -%(DsAMassWin)s *MeV)"\
+            "& (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _motherCut = "(DMASS('D_s+') < %(DsMassWin)s *MeV) & (DMASS('D+') > -%(DsMassWin)s *MeV)"\
+            " & (MINTREE(((ABSID=='KS0')) , VFASPF(VZ))-VFASPF(VZ) > 0.0 *mm )"\
+            " & (CHILD(BPVLTIME(),1) > 3.0*ps)"\
+            " & (BPVLTIME() > 0.1*ps)"\
+            " & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) & (BPVDIRA> %(DsDIRA)s)"  % self.__confdict__
+        _ds2ksh = CombineParticles( name = _name,
+                                    DecayDescriptors = _decayDescriptors,
+                                    CombinationCut = _combinationCut,
+                                    MotherCut = _motherCut)
+        return _ds2ksh
+
+    def _D02KsHHFilter( self , _decayDescriptors, _name):
+        _combinationCut = "(ADAMASS('D0') < %(DsAMassWin)s *MeV) & (APT > 2000 *MeV)" \
+                          "& (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > %(PTSUMLoose)s *MeV)" \
+                          "& (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _motherCut = "(ADMASS('D0') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                     "& (SUMTREE( PT,  ISBASIC )> %(PTSUMLoose)s*MeV) & (PT > 2000 *MeV)" \
+                     "& (MINTREE(((ABSID=='KS0')) , VFASPF(VZ))-VFASPF(VZ) > %(KSCutZFDFromD)s *mm )"  % self.__confdict__
+        _d02KsHH = CombineParticles( name = _name,
+                                     DecayDescriptors = _decayDescriptors,
+                                     CombinationCut = _combinationCut,
+                                     MotherCut = _motherCut)
+        return _d02KsHH
+
+    def _D02KsHHPi0Filter( self , _decayDescriptors, _name):
+        _combinationCut = "(ADAMASS('D0') < %(D02KSHHPi0AMassWin)s *MeV) & (APT > %(D02KSHHPi0_D0PTComb)s *MeV)" \
+                          "& (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3)+ACHILD(PT,4) > %(D02KSHHPi0_PTSUMLoose)s *MeV)" \
+                          "& (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _motherCut = "(ADMASS('D0') < %(D02KSHHPi0MassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                     "& (SUMTREE( PT,  ISBASIC )> %(D02KSHHPi0_PTSUMLoose)s*MeV) & (PT > %(D02KSHHPi0_D0PT)s *MeV)" \
+                     "& (MINTREE(((ABSID=='KS0')) , VFASPF(VZ))-VFASPF(VZ) > %(KSCutZFDFromD)s *mm )"  % self.__confdict__
+        _d02KsHHPi0 = CombineParticles( name = _name,
+                                     DecayDescriptors = _decayDescriptors,
+                                     CombinationCut = _combinationCut,
+                                     MotherCut = _motherCut)
+        return _d02KsHHPi0
+
+
+    def _D2KsHHHFilter( self , _name, _decayDescriptors,_requiredSelections):
+        _combinationCut = "(DAMASS('D_s+') < %(DsAMassWin)s *MeV) & (DAMASS('D+')> -%(DsAMassWin)s *MeV)"\
+                          "& (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3)+ACHILD(PT,4) > %(PTSUM)s *MeV)"\
+                          "& (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _motherCut = "(ADMASS('D+') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                     "& (SUMTREE( PT,  ISBASIC )> %(PTSUM)s*MeV)"\
+                     "& (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.__confdict__
+        _comb = CombineParticles( name = "Comb"+_name,
+                                  DecayDescriptors = _decayDescriptors,
+                                  CombinationCut = _combinationCut,
+                                  MotherCut = _motherCut)
+        return Selection( "Sel" + _name,
+                          Algorithm = _comb,
+                          RequiredSelections = _requiredSelections)
+
+
+
+    def _D02KsKsFilter( self , _decayDescriptors, _name):
+        _combinationCut = "(ADAMASS('D0') < %(DsAMassWin)s *MeV)"\
+                          "& (ACHILD(PT,1)+ACHILD(PT,2) > %(PTSUMLoose)s *MeV)"\
+                          "& (ADOCACUT( 2.*mm, ''))" % self.__confdict__
+        _motherCut = "(ADMASS('D0') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                     "& (SUMTREE( PT,  ISBASIC )> %(PTSUMLoose)s*MeV)"\
+                     "& (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.__confdict__
+        _d02KsKs = CombineParticles( name = _name,
+                                     DecayDescriptors = _decayDescriptors,
+                                     CombinationCut = _combinationCut,
+                                     MotherCut = _motherCut)
+        return _d02KsKs
+
+
+    def _D02HHPi0Filter( self,_name , _decayDescriptors,_requiredSelections):
+        _combinationCut = "(ADAMASS('D0') < %(D02HHPi0AMassWin)s *MeV) " \
+                          "& (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > %(PTSUM_HHPi0)s *MeV)"\
+                          "& (ADOCA(1,2) < %(D02HHPi0DocaCut)s)" % self.__confdict__
+        _motherCut = "(ADMASS('D0') < %(D02HHPi0MassWin)s *MeV) " \
+                     "& (SUMTREE( PT,  ISBASIC )> %(PTSUM_HHPi0)s*MeV)"\
+                     "& (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                     "& (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.__confdict__
+        _d02HHPi0 = CombineParticles( name = "Comb"+_name,
+                                      DecayDescriptors = _decayDescriptors,
+                                      CombinationCut = _combinationCut,
+                                      MotherCut = _motherCut)
+        return Selection( "Sel" + _name,
+                          Algorithm = _d02HHPi0,
+                          RequiredSelections = _requiredSelections)
+
+    def _Lc2L0HFilter( self , _decayDescriptors, _name):
+        _combinationCut = "(ADAMASS('Lambda_c+') < %(DsAMassWin)s *MeV) " \
+            " & (ACHILD(PT,1)+ACHILD(PT,2) > %(PTSUM)s *MeV)"\
+            " & (ADOCACUT( 2*mm, '')) "  % self.__confdict__
+        _motherCut = "(ADMASS('Lambda_c+') < %(DsMassWin)s *MeV) " \
+            " & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+            " & (SUMTREE( PT,  ISBASIC )> %(PTSUM)s*MeV)"\
+            " & (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.__confdict__
+        _lambdac = CombineParticles( name = _name,
+                                     DecayDescriptors = _decayDescriptors,
+                                     CombinationCut = _combinationCut,
+                                     MotherCut = _motherCut)
+        return _lambdac
+
+    def  _Lc2pHHFilter( self , _decayDescriptors, _name):
+        _combinationCut = "(ADAMASS('Lambda_c+') < %(DsAMassWin)s *MeV)"\
+                          " & (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > %(PTSUM)s *MeV)"\
+                          "& (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _motherCut = "(ADMASS('Lambda_c+') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                     "& (SUMTREE( PT,  ISBASIC )> %(PTSUM)s*MeV)"\
+                     "& (BPVVDCHI2 > %(DsFDCHI2)s) & (BPVDIRA> %(DsDIRA)s)"  % self.__confdict__
+        _lambdac = CombineParticles( name = _name,
+                                     DecayDescriptors = _decayDescriptors,
+                                     CombinationCut = _combinationCut,
+                                     MotherCut = _motherCut)
+        return _lambdac
+
+    def  _Lc2pKsFilter( self , _decayDescriptors, _name):
+        _combinationCut = "(ADAMASS('Lambda_c+') < %(DsAMassWin)s *MeV)"\
+                          " & (ACHILD(PT,1)+ACHILD(PT,2) > %(PTSUM)s *MeV)"\
+                          "& (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _motherCut = "(ADMASS('Lambda_c+') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                     "& (SUMTREE( PT,  ISBASIC )> %(PTSUM)s*MeV)"\
+                     "& (MINTREE(((ABSID=='KS0')) , VFASPF(VZ))-VFASPF(VZ) > %(KSCutZFDFromD)s *mm )" \
+                     "& (BPVVDCHI2 > %(DsFDCHI2)s) & (BPVDIRA> %(DsDIRA)s)"  % self.__confdict__
+        _lambdac = CombineParticles( name = _name,
+                                     DecayDescriptors = _decayDescriptors,
+                                     CombinationCut = _combinationCut,
+                                     MotherCut = _motherCut)
+        return _lambdac
+
+    def _D2HHHFilter( self, _name, _decayDescriptors,_requiredSelections):
+        _combinationCut = "(DAMASS('D_s+') < %(DsAMassWin)s *MeV) & (DAMASS('D+')> -%(DsAMassWin)s *MeV) "\
+                          " & (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > %(PTSUM)s *MeV)"\
+                          "& (ADOCACHI2CUT( %(DDocaChi2Max)s, ''))" % self.__confdict__
+        _motherCut = "(SUMTREE( PT,  ISBASIC )>%(PTSUM)s*MeV) &(DMASS('D_s+') < %(DsMassWin)s *MeV) & (DMASS('D+') > -%(DsMassWin)s *MeV)"\
+                     "& (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                     "& (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.__confdict__
+        _comb = CombineParticles( name = "Comb"+_name,
+                                  DecayDescriptors = _decayDescriptors,
+                                  CombinationCut = _combinationCut,
+                                  MotherCut = _motherCut)
+        return Selection (name = "Sel"+_name,
+                          Algorithm = _comb,
+                          RequiredSelections = _requiredSelections)
+
+    def GenericCharmMaker(self,_name,_decayDescriptors,_combinationCuts,_motherCuts,_requiredSelections):
+        CHARM_COMB = CombineParticles( name = "CharmComb"+_name,
+                                       DecayDescriptors = _decayDescriptors,
+                                       CombinationCut = _combinationCuts,
+                                       MotherCut = _motherCuts)
+        return Selection (name = "SelCharm"+_name,
+                          Algorithm = CHARM_COMB,
+                          RequiredSelections = _requiredSelections)
+
+    def _makeHHForD2XGamma(self, name, decayDescriptors, _requiredSelections) :
+        _daughters_cuts = (" (TRGHOSTPROB < %(TrGhostProbMax)s)" \
+                           "&(TRCHI2DOF < %(TRCHI2)s)" \
+                           "&(PT > %(KPiPT)s)"  % self.__confdict__ )
+        _pidPi = "&(PIDK < %(PionPIDK)s)"  % self.__confdict__ # May use tight for reducing combinatorial
+        _pidK  = "&(PIDK > %(KaonPIDK)s)"  % self.__confdict__ # May use tight for reducing combinatorial
+        _combination_cuts = (" (in_range( %(CombMassLow_HH)s * MeV, AM, %(CombMassHigh_HH)s * MeV ) ) " \
+                             "&( (APT1+APT2) > %(PTSUM)s )"  \
+                             "&( ACHI2DOCA(1,2) < %(DtoXgammaADocaChi2Max)s )" % self.__confdict__ )
+        _mother_cuts = (" ( in_range( %(MassLow_HH)s * MeV, M, %(MassHigh_HH)s * MeV)) " \
+                        "&( VFASPF(VCHI2PDOF) < %(MaxVCHI2NDOF_HH)s)" \
+                        "&( BPVVDCHI2 > %(MinVDCHI2_HH)s )" % self.__confdict__ )
+        CombineX2HH = CombineParticles(name = 'Comb'+name,
+                                       DecayDescriptors = decayDescriptors,
+                                       DaughtersCuts = { "pi+" : _daughters_cuts+_pidPi, "K+" : _daughters_cuts+_pidK },
+                                       CombinationCut = _combination_cuts,
+                                       MotherCut = _mother_cuts)
+        return Selection(name = 'Sel'+name,
+                         Algorithm = CombineX2HH,
+                         RequiredSelections = _requiredSelections )
+
+    def _D02XGammaFilter( self, name, decayDescriptors, _requiredSelections ) :
+        _combination_cuts =  (" ( ADAMASS('D0') < %(D02HHGammaAMassWin)s *MeV) " \
+                              "&( ACHILD(PT,1)+ACHILD(PT,2) > %(PTSUM_HHGamma)s *MeV)" % self.__confdict__ )
+        _mother_cuts = (" (ADMASS('D0') < %(D02HHGammaMassWin)s *MeV) " \
+                        "&(VFASPF(VCHI2PDOF) < %(DsVCHI2DOF)s)" % self.__confdict__ )
+        CombineD2XGamma = CombineParticles(name = 'Comb'+name,
+                                           DecayDescriptors = decayDescriptors,
+                                           CombinationCut = _combination_cuts,
+                                           MotherCut = _mother_cuts)
+        return Selection(name = 'Sel'+name,
+                         Algorithm = CombineD2XGamma,
+                         RequiredSelections = _requiredSelections )
+
+
+    def _getRelInfoD3Body(self):
+        relInfo = []
+        for coneAngle in [0.8,1.0,1.3,1.5,1.7,2.0]:
+            conestr = str(coneAngle).replace('.','')
+            relInfo += [ { "Type"          : "RelInfoConeVariables",
+              "ConeAngle"    : coneAngle,
+              "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+              "IgnoreUnmatchedDescriptors" : True,
+              "DaughterLocations" : {
+                   "^[Beauty -> (Charm -> p+ X- X+) mu-]CC" : 'P2ConeVar%s_B' % conestr,
+                   "[Beauty -> ^(Charm -> p+ X- X+) mu-]CC" : 'P2ConeVar%s_C' % conestr,
+                   "[Beauty -> (Charm -> ^p+ X- X+) mu-]CC" : 'P2ConeVar%s_P' % conestr,
+                   "[Beauty -> (Charm -> p+ ^X- X+) mu-]CC" : 'P2ConeVar%s_1' % conestr,
+                   "[Beauty -> (Charm -> p+ X- ^X+) mu-]CC" : 'P2ConeVar%s_2' % conestr,
+                   "[Beauty -> (Charm -> p+ X- X+) ^mu-]CC" : 'P2ConeVar%s_Mu' % conestr } }
+                       ]
+        relInfo += [ { "Type" : "RelInfoVertexIsolation",
+               "IgnoreUnmatchedDescriptors" : True,
+               "DaughterLocations" : {
+                   "^[Beauty -> (Charm -> p+ X- X+) mu-]CC" : 'VertexIsoInfo_B',
+                   "[Beauty -> ^(Charm -> p+ X- X+) mu-]CC" : 'VertexIsoInfo_C'} } ]                        
+        return relInfo 
+
+    def _getRelInfoD3BodyKsHH(self):
+        relInfo = []
+        for coneAngle in [0.5,0.8,1.0,1.3,1.5,1.7,2.0]:
+            conestr = str(coneAngle).replace('.','')
+            relInfo += [ { "Type"          : "RelInfoConeVariables",
+              "ConeAngle"    : coneAngle,
+              "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+              "IgnoreUnmatchedDescriptors" : True,
+              "DaughterLocations" : {
+                   "^[Beauty -> (Charm -> KS0 X- X+) mu-]CC" : 'P2ConeVar%s_B' % conestr,
+                   "[Beauty -> ^(Charm -> KS0 X- X+) mu-]CC" : 'P2ConeVar%s_C' % conestr,
+                   "[Beauty -> (Charm -> ^KS0 X- X+) mu-]CC" : 'P2ConeVar%s_KS' % conestr,
+                   "[Beauty -> (Charm -> KS0 ^X- X+) mu-]CC" : 'P2ConeVar%s_1' % conestr,
+                   "[Beauty -> (Charm -> KS0 X- ^X+) mu-]CC" : 'P2ConeVar%s_2' % conestr,
+                   "[Beauty -> (Charm -> KS0 X- X+) ^mu-]CC" : 'P2ConeVar%s_Mu' % conestr } }
+                       ]
+        relInfo += [ { "Type" : "RelInfoVertexIsolation",
+               "IgnoreUnmatchedDescriptors" : True,
+               "DaughterLocations" : {
+                   "^[Beauty -> (Charm -> KS0 X- X+) mu-]CC" : 'VertexIsoInfo_B',
+                   "[Beauty -> ^(Charm -> KS0 X- X+) mu-]CC" : 'VertexIsoInfo_C'} } ]                        
+        return relInfo 
+
+    def _getRelInfoDstarD3BodyKsHH(self):
+        relInfo = []
+        for coneAngle in [0.5,0.8,1.0,1.3,1.5,1.7,2.0]:
+            conestr = str(coneAngle).replace('.','')
+            relInfo += [ { "Type"          : "RelInfoConeVariables",
+              "ConeAngle"    : coneAngle,
+              "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+              "IgnoreUnmatchedDescriptors" : True,
+              "DaughterLocations" : {
+                   "^[Beauty -> (D*(2010)+ -> (Charm -> KS0 X- X+) pi+) [mu-]cc]CC" : 'P2ConeVar%s_B' % conestr,
+                   "[Beauty -> ^(D*(2010)+ -> (Charm -> KS0 X- X+) pi+) [mu-]cc]CC" : 'P2ConeVar%s_Dst' % conestr,
+                   "[Beauty -> (D*(2010)+ -> ^(Charm -> KS0 X- X+) pi+) [mu-]cc]CC" : 'P2ConeVar%s_C' % conestr,
+                   "[Beauty -> (D*(2010)+ -> (Charm -> ^KS0 X- X+) pi+) [mu-]cc]CC" : 'P2ConeVar%s_KS' % conestr,
+                   "[Beauty -> (D*(2010)+ -> (Charm -> KS0 ^X- X+) pi+) [mu-]cc]CC" : 'P2ConeVar%s_1' % conestr,
+                   "[Beauty -> (D*(2010)+ -> (Charm -> KS0 X- ^X+) pi+) [mu-]cc]CC" : 'P2ConeVar%s_2' % conestr,
+                   "[Beauty -> (D*(2010)+ -> (Charm -> KS0 X- X+) ^pi+) [mu-]cc]CC" : 'P2ConeVar%s_pis' % conestr,
+                   "[Beauty -> (D*(2010)+ -> (Charm -> KS0 X- X+) pi+) ^[mu-]cc]CC" : 'P2ConeVar%s_Mu' % conestr } }
+                       ]
+        relInfo += [ { "Type" : "RelInfoVertexIsolation",
+               "IgnoreUnmatchedDescriptors" : True,
+               "DaughterLocations" : {
+                   "^[Beauty -> (D*(2010)+ -> (Charm -> KS0 X- X+) pi+) [mu-]cc]CC" :'VertexIsoInfo_B' ,
+                   "[Beauty -> ^(D*(2010)+ -> (Charm -> KS0 X- X+) pi+) [mu-]cc]CC" :'VertexIsoInfo_Dst' ,
+                   "[Beauty -> (D*(2010)+ -> ^(Charm -> KS0 X- X+) pi+) [mu-]cc]CC" :'VertexIsoInfo_C' } } ]
+        return relInfo 
+
+
+    def _getRelInfoD4Body(self):
+        relInfo = []
+        for coneAngle in [0.8,1.0,1.3,1.7]:
+            conestr = str(coneAngle).replace('.','')
+            relInfo += [
+            { "Type"         : "RelInfoConeVariables",
+            "ConeAngle"    : coneAngle,
+            "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+            "DaughterLocations" : {
+                "^[Beauty -> (Charm -> X- X+ X- X+) mu+]CC" : 'P2ConeVar%s_B' % conestr,
+                "[Beauty -> ^(Charm -> X- X+ X- X+) mu+]CC" : 'P2ConeVar%s_D' % conestr,
+                "[Beauty -> (Charm -> ^X- X+ X- X+) mu+]CC" : 'P2ConeVar%s_1' % conestr,
+                "[Beauty -> (Charm -> X- ^X+ X- X+) mu+]CC" : 'P2ConeVar%s_2' % conestr,
+                "[Beauty -> (Charm -> X- X+ ^X- X+) mu+]CC" : 'P2ConeVar%s_3' % conestr,
+                "[Beauty -> (Charm -> X- X+ X- ^X+) mu+]CC" : 'P2ConeVar%s_4' % conestr,
+                "[Beauty -> (Charm -> X- X+ X- X+) ^mu+]CC" : 'P2ConeVar%s_Mu' % conestr } }
+                       ]
+        relInfo += [ { "Type" : "RelInfoVertexIsolation",
+            "DaughterLocations" : {
+                "^[Beauty -> (Charm -> X- X+ X- X+) mu+]CC" : 'VertexIsoInfo_B',
+                "[Beauty -> ^(Charm -> X- X+ X- X+) mu+]CC" : 'VertexIsoInfo_D'} } ]
+        return relInfo
+ 
+def makeDstar(_name, inputD0,_softPi,Dstar_cuts,_isSelfConjFS=False) :
+    _inputD0_conj = Selection("SelConjugateD0For"+_name,
+                             Algorithm = ConjugateNeutralPID('ConjugateD0For'+_name),
+                             RequiredSelections = [inputD0])
+    _cutsSoftPi = '( PT > %(Dstar_SoftPion_PT)s *MeV )' % Dstar_cuts
+    _cutsDstarComb = '(AM - ACHILD(M,1) + 5 > %(Dstar_wideDMCutLower)s *MeV) & (AM - ACHILD(M,1) - 5 < %(Dstar_wideDMCutUpper)s *MeV)' % Dstar_cuts
+    _cutsDstarMoth_base = '(VFASPF(VCHI2/VDOF) < %(Dstar_Chi2)s )' % Dstar_cuts
+    _cutsDstarMoth_DM = '(M - CHILD(M,1) > %(Dstar_wideDMCutLower)s *MeV) & (M - CHILD(M,1) < %(Dstar_wideDMCutUpper)s *MeV)' % Dstar_cuts
+    _cutsDstarMoth = '(' + _cutsDstarMoth_base + ' & ' + _cutsDstarMoth_DM + ')'
+    _Dstar = CombineParticles( name = _name,
+                               DecayDescriptor = "[D*(2010)+ -> D0 pi+]cc",
+                               DaughtersCuts = { "pi+" : _cutsSoftPi },
+                               CombinationCut = _cutsDstarComb,
+                               MotherCut = _cutsDstarMoth)
+    if(_isSelfConjFS==True):	return Selection (name = "Sel"+_name,Algorithm = _Dstar,RequiredSelections = [inputD0] + [_softPi])
+    return Selection (name = "Sel"+_name,Algorithm = _Dstar,RequiredSelections = [inputD0,_inputD0_conj] + [_softPi])
+
+def makeb2DMuX(_name,
+               DecayDescriptors,
+               MuSel,
+               DSel,
+               BCuts):
+    _combinationCut = "(AM<6200*MeV)"
+    _motherCut = "  (MM> %(MinBMass)s *MeV) & (MM<%(MaxBMass)s *MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)  " \
+                 "& (MINTREE(((ABSID=='D+') | (ABSID=='D0') | (ABSID=='Lambda_c+')) , VFASPF(VZ))-VFASPF(VZ) > %(DZ)s *mm ) "  % BCuts
+    _B = CombineParticles(name = _name,DecayDescriptors = DecayDescriptors,
+                          CombinationCut = _combinationCut,
+                          MotherCut = _motherCut)
+
+    selB = Selection (name = "Sel"+_name,
+                      Algorithm = _B,
+                      RequiredSelections = [MuSel, DSel])
+    TOSB = TOSFilter(_name,selB,BCuts["TTSpecs"])
+    return TOSB
+
+def TOSFilter( name = None, sel = None, Specs = None ):
+    if len(Specs) == 0:
+        return sel
+    """
+    Function to return a selection object, filtering for TOS candidates from input selection
+    """
+    from Configurables import TisTosParticleTagger
+
+    _filter = TisTosParticleTagger(name+"_TriggerTos")
+    _filter.TisTosSpecs = Specs
+
+    _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = [ sel ], Algorithm = _filter )
+    return _sel
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmWeakDecays.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmWeakDecays.py
new file mode 100644
index 000000000..b6379cf50
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmWeakDecays.py
@@ -0,0 +1,203 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Charmed Weak Decays Stripping Selections and StrippingLines.
+Provides functions to build D0, Ds1 selections.
+Provides class Bc2Ds1GammaConf, which constructs the Selections and
+StrippingLines given a configuration dictionary.
+Exported selection makers: 'makeD0', 'makeDs1', 'makeDs1WS',
+
+"""
+
+__author__ = ['Marco Pappagallo']
+__date__ = '24/01/2019'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('CharmWeakDecaysConf',
+           'makeD0st',
+           'makeDs1',
+           'makeDs1WS',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+default_config = {
+    'NAME'              : 'CharmWeakDecays',
+    'BUILDERTYPE'       : 'CharmWeakDecaysConf',
+    'CONFIG'    : {
+                    #D0 and D0*
+                    'MinTrackPT'         : 800.      # MeV
+                    ,'DaugPtMax'         : 1500.     # MeV
+                    ,'TrGhostProb'       : 0.3       # Dimensionless
+                    ,'MinTrackIPchi2'    : 9         # Dimensionless
+                    ,'KaonPID'        : 7.        # Dimensionless
+                    ,'PionPID'        : 0.        # Dimensionless
+                    ,'MinD0stMass'       : 1750      # MeV
+                    ,'MaxD0stMass'       : 2120      # MeV
+                    ,'MinD0stPT'         : 2000      # MeV
+                    ,'MaxD0stVertChi2DOF': 16        # Dimensionless 
+                    #Ds1
+                    ,'MinKaonPT'         : 250       # MeV
+                    ,'Ds1PT'             : 4000      # MeV 
+                    ,'QValueDs1Decay'    : 80        # MeV
+                    ,'MaxDs1VertChi2DOF' : 9         # Dimensionless 
+                    # Pre- and postscales
+                    ,'CharmWeakDecaysPreScale'     : 1.0
+                    ,'CharmWeakDecaysPostScale'    : 1.0
+                    },
+    'STREAMS' : [ 'Charm' ],
+    'WGs'    : [ 'Charm' ]
+    }
+
+
+class CharmWeakDecaysConf(LineBuilder):
+    """
+    Definition of Ds1 -> D(*)0 K stripping
+    
+    Constructs Bc -> Ds1 Gamma Selections and StrippingLines from
+    a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> gammaConf = StrippingB2XGammaConf('StrippingB2XGammaTest',config)
+    >>> gammaLines = gammaConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selD0                        : nominal D0 -> K pi Selection object
+    selDs1                       : nominal Ds1 -> D0 K Selection object 
+    selDs1WS                     : nominal Ds1 -> D~0 K Selection object
+    lines                  : List of lines
+
+    Exports as class data member:
+    StrippingB2XGammaConf.__configuration_keys__ : List of required configuration parameters.    
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        # if name not set outside, set it to empty
+        #if name == None:
+        #    name = ""   
+
+        # Selection of D0 and Ds1
+
+        self.selD0st  = makeD0st('D0stFor%s' % name,
+                                 config['KaonPID'],
+                                 config['PionPID'],
+                                 config['TrGhostProb'],
+                                 config['MinTrackPT'],
+                                 config['MinTrackIPchi2'],
+                                 config['MinD0stMass'],
+                                 config['MaxD0stMass'],
+                                 config['MinD0stPT'],
+                                 config['MaxD0stVertChi2DOF'],
+                                 config['DaugPtMax']
+                                 )
+
+        self.selDs1 = makeDs1('Ds1For%s' % name,
+                              self.selD0st,
+                              '[D_s1(2536)+ -> D*(2007)0 K+]cc', #DecayDescriptor
+                              config['KaonPID'],
+                              config['TrGhostProb'],
+                              config['MinKaonPT'],
+                              config['MinTrackIPchi2'],
+                              config['Ds1PT'],
+                              config['QValueDs1Decay'],
+                              config['MaxDs1VertChi2DOF'])
+
+        self.selDs1WS = makeDs1('Ds1WSFor%s' % name,
+                                self.selD0st,
+                                '[D_s1(2536)+ -> D*(2007)~0 K+]cc', #DecayDescriptor
+                                config['KaonPID'],
+                                config['TrGhostProb'],
+                                config['MinKaonPT'],
+                                config['MinTrackIPchi2'],
+                                config['Ds1PT'],
+                                config['QValueDs1Decay'],
+                                config['MaxDs1VertChi2DOF'])
+
+        # Create and register stripping lines
+
+        self.Ds12D0stKLine = StrippingLine("%sDs12D0stKLine" % name,
+                                           prescale =config['CharmWeakDecaysPreScale'],
+                                           postscale=config['CharmWeakDecaysPostScale'],
+                                           selection=self.selDs1)
+        self.registerLine(self.Ds12D0stKLine)
+
+        self.Ds12D0stKWSLine = StrippingLine("%sDs12D0stKWSLine" % name,
+                                           prescale =config['CharmWeakDecaysPreScale'],
+                                           postscale=config['CharmWeakDecaysPostScale'],
+                                           selection=self.selDs1WS)
+        self.registerLine(self.Ds12D0stKWSLine)
+        
+def makeD0st(name, KaonPID, PionPID, TrGhostProb, MinTrackPT, MinTrackIPchi2, MinD0stMass, MaxD0stMass, MinD0stPT, MaxD0stVertChi2DOF, DaugPtMax) :
+    """
+    Create and return a D(*)0->Kpi Selection object
+    
+    @arg name: name of the Selection.
+    @arg KaonPID: PID of Kaon
+    @arg PionPID: PID of pion
+    @arg TrGhostProb: Ghost probability of pion/kaon
+    @return: Selection object
+    
+    """
+
+    _daughterCutK  = "(TRGHOSTPROB<%(TrGhostProb)s) & (PT > %(MinTrackPT)s) & (MIPCHI2DV(PRIMARY) < %(MinTrackIPchi2)s) & (PIDK  > %(KaonPID)s)" % locals()
+    _daughterCutpi = "(TRGHOSTPROB<%(TrGhostProb)s) & (PT > %(MinTrackPT)s) & (MIPCHI2DV(PRIMARY) < %(MinTrackIPchi2)s) & (PIDK  < %(PionPID)s)" % locals()
+    
+    _combinationCut = "(in_range( (%(MinD0stMass)s*MeV-100*MeV), AM, (%(MaxD0stMass)s*MeV+100*MeV))) & (APT > (%(MinD0stPT)s*MeV-500*MeV)) & (AHASCHILD( PT > %(DaugPtMax)s* MeV))" % locals()
+    _motherCut = "(in_range( %(MinD0stMass)s*MeV, M, %(MaxD0stMass)s*MeV)) & (PT > %(MinD0stPT)s*MeV) & (VFASPF(VCHI2/VDOF) < %(MaxD0stVertChi2DOF)s)" % locals()
+    _D0st = CombineParticles(DecayDescriptor = "[D*(2007)0 -> K- pi+]cc",
+                             DaughtersCuts   = {"K+"  : _daughterCutK,
+                                              "pi+" : _daughterCutpi},
+                             CombinationCut  = _combinationCut,
+                             MotherCut       =_motherCut)
+    
+    _stdANNKaon = DataOnDemand(Location="Phys/StdAllLooseANNKaons/Particles")
+    _stdANNPion = DataOnDemand(Location="Phys/StdAllLooseANNPions/Particles")
+    
+    return Selection(name, Algorithm=_D0st, RequiredSelections=[_stdANNKaon, _stdANNPion])
+
+
+def makeDs1(name, D0stSel, DecDescr, KaonPID, TrGhostProb, MinKaonPT, MinTrackIPchi2, Ds1PT, QValueDs1Decay, MaxDs1VertChi2DOF):
+    """
+    Create and return a Ds1+ -> D0/D~0 K+ Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg D0stSel: D0 selection.
+    @arg DecDescr: Decay descriptor
+    @arg KaonPID: PID of Kaon
+    @arg TrGhostProb: Ghost probability of kaon
+    @arg Ds1DeltaMassWin: Mass difference m(D0K) - m(D0)
+    @arg MaxDs1VertChi2DOF: chi2/NDOF
+    @return: Selection object
+    """
+
+    _daughterCutK  = "(TRGHOSTPROB<%(TrGhostProb)s) & (PT > %(MinKaonPT)s) & (MIPCHI2DV(PRIMARY) < %(MinTrackIPchi2)s) & (PIDK  > %(KaonPID)s)" % locals()
+    _combinationCut = "((AM-AM1-AM2) < (1.5*%(QValueDs1Decay)s*MeV)) & (APT > (0.75*%(Ds1PT)s*MeV))" % locals()
+    _motherCut = "((M-M1-M2) < %(QValueDs1Decay)s*MeV) & (VFASPF(VCHI2/VDOF) < %(MaxDs1VertChi2DOF)s) & (PT > %(Ds1PT)s*MeV)" % locals()
+    _Ds1 = CombineParticles(DecayDescriptor = DecDescr,
+                            DaughtersCuts   = {"K+" : _daughterCutK},
+                            CombinationCut  = _combinationCut,
+                            MotherCut       = _motherCut)
+    
+    _stdANNKaon = DataOnDemand(Location="Phys/StdAllLooseANNKaons/Particles")
+    return Selection(name, Algorithm=_Ds1, RequiredSelections=[D0stSel, _stdANNKaon])
+                                
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmedBaryonSL.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmedBaryonSL.py
new file mode 100644
index 000000000..f33ee8f84
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingCharmedBaryonSL.py
@@ -0,0 +1,664 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Speculative code for charmed baryon searches.
+The following six channels are used:
+  Lambda_c+ -> Lambda0 mu nu
+  Lambda_c+ -> p+  h-  mu nu
+  Xi_c+     -> Lambda0 mu nu
+  Xi_c0     -> Xi-     mu nu
+  Omega_c0  -> Omega-  mu nu
+  Omega_c0  -> Xi-     mu nu
+The following channels are used as the normalization channels:
+  Lambda_c+ -> Lambda0 pi+
+  Lambda_c+ -> p+  h-  pi+
+  Xi_c+     -> Lambda0 pi+
+  Xi_c0     -> Xi-     pi+
+  Omega_c0  -> Omega-  pi+
+  Omega_c0  -> Xi-     pi+
+where the daughter baryon is reconstructed via:
+  Lambda0 -> p pi- (from StdLooseLambdaLL/DD)
+  Xi-     -> Lambda0 pi-
+  Oemga-  -> Lambda0 K-
+'''
+
+
+__author__ = ['Xiao-Rui Lyu', 'Miroslav Saur', 'Ziyi Wang']
+__date__ = '2021/06/09'
+__version__ = '$Revision: 0.1 $'
+__all__ = ('StrippingCharmedBaryonSL'
+           ,'default_config')
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons
+from StandardParticles import  StdAllLoosePions, StdAllLooseKaons, StdLooseMuons, StdAllLooseProtons, StdAllLooseMuons, StdAllVeryLooseMuons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from PhysSelPython.Wrappers import MultiSelectionSequence
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, picosecond
+import sys
+
+
+default_name='CharmedBaryonSL'
+    #### This is the dictionary of all tunable cuts ########
+default_config={
+      'NAME'        : 'CharmedBaryonSL',
+      'WGs'         : ['Charm'],
+      'BUILDERTYPE' : 'StrippingCharmedBaryonSL',
+      'STREAMS'     : ['CharmCompleteEvent'],
+      'CONFIG'      : {
+          'GEC_nLongTrk' : 250    # adimensional
+        , 'signalPrescaleViaLc'           :   1.0
+        , 'signalPrescaleViaLcL0DDMuNu'   :   0.8
+        , 'signalPrescaleViaLcPPiMuNu'    :   0.2
+        , 'signalPrescaleViaOmegac0'      :   1.0
+        , 'signalPrescaleViaXic'          :   1.0
+        , 'signalPrescaleViaXicL0LLMuNu'  :   0.8
+        , 'signalPrescaleViaXicL0DDMuNu'  :   0.8
+        , 'controlPrescaleViaLcL0LLPiNC'  :   0.4 
+        , 'controlPrescaleViaLcL0DDPiNC'  :   0.8 
+        , 'controlPrescaleViaLcPKPiNC'    :   0.09
+        , 'controlPrescaleViaLcPPiPiNC'   :   0.06
+        , 'controlPrescaleViaOmegac0NC'   :   1.0
+        , 'controlPrescaleViaXicL0LLPiNC' :   0.4 
+        , 'controlPrescaleViaXicL0DDPiNC' :   0.8 
+        , 'controlPrescaleViaXicXiPiNC'   :   1.0
+        , 'TRCHI2DOFMax'            :   3.0
+        , 'GhostProb'               :   0.3
+        , 'TrGhostProbMax'          :   0.25 # same for all particles
+        , 'MINIPCHI2'               :   4.0  # adimensiional, orig. 9 
+        , 'MuonP'                   :   3.0*GeV
+        , 'MuonPT'                  :   500*MeV
+        , 'MuonIPCHI2'              :   0.0 
+        , 'MuonPIDmu'               :   0.0
+        , 'PionP'                   :   3.0*GeV
+        , 'PionPT'                  :   500*MeV
+        , 'PionPIDK'                :  10.0
+        , 'Pion_PIDpiPIDK_Min'      :   0.0
+        , 'KaonP'                   :   3.0*GeV
+        , 'KaonPT'                  :   500*MeV
+        , 'KaonPIDK'                :  10.0
+        , 'Kaon_PIDKPIDpi_Min'      :   5.0
+        , 'ProtonP'                 :   3.0*GeV
+        , 'ProtonPT'                :   500*MeV
+        , 'Proton_PIDpPIDpi_Min'    :   5.0
+        , 'Proton_PIDpPIDK_Min'     :   0.0
+        , 'ProbNNpMin'              :   0.2 #ProbNNp cut for proton in L0, to suppress the bkg of L0 
+        , 'ProbNNp'                 :   0.4
+        , 'ProbNNk'                 :   0.4
+        , 'ProbNNpi'                :   0.5
+        , 'ProbNNpiMax'             :   0.95
+        , 'LambdaLLPMin'            :5000.0*MeV
+        , 'LambdaLLPTMin'           : 800.0*MeV
+        , 'LambdaLLCutMass'         :  20.0*MeV
+        , 'LambdaLLCutFDChi2'       : 100.0 ## unitless
+        , 'LambdaDDPMin'            :5000.0*MeV
+        , 'LambdaDDPTMin'           : 800.0*MeV
+        , 'LambdaDDCutMass'         :  20.0*MeV
+        , 'LambdaDDCutFDChi2'       : 100.0## unitless
+        , 'LambdaLDPMin'            :3000.0*MeV
+        , 'LambdaLDPTMin'           : 800.0*MeV
+        , 'LambdaLDCutMass'         :  20.0*MeV
+        , 'LambdaLDCutFDChi2'       : 100.0## unitless
+        , 'LambdaDaugTrackChi2'     :   4.0## unitless
+        , 'LambdaVertexChi2'        :   5.0## max chi2/ndf for Lambda0 vertex
+        , 'LambdaCutDIRA'           :   0.99## unitless
+        , 'LambdaLLMinVZ'           :-100.0*mm
+        , 'LambdaLLMaxVZ'           : 400.0*mm
+        , 'LambdaDDMinVZ'           : 400.0*mm
+        , 'LambdaDDMaxVZ'           :2275.0*mm
+        , 'LambdaPr_PT_MIN'         : 500.0*MeV
+        , 'LambdaPi_PT_MIN'         : 100.0*MeV
+        , 'Lc_ADMASS_HalfWin'       :  80.0*MeV
+        , 'Lc_Daug_1of3_MIPCHI2DV_Min': 4.0
+        , 'Lc_ADOCAMAX_Max'         :   0.5*mm
+        , 'Lc_APT_Min'              :   1.0*GeV
+        , 'Lc_VCHI2_Max'            :  30.0
+        , 'Lc_BPVVDCHI2_Min'        :  16.0
+        , 'Lc_BPVDIRA_Min'          :   0.9
+        , 'Omegac0_ADAMASS_HalfWin' : 170.0*MeV
+        , 'Omegac0_ADMASS_HalfWin'  : 120.0*MeV
+        , 'Omegac0_4Dau_VCHI2_Max'  :  60.0
+        , 'Omegac0_BPVVDCHI2_Min'   :  25.0
+        , 'Omegac0_BPVDIRA_Min'     :   0.9
+        , 'Xic_ADAMASS_HalfWin'     : 170.0*MeV
+        , 'Xic_ADMASS_HalfWin'      : 120.0*MeV
+        , 'Xic_BPVVDCHI2_Min'       :  25.0
+        , 'Xic_BPVDIRA_Min'         :   0.9
+        , 'L0Mu_AM_Min'             :  1250.0*MeV
+        , 'pKMu_AM_Min'             :  1550.0*MeV
+        , 'ppiMu_AM_Min'            :  1600.0*MeV#1200
+        , 'XiMu_AM_Min'             :  1430.0*MeV
+        , 'OmMu_AM_Min'             :  1780.0*MeV
+        , 'Lc_AM_Max'               :  2370.0*MeV
+        , 'Oc_AM_Max'               :  2780.0*MeV
+        , 'Xic_AM_Max'              :  2550.0*MeV
+      } ## end of 'CONFIG' 
+}  ## end of default_config
+
+#-------------------------------------------------------------------------------------------------------------
+class StrippingCharmedBaryonSL(LineBuilder) : 
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+       
+        GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                     "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        ##########################################################################
+        ## Basic particles: mu, K, pi, p
+        ##########################################################################
+        self.selMuon = Selection( "SelMufor" + name,
+                Algorithm = self._muonFilter("Mufor"+name),
+                RequiredSelections = [StdAllVeryLooseMuons])
+
+        self.selKaon = Selection( "SelKfor" + name,
+                Algorithm = self._kaonFilter("Kfor"+name),
+                RequiredSelections = [StdAllLooseKaons])
+
+        self.selPion = Selection( "SelPifor" + name,
+                Algorithm = self._pionFilter("Pifor"+name),
+                RequiredSelections = [StdAllLoosePions])
+
+        self.selProton = Selection( "SelProtonfor" + name,
+                Algorithm = self._protonFilter("Protonfor"+name),
+                RequiredSelections = [StdAllLooseProtons])
+
+        ##########################################################################
+        ## Lambda0 -> p+ pi- 
+        ##########################################################################
+        _stdLooseLambdaLL = DataOnDemand("Phys/StdLooseLambdaLL/Particles")
+        _stdLooseLambdaDD = DataOnDemand("Phys/StdLooseLambdaDD/Particles")
+        _stdLooseLambdaLD = DataOnDemand("Phys/StdLooseLambdaLD/Particles")
+
+        self.selLambdaLL = Selection("SelLambdaLLfor"+name,
+                Algorithm = self._LambdaLLFilter("LambdaLLfor"+name),
+                RequiredSelections = [_stdLooseLambdaLL])
+
+        self.selLambdaDD = Selection("SelLambdaDDfor"+name,
+                Algorithm = self._LambdaDDFilter("LambdaDDfor"+name),
+                RequiredSelections = [_stdLooseLambdaDD])
+
+        self.selLambdaLD = Selection("SelLambdaLDfor"+name,
+                Algorithm = self._LambdaLDFilter("LambdaLDfor"+name),
+                RequiredSelections = [_stdLooseLambdaLD])
+
+        self.selAllLambda = MergedSelection("SelAllLambdaFor"+name,
+                RequiredSelections = [ self.selLambdaLL,self.selLambdaDD])
+
+        ##########################################################################
+        ## Xi- -> Lambda0 pi- 
+        ##########################################################################
+        self.Ximinus2LambdaPi = self.createCombinationSel(OutputList = "Ximinus2LambdaPifor"+ self.name,
+                DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                DaughterLists   = [self.selPion, self.selAllLambda],
+                DaughterCuts    = {"pi-" : "(MIPCHI2DV(PRIMARY)>4) "},
+                PreVertexCuts   = "(ADAMASS('Xi-') < 80*MeV) & (ADOCACHI2CUT(30, ''))",
+                PostVertexCuts  = "(ADMASS('Xi-')<64*MeV)"\
+                                "& (VFASPF(VCHI2)<25)"\
+                                "& (P> 1000*MeV) & (PT > 250*MeV)"\
+                                "& (BPVVDCHI2 > 49.0 )"\
+                                "& (VFASPF(VCHI2/VDOF) < 12.0)" )
+
+        ##########################################################################
+        ## Omega- -> Lambda0 K- 
+        ##########################################################################
+        self.Omegaminus2LambdaK = self.createCombinationSel(OutputList = "Omegaminus2LambdaKfor"+ self.name,
+                DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+                DaughterLists   = [self.selKaon, self.selAllLambda],
+                DaughterCuts    = {"K-"      : "(MIPCHI2DV(PRIMARY)>4) "},
+                PreVertexCuts   = "(ADAMASS('Omega-') < 80*MeV) & (ADOCACHI2CUT(30, ''))",
+                PostVertexCuts  = "(ADMASS('Omega-')<64*MeV)"\
+                                "& (VFASPF(VCHI2)<25)"\
+                                "& (P> 1000*MeV) &(PT > 250*MeV)"\
+                                "& (BPVVDCHI2 > 49.0 )"\
+                                "& (VFASPF(VCHI2/VDOF) < 12.0)" )
+
+        self.LambdacSLList = self.makeLambdacSL()
+        self.Omegac0SLList = self.makeOmegac0SL()
+        self.XicSLList = self.makeXicSL()
+
+    #------------------------------------------------------------------------------------------
+    #------------------------------------------------------------------------------------------
+    # Sub Function
+    #------------------------------------------------------------------------------------------
+    #------------------------------------------------------------------------------------------
+    def _muonFilter( self , _name):
+        _code = "  (TRCHI2DOF< %(TRCHI2DOFMax)s)"\
+                "& (PT>%(MuonPT)s) & (P>%(MuonP)s)"\
+                "& (TRGHOSTPROB< %(GhostProb)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MuonIPCHI2)s)"\
+                "& (PIDmu > %(MuonPIDmu)s)" % self.config
+        _mu = FilterDesktop(Code = _code )
+        return _mu
+
+    def _pionFilter( self , _name):
+        _code = "  (TRCHI2DOF < %(TRCHI2DOFMax)s)"\
+                "& (P>%(PionP)s) & (PT > %(PionPT)s)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)"\
+                "& (PIDK< %(PionPIDK)s)"\
+                "& (PROBNNpi > %(ProbNNpi)s)" % self.config
+        _pi = FilterDesktop(Code = _code )
+        return _pi
+
+    def _kaonFilter( self , _name ):
+        _code = "  (TRCHI2DOF < %(TRCHI2DOFMax)s)"\
+                "& (P>%(KaonP)s) & (PT > %(KaonPT)s)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)"\
+                "& (PIDK> %(KaonPIDK)s) & (PROBNNpi < %(ProbNNpiMax)s)"\
+                "& (PROBNNk > %(ProbNNk)s)"\
+                "& (HASRICH)&(PIDK-PIDpi>%(Kaon_PIDKPIDpi_Min)s)"% self.config
+        _ka = FilterDesktop(Code = _code )
+        return _ka
+
+    def _protonFilter( self, _name ):
+        _code = "  (TRCHI2DOF < %(TRCHI2DOFMax)s)"\
+                "& (PT > %(ProtonPT)s) & (P>%(ProtonP)s)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)"\
+                "& (PROBNNp > %(ProbNNp)s) & (PROBNNpi < %(ProbNNpiMax)s)"\
+                "& (HASRICH)&(PIDp-PIDpi>%(Proton_PIDpPIDpi_Min)s)"\
+                "& (HASRICH)&(PIDp-PIDK>%(Proton_PIDpPIDK_Min)s)"% self.config
+        _pr = FilterDesktop(Code = _code)
+        return _pr
+
+    def _LambdaLLFilter( self, _name):
+        _code = " (P > %(LambdaLLPMin)s) & (PT > %(LambdaLLPTMin)s)" \
+                " &(ADMASS('Lambda0')<%(LambdaLLCutMass)s)"\
+                " &(BPVVDCHI2> %(LambdaLLCutFDChi2)s)" \
+                " & (MAXTREE( 'p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                " & (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                " & (MAXTREE( 'p+'==ABSID, PROBNNp) > %(ProbNNpMin)s ) "\
+                " & (MINTREE('pi-'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                " & (MINTREE( 'p+'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                " & (MINTREE('pi-'==ABSID, TRCHI2DOF) < %(LambdaDaugTrackChi2)s )"\
+                " & (MINTREE( 'p+'==ABSID, TRCHI2DOF) < %(LambdaDaugTrackChi2)s )"\
+                " & (VFASPF(VCHI2PDOF) < %(LambdaVertexChi2)s)" \
+                " & (VFASPF(VZ) > %(LambdaLLMinVZ)s ) " \
+                " & (VFASPF(VZ) < %(LambdaLLMaxVZ)s ) " \
+                " & (BPVDIRA > %(LambdaCutDIRA)s )" % self.config
+        _l0LL = FilterDesktop(Code = _code)
+        return _l0LL
+
+    def _LambdaDDFilter( self , _name):
+        _code = " (P> %(LambdaDDPMin)s) & (PT> %(LambdaDDPTMin)s)" \
+                " & (ADMASS('Lambda0') < %(LambdaDDCutMass)s) "\
+                " & (BPVVDCHI2> %(LambdaDDCutFDChi2)s)" \
+                " & (MAXTREE( 'p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                " & (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                " & (MAXTREE( 'p+'==ABSID, PROBNNp) > %(ProbNNpMin)s ) "\
+                " & (MINTREE('pi-'==ABSID, TRCHI2DOF) < %(LambdaDaugTrackChi2)s )"\
+                " & (MINTREE( 'p+'==ABSID, TRCHI2DOF) < %(LambdaDaugTrackChi2)s )"\
+                " & (VFASPF(VCHI2PDOF) < %(LambdaVertexChi2)s)" \
+                " & (VFASPF(VZ) < %(LambdaDDMaxVZ)s ) " \
+                " & (VFASPF(VZ) > %(LambdaDDMinVZ)s )" \
+                " & (BPVDIRA > %(LambdaCutDIRA)s )" % self.config
+        _l0DD = FilterDesktop(Code = _code)
+        return _l0DD
+
+    def _LambdaLDFilter( self , _name):
+        _code = " (P> %(LambdaLDPMin)s) & (PT> %(LambdaLDPTMin)s)" \
+                " & (ADMASS('Lambda0') < %(LambdaLDCutMass)s)"\
+                " & (BPVVDCHI2> %(LambdaLDCutFDChi2)s)" \
+                " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),1)" \
+                " & CHILDCUT((TRCHI2DOF < %(LambdaDaugTrackChi2)s),2)" \
+                " & CHILDCUT(('p+'==ABSID)&(PROBNNp>%(ProbNNpMin)s),1)"\
+                " & (VFASPF(VCHI2PDOF) < %(LambdaVertexChi2)s)" \
+                " & (BPVDIRA > %(LambdaCutDIRA)s )" % self.config
+        _l0LD = FilterDesktop(Code = _code)
+        return _l0LD
+
+    ##------------------------------------------------------------------------------------------
+    ##  -------------------- Begin to LambdacSL  ------------
+    def makeLambdacSL( self ):
+
+        _strCutCombfor = "(AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                    "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+                    "& (APT>%(Lc_APT_Min)s)" % self.config
+
+        _strCutMothfor = "(VFASPF(VCHI2) < %(Lc_VCHI2_Max)s)" \
+                      "& (BPVVDCHI2>%(Lc_BPVVDCHI2_Min)s)" \
+                      "& (BPVDIRA>%(Lc_BPVDIRA_Min)s)" % self.config
+
+        _strCutComb_Mass   = "(ADAMASS('Lambda_c+')<1.1*%(Lc_ADMASS_HalfWin)s)" % self.config
+        _strCutMoth_Mass   = "(ADMASS('Lambda_c+')<%(Lc_ADMASS_HalfWin)s)" % self.config
+        
+        _strCutComb   = _strCutCombfor + '&' + _strCutComb_Mass
+        _strCutMoth   = _strCutMothfor + '&' + _strCutMoth_Mass
+        
+        _strCutComb_MassL0MuSL  = "(AM>%(L0Mu_AM_Min)s)  & (AM<%(Lc_AM_Max)s)" % self.config
+        _strCutComb_MasspKMuSL  = "(AM>%(pKMu_AM_Min)s)  & (AM<%(Lc_AM_Max)s)" % self.config
+        _strCutComb_MassppiMuSL = "(AM>%(ppiMu_AM_Min)s) & (AM<%(Lc_AM_Max)s)" % self.config
+
+        _strCutComb_L0MuSL  = _strCutCombfor + '&' + _strCutComb_MassL0MuSL 
+        _strCutComb_pKMuSL  = _strCutCombfor + '&' + _strCutComb_MasspKMuSL 
+        _strCutComb_ppiMuSL = _strCutCombfor + '&' + _strCutComb_MassppiMuSL
+        _strCutMothSL = _strCutMothfor
+
+        ''' Stripping Lambda_c+ -> Lambda0(LL) mu+ '''
+        Lambdac2LambdaLLMuNu = self.createCombinationSel(OutputList = "Lambdac2LambdaLLMuNu" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> Lambda0 mu+]cc",
+                DaughterLists   = [self.selLambdaLL, self.selMuon],
+                PreVertexCuts   = _strCutComb_L0MuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Lambdac2LambdaLLMuNuLine = StrippingLine( self.name + "Lambdac2LambdaLLMuNuLine", 
+                prescale = self.config['signalPrescaleViaLc'],
+                algos = [ Lambdac2LambdaLLMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Lambdac2LambdaLLMuNuLine)
+
+        ''' Stripping Lambda_c+ -> Lambda0(DD) mu+ '''
+        Lambdac2LambdaDDMuNu = self.createCombinationSel(OutputList = "Lambdac2LambdaDDMuNu" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> Lambda0 mu+]cc",
+                DaughterLists   = [self.selLambdaDD, self.selMuon],
+                PreVertexCuts   = _strCutComb_L0MuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Lambdac2LambdaDDMuNuLine = StrippingLine( self.name + "Lambdac2LambdaDDMuNuLine", 
+                prescale = self.config['signalPrescaleViaLcL0DDMuNu'],
+                algos = [ Lambdac2LambdaDDMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Lambdac2LambdaDDMuNuLine)
+
+        ''' Stripping Lambda_c+ -> p+ K- mu+ '''
+        Lambdac2PKMuNu = self.createCombinationSel(OutputList = "Lambdac2PKMuNu" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> p+ K- mu+]cc",
+                DaughterLists   = [self.selProton, self.selKaon, self.selMuon],
+                PreVertexCuts   = _strCutComb_pKMuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Lambdac2PKMuNuLine = StrippingLine( self.name + "Lambdac2PKMuNuLine", 
+                prescale = self.config['signalPrescaleViaLc'],
+                algos = [ Lambdac2PKMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Lambdac2PKMuNuLine)
+
+        ''' Stripping Lambda_c+ -> p+ pi- mu+ '''
+        Lambdac2PPiMuNu = self.createCombinationSel(OutputList = "Lambdac2PPiMuNu" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> p+ pi- mu+]cc",
+                DaughterLists   = [self.selProton, self.selPion, self.selMuon],
+                PreVertexCuts   = _strCutComb_ppiMuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Lambdac2PPiMuNuLine = StrippingLine( self.name + "Lambdac2PPiMuNuLine", 
+                prescale = self.config['signalPrescaleViaLcPPiMuNu'],
+                algos = [ Lambdac2PPiMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Lambdac2PPiMuNuLine)
+
+        ''' ---------------------- '''
+        ''' Normalization channels '''
+        ''' ---------------------- '''
+        ''' NC Stripping Lambda_c+ -> Lambda0(LL) pi+ '''
+        Lambdac2LambdaLLPiNC = self.createCombinationSel(OutputList = "Lambdac2LambdaLLPiNC" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> Lambda0 pi+]cc",
+                DaughterLists   = [self.selLambdaLL, self.selPion],
+                PreVertexCuts   = _strCutComb,
+                PostVertexCuts  = _strCutMoth )
+        Lambdac2LambdaLLPiNCLine = StrippingLine( self.name + "Lambdac2LambdaLLPiNCLine", 
+                prescale = self.config['controlPrescaleViaLcL0LLPiNC'],
+                algos = [ Lambdac2LambdaLLPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Lambdac2LambdaLLPiNCLine)
+
+        ''' NC Stripping Lambda_c+ -> Lambda0(DD) pi+ '''
+        Lambdac2LambdaDDPiNC = self.createCombinationSel(OutputList = "Lambdac2LambdaDDPiNC" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> Lambda0 pi+]cc",
+                DaughterLists   = [self.selLambdaDD, self.selPion],
+                PreVertexCuts   = _strCutComb,
+                PostVertexCuts  = _strCutMoth )
+        Lambdac2LambdaDDPiNCLine = StrippingLine( self.name + "Lambdac2LambdaDDPiNCLine", 
+                prescale = self.config['controlPrescaleViaLcL0DDPiNC'],
+                algos = [ Lambdac2LambdaDDPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Lambdac2LambdaDDPiNCLine)
+
+        ''' NC Stripping Lambda_c+ -> p+ K- pi+ '''
+        Lambdac2PKPiNC = self.createCombinationSel(OutputList = "Lambdac2PKPiNC" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> p+ K- pi+]cc",
+                DaughterLists   = [self.selProton, self.selKaon, self.selPion],
+                PreVertexCuts   = _strCutComb,
+                PostVertexCuts  = _strCutMoth )
+        Lambdac2PKPiNCLine = StrippingLine( self.name + "Lambdac2PKPiNCLine", 
+                prescale = self.config['controlPrescaleViaLcPKPiNC'],
+                algos = [ Lambdac2PKPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Lambdac2PKPiNCLine)
+
+        ''' NC Stripping Lambda_c+ -> p+ pi- pi+ '''
+        Lambdac2PPiPiNC = self.createCombinationSel(OutputList = "Lambdac2PPiPiNC" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> p+ pi- pi+]cc",
+                DaughterLists   = [self.selProton, self.selPion, self.selPion],
+                PreVertexCuts   = _strCutComb,
+                PostVertexCuts  = _strCutMoth )
+        Lambdac2PPiPiNCLine = StrippingLine( self.name + "Lambdac2PPiPiNCLine", 
+                prescale = self.config['controlPrescaleViaLcPPiPiNC'],
+                algos = [ Lambdac2PPiPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Lambdac2PPiPiNCLine)
+    ##  --------------------  End of LambdacSL  ------------
+    ##------------------------------------------------------------------------------------------
+
+    ##------------------------------------------------------------------------------------------
+    ## --------------------  Begin to makeOmegac0SL  ------------
+    def makeOmegac0SL( self ):
+
+        _strCutCombfor = "( (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                    "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)"\
+                    "& (APT>%(Lc_APT_Min)s) )" % self.config
+        _strCutMothfor = "( (VFASPF(VCHI2)<%(Omegac0_4Dau_VCHI2_Max)s)" \
+                    "& (BPVVDCHI2>%(Omegac0_BPVVDCHI2_Min)s)" \
+                    "& (BPVDIRA>%(Omegac0_BPVDIRA_Min)s) )" % self.config
+        
+        _strCutComb_Mass = "(ADAMASS('Omega_c0') < %(Omegac0_ADAMASS_HalfWin)s )" % self.config
+        _strCutMoth_Mass = "(ADMASS('Omega_c0') < %(Omegac0_ADMASS_HalfWin)s )" % self.config
+
+        _strCutComb   = _strCutCombfor + '&' + _strCutComb_Mass
+        _strCutMoth   = _strCutMothfor + '&' + _strCutMoth_Mass
+        
+        _strCutComb_MassXiMuSL = "(AM>%(XiMu_AM_Min)s) & (AM<%(Oc_AM_Max)s)" % self.config
+        _strCutComb_MassOmMuSL = "(AM>%(OmMu_AM_Min)s) & (AM<%(Oc_AM_Max)s)" % self.config
+
+        _strCutComb_XiMuSL = _strCutCombfor + '&' + _strCutComb_MassXiMuSL
+        _strCutComb_OmMuSL = _strCutCombfor + '&' + _strCutComb_MassOmMuSL
+        _strCutMothSL = _strCutMothfor
+
+        ''' Stripping Omega_c0 -> Omega- mu+ '''
+        Omegac02OmegaMuNu = self.createCombinationSel(OutputList = "Omegac02OmegaMuNu" + self.name,
+                DecayDescriptor = "[Omega_c0 -> Omega- mu+]cc",
+                DaughterLists   = [self.Omegaminus2LambdaK, self.selMuon],
+                PreVertexCuts   = _strCutComb_OmMuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Omegac02OmegaMuNuLine = StrippingLine( self.name + "Omegac02OmegaMuNuLine", 
+                prescale = self.config['signalPrescaleViaOmegac0'],
+                algos = [ Omegac02OmegaMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Omegac02OmegaMuNuLine)
+
+        ''' Stripping Omega_c0 -> Xi- mu+ '''
+        Omegac02XiMuNu = self.createCombinationSel(OutputList = "Omegac02XiMuNu" + self.name,
+                DecayDescriptor = "[Omega_c0 -> Xi- mu+]cc",
+                DaughterLists   = [self.Ximinus2LambdaPi, self.selMuon],
+                PreVertexCuts   = _strCutComb_XiMuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Omegac02XiMuNuLine = StrippingLine( self.name + "Omegac02XiMuNuLine", 
+                prescale = self.config['signalPrescaleViaOmegac0'],
+                algos = [ Omegac02XiMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Omegac02XiMuNuLine)
+
+        ''' ---------------------- '''
+        ''' Normalization channels '''
+        ''' ---------------------- '''
+        ''' NC Stripping Omega_c0 -> Omega- pi+ '''
+        Omegac02OmegaPiNC = self.createCombinationSel(OutputList = "Omegac02OmegaPiNC" + self.name,
+                DecayDescriptor = "[Omega_c0 -> Omega- pi+]cc",
+                DaughterLists   = [self.Omegaminus2LambdaK, self.selPion],
+                PreVertexCuts   = _strCutComb,
+                PostVertexCuts  = _strCutMoth )
+        Omegac02OmegaPiNCLine = StrippingLine( self.name + "Omegac02OmegaPiNCLine", 
+                prescale = self.config['controlPrescaleViaOmegac0NC'],
+                algos = [ Omegac02OmegaPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Omegac02OmegaPiNCLine)
+
+        ''' NC Stripping Omega_c0 -> Xi- pi+ '''
+        Omegac02XiPiNC = self.createCombinationSel(OutputList = "Omegac02XiPiNC" + self.name,
+                DecayDescriptor = "[Omega_c0 -> Xi- pi+]cc",
+                DaughterLists   = [self.Ximinus2LambdaPi, self.selPion],
+                PreVertexCuts   = _strCutComb,
+                PostVertexCuts  = _strCutMoth )
+        Omegac02XiPiNCLine = StrippingLine( self.name + "Omegac02XiPiNCLine", 
+                prescale = self.config['controlPrescaleViaOmegac0NC'],
+                algos = [ Omegac02XiPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Omegac02XiPiNCLine)
+    ## --------------------  End of makeOmegac0SL  ------------
+    ##------------------------------------------------------------------------------------------
+
+    ##------------------------------------------------------------------------------------------
+    ## --------------------  Begin to makeXicSL  ------------
+    def makeXicSL( self ):
+        #Cut for Basic 
+        _strCutCombfor = "( (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                         "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+                         "& (APT>%(Lc_APT_Min)s) )" % self.config
+        _strCutMothfor = "( (VFASPF(VCHI2)<%(Omegac0_4Dau_VCHI2_Max)s)" \
+                         "& (BPVVDCHI2>%(Xic_BPVVDCHI2_Min)s)" \
+                         "& (BPVDIRA>%(Xic_BPVDIRA_Min)s) )" % self.config
+
+        _strCutComb_XicpMass = "(ADAMASS('Xi_c+') < %(Xic_ADAMASS_HalfWin)s )" % self.config
+        _strCutMoth_XicpMass = "(ADMASS('Xi_c+') < %(Xic_ADMASS_HalfWin)s)" % self.config
+
+        _strCutComb_Xic0Mass = "(ADAMASS('Xi_c0') < %(Xic_ADAMASS_HalfWin)s )" % self.config
+        _strCutMoth_Xic0Mass = "(ADMASS('Xi_c0') < %(Xic_ADMASS_HalfWin)s)" % self.config
+        
+        _strCutCombforXicZero   = _strCutCombfor + '&' + _strCutComb_Xic0Mass
+        _strCutMothforXicZero   = _strCutMothfor + '&' + _strCutMoth_Xic0Mass
+        
+        _strCutCombforXicPlus   = _strCutCombfor + '&' + _strCutComb_XicpMass
+        _strCutMothforXicPlus   = _strCutMothfor + '&' + _strCutMoth_XicpMass
+
+        _strCutComb_MassXiMuSL = "(AM>%(XiMu_AM_Min)s) & (AM<%(Xic_AM_Max)s)" % self.config
+        _strCutComb_MassL0MuSL = "(AM>%(L0Mu_AM_Min)s) & (AM<%(Xic_AM_Max)s)" % self.config
+        
+        _strCutComb_XiMuSL = _strCutCombfor + '&' + _strCutComb_MassXiMuSL
+        _strCutComb_L0MuSL = _strCutCombfor + '&' + _strCutComb_MassL0MuSL
+        _strCutMothSL = _strCutMothfor
+
+        ''' Stripping Xi_c+ -> Lambda0(LL) mu+ '''
+        Xic2LambdaLLMuNu = self.createCombinationSel(OutputList = "Xic2LambdaLLMuNu" + self.name,
+                DecayDescriptor = "[Xi_c+ -> Lambda0 mu+]cc",
+                DaughterLists   = [self.selLambdaLL, self.selMuon],
+                PreVertexCuts   = _strCutComb_L0MuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Xic2LambdaLLMuNuLine = StrippingLine( self.name + "Xic2LambdaLLMuNuLine", 
+                prescale = self.config['signalPrescaleViaXicL0LLMuNu'],
+                algos = [ Xic2LambdaLLMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Xic2LambdaLLMuNuLine)
+
+        ''' Stripping Xi_c+ -> Lambda0(DD) mu+ '''
+        Xic2LambdaDDMuNu = self.createCombinationSel(OutputList = "Xic2LambdaDDMuNu" + self.name,
+                DecayDescriptor = "[Xi_c+ -> Lambda0 mu+]cc",
+                DaughterLists   = [self.selLambdaDD, self.selMuon],
+                PreVertexCuts   = _strCutComb_L0MuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Xic2LambdaDDMuNuLine = StrippingLine( self.name + "Xic2LambdaDDMuNuLine", 
+                prescale = self.config['signalPrescaleViaXicL0DDMuNu'],
+                algos = [ Xic2LambdaDDMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Xic2LambdaDDMuNuLine)
+
+        ''' Stripping Xi_c0 -> Xi- mu+ '''
+        Xic02XiMuNu = self.createCombinationSel(OutputList = "Xic02XiMuNu" + self.name,
+                DecayDescriptor = "[Xi_c0 -> Xi- mu+]cc",
+                DaughterLists   = [self.Ximinus2LambdaPi, self.selMuon],
+                PreVertexCuts   = _strCutComb_XiMuSL,
+                PostVertexCuts  = _strCutMothSL )
+        Xic02XiMuNuLine = StrippingLine( self.name + "Xic02XiMuNuLine", 
+                prescale = self.config['signalPrescaleViaXic'],
+                algos = [ Xic02XiMuNu ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Xic02XiMuNuLine)
+
+        ''' ---------------------- '''
+        ''' Normalization channels '''
+        ''' ---------------------- '''
+        ''' NC Stripping Xi_c+ -> Lambda0(LL) pi+ '''
+        Xic2LambdaLLPiNC = self.createCombinationSel(OutputList = "Xic2LambdaLLPiNC" + self.name,
+                DecayDescriptor = "[Xi_c+ -> Lambda0 pi+]cc",
+                DaughterLists   = [self.selLambdaLL, self.selPion],
+                PreVertexCuts   = _strCutCombforXicPlus,
+                PostVertexCuts  = _strCutMothforXicPlus )
+        Xic2LambdaLLPiNCLine = StrippingLine( self.name + "Xic2LambdaLLPiNCLine", 
+                prescale = self.config['controlPrescaleViaXicL0LLPiNC'],
+                algos = [ Xic2LambdaLLPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Xic2LambdaLLPiNCLine)
+
+        ''' NC Stripping Xi_c+ -> Lambda0(DD) pi+ '''
+        Xic2LambdaDDPiNC = self.createCombinationSel(OutputList = "Xic2LambdaDDPiNC" + self.name,
+                DecayDescriptor = "[Xi_c+ -> Lambda0 pi+]cc",
+                DaughterLists   = [self.selLambdaDD, self.selPion],
+                PreVertexCuts   = _strCutCombforXicPlus,
+                PostVertexCuts  = _strCutMothforXicPlus )
+        Xic2LambdaDDPiNCLine = StrippingLine( self.name + "Xic2LambdaDDPiNCLine", 
+                prescale = self.config['controlPrescaleViaXicL0DDPiNC'],
+                algos = [ Xic2LambdaDDPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Xic2LambdaDDPiNCLine)
+
+        ''' NC Stripping Xi_c0 -> Xi- pi+ '''
+        Xic02XiPiNC = self.createCombinationSel(OutputList = "Xic02XiPiNC" + self.name,
+                DecayDescriptor = "[Xi_c0 -> Xi- pi+]cc",
+                DaughterLists   = [self.Ximinus2LambdaPi, self.selPion],
+                PreVertexCuts   = _strCutCombforXicZero,
+                PostVertexCuts  = _strCutMothforXicZero )
+        Xic02XiPiNCLine = StrippingLine( self.name + "Xic02XiPiNCLine", 
+                prescale = self.config['controlPrescaleViaXicXiPiNC'],
+                algos = [ Xic02XiPiNC ], 
+                EnableFlavourTagging = False )
+        self.registerLine (Xic02XiPiNCLine)
+    ##  --------------------  end of makeXicSL  ------------
+    ##------------------------------------------------------------------------------------------
+
+    ##########################################################################
+    ## Basic Function
+    ##########################################################################
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                Algorithm = filter,
+                RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+            DecayDescriptor,
+            DaughterLists,
+            DaughterCuts = {} ,
+            PreVertexCuts = "ALL",
+            PostVertexCuts = "ALL") :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                DaughtersCuts = DaughterCuts,
+                MotherCut = PostVertexCuts,
+                CombinationCut = PreVertexCuts,
+                ReFitPVs = True)
+        return Selection ( OutputList,
+                Algorithm = combiner,
+                RequiredSelections = DaughterLists)
+    #print "DEBUG here is :",__file__,sys._getframe().f_lineno 
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02HHForXSec.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02HHForXSec.py
new file mode 100644
index 000000000..bfaa53446
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02HHForXSec.py
@@ -0,0 +1,349 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of
+    [D0 -> K- pi+]cc
+    [D*(2007)0 -> (D0 -> K- pi+) pi0]cc
+    [D*(2010)+ -> (D0 -> K- pi+) pi+]cc
+for open charm cross section measurement.
+"""
+
+__author__ = ['Alex Pearce']
+
+__all__ = (
+    'default_config',
+    'StrippingD02HHForXSecConf'
+)
+
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mrad
+from Configurables import CombineParticles, FilterDesktop
+from StandardParticles import (
+    StdAllNoPIDsKaons,
+    StdAllNoPIDsPions,
+    StdLooseMergedPi0,
+    StdLooseResolvedPi0
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+from MVADictHelpers import addTMVAclassifierValue
+
+default_config = {
+    'NAME': 'D02HHForXSec',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingD02HHForXSecConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum transverse momentum all D0 daughters must satisfy
+        'Daug_All_PT_MIN': 250.0*MeV,
+        # Minimum best primary vertex IP chi^2 all D0 daughters must satisfy
+        'Daug_All_BPVIPCHI2_MIN': 4.0,
+        # Minimum D0 daughter momentum
+        'Daug_P_MIN': 3.0*GeV,
+        # Maximum D0 daughter momentum
+        'Daug_P_MAX': 100.0*GeV,
+        # Minimum D0 daughter pseudorapidity
+        'Daug_ETA_MIN': 2.0,
+        # Maximum D0 daughter pseudorapidity
+        'Daug_ETA_MAX': 5.0,
+        # Minimum D0 daughter kaon DLLK
+        'K_PIDK_MIN': 5.0,
+        # Maximum D0 daughter pion DLLK
+        'Pi_PIDK_MAX': 3.0,
+        # D0 mass window around the nominal D0 mass before the vertex fit
+        'D0_ADAMASS_WIN': 80.0*MeV,
+        # Maximum D0 vertex chi^2 per vertex fit DoF
+        'D0_VCHI2VDOF_MAX': 25.0,
+        # Maximum angle between D0 momentum and D0 direction of flight
+        'D0_acosBPVDIRA_MAX': 35.0*mrad,
+        # Primary vertex displacement requirement, either that the D0 is some
+        # sigma away from the PV, or it has a minimum flight time
+        'D0_PVDispCut': '((BPVVDCHI2 > 16.0)|(BPVLTIME() > 0.150*picosecond))',
+        # Maximum delta mass value m(D*{0,+}) - m(D0)
+        'Dstar_AMDiff_MAX': 160.0*MeV,
+        # Maximum D*+ vertex chi^2 per vertex DoF (_not_ applied to D*0)
+        'Dstar_VCHI2VDOF_MAX': 25.0,
+        # Minimum D0 MVA discriminant value
+        'D0_MVA_MIN': -0.3,
+        # Path to the D0 MVA weights file
+        # BDT is not applied if this is the empty string or None
+        'D0_MVA_Weights': '$TMVAWEIGHTSROOT/data/D02HHForXSec_BDT_v1r0.xml',
+        # Dictionary of LoKi functors defining the D0 MVA input variables
+        # The keys must match those used when training the MVA
+        'D0_MVA_Variables': {
+            'D0_Loki_LV02': 'LV02',
+            'D0_Loki_BPVLTIME': "BPVLTIME()",
+            'D0_ENDVERTEX_CHI2': 'VFASPF(VCHI2/VDOF)',
+            'D0_h1_PT': 'CHILD(PT, 1)',
+            'D0_h2_PT': 'CHILD(PT, 2)',
+            'D0_h1_ETA': 'CHILD(ETA, 1)',
+            'D0_h2_ETA': 'CHILD(ETA, 2)'
+        },
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleD02HH': 0.0,
+        'PrescaleDstar2D0Pi_D02HH': 0.0,
+        'PrescaleDstar2D0Pi0Merged_D02HH': 0.0,
+        'PrescaleDstar2D0Pi0Resolved_D02HH': 0.0,
+        # Fraction of candidates to randomly throw after before stripping
+        'PostscaleD02HH': 1.0,
+        'PostscaleDstar2D0Pi_D02HH': 1.0,
+        'PostscaleDstar2D0Pi0Merged_D02HH': 1.0,
+        'PostscaleDstar2D0Pi0Resolved_D02HH': 1.0
+    }
+}
+
+
+class StrippingD02HHForXSecConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    D02HH = [
+        'D0 -> pi+ pi-',
+        'D0 -> K- pi+',
+        'D0 -> K+ pi-',
+        'D0 -> K+ K-'
+    ]
+    Dstar2D0Pi = [
+        'D*(2010)+ -> D0 pi+',
+        'D*(2010)- -> D0 pi-'
+    ]
+    Dstar2D0Pi0 = [
+        'D*(2007)0 -> D0 pi0'
+    ]
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        d02HH_name = '{0}D02HH'.format(name)
+        dstar_name = '{0}Dstar2D0Pi_D02HH'.format(name)
+        dstar0_merged_name = '{0}Dstar2D0Pi0Merged_D02HH'.format(name)
+        dstar0_resolved_name = '{0}Dstar2D0Pi0Resolved_D02HH'.format(name)
+
+        self.inPions = StdAllNoPIDsPions
+        self.inSoftPions = StdAllNoPIDsPions
+        self.inKaons = StdAllNoPIDsKaons
+        self.inMergedPions = StdLooseMergedPi0
+        self.inResolvedPions = StdLooseResolvedPi0
+
+        self.selD02HH = self.makeD02HH(
+            d02HH_name,
+            inputSel=[self.inKaons, self.inPions],
+            decDescriptors=self.D02HH
+        )
+        self.selD02HHMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(d02HH_name),
+            self.selD02HH
+        )
+
+        self.line_D02HH = self.make_line(
+            name='{0}Line'.format(d02HH_name),
+            prescale=config['PrescaleD02HH'],
+            postscale=config['PostscaleD02HH'],
+            selection=self.selD02HHMVA,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.selDstar2D0Pi_D02HH = self.makeDstar2D0Pi(
+            dstar_name,
+            inputSel=[self.selD02HHMVA, self.inSoftPions],
+            decDescriptors=self.Dstar2D0Pi
+        )
+
+        self.line_Dstar2D0Pi_D02HH = self.make_line(
+            name='{0}Line'.format(dstar_name),
+            prescale=config['PrescaleDstar2D0Pi_D02HH'],
+            postscale=config['PostscaleDstar2D0Pi_D02HH'],
+            selection=self.selDstar2D0Pi_D02HH,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.selDstar2D0Pi0Merged_D02HH = self.makeDstar2D0Pi0(
+            dstar0_merged_name,
+            inputSel=[self.selD02HHMVA, self.inMergedPions],
+            decDescriptors=self.Dstar2D0Pi0
+        )
+
+        self.line_Dstar2D0Pi0Merged_D02HH = self.make_line(
+            name='{0}Line'.format(dstar0_merged_name),
+            prescale=config['PrescaleDstar2D0Pi0Merged_D02HH'],
+            postscale=config['PostscaleDstar2D0Pi0Merged_D02HH'],
+            selection=self.selDstar2D0Pi0Merged_D02HH,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.selDstar2D0Pi0Resolved_D02HH = self.makeDstar2D0Pi0(
+            dstar0_resolved_name,
+            inputSel=[self.selD02HHMVA, self.inResolvedPions],
+            decDescriptors=self.Dstar2D0Pi0
+        )
+
+        self.line_Dstar2D0Pi0Resolved_D02HH = self.make_line(
+            name='{0}Line'.format(dstar0_resolved_name),
+            prescale=config['PrescaleDstar2D0Pi0Resolved_D02HH'],
+            postscale=config['PostscaleDstar2D0Pi0Resolved_D02HH'],
+            selection=self.selDstar2D0Pi0Resolved_D02HH,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeD02HH(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D0 -> h- h+ decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        daugCuts = (
+            '(PT > {0[Daug_All_PT_MIN]})'
+            '& (BPVIPCHI2() > {0[Daug_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+
+        pidFiducialCuts = (
+            '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+            '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+        ).format(self.config)
+
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi > {0[K_PIDK_MIN]})'
+        ).format(self.config)
+
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi < {0[Pi_PIDK_MAX]})'
+        ).format(self.config)
+
+        combCuts = "(ADAMASS('D0') < {0[D0_ADAMASS_WIN]})".format(self.config)
+
+        d0Cuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[D0_VCHI2VDOF_MAX]})'
+            '& ({0[D0_PVDispCut]})'
+            '& (BPVDIRA > cos({0[D0_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+
+        _D0 = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            DaughtersCuts={
+                'pi+': '{0} & {1}'.format(daugCuts, pionPIDCuts),
+                'K+': '{0} & {1}'.format(daugCuts, kaonPIDCuts)
+            },
+            CombinationCut=combCuts,
+            MotherCut=d0Cuts
+        )
+
+        return Selection(name, Algorithm=_D0, RequiredSelections=inputSel)
+
+    def makeDstar2D0Pi(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D*+ -> D0 pi+ decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        combCuts = '((AM - AM1) < {0[Dstar_AMDiff_MAX]})'.format(self.config)
+
+        dstarCuts = '(VFASPF(VCHI2/VDOF) < {0[Dstar_VCHI2VDOF_MAX]})'.format(
+            self.config
+        )
+
+        _Dstar = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            CombinationCut=combCuts,
+            MotherCut=dstarCuts
+        )
+
+        return Selection(name, Algorithm=_Dstar, RequiredSelections=inputSel)
+
+    def makeDstar2D0Pi0(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D*0 -> D0 pi0 decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        combCuts = '((AM - AM1) < {0[Dstar_AMDiff_MAX]})'.format(self.config)
+
+        dstarCuts = '(ALL)'.format(self.config)
+
+        _Dstar = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            CombinationCut=combCuts,
+            MotherCut=dstarCuts
+        )
+
+        return Selection(name, Algorithm=_Dstar, RequiredSelections=inputSel)
+
+    def makeMVASelection(self, name, inputSel):
+        # Don't apply a BDT if the weights file has not been specified
+        if not self.config['D0_MVA_Weights']:
+            return inputSel
+
+        cut = "VALUE('LoKi::Hybrid::DictValue/{0}') > {1[D0_MVA_MIN]}".format(
+            name, self.config
+        )
+        mva = FilterDesktop('{0}Filter'.format(name), Code=cut)
+
+        addTMVAclassifierValue(
+            Component=mva,
+            XMLFile=self.config['D0_MVA_Weights'],
+            Variables=self.config['D0_MVA_Variables'],
+            ToolName=name
+        )
+
+        return Selection(name, Algorithm=mva, RequiredSelections=[inputSel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02K3PiForXSec.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02K3PiForXSec.py
new file mode 100644
index 000000000..f57e6e9b2
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02K3PiForXSec.py
@@ -0,0 +1,367 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of
+    [D0 -> K- pi+ pi- pi+]cc
+    [D*(2007)0 -> (D0 -> K- pi+ pi- pi+) pi0]cc
+    [D*(2010)+ -> (D0 -> K- pi+ pi- pi+) pi+]cc
+for open charm cross section measurement.
+"""
+
+__author__ = ['Alex Pearce']
+
+__all__ = (
+    'default_config',
+    'StrippingD02K3PiForXSecConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from Configurables import CombineParticles, FilterDesktop
+from StandardParticles import (
+    StdAllNoPIDsKaons,
+    StdAllNoPIDsPions,
+    StdLooseMergedPi0,
+    StdLooseResolvedPi0
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+from MVADictHelpers import addTMVAclassifierValue
+
+default_config = {
+    'NAME': 'D02K3PiForXSec',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingD02K3PiForXSecConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum transverse momentum all D0 daughters must satisfy
+        'Daug_All_PT_MIN': 200.0*MeV,
+        # Minimum transverse momentum at least 3 D0 daughters must satisfy
+        'Daug_3of4_PT_MIN': 300.0*MeV,
+        # Minimum transverse momentum at least 2 D0 daughters must satisfy
+        'Daug_2of4_PT_MIN': 350.0*MeV,
+        # Minimum transverse momentum at least 1 D0 daughter must satisfy
+        'Daug_1of4_PT_MIN': 400.0*MeV,
+        # Minimum best primary vertex IP chi^2 all D0 daughters must satisfy
+        'Daug_All_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 3 D0 daughters must satisfy
+        'Daug_3of4_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 2 D0 daughters must satisfy
+        'Daug_2of4_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 1 D0 daughter must satisfy
+        'Daug_1of4_BPVIPCHI2_MIN': 4.0,
+        # Minimum D0 daughter momentum
+        'Daug_P_MIN': 3.0*GeV,
+        # Maximum D0 daughter momentum
+        'Daug_P_MAX': 100.0*GeV,
+        # Minimum D0 daughter pseudorapidity
+        'Daug_ETA_MIN': 2.0,
+        # Maximum D0 daughter pseudorapidity
+        'Daug_ETA_MAX': 5.0,
+        # Minimum D0 daughter kaon DLLK
+        'K_PIDK_MIN': 5.0,
+        # Maximum D0 daughter pion DLLK
+        'Pi_PIDK_MAX': 3.0,
+        # D0 mass window around the nominal D0 mass before the vertex fit
+        'Comb_ADAMASS_WIN': 80.0*MeV,
+        # Maximum distance of closest approach of D0 daughters
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Maximum D0 vertex chi^2 per vertex fit DoF
+        'D0_VCHI2VDOF_MAX': 25.0,
+        # Maximum angle between D0 momentum and D0 direction of flight
+        'D0_acosBPVDIRA_MAX': 35.0*mrad,
+        # Primary vertex displacement requirement, either that the D0 is some
+        # sigma away from the PV, or it has a minimum flight time
+        'D0_PVDispCut': '((BPVVDCHI2 > 16.0)|(BPVLTIME() > 0.150*picosecond))',
+        # Maximum delta mass value m(D*{0,+}) - m(D0)
+        'Dstar_AMDiff_MAX': 160.0*MeV,
+        # Maximum D*+ vertex chi^2 per vertex DoF (_not_ applied to D*0)
+        'Dstar_VCHI2VDOF_MAX': 25.0,
+        # Minimum D0 MVA discriminant value
+        'D0_MVA_MIN': -0.3,
+        # Path to the D0 MVA weights file
+        # BDT is not applied if this is the empty string or None
+        'D0_MVA_Weights': '$TMVAWEIGHTSROOT/data/D02K3PiForXSec_BDT_v1r0.xml',
+        # Dictionary of LoKi functors defining the D0 MVA input variables
+        # The keys must match those used when training the MVA
+        'D0_MVA_Variables': {
+            'D0_Loki_LV02': 'LV02',
+            'D0_Loki_BPVLTIME': "BPVLTIME()",
+            'D0_Loki_DOCAMAX': "DOCAMAX",
+            'D0_DIRA_OWNPV': 'BPVDIRA',
+            'D0_ENDVERTEX_CHI2': 'VFASPF(VCHI2/VDOF)',
+            'D0_h1_PT': 'CHILD(PT, 1)',
+            'D0_h2_PT': 'CHILD(PT, 2)',
+            'D0_h3_PT': 'CHILD(PT, 3)',
+            'D0_h4_PT': 'CHILD(PT, 4)',
+            'D0_h1_ETA': 'CHILD(ETA, 1)',
+            'D0_h2_ETA': 'CHILD(ETA, 2)',
+            'D0_h3_ETA': 'CHILD(ETA, 3)',
+            'D0_h4_ETA': 'CHILD(ETA, 4)'
+        },
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleD02K3Pi': 0.0,
+        'PrescaleDstar2D0Pi_D02K3Pi': 0.0,
+        'PrescaleDstar2D0Pi0Merged_D02K3Pi': 0.0,
+        'PrescaleDstar2D0Pi0Resolved_D02K3Pi': 0.0,
+        # Fraction of candidates to randomly throw after before stripping
+        'PostscaleD02K3Pi': 1.0,
+        'PostscaleDstar2D0Pi_D02K3Pi': 1.0,
+        'PostscaleDstar2D0Pi0Merged_D02K3Pi': 1.0,
+        'PostscaleDstar2D0Pi0Resolved_D02K3Pi': 1.0
+    }
+}
+
+
+class StrippingD02K3PiForXSecConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    D02K3Pi = ['[D0 -> K- pi+ pi- pi+]cc']
+    Dstar2D0Pi = ['[D*(2010)+ -> D0 pi+]cc']
+    Dstar2D0Pi0 = ['D*(2007)0 -> D0 pi0']
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        d02K3Pi_name = '{0}D02K3Pi'.format(name)
+        dstar_name = '{0}Dstar2D0Pi_D02K3Pi'.format(name)
+        dstar0_merged_name = '{0}Dstar2D0Pi0Merged_D02K3Pi'.format(name)
+        dstar0_resolved_name = '{0}Dstar2D0Pi0Resolved_D02K3Pi'.format(name)
+
+        self.inPions = StdAllNoPIDsPions
+        self.inSoftPions = StdAllNoPIDsPions
+        self.inKaons = StdAllNoPIDsKaons
+        self.inMergedPions = StdLooseMergedPi0
+        self.inResolvedPions = StdLooseResolvedPi0
+
+        self.selD02K3Pi = self.makeD02K3Pi(
+            d02K3Pi_name,
+            inputSel=[self.inKaons, self.inPions],
+            decDescriptors=self.D02K3Pi
+        )
+        self.selD02K3PiMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(d02K3Pi_name),
+            self.selD02K3Pi
+        )
+
+        self.line_D02K3Pi = self.make_line(
+            name=d02K3Pi_name + 'Line',
+            selection=self.selD02K3PiMVA,
+            prescale=config['PrescaleD02K3Pi'],
+            postscale=config['PostscaleD02K3Pi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.selDstar2D0Pi_D02K3Pi = self.makeDstar2D0Pi(
+            dstar_name,
+            inputSel=[self.selD02K3PiMVA, self.inSoftPions],
+            decDescriptors=self.Dstar2D0Pi
+        )
+
+        self.line_Dstar2D0Pi_D02K3Pi = self.make_line(
+            name=dstar_name + 'Line',
+            prescale=config['PrescaleDstar2D0Pi_D02K3Pi'],
+            postscale=config['PostscaleDstar2D0Pi_D02K3Pi'],
+            selection=self.selDstar2D0Pi_D02K3Pi,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.selDstar2D0Pi0Merged_D02K3Pi = self.makeDstar2D0Pi0(
+            dstar0_merged_name,
+            inputSel=[self.selD02K3PiMVA, self.inMergedPions],
+            decDescriptors=self.Dstar2D0Pi0
+        )
+
+        self.line_Dstar2D0Pi0Merged_D02K3Pi = self.make_line(
+            name='{0}Line'.format(dstar0_merged_name),
+            prescale=config['PrescaleDstar2D0Pi0Merged_D02K3Pi'],
+            postscale=config['PostscaleDstar2D0Pi0Merged_D02K3Pi'],
+            selection=self.selDstar2D0Pi0Merged_D02K3Pi,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.selDstar2D0Pi0Resolved_D02K3Pi = self.makeDstar2D0Pi0(
+            dstar0_resolved_name,
+            inputSel=[self.selD02K3PiMVA, self.inResolvedPions],
+            decDescriptors=self.Dstar2D0Pi0
+        )
+
+        self.line_Dstar2D0Pi0Resolved_D02K3Pi = self.make_line(
+            name='{0}Line'.format(dstar0_resolved_name),
+            prescale=config['PrescaleDstar2D0Pi0Resolved_D02K3Pi'],
+            postscale=config['PostscaleDstar2D0Pi0Resolved_D02K3Pi'],
+            selection=self.selDstar2D0Pi0Resolved_D02K3Pi,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeD02K3Pi(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D0 -> h- h+ h- h+ decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        daugCuts = (
+            '(PT > {0[Daug_All_PT_MIN]})'
+            '& (BPVIPCHI2() > {0[Daug_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+
+        pidFiducialCuts = (
+            '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+            '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+        ).format(self.config)
+
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi < {0[Pi_PIDK_MAX]})'
+        ).format(self.config)
+
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi > {0[K_PIDK_MIN]})'
+        ).format(self.config)
+
+        combCuts = (
+            "(ADAMASS('D0') < {0[Comb_ADAMASS_WIN]})"
+            '& (AMAXCHILD(PT) > {0[Daug_1of4_PT_MIN]})'
+            '& (AMAXCHILD(BPVIPCHI2()) > {0[Daug_1of4_BPVIPCHI2_MIN]})'
+            '& (ANUM(PT > {0[Daug_3of4_PT_MIN]}) >= 3)'
+            '& (ANUM(PT > {0[Daug_2of4_PT_MIN]}) >= 2)'
+            '& (ANUM(BPVIPCHI2() > {0[Daug_3of4_BPVIPCHI2_MIN]}) >= 3)'
+            '& (ANUM(BPVIPCHI2() > {0[Daug_2of4_BPVIPCHI2_MIN]}) >= 2)'
+            "& (ACUTDOCA({0[Comb_ADOCAMAX_MAX]}, ''))"
+        ).format(self.config)
+
+        d0Cuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[D0_VCHI2VDOF_MAX]})'
+            '& ({0[D0_PVDispCut]})'
+            '& (BPVDIRA > cos({0[D0_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+
+        _D0 = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            DaughtersCuts={
+                'pi+': '{0} & {1}'.format(daugCuts, pionPIDCuts),
+                'K+': '{0} & {1}'.format(daugCuts, kaonPIDCuts)
+            },
+            CombinationCut=combCuts,
+            MotherCut=d0Cuts
+        )
+
+        return Selection(name, Algorithm=_D0, RequiredSelections=inputSel)
+
+    def makeDstar2D0Pi(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D*+ -> D0 pi+ decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        combCuts = '((AM - AM1) < {0[Dstar_AMDiff_MAX]})'.format(self.config)
+
+        dstarCuts = '(VFASPF(VCHI2/VDOF) < {0[Dstar_VCHI2VDOF_MAX]})'.format(
+            self.config
+        )
+
+        _Dstar = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            CombinationCut=combCuts,
+            MotherCut=dstarCuts
+        )
+
+        return Selection(name, Algorithm=_Dstar, RequiredSelections=inputSel)
+
+    def makeDstar2D0Pi0(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D*0 -> D0 pi0 decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        combCuts = '((AM - AM1) < {0[Dstar_AMDiff_MAX]})'.format(self.config)
+
+        dstarCuts = '(ALL)'.format(self.config)
+
+        _Dstar = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            CombinationCut=combCuts,
+            MotherCut=dstarCuts
+        )
+
+        return Selection(name, Algorithm=_Dstar, RequiredSelections=inputSel)
+
+    def makeMVASelection(self, name, inputSel):
+        # Don't apply a BDT if the weights file has not been specified
+        if not self.config['D0_MVA_Weights']:
+            return inputSel
+
+        cut = "VALUE('LoKi::Hybrid::DictValue/{0}') > {1[D0_MVA_MIN]}".format(
+            name, self.config
+        )
+        mva = FilterDesktop('{0}Filter'.format(name), Code=cut)
+
+        addTMVAclassifierValue(
+            Component=mva,
+            XMLFile=self.config['D0_MVA_Weights'],
+            Variables=self.config['D0_MVA_Variables'],
+            ToolName=name
+        )
+
+        return Selection(name, Algorithm=mva, RequiredSelections=[inputSel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02KSKS.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02KSKS.py
new file mode 100644
index 000000000..8a3823c1d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD02KSKS.py
@@ -0,0 +1,705 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+"""
+Module for construction of D0->KSKS taged and untaged (stripping Selections and StrippingLines.
+Provides functions to build, KS->LL (from StdLooseKsLL), KS->DD (from StdLooseKsDD), D0->KSLL KSLL (D0LL), D0->KSLL KSDD (D0LD) and D0->KSDD KSDD (D0DD) selections.
+Provides class D02KSKSConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Under usage of the KS-cut variable
+nu'_2 = log((piplus_BPVIPCHI2*piminus_BPVIPCHI2)/(KS0_BPVIPCHI2^2 + KS0_DOCAMAX^2))
+Exported symbols (use python help!):
+    - D02KSKSConf
+"""
+
+__author__ = ['Markward Britsch','Marianna Fontana', 'Michael Sokoloff']
+__date__ = '15/05/2014'
+__version__ = 'Stripping23'
+__all__ = 'D02KSKSConf'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdAllNoPIDsPions as Pions
+#from StandardParticles import StdNoPIDsPions as Pions
+#from StandardParticles import StdLoosePions as Pions
+from StandardParticles import StdNoPIDsDownPions as DownPions
+from StandardParticles import StdNoPIDsUpPions as UpPions
+#from StandardParticles import StdLooseKaons as Kaons
+
+
+default_config = {
+    'NAME'          : 'D02KSKS',
+    'WGs'           : ['Charm'],
+    'BUILDERTYPE'   : 'D02KSKSConf',
+    'CONFIG'        : {'D0_MassWindowBeforeFit'          : 150.0, # D0 mass window cut in MeV before vertex fit
+                       'D0_MassWindow'                   : 100.0, # D0 mass window cut in MeV 
+                       'D0_DOCA_LL'                      : 1.0, # DOCA cut in mm for D0->KSLL KSLL
+                       'D0_DOCA_DD'                      : 4.0, # DOCA cut in mm for D0->KSLL KSDD and D0->KSDD KSDD
+                       'KS_LL_nu2prime'                  : 0.0, # nu'_2 = log((piplus_BPVIPCHI2*piminus_BPVIPCHI2)/(KS0_BPVIPCHI2^2 + KS0_DOCAMAX^2)), preselection cut for KsLL
+                       'KS_LL_signedFLchi2'              : 50.0, # KsLL siged flight length chi2 preselection cut
+                       'KS_LL_TRGHOSTPROB'		    : 1.0,		# Track ghost probability KSLL
+                       'KS_DD_nu2prime'                  : 0.0, # nu'_2, preselection cut for KsLL
+                       'KS_DD_signedFLchi2'              : 50.0, # KsDD siged flight length chi2 preselection cut
+                       'KS_DD_TRGHOSTPROB'		    : 1.0,		# Track ghost probability KSDD
+                       
+                       'D0_vertexChi2_LL'                : 20.0, # D0LL reduced vertex chi2 cut
+                       'D0_IPchi2_LL'                    : 50.0, # D0LL IP chi2 cut
+                       'D0_KS_signedFLchi2_LL'           : 200.0, # D0LL signed flight length of the Ks
+                       'D0_signedFLchi2_LL'              : -1.0, # D0LL signed flight length chi2 cut
+                       
+                       'D0_vertexChi2_LD'                : 20.0, # D0LD reduced vertex chi2 cut
+                       'D0_IPchi2_LD'                    : 10.0, # D0LD IP chi2 cut
+                       'D0_KSLL_signedFLchi2_LD'         : 500.0, # D0LD signed flight length of the KsLL cut
+                       'D0_signedFLchi2_LD'              : 1.0, # D0LD signed flight length chi2 cut
+                       
+                       'D0_vertexChi2_DD'                : 20.0, # D0DD reduced vertex chi2 cut
+                       'D0_IPchi2_DD'                    : 10.0, # D0DD IP chi2 cut
+                       'D0_KS_nu2prime'                  : 4.0, # D0DD KS nu'_2 cut
+                       'D0_lnPt_DD'                      : 21.0, # D0DD ln(D0_PT*KS0_PT*KS00_PT)
+                       
+                       'slowPi_IPchi2_LL'                : 40.0, # slow pi IP chi2 cut for LL
+                       'slowPi_IPchi2_LD'                : 40.0, # slow pi IP chi2 cut for LD
+                       'slowPi_IPchi2_DD'                : 40.0, # slow pi IP chi2 cut for DD
+	
+                       'slowPi_LLL_TRGHOSTPROB'	    : 1.0,  # Track ghost probability slow pi LL
+                       'slowPi_LDL_TRGHOSTPROB'	    : 1.0,  # Track ghost probability slow pi LD
+                       'slowPi_DDL_TRGHOSTPROB'	    : 1.0,  # Track ghost probability slow pi DD
+                       
+                       'slowPi_LLU_TRGHOSTPROB'	    : 1.0,  # Track ghost probability slow pi LL
+                       'slowPi_LDU_TRGHOSTPROB'	    : 1.0,  # Track ghost probability slow pi LD
+                       'slowPi_DDU_TRGHOSTPROB'	    : 1.0,  # Track ghost probability slow pi DD
+	
+                       'Dst_mass_LL'                     : 200, # mass window on D* cut LL in MeV
+                       'Dst_mass_LD'                     : 200, # mass window on D* cut LD in MeV
+                       'Dst_mass_DD'                     : 200, # mass window on D* cut DD in MeV
+                       'Dst_vertexChi2_LL'               : 40.0, # Dst reduces vertex chi2 cut LL
+                       'Dst_vertexChi2_LD'               : 40.0, # Dst reduces vertex chi2 cut LD
+                       'Dst_vertexChi2_DD'               : 40.0, # Dst reduces vertex chi2 cut DD
+
+                       'Dst_massDiffLow_LL'              : 135, # m_D* - m_D0 low mass difference cut in MeV
+                       'Dst_massDiffHigh_LL'             : 160, # m_D* - m_D0 high mass difference cut in MeV
+                       'Dst_massDiffLow_LD'              : 135, # m_D* - m_D0 low mass difference cut in MeV
+                       'Dst_massDiffHigh_LD'             : 160, # m_D* - m_D0 high mass difference cut in MeV
+                       'Dst_massDiffLow_DD'              : 135, # m_D* - m_D0 low mass difference cut in MeV
+                       'Dst_massDiffHigh_DD'             : 160, # m_D* - m_D0 high mass difference cut in MeV
+                  
+                       'PrescaleLL'                        : 1.0,
+                       'PostscaleLL'                       : 1.0,
+                       'PrescaleLD'                        : 1.0,
+                       'PostscaleLD'                       : 1.0,
+                       'PrescaleDD'                        : 1.0,
+                       'PostscaleDD'                       : 1.0,
+                       
+                       'DstPrescaleLL'                        : 1.0,
+                       'DstPostscaleLL'                       : 1.0,
+                       'DstPrescaleLD'                        : 1.0,
+                       'DstPostscaleLD'                       : 1.0,
+                       'DstPrescaleDD'                        : 1.0,
+                       'DstPostscaleDD'                       : 1.0
+                       
+                       },
+    'STREAMS'      : ['Charm']
+    }
+
+class D02KSKSConf(LineBuilder) :
+    """
+    Builder of D0->KSKS stripping Selection and StrippingLine.
+    Constructs D0 -> KS KS Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> bs2ksksConf = D02KSKSConf('D02KSKSTest',config)
+    >>> bs2ksksLines = bs2ksksConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+
+    selKS2LL               : KS -> Long Long Selection object
+
+    selKS2DD              : KS -> Downstream Downstream Selection object
+
+    selD02KSLLKSLL            : D0 -> KS(LL) KS(LL) Selection object
+    ll_line                : StrippingLine made out of selD02KSLLKSLL
+    lines                  : List of lines, [ll_line]
+
+    selD02KSLLKSDD           : D0 -> KS(LL) KS(DD) Selection object
+    ld_line                : StrippingLine made out of selD02KSLLKSDD
+    lines                  : List of lines, [ld_line]
+
+    selD02KSDDKSDD            : D0 -> KS(DD) KS(DD) Selection object
+    dd_line                : StrippingLine made out of selD02KSDDKSDD
+    lines                  : List of lines, [dd_line]
+
+    selDst2D0LL_L          : D*+ -> pi+(L) (D0 -> KS(LL) KS(LL)) Selection object
+    Dst_ll_l_line              : StrippingLine made out of selD02KSLLKSLL
+    lines                  : List of lines, [Dst_ll_l_line]
+
+    selDst2D0LD_L             : D*+ -> pi+(L) (D0 -> KS(LL) KS(DD)) Selection object
+    Dst_ld_l_line              : StrippingLine made out of selD02KSLLKSDD
+    lines                  : List of lines, [Dst_ld_l_line]
+
+    selDst2D0DD_L            : D*+ -> pi+(L) (D0 -> KS(DD) KS(DD)) Selection object
+    Dst_dd_l_line              : StrippingLine made out of selD02KSDDKSDD
+    lines                  : List of lines, [Dst_dd_l_line]
+
+    selDst2D0LL_U          : D*+ -> pi+(U) (D0 -> KS(LL) KS(LL)) Selection object
+    Dst_ll_u_line              : StrippingLine made out of selD02KSLLKSLL
+    lines                  : List of lines, [Dst_ll_u_line]
+
+    selDst2D0LD_U             : D*+ -> pi+(U) (D0 -> KS(LL) KS(DD)) Selection object
+    Dst_ld_u_line              : StrippingLine made out of selD02KSLLKSDD
+    lines                  : List of lines, [Dst_ld_u_line]
+
+    selDst2D0DD_U            : D*+ -> pi+(U) (D0 -> KS(DD) KS(DD)) Selection object
+    Dst_dd_u_line              : StrippingLine made out of selD02KSDDKSDD
+    lines                  : List of lines, [Dst_dd_u_line]
+
+    Exports as class data member:
+    D02KSKSConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        ll_name = name+'LL'
+        dd_name = name+'DD'
+        ld_name = name+'LD'
+        ll_l_name = name+'LL_L'
+        ll_u_name = name+'LL_U'
+        dd_l_name = name+'DD_L'
+        dd_u_name = name+'DD_U'
+        ld_l_name = name+'LD_L'
+        ld_u_name = name+'LD_U'
+
+        #GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+        #    'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        self.pions = Pions
+        self.down_pions = DownPions
+        self.up_pions = UpPions
+# no Kaons anymore        self.kaons = Kaons
+
+#        self.hadrons = MergedSelection("HadronsFor" + name,
+#                                       RequiredSelections = [ self.pions, self.kaons ] )
+
+        # no merged selection required , because Kaon+/- are no longer considered
+
+# D0 lineKs creation:
+#        self.makeKS2DD( 'KSfor'+dd_name, config )
+        self.makeKS2LL( 'KSfor'+ll_name, config )
+        self.makeKS2DD( 'KSfor'+dd_name, config )
+
+
+# D0 lines:
+#        self.makeD02KSDDhh( dd_name, config )
+        self.makeD02KSLLKSLL( ll_name, config )
+
+
+        self.ll_line = StrippingLine(ll_name+"Line",
+            prescale = config['PrescaleLL'],
+            postscale = config['PostscaleLL'],
+            selection =  self.selD02KSLLKSLL#,
+            #FILTER = GECCode
+            )
+
+#        self.registerLine(self.dd_line)
+        self.registerLine(self.ll_line)
+
+        self.makeD02KSLLKSDD( ld_name, config )
+
+
+        self.ld_line = StrippingLine(ld_name+"Line",
+            prescale = config['PrescaleLD'],
+            postscale = config['PostscaleLD'],
+            selection =  self.selD02KSLLKSDD#,
+            #FILTER = GECCode
+            )
+
+#        self.registerLine(self.dd_line)
+        self.registerLine(self.ld_line)
+
+        self.makeD02KSDDKSDD( dd_name, config )
+
+
+        self.dd_line = StrippingLine(dd_name+"Line",
+            prescale = config['PrescaleDD'],
+            postscale = config['PostscaleDD'],
+            selection =  self.selD02KSDDKSDD#,
+            #FILTER = GECCode
+            )
+
+#        self.registerLine(self.dd_line)
+        self.registerLine(self.dd_line)
+
+# Dst lines with LONG slow pion:
+        self.makeDst2D0LL_L( 'Dst'+ll_l_name, config )
+        self.Dst_ll_l_line = StrippingLine('Dst'+ll_l_name+"Line",
+            prescale = config['DstPrescaleLL'],
+            postscale = config['DstPostscaleLL'],
+            selection =  self.selDst2D0LL_L#,
+            #FILTER = GECCode
+            )
+        self.registerLine(self.Dst_ll_l_line)
+
+        self.makeDst2D0LD_L( 'Dst'+ld_l_name, config )
+        self.Dst_ld_l_line = StrippingLine('Dst'+ld_l_name+"Line",
+            prescale = config['DstPrescaleLD'],
+            postscale = config['DstPostscaleLD'],
+            selection =  self.selDst2D0LD_L#,
+            #FILTER = GECCode
+            )
+        self.registerLine(self.Dst_ld_l_line)
+
+        self.makeDst2D0DD_L( 'Dst'+dd_l_name, config )
+        self.Dst_dd_l_line = StrippingLine('Dst'+dd_l_name+"Line",
+            prescale = config['DstPrescaleDD'],
+            postscale = config['DstPostscaleDD'],
+            selection =  self.selDst2D0DD_L#,
+            #FILTER = GECCode
+            )
+        self.registerLine(self.Dst_dd_l_line)
+
+# Dst lines with UP slow pion:
+        self.makeDst2D0LL_U( 'Dst'+ll_u_name, config )
+        self.Dst_ll_u_line = StrippingLine('Dst'+ll_u_name+"Line",
+            prescale = config['DstPrescaleLL'],
+            postscale = config['DstPostscaleLL'],
+            selection =  self.selDst2D0LL_U#,
+            #FILTER = GECCode
+            )
+        self.registerLine(self.Dst_ll_u_line)
+
+        self.makeDst2D0LD_U( 'Dst'+ld_u_name, config )
+        self.Dst_ld_u_line = StrippingLine('Dst'+ld_u_name+"Line",
+            prescale = config['DstPrescaleLD'],
+            postscale = config['DstPostscaleLD'],
+            selection =  self.selDst2D0LD_U#,
+            #FILTER = GECCode
+            )
+        self.registerLine(self.Dst_ld_u_line)
+
+        self.makeDst2D0DD_U( 'Dst'+dd_u_name, config )
+        self.Dst_dd_u_line = StrippingLine('Dst'+dd_u_name+"Line",
+            prescale = config['DstPrescaleDD'],
+            postscale = config['DstPostscaleDD'],
+            selection =  self.selDst2D0DD_U#,
+            #FILTER = GECCode
+            )
+        self.registerLine(self.Dst_dd_u_line)
+
+
+    def makeKS2LL( self, name, config ) :
+#        # define all the cuts
+#
+#        #1st daughters cuts 
+#
+#
+#        # before vretex fit cuts 
+#
+##        _DaughterCuts = {"pi-" : _cut_prob_KNDL,
+##                         "pi+" : _cut_prob_KPDL}
+##        _DaughterCuts = {"pi+" : "(P>2*GeV)"}
+#
+#        _CombinationCuts = "(ACUTDOCA(1.0*mm,'')) & (ADAMASS('KS0')<50*MeV)"
+#
+#
+#
+##        _trkChi2Cut1 = "(CHILDCUT((TRCHI2DOF<%s),1))" % config['Trk_Chi2']
+##        _trkChi2Cut2 = "(CHILDCUT((TRCHI2DOF<%s),2))" % config['Trk_Chi2']
+#        _MotherCuts = "PT>-100"
+#
+#        ########## EndCuts definition
+#
+#
+#
+#        # make the Ks from StdAllNoPIDsPions
+#        _Ks = CombineParticles( DecayDescriptor = "KS0 -> pi+ pi-" ,
+#                                #DaughtersCuts = _DaughterCuts,
+#                                CombinationCut = _CombinationCuts,
+#                                MotherCut = _MotherCuts)
+#
+#
+        ## get the KS's to filter
+        _stdKSLL = DataOnDemand( Location = "Phys/StdLooseKsLL/Particles" )
+        #_allCuts = "(DOCAMAX < 1.0*mm)  & (ADMASS('KS0')<50*MeV)"
+        #_doca_cut = "(DOCAMAX < %s*mm)" % config['KS_LL_DOCA']
+        #_mass_cut = "(ADMASS('KS0')<%s*MeV)" % config['KS_LL_MASS']
+        _nu2prime_cut = "(log((CHILD(BPVIPCHI2(),1)*CHILD(BPVIPCHI2(),2))/(BPVIPCHI2()*BPVIPCHI2() + DOCAMAX*DOCAMAX)) > %s)" % config['KS_LL_nu2prime'] # 0
+        _signedFLchi2_cut = "(BPVLTSIGNCHI2() > %s)" % config['KS_LL_signedFLchi2'] # 50
+        _trghost_cut1 = "(CHILD(TRGHOSTPROB, 1) <=%s )" % config['KS_LL_TRGHOSTPROB']
+        _trghost_cut2 = "(CHILD(TRGHOSTPROB, 2) <=%s )" % config['KS_LL_TRGHOSTPROB']
+	
+        _allCuts = _nu2prime_cut + "&" + _signedFLchi2_cut + "&" + _trghost_cut1 + "&" + _trghost_cut2
+        
+        ## make the filter
+        _filterKSLL = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        #self.selKS2LL = Selection( "selKS2LL_" + name, Algorithm = _Ks, RequiredSelections = [ self.pions  ] )
+        #self.selKS2LL = Selection( "selKS2LL_" + name, Algorithm = _Ks, RequiredSelections = [ _selPions]  )
+        self.selKS2LL = Selection( "selKS2LL_" + name, Algorithm = _filterKSLL, RequiredSelections = [_stdKSLL] )
+
+
+    def makeKS2DD( self, name, config ) :
+
+        # define all the cuts
+
+        #1st daughters cuts 
+
+
+        # before vretex fit cuts 
+
+
+#        #_DaughterCuts = {"pi+" : "(P>2*GeV) & (MIPDV(PRIMARY)<100.*mm) & (PT>200*MeV)"}
+#        _DaughterCuts = {}
+#        
+#        _CombinationCuts = "(ACUTDOCA(4.0*mm,'')) & (ADAMASS('KS0')<100*MeV)"
+#
+#
+#
+##        _trkChi2Cut1 = "(CHILDCUT((TRCHI2DOF<%s),1))" % config['Trk_Chi2']
+##        _trkChi2Cut2 = "(CHILDCUT((TRCHI2DOF<%s),2))" % config['Trk_Chi2']
+#        _MotherCuts = "PT>-100"
+#
+#        ########## EndCuts definition
+#
+#
+#
+#        # make the Ks from StdAllNoPIDsPions
+#        _Ks = CombineParticles( DecayDescriptor = "KS0 -> pi+ pi-" ,
+#                                DaughtersCuts = _DaughterCuts,
+#                                CombinationCut = _CombinationCuts,
+#                                MotherCut = _MotherCuts)
+#
+        # get the KS's to filter
+        _stdKSDD = DataOnDemand( Location = "Phys/StdLooseKsDD/Particles" )
+#        _allCuts = "(DOCAMAX<4.0*mm) & (ADMASS('KS0')<100*MeV)" 
+#        _doca_cut = "(DOCAMAX < %s*mm)" % config['KS_DD_DOCA']
+#        _mass_cut = "(ADMASS('KS0')<%s*MeV)" % config['KS_DD_MASS']
+#        _allCuts = _doca_cut + "&" + _mass_cut
+        _nu2prime_cut = "(log((CHILD(BPVIPCHI2(),1)*CHILD(BPVIPCHI2(),2))/(BPVIPCHI2()*BPVIPCHI2() + DOCAMAX*DOCAMAX)) > %s)" % config['KS_DD_nu2prime'] # 0
+        _signedFLchi2_cut = "(BPVLTSIGNCHI2() > %s)" % config['KS_DD_signedFLchi2'] # 50
+        _trghost_cut1 = "(CHILD(TRGHOSTPROB, 1) <=%s )" % config['KS_DD_TRGHOSTPROB']
+        _trghost_cut2 = "(CHILD(TRGHOSTPROB, 2) <=%s )" % config['KS_DD_TRGHOSTPROB']
+	
+        _allCuts = _nu2prime_cut + "&" + _signedFLchi2_cut + "&" + _trghost_cut1 + "&" + _trghost_cut2
+
+        # make the filter
+        _filterKSDD = FilterDesktop( Code = _allCuts )
+
+        # make and store the Selection object
+        #self.selKS2DD = Selection( "selKS2DD_" + name, Algorithm = _Ks, RequiredSelections = [ self.down_pions  ] )
+        self.selKS2DD = Selection( "selKS2DD_" + name, Algorithm = _filterKSDD, RequiredSelections = [_stdKSDD] )
+
+
+    def makeD02KSDDKSDD( self, name, config ) :
+        """
+        Create and store a D0 -> KS(DD) KS(DD) Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+	# The following lines were produced automatically; preambuloProbDef should be put into the preambulo of CombineParticles
+
+        _daughterCuts = "(log((CHILD(BPVIPCHI2(),1)*CHILD(BPVIPCHI2(),2))/(BPVIPCHI2()*BPVIPCHI2() + DOCAMAX*DOCAMAX)) > %s)" % config['D0_KS_nu2prime'] # 4 # nu'_2
+
+        # before D vertex fit 
+        _doca_cut = "(ACUTDOCA(%s*mm,''))" % config['D0_DOCA_DD']
+        _massBefore_cut = "(ADAMASS('D0') < %s*MeV)" % config['D0_MassWindowBeforeFit'] # 150
+        _combCuts = _doca_cut + "&" + _massBefore_cut
+        #_combCuts = "(ACUTDOCA(4.0*mm,'')) & (ADAMASS('D0') < 600*MeV)"
+
+        _vertexChi2_cut = "(VFASPF(VCHI2/VDOF) < %s)" % config['D0_vertexChi2_DD'] # 20
+        _IPchi2_cut = "(BPVIPCHI2() < %s)" % config['D0_IPchi2_DD'] # 10
+        _lnPt_cut = "(log(PT*CHILD(PT,1)*CHILD(PT,2)) > %s) " % config['D0_lnPt_DD'] # 21
+        _mass_cut = "(ADMASS('D0') < %s*MeV)" % config['D0_MassWindow'] # 100
+        
+        _motherCuts = _vertexChi2_cut + "&" + _IPchi2_cut + "&" + _lnPt_cut + "&" + _mass_cut
+        
+        _D = CombineParticles()
+        _D.DecayDescriptors = [ "D0 -> KS0 KS0" ]
+        
+        _D.CombinationCut = _combCuts
+        _D.DaughtersCuts = { "KS0" : _daughterCuts }
+        #_D.DaughtersCuts = _daughterCuts
+        _D.MotherCut = _motherCuts
+
+#        _Preambulo = preambuloDef_prob_BCu
+#    print 'B combCuts: ',_combCuts
+#    print 'B motherCuts: ',_motherCuts
+#        print 'prescale: ',prescale
+
+#        _D.Preambulo        = _Preambulo
+        self.selD02KSDDKSDD = Selection (name, Algorithm = _D, RequiredSelections = [ self.selKS2DD ])
+        
+    def makeD02KSLLKSDD( self, name, config ) :
+        """
+        Create and store a D0 -> KS(LL) KS(DD) Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+        
+        KsKsLD_mother_cut = "INTREE((ABSID=='pi+') & (ISLONG)) & INTREE((ABSID=='pi+') & (ISDOWN))"
+
+        _daughterCuts = "(INTREE((ABSID=='pi+') & (ISDOWN)) | (BPVLTSIGNCHI2() > %s))" % config['D0_KSLL_signedFLchi2_LD'] # 500, signed flight length of the KsLL
+        
+        # before D vertex fit 
+        _doca_cut = "(ACUTDOCA(%s*mm,''))" % config['D0_DOCA_DD']
+        _massBefore_cut = "(ADAMASS('D0') < %s*MeV)" % config['D0_MassWindowBeforeFit']
+        _combCuts = _doca_cut + "&" + _massBefore_cut
+        #_combCuts = "(ACUTDOCA(4.0*mm,'')) & (ADAMASS('D0') < 600*MeV)"
+        
+        _vertexChi2_cut = "(VFASPF(VCHI2/VDOF) < %s)" % config['D0_vertexChi2_LD'] # 20
+        _IPchi2_cut = "(BPVIPCHI2() < %s)" % config['D0_IPchi2_LD'] # 10
+        _signedFLchi2_cut = "(BPVLTSIGNCHI2() > %s)" % config['D0_signedFLchi2_LD'] # 1.0
+        _mass_cut = "(ADMASS('D0') < %s*MeV)" % config['D0_MassWindow'] # 100
+
+        _motherCuts = KsKsLD_mother_cut + " & " + _vertexChi2_cut + " & " + _IPchi2_cut + " & " + _signedFLchi2_cut + " & " + _mass_cut
+        
+        _D = CombineParticles()
+        _D.DecayDescriptors = [ "D0 -> KS0 KS0" ]
+        
+        #_D.DaughtersCuts = _daughterCuts
+        _D.DaughtersCuts = { "KS0" : _daughterCuts }
+        _D.CombinationCut = _combCuts #+  " & " + ? #_cut_prob_BCC
+        _D.MotherCut = _motherCuts
+
+#        _Preambulo = preambuloDef_prob_BCC + preambuloDef_prob_BCu
+#    print 'B combCuts: ',_combCuts
+#    print 'B motherCuts: ',_motherCuts
+#        print 'prescale: ',prescale
+
+#        _B.Preambulo        = _Preambulo
+        self.selD02KSLLKSDD = Selection (name, Algorithm = _D, RequiredSelections = [ self.selKS2LL, self.selKS2DD ])
+
+    def makeD02KSLLKSLL( self, name, config ) :
+        """
+        Create and store a B -> KS(LL) KS(LL) Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        
+        _daughterCuts = "(BPVLTSIGNCHI2() > %s)" % config['D0_KS_signedFLchi2_LL'] # 200, signed flight length of the Ks
+        
+        # before D vertex fit
+        _doca_cut = "(ACUTDOCA(%s*mm,''))" % config['D0_DOCA_LL']
+        _massBefore_cut = "(ADAMASS('D0') < %s*MeV)" % config['D0_MassWindowBeforeFit']
+        _combCuts = _doca_cut + "&" + _massBefore_cut
+        ##_combCuts = "(ACUTDOCA(1.0*mm,'')) & (ADAMASS('D0') < 600*MeV)"
+        
+        _vertexChi2_cut = "(VFASPF(VCHI2/VDOF) < %s)" % config['D0_vertexChi2_LL'] # 20
+        _IPchi2_cut = "(BPVIPCHI2() < %s)" % config['D0_IPchi2_LL'] # 50
+        _signedFLchi2_cut = "(BPVLTSIGNCHI2() > %s)" % config['D0_signedFLchi2_LL'] # -1.0
+        _mass_cut = "(ADMASS('D0') < %s*MeV)" % config['D0_MassWindow'] # 100
+
+        _motherCuts =  _vertexChi2_cut + " & " + _IPchi2_cut + " & " + _signedFLchi2_cut  + " & " + _mass_cut # _cut_prob_BCu
+        
+        _D = CombineParticles()
+        _D.DecayDescriptors = [ "D0 -> KS0 KS0" ]
+        
+        _D.DaughtersCuts = { "KS0" : _daughterCuts }
+        #_D.DaughtersCuts = _daughterCuts
+        _D.CombinationCut = _combCuts #+  " & " + ? # _cut_prob_BCC
+        _D.MotherCut = _motherCuts
+
+        self.selD02KSLLKSLL = Selection (name, Algorithm = _D, RequiredSelections = [ self.selKS2LL ] )
+
+    def makeDst2D0LL_L( self, name, config ) :
+        """
+        Create and store a Dst+ -> pi+ (D0 -> KS(LL) KS(LL)) Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        #_daughterCuts = "(BPVIPCHI2() < %s)" % config['D0_IPchi2_LL'] # 40
+        _daughterCuts = "(TRGHOSTPROB <=%s )" % config['slowPi_LLL_TRGHOSTPROB']
+        
+        _vertexChi2_cut = "(VFASPF(VCHI2/VDOF) < %s)" % config['Dst_vertexChi2_LL'] # 40
+
+        _combCuts  = "(ADAMASS('D*(2010)+') < %s*MeV)" % config['Dst_mass_LL'] # 200
+        _massDiffLow_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) > %s*MeV)" % config['Dst_massDiffLow_LL'] # 135
+        _massDiffHigh_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) < %s*MeV)" % config['Dst_massDiffHigh_LL'] # 160
+        #_motherCuts =  _vertexChi2_cut + " & " + _massDiffLow_cut + " & " + _massDiffHigh_cut
+        _motherCuts =  _massDiffLow_cut + " & " + _massDiffHigh_cut
+        
+        _D = CombineParticles()
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> (D0-> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-)) pi+]cc" ]
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> D0 pi+]cc" ]
+        _D.DecayDescriptors = [ "D*(2010)+ -> D0 pi+", "D*(2010)- -> D0 pi-" ]
+        
+        _D.DaughtersCuts = { "pi+" : _daughterCuts }
+        _D.CombinationCut = _combCuts #+  " & " + ? # _cut_prob_BCC
+        _D.MotherCut = _motherCuts
+
+        self.selDst2D0LL_L = Selection (name, Algorithm = _D, RequiredSelections = [ self.pions, self.selD02KSLLKSLL ] )
+
+    def makeDst2D0LL_U( self, name, config ) :
+        """
+        Create and store a Dst+ -> pi+ (D0 -> KS(LL) KS(LL)) Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        #_daughterCuts = "(BPVIPCHI2() < %s)" % config['D0_IPchi2_LL'] # 40
+        _daughterCuts = "(TRGHOSTPROB <=%s )" % config['slowPi_LLU_TRGHOSTPROB']
+
+        _vertexChi2_cut = "(VFASPF(VCHI2/VDOF) < %s)" % config['Dst_vertexChi2_LL'] # 40
+
+        _combCuts  = "(ADAMASS('D*(2010)+') < %s*MeV)" % config['Dst_mass_LL'] # 200
+        _massDiffLow_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) > %s*MeV)" % config['Dst_massDiffLow_LL'] # 135
+        _massDiffHigh_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) < %s*MeV)" % config['Dst_massDiffHigh_LL'] # 160
+        #_motherCuts =  _vertexChi2_cut + " & " + _massDiffLow_cut + " & " + _massDiffHigh_cut
+        _motherCuts =  _massDiffLow_cut + " & " + _massDiffHigh_cut
+        
+        _D = CombineParticles()
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> (D0-> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-)) pi+]cc" ]
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> D0 pi+]cc" ]
+        _D.DecayDescriptors = [ "D*(2010)+ -> D0 pi+", "D*(2010)- -> D0 pi-" ]
+        
+        _D.DaughtersCuts = { "pi+" : _daughterCuts }
+        _D.CombinationCut = _combCuts #+  " & " + ? # _cut_prob_BCC
+        _D.MotherCut = _motherCuts
+
+        self.selDst2D0LL_U = Selection (name, Algorithm = _D, RequiredSelections = [ self.up_pions, self.selD02KSLLKSLL ] )
+
+    def makeDst2D0LD_L( self, name, config ) :
+        """
+        Create and store a Dst+ -> pi+ (D0 -> KS(LL) KS(DD)) Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        #_daughterCuts = "(BPVIPCHI2() < %s)" % config['D0_IPchi2_LD'] # 40
+        _daughterCuts = "(TRGHOSTPROB <=%s )" % config['slowPi_LDL_TRGHOSTPROB']
+        
+        _vertexChi2_cut = "(VFASPF(VCHI2/VDOF) < %s)" % config['Dst_vertexChi2_LD'] # 40
+
+        _combCuts  = "(ADAMASS('D*(2010)+') < %s*MeV)" % config['Dst_mass_LD'] # 200
+        _massDiffLow_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) > %s*MeV)" % config['Dst_massDiffLow_LD'] # 135
+        _massDiffHigh_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) < %s*MeV)" % config['Dst_massDiffHigh_LD'] # 160
+        #_motherCuts =  _vertexChi2_cut + " & " + _massDiffLow_cut + " & " + _massDiffHigh_cut
+        _motherCuts =  _massDiffLow_cut + " & " + _massDiffHigh_cut
+        
+        _D = CombineParticles()
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> (D0-> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-)) pi+]cc" ]
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> D0 pi+]cc" ]
+        _D.DecayDescriptors = [ "D*(2010)+ -> D0 pi+", "D*(2010)- -> D0 pi-" ]
+        
+        _D.DaughtersCuts = { "pi+" : _daughterCuts }
+        _D.CombinationCut = _combCuts #+  " & " + ? # _cut_prob_BCC
+        _D.MotherCut = _motherCuts
+
+        self.selDst2D0LD_L = Selection (name, Algorithm = _D, RequiredSelections = [ self.pions, self.selD02KSLLKSDD ] )
+
+    def makeDst2D0LD_U( self, name, config ) :
+        """
+        Create and store a Dst+ -> pi+ (D0 -> KS(LL) KS(DD)) Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        #_daughterCuts = "(BPVIPCHI2() < %s)" % config['D0_IPchi2_LD'] # 40
+        _daughterCuts = "(TRGHOSTPROB <=%s )" % config['slowPi_LDU_TRGHOSTPROB']
+
+        
+        _vertexChi2_cut = "(VFASPF(VCHI2/VDOF) < %s)" % config['Dst_vertexChi2_LD'] # 40
+
+        _combCuts  = "(ADAMASS('D*(2010)+') < %s*MeV)" % config['Dst_mass_LD'] # 200
+        _massDiffLow_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) > %s*MeV)" % config['Dst_massDiffLow_LD'] # 135
+        _massDiffHigh_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) < %s*MeV)" % config['Dst_massDiffHigh_LD'] # 160
+        #_motherCuts =  _vertexChi2_cut + " & " + _massDiffLow_cut + " & " + _massDiffHigh_cut
+        _motherCuts =  _massDiffLow_cut + " & " + _massDiffHigh_cut
+        
+        _D = CombineParticles()
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> (D0-> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-)) pi+]cc" ]
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> D0 pi+]cc" ]
+        _D.DecayDescriptors = [ "D*(2010)+ -> D0 pi+", "D*(2010)- -> D0 pi-" ]
+        
+        _D.DaughtersCuts = { "pi+" : _daughterCuts }
+        _D.CombinationCut = _combCuts #+  " & " + ? # _cut_prob_BCC
+        _D.MotherCut = _motherCuts
+
+        self.selDst2D0LD_U = Selection (name, Algorithm = _D, RequiredSelections = [ self.up_pions, self.selD02KSLLKSDD ] )
+
+    def makeDst2D0DD_L( self, name, config ) :
+        """
+        Create and store a Dst+ -> pi+ (D0 -> KS(DD) KS(DD)) Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        #_daughterCuts = "(BPVIPCHI2() < %s)" % config['D0_IPchi2_DD'] # 40
+        _daughterCuts = "(TRGHOSTPROB <=%s )" % config['slowPi_DDL_TRGHOSTPROB']
+        
+        _vertexChi2_cut = "(VFASPF(VCHI2/VDOF) < %s)" % config['Dst_vertexChi2_DD'] # 40
+
+        _combCuts  = "(ADAMASS('D*(2010)+') < %s*MeV)" % config['Dst_mass_DD'] # 200
+        _massDiffLow_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) > %s*MeV)" % config['Dst_massDiffLow_DD'] # 135
+        _massDiffHigh_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) < %s*MeV)" % config['Dst_massDiffHigh_DD'] # 160
+        #_motherCuts =  _vertexChi2_cut + " & " + _massDiffLow_cut + " & " + _massDiffHigh_cut
+        _motherCuts =  _massDiffLow_cut + " & " + _massDiffHigh_cut
+        
+        _D = CombineParticles()
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> (D0-> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-)) pi+]cc" ]
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> D0 pi+]cc" ]
+        _D.DecayDescriptors = [ "D*(2010)+ -> D0 pi+", "D*(2010)- -> D0 pi-" ]
+        
+        _D.DaughtersCuts = { "pi+" : _daughterCuts }
+        _D.CombinationCut = _combCuts #+  " & " + ? # _cut_prob_BCC
+        _D.MotherCut = _motherCuts
+
+        self.selDst2D0DD_L = Selection (name, Algorithm = _D, RequiredSelections = [ self.pions, self.selD02KSDDKSDD ] )
+
+    def makeDst2D0DD_U( self, name, config ) :
+        """
+        Create and store a Dst+ -> pi+ (D0 -> KS(DD) KS(DD)) Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        #_daughterCuts = "(BPVIPCHI2() < %s)" % config['D0_IPchi2_DD'] # 40
+        _daughterCuts = "(TRGHOSTPROB <=%s )" % config['slowPi_DDU_TRGHOSTPROB']
+        
+        _vertexChi2_cut = "(VFASPF(VCHI2/VDOF) < %s)" % config['Dst_vertexChi2_DD'] # 40
+
+        _combCuts  = "(ADAMASS('D*(2010)+') < %s*MeV)" % config['Dst_mass_DD'] # 200
+        _massDiffLow_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) > %s*MeV)" % config['Dst_massDiffLow_DD'] # 135
+        _massDiffHigh_cut = "(switch(CHILD(ABSID, 2) == 211, MM - CHILD(MM,1), MM - CHILD(MM,2)) < %s*MeV)" % config['Dst_massDiffHigh_DD'] # 160
+        #_motherCuts =  _vertexChi2_cut + " & " + _massDiffLow_cut + " & " + _massDiffHigh_cut
+        _motherCuts =  _massDiffLow_cut + " & " + _massDiffHigh_cut
+        
+        _D = CombineParticles()
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> (D0-> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-)) pi+]cc" ]
+        #_D.DecayDescriptors = [ "[D*(2010)+ -> D0 pi+]cc" ]
+        _D.DecayDescriptors = [ "D*(2010)+ -> D0 pi+", "D*(2010)- -> D0 pi-" ]
+        
+        _D.DaughtersCuts = { "pi+" : _daughterCuts }
+        _D.CombinationCut = _combCuts #+  " & " + ? # _cut_prob_BCC
+        _D.MotherCut = _motherCuts
+
+        self.selDst2D0DD_U = Selection (name, Algorithm = _D, RequiredSelections = [ self.up_pions, self.selD02KSDDKSDD ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHForXSec.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHForXSec.py
new file mode 100644
index 000000000..e3d8594ea
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHForXSec.py
@@ -0,0 +1,549 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of
+    [D+ -> K- pi+ pi+]cc
+    [D+ -> K- K+ pi+]cc
+    [D+ -> K- K+ K+]cc
+    [D+ -> pi- pi+ pi+]cc
+    [D+ -> K+ pi- pi+]cc
+and the same D_s+ modes for open charm cross section measurement.
+The three-body [h+ h- h+]cc combination is made with a mass window wide enough
+to select D+ and D_s+, and then this selection is filtered in to a D+ selection
+around the nominal D+ mass and a D_s+ selection around the nominal D_s+ mass.
+"""
+
+__author__ = ['Alex Pearce']
+
+__all__ = (
+    'default_config',
+    'StrippingD2HHHForXSecConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from Configurables import CombineParticles, FilterDesktop, SubstitutePID
+from StandardParticles import (
+    StdAllNoPIDsKaons,
+    StdAllNoPIDsPions
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+from MVADictHelpers import addTMVAclassifierValue
+
+default_config = {
+    'NAME': 'D2HHHForXSec',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingD2HHHForXSecConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum transverse momentum all D daughters must satisfy
+        'Daug_All_PT_MIN': 200.0*MeV,
+        # Minimum transverse momentum at least 2 D daughters must satisfy
+        'Daug_2of3_PT_MIN': 400.0*MeV,
+        # Minimum transverse momentum at least 1 D daughter must satisfy
+        'Daug_1of3_PT_MIN': 400.0*MeV,
+        # Minimum best primary vertex IP chi^2 all D daughters must satisfy
+        'Daug_All_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 2 D daughters must satisfy
+        'Daug_2of3_BPVIPCHI2_MIN': 10.0,
+        # Minimum best PV IP chi^2 at least 1 D daughter must satisfy
+        'Daug_1of3_BPVIPCHI2_MIN': 50.0,
+        # Minimum D daughter momentum
+        'Daug_P_MIN': 3.0*GeV,
+        # Maximum D daughter momentum
+        'Daug_P_MAX': 100.0*GeV,
+        # Minimum D daughter pseudorapidity
+        'Daug_ETA_MIN': 2.0,
+        # Maximum D daughter pseudorapidity
+        'Daug_ETA_MAX': 5.0,
+        # Minimum D daughter kaon DLLK
+        'K_PIDK_MIN': 5.0,
+        # Maximum D daughter pion DLLK
+        'Pi_PIDK_MAX': 3.0,
+        # D+ mass window around the nominal D+ mass after the vertex fit
+        # Lower bound of this, -10 MeV, is used before the hhh combination
+        # vertex fit
+        'Dp_ADAMASS_WIN': 80.0*MeV,
+        # D_s+ mass window around the nominal D+ mass after the vertex fit
+        # Upper bound of this, +10 MeV, is used before the hhh combination
+        # vertex fit
+        'Ds_ADAMASS_WIN': 80.0*MeV,
+        # Maximum distance of closest approach of D daughters
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Maximum D vertex chi^2 per vertex fit DoF
+        'D_VCHI2VDOF_MAX': 25.0,
+        # Maximum angle between D momentum and D direction of flight
+        'D_acosBPVDIRA_MAX': 35.0*mrad,
+        # Primary vertex displacement requirement, either that the D is some
+        # sigma away from the PV, or it has a minimum flight time
+        'D_PVDispCut': '((BPVVDCHI2 > 16.0)|(BPVLTIME() > 0.150*picosecond))',
+        # Minimum D+ and D_s+ MVA discriminant value
+        'Dp_MVA_MIN': -0.3,
+        'Ds_MVA_MIN': -0.3,
+        # Path to the D+ and D_s+ MVA weights files
+        # BDT is not applied if this is the empty string or None
+        'Dp_MVA_Weights': '$TMVAWEIGHTSROOT/data/D2HHHForXSec_BDT_v1r0.xml',
+        'Ds_MVA_Weights': '$TMVAWEIGHTSROOT/data/D2HHHForXSec_BDT_v1r0.xml',
+        # Dictionary of LoKi functors defining the D MVA input variables
+        # The keys must match those used when training the MVA
+        # Same input variables are used for both D+ and D_s+
+        'D_MVA_Variables': {
+            # Largest D daughter PT
+            'ROOTex::Leading(Dp_h1_PT,Dp_h2_PT,Dp_h3_PT)': (
+                "MAXTREE(ISBASIC & HASTRACK, PT)"
+            ),
+            # Smallest D daughter PT
+            'ROOTex::ThirdLeading(Dp_h1_PT,Dp_h2_PT,Dp_h3_PT)': (
+                "MINTREE(ISBASIC & HASTRACK, PT)"
+            ),
+            'Dp_DIRA_OWNPV': 'BPVDIRA',
+            'TMath::Log10(TMath::Abs(Dp_Loki_BPVVDCHI2))': (
+                'log10(abs(BPVVDCHI2))'
+            ),
+            'TMath::Log10(TMath::Abs(Dp_Loki_BPVLTIME))': (
+                "log10(abs(BPVLTIME()))"
+            ),
+            'TMath::Log10(Dp_ENDVERTEX_CHI2/Dp_ENDVERTEX_NDOF)': (
+                'log10(VFASPF(VCHI2/VDOF))'
+            )
+        },
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleDp2KPP': 0.0,
+        'PrescaleDp2KKP': 0.0,
+        'PrescaleDp2KKK': 0.0,
+        'PrescaleDp2PPP': 0.0,
+        'PrescaleDp2KPPDCS': 0.0,
+        'PrescaleDs2KPP': 0.0,
+        'PrescaleDs2KKP': 0.0,
+        'PrescaleDs2KKK': 0.0,
+        'PrescaleDs2PPP': 0.0,
+        'PrescaleDs2KPPDCS': 0.0,
+        # Fraction of candidates to randomly throw after before stripping
+        'PostscaleDp2KPP': 1.0,
+        'PostscaleDp2KKP': 1.0,
+        'PostscaleDp2KKK': -1.0,
+        'PostscaleDp2PPP': 1.0,
+        'PostscaleDp2KPPDCS': -1.0,
+        'PostscaleDs2KPP': 1.0,
+        'PostscaleDs2KKP': 1.0,
+        'PostscaleDs2KKK': -1.0,
+        'PostscaleDs2PPP': 1.0,
+        'PostscaleDs2KPPDCS': -1.0
+    }
+}
+
+
+class StrippingD2HHHForXSecConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    D2KPP = ['[D+ -> K- pi+ pi+]cc']
+    D2KKP = ['[D+ -> K- K+ pi+]cc']
+    D2KKK = ['[D+ -> K- K+ K+]cc']
+    D2PPP = ['[D+ -> pi- pi+ pi+]cc']
+    D2KPPDCS = ['[D+ -> K+ pi- pi+]cc']
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        # HHH combination names
+        d2KPP_name = '{0}D2KPP'.format(name)
+        d2KKP_name = '{0}D2KKP'.format(name)
+        d2KKK_name = '{0}D2KKK'.format(name)
+        d2PPP_name = '{0}D2PPP'.format(name)
+        d2PPK_name = '{0}D2KPPDCS'.format(name)
+        # D+ line names
+        dp2KPP_name = '{0}Dp2KPP'.format(name)
+        dp2KKP_name = '{0}Dp2KKP'.format(name)
+        dp2KKK_name = '{0}Dp2KKK'.format(name)
+        dp2PPP_name = '{0}Dp2PPP'.format(name)
+        dp2PPK_name = '{0}Dp2KPPDCS'.format(name)
+        # D_s+ line names
+        ds2KPP_name = '{0}Ds2KPP'.format(name)
+        ds2KKP_name = '{0}Ds2KKP'.format(name)
+        ds2KKK_name = '{0}Ds2KKK'.format(name)
+        ds2PPP_name = '{0}Ds2PPP'.format(name)
+        ds2PPK_name = '{0}Ds2KPPDCS'.format(name)
+
+        # Build pion and kaon cut strings
+        daugCuts = (
+            '(PT > {0[Daug_All_PT_MIN]})'
+            '& (BPVIPCHI2() > {0[Daug_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+        pidFiducialCuts = (
+            '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+            '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+        ).format(self.config)
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi < {0[Pi_PIDK_MAX]})'
+        ).format(self.config)
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi > {0[K_PIDK_MIN]})'
+        ).format(self.config)
+        pionCuts = '{0} & {1}'.format(daugCuts, pionPIDCuts)
+        kaonCuts = '{0} & {1}'.format(daugCuts, kaonPIDCuts)
+
+        # Filter StdAllNoPIDs particles
+        self.inPions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterPionsFor{0}'.format(name),
+                Code=pionCuts
+            ),
+            RequiredSelections=[StdAllNoPIDsPions]
+        )
+        self.inKaons = Selection(
+            'KaonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterKaonsFor{0}'.format(name),
+                Code=kaonCuts
+            ),
+            RequiredSelections=[StdAllNoPIDsKaons]
+        )
+
+        # K- pi+ pi+
+        self.selD2KPP = self.makeD2HHH(
+            name=d2KPP_name,
+            inputSel=[self.inKaons, self.inPions],
+            decDescriptors=self.D2KPP
+        )
+        self.selDp2KPP, self.selDs2KPP = self.splitHHH(
+            d2KPP_name,
+            self.selD2KPP
+        )
+        self.selDp2KPPMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(dp2KPP_name),
+            self.selDp2KPP,
+            self.config['Dp_MVA_Weights'],
+            self.config['Dp_MVA_MIN']
+        )
+        self.selDs2KPPMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(ds2KPP_name),
+            self.selDs2KPP,
+            self.config['Ds_MVA_Weights'],
+            self.config['Ds_MVA_MIN']
+        )
+        self.line_Dp2KPP = self.make_line(
+            name='{0}Line'.format(dp2KPP_name),
+            selection=self.selDp2KPPMVA,
+            prescale=config['PrescaleDp2KPP'],
+            postscale=config['PostscaleDp2KPP'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Ds2KPP = self.make_line(
+            name='{0}Line'.format(ds2KPP_name),
+            selection=self.selDs2KPPMVA,
+            prescale=config['PrescaleDs2KPP'],
+            postscale=config['PostscaleDs2KPP'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        # K- K+ pi+
+        self.selD2KKP = self.makeD2HHH(
+            name=d2KKP_name,
+            inputSel=[self.inKaons, self.inPions],
+            decDescriptors=self.D2KKP
+        )
+        self.selDp2KKP, self.selDs2KKP = self.splitHHH(
+            d2KKP_name,
+            self.selD2KKP
+        )
+        self.selDp2KKPMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(dp2KKP_name),
+            self.selDp2KKP,
+            self.config['Dp_MVA_Weights'],
+            self.config['Dp_MVA_MIN']
+        )
+        self.selDs2KKPMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(ds2KKP_name),
+            self.selDs2KKP,
+            self.config['Ds_MVA_Weights'],
+            self.config['Ds_MVA_MIN']
+        )
+        self.line_Dp2KKP = self.make_line(
+            name='{0}Line'.format(dp2KKP_name),
+            selection=self.selDp2KKPMVA,
+            prescale=config['PrescaleDp2KKP'],
+            postscale=config['PostscaleDp2KKP'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Ds2KKP = self.make_line(
+            name='{0}Line'.format(ds2KKP_name),
+            selection=self.selDs2KKPMVA,
+            prescale=config['PrescaleDs2KKP'],
+            postscale=config['PostscaleDs2KKP'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        # K- K+ K-
+        self.selD2KKK = self.makeD2HHH(
+            name=d2KKK_name,
+            inputSel=[self.inKaons],
+            decDescriptors=self.D2KKK
+        )
+        self.selDp2KKK, self.selDs2KKK = self.splitHHH(
+            d2KKK_name,
+            self.selD2KKK
+        )
+        self.selDp2KKKMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(dp2KKK_name),
+            self.selDp2KKK,
+            self.config['Dp_MVA_Weights'],
+            self.config['Dp_MVA_MIN']
+        )
+        self.selDs2KKKMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(ds2KKK_name),
+            self.selDs2KKK,
+            self.config['Ds_MVA_Weights'],
+            self.config['Ds_MVA_MIN']
+        )
+        self.line_Dp2KKK = self.make_line(
+            name='{0}Line'.format(dp2KKK_name),
+            selection=self.selDp2KKKMVA,
+            prescale=config['PrescaleDp2KKK'],
+            postscale=config['PostscaleDp2KKK'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Ds2KKK = self.make_line(
+            name='{0}Line'.format(ds2KKK_name),
+            selection=self.selDs2KKKMVA,
+            prescale=config['PrescaleDs2KKK'],
+            postscale=config['PostscaleDs2KKK'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        # pi- pi+ pi+
+        self.selD2PPP = self.makeD2HHH(
+            name=d2PPP_name,
+            inputSel=[self.inPions],
+            decDescriptors=self.D2PPP
+        )
+        self.selDp2PPP, self.selDs2PPP = self.splitHHH(
+            d2PPP_name,
+            self.selD2PPP
+        )
+        self.selDp2PPPMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(dp2PPP_name),
+            self.selDp2PPP,
+            self.config['Dp_MVA_Weights'],
+            self.config['Dp_MVA_MIN']
+        )
+        self.selDs2PPPMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(ds2PPP_name),
+            self.selDs2PPP,
+            self.config['Ds_MVA_Weights'],
+            self.config['Ds_MVA_MIN']
+        )
+        self.line_Dp2PPP = self.make_line(
+            name='{0}Line'.format(dp2PPP_name),
+            selection=self.selDp2PPPMVA,
+            prescale=config['PrescaleDp2PPP'],
+            postscale=config['PostscaleDp2PPP'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Ds2PPP = self.make_line(
+            name='{0}Line'.format(ds2PPP_name),
+            selection=self.selDs2PPPMVA,
+            prescale=config['PrescaleDs2PPP'],
+            postscale=config['PostscaleDs2PPP'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        # K+ pi- pi+ (DCS)
+        self.selD2PPK = self.makeD2HHH(
+            name=d2PPK_name,
+            inputSel=[self.inKaons, self.inPions],
+            decDescriptors=self.D2KPPDCS
+        )
+        self.selDp2PPK, self.selDs2PPK = self.splitHHH(
+            d2PPK_name,
+            self.selD2PPK
+        )
+        self.selDp2PPKMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(dp2PPK_name),
+            self.selDp2PPK,
+            self.config['Dp_MVA_Weights'],
+            self.config['Dp_MVA_MIN']
+        )
+        self.selDs2PPKMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(ds2PPK_name),
+            self.selDs2PPK,
+            self.config['Ds_MVA_Weights'],
+            self.config['Ds_MVA_MIN']
+        )
+        self.line_Dp2PPK = self.make_line(
+            name='{0}Line'.format(dp2PPK_name),
+            selection=self.selDp2PPKMVA,
+            prescale=config['PrescaleDp2KPPDCS'],
+            postscale=config['PostscaleDp2KPPDCS'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Ds2PPK = self.make_line(
+            name='{0}Line'.format(ds2PPK_name),
+            selection=self.selDs2PPKMVA,
+            prescale=config['PrescaleDs2KPPDCS'],
+            postscale=config['PostscaleDs2KPPDCS'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeD2HHH(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D+ -> h- h+ h- decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        # Add 10 MeV either side of the ADAMASS checks to account for the
+        # poorer mass resolution before the vertex fit
+        combCuts = (
+            '('
+            "(ADAMASS('D+') < ({0[Dp_ADAMASS_WIN]} + 10))"
+            "| (ADAMASS('D_s+') < ({0[Ds_ADAMASS_WIN]} + 10))"
+            ')'
+            '& (AMAXCHILD(PT) > {0[Daug_1of3_PT_MIN]})'
+            '& (AMAXCHILD(BPVIPCHI2()) > {0[Daug_1of3_BPVIPCHI2_MIN]})'
+            '& (ANUM(PT > {0[Daug_2of3_PT_MIN]}) >= 2)'
+            '& (ANUM(BPVIPCHI2() > {0[Daug_2of3_BPVIPCHI2_MIN]}) >= 2)'
+            "& (ACUTDOCA({0[Comb_ADOCAMAX_MAX]}, ''))"
+        ).format(self.config)
+
+        dCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[D_VCHI2VDOF_MAX]})'
+            '& ({0[D_PVDispCut]})'
+            '& (BPVDIRA > cos({0[D_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+
+        _dplus = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=dCuts
+        )
+
+        return Selection(name, Algorithm=_dplus, RequiredSelections=inputSel)
+
+    def splitHHH(self, name, hhhSelection):
+        """Split the input h-h+h+ Selection in to a D+ and D_s+ selection.
+
+        Returns a two-tuple as (D+ Selection, D_s+ Selection).
+        Keyword arguments:
+        hhhSelection -- A single Selection instance; the output of makeD2HHH
+        """
+        dpFilter = FilterDesktop(
+            'FilterDp{0}'.format(name),
+            Code="(ADMASS('D+') < {0[Dp_ADAMASS_WIN]})".format(self.config)
+        )
+        dsFilter = FilterDesktop(
+            'FilterDs{0}'.format(name),
+            Code="(ADMASS('D_s+') < {0[Ds_ADAMASS_WIN]})".format(self.config)
+        )
+
+        dpSel = Selection(
+            'SelFilteredDp{0}'.format(name),
+            Algorithm=dpFilter,
+            RequiredSelections=[hhhSelection]
+        )
+        dsSel = Selection(
+            'SelFilteredDs{0}'.format(name),
+            Algorithm=dsFilter,
+            RequiredSelections=[hhhSelection]
+        )
+
+        # The HHH selection is labelled as a D+, so rename the candidates in
+        # the D_s+ selection as such
+        dsSubPID = SubstitutePID(
+            name='SubPidDs{0}'.format(name),
+            Code="DECTREE('[D+ -> X- X+ X+]CC')",
+            Substitutions={
+                'D+ -> X- X+ X+': 'D_s+',
+                'D- -> X+ X- X-': 'D_s-'
+
+            },
+            MaxChi2PerDoF=-1
+        )
+        dsSubPIDSel = Selection(
+            'SubPIDDsSel{0}'.format(name),
+            Algorithm=dsSubPID,
+            RequiredSelections=[dsSel]
+        )
+
+        return dpSel, dsSubPIDSel
+
+    def makeMVASelection(self, name, inputSel, weights_file, cut_value):
+        # Don't apply a BDT if the weights file has not been specified
+        if not weights_file:
+            return inputSel
+
+        cut = "VALUE('LoKi::Hybrid::DictValue/{0}') > {1}".format(
+            name, cut_value
+        )
+        mva = FilterDesktop('{0}Filter'.format(name), Code=cut)
+
+        addTMVAclassifierValue(
+            Component=mva,
+            XMLFile=weights_file,
+            Variables=self.config['D_MVA_Variables'],
+            ToolName=name
+        )
+
+        return Selection(name, Algorithm=mva, RequiredSelections=[inputSel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHKs.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHKs.py
new file mode 100644
index 000000000..25be5e4c9
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHKs.py
@@ -0,0 +1,282 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting D(s)+ -> h h pi KS
+
+Authors: Maurizio Martinelli
+"""
+
+########################################################################
+__author__ = ['Maurizio Martinelli']
+__date__ = '15/05/2015'
+__version__ = '$Revision: 0.1 $'
+
+__all__ = ('D2HHHKsLines',
+           'default_config')
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, DaVinci__N4BodyDecays
+from StandardParticles                     import StdNoPIDsPions, StdNoPIDsKaons
+from StandardParticles                     import StdLooseKsDD, StdLooseKsLL
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+
+from Configurables import FilterDesktop
+
+from GaudiKernel.SystemOfUnits import GeV, MeV, picosecond, mm
+
+
+default_config = {
+    'NAME'        : 'D2HHHKs',
+    'WGs'         : ['Charm'],
+    'BUILDERTYPE' : 'D2HHHKsLines',
+    'CONFIG'      : { 'PrescaleD2PiPiPiKsDD'    : 1,
+                      'PrescaleD2KPiPiKsDD'     : 1,
+                      'PrescaleD2KKPiKsDD'      : 1,
+                      'PrescaleD2PiPiPiKsLL'    : 1,
+                      'PrescaleD2KPiPiKsLL'     : 1,
+                      'PrescaleD2KKPiKsLL'      : 1,
+                      # KS (DD)
+                      'MinKsPT_DD'              : 300 * MeV,
+                      'MaxKsVCHI2NDOF_DD'       : 20.0,
+                      'MinDz_DD'                : 250. * mm,
+                      'MaxDz_DD'                : 9999 * mm,
+                      'MinKsIpChi2_DD'          : 3,
+                      'KSCutDIRA_DD'            : 0.999,
+                      'KSCutMass_DD'            : 50 * MeV,
+                      'KSCutFDChi2_DD'          : 5,
+                      # KS (LL)
+                      'MinKsPT_LL'              : 300 * MeV,
+                      'MaxKsVCHI2NDOF_LL'       : 20.0,
+                      'MinDz_LL'                : 0 * mm,
+                      'MaxDz_LL'                : 9999 * mm,
+                      'MinKsIpChi2_LL'          : 3,
+                      'KSCutDIRA_LL'            : 0.999,
+                      'KSCutMass_LL'            : 35 * MeV,
+                      'KSCutFDChi2_LL'          : 5,
+                      # D(s)+ -> HHHKS
+                      'TrChi2'                  : 4,
+                      'TrGhostProb'             : 0.5,
+                      'MinTrkPT'                : 250 * MeV,
+                      'MinTrkIPChi2'            : 3,
+                      'HighPIDK'                : 0,
+                      'LowPIDK'                 : 0,
+                      'MaxADOCACHI2'            : 10.0,
+                      'CombMassLow'             : 1750 * MeV,
+                      'CombMassHigh'            : 2100 * MeV,
+                      'MinCombPT'               : 1.5,
+                      'MaxVCHI2NDOF'            : 12.0,
+                      'MinBPVDIRA'              : 0.999995,
+                      'MinBPVTAU'               : 0.1 * picosecond,
+                      'MassLow'                 : 1790 * MeV,
+                      'MassHigh'                : 2050 * MeV,
+                      # HLT filters, only process events firing triggers matching the RegEx
+                      'Hlt1Filter': None,
+                      'Hlt2Filter': None,
+                    },
+    'STREAMS'     : ['Charm']
+    }
+
+class D2HHHKsLines( LineBuilder ) :
+    """Class defining the D(s)+ -> h h pi KS stripping lines"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.D2HHHKs, self.lineD2HHHKs = {}, {}
+
+        decays = { 'PiPiPiKs'  : ['[D+ -> pi+ pi- pi+ KS0]cc'],
+                   'KPiPiKs'   : ['[D+ -> K- pi+ pi+ KS0]cc', '[D+ -> K+ pi- pi+ KS0]cc'],
+                   'KKPiKs'    : ['[D+ -> K+ K- pi+ KS0]cc', '[D+ -> K+ K+ pi- KS0]cc'],
+                     }
+
+        KS = {'DD': self.makeKS('KSDDFor'+name,
+                                config['MinKsPT_DD'],
+                                config['MaxKsVCHI2NDOF_DD'],
+                                config['MinDz_DD'],
+                                config['MaxDz_DD'],
+                                config['MinKsIpChi2_DD'],
+                                config['KSCutDIRA_DD'],
+                                config['KSCutMass_DD'],
+                                config['KSCutFDChi2_DD'],
+                                [StdLooseKsDD]),
+              'LL': self.makeKS('KSLLFor'+name,
+                                config['MinKsPT_LL'],
+                                config['MaxKsVCHI2NDOF_LL'],
+                                config['MinDz_LL'],
+                                config['MaxDz_LL'],
+                                config['MinKsIpChi2_LL'],
+                                config['KSCutDIRA_LL'],
+                                config['KSCutMass_LL'],
+                                config['KSCutFDChi2_LL'],
+                                [StdLooseKsLL]) }
+
+        for decay, decayDescriptors in decays.iteritems():
+            # make the various stripping selections
+            D2HHHKsName   = name + "D2" + decay
+
+            am34 = (139.57 + 493.614) * MeV
+            am4 = 493.614 * MeV
+            inputs = [ StdNoPIDsPions ] if decays == 'PiPiPiKs' else [ StdNoPIDsPions, StdNoPIDsKaons ]
+
+            # use both LL and DD KS
+            for ksName, ksCands in KS.iteritems():
+
+                # Create the D+ candidate
+                self.D2HHHKs[decay+ksName] = self.makeD2HHHKs(D2HHHKsName+ksName,
+                                                              decayDescriptors,
+                                                              config['TrChi2'],
+                                                              config['TrGhostProb'],
+                                                              config['MinTrkPT'],
+                                                              config['MinTrkIPChi2'],
+                                                              config['HighPIDK'],
+                                                              config['LowPIDK'],
+                                                              am34,
+                                                              am4,
+                                                              config['CombMassLow'],
+                                                              config['CombMassHigh'],
+                                                              config['MaxADOCACHI2'],
+                                                              config['MinCombPT'],
+                                                              config['MassLow'],
+                                                              config['MassHigh'],
+                                                              config['MaxVCHI2NDOF'],
+                                                              config['MinBPVDIRA'],
+                                                              config['MinBPVTAU'],
+                                                              inputs+[ksCands]
+                                                              )
+
+                # Create the stripping line
+                self.lineD2HHHKs[decay+ksName] = StrippingLine(D2HHHKsName+ksName+"Line",
+                                                               prescale  = config['PrescaleD2'+decay+ksName],
+                                                               selection = self.D2HHHKs[decay+ksName],
+                                                               HLT1 = config['Hlt1Filter'],
+                                                               HLT2 = config['Hlt2Filter'],
+                                                               RelatedInfoTools = self._getRelInfoD4Body())
+
+                # Register the line
+                self.registerLine(self.lineD2HHHKs[decay+ksName])
+            # end loop on ks types
+        # end loop on decay modes
+
+    def makeKS(self, name,
+               KSPT, KSVtxChi2,
+               minDz, maxDz, minIPChi2,
+               KSCutDIRA, KSCutMass, KSCutFDChi2,
+               inputSel) :
+        """
+            Given a set of input candidates, refine the list to create good KS candidates
+            Used for both long and downstream tracks.
+        """
+        _code = " (PT > %(KSPT)s)" \
+                "&(VFASPF(VCHI2PDOF) < %(KSVtxChi2)s)" \
+                "&(BPVVDZ > %(minDz)s ) " \
+                "&(BPVVDZ < %(maxDz)s ) " \
+                "&(BPVDIRA > %(KSCutDIRA)s ) " \
+                "&(MIPCHI2DV(PRIMARY) > %(minIPChi2)s) "\
+                "&(ADMASS('KS0') < %(KSCutMass)s ) " \
+                "&(BPVVDCHI2> %(KSCutFDChi2)s )" % locals()
+        _KsFilter = FilterDesktop(name = 'KSFilter_'+name,
+                                  Code = _code)
+        return Selection (name,
+                          Algorithm = _KsFilter,
+                          RequiredSelections = inputSel)
+
+    def makeD2HHHKs( self, name, decayDescriptors,
+                   trChi2,trGhostProb,minPT,minIPChi2,
+                   highPIDK, lowPIDK,
+                   am34, am4, amMin, amMax,
+                   maxDocaChi2, minCombPT,
+                   vmMin, vmMax, maxVChi, minbpvDira, minLT,
+                   inputSel = [ StdNoPIDsPions, StdNoPIDsKaons ]) :
+        """
+          Create and return a D0 -> HHHH (H=K,pi) Selection object.
+          Arguments:
+          name            : name of the Selection.
+          DecayDescriptor : DecayDescriptor.
+          trChi2          : maximum tracks chi2
+          trGhostProb     : maximum tracks ghost probability
+          minPT           : minimum tracks PT
+          minIPChi2       : minimum tracks IPChi2
+          highPIDK        : maximum PIDk for pions
+          lowPIDK         : minimum PIDk for kaons
+          am34            : phase space limit on 2-body combinations mass
+          am4             : phase space limit on 3-body combinations mass
+          amMin           : minimum 4-body combination mass
+          amMax           : maximum 4-body combination mass
+          minPT           : minimum 4-body combination PT
+          maxDocaChi2     : maximum 2-tracks DocaChi2
+          mMin            : minimum vertex mass
+          mMax            : maximum vertex mass
+          maxVChi         : maximum vertex chi2
+          minbpvDira      : minimum DIRA wrt best PV
+          minLT           : minimum lifetime wrt best PV
+          inputSel        : input selections
+        """
+
+        _daughters_cuts = " (TRGHOSTPROB < %(trGhostProb)s)" \
+                          "&(TRCHI2DOF < %(trChi2)s)" \
+                          "&(PT > %(minPT)s)" \
+                          "&(MIPCHI2DV(PRIMARY) > %(minIPChi2)s )" %locals()
+        _pidPi = "&(PIDK < %(highPIDK)s)" %locals()
+        _pidK  = "&(PIDK > %(lowPIDK)s)" %locals()
+
+
+        _c12_cuts = (" ( AM < (%(amMax)s - %(am34)s) ) " \
+                     "&( ACHI2DOCA(1,2) < %(maxDocaChi2)s ) " %locals() )
+        _c123_cuts =(" ( AM < (%(amMax)s - %(am4)s) ) " \
+                     "&( ACHI2DOCA(1,3) < %(maxDocaChi2)s ) " \
+                     "&( ACHI2DOCA(2,3) < %(maxDocaChi2)s ) " %locals() )
+        _combination_cuts =  (" (in_range( %(amMin)s, AM, %(amMax)s )) " \
+                              "&( (APT1+APT2+APT3+APT4) > %(minPT)s )" \
+                              "&( ACHI2DOCA(1,4) < %(maxDocaChi2)s ) " \
+                              "&( ACHI2DOCA(2,4) < %(maxDocaChi2)s ) " \
+                              "&( ACHI2DOCA(3,4) < %(maxDocaChi2)s ) " %locals() )
+        _mother_cuts = (" (in_range( %(vmMin)s* MeV, M, %(vmMax)s )) " \
+                        "&(VFASPF(VCHI2PDOF) < %(maxVChi)s)" \
+                        "&(BPVDIRA > %(minbpvDira)s )" \
+                        "&(BPVLTIME() > %(minLT)s )" %locals() )
+
+        CombineD2HHHKs = DaVinci__N4BodyDecays(DecayDescriptors = decayDescriptors,
+                                              DaughtersCuts = { "pi+" : _daughters_cuts+_pidPi, "K+" : _daughters_cuts+_pidK },
+                                              Combination12Cut = _c12_cuts, Combination123Cut = _c123_cuts,
+                                              CombinationCut = _combination_cuts,
+                                              MotherCut = _mother_cuts)
+
+        return Selection(name,
+                         Algorithm = CombineD2HHHKs,
+                         RequiredSelections = inputSel )
+
+    def _getRelInfoD4Body(self):
+        relInfo = []
+        for coneAngle in [0.8,1.0,1.3,1.7]:
+            conestr = str(coneAngle).replace('.','')
+            relInfo += [
+            { "Type"         : "RelInfoConeVariables",
+            "ConeAngle"    : coneAngle,
+            "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+            "DaughterLocations" : {
+                "^[D+ -> X+ X- X+ KS0]CC" : 'P2ConeVar%s_D' % conestr,
+                "[D+ -> ^X+ X- X+ KS0]CC" : 'P2ConeVar%s_1' % conestr,
+                "[D+ -> X+ ^X- X+ KS0]CC" : 'P2ConeVar%s_2' % conestr,
+                "[D+ -> X+ X- ^X+ KS0]CC" : 'P2ConeVar%s_3' % conestr,
+                "[D+ -> X+ X- X+ ^KS0]CC" : 'P2ConeVar%s_4' % conestr}}]
+        relInfo += [ { "Type" : "RelInfoVertexIsolation",
+            "DaughterLocations" : {
+                "^[D+ -> X+ X- X+ KS0]CC" : 'VertexIsoInfo_D',
+                "[D+ -> X+ X- X+ ^KS0]CC" : 'VertexIsoInfo_KS'} } ]
+        return relInfo
+########################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHPi0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHPi0.py
new file mode 100644
index 000000000..2eb71b4a3
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HHHPi0.py
@@ -0,0 +1,231 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting D(s)+ -> h h pi pi0
+
+Authors: Maurizio Martinelli
+"""
+
+########################################################################
+__author__ = ['Maurizio Martinelli']
+__date__ = '16/05/2015'
+__version__ = '$Revision: 0.1 $'
+
+__all__ = ('D2HHHPi0Lines',
+           'default_config')
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, DaVinci__N4BodyDecays
+from StandardParticles                     import StdNoPIDsPions, StdNoPIDsKaons
+from StandardParticles                     import StdLooseResolvedPi0, StdLooseMergedPi0
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+
+from Configurables import FilterDesktop
+
+from GaudiKernel.SystemOfUnits import GeV, MeV, picosecond, mm
+
+
+default_config = {
+    'NAME'        : 'D2HHHPi0',
+    'WGs'         : ['Charm'],
+    'BUILDERTYPE' : 'D2HHHPi0Lines',
+    'CONFIG'      : { 'PrescaleD2PiPiPiPi0R'    : 1,
+                      'PrescaleD2KPiPiPi0R'     : 1,
+                      'PrescaleD2KKPiPi0R'      : 1,
+                      'PrescaleD2PiPiPiPi0M'    : 1,
+                      'PrescaleD2KPiPiPi0M'     : 1,
+                      'PrescaleD2KKPiPi0M'      : 1,
+                      # Pi0 (R)
+                      'MinMass_Pi0R'            : 120,
+                      'MaxMass_Pi0R'            : 150,
+                      'MinPT_Pi0R'              : 1500 * MeV,
+                      # Pi0 (M)
+                      'MinPT_Pi0M'              : 2000 * MeV,
+                      # D(s)+ -> HHHPi0
+                      'TrChi2'                  : 4,
+                      'TrGhostProb'             : 0.5,
+                      'MinTrkPT'                : 300 * MeV,
+                      'MinTrkIPChi2'            : 5,
+                      'HighPIDK'                : 0,
+                      'LowPIDK'                 : 0,
+                      'MaxADOCACHI2'            : 10.0,
+                      'CombMassLow'             : 1750 * MeV,
+                      'CombMassHigh'            : 2100 * MeV,
+                      'MinCombPT'               : 5.0 * GeV,
+                      'MaxVCHI2NDOF'            : 12.0,
+                      'MinBPVDIRA'              : 0.99998,
+                      'MinBPVTAU'               : 0.1 * picosecond,
+                      'MassLow'                 : 1790 * MeV,
+                      'MassHigh'                : 2060 * MeV,
+                      # HLT filters, only process events firing triggers matching the RegEx
+                      'Hlt1Filter': None,
+                      'Hlt2Filter': None,
+                    },
+    'STREAMS'     : ['Charm']
+    }
+
+class D2HHHPi0Lines( LineBuilder ) :
+    """Class defining the D(s)+ -> h h pi pi0 stripping lines"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.D2HHHPi0, self.lineD2HHHPi0 = {}, {}
+
+        decays = { 'PiPiPiPi0'  : ['[D+ -> pi+ pi- pi+ pi0]cc'],
+                   'KPiPiPi0'   : ['[D+ -> K- pi+ pi+ pi0]cc', '[D+ -> K+ pi- pi+ pi0]cc'],
+                   'KKPiPi0'    : ['[D+ -> K+ K- pi+ pi0]cc', '[D+ -> K+ K+ pi- pi0]cc'],
+                     }
+
+        Piz = {'R': self.makePiz('Pi0RFor'+name,
+                                [StdLooseResolvedPi0],
+                                config['MinPT_Pi0R'],
+                                config['MinMass_Pi0R'],
+                                config['MaxMass_Pi0R']),
+              'M': self.makePiz('Pi0MFor'+name,
+                                [StdLooseMergedPi0],
+                                config['MinPT_Pi0M']) }
+
+        for decay, decayDescriptors in decays.iteritems():
+            # make the various stripping selections
+            D2HHHPi0Name   = name + "D2" + decay
+
+            am34 = (139.57 + 134.9766) * MeV
+            am4 = 134.9766 * MeV
+            inputs = [ StdNoPIDsPions ] if decays == 'PiPiPiPi0' else [ StdNoPIDsPions, StdNoPIDsKaons ]
+
+            # use both LL and DD KS
+            for pizName, pizCands in Piz.iteritems():
+
+                # Create the D+ candidate
+                self.D2HHHPi0[decay+pizName] = self.makeD2HHHPi0(D2HHHPi0Name+pizName,
+                                                              decayDescriptors,
+                                                              config['TrChi2'],
+                                                              config['TrGhostProb'],
+                                                              config['MinTrkPT'],
+                                                              config['MinTrkIPChi2'],
+                                                              config['HighPIDK'],
+                                                              config['LowPIDK'],
+                                                              am34,
+                                                              am4,
+                                                              config['CombMassLow'],
+                                                              config['CombMassHigh'],
+                                                              config['MaxADOCACHI2'],
+                                                              config['MinCombPT'],
+                                                              config['MassLow'],
+                                                              config['MassHigh'],
+                                                              config['MaxVCHI2NDOF'],
+                                                              config['MinBPVDIRA'],
+                                                              config['MinBPVTAU'],
+                                                              inputs+[pizCands]
+                                                              )
+
+                # Create the stripping line
+                self.lineD2HHHPi0[decay+pizName] = StrippingLine(D2HHHPi0Name+pizName+"Line",
+                                                               prescale  = config['PrescaleD2'+decay+pizName],
+                                                               selection = self.D2HHHPi0[decay+pizName],
+                                                               HLT1 = config['Hlt1Filter'],
+                                                               HLT2 = config['Hlt2Filter'] )
+
+                # Register the line
+                self.registerLine(self.lineD2HHHPi0[decay+pizName])
+            # end loop on piz types
+        # end loop on decay modes
+
+    def makePiz(self, name, inputSel,
+                minPT, mMin=0, mMax=0) :
+        """
+            Given a set of input candidates, refine the list to create good Pi0 candidates
+            Used for both Merged and Resolved Pi0.
+        """
+        _code = " (PT > %(minPT)s ) " % locals()
+        if mMin != 0 or mMax != 0:
+            _code = ( "( in_range( %(mMin)s* MeV, M, %(mMax)s )) & "  % locals() )+ _code
+        _PizFilter = FilterDesktop(name = 'PizFilter_'+name,
+                                   Code = _code)
+        return Selection (name,
+                          Algorithm = _PizFilter,
+                          RequiredSelections = inputSel)
+
+    def makeD2HHHPi0( self, name, decayDescriptors,
+                   trChi2,trGhostProb,minPT,minIPChi2,
+                   highPIDK, lowPIDK,
+                   am34, am4, amMin, amMax,
+                   maxDocaChi2, minCombPT,
+                   vmMin, vmMax, maxVChi, minbpvDira, minLT,
+                   inputSel = [ StdNoPIDsPions, StdNoPIDsKaons ]) :
+        """
+          Create and return a D0 -> HHHH (H=K,pi) Selection object.
+          Arguments:
+          name            : name of the Selection.
+          DecayDescriptor : DecayDescriptor.
+          trChi2          : maximum tracks chi2
+          trGhostProb     : maximum tracks ghost probability
+          minPT           : minimum tracks PT
+          minIPChi2       : minimum tracks IPChi2
+          highPIDK        : maximum PIDk for pions
+          lowPIDK         : minimum PIDk for kaons
+          am34            : phase space limit on 2-body combinations mass
+          am4             : phase space limit on 3-body combinations mass
+          amMin           : minimum 4-body combination mass
+          amMax           : maximum 4-body combination mass
+          minPT           : minimum 4-body combination PT
+          maxDocaChi2     : maximum 2-tracks DocaChi2
+          mMin            : minimum vertex mass
+          mMax            : maximum vertex mass
+          maxVChi         : maximum vertex chi2
+          minbpvDira      : minimum DIRA wrt best PV
+          minLT           : minimum lifetime wrt best PV
+          inputSel        : input selections
+        """
+
+        _daughters_cuts = " (TRGHOSTPROB < %(trGhostProb)s)" \
+                          "&(TRCHI2DOF < %(trChi2)s)" \
+                          "&(PT > %(minPT)s)" \
+                          "&(MIPCHI2DV(PRIMARY) > %(minIPChi2)s )" %locals()
+        _pidPi = "&(PIDK < %(highPIDK)s)" %locals()
+        _pidK  = "&(PIDK > %(lowPIDK)s)" %locals()
+
+
+        _c12_cuts = (" ( AM < (%(amMax)s - %(am34)s) ) " \
+                     "&( ACHI2DOCA(1,2) < %(maxDocaChi2)s ) " %locals() )
+        _c123_cuts =(" ( AM < (%(amMax)s - %(am4)s) ) " \
+                     "&( ACHI2DOCA(1,3) < %(maxDocaChi2)s ) " \
+                     "&( ACHI2DOCA(2,3) < %(maxDocaChi2)s ) " %locals() )
+        _combination_cuts =  (" (in_range( %(amMin)s, AM, %(amMax)s )) " \
+                              "&( (APT1+APT2+APT3+APT4) > %(minPT)s )" %locals() )
+                              #"&( ACHI2DOCA(1,4) < %(maxDocaChi2)s ) " \ #removed in s23c since it has no effect on pi0 (ACHI2DOCA is always set to 0)
+                              #"&( ACHI2DOCA(2,4) < %(maxDocaChi2)s ) " \
+                              #"&( ACHI2DOCA(3,4) < %(maxDocaChi2)s ) " %locals() )
+        _mother_cuts = (" (in_range( %(vmMin)s* MeV, M, %(vmMax)s )) " \
+                        "&(VFASPF(VCHI2PDOF) < %(maxVChi)s)" \
+                        "&(BPVDIRA > %(minbpvDira)s )" \
+                        "&(BPVLTIME() > %(minLT)s )" %locals() )
+
+        CombineD2HHHKs = DaVinci__N4BodyDecays(DecayDescriptors = decayDescriptors,
+                                              DaughtersCuts = { "pi+" : _daughters_cuts+_pidPi, "K+" : _daughters_cuts+_pidK },
+                                              Combination12Cut = _c12_cuts, Combination123Cut = _c123_cuts,
+                                              CombinationCut = _combination_cuts,
+                                              MotherCut = _mother_cuts)
+
+        return Selection(name,
+                         Algorithm = CombineD2HHHKs,
+                         RequiredSelections = inputSel )
+
+
+########################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HMuNu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HMuNu.py
new file mode 100644
index 000000000..5a17275e5
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2HMuNu.py
@@ -0,0 +1,361 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = ['Liang Sun','Adam Davis']
+__date__ = '03/19/2021'
+__version__ = '$Revision: 0.02 $'
+
+'''
+D* -> D0 pis, D0 -> h- mu+(e+) nu exclusive reconstruction 
+'''
+# =============================================================================
+##
+#  D->h- mu+(e+) nu exclusive reconstruction
+#
+
+"""
+Stripping lines for semileptonic D0 decays
+to final states with hadron+muon, where the hadron is
+a charged track.
+The two hadronic signal modes for D+ from D*+ -> D0 pi+ are:
+
+D0 -> K-  mu+(e+) nu, 
+D0 -> pi-  mu+(e+) nu, 
+
+Last modification $Date: 19/3/2021 $
+               by $Author: adavis$
+"""
+__all__ = ('D2HLepNuBuilder',
+           'TOSFilter',
+           'default_config')
+
+default_config = {
+    'NAME'        : 'D2HMuNu',
+    'WGs'         : ['Charm'],
+    'BUILDERTYPE' : 'D2HLepNuBuilder',
+    'CONFIG'      :  {
+        "KLepMassLow"     : 500  , #MeV
+        "KLepMassHigh"    : 2000 , #MeV
+        "DELTA_MASS_MAX"  : 400  , #MeV
+        "GEC_nLongTrk"    : 160. , #adimensional
+        "TRGHOSTPROB"     : 0.35 ,#adimensional
+        #Muons
+        "MuonGHOSTPROB"   : 0.35 ,#adimensional
+        #   "MuonP"               : 3000. ,#MeV
+        "MuonPT"          : 500. ,#MeV
+        "MuonPIDK"        : 0.   ,#adimensional
+        "MuonPIDmu"       : 3.   ,#adimensional
+        "MuonPIDp"        : 0.   ,#adimensional
+        "ElectronPIDe"    : 1.  ,
+        "ElectronPT"      : 500  ,#MeV
+        #Xu
+        #K channel
+        "KaonP"           : 3000.,#MeV
+        "KaonPT"          : 800. ,#MeV
+        "KaonPIDK"        : 5.   ,#adimensional 
+        "KaonPIDmu"       : 5.   ,#adimensional
+        "KaonPIDp"        : 5.   ,#adimensional
+        "KaonMINIPCHI2"   : 9    ,#adimensional
+        "BVCHI2DOF"       : 20   ,#adminensional
+        "BDIRA"           : 0.999,#adminensional
+        "BFDCHI2HIGH"     : 100. ,#adimensional
+        "BPVVDZcut"       : 0.0  , #mm
+        #slow pion
+        "Slowpion_PT"     : 300 #MeV
+        ,"Slowpion_P"     : 1000 #MeV
+        ,"Slowpion_TRGHOSTPROB" : 0.35 #adimensional
+        ,"Slowpion_PIDe" : 5 #adimensional
+        ,"useTOS" : True #adimensional
+        ,"TOSFilter" : { 'Hlt2CharmHad.*HHX.*Decision%TOS' : 0}  #adimensional
+        
+        },
+    'STREAMS'     : ['Charm']    
+}
+
+from Gaudi.Configuration import *
+from StrippingUtils.Utils import LineBuilder
+
+import logging
+#default_name="D2KMuNu"
+
+class D2HLepNuBuilder(LineBuilder):
+    """
+    Definition of D* tagged D0 -> H- mu+(e+) nu stripping
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+        self._config=config
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        self._muonSel=None
+        self._muonFilter()
+        
+        self._electronSel=None
+        self._electronFilter()
+        
+        self._slowpionSel =None
+        self._pionSel=None
+        self._kaonSel=None
+        self._kaonFilter()
+        self._pionFilter()
+        self._slowpionFilter()
+        
+        ## OPPOSITE SIGN hl (BACKGROUND)
+        
+        self.registerLine(self._D2PiMuNuLine())
+        self.registerLine(self._D2KMuNuLine())
+        self.registerLine(self._D2PiENuLine())
+        self.registerLine(self._D2KENuLine())
+        
+        ## SAME SIGN hl (BACKGROUND)
+        self.registerLine(self._D2PiMuNuSSLine())
+        self.registerLine(self._D2KMuNuSSLine())
+        self.registerLine(self._D2PiENuSSLine())
+        self.registerLine(self._D2KENuSSLine())
+        
+        #run the electron line too
+    def _NominalMuSelection( self ):
+        #        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+        return " (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (PIDmu-PIDpi > %(MuonPIDmu)s )"\
+               "& (PIDmu-PIDp  > %(MuonPIDp)s )"\
+               "& (PIDmu-PIDK  > %(MuonPIDK)s )"
+#               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+
+    def _NominalKSelection( self ):
+        #        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonPTight)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+        return "  (PT> %(KaonPT)s *MeV)"\
+               "& (P> %(KaonP)s)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK-PIDpi  > %(KaonPIDK)s ) & (PIDK-PIDp > %(KaonPIDp)s ) & (PIDK-PIDmu > %(KaonPIDmu)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    def _NominalPiSelection( self ):
+        #        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+        return " (PT> %(KaonPT)s *MeV)"\
+               "& (P> %(KaonP)s)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK-PIDpi < -%(KaonPIDK)s )& (PIDp < -%(KaonPIDp)s )& (PIDmu < -%(KaonPIDmu)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    def _NominalSlowPiSelection( self ):
+        #        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+        return " (PT> %(Slowpion_PT)s *MeV)"\
+               "& (P > %(Slowpion_P)s)"\
+               "& (TRGHOSTPROB < %(Slowpion_TRGHOSTPROB)s)"\
+               "& (PIDe < %(Slowpion_PIDe)s) & (MIPCHI2DV(PRIMARY)< 9.0) "
+
+    def _NominalElectronSelection( self ):
+        return " (PT> %(ElectronPT)s *MeV) & (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+                "& (PIDe > %(ElectronPIDe)s)"
+
+    ######--######
+    def _electronFilter( self ):
+        if self._electronSel is not None:
+            return self._electronSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseElectrons
+        _el = FilterDesktop( Code = self._NominalElectronSelection() % self._config )
+        _electronSel=Selection("Electron_for"+self._name,
+                         Algorithm=_el,
+                         RequiredSelections = [StdLooseElectrons])
+        
+        self._electronSel=_electronSel
+        
+        return _electronSel
+
+    ######--######
+    def _muonFilter( self ):
+        if self._muonSel is not None:
+            return self._muonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseMuons
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("Mu_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseMuons])
+        
+        self._muonSel=_muSel
+        
+        return _muSel
+
+    def _pionFilter( self ):
+        if self._pionSel is not None:
+            return self._pionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _ka = FilterDesktop( Code = self._NominalPiSelection() % self._config )
+        _kaSel=Selection("Pi_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdLoosePions])
+        self._pionSel=_kaSel
+        return _kaSel
+
+    ######Kaon Filter######
+    def _kaonFilter( self ):
+        if self._kaonSel is not None:
+            return self._kaonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseKaons
+        
+        _ka = FilterDesktop( Code = self._NominalKSelection() % self._config )
+        _kaSel=Selection("K_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdLooseKaons])
+        self._kaonSel=_kaSel
+        return _kaSel
+
+    ######Slow Pion Filter######
+    def _slowpionFilter( self ):
+        if self._slowpionSel is not None:
+            return self._slowpionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLoosePions
+        
+        _ka = FilterDesktop( Code = self._NominalSlowPiSelection() % self._config )
+        _kaSel=Selection("pis_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdAllLoosePions])
+        self._slowpionSel=_kaSel
+        return _kaSel
+
+    ## OPPOSITE SIGN hl (SIGNAL)
+    def _D2PiMuNuLine( self ):
+        return self.DstarMaker("D2pimu", ["[D0 -> pi- mu+]cc"], self._pionFilter(), self._muonFilter())
+
+    def _D2KMuNuLine( self ):
+        return self.DstarMaker("D2Kmu",["[D0 -> K- mu+]cc"], self._kaonFilter(), self._muonFilter())
+
+    def _D2PiENuLine( self ):
+        return self.DstarMaker("D2piE", ["[D0 -> pi- e+]cc"], self._pionFilter(), self._electronFilter())
+
+    def _D2KENuLine( self ):
+        return self.DstarMaker("D2KE",["[D0 -> K- e+]cc"], self._kaonFilter(), self._electronFilter())
+
+    ## SAME SIGN hl (BACKGROUND)
+    def _D2PiMuNuSSLine( self ):
+        return self.DstarMaker("D2pimuSS", ["[D0 -> pi- mu-]cc"], self._pionFilter(), self._muonFilter())
+
+    def _D2KMuNuSSLine( self ):
+        return self.DstarMaker("D2KmuSS",["[D0 -> K- mu-]cc"], self._kaonFilter(), self._muonFilter())
+
+    def _D2PiENuSSLine( self ):
+        return self.DstarMaker("D2piESS", ["[D0 -> pi- e-]cc"], self._pionFilter(), self._electronFilter())
+
+    def _D2KENuSSLine( self ):
+        return self.DstarMaker("D2KESS",["[D0 -> K- e-]cc"], self._kaonFilter(), self._electronFilter())
+
+    def DstarMaker(self, _name, _D0Decays, hfiler, lfilter):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StrippingConf.StrippingLine import StrippingLine
+        
+        _KMu = CombineParticles(
+            DecayDescriptors = _D0Decays,
+            CombinationCut = "(AM>%(KLepMassLow)s*MeV) & (AM<%(KLepMassHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s )"\
+            "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)"\
+            "& (BPVDIRA > %(BDIRA)s)"\
+            "& (BPVVDZ > %(BPVVDZcut)s)"
+            #            "& (BPVVD > %(VDCut)s)"
+            #" & (ratio > 0.0)"
+            % self._config,
+            ReFitPVs = True
+            )
+        # _KMu.Preambulo = [ "from LoKiPhys.decorators import *",
+        #                    "dx = (VFASPF(VX)-BPV(VX))",
+        #                    "dy = (VFASPF(VY)-BPV(VY))",
+        #                    "dz = (VFASPF(VZ)-BPV(VZ))",
+        #                    "norm = (max(sqrt(dx*dx+dy*dy+dz*dz),0))",
+        #                    "D_xdir  = ((dx)/norm)",
+        #                    "D_ydir  = ((dy)/norm)",
+        #                    "D_zdir  = ((dz)/norm)",
+        #                    "Pxkmu   = (CHILD(PX,1)+CHILD(PX,2))",
+        #                    "Pykmu   = (CHILD(PY,1)+CHILD(PY,2))",
+        #                    "Pzkmu   = (CHILD(PZ,1)+CHILD(PZ,2))",
+        #                    "Dflight = (D_xdir*Pxkmu + D_ydir*Pykmu+ D_zdir*Pzkmu)",
+        #                    "mD  = 1864.84",
+        #                    "M_2 = (mD*mD + M12*M12)",
+        #                    "kmu_E  = (CHILD(E,1)+CHILD(E,2))",
+        #                    "quada = (Dflight*Dflight - kmu_E*kmu_E)",
+        #                    "quadb = (M_2*Dflight)",
+        #                    "quadc = (((M_2*M_2)/4) - (kmu_E*kmu_E*mD*mD))",
+        #                    "Discriminant = ((quadb*quadb)-(4*quada*quadc))",
+        #                    "solution_a = ((-quadb + sqrt(max(Discriminant,0)))/(2*quada))",
+        #                    "solution_b = ((-quadb - sqrt(max(Discriminant,0)))/(2*quada))",
+        #                    "ratio = (solution_a/solution_b)"
+        #                    ]
+        
+        _D0Sel=Selection("SelD0_for"+_name,
+                         Algorithm=_KMu,
+                         RequiredSelections = [lfilter, hfiler])
+
+
+        DstComb = CombineParticles( #name = "CombDst"+_name,
+                DecayDescriptors = ['[D*(2010)+ -> D0 pi+]cc'],
+                CombinationCut = "(AM - ACHILD(M,1) < %(DELTA_MASS_MAX)s+5 *MeV) & (ADOCACHI2CUT(20,''))" %self._config,
+                MotherCut = "(M - CHILD(M,1) < %(DELTA_MASS_MAX)s *MeV) & (VFASPF(VCHI2/VDOF) < 9.0)" %self._config
+                )
+        DstSel = Selection("SelDst"+_name,
+                Algorithm = DstComb,
+                RequiredSelections = [_D0Sel,self._slowpionFilter()])
+
+        _tosFilter = self._config['TOSFilter']
+        DstSelTOS = TOSFilter( "SelDstHMu_Hlt2TOS"+_name
+                ,DstSel
+                ,_tosFilter)
+    
+        hlt2 = ""        
+        the_prescale = 1.0
+        if self._config["useTOS"] == True: # and _name.find('E') < 0:
+            Line = StrippingLine(_name+'Line',
+                    prescale = the_prescale,
+                    FILTER=self.GECs,
+                    HLT2 = hlt2,
+                    selection = DstSelTOS,
+                                 RequiredRawEvents = ['Calo','Velo']) 
+        else:
+            Line = StrippingLine(_name+'Line',
+                    prescale = the_prescale,
+                    FILTER=self.GECs,
+                    HLT2 = hlt2,
+                    selection = DstSel,
+                                 RequiredRawEvents = ['Calo','Velo']) 
+        
+        return Line
+                                                    
+def TOSFilter( name, _input, _specs ) :
+    from Configurables import TisTosParticleTagger
+    from PhysSelPython.Wrappers import Selection 
+    _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+    _tisTosFilter.TisTosSpecs = _specs 
+    return Selection( name
+                      , Algorithm = _tisTosFilter
+                      , RequiredSelections = [ _input ]
+                      )        
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2KPiPiMuNu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2KPiPiMuNu.py
new file mode 100644
index 000000000..1dc29e06e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2KPiPiMuNu.py
@@ -0,0 +1,381 @@
+###############################################################################
+# (c) Copyright 2019 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.                                       #
+###############################################################################
+
+__author__ = ['Liang Sun']
+__date__ = '07/05/2019'
+__version__ = '$Revision: 0.01 $'
+
+'''
+D* -> D0 pis, D0 -> K- pi+ pi- mu+ nu exclusive reconstruction 
+'''
+# =============================================================================
+##
+#  D0 -> K- pi+ pi- mu+(e+) nu exclusive reconstruction
+#
+
+"""
+Stripping lines for semileptonic D0 decays
+to final states with 3 charged mesons and a lepton.
+The two hadronic signal modes for D0 from D*+ -> D0 pi+ are:
+
+D0 -> K- pi+ pi- mu+ nu, 
+D0 -> K- pi+ pi- e+ nu, 
+
+Last modification $Date: 07/05/2019 $
+               by $Author: lsun$
+"""
+__all__ = ('D2KPiPiMuNuBuilder',
+           'TOSFilter',
+           'default_config')
+
+default_config = {
+    'NAME'        : 'D2KPiPiMuNu',
+    'WGs'         : ['Charm'],
+    'BUILDERTYPE' : 'D2KPiPiMuNuBuilder',
+    'CONFIG'      :  {
+        "KPiPiMuMassLow"     : 800  , #MeV
+        "KPiPiMuMassHigh"    : 2000 , #MeV
+        "DELTA_MASS_MAX"  : 200  , #MeV
+        "GEC_nLongTrk"    : 160. , #adimensional
+        "TRGHOSTPROB"     : 0.35 ,#adimensional
+        "DAUMINIPCHI2"   : 3    ,#adimensional
+        #Muons
+        "MuonGHOSTPROB"   : 0.35 ,#adimensional
+        "MuonP"          : 3000. ,#MeV
+        "MuonPT"          : 300. ,#MeV
+        "MuonPIDK"        : 0.   ,#adimensional
+        "MuonPIDmu"       : 3.   ,#adimensional
+        "MuonPIDp"        : 0.   ,#adimensional
+        "ElectronPIDe"    : 2  ,
+        "ElectronP"           : 3000.,#MeV
+        "ElectronPT"      : 300  ,#MeV
+        #Xu
+        #K channel
+        "KaonTRCHI2"           : 3.,#MeV
+        "KaonP"           : 3000.,#MeV
+        "KaonPT"          : 300. ,#MeV
+        "KaonPIDK"        : 5.   ,#adimensional 
+        "KaonPIDmu"       : 5.   ,#adimensional
+        "KaonPIDp"        : 5.   ,#adimensional
+        "PionPIDK"        : 0.   ,#adimensional 
+        "PionPIDmu"       : 0.   ,#adimensional
+        "PionPIDp"        : 0.   ,#adimensional
+        "BVCHI2DOF"       : 10   ,#adminensional
+        "BDIRA"           : 0.999,#adminensional
+        "BFDCHI2HIGH"     : 30. ,#adimensional
+        "D0IPCHI2Max"     : 36. ,#adimensional
+        "BPVVDZcut"       : 0.0  , #mm
+        #slow pion
+        "Slowpion_PT"     : 120 #MeV
+        ,"Slowpion_P"     : 1000 #MeV
+        ,"Slowpion_TRGHOSTPROB" : 0.35 #adimensional
+        ,"Slowpion_PIDe" : 5 #adimensional
+        ,"useTOS" : False #adimensional
+        ,"TOSFilter" : { 'Hlt2CharmHad.*HHX.*Decision%TOS' : 0}  #adimensional
+        ,"SSonly" : 2 # swith: 0==signal only (h-l+), 1==same sign hl, 2==both, 3 == 2016 EOY restripping
+        , "NoPIDmu"           : False
+        , "NoPIDK"           : False
+        , "NoPIDpi"           : False
+        , "NoPIDpis"           : True
+        },
+    'STREAMS'     : ['CharmCompleteEvent']    
+}
+
+from Gaudi.Configuration import *
+from StrippingUtils.Utils import LineBuilder
+
+import logging
+#default_name="D2KPiPiMuNu"
+
+class D2KPiPiMuNuBuilder(LineBuilder):
+    """
+    Definition of D* tagged D0 -> K- pi+ pi- mu+ (e+) nu stripping
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+        self._config=config
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        self._muonSel=None
+        self._muonFilter()
+        
+        self._electronSel=None
+        self._electronFilter()
+        
+        self._slowpionSel =None
+        self._pionSel=None
+        self._kaonSel=None
+        self._kaonFilter()
+        self._pionFilter()
+        self._slowpionFilter()
+        
+        ## OPPOSITE SIGN hl (BACKGROUND)
+        if self._config["SSonly"]==2 or self._config["SSonly"]==0:
+            self.registerLine(self._D2KPiPiMuNuLine())
+            self.registerLine(self._D2KPiPiENuLine())
+        if self._config["SSonly"]>=1:
+            ## SAME SIGN hl (BACKGROUND)
+            self.registerLine(self._D2KPiPiMuNuKMuSSLine())
+            self.registerLine(self._D2KPiPiMuNuSSLine())
+            self.registerLine(self._D2KPiPiENuKESSLine())
+            self.registerLine(self._D2KPiPiENuSSLine())
+
+    def _NominalMuSelection( self ):
+        #        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+        return " (PT> %(MuonPT)s* MeV)"\
+               "& (P> %(MuonP)s)"\
+               "& (TRCHI2DOF < %(KaonTRCHI2)s )"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (PIDmu-PIDpi > %(MuonPIDmu)s )"\
+               "& (PIDmu-PIDp  > %(MuonPIDp)s )"\
+               "& (PIDmu-PIDK  > %(MuonPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(DAUMINIPCHI2)s )"
+
+    def _NominalKSelection( self ):
+        #        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonPTight)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+        return "  (PT> %(KaonPT)s *MeV)"\
+               "& (P> %(KaonP)s)"\
+               "& (TRCHI2DOF < %(KaonTRCHI2)s )"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK-PIDpi  > %(KaonPIDK)s ) & (PIDK-PIDp > %(KaonPIDp)s ) & (PIDK-PIDmu > %(KaonPIDmu)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(DAUMINIPCHI2)s )"
+
+    def _NominalPiSelection( self ):
+        #        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+        return " (PT> %(KaonPT)s *MeV)"\
+               "& (P> %(KaonP)s)"\
+               "& (TRCHI2DOF < %(KaonTRCHI2)s )"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK-PIDpi < -%(PionPIDK)s )& (PIDp < -%(PionPIDp)s )& (PIDmu < -%(PionPIDmu)s ) "\
+               "& (PIDe < 0)"\
+               "& (MIPCHI2DV(PRIMARY)> %(DAUMINIPCHI2)s )"
+
+    def _NominalSlowPiSelection( self ):
+        #        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+        return " (PT> %(Slowpion_PT)s *MeV)"\
+               "& (P > %(Slowpion_P)s)"\
+               "& (TRGHOSTPROB < %(Slowpion_TRGHOSTPROB)s)"\
+               "& (PIDe < %(Slowpion_PIDe)s) & (MIPCHI2DV(PRIMARY)< 9.0) "
+
+    def _NominalElectronSelection( self ):
+        return " (PT> %(ElectronPT)s *MeV) & (P> %(ElectronP)s)"\
+               "& (TRCHI2DOF < %(KaonTRCHI2)s )"\
+                "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+                "& (PIDe > %(ElectronPIDe)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(DAUMINIPCHI2)s )"
+
+    def _electronFilter( self ):
+        if self._electronSel is not None:
+            return self._electronSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseElectrons
+        _el = FilterDesktop( Code = self._NominalElectronSelection() % self._config )
+        _electronSel=Selection("Electron_for"+self._name,
+                         Algorithm=_el,
+                         RequiredSelections = [StdLooseElectrons])
+        
+        self._electronSel=_electronSel
+        
+        return _electronSel
+
+    ######--######
+    def _muonFilter( self ):
+        if self._muonSel is not None:
+            return self._muonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseMuons, StdAllLooseMuons, StdAllNoPIDsMuons
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _mupid = StdAllLooseMuons
+        if self._config["NoPIDmu"]: _mupid = StdAllNoPIDsMuons
+        _muSel=Selection("Mu_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [_mupid])
+        
+        self._muonSel=_muSel
+        
+        return _muSel
+
+    def _pionFilter( self ):
+        if self._pionSel is not None:
+            return self._pionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLoosePions, StdAllNoPIDsPions
+        
+        _ka = FilterDesktop( Code = self._NominalPiSelection() % self._config )
+        _pipid = StdAllLoosePions
+        if self._config["NoPIDpi"]: _pipid = StdAllNoPIDsPions
+        _kaSel=Selection("Pi_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [_pipid])
+        self._pionSel=_kaSel
+        return _kaSel
+
+    ######Kaon Filter######
+    def _kaonFilter( self ):
+        if self._kaonSel is not None:
+            return self._kaonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLooseKaons, StdAllNoPIDsKaons
+        
+        _ka = FilterDesktop( Code = self._NominalKSelection() % self._config )
+        _kpid = StdAllLooseKaons
+        if self._config["NoPIDK"]: _kpid = StdAllNoPIDsKaons
+        _kaSel=Selection("K_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [_kpid])
+        self._kaonSel=_kaSel
+        return _kaSel
+
+    ######Slow Pion Filter######
+    def _slowpionFilter( self ):
+        if self._slowpionSel is not None:
+            return self._slowpionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLoosePions, StdAllNoPIDsPions
+        
+        _pipid = StdAllLoosePions
+        if self._config["NoPIDpis"]: _pipid = StdAllNoPIDsPions
+        _ka = FilterDesktop( Code = self._NominalSlowPiSelection() % self._config )
+        _kaSel=Selection("pis_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [_pipid])
+        self._slowpionSel=_kaSel
+        return _kaSel
+
+    def _D2KPiPiMuNuLine( self ):
+        return self.DstarMaker("D2Kpipimu",["[D0 -> K- pi+ pi- mu+]cc"], self._kaonFilter(), self._pionFilter(), self._muonFilter())
+
+    ## SAME SIGN hl (BACKGROUND)
+    def _D2KPiPiMuNuKMuSSLine( self ):
+        return self.DstarMaker("D2Kpipimu_KLepSS",["[D0 -> K- pi+ pi+ mu-]cc"], self._kaonFilter(), self._pionFilter(), self._muonFilter())
+    
+    def _D2KPiPiMuNuSSLine( self ):
+        return self.DstarMaker("D2Kpipimu_SS",["[D0 -> K- pi+ pi- mu-]cc", "[D0 -> K- pi+ pi+ mu+]cc"], self._kaonFilter(), self._pionFilter(), self._muonFilter())
+
+    def _D2KPiPiENuLine( self ):
+        return self.DstarMaker("D2KpipiE",["[D0 -> K- pi+ pi- e+]cc"], self._kaonFilter(), self._pionFilter(), self._electronFilter())
+
+    ## SAME SIGN hl (BACKGROUND)
+    def _D2KPiPiENuKESSLine( self ):
+        return self.DstarMaker("D2KpipiE_KLepSS",["[D0 -> K- pi+ pi+ e-]cc"], self._kaonFilter(), self._pionFilter(), self._electronFilter())
+    
+    def _D2KPiPiENuSSLine( self ):
+        return self.DstarMaker("D2KpipiE_SS",["[D0 -> K- pi+ pi- e-]cc", "[D0 -> K- pi+ pi+ e+]cc"], self._kaonFilter(), self._pionFilter(), self._electronFilter())
+
+    def DstarMaker(self, _name, _D0Decays, kmfiler, pifiler, lfilter):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StrippingConf.StrippingLine import StrippingLine
+        
+        _KPiPiMu = CombineParticles(
+            DecayDescriptors = _D0Decays,
+            CombinationCut = "(AM>%(KPiPiMuMassLow)s*MeV) & (AM<%(KPiPiMuMassHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s )"\
+            "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)"\
+            "& (BPVIPCHI2()<%(D0IPCHI2Max)s)"\
+            "& (BPVDIRA > %(BDIRA)s)"\
+            "& (BPVVDZ > %(BPVVDZcut)s)"
+            #            "& (BPVVD > %(VDCut)s)"
+            #" & (ratio > 0.0)"
+            % self._config,
+            ReFitPVs = True
+            )
+        # _KPiPiMu.Preambulo = [ "from LoKiPhys.decorators import *",
+        #                    "dx = (VFASPF(VX)-BPV(VX))",
+        #                    "dy = (VFASPF(VY)-BPV(VY))",
+        #                    "dz = (VFASPF(VZ)-BPV(VZ))",
+        #                    "norm = (max(sqrt(dx*dx+dy*dy+dz*dz),0))",
+        #                    "D_xdir  = ((dx)/norm)",
+        #                    "D_ydir  = ((dy)/norm)",
+        #                    "D_zdir  = ((dz)/norm)",
+        #                    "Pxkmu   = (CHILD(PX,1)+CHILD(PX,2))",
+        #                    "Pykmu   = (CHILD(PY,1)+CHILD(PY,2))",
+        #                    "Pzkmu   = (CHILD(PZ,1)+CHILD(PZ,2))",
+        #                    "Dflight = (D_xdir*Pxkmu + D_ydir*Pykmu+ D_zdir*Pzkmu)",
+        #                    "mD  = 1864.84",
+        #                    "M_2 = (mD*mD + M12*M12)",
+        #                    "kmu_E  = (CHILD(E,1)+CHILD(E,2))",
+        #                    "quada = (Dflight*Dflight - kmu_E*kmu_E)",
+        #                    "quadb = (M_2*Dflight)",
+        #                    "quadc = (((M_2*M_2)/4) - (kmu_E*kmu_E*mD*mD))",
+        #                    "Discriminant = ((quadb*quadb)-(4*quada*quadc))",
+        #                    "solution_a = ((-quadb + sqrt(max(Discriminant,0)))/(2*quada))",
+        #                    "solution_b = ((-quadb - sqrt(max(Discriminant,0)))/(2*quada))",
+        #                    "ratio = (solution_a/solution_b)"
+        #                    ]
+        
+        _D0Sel=Selection("SelD0_for"+_name,
+                         Algorithm=_KPiPiMu,
+                         RequiredSelections = [lfilter, pifiler, kmfiler])
+
+
+        DstComb = CombineParticles( #name = "CombDst"+_name,
+                DecayDescriptors = ['[D*(2010)+ -> D0 pi+]cc'],
+                CombinationCut = "(AM - ACHILD(M,1) < %(DELTA_MASS_MAX)s+5 *MeV) & (ADOCACHI2CUT(20,''))" %self._config,
+                MotherCut = "(M - CHILD(M,1) < %(DELTA_MASS_MAX)s *MeV) & (VFASPF(VCHI2/VDOF) < %(BVCHI2DOF)s)" %self._config
+                )
+        DstSel = Selection("SelDst"+_name,
+                Algorithm = DstComb,
+                RequiredSelections = [_D0Sel,self._slowpionFilter()])
+
+        _tosFilter = self._config['TOSFilter']
+        DstSelTOS = TOSFilter( "SelDstKPiPiMu_Hlt2TOS"+_name
+                ,DstSel
+                ,_tosFilter)
+    
+        hlt2 = ""        
+        the_prescale = 1.0
+        if self._config["useTOS"] == True: # and _name.find('E') < 0:
+            if "K" in _name:
+                the_prescale = 1
+            if 'SS' in _name:
+                the_prescale = 1
+            Line = StrippingLine(_name+'Line',
+                    prescale = the_prescale,
+                    FILTER=self.GECs,
+                    HLT2 = hlt2,
+                    selection = DstSelTOS) 
+        else:
+            if "E_SS" in _name :
+                the_prescale = 0.5
+            Line = StrippingLine(_name+'Line',
+                    prescale = the_prescale,
+                    FILTER=self.GECs,
+                    HLT2 = hlt2,
+                    selection = DstSel) 
+        
+        return Line
+                                                    
+def TOSFilter( name, _input, _specs ) :
+    from Configurables import TisTosParticleTagger
+    from PhysSelPython.Wrappers import Selection 
+    _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+    _tisTosFilter.TisTosSpecs = _specs 
+    return Selection( name
+                      , Algorithm = _tisTosFilter
+                      , RequiredSelections = [ _input ]
+                      )        
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2KS0H_conf.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2KS0H_conf.py
new file mode 100644
index 000000000..7e0f4c6a3
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2KS0H_conf.py
@@ -0,0 +1,795 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingD2KS0H.py,v 1.0 2010-02-21 sgregson
+'''
+Module for construction of D(s)->KS0H (H=pi/K) 
+stripping Selections and StrippingLines.
+Provides functions to build D(s) selections.
+Provides class D2KS0HConf, which constructs the Selections and 
+StrippingLines given a configuration dictionary.
+Exported symbols (use python help!):
+   - D2KS0HConf
+   - makeKS02PiPi
+   - makeD2KS0Pi
+   - makeD2KS0K
+  '''
+
+__author__ = ['Sam Gregson','Mike Sokoloff']
+__date__ = '06/23/2015'
+__version__ = '$Revision: 3.0 $'
+
+__all__ = ('StrippingD2KS0HConf',
+           'default_config',
+           'makeKS02PiPi',
+           'makeKS02PiPiDD',
+           'makeD2KS0Pi',
+           'makeD2KS0PiDD',
+           'makeD2KS0K'
+           'makeD2KS0KDD'
+           'makeBachelorPions'
+           'makeBachelorKaons'
+           )
+
+# Import some useful stuff
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StandardParticles import StdLoosePions, StdLooseKaons
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder, checkConfig
+from Configurables import TisTosParticleTagger
+from GaudiKernel.SystemOfUnits import GeV, MeV, picosecond, mm
+
+default_name='D2KS0H'
+
+## Example config dictionary - keep updated
+
+default_config = {
+   'NAME'         : 'D2KS0H',
+   'WGs'          : ['Charm'],
+   'BUILDERTYPE'  : 'StrippingD2KS0HConf',
+   'STREAMS'      : ['Charm'],
+   'CONFIG'       : {
+   #  TisTos use
+        'UseTOS'              :  False
+       ,'TisTosSpecs_KS0Pi'   : {}
+       ,'TisTosSpecs_KS0PiDD' : {}
+       ,'TisTosSpecs_KS0K'    : {}
+       ,'TisTosSpecs_KS0KDD'  : {}
+   # KS0 daughter pion cuts
+       ,'KS0DaugP'  : 2000 * MeV
+       ,'KS0DaugPT'  : 200 * MeV
+       ,'KS0DaugTrackChi2' : 4  
+       ,'KS0DaugMIPChi2' : 40
+       ,'KS0DaugPIDK' : 10
+
+   # KS0 mother cuts
+       ,'KS0MassWindow' : 35 * MeV   
+       ,'KS0MIPChi2'     : 7
+       ,'KS0MIPChi2DD'     : 0
+       ,'KS0VertexChi2'  : 10
+       ,'KS0PT' : 500 * MeV
+       ,'KS0BPVVDCHI2' : 300 
+       ,'KS0BPVVDCHI2DD' : 200  
+       ,'KsLL_BPVLTIME_MIN'  :  0.5 * picosecond
+       ,'KsDD_VZ_MIN'       : 300. * mm
+       ,'KsDD_VZ_MAX'       : 2275. * mm
+
+   # Bachelor track cuts (common to pions and kaons)
+       , 'TrGhostProbMax'   : 0.5
+
+   # Bachelor pion cuts
+       ,'BachPionP' : 2000 * MeV              
+       ,'BachPionPT' : 200 * MeV   
+       ,'BachPionTrackChi2' : 3
+       ,'BachPionMIPChi2' : 15 
+       ,'BachPionPIDK'   : 0  
+
+   # Bachelor kaon cuts
+       ,'BachKaonP' : 2000 * MeV               
+       ,'BachKaonPT'  : 200 * MeV      
+       ,'BachKaonTrackChi2': 3
+       ,'BachKaonMIPChi2'   : 15  
+       ,'BachKaonPIDK'   : 0      
+
+   # D meson cuts - pion
+   # Combo cuts
+       ,'DMesonComboLowMass'  : 1760 * MeV
+       ,'DMesonComboHighMass'  : 2080 * MeV
+       ,'DMesonComboDOCA' : 0.6 * mm
+       ,'DMesonAPT' : 1800 * MeV
+       ,'DMesonADOCAChi2' : 11
+   # Mother cuts
+       ,'DMesonMotherLowMass' : 1770 * MeV
+       ,'DMesonMotherHighMass'   : 2070 * MeV
+       ,'DMesonMotherVertexChi2' : 10
+       ,'DMesonMotherMIPChi2'  : 15  
+       ,'DMesonMotherPT' : 2000 * MeV
+       ,'KS0ZDiff' : 10 * mm
+       ,'DMesonFlightDistChi2' : 10
+       ,'D_BPVLTIME_MIN'   : 0.25 * picosecond  ## 0.25 ps used in Hlt2 by default
+ 
+   # Prescales
+       ,'PionLinePrescale' : 1
+       ,'KaonLinePrescale' : 1
+       ,'PionLinePrescaleDD' : 1
+       ,'KaonLinePrescaleDD' : 1
+
+   # Postscales     
+       ,'PionLinePostscale' : 1 
+       ,'KaonLinePostscale' : 1    
+       ,'PionLinePostscaleDD' : 1 
+       ,'KaonLinePostscaleDD' : 1          
+    } ##  end of CONFIG
+}  ## end of default_config
+
+#Class for lines - inherits from LineBuilder class
+
+class StrippingD2KS0HConf(LineBuilder) :
+    """
+    Builder of D2KS0H stripping Selections and StrippingLines.
+    Constructs D(s) -> KS0H (H=pi/K) Selections and StrippingLines from a configuration dictionary.
+    """
+
+## Set up the keys/cuts which will receive values from the cut dictinaries in Phys/StrippingSettings
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Class constructor
+    def __init__(self, name, config) :
+        
+    # Use the constructor of the base class from which we inherit
+        LineBuilder.__init__(self, name, config)
+
+        self.name = name
+        
+        # Names for different lines
+        pion_name = self.name+'Pion'
+        kaon_name = self.name+'Kaon'
+        pion_nameDD = self.name+'PionDD'
+        kaon_nameDD = self.name+'KaonDD'
+        
+
+        # Define the selections that go forward to the lines - combine particles, combine particles etc 
+
+        # Bachelor pions
+        self.selBachPions = makeBachelorPions(self.name + 'BachelorPionsForD2KS0H'
+                                    # Cuts
+                                    # Bachelor pion cuts
+                                    ,BachPionP = config['BachPionP']                 
+                                    ,BachPionPT = config['BachPionPT']         
+                                    ,BachPionTrackChi2 = config['BachPionTrackChi2']  
+                                    ,BachPionMIPChi2 = config['BachPionMIPChi2']     
+                                    ,BachPionPIDK = config['BachPionPIDK']   
+                                    ,BachPionGhostProbMax = config['TrGhostProbMax']
+                                                      )
+
+        # Bachelor kaons
+        self.selBachKaons = makeBachelorKaons(self.name + 'BachelorKaonsForD2KS0H'
+                                    # Cuts
+                                    # Bachelor kaon cuts
+                                    ,BachKaonP = config['BachKaonP']                 
+                                    ,BachKaonPT = config['BachKaonPT']         
+                                    ,BachKaonTrackChi2 = config['BachKaonTrackChi2']  
+                                    ,BachKaonMIPChi2 = config['BachKaonMIPChi2']     
+                                    ,BachKaonPIDK = config['BachKaonPIDK']   
+                                    ,BachKaonGhostProbMax = config['TrGhostProbMax']
+                                                      )
+
+        # KS0 LL selection
+        self.selKS0LL = makeKS02PiPi(self.name + 'KS0LLForD2KS0H'
+                                    # Cuts
+                                    # KS0 daughter pion cuts
+                                   ,KS0DaugP = config['KS0DaugP']  
+                                   ,KS0DaugPT = config['KS0DaugPT']
+                                   ,KS0DaugTrackChi2 = config['KS0DaugTrackChi2'] 
+                                   ,KS0DaugMIPChi2 = config['KS0DaugMIPChi2']
+                                   ,KS0DaugPIDK = config['KS0DaugPIDK']
+                                   # KS0 mother cuts
+                                   ,KS0MassWindow = config['KS0MassWindow']   
+                                   ,KS0MIPChi2 = config['KS0MIPChi2']     
+                                   ,KS0VertexChi2 = config['KS0VertexChi2']  
+                                   ,KS0PT = config['KS0PT']
+                                   ,KS0BPVVDCHI2 = config['KS0BPVVDCHI2']
+                                   ,KsLL_BPVLTIME_MIN = config['KsLL_BPVLTIME_MIN']
+                                                   )
+
+        # KS0 DD selection
+        self.selKS0DD = makeKS02PiPiDD(self.name + 'KS0DDForD2KS0H'
+                                    # Cuts
+                                    # KS0 daughter pion cuts
+                                   ,KS0DaugP = config['KS0DaugP']  
+                                   ,KS0DaugPT = config['KS0DaugPT']
+                                   ,KS0DaugTrackChi2 = config['KS0DaugTrackChi2'] 
+                                   ,KS0DaugMIPChi2 = config['KS0DaugMIPChi2']
+                                   ,KS0DaugPIDK = config['KS0DaugPIDK']
+                                   # KS0 mother cuts
+                                   ,KS0MassWindow = config['KS0MassWindow']   
+                                   ,KS0MIPChi2DD = config['KS0MIPChi2DD']     
+                                   ,KS0VertexChi2 = config['KS0VertexChi2']  
+                                   ,KS0PT = config['KS0PT']
+                                   ,KS0BPVVDCHI2DD = config['KS0BPVVDCHI2DD']   
+                                   ,KsDD_VZ_MIN = config['KsDD_VZ_MIN']
+                                   ,KsDD_VZ_MAX = config['KsDD_VZ_MAX']
+                                                                  )
+
+       
+        # D(s)->KS0Pi selection
+        self.selD2KS0Pi = makeD2KS0Pi(pion_name
+                                     # Pass the KS0LL selection 
+                                     ,KS0LLSel = self.selKS0LL
+                                     # Pass the bachelor pions selection
+                                     ,BachPionsSel = self.selBachPions 
+                                     # D meson cuts
+                                     # Combo cuts
+                                     ,DMesonComboLowMass = config['DMesonComboLowMass']           
+                                     ,DMesonComboHighMass = config['DMesonComboHighMass']    
+                                     ,DMesonComboDOCA = config['DMesonComboDOCA']
+                                     ,DMesonAPT = config['DMesonAPT']
+                                     ,DMesonADOCAChi2 = config['DMesonADOCAChi2'] 
+                                     # Mother cuts
+                                     ,DMesonMotherLowMass = config['DMesonMotherLowMass']               
+                                     ,DMesonMotherHighMass = config['DMesonMotherHighMass']     
+                                     ,DMesonMotherVertexChi2 = config['DMesonMotherVertexChi2']   
+                                     ,DMesonMotherMIPChi2 = config['DMesonMotherMIPChi2']    
+                                     ,DMesonMotherPT = config['DMesonMotherPT']
+                                     ,KS0ZDiff = config['KS0ZDiff']
+                                     ,DMesonFlightDistChi2 = config['DMesonFlightDistChi2'] 
+                                     ,D_BPVLTIME_MIN = config['D_BPVLTIME_MIN']
+                                     ,UseTOS =  config['UseTOS'] 
+                                     ,TisTosSpecs =  config['TisTosSpecs_KS0Pi'] 
+                                     )   
+
+        # D(s)->KS0DDPi selection
+        self.selD2KS0PiDD = makeD2KS0PiDD(pion_nameDD
+                                          # Pass the KS0DD selection 
+                                          ,KS0DDSel = self.selKS0DD
+                                          # Pass the bachelor pions selection
+                                          ,BachPionsSel = self.selBachPions 
+                                          # D meson cuts
+                                          # Combo cuts
+                                          ,DMesonComboLowMass = config['DMesonComboLowMass']           
+                                          ,DMesonComboHighMass = config['DMesonComboHighMass']    
+                                          ,DMesonComboDOCA = config['DMesonComboDOCA']
+                                          ,DMesonAPT = config['DMesonAPT']
+                                          ,DMesonADOCAChi2 = config['DMesonADOCAChi2'] 
+                                          # Mother cuts
+                                          ,DMesonMotherLowMass = config['DMesonMotherLowMass']               
+                                          ,DMesonMotherHighMass = config['DMesonMotherHighMass']     
+                                          ,DMesonMotherVertexChi2 = config['DMesonMotherVertexChi2']   
+                                          ,DMesonMotherMIPChi2 = config['DMesonMotherMIPChi2']    
+                                          ,DMesonMotherPT = config['DMesonMotherPT']
+                                          ,KS0ZDiff = config['KS0ZDiff']
+                                          ,DMesonFlightDistChi2 = config['DMesonFlightDistChi2']      
+                                          ,D_BPVLTIME_MIN = config['D_BPVLTIME_MIN']
+                                          ,UseTOS =  config['UseTOS'] 
+                                          ,TisTosSpecs =  config['TisTosSpecs_KS0PiDD'] 
+                                          )  
+                                
+
+        # D(s)->KS0K selection
+        self.selD2KS0K = makeD2KS0K(kaon_name
+                                    # Pass the KS0LL selection 
+                                    ,KS0LLSel = self.selKS0LL
+                                    # Pass the bachelor kaons selection
+                                    ,BachKaonsSel = self.selBachKaons  
+                                    # D meson cuts
+                                    # Combo cuts
+                                    ,DMesonComboLowMass = config['DMesonComboLowMass']           
+                                    ,DMesonComboHighMass = config['DMesonComboHighMass']    
+                                    ,DMesonComboDOCA = config['DMesonComboDOCA']
+                                    ,DMesonAPT = config['DMesonAPT']
+                                    ,DMesonADOCAChi2 = config['DMesonADOCAChi2'] 
+                                    # Mother cuts
+                                    ,DMesonMotherLowMass = config['DMesonMotherLowMass']               
+                                    ,DMesonMotherHighMass = config['DMesonMotherHighMass']     
+                                    ,DMesonMotherVertexChi2 = config['DMesonMotherVertexChi2']   
+                                    ,DMesonMotherMIPChi2 = config['DMesonMotherMIPChi2']    
+                                    ,DMesonMotherPT = config['DMesonMotherPT']
+                                    ,KS0ZDiff = config['KS0ZDiff']
+                                    ,DMesonFlightDistChi2 = config['DMesonFlightDistChi2'] 
+                                    ,D_BPVLTIME_MIN = config['D_BPVLTIME_MIN']
+                                    ,UseTOS =  config['UseTOS'] 
+                                    ,TisTosSpecs =  config['TisTosSpecs_KS0K'] 
+                                    )
+
+        # D(s)->KS0DDK selection
+        self.selD2KS0KDD = makeD2KS0KDD(kaon_nameDD
+                                        # Pass the KS0LL selection 
+                                        ,KS0DDSel = self.selKS0DD
+                                        # Pass the bachelor kaons selection
+                                        ,BachKaonsSel = self.selBachKaons  
+                                        # D meson cuts
+                                        # Combo cuts
+                                        ,DMesonComboLowMass = config['DMesonComboLowMass']           
+                                        ,DMesonComboHighMass = config['DMesonComboHighMass']    
+                                        ,DMesonComboDOCA = config['DMesonComboDOCA']
+                                        ,DMesonAPT = config['DMesonAPT']
+                                        ,DMesonADOCAChi2 = config['DMesonADOCAChi2'] 
+                                        # Mother cuts
+                                        ,DMesonMotherLowMass = config['DMesonMotherLowMass']               
+                                        ,DMesonMotherHighMass = config['DMesonMotherHighMass']     
+                                        ,DMesonMotherVertexChi2 = config['DMesonMotherVertexChi2']   
+                                        ,DMesonMotherMIPChi2 = config['DMesonMotherMIPChi2']    
+                                        ,DMesonMotherPT = config['DMesonMotherPT']
+                                        ,KS0ZDiff = config['KS0ZDiff']
+                                        ,DMesonFlightDistChi2 = config['DMesonFlightDistChi2'] 
+                                        ,D_BPVLTIME_MIN = config['D_BPVLTIME_MIN']
+                                        ,UseTOS =  config['UseTOS'] 
+                                        ,TisTosSpecs =  config['TisTosSpecs_KS0KDD'] 
+                                        )
+        
+
+        # Define/declare the lines
+        self.pion_line = StrippingLine(pion_name+"Line",
+                                       prescale = config['PionLinePrescale'],
+                                       postscale = config['PionLinePostscale'],
+                                       selection = self.selD2KS0Pi
+                                       )
+        self.kaon_line = StrippingLine(kaon_name+"Line",
+                                       prescale = config['KaonLinePrescale'],
+                                       postscale = config['KaonLinePostscale'],
+                                       selection = self.selD2KS0K
+                                       )
+        self.pion_lineDD = StrippingLine(pion_name+"LineDD",
+                                       prescale = config['PionLinePrescaleDD'],
+                                       postscale = config['PionLinePostscaleDD'],
+                                       selection = self.selD2KS0PiDD
+                                       )
+        self.kaon_lineDD = StrippingLine(kaon_name+"LineDD",
+                                       prescale = config['KaonLinePrescaleDD'],
+                                       postscale = config['KaonLinePostscaleDD'],
+                                       selection = self.selD2KS0KDD
+                                       )
+
+        
+
+        # Register the lines
+        self.registerLine(self.pion_line)
+        self.registerLine(self.kaon_line)
+        self.registerLine(self.pion_lineDD)
+        self.registerLine(self.kaon_lineDD)
+
+# Define the bachelor pions filter sequence - arguments are cuts used
+
+def makeBachelorPions(name
+                      # Bachelor pion cuts
+                     ,BachPionP               
+                     ,BachPionPT         
+                     ,BachPionTrackChi2 
+                     ,BachPionMIPChi2   
+                     ,BachPionPIDK  
+                     ,BachPionGhostProbMax
+                     ) :
+        """
+        Create and return a Bachelor pion selection object.
+        Starts from DataOnDemand 'Phys/StdLoosePions'.
+        Arguments:
+        name             : name of the Selection.
+        All others       : cuts used in the selection - self-explanatory naming.
+        """
+     # Define the cuts to be used
+
+        _code = (" (PIDK < %(BachPionPIDK)s) & (P > %(BachPionP)s) & (PT > %(BachPionPT)s) &"\
+                 " (TRCHI2DOF < %(BachPionTrackChi2)s) & (MIPCHI2DV(PRIMARY) > %(BachPionMIPChi2)s) &"\
+                 " (TRGHOSTPROB < %(BachPionGhostProbMax)s) ") % locals()
+ 
+         # Define the pion filter
+        _BachPionsFilter = FilterDesktop(Code = _code)
+        _stdLoosePions = StdLoosePions
+
+        return Selection (name,
+                      Algorithm = _BachPionsFilter,
+                      RequiredSelections = [_stdLoosePions])
+
+# Define the bachelor pions filter sequence - arguments are cuts used
+
+def makeBachelorKaons(name
+                     # Bachelor pion cuts
+                     ,BachKaonP               
+                     ,BachKaonPT         
+                     ,BachKaonTrackChi2 
+                     ,BachKaonMIPChi2   
+                     ,BachKaonPIDK  
+                     ,BachKaonGhostProbMax
+                     ) :
+
+        """
+        Create and return a Bachelor kaon selection object.
+        Starts from DataOnDemand 'Phys/StdLooseKaons'.
+        Arguments:
+        name             : name of the Selection.
+        All others       : cuts used in the selection - self-explanatory naming.
+        """
+     # Define the cuts to be used
+
+        _code = (" (PIDK > %(BachKaonPIDK)s) & (P > %(BachKaonP)s) & (PT > %(BachKaonPT)s) &"\
+                 " (TRCHI2DOF < %(BachKaonTrackChi2)s) & (MIPCHI2DV(PRIMARY) > %(BachKaonMIPChi2)s) &"\
+                 " (TRGHOSTPROB < %(BachKaonGhostProbMax)s) ") % locals()
+
+## mds        _code = "(PIDK > %(BachKaonPIDK)s) & (P > %(BachKaonP)s) & (PT > %(BachKaonPT)s) & (TRCHI2DOF < %(BachKaonTrackChi2)s) & (MIPCHI2DV(PRIMARY) > %(BachKaonMIPChi2)s)" % locals()
+ 
+         # Define the pion filter
+        _BachKaonsFilter = FilterDesktop(Code = _code)
+        _stdLooseKaons = StdLooseKaons
+
+        return Selection (name,
+                      Algorithm = _BachKaonsFilter,
+                      RequiredSelections = [_stdLooseKaons])
+
+
+# Define the KS02PiPi selection sequence - arguments need to be the cuts that are used....
+
+def makeKS02PiPi(name,
+
+                 # Cuts
+                 # KS0 daughter pion cuts
+                 KS0DaugP     
+                ,KS0DaugPT
+                ,KS0DaugTrackChi2  
+                ,KS0DaugMIPChi2
+                ,KS0DaugPIDK
+                # KS0 mother cuts
+                ,KS0MassWindow    
+                ,KS0MIPChi2      
+                ,KS0VertexChi2   
+                ,KS0PT
+                ,KS0BPVVDCHI2
+                ,KsLL_BPVLTIME_MIN
+                 ) :
+        """
+        Create and return a KS0 -> PiPi selection object.
+        Starts from DataOnDemand 'Phys/StdLooseKS0LL'.
+        Arguments:
+        name             : name of the Selection.
+        All others       : cuts used in the selection - self-explanatory naming.
+        """
+
+        # Define the cuts to be used
+        _code = " (PT > %(KS0PT)s) & (VFASPF(VCHI2PDOF) < %(KS0VertexChi2)s) &"\
+                " CHILDCUT((TRCHI2DOF < %(KS0DaugTrackChi2)s),1) & CHILDCUT((TRCHI2DOF < %(KS0DaugTrackChi2)s),2) &"\
+                " CHILDCUT((MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s),1) & CHILDCUT((MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s),2) &"\
+                " (MIPCHI2DV(PRIMARY) > %(KS0MIPChi2)s) & (BPVVDCHI2> %(KS0BPVVDCHI2)s) &"\
+                "  (BPVLTIME() > %(KsLL_BPVLTIME_MIN)s) " % locals()
+
+
+
+##         # Vanya suggestion
+##        # _Preambulo = [
+##        #  goodChild =           " (TRCHI2DOF < %(KS0DaugTrackChi2)s)" % locals (), 
+##        #  goodChild = goodChild & "(PIDK < %(KS0DaugPIDK)s)" % locals (), 
+##        #  goodChild = goodChild & "(MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s)" % locals (), 
+##         #             ]
+        
+##         # Define the cuts to be used
+##      #   _code = """
+##      #  (PT > %(KS0PT)s) &
+##      #  (VFASPF(VCHI2/VDOF) < %(KS0VertexChi2)s) &
+##      #  CHILDCUT ( goodChild ,1) &
+##      #  CHILDCUT ( goodchild, 2) &
+##      #  (MIPCHI2DV(PRIMARY) > %(KS0MIPChi2)s)
+##      #  """ % locals() 
+
+
+        # Define the KS0 LL filter
+        _KS0LLFilter = FilterDesktop(Code = _code)
+        _stdKS0LL = DataOnDemand(Location = "Phys/StdLooseKsLL/Particles")
+
+        return Selection (name,
+                      Algorithm = _KS0LLFilter,
+                      RequiredSelections = [_stdKS0LL])
+
+def makeKS02PiPiDD(name,
+
+                 # Cuts
+                 # KS0 daughter pion cuts
+                 KS0DaugP     
+                ,KS0DaugPT
+                ,KS0DaugTrackChi2  
+                ,KS0DaugMIPChi2
+                ,KS0DaugPIDK
+                # KS0 mother cuts
+                ,KS0MassWindow    
+                ,KS0MIPChi2DD      
+                ,KS0VertexChi2   
+                ,KS0PT
+                ,KS0BPVVDCHI2DD
+                ,KsDD_VZ_MIN
+                ,KsDD_VZ_MAX
+                 ) :
+        """
+        Create and return a KS0 -> PiPi selection object.
+        Starts from DataOnDemand 'Phys/StdLooseKS0DD'.
+        Arguments:
+        name             : name of the Selection.
+        All others       : cuts used in the selection - self-explanatory naming.
+        """
+
+        # Define the cuts to be used
+        _code =(" (PT > %(KS0PT)s) & (VFASPF(VCHI2PDOF) < %(KS0VertexChi2)s) & CHILDCUT((TRCHI2DOF < %(KS0DaugTrackChi2)s),1) &"\
+                " CHILDCUT((TRCHI2DOF < %(KS0DaugTrackChi2)s),2) & CHILDCUT((MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s),1) &"\
+                " CHILDCUT((MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s),2) & (BPVVDCHI2> %(KS0BPVVDCHI2DD)s) & "\
+                " (in_range( %(KsDD_VZ_MIN)s, VFASPF(VZ), %(KsDD_VZ_MAX)s )) ") % locals()
+
+
+##         # Vanya suggestion
+##        # _Preambulo = [
+##        #  goodChild =           " (TRCHI2DOF < %(KS0DaugTrackChi2)s)" % locals (), 
+##        #  goodChild = goodChild & "(PIDK < %(KS0DaugPIDK)s)" % locals (), 
+##        #  goodChild = goodChild & "(MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s)" % locals (), 
+##         #             ]
+        
+##         # Define the cuts to be used
+##      #   _code = """
+##      #  (PT > %(KS0PT)s) &
+##      #  (VFASPF(VCHI2/VDOF) < %(KS0VertexChi2)s) &
+##      #  CHILDCUT ( goodChild ,1) &
+##      #  CHILDCUT ( goodchild, 2) &
+##      #  (MIPCHI2DV(PRIMARY) > %(KS0MIPChi2)s)
+##      #  """ % locals() 
+
+
+        # Define the KS0 LL filter
+        _KS0DDFilter = FilterDesktop(Code = _code)
+        _stdKS0DD = DataOnDemand(Location = "Phys/StdLooseKsDD/Particles")
+
+        return Selection (name,
+                      Algorithm = _KS0DDFilter,
+                      RequiredSelections = [_stdKS0DD])
+
+
+def makeD2KS0Pi(name,
+                # KS0 selection
+                KS0LLSel
+                # Bach pions selection
+               ,BachPionsSel   
+                # Cuts to be used                  
+                # D meson cuts
+                # Combo cuts
+               ,DMesonComboLowMass         
+               ,DMesonComboHighMass  
+               ,DMesonComboDOCA
+               ,DMesonAPT 
+               ,DMesonADOCAChi2
+               # Mother cuts
+               ,DMesonMotherLowMass             
+               ,DMesonMotherHighMass   
+               ,DMesonMotherVertexChi2 
+               ,DMesonMotherMIPChi2  
+               ,DMesonMotherPT
+               ,KS0ZDiff
+               ,DMesonFlightDistChi2 
+               ,D_BPVLTIME_MIN
+               ,UseTOS
+               ,TisTosSpecs
+                ) :
+        """
+        Create and return a D -> KS0 Pi Selection object.
+        Arguments:
+        name             : name of the Selection.
+        ks0llSel         : KS0LL -> pi+pi- Selection object.
+        All rest   : Cuts used - self-explanatory naming
+        """
+
+        # Define the combination and mother cuts
+
+        #_combCuts = "(APT > %(DMesonAPT)s) & (ACUTDOCACHI2(%(DMesonADOCAChi2)s,'')) & in_range(%(DMesonComboLowMass)s, AM, %(DMesonComboHighMass)s)" % locals()
+
+        _combCuts = "(APT > %(DMesonAPT)s) & (ACUTDOCACHI2(%(DMesonADOCAChi2)s,'')) & in_range(%(DMesonComboLowMass)s, AM, %(DMesonComboHighMass)s)" % locals()
+
+
+
+        _motherCuts = ("(PT > %(DMesonMotherPT)s) & (VFASPF(VCHI2PDOF) < %(DMesonMotherVertexChi2)s) &"\
+                      "  in_range(%(DMesonMotherLowMass)s, MM, %(DMesonMotherHighMass)s) &"\
+                      " ((CHILD( VFASPF(VZ) , 'KS0' == ID ) - VFASPF(VZ)) > %(KS0ZDiff)s)  &"\
+                      " (MIPCHI2DV(PRIMARY) < %(DMesonMotherMIPChi2)s) &"\
+                      " (BPVLTIME() > %(D_BPVLTIME_MIN)s) & (BPVVDCHI2 > %(DMesonFlightDistChi2)s)") % locals()
+
+
+    
+        # Define the combine particles
+        _Dmeson = CombineParticles( DecayDescriptor = "[D+ -> KS0 pi+]cc", CombinationCut = _combCuts, MotherCut = _motherCuts)
+
+        sel =  Selection ( name,
+                           Algorithm = _Dmeson,
+                           RequiredSelections = [KS0LLSel, BachPionsSel])
+        if not UseTOS:
+            return sel
+        else:
+            return Selection( name+"_TOS"
+                              , Algorithm = TisTosParticleTagger( name + "TOSTagger",TisTosSpecs = TisTosSpecs )
+                              , RequiredSelections = [ sel ]
+                              )
+def makeD2KS0PiDD(name,
+                  # KS0 selection
+                  KS0DDSel
+                  # Bach pions selection
+                  ,BachPionsSel   
+                  # Cuts to be used                  
+                  # D meson cuts
+                  # Combo cuts
+                  ,DMesonComboLowMass         
+                  ,DMesonComboHighMass  
+                  ,DMesonComboDOCA
+                  ,DMesonAPT 
+                  ,DMesonADOCAChi2
+                  # Mother cuts
+                  ,DMesonMotherLowMass             
+                  ,DMesonMotherHighMass   
+                  ,DMesonMotherVertexChi2 
+                  ,DMesonMotherMIPChi2  
+                  ,DMesonMotherPT
+                  ,KS0ZDiff
+                  ,DMesonFlightDistChi2
+                  ,D_BPVLTIME_MIN
+                  ,UseTOS
+                  ,TisTosSpecs
+                  ) :
+        """
+        Create and return a D -> KS0 Pi Selection object.
+        Arguments:
+        name             : name of the Selection.
+        ks0llSel         : KS0DD -> pi+pi- Selection object.
+        All rest   : Cuts used - self-explanatory naming
+        """
+
+        # Define the combination and mother cuts
+
+#        _combCuts = "(APT > %(DMesonAPT)s) & (ACUTDOCACHI2(%(DMesonADOCAChi2)s,'')) & in_range(%(DMesonComboLowMass)s, AM, %(DMesonComboHighMass)s)" % locals()
+        _combCuts = "(APT > %(DMesonAPT)s) & (ACUTDOCACHI2(%(DMesonADOCAChi2)s,'')) & in_range(%(DMesonComboLowMass)s, AM, %(DMesonComboHighMass)s)" % locals()
+
+
+
+        _motherCuts = ("(PT > %(DMesonMotherPT)s) & (VFASPF(VCHI2PDOF) < %(DMesonMotherVertexChi2)s) &"\
+                      "  in_range(%(DMesonMotherLowMass)s, MM, %(DMesonMotherHighMass)s) &"\
+                      " ((CHILD( VFASPF(VZ) , 'KS0' == ID ) - VFASPF(VZ)) > %(KS0ZDiff)s)  &"\
+                      " (MIPCHI2DV(PRIMARY) < %(DMesonMotherMIPChi2)s) &"\
+                      " (BPVLTIME() > %(D_BPVLTIME_MIN)s) & (BPVVDCHI2 > %(DMesonFlightDistChi2)s)") % locals()
+
+        # Define the combine particles
+        _Dmeson = CombineParticles( DecayDescriptor = "[D+ -> KS0 pi+]cc", CombinationCut = _combCuts, MotherCut = _motherCuts)
+
+        sel = Selection ( name,
+                          Algorithm = _Dmeson,
+                          RequiredSelections = [KS0DDSel, BachPionsSel])
+        if not UseTOS:
+            return sel
+        else:
+            return Selection( name+"_TOS"
+                              , Algorithm = TisTosParticleTagger( name + "TOSTagger",TisTosSpecs = TisTosSpecs )
+                              , RequiredSelections = [ sel ]
+                              )
+    
+def makeD2KS0K(name,
+               # KS0 selection
+               KS0LLSel
+               # Bach kaons selection
+               ,BachKaonsSel 
+               # Cuts to be used                  
+               # D meson cuts
+               # Combo cuts
+               ,DMesonComboLowMass         
+               ,DMesonComboHighMass  
+               ,DMesonComboDOCA
+               ,DMesonAPT 
+               ,DMesonADOCAChi2
+               # Mother cuts
+               ,DMesonMotherLowMass             
+               ,DMesonMotherHighMass   
+               ,DMesonMotherVertexChi2 
+               ,DMesonMotherMIPChi2  
+               ,DMesonMotherPT
+               ,KS0ZDiff
+               ,DMesonFlightDistChi2 
+               ,D_BPVLTIME_MIN
+               ,UseTOS
+               ,TisTosSpecs
+               ) :
+
+        """
+        Create and return a D(s) -> KS0 K Selection object.
+        Arguments:
+        name             : name of the Selection.
+        ks0llSel         : KS0LL -> pi+pi- Selection object.
+        All rest         : Cuts used - self-explanatory naming
+        """
+
+        # Define the combination, mother and daughter cuts
+#        _combCuts = "(APT > %(DMesonAPT)s) & (ACUTDOCACHI2(%(DMesonADOCAChi2)s,'')) & in_range(%(DMesonComboLowMass)s, AM, %(DMesonComboHighMass)s)" % locals()
+        _combCuts = "(APT > %(DMesonAPT)s) & (ACUTDOCACHI2(%(DMesonADOCAChi2)s,'')) & in_range(%(DMesonComboLowMass)s, AM, %(DMesonComboHighMass)s)" % locals()
+
+
+
+
+        _motherCuts = ("(PT > %(DMesonMotherPT)s) & (VFASPF(VCHI2PDOF) < %(DMesonMotherVertexChi2)s) &"\
+                      "  in_range(%(DMesonMotherLowMass)s, MM, %(DMesonMotherHighMass)s) &"\
+                      " ((CHILD( VFASPF(VZ) , 'KS0' == ID ) - VFASPF(VZ)) > %(KS0ZDiff)s)  &"\
+                      " (MIPCHI2DV(PRIMARY) < %(DMesonMotherMIPChi2)s) &"\
+                      " (BPVLTIME() > %(D_BPVLTIME_MIN)s) & (BPVVDCHI2 > %(DMesonFlightDistChi2)s)") % locals()
+
+
+        # Define the combine particles
+        _Dmeson = CombineParticles( DecayDescriptor = "[D+ -> KS0 K+]cc", CombinationCut = _combCuts, MotherCut = _motherCuts)
+
+        sel =  Selection ( name,
+                           Algorithm = _Dmeson,
+                           RequiredSelections = [KS0LLSel, BachKaonsSel])
+        if not UseTOS:
+            return sel
+        else:
+            return Selection( name+"_TOS"
+                              , Algorithm = TisTosParticleTagger( name + "TOSTagger",TisTosSpecs = TisTosSpecs )
+                              , RequiredSelections = [ sel ]
+                              )
+        
+
+def makeD2KS0KDD(name,
+                 # KS0 selection
+                 KS0DDSel
+                 # Bach kaons selection
+                 ,BachKaonsSel 
+                 # Cuts to be used                  
+                 # D meson cuts
+                 # Combo cuts
+                 ,DMesonComboLowMass         
+                 ,DMesonComboHighMass  
+                 ,DMesonComboDOCA
+                 ,DMesonAPT 
+                 ,DMesonADOCAChi2
+                 # Mother cuts
+                 ,DMesonMotherLowMass             
+                 ,DMesonMotherHighMass   
+                 ,DMesonMotherVertexChi2 
+                 ,DMesonMotherMIPChi2  
+                 ,DMesonMotherPT
+                 ,KS0ZDiff
+                 ,DMesonFlightDistChi2 
+                 ,D_BPVLTIME_MIN
+                 ,UseTOS
+                 ,TisTosSpecs
+                 ) :
+
+        """
+        Create and return a D(s) -> KS0 K Selection object.
+        Arguments:
+        name             : name of the Selection.
+        ks0llSel         : KS0DD -> pi+pi- Selection object.
+        All rest         : Cuts used - self-explanatory naming
+        """
+
+        # Define the combination, mother and daughter cuts
+#        _combCuts = "(APT > %(DMesonAPT)s) & (ACUTDOCACHI2(%(DMesonADOCAChi2)s,'')) & in_range(%(DMesonComboLowMass)s, AM, %(DMesonComboHighMass)s)" % locals()
+        _combCuts = "(APT > %(DMesonAPT)s) & (ACUTDOCACHI2(%(DMesonADOCAChi2)s,'')) & in_range(%(DMesonComboLowMass)s, AM, %(DMesonComboHighMass)s)" % locals()
+
+
+        _motherCuts = ("(PT > %(DMesonMotherPT)s) & (VFASPF(VCHI2PDOF) < %(DMesonMotherVertexChi2)s) &"\
+                      "  in_range(%(DMesonMotherLowMass)s, MM, %(DMesonMotherHighMass)s) &"\
+                      " ((CHILD( VFASPF(VZ) , 'KS0' == ID ) - VFASPF(VZ)) > %(KS0ZDiff)s)  &"\
+                      " (MIPCHI2DV(PRIMARY) < %(DMesonMotherMIPChi2)s) &"\
+                      " (BPVLTIME() > %(D_BPVLTIME_MIN)s) & (BPVVDCHI2 > %(DMesonFlightDistChi2)s)") % locals()
+
+
+        # Define the combine particles
+        _Dmeson = CombineParticles( DecayDescriptor = "[D+ -> KS0 K+]cc", CombinationCut = _combCuts, MotherCut = _motherCuts)
+
+        sel =  Selection ( name,
+                           Algorithm = _Dmeson,
+                           RequiredSelections = [KS0DDSel, BachKaonsSel])
+        
+        if not UseTOS:
+            return sel
+        else:
+            return Selection( name+"_TOS"
+                              , Algorithm = TisTosParticleTagger( name + "TOSTagger",TisTosSpecs = TisTosSpecs )
+                              , RequiredSelections = [ sel ]
+                              )
+        
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2PhiPiForXSec.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2PhiPiForXSec.py
new file mode 100644
index 000000000..f928139dc
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2PhiPiForXSec.py
@@ -0,0 +1,429 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of
+    [D+ -> pi+ (phi(1020) -> K- K+)]cc
+    [D_s+ -> pi+ (phi(1020) -> K- K+)]cc
+    [D*_s+ -> (D_s+ -> pi+ (phi(1020) -> K- K+)) gamma]cc
+for open charm cross section measurement.
+The pi+phi(1020) mass window is wide enough to select D+ and D_s+.
+The two-body [phi(1020) pi+]cc combination is made with a mass window wide
+enough to select D+ and D_s+, and then this selection is filtered in to a D+
+selection around the nominal D+ mass and a D_s+ selection around the nominal
+D_s+ mass.
+"""
+
+__author__ = ['Alex Pearce']
+
+__all__ = (
+    'default_config',
+    'StrippingD2PhiPiForXSecConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mrad
+from Configurables import CombineParticles, FilterDesktop, SubstitutePID
+from StandardParticles import (
+    StdAllNoPIDsKaons,
+    StdAllNoPIDsPions,
+    StdLooseAllPhotons
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+from MVADictHelpers import addTMVAclassifierValue
+
+default_config = {
+    'NAME': 'D2PhiPiForXSec',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingD2PhiPiForXSecConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum transverse momentum all D_s+ and phi daughters must satisfy
+        'Daug_All_PT_MIN': 200.0*MeV,
+        # Minimum best primary vertex IP chi^2 all D_s+ and phi daughters must
+        # satisfy
+        'Daug_All_BPVIPCHI2_MIN': 4.0,
+        # Minimum phi daughter momentum
+        'Daug_P_MIN': 3.0*GeV,
+        # Maximum phi daughter momentum
+        'Daug_P_MAX': 100.0*GeV,
+        # Minimum phi daughter pseudorapidity
+        'Daug_ETA_MIN': 2.0,
+        # Maximum phi daughter pseudorapidity
+        'Daug_ETA_MAX': 5.0,
+        # Minimum phi daughter kaon DLLK
+        'K_PIDK_MIN': 5.0,
+        # Maximum D_s+ daughter pion DLLK
+        'Pi_PIDK_MAX': 3.0,
+        # Phi mass window around the nominal phi mass before the vertex fit
+        'Comb_Phi_ADAMASS_WIN': 20*MeV,
+        # D+ mass window around the nominal D+ mass after the vertex fit
+        # Lower bound of this, -10 MeV, is used before the hhh combination
+        # vertex fit
+        'Dp_ADAMASS_WIN': 80.0*MeV,
+        # D_s+ mass window around the nominal D+ mass after the vertex fit
+        # Upper bound of this, +10 MeV, is used before the hhh combination
+        # vertex fit
+        'Ds_ADAMASS_WIN': 80.0*MeV,
+        # Maximum D+ vertex chi^2 per vertex fit DoF
+        'D_VCHI2VDOF_MAX': 25.0,
+        # Maximum angle between D+ momentum and D+ direction of flight
+        'D_acosBPVDIRA_MAX': 35.0*mrad,
+        # Primary vertex displacement requirement, either that the D+ is some
+        # sigma away from the PV, or it has a minimum flight time
+        'D_PVDispCut': '((BPVVDCHI2 > 16.0)|(BPVLTIME() > 0.150*picosecond))',
+        # Minimum photon confidence level
+        'Photon_CL_MIN': 0.25,
+        # Maximum delta mass value m(D*_s+) - m(D_s+) (PDG dm: 143 MeV)
+        'Dsstar_AMDiff_MAX': 170*MeV,
+        # Minimum D+ and D_s+ MVA discriminant value
+        'Dp_MVA_MIN': -0.3,
+        'Ds_MVA_MIN': -0.3,
+        # Path to the D+ and D_s+ MVA weights files
+        # BDT is not applied if this is the empty string or None
+        'Dp_MVA_Weights': '$TMVAWEIGHTSROOT/data/D2PhiPiForXSec_BDT_v1r0.xml',
+        'Ds_MVA_Weights': '$TMVAWEIGHTSROOT/data/D2PhiPiForXSec_BDT_v1r0.xml',
+        # Dictionary of LoKi functors defining the D+ MVA input variables
+        # The keys must match those used when training the MVA
+        # Same input variables are used for both D+ and D_s+
+        'D_MVA_Variables': {
+            # Largest D+ and phi daughter PT
+            'ROOTex::Leading(phi_h1_PT,phi_h2_PT,Ds_pi_PT)': (
+                "MAXTREE(ISBASIC & HASTRACK, PT)"
+            ),
+            # Smallest D+ and phi daughter PT
+            'ROOTex::ThirdLeading(phi_h1_PT,phi_h2_PT,Ds_pi_PT)': (
+                "MINTREE(ISBASIC & HASTRACK, PT)"
+            ),
+            'Ds_DIRA_OWNPV': 'BPVDIRA',
+            'Ds_Loki_LV02': 'LV02',
+            'TMath::Log10(TMath::Abs(Ds_Loki_BPVLTIME))': (
+                "log10(abs(BPVLTIME()))"
+            ),
+            'TMath::Log10(TMath::Abs(Ds_Loki_BPVVDCHI2))': (
+                'log10(abs(BPVVDCHI2))'
+            ),
+            'TMath::Log10(Ds_ENDVERTEX_CHI2/Ds_ENDVERTEX_NDOF)': (
+                'log10(VFASPF(VCHI2/VDOF))'
+            )
+        },
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleDp2PhiPi': 0.0,
+        'PrescaleDs2PhiPi': 0.0,
+        'PrescaleDsstar2DsGamma': 0.0,
+        # Fraction of candidates to randomly throw after before stripping
+        'PostscaleDp2PhiPi': 1.0,
+        'PostscaleDs2PhiPi': 1.0,
+        'PostscaleDsstar2DsGamma': 1.0
+    }
+}
+
+
+class StrippingD2PhiPiForXSecConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    Phi2KK = ['phi(1020) -> K+ K-']
+    D2PhiPi = ['[D_s+ -> pi+ phi(1020)]cc']
+    Dsstar2DsGamma = ['[D*_s+ -> D_s+ gamma]cc']
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        phi2KK_name = '{0}Phi2KK'.format(name)
+        d2PhiPi_name = '{0}D2PhiPi'.format(name)
+        dp2PhiPi_name = '{0}Dp2PhiPi'.format(name)
+        ds2PhiPi_name = '{0}Ds2PhiPi'.format(name)
+        dsstar2DsGamma_name = '{0}Dsstar2DsGamma'.format(name)
+
+        self.inPions = StdAllNoPIDsPions
+        self.inKaons = StdAllNoPIDsKaons
+        self.inPhotons = StdLooseAllPhotons
+
+        self.selPhi2KK = self.makePhi2KK(
+            name=phi2KK_name,
+            inputSel=[self.inKaons],
+            decDescriptors=self.Phi2KK
+        )
+
+        self.selD2PhiPi = self.makeD2PhiPi(
+            name=d2PhiPi_name,
+            inputSel=[self.selPhi2KK, self.inPions],
+            decDescriptors=self.D2PhiPi
+        )
+        self.selDp2PhiPi, self.selDs2PhiPi = self.splitPhiPi(
+            d2PhiPi_name,
+            self.selD2PhiPi
+        )
+        self.selDp2PhiPiMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(dp2PhiPi_name),
+            self.selDp2PhiPi,
+            self.config['Dp_MVA_Weights'],
+            self.config['Dp_MVA_MIN']
+        )
+        self.selDs2PhiPiMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(ds2PhiPi_name),
+            self.selDs2PhiPi,
+            self.config['Ds_MVA_Weights'],
+            self.config['Ds_MVA_MIN']
+        )
+
+        self.selDsstar2Dsgamma = self.makeDsstar2DsGamma(
+            name=dsstar2DsGamma_name,
+            inputSel=[self.selDs2PhiPiMVA, self.inPhotons],
+            decDescriptors=self.Dsstar2DsGamma
+        )
+
+        self.line_Dp2PhiPi = self.make_line(
+            name=dp2PhiPi_name + 'Line',
+            selection=self.selDp2PhiPiMVA,
+            prescale=config['PrescaleDp2PhiPi'],
+            postscale=config['PostscaleDp2PhiPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Ds2PhiPi = self.make_line(
+            name=ds2PhiPi_name + 'Line',
+            selection=self.selDs2PhiPiMVA,
+            prescale=config['PrescaleDs2PhiPi'],
+            postscale=config['PostscaleDs2PhiPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Dsstar2DsGamma = self.make_line(
+            name=dsstar2DsGamma_name + 'Line',
+            selection=self.selDsstar2Dsgamma,
+            prescale=config['PrescaleDsstar2DsGamma'],
+            postscale=config['PostscaleDsstar2DsGamma'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makePhi2KK(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a phi(1020) -> K- K+ decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        daugCuts = (
+            '(PT > {0[Daug_All_PT_MIN]})'
+            '& (BPVIPCHI2() > {0[Daug_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+
+        pidFiducialCuts = (
+            '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+            '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+        ).format(self.config)
+
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi > {0[K_PIDK_MIN]})'
+        ).format(self.config)
+
+        combCuts = "(ADAMASS('phi(1020)') < {0[Comb_Phi_ADAMASS_WIN]})".format(
+            self.config
+        )
+
+        phiCuts = 'ALL'
+
+        _phi = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts={
+                'K+': '{0} & {1}'.format(daugCuts, kaonPIDCuts)
+            },
+            CombinationCut=combCuts,
+            MotherCut=phiCuts
+        )
+
+        return Selection(name, Algorithm=_phi, RequiredSelections=inputSel)
+
+    def makeD2PhiPi(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D_(s)+ -> pi+ phi(1020) decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        daugCuts = (
+            '(PT > {0[Daug_All_PT_MIN]})'
+            '& (BPVIPCHI2() > {0[Daug_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+
+        pidFiducialCuts = (
+            '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+            '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+        ).format(self.config)
+
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi < {0[Pi_PIDK_MAX]})'
+        ).format(self.config)
+
+        # Be within either the D+ or D_s+ mass window
+        combCuts = (
+            '('
+            "(ADAMASS('D+') < ({0[Dp_ADAMASS_WIN]} + 10))"
+            "| (ADAMASS('D_s+') < ({0[Ds_ADAMASS_WIN]} + 10))"
+            ')'
+        ).format(self.config)
+
+        dCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[D_VCHI2VDOF_MAX]})'
+            '& ({0[D_PVDispCut]})'
+            '& (BPVDIRA > cos({0[D_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+
+        _dplus = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            DaughtersCuts={
+                'pi+': '{0} & {1}'.format(daugCuts, pionPIDCuts)
+            },
+            CombinationCut=combCuts,
+            MotherCut=dCuts,
+        )
+
+        return Selection(name, Algorithm=_dplus, RequiredSelections=inputSel)
+
+    def makeDsstar2DsGamma(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D*_s+ -> D_s+ gamma decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        photonCuts = '(CL > {0[Photon_CL_MIN]})'.format(self.config)
+
+        combCuts = '((AM - AM1) < {0[Dsstar_AMDiff_MAX]})'.format(self.config)
+
+        dsstarCuts = '(ALL)'.format(self.config)
+
+        _dsstar = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts={
+                'gamma': photonCuts
+            },
+            CombinationCut=combCuts,
+            MotherCut=dsstarCuts,
+        )
+
+        return Selection(name, Algorithm=_dsstar, RequiredSelections=inputSel)
+
+    def splitPhiPi(self, name, phiPiSelection):
+        """Split the input phi pi+ Selection in to a D+ and D_s+ selection.
+
+        Returns a two-tuple as (D+ Selection, D_s+ Selection).
+        Keyword arguments:
+        phiPiSelection -- A single Selection instance; output of makeD2PhiPi
+        """
+        dpFilter = FilterDesktop(
+            'FilterDp{0}'.format(name),
+            Code="(ADMASS('D+') < {0[Dp_ADAMASS_WIN]})".format(self.config)
+        )
+        dsFilter = FilterDesktop(
+            'FilterDs{0}'.format(name),
+            Code="(ADMASS('D_s+') < {0[Ds_ADAMASS_WIN]})".format(self.config)
+        )
+
+        dpSel = Selection(
+            'SelFilteredDp{0}'.format(name),
+            Algorithm=dpFilter,
+            RequiredSelections=[phiPiSelection]
+        )
+        dsSel = Selection(
+            'SelFilteredDs{0}'.format(name),
+            Algorithm=dsFilter,
+            RequiredSelections=[phiPiSelection]
+        )
+
+        # The PhiPi selection is labelled as a D_s+, so rename the candidates
+        # in the Dp selection as such
+        dpSubPID = SubstitutePID(
+            name='SubPidDp{0}'.format(name),
+            Code="DECTREE('[D_s+ -> X0 X+]CC')",
+            Substitutions={
+                'D_s+ -> X0 X+': 'D+',
+                'D_s- -> X0 X-': 'D-'
+
+            },
+            MaxChi2PerDoF=-1
+        )
+        dpSubPIDSel = Selection(
+            'SubPIDDpSel{0}'.format(name),
+            Algorithm=dpSubPID,
+            RequiredSelections=[dpSel]
+        )
+
+        return dpSubPIDSel, dsSel
+
+    def makeMVASelection(self, name, inputSel, weights_file, cut_value):
+        # Don't apply a BDT if the weights file has not been specified
+        if not weights_file:
+            return inputSel
+
+        cut = "VALUE('LoKi::Hybrid::DictValue/{0}') > {1}".format(
+            name, cut_value
+        )
+        mva = FilterDesktop('{0}Filter'.format(name), Code=cut)
+
+        addTMVAclassifierValue(
+            Component=mva,
+            XMLFile=weights_file,
+            Variables=self.config['D_MVA_Variables'],
+            ToolName=name
+        )
+
+        return Selection(name, Algorithm=mva, RequiredSelections=[inputSel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2PiPi0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2PiPi0.py
new file mode 100644
index 000000000..c3afa350b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2PiPi0.py
@@ -0,0 +1,1306 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+StrippingD2Pi0HConf      : D+ -> h+ (pi0 -> e+ e- gamma) prompt and
+                           D*+ -> (D0 -> pi0 pi0) pi+, with pi0 -> e+ e- gamma
+StrippingD2EtaHConf      : D+ -> h+ (eta -> pi+ pi- gamma, pi+ pi- pi0) prompt
+StrippingD2EtaPrimeHConf : D+ -> h+ (eta_prime -> pi+ pi- gamma, pi+ pi- eta) prompt
+StrippingD2PhiHConf      : D+ -> h+ (phi/omega -> pi+ pi- pi0) prompt
+StrippingD2EtaEEGHConf   : D+ -> h+ (eta -> e+ e- gamma) prompt
+StrippingDst2PiD0EEGConf : D*+ -> (D0 -> e+ e- gamma) pi+ and D*+ -> (D0 -> e+ e-) pi+
+'''
+                                                               
+__author__ = ['Simone Stracka simone.stracka@unipi.it']
+__date__ = '26/10/2015'
+__version__ = '$Revision$'
+
+__all__ = (
+    'default_config',
+    'StrippingD2Pi0HConf',
+    'StrippingD2EtaEEGHConf',
+    'StrippingDst2PiD0EEGConf',
+    'StrippingD2EtaHConf',
+    'StrippingD2EtaPrimeHConf',
+    'StrippingD2PhiHConf',
+    
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mrad, picosecond
+
+from StandardParticles import (
+    StdAllNoPIDsKaons,
+    StdAllNoPIDsPions,
+    StdLooseMergedPi0,
+    StdLooseResolvedPi0,
+    StdLooseResolvedEta,
+    StdLooseAllPhotons,
+    StdAllLooseElectrons,
+    StdDiElectronFromTracks
+)
+
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+#from Configurables import CombineParticles, FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, ConjugateNeutralPID, DaVinci__N3BodyDecays
+
+default_config = {
+    'D2Pi0H' : {
+          'WGs': ['Charm'],
+          'BUILDERTYPE': 'StrippingD2Pi0HConf',
+          'STREAMS': ['Charm'],
+          'CONFIG': {
+                # Minimum best primary vertex IP chi^2 for charged D daughters
+                'Bachelor_IPCHI2_MIN'      : 25.0,        
+                # Minimum PT for charged D daughters 
+                'Bachelor_PT_MIN'          : 350  *MeV,   
+                # Minimum momentum for charged D daughters 
+                'Bachelor_P_MIN'           : 1000 *MeV,
+                # Bachelor particle PID requirement 
+                'Bachelor_PIDK_MIN'        : -10.0, # not used if < -10
+                # Minimum best primary vertex IP chi^2 for charged D daughters
+                'Daug_IPCHI2_MIN'      : 25.0,     
+                # Minimum PT for charged D daughters 
+                'Daug_PT_MIN'          : 350  *MeV,   # 600 --> 300
+                # Minimum momentum for charged D daughters 
+                'Daug_P_MIN'           : 1000 *MeV,
+                # Maximum momentum for charged D daughters 
+                'Daug_P_MAX'           : 100000 *MeV,
+                # Minimum pseudorapidity for charged D daughters 
+                'Daug_ETA_MIN'         : 2.0,
+                # Maximum pseudorapidity for charged D daughters 
+                'Daug_ETA_MAX'         : 5.0,
+                # Track quality requirement for charged D daughters
+                'Daug_TRCHI2DOF_MAX'   : 5,    
+                # Maximum ghost probability for charged D daughters
+                'Daug_TRGHOSTPROB_MAX' : 0.5,
+                # Minimum PT for intermediate resonance neutral daughters
+                'Neut_PT_MIN'        : 350  *MeV,
+                # Maximum mass for dielectron                
+                'DiElectron_Mass_MAX'       : 210  *MeV,
+                # Minimum PT for dielectron                
+                'DiElectron_PT_MIN'       : 350  *MeV, 
+                # Minimum mass for intermediate resonance
+                'Res_Mass_MIN'       : 70   *MeV, 
+                # Maximum mass for intermediate resonance
+                'Res_Mass_MAX'       : 210  *MeV, 
+                # Minimum D PT
+                'D_PT_Min'           : 3000 *MeV, 
+                # Minimum D mass
+                'D_Mass_MIN'          : 1600 *MeV,
+                # Maximum D mass
+                'D_Mass_MAX'          : 2200 *MeV,
+                # Maximum chi^2 on D end vertex
+                'D_VCHI2PDOF_MAX'         : 5,
+                # minimum flight time                
+                'D_BPVLTIME_MIN'       : 0.15*picosecond,
+                # max chi^2 per DOF of DTF fit
+                'DTF_CHI2NDOF_MAX'   : 100, # added 
+                # Track quality requirement for soft pion from Dstar
+                'Soft_TRCHI2DOF_MAX'   : 5,
+                # Maximum Dstar-D0 mass difference
+                'Dstar_AMDiff_MAX': 165. * MeV,
+                'Dstar_MDiff_MAX': 160. * MeV,                
+                # Maximum chi^2 on Dstar vertex
+                'Dstar_VCHI2VDOF_MAX': 100.,
+                # HLT filters, only process events firing triggers matching the RegEx
+                'Hlt1Filter'      : None,
+                'Hlt2Filter'      : "(HLT_PASS_RE('Hlt2CharmHadD.*EmEp.*Decision') | HLT_PASS_RE('Hlt2Topo.*Decision'))",
+                # prescale and postscale
+                'PrescaleD2PiPi0EEG'  : 1,
+                'PrescaleD2KPi0EEG'   : 1,
+                'PrescaleDst2D0PiEEG' : 1,
+                'PostscaleD2PiPi0EEG' : 1,
+                'PostscaleD2KPi0EEG'  : 1,
+                'PostscaleDst2D0PiEEG': 1
+                }
+          },
+    'D2EtaEEGH' : {
+          'WGs': ['Charm'],
+          'BUILDERTYPE': 'StrippingD2EtaEEGHConf',
+          'STREAMS': ['Charm'],
+          'CONFIG': {
+                # Minimum best primary vertex IP chi^2 for charged D daughters
+                'Bachelor_IPCHI2_MIN'      : 25.0,        
+                # Minimum PT for charged D daughters 
+                'Bachelor_PT_MIN'          : 1000  *MeV,   
+                # Minimum momentum for charged D daughters 
+                'Bachelor_P_MIN'           : 1000 *MeV,
+                # Bachelor particle PID requirement 
+                'Bachelor_PIDK_MIN'        : -10.0, # not used if < -10
+                # Minimum best primary vertex IP chi^2 for charged D daughters
+                'Daug_IPCHI2_MIN'      : 25.0,     
+                # Minimum PT for charged D daughters 
+                'Daug_PT_MIN'          : 350  *MeV,   # 600 --> 300
+                # Minimum momentum for charged D daughters 
+                'Daug_P_MIN'           : 1000 *MeV,
+                # Maximum momentum for charged D daughters 
+                'Daug_P_MAX'           : 100000 *MeV,
+                # Minimum pseudorapidity for charged D daughters 
+                'Daug_ETA_MIN'         : 2.0,
+                # Maximum pseudorapidity for charged D daughters 
+                'Daug_ETA_MAX'         : 5.0,
+                # Track quality requirement for charged D daughters
+                'Daug_TRCHI2DOF_MAX'   : 5,    
+                # Maximum ghost probability for charged D daughters
+                'Daug_TRGHOSTPROB_MAX' : 0.5,
+                # Minimum PT for intermediate resonance neutral daughters
+                'Neut_PT_MIN'          : 600  *MeV,
+                # Maximum mass for dielectron                
+                'DiElectron_Mass_MAX'       : 650  *MeV,
+                # Minimum PT for dielectron                
+                'DiElectron_PT_MIN'       : 350  *MeV, 
+                # Minimum mass for intermediate resonance
+                'Res_Mass_MIN'       : 450  *MeV, 
+                # Maximum mass for intermediate resonance
+                'Res_Mass_MAX'       : 650  *MeV, 
+                # Minimum D PT
+                'D_PT_Min'           : 3000 *MeV, 
+                # Minimum D mass
+                'D_Mass_MIN'          : 1600 *MeV,
+                # Maximum D mass
+                'D_Mass_MAX'          : 2200 *MeV,
+                # Maximum chi^2 on D end vertex
+                'D_VCHI2PDOF_MAX'         : 5,
+                # minimum flight time                
+                'D_BPVLTIME_MIN'       : 0.25*picosecond,
+                # max chi^2 per DOF of DTF fit
+                'DTF_CHI2NDOF_MAX'   : 100, #added 
+                # HLT filters, only process events firing triggers matching the RegEx
+                'Hlt1Filter'         : None,
+                'Hlt2Filter'      : "HLT_PASS_RE('Hlt2CharmHadDp2Eta.*_Eta2EmEpG.*Decision')",
+                # prescale and postscale
+                'PrescaleD2PiEtaEEG' : 1,
+                'PrescaleD2KEtaEEG'  : 1,
+                'PostscaleD2PiEtaEEG': 1,
+                'PostscaleD2KEtaEEG' : 1,
+                }
+          },
+    'Dst2PiD0EEG' : {
+          'WGs': ['Charm'],
+          'BUILDERTYPE': 'StrippingDst2PiD0EEGConf',
+          'STREAMS': ['Charm'],
+          'CONFIG': {
+                # Minimum PT for gamma in D0-> e+ e- gamma
+                'Neut_PT_MIN'        : 600  *MeV, # 350
+                # Maximum mass for dielectron in D0-> e+ e- gamma                
+                'DiElectron_Mass_MAX'       : 1914  *MeV,
+                # Minimum PT for dielectron in D0-> e+ e- gamma              
+                'DiElectron_PT_MIN'       : 2600  *MeV, 
+                # Minimum mass for intermediate resonance
+                'Res_Mass_MIN'       : 1814   *MeV, 
+                # Maximum mass for intermediate resonance
+                'Res_Mass_MAX'       : 1914  *MeV, 
+                # Track quality requirement for soft pion from Dstar
+                'Soft_TRCHI2DOF_MAX'   : 3,
+                # Maximum Dstar-D0 mass difference
+                'Dstar_AMDiff_MAX': 165. * MeV,
+                'Dstar_MDiff_MAX': 160. * MeV,                
+                # Maximum chi^2 on Dstar vertex
+                'Dstar_VCHI2VDOF_MAX': 9.,
+                # Minimum P for electrons in D0-> e+ e-
+                'Electron_P_MIN'       : 1000  *MeV,
+                # Minimum PT for electrons in D0-> e+ e-                
+                'Electron_PT_MIN'       : 350  *MeV,
+                # Track quality requirement for electrons in in D0-> e+ e-
+                'Electron_TRCHI2DOF_MAX'   : 6,    
+                # Maximum ghost probability for electrons in in D0-> e+ e-
+                'Electron_TRGHOSTPROB_MAX' : 0.5,
+                # Minimum best primary vertex IP chi^2 for electrons in in D0-> e+ e-
+                'Electron_IPCHI2_MIN'      : 16.0,   
+                # HLT filters, only process events firing triggers matching the RegEx
+                'Hlt1Filter'         : None,
+                'Hlt2Filter'      : "HLT_PASS_RE('Hlt2CharmHadDstp2.*EmEp.*Decision')", # removed Topo
+                 # prescale and postscale
+                'PrescaleDst2PiD0EEG'  : 1,
+                'PostscaleDst2PiD0EEG' : 1,
+                'PrescaleDst2PiD0EE'   : 1,
+                'PostscaleDst2PiD0EE'  : 1                
+                }
+          },
+    'D2EtaH' : {
+          'WGs': ['Charm'],
+          'BUILDERTYPE': 'StrippingD2EtaHConf',
+          'STREAMS': ['Charm'],
+          'CONFIG': {
+                # Minimum best primary vertex IP chi^2 for charged D daughters
+                'Bachelor_IPCHI2_MIN'      : 16.0,        # 25 --> 16
+                # Minimum PT for charged D daughters
+                'Bachelor_PT_MIN'          : 600  *MeV,   # 600
+                # Minimum momentum for charged D daughters
+                'Bachelor_P_MIN'           : 1000 *MeV,
+                # Bachelor particle PID requirement 
+                'Bachelor_PIDK_MIN'        : -999.0, # not used
+                # Minimum best primary vertex IP chi^2 for charged D daughters
+                'Daug_IPCHI2_MIN'      : 16.0,        # 25 --> 4
+                # Minimum PT for charged D daughters
+                'Daug_PT_MIN'          : 500  *MeV,   # 600 --> 300
+                # Minimum momentum for charged D daughters
+                'Daug_P_MIN'           : 1000 *MeV,
+                # Maximum momentum for charged D daughters
+                'Daug_P_MAX'           : 100000 *MeV,
+                # Minimum pseudorapidity for charged D daughters
+                'Daug_ETA_MIN'         : 2.0,
+                # Maximum pseudorapidity for charged D daughters
+                'Daug_ETA_MAX'         : 5.0,
+                # Track quality requirement for charged D daughters
+                'Daug_TRCHI2DOF_MAX'   : 5,
+                # Maximum ghost probability for charged D daughters
+                'Daug_TRGHOSTPROB_MAX' : 0.5,
+                # Maximum DLLK of intermediate resonance daughter (pion)
+                'Pi_PIDK_MAX'        : 0.0,
+                # Minimum PT for intermediate resonance neutral daughters
+                'Neut_PT_MIN'        : 600  *MeV,
+                # Mass window for intermediate resonance neutral daughters (pi0, eta)
+                'Neut_Mass_Win'      :  50  *MeV,
+                # Minimum dipion mass
+                'Dipion_Mass_MIN'    : 200 *MeV,
+                # Maximum dipion mass
+                'Dipion_Mass_MAX'    : 750 *MeV,
+                # Maximum DOCA chi2 for dipion combination
+                'Dipion_DOCACHI2_MAX': 15,
+                # Minimum mass for intermediate resonance
+                'Res_Mass_MIN'       : 350   *MeV,  # 500 --> 400
+                # Maximum mass for intermediate resonance
+                'Res_Mass_MAX'       : 750  *MeV,   # 600 --> 700
+                # Minimum D PT
+                'D_PT_Min'           : 2000 *MeV,   # 
+                # Minimum D mass
+                'D_Mass_MIN'          : 1600 *MeV,
+                # Maximum D mass
+                'D_Mass_MAX'          : 2200 *MeV,
+                # Maximum chi^2 on D end vertex
+                'D_VCHI2PDOF_MAX'         : 5,
+                # minimum flight time
+                'D_BPVLTIME_MIN'       : 0.25*picosecond,
+                # max chi^2 per DOF of DTF fit
+                'DTF_CHI2NDOF_MAX'   : 5,    # added
+                # HLT filters, only process events firing triggers matching the RegEx
+                'Hlt1Filter'         : None,
+                'Hlt2Filter'      : "HLT_PASS_RE('Hlt2CharmHadDp2Eta.*Decision') | HLT_PASS_RE('Hlt2Topo.*Decision')", # removed Topo
+                # prescale and postscale
+                'PrescaleD2PiEtaPPG' : 1,
+                'PrescaleD2PiEta3HM' : 1,
+                'PrescaleD2PiEta3HR' : 1,
+                'PrescaleD2KEtaPPG'  : 1,
+                'PrescaleD2KEta3HM'  : 1,
+                'PrescaleD2KEta3HR'  : 1,
+                'PostscaleD2PiEtaPPG': 1,
+                'PostscaleD2PiEta3HM': 1,
+                'PostscaleD2PiEta3HR': 1,
+                'PostscaleD2KEtaPPG' : 1,
+                'PostscaleD2KEta3HM' : 1,
+                'PostscaleD2KEta3HR' : 1
+                }
+          },
+    'D2EtaPrimeH' : {
+          'WGs': ['Charm'],
+          'BUILDERTYPE': 'StrippingD2EtaPrimeHConf',
+          'STREAMS': ['Charm'],
+          'CONFIG': {
+                # Minimum best primary vertex IP chi^2 for charged D daughters
+                'Bachelor_IPCHI2_MIN'      : 25.0,        # 25 
+                # Minimum PT for charged D daughters
+                'Bachelor_PT_MIN'          : 600  *MeV,   # 600
+                # Minimum momentum for charged D daughters
+                'Bachelor_P_MIN'           : 1000 *MeV,
+                # Bachelor particle PID requirement 
+                'Bachelor_PIDK_MIN'        : -999.0, # not used 
+                # Minimum best primary vertex IP chi^2 for charged D daughters
+                'Daug_IPCHI2_MIN'      : 25.0,        # 25 --> 16
+                # Minimum PT for charged D daughters
+                'Daug_PT_MIN'          : 500  *MeV,   # 600 --> 500
+                # Minimum momentum for charged D daughters
+                'Daug_P_MIN'           : 1000 *MeV,
+                # Maximum momentum for charged D daughters
+                'Daug_P_MAX'           : 100000 *MeV,
+                # Minimum pseudorapidity for charged D daughters
+                'Daug_ETA_MIN'         : 2.0,
+                # Maximum pseudorapidity for charged D daughters
+                'Daug_ETA_MAX'         : 5.0,
+                # Track quality requirement for charged D daughters
+                'Daug_TRCHI2DOF_MAX'   : 5,
+                # Maximum ghost probability for charged D daughters
+                'Daug_TRGHOSTPROB_MAX' : 0.5,
+                # Maximum DLLK of intermediate resonance daughter (pion)
+                'Pi_PIDK_MAX'        : 0,
+                # Minimum PT for intermediate resonance neutral daughters
+                'Neut_PT_MIN'        : 1000  *MeV,
+                # Mass window for intermediate resonance neutral daughters (pi0, eta)
+                'Neut_Mass_Win'      :  50  *MeV,
+                # Minimum dipion mass
+                'Dipion_Mass_MIN'    : 200 *MeV,
+                # Maximum dipion mass
+                'Dipion_Mass_MAX'    : 1200 *MeV,
+                # Maximum DOCA chi2 for dipion combination
+                'Dipion_DOCACHI2_MAX': 15,
+                # Minimum mass for intermediate resonance
+                'Res_Mass_MIN'       : 800   *MeV,  # 900 --> 800
+                # Maximum mass for intermediate resonance
+                'Res_Mass_MAX'       : 1060  *MeV,   # 990 --> 1050
+                # Minimum D PT
+                'D_PT_Min'           : 2000 *MeV,   # 2000
+                # Minimum D mass
+                'D_Mass_MIN'          : 1600 *MeV,
+                # Maximum D mass
+                'D_Mass_MAX'          : 2200 *MeV,
+                # Maximum chi^2 on D end vertex
+                'D_VCHI2PDOF_MAX'         : 5,
+                # minimum flight time
+                'D_BPVLTIME_MIN'       : 0.25*picosecond,
+                # max chi^2 per DOF of DTF fit
+                'DTF_CHI2NDOF_MAX'   : 5,
+                # HLT filters, only process events firing triggers matching the RegEx
+                'Hlt1Filter'         : None,
+                'Hlt2Filter'      : "HLT_PASS_RE('Hlt2CharmHadDp2Etap.*Decision') | HLT_PASS_RE('Hlt2Topo.*Decision')",
+                # prescale and postscale
+                'PrescaleD2PiEtaPrimePPG' : 1,
+                'PrescaleD2PiEtaPrime3HR' : 1,
+                'PrescaleD2KEtaPrimePPG'  : 1,
+                'PrescaleD2KEtaPrime3HR'  : 1,
+                'PostscaleD2PiEtaPrimePPG': 1,
+                'PostscaleD2PiEtaPrime3HR': 1,
+                'PostscaleD2KEtaPrimePPG' : 1,
+                'PostscaleD2KEtaPrime3HR' : 1
+                }
+          },
+    'D2PhiH' : {
+          'WGs': ['Charm'],
+          'BUILDERTYPE': 'StrippingD2PhiHConf',
+          'STREAMS': ['Charm'],
+          'CONFIG': {
+                # Minimum best primary vertex IP chi^2 for charged D daughters
+                'Bachelor_IPCHI2_MIN'      : 25.0,        # 25 --> 16
+                # Minimum PT for charged D daughters
+                'Bachelor_PT_MIN'          : 1000  *MeV,   # 600 
+                # Minimum momentum for charged D daughters
+                'Bachelor_P_MIN'           : 1000 *MeV,
+                # Bachelor particle PID requirement 
+                'Bachelor_PIDK_MIN'        : -999.0, # not used 
+                # Minimum best primary vertex IP chi^2 for charged D daughters
+                'Daug_IPCHI2_MIN'      : 25.0,        # 25 --> 4
+                # Minimum PT for charged D daughters
+                'Daug_PT_MIN'          : 500  *MeV,   # 600 --> 300
+                # Minimum momentum for charged D daughters
+                'Daug_P_MIN'           : 1000 *MeV,
+                # Maximum momentum for charged D daughters
+                'Daug_P_MAX'           : 100000 *MeV,
+                # Minimum pseudorapidity for charged D daughters
+                'Daug_ETA_MIN'         : 2.0,
+                # Maximum pseudorapidity for charged D daughters
+                'Daug_ETA_MAX'         : 5.0,
+                # Track quality requirement for charged D daughters
+                'Daug_TRCHI2DOF_MAX'   : 5,
+                # Maximum ghost probability for charged D daughters
+                'Daug_TRGHOSTPROB_MAX' : 0.5,
+                # Maximum DLLK of intermediate resonance daughter (pion)
+                'Pi_PIDK_MAX'        : 0,
+                # Minimum PT for intermediate resonance neutral daughters
+                'Neut_PT_MIN'        : 600  *MeV,
+                # Mass window for intermediate resonance neutral daughters (pi0, eta)
+                'Neut_Mass_Win'      :  50  *MeV,
+                # Minimum dipion mass
+                'Dipion_Mass_MIN'    : 200 *MeV,
+                # Maximum dipion mass
+                'Dipion_Mass_MAX'    : 1200 *MeV,
+                # Maximum DOCA chi2 for dipion combination
+                'Dipion_DOCACHI2_MAX': 15,
+                # Minimum mass for intermediate resonance
+                'Res_Mass_MIN'       : 680   *MeV,  #  includes omega 782
+                # Maximum mass for intermediate resonance
+                'Res_Mass_MAX'       : 890  *MeV,   #
+                # Minimum D PT
+                'D_PT_Min'           : 2000 *MeV,   #
+                # Minimum D mass
+                'D_Mass_MIN'          : 1600 *MeV,
+                # Maximum D mass
+                'D_Mass_MAX'          : 2200 *MeV,
+                # Maximum chi^2 on D end vertex
+                'D_VCHI2PDOF_MAX'         : 5,
+                # minimum flight time
+                'D_BPVLTIME_MIN'       : 0.25*picosecond,
+                # max chi^2 per DOF of DTF fit
+                'DTF_CHI2NDOF_MAX'   : 9,
+                # HLT filters, only process events firing triggers matching the RegEx
+                'Hlt1Filter'         : None,
+                'Hlt2Filter'      : "HLT_PASS_RE('Hlt2CharmHadDp2.*Decision') | HLT_PASS_RE('Hlt2Topo.*Decision')",
+                # prescale and postscale
+                'PrescaleD2PiPhi3HM' : 1,
+                'PrescaleD2PiPhi3HR' : 1,
+                'PrescaleD2KPhi3HM'  : 1,
+                'PrescaleD2KPhi3HR'  : 1,
+                'PostscaleD2PiPhi3HM': 1,
+                'PostscaleD2PiPhi3HR': 1,
+                'PostscaleD2KPhi3HM' : 1,
+                'PostscaleD2KPhi3HR' : 1
+                }
+          },
+    }
+
+
+class StrippingD2Pi0HConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['D2Pi0H']['CONFIG'].keys()
+    
+    # Decay descriptors
+    Dst2D0Pi = ['D*(2010)+ -> D0 pi+','D*(2010)- -> D0 pi-']
+    D02Pi0Pi0 = ['D0 -> pi0 pi0']
+    D2PiPi0 = ['[D+ -> pi0 pi+]cc']
+    D2KPi0 = ['[D+ -> pi0 K+]cc']
+    
+    Pi0EEG = ['pi0 -> J/psi(1S) gamma']
+    
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        pi0eeg_name = '{0}Pi0EEG'.format(name)
+        
+        d2pipi0eeg_name = '{0}D2PiPi0EEG'.format(name)        
+        d2kpi0eeg_name = '{0}D2KPi0EEG'.format(name)
+
+        d02pi0pi0eeg_name = '{0}D02Pi0Pi0EEG'.format(name)        
+        dst2d0pieeg_name = '{0}Dst2D0PiEEG'.format(name)
+
+        self.selPi0EEG = makeEEGResonance(
+            pi0eeg_name, 
+            config,
+            inputSel=[StdLooseAllPhotons,StdDiElectronFromTracks],
+            decDescriptors=self.Pi0EEG
+            )
+        
+        self.selD2PiPi0EEG = makeD(
+            d2pipi0eeg_name,
+            config,
+            inputSel=[self.selPi0EEG, StdAllNoPIDsPions],
+            decDescriptors=self.D2PiPi0,
+            useBachelorPID=False
+            )
+
+        usePIDforKaon = False
+        if (config['Bachelor_PIDK_MIN'] > -10):
+            usePIDforKaon = True
+        else :
+            usePIDforKaon = False
+            
+        self.selD2KPi0EEG = makeD(
+            d2kpi0eeg_name, 
+            config,
+            inputSel=[self.selPi0EEG, StdAllNoPIDsKaons],
+            decDescriptors=self.D2KPi0,
+            useBachelorPID=usePIDforKaon
+            )
+
+        self.selD02Pi0Pi0EEG = makeD(
+            d02pi0pi0eeg_name, 
+            config,
+            inputSel=[self.selPi0EEG],
+            decDescriptors=self.D02Pi0Pi0,
+            useBachelorPID=False,
+            )
+
+        self.selDst2D0PiEEG = makeDstar(
+            dst2d0pieeg_name,
+            config,
+            inputSel=[self.selD02Pi0Pi0EEG, StdAllNoPIDsPions],
+            decDescriptors=self.Dst2D0Pi,
+            )
+
+        self.line_D2PiPi0EEG = make_line(
+            self,
+            '{0}Line'.format(d2pipi0eeg_name),
+            prescale=config['PrescaleD2PiPi0EEG'],
+            postscale=config['PostscaleD2PiPi0EEG'],
+            selection=self.selD2PiPi0EEG,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+
+        self.line_D2KPi0EEG = make_line(
+            self,
+            '{0}Line'.format(d2kpi0eeg_name),
+            prescale=config['PrescaleD2KPi0EEG'],
+            postscale=config['PostscaleD2KPi0EEG'],
+            selection=self.selD2KPi0EEG,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        
+        self.line_Dst2D0PiEEG = make_line(
+            self,
+            '{0}Line'.format(dst2d0pieeg_name),
+            prescale=config['PrescaleDst2D0PiEEG'],
+            postscale=config['PostscaleDst2D0PiEEG'],
+            selection=self.selDst2D0PiEEG,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+
+class StrippingDst2PiD0EEGConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['Dst2PiD0EEG']['CONFIG'].keys()
+    
+    # Decay descriptors
+    Dst2D0Pi = ['D*(2010)+ -> D0 pi+','D*(2010)- -> D0 pi-']
+    
+    D0EEG = ['D0 -> J/psi(1S) gamma']
+    D0EE  = ['D0 -> e+ e-']
+    
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        d0eeg_name = '{0}D0EEG'.format(name)
+        dst2pid0eeg_name = '{0}Dst2PiD0EEG'.format(name)
+        
+        d0ee_name = '{0}D0EE'.format(name)
+        dst2pid0ee_name = '{0}Dst2PiD0EE'.format(name)
+
+        self.selD0EEG = makeEEGResonance(
+            d0eeg_name, 
+            config,
+            inputSel=[StdLooseAllPhotons,StdDiElectronFromTracks],
+            decDescriptors=self.D0EEG
+            )      
+
+        self.selD0EE = makeEEResonance(
+            d0ee_name, 
+            config,
+            inputSel=[StdAllLooseElectrons],
+            decDescriptors=self.D0EE
+            )
+                    
+        self.selDst2PiD0EEG = makeDstar(
+            dst2pid0eeg_name,
+            config,
+            inputSel=[self.selD0EEG, StdAllNoPIDsPions],
+            decDescriptors=self.Dst2D0Pi,
+            )
+
+        self.selDst2PiD0EE = makeDstar(
+            dst2pid0ee_name,
+            config,
+            inputSel=[self.selD0EE, StdAllNoPIDsPions],
+            decDescriptors=self.Dst2D0Pi,
+            )
+
+        self.line_Dst2PiD0EEG = make_line(
+            self,
+            '{0}Line'.format(dst2pid0eeg_name),
+            prescale=config['PrescaleDst2PiD0EEG'],
+            postscale=config['PostscaleDst2PiD0EEG'],
+            selection=self.selDst2PiD0EEG,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+
+        self.line_Dst2PiD0EE = make_line(
+            self,
+            '{0}Line'.format(dst2pid0ee_name),
+            prescale=config['PrescaleDst2PiD0EE'],
+            postscale=config['PostscaleDst2PiD0EE'],
+            selection=self.selDst2PiD0EE,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+
+
+class StrippingD2EtaEEGHConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['D2EtaEEGH']['CONFIG'].keys()
+    
+    # Decay descriptors
+    D2PiEta = ['[D+ -> eta pi+]cc']
+    D2KEta = ['[D+ -> eta K+]cc']
+    
+    EtaEEG = ['eta -> J/psi(1S) gamma']
+    
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        etaeeg_name = '{0}EtaEEG'.format(name)
+        
+        d2pietaeeg_name = '{0}D2PiEtaEEG'.format(name)        
+        d2ketaeeg_name = '{0}D2KEtaEEG'.format(name)
+
+        self.selEtaEEG = makeEEGResonance(
+            etaeeg_name, 
+            config,
+            inputSel=[StdLooseAllPhotons,StdDiElectronFromTracks],
+            decDescriptors=self.EtaEEG
+            )
+        
+        self.selD2PiEtaEEG = makeD(
+            d2pietaeeg_name,
+            config,
+            inputSel=[self.selEtaEEG, StdAllNoPIDsPions],
+            decDescriptors=self.D2PiEta,
+            useBachelorPID=False
+            )
+
+        usePIDforKaon = False
+        if (config['Bachelor_PIDK_MIN'] > -10):
+            usePIDforKaon = True
+        else :
+            usePIDforKaon = False
+            
+        self.selD2KEtaEEG = makeD(
+            d2ketaeeg_name, 
+            config,
+            inputSel=[self.selEtaEEG, StdAllNoPIDsKaons],
+            decDescriptors=self.D2KEta,
+            useBachelorPID=usePIDforKaon
+            )
+
+        self.line_D2PiEtaEEG = make_line(
+            self,
+            '{0}Line'.format(d2pietaeeg_name),
+            prescale=config['PrescaleD2PiEtaEEG'],
+            postscale=config['PostscaleD2PiEtaEEG'],
+            selection=self.selD2PiEtaEEG,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+
+        self.line_D2KEtaEEG = make_line(
+            self,
+            '{0}Line'.format(d2ketaeeg_name),
+            prescale=config['PrescaleD2KEtaEEG'],
+            postscale=config['PostscaleD2KEtaEEG'],
+            selection=self.selD2KEtaEEG,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        
+        
+class StrippingD2EtaHConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['D2EtaH']['CONFIG'].keys()
+    
+    # Decay descriptors
+    D2PiEta = ['[D+ -> eta pi+]cc']
+    D2KEta = ['[D+ -> eta K+]cc']
+    
+    EtaPPG = ['eta -> pi+ pi- gamma']
+    Eta3H = ['eta -> pi+ pi- pi0']
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        etappg_name = '{0}EtaPPG'.format(name)
+        eta3hr_name = '{0}Eta3HR'.format(name)
+        eta3hm_name = '{0}Eta3HM'.format(name)
+        
+        d2pietappg_name = '{0}D2PiEtaPPG'.format(name)
+        d2pieta3hr_name = '{0}D2PiEta3HR'.format(name)
+        d2pieta3hm_name = '{0}D2PiEta3HM'.format(name)
+        
+        d2ketappg_name = '{0}D2KEtaPPG'.format(name)
+        d2keta3hr_name = '{0}D2KEta3HR'.format(name)
+        d2keta3hm_name = '{0}D2KEta3HM'.format(name)
+
+        self.selEtaPPG = makeResonance(
+            etappg_name,
+            config,
+            inputSel=[StdAllNoPIDsPions,StdLooseAllPhotons],
+            decDescriptors=self.EtaPPG
+            )
+
+        self.selEta3HR = makeResonance(
+            eta3hr_name,
+            config,
+            inputSel=[StdAllNoPIDsPions,StdLooseResolvedPi0],
+            decDescriptors=self.Eta3H
+            )
+
+        self.selEta3HM = makeResonance(
+            eta3hm_name,
+            config,
+            inputSel=[StdAllNoPIDsPions,StdLooseMergedPi0],
+            decDescriptors=self.Eta3H
+            )
+
+        self.selD2PiEtaPPG = makeD(
+            d2pietappg_name,
+            config,
+            inputSel=[self.selEtaPPG, StdAllNoPIDsPions],
+            decDescriptors=self.D2PiEta,
+            useBachelorPID=False,
+            )
+
+        self.selD2KEtaPPG = makeD(
+            d2ketappg_name,
+            config,
+            inputSel=[self.selEtaPPG, StdAllNoPIDsKaons],
+            decDescriptors=self.D2KEta,
+            useBachelorPID=False,
+            )
+        
+        self.selD2PiEta3HR = makeD(
+            d2pieta3hr_name,
+            config,
+            inputSel=[self.selEta3HR, StdAllNoPIDsPions],
+            decDescriptors=self.D2PiEta,
+            useBachelorPID=False,
+            )
+
+        self.selD2KEta3HR = makeD(
+            d2keta3hr_name,
+            config,
+            inputSel=[self.selEta3HR, StdAllNoPIDsKaons],
+            decDescriptors=self.D2KEta,
+            useBachelorPID=False,
+            )
+                                        
+        self.selD2PiEta3HM = makeD(
+            d2pieta3hm_name,
+            config,
+            inputSel=[self.selEta3HM, StdAllNoPIDsPions],
+            decDescriptors=self.D2PiEta,
+            useBachelorPID=False,
+            )
+        
+
+        self.selD2KEta3HM = makeD(
+            d2keta3hm_name,
+            config,
+            inputSel=[self.selEta3HM, StdAllNoPIDsKaons],
+            decDescriptors=self.D2KEta,
+            useBachelorPID=False,
+            )
+        
+
+        self.line_D2PiEtaPPG = make_line(
+            self,
+            name='{0}Line'.format(d2pietappg_name),
+            prescale=config['PrescaleD2PiEtaPPG'],
+            postscale=config['PostscaleD2PiEtaPPG'],
+            selection=self.selD2PiEtaPPG,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+
+        self.line_D2PiEta3HM = make_line(
+            self,
+            name='{0}Line'.format(d2pieta3hm_name),
+            prescale=config['PrescaleD2PiEta3HM'],
+            postscale=config['PostscaleD2PiEta3HM'],
+            selection=self.selD2PiEta3HM,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+
+        self.line_D2PiEta3HR = make_line(
+            self,
+            name='{0}Line'.format(d2pieta3hr_name),
+            prescale=config['PrescaleD2PiEta3HR'],
+            postscale=config['PostscaleD2PiEta3HR'],
+            selection=self.selD2PiEta3HR,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+
+        self.line_D2KEtaPPG = make_line(
+            self,
+            name='{0}Line'.format(d2ketappg_name),
+            prescale=config['PrescaleD2KEtaPPG'],
+            postscale=config['PostscaleD2KEtaPPG'],
+            selection=self.selD2KEtaPPG,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        
+        self.line_D2KEta3HM = make_line(
+            self,
+            name='{0}Line'.format(d2keta3hm_name),
+            prescale=config['PrescaleD2KEta3HM'],
+            postscale=config['PostscaleD2KEta3HM'],
+            selection=self.selD2KEta3HM,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        
+        self.line_D2KEta3HR = make_line(
+            self,
+            name='{0}Line'.format(d2keta3hr_name),
+            prescale=config['PrescaleD2KEta3HR'],
+            postscale=config['PostscaleD2KEta3HR'],
+            selection=self.selD2KEta3HR,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+
+class StrippingD2EtaPrimeHConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['D2EtaPrimeH']['CONFIG'].keys()
+    
+    # Decay descriptors
+    D2PiEtaPrime = ["[D+ -> eta_prime pi+]cc"]
+    D2KEtaPrime = ["[D+ -> eta_prime K+]cc"]
+    
+    EtaPrimePPG = ["eta_prime -> pi+ pi- gamma"]
+    EtaPrime3H = ["eta_prime -> pi+ pi- eta"]
+    
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        etaprimeppg_name = '{0}EtaPrimePPG'.format(name)
+        etaprime3hr_name = '{0}EtaPrime3HR'.format(name)
+        
+        d2pietaprimeppg_name = '{0}D2PiEtaPrimePPG'.format(name)
+        d2pietaprime3hr_name = '{0}D2PiEtaPrime3HR'.format(name)
+        
+        d2ketaprimeppg_name = '{0}D2KEtaPrimePPG'.format(name)
+        d2ketaprime3hr_name = '{0}D2KEtaPrime3HR'.format(name)
+        
+        self.selEtaPrimePPG = makeResonance(
+            etaprimeppg_name,
+            config,
+            inputSel=[StdAllNoPIDsPions,StdLooseAllPhotons],
+            decDescriptors=self.EtaPrimePPG
+            )
+        
+        self.selEtaPrime3HR = makeResonance(
+            etaprime3hr_name,
+            config,
+            inputSel=[StdAllNoPIDsPions,StdLooseResolvedEta],
+            decDescriptors=self.EtaPrime3H
+            )
+        
+        self.selD2PiEtaPrimePPG = makeD(
+            d2pietaprimeppg_name,
+            config,
+            inputSel=[self.selEtaPrimePPG, StdAllNoPIDsPions],
+            decDescriptors=self.D2PiEtaPrime,
+            useBachelorPID=False,
+            )
+        
+        self.selD2KEtaPrimePPG = makeD(
+            d2ketaprimeppg_name,
+            config,
+            inputSel=[self.selEtaPrimePPG, StdAllNoPIDsKaons],
+            decDescriptors=self.D2KEtaPrime,
+            useBachelorPID=False,
+            )
+        
+        self.selD2PiEtaPrime3HR = makeD(
+            d2pietaprime3hr_name,
+            config,
+            inputSel=[self.selEtaPrime3HR, StdAllNoPIDsPions],
+            decDescriptors=self.D2PiEtaPrime,
+            useBachelorPID=False,            
+            )
+        
+        self.selD2KEtaPrime3HR = makeD(
+            d2ketaprime3hr_name,
+            config,
+            inputSel=[self.selEtaPrime3HR, StdAllNoPIDsKaons],
+            decDescriptors=self.D2KEtaPrime,
+            useBachelorPID=False,
+            )
+        
+        self.line_D2PiEtaPrimePPG = make_line(
+            self,
+            name='{0}Line'.format(d2pietaprimeppg_name),
+            prescale=config['PrescaleD2PiEtaPrimePPG'],
+            postscale=config['PostscaleD2PiEtaPrimePPG'],
+            selection=self.selD2PiEtaPrimePPG,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        
+        self.line_D2PiEtaPrime3HR = make_line(
+            self,
+            name='{0}Line'.format(d2pietaprime3hr_name),
+            prescale=config['PrescaleD2PiEtaPrime3HR'],
+            postscale=config['PostscaleD2PiEtaPrime3HR'],
+            selection=self.selD2PiEtaPrime3HR,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        
+        self.line_D2KEtaPrimePPG = make_line(
+            self,
+            name='{0}Line'.format(d2ketaprimeppg_name),
+            prescale=config['PrescaleD2KEtaPrimePPG'],
+            postscale=config['PostscaleD2KEtaPrimePPG'],
+            selection=self.selD2KEtaPrimePPG,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        
+        self.line_D2KEtaPrime3HR = make_line(
+            self,
+            name='{0}Line'.format(d2ketaprime3hr_name),
+            prescale=config['PrescaleD2KEtaPrime3HR'],
+            postscale=config['PostscaleD2KEtaPrime3HR'],
+            selection=self.selD2KEtaPrime3HR,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+
+class StrippingD2PhiHConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['D2PhiH']['CONFIG'].keys()
+    
+    # Decay descriptors
+    D2PiPhi = ["[D+ -> phi(1020) pi+]cc"]
+    D2KPhi = ["[D+ -> phi(1020) K+]cc"]
+    
+    Phi3H = ["phi(1020) -> pi+ pi- pi0"]
+    
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        phi3hm_name = '{0}Phi3HM'.format(name)
+        phi3hr_name = '{0}Phi3HR'.format(name)
+        
+        d2piphi3hm_name = '{0}D2PiPhi3HM'.format(name)
+        d2piphi3hr_name = '{0}D2PiPhi3HR'.format(name)
+        
+        d2kphi3hm_name = '{0}D2KPhi3HM'.format(name)
+        d2kphi3hr_name = '{0}D2KPhi3HR'.format(name)
+        
+
+        self.selPhi3HM = makeResonance(
+            phi3hm_name,
+            config,
+            inputSel=[StdAllNoPIDsPions,StdLooseMergedPi0],
+            decDescriptors=self.Phi3H
+            )
+
+        self.selPhi3HR = makeResonance(
+            phi3hr_name,
+            config,
+            inputSel=[StdAllNoPIDsPions,StdLooseResolvedPi0],
+            decDescriptors=self.Phi3H
+            )
+        
+        self.selD2PiPhi3HM = makeD(
+            d2piphi3hm_name,
+            config,
+            inputSel=[self.selPhi3HM, StdAllNoPIDsPions],
+            decDescriptors=self.D2PiPhi,
+            useBachelorPID=False,
+            )
+        
+        self.selD2KPhi3HM = makeD(
+            d2kphi3hm_name,
+            config,
+            inputSel=[self.selPhi3HM, StdAllNoPIDsKaons],
+            decDescriptors=self.D2KPhi,
+            useBachelorPID=False,
+            )
+        
+        self.selD2PiPhi3HR = makeD(
+            d2piphi3hr_name,
+            config,
+            inputSel=[self.selPhi3HR, StdAllNoPIDsPions],
+            decDescriptors=self.D2PiPhi,
+            useBachelorPID=False,
+            )
+        
+        self.selD2KPhi3HR = makeD(
+            d2kphi3hr_name,
+            config,
+            inputSel=[self.selPhi3HR, StdAllNoPIDsKaons],
+            decDescriptors=self.D2KPhi,
+            useBachelorPID=False,
+            )
+        
+        self.line_D2PiPhi3HM = make_line(
+            self,
+            name='{0}Line'.format(d2piphi3hm_name),
+            prescale=config['PrescaleD2PiPhi3HM'],
+            postscale=config['PostscaleD2PiPhi3HM'],
+            selection=self.selD2PiPhi3HM,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        
+        self.line_D2PiPhi3HR = make_line(
+            self,
+            name='{0}Line'.format(d2piphi3hr_name),
+            prescale=config['PrescaleD2PiPhi3HR'],
+            postscale=config['PostscaleD2PiPhi3HR'],
+            selection=self.selD2PiPhi3HR,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        self.line_D2KPhi3HM = make_line(
+            self,
+            name='{0}Line'.format(d2kphi3hm_name),
+            prescale=config['PrescaleD2KPhi3HM'],
+            postscale=config['PostscaleD2KPhi3HM'],
+            selection=self.selD2KPhi3HM,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        
+        self.line_D2KPhi3HR = make_line(
+            self,
+            name='{0}Line'.format(d2kphi3hr_name),
+            prescale=config['PrescaleD2KPhi3HR'],
+            postscale=config['PostscaleD2KPhi3HR'],
+            selection=self.selD2KPhi3HR,
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+            )
+        
+        
+def make_line(self, name, selection, prescale, postscale, **kwargs):
+    """Create the stripping line defined by the selection.
+    
+    Keyword arguments:
+    name -- Base name for the Line
+    selection -- Selection instance
+    prescale -- Fraction of candidates to randomly drop before stripping
+    postscale -- Fraction of candidates to randomly drop after stripping
+    **kwargs -- Keyword arguments passed to StrippingLine constructor
+    """
+    # Only create the line with positive pre- and postscales
+    # You can disable each line by setting either to a negative value
+    if prescale > 0 and postscale > 0:
+        line = StrippingLine(
+            name,
+            selection=selection,
+            prescale=prescale,
+            postscale=postscale,
+            **kwargs
+            )
+        self.registerLine(line)
+        return line
+    else:
+        return False
+
+    
+    
+def makeEEGResonance(name, config, inputSel, decDescriptors):  
+    
+    
+    combCuts = "in_range( {0[Res_Mass_MIN]},AM,{0[Res_Mass_MAX]} )".format(config)
+    
+    dielectronCuts = (
+        "(MM < {0[DiElectron_Mass_MAX]})"
+        " & ( PT > {0[DiElectron_PT_MIN]})"
+        ).format(config)
+    
+    gammaCuts = (
+        "(PT > {0[Neut_PT_MIN]})"
+        ).format(config)
+    
+    resCuts = "ALL"
+    
+    _combiner = CombineParticles(
+        DecayDescriptors=decDescriptors,
+        DaughtersCuts={
+        'J/psi(1S)'  : '{0}'.format(dielectronCuts), 
+        'gamma': '{0}'.format(gammaCuts)
+        },
+        CombinationCut=combCuts,
+        MotherCut=resCuts
+        )
+    
+    return Selection(name, Algorithm=_combiner, RequiredSelections=inputSel)
+
+def makeEEResonance(name, config, inputSel, decDescriptors):  
+    
+    combCuts = "in_range( {0[Res_Mass_MIN]},AM,{0[Res_Mass_MAX]} )".format(config)
+    
+    electronCuts = ( 
+        '(PT > {0[Electron_PT_MIN]})'
+        '& (P > {0[Electron_P_MIN]}) '
+        '& (MIPCHI2DV(PRIMARY) > {0[Electron_IPCHI2_MIN]})'
+        '& (TRCHI2DOF < {0[Electron_TRCHI2DOF_MAX]}) '
+        '& (TRGHOSTPROB < {0[Electron_TRGHOSTPROB_MAX]}) '
+        ).format(config)   
+    resCuts = "ALL"
+    
+    _combiner = CombineParticles(
+        DecayDescriptors=decDescriptors,
+        DaughtersCuts={
+        'e+': '{0}'.format(electronCuts)
+        },
+        CombinationCut=combCuts,
+        MotherCut=resCuts
+        )
+    
+    return Selection(name, Algorithm=_combiner, RequiredSelections=inputSel)
+
+def makeResonance( name, config, inputSel, decDescriptors):  
+
+    daugCuts = (
+        '(PT > {0[Daug_PT_MIN]})'
+        '& (P > {0[Daug_P_MIN]}) '
+        '& (MIPCHI2DV(PRIMARY) > {0[Daug_IPCHI2_MIN]})'
+        '& (TRCHI2DOF < {0[Daug_TRCHI2DOF_MAX]}) '
+        '& (TRGHOSTPROB < {0[Daug_TRGHOSTPROB_MAX]}) '
+        ).format(config)
+    
+    pidFiducialCuts = (
+        '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+        '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+        ).format(config)
+    
+    pionPIDCuts = (
+        pidFiducialCuts +
+        '& (PIDK-PIDpi < {0[Pi_PIDK_MAX]})'
+        ).format(config)
+    
+    combCuts = "in_range( {0[Res_Mass_MIN]},AM,{0[Res_Mass_MAX]} )".format(config)
+    
+    etaggCuts = (
+        "(PT > {0[Neut_PT_MIN]})"
+        "& (ADMASS('eta') < {0[Neut_Mass_Win]})"
+        ).format(config)
+
+    pizeroCuts = (
+        "(PT > {0[Neut_PT_MIN]})"
+        "& (ADMASS('pi0') < {0[Neut_Mass_Win]})"
+        ).format(config)
+
+    gammaCuts = (
+        "(PT > {0[Neut_PT_MIN]})"
+        ).format(config)
+    
+    resCuts = "ALL"
+    
+    comb12Cuts = (
+        "( in_range( {0[Dipion_Mass_MIN]},AM,{0[Dipion_Mass_MAX]}) )"
+        "& ( ACUTDOCACHI2( {0[Dipion_DOCACHI2_MAX]} , '') ) "
+        ).format(config)
+    
+    piCuts = ''
+    if (config['Pi_PIDK_MAX'] < 10):
+        piCuts = ('{0} & {1}'.format(daugCuts, pionPIDCuts))
+    else:
+        piCuts = ('{0}'.format(daugCuts))
+        
+    _combiner = DaVinci__N3BodyDecays(
+        Combination12Cut = comb12Cuts,
+        DecayDescriptors=decDescriptors,
+        DaughtersCuts={
+        'pi+'  : '{0}'.format(piCuts),
+        'gamma': '{0}'.format(gammaCuts),
+        'pi0'  : '{0}'.format(pizeroCuts),
+        'eta'  : '{0}'.format(etaggCuts),
+        },
+        CombinationCut=combCuts,
+        MotherCut=resCuts
+        )
+    
+    return Selection(name, Algorithm=_combiner, RequiredSelections=inputSel)
+
+
+def makeD(name, config, inputSel, decDescriptors, useBachelorPID):        
+    
+    
+    pidFiducialCuts = ( 
+        '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+        '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+        ).format(config)
+    
+    bachelorPIDCuts = (  
+        pidFiducialCuts +
+        '& (PIDK-PIDpi > {0[Bachelor_PIDK_MIN]})'
+        ).format(config)
+    
+    daugCuts = (
+        '(PT > {0[Bachelor_PT_MIN]})'
+        '& (P > {0[Bachelor_P_MIN]}) '
+        '& (MIPCHI2DV(PRIMARY) > {0[Bachelor_IPCHI2_MIN]})'
+        '& (TRCHI2DOF < {0[Daug_TRCHI2DOF_MAX]}) ' # common TRCHI2DOF and TRGHOSTPROB for all pions
+        '& (TRGHOSTPROB < {0[Daug_TRGHOSTPROB_MAX]}) '
+        ).format(config)
+    
+    bachelorCuts = ''
+    if (useBachelorPID):
+        bachelorCuts = ('{0} & {1}'.format(daugCuts, bachelorPIDCuts))
+    else:
+        bachelorCuts = ('{0}'.format(daugCuts))
+        
+    combCuts = (
+        "(APT > {0[D_PT_Min]})"
+        "& ( in_range( {0[D_Mass_MIN]},AM,{0[D_Mass_MAX]}) )"
+        ).format(config)
+    
+    dCuts = (
+        '(VFASPF(VCHI2PDOF) < {0[D_VCHI2PDOF_MAX]})'
+        '& (BPVLTIME() > {0[D_BPVLTIME_MIN]})'
+        '& (DTF_CHI2NDOF(True) < {0[DTF_CHI2NDOF_MAX]})' 
+        ).format(config)
+    
+    _D = CombineParticles(
+        #name='Combine{0}'.format(name),
+        DecayDescriptors=decDescriptors,
+        DaughtersCuts={
+        'pi+': '{0}'.format(bachelorCuts),
+        'K+': '{0}'.format(bachelorCuts)
+        },
+        CombinationCut=combCuts,
+        MotherCut=dCuts
+        )
+    
+    return Selection(name, Algorithm=_D, RequiredSelections=inputSel)
+
+
+
+def makeDstar(name, config , inputSel , decDescriptors):
+
+    daugCuts = (
+        '(TRCHI2DOF < {0[Soft_TRCHI2DOF_MAX]}) ' 
+        ).format(config)
+    
+    combCuts = (
+        '( (AM - AM1) < {0[Dstar_AMDiff_MAX]})'
+        ).format(config)
+    
+    dstarCuts = (
+        '( VFASPF(VCHI2/VDOF) < {0[Dstar_VCHI2VDOF_MAX]} )'
+        '& ( (M - M1) < {0[Dstar_MDiff_MAX]}  )'
+        ).format(config)
+    
+    _Dstar = CombineParticles( DecayDescriptors = decDescriptors
+                               , DaughtersCuts = { "pi+" : daugCuts }
+                               , CombinationCut = combCuts
+                               , MotherCut = dstarCuts
+                               )
+    
+    return Selection( name , Algorithm = _Dstar, RequiredSelections = inputSel )
+
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2XMuMuSS.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2XMuMuSS.py
new file mode 100644
index 000000000..7f66c4c9d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2XMuMuSS.py
@@ -0,0 +1,2969 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = ['Malcolm John', 'B. Viaud', 'O. Kochebina']
+__date__ = '25/6/2012'
+__version__ = '$Revision: 1.7 $'
+
+'''
+D->Xu(Xu) mu mu , Xu=pi/K channels and control samples.
+'''
+__all__ = ('StrippingD2XMuMuSSConf', 'makeD2PiPiPi', 'makeD2PiMuMuOS','makeD2PiEEOS' , 'makeD2PiEMuOS', 'makeD2PiMuEOS', 'makeD2PiMuMuSS', 'makeD2PiEESS', 'makeD2PiMuESS', 'makeD2KMuMuOS', 'makeD2KEEOS' , 'makeD2KEMuOS', 'makeD2KMuEOS', 'makeD2KMuMuSS', 'makeD2KEESS', 'makeD2KMuESS', 'makeD2K2Pi', 'makeD22KPi', 'makeD02KKMuMu', 'makeD02PiPiMuMu', 'makeD02KPiMuMu', 'makeD02KKPiPi', 'makeD02K3Pi','makeD02PiPiPiPi','makeLambdac2PMuMu','makeLambdac2PMuMuSS','makeLambdac2PEE','makeLambdac2PEMu','makeLambdac2PMuE','makeLambdac2PEMuSS','makeLambdac2PPiPi','makeLambdac2PKPi','makeD2PiMuMuCal','makeD2PiEMuCal','makeD2PiEECal','makeD2KMuMuCal','makeD2KEMuCal','makeD2KEECal','default_config' )
+
+default_config =  {
+    'NAME' : 'D2XMuMuSS',
+    'BUILDERTYPE' : 'StrippingD2XMuMuSSConf',
+    'WGs' : [ 'Charm' ],
+    'STREAMS' : [ 'Charm' ],
+    'CONFIG':{
+                  'MuonP'         : 2000. ,    #MeV
+                  'MuonPT'        : 300.  ,    #MeV
+                  'MuonMINIPCHI2' : 5     ,    #adminensional
+                  'MuonTRCHI2'    : 5     ,    #adminensional
+                  
+                  'PionP'         : 2000. ,    #MeV
+                  'PionPT'        : 300.  ,    #MeV
+                  'PionMINIPCHI2' : 5     ,    #adminensional
+                  'PionTRCHI2'    : 5     ,    #adminensional
+                  
+                  'KaonP'         : 2000. ,    #MeV
+                  'KaonPT'        : 300.  ,    #MeV
+                  'KaonPIDK'      : -1.   ,    #adimensional
+                  'KaonMINIPCHI2' : 5     ,    #adminensional
+                  'KaonTRCHI2'    : 5     ,    #adminensional
+
+                  'ProtonP'         : 2000. ,    #MeV
+                  'ProtonPT'        : 300.  ,    #MeV
+                  'ProtonMINIPCHI2' : 6     ,    #adminensional
+                  'ProtonTRCHI2'    : 5     ,    #adminensional
+
+                  'EleP'         : 2000. ,    #MeV
+                  'ElePT'        : 300.  ,    #MeV
+                  'EleMINIPCHI2' : 5     ,    #adminensional
+                  'EleTRCHI2'    : 5     ,    #adminensional
+                  
+
+
+                  #3 body
+                  'DVCHI2DOF'     : 5     ,    #adminensional
+                  'DMAXDOCA'      : 0.15  ,    #mm
+                  'DIPCHI2'       : 25    ,    #adimensional
+                  
+                  #4body
+                  'MINIPCHI2_hhmumu' : 2. ,  #adminensional
+                  'PT_hhmumu'        : 300 , #MeV
+                  'MuonPIDmu_hhmumu' : -1,   #adimensional
+                  'DPT_hhmumu'           : 2500.,     #MeV
+                  'DVCHI2DOF_hhmumu'     : 8     ,    #adminensional         
+                  'DMAXDOCA_hhmumu'      : 0.2  ,    #mm
+                  'DdauMAXIPCHI2_hhmumu' : 15    ,    #adimensinal
+                  'DFDCHI2_hhmumu'       : 36     ,   #adimensional
+                  'DIPCHI2_hhmumu'       : 20    ,    #adimensional
+
+                  'DIPCHI2_4bodyCS'      : 16    ,    #adimensional
+                  'MINIPCHI2_4bodyCS' : 3. ,  #adminensional
+
+                  'DDIRA'         : 0.9999,    #adimensional
+                  'DimuonMass'    : 250.  ,    #MeV
+                  'DMassWin'                   : 200.  ,    #MeV, mass window
+                  'DMassWin_CS_hhmumu'         : 100.  ,    #MeV, mass window
+                  'LambdacMassWin'             : 100. ,     #MeV, mass window
+                  'LambdacMassWinRare'         : 200. ,     #MeV, mass window
+                  'DMassLow'                   :1763.  ,    #MeV, low-mass veto
+
+             
+                  'GhostProbCut_hhmumu'     : 0.5,
+                  
+                  'D2PiMuMuOSLinePrescale'     : 1 ,
+                  'D2PiMuMuOSLinePostscale'    : 1 ,
+
+                  'D2PiEEOSLinePrescale'     : 1 ,
+                  'D2PiEEOSLinePostscale'    : 1 ,
+
+                  'D2PiEMuOSLinePrescale'     : 1 ,
+                  'D2PiEMuOSLinePostscale'    : 1 ,
+
+                  'D2PiMuEOSLinePrescale'     : 1 ,
+                  'D2PiMuEOSLinePostscale'    : 1 ,
+
+                  'D2PiMuMuSSLinePrescale'     : 1 ,
+                  'D2PiMuMuSSLinePostscale'    : 1 ,
+
+                  'D2PiEESSLinePrescale'      : 1 ,
+                  'D2PiEESSLinePostscale'     : 1 ,
+
+                  'D2PiMuESSLinePrescale'       : 1 ,
+                  'D2PiMuESSLinePostscale'      : 1 ,
+
+                  'D2KMuMuOSLinePrescale'      : 1 ,
+                  'D2KMuMuOSLinePostscale'     : 1 ,
+
+                  'D2KEEOSLinePrescale'     : 1 ,
+                  'D2KEEOSLinePostscale'    : 1 ,
+
+                  'D2KEMuOSLinePrescale'     : 1 ,
+                  'D2KEMuOSLinePostscale'    : 1 ,
+
+                  'D2KMuEOSLinePrescale'     : 1 ,
+                  'D2KMuEOSLinePostscale'    : 1 ,
+
+                  'D2KMuMuSSLinePrescale'      : 1 ,
+                  'D2KMuMuSSLinePostscale'     : 1 ,
+
+                  'D2KEESSLinePrescale'      : 1 ,
+                  'D2KEESSLinePostscale'     : 1 ,
+
+                  'D2KMuESSLinePrescale'      : 1 ,
+                  'D2KMuESSLinePostscale'     : 1 ,
+
+                  'D2PiPiPiCalLinePrescale'    : 0.01 ,
+                  'D2PiPiPiCalLinePostscale'   : 1 ,
+                  'D2K2PiLinePrescale'         : 0.005 ,
+                  'D2K2PiLinePostscale'        : 1 ,
+                  'D22KPiLinePrescale'         : 0.005 ,
+                  'D22KPiLinePostscale'        : 1,
+                  'D02KKMuMuLinePrescale'      : 1 ,
+                  'D02KKMuMuLinePostscale'     : 1 ,
+                  'D02PiPiMuMuLinePrescale'    : 1 ,
+                  'D02PiPiMuMuLinePostscale'   : 1,
+                  'D02KPiMuMuLinePrescale'     : 1 ,
+                  'D02KPiMuMuLinePostscale'    : 1,
+                  'D02KKPiPiLinePrescale'      : 0.01 ,
+                  'D02KKPiPiLinePostscale'     : 1,
+                  'D02K3PiLinePrescale'        : 0.005 ,
+                  'D02K3PiLinePostscale'       : 1,
+                  'D02PiPiPiPiLinePrescale'    : 0.01 ,
+                  'D02PiPiPiPiLinePostscale'   : 1,
+                  
+                  'Lambdac2PMuMuLinePrescale'  : 1 ,
+                  'Lambdac2PMuMuLinePostscale' : 1 ,
+
+                  'Lambdac2PEELinePrescale'  : 1 ,
+                  'Lambdac2PEELinePostscale' : 1 ,
+
+                  'Lambdac2PEMuLinePrescale'  : 1 ,
+                  'Lambdac2PEMuLinePostscale' : 1 ,
+
+                  'Lambdac2PMuMuSSLinePrescale'  : 1 ,
+                  'Lambdac2PMuMuSSLinePostscale' : 1 ,
+
+                  'Lambdac2PEMuSSLinePrescale'  : 1 ,
+                  'Lambdac2PEMuSSLinePostscale' : 1 ,
+
+                  'Lambdac2PMuELinePrescale'  : 1 ,
+                  'Lambdac2PMuELinePostscale' : 1 ,
+
+                  'Lambdac2PPiPiLinePrescale'  : 0.01 ,
+                  'Lambdac2PPiPiLinePostscale' : 1,
+                 
+                  'Lambdac2PKPiLinePrescale'  : 0.1 , 
+                  'Lambdac2PKPiLinePostscale' : 1 , 
+                  
+                  'D2PiMuMuCalLinePrescale'    : 1 ,
+                  'D2PiMuMuCalLinePostscale'   : 1 ,
+                  'D2PiEMuCalLinePrescale'    : 1 ,
+                  'D2PiEMuCalLinePostscale'   : 1 ,
+                  'D2PiEECalLinePrescale'    : 1 ,
+                  'D2PiEECalLinePostscale'   : 1 ,
+                  'D2KMuMuCalLinePrescale'    : 1 ,
+                  'D2KMuMuCalLinePostscale'   : 1 ,
+                  'D2KEMuCalLinePrescale'    : 1 ,
+                  'D2KEMuCalLinePostscale'   : 1 ,
+                  'D2KEECalLinePrescale'    : 1 ,
+                  'D2KEECalLinePostscale'   : 1 ,
+
+                  'RelatedInfoTools': [{
+                      'Type'              : 'RelInfoVertexIsolation',
+                      'Location'          : 'RelInfoVertexIsolation'
+                  }, {
+                      'Type'              : 'RelInfoVertexIsolationBDT',
+                      'Location'          : 'RelInfoVertexIsolationBDT'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 1.0,
+                      'Location'          : 'RelInfoConeVariables_1.0',
+                      'DaughterLocations' : None
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 1.5,
+                      'Location'          : 'RelInfoConeVariables_1.5',
+                      'DaughterLocations' : None
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 2.0,
+                      'Location'          : 'RelInfoConeVariables_2.0',
+                      'DaughterLocations' : None
+                  }, {
+                      'Type'              : 'RelInfoConeVariablesForEW',
+                      'ConeAngle'         : 0.0,
+                      'Location'          : 'RelInfoConeVariablesForEW_0.0',
+                      'DaughterLocations' : None
+                  }, {
+                      'Type'              : 'RelInfoConeVariablesForEW',
+                      'ConeAngle'         : 0.5,
+                      'Location'          : 'RelInfoConeVariablesForEW_0.5',
+                      'DaughterLocations' : None
+                  }, {
+                      'Type'              : 'RelInfoConeVariablesForEW',
+                      'ConeAngle'         : 1.0,
+                      'Location'          : 'RelInfoConeVariablesForEW_1.0',
+                      'DaughterLocations' : None
+
+                  }, {
+                      'Type'              : 'RelInfoConeVariablesForEW',
+                      'ConeAngle'         : 1.5,
+                      'Location'          : 'RelInfoConeVariablesForEW_1.5',
+                      'DaughterLocations' : None
+                  }, {
+                      'Type'              : 'RelInfoTrackIsolationBDT',
+                      'Location'          : 'RelInfoTrackIsolationBDT',
+                      'DaughterLocations' : None
+                  }, {
+                      'Type'              : 'RelInfoBstautauCDFIso',
+                      'Location'          : 'RelInfoBstautauCDFIso'
+                  }, {
+                      'Type'              : 'RelInfoBs2MuMuTrackIsolations',
+                      'Location'          : 'RelInfoBs2MuMuTrackIsolations',
+                      'DaughterLocations' : None,
+                      'tracktype'         : 3,
+                      'angle'             : 0.27,
+                      'fc'                : 0.60,
+                      'doca_iso'          : 0.13,
+                      'ips'               : 3.0,
+                      'svdis'             : -0.15,
+                      'svdis_h'           : 30.,
+                      'pvdis'             : 0.5,
+                      'pvdis_h'           : 40.,
+                      'makeTrackCuts'     : False,
+                      'IsoTwoBody'        : False
+                  }]
+                  }
+}
+
+import copy
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, OfflineVertexFitter
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseKaons, StdLoosePions, StdLooseMuons, StdNoPIDsPions, StdNoPIDsKaons, StdLooseProtons, StdAllNoPIDsProtons
+from StandardParticles import StdAllLooseKaons, StdAllLoosePions, StdAllLooseMuons, StdAllNoPIDsPions, StdAllNoPIDsKaons
+from StandardParticles import StdAllLooseElectrons, StdAllNoPIDsElectrons
+
+default_name = "D2XMuMuSS"
+
+class StrippingD2XMuMuSSConf(LineBuilder) :
+    """
+    Builder for D2XMuMu, X = pi/K 
+    """
+    
+    PiCalLine = None
+
+    PiOSLine = None      
+    Pi_EE_OSLine = None
+    Pi_EMu_OSLine = None 
+    Pi_MuE_OSLine = None 
+    Pi_EE_SSLine = None
+    Pi_MuE_SSLine = None
+
+    KOSLine = None
+    K_EE_OSLine = None
+    K_EMu_OSLine = None 
+    K_MuE_OSLine = None 
+    K_EE_SSLine = None
+    K_MuE_SSLine = None
+
+    PiSSLine = None
+    KSSLine = None
+
+    PiPiLine = None
+    KPiLine = None
+
+    KKLine = None
+    KKPiPiLine = None
+    K3PiLine = None
+    PiPiPiPiLine = None
+    K2PiLine = None
+    TwoKPiLine = None
+
+    Lambdac2PMuMuLine = None
+    Lambdac2PEELine = None
+    Lambdac2PEMuLine = None
+    Lambdac2PMuELine = None
+
+    Lambdac2PPiPiLine = None
+    Lambdac2PKPiLine = None
+    
+    PiMuMuCalLine = None
+    PiEMuCalLine = None
+    PiEECalLine = None
+    KMuMuCalLine = None
+    KEMuCalLine = None
+    KEECalLine = None
+        
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+        
+        PiCalLine_name = name+"_PiCal"
+        PiOSLine_name = name+"_PiOS"
+        Pi_EE_OSLine_name = name+"_Pi_EE_OS"
+        Pi_EMu_OSLine_name = name+"_Pi_EMu_OS"
+        Pi_MuE_OSLine_name = name+"_Pi_MuE_OS"
+        Pi_EE_SSLine_name = name+"_Pi_EE_SS"
+        Pi_MuE_SSLine_name = name+"_Pi_MuE_SS"
+
+        PiSSLine_name = name+"_PiSS"
+        KSSLine_name = name+"_KSS"
+
+        KOSLine_name = name+"_KOS"
+        K_EE_OSLine_name = name+"_K_EE_OS"
+        K_EMu_OSLine_name = name+"_K_EMu_OS"
+        K_MuE_OSLine_name = name+"_K_MuE_OS"
+        K_EE_SSLine_name = name+"_K_EE_SS"
+        K_MuE_SSLine_name = name+"_K_MuE_SS"
+
+        K2PiLine_name = name+"_K2Pi"
+        TwoKPiLine_name = name+"_2KPi"
+
+        KKLine_name = name+"_KK"
+        PiPiLine_name = name+"_PiPi"
+        KPiLine_name = name+"_KPi"
+        KKPiPiLine_name = name+"_KKPiPi"
+        K3PiLine_name = name+"_K3Pi"
+        PiPiPiPiLine_name = name+"_PiPiPiPi"
+        
+        Lambdac2PMuMuLine_name = name+"_Lambdac2PMuMu"
+        Lambdac2PEELine_name = name+"_Lambdac2PEE"
+        Lambdac2PEMuLine_name = name+"_Lambdac2PEMu"
+        Lambdac2PMuELine_name = name+"_Lambdac2PMuE"
+        Lambdac2PMuMuSSLine_name = name+"_Lambdac2PMuMuSS"
+        Lambdac2PEMuSSLine_name = name+"_Lambdac2PEMuSS"
+
+        Lambdac2PPiPiLine_name = name+"_Lambdac2PPiPi"
+        Lambdac2PKPiLine_name = name+"_Lambdac2PKPi"
+        
+        PiMuMuCalLine_name = name+"_PiMuMuCal"
+        PiEMuCalLine_name = name+"_PiEMuCal"
+        PiEECalLine_name = name+"_PiEECal"
+        KMuMuCalLine_name = name+"_KMuMuCal"
+        KEMuCalLine_name = name+"_KEMuCal"
+        KEECalLine_name = name+"_KEECal"
+        
+        # 1 : Make kaons
+        selKaons = makeKaons(name="KaonsFor"+name
+                             , KaonP = config['KaonP']
+                             , KaonPT = config['KaonPT']
+                             , KaonPIDK = config['KaonPIDK']
+                             , KaonMINIPCHI2 = config['KaonMINIPCHI2']
+                             , KaonTRCHI2 = config['KaonTRCHI2'])
+        
+        # 2 : Make pions
+        selPions = makePions(name="PionsFor"+name
+                             , PionP = config['PionP']
+                             , PionPT = config['PionPT']
+                             , PionMINIPCHI2 = config['PionMINIPCHI2']
+                             , PionTRCHI2 = config['PionTRCHI2'])
+        
+        # 3 : Make muons
+        selMuons = makeMuons(name="MuonsFor"+name
+                             , MuonP = config['MuonP']
+                             , MuonPT = config['MuonPT']
+                             , MuonMINIPCHI2 = config['MuonMINIPCHI2']
+                             , MuonTRCHI2 = config['MuonTRCHI2'])
+
+        # 3b : Make muons candidates from pions
+        pionsAsMuons = makePionsAsMuons(name="PionsAsMuonsFor"+name
+                                        , MuonP = config['MuonP']
+                                        , MuonPT = config['MuonPT']
+                                        , MuonMINIPCHI2 = config['MuonMINIPCHI2']
+                                        , MuonTRCHI2 = config['MuonTRCHI2'])
+
+        # 4 : Make protons 
+        selProtons = makeProtons(name="ProtonsFor"+name
+                                 , ProtonP = config['ProtonP']
+                                 , ProtonPT = config['ProtonPT']
+                                 , ProtonMINIPCHI2 = config['ProtonMINIPCHI2']
+                                 , ProtonTRCHI2 = config['ProtonTRCHI2'])
+
+
+
+        # 5 : Make Electrons 
+        selElectrons = makeElectrons(name="ElectronsFor"+name
+                                 , EleP = config['EleP']
+                                 , ElePT = config['ElePT']
+                                 , EleMINIPCHI2 = config['EleMINIPCHI2']
+                                 , EleTRCHI2 = config['EleTRCHI2'])
+                                                             
+                
+
+        # 1a : Make Kaons for 3 body Control Samples
+        selKaonsFor3bodyCS  = makeKaonsFor3bodyCS(name="HadFor3bodyCSAndFor"+name
+                                             , KaonP = config['KaonP']
+                                             , KaonPT = config['KaonPT']
+                                             , KaonMINIPCHI2 = config['KaonMINIPCHI2']
+                                             , KaonTRCHI2 = config['KaonTRCHI2'])
+        
+        # 2a : Make Pions for 3 body  Control samples 
+        selPionsFor3bodyCS = makePionsFor3bodyCS(name="PionsFor3bodyCSAndFor"+name
+                                                 , PionP = config['PionP']
+                                                 , PionPT = config['PionPT']
+                                                 , PionMINIPCHI2 = config['PionMINIPCHI2']
+                                                 , PionTRCHI2 = config['PionTRCHI2'])
+
+        # 4 : Make protons for 3 body  Control samples 
+        selProtonsFor3bodyCS = makeProtonsFor3bodyCS(name="ProtonsFor3bodyCSAndFor"+name
+                                 , ProtonP = config['ProtonP']
+                                 , ProtonPT = config['ProtonPT']
+                                 , ProtonMINIPCHI2 = config['ProtonMINIPCHI2']
+                                 , ProtonTRCHI2 = config['ProtonTRCHI2'])
+
+
+
+        # 5 : Make Muons for hhmumu 
+        selMuonsForhhmumu = makeMuonsForhhmumu(name="MuonsForhhmumuAndFor"+name
+                                               , MuonP = config['MuonP']
+                                               , MuonPT = config['PT_hhmumu']
+                                               , MuonMINIPCHI2 = config['MINIPCHI2_hhmumu']
+                                               , MuonTRCHI2 = config['MuonTRCHI2']
+                                               , MuonPIDmu_CS_hhmumu = config['MuonPIDmu_hhmumu']
+                                               , ghostProbCut = config['GhostProbCut_hhmumu'])
+
+        # 6 : Make Kaons for hhmumu 
+        selKaonsForhhmumu  = makeKaonsForhhmumu(name="KaonsForhhmumuAndFor"+name
+                                                , KaonP = config['KaonP']
+                                                , KaonPT = config['PT_hhmumu']
+                                                , KaonPIDK = config['KaonPIDK']
+                                                , KaonMINIPCHI2 = config['MINIPCHI2_hhmumu']
+                                                , KaonTRCHI2 = config['KaonTRCHI2']
+                                                , ghostProbCut = config['GhostProbCut_hhmumu'])
+
+        # 7 : Make Pions for hhmumu 
+        selPionsForhhmumu = makePionsForhhmumu(name="PionsForForhhmumuAndFor"+name
+                                               , PionP = config['PionP']
+                                               , PionPT = config['PT_hhmumu']
+                                               , PionMINIPCHI2 = config['MINIPCHI2_hhmumu']
+                                               , PionTRCHI2 = config['PionTRCHI2']
+                                               , ghostProbCut = config['GhostProbCut_hhmumu'])
+
+
+
+        # 6a : Make Kaons for 4 body Control Samples
+        selKaonsFor4bodyCS  = makeKaonsFor4bodyCS(name="HadFor4bodyCSAndFor"+name
+                                                  , KaonP = config['KaonP']
+                                                  , KaonPT = config['PT_hhmumu']
+                                                  , KaonMINIPCHI2 = config['MINIPCHI2_4bodyCS']
+                                                  , KaonTRCHI2 = config['KaonTRCHI2']
+                                                  , ghostProbCut = config['GhostProbCut_hhmumu'])
+        
+        # 7a : Make Pions for 4 body Control samples 
+        selPionsFor4bodyCS = makePionsFor4bodyCS(name="PionsFor4bodyCSAndFor"+name
+                                                 , PionP = config['PionP']
+                                                 , PionPT = config['PT_hhmumu']
+                                                 , PionMINIPCHI2 = config['MINIPCHI2_4bodyCS']
+                                                 , PionTRCHI2 = config['PionTRCHI2']
+                                                 , ghostProbCut = config['GhostProbCut_hhmumu'])
+
+      
+
+        
+
+                                        
+        # 7 : Combine
+        selD2PiPiPi   = self._makeD2PiPiPi(name=PiCalLine_name,
+                                             pionSel = selPions,
+                                             muonSel = pionsAsMuons,
+                                             config = config)
+        
+        selD2PiMuMuOS = self._makeD2PiMuMuOS(name=PiOSLine_name,
+                                             pionSel = selPions,
+                                             muonSel = selMuons,
+                                             config = config)
+
+        selD2PiEEOS = self._makeD2PiEEOS(name=Pi_EE_OSLine_name,
+                                             pionSel = selPions,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selD2PiEMuOS = self._makeD2PiEMuOS(name=Pi_EMu_OSLine_name,
+                                             pionSel = selPions,
+                                             muonSel = selMuons,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selD2PiMuEOS = self._makeD2PiMuEOS(name=Pi_MuE_OSLine_name,
+                                             pionSel = selPions,
+                                             muonSel = selMuons,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selD2PiMuMuSS = self._makeD2PiMuMuSS(name=PiSSLine_name,
+                                             pionSel = selPions,
+                                             muonSel = selMuons,
+                                             config = config)
+
+        selD2PiEESS = self._makeD2PiEESS(name=Pi_EE_SSLine_name,
+                                         pionSel = selPions,
+                                         eleSel = selElectrons,
+                                         config = config)
+
+        selD2PiMuESS = self._makeD2PiMuESS(name=Pi_MuE_SSLine_name,
+                                           pionSel = selPions,
+                                           muonSel = selMuons,
+                                           eleSel = selElectrons,
+                                           config = config)
+
+        selD2KMuMuOS = self._makeD2KMuMuOS(name=KOSLine_name,
+                                           kaonSel = selKaons,
+                                           muonSel = selMuons,
+                                           config = config)
+
+        selD2KEEOS = self._makeD2KEEOS(name=K_EE_OSLine_name,
+                                             kaonSel = selKaons,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selD2KEMuOS = self._makeD2KEMuOS(name=K_EMu_OSLine_name,
+                                             kaonSel = selKaons,
+                                             muonSel = selMuons,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selD2KMuEOS = self._makeD2KMuEOS(name=K_MuE_OSLine_name,
+                                             kaonSel = selKaons,
+                                             muonSel = selMuons,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selD2KMuMuSS = self._makeD2KMuMuSS(name=KSSLine_name,
+                                           kaonSel = selKaons,
+                                           muonSel = selMuons,
+                                           config = config)
+
+        selD2KEESS = self._makeD2KEESS(name=K_EE_SSLine_name,
+                                       kaonSel = selKaons,
+                                       eleSel = selElectrons,
+                                       config = config)
+
+        selD2KMuESS = self._makeD2KMuESS(name=K_MuE_SSLine_name,
+                                         kaonSel = selKaons,
+                                         muonSel = selMuons,
+                                         eleSel = selElectrons,
+                                         config = config)
+
+        selD2K2Pi = self._makeD2K2Pi(name=K2PiLine_name,
+                                     kaonSel = selKaonsFor3bodyCS,
+                                     pionSel = selPionsFor3bodyCS,
+                                     config = config)
+        
+        selD22KPi = self._makeD22KPi(name=TwoKPiLine_name,
+                                     kaonSel = selKaonsFor3bodyCS,
+                                     pionSel = selPionsFor3bodyCS,
+                                     config = config)
+        
+        
+        
+        selD02KKMuMu = self._makeD02KKMuMu(name=KKLine_name,
+                                           kaonSel = selKaonsForhhmumu,
+                                           muonSel = selMuonsForhhmumu,
+                                           config = config)
+        
+        selD02PiPiMuMu = self._makeD02PiPiMuMu(name=PiPiLine_name,
+                                           pionSel = selPionsForhhmumu,
+                                           muonSel = selMuonsForhhmumu,
+                                           config = config)
+        
+        selD02KPiMuMu = self._makeD02KPiMuMu(name=KPiLine_name,
+                                             kaonSel = selKaonsForhhmumu,
+                                             pionSel = selPionsForhhmumu,
+                                             muonSel = selMuonsForhhmumu,
+                                             config = config)
+        
+        selD02KKPiPi = self._makeD02KKPiPi(name=KKPiPiLine_name,
+                                           kaonSel = selKaonsFor4bodyCS,
+                                           pionSel = selPionsFor4bodyCS,
+                                           config = config)
+
+        selD02K3Pi = self._makeD02K3Pi(name=K3PiLine_name,
+                                           kaonSel = selKaonsFor4bodyCS,
+                                           pionSel = selPionsFor4bodyCS,
+                                           config = config)
+
+        selD02PiPiPiPi = self._makeD02PiPiPiPi(name=PiPiPiPiLine_name,
+                                       pionSel = selPionsFor4bodyCS,
+                                       config = config)
+
+        selLambdac2PMuMu   = self._makeLambdac2PMuMu(name=Lambdac2PMuMuLine_name,
+                                                     protonSel = selProtons,
+                                                     muonSel = selMuons,
+                                                     config = config)
+
+        selLambdac2PEE = self._makeLambdac2PEE(name=Lambdac2PEELine_name,
+                                             protonSel = selProtons,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selLambdac2PEMu = self._makeLambdac2PEMu(name=Lambdac2PEMuLine_name,
+                                             protonSel = selProtons,
+                                             muonSel = selMuons,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selLambdac2PMuE = self._makeLambdac2PMuE(name=Lambdac2PMuELine_name,
+                                             protonSel = selProtons,
+                                             muonSel = selMuons,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selLambdac2PEMuSS = self._makeLambdac2PEMuSS(name=Lambdac2PEMuSSLine_name,
+                                             protonSel = selProtons,
+                                             muonSel = selMuons,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selLambdac2PMuMuSS   = self._makeLambdac2PMuMuSS(name=Lambdac2PMuMuSSLine_name,
+                                                     protonSel = selProtons,
+                                                     muonSel = selMuons,
+                                                     config = config)
+
+        selLambdac2PPiPi   = self._makeLambdac2PPiPi(name=Lambdac2PPiPiLine_name,
+                                                     protonSel = selProtonsFor3bodyCS,
+                                                     muonSel = selPionsFor3bodyCS,
+                                                     config = config)
+
+        selLambdac2PKPi   = self._makeLambdac2PKPi(name=Lambdac2PKPiLine_name,
+                                                     protonSel = selProtons,
+                                                     pionSel = selPions,
+                                                     kaonSel = selKaons,
+                                                     config = config)
+
+        selD2PiMuMuCal = self._makeD2PiMuMuCal(name=PiMuMuCalLine_name,
+                                             pionSel = selPions,
+                                             muonSel = selMuons,
+                                             config = config)
+
+        selD2PiEMuCal = self._makeD2PiEMuCal(name=PiEMuCalLine_name,
+                                             pionSel = selPions,
+                                             eleSel = selElectrons,
+                                             muonSel = selMuons,
+                                             config = config)
+
+        selD2PiEECal = self._makeD2PiEECal(name=PiEECalLine_name,
+                                             pionSel = selPions,
+                                             eleSel = selElectrons,
+                                             config = config)
+
+        selD2KMuMuCal = self._makeD2KMuMuCal(name=KMuMuCalLine_name,
+                                             kaonSel = selKaons,
+                                             muonSel = selMuons,
+                                             config = config)
+
+        selD2KEMuCal = self._makeD2KEMuCal(name=KEMuCalLine_name,
+                                             kaonSel = selKaons,
+                                             eleSel = selElectrons,
+                                             muonSel = selMuons,
+                                             config = config)
+        selD2KEECal = self._makeD2KEECal(name=KEECalLine_name,
+                                             kaonSel = selKaons,
+                                             eleSel = selElectrons,
+                                             config = config)
+       
+        # 8 : Declare Lines
+        self.PiCalLine = StrippingLine(PiCalLine_name+"Line",
+                                      prescale = config['D2PiPiPiCalLinePrescale'],
+                                      postscale = config['D2PiPiPiCalLinePostscale'],
+                                      selection = selD2PiPiPi,
+                                      RelatedInfoTools = _format_related_info(selD2PiPiPi, config['RelatedInfoTools'])
+                                       )
+
+        self.PiOSLine = StrippingLine(PiOSLine_name+"Line",
+                                      prescale = config['D2PiMuMuOSLinePrescale'],
+                                      postscale = config['D2PiMuMuOSLinePostscale'],
+                                      selection = selD2PiMuMuOS,
+                                      RelatedInfoTools = _format_related_info(selD2PiMuMuOS, config['RelatedInfoTools'])
+                                      )
+
+        self.Pi_EE_OSLine = StrippingLine(Pi_EE_OSLine_name+"Line",
+                                      prescale = config['D2PiEEOSLinePrescale'],
+                                      postscale = config['D2PiEEOSLinePostscale'],
+                                      selection = selD2PiEEOS,
+                                      RelatedInfoTools = _format_related_info(selD2PiEEOS, config['RelatedInfoTools'])
+                                      )
+        
+        self.Pi_EMu_OSLine = StrippingLine(Pi_EMu_OSLine_name+"Line",
+                                      prescale = config['D2PiEMuOSLinePrescale'],
+                                      postscale = config['D2PiEMuOSLinePostscale'],
+                                      selection = selD2PiEMuOS,
+                                      RelatedInfoTools = _format_related_info(selD2PiEMuOS, config['RelatedInfoTools'])
+                                      )
+
+        self.Pi_MuE_OSLine = StrippingLine(Pi_MuE_OSLine_name+"Line",
+                                      prescale = config['D2PiMuEOSLinePrescale'],
+                                      postscale = config['D2PiMuEOSLinePostscale'],
+                                      selection = selD2PiMuEOS,
+                                      RelatedInfoTools = _format_related_info(selD2PiMuEOS, config['RelatedInfoTools'])
+                                      )
+        
+        self.PiSSLine = StrippingLine(PiSSLine_name+"Line",
+                                      prescale = config['D2PiMuMuSSLinePrescale'],
+                                      postscale = config['D2PiMuMuSSLinePostscale'],
+                                      selection = selD2PiMuMuSS,
+                                      RelatedInfoTools = _format_related_info(selD2PiMuMuSS, config['RelatedInfoTools'])
+                                      )
+        self.Pi_EE_SSLine = StrippingLine(Pi_EE_SSLine_name+"Line",
+                                          prescale = config['D2PiEESSLinePrescale'],
+                                          postscale = config['D2PiEESSLinePostscale'],
+                                          selection = selD2PiEESS,
+                                          RelatedInfoTools = _format_related_info(selD2PiEESS, config['RelatedInfoTools'])
+                                          )
+        self.Pi_MuE_SSLine = StrippingLine(Pi_MuE_SSLine_name+"Line",
+                                           prescale = config['D2PiMuESSLinePrescale'],
+                                           postscale = config['D2PiMuESSLinePostscale'],
+                                           selection = selD2PiMuESS,
+                                           RelatedInfoTools = _format_related_info(selD2PiMuESS, config['RelatedInfoTools'])
+                                           )
+
+        self.KOSLine = StrippingLine(KOSLine_name+"Line",
+                                     prescale = config['D2KMuMuOSLinePrescale'],
+                                     postscale = config['D2KMuMuOSLinePostscale'],
+                                     selection = selD2KMuMuOS,
+                                     RelatedInfoTools = _format_related_info(selD2KMuMuOS, config['RelatedInfoTools'])
+                                     )
+
+        self.K_EE_OSLine = StrippingLine(K_EE_OSLine_name+"Line",
+                                      prescale = config['D2KEEOSLinePrescale'],
+                                      postscale = config['D2KEEOSLinePostscale'],
+                                      selection = selD2KEEOS,
+                                      RelatedInfoTools = _format_related_info(selD2KEEOS, config['RelatedInfoTools'])
+                                      )
+        self.K_EMu_OSLine = StrippingLine(K_EMu_OSLine_name+"Line",
+                                      prescale = config['D2KEMuOSLinePrescale'],
+                                      postscale = config['D2KEMuOSLinePostscale'],
+                                      selection = selD2KEMuOS,
+                                      RelatedInfoTools = _format_related_info(selD2KEMuOS, config['RelatedInfoTools'])
+                                      )
+
+        self.K_MuE_OSLine = StrippingLine(K_MuE_OSLine_name+"Line",
+                                      prescale = config['D2KMuEOSLinePrescale'],
+                                      postscale = config['D2KMuEOSLinePostscale'],
+                                      selection = selD2KMuEOS,
+                                      RelatedInfoTools = _format_related_info(selD2KMuEOS, config['RelatedInfoTools'])
+                                      )
+
+        self.KSSLine = StrippingLine(KSSLine_name+"Line",
+                                     prescale = config['D2KMuMuSSLinePrescale'],
+                                     postscale = config['D2KMuMuSSLinePostscale'],
+                                     selection = selD2KMuMuSS,
+                                     RelatedInfoTools = _format_related_info(selD2KMuMuSS, config['RelatedInfoTools'])
+                                     )
+
+        self.K_EE_SSLine = StrippingLine(K_EE_SSLine_name+"Line",
+                                         prescale = config['D2KEESSLinePrescale'],
+                                         postscale = config['D2KEESSLinePostscale'],
+                                         selection = selD2KEESS,
+                                         RelatedInfoTools = _format_related_info(selD2KEESS, config['RelatedInfoTools'])
+                                         )
+        
+        self.K_MuE_SSLine = StrippingLine(K_MuE_SSLine_name+"Line",
+                                          prescale = config['D2KMuESSLinePrescale'],
+                                          postscale = config['D2KMuESSLinePostscale'],
+                                          selection = selD2KMuESS,
+                                          RelatedInfoTools = _format_related_info(selD2KMuESS, config['RelatedInfoTools'])
+                                          )
+
+        self.K2PiLine = StrippingLine(K2PiLine_name+"Line",
+                                      prescale = config['D2K2PiLinePrescale'],
+                                      postscale = config['D2K2PiLinePostscale'],
+                                      selection = selD2K2Pi,
+                                      RelatedInfoTools = _format_related_info(selD2K2Pi, config['RelatedInfoTools'])
+                                      )
+
+        self.TwoKPiLine = StrippingLine(TwoKPiLine_name+"Line",
+                                        prescale = config['D22KPiLinePrescale'],
+                                        postscale = config['D22KPiLinePostscale'],
+                                        selection = selD22KPi,
+                                        RelatedInfoTools = _format_related_info(selD22KPi, config['RelatedInfoTools'])
+                                        )
+
+        
+        
+        self.KKLine = StrippingLine(KKLine_name+"Line",
+                                    prescale = config['D02KKMuMuLinePrescale'],
+                                    postscale = config['D02KKMuMuLinePostscale'],
+                                    selection = selD02KKMuMu
+                                    )
+        
+        self.PiPiLine = StrippingLine(PiPiLine_name+"Line",
+                                    prescale = config['D02PiPiMuMuLinePrescale'],
+                                    postscale = config['D02PiPiMuMuLinePostscale'],
+                                    selection = selD02PiPiMuMu
+                                    )
+        
+        self.KPiLine = StrippingLine(KPiLine_name+"Line",
+                                     prescale = config['D02KPiMuMuLinePrescale'],
+                                     postscale = config['D02KPiMuMuLinePostscale'],
+                                     selection = selD02KPiMuMu
+                                     )
+        
+        self.KKPiPiLine = StrippingLine(KKPiPiLine_name+"Line",
+                                    prescale = config['D02KKPiPiLinePrescale'],
+                                    postscale = config['D02KKPiPiLinePostscale'],
+                                    selection = selD02KKPiPi
+                                    )
+
+        self.K3PiLine = StrippingLine(K3PiLine_name+"Line",
+                                        prescale = config['D02K3PiLinePrescale'],
+                                        postscale = config['D02K3PiLinePostscale'],
+                                        selection = selD02K3Pi
+                                        )
+
+        self.PiPiPiPiLine = StrippingLine(PiPiPiPiLine_name+"Line",
+                                        prescale = config['D02PiPiPiPiLinePrescale'],
+                                        postscale = config['D02PiPiPiPiLinePostscale'],
+                                        selection = selD02PiPiPiPi
+                                        )
+
+ 
+        self.Lambdac2PMuMuLine = StrippingLine(Lambdac2PMuMuLine_name+"Line",
+                                               prescale = config['Lambdac2PMuMuLinePrescale'],
+                                               postscale = config['Lambdac2PMuMuLinePostscale'],
+                                               selection = selLambdac2PMuMu,
+                                               RelatedInfoTools = _format_related_info(selLambdac2PMuMu, config['RelatedInfoTools'])
+                                               )
+
+        self.Lambdac2PEELine = StrippingLine(Lambdac2PEELine_name+"Line",
+                                               prescale = config['Lambdac2PEELinePrescale'],
+                                               postscale = config['Lambdac2PEELinePostscale'],
+                                               selection = selLambdac2PEE,
+                                               RelatedInfoTools = _format_related_info(selLambdac2PEE, config['RelatedInfoTools'])
+                                               )
+        self.Lambdac2PEMuLine = StrippingLine(Lambdac2PEMuLine_name+"Line",
+                                               prescale = config['Lambdac2PEMuLinePrescale'],
+                                               postscale = config['Lambdac2PEMuLinePostscale'],
+                                               selection = selLambdac2PEMu,
+                                               RelatedInfoTools = _format_related_info(selLambdac2PEMu, config['RelatedInfoTools'])
+                                               )
+
+        self.Lambdac2PMuELine = StrippingLine(Lambdac2PMuELine_name+"Line",
+                                               prescale = config['Lambdac2PMuELinePrescale'],
+                                               postscale = config['Lambdac2PMuELinePostscale'],
+                                               selection = selLambdac2PMuE,
+                                               RelatedInfoTools = _format_related_info(selLambdac2PMuE, config['RelatedInfoTools'])
+                                               )        
+
+        self.Lambdac2PMuMuSSLine = StrippingLine(Lambdac2PMuMuSSLine_name+"Line",
+                                               prescale = config['Lambdac2PMuMuSSLinePrescale'],
+                                               postscale = config['Lambdac2PMuMuSSLinePostscale'],
+                                               selection = selLambdac2PMuMuSS
+                                               #, RelatedInfoTools = _format_related_info(selLambdac2PMuMu, config['RelatedInfoTools'])
+                                               )
+
+        self.Lambdac2PEMuSSLine = StrippingLine(Lambdac2PEMuSSLine_name+"Line",
+                                               prescale = config['Lambdac2PEMuSSLinePrescale'],
+                                               postscale = config['Lambdac2PEMuSSLinePostscale'],
+                                               selection = selLambdac2PEMuSS
+                                               #, RelatedInfoTools = _format_related_info(selLambdac2PEMu, config['RelatedInfoTools'])
+                                               )
+
+        self.Lambdac2PPiPiLine = StrippingLine(Lambdac2PPiPiLine_name+"Line",
+                                               prescale = config['Lambdac2PPiPiLinePrescale'],
+                                               postscale = config['Lambdac2PPiPiLinePostscale'],
+                                               selection = selLambdac2PPiPi,
+                                               RelatedInfoTools = _format_related_info(selLambdac2PPiPi, config['RelatedInfoTools'])
+                                               )
+
+
+        self.Lambdac2PKPiLine = StrippingLine(Lambdac2PKPiLine_name+"Line",
+                                               prescale = config['Lambdac2PKPiLinePrescale'],
+                                               postscale = config['Lambdac2PKPiLinePostscale'],
+                                               selection = selLambdac2PKPi,
+                                               RelatedInfoTools = _format_related_info(selLambdac2PKPi, config['RelatedInfoTools'])
+                                               )
+ 
+        
+        self.PiMuMuCalLine = StrippingLine(PiMuMuCalLine_name+"Line",
+                                      prescale = config['D2PiMuMuCalLinePrescale'],
+                                      postscale = config['D2PiMuMuCalLinePostscale'],
+                                      selection = selD2PiMuMuCal,
+                                      RelatedInfoTools = _format_related_info(selD2PiMuMuCal, config['RelatedInfoTools'])
+                                       )
+        
+        self.PiEMuCalLine = StrippingLine(PiEMuCalLine_name+"Line",
+                                      prescale = config['D2PiEMuCalLinePrescale'],
+                                      postscale = config['D2PiEMuCalLinePostscale'],
+                                      selection = selD2PiEMuCal,
+                                      RelatedInfoTools = _format_related_info(selD2PiEMuCal, config['RelatedInfoTools'])
+                                       )
+
+        self.PiEECalLine = StrippingLine(PiEECalLine_name+"Line",
+                                      prescale = config['D2PiEECalLinePrescale'],
+                                      postscale = config['D2PiEECalLinePostscale'],
+                                      selection = selD2PiEECal,
+                                      RelatedInfoTools = _format_related_info(selD2PiEECal, config['RelatedInfoTools'])
+                                       )
+
+        self.KMuMuCalLine = StrippingLine(KMuMuCalLine_name+"Line",
+                                      prescale = config['D2KMuMuCalLinePrescale'],
+                                      postscale = config['D2KMuMuCalLinePostscale'],
+                                      selection = selD2KMuMuCal,
+                                      RelatedInfoTools = _format_related_info(selD2KMuMuCal, config['RelatedInfoTools'])
+                                       )
+        
+        self.KEMuCalLine = StrippingLine(KEMuCalLine_name+"Line",
+                                      prescale = config['D2KEMuCalLinePrescale'],
+                                      postscale = config['D2KEMuCalLinePostscale'],
+                                      selection = selD2KEMuCal,
+                                      RelatedInfoTools = _format_related_info(selD2KEMuCal, config['RelatedInfoTools'])
+                                       )
+
+        self.KEECalLine = StrippingLine(KEECalLine_name+"Line",
+                                      prescale = config['D2KEECalLinePrescale'],
+                                      postscale = config['D2KEECalLinePostscale'],
+                                      selection = selD2KEECal,
+                                      RelatedInfoTools = _format_related_info(selD2KEECal, config['RelatedInfoTools'])
+                                       )
+
+        # 9 : register Line
+        self.registerLine( self.KSSLine )
+        self.registerLine( self.KOSLine )
+        self.registerLine( self.K_EE_OSLine )
+        self.registerLine( self.K_EMu_OSLine )
+        self.registerLine( self.K_MuE_OSLine )
+        self.registerLine( self.K_EE_SSLine )
+        self.registerLine( self.K_MuE_SSLine )
+
+        self.registerLine( self.PiSSLine )
+        self.registerLine( self.PiOSLine )
+        self.registerLine( self.Pi_EE_OSLine )
+        self.registerLine( self.Pi_EMu_OSLine )
+        self.registerLine( self.Pi_MuE_OSLine )
+        self.registerLine( self.Pi_EE_SSLine )
+        self.registerLine( self.Pi_MuE_SSLine )
+
+        self.registerLine( self.PiCalLine )
+        self.registerLine( self.K2PiLine )
+        self.registerLine( self.TwoKPiLine )
+        
+        self.registerLine( self.KKLine )
+        self.registerLine( self.PiPiLine )
+        self.registerLine( self.KPiLine )
+        self.registerLine( self.KKPiPiLine )
+        self.registerLine( self.K3PiLine )
+        self.registerLine( self.PiPiPiPiLine )
+
+        self.registerLine( self.Lambdac2PMuMuLine )
+        self.registerLine( self.Lambdac2PEELine )
+        self.registerLine( self.Lambdac2PEMuLine )
+        self.registerLine( self.Lambdac2PMuELine )
+
+        self.registerLine( self.Lambdac2PEMuSSLine )
+        self.registerLine( self.Lambdac2PMuMuSSLine )
+
+        self.registerLine( self.Lambdac2PPiPiLine )
+        self.registerLine( self.Lambdac2PKPiLine )
+        
+        self.registerLine( self.PiMuMuCalLine )
+        self.registerLine( self.PiEMuCalLine )
+        self.registerLine( self.PiEECalLine )
+        self.registerLine( self.KMuMuCalLine )
+        self.registerLine( self.KEMuCalLine )
+        self.registerLine( self.KEECalLine )
+
+#####################################################
+    def _makeD2PiPiPi(self, name, pionSel, muonSel, config):
+        """
+        Handy interface for D2PiPiPi
+        """
+        return makeD2PiPiPi(name
+                            , pionSel
+                            , muonSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , DMassWin = config['DMassWin']
+                            , DMassLow = config['DMassLow']
+                            , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2PiMuMuOS(self, name, pionSel, muonSel, config):
+        """
+        Handy interface for D2PiMuMuOS
+        """
+        return makeD2PiMuMuOS(name
+                              , pionSel
+                              , muonSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2PiEEOS(self, name, pionSel, eleSel, config):
+        """
+        Handy interface for D2PiEEOS
+        """
+        return makeD2PiEEOS(name
+                              , pionSel
+                              , eleSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2PiEMuOS(self, name, pionSel, muonSel, eleSel, config):
+        """
+        Handy interface for D2PiEMuOS
+        """
+        return makeD2PiEMuOS(name
+                              , pionSel
+                              , muonSel
+                              , eleSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2PiMuEOS(self, name, pionSel, muonSel, eleSel, config):
+        """
+        Handy interface for D2PiMuEOS
+        """
+        return makeD2PiMuEOS(name
+                              , pionSel
+                              , muonSel
+                              , eleSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+
+#####################################################
+    def _makeD2PiMuMuSS(self, name, pionSel, muonSel, config):
+        """
+        Handy interface for D2PiMuMuSS
+        """
+        return makeD2PiMuMuSS(name
+                              , pionSel
+                              , muonSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2PiEESS(self, name, pionSel, eleSel, config):
+        """
+        Handy interface for D2PiEESS
+        """
+        return makeD2PiEESS(name
+                            , pionSel
+                            , eleSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , DMassWin = config['DMassWin']
+                            , DMassLow = config['DMassLow']
+                            , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2PiMuESS(self, name, pionSel, muonSel, eleSel, config):
+        """
+        Handy interface for D2PiMuESS
+        """
+        return makeD2PiMuESS(name
+                            , pionSel
+                            , muonSel
+                            , eleSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , DMassWin = config['DMassWin']
+                            , DMassLow = config['DMassLow']
+                            , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2KMuMuOS(self, name, kaonSel, muonSel, config):
+        """
+        Handy interface for D2XMuMu
+        """
+        return makeD2KMuMuOS(name
+                             , kaonSel
+                             , muonSel
+                             , DMAXDOCA = config['DMAXDOCA']
+                             , DVCHI2DOF = config['DVCHI2DOF']
+                             , DDIRA = config['DDIRA']
+                             , DIPCHI2 = config['DIPCHI2']
+                             , DMassWin = config['DMassWin']
+                             , DMassLow = config['DMassLow']
+                             , DimuonMass = config['DimuonMass'])
+
+
+#####################################################
+    def _makeD2KEEOS(self, name, kaonSel, eleSel, config):
+        """
+        Handy interface for D2KEEOS
+        """
+        return makeD2KEEOS(name
+                              , kaonSel
+                              , eleSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2KEMuOS(self, name, kaonSel, muonSel, eleSel, config):
+        """
+        Handy interface for D2KEMuOS
+        """
+        return makeD2KEMuOS(name
+                              , kaonSel
+                              , muonSel
+                              , eleSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2KMuEOS(self, name, kaonSel, muonSel, eleSel, config):
+        """
+        Handy interface for D2KMuEOS
+        """
+        return makeD2KMuEOS(name
+                              , kaonSel
+                              , muonSel
+                              , eleSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+
+
+
+#####################################################
+    def _makeD2KMuMuSS(self, name, kaonSel, muonSel, config):
+        """
+        Handy interface for D2XMuMu
+        """
+        return makeD2KMuMuSS(name
+                             , kaonSel
+                             , muonSel
+                             , DMAXDOCA = config['DMAXDOCA']
+                             , DVCHI2DOF = config['DVCHI2DOF']
+                             , DDIRA = config['DDIRA']
+                             , DIPCHI2 = config['DIPCHI2']
+                             , DMassWin = config['DMassWin']
+                             , DMassLow = config['DMassLow']
+                             , DimuonMass = config['DimuonMass'])
+
+
+#####################################################
+    def _makeD2K2Pi(self, name, kaonSel, pionSel, config):
+        """
+        Handy interface for D2K2pi
+        """
+        return makeD2K2Pi(name
+                             , kaonSel
+                             , pionSel
+                             , OneKaonPID = config['KaonPIDK']
+                             , DMAXDOCA = config['DMAXDOCA']
+                             , DVCHI2DOF = config['DVCHI2DOF']
+                             , DDIRA = config['DDIRA']
+                             , DIPCHI2 = config['DIPCHI2']
+                             , DMassWin = config['DMassWin']
+                             , DMassLow = config['DMassLow']
+                             , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2KEESS(self, name, kaonSel, eleSel, config):
+        """
+        Handy interface for D2KEESS
+        """
+        return makeD2KEESS(name
+                            , kaonSel
+                            , eleSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , DMassWin = config['DMassWin']
+                            , DMassLow = config['DMassLow']
+                            , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2KMuESS(self, name, kaonSel, muonSel, eleSel, config):
+        """
+        Handy interface for D2KMuESS
+        """
+        return makeD2KMuESS(name
+                            , kaonSel
+                            , muonSel
+                            , eleSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , DMassWin = config['DMassWin']
+                            , DMassLow = config['DMassLow']
+                            , DimuonMass = config['DimuonMass'])
+
+
+#####################################################
+    def _makeD22KPi(self, name, kaonSel, pionSel, config):
+        """
+        Handy interface for D22Kpi
+        """
+        return makeD22KPi(name
+                             , kaonSel
+                             , pionSel
+                             , OneKaonPID = config['KaonPIDK']
+                             , DMAXDOCA = config['DMAXDOCA']
+                             , DVCHI2DOF = config['DVCHI2DOF']
+                             , DDIRA = config['DDIRA']
+                             , DIPCHI2 = config['DIPCHI2']
+                             , DMassWin = config['DMassWin']
+                             , DMassLow = config['DMassLow']
+                             , DimuonMass = config['DimuonMass'])
+
+
+
+
+
+#####################################################
+    def _makeD02KKMuMu(self, name, kaonSel, muonSel, config):
+        """
+        Handy interface for D0KKMuMu
+        """
+        return makeD02KKMuMu(name
+                             , kaonSel
+                             , muonSel
+                             , DMAXDOCA = config['DMAXDOCA_hhmumu']
+                             , DPT = config['DPT_hhmumu']
+                             , DdauMAXIPCHI2= config['DdauMAXIPCHI2_hhmumu']
+                             , DFDCHI2= config['DFDCHI2_hhmumu']
+                             , DVCHI2DOF = config['DVCHI2DOF_hhmumu']
+                             , DDIRA = config['DDIRA']
+                             , DIPCHI2 = config['DIPCHI2_hhmumu']
+                             , DMassWin = config['DMassWin_CS_hhmumu']
+                             , DMassLow = config['DMassLow']
+                             , DimuonMass = config['DimuonMass'])
+
+
+#####################################################
+    def _makeD02PiPiMuMu(self, name, pionSel, muonSel, config):
+        """
+        Handy interface for D0PiPiMuMu
+        """
+        return makeD02PiPiMuMu(name
+                               , pionSel
+                               , muonSel
+                               , DMAXDOCA = config['DMAXDOCA_hhmumu']
+                               , DPT = config['DPT_hhmumu']
+                               , DdauMAXIPCHI2= config['DdauMAXIPCHI2_hhmumu']
+                               , DFDCHI2= config['DFDCHI2_hhmumu']
+                               , DVCHI2DOF = config['DVCHI2DOF_hhmumu']
+                               , DDIRA = config['DDIRA']
+                               , DIPCHI2 = config['DIPCHI2_hhmumu']
+                               , DMassWin = config['DMassWin_CS_hhmumu']
+                               , DMassLow = config['DMassLow']
+                               , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD02KPiMuMu(self, name, kaonSel, pionSel, muonSel, config):
+        """
+        Handy interface for D0KPiMuMu
+        """
+        return makeD02KPiMuMu(name
+                              , kaonSel
+                              , pionSel
+                              , muonSel
+                              , DMAXDOCA = config['DMAXDOCA_hhmumu']
+                              , DPT = config['DPT_hhmumu']
+                              , DdauMAXIPCHI2= config['DdauMAXIPCHI2_hhmumu']
+                              , DFDCHI2= config['DFDCHI2_hhmumu']
+                              , DVCHI2DOF = config['DVCHI2DOF_hhmumu']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2_hhmumu']
+                              , DMassWin = config['DMassWin_CS_hhmumu']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+    
+#####################################################
+    def _makeD02KKPiPi(self, name, kaonSel, pionSel, config):
+        """
+        Handy interface for D0KKpipi
+        """
+        return makeD02KKPiPi(name
+                             , kaonSel
+                             , pionSel
+                             , OneKaonPID = config['KaonPIDK']
+                             , DMAXDOCA = config['DMAXDOCA_hhmumu']
+                             , DPT = config['DPT_hhmumu']
+                             , DdauMAXIPCHI2= config['DdauMAXIPCHI2_hhmumu']
+                             , DFDCHI2= config['DFDCHI2_hhmumu']
+                             , DVCHI2DOF = config['DVCHI2DOF_hhmumu']
+                             , DDIRA = config['DDIRA']
+                             , DIPCHI2 = config['DIPCHI2_4bodyCS']
+                             , DMassWin = config['DMassWin_CS_hhmumu']
+                             , DMassLow = config['DMassLow'])
+
+#####################################################
+    def _makeD02K3Pi(self, name, kaonSel, pionSel, config):
+        """
+        Handy interface for D0K3pi
+        """
+        return makeD02K3Pi(name
+                             , kaonSel
+                             , pionSel
+                             , OneKaonPID = config['KaonPIDK']
+                             , DPT = config['DPT_hhmumu'] 
+                             , DMAXDOCA = config['DMAXDOCA_hhmumu']
+                             , DdauMAXIPCHI2= config['DdauMAXIPCHI2_hhmumu']
+                             , DFDCHI2= config['DFDCHI2_hhmumu']
+                             , DVCHI2DOF = config['DVCHI2DOF_hhmumu']
+                             , DDIRA = config['DDIRA']
+                             , DIPCHI2 = config['DIPCHI2_4bodyCS']
+                             , DMassWin = config['DMassWin_CS_hhmumu']
+                             , DMassLow = config['DMassLow'])
+
+
+#####################################################
+    def _makeD02PiPiPiPi(self, name, pionSel, config):
+        """
+        Handy interface for D0pipipipi
+        """
+        return makeD02PiPiPiPi(name
+                               , pionSel
+                               , DMAXDOCA = config['DMAXDOCA_hhmumu']
+                               , DPT = config['DPT_hhmumu']
+                               , DdauMAXIPCHI2= config['DdauMAXIPCHI2_hhmumu']
+                               , DFDCHI2= config['DFDCHI2_hhmumu']
+                               , DVCHI2DOF = config['DVCHI2DOF_hhmumu']
+                               , DDIRA = config['DDIRA']
+                               , DIPCHI2 = config['DIPCHI2_4bodyCS']
+                               , DMassWin = config['DMassWin_CS_hhmumu']
+                               , DMassLow = config['DMassLow'])
+
+
+
+#####################################################
+    def _makeLambdac2PMuMu(self, name, protonSel, muonSel, config):
+        """
+        Handy interface for Lambdac2PMuMu
+        """
+        return makeLambdac2PMuMu(name
+                            , protonSel
+                            , muonSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , LambdacMassWin = config['LambdacMassWinRare']
+                            , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeLambdac2PMuMuSS(self, name, protonSel, muonSel, config):
+        """
+        Handy interface for Lambdac2PMuMu
+        """
+        return makeLambdac2PMuMuSS(name
+                            , protonSel
+                            , muonSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , LambdacMassWin = config['LambdacMassWinRare']
+                            , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeLambdac2PEE(self, name, protonSel, eleSel, config):
+        """
+        Handy interface for Lambdac2PEE
+        """
+        return makeLambdac2PEE(name
+                            , protonSel
+                            , eleSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , LambdacMassWin = config['LambdacMassWinRare']
+                            , DimuonMass = config['DimuonMass'])
+
+
+#####################################################
+    def _makeLambdac2PEMu(self, name, protonSel, muonSel, eleSel, config):
+        """
+        Handy interface for Lambdac2PEMu
+        """
+        return makeLambdac2PEMu(name
+                            , protonSel
+                            , muonSel
+                            , eleSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , LambdacMassWin = config['LambdacMassWinRare']
+                            , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeLambdac2PEMuSS(self, name, protonSel, muonSel, eleSel, config):
+        """
+        Handy interface for Lambdac2PEMu
+        """
+        return makeLambdac2PEMuSS(name
+                            , protonSel
+                            , muonSel
+                            , eleSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , LambdacMassWin = config['LambdacMassWinRare']
+                            , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeLambdac2PMuE(self, name, protonSel, muonSel, eleSel, config):
+        """
+        Handy interface for Lambdac2PMuE
+        """
+        return makeLambdac2PMuE(name
+                            , protonSel
+                            , muonSel
+                            , eleSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , LambdacMassWin = config['LambdacMassWinRare']
+                            , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeLambdac2PKPi(self, name, protonSel, pionSel, kaonSel, config):
+        """
+        Handy interface for Lambdac2PKPi
+        """
+        return makeLambdac2PKPi(name
+                            , protonSel
+                            , kaonSel
+                            , pionSel
+                            , DMAXDOCA = config['DMAXDOCA']
+                            , DVCHI2DOF = config['DVCHI2DOF']
+                            , DDIRA = config['DDIRA']
+                            , DIPCHI2 = config['DIPCHI2']
+                            , LambdacMassWin = config['LambdacMassWin'] 
+                            , DimuonMass = config['DimuonMass'])
+
+
+
+
+#####################################################
+    def _makeLambdac2PPiPi(self, name, protonSel, muonSel, config):
+        """
+        Handy interface for Lambdac2PMuMu
+        """
+        return makeLambdac2PPiPi(name
+                                 , protonSel
+                                 , muonSel
+                                 , DMAXDOCA = config['DMAXDOCA']
+                                 , DVCHI2DOF = config['DVCHI2DOF']
+                                 , DDIRA = config['DDIRA']
+                                 , DIPCHI2 = config['DIPCHI2']
+                                 , LambdacMassWin = config['LambdacMassWin']
+                                 , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2PiMuMuCal(self, name, pionSel, muonSel, config):
+        """
+        Handy interface for D2PiMuMuCal
+        """
+        return makeD2PiMuMuCal(name
+                              , pionSel
+                              , muonSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2PiEMuCal(self, name, pionSel, eleSel, muonSel, config):
+        """
+        Handy interface for D2PiEMuCal
+        """
+        return makeD2PiEMuCal(name
+                              , pionSel
+                              , eleSel
+                              , muonSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2PiEECal(self, name, pionSel, eleSel, config):
+        """
+        Handy interface for D2PiEECal
+        """
+        return makeD2PiEECal(name
+                              , pionSel
+                              , eleSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2KMuMuCal(self, name, kaonSel, muonSel, config):
+        """
+        Handy interface for D2KMuMuCal
+        """
+        return makeD2KMuMuCal(name
+                              , kaonSel
+                              , muonSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2KEMuCal(self, name, kaonSel, eleSel, muonSel, config):
+        """
+        Handy interface for D2KEMuCal
+        """
+        return makeD2KEMuCal(name
+                              , kaonSel
+                              , eleSel
+                              , muonSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+#####################################################
+    def _makeD2KEECal(self, name, kaonSel, eleSel, config):
+        """
+        Handy interface for D2KEECal
+        """
+        return makeD2KEECal(name
+                              , kaonSel
+                              , eleSel
+                              , DMAXDOCA = config['DMAXDOCA']
+                              , DVCHI2DOF = config['DVCHI2DOF']
+                              , DDIRA = config['DDIRA']
+                              , DIPCHI2 = config['DIPCHI2']
+                              , DMassWin = config['DMassWin']
+                              , DMassLow = config['DMassLow']
+                              , DimuonMass = config['DimuonMass'])
+
+
+#####################################################
+#
+# Out of class
+#####################################################
+def makeD2PiPiPi(name, pionSel, muonSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> pi+ (pi+ pi-)
+    """
+    rhos=Selection("pre"+name,
+                   Algorithm = CombineParticles(DecayDescriptor = "rho(770)0 -> pi+ pi-",MotherCut = "ALL"),
+                   RequiredSelections=[muonSel] )
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> pi+ rho(770)0]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ rhos, pionSel ] )
+
+#####################################################
+def makeD2PiMuMuOS(name, pionSel, muonSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> pi+ mu+ mu- 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> pi+ mu+ mu-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ muonSel, pionSel ] )
+
+
+#####################################################
+def makeD2PiEEOS(name, pionSel, eleSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> pi+ e+ e- 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> pi+ e+ e-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ eleSel, pionSel ] )
+
+#####################################################
+def makeD2PiEMuOS(name, pionSel, muonSel, eleSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> pi+ e+ mu- 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> pi+ e+ mu-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ eleSel, pionSel, muonSel ] )
+
+#####################################################
+def makeD2PiMuEOS(name, pionSel, muonSel, eleSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> pi+ mu+ e- 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> pi+ mu+ e-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ eleSel, pionSel, muonSel ] )
+
+
+#####################################################
+def makeD2PiMuMuSS(name, pionSel, muonSel, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D- -> pi+ mu- mu-
+    """
+    
+    _combcut = "(ADAMASS('D-') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D- -> pi+ mu- mu-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [  muonSel, pionSel ] )
+
+#####################################################
+def makeD2PiEESS(name, pionSel, eleSel, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D- -> pi+ e- e-
+    """
+    
+    _combcut = "(ADAMASS('D-') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D- -> pi+ e- e-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [  eleSel, pionSel ] )
+
+#####################################################
+def makeD2PiMuESS(name, pionSel, muonSel, eleSel, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D- -> pi+ mu- e-
+    """
+    
+    _combcut = "(ADAMASS('D-') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D- -> pi+ mu- e-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [  muonSel, pionSel, eleSel ] )
+
+#####################################################
+def makeD2KMuMuOS(name, kaonSel, muonSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> K+ mu+ mu-
+    """
+    
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> K+ mu+ mu-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ muonSel, kaonSel ] )
+
+
+#####################################################
+def makeD2KEEOS(name, kaonSel, eleSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> K+ e+ e- 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> K+ e+ e-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ eleSel, kaonSel ] )
+
+#####################################################
+def makeD2KEMuOS(name, kaonSel, muonSel, eleSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> K+ e+ mu- 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> K+ e+ mu-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ eleSel, kaonSel, muonSel ] )
+
+#####################################################
+def makeD2KMuEOS(name, kaonSel, muonSel, eleSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> K+ mu+ e- 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> K+ mu+ e-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ eleSel, kaonSel, muonSel ] )
+
+
+
+
+#####################################################
+def makeD2KMuMuSS(name, kaonSel, muonSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D- -> K+ mu- mu-
+    """
+    
+    _combcut = "(ADAMASS('D-') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D- -> K+ mu- mu-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ muonSel, kaonSel ] )
+
+#####################################################
+def makeD2KEESS(name, kaonSel, eleSel, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D- -> K+ e- e-
+    """
+    
+    _combcut = "(ADAMASS('D-') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D- -> K+ e- e-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [  eleSel, kaonSel ] )
+
+#####################################################
+def makeD2KMuESS(name, kaonSel, muonSel, eleSel, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D- -> K+ mu- e-
+    """
+    
+    _combcut = "(ADAMASS('D-') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D- -> K+ mu- e-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [  muonSel, kaonSel, eleSel ] )
+
+#####################################################
+def makeD2K2Pi(name, kaonSel, pionSel, OneKaonPID, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    
+    """
+    Makes the D+ -> K- pi+ pi+ 
+    """
+    
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV) &" \
+               "(AHASCHILD( (ABSID=='K+') & (PIDK-PIDpi > %(OneKaonPID)s)  ))" %locals()
+
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> K- pi+ pi+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ kaonSel, pionSel ] )
+
+
+
+#####################################################
+def makeD22KPi(name, kaonSel, pionSel, OneKaonPID, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    
+    """
+    Makes the D+ -> K- K+ pi+ 
+    """
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM23 > %(DimuonMass)s *MeV) &" \
+               "(AM > %(DMassLow)s *MeV) &" \
+               "(AHASCHILD( (ABSID=='K+') & (PIDK-PIDpi > %(OneKaonPID)s)  ))" %locals()
+    
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> K+ K- pi+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ kaonSel, pionSel ] )
+
+
+
+
+
+
+#####################################################
+def makeD02KKMuMu(name, kaonSel, muonSel, DMAXDOCA, DdauMAXIPCHI2, DFDCHI2, DVCHI2DOF, DDIRA, DIPCHI2, DMassWin, DMassLow, DimuonMass, DPT):
+    
+    """
+    Makes the D0 -> K+ K- mu+ mu-
+    """
+    
+    _combcut = "(ADAMASS('D0') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM34 > %(DimuonMass)s *MeV) &"\
+               "(AHASCHILD( (MIPCHI2DV(PRIMARY)>%(DdauMAXIPCHI2)s)  )   )" %locals()
+
+
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(PT > %(DPT)s *MeV) &"\
+              "(BPVVDCHI2>%(DFDCHI2)s) & (BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "D0 -> K+ K- mu+ mu-",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ muonSel, kaonSel ] )
+
+
+#####################################################
+def makeD02PiPiMuMu(name, pionSel, muonSel, DMAXDOCA, DdauMAXIPCHI2, DFDCHI2, DVCHI2DOF, DDIRA, DIPCHI2, DMassWin, DMassLow, DimuonMass, DPT):
+    
+    """
+    Makes the D0 -> pi+ pi- mu+ mu-
+    """
+    
+    _combcut = "(ADAMASS('D0') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM34 > %(DimuonMass)s *MeV) &"\
+               "(AHASCHILD( (MIPCHI2DV(PRIMARY)>%(DdauMAXIPCHI2)s)  )   )" %locals()
+
+
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(PT > %(DPT)s *MeV) &"\
+              "(BPVVDCHI2>%(DFDCHI2)s) & (BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "D0 -> pi+ pi- mu+ mu-",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ muonSel, pionSel] )
+
+#####################################################
+def makeD02KPiMuMu(name, kaonSel, pionSel, muonSel, DMAXDOCA, DdauMAXIPCHI2, DFDCHI2, DVCHI2DOF, DDIRA, DIPCHI2, DMassWin, DMassLow, DimuonMass, DPT):
+    
+    """
+    Makes the D0 -> K- pi+ mu+ mu-
+    """
+    
+    _combcut = "(ADAMASS('D0') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AM34 > %(DimuonMass)s *MeV) &"\
+               "(AHASCHILD( (MIPCHI2DV(PRIMARY)>%(DdauMAXIPCHI2)s)  )   )" %locals()
+
+
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(PT > %(DPT)s *MeV) &"\
+              "(BPVVDCHI2>%(DFDCHI2)s) & (BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D0 -> K- pi+ mu+ mu-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ muonSel, kaonSel, pionSel] )
+
+
+#####################################################
+def makeD02KKPiPi(name, kaonSel, pionSel, OneKaonPID, DMAXDOCA, DdauMAXIPCHI2, DFDCHI2, DVCHI2DOF, DDIRA, DIPCHI2, DMassWin, DMassLow, DPT):
+    
+    """
+    Makes the D0 -> K+ K- pi+ pi-
+    """
+    
+    _combcut = "(ADAMASS('D0') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AHASCHILD( (ABSID=='K+') & (PIDK-PIDpi > %(OneKaonPID)s)  )) &"\
+               "(AHASCHILD( (MIPCHI2DV(PRIMARY)>%(DdauMAXIPCHI2)s)  )   )" %locals()
+
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(PT > %(DPT)s *MeV) &"\
+              "(BPVVDCHI2>%(DFDCHI2)s) & (BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "D0 -> K+ K- pi+ pi-",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ kaonSel, pionSel ] )
+
+
+
+#####################################################
+def makeD02K3Pi(name, kaonSel, pionSel, OneKaonPID, DMAXDOCA, DdauMAXIPCHI2, DFDCHI2, DVCHI2DOF, DDIRA, DIPCHI2, DMassWin, DMassLow, DPT):
+    
+    """
+    Makes the D0 -> K- pi+ pi+ pi-
+    """
+    
+    _combcut = "(ADAMASS('D0') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AHASCHILD( (ABSID=='K+') & (PIDK-PIDpi > %(OneKaonPID)s)  )) &"\
+               "(AHASCHILD( (MIPCHI2DV(PRIMARY)>%(DdauMAXIPCHI2)s)  )   )" %locals()
+
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(PT > %(DPT)s *MeV) &"\
+              "(BPVVDCHI2>%(DFDCHI2)s) & (BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "[D0 -> K- pi+ pi- pi+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ kaonSel, pionSel ] )
+
+
+
+#####################################################
+def makeD02PiPiPiPi(name, pionSel, DMAXDOCA, DdauMAXIPCHI2, DFDCHI2, DVCHI2DOF, DDIRA, DIPCHI2, DMassWin, DMassLow, DPT):
+    
+    """
+    Makes the D0 -> pi+ pi- pi+ pi-
+    """
+    
+    _combcut = "(ADAMASS('D0') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM > %(DMassLow)s *MeV) &"\
+               "(AHASCHILD( (MIPCHI2DV(PRIMARY)>%(DdauMAXIPCHI2)s)  )   )" %locals()
+
+    
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVVDCHI2>%(DFDCHI2)s) & (BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(PT > %(DPT)s *MeV) &"\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+    
+    _Combine = CombineParticles(DecayDescriptor = "D0 -> pi+ pi- pi+ pi-",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ pionSel ] )
+
+####################################################
+def makeLambdac2PMuMu(name, protonSel, muonSel,DMAXDOCA, LambdacMassWin, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the Lambda_c+ -> p+ mu+ mu-
+    """
+
+    _combcut = "(ADAMASS('Lambda_c+') < %(LambdacMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+         "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[Lambda_c+ -> p+ mu+ mu-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ protonSel, muonSel ] )
+
+####################################################
+def makeLambdac2PMuMuSS(name, protonSel, muonSel,DMAXDOCA, LambdacMassWin, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the Lambda_c+ -> p+ mu+ mu-
+    """
+
+    _combcut = "(ADAMASS('Lambda_c+') < %(LambdacMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+         "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[Lambda_c+ -> p~- mu+ mu+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ protonSel, muonSel ] )
+
+
+
+####################################################
+def makeLambdac2PEE(name, protonSel, eleSel,DMAXDOCA, LambdacMassWin, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the Lambda_c+ -> p+ e+ e-
+    """
+
+    _combcut = "(ADAMASS('Lambda_c+') < %(LambdacMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+         "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[Lambda_c+ -> p+ e+ e-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ protonSel, eleSel ] )
+
+
+
+####################################################
+def makeLambdac2PEMu(name, protonSel, muonSel, eleSel,DMAXDOCA, LambdacMassWin, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the Lambda_c+ -> p+ e+ mu-
+    """
+
+    _combcut = "(ADAMASS('Lambda_c+') < %(LambdacMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+         "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[Lambda_c+ -> p+ e+ mu-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ protonSel, muonSel, eleSel ] )
+
+####################################################
+def makeLambdac2PEMuSS(name, protonSel, muonSel, eleSel,DMAXDOCA, LambdacMassWin, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the Lambda_c+ -> p+ e+ mu-
+    """
+
+    _combcut = "(ADAMASS('Lambda_c+') < %(LambdacMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+         "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[Lambda_c+ -> p+ e+ mu+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ protonSel, muonSel, eleSel ] )
+
+
+####################################################
+def makeLambdac2PMuE(name, protonSel, muonSel, eleSel,DMAXDOCA, LambdacMassWin, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the Lambda_c+ -> p+ mu+ e-
+    """
+
+    _combcut = "(ADAMASS('Lambda_c+') < %(LambdacMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+         "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[Lambda_c+ -> p+ mu+ e-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ protonSel, muonSel, eleSel ] )
+
+
+####################################################
+def makeLambdac2PKPi(name, protonSel, pionSel, kaonSel,DMAXDOCA, LambdacMassWin, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the Lambda_c+ -> p+ pi+ K-
+    """
+
+    _combcut = "(ADAMASS('Lambda_c+') < %(LambdacMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+         "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[Lambda_c+ -> p+ pi+ K-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ protonSel, pionSel, kaonSel ] )
+
+
+####################################################
+def makeLambdac2PPiPi(name, protonSel, muonSel,DMAXDOCA, LambdacMassWin, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the Lambda_c+ -> p+ pi+ pi-
+    """
+
+    _combcut = "(ADAMASS('Lambda_c+') < %(LambdacMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[Lambda_c+ -> p+ pi+ pi-]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ protonSel, muonSel ] )
+
+
+#####################################################
+def makeD2PiMuMuCal(name, pionSel, muonSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> pi+ mu+ mu+ 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+		           "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> pi+ mu+ mu+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ muonSel, pionSel ] )
+
+#####################################################
+def makeD2PiEMuCal(name, pionSel, eleSel, muonSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> pi+ e+ mu+ 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+		           "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> pi+ e+ mu+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ muonSel, eleSel, pionSel ] )
+
+#####################################################
+def makeD2PiEECal(name, pionSel, eleSel, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> pi+ e+ e+ 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+		           "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> pi+ e+ e+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ eleSel, pionSel ] )
+                    
+#####################################################
+def makeD2KMuMuCal(name, kaonSel, muonSel, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> K+ mu+ mu+ 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+		           "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> K+ mu+ mu+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ kaonSel, muonSel ] )
+
+#####################################################
+def makeD2KEMuCal(name, kaonSel, eleSel, muonSel, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> K+ e+ mu+ 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+		           "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> K+ e+ mu+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ kaonSel, eleSel, muonSel ] )
+
+#####################################################
+def makeD2KEECal(name, kaonSel, eleSel, DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA):
+    """
+    Makes the D+ -> K+ e+ e+ 
+    """
+
+    _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+		           "(AM > %(DMassLow)s *MeV) &"\
+               "(AM23 > %(DimuonMass)s *MeV)" % locals()
+
+    _bcut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+              "(BPVIPCHI2()< %(DIPCHI2)s) & "\
+              "(BPVDIRA > %(DDIRA)s)" % locals()
+
+    _Combine = CombineParticles(DecayDescriptor = "[D+ -> K+ e+ e+]cc",
+                                CombinationCut = _combcut,
+                                MotherCut = _bcut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ kaonSel, eleSel ] )
+
+#####################################################
+def makeKaons(name, KaonP, KaonPT, KaonPIDK, KaonMINIPCHI2, KaonTRCHI2):
+    """
+    Kaon selection
+    """
+    _code = "(TRCHI2DOF < %(KaonTRCHI2)s) & "\
+            "(P > %(KaonP)s *MeV) & "\
+            "(PT > %(KaonPT)s *MeV) &"\
+            "(PIDK-PIDpi > %(KaonPIDK)s) & "\
+            "(MIPCHI2DV(PRIMARY) > %(KaonMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdLooseKaons ] )
+
+#####################################################
+def makePions(name, PionP, PionPT, PionMINIPCHI2, PionTRCHI2):
+    """
+    Pion selection
+    """
+    _code = "(TRCHI2DOF < %(PionTRCHI2)s) & "\
+            "(P > %(PionP)s *MeV) & "\
+            "(PT > %(PionPT)s *MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(PionMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdLoosePions ] )
+                    
+#####################################################
+def makeMuons(name, MuonP, MuonPT, MuonMINIPCHI2, MuonTRCHI2):
+    """
+    Muon selection
+    """
+    _code = "(TRCHI2DOF < %(MuonTRCHI2)s) & "\
+            "(P > %(MuonP)s *MeV) & "\
+            "(PT > %(MuonPT)s* MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(MuonMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdLooseMuons ] )
+
+
+#####################################################
+def makeElectrons(name, EleP, ElePT, EleMINIPCHI2, EleTRCHI2):
+    """
+    Electron selection
+    """
+    _code = "(TRCHI2DOF < %(EleTRCHI2)s) & "\
+            "(P > %(EleP)s *MeV) & "\
+            "(PT > %(ElePT)s* MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(EleMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllLooseElectrons ] )
+
+
+
+#####################################################
+def makeProtons(name, ProtonP, ProtonPT, ProtonMINIPCHI2, ProtonTRCHI2):
+    """
+    Proton selection
+    """
+    _code = "(TRCHI2DOF < %(ProtonTRCHI2)s) & "\
+            "(P > %(ProtonP)s *MeV) & "\
+            "(PT > %(ProtonPT)s *MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(ProtonMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdLooseProtons ] )
+                        
+#####################################################
+def makePionsAsMuons(name, MuonP, MuonPT, MuonMINIPCHI2, MuonTRCHI2):
+    """
+    Muon selection
+    """
+    _code = "(TRCHI2DOF < %(MuonTRCHI2)s) & "\
+            "(P > %(MuonP)s *MeV) & "\
+            "(PT > %(MuonPT)s* MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(MuonMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdLoosePions ] )
+                    
+
+
+
+#####################################################
+def makeKaonsFor3bodyCS(name, KaonP, KaonPT, KaonMINIPCHI2, KaonTRCHI2):
+    """
+    Kaon selection
+    """
+    _code = "(TRCHI2DOF < %(KaonTRCHI2)s) & "\
+            "(P > %(KaonP)s *MeV) & "\
+            "(PT > %(KaonPT)s *MeV) &"\
+            "(MIPCHI2DV(PRIMARY) > %(KaonMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllNoPIDsKaons ] )
+
+
+#####################################################
+def makePionsFor3bodyCS(name, PionP, PionPT, PionMINIPCHI2, PionTRCHI2):
+    """
+    pion selection
+    """
+    _code = "(TRCHI2DOF < %(PionTRCHI2)s) & "\
+            "(P > %(PionP)s *MeV) & "\
+            "(PT > %(PionPT)s* MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(PionMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllNoPIDsPions ] )
+
+
+#####################################################
+def makeProtonsFor3bodyCS(name, ProtonP, ProtonPT, ProtonMINIPCHI2, ProtonTRCHI2):
+    """
+    Proton selection
+    """
+    _code = "(TRCHI2DOF < %(ProtonTRCHI2)s) & "\
+            "(P > %(ProtonP)s *MeV) & "\
+            "(PT > %(ProtonPT)s *MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(ProtonMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllNoPIDsProtons ] )
+
+
+
+
+#####################################################
+def makeKaonsForhhmumu(name, KaonP, KaonPT, KaonPIDK, KaonMINIPCHI2, KaonTRCHI2, ghostProbCut):
+    """
+    Kaon selection
+    """
+    _code = "(TRCHI2DOF < %(KaonTRCHI2)s) & "\
+            "(P > %(KaonP)s *MeV) & "\
+            "(PT > %(KaonPT)s *MeV) &"\
+            "(PIDK-PIDpi > %(KaonPIDK)s) & "\
+            "(MIPCHI2DV(PRIMARY) > %(KaonMINIPCHI2)s) & "\
+            "( TRGHOSTPROB < %(ghostProbCut)s )" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllLooseKaons ] )
+
+
+#####################################################
+def makeMuonsForhhmumu(name, MuonP, MuonPT, MuonMINIPCHI2, MuonTRCHI2, MuonPIDmu_CS_hhmumu, ghostProbCut):
+    """
+    Muon selection
+    """
+    _code = "(TRCHI2DOF < %(MuonTRCHI2)s) & "\
+            "(P > %(MuonP)s *MeV) & "\
+            "(PT > %(MuonPT)s* MeV) & "\
+            "(PIDmu-PIDpi > %(MuonPIDmu_CS_hhmumu)s) & "\
+            "(MIPCHI2DV(PRIMARY) > %(MuonMINIPCHI2)s) & "\
+            "( TRGHOSTPROB < %(ghostProbCut)s )" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllLooseMuons ] )
+
+#####################################################
+def makePionsForhhmumu(name, PionP, PionPT, PionMINIPCHI2, PionTRCHI2, ghostProbCut):
+    """
+    Muon selection
+    """
+    _code = "(TRCHI2DOF < %(PionTRCHI2)s) & "\
+            "(P > %(PionP)s *MeV) & "\
+            "(PT > %(PionPT)s* MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(PionMINIPCHI2)s) & "\
+            "( TRGHOSTPROB < %(ghostProbCut)s )" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllLoosePions ] )
+
+
+
+#####################################################
+def makeKaonsFor4bodyCS(name, KaonP, KaonPT, KaonMINIPCHI2, KaonTRCHI2, ghostProbCut):
+    """
+    Kaon selection
+    """
+    _code = "(TRCHI2DOF < %(KaonTRCHI2)s) & "\
+            "(P > %(KaonP)s *MeV) & "\
+            "(PT > %(KaonPT)s *MeV) &"\
+            "(MIPCHI2DV(PRIMARY) > %(KaonMINIPCHI2)s) & "\
+            "( TRGHOSTPROB < %(ghostProbCut)s )" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllNoPIDsKaons ] )
+
+
+#####################################################
+def makePionsFor4bodyCS(name, PionP, PionPT, PionMINIPCHI2, PionTRCHI2, ghostProbCut):
+    """
+    pion selection
+    """
+    _code = "(TRCHI2DOF < %(PionTRCHI2)s) & "\
+            "(P > %(PionP)s *MeV) & "\
+            "(PT > %(PionPT)s* MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(PionMINIPCHI2)s) & "\
+            "( TRGHOSTPROB < %(ghostProbCut)s )" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllNoPIDsPions ] )
+
+
+def _format_related_info(selection, config):
+    """Format the RelatedInfoTools configuation dictionary.
+
+    Replaces any dictionaries which have 'DaughterLocations' set to `None` with
+    the correct locations and decay descriptors.
+    HACK
+    """
+    decay_descriptor = selection.algorithm().DecayDescriptor.replace('cc', 'CC')
+    daughter_names = ['Dp_h', 'Dp_l1', 'Dp_l2']
+
+    config = copy.deepcopy(config)
+    for tool_config in config:
+        if 'DaughterLocations' not in tool_config or tool_config['DaughterLocations'] is not None:
+            continue
+
+        tool_config['DaughterLocations'] = {}
+        dd_index = decay_descriptor.find('->')+2
+        daughter_index = 0
+        while ' ' in decay_descriptor[dd_index:]:
+            d = '{} ^{}'.format(decay_descriptor[:dd_index], decay_descriptor[dd_index+1:])
+            tool_config['DaughterLocations'][d] = '{}_{}'.format(tool_config['Location'],
+                                                                 daughter_names[daughter_index])
+            daughter_index += 1
+            dd_index = decay_descriptor.find(' ', dd_index+1)
+
+    return config
+
+
+
+'''
+
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+from Configurables import FilterDesktop, CombineParticles 
+from PhysSelPython.Wrappers import Selection, SelectionSequence, DataOnDemand
+
+class StrippingD2XMuMuSSConf(LHCbConfigurableUser):
+    """
+    Definition of nominal D->Xu mu nu stripping
+    """
+    
+    __slots__ = {
+  "prefix"  : "",
+        #Muons
+        "MuonTRCHI2"    : 10.   ,#adimensional
+        "MuonP"         : 3000. ,#MeV
+        "MuonPT"        : 500. ,#MeV
+#        "MuonPIDK"      : -5.   ,#adimensional
+#        "MuonPIDmu"     : -5.   ,#adimensional
+#        "MuonPIDp"      : -5.   ,#adimensional
+        "MuonMINIPCHI2" : 5     ,#adminensional
+        #Xu
+        #Pi Channel
+        "PionTRCHI2"    : 10.   ,#adimensional
+        "PionP"         : 2000. ,#MeV
+        "PionPT"        : 300.  ,#MeV
+        "PionPIDK"      : -10.  ,#adimensional
+#        "PionPIDmu"     : -10.  ,#adimensional
+#        "PionPIDp"      : -10.  ,#adimensional
+        "PionMINIPCHI2" : 9     ,#adminensional
+        #K Channel
+        "KaonTRCHI2"    : 10.   ,#adimensional
+        "KaonP"         : 2000. ,#MeV
+        "KaonPT"        : 300.  ,#MeV
+        "KaonPIDK"      : -1.   ,#adimensional
+        "KaonMINIPCHI2" : 9     ,#adminensional
+        #D
+        "DVCHI2DOF"     : 8   ,#adminensional
+        "DFDCHI2"       : 64   ,#adminensional
+        "DDIRA"         : 0.9999 ,#adimensional
+        'DMassWin'      : 200,   # MeV, high mass window
+        'DMassLow'      : 1760   # MeV, high mass window
+        }
+
+
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+      
+    def _NominalPiSelection( self ):
+        return "(TRCHI2DOF < %(PionTRCHI2)s )&  (P> %(PionP)s *MeV) &  (PT> %(PionPT)s *MeV)"\
+               "& (PIDpi-PIDK> %(PionPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"
+      
+    def _NominalKSelection( self ):
+        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+               "& (PIDK-PIDpi> %(KaonPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    def PiSS_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self.getProp("prefix") + 'D2PiMuMuSSLine', prescale = 1., 
+                             algos = [self._muonFilter(),
+                                      self._pionFilter(),
+                                      self._D2PiMuMuSS()])
+    def PiOS_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self.getProp("prefix") + 'D2PiMuMuOSLine', prescale = 1., 
+                             algos = [self._muonFilter(),
+                                      self._pionFilter(),
+                                      self._D2PiMuMuOS()])
+
+    def KSS_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self.getProp("prefix") + 'D2KMuMuSSLine', prescale = 1., 
+                             algos = [self._muonFilter(),
+                                      self._kaonFilter(),
+                                      self._D2KMuMuSS()])
+    
+    def KOS_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self.getProp("prefix") + 'D2KMuMuOSLine', prescale = 1., 
+                             algos = [self._muonFilter(),
+                                      self._kaonFilter(),
+                                      self._D2KMuMuOS()])
+
+    def _muonFilter( self ):
+        from Configurables import FilterDesktop
+        _mu = FilterDesktop(self.getProp("prefix") + "Mu_forD2XMuMu",
+                            InputLocations = ["Phys/StdLooseMuons"])
+        _mu.Code = self._NominalMuSelection() % self.getProps()
+        return _mu
+
+    def _pionFilter( self ):
+        from Configurables import FilterDesktop
+        _pi = FilterDesktop(self.getProp("prefix") + "Pi_forD2XMuMu",
+                            InputLocations = ["Phys/StdLoosePions"])
+        _pi.Code = self._NominalPiSelection() % self.getProps()
+        return _pi
+
+    def _kaonFilter( self ):
+        from Configurables import FilterDesktop
+        _ka = FilterDesktop(self.getProp("prefix") + "K_forD2XMuMu",
+                            InputLocations = ["Phys/StdLooseKaons"])
+        _ka.Code = self._NominalKSelection() % self.getProps()
+        return _ka
+    
+    def _D2PiMuMuSS( self ):
+        from Configurables import CombineParticles, OfflineVertexFitter
+        _PiMuMu = CombineParticles(self.getProp("prefix") + "D2PiMuMuSS")
+        _PiMuMu.InputLocations = ["Phys/" + self.getProp("prefix") + "Mu_forD2XMuMu",
+          "Phys/" + self.getProp("prefix") + "Pi_forD2XMuMu"]
+        _PiMuMu.DecayDescriptors = ["[D- -> pi+ mu- mu-]cc"]
+        _PiMuMu.CombinationCut = " (AM>%(DMassLow)s*MeV) & (ADAMASS('D-') < %(DMassWin)s *MeV) & (AM23>250.*MeV)" % self.getProps()
+        _PiMuMu.MotherCut = "(VFASPF(VCHI2/VDOF)< %(DVCHI2DOF)s ) & (BPVVDCHI2 > %(DFDCHI2)s)"\
+                          "&(BPVDIRA> %(DDIRA)s )" % self.getProps()
+        _PiMuMu.ReFitPVs = True
+        return _PiMuMu
+
+    def _D2PiMuMuOS( self ):
+        from Configurables import CombineParticles, OfflineVertexFitter
+        _PiMuMu = CombineParticles(self.getProp("prefix") + "D2PiMuMuOS")
+        _PiMuMu.InputLocations = ["Phys/" + self.getProp("prefix") + "Mu_forD2XMuMu",
+          "Phys/" + self.getProp("prefix") + "Pi_forD2XMuMu"]
+        _PiMuMu.DecayDescriptors = ["[D+ -> pi+ mu+ mu-]cc"]
+        _PiMuMu.CombinationCut = "(AM>%(DMassLow)s*MeV)& (ADAMASS('D+') < %(DMassWin)s *MeV) & (AM23>250.*MeV)" % self.getProps()
+        _PiMuMu.MotherCut = "(VFASPF(VCHI2/VDOF)< %(DVCHI2DOF)s ) & (BPVVDCHI2 > %(DFDCHI2)s)"\
+                          "&(BPVDIRA> %(DDIRA)s )" % self.getProps()
+        _PiMuMu.ReFitPVs = True
+        return _PiMuMu
+    
+    def _D2KMuMuSS( self ):
+        from Configurables import CombineParticles, OfflineVertexFitter
+        _KMuMu = CombineParticles(self.getProp("prefix") + "D2KMuMuSS")
+        _KMuMu.InputLocations = ["Phys/" + self.getProp("prefix") + "Mu_forD2XMuMu",
+         "Phys/" + self.getProp("prefix") + "K_forD2XMuMu"]
+        _KMuMu.DecayDescriptors = ["[D- -> K+ mu- mu-]cc"]
+        _KMuMu.CombinationCut = "(AM>%(DMassLow)s*MeV)& (ADAMASS('D-') < %(DMassWin)s *MeV) & (AM23>250.*MeV)" % self.getProps()
+        _KMuMu.MotherCut = "(VFASPF(VCHI2/VDOF)< %(DVCHI2DOF)s ) & (BPVVDCHI2 > %(DFDCHI2)s)"\
+            "&(BPVDIRA> %(DDIRA)s )" % self.getProps()
+        _KMuMu.ReFitPVs = True
+        return _KMuMu
+    
+    def _D2KMuMuOS( self ):
+        from Configurables import CombineParticles, OfflineVertexFitter
+        _KMuMu = CombineParticles(self.getProp("prefix") + "D2KMuMuOS")
+        _KMuMu.InputLocations = ["Phys/" + self.getProp("prefix") + "Mu_forD2XMuMu",
+         "Phys/" + self.getProp("prefix") + "K_forD2XMuMu"]
+        _KMuMu.DecayDescriptors = ["[D+ -> K+ mu+ mu-]cc"]
+        _KMuMu.CombinationCut = " (AM>%(DMassLow)s*MeV)& (ADAMASS('D+') < %(DMassWin)s *MeV) & (AM23>250.*MeV)" % self.getProps()
+        _KMuMu.MotherCut = "(VFASPF(VCHI2/VDOF)< %(DVCHI2DOF)s ) & (BPVVDCHI2 > %(DFDCHI2)s)"\
+            "&(BPVDIRA> %(DDIRA)s )" % self.getProps()
+        _KMuMu.ReFitPVs = True
+        return _KMuMu
+    
+    def getProps(self) :
+        """
+        From HltLinesConfigurableUser
+        @todo Should be shared between Hlt and stripping
+        """
+        d = dict()
+        for (k,v) in self.getDefaultProperties().iteritems() :
+            d[k] = getattr(self,k) if hasattr(self,k) else v
+        return d
+        
+'''
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hh.py
new file mode 100644
index 000000000..ec820d0db
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hh.py
@@ -0,0 +1,708 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingBs2JpsiPhiPrescaledAndDetatched.py,v 1.1 2010-06-30 12:53:17 jpalac Exp $
+__author__ = ['Marco Gersabeck']
+__date__ = '21/02/2011'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = ('D2hhBuilder',
+           'makeD2hhAsymm',
+	   'makeDstar2D0Pi',
+	   'makeDPartial',
+	   'makeDstarPartial',
+	   'makePseudoPsi',
+	   'default_config')
+
+'''
+This file contains stripping lines for time-dependent two-body charm analyses of mixing, yCP, and A_Gamma
+'''
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsKaons, StdAllNoPIDsPions
+
+
+default_config = { 
+    'NAME'        : 'D2hh',
+    'WGs'         : ['Charm'],
+    'STREAMS'     : [ 'Charm' ],
+    'BUILDERTYPE' : 'D2hhBuilder',
+    'CONFIG'      : {
+           'DaugPtMin': 800.,
+           'DaugPtMax': 1500.,
+           'DaugPtLoose': 500.,
+           'DaugP': 5000.,
+           'DaugPLoose': 3000.,
+           'DaugIPChi2Loose': 4.,
+           'DaugIPChi2': 9.,
+           'DaugTrkChi2': 3.,
+           'DaugTrkChi2Loose': 4.,
+           'HighPIDK': 5.,
+           'LowPIDK': 0.,
+           'D0Pt': 2000.,
+           'D0PtLoose': 1500.,
+           'D0MassWindowCentre': 1865.,
+           'D0MassWindowWidth': 100.,
+           'D0KPiMassWindowWidthLow':  -100.,
+           'D0KPiMassWindowWidthHigh': 200.,
+           'D0PiPiMassWindowWidthLow':  -75.,
+           'D0PiPiMassWindowWidthHigh': 200.,
+           'D0KKMassWindowWidthLow': -100.,
+           'D0KKMassWindowWidthHigh': 200.,
+           'D0P': 5000.,
+           'D0VtxChi2Ndof': 10.,
+           'D0Tau': 0.,
+           'D0FDChi2': 40.,
+           'D0BPVDira': 0.9999,
+           'D0DOCA': 0.07,
+           'Daug_TRCHI2DOF_MAX': 5.,
+           'Dstar_AMDiff_MAX': 165.,
+           'Dstar_VCHI2VDOF_MAX': 100.,
+           'Dstar_MDiff_MAX': 160.,
+           'UntaggedCFLinePrescale': 0.4,
+           'UntaggedCFLinePostscale': 1.,
+           'UntaggedSCSLinePrescale': 1.,
+           'UntaggedSCSLinePostscale': 1.,
+           'TaggedRSLinePrescale': 1.,
+           'TaggedRSLinePostscale': 1.,
+           'TaggedWSLinePrescale': 1.,
+           'TaggedWSLinePostscale': 1.,
+           'TaggedSCSLinePrescale': 1.,
+           'TaggedSCSLinePostscale': 1.,
+           'TaggedRSSSLinePrescale': 1.,
+           'TaggedRSSSLinePostscale': 1.,
+           'TaggedSCSSSLinePrescale': 1.,
+           'TaggedSCSSSLinePostscale': 1.,
+           'UntaggedTISLinePrescale': 1.,
+           'UntaggedTISLinePostscale': 1.,
+           'UntaggedKpiOnly': False,
+           'RunSameSign': True,
+           'RunTISLines': True,
+           'RunDefault': True,
+           'UseTOSFilter': False,
+           'AddPartialD': False,
+           'Hlt1TOS': { 'Hlt1TrackAllL0Decision%TOS' : 0 },
+           'Hlt2TOSKPi': { 'Hlt2CharmHadD02HH_D02KPiDecision%TOS' : 0, 'Hlt2CharmHadD02HH_D02KPiWideMassDecision%TOS' : 0, 'Hlt2CharmHadD02KPiDecision%TOS' : 0, 'Hlt2CharmHadD02KPiWideMassDecision%TOS' : 0 },
+           'Hlt2TOSKK': { 'Hlt2CharmHadD02HH_D02KKDecision%TOS' : 0, 'Hlt2CharmHadD02HH_D02KKWideMassDecision%TOS' : 0, 'Hlt2CharmHadD02KKDecision%TOS' : 0, 'Hlt2CharmHadD02KKWideMassDecision%TOS' : 0 },
+           'Hlt2TOSPiPi': { 'Hlt2CharmHadD02HH_D02PiPiDecision%TOS' : 0, 'Hlt2CharmHadD02HH_D02PiPiWideMassDecision%TOS' : 0, 'Hlt2CharmHadD02PiPiDecision%TOS' : 0, 'Hlt2CharmHadD02PiPiWideMassDecision%TOS' : 0 }
+         }
+}
+
+class D2hhBuilder(LineBuilder) :
+
+    '''
+    Produces 7 lines, 3 untagged and 4 tagged D->hh lines:
+    untagged:
+    - D->Kpi
+    - D->KK
+    - D->pipi
+    tagged, D*->D0pi with:
+    - D->Kpi RS
+    - D->Kpi WS
+    - D->KK
+    - D->pipi
+
+    Usage:
+    from StrippingSelections import StrippingD2hh
+    confD2hh = StrippingD2hh.D2hhConf("D2hh",StrippingD2hh.default_config)
+    stream.appendLines( confD2hh.lines() )
+    '''
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        stdNoPIDsKaons = StdAllNoPIDsKaons
+        stdNoPIDsPions = StdAllNoPIDsPions
+
+        d2kpi_name = name+'PromptD2KPi'
+        d0RS_name =  name+'PromptD0RS'
+        d0WS_name = name+'PromptD0WS'
+        d2kk_name = name+'PromptD2KK'
+        d2pipi_name = name+'PromptD2PiPi'
+        dst2DPiPi_name = name+'PromptDst2D2PiPi'
+        dst2DKK_name = name+'PromptDst2D2KK'
+        dst2DRS_name = name+'PromptDst2D2RS'
+        dst2DWS_name = name+'PromptDst2D2WS'
+        dPartial_name = name+'PromptDPartial'
+        dstarPartial_name = name+'PromptDstarPartial'
+        pseudoPsi_name = name+'PromptD0D0FromDstarPartial'
+
+        # D0 -> hh' selections
+
+        self.selD2Kpi = makeD2hhAsymm(d2kpi_name,  
+                                 config,
+                                 KPIDK_string = ' & (PIDK > %(HighPIDK)s)',
+                                 PiPIDK_string = ' & (PIDK < %(LowPIDK)s)',
+                                 Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0KPiMassWindowWidthLow)s* MeV)',
+                                 Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0KPiMassWindowWidthHigh)s* MeV)',
+                                 CombPIDK_string = '',
+                                 DecayDescriptor = '[D0 -> K- pi+]cc',
+                                 inputSel = [stdNoPIDsPions, stdNoPIDsKaons],
+                                 useTOS = config['UseTOSFilter'],
+                                 Hlt1TOS = config['Hlt1TOS'],
+                                 Hlt2TOS = config['Hlt2TOSKPi']
+                                )
+
+        self.selD0WS = makeD2hhAsymm(d0WS_name,  
+                                 config,
+                                 KPIDK_string = ' & (PIDK > %(HighPIDK)s)',
+                                 PiPIDK_string = ' & (PIDK < %(LowPIDK)s)',
+                                 Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0KPiMassWindowWidthLow)s* MeV)',
+                                 Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0KPiMassWindowWidthHigh)s* MeV)',
+                                 CombPIDK_string = '',
+                                 DecayDescriptor = '[D0 -> K+ pi-]cc',
+                                 inputSel = [stdNoPIDsPions, stdNoPIDsKaons],
+                                 useTOS = config['UseTOSFilter'],
+                                 Hlt1TOS = config['Hlt1TOS'],
+                                 Hlt2TOS = config['Hlt2TOSKPi']
+                                )
+
+        self.selD0KKsgl = makeD2hhAsymm(d2kk_name+'_single',  
+                                config,
+                                KPIDK_string = ' & (PIDK > %(LowPIDK)s)',
+                                PiPIDK_string = '',
+                                Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0KKMassWindowWidthLow)s* MeV)',
+                                Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0KKMassWindowWidthHigh)s* MeV)',
+                                CombPIDK_string = ' & (AHASCHILD( PIDK > %(HighPIDK)s ) )',
+                                DecayDescriptor = 'D0 -> K+ K-',
+                                inputSel = [stdNoPIDsKaons],
+                                useTOS = config['UseTOSFilter'],
+                                Hlt1TOS = config['Hlt1TOS'],
+                                Hlt2TOS = config['Hlt2TOSKK']
+                               )
+
+        self.selD0PiPisgl = makeD2hhAsymm(d2pipi_name+'_single',  
+                                  config,
+                                  KPIDK_string = '',
+                                  PiPIDK_string = ' & (PIDK < %(LowPIDK)s)',
+                                  Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0PiPiMassWindowWidthLow)s* MeV)',
+                                  Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0PiPiMassWindowWidthHigh)s* MeV)',
+                                  CombPIDK_string = '',
+                                  DecayDescriptor = 'D0 -> pi+ pi-',
+                                  inputSel = [stdNoPIDsPions], 
+                                  useTOS = config['UseTOSFilter'],
+                                  Hlt1TOS = config['Hlt1TOS'],
+                                  Hlt2TOS = config['Hlt2TOSPiPi']
+                                 )
+
+        self.selD0KK = makeD2hhAsymm(d2kk_name,  
+                                config,
+                                KPIDK_string = ' & (PIDK > %(LowPIDK)s)',
+                                PiPIDK_string = '',
+                                Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0KKMassWindowWidthLow)s* MeV)',
+                                Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0KKMassWindowWidthHigh)s* MeV)',
+                                CombPIDK_string = ' & (AHASCHILD( PIDK > %(HighPIDK)s ) )',
+                                DecayDescriptor = '[D0 -> K+ K-]cc',
+                                inputSel = [stdNoPIDsKaons],
+                                useTOS = config['UseTOSFilter'],
+                                Hlt1TOS = config['Hlt1TOS'],
+                                Hlt2TOS = config['Hlt2TOSKK']
+                               )
+
+        self.selD0PiPi = makeD2hhAsymm(d2pipi_name,  
+                                  config,
+                                  KPIDK_string = '',
+                                  PiPIDK_string = ' & (PIDK < %(LowPIDK)s)',
+                                  Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0PiPiMassWindowWidthLow)s* MeV)',
+                                  Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0PiPiMassWindowWidthHigh)s* MeV)',
+                                  CombPIDK_string = '',
+                                  DecayDescriptor = '[D0 -> pi+ pi-]cc',
+                                  inputSel = [stdNoPIDsPions], 
+                                  useTOS = config['UseTOSFilter'],
+                                  Hlt1TOS = config['Hlt1TOS'],
+                                  Hlt2TOS = config['Hlt2TOSPiPi']
+                                 )
+
+        self.selD2KpiSS = makeD2hhAsymm(d2kpi_name+'SS',  
+                                 config,
+                                 KPIDK_string = ' & (PIDK > %(HighPIDK)s)',
+                                 PiPIDK_string = ' & (PIDK < %(LowPIDK)s)',
+                                 Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0KPiMassWindowWidthLow)s* MeV)',
+                                 Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0KPiMassWindowWidthHigh)s* MeV)',
+                                 CombPIDK_string = '',
+                                 DecayDescriptor = '[D0 -> K- pi-]cc',
+                                 inputSel = [stdNoPIDsPions, stdNoPIDsKaons],
+                                 useTOS = False,
+                                 Hlt1TOS = config['Hlt1TOS'],
+                                 Hlt2TOS = config['Hlt2TOSKPi']
+                                )
+
+        self.selD0KKSS = makeD2hhAsymm(d2kk_name+'SS',  
+                                config,
+                                KPIDK_string = ' & (PIDK > %(LowPIDK)s)',
+                                PiPIDK_string = '',
+                                Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0KKMassWindowWidthLow)s* MeV)',
+                                Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0KKMassWindowWidthHigh)s* MeV)',
+                                CombPIDK_string = ' & (AHASCHILD( PIDK > %(HighPIDK)s ) )',
+                                DecayDescriptor = '[D0 -> K- K-]cc',
+                                inputSel = [stdNoPIDsKaons],
+                                useTOS = False,
+                                Hlt1TOS = config['Hlt1TOS'],
+                                Hlt2TOS = config['Hlt2TOSKK']
+                               )
+
+        self.selD0PiPiSS = makeD2hhAsymm(d2pipi_name+'SS',  
+                                  config,
+                                  KPIDK_string = '',
+                                  PiPIDK_string = ' & (PIDK < %(LowPIDK)s)',
+                                  Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0PiPiMassWindowWidthLow)s* MeV)',
+                                  Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0PiPiMassWindowWidthHigh)s* MeV)',
+                                  CombPIDK_string = '',
+                                  DecayDescriptor = '[D0 -> pi- pi-]cc',
+                                  inputSel = [stdNoPIDsPions], 
+                                  useTOS = False,
+                                  Hlt1TOS = config['Hlt1TOS'],
+                                  Hlt2TOS = config['Hlt2TOSPiPi']
+                                 )
+
+        self.selD2KpiTIS = makeD2hhAsymm(d2kpi_name+'TIS',  
+                                 config,
+                                 KPIDK_string = ' & (PIDK > %(HighPIDK)s)',
+                                 PiPIDK_string = ' & (PIDK < %(LowPIDK)s)',
+                                 Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0KPiMassWindowWidthLow)s* MeV)',
+                                 Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0KPiMassWindowWidthHigh)s* MeV)',
+                                 CombPIDK_string = '',
+                                 DecayDescriptor = '[D0 -> K- pi+]cc',
+                                 inputSel = [stdNoPIDsPions, stdNoPIDsKaons],
+                                 useTOS = True,
+                                 Hlt1TOS = { 'Hlt1Global%TIS' : 0 },
+                                 Hlt2TOS = { 'Hlt2Global%TIS' : 0 }
+                                )
+
+        self.selD0KKTIS = makeD2hhAsymm(d2kk_name+'TIS',  
+                                config,
+                                KPIDK_string = ' & (PIDK > %(LowPIDK)s)',
+                                PiPIDK_string = '',
+                                Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0KKMassWindowWidthLow)s* MeV)',
+                                Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0KKMassWindowWidthHigh)s* MeV)',
+                                CombPIDK_string = ' & (AHASCHILD( PIDK > %(HighPIDK)s ) )',
+                                DecayDescriptor = 'D0 -> K+ K-',
+                                inputSel = [stdNoPIDsKaons],
+                                useTOS = True,
+                                Hlt1TOS = { 'Hlt1Global%TIS' : 0 },
+                                Hlt2TOS = { 'Hlt2Global%TIS' : 0 }
+                               )
+
+        self.selD0PiPiTIS = makeD2hhAsymm(d2pipi_name+'TIS',  
+                                  config,
+                                  KPIDK_string = '',
+                                  PiPIDK_string = ' & (PIDK < %(LowPIDK)s)',
+                                  Mass_low_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) > %(D0PiPiMassWindowWidthLow)s* MeV)',
+                                  Mass_high_string = '& (DAMASS(%(D0MassWindowCentre)s* MeV) < %(D0PiPiMassWindowWidthHigh)s* MeV)',
+                                  CombPIDK_string = '',
+                                  DecayDescriptor = 'D0 -> pi+ pi-',
+                                  inputSel = [stdNoPIDsPions], 
+                                  useTOS = True,
+                                  Hlt1TOS = { 'Hlt1Global%TIS' : 0 },
+                                  Hlt2TOS = { 'Hlt2Global%TIS' : 0 }
+                                 )
+
+        # Dstar -> D0 pi selections
+        self.selDstRS = makeDstar2D0Pi( dst2DRS_name
+                                   , config
+                                   , '[D*(2010)+ -> D0 pi+]cc'
+                                   , inputSel = [self.selD2Kpi, stdNoPIDsPions]
+                                 )
+
+        self.selDstWS = makeDstar2D0Pi( dst2DWS_name
+                                   , config
+                                   , '[D*(2010)+ -> D0 pi+]cc'
+                                   , inputSel = [self.selD0WS, stdNoPIDsPions]
+                                 )
+
+        self.selDstKK = makeDstar2D0Pi( dst2DKK_name
+                                   , config
+                                   , '[D*(2010)+ -> D0 pi+]cc'
+                                   , inputSel = [self.selD0KK, stdNoPIDsPions]
+                                 )
+
+        self.selDstPiPi = makeDstar2D0Pi( dst2DPiPi_name
+                                   , config
+                                   , '[D*(2010)+ -> D0 pi+]cc'
+                                   , inputSel = [self.selD0PiPi, stdNoPIDsPions]
+                                 )
+
+        self.selDstRSSS = makeDstar2D0Pi( dst2DRS_name+'SS'
+                                   , config
+                                   , '[D*(2010)+ -> D0 pi+]cc'
+                                   , inputSel = [self.selD2KpiSS, stdNoPIDsPions]
+                                 )
+
+        self.selDstKKSS = makeDstar2D0Pi( dst2DKK_name+'SS'
+                                   , config
+                                   , '[D*(2010)+ -> D0 pi+]cc'
+                                   , inputSel = [self.selD0KKSS, stdNoPIDsPions]
+                                 )
+
+        self.selDstPiPiSS = makeDstar2D0Pi( dst2DPiPi_name+'SS'
+                                   , config
+                                   , '[D*(2010)+ -> D0 pi+]cc'
+                                   , inputSel = [self.selD0PiPiSS, stdNoPIDsPions]
+                                 )
+
+        self.selDPartial = makeDPartial( dPartial_name
+                                   , config
+                                   , '[D- -> K- pi- pi+]cc'
+                                   , inputSel = [stdNoPIDsPions, stdNoPIDsKaons]
+                                 )
+
+        self.selDstarPartial = makeDstarPartial( dstarPartial_name
+                                   , config
+                                   , '[D*(2010)+ -> D- pi+]cc'
+                                   , inputSel = [self.selDPartial, stdNoPIDsPions]
+                                 )
+
+        self.selPseudoPsi = makePseudoPsi( pseudoPsi_name
+                                   , config
+                                   , '[psi(3770) -> D0 D*(2010)+]cc'
+                                   , inputSel = [self.selD2Kpi, self.selDstarPartial]
+                                 )
+        # Untagged lines
+        self.d2kpi_line = StrippingLine(d2kpi_name+"Line",
+                                        prescale = config['UntaggedCFLinePrescale'],
+                                        postscale = config['UntaggedCFLinePostscale'],
+                                        selection = self.selD2Kpi
+                                       )
+
+        self.d2kk_line = StrippingLine(d2kk_name+"Line",
+                                        prescale = config['UntaggedSCSLinePrescale'],
+                                        postscale = config['UntaggedSCSLinePostscale'],
+                                        selection = self.selD0KKsgl
+                                       )
+
+        self.d2pipi_line = StrippingLine(d2pipi_name+"Line",
+                                        prescale = config['UntaggedSCSLinePrescale'],
+                                        postscale = config['UntaggedSCSLinePostscale'],
+                                        selection = self.selD0PiPisgl
+                                       )
+
+        # Untagged TIS lines
+        self.d2kpiTIS_line = StrippingLine(d2kpi_name+"TISLine",
+                                        prescale = config['UntaggedTISLinePrescale'],
+                                        postscale = config['UntaggedTISLinePostscale'],
+                                        selection = self.selD2KpiTIS
+                                       )
+
+        self.d2kkTIS_line = StrippingLine(d2kk_name+"TISLine",
+                                        prescale = config['UntaggedTISLinePrescale'],
+                                        postscale = config['UntaggedTISLinePostscale'],
+                                        selection = self.selD0KKTIS
+                                       )
+
+        self.d2pipiTIS_line = StrippingLine(d2pipi_name+"TISLine",
+                                        prescale = config['UntaggedTISLinePrescale'],
+                                        postscale = config['UntaggedTISLinePostscale'],
+                                        selection = self.selD0PiPiTIS
+                                       )
+
+        # Tagged lines
+        self.dstRS_line = StrippingLine(dst2DRS_name+"Line",
+                                        prescale = config['TaggedRSLinePrescale'],
+                                        postscale = config['TaggedRSLinePostscale'],
+                                        selection = self.selDstRS
+                                       )
+
+        self.dstWS_line = StrippingLine(dst2DWS_name+"Line",
+                                        prescale = config['TaggedWSLinePrescale'],
+                                        postscale = config['TaggedWSLinePostscale'],
+                                        selection = self.selDstWS
+                                       )
+
+        self.dstKK_line = StrippingLine(dst2DKK_name+"Line",
+                                        prescale = config['TaggedSCSLinePrescale'],
+                                        postscale = config['TaggedSCSLinePostscale'],
+                                        selection = self.selDstKK
+                                       )
+
+        self.dstPiPi_line = StrippingLine(dst2DPiPi_name+"Line",
+                                        prescale = config['TaggedSCSLinePrescale'],
+                                        postscale = config['TaggedSCSLinePostscale'],
+                                        selection = self.selDstPiPi
+                                       )
+
+        # Tagged same sign lines
+        self.dstRSSS_line = StrippingLine(dst2DRS_name+"SSLine",
+                                        prescale = config['TaggedRSLinePrescale'],
+                                        postscale = config['TaggedRSLinePostscale'],
+                                        selection = self.selDstRSSS
+                                       )
+
+        self.dstKKSS_line = StrippingLine(dst2DKK_name+"SSLine",
+                                        prescale = config['TaggedSCSLinePrescale'],
+                                        postscale = config['TaggedSCSLinePostscale'],
+                                        selection = self.selDstKKSS
+                                       )
+
+        self.dstPiPiSS_line = StrippingLine(dst2DPiPi_name+"SSLine",
+                                        prescale = config['TaggedSCSLinePrescale'],
+                                        postscale = config['TaggedSCSLinePostscale'],
+                                        selection = self.selDstPiPiSS
+                                       )
+
+        # Pseudo Psi line
+        if config['AddPartialD']:
+            self.pseudoPsi_line = StrippingLine(pseudoPsi_name+"Line",
+                                        prescale = 1.,
+                                        postscale = 1.,
+                                        selection = self.selPseudoPsi
+                                       )
+
+        # register lines
+        if config['RunSameSign']:
+          self.registerLine(self.dstRSSS_line)
+          self.registerLine(self.dstKKSS_line)
+          self.registerLine(self.dstPiPiSS_line)
+
+        if config['RunTISLines']:
+          self.registerLine(self.d2kpiTIS_line)
+          self.registerLine(self.d2kkTIS_line)
+          self.registerLine(self.d2pipiTIS_line)
+
+        if config['RunDefault']:
+          self.registerLine(self.d2kpi_line)
+          if not config['UntaggedKpiOnly']:
+            self.registerLine(self.d2kk_line)
+            self.registerLine(self.d2pipi_line)
+
+            self.registerLine(self.dstRS_line)
+            self.registerLine(self.dstWS_line)
+            self.registerLine(self.dstKK_line)
+            self.registerLine(self.dstPiPi_line)
+            if config['AddPartialD']:
+              self.registerLine(self.pseudoPsi_line)
+
+def makeD2hhAsymm(name,
+             config,
+             KPIDK_string,
+             PiPIDK_string,
+             Mass_low_string,
+             Mass_high_string,
+             CombPIDK_string,
+             DecayDescriptor,
+             inputSel,
+             useTOS,
+             Hlt1TOS,
+             Hlt2TOS
+            ) :
+    """
+    Create and return a D0 -> hh' Selection object.
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of cut values.
+    ..._string  : cut implementation for PIDK cuts.
+    DecayDescriptor: DecayDescriptor.
+    inputSel    : input selections
+    """
+
+    def makeTISTOS( name, _input, _hlttos ) :
+            from Configurables import TisTosParticleTagger
+            _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+            _tisTosFilter.TisTosSpecs = _hlttos
+            return Selection( name
+                              , Algorithm = _tisTosFilter
+                              , RequiredSelections = [ _input ]
+                              )        
+
+    _Kcuts1  = "~ISMUON & (PT > %(DaugPtMin)s* MeV) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s)" % locals()['config']
+    _KcutsPIDK  = KPIDK_string % locals()['config']
+    _Kcuts2  = " & (ISLONG) & (P > %(DaugP)s* MeV) & (TRCHI2DOF < %(DaugTrkChi2)s)" % locals()['config']
+    _Kcuts = _Kcuts1 + _KcutsPIDK + _Kcuts2
+    _Picuts1 = "~ISMUON & (PT > %(DaugPtMin)s* MeV) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s)" % locals()['config']
+    _PicutsPIDK  = PiPIDK_string % locals()['config']
+    _Picuts2 = " & (ISLONG) & (P > %(DaugP)s* MeV) & (TRCHI2DOF < %(DaugTrkChi2)s)" % locals()['config']
+    _Picuts = _Picuts1 + _PicutsPIDK + _Picuts2
+    _dauCuts = { 'K+': _Kcuts, 'pi+': _Picuts }
+
+    _massLow  = Mass_low_string % locals()['config']
+    _massHigh  = Mass_high_string % locals()['config']
+    _combCuts1 = "(APT > %(D0Pt)s* MeV)" \
+                "& (AHASCHILD( PT > %(DaugPtMax)s* MeV ) )" \
+                "& (ADOCA(1,2)< %(D0DOCA)s* mm)" \
+                "& (AP > %(D0P)s* MeV)" % locals()['config']
+    _combCutsPIDK = CombPIDK_string % locals()['config']
+    _combCuts = _combCuts1 + _combCutsPIDK + _massLow + _massHigh
+
+    _motherCuts = "(VFASPF(VCHI2PDOF) < %(D0VtxChi2Ndof)s)" \
+                  "& (BPVVDCHI2 > %(D0FDChi2)s)" \
+                  "& (BPVLTIME() > %(D0Tau)s)" \
+                  "& (BPVDIRA > %(D0BPVDira)s)" % locals()['config']
+
+    _D0 = CombineParticles( DecayDescriptor = DecayDescriptor,
+                            MotherCut = _motherCuts,
+                            CombinationCut = _combCuts,
+                            DaughtersCuts = _dauCuts)
+
+    _sel = Selection ( name+'Sel',
+                       Algorithm = _D0,
+                       RequiredSelections = inputSel )
+
+    if not useTOS:
+      return _sel
+
+    _selD2hhHlt1TOS = makeTISTOS( name + "D2hhHlt1TOS"
+                                    , _sel
+                                    , Hlt1TOS
+                                            )
+    _selD2hhHlt2TOS = makeTISTOS( name + "D2hhHlt2TOS"
+                                            , _selD2hhHlt1TOS
+                                            , Hlt2TOS
+                                            )
+       
+    return _selD2hhHlt2TOS
+
+def makeDstar2D0Pi( name
+                    , config
+                    , DecayDescriptor
+                    , inputSel
+                  ) :
+
+    """
+    Create and return a D* -> D0 pi Selection object.
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of cut values.
+    DecayDescriptor: DecayDescriptor.
+    inputSel    : input selections
+    """
+
+    daugCuts = "(TRCHI2DOF < %(Daug_TRCHI2DOF_MAX)s)" % locals()['config']
+    combCuts = "((AM - AM1) < %(Dstar_AMDiff_MAX)s* MeV)" % locals()['config']
+    dstarCuts = "(VFASPF(VCHI2/VDOF) < %(Dstar_VCHI2VDOF_MAX)s)" \
+                "& ((M - M1) < %(Dstar_MDiff_MAX)s* MeV)" % locals()['config']
+
+    _Dstar = CombineParticles( DecayDescriptor = DecayDescriptor
+                             , DaughtersCuts = { "pi+" : daugCuts }
+                             , CombinationCut = combCuts
+                             , MotherCut = dstarCuts
+                             )
+
+    return Selection( name+'Sel',
+                      Algorithm = _Dstar,
+                      RequiredSelections = inputSel
+                    )
+
+def makeDPartial( name
+                    , config
+                    , DecayDescriptor
+                    , inputSel
+                  ) :
+
+    """
+    Create and return a D- -> K- pi- pi+ Selection object.
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of cut values.
+    DecayDescriptor: DecayDescriptor.
+    inputSel    : input selections
+    """
+
+    _Kcuts1  = "~ISMUON & (PT > %(DaugPtLoose)s* MeV) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2Loose)s)" % locals()['config']
+    _KcutsPIDK  = " & (PIDK > %(HighPIDK)s)" % locals()['config']
+    _Kcuts2  = " & (ISLONG) & (P > %(DaugPLoose)s* MeV) & (TRCHI2DOF < %(DaugTrkChi2Loose)s)" % locals()['config']
+    _Kcuts = _Kcuts1 + _KcutsPIDK + _Kcuts2
+    _Picuts1 = "~ISMUON & (PT > %(DaugPtMin)s* MeV) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s)" % locals()['config']
+    _PicutsPIDK  = " & (PIDK < %(LowPIDK)s)" % locals()['config']
+    _Picuts2 = " & (ISLONG) & (P > %(DaugP)s* MeV) & (TRCHI2DOF < %(DaugTrkChi2)s)" % locals()['config']
+    _Picuts = _Picuts1 + _PicutsPIDK + _Picuts2
+    _dauCuts = { 'K+': _Kcuts, 'pi+': _Picuts }
+    #_Kcuts1  = "~ISMUON & (PT > 500* MeV) & (MIPCHI2DV(PRIMARY) > 4)"
+    #_KcutsPIDK  = " & (PIDK > 5)"
+    #_Kcuts2  = " & (ISLONG) & (P > 5000* MeV) & (TRCHI2DOF < 5)"
+    #_Kcuts = _Kcuts1 + _KcutsPIDK + _Kcuts2
+    #_Picuts1 = "~ISMUON & (PT > 500* MeV) & (MIPCHI2DV(PRIMARY) > 4)"
+    #_PicutsPIDK  = " & (PIDK < 0)"
+    #_Picuts2 = " & (ISLONG) & (P > 5000* MeV) & (TRCHI2DOF < 5)"
+    #_Picuts = _Picuts1 + _PicutsPIDK + _Picuts2
+    #_dauCuts = { 'K+': _Kcuts, 'pi+': _Picuts }
+
+    _combCuts = "(APT > %(D0PtLoose)s* MeV)" \
+                "& (AP > %(D0P)s* MeV)" % locals()['config']
+
+    _motherCuts = "(VFASPF(VCHI2PDOF) < %(D0VtxChi2Ndof)s)" \
+                  "& (BPVVDCHI2 > %(D0FDChi2)s)" % locals()['config']
+
+
+    _Dminus = CombineParticles( DecayDescriptor = DecayDescriptor
+                             , DaughtersCuts = _dauCuts
+                             , CombinationCut = _combCuts
+                             , MotherCut = _motherCuts
+                             )
+
+    return Selection( name+'Sel',
+                      Algorithm = _Dminus,
+                      RequiredSelections = inputSel
+                    )
+
+def makeDstarPartial( name
+                    , config
+                    , DecayDescriptor
+                    , inputSel
+                  ) :
+
+    """
+    Create and return a D*+ -> D- pi+ Selection object.
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of cut values.
+    DecayDescriptor: DecayDescriptor.
+    inputSel    : input selections
+    """
+
+    daugCuts = "(TRCHI2DOF < %(Daug_TRCHI2DOF_MAX)s)" % locals()['config']
+    combCuts = "((AM - AM1) < %(Dstar_AMDiff_MAX)s* MeV)" % locals()['config']
+    dstarCuts = "(VFASPF(VCHI2/VDOF) < %(Dstar_VCHI2VDOF_MAX)s)" \
+                "& ((M - M1) < %(Dstar_MDiff_MAX)s* MeV)" % locals()['config']
+
+    _Dstar = CombineParticles( DecayDescriptor = DecayDescriptor
+                             , DaughtersCuts = { "pi+" : daugCuts }
+                             , CombinationCut = combCuts
+                             , MotherCut = dstarCuts
+                             )
+
+    return Selection( name+'Sel',
+                      Algorithm = _Dstar,
+                      RequiredSelections = inputSel
+                    )
+
+def makePseudoPsi( name
+                    , config
+                    , DecayDescriptor
+                    , inputSel
+                  ) :
+
+    """
+    Create and return a D* -> D0 pi Selection object.
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of cut values.
+    DecayDescriptor: DecayDescriptor.
+    inputSel    : input selections
+    """
+
+    _daugCuts = "(PT> %(D0PtLoose)s*MeV)" % locals()['config']
+    _combCuts = "(APT> %(D0PtLoose)s*MeV)" % locals()['config']
+
+    _Psi = CombineParticles( DecayDescriptor = DecayDescriptor
+                             , DaughtersCuts = { "D0": _daugCuts }
+                             , CombinationCut = _combCuts
+                             , MotherCut = "(VFASPF(VCHI2PDOF) < 10000)"
+                             )
+
+    return Selection( name+'Sel',
+                      Algorithm = _Psi,
+                      RequiredSelections = inputSel
+                    )
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hhh_FTcalib.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hhh_FTcalib.py
new file mode 100644
index 000000000..d381fb278
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hhh_FTcalib.py
@@ -0,0 +1,264 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingD2hhh_FTcalib.py,v 0.0 2015-09-05 12:53:17 mdorigo Exp $
+'''
+Module for construction of D->HHH for FT calibrations (asymmetries in SSK and SSpi)
+based on StrippingD2hhh_conf.py from Erica Polycarpo and Alberto Reis
+
+Provides functions to build D2KKP, D2KPP, selections using StdLooseDplus
+Provides class D2hhhFTCalibConf, which constructs the Selections and 
+StrippingLines given a configuration dictionary.
+Exported symbols (use python help!):
+   - D2hhhFTCalibConf
+   - makeStdD2hhhFT
+'''
+
+__author__ = ['Mirco Dorigo']
+__date__ = '05/09/2015'
+__version__ = '$Revision: 0.0 $'
+
+__all__ = ('D2hhhFTCalibConf',
+           'makeStdD2hhhFT')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import ( StdNoPIDsPions,
+                                StdTightKaons ) 
+
+name = "D2hhhFTCalib"
+# Cuts to be implemented vy the Stripping team in Stripping Settings
+# Valid for Stripping 21 (27/8)
+# 
+
+default_config = {
+    'NAME'        :  'D2hhhFTCalib',
+    'WGs'         :  ['ALL'],
+    'BUILDERTYPE' : 'D2hhhFTCalibConf',
+    'STREAMS' : [ 'CharmCompleteEvent' ],
+    'CONFIG'      : {
+    'DaughterPT'            : 250.,
+    'DaughterP'             : 2000.,
+    'DaughterIPChi2'        : 4.,
+    'Daughter2IPChi2'       : 10.,
+    'D2KKKDaughterIPChi2'   : 4.,
+    'D2KKKDaughter2IPChi2'  : 4.,
+    'KPIDK'                 : 7.,
+    'piPIDK'                : 3.,
+    'PTSum'                 : 3200.,
+    'DOCAMax'               : 0.5,
+    'DOCAChi2'              : 50.,
+    'DPt'                   : 2000.,
+    'DIPChi2'               : 1500.,
+    'DdcaFDChi2'            : 150.,
+    'DPVLTIME'              : 0.2,
+    'DDIRA'                 : 0.99995,
+    'DVXChi2NDOF'           : 6.,
+    'MinMassPosFit'         : 1920.,
+    'MaxMassPosFit'         : 2040.,
+    'MaxTracksInEvent'      : 500,
+    'D2KKPLinePrescale'     : 0.2,
+    'D2KKPLinePostscale'    : 1.0 ,
+    'MinKKMass'		    : 1012.461,
+    'MaxKKMass'             : 1026.461,
+      }
+    }
+
+class D2hhhFTCalibConf(LineBuilder) :
+    """
+    Builder of D->hhh stripping Selection and StrippingLine.
+    Constructs D ->hhh Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> D2HHHConf = D2hhhConf('D2HHHtest',config)
+    >>> D2hhhLines = D2HHHConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selKKP             :  get StdLooseDplus2KKP 
+    selKPP             :  get StdLooseDplus2KPP 
+    selPPP             :  get StdTightDplus2PPP 
+    selKPPos           :  get StdLooseDplus2KPPi (DCS)
+    selTightKaon       :  get StdTightKaons
+    selNoPIDsPion      :  get StdNoPIDsPion 
+    D2KKP_line         :  StrippingLine made out of selKKP 
+    D2KPP_line         :  StrippingLine made out of selKPP 
+    D2PPP_line         :  StrippingLine made out of selPPP 
+    D2KPPos_line       :  StrippingLine made out of selKPPos
+    D2KKK_line         :  StrippingLine made out of 3K combinations
+    Ds2KKPos_line      :  StrippingLine made out of 3K combinations
+    D2HHHInc_line      :  StrippingLine made out of 3PI combinations with large mass window
+    lines              :  List of lines [D2KKP_line, D2KPP_line, D2PPP_line, D2KPPos_line, D2KKK_line, D2HHHInc_line]
+
+    Exports as class data member:
+    D2HHHConf.__configuration_keys__ : List of required configuration parameters.
+					RelatedInfoTools = [
+					  {
+					    'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+					    'RecursionLevel' : 1,
+					    'Locations' : {self.selD2KKP : 'P2CVD2KKP',}
+					    },
+					  ],
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        D2KKP_name = name+'_KKP'
+
+        self.selKKP = DataOnDemand(Location = "Phys/StdLooseDplus2KKPi/Particles")
+
+        self.selD2KKP = makeStdD2hhhFT(D2KKP_name,  
+                                       hhhSel = self.selKKP, 
+                                       DaughterPT= config['DaughterPT'],
+                                       DaughterP = config['DaughterP'],
+                                       DaughterIPChi2 = config['DaughterIPChi2'],
+                                       Daughter2IPChi2 = config['Daughter2IPChi2'],
+                                       DaughterDOCAChi2 = config['DOCAChi2'],
+                                       PTSum = config['PTSum'],
+                                       DDIRA= config['DDIRA'],
+                                       DIPChi2= config['DIPChi2'],
+                                       DdcaFDChi2= config['DdcaFDChi2'],
+                                       DPVLTIME = config['DPVLTIME'],
+                                       DPt = config['DPt'],
+                                       DVXChi2NDOF = config['DVXChi2NDOF'],
+                                       MinMassPosFit= config['MinMassPosFit'],
+                                       MaxMassPosFit= config['MaxMassPosFit'],
+                                       KPIDK = config['KPIDK'],
+                                       piPIDK = config['piPIDK'],
+						   MinKKMass = config['MinKKMass'],
+						   MaxKKMass = config['MaxKKMass']
+                                       )
+        self.filterGE = globalEventCutFilter(name + 'GECFilter', 
+                                    MaxTrSIZE = config['MaxTracksInEvent'])
+
+        self.D2KKP_line = StrippingLine(D2KKP_name+"Line",
+                                        prescale = config['D2KKPLinePrescale'],
+                                        postscale = config['D2KKPLinePostscale'],
+                                        selection = self.selD2KKP,
+                                        FILTER = self.filterGE
+                                        )
+
+        self.registerLine(self.D2KKP_line)
+
+
+def makeStdD2hhhFT(name,
+                 hhhSel,
+		 DaughterPT,
+		 DaughterP,
+		 DaughterIPChi2,
+		 Daughter2IPChi2, 
+		 DaughterDOCAChi2, 
+		 PTSum,
+		 DDIRA,
+		 DIPChi2,
+		 DdcaFDChi2,
+		 DPVLTIME,
+		 DPt,
+		 DVXChi2NDOF,
+		 MinMassPosFit,
+		 MaxMassPosFit,
+		 MinKKMass,
+		 MaxKKMass,
+		 KPIDK=None,
+		 piPIDK=None
+                 ):
+    """
+    Create and return a D -> HHH Selection object.
+    Arguments:
+    name           : name of the Selection.
+    hhhSel         : Standard Specific D2HHH selection    
+    DaughterPT     : Minimum PT among daughters
+    DaughterIPChi2 : Minimum IPChi2 among daughters
+    Daughter2IPChi2: Minimum IPChi2 required to at least 2 daughters 
+    DaughterP      : Minimum P among daughters
+    DaughterDOCAChi2:Maximum distance of closest approach between 2 daughters in error units 
+    PTSum          : Minimum sum of daughters momenta
+    DDIRA          : Minimum opening angle between sum_p and FD-direction
+    DIPChi2        : Maximum IPChi2 of the D
+    DdcaFDChi2     : Minimum distance from SV to any PV
+    DPVLTIME       : Minimum decay time
+    DPt            : Minimum D Momentum
+    DVXChi2NDOF    : Maximum Chi2 of the D Vertex
+    MinMassPosFit  : Minimum value of HHH invariant mass (MeV)
+    MaxMassPosFit  : Maximum value of HHH invariant mass (MeV).
+    KPIDK=None     : Minimum Kaon - pion DLL for kaons
+    piPIDK=None    : Maximum Kaon - pion DLL for pions
+    MinKKMass	 : Minimum value of KK invariant mass (MeV)
+    MaxKKMass	 : Maximum value of KK invariant mass (MeV)
+    """
+    _Daughtercuts_pi = """
+                       (MINTREE('pi+'==ABSID, PT) > %(DaughterPT)s*MeV ) &
+                       (MINTREE('pi+'==ABSID, P ) > %(DaughterP)s*MeV) &
+                       (MINTREE('pi+'==ABSID, MIPCHI2DV(PRIMARY)) > %(DaughterIPChi2)s ) 
+                       """ %locals()
+    _Daughtercuts_K = """
+                      (MINTREE('K-'==ABSID, PT) > %(DaughterPT)s*MeV ) &
+                      (MINTREE('K-'==ABSID, P ) > %(DaughterP)s*MeV) & 
+                      (MINTREE('K-'==ABSID, MIPCHI2DV(PRIMARY)) > %(DaughterIPChi2)s ) 
+                      """ %locals() 
+    _Combcuts_HHH =""" 
+                   ((SUMTREE( ISBASIC , PT ) > %(PTSum)s*MeV) &
+                   (2 <= NINGENERATION((MIPCHI2DV(PRIMARY) > %(Daughter2IPChi2)s ) , 1))) 
+                   """ % locals()
+                    
+    _Mothercuts_HHH = """ 
+                      (PT > %(DPt)s) & (VFASPF(VCHI2/VDOF) < %(DVXChi2NDOF)s) & 
+                      (BPVDIRA > %(DDIRA)s) & (BPVIPCHI2() < %(DIPChi2)s) & 
+                      (VFASPF(VMINVDCHI2DV(PRIMARY)) > %(DdcaFDChi2)s) & (BPVLTIME() > %(DPVLTIME)s*picosecond)
+                      & (DOCACHI2MAX < %(DaughterDOCAChi2)s)  
+                      """ % locals()
+    _cutsMassPosFit = " (in_range ( %(MinMassPosFit)s ,  M  , %(MaxMassPosFit)s )) " % locals()
+    _cutsKKMass = " (in_range ( %(MinKKMass)s ,  M12  , %(MaxKKMass)s )) " % locals()
+    _DaughterCuts = _Daughtercuts_pi
+    
+    if piPIDK != None :
+       _DaughterCuts += " & (MAXTREE('pi+'==ABSID, PIDK-PIDpi) < %(piPIDK)s) " % locals() 
+   
+    if KPIDK != None :
+       _DaughterCuts += " & (MINTREE('K-'==ABSID, PIDK-PIDpi) > %(KPIDK)s )" %locals()
+       _DaughterCuts += " & "+_Daughtercuts_K   
+  
+    _code = '('+_DaughterCuts+'&'+_Combcuts_HHH+'&'+_Mothercuts_HHH+'&'+_cutsMassPosFit+'&'+_cutsKKMass+')'
+ 
+    _filterHHH = FilterDesktop( Code = _code ) 
+   
+    return Selection ( name,
+                       Algorithm = _filterHHH,
+                       RequiredSelections = [hhhSel])
+
+
+
+def globalEventCutFilter(name, 
+                         MaxTrSIZE = None 
+                         ) :
+#  
+  if MaxTrSIZE == None : return None
+  
+  from Configurables import LoKi__VoidFilter as VoidFilter
+  from Configurables import LoKi__Hybrid__CoreFactory as CoreFactory
+  modules = CoreFactory('CoreFactory').Modules
+  for i in ['LoKiTracks.decorators']:
+     if i not in modules : modules.append(i)
+  
+  _code = "(recSummary(LHCb.RecSummary.nTracks, 'Rec/Track/Best') < %(MaxTrSIZE)s )" % locals()
+  
+  
+  return _code          
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hhh_conf.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hhh_conf.py
new file mode 100644
index 000000000..f1cacf3d9
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingD2hhh_conf.py
@@ -0,0 +1,723 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingD2hhh_conf.py,v 1.1 2011-02-14 12:53:17 polye Exp $
+'''
+Module for construction of D->HHH based on 
+ Bs->JpsiPhi pre-scaled and detatched stripping Selections and StrippingLines
+ from Greig and Juan and D->HHH selections cuts from Hamish and Mat.
+Provides functions to build D2KKP, D2KPP, D2PPP, D2KPPos selections using 
+ StdLooseDplus and D2KKK and D2hhh inclusive using CombineParticles.
+Provides class D2hhhConf, which constructs the Selections and 
+StrippingLines given a configuration dictionary.
+Exported symbols (use python help!):
+   - D2hhhConf
+   - makeStdD2hhh
+   - makeD2KKK
+   - makeDs2KKPos
+   - makeD2hhhInc
+'''
+
+__author__ = ['Erica Polycarpo','Alberto Reis']
+__date__ = '14/02/2011'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = ('D2hhhConf',
+           'makeStdD2hhh', 'makeD2KKK', 'makeD2HHHInc', 'makeDs2KKPos' )
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import ( StdNoPIDsPions,
+                                StdTightKaons ) 
+
+name = "D2hhh"
+# Cuts to be implemented vy the Stripping team in Stripping Settings
+# Valid for Stripping 21 (27/8)
+# 
+
+default_config = {
+    'NAME'        :  'D2hhhLines',
+    'WGs'         :  ['Charm'],
+    'BUILDERTYPE' : 'D2hhhConf',
+    'STREAMS' : [ 'Charm' ],
+    'CONFIG'      : {
+    'DaughterPT'            : 250.,
+    'DaughterP'             : 2000.,
+    'DaughterIPChi2'        : 4.,
+    'Daughter2IPChi2'       : 10.,
+    'D2KKKDaughterIPChi2'   : 4.,
+    'D2KKKDaughter2IPChi2'  : 4.,
+    'KPIDK'                 : 7.,
+    'piPIDK'                : 3.,
+    'PTSum'                 : 3200.,
+    'DOCAMax'               : 0.5,
+    'DOCAChi2'              : 50.,
+    'DPt'                   : 2000.,
+    'DIPChi2'               : 1500.,
+    'DdcaFDChi2'            : 150.,
+    'DPVLTIME'              : 0.2,
+    'DDIRA'                 : 0.99995,
+    'DVXChi2NDOF'           : 6.,
+    'MinMassPosFit'         : 1800.,
+    'MaxMassPosFit'         : 2040.,
+    'D2KPPMaxMassPosFit'    : 1940.,
+    'Ds2KKPosMinMassPosFit' : 1900.,
+    'D2HHHIncMinMassPosFit' : 1100.,
+    'D2HHHIncMaxMassPosFit' : 2070.,
+    'MaxTracksInEvent'      : 500,
+    'D2KKPLinePrescale'     : 1.0,
+    'D2KKPLinePostscale'    : 1.0 ,
+    'D2KPPLinePrescale'     : 0.5,
+    'D2KPPLinePostscale'    : 1.0,
+    'D2PPPLinePrescale'     : 0.5,
+    'D2PPPLinePostscale'    : 1.0,
+    'D2KKKLinePrescale'     : 1.0,
+    'D2KKKLinePostscale'    : 1.0,
+    'Ds2KKPosLinePrescale'  : 1.0,
+    'Ds2KKPosLinePostscale' : 1.0,
+    'D2KPPosLinePrescale'   : 1.0,
+    'D2KPPosLinePostscale'  : 1.0,
+    'D2HHHIncLinePrescale'  : 0.03,
+    'D2HHHIncLinePostscale' : 1.0,
+      }
+    }
+
+class D2hhhConf(LineBuilder) :
+    """
+    Builder of D->hhh stripping Selection and StrippingLine.
+    Constructs D ->hhh Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> D2HHHConf = D2hhhConf('D2HHHtest',config)
+    >>> D2hhhLines = D2HHHConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selKKP             :  get StdLooseDplus2KKP 
+    selKPP             :  get StdLooseDplus2KPP 
+    selPPP             :  get StdTightDplus2PPP 
+    selKPPos           :  get StdLooseDplus2KPPi (DCS)
+    selTightKaon       :  get StdTightKaons
+    selNoPIDsPion      :  get StdNoPIDsPion 
+    D2KKP_line         :  StrippingLine made out of selKKP 
+    D2KPP_line         :  StrippingLine made out of selKPP 
+    D2PPP_line         :  StrippingLine made out of selPPP 
+    D2KPPos_line       :  StrippingLine made out of selKPPos
+    D2KKK_line         :  StrippingLine made out of 3K combinations
+    Ds2KKPos_line      :  StrippingLine made out of 3K combinations
+    D2HHHInc_line      :  StrippingLine made out of 3PI combinations with large mass window
+    lines              :  List of lines [D2KKP_line, D2KPP_line, D2PPP_line, D2KPPos_line, D2KKK_line, D2HHHInc_line]
+
+    Exports as class data member:
+    D2HHHConf.__configuration_keys__ : List of required configuration parameters.
+					RelatedInfoTools = [
+					  {
+					    'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.5, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+					    'RecursionLevel' : 1,
+					    'Locations' : {self.selD2KKP : 'P2CVD2KKP',}
+					    },
+					  ],
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        D2KKP_name = name+'_KKP'
+        D2KPP_name = name+'_KPP'
+        D2PPP_name = name+'_PPP'
+        D2KPPos_name = name+'_KPPos'
+        D2KKK_name = name+'_KKK'
+        Ds2KKPos_name = name+'_KKPos'
+        D2HHHInc_name = name+'_HHHInc'
+
+        self.selKKP = DataOnDemand(Location = "Phys/StdLooseDplus2KKPi/Particles")
+        self.selKPP = DataOnDemand(Location = "Phys/StdLooseDplus2KPiPi/Particles")
+        self.selPPP = DataOnDemand(Location = "Phys/StdTightDplus2PiPiPi/Particles")
+        self.selKPPos = DataOnDemand(Location = "Phys/StdTightDplus2KPiPiOppSignPi/Particles")
+        self.selKKK = DataOnDemand(Location = "Phys/StdLooseDplus2KKK/Particles")
+        self.selKKPos = DataOnDemand(Location = "Phys/StdLooseDsplus2KKPiOppSign/Particles")
+
+        self.selD2KKP = makeStdD2hhh(D2KKP_name,  
+                                     hhhSel = self.selKKP, 
+                                     DaughterPT= config['DaughterPT'],
+                                     DaughterP = config['DaughterP'],
+                                     DaughterIPChi2 = config['DaughterIPChi2'],
+                                     Daughter2IPChi2 = config['Daughter2IPChi2'],
+                                     DaughterDOCAChi2 = config['DOCAChi2'],
+                                     PTSum = config['PTSum'],
+				     DDIRA= config['DDIRA'],
+				     DIPChi2= config['DIPChi2'],
+				     DdcaFDChi2= config['DdcaFDChi2'],
+				     DPVLTIME = config['DPVLTIME'],
+                                     DPt = config['DPt'],
+                                     DVXChi2NDOF = config['DVXChi2NDOF'],
+				     MinMassPosFit= config['MinMassPosFit'],
+				     MaxMassPosFit= config['MaxMassPosFit'],
+                                     KPIDK = config['KPIDK'],
+                                     piPIDK = config['piPIDK']
+			             )
+        self.selD2KPP = makeStdD2hhh(D2KPP_name,  
+                                     hhhSel = self.selKPP, 
+                                     DaughterPT= config['DaughterPT'],
+                                     DaughterP = config['DaughterP'],
+                                     DaughterIPChi2 = config['DaughterIPChi2'],
+                                     Daughter2IPChi2 = config['Daughter2IPChi2'],
+                                     DaughterDOCAChi2 = config['DOCAChi2'],
+                                     PTSum = config['PTSum'],
+				     DDIRA= config['DDIRA'],
+				     DIPChi2= config['DIPChi2'],
+				     DdcaFDChi2= config['DdcaFDChi2'],
+				     DPVLTIME = config['DPVLTIME'],
+                                     DPt = config['DPt'],
+                                     DVXChi2NDOF = config['DVXChi2NDOF'],
+				     MinMassPosFit= config['MinMassPosFit'],
+				     MaxMassPosFit= config['D2KPPMaxMassPosFit'],
+                                     KPIDK = config['KPIDK'],
+                                     piPIDK = config['piPIDK']
+			             )
+        self.selD2PPP = makeStdD2hhh(D2PPP_name,  
+                                     hhhSel = self.selPPP, 
+                                     DaughterPT= config['DaughterPT'],
+                                     DaughterP = config['DaughterP'],
+                                     DaughterIPChi2 = config['DaughterIPChi2'],
+                                     Daughter2IPChi2 = config['Daughter2IPChi2'],
+                                     DaughterDOCAChi2 = config['DOCAChi2'],
+                                     PTSum = config['PTSum'],
+				     DDIRA= config['DDIRA'],
+				     DIPChi2= config['DIPChi2'],
+				     DdcaFDChi2= config['DdcaFDChi2'],
+				     DPVLTIME = config['DPVLTIME'],
+                                     DPt = config['DPt'],
+                                     DVXChi2NDOF = config['DVXChi2NDOF'],
+				     MinMassPosFit= config['MinMassPosFit'],
+				     MaxMassPosFit= config['MaxMassPosFit'],
+                                     piPIDK = config['piPIDK']
+                                     )
+        self.selD2KPPos = makeStdD2hhh(D2KPPos_name,  
+                                     hhhSel = self.selKPPos, 
+                                     DaughterPT= config['DaughterPT'],
+                                     DaughterP = config['DaughterP'],
+                                     DaughterIPChi2 = config['DaughterIPChi2'],
+                                     Daughter2IPChi2 = config['Daughter2IPChi2'],
+                                     DaughterDOCAChi2 = config['DOCAChi2'],
+                                     PTSum = config['PTSum'],
+				     DDIRA= config['DDIRA'],
+				     DIPChi2= config['DIPChi2'],
+				     DdcaFDChi2= config['DdcaFDChi2'],
+				     DPVLTIME = config['DPVLTIME'],
+                                     DPt = config['DPt'],
+                                     DVXChi2NDOF = config['DVXChi2NDOF'],
+				     MinMassPosFit= config['MinMassPosFit'],
+				     MaxMassPosFit= config['MaxMassPosFit'],
+                                     KPIDK = config['KPIDK'],
+                                     piPIDK = config['piPIDK']
+                                     )
+        self.selD2KKK = makeStdD2hhh(D2KKK_name,
+                                     hhhSel = self.selKKK,
+                                     DaughterPT= config['DaughterPT'],
+                                     DaughterP = config['DaughterP'],
+                                     DaughterIPChi2 = config['D2KKKDaughterIPChi2'],
+                                     Daughter2IPChi2 = config['D2KKKDaughter2IPChi2'],
+                                     DaughterDOCAChi2 = config['DOCAChi2'],
+                                     PTSum = config['PTSum'],
+                                     DDIRA= config['DDIRA'],
+				     DIPChi2= config['DIPChi2'],
+				     DdcaFDChi2= config['DdcaFDChi2'],
+				     DPVLTIME = config['DPVLTIME'],
+                                     DPt = config['DPt'],
+                                     DVXChi2NDOF = config['DVXChi2NDOF'],
+				     MinMassPosFit= config['MinMassPosFit'],
+				     MaxMassPosFit= config['MaxMassPosFit'],
+                                     KPIDK = config['KPIDK']
+                                     )
+        self.selDs2KKPos = makeStdD2hhh(Ds2KKPos_name,
+                                     hhhSel = self.selKKPos,
+                                     DaughterPT= config['DaughterPT'],
+                                     DaughterP = config['DaughterP'],
+                                     DaughterIPChi2 = config['D2KKKDaughterIPChi2'],
+                                     Daughter2IPChi2 = config['D2KKKDaughter2IPChi2'],
+                                     DaughterDOCAChi2 = config['DOCAChi2'],
+                                     PTSum = config['PTSum'],
+                                     DDIRA= config['DDIRA'],
+				     DIPChi2= config['DIPChi2'],
+				     DdcaFDChi2= config['DdcaFDChi2'],
+				     DPVLTIME = config['DPVLTIME'],
+                                     DPt = config['DPt'],
+                                     DVXChi2NDOF = config['DVXChi2NDOF'],
+				     MinMassPosFit= config['Ds2KKPosMinMassPosFit'],
+				     MaxMassPosFit= config['MaxMassPosFit'],
+                                     KPIDK = config['KPIDK'],
+                                     piPIDK = config['piPIDK']
+                                     )
+        self.selD2HHHInc = makeD2HHHInc(D2HHHInc_name,  
+                                     DaughterPT= config['DaughterPT'],
+                                     DaughterP = config['DaughterP'],
+                                     DaughterIPChi2 = config['DaughterIPChi2'],
+                                     Daughter2IPChi2 = config['Daughter2IPChi2'],
+                                     PTSum = config['PTSum'],
+                                     DaughterDOCA = config['DOCAMax'],
+                                     DaughterDOCAChi2 = config['DOCAChi2'],
+				     DDIRA= config['DDIRA'],
+				     DIPChi2= config['DIPChi2'],
+				     DdcaFDChi2= config['DdcaFDChi2'],
+				     DPVLTIME = config['DPVLTIME'],
+                                     DPt = config['DPt'],
+                                     DVXChi2NDOF = config['DVXChi2NDOF'],
+				     MinMassPosFit= config['D2HHHIncMinMassPosFit'],
+				     MaxMassPosFit= config['D2HHHIncMaxMassPosFit']
+                                     )
+        self.filterGE = globalEventCutFilter(name + 'GECFilter', 
+                                    MaxTrSIZE = config['MaxTracksInEvent'])
+
+        self.D2KKP_line = StrippingLine(D2KKP_name+"Line",
+                                        prescale = config['D2KKPLinePrescale'],
+                                        postscale = config['D2KKPLinePostscale'],
+                                        selection = self.selD2KKP,
+					RelatedInfoTools = [ { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 0.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KKP,
+                                        "Location"     : 'DConeVar05' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.0,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KKP,
+                                        "Location"     : 'DConeVar10' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KKP,
+                                        "Location"     : 'D2ConeVar15' },
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 0.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KKP,
+					"Location" : 'DNCone05'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.0,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KKP,
+					"Location" : 'DNCone10'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KKP,
+					"Location" : 'DNCone15'}, 
+                                        { "Type"         : "RelInfoVertexIsolation",
+                                        "Location"     : "VertexIsoInfo" } ],
+                                        FILTER = self.filterGE
+					)
+        self.D2KPP_line = StrippingLine(D2KPP_name+"Line",
+	                                prescale = config['D2KPPLinePrescale'],
+                                        postscale = config['D2KPPLinePostscale'],
+                                        selection = self.selD2KPP,
+					RelatedInfoTools = [ { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 0.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KPP,
+                                        "Location"     : 'DConeVar05' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.0,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KPP,
+                                        "Location"     : 'DConeVar10' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KPP,
+                                        "Location"     : 'D2ConeVar15' },
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 0.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KPP,
+					"Location" : 'DNCone05'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.0,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KPP,
+					"Location" : 'DNCone10'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KPP,
+					"Location" : 'DNCone15'}, 
+                                        { "Type"         : "RelInfoVertexIsolation",
+                                        "Location"     : "VertexIsoInfo" } ],
+                                        FILTER = self.filterGE
+                                        )
+        self.D2PPP_line = StrippingLine(D2PPP_name+"Line",
+                                        prescale = config['D2PPPLinePrescale'],
+                                        postscale = config['D2PPPLinePostscale'],
+                                        selection = self.selD2PPP,
+					RelatedInfoTools = [ { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 0.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2PPP,
+                                        "Location"     : 'DConeVar05' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.0,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2PPP,
+                                        "Location"     : 'DConeVar10' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2PPP,
+                                        "Location"     : 'D2ConeVar15' },
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 0.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2PPP,
+					"Location" : 'DNCone05'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.0,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2PPP,
+					"Location" : 'DNCone10'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2PPP,
+					"Location" : 'DNCone15'}, 
+                                        { "Type"         : "RelInfoVertexIsolation",
+                                        "Location"     : "VertexIsoInfo" } ],
+                                        FILTER = self.filterGE
+                                        )
+        self.D2KPPos_line = StrippingLine(D2KPPos_name+"Line",
+                                        prescale = config['D2KPPosLinePrescale'],
+                                        postscale = config['D2KPPosLinePostscale'],
+                                        selection = self.selD2KPPos,
+					RelatedInfoTools = [ { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 0.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KPPos,
+                                        "Location"     : 'DConeVar05' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.0,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KPPos,
+                                        "Location"     : 'DConeVar10' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KPPos,
+                                        "Location"     : 'D2ConeVar15' },
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 0.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KPPos,
+					"Location" : 'DNCone05'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.0,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KPPos,
+					"Location" : 'DNCone10'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KPPos,
+					"Location" : 'DNCone15'}, 
+                                        { "Type"         : "RelInfoVertexIsolation",
+                                        "Location"     : "VertexIsoInfo" } ],
+                                        FILTER = self.filterGE
+                                        )
+        self.D2KKK_line = StrippingLine(D2KKK_name+"Line",
+                                        prescale = config['D2KKKLinePrescale'],
+                                        postscale = config['D2KKKLinePostscale'],
+                                        selection = self.selD2KKK,
+					RelatedInfoTools = [ { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 0.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KKK,
+                                        "Location"     : 'DConeVar05' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.0,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KKK,
+                                        "Location"     : 'DConeVar10' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2KKK,
+                                        "Location"     : 'D2ConeVar15' },
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 0.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KKK,
+					"Location" : 'DNCone05'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.0,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KKK,
+					"Location" : 'DNCone10'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2KKK,
+					"Location" : 'DNCone15'}, 
+                                        { "Type"         : "RelInfoVertexIsolation",
+                                        "Location"     : "VertexIsoInfo" } ],
+                                        FILTER = self.filterGE
+                                        )
+        self.Ds2KKPos_line = StrippingLine(Ds2KKPos_name+"Line",
+                                        prescale = config['Ds2KKPosLinePrescale'],
+                                        postscale = config['Ds2KKPosLinePostscale'],
+                                        selection = self.selDs2KKPos,
+					RelatedInfoTools = [ { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 0.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selDs2KKPos,
+                                        "Location"     : 'DConeVar05' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.0,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selDs2KKPos,
+                                        "Location"     : 'DConeVar10' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selDs2KKPos,
+                                        "Location"     : 'D2ConeVar15' },
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 0.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selDs2KKPos,
+					"Location" : 'DNCone05'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.0,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selDs2KKPos,
+					"Location" : 'DNCone10'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selDs2KKPos,
+					"Location" : 'DNCone15'}, 
+                                        { "Type"         : "RelInfoVertexIsolation",
+                                        "Location"     : "VertexIsoInfo" } ],
+                                        FILTER = self.filterGE
+                                        )
+        self.D2HHHInc_line = StrippingLine(D2HHHInc_name+"Line",
+                                        prescale = config['D2HHHIncLinePrescale'],
+                                        postscale = config['D2HHHIncLinePostscale'],
+                                        selection = self.selD2HHHInc,
+					RelatedInfoTools = [ { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 0.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2HHHInc,
+                                        "Location"     : 'DConeVar05' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.0,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2HHHInc,
+                                        "Location"     : 'DConeVar10' },
+                                        { "Type"         : "RelInfoConeVariables",
+                                        "ConeAngle"    : 1.5,
+                                        "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                        "TopSelection" : self.selD2HHHInc,
+                                        "Location"     : 'D2ConeVar15' },
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 0.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2HHHInc,
+					"Location" : 'DNCone05'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.0,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2HHHInc,
+					"Location" : 'DNCone10'}, 
+					{ "Type" : "RelInfoConeVariablesForEW", 
+					"ConeAngle" : 1.5,  
+					"Variables" : ['EWCONENMULT'],
+                                        "TopSelection" : self.selD2HHHInc,
+					"Location" : 'DNCone15'}, 
+                                        { "Type"         : "RelInfoVertexIsolation",
+                                        "Location"     : "VertexIsoInfo" } ],
+                                        FILTER = self.filterGE
+                                        )
+
+        self.registerLine(self.D2KKP_line)
+        self.registerLine(self.D2KPP_line)
+        self.registerLine(self.D2PPP_line)
+        self.registerLine(self.D2KPPos_line)
+        self.registerLine(self.D2KKK_line)
+        self.registerLine(self.Ds2KKPos_line)
+        self.registerLine(self.D2HHHInc_line)
+
+
+def makeStdD2hhh(name,
+                 hhhSel,
+		 DaughterPT,
+		 DaughterP,
+		 DaughterIPChi2,
+		 Daughter2IPChi2, 
+		 DaughterDOCAChi2, 
+		 PTSum,
+		 DDIRA,
+		 DIPChi2,
+		 DdcaFDChi2,
+		 DPVLTIME,
+		 DPt,
+		 DVXChi2NDOF,
+		 MinMassPosFit,
+		 MaxMassPosFit,
+		 KPIDK=None,
+		 piPIDK=None
+                 ):
+    """
+    Create and return a D -> HHH Selection object.
+    Arguments:
+    name           : name of the Selection.
+    hhhSel         : Standard Specific D2HHH selection    
+    DaughterPT     : Minimum PT among daughters
+    DaughterIPChi2 : Minimum IPChi2 among daughters
+    Daughter2IPChi2: Minimum IPChi2 required to at least 2 daughters 
+    DaughterP      : Minimum P among daughters
+    DaughterDOCAChi2:Maximum distance of closest approach between 2 daughters in error units 
+    PTSum          : Minimum sum of daughters momenta
+    DDIRA          : Minimum opening angle between sum_p and FD-direction
+    DIPChi2        : Maximum IPChi2 of the D
+    DdcaFDChi2     : Minimum distance from SV to any PV
+    DPVLTIME       : Minimum decay time
+    DPt            : Minimum D Momentum
+    DVXChi2NDOF    : Maximum Chi2 of the D Vertex
+    MinMassPosFit  : Minimum value of HHH invariant mass (MeV)
+    MaxMassPosFit  : Maximum value of HHH invariant mass (MeV).
+    KPIDK=None     : Minimum Kaon - pion DLL for kaons
+    piPIDK=None    : Maximum Kaon - pion DLL for pions
+    """
+    _Daughtercuts_pi = """
+                       (MINTREE('pi+'==ABSID, PT) > %(DaughterPT)s*MeV ) &
+                       (MINTREE('pi+'==ABSID, P ) > %(DaughterP)s*MeV) &
+                       (MINTREE('pi+'==ABSID, MIPCHI2DV(PRIMARY)) > %(DaughterIPChi2)s ) 
+                       """ %locals()
+    _Daughtercuts_K = """
+                      (MINTREE('K-'==ABSID, PT) > %(DaughterPT)s*MeV ) &
+                      (MINTREE('K-'==ABSID, P ) > %(DaughterP)s*MeV) & 
+                      (MINTREE('K-'==ABSID, MIPCHI2DV(PRIMARY)) > %(DaughterIPChi2)s ) 
+                      """ %locals() 
+    _Combcuts_HHH =""" 
+                   ((SUMTREE( ISBASIC , PT ) > %(PTSum)s*MeV) &
+                   (2 <= NINGENERATION((MIPCHI2DV(PRIMARY) > %(Daughter2IPChi2)s ) , 1))) 
+                   """ % locals()
+                    
+    _Mothercuts_HHH = """ 
+                      (PT > %(DPt)s) & (VFASPF(VCHI2/VDOF) < %(DVXChi2NDOF)s) & 
+                      (BPVDIRA > %(DDIRA)s) & (BPVIPCHI2() < %(DIPChi2)s) & 
+                      (VFASPF(VMINVDCHI2DV(PRIMARY)) > %(DdcaFDChi2)s) & (BPVLTIME() > %(DPVLTIME)s*picosecond)
+                      & (DOCACHI2MAX < %(DaughterDOCAChi2)s)  
+                      """ % locals()
+    _cutsMassPosFit = " (in_range ( %(MinMassPosFit)s ,  M  , %(MaxMassPosFit)s )) " % locals()
+    _DaughterCuts = _Daughtercuts_pi
+    
+    if piPIDK != None :
+       _DaughterCuts += " & (MAXTREE('pi+'==ABSID, PIDK-PIDpi) < %(piPIDK)s) " % locals() 
+   
+    if KPIDK != None :
+       _DaughterCuts += " & (MINTREE('K-'==ABSID, PIDK-PIDpi) > %(KPIDK)s )" %locals()
+       _DaughterCuts += " & "+_Daughtercuts_K   
+  
+    _code = '('+_DaughterCuts+'&'+_Combcuts_HHH+'&'+_Mothercuts_HHH+'&'+_cutsMassPosFit+')'
+ 
+    _filterHHH = FilterDesktop( Code = _code ) 
+   
+    return Selection ( name,
+                       Algorithm = _filterHHH,
+                       RequiredSelections = [hhhSel])
+
+
+def makeD2HHHInc(name,
+              DaughterPT,
+              DaughterP,
+              DaughterIPChi2,
+              Daughter2IPChi2,
+              DaughterDOCA,
+              DaughterDOCAChi2,
+              PTSum,
+              DDIRA,
+              DIPChi2,
+              DdcaFDChi2,
+              DPVLTIME,
+              DPt,
+              DVXChi2NDOF,
+              MinMassPosFit,
+              MaxMassPosFit
+              ):
+    """
+    Create and return a D -> HHHInclusive selection 
+    Arguments:
+    name           : name of the Selection.
+    pionSel        : Pion Selection (from CommonParticles) 
+    DaughterPT     : Minimum PT among daughters
+    DaughterP      : Minimum P among daughters
+    DaughterIPChi2 : Minimum IPChi2 among daughters
+    Daughter2IPChi2: Minimum IPChi2 required to at least 2 daughters 
+    DaughterDOCA   : Maximum distance of closest approach between 2 daughters 
+    DaughterDOCAChi2:Maximum distance of closest approach between 2 daughters in error units 
+    PTSum          : Minimum sum of daughters momenta
+    DDIRA          : Minimum opening angle between sum_p and FD-direction
+    DIPChi2        : Maximum IPChi2 of the D
+    DdcaFDChi2     : Minimum distance from SV to any PV
+    DPVLTIME       : Minimum decay time
+    DPt            : Minimum D Momentum
+    DVXChi2NDOF    : Maximum Chi2 of the D Vertex
+    MinMassPosFit  : Minimum value of HHH invariant mass (MeV)
+    MaxMassPosFit  : Maximum value of HHH invariant mass (MeV).
+    """
+
+    _DaughterCuts = "((MIPCHI2DV(PRIMARY)) > %(DaughterIPChi2)s ) & (P > %(DaughterP)s*MeV) & (PT > %(DaughterPT)s*MeV) " % locals() 
+                      
+    _Combcuts_HHH = "(ADOCACHI2CUT(%(DaughterDOCAChi2)s,'')) & (ADOCACUT(%(DaughterDOCA)s*mm,'')) & (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > %(PTSum)s*MeV) & (ANUM(MIPCHI2DV(PRIMARY) > %(Daughter2IPChi2)s ) >= 2) " % locals()
+                   
+    _Mothercuts_HHH = """ 
+                      (PT > %(DPt)s) & (VFASPF(VCHI2/VDOF) < %(DVXChi2NDOF)s) & 
+                      (BPVDIRA > %(DDIRA)s) & (BPVIPCHI2() < %(DIPChi2)s) & 
+                      (VFASPF(VMINVDCHI2DV(PRIMARY)) > %(DdcaFDChi2)s) & (BPVLTIME() > %(DPVLTIME)s*picosecond)
+                      """ % locals()
+    _cutsMassPosFit = " (in_range ( %(MinMassPosFit)s ,  M  , %(MaxMassPosFit)s )) " % locals()
+                   
+    _combHHH = CombineParticles()
+    _combHHH.DecayDescriptor = '[D+ -> pi- pi+ pi+]cc' 
+    _combHHH.DaughtersCuts = { "pi+" : '(' + _DaughterCuts + ')' } 
+    _combHHH.CombinationCut = '(' + _Combcuts_HHH + ')' 
+    _combHHH.MotherCut = '(' + _Mothercuts_HHH + ' & ' + _cutsMassPosFit  + ')' 
+
+
+    return Selection ( name,
+                       Algorithm = _combHHH,
+                       RequiredSelections = [StdNoPIDsPions])
+
+
+def globalEventCutFilter(name, 
+                         MaxTrSIZE = None 
+                         ) :
+#  
+  if MaxTrSIZE == None : return None
+  
+  from Configurables import LoKi__VoidFilter as VoidFilter
+  from Configurables import LoKi__Hybrid__CoreFactory as CoreFactory
+  modules = CoreFactory('CoreFactory').Modules
+  for i in ['LoKiTracks.decorators']:
+     if i not in modules : modules.append(i)
+  
+  _code = "(recSummary(LHCb.RecSummary.nTracks, 'Rec/Track/Best') < %(MaxTrSIZE)s )" % locals()
+  
+  
+  return _code          
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD02xx.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD02xx.py
new file mode 100644
index 000000000..cbe0817ca
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD02xx.py
@@ -0,0 +1,310 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+#
+__author__ = ['Andrea Contu', 'Francesco Dettori', 'Walter Bonivento']
+__date__ = '2014/10/08'
+__version__ = '$Revision: 2.1 $'
+__all__ = ('StrippingDstarD02xxConf'
+           ,'combinetwobody'
+           ,'combineDstar'
+           ,'default_config'
+           #,'baseLine'
+           #,'baseLine_untagged'
+           #,'my_lines'
+           )
+'''
+  Stripping for D*(2010)+ -> pi+ (D0->xx) selection:
+            where xx = {mu mu, pi pi, pi mu, k mu, ... }
+            
+'''
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+# Default values
+
+default_name = "DstarD02xx"
+
+default_config = {'NAME': 'DstarD02xx',
+  'WGs' : ['Charm'],
+  'BUILDERTYPE' : 'StrippingDstarD02xxConf',
+  'STREAMS' : [ 'Charm' ],
+  'CONFIG' : {    'PrescalepipiBox'     : 1.
+                  , 'PrescalemumuBox'     : 1.
+                  , 'PrescaleKpiBox'    : 1.
+                  , 'PrescaleemuBox'    : 1.
+                  , 'PrescaleeKBox'    : 1.
+                  , 'PrescaleepiBox'    : 1.
+                  , 'PrescalepimuBox'    : 1.
+                  , 'PrescaleKmuBox'    : 1.
+                  , 'Prescalepipi_untagged_Box'     : 1.0
+                  , 'Prescalemumu_untagged_Box'     : 1.0
+                  , 'PrescaleKpi_untagged_Box'    : 1.0
+                  , 'Prescalepimu_untagged_Box'    : 1.0
+                  , 'PrescaleKmu_untagged_Box'    : 0.5
+                  , 'PrescaleKpi_untagged_BoxMB' : 0.
+                  , 'Prescalepipi_untagged_BoxMB':0.
+                  , 'PrescaleKpi_untagged_BoxMBTrEff' : 0.
+                  ,'DMassWin'           : 70.       # MeV
+                  ,'DMassWinMuMuLow'    : -150.       #MeV
+                  ,'DMassWinMuMuHigh'   : 300       #MeV
+                  ,'DMassWinEMu'        : 300
+                  ,'doca'               : 0.1        # mm
+                  ,'XminPT'             : 750.       # MeV
+                  ,'XmaxPT'             : 1100.      # MeV
+                  ,'XminP'              : 4000.      # MeV
+                  ,'XTrackChi2'         : 5.        # adimensional
+                  ,'XTrackChi2Pi'         : 7.        # adimensional
+                  ,'XminIPChi2'         : 3        # adimensional
+                  ,'XmaxIPChi2'         : 8        # adimensional
+                  ,'ghostProbCut'       : 0.5      #added for Stripping20 by A Contu
+                  ,'DMinFlightChi2'    :  20.
+                  ,'DDira'              : 0.9997     # adimensional
+                  ,'D0MinPT'            : 1800.      # MeV
+                  ,'DMaxIPChi2'        :15.
+                  ,'DVChi2'            :10. 
+                  ,'PiMinPT'            : 110.       # MeV
+                  ,'PiMaxIPCHI2'        : 10.         # adimensional
+                  ,'DstMassWin'         : 300.       # MeV
+                  ,'DstD0DMWin'         : 10.        # MeV
+                  ,'DstD0DMWinMuMu'      : 30.        # MeV  
+                  ,'RequireHlt'         : 1
+                  ,'HLT2String'          :  "Hlt2RareCharmD02LAB1LAB2*Decision"
+                  ,'HLT1MB'             : "HLT_PASS_RE('Hlt1(MB|L0).*Decision')"
+                  ,'HLT2MB'             : "HLT_PASS_RE('Hlt2CharmHadMinBiasD02KPiDecision')"
+                  #hltname = "Hlt2Dst2PiD02"+Xplus+Xminus+"*Decision"
+                  #hltname = "Hlt2Dst2PiD02"+Xplus+Xminus+"*Decision"
+                 ,'ConeAngles'     : {"08":0.8,"10":1.0,"12":1.2,"14":1.4}
+                 ,'ConeVariables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM']
+                 ,'prefix'         : '' 
+                 }
+    }
+
+class StrippingDstarD02xxConf(LineBuilder):
+    """
+    Builder for  D*(2010)+ -> pi+ (D0->xx) stripping lines
+    """
+  
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        
+        line_pipi_box = self.baseLine(name,config,"pi", "pi")
+        line_mumu_box = self.baseLine(name,config,"mu", "mu")
+        line_Kpi_box  = self.baseLine(name,config,"K",  "pi")
+        #line_eK_box   = self.baseLine(name,config,"e",   "K")
+        #line_epi_box  = self.baseLine(name,config,"e",   "pi")
+        line_mue_box  = self.baseLine(name,config,"e",  "mu")
+        #line_pimu_box = self.baseLine(name,config,"pi", "mu")
+        line_Kmu_box  = self.baseLine(name,config,"K",  "mu")
+
+
+        # Tagged lines
+        
+        line_mumu_untagged_box  = self.baseLine_untagged(name,config,"mu",  "mu", 0)
+        line_Kmu_untagged_box  = self.baseLine_untagged(name,config,"K",  "mu" ,  0)
+        line_pipi_untagged_box  = self.baseLine_untagged(name,config,"pi",  "pi", 0)
+        line_Kpi_untagged_box  = self.baseLine_untagged(name,config,"K",  "pi",   0)
+        #line_pimu_untagged_box = self.baseLine_untagged(name,config,"pi", "mu")
+
+
+        # Untagged minimum bias lines for trigger efficiency estimate
+        
+        line_Kpi_minbias =  self.baseLine_untagged(name,config,"K",  "pi",   1)
+        #line_pipi_minbias =  self.baseLine_untagged(name,config,"pi",  "pi", 1) #removed in St20
+        
+        line_Kpi_minbias_treff =  self.baseLine_untagged(name,config,"K",  "pi",   2)
+        
+        lines_to_be = [line_pipi_box,  line_mumu_box, line_Kpi_box, line_mue_box, line_Kmu_box,line_mumu_untagged_box ,line_Kmu_untagged_box, line_pipi_untagged_box,line_Kpi_untagged_box, line_Kpi_minbias,  line_Kpi_minbias_treff]
+        
+        for i in lines_to_be:
+            self.registerLine(i)
+            
+
+    ###### Full line
+    def baseLine(self, name, config,  xplus, xminus) :
+        """
+        Returns the stripping line for the tagged decay
+        D* -> D0(-> xx) pi
+        """
+        xxCombSel = combinetwobody(name, config,xplus, xminus,"forTag")
+        combname = xplus+xminus
+        dstar_box = combineDstar(config)
+        dst_req_sel = [DataOnDemand( "Phys/StdAllNoPIDsPions/Particles" ) ,
+                       DataOnDemand( "Phys/StdNoPIDsUpPions/Particles"),
+                       xxCombSel]
+        
+        pres = "Prescale"+combname+"Box"
+        _tag_sel = Selection (name+"_seq_"+combname+"_box",
+                              Algorithm = dstar_box,
+                              RequiredSelections = dst_req_sel)####
+        
+        # Capitalize particle names to match Hlt2 D*->pi D0-> xx lines
+        Xplus  = xplus[0].upper() + xplus[1:]    
+        Xminus = xminus[0].upper() + xminus[1:]
+        
+        coneinfo = []
+        for conekey, coneitem in (config['ConeAngles']).iteritems():
+            coneinfo.append({ 
+                                        'Type' : 'RelInfoConeVariables', 'ConeAngle' : coneitem, 'Variables' : config['ConeVariables'], 
+                                        'Location' : 'P2CVDst'+conekey,
+                                        'DaughterLocations' : {
+                                          '[D*(2010)+ -> ^(Charm -> X+ X- ) pi+]CC' : 'P2CVD0'+conekey,
+                                          '[D*(2010)+ -> (Charm -> X+ X- ) ^pi+]CC' : 'P2CVpis'+conekey,
+                                          '[D*(2010)+ -> (Charm -> ^X+ X- ) pi+]CC' : 'P2CVplus'+conekey,
+                                          '[D*(2010)+ -> (Charm -> X+ ^X- ) pi+]CC' : 'P2CVminus'+conekey,
+                                        } 
+                                      })
+          
+        
+        if (xplus == "e" and xminus =="mu") or (xplus == "mu" and xminus == "e"):
+            
+            line_box = StrippingLine(name+config['prefix']+"Dst2PiD02"+combname+"Box",
+                                     algos = [ _tag_sel ],
+                                     prescale = config[ pres ],
+                                     #RequiredRawEvents = ["Muon"],                                   
+                                     RelatedInfoTools = coneinfo
+                                     )
+            
+        else:
+            hltname = config['HLT2String']  # * matches Signal, Sidebands and Box lines
+            hltname = hltname.replace('LAB1',Xplus)
+            hltname = hltname.replace('LAB2',Xminus)
+            line_box = StrippingLine(name+config['prefix']+"Dst2PiD02"+combname+"Box",
+                                     HLT2 = "HLT_PASS_RE('"+hltname+"')",
+                                     algos = [ _tag_sel ], 
+                                     prescale = config[ pres ],
+                                     #RequiredRawEvents = ["Muon"],
+                                     RelatedInfoTools = coneinfo
+                                      )
+        
+        return line_box
+    
+    def baseLine_untagged(self, name, config, xplus, xminus, minbias) :
+        """
+        Returns the stripping line for the untagged decay
+        D0->xx
+        """
+        suffix = ""
+        if minbias == 1 :
+            suffix = "MB"
+        elif minbias ==2 :
+            suffix = "MBTrEff"
+            
+        xxCombSel= combinetwobody(name+suffix, config,xplus, xminus)
+        combname = xplus+xminus
+        pres = "Prescale"+combname+"_untagged_Box"
+        # Capitalize particle names to match Hlt2 D*->pi D0-> xx lines
+        Xplus  = xplus[0].upper() + xplus[1:]    
+        Xminus = xminus[0].upper() + xminus[1:]
+        hltname = config['HLT2String']  # * matches Signal, Sidebands and Box lines
+        hltname = hltname.replace('LAB1',Xplus)
+        hltname = hltname.replace('LAB2',Xminus)
+        coneinfo = []
+        for conekey, coneitem in (config['ConeAngles']).iteritems():
+            coneinfo.append({ 
+                                        'Type' : 'RelInfoConeVariables', 'ConeAngle' : coneitem, 'Variables' : config['ConeVariables'], 
+                                        'Location' : 'P2CVD0'+conekey,
+                                        'DaughterLocations' : {
+                                          '[Charm -> ^X+ X- ]CC' : 'P2CVplus'+conekey,
+                                          '[Charm -> X+ ^X- ]CC' : 'P2CVminus'+conekey,
+                                        } 
+                                      })
+        
+        if(minbias==1):
+            line_untagged_box = StrippingLine(name+config['prefix']+"Dst2PiD02"+combname+"_untagged_BoxMB",
+                                              HLT1 = config['HLT1MB'],
+                                              algos = [ xxCombSel ], 
+                                              prescale = config[ pres+"MB" ],
+                                              RelatedInfoTools = coneinfo
+                                              )
+        elif(minbias==2):
+            line_untagged_box = StrippingLine(name+config['prefix']+"Dst2PiD02"+combname+"_untagged_BoxMBTrEff",
+                                              HLT2 = config['HLT2MB'],
+                                              algos = [ xxCombSel ], 
+                                              prescale = config[ pres+"MBTrEff" ],
+                                              RelatedInfoTools = coneinfo
+                                              )
+        else :
+            line_untagged_box = StrippingLine(name+config['prefix']+"Dst2PiD02"+combname+"_untagged_Box",
+                                              HLT2 = "HLT_PASS_RE('"+hltname+"')",
+                                              algos = [ xxCombSel ], 
+                                              prescale = config[ pres ],
+                                              RelatedInfoTools = coneinfo
+                                              )
+
+        return line_untagged_box    
+
+
+
+####### Template for combine particles for D0 -> x+ y-  ######
+def combinetwobody(name, config, xplus, xminus, postfix="") :
+    if(xplus == "mu") and (xminus == "mu") :                                     
+        d0comb_combcut =       "(AMAXDOCA('')< %(doca)s *mm) & (DAMASS('D0')< %(DMassWinMuMuHigh)s *MeV) & (DAMASS('D0')> %(DMassWinMuMuLow)s *MeV) & (AMAXCHILD(PT)>%(XmaxPT)s *MeV) & (APT> %(D0MinPT)s)"
+    elif (((xplus == "mu") and (xminus == "e")) or ((xplus == "e") and (xminus == "mu"))) :
+        d0comb_combcut =       "(AMAXDOCA('')< %(doca)s *mm) & (ADAMASS('D0')< %(DMassWinEMu)s *MeV) & (AMAXCHILD(PT)>%(XmaxPT)s *MeV) & (APT> %(D0MinPT)s)"
+    else :
+        d0comb_combcut =       "(AMAXDOCA('')< %(doca)s *mm) & (ADAMASS('D0')< %(DMassWin)s *MeV) & (AMAXCHILD(PT)>%(XmaxPT)s *MeV) & (APT> %(D0MinPT)s)"
+        
+    d0comb_childcut = "(PT> %(XminPT)s *MeV) & (P>%(XminP)s *MeV) & (TRCHI2DOF<%(XTrackChi2)s) & (MIPCHI2DV(PRIMARY)> %(XminIPChi2)s) & ( TRGHOSTPROB < %(ghostProbCut)s )" 
+    d0comb_d0cut = "(BPVDIRA> %(DDira)s) & (INGENERATION( (MIPCHI2DV(PRIMARY)>%(XmaxIPChi2)s),1 ) ) & (BPVVDCHI2> %(DMinFlightChi2)s) & (MIPCHI2DV(PRIMARY)< %(DMaxIPChi2)s) & (VFASPF(VCHI2/VDOF)< %(DVChi2)s)"
+    
+
+    inputLoc = {
+          "pi" : "Phys/StdAllNoPIDsPions/Particles"
+        ,"mu" : "Phys/StdAllLooseMuons/Particles"
+        ,"K" : "Phys/StdAllLooseKaons/Particles"
+        ,"e" : "Phys/StdAllLooseElectrons/Particles"
+        }
+    req_sel = []
+    xx_name = "D02"+xplus+xminus+postfix
+    if xplus != xminus :
+        decays = ["D0 -> "+ xplus + "+ " + xminus + "- ", "D0 -> "+ xplus + "- " + xminus + "+ " ]
+        xx_comb = CombineParticles( DecayDescriptors =  decays,
+                                    DaughtersCuts = { xplus+"+" : d0comb_childcut % config, xminus+"-" : d0comb_childcut % config },
+                                    MotherCut = d0comb_d0cut  % config,
+                                    CombinationCut = d0comb_combcut % config
+                                    )
+        req_sel.append(DataOnDemand(Location = inputLoc[xplus]))
+        req_sel.append(DataOnDemand(Location = inputLoc[xminus]))
+        _untag_sel = Selection (name+"seq_"+xx_name+"_selection", Algorithm = xx_comb, RequiredSelections = req_sel)
+        return _untag_sel
+    else:
+        decay = "D0 -> "+ xplus + "+ " + xminus + "- "
+        xx_comb = CombineParticles( DecayDescriptor =  decay,
+                                    DaughtersCuts = { xplus+"+" : d0comb_childcut % config },
+                                    MotherCut = d0comb_d0cut  % config,
+                                    CombinationCut = d0comb_combcut % config
+                                    )
+        req_sel.append(DataOnDemand(Location = inputLoc[xplus]))
+        _untag_sel = Selection (name+"seq_"+xx_name+"_selection", Algorithm = xx_comb, RequiredSelections = req_sel)
+        return _untag_sel
+
+
+####### Template for combine particles for D* -> D0 pi
+def combineDstar(config) :
+    dstcomb_dstcut       =  "(abs(M-MAXTREE('D0'==ABSID,M)-145.42) < %(DstD0DMWin)s ) & (VFASPF(VCHI2/VDOF)< %(DVChi2)s)"
+    dstcomb_combcut =  "(ADAMASS('D*(2010)+')<%(DstMassWin)s * MeV)"
+    dstcomb_picut = "(PT> %(PiMinPT)s * MeV) &  ( MIPCHI2DV(PRIMARY)< %(PiMaxIPCHI2)s) & (TRCHI2DOF<%(XTrackChi2Pi)s) "
+    dstcomb_d0cut = "PT>0"
+    
+    dstar = CombineParticles( DecayDescriptors = ['D*(2010)+ -> D0 pi+', 'D*(2010)- -> D0 pi-'],
+                            DaughtersCuts = {    "pi+" : dstcomb_picut % config ,
+                                                 "D0"    : dstcomb_d0cut % config
+                                            },
+                            CombinationCut = dstcomb_combcut % config,
+                            MotherCut =  dstcomb_dstcut % config
+        )
+
+    return dstar
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD0ToHHPi0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD0ToHHPi0.py
new file mode 100644
index 000000000..d36e37a70
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD0ToHHPi0.py
@@ -0,0 +1,273 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Kevin Maguire','Mika Vesterinen']
+__date__ = '23/11/2015'
+__version__ = '$Revision: 0.2 $'
+
+"""
+Module for D* tagged D0 -> hhpi0.
+Supersedes StrippingDstarD2hhpi0
+"""
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles, OfflineVertexFitter
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLoosePions, StdLoosePions, StdLooseKaons, StdLooseResolvedPi0, StdLooseMergedPi0
+from Configurables import TisTosParticleTagger
+
+__all__ = ('DstarD0ToHHPi0AllLinesBuilder',
+           'DstarMaker',
+           'TOSFilter',
+           'default_config')
+
+default_config = {
+        'NAME': 'DstarD0ToHHPi0',
+        'WGs'         : ['Charm'],
+        'STREAMS':["Charm"],
+        'BUILDERTYPE' : 'DstarD0ToHHPi0AllLinesBuilder',
+        'CONFIG'      : {
+            "prescale_Pi0R_WIDEMASS" : 1.0 #adimensional
+            ,"Pi0R_PT" : 500  # MeV
+            ,"Pi0R_DMASS" : 15  # MeV
+            ,"Pi0M_PT" : 1000 #MeV
+            ,"Pi0_MassConstraint" : False # adimensional
+            ,"D0_M_WINDOW" : 150 #MeV
+            ,"DELTA_MASS_MAX" : 180 #MeV
+            ,"Pion_PIDK" : 0 #adimensional 
+            ,"Kaon_PIDK" : 7 #adimensional 
+            ,"Pion_PT" : 500 #MeV 
+            ,"Kaon_PT" : 500 #MeV
+            ,"Slowpion_PT" : 300 #MeV 
+            ,"Pion_TRGHOSTPROB" : 0.35 #adimensional
+            ,"Kaon_TRGHOSTPROB" : 0.35 #adimensional
+            ,"Slowpion_TRGHOSTPROB" : 0.35 #adimensional
+            ,"Slowpion_PIDe" : 5 #adimensional
+            ,"D0_APT" : 1400  #MeV
+            ,"useTOS" : True  #adimensional
+            ,"useHLT2" : False  #adimensional
+            ,"TOSFilter" : { "Hlt2CharmHadDstp2D0Pip_D02.*Pi0_Pi0.*Decision%TOS" : 0, 'Hlt2CharmHadInclDst2PiD02HHXBDTDecision%TOS' : 0, 'Hlt2Global%TIS' : 0 } #adimensional
+            ,"Hlt2Filter" :  ""  #adimensional
+            }
+        }
+
+class DstarD0ToHHPi0AllLinesBuilder(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+    
+    
+    def __init__(self, _name, config) :
+
+        LineBuilder.__init__(self, _name, config)
+        self.__confdict__=config
+        
+        ### define the global event cuts
+        ### max number of long tracks
+        GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 180)", 
+                 "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        ### define the muon cuts                                                                                                       
+        
+        self.PionCuts = "(PT > %(Pion_PT)s *MeV) & (TRGHOSTPROB < %(Pion_TRGHOSTPROB)s) & (PIDK < %(Pion_PIDK)s)" %self.__confdict__ 
+
+        self.KaonCuts = "(PT > %(Kaon_PT)s *MeV) & (TRGHOSTPROB < %(Kaon_TRGHOSTPROB)s) & (PIDK > %(Kaon_PIDK)s)" %self.__confdict__
+        
+        self.SlowpionCuts = "(PT > %(Slowpion_PT)s *MeV) & (TRGHOSTPROB < %(Slowpion_TRGHOSTPROB)s) & (PIDe < %(Slowpion_PIDe)s) & (MIPCHI2DV(PRIMARY)< 9.0)" %self.__confdict__
+        
+        self.Pi0RCuts = "(PT > %(Pi0R_PT)s *MeV) & (M > 135 - %(Pi0R_DMASS)s *MeV) & (M < 135 + %(Pi0R_DMASS)s *MeV)" %self.__confdict__                
+        self.Pi0RWIDEMASSCuts = "(PT > %(Pi0R_PT)s *MeV)" %self.__confdict__ 
+        
+        self.Pi0MCuts = "(PT > %(Pi0R_PT)s *MeV)" %self.__confdict__
+
+        self.Pions = Selection( "PionsFor" + _name, 
+                                Algorithm = FilterDesktop(name = "PionFilterFor"+_name, Code = self.PionCuts ),
+                                RequiredSelections = [StdLoosePions])
+        self.Kaons = Selection( "KaonsFor" + _name,
+                                Algorithm = FilterDesktop(name = "KaonFilterFor"+_name, Code = self.KaonCuts ),
+                                RequiredSelections = [StdLooseKaons])
+        self.Slowpions = Selection( "SlowpionsFor" + _name,
+                                    Algorithm = FilterDesktop(name = "SlowpionFilterFor"+_name, Code = self.SlowpionCuts ),
+                                    RequiredSelections = [StdAllLoosePions])
+        
+        self.Pi0R_WIDEMASS = Selection( "Pi0R_WIDEMASS_For" + _name,
+                               Algorithm = FilterDesktop(name = "Pi0RFilterFor"+_name, Code = self.Pi0RWIDEMASSCuts ),
+                               RequiredSelections = [StdLooseResolvedPi0])
+        
+        self.Pi0R = Selection( "Pi0RFor" + _name,
+                               Algorithm = FilterDesktop(name = "Pi0RFilterFor"+_name, Code = self.Pi0RCuts ),
+                               RequiredSelections = [StdLooseResolvedPi0])
+
+        self.Pi0M = Selection( "Pi0MFor" + _name,
+                               Algorithm = FilterDesktop(name = "Pi0MFilterFor"+_name, Code = self.Pi0MCuts ),
+                               RequiredSelections = [StdLooseMergedPi0])
+                
+        self.Kpipi0_R_Line = DstarMaker(_name+"_Kpipi0_R_",
+                                        ['[K*(892)0 -> K- pi+]cc','[K*(892)0 -> K+ pi-]cc'],                                                  
+                                        ['[D0 -> K*(892)0 pi0]cc'],    
+                                        ['[D*(2010)+ -> D0 pi+]cc'],
+                                        [self.Pions,self.Kaons],
+                                        self.Pi0R,
+                                        self.Slowpions,
+                                        GECs,
+                                        self.__confdict__,
+                                        1.0
+                                        )
+
+        self.Kpipi0_R_WIDEMASS_Line = DstarMaker(_name+"_Kpipi0_R_WIDEMASS_",
+                                                 ['[K*(892)0 -> K- pi+]cc'],                                                  
+                                                 ['[D0 -> K*(892)0 pi0]cc'],    
+                                                 ['[D*(2010)+ -> D0 pi+]cc'],
+                                                 [self.Pions,self.Kaons],
+                                                 self.Pi0R_WIDEMASS,
+                                                 self.Slowpions,
+                                                 GECs,
+                                                 self.__confdict__,
+                                                 self.__confdict__['prescale_Pi0R_WIDEMASS']
+                                                 )
+
+        self.pipipi0_R_Line = DstarMaker(_name+"_pipipi0_R_",
+                                         ['[K*(892)0 -> pi- pi+]cc'],                                                  
+                                         ['[D0 -> K*(892)0 pi0]cc'],    
+                                         ['[D*(2010)+ -> D0 pi+]cc'],
+                                         [self.Pions],
+                                         self.Pi0R,
+                                         self.Slowpions,
+                                         GECs,
+                                         self.__confdict__,
+                                         1.0
+                                         )
+        
+        self.KKpi0_R_Line = DstarMaker(_name+"_KKpi0_R_",
+                                       ['[K*(892)0 -> K- K+]cc'],                                                  
+                                       ['[D0 -> K*(892)0 pi0]cc'],    
+                                       ['[D*(2010)+ -> D0 pi+]cc'],
+                                       [self.Kaons],
+                                       self.Pi0R,
+                                       self.Slowpions,
+                                       GECs,
+                                       self.__confdict__,
+                                       1.0
+                                       )
+        
+        self.Kpipi0_M_Line = DstarMaker(_name+"_Kpipi0_M_",
+                                        ['[K*(892)0 -> K- pi+]cc','[K*(892)0 -> K+ pi-]cc'],                                                  
+                                        ['[D0 -> K*(892)0 pi0]cc'],    
+                                        ['[D*(2010)+ -> D0 pi+]cc'],
+                                        [self.Pions,self.Kaons],
+                                        self.Pi0M,
+                                        self.Slowpions,
+                                        GECs,
+                                        self.__confdict__ ,
+                                        1.0
+                                        )
+        
+        self.pipipi0_M_Line = DstarMaker(_name+"_pipipi0_M_",
+                                         ['[K*(892)0 -> pi- pi+]cc'],                                                  
+                                         ['[D0 -> K*(892)0 pi0]cc'],    
+                                         ['[D*(2010)+ -> D0 pi+]cc'],
+                                         [self.Pions],
+                                         self.Pi0M,
+                                         self.Slowpions,
+                                         GECs,
+                                         self.__confdict__ ,
+                                         1.0
+                                         )
+
+        self.KKpi0_M_Line = DstarMaker(_name+"_KKpi0_M_",
+                                       ['[K*(892)0 -> K- K+]cc'],                                                  
+                                       ['[D0 -> K*(892)0 pi0]cc'],    
+                                       ['[D*(2010)+ -> D0 pi+]cc'],
+                                       [self.Kaons],
+                                       self.Pi0M,
+                                       self.Slowpions,
+                                       GECs,
+                                       self.__confdict__ ,
+                                       1.0
+                                       )
+        
+        
+        self.registerLine(self.Kpipi0_R_Line)
+        self.registerLine(self.pipipi0_R_Line)
+        self.registerLine(self.KKpi0_R_Line)
+        self.registerLine(self.Kpipi0_M_Line)
+        self.registerLine(self.pipipi0_M_Line)
+        self.registerLine(self.KKpi0_M_Line)
+        self.registerLine(self.Kpipi0_R_WIDEMASS_Line)
+        
+def DstarMaker(_name,_KstDecays,_D0Decays,_DstDecays,_ChargedTracks,_Pi0s,_Slowpions,_Filter,config,prescale):
+    
+    KstSel = Selection("SelKst"+_name,
+                       Algorithm = CombineParticles( name = "CombKst"+_name,
+                                                     DecayDescriptors = _KstDecays,
+                                                     CombinationCut = "(((ACHILD(PT,1) > 1.7*GeV) & (ACHILD(BPVIPCHI2(),1) > 36)) | ((ACHILD(PT,2) > 1.7*GeV) & (ACHILD(BPVIPCHI2(),2) > 36))) & (AM < 1850*MeV) & (ADOCACHI2CUT(15,''))",
+                                                     MotherCut = "(VFASPF(VCHI2/VDOF) < 3) & (BPVVDCHI2 > 100)"),
+                       RequiredSelections = _ChargedTracks)  
+    
+    D0Comb = CombineParticles( name = "CombD0"+_name,
+                               DecayDescriptors = _D0Decays,
+                               CombinationCut = "(ADAMASS('D0') < %(D0_M_WINDOW)s + 10 *MeV) & (APT > %(D0_APT)s *MeV)" %config,
+                               MotherCut = "(VFASPF(VCHI2/VDOF) < 20.0) & (DMASS('D0') < %(D0_M_WINDOW)s *MeV)" %config)
+    
+    D0Sel = Selection("SelD0"+_name,
+                      Algorithm =  D0Comb,
+                      RequiredSelections = [KstSel,_Pi0s]) 
+    
+    DstComb = CombineParticles( name = "CombDst"+_name,
+                                DecayDescriptors = _DstDecays,
+                                CombinationCut = "(AM - ACHILD(M,1) < %(DELTA_MASS_MAX)s+5 *MeV) & (ADOCACHI2CUT(20,''))" %config,
+                                MotherCut = "(M - CHILD(M,1) < %(DELTA_MASS_MAX)s *MeV) & (VFASPF(VCHI2/VDOF) < 9.0)" %config)
+    if config["Pi0_MassConstraint"] == True:
+        DstComb.addTool( OfflineVertexFitter )                                                                                                  
+        DstComb.ParticleCombiners.update( {"" : "OfflineVertexFitter"} )                                                                                    
+        DstComb.OfflineVertexFitter.useResonanceVertex = False
+        DstComb.OfflineVertexFitter.applyDauMassConstraint = True                                                                                      
+        DstComb.ReFitPVs = True   
+        
+    DstSel = Selection("SelDst"+_name,
+                       Algorithm = DstComb,
+                       RequiredSelections = [D0Sel,_Slowpions])
+    
+    _tosFilter = config['TOSFilter']
+    DstSelTOS = TOSFilter( "SelDstKPiPi0_Hlt2TOS"+_name
+                           ,DstSel
+                           ,_tosFilter)
+    
+    hlt2 = ""
+    if config["useHLT2"] == True:
+        _hlt2 =  "%(Hlt2Filter)s" %config
+        hlt2 = _hlt2
+        
+    if config["useTOS"] == True:
+        Line = StrippingLine(_name+'Line',
+                             prescale = prescale,
+                             FILTER=_Filter,
+                             HLT2 = hlt2,
+                             selection = DstSelTOS) 
+    else:
+        Line = StrippingLine(_name+'Line',
+                             prescale = prescale,
+                             FILTER=_Filter,
+                             HLT2 = hlt2,
+                             selection = DstSel) 
+    return Line
+                                                    
+def TOSFilter( name, _input, _specs ) :
+
+    from Configurables import TisTosParticleTagger
+    _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+    _tisTosFilter.TisTosSpecs = _specs 
+    return Selection( name
+                      , Algorithm = _tisTosFilter
+                      , RequiredSelections = [ _input ]
+                      )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2HHHH.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2HHHH.py
new file mode 100644
index 000000000..1851be0b0
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2HHHH.py
@@ -0,0 +1,247 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting D*+ - > D0 (pi h h h) pi+
+
+Authors: Maurizio Martinelli, Maxime Schubiger
+"""
+
+########################################################################
+__author__ = ['Maurizio Martinelli', 'Maxime Schubiger']
+__date__ = '07/05/2015'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('DstarD2HHHHLines',
+           'default_config')
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, DaVinci__N4BodyDecays
+from StandardParticles                     import StdAllNoPIDsPions, StdNoPIDsPions, StdNoPIDsKaons
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+
+from GaudiKernel.SystemOfUnits import GeV, MeV, picosecond, mm
+
+
+default_config = {
+    'NAME'        : 'DstarD2HHHH',
+    'WGs'         : ['Charm'],
+    'BUILDERTYPE' : 'DstarD2HHHHLines',
+    'CONFIG'      : { 'PrescaleDstarD2PiPiPiPi' : 1,
+                      'PrescaleDstarD2KPiPiPi'  : 1,
+                      'PrescaleDstarD2KKPiPi'   : 1,
+                      'PrescaleDstarD2KKKPi'    : 1,
+                      # D0 -> HHHH
+                      'TrChi2'                  : 4,
+                      'TrGhostProb'             : 0.5,
+                      'MinTrkPT'                : 250 * MeV,
+                      'MinTrkIPChi2'            : 3.5,
+                      'HighPIDK'                : 0,
+                      'LowPIDK'                 : 0,
+                      'MaxADOCACHI2'            : 10.0,
+                      'CombMassLow'             : 1730 * MeV,
+                      'CombMassHigh'            : 2000 * MeV,
+                      'MinCombPT'               : 1500 * MeV,
+                      'MinCombP'                : 20000 * MeV,
+                      'MaxVCHI2NDOF'            : 12.0,
+                      'MinBPVDIRA'              : 0.99995,
+                      'MinBPVTAU'               : 0.1 * picosecond,
+                      'MassLow'                 : 1790 * MeV,
+                      'MassHigh'                : 1940 * MeV,
+                      'MinDPT'                  : 3000 * MeV,
+                      'MinDP'                   : 25000 * MeV,
+                      # D* -> D0 pi+
+                      'Daug_TRCHI2DOF_MAX'      : 3,
+                      'Dstar_AMDiff_MAX'        : 190 * MeV,
+                      'Dstar_VCHI2VDOF_MAX'     : 15.0,
+                      'Dstar_MDiff_MAX'         : 170 * MeV,
+                      # HLT filters, only process events firing triggers matching the RegEx
+                      'Hlt1Filter': None,
+                      'Hlt2Filter': None,
+                    },
+    'STREAMS'     : ['Charm']
+    }
+
+class DstarD2HHHHLines( LineBuilder ) :
+    """Class defining the D*+ -> (D0 -> pi h h h) pi+ stripping lines"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.D2HHHH, self.Dst2D0pi, self.lineDstarD2HHHH = {}, {}, {}
+
+        decays = { 'PiPiPiPi'  : ['D0 -> pi+ pi- pi+ pi-'],
+                   'KPiPiPi'   : ['D0 -> K- pi+ pi+ pi-', 'D0 -> K+ pi- pi+ pi-'],
+                   'KKPiPi'    : ['D0 -> K+ K- pi+ pi-'],
+                   'KKKPi'     : ['D0 -> K- K+ K- pi+', 'D0 -> K+ K+ K- pi-']
+                     }
+
+        for decay, decayDescriptors in decays.iteritems():
+            # make the various stripping selections
+            DstarD2HHHHName   = name + "DstarD2" + decay
+            D2HHHHName   = name + "D2" + decay
+
+            am34 = (139.57 + (493.677 if decay == 'KKKPi' else 139.57) ) * MeV
+            am4 = 139.57 * MeV
+            inputs = [ StdNoPIDsPions] if decay == 'PiPiPiPi' else [ StdNoPIDsPions, StdNoPIDsKaons ]
+
+            # Create the D0 candidate
+            self.D2HHHH[decay] = self.makeD2HHHH(D2HHHHName,
+                                            decayDescriptors,
+                                            config['TrChi2'],
+                                            config['TrGhostProb'],
+                                            config['MinTrkPT'],
+                                            config['MinTrkIPChi2'],
+                                            config['HighPIDK'],
+                                            config['LowPIDK'],
+                                            am34,
+                                            am4,
+                                            config['CombMassLow'],
+                                            config['CombMassHigh'],
+                                            config['MaxADOCACHI2'],
+                                            config['MinCombPT'],
+                                            config['MinCombP'],
+                                            config['MassLow'],
+                                            config['MassHigh'],
+                                            config['MaxVCHI2NDOF'],
+                                            config['MinBPVDIRA'],
+                                            config['MinBPVTAU'],
+                                            config['MinDPT'],
+                                            config['MinDP'],
+                                            inputs
+                                            )
+
+            # Create the D* candidate
+            self.Dst2D0pi[decay] = self.makeDstar2D0Pi(DstarD2HHHHName,
+                                                  config,
+                                                  ['D*(2010)+ -> D0 pi+', 'D*(2010)- -> D0 pi-'],
+                                                  inputSel = [self.D2HHHH[decay], StdAllNoPIDsPions] )
+
+            # Create the stripping line
+            self.lineDstarD2HHHH[decay] = StrippingLine(DstarD2HHHHName+"Line",
+                                                        prescale  = config['PrescaleDstarD2'+decay],
+                                                        selection = self.Dst2D0pi[decay],
+                                                        HLT1 = config['Hlt1Filter'],
+                                                        HLT2 = config['Hlt2Filter'] )
+
+            # Register the line
+            self.registerLine(self.lineDstarD2HHHH[decay])
+        # end loop on decay modes
+
+
+
+    def makeD2HHHH( self, name, decayDescriptors,
+                   trChi2,trGhostProb,minPT,minIPChi2,
+                   highPIDK, lowPIDK,
+                   am34, am4, amMin, amMax,
+                   maxDocaChi2, minCombPT, minCombP,
+                   vmMin, vmMax, maxVChi, minbpvDira, minLT, minDPT, minDP,
+                   inputSel = [ StdNoPIDsPions, StdNoPIDsKaons ]) :
+        """
+          Create and return a D0 -> HHHH (H=K,pi) Selection object.
+          Arguments:
+          name            : name of the Selection.
+          DecayDescriptor : DecayDescriptor.
+          trChi2          : maximum tracks chi2
+          trGhostProb     : maximum tracks ghost probability
+          minPT           : minimum tracks PT
+          minIPChi2       : minimum tracks IPChi2
+          highPIDK        : maximum PIDk for pions
+          lowPIDK         : minimum PIDk for kaons
+          am34            : phase space limit on 2-body combinations mass
+          am4             : phase space limit on 3-body combinations mass
+          amMin           : minimum 4-body combination mass
+          amMax           : maximum 4-body combination mass
+          minCombPT       : minimum 4-body combination PT
+          minCombP        : minimum 4-body combination P
+          maxDocaChi2     : maximum 2-tracks DocaChi2
+          mMin            : minimum vertex mass
+          mMax            : maximum vertex mass
+          maxVChi         : maximum vertex chi2
+          minbpvDira      : minimum DIRA wrt best PV
+          minLT           : minimum lifetime wrt best PV
+          minDPT          : minimum D PT
+          minDP           : minimum D P
+          inputSel        : input selections
+        """
+
+        _daughters_cuts = " (TRGHOSTPROB < %(trGhostProb)s)" \
+                          "&(TRCHI2DOF < %(trChi2)s)" \
+                          "&(PT > %(minPT)s)" \
+                          "&(MIPCHI2DV(PRIMARY) > %(minIPChi2)s )" %locals()
+        _pidPi = "&(PIDK < %(highPIDK)s)" %locals()
+        _pidK  = "&(PIDK > %(lowPIDK)s)" %locals()
+
+
+        _c12_cuts = (" ( AM < (%(amMax)s - %(am34)s) ) " \
+                     "&( ACHI2DOCA(1,2) < %(maxDocaChi2)s ) " %locals() )
+        _c123_cuts =(" ( AM < (%(amMax)s - %(am4)s) ) " \
+                     "&( ACHI2DOCA(1,3) < %(maxDocaChi2)s ) " \
+                     "&( ACHI2DOCA(2,3) < %(maxDocaChi2)s ) " %locals() )
+        _combination_cuts =  (" (in_range( %(amMin)s, AM, %(amMax)s )) " \
+                              "&( (APT1+APT2+APT3+APT4) > %(minCombPT)s )" \
+                              "&( AP > %(minCombP)s )" \
+                              "&( ACHI2DOCA(1,4) < %(maxDocaChi2)s ) " \
+                              "&( ACHI2DOCA(2,4) < %(maxDocaChi2)s ) " \
+                              "&( ACHI2DOCA(3,4) < %(maxDocaChi2)s ) " %locals() )
+        _mother_cuts = (" (in_range( %(vmMin)s, M, %(vmMax)s )) " \
+                        "&(VFASPF(VCHI2PDOF) < %(maxVChi)s)" \
+                        "&(BPVDIRA > %(minbpvDira)s )" \
+                        "&(BPVLTIME() > %(minLT)s )" \
+                        "&(PT > %(minDPT)s )" \
+                        "&(P  > %(minDP)s )" %locals() )
+
+        CombineD2HHHH = DaVinci__N4BodyDecays(DecayDescriptors = decayDescriptors,
+                                              DaughtersCuts = { "pi+" : _daughters_cuts+_pidPi, "K+" : _daughters_cuts+_pidK },
+                                              Combination12Cut = _c12_cuts, Combination123Cut = _c123_cuts,
+                                              CombinationCut = _combination_cuts,
+                                              MotherCut = _mother_cuts)
+
+        return Selection(name,
+                         Algorithm = CombineD2HHHH,
+                         RequiredSelections = inputSel )
+
+
+    def makeDstar2D0Pi(self, name,
+                       config,
+                       DecayDescriptors,
+                       inputSel) :
+        """
+          Create and return a D* -> D0 pi Selection object.
+          Arguments:
+          name        : name of the Selection.
+          config      : dictionary of cut values.
+          DecayDescriptor: DecayDescriptor.
+          inputSel    : input selections
+        """
+        daugCuts = "(TRCHI2DOF < %(Daug_TRCHI2DOF_MAX)s)" % locals()['config']
+        combCuts = "((AM - AM1) < %(Dstar_AMDiff_MAX)s)" % locals()['config']
+        dstarCuts = " (VFASPF(VCHI2/VDOF) < %(Dstar_VCHI2VDOF_MAX)s)" \
+                    "&((M - M1) < %(Dstar_MDiff_MAX)s)" % locals()['config']
+
+        _Dstar = CombineParticles(DecayDescriptors = DecayDescriptors,
+                                  DaughtersCuts = { "pi+" : daugCuts },
+                                  CombinationCut = combCuts,
+                                  MotherCut = dstarCuts )
+
+        return Selection(name+'Sel',
+                         Algorithm = _Dstar,
+                         RequiredSelections = inputSel
+                         )
+
+
+########################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2KSHHPi0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2KSHHPi0.py
new file mode 100644
index 000000000..890151363
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2KSHHPi0.py
@@ -0,0 +1,303 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping options for (pre-)selecting D*+ - > D0 (pi0 h h KS) pi+
+
+Authors: Maurizio Martinelli, Tommaso Pajero
+'''
+
+__author__ = ['Maurizio Martinelli', 'Tommaso Pajero']
+__date__ = '19/03/2021'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = ('DstarD2KSHHPi0Lines',
+           'default_config')
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, DaVinci__N4BodyDecays
+from StandardParticles import StdAllNoPIDsPions, StdNoPIDsPions, StdNoPIDsKaons, StdLooseResolvedPi0, StdLooseMergedPi0, StdLooseKsDD, StdLooseKsLL
+
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder, checkConfig
+
+from Configurables import FilterDesktop
+
+from GaudiKernel.SystemOfUnits import GeV, MeV, picosecond, mm
+
+
+default_config = {
+    'NAME': 'DstarD2KSHHPi0',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'DstarD2KSHHPi0Lines',
+    'CONFIG': { 'PrescaleDstarD2PiPiPi0KSLL' : 1,
+                'PrescaleDstarD2KPiPi0KSLL'  : 1,
+                'PrescaleDstarD2KKPi0KSLL'   : 1,
+                'PrescaleDstarD2PiPiPi0KSDD' : 1,
+                'PrescaleDstarD2KPiPi0KSDD'  : 1,
+                'PrescaleDstarD2KKPi0KSDD'   : 1,
+                # Pi0
+                'Pi0MassWin'         : 35 * MeV,
+                'Pi0PtMin'           : 1000 * MeV,
+                'Pi0PMin'            : 2000 * MeV,
+                'PhotonCL'           : 0.25,
+                # KS (DD)
+                'MinZ_DD'            : 300 * mm,
+                'MaxZ_DD'            : 2275 * mm,
+                'KSCutDIRA_DD'       : 0.99,
+                'KSCutMass_DD'       : 50 * MeV,
+                'KSCutFDChi2_DD'     : 100,
+                # KS (LL)
+                'MinZ_LL'            : -100 * mm,
+                'MaxZ_LL'            : 500 * mm,
+                'KSCutDIRA_LL'       : 0.99,
+                'KSCutMass_LL'       : 35 * MeV,
+                'KSCutFDChi2_LL'     : 100,
+                # D0
+                'TrChi2'             : 4,
+                'TrGhostProb'        : 0.5,
+                'MinTrkPT'           : 250 * MeV,
+                'MinTrkIPChi2'       : 4,
+                'HighPIDK'           : 0,
+                'LowPIDK'            : 0,
+                'MaxADOCACHI2'       : 10.0,
+                'CombMassLow'        : 1500 * MeV,
+                'CombMassHigh'       : 2300 * MeV,
+                'MinCombPT'          : 0.0,
+                'MaxVCHI2NDOF'       : 12.0,
+                'MinBPVDIRA'         : 0.9998,
+                'MinBPVTAU'          : 0.1 * picosecond,
+                'MassLow'            : 1650 * MeV,
+                'MassHigh'           : 2100 * MeV,
+                'MinFDCHI2'          : 15,
+                # D* -> D0 pi+
+                'Daug_TRCHI2DOF_MAX' : 3,
+                'Dstar_AMDiff_MAX'   : 190 * MeV,
+                'Dstar_VCHI2VDOF_MAX': 15.0,
+                'Dstar_MDiff_MAX'    : 170 * MeV,
+                # HLT filters, only process events firing triggers matching the RegEx
+                'Hlt1Filter': None,
+                'Hlt2Filter': None,
+              },
+    'STREAMS': ['Charm']
+    }
+
+
+class DstarD2KSHHPi0Lines(LineBuilder):
+    '''Class defining the D*+ -> (D0 -> pi0 h h KS) pi+ stripping lines'''
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        # Lists of Pi0, Gammas
+        self.selPi0Resolved = Selection('SelPi0Resolvedfor' + name,
+                                        Algorithm=self.Pi0ResolvedFilter('Pi0Resolvedfor'+name, config),
+                                        RequiredSelections=[StdLooseResolvedPi0])
+        self.selPi0Merged = Selection('SelPi0Mergedfor' + name,
+                                      Algorithm=self.Pi0MergedFilter('Pi0Mergedfor'+name, config),
+                                      RequiredSelections=[StdLooseMergedPi0])
+        self.AllPi0s = MergedSelection('SelAllPi0sFor'+name,
+                                       RequiredSelections=[self.selPi0Resolved, self.selPi0Merged])
+
+        self.KS = {'DD': Selection('SelKSDDFor'+name,
+                                   Algorithm=self.KSFilter('KSDDFor'+name,
+                                                           config['MinZ_DD'],
+                                                           config['MaxZ_DD'],
+                                                           config['KSCutDIRA_DD'],
+                                                           config['KSCutMass_DD'],
+                                                           config['KSCutFDChi2_DD']),
+                                   RequiredSelections=[StdLooseKsDD]),
+                   'LL': Selection('SelKSLLFor'+name,
+                                   Algorithm=self.KSFilter('KSLLFor'+name,
+                                                           config['MinZ_LL'],
+                                                           config['MaxZ_LL'],
+                                                           config['KSCutDIRA_LL'],
+                                                           config['KSCutMass_LL'],
+                                                           config['KSCutFDChi2_LL']),
+                                   RequiredSelections=[StdLooseKsLL]) }
+
+        self.D2HHHH, self.Dst2D0pi, self.lineDstarD2HHHH = {}, {}, {}
+
+        decays = {'PiPiPi0KS': ['D0 -> pi+ pi- KS0 pi0'],
+                  'KPiPi0KS':  ['D0 -> K- pi+ KS0 pi0', 'D0 -> K+ pi- KS0 pi0'],
+                  'KKPi0KS':   ['D0 -> K+ K- KS0 pi0'],
+                 }
+
+        for decay, decayDescriptors in decays.iteritems():
+            # make the various stripping selections
+            DstarD2KSHHPi0Name = name + 'DstarD2' + decay
+            D2KSHHPi0Name = name + 'D2' + decay
+
+            am34 = (134.97 + 497.614) * MeV
+            am4 = 134.97 * MeV
+            inputs = [StdNoPIDsPions, self.AllPi0s] if decays == 'PiPiPi0KS' else [StdNoPIDsPions, StdNoPIDsKaons, self.AllPi0s]
+
+            # use both LL and DD KS
+            for ksName, ksCands in self.KS.iteritems():
+                # Create the D0 candidate
+                self.D2HHHH[decay+ksName] = self.makeD2HHHH(D2KSHHPi0Name+ksName,
+                                                            decayDescriptors,
+                                                            config['TrChi2'],
+                                                            config['TrGhostProb'],
+                                                            config['MinTrkPT'],
+                                                            config['MinTrkIPChi2'],
+                                                            config['HighPIDK'],
+                                                            config['LowPIDK'],
+                                                            am34,
+                                                            am4,
+                                                            config['CombMassLow'],
+                                                            config['CombMassHigh'],
+                                                            config['MaxADOCACHI2'],
+                                                            config['MinCombPT'],
+                                                            config['MassLow'],
+                                                            config['MassHigh'],
+                                                            config['MaxVCHI2NDOF'],
+                                                            config['MinBPVDIRA'],
+                                                            config['MinBPVTAU'],
+                                                            config['MinFDCHI2'],
+                                                            inputs+[ksCands])
+
+                # Create the D* candidate
+                self.Dst2D0pi[decay+ksName] = self.makeDstar2D0Pi(DstarD2KSHHPi0Name+ksName,
+                                                                  config,
+                                                                  ['D*(2010)+ -> D0 pi+', 'D*(2010)- -> D0 pi-'],
+                                                                  inputSel = [self.D2HHHH[decay+ksName], StdAllNoPIDsPions])
+
+                # Create the stripping line
+                self.lineDstarD2HHHH[decay+ksName] = StrippingLine(DstarD2KSHHPi0Name+ksName+'Line',
+                                                                   prescale  = config['PrescaleDstarD2'+decay+ksName],
+                                                                   selection = self.Dst2D0pi[decay+ksName],
+                                                                   HLT1 = config['Hlt1Filter'],
+                                                                   HLT2 = config['Hlt2Filter'])
+
+                # Register the line
+                self.registerLine(self.lineDstarD2HHHH[decay+ksName])
+
+
+    def Pi0ResolvedFilter( self, _name, _config):
+        _code = ("  ( ADMASS('pi0') <  %(Pi0MassWin)s )" \
+                 "& ( PT> %(Pi0PtMin)s ) " \
+                 "& ( P> %(Pi0PMin)s )" \
+                 "& ( CHILD(CL,1)> %(PhotonCL)s) " \
+                 "& ( CHILD(CL,2)> %(PhotonCL)s) " % _config)
+        _pil = FilterDesktop(name=_name, Code=_code)
+        return _pil
+
+
+    def Pi0MergedFilter( self, _name, _config):
+        _code = "(PT> %(Pi0PtMin)s *MeV) & (P> %(Pi0PMin)s *MeV)" % _config
+        _pil = FilterDesktop(name=_name, Code=_code)
+        return _pil
+
+
+    def KSFilter(self, _name,
+                 minZ, maxZ,
+                 KSCutDIRA, KSCutMass, KSCutFDChi2):
+        _code = " (BPVVDZ > 0 ) " \
+                "&(VFASPF(VZ) > %(minZ)s ) " \
+                "&(VFASPF(VZ) < %(maxZ)s ) " \
+                "&(BPVDIRA > %(KSCutDIRA)s ) " \
+                "&(ADMASS('KS0') < %(KSCutMass)s ) " \
+                "&(BPVVDCHI2> %(KSCutFDChi2)s )" % locals()
+        _KsFilter = FilterDesktop(name=_name, Code=_code)
+        return _KsFilter
+
+
+    def makeD2HHHH(self, name, decayDescriptors,
+                   trChi2,trGhostProb,minPT,minIPChi2,
+                   highPIDK, lowPIDK,
+                   am34, am4, amMin, amMax,
+                   maxDocaChi2, minCombPT,
+                   vmMin, vmMax, maxVChi, minbpvDira, minLT, minFDchi2,
+                   inputSel=[StdNoPIDsPions, StdNoPIDsKaons]):
+        """
+          Create and return a D0 -> HHHH (H=K,pi) Selection object.
+          Arguments:
+          name            : name of the Selection.
+          DecayDescriptor : DecayDescriptor.
+          trChi2          : maximum tracks chi2
+          trGhostProb     : maximum tracks ghost probability
+          minPT           : minimum tracks PT
+          minIPChi2       : minimum tracks IPChi2
+          highPIDK        : maximum PIDk for pions
+          lowPIDK         : minimum PIDk for kaons
+          am34            : phase space limit on 2-body combinations mass
+          am4             : phase space limit on 3-body combinations mass
+          amMin           : minimum 4-body combination mass
+          amMax           : maximum 4-body combination mass
+          minPT           : minimum 4-body combination PT
+          maxDocaChi2     : maximum 2-tracks DocaChi2
+          mMin            : minimum vertex mass
+          mMax            : maximum vertex mass
+          maxVChi         : maximum vertex chi2
+          minbpvDira      : minimum DIRA wrt best PV
+          minLT           : minimum lifetime wrt best PV
+          minFDchi2       : minimum fligh-distance CHI2 wrt best PV
+          inputSel        : input selections
+        """
+
+        _daughters_cuts = " (TRGHOSTPROB < %(trGhostProb)s)" \
+                          "&(TRCHI2DOF < %(trChi2)s)" \
+                          "&(PT > %(minPT)s)" \
+                          "&(MIPCHI2DV(PRIMARY) > %(minIPChi2)s )" %locals()
+        _pidPi = "&(PIDK < %(highPIDK)s)" %locals()
+        _pidK  = "&(PIDK > %(lowPIDK)s)" %locals()
+
+
+        _c12_cuts = (" ( AM < (%(amMax)s - %(am34)s) ) " \
+                     "&( ACHI2DOCA(1,2) < %(maxDocaChi2)s ) " %locals() )
+        _c123_cuts =(" ( AM < (%(amMax)s - %(am4)s) ) " \
+                     "&( ACHI2DOCA(1,3) < %(maxDocaChi2)s ) " \
+                     "&( ACHI2DOCA(2,3) < %(maxDocaChi2)s ) " %locals() )
+        _combination_cuts =  (" (in_range( %(amMin)s, AM, %(amMax)s )) " \
+                              "&( (APT1+APT2+APT3+APT4) > %(minPT)s )" \
+                              "&( ACHI2DOCA(1,4) < %(maxDocaChi2)s ) " \
+                              "&( ACHI2DOCA(2,4) < %(maxDocaChi2)s ) " \
+                              "&( ACHI2DOCA(3,4) < %(maxDocaChi2)s ) " %locals())
+        _mother_cuts = (" (in_range( %(vmMin)s, M, %(vmMax)s )) " \
+                        "&(VFASPF(VCHI2PDOF) < %(maxVChi)s)" \
+                        "&(BPVDIRA > %(minbpvDira)s )" \
+                        "&(BPVLTIME() > %(minLT)s )" \
+                        "&(BPVVDCHI2 > %(minFDchi2)s )" %locals())
+
+        CombineD2HHHH = DaVinci__N4BodyDecays(DecayDescriptors=decayDescriptors,
+                                              DaughtersCuts={'pi+': _daughters_cuts+_pidPi, 'K+': _daughters_cuts+_pidK},
+                                              Combination12Cut=_c12_cuts, Combination123Cut=_c123_cuts,
+                                              CombinationCut=_combination_cuts,
+                                              MotherCut=_mother_cuts)
+
+        return Selection(name, Algorithm=CombineD2HHHH, RequiredSelections=inputSel)
+
+
+    def makeDstar2D0Pi(self, name, config, DecayDescriptors, inputSel):
+        """
+          Create and return a D* -> D0 pi Selection object.
+          Arguments:
+          name        : name of the Selection.
+          config      : dictionary of cut values.
+          DecayDescriptor: DecayDescriptor.
+          inputSel    : input selections
+        """
+        daugCuts = "(TRCHI2DOF < %(Daug_TRCHI2DOF_MAX)s)" % locals()['config']
+        combCuts = "((AM - AM1) < %(Dstar_AMDiff_MAX)s)" % locals()['config']
+        dstarCuts = " (VFASPF(VCHI2/VDOF) < %(Dstar_VCHI2VDOF_MAX)s)" \
+                    "&((M - M1) < %(Dstar_MDiff_MAX)s)" % locals()['config']
+
+        _Dstar = CombineParticles(DecayDescriptors=DecayDescriptors,
+                                  DaughtersCuts={'pi+': daugCuts},
+                                  CombinationCut=combCuts,
+                                  MotherCut=dstarCuts)
+
+        return Selection(name+'Sel', Algorithm=_Dstar, RequiredSelections=inputSel)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2KShh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2KShh.py
new file mode 100644
index 000000000..ef701e77f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2KShh.py
@@ -0,0 +1,279 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id$
+'''
+This code looks for D*+ -> D0 pi+, D0 -> KS0 h+ h- for h = K, pi
+This has been completely rewritten in February 2011 to use the new LineBuilder framework.
+The old version in the previous framework is still accessible via SVN (version r95389).
+The cuts are mostly the same as the code used in late 2010, except:
+ * Global event cut is now on number of long tracks instead of best tracks
+ * Some PID cuts tightened (trackFromDCutPIDe, trackFromDCutPIDp, kaonFromDCutPIDpi)
+ * Track fit chi2/NDF cuts tightened quite a bit, but cut on track fit probability
+   removed. The probability was too tight before, so this should be a net loosening.
+ * All modes share a common proper lifetime cut (but cut value is the same as before)
+ * Separate container for both D0 and D0bar replaced by []cc selection.
+The ownership of this module has been taken over by Marco Gersabeck on 12 May 2015.
+'''
+
+__author__ = ['Marco Gersabeck']
+__date__ = '24/02/2011'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = ('DstarD2KShhBuilder',
+           'filterKaons',
+           'filterPions',
+           'makeKS',
+           'makeD2KShh',
+           'makeDstar')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+name = "DstarD2KShh"
+
+default_config = { 
+    'NAME'        : "DstarD2KShh",
+    'WGs'         : ['Charm'],
+    'STREAMS'     : [ 'Charm' ],
+    'BUILDERTYPE' : 'DstarD2KShhBuilder',
+    'CONFIG'      : {
+        'LongTrackGEC'          :  150        ## Global event cut on number of long tracks
+        ,'KSLLCutDIRA'          :    0.9997   ## unitless
+        ,'KSDDCutDIRA'          :    0.99995  ## unitless
+        ,'KSLLCutMass'          :   20.0      ## in MeV -- Mat changed from 11.4 to 20.0 in S20
+        ,'KSDDCutMass'          :   40.0      ## in MeV -- Mat changed from 24.9 to 40.0 in S20
+        ,'KSLLCutFDChi2'        :  100        ## unitless
+        ,'KSDDCutFDChi2'        :  100        ## unitless
+        ,'KSCutZFDFromD'        :   10.0      ## in mm -- Mat added in S20
+        ,'trackFromDCutP'       : 1500.0      ## in MeV
+        ,'trackFromDCutPIDe'    :   10.0      ## unitless -- note that this means (DLLe - DLLx) < 10 for x=K,pi
+        ,'trackFromDCutPIDp'    :   15.0      ## unitless -- note that this means (DLLp - DLLx) < 15 for x=K,pi
+        ,'pionFromDCutPIDK'     :   -1.0
+        ,'kaonFromDCutPIDpi'    :   -3.0
+        ,'pionFromDCutTRCHI2DOF':    4.0      ## unitless
+        ,'kaonFromDCutTRCHI2DOF':    5.0      ## unitless
+        ,'DCutDIRA'             :    0.0      ## unitless -- remove "backwards-going" D0
+        ,'DCutTau'              :    0.2      ## ps -- Mat changed from 0.3 to 0.2 in S20
+        ,'DCutVtxChi2_KK'       :   21.0      ## unitless
+        ,'DCutVtxChi2_KP'       :   15.0      ## unitless
+        ,'DCutVtxChi2_PP'       :   13.0      ## unitless
+        ,'preFitDCutPT'         : 1500.0      ## in MeV
+        ,'preFitDMassCut_LL'    :  130        ## in MeV
+        ,'preFitDMassCut_DD'    :  270        ## in MeV
+        ,'wideDMassCut_KKLL'    :   70.0      ## in MeV -- Mat changed from  57.2 to  70.0 in S20
+        ,'wideDMassCut_KPLL'    :  105.0      ## in MeV -- Mat changed from  92.0 to 105.0 in S20
+        ,'wideDMassCut_PPLL'    :  120.0      ## in MeV -- Mat changed from 110.0 to 120.0 in S20
+        ,'wideDMassCut_KKDD'    :   85.0      ## in MeV -- Mat changed from  72.0 to  85.0 in S20
+        ,'wideDMassCut_KPDD'    :  130.0      ## in MeV -- Mat changed from 120.0 to 130.0 in S20
+        ,'wideDMassCut_PPDD'    :  150.0      ## in MeV -- Mat changed from 140.0 to 150.0 in S20
+        ,'preFitDstarMassCut'   :  200.0      ## in MeV; make sure it's well above the largest D mass window
+        ,'wideDMCutLower'       :  -10.0      ## in MeV: allow negative tail made by CombineParticles -- Mat changed from -2.0 to -10.0 in S20
+        ,'wideDMCutUpper'       :   15.0      ## in MeV -- Mat changed from 15.0 to 25.0 in S20
+        ,'DstarCutPT_KK'        : 2200.0      ## in MeV
+        ,'DstarCutPT_KP'        : 2200.0      ## in MeV
+        ,'DstarCutPT_PP'        : 2200.0      ## in MeV
+        ,'DstarCutChi2NDOF_KK'  :   60.0      ## unitless
+        ,'DstarCutChi2NDOF_KP'  :   20.0      ## unitless
+        ,'DstarCutChi2NDOF_PP'  :   20.0      ## unitless
+        ,'SoftPionCutPIDe'      :    2.0      ## unitless -- Mat changed from 5.0 to 2.0 in S20
+        ,'KKLLPrescale'         :    1.0
+        ,'KKLLPostscale'        :    1.0
+        ,'KPLLPrescale'         :    1.0
+        ,'KPLLPostscale'        :    1.0
+        ,'PPLLPrescale'         :    1.0
+        ,'PPLLPostscale'        :    1.0
+        ,'KKDDPrescale'         :    1.0
+        ,'KKDDPostscale'        :    1.0
+        ,'KPDDPrescale'         :    1.0
+        ,'KPDDPostscale'        :    1.0
+        ,'PPDDPrescale'         :    1.0
+        ,'PPDDPostscale'        :    1.0
+    }
+}
+
+class DstarD2KShhBuilder(LineBuilder) :
+    """
+    Reconstruct D*+ -> D0 pi+, D0 -> KS0 h+ h- for h = K, pi
+    (i.e. KSKK, KSKpi, KSpipi)
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        # Set up global event cuts.
+        # Conceptually these come first, although the place where they're
+        # inserted into the line is at the bottom of the code.
+        _globalEventCuts = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(LongTrackGEC)s )" % config,
+                            "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        # All lines start with one of: KS->LL, KS->DD
+        self.selKSLL = makeKS('KsLLFor'+name, "Phys/StdLooseKsLL/Particles", -1000.0,  650.0, config['KSLLCutDIRA'], config['KSLLCutMass'], config['KSLLCutFDChi2'])
+        self.selKSDD = makeKS('KsDDFor'+name, "Phys/StdLooseKsDD/Particles",     0.0, 2300.0, config['KSDDCutDIRA'], config['KSDDCutMass'], config['KSDDCutFDChi2'])
+
+        # Make filtered lists of daughtes
+        self.selDauK = filterKaons('KFor'+name, "Phys/StdLooseKaons/Particles", config['trackFromDCutP'], config['trackFromDCutPIDe'], config['trackFromDCutPIDp'], config['kaonFromDCutPIDpi'], config['kaonFromDCutTRCHI2DOF'])
+        self.selDauP = filterPions('PFor'+name, "Phys/StdLoosePions/Particles", config['trackFromDCutP'], config['trackFromDCutPIDe'], config['trackFromDCutPIDp'], config['pionFromDCutPIDK'], config['pionFromDCutTRCHI2DOF'])
+        self.selDauKK = [ self.selDauK ]
+        self.selDauKP = [ self.selDauK, self.selDauP ]
+        self.selDauPP = [ self.selDauP ]
+
+        # Now we make the various flavours of D0 decay (KSK+K-, KSpi+pi-, KSK+pi-, KSK-pi+):
+        strDecaysPP = [ "[D0 -> KS0 pi+ pi-]cc" ]
+        strDecaysKP = [ "[D0 -> KS0 K+ pi-]cc", "[D0 -> KS0 K- pi+]cc" ]
+        strDecaysKK = [ "[D0 -> KS0 K+ K-]cc" ]
+        self.selD2KSKKLL = makeD2KShh('D2KSKKLLFor'+name, strDecaysKK, self.selKSLL, self.selDauKK, config['preFitDMassCut_LL'], config['preFitDCutPT'], config['DCutDIRA'], config['DCutVtxChi2_KK'], config['wideDMassCut_KKLL'], config['DCutTau'], config['KSCutZFDFromD'])
+        self.selD2KSKPLL = makeD2KShh('D2KSKPLLFor'+name, strDecaysKP, self.selKSLL, self.selDauKP, config['preFitDMassCut_LL'], config['preFitDCutPT'], config['DCutDIRA'], config['DCutVtxChi2_KP'], config['wideDMassCut_KPLL'], config['DCutTau'], config['KSCutZFDFromD'])
+        self.selD2KSPPLL = makeD2KShh('D2KSPPLLFor'+name, strDecaysPP, self.selKSLL, self.selDauPP, config['preFitDMassCut_LL'], config['preFitDCutPT'], config['DCutDIRA'], config['DCutVtxChi2_PP'], config['wideDMassCut_PPLL'], config['DCutTau'], config['KSCutZFDFromD'])
+        self.selD2KSKKDD = makeD2KShh('D2KSKKDDFor'+name, strDecaysKK, self.selKSDD, self.selDauKK, config['preFitDMassCut_DD'], config['preFitDCutPT'], config['DCutDIRA'], config['DCutVtxChi2_KK'], config['wideDMassCut_KKDD'], config['DCutTau'], config['KSCutZFDFromD'])
+        self.selD2KSKPDD = makeD2KShh('D2KSKPDDFor'+name, strDecaysKP, self.selKSDD, self.selDauKP, config['preFitDMassCut_DD'], config['preFitDCutPT'], config['DCutDIRA'], config['DCutVtxChi2_KP'], config['wideDMassCut_KPDD'], config['DCutTau'], config['KSCutZFDFromD'])
+        self.selD2KSPPDD = makeD2KShh('D2KSPPDDFor'+name, strDecaysPP, self.selKSDD, self.selDauPP, config['preFitDMassCut_DD'], config['preFitDCutPT'], config['DCutDIRA'], config['DCutVtxChi2_PP'], config['wideDMassCut_PPDD'], config['DCutTau'], config['KSCutZFDFromD'])
+
+        # Reconstruct D*+ -> D0 pi+ (&cc), using a wide mass window:
+        self.selDstar_KKLL = makeDstar('Dstar_KKLLFor'+name, [self.selD2KSKKLL], config['preFitDstarMassCut'], config['DstarCutChi2NDOF_KK'], config['SoftPionCutPIDe'], config['DstarCutPT_KK'], config['wideDMCutLower'], config['wideDMCutUpper'])
+        self.selDstar_KPLL = makeDstar('Dstar_KPLLFor'+name, [self.selD2KSKPLL], config['preFitDstarMassCut'], config['DstarCutChi2NDOF_KP'], config['SoftPionCutPIDe'], config['DstarCutPT_KP'], config['wideDMCutLower'], config['wideDMCutUpper'])
+        self.selDstar_PPLL = makeDstar('Dstar_PPLLFor'+name, [self.selD2KSPPLL], config['preFitDstarMassCut'], config['DstarCutChi2NDOF_PP'], config['SoftPionCutPIDe'], config['DstarCutPT_PP'], config['wideDMCutLower'], config['wideDMCutUpper'])
+        self.selDstar_KKDD = makeDstar('Dstar_KKDDFor'+name, [self.selD2KSKKDD], config['preFitDstarMassCut'], config['DstarCutChi2NDOF_KK'], config['SoftPionCutPIDe'], config['DstarCutPT_KK'], config['wideDMCutLower'], config['wideDMCutUpper'])
+        self.selDstar_KPDD = makeDstar('Dstar_KPDDFor'+name, [self.selD2KSKPDD], config['preFitDstarMassCut'], config['DstarCutChi2NDOF_KP'], config['SoftPionCutPIDe'], config['DstarCutPT_KP'], config['wideDMCutLower'], config['wideDMCutUpper'])
+        self.selDstar_PPDD = makeDstar('Dstar_PPDDFor'+name, [self.selD2KSPPDD], config['preFitDstarMassCut'], config['DstarCutChi2NDOF_PP'], config['SoftPionCutPIDe'], config['DstarCutPT_PP'], config['wideDMCutLower'], config['wideDMCutUpper'])
+
+        self.lineKKLL = StrippingLine(name+'KKLLLine',
+                                      prescale = config['KKLLPrescale'],
+                                      postscale = config['KKLLPostscale'],
+                                      FILTER = _globalEventCuts,
+                                      selection = self.selDstar_KKLL)
+        self.lineKPLL = StrippingLine(name+'KPLLLine',
+                                      prescale = config['KPLLPrescale'],
+                                      postscale = config['KPLLPostscale'],
+                                      FILTER = _globalEventCuts,
+                                      selection = self.selDstar_KPLL)
+        self.linePPLL = StrippingLine(name+'PPLLLine',
+                                      prescale = config['PPLLPrescale'],
+                                      postscale = config['PPLLPostscale'],
+                                      FILTER = _globalEventCuts,
+                                      selection = self.selDstar_PPLL)
+        self.lineKKDD = StrippingLine(name+'KKDDLine',
+                                      prescale = config['KKDDPrescale'],
+                                      postscale = config['KKDDPostscale'],
+                                      FILTER = _globalEventCuts,
+                                      selection = self.selDstar_KKDD)
+        self.lineKPDD = StrippingLine(name+'KPDDLine',
+                                      prescale = config['KPDDPrescale'],
+                                      postscale = config['KPDDPostscale'],
+                                      FILTER = _globalEventCuts,
+                                      selection = self.selDstar_KPDD)
+        self.linePPDD = StrippingLine(name+'PPDDLine',
+                                      prescale = config['PPDDPrescale'],
+                                      postscale = config['PPDDPostscale'],
+                                      FILTER = _globalEventCuts,
+                                      selection = self.selDstar_PPDD)
+
+        self.registerLine(self.lineKKLL)
+        self.registerLine(self.lineKPLL)
+        self.registerLine(self.linePPLL)
+        self.registerLine(self.lineKKDD)
+        self.registerLine(self.lineKPDD)
+        self.registerLine(self.linePPDD)
+
+
+def filterKaons(name, inputName, trackFromDCutP, trackFromDCutPIDe, trackFromDCutPIDp, kaonFromDCutPIDpi, kaonFromDCutTRCHI2DOF) :
+    """
+    Apply cuts to charged kaon daughters of D0
+    """
+    _strCutP = "(P > %(trackFromDCutP)s *MeV)" % locals()
+    _strCutPIDe = "(PIDe-PIDK < %(trackFromDCutPIDe)s )" % locals()
+    _strCutPIDp = "(PIDp-PIDK < %(trackFromDCutPIDp)s ) " % locals()
+    _strCutPIDK = "(PIDpi-PIDK < %(kaonFromDCutPIDpi)s ) " % locals()
+    _strCutChi2 = "(TRCHI2DOF < %(kaonFromDCutTRCHI2DOF)s )" % locals()
+    _strCuts = '(' + _strCutP + '&' + _strCutPIDe + '&' + _strCutPIDp \
+        + '&' + _strCutPIDK + '&' + _strCutChi2 + ')'
+    _trackFilter = FilterDesktop(Code = _strCuts)
+    inputTracks = DataOnDemand(Location = inputName)
+    return Selection (name,
+                      Algorithm = _trackFilter,
+                      RequiredSelections = [inputTracks])
+
+def filterPions(name, inputName, trackFromDCutP, trackFromDCutPIDe, trackFromDCutPIDp, pionFromDCutPIDK, pionFromDCutTRCHI2DOF) :
+    """
+    Apply cuts to pion daughters of D0
+    """
+    _strCutP = "(P > %(trackFromDCutP)s *MeV)" % locals()
+    _strCutPIDe = "(PIDe-PIDpi < %(trackFromDCutPIDe)s )" % locals()
+    _strCutPIDp = "(PIDp-PIDpi < %(trackFromDCutPIDp)s ) " % locals()
+    _strCutPIDK = "(PIDK -PIDpi < %(pionFromDCutPIDK)s ) " % locals()
+    _strCutChi2 = "(TRCHI2DOF < %(pionFromDCutTRCHI2DOF)s )" % locals()
+    _strCuts = '(' + _strCutP + '&' + _strCutPIDe + '&' + _strCutPIDp \
+        + '&' + _strCutPIDK + '&' + _strCutChi2 + ')'
+    _trackFilter = FilterDesktop(Code = _strCuts)
+    inputTracks = DataOnDemand(Location = inputName)
+    return Selection (name,
+                      Algorithm = _trackFilter,
+                      RequiredSelections = [inputTracks])
+
+def makeKS(name, inputName, minDz, maxDz, KSCutDIRA, KSCutMass, KSCutFDChi2) :
+    """
+    Given a set of input tracks, look for KS -> pi+ pi-.
+    Used for both long and downstream tracks.
+    """
+    _code = "(BPVVDZ > %(minDz)s * mm) & (BPVVDZ < %(maxDz)s * mm) & (BPVDIRA > %(KSCutDIRA)s ) & (ADMASS('KS0') < %(KSCutMass)s *MeV) & (BPVVDCHI2> %(KSCutFDChi2)s )" % locals()
+    _KsFilter = FilterDesktop(Code = _code)
+    _stdLooseKs = DataOnDemand(Location = inputName)
+    return Selection (name,
+                      Algorithm = _KsFilter,
+                      RequiredSelections = [_stdLooseKs])
+
+def makeD2KShh(name, inputDecayDescriptors, inputKs, inputDaughters, preFitMassCut, preFitDCutPT, DCutDIRA, DCutVtxChi2, postFitMassCut, DCutTau, KSCutZFDFromD) :
+    """
+    Given lists of D0 daughter tracks and a list of KS, reconstruct D0 -> KS h+ h-.
+    The same routine works for all final states and for KS via long/downstream tracks.
+    """
+
+    _combCutsPT = "(APT > %(preFitDCutPT)s * MeV) & (APT > %(preFitDCutPT)s * MeV)" % locals()
+    _combCutsMass = "(ADAMASS('D0') < %(preFitMassCut)s * MeV)" % locals()
+    _combCuts = '( ' + _combCutsPT + ' & ' + _combCutsMass + ' )'
+    _motherCutsBase = '((BPVVDZ < 7000.0*mm) & (BPVDIRA > %(DCutDIRA)s ))' % locals()
+    _motherCutsVtx  = '(VFASPF(VCHI2) < %(DCutVtxChi2)s )' % locals()
+    _motherCutsMass = "(ADMASS('D0') < %(postFitMassCut)s * MeV)" % locals()
+    _motherCutsTau = "(BPVLTIME()> %(DCutTau)s * ps)" % locals()
+    _motherCutsKSFD = '( (CHILD(VFASPF(VZ),1) - VFASPF(VZ)) > %(KSCutZFDFromD)s * mm)' % locals()
+    _motherCuts = '( ' + _motherCutsBase + ' & ' + _motherCutsVtx + ' & ' + _motherCutsMass + ' & ' + _motherCutsTau + ' & ' + _motherCutsKSFD + ')'
+    _D0 = CombineParticles( DecayDescriptors = inputDecayDescriptors,
+                            CombinationCut = _combCuts,
+                            MotherCut = _motherCuts)
+    return Selection ( name,
+                       Algorithm = _D0,
+                       RequiredSelections = [inputKs] + inputDaughters)
+
+
+def makeDstar(name, inputD0, preFitDstarMassCut, cutChi2, SoftPionCutPIDe, cutPT, wideDMCutLower, wideDMCutUpper) :
+    """
+    Given a list of D0, try to make D*+ -> D0 pi+
+    """
+
+    _softPi = DataOnDemand(Location = 'Phys/StdAllLoosePions/Particles')
+    _cutsSoftPi = '( PIDe-PIDpi < %(SoftPionCutPIDe)s )' % locals()
+    _cutsDstarComb = "ADAMASS('D*(2010)+') < %(preFitDstarMassCut)s *MeV" % locals()
+    _cutsDstarMoth_base = '(PT > %(cutPT)s * MeV) & (VFASPF(VCHI2/VDOF) < %(cutChi2)s )' % locals()
+    _cutsDstarMoth_DM = '(MM - CHILD(MM,1) - CHILD(MM,2) > %(wideDMCutLower)s *MeV) & (MM - CHILD(MM,1) - CHILD(MM,2) < %(wideDMCutUpper)s *MeV)' % locals()
+    _cutsDstarMoth = '(' + _cutsDstarMoth_base + ' & ' + _cutsDstarMoth_DM + ')'
+    _Dstar = CombineParticles( DecayDescriptor = "[D*(2010)+ -> D0 pi+]cc",
+                               DaughtersCuts = { "pi+" : _cutsSoftPi },
+                               CombinationCut = _cutsDstarComb,
+                               MotherCut = _cutsDstarMoth)
+    return Selection ( name,
+                       Algorithm = _Dstar,
+                       RequiredSelections = inputD0 + [_softPi])
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2XGamma.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2XGamma.py
new file mode 100644
index 000000000..708b26d2a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarD2XGamma.py
@@ -0,0 +1,393 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting D*+ - > D0 (h h gamma) pi+
+
+Authors: Maurizio Martinelli
+
+Looser kinematic cuts & TOS requirements for S29r2 S24r1 S28r1 by Jolanta Brodzicka
+
+For S34r0p1 in (winter) 2019 campaign: wider (delta)mass range, instead cuts on GammaCL, D IPCHI2, tighter K PID 
+
+In (summer) 2019 campaign2:
+For S24r2 S28r2 in 2019 campaign2: release tight HH VDCHI2 (!!!): looser than Run1 Restrip S21r1p2
+For S29r2p1 in 2019 campaign2: release tight HH VDCHI2 (!!!), align cuts with Run1 Restrip S21r1p2
+For S34r0p2 in (summer) 2021 campaign: release tight HH VDCHI2 (!!!), align cuts with S29r2p1
+"""
+
+
+########################################################################
+__author__ = ['Maurizio Martinelli', 'Jolanta Brodzicka']
+__date__ = '15/05/2015'
+__version__ = '$Revision: 0.5 $'
+
+__all__ = ('DstarD2XGammaLines',
+           'default_config')
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from StandardParticles                     import StdAllNoPIDsPions, StdNoPIDsPions, StdNoPIDsKaons
+from StandardParticles                     import StdLooseAllPhotons, StdAllLooseGammaLL, StdAllLooseGammaDD
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder, checkConfig
+
+from Configurables import FilterDesktop
+
+from GaudiKernel.SystemOfUnits import GeV, MeV, picosecond, mm
+
+default_config = {
+    'NAME'        : 'DstarD2XGamma',
+    'WGs'         : ['Charm'],
+    'BUILDERTYPE' : 'DstarD2XGammaLines',
+    'CONFIG'      : { 'PrescaleDstarD2PiPiGamma': 1,
+                      'PrescaleDstarD2KPiGamma' : 1,
+                      'PrescaleDstarD2KKGamma'  : 1,
+                      'PrescaleDstarD2PiPiGamma_CNVLL': 1,
+                      'PrescaleDstarD2KPiGamma_CNVLL' : 1,
+                      'PrescaleDstarD2KKGamma_CNVLL'  : 1,
+                      'PrescaleDstarD2PiPiGamma_CNVDD': 1,
+                      'PrescaleDstarD2KPiGamma_CNVDD' : 1,
+                      'PrescaleDstarD2KKGamma_CNVDD'  : 1,
+                      # Gamma
+                      'photonPT'                : 2.0 * GeV, #1.7->2 in 2021campaign for 2018
+                      'MaxMass_CNV_LL'          : 100 * MeV,
+                      'MaxVCHI2_CNV_LL'         : 9,
+                      'MinPT_CNV_LL'            : 1000 * MeV,
+                      'MaxMass_CNV_DD'          : 100 * MeV,
+                      'MaxVCHI2_CNV_DD'         : 9,
+                      'MinPT_CNV_DD'            : 1000 * MeV,
+                      'MinPhotonCL'             : 0.25, #added in 2019 campaign
+                      # X -> HH
+                      'TrChi2'                  : 4,
+                      'TrGhostProb'             : 0.5,
+                      'MinTrkPT'                : 250 * MeV, #500->250 in 2019 campaign2 ##250 in Run1 Restrip
+                      'MinTrkIPChi2'            : 3, #6->3 in 2019 campaign2 ##3 in Run1
+                      'HighPIDK'                :-5, #pions #0->-5 in 2019 campaign2 #0 in Run1
+                      'LowPIDK'                 : 5, #kaons #0->5 in 2019 campaign ##5 in Run1
+                      'CombMassLow_HH'          : 0 * MeV,
+                      'CombMassHigh_HH'         : 1300 * MeV, #1820 * MeV,
+                      'MinCombPT'               : 0 * GeV, 
+                      'MaxADOCACHI2'            : 10.0,
+                      'MinVDCHI2_HHComb'        : 10.0, #1000->100->10 (!!!) in 2019 campaign2 ##100 in Run1
+                      'MassLow_HH'              : 0 * MeV,
+                      'MassHigh_HH'             : 1050 * MeV, #1865 * MeV in Run1 and 2015/2016
+                      'MaxVCHI2NDOF_HH'         : 16.0,
+                      'MinVDCHI2_HH'            : 10.0, #1000->100->10 (!!!) in 2019 campaign2 ##100 in Run1
+                      # D0 -> X Gamma
+                      'CombMassLow'             : 1610 * MeV, #1665 * MeV,
+                      'CombMassHigh'            : 2130 * MeV, #2075 * MeV,
+                      'MassLow'                 : 1660 * MeV, #1685->1610 in 2019campaign2 ->1660 in 2021campaign for 2018 ##1610 in Run1
+                      'MassHigh'                : 2100 * MeV, #2055 * MeV,
+                      'MinPT'                   : 2.0 * GeV, #2.0 in Run1
+                      'MaxVCHI2NDOF'            : 12.0,
+                      'MinBPVDIRA'              : 0.99995, #0.99995->0.9995->0.99995 in 2019 campaign2, ##0.9995 in Run1
+                      'MinBPVTAU'               : 0.5 * picosecond, ##0.1 in Run1
+                      'MaxIPChi2'               : 35., #none->25.->35. in 2019 campaign2, ##35.in Run1 
+                      # D* -> D0 pi+
+                      'Daug_TRCHI2DOF_MAX'      : 3,
+                      'Dstar_AMDiff_MAX'        : 180 * MeV,
+                      'Dstar_VCHI2VDOF_MAX'     : 15.0,
+                      'Dstar_MDiff_MAX'         : 163 * MeV, #160 * MeV,
+                      # HLT filters, only process events firing triggers matching the RegEx
+                      'Hlt1Filter': None,
+                      'Hlt2Filter': None, #"HLT_PASS_RE('Hlt2CharmHadInclDst2PiD02HHXBDTDecision')", #jb
+                      'Hlt1Tos': {'Hlt1.*Track.*Decision%TOS' : 0}, #jb                     
+                      'Hlt2Tos': {'Hlt2CharmHadInclDst2PiD02HHXBDTDecision%TOS' : 0, 'Hlt2PhiIncPhiDecision%TOS' : 0, 'Hlt2CharmHadDst2PiD02.*Gamma.*Decision%TOS' : 0} #jb #including an exclusive line              
+                      #
+                      #'Hlt2Tos': {'Hlt2CharmHadInclDst2PiD02HHXBDTDecision%TOS' : 0, 'Hlt2PhiIncPhiDecision%TOS' : 0} #jb #test for early 2017   
+                    },
+    'STREAMS'     : ['CharmCompleteEvent']
+    }
+
+class DstarD2XGammaLines( LineBuilder ) :
+    """Class defining the D*+ -> (D0 -> (X->h h) gamma) pi+ stripping lines"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self,name,config ) :
+
+        LineBuilder.__init__(self, name, config)
+
+        # Select photons
+        self.selPhotons = {'': self.makePhoton('GammaFor'+name,
+                                                config['photonPT'],
+                                                config['MinPhotonCL']),
+                           '_CNVLL': self.makePhotonConv('CNVGammaLLFor'+name,
+                                                        config['MaxMass_CNV_LL'],
+                                                        config['MaxVCHI2_CNV_LL'],
+                                                        config['MinPT_CNV_LL'],
+                                                        [StdAllLooseGammaLL]),
+                           '_CNVDD': self.makePhotonConv('CNVGammaDDFor'+name,
+                                                        config['MaxMass_CNV_DD'],
+                                                        config['MaxVCHI2_CNV_DD'],
+                                                        config['MinPT_CNV_DD'],
+                                                        [StdAllLooseGammaDD]) }
+
+        self.HHForD2XGamma, self.D2XGamma, self.Dst2D0pi, self.lineDstarD2XGamma = {}, {}, {}, {}
+
+        decays = { 'PiPiGamma'  : {'HHdesc': ['rho(770)0 -> pi+ pi-'], 'D0desc': ['D0 -> rho(770)0 gamma'] },
+                   'KPiGamma'   : {'HHdesc': ['K*(892)0 -> K- pi+', 'K*(892)0 -> K+ pi-'], 'D0desc': ['D0 -> K*(892)0 gamma'] },
+                   'KKGamma'    : {'HHdesc': ['phi(1020) -> K+ K-'], 'D0desc': ['D0 -> phi(1020) gamma'] },
+                     }
+
+        for decay, decayDescriptors in decays.iteritems():
+            # make the various stripping selections
+            DstarD2XGammaName   = name + "DstarD2" + decay
+            D2XGammaName   = name + "D2" + decay
+            HHCombName   = name + "HHForD2" + decay
+
+            inputs = [ StdNoPIDsPions] if decays == 'PiPiGamma' else [ StdNoPIDsPions, StdNoPIDsKaons ]
+
+            # Create the 2-body candidate
+            self.HHForD2XGamma[decay] = self.makeHH(HHCombName,
+                                                     decayDescriptors['HHdesc'],
+                                                     config['TrChi2'],
+                                                     config['TrGhostProb'],
+                                                     config['MinTrkPT'],
+                                                     config['MinTrkIPChi2'],
+                                                     config['HighPIDK'],
+                                                     config['LowPIDK'],
+                                                     config['CombMassLow_HH'], # FIXME!!!!
+                                                     config['CombMassHigh_HH'],
+                                                     config['MinCombPT'],
+                                                     config['MaxADOCACHI2'],
+                                                     config['MinVDCHI2_HHComb'],
+                                                     config['MassLow_HH'],
+                                                     config['MassHigh_HH'],
+                                                     config['MaxVCHI2NDOF_HH'],
+                                                     config['MinVDCHI2_HH'],
+                                                     inputs
+                                                     )
+
+            for phName, photons in self.selPhotons.iteritems():
+
+                # Create the D0 candidate
+                self.D2XGamma[decay+phName] = self.makeD2XGamma(D2XGammaName+phName,
+                                                                decayDescriptors['D0desc'],
+                                                                config['CombMassLow'],
+                                                                config['CombMassHigh'],
+                                                                config['MassLow'],
+                                                                config['MassHigh'],
+                                                                config['MinPT'],
+                                                                config['MaxVCHI2NDOF'],
+                                                                config['MinBPVDIRA'],
+                                                                config['MinBPVTAU'],
+                                                                config['MaxIPChi2'],
+                                                                inputSel = [self.HHForD2XGamma[decay], photons]
+                                                                )
+
+                # Create the D* candidate
+                self.Dst2D0pi[decay+phName] = self.makeDstar2D0Pi(DstarD2XGammaName+phName,
+                                                                  config,
+                                                                  ['D*(2010)+ -> D0 pi+', 'D*(2010)- -> D0 pi-'],
+                                                                  inputSel = [self.D2XGamma[decay+phName], StdAllNoPIDsPions], 
+                                                                  Hlt1TOS = config['Hlt1Tos'],
+                                                                  Hlt2TOS = config['Hlt2Tos'] )
+
+                # Create the stripping line
+                self.lineDstarD2XGamma[decay+phName] = StrippingLine(DstarD2XGammaName+phName+"Line",
+                                                                     prescale  = config['PrescaleDstarD2'+decay+phName],
+                                                                     selection = self.Dst2D0pi[decay+phName],
+                                                                     HLT1 = config['Hlt1Filter'],
+                                                                     HLT2 = config['Hlt2Filter'],
+                                                                     )
+
+                # Register the line
+                self.registerLine(self.lineDstarD2XGamma[decay+phName])
+        # end loop on decay modes
+
+    def makePhoton(self, name, photonPT, MinPhotonCL):
+        """Create photon Selection object starting from DataOnDemand 'Phys/StdLooseAllPhotons'.
+
+        @arg name: name of the Selection.
+        @arg photonPT: PT of the photon
+
+        @return: Selection object
+
+        """
+        # Prepare selection
+        _code = " (PT> %(photonPT)s*MeV)" \
+                "&(CL> %(MinPhotonCL)s)" % locals()
+        _gammaFilter = FilterDesktop(name = "GammaFilter_"+name, Code=_code)
+        _stdGamma = StdLooseAllPhotons
+        return Selection(name, Algorithm=_gammaFilter, RequiredSelections=[_stdGamma])
+
+    def makePhotonConv(self, name,
+                       mMax, maxVChi, minPT,
+                       inputSel):
+        """
+            Create photon selection objects starting from converted photons list
+                (StdAllLooseGammaLL, StdAllLooseGammaDD)
+        """
+        _code = " ( MM < %(mMax)s * MeV ) " \
+                "&( HASVERTEX ) " \
+                "&( VFASPF(VCHI2/VDOF)<%(maxVChi)s ) " \
+                "&( PT >  %(minPT)s)" % locals()
+
+        _filter = FilterDesktop(name = "ConvertedGammaFilter_"+name,
+                                Code = _code)
+
+        return Selection(name,
+                         Algorithm = _filter,
+                         RequiredSelections = inputSel )
+
+
+
+    def makeHH(self, name, decayDescriptors,
+               trChi2,trGhostProb,minTrkPT,minIPChi2,
+               highPIDK, lowPIDK,
+               amMin, amMax, minPT, maxDocaChi2, minVDChi2comb,
+               vmMin, vmMax, maxVChi, minVDChi2, inputSel) :
+        """
+          Create and return a X -> HH (H=K,pi) Selection object.
+          Arguments:
+          name             : name of the Selection.
+          DecayDescriptors : DecayDescriptors.
+          trChi2           : maximum tracks chi2
+          trGhostProb      : maximum tracks ghost probability
+          minPT            : minimum tracks PT
+          minIPChi2        : minimum tracks IPChi2
+          highPIDK         : maximum PIDk for pions
+          lowPIDK          : minimum PIDk for kaons
+          amMin            : minimum combination mass
+          amMax            : maximum combination mass
+          minPT            : minimum combination PT
+          maxDocaChi2      : maximum 2-tracks DocaChi2
+          minVDChi2comb    : minimum vertex distance chi2
+          vmMax            : maximum vertex mass
+          maxVChi          : maximum vertex chi2
+          minVDChi2        : minimum vertex distance chi2
+          inputSel         : input selections
+        """
+
+        _daughters_cuts = " (TRGHOSTPROB < %(trGhostProb)s)" \
+                          "&(TRCHI2DOF < %(trChi2)s)" \
+                          "&(PT > %(minTrkPT)s)" \
+                          "&(MIPCHI2DV(PRIMARY) > %(minIPChi2)s )" %locals()
+        _pidPi = "&(PIDK < %(highPIDK)s)" %locals()
+        _pidK  = "&(PIDK > %(lowPIDK)s)" %locals()
+
+        _combination_cuts =  (" (in_range( %(amMin)s, AM, %(amMax)s ) ) " \
+                              "&( (APT1+APT2) > %(minPT)s )"  \
+                              "&( ACHI2DOCA(1,2) < %(maxDocaChi2)s )" %locals() )
+
+        _mother_cuts = (" (in_range( %(vmMin)s, M, %(vmMax)s )) " \
+                        "&(VFASPF(VCHI2PDOF) < %(maxVChi)s)" \
+                        "&( BPVVDCHI2 > %(minVDChi2)s )" %locals() )
+
+        CombineX2HH = CombineParticles(DecayDescriptors = decayDescriptors,
+                                       DaughtersCuts = { "pi+" : _daughters_cuts+_pidPi, "K+" : _daughters_cuts+_pidK },
+                                       CombinationCut = _combination_cuts,
+                                       MotherCut = _mother_cuts)
+
+        return Selection(name,
+                         Algorithm = CombineX2HH,
+                         RequiredSelections = inputSel )
+
+
+    def makeD2XGamma( self, name, decayDescriptors,
+                      amMin, amMax,
+                      vmMin, vmMax, minPT, maxVChi, minbpvDira, minLT, maxIPChi,
+                      inputSel ) :
+        """
+          Create and return a D0 -> X Gamma (X=resonance) Selection object.
+          Arguments:
+          name            : name of the Selection.
+          DecayDescriptors: DecayDescriptors.
+          amMin           : minimum combination mass
+          amMax           : maximum combination mass
+          vmMin           : minimum vertex mass
+          vmMax           : maximum vertex mass
+          minPT           : minimum vertex PT
+          maxVChi         : maximum vertex chi2
+          minLT           : minimum lifetime wrt best PV
+          maxIPChi        : maximum IP chi2 wrt best PV
+          inputSel        : input selections
+        """
+
+        _combination_cuts =  (" (in_range( %(amMin)s, AM, %(amMax)s )) " %locals() )
+        _mother_cuts = (" (in_range( %(vmMin)s* MeV, M, %(vmMax)s )) " \
+                        "&(PT > %(minPT)s)" \
+                        "&(VFASPF(VCHI2PDOF) < %(maxVChi)s)" \
+                        "&(BPVDIRA > %(minbpvDira)s )" \
+                        "&(BPVLTIME() > %(minLT)s )" \
+                        "&(BPVIPCHI2() < %(maxIPChi)s)" %locals() )
+
+        CombineD2XGamma = CombineParticles(DecayDescriptors = decayDescriptors,
+                                           CombinationCut = _combination_cuts,
+                                           MotherCut = _mother_cuts)
+
+        return Selection(name,
+                         Algorithm = CombineD2XGamma,
+                         RequiredSelections = inputSel )
+
+
+    def makeDstar2D0Pi(self, name,
+                       config,
+                       DecayDescriptors,
+                       inputSel,
+                       Hlt1TOS,   #jb
+                       Hlt2TOS) : #jb
+        """
+          Create and return a D* -> D0 pi Selection object.
+          Arguments:
+          name        : name of the Selection.
+          config      : dictionary of cut values.
+          DecayDescriptor: DecayDescriptor.
+          inputSel    : input selections
+        """
+#jb
+        def makeTISTOS( name, _input, _hlttos ) :
+            from Configurables import TisTosParticleTagger
+            _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+            _tisTosFilter.TisTosSpecs = _hlttos
+            return Selection( name
+                              , Algorithm = _tisTosFilter
+                              , RequiredSelections = [ _input ]
+                              )        
+#jb
+        daugCuts = "(TRCHI2DOF < %(Daug_TRCHI2DOF_MAX)s)" % locals()['config']
+        combCuts = "((AM - AM1) < %(Dstar_AMDiff_MAX)s)" % locals()['config']
+        dstarCuts = " (VFASPF(VCHI2/VDOF) < %(Dstar_VCHI2VDOF_MAX)s)" \
+                    "&((M - M1) < %(Dstar_MDiff_MAX)s)" % locals()['config']
+
+        _Dstar = CombineParticles(DecayDescriptors = DecayDescriptors,
+                                  DaughtersCuts = { "pi+" : daugCuts },
+                                  CombinationCut = combCuts,
+                                  MotherCut = dstarCuts )
+
+
+        _sel = Selection(name+'Sel',
+                         Algorithm = _Dstar,
+                         RequiredSelections = inputSel
+                         )
+
+
+#        return Selection(name+'Sel',
+#                         Algorithm = _Dstar,
+#                         RequiredSelections = inputSel
+#                         )
+
+        _selDstarHlt1TOS = makeTISTOS( name + "DstarHlt1TOS"
+                                    , _sel
+                                    , Hlt1TOS
+                                            )
+        _selDstarHlt2TOS = makeTISTOS( name + "DstarHlt2TOS"
+                                            , _selDstarHlt1TOS
+                                            , Hlt2TOS
+                                            )
+       
+        return _selDstarHlt2TOS
+
+########################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarPromptWithD02HHHH.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarPromptWithD02HHHH.py
new file mode 100644
index 000000000..5bc7e484f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarPromptWithD02HHHH.py
@@ -0,0 +1,457 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of D0->hhhh tagged (from prompt D*) selections, where D->hhhh comprises:
+  - D->K3pi Cabibbo Favoured
+  - D->K3pi Cabibbo suppressed
+  - D->KKpipi
+  - D->4pi
+  - D->KKKpi Cabibbo Favoured // Paras Naik, October 2012
+  - D->KKKpi Cabibbo Suppressed // Paras Naik, October 2012
+Provides functions to build tagged D->hhhh selections for physics analysis.
+Provides class DstarPromptWithD02HHHHConf, which constructs the selections and stripping lines given a configuration dictionary.
+Exported symbols (use python help):
+  - DstarPromptWithD02HHHHConf
+  - makeD02K3Pi
+  - makeD02K3PiDCS
+  - makeD02KKPiPi
+  - makeD02FourPi
+  - makeD02Pi3K // Paras Naik, October 2012
+  - makeD02Pi3KDCS // Paras Naik, October 2012
+  - makePromptDstar
+'''
+
+__author__ = ['Philip Hunt']
+__date__ = '26/08/2011'
+__version__ = '$Revision: 1.2 $'
+
+__all__ = ('DstarPromptWithD02HHHHConf'
+           ,'makeD02hhhh'
+           ,'makePromptDstar'
+           ,'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, ConjugateNeutralPID
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import checkConfig, LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from copy import copy
+
+#moduleName='DstarPromptWithD02HHHH'
+
+# What follows documents the cuts to
+# be implemented by the Stripping team in
+# StrippingSettings (valid for Stripping 17,
+# 26/08/2011).
+
+default_config = {
+        'NAME' : 'DstarPromptWithD02HHMuMuControl',
+        'BUILDERTYPE' : 'DstarPromptWithD02HHHHConf',
+         'CONFIG' : {
+            'CombDelmLower'     : -9.*MeV
+       ,'CombDelmUpper'    : 20*MeV
+       ,'DelmLower'        : -8*MeV
+       ,'DelmUpper'        : 18*MeV
+       ,'CombD0MassWin'    : 120*MeV
+       ,'D0MassWin'        : 100*MeV
+       ,'DstarDOCA'        : 0.3*mm
+       ,'D0MaxDOCA'        : 0.3*mm
+       ,'D0DauPt'          : 300*MeV
+       ,'D0DauP'           : 3*GeV
+       ,'D0Pt'             : 2.*GeV
+       ,'DstarPt'          : 2.*GeV
+       ,'SlowPionPt'       : 120*MeV
+       ,'DstarVtxChi2DOF'  : 20
+       ,'D0VtxChi2DOF'     : 20
+       ,'D0DauMaxIPChi2'   : 9
+       ,'D0DauIPChi2'      : 3.0 # !!!
+       ,'D0FDChi2'         : 30
+       ,'D0IPChi2'         : 36
+       ,'D0DIRA'           : 0.9998
+       ,'TrackChi2DOF'     : 3
+       ,'ApplyKaonPIDK'    : False
+       ,'KaonPIDK'         : 0.
+       ,'ApplyPionPIDK'    : False
+       ,'PionPIDK'         : 3 # not applied to the slow pion
+       ,'CheckPV'          : True # reject events with no PVs
+       ,'ApplyGECs'        : False # set to False to apply no GECs
+       ,'MaxLongTracks'    : 250
+       ,'MaxVeloTracks'    : None
+       ,'MaxSpdDigits'     : None
+       ,'MaxITClusters'    : None
+       ,'ApplyGhostProbCut': False # !!!
+       ,'GhostProbCut'     : 0.4 # !!!
+       ,'ConeAngles'     : {"11":1.1,"13":1.3,"15":1.5,"17":1.7,"19":1.9}
+       ,'ConeVariables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM']
+       ,'Prescale'         : 0.5
+       ,'Postscale'        : 1
+       ,'RunK3pi'          : True
+       ,'Run4pi'           : True
+       ,'Run2K2pi'         : True
+       ,'Run3Kpi'          : True
+       } ,
+       'WGs' : [ 'Charm' ],
+       'STREAMS' : [ 'Charm' ]
+       }
+
+
+class DstarPromptWithD02HHHHConf(LineBuilder):
+  """
+  Constructor of D*->D0(4h)pi stripping selection / stripping lines for
+  physics analysis.
+  Selections and StrippingLines created from a configuration dictionary.
+  Usage:
+  >>> config = {...}
+  >>> myConf = StrippingPromptDstarWithD02HHHHConf('PromptDstarWithD02HHHH',config)
+  >>> myLines = myConf.lines()
+  >>> for line in myLines :
+  >>>  print line.name(), line.outputLocation()
+  The lines can be used directly to build a StrippingStream object.
+
+  Exports as instance data members:
+    line_tagged_d02hhhh : StrippingLine made out of selDstar2Dpi
+
+  Exports as class data member:
+    DstarPromptWithD02HHHHConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+
+    selD02hhhh = makeD02hhhh(
+      moduleName = name
+      ,combMassWin = config['CombD0MassWin']
+      ,massWin = config['D0MassWin']
+      ,maxDOCA = config['D0MaxDOCA']
+      ,pt = config['D0Pt']
+      ,dauPt = config['D0DauPt']
+      ,dauMom = config['D0DauP']
+      ,vtxChi2DOF = config['D0VtxChi2DOF']
+      ,FDChi2 = config['D0FDChi2']
+      ,IPChi2 = config['D0IPChi2']
+      ,dauMaxIPChi2 = config['D0DauMaxIPChi2']
+      ,dauIPChi2 = config['D0DauIPChi2']
+      ,DIRA = config['D0DIRA']
+      ,trackChi2DOF = config['TrackChi2DOF']
+      ,applyKaonPIDK = config['ApplyKaonPIDK']
+      ,kaonPIDK = config['KaonPIDK']
+      ,applyPionPIDK = config['ApplyPionPIDK']
+      ,pionPIDK = config['PionPIDK']
+      ,applyGhostProbCut = config['ApplyGhostProbCut']
+      ,ghostProbCut = config['GhostProbCut']
+      ,runK3pi = config['RunK3pi']
+      ,run4pi = config['Run4pi']
+      ,run2K2pi = config['Run2K2pi']
+      ,run3Kpi = config['Run3Kpi']
+      )
+
+    selPromptDstar = makePromptDstar(
+      moduleName = name
+      ,selection = selD02hhhh
+      ,combDelmLower = config['CombDelmLower']
+      ,combDelmUpper = config['CombDelmUpper']
+      ,delmLower = config['DelmLower']
+      ,delmUpper = config['DelmUpper']
+      ,DOCA = config['DstarDOCA']
+      ,vertexChi2DOF = config['DstarVtxChi2DOF']
+      ,pt = config['DstarPt']
+      ,slowPionPt = config['SlowPionPt']
+      ,trackChi2DOF = config['TrackChi2DOF']
+      )
+
+    _GECfilter = None
+
+    if config['ApplyGECs']:
+      _filter = ""
+
+      nLong = config["MaxLongTracks"]
+      if nLong is not None:
+        if _filter != "":
+          _filter+=" & "
+        _filter += "( recSummaryTrack(LHCb.RecSummary.nLongTracks,TrLONG) < %s )" %nLong
+
+      nDigits = config["MaxSpdDigits"]
+      if nDigits is not None:
+        if _filter != "":
+          _filter+=" & "
+        _filter += "( recSummary(LHCb.RecSummary.nSpdhits,'Raw/Spd/Digits') < %s )" %nDigits
+
+      nClusters = config["MaxITClusters"]
+      if nClusters is not None:
+        if _filter != "":
+          _filter+=" & "
+        _filter += " ( recSummary(LHCb.RecSummary.nITClusters,'Raw/IT/Clusters') < %s )" %nClusters
+
+      nVELO = config["MaxVeloTracks"]
+      if nVELO is not None:
+        if _filter != "":
+          _filter+=" & "
+        _filter += "( recSummaryTrack(LHCb.RecSummary.nVeloTracks,TrVELO) < %s )" %nVELO
+
+
+      if _filter != "":
+        _GECfilter = {'Code' : _filter,
+                      'Preambulo' : ["from LoKiTracks.decorators import *",
+                                     'from LoKiNumbers.decorators    import *',
+                                     'from LoKiCore.functions    import *']
+                      }
+
+    coneinfo=[]
+    for conekey, coneitem in (config['ConeAngles']).iteritems():
+            coneinfo.append({ 
+                                        'Type' : 'RelInfoConeVariables', 'ConeAngle' : coneitem, 'Variables' : config['ConeVariables'], 
+                                        'Location' : 'P2CVDst'+conekey,
+                                        'DaughterLocations' : {
+                                          #'[^D*(2010)+ -> Charm pi+]CC' : 'P2CVDst'+conekey,
+                                          '[D*(2010)+ -> ^Charm pi+]CC' : 'P2CVD0'+conekey,
+                                          '[D*(2010)+ -> Charm ^pi+]CC' : 'P2CVpis'+conekey,
+                                          
+                                        } 
+                                      })
+    self.line_tagged_d02hhhh = StrippingLine(
+      name+"Line"
+      ,prescale=config['Prescale']
+      ,postscale=config['Postscale']
+      ,selection=selPromptDstar
+      ,checkPV=config['CheckPV']
+      ,RelatedInfoTools = coneinfo
+      ,FILTER=_GECfilter)
+    self.registerLine(self.line_tagged_d02hhhh)
+
+def makeD02hhhh (
+  moduleName
+  ,combMassWin
+  ,massWin
+  ,maxDOCA
+  ,pt
+  ,dauPt
+  ,dauMom
+  ,vtxChi2DOF
+  ,FDChi2
+  ,IPChi2
+  ,dauMaxIPChi2
+  ,dauIPChi2
+  ,DIRA
+  ,trackChi2DOF
+  ,applyKaonPIDK
+  ,kaonPIDK
+  ,applyPionPIDK
+  ,pionPIDK
+  ,applyGhostProbCut
+  ,ghostProbCut
+  ,runK3pi
+  ,run4pi
+  ,run2K2pi
+  ,run3Kpi
+  ):
+  """Creates a D0->hhhh Selection object, merging D0->K3pi CF
+  , D0->K3pi DCS, D0->pi3K CF
+  , D0->pi3K DCS, D0->KKpipi and D0->4pi, with cuts for physics analysis.
+  Uses StandardParticle objects 'StdAllNoPIDsKaons' and 'StdAllNoPIDsPions'
+  for lines without PID cuts, and 'StdAllLooseKaons' and 'StdAllLoosePions'
+  for line with PID cuts.
+  Arguments:
+    - moduleName : name of Selection
+    - combMassWin : mass window cut on combination (MeV/c^2)
+    - massWin : mass window cut (MeV/c^2)
+    - maxDOCA : maximum DOCA of D0 daughters (mm)
+    - pt : minimum transverse momentum of D0 (MeV/c)
+    - dauPt : minimum transverse momentum of D0 daughters (MeV/c)
+    - dauMom : minimum momentum of D0 daughters (MeV/c)
+    - vtxChi2DOF : maximum vertex chi2 / d.o.f.
+    - FDChi2 : minimum vertex chi2
+    - IPChi2 : maximum IP chi2
+    - dauMaxIPChi2 :require at leat one D0 daughter with IP chi2 greather than this value
+    - dauIPChi2 : minimum IP chi2 of D0 daughters
+    - DIRA : cosine of angle sustended by momentum and flight direction vectors of D0
+    - trackChi2DOF : maximum track chi2 / d.o.f. of D0 daughters (unitless)
+    - applyKaonPIDK : boolean for whether we apply a kaon PIDK cut
+    - kaonPIDK : DLL(K-pi) cut applied to kaon
+    - applyPionPIDK : boolean for whether we apply a pion PIDK cut
+    - pionPIDK : DLL(K-pi) cut applied to pions
+  """
+  _prefitCuts = "(ADAMASS('D0')<%(combMassWin)s) & (APT>%(pt)s) & " \
+                "(AMAXDOCA('')<%(maxDOCA)s) & " \
+                "(AHASCHILD(((ABSID=='K+') | (ABSID=='pi+')) & " \
+                "(MIPCHI2DV(PRIMARY)>%(dauMaxIPChi2)s)))" %locals()
+
+  _motherCuts = "(VFASPF(VCHI2/VDOF)<%(vtxChi2DOF)s) & " \
+                "(BPVVDCHI2>%(FDChi2)s) & (BPVIPCHI2()<%(IPChi2)s) & " \
+                "(BPVDIRA>%(DIRA)s) & (ADMASS('D0')<%(massWin)s) & " \
+                "(PT>%(pt)s)" %locals()
+
+  _kaonCuts = "(TRCHI2DOF<%(trackChi2DOF)s)" \
+              " &(PT>%(dauPt)s)&(P>%(dauMom)s)" \
+              " & (MIPCHI2DV(PRIMARY)>%(dauIPChi2)s)" \
+              %locals()
+  _pionCuts = copy(_kaonCuts)
+
+  if applyKaonPIDK:
+    _kaonCutsOLD = copy(_kaonCuts)
+    _kaonCuts="(PIDK>%(kaonPIDK)s) & (HASRICH) & " %locals()
+    _kaonCuts+=_kaonCutsOLD
+  if applyPionPIDK:
+    _pionCutsOLD = copy(_pionCuts)
+    _pionCuts="(PIDK<%(pionPIDK)s) & (HASRICH) & " %locals()
+    _pionCuts+=_pionCutsOLD
+  if applyGhostProbCut:
+    _ghostCut = "( TRGHOSTPROB < %(ghostProbCut)s )" %locals()
+    _kaonCutsOLD = copy(_kaonCuts)
+    _pionCutsOLD = copy(_pionCuts)
+    _kaonCuts = _kaonCutsOLD + " & " + _ghostCut
+    _pionCuts = _pionCutsOLD + " & " + _ghostCut
+    
+
+  from StandardParticles import StdAllNoPIDsPions, StdAllNoPIDsKaons
+  from StandardParticles import StdAllLoosePions, StdAllLooseKaons
+
+  _kaons = StdAllNoPIDsKaons
+  _pions = StdAllNoPIDsPions
+  if applyKaonPIDK:
+    _kaons = StdAllLooseKaons
+  if applyPionPIDK:
+    _pions = StdAllLoosePions
+
+  _conjPID = ConjugateNeutralPID()
+
+  _d02k3pi = CombineParticles (DecayDescriptor = "[D0 -> K- pi+ pi- pi+]cc"
+                               ,CombinationCut = _prefitCuts
+                               ,MotherCut = _motherCuts
+                               ,DaughtersCuts = { "K+" : _kaonCuts
+                                                  ,"pi+" : _pionCuts }
+                               )
+  _selD02K3Pi = Selection('D02K3PiFor'+moduleName
+                          ,Algorithm=_d02k3pi
+                          ,RequiredSelections=[_pions,_kaons])
+
+  _selD02K3PiConj = Selection('D02K3PiConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02K3Pi])
+
+  _d02pi3k = copy(_d02k3pi)
+  _d02pi3k.DecayDescriptor="[D0 -> K+ K- K- pi+]cc"
+
+  _selD02Pi3K = Selection('D02Pi3KFor'+moduleName
+                          ,Algorithm=_d02pi3k
+                          ,RequiredSelections=[_pions,_kaons])
+
+  _selD02Pi3KConj = Selection('D02Pi3KConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02Pi3K])
+
+  _d02kkpipi = copy(_d02k3pi)
+  _d02kkpipi.DecayDescriptor="D0 -> K+ K- pi+ pi-"
+
+  _selD02KKPiPi = Selection('D02KKPiPiFor'+moduleName
+                            ,Algorithm=_d02kkpipi
+                            ,RequiredSelections=[_pions,_kaons])
+
+  _selD02KKPiPiConj = Selection('D02KKPiPiConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02KKPiPi])
+
+  _d02fourpi = copy(_d02k3pi)
+  _d02fourpi.DecayDescriptor="D0 -> pi+ pi- pi+ pi-"
+  _d02fourpi.DaughtersCuts={'pi+' : _pionCuts}
+
+  _selD02FourPi = Selection('D02FourPiFor'+moduleName
+                           ,Algorithm=_d02fourpi
+                           ,RequiredSelections=[_pions])
+
+  _selD02FourPiConj = Selection('D02FourPiConjFor'+moduleName
+                                ,Algorithm=_conjPID
+                                ,RequiredSelections=[_selD02FourPi])
+
+  _selectionsToRun = []
+
+  if runK3pi: 
+    _selectionsToRun += [_selD02K3Pi, _selD02K3PiConj]
+  if run4pi: 
+    _selectionsToRun += [_selD02FourPi, _selD02FourPiConj]
+  if run2K2pi: 
+    _selectionsToRun += [_selD02KKPiPi, _selD02KKPiPiConj]
+  if run3Kpi: 
+    _selectionsToRun += [_selD02Pi3K, _selD02Pi3KConj]
+
+  _d0Sel = MergedSelection('D02hhhhFor'+moduleName
+                           ,RequiredSelections=_selectionsToRun
+#                           ,RequiredSelections=[_selD02K3Pi
+#                                                ,_selD02K3PiConj
+#                                                ,_selD02KKPiPi
+#                                                ,_selD02KKPiPiConj
+#                                                ,_selD02FourPi
+#                                                ,_selD02FourPiConj
+#                                                ,_selD02Pi3K
+#                                                ,_selD02Pi3KConj]
+                           )
+
+  return _d0Sel
+
+def makePromptDstar(
+  moduleName
+  ,selection
+  ,combDelmLower
+  ,combDelmUpper
+  ,delmUpper
+  ,delmLower
+  ,DOCA
+  ,vertexChi2DOF
+  ,pt
+  ,slowPionPt
+  ,trackChi2DOF
+  ):
+
+   """Creates a D*->D0pi Selection object
+  , with cuts for physics analysis.
+  Uses StandardParticles 'Phys/StdAllNoPIDPions and Phys/StdAllNoPIDsUpPions'
+  Arguments:
+  -  name : name of Selection
+  - selection : D0 Selection object
+  - combDelmLower : lower edge of delta mass window for combinations (MeV/c^2)
+  - combDelmUpper : upper edge of delta mass window for combinations (MeV/c^2)
+  - delmLower : lower edge of delta mass window (MeV/c^2)
+  - delmUpper : upper edge of delta mass window (MeV/c^2)
+  - DOCA : distance of closest approach (mm)
+  - vertexChi2DOF : maximum vertex chi2 / d.o.f
+  - pt : minimum transverse momentum of D* (GeV/c)
+  - slowPionPt : minimum transverse momentum of bachelor pion (GeV/c)
+ - trackChi2DOF : track chi2 / d.o.f. of the bachelor pion (unitless)
+Note that the delta mass is defined here as the difference between the D* and D0 reconstructed masses subtracted from the PDG value for the D* - D0 mass difference.
+  """
+
+   _prefitCuts = "(AM-AMAXCHILD(M,'D0'==ABSID)-145.4*MeV>%(combDelmLower)s) & " \
+                 "(AM-AMAXCHILD(M,'D0'==ABSID)-145.4*MeV<%(combDelmUpper)s) & " \
+                 "(APT>%(pt)s) & " \
+                 "(AMAXDOCA('')<%(DOCA)s)" %locals()
+
+   _motherCuts = "(M-MAXTREE(M,'D0'==ABSID)-145.4*MeV>%(delmLower)s) & " \
+                 "(M-MAXTREE(M,'D0'==ABSID)-145.4*MeV<%(delmUpper)s) & " \
+                 "(VFASPF(VCHI2/VDOF)<%(vertexChi2DOF)s)" %locals()
+   _slowPionCuts = "(TRCHI2DOF<%(trackChi2DOF)s) & (PT>%(slowPionPt)s)" %locals()
+
+   from StandardParticles import StdAllNoPIDsPions
+
+   _dstar = CombineParticles (
+     DecayDescriptor="[D*(2010)+ -> D0 pi+]cc"
+     ,CombinationCut = _prefitCuts
+     ,MotherCut = _motherCuts
+     ,DaughtersCuts = {"D0":"ALL", "pi+" : _slowPionCuts}
+     )
+
+   _selDstar = Selection(
+     'PromptDstarFor'+moduleName
+     ,Algorithm=_dstar
+     ,RequiredSelections=[StdAllNoPIDsPions, selection]
+     )
+   return _selDstar
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarPromptWithD02HHMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarPromptWithD02HHMuMu.py
new file mode 100644
index 000000000..d2f6e84c6
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingDstarPromptWithD02HHMuMu.py
@@ -0,0 +1,702 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of D0->hhll tagged (from prompt D*) selections, where D->hhll comprises:
+  - D0->Kpi  (mumu,ee,e+mu-,mu+e-) Cabibbo Favoured
+  - D0->Kpi  (mumu,ee,e+mu-,mu+e-) Cabibbo suppressed
+  - D->KK    (mumu,ee,e+mu-,mu+e-)
+  - D0->PiPi (mumu,ee,e+mu-,mu+e-)
+Provides functions to build tagged D->hhhh selections for physics analysis.
+Provides class DstarPromptWithD02HHLLConf, which constructs the selections and stripping lines given a configuration dictionary.
+Exported symbols (use python help):
+  - DstarPromptWithD02HHLLConf
+  - makeD02hhll
+  - makePromptDstar
+'''
+
+__author__ = ['Andrea Contu','Benoit VIAUD']
+__date__ = '23/08/2012'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = ('DstarPromptWithD02HHLLConf'
+           , 'makeD02hhll'
+           , 'makePromptDstar'
+           , 'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, ConjugateNeutralPID
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import checkConfig, LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from copy import copy
+
+#moduleName='DstarPromptWithD02HHLL'
+
+# What follows documents the cuts to
+# be implemented by the Stripping team in
+# StrippingSettings (valid for Stripping 20,
+# 24/08/2011).
+
+
+default_config= {
+  'NAME' : 'DstarPromptWithD02HHLL',
+  'BUILDERTYPE' : 'DstarPromptWithD02HHLLConf',
+  'WGs' : [ 'Charm' ],
+  'STREAMS' : [ 'Charm' ],
+  'CONFIG' : {
+  'CombDelmLower'     : -20.*MeV
+  ,'CombDelmUpper'    : 40*MeV
+  ,'DelmLower'        : -16*MeV
+  ,'DelmUpper'        : 36*MeV
+  ,'CombD0MassWin'    : 240*MeV
+  ,'D0MassWin'        : 220*MeV
+  ,'DstarDOCA'        : 0.3*mm
+  ,'D0MaxDOCA'        : 0.3*mm
+  ,'D0DauPt'          : 300*MeV
+  ,'D0DauP'           : 3*GeV
+  ,'D0Pt'             : 2.*GeV
+  ,'DstarPt'          : 2.*GeV
+  ,'SlowPionPt'       : 120*MeV
+  ,'DstarVtxChi2DOF'  : 20
+  ,'D0VtxChi2DOF'     : 20
+  ,'D0DauMaxIPChi2'   : 9
+  ,'D0DauIPChi2'      : 3.0
+  ,'D0FDChi2'         : 16
+  ,'D0IPChi2'         : 36
+  ,'D0DIRA'           : 0.9999
+  ,'TrackChi2DOF'     : 3
+  ,'ApplyKaonPIDK'    : False
+  ,'KaonPIDK'         : -100.
+  ,'ApplyPionPIDK'    : False
+  ,'PionPIDK'         : 100
+  ,'ApplyElePIDe'    : False
+  ,'ElePIDe'         : -5
+  ,'CheckPV'          : True # reject events with no PVs
+  ,'ApplyGECs'        : False # set to False to apply no GECs
+  ,'MaxLongTracks'    : 250
+  ,'MaxVeloTracks'    : None
+  ,'MaxSpdDigits'     : None
+  ,'MaxITClusters'    : None
+  ,'ApplyGhostProbCut': False
+  ,'GhostProbCut'     : 0.5
+  ,'NoPIDele'           : False
+  ,'NoPIDmu'           : False
+  ,'NoPIDK'           : False
+  ,'NoPIDpi'           : False
+  ,'ConeAngles'     : {"11":1.1,"13":1.3,"15":1.5,"17":1.7,"19":1.9}
+  ,'ConeVariables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM']
+  ,'Prescale'         : 1
+  ,'Postscale'        : 1
+  }
+}
+
+
+class DstarPromptWithD02HHLLConf(LineBuilder):
+  """
+  Constructor of D*->D0(hhll)pi stripping selection / stripping lines for
+  physics analysis.
+  Selections and StrippingLines created from a configuration dictionary.
+  Usage:
+  >>> config = {...}
+  >>> myConf = StrippingPromptDstarWithD02HHLLConf('PromptDstarWithD02HHLL',config)
+  >>> myLines = myConf.lines()
+  >>> for line in myLines :
+  >>>  print line.name(), line.outputLocation()
+  The lines can be used directly to build a StrippingStream object.
+
+  Exports as instance data members:
+    line_tagged_d02hhll : StrippingLine made out of selDstar2Dpi
+
+  Exports as class data member:
+    DstarPromptWithD02HHLLConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+
+    selD02hhll = makeD02hhll(
+      moduleName = name
+      ,combMassWin = config['CombD0MassWin']
+      ,massWin = config['D0MassWin']
+      ,maxDOCA = config['D0MaxDOCA']
+      ,pt = config['D0Pt']
+      ,dauPt = config['D0DauPt']
+      ,dauMom = config['D0DauP']
+      ,vtxChi2DOF = config['D0VtxChi2DOF']
+      ,FDChi2 = config['D0FDChi2']
+      ,IPChi2 = config['D0IPChi2']
+      ,dauMaxIPChi2 = config['D0DauMaxIPChi2']
+      ,dauIPChi2 = config['D0DauIPChi2']
+      ,DIRA = config['D0DIRA']
+      ,trackChi2DOF = config['TrackChi2DOF']
+      ,applyKaonPIDK = config['ApplyKaonPIDK']
+      ,kaonPIDK = config['KaonPIDK']
+      ,applyPionPIDK = config['ApplyPionPIDK']
+      ,pionPIDK = config['PionPIDK']
+      ,applyElePIDe = config['ApplyElePIDe']
+      ,elePIDe = config['ElePIDe']
+      ,applyGhostProbCut = config['ApplyGhostProbCut']
+      ,ghostProbCut = config['GhostProbCut']
+      ,noPIDele = config['NoPIDele']
+      ,noPIDmu = config['NoPIDmu']
+      ,noPIDK = config['NoPIDK']
+      ,noPIDpi = config['NoPIDpi']
+      )
+
+    selPromptDstar = makePromptDstar(
+      moduleName = name
+      ,selection = selD02hhll
+      ,combDelmLower = config['CombDelmLower']
+      ,combDelmUpper = config['CombDelmUpper']
+      ,delmLower = config['DelmLower']
+      ,delmUpper = config['DelmUpper']
+      ,DOCA = config['DstarDOCA']
+      ,vertexChi2DOF = config['DstarVtxChi2DOF']
+      ,pt = config['DstarPt']
+      ,slowPionPt = config['SlowPionPt']
+      ,trackChi2DOF = config['TrackChi2DOF']
+      )
+
+    _GECfilter = None
+
+    if config['ApplyGECs']:
+      _filter = ""
+
+      nLong = config["MaxLongTracks"]
+      if nLong is not None:
+        if _filter != "":
+          _filter+=" & "
+        _filter += "( recSummaryTrack(LHCb.RecSummary.nLongTracks,TrLONG) < %s )" %nLong
+
+      nDigits = config["MaxSpdDigits"]
+      if nDigits is not None:
+        if _filter != "":
+          _filter+=" & "
+        _filter += "( recSummary(LHCb.RecSummary.nSpdhits,'Raw/Spd/Digits') < %s )" %nDigits
+
+      nClusters = config["MaxITClusters"]
+      if nClusters is not None:
+        if _filter != "":
+          _filter+=" & "
+        _filter += " ( recSummary(LHCb.RecSummary.nITClusters,'Raw/IT/Clusters') < %s )" %nClusters
+
+      nVELO = config["MaxVeloTracks"]
+      if nVELO is not None:
+        if _filter != "":
+          _filter+=" & "
+        _filter += "( recSummaryTrack(LHCb.RecSummary.nVeloTracks,TrVELO) < %s )" %nVELO
+
+
+      if _filter != "":
+        _GECfilter = {'Code' : _filter,
+                      'Preambulo' : ["from LoKiTracks.decorators import *",
+                                     'from LoKiNumbers.decorators    import *',
+                                     'from LoKiCore.functions    import *']
+                      }
+    coneinfo=[]
+    for conekey, coneitem in (config['ConeAngles']).iteritems():
+            coneinfo.append({ 
+                                        'Type' : 'RelInfoConeVariables', 'ConeAngle' : coneitem, 'Variables' : config['ConeVariables'], 
+                                        'Location' : 'P2CVDst'+conekey,
+                                        'DaughterLocations' : {
+                                          #'[^D*(2010)+ -> Charm pi+]CC' : 'P2CVDst'+conekey,
+                                          '[D*(2010)+ -> ^Charm pi+]CC' : 'P2CVD0'+conekey,
+                                          '[D*(2010)+ -> Charm ^pi+]CC' : 'P2CVpis'+conekey,
+                                          
+                                        } 
+                                      })
+
+    self.line_tagged_d02hhll = StrippingLine(
+      name+"Line"
+      ,prescale=config['Prescale']
+      ,postscale=config['Postscale']
+      ,selection=selPromptDstar
+      ,checkPV=config['CheckPV']
+      ,FILTER=_GECfilter
+      ,RelatedInfoTools=coneinfo
+      )
+    self.registerLine(self.line_tagged_d02hhll)
+
+def makeD02hhll(
+  moduleName
+  ,combMassWin
+  ,massWin
+  ,maxDOCA
+  ,pt
+  ,dauPt
+  ,dauMom
+  ,vtxChi2DOF
+  ,FDChi2
+  ,IPChi2
+  ,dauMaxIPChi2
+  ,dauIPChi2
+  ,DIRA
+  ,trackChi2DOF
+  ,applyKaonPIDK
+  ,kaonPIDK
+  ,applyPionPIDK
+  ,pionPIDK
+  ,applyElePIDe
+  ,elePIDe
+  ,applyGhostProbCut
+  ,ghostProbCut
+  ,noPIDele
+  ,noPIDmu
+  ,noPIDK
+  ,noPIDpi
+  ):
+  """Creates a D0->hhll Selection object, merging D0->Kpi(mumu,ee,e+mu-,mu+e-) CF
+  , D0->Kpi(mumu,ee,e+mu-,mu+e-) DCS, D0->KK(mumu,ee,e+mu-,mu+e-) and D0->pipi(mumu,ee,e+mu-,mu+e-), with cuts for physics analysis.
+  Uses StandardParticle objects 'StdAllLooseKaons', 'StdAllLoosePions'
+  and 'StdAllLooseMuons'
+
+  Arguments:
+    - moduleName : name of Selection
+    - combMassWin : mass window cut on combination (MeV/c^2)
+    - massWin : mass window cut (MeV/c^2)
+    - maxDOCA : maximum DOCA of D0 daughters (mm)
+    - pt : minimum transverse momentum of D0 (MeV/c)
+    - dauPt : minimum transverse momentum of D0 daughters (MeV/c)
+    - dauMom : minimum momentum of D0 daughters (MeV/c)
+    - vtxChi2DOF : maximum vertex chi2 / d.o.f.
+    - FDChi2 : minimum vertex chi2
+    - IPChi2 : maximum IP chi2
+    - dauMaxIPChi2 :require at leat one D0 daughter with IP chi2 greather than this value
+    - dauIPChi2 : minimum IP chi2 of D0 daughters
+    - DIRA : cosine of angle sustended by momentum and flight direction vectors of D0
+    - trackChi2DOF : maximum track chi2 / d.o.f. of D0 daughters (unitless)
+    - applyKaonPIDK : boolean for whether we apply a kaon PIDK cut
+    - kaonPIDK : DLL(K-pi) cut applied to kaon
+    - applyPionPIDK : boolean for whether we apply a pion PIDK cut
+    - pionPIDK : DLL(K-pi) cut applied to pions
+  """
+  _prefitCuts = "(ADAMASS('D0')<%(combMassWin)s) & (APT>%(pt)s) & " \
+                "(AMAXDOCA('')<%(maxDOCA)s) & " \
+                "(AHASCHILD(((ABSID=='K+') | (ABSID=='pi+') | (ABSID=='mu+') ) & " \
+                "(MIPCHI2DV(PRIMARY)>%(dauMaxIPChi2)s)))" %locals()
+
+  _motherCuts = "(VFASPF(VCHI2/VDOF)<%(vtxChi2DOF)s) & " \
+                "(BPVVDCHI2>%(FDChi2)s) & (BPVIPCHI2()<%(IPChi2)s) & " \
+                "(BPVDIRA>%(DIRA)s) & (ADMASS('D0')<%(massWin)s) & " \
+                "(PT>%(pt)s)" %locals()
+
+  _kaonCuts = "(TRCHI2DOF<%(trackChi2DOF)s)" \
+              " &(PT>%(dauPt)s)&(P>%(dauMom)s)" \
+              " & (MIPCHI2DV(PRIMARY)>%(dauIPChi2)s)" \
+              %locals()
+
+  _pionCuts = copy(_kaonCuts)
+  _muonCuts = copy(_kaonCuts)
+  _eleCuts = copy(_kaonCuts)
+
+
+  PiMuPair_Mu_Cut = "(INTREE( (ID=='mu+') & (PT> %(dauPt)s *MeV) & (TRCHI2DOF < %(trackChi2DOF)s) & ((MIPCHI2DV(PRIMARY)) > %(dauIPChi2)s) & (TRGHOSTPROB<%(ghostProbCut)s ) ))" % locals()
+  PiMuPair_Pi_Cut = "(INTREE( (ID=='pi-') & (PT> %(dauPt)s *MeV) & (TRCHI2DOF < %(trackChi2DOF)s) & ((MIPCHI2DV(PRIMARY)) > %(dauIPChi2)s) & (TRGHOSTPROB<%(ghostProbCut)s ) ))" % locals()
+  _PiMuCuts = PiMuPair_Mu_Cut + " & " + PiMuPair_Pi_Cut 
+
+  PiMuPair_Pi_Cut_PID = "(INTREE( (ID=='pi-') & (PT> %(dauPt)s *MeV) & (TRCHI2DOF < %(trackChi2DOF)s) & ((MIPCHI2DV(PRIMARY)) > %(dauIPChi2)s) & (PIDK<%(pionPIDK)s) & (TRGHOSTPROB<%(ghostProbCut)s ) ))" % locals()
+
+
+  if applyKaonPIDK:
+    _kaonCutsOLD = copy(_kaonCuts)
+    _kaonCuts="(PIDK>%(kaonPIDK)s) & (HASRICH) & " %locals()
+    _kaonCuts+=_kaonCutsOLD
+  if applyPionPIDK:
+    _pionCutsOLD = copy(_pionCuts)
+    _pionCuts="(PIDK<%(pionPIDK)s) & (HASRICH) & " %locals()
+    _pionCuts+=_pionCutsOLD
+    _PiMuCuts = PiMuPair_Mu_Cut + " & " + PiMuPair_Pi_Cut_PID 
+
+  if applyElePIDe:
+    _eleCutsOLD = copy(_eleCuts)
+    _eleCuts="(PIDe>%(elePIDe)s) & " %locals()
+    _eleCuts+=_eleCutsOLD
+
+  if applyGhostProbCut:
+    _ghostCut = "( TRGHOSTPROB < %(ghostProbCut)s )" %locals()
+    _kaonCutsOLD = copy(_kaonCuts)
+    _pionCutsOLD = copy(_pionCuts)
+    _eleCutsOLD = copy(_eleCuts)
+    _kaonCuts = _kaonCutsOLD + " & " + _ghostCut
+    _pionCuts = _pionCutsOLD + " & " + _ghostCut
+    _eleCuts = _eleCutsOLD + " & " + _ghostCut
+
+
+
+    
+
+
+    
+
+  from StandardParticles import StdAllNoPIDsPions, StdAllNoPIDsKaons, StdAllNoPIDsMuons, StdAllNoPIDsElectrons
+  from StandardParticles import StdAllLoosePions, StdAllLooseKaons, StdAllLooseMuons 
+  from StandardParticles import StdAllLooseElectrons 
+  from StandardParticles import StdAllLooseMuPion
+
+
+  _kaons = StdAllLooseKaons
+  _pions = StdAllLoosePions
+  _muons = StdAllLooseMuons
+  _eles   = StdAllLooseElectrons
+  _PiMus = StdAllLooseMuPion
+
+  if applyElePIDe:
+    _eles = StdAllLooseElectrons
+  
+  if noPIDele:
+    _eles = StdAllNoPIDsElectrons
+  
+  if noPIDmu:
+    _muons = StdAllNoPIDsMuons
+
+  if noPIDpi:
+    _pions = StdAllNoPIDsPions
+  
+  if noPIDmu:
+    _kaons = StdAllNoPIDsKaons
+
+### Select kpi modes
+
+# MuMu
+
+  _d02kpi = CombineParticles (DecayDescriptor = "[D0 -> K- pi+ mu+ mu-]cc"
+                               ,CombinationCut = _prefitCuts
+                               ,MotherCut = _motherCuts
+                               ,DaughtersCuts = { "K+" : _kaonCuts
+                                                  ,"pi+" : _pionCuts
+                                                  ,"mu+" : _muonCuts}
+                               )
+  _selD02KPi = Selection('D02KPiFor'+moduleName
+                          ,Algorithm=_d02kpi
+                          ,RequiredSelections=[_muons,_kaons,_pions])
+
+  _conjPID = ConjugateNeutralPID()
+
+  _selD02KPiConj = Selection('D02KPiConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02KPi])
+
+
+# MuMu SS
+
+  _d02kpiSS = CombineParticles (DecayDescriptor = "[D0 -> K- mu+ rho(770)0]cc"
+                               ,CombinationCut = _prefitCuts
+                               ,MotherCut = _motherCuts
+                               ,DaughtersCuts = { "K+" : _kaonCuts
+                                                  ,"mu+" : _muonCuts
+                                                  ,"rho(770)0" : _PiMuCuts}
+                               )
+  _selD02KPiSS = Selection('D02KPiSSFor'+moduleName
+                          ,Algorithm=_d02kpiSS
+                           ,RequiredSelections=[_muons,_kaons,_PiMus])
+
+
+  _selD02KPiSSConj = Selection('D02KPiSSConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                               ,RequiredSelections=[_selD02KPiSS])
+
+
+
+# EE
+
+  _d02kpi_EE = CombineParticles (DecayDescriptor = "[D0 -> K- pi+ e+ e-]cc"
+                               ,CombinationCut = _prefitCuts
+                               ,MotherCut = _motherCuts
+                               ,DaughtersCuts = { "K+" : _kaonCuts
+                                                  ,"pi+" : _pionCuts
+                                                  ,"e+" : _eleCuts}
+                               )
+  _selD02KPi_EE = Selection('D02KPi_EE_For'+moduleName
+                          ,Algorithm=_d02kpi_EE
+                          ,RequiredSelections=[_eles,_kaons,_pions])
+
+  _selD02KPi_EE_Conj = Selection('D02KPi_EE_ConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02KPi_EE])
+
+# EMu
+
+  _d02kpi_EMu = CombineParticles (DecayDescriptor = "[D0 -> K- pi+ e+ mu-]cc"
+                               ,CombinationCut = _prefitCuts
+                               ,MotherCut = _motherCuts
+                               ,DaughtersCuts = { "K+" : _kaonCuts
+                                                  ,"pi+" : _pionCuts
+                                                  ,"mu+" : _muonCuts
+                                                  ,"e+" : _eleCuts}
+                               )
+
+  _selD02KPi_EMu = Selection('D02KPi_EMu_For'+moduleName
+                          ,Algorithm=_d02kpi_EMu
+                          ,RequiredSelections=[_eles,_muons,_kaons,_pions])
+
+  _selD02KPi_EMu_Conj = Selection('D02KPi_EMu_ConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02KPi_EMu])
+
+
+# MuE
+
+  _d02kpi_MuE = CombineParticles (DecayDescriptor = "[D0 -> K- pi+ mu+ e-]cc"
+                               ,CombinationCut = _prefitCuts
+                               ,MotherCut = _motherCuts
+                               ,DaughtersCuts = { "K+" : _kaonCuts
+                                                  ,"pi+" : _pionCuts
+                                                  ,"mu+" : _muonCuts
+                                                  ,"e+" : _eleCuts}
+                               )
+
+  _selD02KPi_MuE = Selection('D02KPi_MuE_For'+moduleName
+                          ,Algorithm=_d02kpi_MuE
+                          ,RequiredSelections=[_eles,_muons,_kaons,_pions])
+
+  _selD02KPi_MuE_Conj = Selection('D02KPi_MuE_ConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02KPi_MuE])
+
+
+
+### Select KK modes
+
+# MuMu
+
+  _d02kk = copy(_d02kpi)
+  _d02kk.DecayDescriptor="D0 -> K+ K- mu+ mu-"
+
+  _selD02KK = Selection('D02KKFor'+moduleName
+                            ,Algorithm=_d02kk
+                            ,RequiredSelections=[_muons,_kaons])
+
+  _selD02KKConj = Selection('D02KKConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02KK])
+
+
+# EE
+
+  _d02kk_EE = copy(_d02kpi_EE)
+  _d02kk_EE.DecayDescriptor="D0 -> K+ K- e+ e-"
+
+  _selD02KK_EE = Selection('D02KK_EE_For'+moduleName
+                            ,Algorithm=_d02kk_EE
+                            ,RequiredSelections=[_eles,_kaons])
+
+  _selD02KK_EE_Conj = Selection('D02KK_EE_ConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02KK_EE])
+
+# EMu
+
+  _d02kk_EMu = copy(_d02kpi_EMu)
+  _d02kk_EMu.DecayDescriptor="D0 -> K+ K- e+ mu-"
+
+  _selD02KK_EMu = Selection('D02KK_EMu_For'+moduleName
+                            ,Algorithm=_d02kk_EMu
+                            ,RequiredSelections=[_muons,_eles,_kaons])
+
+  _selD02KK_EMu_Conj = Selection('D02KK_EMu_ConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02KK_EMu])
+
+
+# MuE
+
+
+  _d02kk_MuE = copy(_d02kpi_MuE)
+  _d02kk_MuE.DecayDescriptor="D0 -> K+ K- mu+ e-"
+
+  _selD02KK_MuE = Selection('D02KK_MuE_For'+moduleName
+                            ,Algorithm=_d02kk_MuE
+                            ,RequiredSelections=[_muons,_eles,_kaons])
+
+  _selD02KK_MuE_Conj = Selection('D02KK_MuE_ConjFor'+moduleName
+                             ,Algorithm=_conjPID
+                             ,RequiredSelections=[_selD02KK_MuE])
+
+
+
+
+### Select PiPi modes
+
+# MuMu
+
+  _d02pipi = copy(_d02kpi)
+  _d02pipi.DecayDescriptor="D0 -> pi+ pi- mu+ mu-"
+  _d02pipi.DaughtersCuts={ "K+" : _kaonCuts
+                           ,"pi+" : _pionCuts
+                           ,"mu+" : _muonCuts}
+
+  _selD02PiPi = Selection('D02PiPiFor'+moduleName
+                           ,Algorithm=_d02pipi
+                           ,RequiredSelections=[_muons,_pions])
+
+  _selD02PiPiConj = Selection('D02PiPiConjFor'+moduleName
+                                ,Algorithm=_conjPID
+                                ,RequiredSelections=[_selD02PiPi])
+
+
+# EE
+
+
+  _d02pipi_EE = copy(_d02kpi_EE)
+  _d02pipi_EE.DecayDescriptor="D0 -> pi+ pi- e+ e-"
+  _d02pipi_EE.DaughtersCuts={ "K+" : _kaonCuts
+                           ,"pi+" : _pionCuts
+                           ,"e+" : _eleCuts}
+
+  _selD02PiPi_EE = Selection('D02PiPi_EE_For'+moduleName
+                           ,Algorithm=_d02pipi_EE
+                           ,RequiredSelections=[_eles,_pions])
+
+  _selD02PiPi_EE_Conj = Selection('D02PiPi_EE_ConjFor'+moduleName
+                                ,Algorithm=_conjPID
+                                ,RequiredSelections=[_selD02PiPi_EE])
+
+
+# EMu
+
+
+
+  _d02pipi_EMu = copy(_d02kpi_EMu)
+  _d02pipi_EMu.DecayDescriptor="D0 -> pi+ pi- e+ mu-"
+  _d02pipi_EMu.DaughtersCuts={ "K+" : _kaonCuts
+                           ,"pi+" : _pionCuts
+                           ,"mu+" : _muonCuts
+                           ,"e+" : _eleCuts}
+
+  _selD02PiPi_EMu = Selection('D02PiPi_EMu_For'+moduleName
+                           ,Algorithm=_d02pipi_EMu
+                           ,RequiredSelections=[_eles,_muons,_pions])
+
+  _selD02PiPi_EMu_Conj = Selection('D02PiPi_EMu_ConjFor'+moduleName
+                                ,Algorithm=_conjPID
+                                ,RequiredSelections=[_selD02PiPi_EMu])
+
+
+
+
+# MuE
+
+
+  _d02pipi_MuE = copy(_d02kpi_MuE)
+  _d02pipi_MuE.DecayDescriptor="D0 -> pi+ pi- mu+ e-"
+  _d02pipi_MuE.DaughtersCuts={ "K+" : _kaonCuts
+                           ,"pi+" : _pionCuts
+                           ,"mu+" : _muonCuts
+                           ,"e+" : _eleCuts}
+
+  _selD02PiPi_MuE = Selection('D02PiPi_MuE_For'+moduleName
+                           ,Algorithm=_d02pipi_MuE
+                           ,RequiredSelections=[_eles,_muons,_pions])
+
+  _selD02PiPi_MuE_Conj = Selection('D02PiPi_MuE_ConjFor'+moduleName
+                                ,Algorithm=_conjPID
+                                ,RequiredSelections=[_selD02PiPi_MuE])
+
+
+
+
+### Wrapping everything up
+
+
+  _d0Sel = MergedSelection('D02hhllFor'+moduleName
+                           ,RequiredSelections=[_selD02KPi
+                                                ,_selD02KPiConj
+                                                , _selD02KPiSS
+                                                , _selD02KPiSSConj
+                                                ,_selD02KPi_EE
+                                                ,_selD02KPi_EE_Conj
+                                                ,_selD02KPi_EMu
+                                                ,_selD02KPi_EMu_Conj
+                                                ,_selD02KPi_MuE
+                                                ,_selD02KPi_MuE_Conj
+                                                ,_selD02KK
+                                                ,_selD02KKConj
+                                                ,_selD02KK_EE
+                                                ,_selD02KK_EE_Conj
+                                                ,_selD02KK_EMu
+                                                ,_selD02KK_EMu_Conj
+                                                ,_selD02KK_MuE
+                                                ,_selD02KK_MuE_Conj
+                                                ,_selD02PiPi
+                                                ,_selD02PiPiConj
+                                                ,_selD02PiPi_EE
+                                                ,_selD02PiPi_EE_Conj
+                                                ,_selD02PiPi_EMu
+                                                ,_selD02PiPi_EMu_Conj
+                                                ,_selD02PiPi_MuE
+                                                ,_selD02PiPi_MuE_Conj]
+
+
+                           )
+
+
+  return _d0Sel
+
+def makePromptDstar(
+  moduleName
+  ,selection
+  ,combDelmLower
+  ,combDelmUpper
+  ,delmUpper
+  ,delmLower
+  ,DOCA
+  ,vertexChi2DOF
+  ,pt
+  ,slowPionPt
+  ,trackChi2DOF
+  ):
+
+   """Creates a D*->D0pi Selection object
+  , with cuts for physics analysis.
+  Uses StandardParticles 'Phys/StdAllNoPIDPions and Phys/StdAllNoPIDsUpPions'
+  Arguments:
+  -  name : name of Selection
+  - selection : D0 Selection object
+  - combDelmLower : lower edge of delta mass window for combinations (MeV/c^2)
+  - combDelmUpper : upper edge of delta mass window for combinations (MeV/c^2)
+  - delmLower : lower edge of delta mass window (MeV/c^2)
+  - delmUpper : upper edge of delta mass window (MeV/c^2)
+  - DOCA : distance of closest approach (mm)
+  - vertexChi2DOF : maximum vertex chi2 / d.o.f
+  - pt : minimum transverse momentum of D* (GeV/c)
+  - slowPionPt : minimum transverse momentum of bachelor pion (GeV/c)
+ - trackChi2DOF : track chi2 / d.o.f. of the bachelor pion (unitless)
+Note that the delta mass is defined here as the difference between the D* and D0 reconstructed masses subtracted from the PDG value for the D* - D0 mass difference.
+  """
+
+   _prefitCuts = "(AM-AMAXCHILD(M,'D0'==ABSID)-145.4*MeV>%(combDelmLower)s) & " \
+                 "(AM-AMAXCHILD(M,'D0'==ABSID)-145.4*MeV<%(combDelmUpper)s) & " \
+                 "(APT>%(pt)s) & " \
+                 "(AMAXDOCA('')<%(DOCA)s)" %locals()
+
+   _motherCuts = "(M-MAXTREE(M,'D0'==ABSID)-145.4*MeV>%(delmLower)s) & " \
+                 "(M-MAXTREE(M,'D0'==ABSID)-145.4*MeV<%(delmUpper)s) & " \
+                 "(VFASPF(VCHI2/VDOF)<%(vertexChi2DOF)s)" %locals()
+   _slowPionCuts = "(TRCHI2DOF<%(trackChi2DOF)s) & (PT>%(slowPionPt)s)" %locals()
+
+   from StandardParticles import StdAllNoPIDsPions
+
+   _dstar = CombineParticles (
+     DecayDescriptor="[D*(2010)+ -> D0 pi+]cc"
+     ,CombinationCut = _prefitCuts
+     ,MotherCut = _motherCuts
+     ,DaughtersCuts = {"D0":"ALL", "pi+" : _slowPionCuts}
+     )
+
+   _selDstar = Selection(
+     'PromptDstarFor'+moduleName
+     ,Algorithm=_dstar
+     ,RequiredSelections=[StdAllNoPIDsPions, selection]
+     )
+   return _selDstar
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingExcitedDsSpectroscopy.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingExcitedDsSpectroscopy.py
new file mode 100644
index 000000000..390af6f31
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingExcitedDsSpectroscopy.py
@@ -0,0 +1,329 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of Ds->KKPi based on 
+ StrippingD2hhh_conf.py stripping Selections and StrippingLines.
+Provides functions to build Ds2KKPi selections using StdVeryTightDsplus2KKPi.
+Provides class Ds2KKpiConf, which constructs the Selections and 
+StrippingLines given a configuration dictionary.
+Exported symbols (use python help!):
+   - Ds2KKpiConf
+   - makeStdDs2KKpi
+'''
+
+__author__ = ['Marco Pappagallo']
+__date__ = '09/09/2015'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('DsstGammaConf',
+           'makeDs2KKpi',
+           'makeDsg',
+           'makeDsgg',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+## Test:  Yes
+default_config = {
+    'NAME'        : 'ExcitedDsSpectroscopy',
+    'BUILDERTYPE' : 'ExcitedDsSpectroscopyConf' ,
+    'CONFIG' : {
+                'Daughter2IPChi2'           :   10.,
+                'PTSum'                     : 2800.,
+                'DsPt'                      : 1000.,
+                'DsIPChi2'                  :    9.,
+                'DsVXChi2NDOF'              :   10.,
+                'MinMassPhi'                : 1010.,
+                'MaxMassPhi'                : 1030.,
+                'MinMassKstar'              :  836., # 836
+                'MaxMassKstar'              :  956., # 956
+                'piPIDK'                    :    3.,
+                'KPIDK'                     :    7.,
+                'DsDIRA'                    :    0., 
+                'MinCosHelAngleKstar'       :    0.4, # 0.4
+                'MaxTracksInEvent'          :  500,
+                'DsstGammaLinePrescale'     :    1.0,
+                'DsstGammaLinePostscale'    :    1.0,
+                'DsGammaLinePrescale'       :    1.0,
+                'DsGammaLinePostscale'      :    1.0,
+                'GammaPT'                   :  400.,
+                'GammaCL'                   :    0.1,
+                'DeltaMassDsstar'           :  450.,
+                'DeltaMassDsg'              : 1300.,
+                'Gamma2PT'                  :    0.,
+                'Gamma2CL'                  :    0.1,
+                'DeltaMassDsgg'             :  1300.,
+                'MaxMassDsst'               :  2300.
+                },
+    
+    'WGs' : [ 'Charm' ],
+    'STREAMS' : [ 'Charm' ]
+    }
+
+
+class ExcitedDsSpectroscopyConf(LineBuilder) :
+    """
+    Builder of Ds ->KKPi stripping Selection and StrippingLine.
+    Constructs Ds ->KKPI Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> D2HHHConf = Ds2KKpiConf('D2HHHtest',config)
+    >>> D2hhhLines = D2HHHConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selKKPi            :  get StdVeryTightDsplus2KKPi
+    Ds2KKPi_line       :  StrippingLine made out of selKKPi 
+    lines              :  List of lines [Ds2KKPi_line]
+
+    Exports as class data member:
+    Ds2KKpiConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.selKKPi = DataOnDemand(Location = "Phys/StdVeryTightDsplus2KKPi/Particles")
+
+        self.selDs2KKPi = makeStdDs2KKpi('DsFor%s' % name,
+                                         KKPiSel = self.selKKPi, 
+                                         Daughter2IPChi2 = config['Daughter2IPChi2'],
+                                         PTSum = config['PTSum'],
+                                         DsIPChi2= config['DsIPChi2'],
+                                         DsPt = config['DsPt'],
+                                         DsVXChi2NDOF = config['DsVXChi2NDOF'],
+                                         MinMassPhi   = config['MinMassPhi'],
+                                         MaxMassPhi   = config['MaxMassPhi'],
+                                         MinMassKstar = config['MinMassKstar'],
+                                         MaxMassKstar = config['MaxMassKstar'],
+                                         piPIDK       = config['piPIDK'],
+                                         KPIDK        = config['KPIDK'],
+                                         DsDIRA       = config['DsDIRA'],
+                                         MinCosHelAngleKstar = config['MinCosHelAngleKstar']
+                                         )
+
+#        //self.selPhoton = makePhoton('GammaFor%s' % name)
+
+        self.selDsg  = makeDsg('DsstarFor%s' % name,
+                               DsSel = self.selDs2KKPi,
+                               GammaPT = config['GammaPT'],
+                               GammaCL = config['GammaCL'],
+                               DeltaMassDsg = config['DeltaMassDsg']
+                               )
+
+        self.selDsg_vetoed = makeDsg_vetoed('Pi0VetoDsgFor%s' % name,
+                                            DsgSel = self.selDsg
+                                            )
+        
+
+        self.selDsgg = makeDsgg('DsggFor%s' % name,
+                                DsstSel = self.selDsg_vetoed,
+                                Gamma2PT = config['Gamma2PT'],
+                                Gamma2CL = config['Gamma2CL'],
+                                DeltaMassDsgg = config['DeltaMassDsgg'],
+                                MaxMassDsst = config['MaxMassDsst']
+                                )
+
+        self.selDsgg_vetoed = makeDsgg_vetoed('Pi0VetoDsggFor%s' % name,
+                                              DsggSel = self.selDsgg
+                                              )
+
+        self.filterGE = globalEventCutFilter(name + 'GECFilter', 
+                                    MaxTrSIZE = config['MaxTracksInEvent'])
+
+
+        self.Dsg_line = StrippingLine("DsGammaFor"+name+"Line",
+                                      prescale = config['DsGammaLinePrescale'],
+                                      postscale = config['DsGammaLinePostscale'],
+                                      selection = self.selDsg_vetoed,
+                                      #selection = self.selDs2KKPi,
+                                      #selection = self.selDsgg_vetoed,
+                                      FILTER = self.filterGE,
+                                      )
+        
+        self.registerLine(self.Dsg_line)
+                
+        
+        self.Dsgg_line = StrippingLine("DsstGammaFor"+name+"Line",
+                                       prescale = config['DsstGammaLinePrescale'],
+                                       postscale = config['DsstGammaLinePostscale'],
+                                       #selection = self.selDsgg,
+                                       #selection = self.selDs2KKPi,
+                                       selection = self.selDsgg_vetoed,
+                                       FILTER = self.filterGE,
+                                       )
+
+        self.registerLine(self.Dsgg_line)
+        
+def makeDsgg_vetoed(name,
+                    DsggSel
+                    ):
+
+    from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+    
+    _g = Pi0Veto__Tagger(
+        MassWindow     = 25,
+        MassChi2       = -1           ,
+        ExtraInfoIndex = 25041     ## unique !
+        )
+    
+    return Selection(name, Algorithm=_g, RequiredSelections=[DsggSel])
+                        
+
+def makeDsg_vetoed(name,
+                   DsgSel
+                   ):
+    
+    from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+    
+    _g = Pi0Veto__Tagger(
+        MassWindow     = 25,
+        MassChi2       = -1           ,
+        ExtraInfoIndex = 25040     ## unique !
+        )
+    
+    return Selection(name, Algorithm=_g, RequiredSelections=[DsgSel])
+
+def makeStdDs2KKpi(name,
+                   KKPiSel,
+                   Daughter2IPChi2, 
+                   PTSum,
+                   DsIPChi2,
+                   DsPt,
+                   DsVXChi2NDOF,
+                   MinMassPhi,
+                   MaxMassPhi,
+                   MinMassKstar,
+                   MaxMassKstar,
+                   piPIDK,
+                   KPIDK,
+                   DsDIRA,
+                   MinCosHelAngleKstar
+                   ):
+    """
+    Create and return a Ds -> KKPi Selection object.
+    Arguments:
+    name            : name of the Selection.
+    KKPiSel         : Standard Specific Ds2KKPi selection    
+    Daughter2IPChi2 : Minimum IPChi2 required to at least 2 daughters 
+    PTSum           : Minimum sum of daughters momenta
+    DsIPChi2        : Maximum IPChi2 of the Ds
+    DsPt            : Minimum Ds Momentum
+    DsVXChi2NDOF    : Maximum Chi2 of the Ds Vertex
+    MinMassPhi      : Lower bound for phi mass
+    MaxMassPhi      : Upper bound for phi mass   
+    MinMassKstar    : Lower bound for K*(892) mass
+    MaxMassKstar    : Upper bound for K*(892) mass
+    piPIDK          : Kaon - pion DLL for pions
+    KPIDK           : Kaon - pion DLL for kaons
+    DsDIRA          : Cosine angle between Ds momentum and FD-direction
+    MinCosHelAngleKstar: Cosine of the helicity angle in the K*(892) rest frame
+    """
+
+    _Combcuts =""" 
+               (SUMTREE( ISBASIC , PT ) > %(PTSum)s*MeV) &
+               (2 <= NINGENERATION((MIPCHI2DV(PRIMARY) > %(Daughter2IPChi2)s ) , 1)) 
+               """ % locals()
+                    
+    _Mothercuts = """
+                  (PT > %(DsPt)s) & (VFASPF(VCHI2/VDOF) < %(DsVXChi2NDOF)s) &
+                  (BPVDIRA > %(DsDIRA)s) & (BPVIPCHI2() < %(DsIPChi2)s)
+                  """ % locals()
+
+    _DaughterCuts = "(MAXTREE('pi+'==ABSID, PIDK-PIDpi) < %(piPIDK)s) & (MINTREE('K-'==ABSID, PIDK-PIDpi) > %(KPIDK)s ) " % locals()
+
+    # M12 --> phi(1020)
+    # M13 --> K*(892)0
+
+    _cutsDP_phi = "(in_range ( %(MinMassPhi)s* MeV , M12 , %(MaxMassPhi)s* MeV ))" % locals()
+    _cutsDP_Kst = "(in_range ( %(MinMassKstar)s* MeV , M13 , %(MaxMassKstar)s* MeV ) & (abs(COSPOL('[D_s+ -> ^K- K+ pi+]CC', '[D_s+ -> K- K+ ^pi+]CC', False)) > %(MinCosHelAngleKstar)s))"  % locals()
+    _cutsDP = '('+_cutsDP_phi + '|' +_cutsDP_Kst + ')'
+
+    _code = '('+_DaughterCuts+'&'+_cutsDP+'&'+_Combcuts+'&'+_Mothercuts+')'
+ 
+    _filter = FilterDesktop( Code = _code ) 
+   
+    return Selection ( name,
+                       Algorithm = _filter,
+                       RequiredSelections = [KKPiSel])
+
+
+def makeDsg(name,
+            DsSel,
+            GammaPT,
+            GammaCL,
+            DeltaMassDsg
+            ):
+    
+    _daughterPhotonCut   = "(PT > %(GammaPT)s) & (CL > %(GammaCL)s)" % locals()
+    _combinationCut = "(AM - AM1) < %(DeltaMassDsg)s*MeV" % locals() 
+    _motherCut      = "ALL"
+
+    _Dsg = CombineParticles(DecayDescriptor = "[D*_s+ -> D_s+ gamma]cc", 
+                            DaughtersCuts = {"gamma"  : _daughterPhotonCut
+                                             },
+                            CombinationCut = _combinationCut,
+                            MotherCut = _motherCut)
+    
+    _stdPhoton = DataOnDemand(Location="Phys/StdLooseAllPhotons/Particles")
+    
+    return Selection(name, Algorithm=_Dsg, RequiredSelections=[DsSel, _stdPhoton])
+
+def makeDsgg(name,
+             DsstSel,
+             Gamma2PT,
+             Gamma2CL,
+             DeltaMassDsgg,
+             MaxMassDsst
+             ):
+
+    _daughterDsstCut     = "M < %(MaxMassDsst)s*MeV" % locals()
+    _daughterPhotonCut   = "(PT > %(Gamma2PT)s) & (CL > %(Gamma2CL)s)" % locals()
+    _combinationCut = "(AM - AM1) < %(DeltaMassDsgg)s*MeV" % locals()
+    _motherCut      = "ALL"
+    
+    _Dsgg = CombineParticles(DecayDescriptor = "[D_s1(2536)+ -> D*_s+ gamma]cc",
+                             DaughtersCuts = {"gamma"  : _daughterPhotonCut,
+                                              "D*_s+"  : _daughterDsstCut
+                                              },
+                             CombinationCut = _combinationCut,
+                             MotherCut = _motherCut)
+    
+    _stdPhoton = DataOnDemand(Location="Phys/StdLooseAllPhotons/Particles")
+    
+    return Selection(name, Algorithm=_Dsgg, RequiredSelections=[DsstSel, _stdPhoton])
+
+def globalEventCutFilter(name, 
+                         MaxTrSIZE = None 
+                         ) :
+#  
+  if MaxTrSIZE == None : return None
+  
+  from Configurables import LoKi__VoidFilter as VoidFilter
+  from Configurables import LoKi__Hybrid__CoreFactory as CoreFactory
+  modules = CoreFactory('CoreFactory').Modules
+  for i in ['LoKiTracks.decorators']:
+     if i not in modules : modules.append(i)
+  
+  _code = "(recSummary(LHCb.RecSummary.nTracks, 'Rec/Track/Best') < %(MaxTrSIZE)s )" % locals()
+  
+  return _code          
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V02H.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V02H.py
new file mode 100644
index 000000000..14d248d68
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V02H.py
@@ -0,0 +1,490 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of general decay topologies
+    [Xi_c0 -> (V0 -> h+ h-) h+ h-]CC
+In this file the stripping line for this decay is build 
+    [Xi_c0 -> (Lambda0 -> p+ pi-) K- pi+]CC  : CF
+    [Xi_c0 -> (Lambda0 -> p+ pi-) K- K+]CC   : CS
+    [Xi_c0 -> (Lambda0 -> p+ pi-) pi- pi+]CC : CS
+    [Xi_c0 -> (Lambda0 -> p+ pi-) pi- K+]CC  : DCS 
+Throughout this file, 'Bachelor' refers to the children of the Xi_c0 which is
+not part of the V0 decay.
+"""
+
+__author__ = ['Jinlin Fu', 'Louis Henry']
+__date__ = '18/07/2019'
+
+__all__ = (
+    'default_config',
+    'StrippingHc2V02HConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop, DaVinci__N3BodyDecays
+#from StandardParticles import StdNoPIDsPions as InputPionsPiPi
+#from StandardParticles import StdNoPIDsKaons as InputKaons
+
+#from StandardParticles import StdAllLoosePions as InputPions
+#from StandardParticles import StdAllLooseKaons as InputKaons
+
+from StandardParticles import StdAllNoPIDsPions as InputPions
+from StandardParticles import StdAllNoPIDsKaons as InputKaons
+
+#from StandardParticles import StdLooseLambdaLL as InputLambdasLL
+#from StandardParticles import StdVeryLooseLambdaLL as InputLambdasLL
+#from StandardParticles import StdLooseLambdaDD as InputLambdasDD
+
+from PhysSelPython.Wrappers import Selection, MergedSelection, DataOnDemand
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME': 'Hc2V02H',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingHc2V02HConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum Xic0 bachelor momentum
+        'Bach_P_MIN': 2.0*GeV,
+        'Bach_PT_MIN': 250.0*MeV,
+        # MIPCHI2DV_PRIMARY_Min only for PiPi mode
+		'MIPCHI2DV_PRIMARY_Min': 2,
+		#
+		'p_L0_P_LL_min': 2.0*GeV,
+		'p_L0_PT_LL_min': 100.0*MeV,
+		'pi_L0_P_LL_min': 2.0*GeV,
+		'pi_L0_PT_LL_min': 100.0*MeV,
+        #TrackGhost Prob
+        'TrGhostProbMax': 0.3,
+        # PID of the Lambda proton, pi
+        "ProbNNpMin_L0_LL"   : 0.10,
+        "ProbNNpMin_L0_DD"   : 0.10,
+        "ProbNNpiMin_L0_LL"   : 0.10,
+        "ProbNNpiMin_L0_DD"   : 0.10,
+        # PID of the bachelor 
+        "ProbNNkMin"   : 0.10,
+        "ProbNNpiMin"   : 0.10,
+        # Minimum L0 momentum
+        #'Lambda0_P_MIN': 2000*MeV,
+        'Lambda0_P_MIN': 6000*MeV,
+        # Minimum L0 transverse momentum
+        'Lambda0_PT_MIN': 250*MeV,
+        # Minimum flight distance chi^2 of L0 from the primary vertex
+        #'Lambda0_FDCHI2_MIN_LL': 256,
+        #'Lambda0_FDCHI2_MIN_DD': 256,
+        'Lambda0_FDCHI2_MIN_LL': 4,
+        'Lambda0_FDCHI2_MIN_DD': 4,
+        # Minimum flight distance of L0 from the primary vertex: EndVertexZ(Lambda)-EndVertexZ(Xic)
+        #"LambdaMinFD_LL"  : 25.*mm,
+        #"LambdaMinFD_DD"  : 0. *mm,
+        "LambdaMinFD_LL"  : 5.*mm,
+        "LambdaMinFD_DD"  : 500. *mm,
+        # Maximum L0 vertex chi^2 per vertex fit DoF
+        #'Lambda0_VCHI2VDOF_MAX': 12.0,
+        'Lambda0_VCHI2VDOF_MAX_LL': 12.0,
+        'Lambda0_VCHI2VDOF_MAX_DD': 25.0,
+        # Xic0 mass window around the nominal Xic0 mass before the vertex fit
+        'Comb_ADAMASS_WIN': 120.0*MeV,
+        # Xic0 mass window around the nominal Xic0 mass after the vertex fit
+        'Xic_ADMASS_WIN'    : 90.0*MeV,
+        # Maximum distance of closest approach of Xic0 children
+        'Comb_ADOCAMAX_MAX': 0.4*mm,
+        # Maximum Xic0 vertex chi^2 per vertex fit DoF
+        'Xic_VCHI2VDOF_MAX_LL'    : 3.0,
+        'Xic_VCHI2VDOF_MAX_DD'    : 3.0,
+        # Xic P, PT 
+        'Xic_P_min'    : 10000.0*MeV,
+        'Xic_PT_min'    : 250.0*MeV,
+        # Maximum angle between Xic0 momentum and Xic0 direction of flight
+       # 'Xic_acosBPVDIRA_MAX_LL':  31.6*mrad, #0.9995
+        #'Xic_acosBPVDIRA_MAX_DD':  31.6*mrad,
+        #'Xic_acosBPVDIRA_MAX_LL':  28.28*mrad, #0.9996
+        #'Xic_acosBPVDIRA_MAX_DD':  31.6*mrad,
+        #'Xic_acosBPVDIRA_MAX_LL':  24.49*mrad, #0.9997
+        'Xic_acosBPVDIRA_MAX_LL':  20.*mrad, #0.9998
+        'Xic_acosBPVDIRA_MAX_DD':  31.6*mrad,
+        # Primary vertex displacement requirement, either that the Xic0 is some
+        # sigma away from the PV, or it has a minimum flight time
+        #'Xic_PVDispCut_LL': '(BPVVDCHI2 > 49.0)',
+        #'Xic_PVDispCut_DD': '(BPVVDCHI2 > 49.0)',
+        #'Xic_PVDispCut_LL': '(BPVVDCHI2 > 1.0)',
+        #'Xic_PVDispCut_DD': '(BPVVDCHI2 > 1.0)',
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleXic2LambdaPiPiLL': 1.0,
+        'PrescaleXic2LambdaPiPiDD': 1.0,
+        'PrescaleXic2LambdaKPiLL': 1.0,
+        'PrescaleXic2LambdaKPiDD': 1.0,
+        'PrescaleXic2LambdaKKLL': 1.0,
+        'PrescaleXic2LambdaKKDD': 1.0,
+        'PrescaleXic2LambdaPiKLL': 1.0,
+        'PrescaleXic2LambdaPiKDD': 1.0,
+        # Fraction of candidates to randomly throw away after stripping
+        'PostscaleXic2LambdaPiPiLL': 1.0,
+        'PostscaleXic2LambdaPiPiDD': 1.0,
+        'PostscaleXic2LambdaKPiLL': 1.0,
+        'PostscaleXic2LambdaKPiDD': 1.0,
+        'PostscaleXic2LambdaKKLL': 1.0,
+        'PostscaleXic2LambdaKKDD': 1.0,
+        'PostscaleXic2LambdaPiKLL': 1.0,
+        'PostscaleXic2LambdaPiKDD': 1.0,
+    }
+}
+
+
+class StrippingHc2V02HConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        # Decay descriptors
+        self.Xic2LambdaPiK  = ['[Xi_c0 -> Lambda0 pi- K+]cc']
+        self.Xic2LambdaPiPi  = ['[Xi_c0 -> Lambda0 pi- pi+]cc']
+        self.Xic2LambdaKPi   = ['[Xi_c0 -> Lambda0 K-  pi+]cc' ]
+        self.Xic2LambdaKK  = ['[Xi_c0 -> Lambda0 K-  K+]cc']
+        
+        # Line names
+        # 'LL' and 'DD' will be appended to these names for the LL and DD
+        # Selection and StrippingLine instances
+        self.Xic2LambdaPiK_name  = '{0}_Xic2LambdaPiK' .format(name)
+        self.Xic2LambdaPiPi_name  = '{0}_Xic2LambdaPiPi' .format(name)
+        self.Xic2LambdaKPi_name   = '{0}_Xic2LambdaKPi'.format(name)
+        self.Xic2LambdaKK_name  = '{0}_Xic2LambdaKK' .format(name)
+        
+        # Build bachelor pion and kaon cut strings
+        # Cuts MIPCHI2DV(PRIMARY)>4 & PT>250*MeV already present in the InputsParticles
+        childCutsKaons = (
+            '(P > {0[Bach_P_MIN]})'
+            '& (PT > {0[Bach_PT_MIN]})'
+			'& (PROBNNk > {0[ProbNNkMin]})'
+			'& (TRGHOSTPROB < {0[TrGhostProbMax]})'
+        ).format(self.config)
+        
+        childCutsPions = (
+            '(P > {0[Bach_P_MIN]})'
+            '& (PT > {0[Bach_PT_MIN]})'
+			'& (PROBNNpi > {0[ProbNNpiMin]})'
+			'& (TRGHOSTPROB < {0[TrGhostProbMax]})'
+        ).format(self.config)
+
+        childCutsPionsTight = (
+            '(P > {0[Bach_P_MIN]})'
+            '& (PT > {0[Bach_PT_MIN]})'
+			'& (PROBNNpi > {0[ProbNNpiMin]})'
+			'& (TRGHOSTPROB < {0[TrGhostProbMax]})'
+			'& (MIPCHI2DV(PRIMARY) > {0[MIPCHI2DV_PRIMARY_Min]})'
+        ).format(self.config)
+
+        kineticCutsKaons = '{0}'.format(childCutsKaons)
+        kineticCutsPions = '{0}'.format(childCutsPions)
+        kineticCutsPionsTight = '{0}'.format(childCutsPionsTight)
+
+        # Build Lambda0 cut strings
+        lambda0LLCuts = (
+            '(P > {0[Lambda0_P_MIN]})'
+            '& (PT > {0[Lambda0_PT_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Lambda0_VCHI2VDOF_MAX_LL]})'
+        ).format(self.config)
+        lambda0DDCuts = (
+            '(P > {0[Lambda0_P_MIN]})'
+            '& (PT > {0[Lambda0_PT_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Lambda0_VCHI2VDOF_MAX_DD]})'
+        ).format(self.config)
+        
+        # Filter Input particles
+        self.Pions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                 Code = kineticCutsPions
+            ),
+            RequiredSelections=[InputPions]
+        )
+
+        self.PionsTight = Selection(
+            'TightPionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                 Code = kineticCutsPionsTight
+            ),
+            RequiredSelections=[InputPions]
+        )
+
+        self.Kaons = Selection(
+            'KaonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                  Code = kineticCutsKaons
+            ),
+            RequiredSelections=[InputKaons]
+        )
+        
+        # Filter Input Lambdas
+        self.LambdaListLooseDD = MergedSelection("StdLooseDDLambdaFor" + self.name,
+                                                 RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")])
+        
+        self.LambdaListLooseLL = MergedSelection("StdVeryLooseLLLambdaFor" + self.name,
+                                                 RequiredSelections =  [DataOnDemand(Location = "Phys/StdVeryLooseLambdaLL/Particles")])
+        
+        self.LambdaListLL =  self.createSubSel(OutputList = "LambdaLLFor" + self.name,
+                                               InputList = self.LambdaListLooseLL ,
+                                               Cuts = "(MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMin_L0_LL)s ) "
+                                               "& (MAXTREE('pi-'==ABSID,PROBNNpi) > %(ProbNNpiMin_L0_LL)s )"
+                                               "& (MAXTREE('p+'==ABSID, P) > %(p_L0_P_LL_min)s )"
+                                               "& (MAXTREE('p+'==ABSID, PT) > %(p_L0_PT_LL_min)s )"
+                                               "& (MAXTREE('pi-'==ABSID, P) > %(pi_L0_P_LL_min)s )"
+                                               "& (MAXTREE('pi-'==ABSID, PT) > %(pi_L0_PT_LL_min)s )"
+                                               '& (BPVVDCHI2 > %(Lambda0_FDCHI2_MIN_LL)s )'                                               
+                                               %self.config
+                                               )
+        
+        self.LambdaListDD =  self.createSubSel(OutputList = "LambdaDDFor" + self.name,
+                                               InputList = self.LambdaListLooseDD ,
+                                               Cuts = "(MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMin_L0_DD)s ) "
+                                               "& (MAXTREE('pi-'==ABSID,PROBNNpi) > %(ProbNNpiMin_L0_DD)s )"
+                                               '& (BPVVDCHI2 > %(Lambda0_FDCHI2_MIN_DD)s )'
+                                               %self.config
+                                               )
+        
+        self.Lambda0LL = Selection(
+            'Lambda0LLFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code=lambda0LLCuts
+            ),
+            RequiredSelections=[self.LambdaListLL]
+        )
+        self.Lambda0DD = Selection(
+            'Lambda0DDFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code=lambda0DDCuts
+            ),
+            RequiredSelections=[self.LambdaListDD]
+        )
+
+        # Build selection for Xic -> L pi pi
+        self.selXic2LambdaPiPi = self.makeHc2V02H(
+            name=self.Xic2LambdaPiPi_name,
+            inputSelLL=[self.Lambda0LL, self.PionsTight],
+            inputSelDD=[self.Lambda0DD, self.PionsTight],
+            decDescriptors=self.Xic2LambdaPiPi
+        )
+
+        # Build selection for Xic -> L K K
+        self.selXic2LambdaKK = self.makeHc2V02H(
+            name=self.Xic2LambdaKK_name,
+            inputSelLL=[self.Lambda0LL, self.Kaons],
+            inputSelDD=[self.Lambda0DD, self.Kaons],
+            decDescriptors=self.Xic2LambdaKK
+        )
+
+        # Build selection for Xic -> L K pi
+        self.selXic2LambdaKPi = self.makeHc2V02H(
+            name=self.Xic2LambdaKPi_name,
+            inputSelLL=[self.Lambda0LL, self.Kaons, self.Pions],
+            inputSelDD=[self.Lambda0DD, self.Kaons, self.Pions],
+            decDescriptors=self.Xic2LambdaKPi
+        )
+
+        # Build selection for Xic -> L pi K
+        self.selXic2LambdaPiK = self.makeHc2V02H(
+            name=self.Xic2LambdaPiK_name,
+            inputSelLL=[self.Lambda0LL, self.Kaons, self.Pions],
+            inputSelDD=[self.Lambda0DD, self.Kaons, self.Pions],
+            decDescriptors=self.Xic2LambdaPiK
+        )
+
+        # Make line for Xic -> L pi pi
+        self.line_Xic2LambdaPiPiLL = self.make_line(
+            name='{0}LLLine'.format(self.Xic2LambdaPiPi_name),
+            selection=self.selXic2LambdaPiPi[0],
+            prescale=config['PrescaleXic2LambdaPiPiLL'],
+            postscale=config['PostscaleXic2LambdaPiPiLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Xic2LambdaPiPiDD = self.make_line(
+            name='{0}DDLine'.format(self.Xic2LambdaPiPi_name),
+            selection=self.selXic2LambdaPiPi[1],
+            prescale=config['PrescaleXic2LambdaPiPiDD'],
+            postscale=config['PostscaleXic2LambdaPiPiDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        # Make line for Xic -> L K K
+        self.line_Xic2LambdaKKLL = self.make_line(
+            name='{0}LLLine'.format(self.Xic2LambdaKK_name),
+            selection=self.selXic2LambdaKK[0],
+            prescale=config['PrescaleXic2LambdaKKLL'],
+            postscale=config['PostscaleXic2LambdaKKLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Xic2LambdaKKDD = self.make_line(
+            name='{0}DDLine'.format(self.Xic2LambdaKK_name),
+            selection=self.selXic2LambdaKK[1],
+            prescale=config['PrescaleXic2LambdaKKDD'],
+            postscale=config['PostscaleXic2LambdaKKDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        # Make line for Xic -> L K pi
+        self.line_Xic2LambdaKPiLL = self.make_line(
+            name='{0}LLLine'.format(self.Xic2LambdaKPi_name),
+            selection=self.selXic2LambdaKPi[0],
+            prescale=config['PrescaleXic2LambdaKPiLL'],
+            postscale=config['PostscaleXic2LambdaKPiLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Xic2LambdaKPiDD = self.make_line(
+            name='{0}DDLine'.format(self.Xic2LambdaKPi_name),
+            selection=self.selXic2LambdaKPi[1],
+            prescale=config['PrescaleXic2LambdaKPiDD'],
+            postscale=config['PostscaleXic2LambdaKPiDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        # Make line for Xic -> L pi K
+        self.line_Xic2LambdaPiKLL = self.make_line(
+            name='{0}LLLine'.format(self.Xic2LambdaPiK_name),
+            selection=self.selXic2LambdaPiK[0],
+            prescale=config['PrescaleXic2LambdaPiKLL'],
+            postscale=config['PostscaleXic2LambdaPiKLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Xic2LambdaPiKDD = self.make_line(
+            name='{0}DDLine'.format(self.Xic2LambdaPiK_name),
+            selection=self.selXic2LambdaPiK[1],
+            prescale=config['PrescaleXic2LambdaPiKDD'],
+            postscale=config['PostscaleXic2LambdaPiKDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeHc2V02H(self, name, inputSelLL, inputSelDD, decDescriptors):
+        """Return two Selection instances for a Xi_c0 -> V0 h+ h+ h- decay.
+
+        The return value is a two-tuple of Selection instances as
+            (LL Selection, DD Selection)
+        where LL and DD are the method of reconstruction for the V0.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLL -- List of inputs passed to Selection.RequiredSelections
+                      for the LL Selection
+        inputSelDD -- List of inputs passed to Selection.RequiredSelections
+                      for the DD Selection
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        combCuts = (
+            "(ADAMASS('Xi_c0') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(2,3) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})"
+        ).format(self.config)
+
+        xicCuts_LL = (
+            "(VFASPF(VCHI2/VDOF) < {0[Xic_VCHI2VDOF_MAX_LL]})"
+            #"& ({0[Xic_PVDispCut_LL]})"
+            "& (BPVDIRA > cos({0[Xic_acosBPVDIRA_MAX_LL]}))"
+            "& (ADMASS('Xi_c0') < {0[Xic_ADMASS_WIN]})"
+            "& ((CHILD(VFASPF(VZ),1) - VFASPF(VZ)) > {0[LambdaMinFD_LL]})"
+            "& (P > {0[Xic_P_min]})"
+            "& (PT > {0[Xic_PT_min]})"
+        ).format(self.config)
+
+        xicCuts_DD = (
+            "(VFASPF(VCHI2/VDOF) < {0[Xic_VCHI2VDOF_MAX_DD]})"
+            #"& ({0[Xic_PVDispCut_DD]})"
+            "& (BPVDIRA > cos({0[Xic_acosBPVDIRA_MAX_DD]}))"
+            "& (ADMASS('Xi_c0') < {0[Xic_ADMASS_WIN]})"
+            "& ((CHILD(VFASPF(VZ),1) - VFASPF(VZ)) > {0[LambdaMinFD_DD]})"
+            "& (P > {0[Xic_P_min]})"
+            "& (PT > {0[Xic_PT_min]})"
+        ).format(self.config)
+
+        comb12Cuts = (
+            "(DAMASS('Xi_c0') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            ).format(self.config)
+
+        _Xic_LL = DaVinci__N3BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts_LL,
+            Combination12Cut=comb12Cuts,
+            )
+
+        _Xic_DD = DaVinci__N3BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts_DD,
+            Combination12Cut=comb12Cuts,
+            )
+
+        selLL = Selection(
+            '{0}LL'.format(name),
+            Algorithm=_Xic_LL,
+            RequiredSelections=inputSelLL
+        )
+        selDD = Selection(
+            '{0}DD'.format(name),
+            Algorithm=_Xic_DD,
+            RequiredSelections=inputSelDD
+        )
+        return selLL, selDD
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] ) 
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V03H.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V03H.py
new file mode 100644
index 000000000..d3888168f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V03H.py
@@ -0,0 +1,454 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of general decay topologies
+    [Lambda_c+ -> (V0 -> h+ h-) h+ h+ h-]CC
+In this file the stripping line for this decay is build
+    [Lambda_c+ -> (Lambda0 -> p+ pi-) pi+ pi+ pi-]CC
+    [Lambda_c+ -> (Lambda0 -> p+ pi-) K+ pi+ pi-]CC
+Throughout this file, 'Bachelor' refers to the children of the Lambda_c+ which is
+not part of the V0 decay.
+"""
+
+__author__ = ['Andrea Merli', 'Louis Henry']
+__date__ = '13/10/2017'
+
+__all__ = ('default_config', 'StrippingHc2V03HConf')
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop, DaVinci__N4BodyDecays
+from StandardParticles import StdAllLoosePions as InputPions
+from StandardParticles import StdAllLooseKaons as InputKaons
+from StandardParticles import StdVeryLooseLambdaLL as InputLambdasLL
+from StandardParticles import StdLooseLambdaDD as InputLambdasDD
+
+from PhysSelPython.Wrappers import Selection, MergedSelection, DataOnDemand
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME': 'Hc2V03H',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingHc2V03HConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum Lc+ bachelor momentum
+        'Bach_P_MIN': 2.0 * GeV,
+        # Minimum Lc+ bachelor transverse momentum
+        'Bach_PT_MIN': 150 * MeV,
+        # Minimum Lc+ bachelor IPCHI2
+        'Bach_IPCHI2_MIN': 1,
+        'Bach_IPCHI2_MAX': 9,
+        # PID of the Lambda proton
+        'ProbNNpMin_LL': 0.10,
+        'ProbNNpMin_DD': 0.0,
+        # Minimum L0 momentum
+        'Lambda0_P_MIN': 10000 * MeV,
+        # Minimum L0 transverse momentum
+        'Lambda0_PT_MIN': 500 * MeV,
+        # Minimum flight distance chi^2 of L0 from the primary vertex
+        'Lambda0_FDCHI2_MIN': 49,
+        # Minimum flight distance of L0 from the primary vertex
+        "LambdaMinFD_DD": 200. * mm,
+        "LambdaMinFD_LL": 25 * mm,
+        # Maximum L0 vertex chi^2 per vertex fit DoF
+        'Lambda0_VCHI2VDOF_MAX': 12.0,
+        # Lc+ mass window around the nominal Lc+ mass before the vertex fit
+        'Comb_ADAMASS_WIN': 90.0 * MeV,
+        # Lc+ mass window around the nominal Lc+ mass after the vertex fit
+        'Lambdac_ADMASS_WIN': 75.0 * MeV,
+        'Xic_ADMASS_WIN': 75.0 * MeV,
+        # Maximum distance of closest approach of Lc+ children
+        'Comb_ADOCAMAX_MAX': 0.5 * mm,
+        # Maximum Lc+ vertex chi^2 per vertex fit DoF
+        'Lambdac_VCHI2VDOF_MAX_LL': 3.0,
+        'Lambdac_VCHI2VDOF_MAX_DD': 3.0,
+        'Xic_VCHI2VDOF_MAX_LL': 3.0,
+        'Xic_VCHI2VDOF_MAX_DD': 3.0,
+        # Maximum logIPCHI2. The Lc+/Xic+ come from the PV
+        'Lambdac_logIPCHI2_MAX': 5.0,
+        'Xic_logIPCHI2_MAX': 5.0,
+        # Maximum angle between Lc+ momentum and Lc+ direction of flight
+        'Lambdac_acosBPVDIRA_MAX_DD': 45.0 * mrad,
+        'Lambdac_acosBPVDIRA_MAX_LL': 140.0 * mrad,
+        'Xic_acosBPVDIRA_MAX_DD': 45.0 * mrad,
+        'Xic_acosBPVDIRA_MAX_LL': 140.0 * mrad,
+        # Primary vertex displacement requirement, either that the Lc+ is some
+        # sigma away from the PV, or it has a minimum flight time
+        'Lambdac_PVDispCut_LL': '(BPVVDCHI2 > 16.0)',
+        'Lambdac_PVDispCut_DD': '(BPVVDCHI2 > 9.0)',
+        'Xic_PVDispCut_LL': '(BPVVDCHI2 > 16.0)',
+        'Xic_PVDispCut_DD': '(BPVVDCHI2 > 9.0)',
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleLambdac2Lambda3PiLL': 1.0,
+        'PrescaleLambdac2Lambda3PiDD': 1.0,
+        'PrescaleLambdac2LambdaK2PiLL': 1.0,
+        'PrescaleLambdac2LambdaK2PiDD': 1.0,
+        'PrescaleXic2LambdaK2PiLL': 1.0,
+        'PrescaleXic2LambdaK2PiDD': 1.0,
+        # Fraction of candidates to randomly throw away after stripping
+        'PostscaleLambdac2Lambda3PiLL': 1.0,
+        'PostscaleLambdac2Lambda3PiDD': 1.0,
+        'PostscaleLambdac2LambdaK2PiLL': 1.0,
+        'PostscaleLambdac2LambdaK2PiDD': 1.0,
+        'PostscaleXic2LambdaK2PiLL': 1.0,
+        'PostscaleXic2LambdaK2PiDD': 1.0,
+    }
+}
+
+
+class StrippingHc2V03HConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        # Decay descriptors
+        self.Lambdac2Lambda3Pi = ['[Lambda_c+ -> Lambda0 pi+ pi+ pi-]cc']
+        self.Lambdac2LambdaK2Pi = ['[Lambda_c+ -> Lambda0 K+ pi+ pi-]cc']
+        self.Xic2LambdaK2Pi = ['[Xi_c+     -> Lambda0 K- pi+ pi+]cc']
+
+        # Line names
+        # 'LL' and 'DD' will be appended to these names for the LL and DD
+        # Selection and StrippingLine instances
+        self.Lambdac2Lambda3Pi_name = '{0}_Lambdac2Lambda3Pi'.format(name)
+        self.Lambdac2LambdaK2Pi_name = '{0}_Lambdac2LambdaK2Pi'.format(name)
+        self.Xic2LambdaK2Pi_name = '{0}_Xic2LambdaK2Pi'.format(name)
+
+        # Build bachelor pion and kaon cut strings
+        childCuts = ('(P > {0[Bach_P_MIN]})').format(self.config)
+
+        kineticCuts = '{0}'.format(childCuts)
+
+        # Build Lambda0 cut strings
+        lambda0Cuts = (
+            '(P > {0[Lambda0_P_MIN]})'
+            '& (PT > {0[Lambda0_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[Lambda0_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Lambda0_VCHI2VDOF_MAX]})').format(
+                self.config)
+        # Define any additional cuts on LL/DD difference
+        lambda0DDCuts = lambda0Cuts
+        lambda0LLCuts = lambda0Cuts
+
+        # Filter Input particles
+        self.Pions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(Code=kineticCuts),
+            RequiredSelections=[InputPions])
+
+        self.Kaons = Selection(
+            'KaonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(Code=kineticCuts),
+            RequiredSelections=[InputKaons])
+
+        # Filter Input Lambdas
+        self.LambdaListLooseDD = MergedSelection(
+            "StdLooseDDLambdaFor" + self.name,
+            RequiredSelections=[
+                DataOnDemand(Location="Phys/StdLooseLambdaDD/Particles")
+            ])
+
+        self.LambdaListLooseLL = MergedSelection(
+            "StdLooseLLLambdaFor" + self.name,
+            RequiredSelections=[
+                DataOnDemand(Location="Phys/StdVeryLooseLambdaLL/Particles")
+            ])
+
+        self.LambdaListLL = self.createSubSel(
+            OutputList="LambdaLLFor" + self.name,
+            InputList=self.LambdaListLooseLL,
+            Cuts="(MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMin_LL)s ) " %
+            self.config)
+
+        self.LambdaListDD = self.createSubSel(
+            OutputList="LambdaDDFor" + self.name,
+            InputList=self.LambdaListLooseDD,
+            Cuts="(MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMin_DD)s ) " %
+            self.config)
+
+        self.Lambda0LL = Selection(
+            'Lambda0LLFor{0}'.format(name),
+            Algorithm=FilterDesktop(Code=lambda0LLCuts),
+            RequiredSelections=[self.LambdaListLL])
+        self.Lambda0DD = Selection(
+            'Lambda0DDFor{0}'.format(name),
+            Algorithm=FilterDesktop(Code=lambda0DDCuts),
+            RequiredSelections=[self.LambdaListDD])
+
+        # Build selection for Lc -> L 3pi
+        self.selLambdac2Lambda3Pi = self.makeLambdac2V03H(
+            name=self.Lambdac2Lambda3Pi_name,
+            inputSelLL=[self.Lambda0LL, self.Pions],
+            inputSelDD=[self.Lambda0DD, self.Pions],
+            decDescriptors=self.Lambdac2Lambda3Pi)
+
+        # Build selection for Lc -> L K 2pi
+        self.selLambdac2LambdaK2Pi = self.makeLambdac2V03H(
+            name=self.Lambdac2LambdaK2Pi_name,
+            inputSelLL=[self.Lambda0LL, self.Kaons, self.Pions],
+            inputSelDD=[self.Lambda0DD, self.Kaons, self.Pions],
+            decDescriptors=self.Lambdac2LambdaK2Pi)
+
+        # Build selection for Lc -> L K 2pi
+        self.selXic2LambdaK2Pi = self.makeXic2V03H(
+            name=self.Xic2LambdaK2Pi_name,
+            inputSelLL=[self.Lambda0LL, self.Kaons, self.Pions],
+            inputSelDD=[self.Lambda0DD, self.Kaons, self.Pions],
+            decDescriptors=self.Xic2LambdaK2Pi)
+
+        # Make line for Lc -> L 3pi
+        self.line_Lambdac2Lambda3PiLL = self.make_line(
+            name='{0}LLLine'.format(self.Lambdac2Lambda3Pi_name),
+            selection=self.selLambdac2Lambda3Pi[0],
+            prescale=config['PrescaleLambdac2Lambda3PiLL'],
+            postscale=config['PostscaleLambdac2Lambda3PiLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter'])
+        self.line_Lambdac2Lambda3PiDD = self.make_line(
+            name='{0}DDLine'.format(self.Lambdac2Lambda3Pi_name),
+            selection=self.selLambdac2Lambda3Pi[1],
+            prescale=config['PrescaleLambdac2Lambda3PiDD'],
+            postscale=config['PostscaleLambdac2Lambda3PiDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter'])
+
+        # Make line for Lc -> L K 2pi
+        self.line_Lambdac2LambdaK2PiLL = self.make_line(
+            name='{0}LLLine'.format(self.Lambdac2LambdaK2Pi_name),
+            selection=self.selLambdac2LambdaK2Pi[0],
+            prescale=config['PrescaleLambdac2LambdaK2PiLL'],
+            postscale=config['PostscaleLambdac2LambdaK2PiLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter'])
+        self.line_Lambdac2LambdaK2PiDD = self.make_line(
+            name='{0}DDLine'.format(self.Lambdac2LambdaK2Pi_name),
+            selection=self.selLambdac2LambdaK2Pi[1],
+            prescale=config['PrescaleLambdac2LambdaK2PiDD'],
+            postscale=config['PostscaleLambdac2LambdaK2PiDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter'])
+
+        # Make line for Xic -> L K 2pi
+        self.line_Xic2LambdaK2PiLL = self.make_line(
+            name='{0}LLLine'.format(self.Xic2LambdaK2Pi_name),
+            selection=self.selXic2LambdaK2Pi[0],
+            prescale=config['PrescaleXic2LambdaK2PiLL'],
+            postscale=config['PostscaleXic2LambdaK2PiLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter'])
+        self.line_Xic2LambdaK2PiDD = self.make_line(
+            name='{0}DDLine'.format(self.Xic2LambdaK2Pi_name),
+            selection=self.selXic2LambdaK2Pi[1],
+            prescale=config['PrescaleXic2LambdaK2PiDD'],
+            postscale=config['PostscaleXic2LambdaK2PiDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter'])
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs)
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeLambdac2V03H(self, name, inputSelLL, inputSelDD, decDescriptors):
+        """Return two Selection instances for a Lambda_c+ -> V0 h+ h+ h- decay.
+
+        The return value is a two-tuple of Selection instances as
+            (LL Selection, DD Selection)
+        where LL and DD are the method of reconstruction for the V0.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLL -- List of inputs passed to Selection.RequiredSelections
+                      for the LL Selection
+        inputSelDD -- List of inputs passed to Selection.RequiredSelections
+                      for the DD Selection
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = ['from math import cos']
+
+        combCuts = ("(ADAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+                    "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+                    "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})"
+                    "& (ADOCA(1,4) < {0[Comb_ADOCAMAX_MAX]})").format(
+                        self.config)
+
+        lambdacCuts_LL = (
+            "(VFASPF(VCHI2/VDOF) < {0[Lambdac_VCHI2VDOF_MAX_LL]})"
+            "& ({0[Lambdac_PVDispCut_LL]})"
+            "& (BPVDIRA > cos({0[Lambdac_acosBPVDIRA_MAX_LL]}))"
+            "& (ADMASS('Lambda_c+') < {0[Lambdac_ADMASS_WIN]})"
+            "& ((CHILD(VFASPF(VZ),1) - VFASPF(VZ)) > {0[LambdaMinFD_LL]})"
+            "& (min(CHILD(PT,2), CHILD(PT,3), CHILD(PT,4)) > {0[Bach_PT_MIN]})"
+            "& (min(CHILD(MIPCHI2DV(PRIMARY),2), CHILD(MIPCHI2DV(PRIMARY),3), CHILD(MIPCHI2DV(PRIMARY),4)) > {0[Bach_IPCHI2_MIN]})"
+            "& (max(CHILD(MIPCHI2DV(PRIMARY),2), CHILD(MIPCHI2DV(PRIMARY),3), CHILD(MIPCHI2DV(PRIMARY),4)) > {0[Bach_IPCHI2_MAX]})"
+            "& (log(MIPCHI2DV(PRIMARY)) < {0[Lambdac_logIPCHI2_MAX]})").format(
+                self.config)
+
+        lambdacCuts_DD = (
+            "(VFASPF(VCHI2/VDOF) < {0[Lambdac_VCHI2VDOF_MAX_DD]})"
+            "& ({0[Lambdac_PVDispCut_DD]})"
+            "& (BPVDIRA > cos({0[Lambdac_acosBPVDIRA_MAX_DD]}))"
+            "& (ADMASS('Lambda_c+') < {0[Lambdac_ADMASS_WIN]})"
+            "& ((CHILD(VFASPF(VZ),1) - VFASPF(VZ)) > {0[LambdaMinFD_DD]})"
+            "& (min(CHILD(PT,2), CHILD(PT,3), CHILD(PT,4)) > {0[Bach_PT_MIN]})"
+            "& (min(CHILD(MIPCHI2DV(PRIMARY),2), CHILD(MIPCHI2DV(PRIMARY),3), CHILD(MIPCHI2DV(PRIMARY),4)) > {0[Bach_IPCHI2_MIN]})"
+            "& (max(CHILD(MIPCHI2DV(PRIMARY),2), CHILD(MIPCHI2DV(PRIMARY),3), CHILD(MIPCHI2DV(PRIMARY),4)) > {0[Bach_IPCHI2_MAX]})"
+            "& (log(MIPCHI2DV(PRIMARY)) < {0[Lambdac_logIPCHI2_MAX]})").format(
+                self.config)
+
+        comb12Cuts = ("(DAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+                      "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})").format(
+                          self.config)
+
+        comb123Cuts = ("(DAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+                       "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+                       "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})").format(
+                           self.config)
+
+        _Lambdac_LL = DaVinci__N4BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=lambdacCuts_LL,
+            Combination12Cut=comb12Cuts,
+            Combination123Cut=comb123Cuts)
+
+        _Lambdac_DD = DaVinci__N4BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=lambdacCuts_DD,
+            Combination12Cut=comb12Cuts,
+            Combination123Cut=comb123Cuts)
+
+        selLL = Selection(
+            '{0}LL'.format(name),
+            Algorithm=_Lambdac_LL,
+            RequiredSelections=inputSelLL)
+        selDD = Selection(
+            '{0}DD'.format(name),
+            Algorithm=_Lambdac_DD,
+            RequiredSelections=inputSelDD)
+        return selLL, selDD
+
+    def makeXic2V03H(self, name, inputSelLL, inputSelDD, decDescriptors):
+        """Return two Selection instances for a Lambda_c+ -> V0 h+ h+ h- decay.
+
+        The return value is a two-tuple of Selection instances as
+            (LL Selection, DD Selection)
+        where LL and DD are the method of reconstruction for the V0.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLL -- List of inputs passed to Selection.RequiredSelections
+                      for the LL Selection
+        inputSelDD -- List of inputs passed to Selection.RequiredSelections
+                      for the DD Selection
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = ['from math import cos']
+
+        combCuts = ("(ADAMASS('Xi_c+') < {0[Comb_ADAMASS_WIN]})"
+                    "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+                    "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})"
+                    "& (ADOCA(1,4) < {0[Comb_ADOCAMAX_MAX]})").format(
+                        self.config)
+
+        xicCuts_LL = (
+            "(VFASPF(VCHI2/VDOF) < {0[Xic_VCHI2VDOF_MAX_LL]})"
+            "& ({0[Xic_PVDispCut_LL]})"
+            "& (BPVDIRA > cos({0[Xic_acosBPVDIRA_MAX_LL]}))"
+            "& (ADMASS('Xi_c+') < {0[Xic_ADMASS_WIN]})"
+            "& ((CHILD(VFASPF(VZ),1) - VFASPF(VZ)) > {0[LambdaMinFD_LL]})"
+            "& (min(CHILD(PT,2), CHILD(PT,3), CHILD(PT,4)) > {0[Bach_PT_MIN]})"
+            "& (min(CHILD(MIPCHI2DV(PRIMARY),2), CHILD(MIPCHI2DV(PRIMARY),3), CHILD(MIPCHI2DV(PRIMARY),4)) > {0[Bach_IPCHI2_MIN]})"
+            "& (max(CHILD(MIPCHI2DV(PRIMARY),2), CHILD(MIPCHI2DV(PRIMARY),3), CHILD(MIPCHI2DV(PRIMARY),4)) > {0[Bach_IPCHI2_MAX]})"
+            "& (log(MIPCHI2DV(PRIMARY)) < {0[Xic_logIPCHI2_MAX]})").format(
+                self.config)
+
+        xicCuts_DD = (
+            "(VFASPF(VCHI2/VDOF) < {0[Xic_VCHI2VDOF_MAX_DD]})"
+            "& ({0[Xic_PVDispCut_DD]})"
+            "& (BPVDIRA > cos({0[Xic_acosBPVDIRA_MAX_DD]}))"
+            "& (ADMASS('Xi_c+') < {0[Xic_ADMASS_WIN]})"
+            "& ((CHILD(VFASPF(VZ),1) - VFASPF(VZ)) > {0[LambdaMinFD_DD]})"
+            "& (min(CHILD(PT,2), CHILD(PT,3), CHILD(PT,4)) > {0[Bach_PT_MIN]})"
+            "& (min(CHILD(MIPCHI2DV(PRIMARY),2), CHILD(MIPCHI2DV(PRIMARY),3), CHILD(MIPCHI2DV(PRIMARY),4)) > {0[Bach_IPCHI2_MIN]})"
+            "& (max(CHILD(MIPCHI2DV(PRIMARY),2), CHILD(MIPCHI2DV(PRIMARY),3), CHILD(MIPCHI2DV(PRIMARY),4)) > {0[Bach_IPCHI2_MAX]})"
+            "& (log(MIPCHI2DV(PRIMARY)) < {0[Xic_logIPCHI2_MAX]})").format(
+                self.config)
+
+        comb12Cuts = ("(DAMASS('Xi_c+') < {0[Comb_ADAMASS_WIN]})"
+                      "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})").format(
+                          self.config)
+
+        comb123Cuts = ("(DAMASS('Xi_c+') < {0[Comb_ADAMASS_WIN]})"
+                       "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+                       "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})").format(
+                           self.config)
+
+        _Xic_LL = DaVinci__N4BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts_LL,
+            Combination12Cut=comb12Cuts,
+            Combination123Cut=comb123Cuts)
+
+        _Xic_DD = DaVinci__N4BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts_DD,
+            Combination12Cut=comb12Cuts,
+            Combination123Cut=comb123Cuts)
+
+        selLL = Selection(
+            '{0}LL'.format(name),
+            Algorithm=_Xic_LL,
+            RequiredSelections=inputSelLL)
+        selDD = Selection(
+            '{0}DD'.format(name),
+            Algorithm=_Xic_DD,
+            RequiredSelections=inputSelDD)
+        return selLL, selDD
+
+    def createSubSel(self, OutputList, InputList, Cuts):
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code=Cuts)
+        return Selection(
+            OutputList, Algorithm=filter, RequiredSelections=[InputList])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V2H.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V2H.py
new file mode 100644
index 000000000..eed2a9e39
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V2H.py
@@ -0,0 +1,572 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of general decay topologies
+    [Lambda_c+ -> (V- -> (V0 -> h+ h-) h-) h+ h+]CC
+In this file the stripping line for this decay is build
+    [Lambda_c+ -> (Xi- -> (Lambda0 -> p+ pi-) pi-) K+ pi+]CC
+Throughout this file, 'Bachelor' refers to the children of the Lambda_c+ which is
+not part of the V- decay.
+"""
+__author__ = ['Andrea Merli','Louis Henry']
+__date__ = '13/10/2017'
+
+__all__ = (
+    'default_config',
+    'StrippingHc2V2HConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop, DaVinci__N3BodyDecays
+from StandardParticles import StdNoPIDsDownPions as InputDownPions
+from StandardParticles import StdNoPIDsPions as InputPions
+from StandardParticles import StdNoPIDsKaons as InputKaons
+from StandardParticles import StdLooseLambdaLL as InputLambdasLL
+from StandardParticles import StdLooseLambdaDD as InputLambdasDD
+
+from PhysSelPython.Wrappers import Selection, MergedSelection, DataOnDemand
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME': 'Hc2V2H',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingHc2V2HConf',
+    'STREAMS': ['CharmCompleteEvent'],
+    'CONFIG': {
+        # Minimum Lc+ bachelor momentum
+        'Bach_P_MIN': 2.0*GeV,
+        # PID of the Lambda proton
+        "ProbNNpMin_LL" : 0.10,
+        "ProbNNpMin_DD" : 0.0,
+        # Minimum L0 momentum
+        'Lambda0_P_MIN': 2000*MeV,
+        # Minimum L0 transverse momentum
+        'Lambda0_PT_MIN': 250*MeV,
+        # Minimum flight distance chi^2 of L0 from the primary vertex
+        'Lambda0_FDCHI2_MIN': 49,
+        # Minimum flight distance of L0 from the primary vertex
+        "LambdaMinFD_DD"  : 0.  *mm,
+        "LambdaMinFD_LL"  : 25  *mm,
+        # Maximum L0 vertex chi^2 per vertex fit DoF
+        'Lambda0_VCHI2VDOF_MAX': 12.0,
+        # Minimum Xi- momentum
+        'Xim_P_MIN': 2000*MeV,
+        # Minimum Xi- transverse momentum
+        'Xim_PT_MIN': 250*MeV,
+        # Minimum flight distance chi^2 of Xi- from the primary vertex
+        'Xim_FDCHI2_MIN': 16,
+        # Maximum Xi- vertex chi^2 per vertex fit DoF
+        'Xim_VCHI2VDOF_MAX': 12.0,
+        # Lc+ mass window around the nominal Lc+ mass before the vertex fit
+        'Comb_ADAMASS_WIN': 120.0*MeV,
+        # Lc+ mass window around the nominal Lc+ mass after the vertex fit
+        'Hc_ADMASS_WIN': 90.0*MeV,
+        # Maximum distance of closest approach of Lc+ children
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Maximum Lc+ vertex chi^2 per vertex fit DoF
+        'Hc_VCHI2VDOF_MAX_LLL': 12.0,
+        'Hc_VCHI2VDOF_MAX_DDL': 12.0,
+        'Hc_VCHI2VDOF_MAX_DDD': 12.0,
+        # Maximum angle between Lc+ momentum and Lc+ direction of flight
+        'Hc_acosBPVDIRA_MAX_LLL': 140.0*mrad,
+        'Hc_acosBPVDIRA_MAX_DDL':  45.0*mrad,
+        'Hc_acosBPVDIRA_MAX_DDD': 140.0*mrad,
+        # Primary vertex displacement requirement, either that the Lc+ is some
+        # sigma away from the PV, or it has a minimum flight time
+        'Hc_PVDispCut_LLL': '(BPVVDCHI2 > 16.0)',
+        'Hc_PVDispCut_DDL': '(BPVVDCHI2 > 16.0)',
+        'Hc_PVDispCut_DDD': '(BPVVDCHI2 >  9.0)',
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleLambdac2XiKPiLLL': 1.0,
+        'PrescaleLambdac2XiKPiDDD': 1.0,
+        'PrescaleLambdac2XiKPiDDL': 1.0,
+        'PrescaleXic2XiPiPiLLL': 1.0,
+        'PrescaleXic2XiPiPiDDD': 1.0,
+        'PrescaleXic2XiPiPiDDL': 1.0,
+        # Fraction of candidates to randomly throw away after stripping
+        'PostscaleLambdac2XiKPiLLL': 1.0,
+        'PostscaleLambdac2XiKPiDDD': 1.0,
+        'PostscaleLambdac2XiKPiDDL': 1.0,
+        'PostscaleXic2XiPiPiLLL': 1.0,
+        'PostscaleXic2XiPiPiDDD': 1.0,
+        'PostscaleXic2XiPiPiDDL': 1.0,
+        }
+    }
+
+
+class StrippingHc2V2HConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        # Decay descriptors
+        self.Lambdac2XiKpi = ['[Lambda_c+ -> Xi- K+ pi+]cc']
+        self.Xic2Xipipi    = ['[Xi_c+ -> Xi- pi+ pi+]cc']
+        self.Xi2Lambdapi = ['[Xi- -> Lambda0 pi-]cc']
+        # Line names
+        # 'LLL', 'DDD' and 'DDL' will be appended to these names for the LLL, DDD, DDL
+        # Selection and StrippingLine instances
+        self.Lambdac2XiKpi_name = '{0}_Lambdac2XiKpi'.format(name)
+        self.Xic2Xipipi_name     = '{0}_Xic2Xipipi'.format(name)
+        # Build bachelor pion and kaon cut strings
+        # Cuts MIPCHI2DV(PRIMARY)>4 & PT>250*MeV already present in the InputsParticles
+        childCuts = (
+            '(P > {0[Bach_P_MIN]})'
+        ).format(self.config)
+        
+        kineticCuts = '{0}'.format(childCuts)
+
+        # Build Lambda0 cut strings
+        lambda0Cuts = (
+            '(P > {0[Lambda0_P_MIN]})'
+            '& (PT > {0[Lambda0_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[Lambda0_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Lambda0_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+        ximCuts = (
+            '(P > {0[Xim_P_MIN]})'
+            '& (PT > {0[Xim_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[Xim_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Xim_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+        # Define any additional cuts on LL/DD difference
+        lambda0LLCuts = lambda0Cuts
+        lambda0DDCuts = lambda0Cuts
+        ximLLLCuts = ximCuts + ("& ((CHILD(VFASPF(VZ),1) - VFASPF(VZ)) > {0[LambdaMinFD_LL]})").format(self.config)        
+        ximDDDCuts = ximCuts
+        ximDDLCuts = ximCuts + ("& ((CHILD(VFASPF(VZ),1) - VFASPF(VZ)) > {0[LambdaMinFD_LL]})").format(self.config)
+        
+        # Filter Input particles
+        self.Pions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                 Code = kineticCuts
+            ),
+            RequiredSelections=[InputPions]
+        )
+
+        self.Kaons = Selection(
+            'KaonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                 Code = kineticCuts
+            ),
+            RequiredSelections=[InputKaons]
+        )
+
+        self.DownPions = Selection(
+            'DownPionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                 Code = kineticCuts
+            ),
+            RequiredSelections=[InputDownPions]
+        )
+        # Filter Input Lambdas
+        self.LambdaListLooseDD = MergedSelection("StdLooseDDLambdaFor" + self.name,
+                                                 RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")])
+        
+        self.LambdaListLooseLL = MergedSelection("StdLooseLLLambdaFor" + self.name,
+                                                 RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")])
+        
+        self.LambdaListLL =  self.createSubSel(OutputList = "LambdaLLFor" + self.name,
+                                               InputList = self.LambdaListLooseLL ,
+                                               Cuts = "(MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMin_LL)s ) " %self.config
+                                               )
+        
+        self.LambdaListDD =  self.createSubSel(OutputList = "LambdaDDFor" + self.name,
+                                               InputList = self.LambdaListLooseDD ,
+                                               Cuts = "(MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMin_DD)s ) " %self.config
+                                               )
+        
+        self.Lambda0LL = Selection(
+            'Lambda0LLFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code=lambda0LLCuts
+            ),
+            RequiredSelections=[self.LambdaListLL]
+        )
+        self.Lambda0DD = Selection(
+            'Lambda0DDFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code=lambda0DDCuts
+            ),
+            RequiredSelections=[self.LambdaListDD]
+        )
+
+        # Make Xim
+        self.Xim = self.makeXi2LambdaPi(
+            name = name,
+            inputSelLLL = [self.Lambda0LL,self.Pions],
+            inputSelDDD = [self.Lambda0DD,self.DownPions],
+            inputSelDDL = [self.Lambda0DD,self.Pions],
+            LLLFilter = ximLLLCuts,
+            DDLFilter = ximDDLCuts,
+            DDDFilter = ximDDDCuts,
+            decDescriptors=self.Xi2Lambdapi
+        )
+
+        # Build selection for Lc -> Xi K pi
+        self.selLambdac2XiKPi = self.makeLambdac2VHH(
+            name=self.Lambdac2XiKpi_name,
+            inputSelLLL=[self.Xim['LLL'],self.Kaons,self.Pions],
+            inputSelDDL=[self.Xim['DDL'],self.Kaons,self.Pions],
+            inputSelDDD=[self.Xim['DDD'],self.Kaons,self.Pions],
+            decDescriptors=self.Lambdac2XiKpi
+        )
+
+        # Build selection for Xic -> Xi pi pi
+        self.selXic2XiPiPi = self.makeXic2VHH(
+            name=self.Xic2Xipipi_name,
+            inputSelLLL=[self.Xim['LLL'],self.Kaons,self.Pions],
+            inputSelDDL=[self.Xim['DDL'],self.Kaons,self.Pions],
+            inputSelDDD=[self.Xim['DDD'],self.Kaons,self.Pions],
+            decDescriptors=self.Xic2Xipipi
+            )
+
+        # Make line for Lc -> Xi K pi
+        self.line_Lambdac2XiKPiLLL = self.make_line(
+            name='{0}LLLLine'.format(self.Lambdac2XiKpi_name),
+            selection=self.selLambdac2XiKPi['LLL'],
+            prescale=config['PrescaleLambdac2XiKPiLLL'],
+            postscale=config['PostscaleLambdac2XiKPiLLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Lambdac2XiKPiDDD = self.make_line(
+            name='{0}DDDLine'.format(self.Lambdac2XiKpi_name),
+            selection=self.selLambdac2XiKPi['DDD'],
+            prescale=config['PrescaleLambdac2XiKPiDDD'],
+            postscale=config['PostscaleLambdac2XiKPiDDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter'],
+            #RequiredRawEvents = ["Rich"]
+        )
+
+        self.line_Lambdac2XiKPiDDL = self.make_line(
+            name='{0}DDLLine'.format(self.Lambdac2XiKpi_name),
+            selection=self.selLambdac2XiKPi['DDL'],
+            prescale=config['PrescaleLambdac2XiKPiDDL'],
+            postscale=config['PostscaleLambdac2XiKPiDDL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        # Make line for Xic -> Xi pi pi
+        self.line_Xic2XiPiPiLLL = self.make_line(
+            name='{0}LLLLine'.format(self.Xic2Xipipi_name),
+            selection=self.selXic2XiPiPi['LLL'],
+            prescale=config['PrescaleXic2XiPiPiLLL'],
+            postscale=config['PostscaleXic2XiPiPiLLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Xic2XiPiPiDDD = self.make_line(
+            name='{0}DDDLine'.format(self.Xic2Xipipi_name),
+            selection=self.selXic2XiPiPi['DDD'],
+            prescale=config['PrescaleXic2XiPiPiDDD'],
+            postscale=config['PostscaleXic2XiPiPiDDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter'],
+            #RequiredRawEvents = ["Rich"]
+        )
+
+        self.line_Xic2XiPiPiDDL = self.make_line(
+            name='{0}DDLLine'.format(self.Xic2Xipipi_name),
+            selection=self.selXic2XiPiPi['DDL'],
+            prescale=config['PrescaleXic2XiPiPiDDL'],
+            postscale=config['PostscaleXic2XiPiPiDDL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeXi2LambdaPi(self, name, inputSelLLL, inputSelDDD, inputSelDDL, LLLFilter, DDDFilter, DDLFilter, decDescriptors):
+        """Return the dictionary for three Selection instances for a Xi- -> V0 h- decay.
+        The return value is a two-tuple of Selection instances as
+               {'LLL':LLL Selection, 'DDD':DDD Selection, 'DDL': DDL Selection}.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLLL -- List of inputs passed to Selection.RequiredSelections for the LLL Selection (LambdaLL and Pions Long)
+        inputSelDDD -- List of inputs passed to Selection.RequiredSelections for the DDD Selection (LambdaDD and Pions Downstream)
+        inputSelDDL -- List of inputs passed to Selection.RequiredSelections for the DDL Selection (LambdaDD and Pions Long)
+        decDescriptors -- List of decay descriptors for CombineParticles
+
+        The cuts are equal to LambdaDD and LambdaLL
+        """
+
+        # Xim StandardCuts as Lambda0 + Filters
+        _XimLLL = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts = {'pi+': '(P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)'},
+            CombinationCut = "(ADAMASS('Xi-')<50*MeV) & (ADOCACHI2CUT(30, ''))",
+            MotherCut = "(ADMASS('Xi-')<35*MeV) & (VFASPF(VCHI2)<30) & {0}".format(LLLFilter),
+        )
+
+        _XimDDL = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts = {'pi+': '(P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)'},
+            CombinationCut = "(ADAMASS('Xi-')<80*MeV) & (ADOCACHI2CUT(25, ''))",
+            MotherCut = "(ADMASS('Xi-')<64*MeV) & (VFASPF(VCHI2)<25) & {0}".format(DDLFilter),
+        )
+
+        _XimDDD = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts = {'pi+': '(P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)'},
+            CombinationCut = "(ADAMASS('Xi-')<80*MeV) & (ADOCACHI2CUT(25, ''))",
+            MotherCut = "(ADMASS('Xi-')<64*MeV) & (VFASPF(VCHI2)<25) & {0}".format(DDDFilter),
+        )
+
+        selXimLLL = Selection(
+            'XimLLLFor{0}'.format(name),
+            Algorithm=_XimLLL,
+            RequiredSelections=inputSelLLL
+        )
+        selXimDDL = Selection(
+            'XimDDLFor{0}'.format(name),
+            Algorithm=_XimDDL,
+            RequiredSelections=inputSelDDL
+        )
+        selXimDDD = Selection(
+            'XimDDDFor{0}'.format(name),
+            Algorithm=_XimDDD,
+            RequiredSelections=inputSelDDD
+        )
+        
+        return {'LLL':selXimLLL,'DDL':selXimDDL,'DDD':selXimDDD}
+
+    def makeLambdac2VHH(self, name, inputSelLLL, inputSelDDL, inputSelDDD, decDescriptors):
+        """Return two Selection instances for a Lambda_c+ -> V- h+ h+ decay.
+
+        The return value is a dictionary of Selection instances as
+            {'LLL': LLL Selection, 'DDD': DDD Selection, 'DDL': DDL Selection}
+        depending on how the V has been reconstructed.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLLL -- List of inputs passed to Selection.RequiredSelections
+                       for the LLL Selection
+        inputSelDDD -- List of inputs passed to Selection.RequiredSelections
+                       for the DDD Selection
+        inputSelDDL -- List of inputs passed to Selection.RequiredSelections
+                       for the DDL Selection
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        combCuts = (
+            "(ADAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})"
+        ).format(self.config)
+
+        lambdacCuts_LLL = (
+            "(VFASPF(VCHI2/VDOF) < {0[Hc_VCHI2VDOF_MAX_LLL]})"
+            "& ({0[Hc_PVDispCut_LLL]})"
+            "& (BPVDIRA > cos({0[Hc_acosBPVDIRA_MAX_LLL]}))"
+            "& (ADMASS('Lambda_c+') < {0[Hc_ADMASS_WIN]})"
+        ).format(self.config)
+
+        lambdacCuts_DDL = (
+            "(VFASPF(VCHI2/VDOF) < {0[Hc_VCHI2VDOF_MAX_DDL]})"
+            "& ({0[Hc_PVDispCut_DDL]})"
+            "& (BPVDIRA > cos({0[Hc_acosBPVDIRA_MAX_DDL]}))"
+            "& (ADMASS('Lambda_c+') < {0[Hc_ADMASS_WIN]})"
+        ).format(self.config)
+
+        lambdacCuts_DDD = (
+            "(VFASPF(VCHI2/VDOF) < {0[Hc_VCHI2VDOF_MAX_DDD]})"
+            "& ({0[Hc_PVDispCut_DDD]})"
+            "& (BPVDIRA > cos({0[Hc_acosBPVDIRA_MAX_DDD]}))"
+            "& (ADMASS('Lambda_c+') < {0[Hc_ADMASS_WIN]})"
+        ).format(self.config)
+
+        comb12Cuts = (
+            "(DAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            ).format(self.config)
+
+        _Lambdac_LLL = DaVinci__N3BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=lambdacCuts_LLL,
+            Combination12Cut=comb12Cuts,
+        )
+
+        _Lambdac_DDL = DaVinci__N3BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=lambdacCuts_DDL,
+            Combination12Cut=comb12Cuts,
+        )
+
+        _Lambdac_DDD = DaVinci__N3BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=lambdacCuts_DDD,
+            Combination12Cut=comb12Cuts,
+        )
+
+        selLLL = Selection(
+            '{0}LLL'.format(name),
+            Algorithm=_Lambdac_LLL,
+            RequiredSelections=inputSelLLL
+        )
+        selDDL = Selection(
+            '{0}DDL'.format(name),
+            Algorithm=_Lambdac_DDL,
+            RequiredSelections=inputSelDDL
+        )
+        selDDD = Selection(
+            '{0}DDD'.format(name),
+            Algorithm=_Lambdac_DDD,
+            RequiredSelections=inputSelDDD
+        )
+        
+        return {'LLL': selLLL, 'DDD': selDDD, 'DDL': selDDL}
+
+    def makeXic2VHH(self, name, inputSelLLL, inputSelDDL, inputSelDDD, decDescriptors):
+        """Return two Selection instances for a Xi_c+ -> V- h+ h+ decay.
+
+        The return value is a dictionary of Selection instances as
+            {'LLL': LLL Selection, 'DDD': DDD Selection, 'DDL': DDL Selection}
+        depending on how the V has been reconstructed.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLLL -- List of inputs passed to Selection.RequiredSelections
+                       for the LLL Selection
+        inputSelDDD -- List of inputs passed to Selection.RequiredSelections
+                       for the DDD Selection
+        inputSelDDL -- List of inputs passed to Selection.RequiredSelections
+                       for the DDL Selection
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        combCuts = (
+            "(ADAMASS('Xi_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})"
+        ).format(self.config)
+        
+        xicCuts_LLL = (
+            "(VFASPF(VCHI2/VDOF) < {0[Hc_VCHI2VDOF_MAX_LLL]})"
+            "& ({0[Hc_PVDispCut_LLL]})"
+            "& (BPVDIRA > cos({0[Hc_acosBPVDIRA_MAX_LLL]}))"
+            "& (ADMASS('Xi_c+') < {0[Hc_ADMASS_WIN]})"
+        ).format(self.config)
+
+        xicCuts_DDL = (
+            "(VFASPF(VCHI2/VDOF) < {0[Hc_VCHI2VDOF_MAX_DDL]})"
+            "& ({0[Hc_PVDispCut_DDL]})"
+            "& (BPVDIRA > cos({0[Hc_acosBPVDIRA_MAX_DDL]}))"
+            "& (ADMASS('Xi_c+') < {0[Hc_ADMASS_WIN]})"
+        ).format(self.config)
+
+        xicCuts_DDD = (
+            "(VFASPF(VCHI2/VDOF) < {0[Hc_VCHI2VDOF_MAX_DDD]})"
+            "& ({0[Hc_PVDispCut_DDD]})"
+            "& (BPVDIRA > cos({0[Hc_acosBPVDIRA_MAX_DDD]}))"
+            "& (ADMASS('Xi_c+') < {0[Hc_ADMASS_WIN]})"
+        ).format(self.config)
+
+        comb12Cuts = (
+            "(DAMASS('Xi_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            ).format(self.config)
+
+        _Xic_LLL = DaVinci__N3BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts_LLL,
+            Combination12Cut=comb12Cuts,
+        )
+
+        _Xic_DDL = DaVinci__N3BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts_DDL,
+            Combination12Cut=comb12Cuts,
+        )
+
+        _Xic_DDD = DaVinci__N3BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts_DDD,
+            Combination12Cut=comb12Cuts,
+        )
+
+        selLLL = Selection(
+            '{0}LLL'.format(name),
+            Algorithm=_Xic_LLL,
+            RequiredSelections=inputSelLLL
+        )
+        selDDL = Selection(
+            '{0}DDL'.format(name),
+            Algorithm=_Xic_DDL,
+            RequiredSelections=inputSelDDL
+        )
+        selDDD = Selection(
+            '{0}DDD'.format(name),
+            Algorithm=_Xic_DDD,
+            RequiredSelections=inputSelDDD
+        )
+        
+        return {'LLL': selLLL, 'DDD': selDDD, 'DDL': selDDL}
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] ) 
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V3H.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V3H.py
new file mode 100644
index 000000000..859d5c458
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingHc2V3H.py
@@ -0,0 +1,449 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of general decay topologies
+    [Lambda_c+ -> (V0 -> h+ h-) h+ h+ h-]CC
+In this file the stripping line for this decay is build 
+    [Lambda_c+ -> (Lambda0 -> p+ pi-) pi+ pi+ pi-]CC
+    [Lambda_c+ -> (Lambda0 -> p+ pi-) K+ pi+ pi-]CC
+Throughout this file, 'Bachelor' refers to the children of the Lambda_c+ which is
+not part of the V0 decay.
+"""
+
+__author__ = ['Louis Henry']
+__date__ = '13/10/2017'
+
+__all__ = (
+    'default_config',
+    'StrippingHc2V3HConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop, DaVinci__N4BodyDecays
+from StandardParticles import StdNoPIDsDownPions as InputDownPions
+from StandardParticles import StdNoPIDsPions as InputPions
+from StandardParticles import StdNoPIDsKaons as InputKaons
+from StandardParticles import StdLooseLambdaLL as InputLambdasLL
+from StandardParticles import StdLooseLambdaDD as InputLambdasDD
+
+from PhysSelPython.Wrappers import Selection, MergedSelection, DataOnDemand
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME': 'Hc2V3H',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingHc2V3HConf',
+    'STREAMS': ['CharmCompleteEvent'],
+    'CONFIG': {
+        # Minimum Lc+ bachelor momentum
+        'Bach_P_MIN': 2.0*GeV,
+        # PID of the Lambda proton
+        "ProbNNpMin_LL" : 0.10,
+        "ProbNNpMin_DD" : 0.00,
+        # Minimum L0 momentum
+        'Lambda0_P_MIN': 2000*MeV,
+        # Minimum L0 transverse momentum
+        'Lambda0_PT_MIN': 250*MeV,
+        # Minimum flight distance chi^2 of L0 from the primary vertex
+        'Lambda0_FDCHI2_MIN': 25,
+        # Maximum L0 vertex chi^2 per vertex fit DoF
+        'Lambda0_VCHI2VDOF_MAX': 12.0,
+        # Minimum Xi- momentum
+        'Xim_P_MIN': 2000*MeV,
+        # Minimum Xi- transverse momentum
+        'Xim_PT_MIN': 250*MeV,
+        # Minimum flight distance chi^2 of Xi- from the primary vertex
+        'Xim_FDCHI2_MIN': 9,
+        # Maximum Xi- vertex chi^2 per vertex fit DoF
+        'Xim_VCHI2VDOF_MAX': 12.0,
+        # Xi_c0 mass window around the nominal Xi_c0 mass before the vertex fit
+        'Comb_ADAMASS_WIN': 120.0*MeV,
+        # Xi_c0 mass window around the nominal Xi_c0 mass after the vertex fit
+        'Xic_ADMASS_WIN'    : 90.0*MeV,
+        # Maximum distance of closest approach of Xi_c0 children
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Maximum Xi_c0 vertex chi^2 per vertex fit DoF
+        'Xic_VCHI2VDOF_MAX_LLL'    : 5.0,
+        'Xic_VCHI2VDOF_MAX_DDL'    : 5.0,
+        'Xic_VCHI2VDOF_MAX_DDD'    : 5.0,
+        # Maximum angle between Xi_c0 momentum and Xi_c0 direction of flight
+        'Xic_acosBPVDIRA_MAX_LLL': 140.0*mrad,
+        'Xic_acosBPVDIRA_MAX_DDL': 140.0*mrad,
+        'Xic_acosBPVDIRA_MAX_DDD': 140.0*mrad,
+        # Primary vertex displacement requirement, either that the Xi_c0 is some
+        # sigma away from the PV, or it has a minimum flight time
+        'Xic_PVDispCut_LLL': '(BPVVDCHI2 > 16.0)',
+        'Xic_PVDispCut_DDL': '(BPVVDCHI2 > 9.0)',
+        'Xic_PVDispCut_DDD': '(BPVVDCHI2 > 9.0)',
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleXic2XimPiPiPiLLL': 1.0,
+        'PrescaleXic2XimPiPiPiDDL': 1.0,
+        'PrescaleXic2XimPiPiPiDDD': 1.0,
+        # Fraction of candidates to randomly throw away after stripping
+        'PostscaleXic2XimPiPiPiLLL': 1.0,
+        'PostscaleXic2XimPiPiPiDDL': 1.0,
+        'PostscaleXic2XimPiPiPiDDD': 1.0,
+    }
+}
+
+
+class StrippingHc2V3HConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        # Decay descriptors
+        self.Xic2XimPiPiPi     = ['[Xi_c0 -> Xi- pi+ pi- pi+]cc' ]
+        self.Xi2Lambdapi = ['[Xi- -> Lambda0 pi-]cc']
+        
+        # Line names
+        # 'LLL', 'DDL', and 'DDD' will be appended to these names for
+        # the corresponding selection and strippingLine instances
+        self.Xic2XimPiPiPi_name     = '{0}_Xic2XimPiPiPi'    .format(name)
+        
+        # Build bachelor pion and kaon cut strings
+        # Cuts MIPCHI2DV(PRIMARY)>4 & PT>250*MeV already present in the InputsParticles
+        childCuts = (
+            '(P > {0[Bach_P_MIN]})'
+        ).format(self.config)
+        
+        kineticCuts = '{0}'.format(childCuts)
+
+        # Build Lambda0 cut strings
+        lambda0Cuts = (
+            '(P > {0[Lambda0_P_MIN]})'
+            '& (PT > {0[Lambda0_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[Lambda0_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Lambda0_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+
+        # Build Xi- cut strings
+        ximCuts = (
+            '(P > {0[Xim_P_MIN]})'
+            '& (PT > {0[Xim_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[Xim_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Xim_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+
+        # Define any additional cuts on LL/DD difference
+        lambda0LLCuts = lambda0Cuts# +(" & (Lambda0_FD_ORIVX > {0[Lambda0_FD_LL_MIN]}])").format(self.config)
+        lambda0DDCuts = lambda0Cuts
+        ximLLLCuts = ximCuts
+        ximDDDCuts = ximCuts
+        ximDDLCuts = ximCuts
+
+        # Filter Input particles
+        self.Pions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                 Code = kineticCuts
+            ),
+            RequiredSelections=[InputPions]
+        )
+
+        self.Kaons = Selection(
+            'KaonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                  Code = kineticCuts
+            ),
+            RequiredSelections=[InputKaons]
+        )
+        self.DownPions = Selection(
+            'DownPionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code = kineticCuts
+                ),
+            RequiredSelections=[InputDownPions]
+        )
+
+        # Filter Input Lambdas
+        self.LambdaListLooseDD = MergedSelection("StdLooseDDLambdaFor" + self.name,
+                                                 RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")])
+        
+        self.LambdaListLooseLL = MergedSelection("StdLooseLLLambdaFor" + self.name,
+                                                 RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")])
+        
+        self.LambdaListLL =  self.createSubSel(OutputList = "LambdaLLFor" + self.name,
+                                               InputList = self.LambdaListLooseLL ,
+                                               Cuts = "(MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMin_LL)s ) " %self.config
+                                               )
+        
+        self.LambdaListDD =  self.createSubSel(OutputList = "LambdaDDFor" + self.name,
+                                               InputList = self.LambdaListLooseDD ,
+                                               Cuts = "(MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMin_DD)s ) " %self.config
+                                               )
+        
+        self.Lambda0LL = Selection(
+            'Lambda0LLFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code=lambda0LLCuts
+            ),
+            RequiredSelections=[self.LambdaListLL]
+        )
+        self.Lambda0DD = Selection(
+            'Lambda0DDFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code=lambda0DDCuts
+            ),
+            RequiredSelections=[self.LambdaListDD]
+        )
+
+        # Make Xim
+        self.Xim = self.makeXi2LambdaPi(
+            name = name,
+            inputSelLLL = [self.LambdaListLL,self.Pions],
+            inputSelDDL = [self.LambdaListDD,self.Pions],
+            inputSelDDD = [self.LambdaListDD,self.DownPions],
+            LLLFilter = ximLLLCuts,
+            DDLFilter = ximDDLCuts,
+            DDDFilter = ximDDDCuts,
+            decDescriptors=self.Xi2Lambdapi
+        )
+
+
+        # Build selection for Xic -> Xi- 3pi
+        self.selXic2XimPiPiPi = self.makeXic2V3H(
+            name=self.Xic2XimPiPiPi_name,
+            inputSelLLL=[self.Xim["LLL"], self.Pions],
+            inputSelDDL=[self.Xim["DDL"], self.Pions],
+            inputSelDDD=[self.Xim["DDD"], self.Pions],
+            decDescriptors=self.Xic2XimPiPiPi
+        )
+
+        # Make line for Xic -> Xi- 3pi
+        self.line_Xic2XimPiPiPiLLL = self.make_line(
+            name='{0}LLLLine'.format(self.Xic2XimPiPiPi_name),
+            selection=self.selXic2XimPiPiPi[0],
+            prescale=config['PrescaleXic2XimPiPiPiLLL'],
+            postscale=config['PostscaleXic2XimPiPiPiLLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Xic2XimPiPiPiDDL = self.make_line(
+            name='{0}DDLLine'.format(self.Xic2XimPiPiPi_name),
+            selection=self.selXic2XimPiPiPi[1],
+            prescale=config['PrescaleXic2XimPiPiPiDDL'],
+            postscale=config['PostscaleXic2XimPiPiPiDDL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Xic2XimPiPiPiDDD = self.make_line(
+            name='{0}DDDLine'.format(self.Xic2XimPiPiPi_name),
+            selection=self.selXic2XimPiPiPi[2],
+            prescale=config['PrescaleXic2XimPiPiPiDDD'],
+            postscale=config['PostscaleXic2XimPiPiPiDDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeXi2LambdaPi(self, name, inputSelLLL, inputSelDDL, inputSelDDD, LLLFilter, DDLFilter, DDDFilter, decDescriptors):
+        """Return the dictionary for three Selection instances for a Xi- -> V0 h- decay.
+        The return value is a two-tuple of Selection instances as
+               {'LLL':LLL Selection, 'DDD':DDD Selection, 'DDL': DDL Selection}.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLLL -- List of inputs passed to Selection.RequiredSelections for the LLL Selection (LambdaLL and Pions Long)
+        inputSelDDD -- List of inputs passed to Selection.RequiredSelections for the DDD Selection (LambdaDD and Pions Downstream)
+        inputSelDDL -- List of inputs passed to Selection.RequiredSelections for the DDL Selection (LambdaDD and Pions Long)
+        decDescriptors -- List of decay descriptors for CombineParticles
+
+        The cuts are equal to LambdaDD and LambdaLL
+        """
+
+        # Xim StandardCuts as Lambda0 + Filters
+        _XimLLL = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts = {'pi+': '(P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)'},
+            CombinationCut = "(ADAMASS('Xi-')<50*MeV) & (ADOCACHI2CUT(30, ''))",
+            MotherCut = "(ADMASS('Xi-')<35*MeV) & (VFASPF(VCHI2)<30) & {0}".format(LLLFilter),
+        )
+
+        _XimDDL = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts = {'pi+': '(P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)'},
+            CombinationCut = "(ADAMASS('Xi-')<80*MeV) & (ADOCACHI2CUT(25, ''))",
+            MotherCut = "(ADMASS('Xi-')<64*MeV) & (VFASPF(VCHI2)<25) & {0}".format(DDLFilter),
+        )
+
+        _XimDDD = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts = {'pi+': '(P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)'},
+            CombinationCut = "(ADAMASS('Xi-')<80*MeV) & (ADOCACHI2CUT(25, ''))",
+            MotherCut = "(ADMASS('Xi-')<64*MeV) & (VFASPF(VCHI2)<25) & {0}".format(DDDFilter),
+        )
+
+        selXimLLL = Selection(
+            'XimLLLFor{0}'.format(name),
+            Algorithm=_XimLLL,
+            RequiredSelections=inputSelLLL
+        )
+        selXimDDL = Selection(
+            'XimDDLFor{0}'.format(name),
+            Algorithm=_XimDDL,
+            RequiredSelections=inputSelDDL
+        )
+        selXimDDD = Selection(
+            'XimDDDFor{0}'.format(name),
+            Algorithm=_XimDDD,
+            RequiredSelections=inputSelDDD
+        )
+        
+        return {'LLL':selXimLLL,'DDL':selXimDDL,'DDD':selXimDDD}
+
+    def makeXic2V3H(self, name, inputSelLLL, inputSelDDL, inputSelDDD, decDescriptors):
+        """Return two Selection instances for a Xi_c0 -> V- h+ h- h+ decay.
+
+        The return value is a three-tuple of Selection instances as
+        (LLL Selection, DDL selection, DDD Selection)
+        where LLL, DDL, and DDD are the method of reconstruction for the V-.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLLL -- List of inputs passed to Selection.RequiredSelections
+                      for the LLL Selection
+        inputSelDDL -- List of inputs passed to Selection.RequiredSelections
+                      for the DDL Selection
+        inputSelDDD -- List of inputs passed to Selection.RequiredSelections
+                      for the DDD Selection
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        combCuts = (
+            "(ADAMASS('Xi_c0') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(1,4) < {0[Comb_ADOCAMAX_MAX]})"
+            ).format(self.config)
+        
+        xicCuts_LLL = (
+            "(VFASPF(VCHI2/VDOF) < {0[Xic_VCHI2VDOF_MAX_LLL]})"
+            "& ({0[Xic_PVDispCut_LLL]})"
+            "& (BPVDIRA > cos({0[Xic_acosBPVDIRA_MAX_LLL]}))"
+            "& (ADMASS('Xi_c0') < {0[Xic_ADMASS_WIN]})"
+        ).format(self.config)
+
+        xicCuts_DDL = (
+            "(VFASPF(VCHI2/VDOF) < {0[Xic_VCHI2VDOF_MAX_DDL]})"
+            "& ({0[Xic_PVDispCut_DDL]})"
+            "& (BPVDIRA > cos({0[Xic_acosBPVDIRA_MAX_DDL]}))"
+            "& (ADMASS('Xi_c0') < {0[Xic_ADMASS_WIN]})"
+        ).format(self.config)
+
+        xicCuts_DDD = (
+            "(VFASPF(VCHI2/VDOF) < {0[Xic_VCHI2VDOF_MAX_DDD]})"
+            "& ({0[Xic_PVDispCut_DDD]})"
+            "& (BPVDIRA > cos({0[Xic_acosBPVDIRA_MAX_DDD]}))"
+            "& (ADMASS('Xi_c0') < {0[Xic_ADMASS_WIN]})"
+        ).format(self.config)
+
+        comb12Cuts = (
+            "(DAMASS('Xi_c0') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            ).format(self.config)
+
+        comb123Cuts = (
+            "(DAMASS('Xi_c0') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})"
+            ).format(self.config)
+
+        _Xic_LLL = DaVinci__N4BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts_LLL,
+            Combination12Cut=comb12Cuts,
+            Combination123Cut=comb123Cuts
+            )
+
+        _Xic_DDL = DaVinci__N4BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts_DDL,
+            Combination12Cut=comb12Cuts,
+            Combination123Cut=comb123Cuts
+            )
+
+        _Xic_DDD = DaVinci__N4BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts_DDD,
+            Combination12Cut=comb12Cuts,
+            Combination123Cut=comb123Cuts
+            )
+
+        selLLL = Selection(
+            '{0}LLL'.format(name),
+            Algorithm=_Xic_LLL,
+            RequiredSelections=inputSelLLL
+        )
+
+        selDDL = Selection(
+            '{0}DDL'.format(name),
+            Algorithm=_Xic_DDL,
+            RequiredSelections=inputSelDDL
+        )
+
+        selDDD = Selection(
+            '{0}DDD'.format(name),
+            Algorithm=_Xic_DDD,
+            RequiredSelections=inputSelDDD
+        )
+
+        return selLLL, selDDL, selDDD
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] ) 
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingKKPiPi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingKKPiPi.py
new file mode 100644
index 000000000..bd3d4fabf
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingKKPiPi.py
@@ -0,0 +1,114 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting [cs][ubar dbar] -> K+ K+ pi- pi-
+'''
+
+__author__=['Mengzhen Wang']
+__date__ = '10/10/2017'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'KKPiPiConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              :  'KKPiPi',
+    'BUILDERTYPE'       :  'KKPiPiConf',
+    'CONFIG'    : {
+
+        'DetachedKaonCuts'    : "(PROBNNk  > 0.4) & (PT > 250*MeV) & (TRGHOSTPROB<0.2) & (MIPCHI2DV(PRIMARY) > 4.)",
+        'DetachedPionCuts'      : "(PROBNNpi > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB<0.2) & (MIPCHI2DV(PRIMARY) > 4.)",
+        'DetachedComAMCuts'     : "AALL",
+        'DetachedComN4Cuts'     : "(AM > 1.0 *GeV) & (APT>3.0 *GeV)",
+        'DetachedMomN4Cuts'     : "(VFASPF(VCHI2/VDOF) < 9.) & (MM>1.5 *GeV) & (MM<3.0 *GeV) & (BPVDIRA>0.9995)",
+
+        'Prescale'      : 1.
+        },
+    'STREAMS'           : ['Charm' ],
+    'WGs'               : ['Charm'],
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+class KKPiPiConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+        """
+        Detached [cs][ubar dbar] -> K+ K+ pi- pi-
+        """
+
+        self.SelDetachedKaons = self.createSubSel( OutputList = self.name + "SelDetachedKaons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllNoPIDsKaons/Particles' ), 
+                                           Cuts = config['DetachedKaonCuts']
+                                           )
+        self.SelDetachedPions = self.createSubSel( OutputList = self.name + "DetachedSelPions",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllNoPIDsPions/Particles' ), 
+                                           Cuts = config['DetachedPionCuts']
+                                           )
+        self.SelDetached2KKPiPi = self.createN4BodySel( OutputList = self.name + "SelDetached2KKPiPi",
+                                                     DaughterLists = [ self.SelDetachedKaons, self.SelDetachedPions ],
+                                                     DecayDescriptor = "h_c(1P) -> K+ K+ pi- pi-",
+                                                     ComAMCuts      = config['DetachedComAMCuts'],
+                                                     PreVertexCuts  = config['DetachedComN4Cuts'], 
+                                                     PostVertexCuts = config['DetachedMomN4Cuts']
+                                                     )
+        self.Detached2KKPiPiLine = StrippingLine( self.name + 'DetachedLine',                                                
+                                               prescale  = config['Prescale'],                                               
+                                               algos     = [ self.SelDetached2KKPiPi ],
+                                               MDSTFlag  = False
+                                               )
+        self.registerLine( self.Detached2KKPiPiLine )
+
+
+        
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+    
+    def createN4BodySel( self, OutputList,
+                         DecayDescriptor,
+                         DaughterLists,
+                         DaughterCuts = {} ,
+                         ComAMCuts      = "AALL",
+                         PreVertexCuts  = "AALL",
+                         PostVertexCuts = "ALL" ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = DaVinci__N4BodyDecays ( DecayDescriptor = DecayDescriptor,      
+                                           DaughtersCuts = DaughterCuts,
+                                           Combination12Cut  = ComAMCuts + "&" + "( ACHI2DOCA(1,2)<15 )",
+                                           Combination123Cut = ComAMCuts + "&" + "( ACHI2DOCA(1,3)<15 ) & ( ACHI2DOCA(2,3)<15 )",
+                                           CombinationCut = "( ACHI2DOCA(1,4)<15 ) & ( ACHI2DOCA(2,4)<15 ) & ( ACHI2DOCA(3,4)<15 )" + " & " + PreVertexCuts,
+                                           MotherCut = PostVertexCuts,
+                                           ReFitPVs = False )
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2PHHForXSec.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2PHHForXSec.py
new file mode 100644
index 000000000..bf8210608
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2PHHForXSec.py
@@ -0,0 +1,435 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of
+    [Lambda_c+ -> p+ K- pi+]cc
+    [Lambda_c+ -> p+ K- K+]cc
+    [Lambda_c+ -> p+ pi- pi+]cc
+    [Lambda_c+ -> p+ pi- K+]cc
+and
+    [Sigma_c0 -> (Lambda_c+ -> p+ K- pi+) pi-]cc
+    [Sigma_c++ -> (Lambda_c+ -> p+ K- pi+) pi+]cc
+for open charm cross section measurement.
+"""
+
+__author__ = ['Alex Pearce']
+
+__all__ = (
+    'default_config',
+    'StrippingLambdac2PHHForXSecConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from Configurables import CombineParticles, FilterDesktop
+from StandardParticles import (
+    StdAllNoPIDsProtons,
+    StdAllNoPIDsKaons,
+    StdAllNoPIDsPions
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+from MVADictHelpers import addTMVAclassifierValue
+
+default_config = {
+    'NAME': 'Lambdac2PHHForXSec',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingLambdac2PHHForXSecConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum transverse momentum all Lc+ daughters must satisfy
+        'Daug_All_PT_MIN': 200.0*MeV,
+        # Minimum transverse momentum at least 2 Lc+ daughters must satisfy
+        'Daug_2of3_PT_MIN': 400.0*MeV,
+        # Minimum transverse momentum at least 1 Lc+ daughter must satisfy
+        'Daug_1of3_PT_MIN': 1000.0*MeV,
+        # Minimum best primary vertex IP chi^2 all Lc+ daughters must satisfy
+        'Daug_All_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 2 Lc+ daughters must satisfy
+        'Daug_2of3_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 1 Lc+ daughter must satisfy
+        'Daug_1of3_BPVIPCHI2_MIN': 6.0,
+        # Minimum Lc+ daughter momentum
+        'Daug_P_MIN': 3.0*GeV,
+        # Maximum Lc+ daughter momentum
+        'Daug_P_MAX': 100.0*GeV,
+        # Minimum Lc+ daughter pseudorapidity
+        'Daug_ETA_MIN': 2.0,
+        # Maximum Lc+ daughter pseudorapidity
+        'Daug_ETA_MAX': 5.0,
+        # Minimum Lc+ daughter proton DLLp
+        'Proton_PIDpPIDpi_MIN': 10.0,
+        # Minimum Lc+ daughter proton DLLp - DLLK
+        'Proton_PIDpPIDK_MIN': 5.0,
+        # Minimum Lc+ daughter kaon DLLK
+        'K_PIDK_MIN': 5.0,
+        # Maximum Lc+ daughter pion DLLK
+        'Pi_PIDK_MAX': 3.0,
+        # Lc+ mass window around the nominal Lc+ mass before the vertex fit
+        'Comb_ADAMASS_WIN': 90.0*MeV,
+        # Maximum distance of closest approach of Lc+ daughters
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Maximum Lc+ vertex chi^2 per vertex fit DoF
+        'Lambdac_VCHI2VDOF_MAX': 25.0,
+        # Maximum angle between Lc+ momentum and Lc+ direction of flight
+        'Lambdac_acosBPVDIRA_MAX': 35.0*mrad,
+        # Primary vertex displacement requirement, that the Lc+ is some sigma
+        # away from the PV and it has a minimum flight time
+        'Lambdac_PVDispCut': (
+            '((BPVVDCHI2 > 4.0) &'
+            '(BPVLTIME() > 0.075*picosecond))'
+        ),
+        # Maximum delta mass value m(Sigma_c) - m(Lambda_c+) (PDG dm: 167 MeV)
+        'Sigmac_AMDiff_MAX': 185.0*MeV,
+        # Maximum Sigma_c vertex chi^2 per vertex DoF
+        'Sigmac_VCHI2VDOF_MAX': 25.0,
+        # Minimum Lc+ MVA discriminant value
+        'Lambdac_MVA_MIN': -0.3,
+        # Path to the Lc+ MVA weights file
+        # BDT is not applied if this is the empty string or None
+        'Lambdac_MVA_Weights': '$TMVAWEIGHTSROOT/data/Lambdac2PHHForXSec_BDT_v1r0.xml',
+        # Dictionary of LoKi functors defining the Lc+ MVA input variables
+        # The keys must match those used when training the MVA
+        'Lambdac_MVA_Variables': {
+            # Largest Lc+ daughter PT
+            'ROOTex::Leading(Lc_h1_PT,Lc_h2_PT,Lc_p_PT)': (
+                "MAXTREE(ISBASIC & HASTRACK, PT)"
+            ),
+            # Smallest Lc+ daughter PT
+            'ROOTex::ThirdLeading(Lc_h1_PT,Lc_h2_PT,Lc_p_PT)': (
+                "MINTREE(ISBASIC & HASTRACK, PT)"
+            ),
+            'Lc_DIRA_OWNPV': 'BPVDIRA',
+            'Lc_Loki_LV02': 'LV02',
+            'TMath::Log10(TMath::Abs(Lc_Loki_BPVVDCHI2))': (
+                'log10(abs(BPVVDCHI2))'
+            ),
+            'TMath::Log10(TMath::Abs(Lc_Loki_BPVLTIME))': (
+                "log10(abs(BPVLTIME()))"
+            ),
+            'TMath::Log10(Lc_ENDVERTEX_CHI2/Lc_ENDVERTEX_NDOF)': (
+                'log10(VFASPF(VCHI2/VDOF))'
+            )
+        },
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleLambdac2PKPi': 0.0,
+        'PrescaleLambdac2PKK': 0.0,
+        'PrescaleLambdac2PPiPi': 0.0,
+        'PrescaleLambdac2PPiKWS': 0.0,
+        'PrescaleSigmacz2LambdacPi': 0.0,
+        'PrescaleSigmacpp2LambdacPi': 0.0,
+        # Fraction of candidates to randomly throw after before stripping
+        'PostscaleLambdac2PKPi': 1.0,
+        'PostscaleLambdac2PKK': 1.0,
+        'PostscaleLambdac2PPiPi': 1.0,
+        'PostscaleLambdac2PPiKWS': -1.0,
+        'PostscaleSigmacz2LambdacPi': 1.0,
+        'PostscaleSigmacpp2LambdacPi': 1.0
+    }
+}
+
+
+class StrippingLambdac2PHHForXSecConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    Lambdac2PKPi = ['[Lambda_c+ -> p+ K- pi+]cc']
+    Lambdac2PKK = ['[Lambda_c+ -> p+ K- K+]cc']
+    Lambdac2PPiPi = ['[Lambda_c+ -> p+ pi- pi+]cc']
+    Lambdac2PPiKWS = ['[Lambda_c+ -> p+ pi- K+]cc']
+    Sigmacz2LambdacPi = ['[Sigma_c0 -> Lambda_c+ pi-]cc']
+    Sigmacpp2LambdacPi = ['[Sigma_c++ -> Lambda_c+ pi+]cc']
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        # Line names
+        lambdac_name = '{0}Lambdac2PKPi'.format(name)
+        lambdac_pKK_name = '{0}Lambdac2PKK'.format(name)
+        lambdac_ppipi_name = '{0}Lambdac2PPiPi'.format(name)
+        lambdac_ppiK_name = '{0}Lambdac2PPiKWS'.format(name)
+        sigmacz_name = '{0}Sigmacz2LambdacPi'.format(name)
+        sigmacpp_name = '{0}Sigmacpp2LambdacPi'.format(name)
+
+        # Build pion, kaon, and proton cut strings
+        daugCuts = (
+            '(PT > {0[Daug_All_PT_MIN]})'
+            '& (BPVIPCHI2() > {0[Daug_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+        pidFiducialCuts = (
+            '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+            '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+        ).format(self.config)
+        protonPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDp - PIDpi) > {0[Proton_PIDpPIDpi_MIN]})'
+            '& ((PIDp - PIDK) > {0[Proton_PIDpPIDK_MIN]})'
+        ).format(self.config)
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDK - PIDpi) > {0[K_PIDK_MIN]})'
+        ).format(self.config)
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDK - PIDpi) < {0[Pi_PIDK_MAX]})'
+        ).format(self.config)
+        pionCuts = '{0} & {1}'.format(daugCuts, pionPIDCuts)
+        kaonCuts = '{0} & {1}'.format(daugCuts, kaonPIDCuts)
+        protonCuts = '{0} & {1}'.format(daugCuts, protonPIDCuts)
+
+        # Filter StdAllNoPIDs particles
+        self.inPions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterPionsFor{0}'.format(name),
+                Code=pionCuts
+            ),
+            RequiredSelections=[StdAllNoPIDsPions]
+        )
+        self.inKaons = Selection(
+            'KaonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterKaonsFor{0}'.format(name),
+                Code=kaonCuts
+            ),
+            RequiredSelections=[StdAllNoPIDsKaons]
+        )
+        self.inProtons = Selection(
+            'ProtonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterProtonsFor{0}'.format(name),
+                Code=protonCuts
+            ),
+            RequiredSelections=[StdAllNoPIDsProtons]
+        )
+        # Don't used filtered pions for soft pions, cut would be too tight
+        self.inSoftPions = StdAllNoPIDsPions
+
+        self.selLambdac2PKPi = self.makeLambdac2PHH(
+            name=lambdac_name,
+            inputSel=[self.inProtons, self.inKaons, self.inPions],
+            decDescriptors=self.Lambdac2PKPi
+        )
+        self.selLambdac2PKPiMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(lambdac_name),
+            self.selLambdac2PKPi
+        )
+
+        self.selLambdac2PKK = self.makeLambdac2PHH(
+            name=lambdac_pKK_name,
+            inputSel=[self.inProtons, self.inKaons],
+            decDescriptors=self.Lambdac2PKK
+        )
+        self.selLambdac2PKKMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(lambdac_pKK_name),
+            self.selLambdac2PKK
+        )
+
+        self.selLambdac2PPiPi = self.makeLambdac2PHH(
+            name=lambdac_ppipi_name,
+            inputSel=[self.inProtons, self.inPions],
+            decDescriptors=self.Lambdac2PPiPi
+        )
+        self.selLambdac2PPiPiMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(lambdac_ppipi_name),
+            self.selLambdac2PPiPi
+        )
+
+        self.selLambdac2PPiKWS = self.makeLambdac2PHH(
+            name=lambdac_ppiK_name,
+            inputSel=[self.inProtons, self.inKaons, self.inPions],
+            decDescriptors=self.Lambdac2PPiKWS
+        )
+        self.selLambdac2PPiKWSMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(lambdac_ppiK_name),
+            self.selLambdac2PPiKWS
+        )
+
+        self.selSigmacz2LambdacPi = self.makeSigmac2LambdacPi(
+            name=sigmacz_name,
+            inputSel=[self.selLambdac2PKPiMVA, self.inSoftPions],
+            decDescriptors=self.Sigmacz2LambdacPi
+        )
+
+        self.selSigmacpp2LambdacPi = self.makeSigmac2LambdacPi(
+            name=sigmacpp_name,
+            inputSel=[self.selLambdac2PKPiMVA, self.inSoftPions],
+            decDescriptors=self.Sigmacpp2LambdacPi
+        )
+
+        self.line_Lambdac2PKPi = self.make_line(
+            name='{0}Line'.format(lambdac_name),
+            selection=self.selLambdac2PKPiMVA,
+            prescale=config['PrescaleLambdac2PKPi'],
+            postscale=config['PostscaleLambdac2PKPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Lambdac2PKK = self.make_line(
+            name='{0}Line'.format(lambdac_pKK_name),
+            selection=self.selLambdac2PKKMVA,
+            prescale=config['PrescaleLambdac2PKK'],
+            postscale=config['PostscaleLambdac2PKK'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Lambdac2PPiPi = self.make_line(
+            name='{0}Line'.format(lambdac_ppipi_name),
+            selection=self.selLambdac2PPiPiMVA,
+            prescale=config['PrescaleLambdac2PPiPi'],
+            postscale=config['PostscaleLambdac2PPiPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Lambdac2PPiKWS = self.make_line(
+            name='{0}Line'.format(lambdac_ppiK_name),
+            selection=self.selLambdac2PPiKWSMVA,
+            prescale=config['PrescaleLambdac2PPiKWS'],
+            postscale=config['PostscaleLambdac2PPiKWS'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Sigmacz2LambdacPi = self.make_line(
+            name='{0}Line'.format(sigmacz_name),
+            selection=self.selSigmacz2LambdacPi,
+            prescale=config['PrescaleSigmacz2LambdacPi'],
+            postscale=config['PostscaleSigmacz2LambdacPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Sigmacpp2LambdacPi = self.make_line(
+            name='{0}Line'.format(sigmacpp_name),
+            selection=self.selSigmacpp2LambdacPi,
+            prescale=config['PrescaleSigmacpp2LambdacPi'],
+            postscale=config['PostscaleSigmacpp2LambdacPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeLambdac2PHH(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a Lambda_c+ -> p+ h- h+ decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        combCuts = (
+            "(ADAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+            '& (AMAXCHILD(PT) > {0[Daug_1of3_PT_MIN]})'
+            '& (AMAXCHILD(BPVIPCHI2()) > {0[Daug_1of3_BPVIPCHI2_MIN]})'
+            '& (ANUM(PT > {0[Daug_2of3_PT_MIN]}) >= 2)'
+            '& (ANUM(BPVIPCHI2() > {0[Daug_2of3_BPVIPCHI2_MIN]}) >= 2)'
+            "& (ACUTDOCA({0[Comb_ADOCAMAX_MAX]}, ''))"
+        ).format(self.config)
+
+        lambdacCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[Lambdac_VCHI2VDOF_MAX]})'
+            '& ({0[Lambdac_PVDispCut]})'
+            '& (BPVDIRA > cos({0[Lambdac_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+
+        _Lambdac = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=lambdacCuts
+        )
+
+        return Selection(name, Algorithm=_Lambdac, RequiredSelections=inputSel)
+
+    def makeSigmac2LambdacPi(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a Sigma_c -> Lambda_c+ pi decay.
+
+        The selection is motivated in precisely the same way as a D*+ -> D0 pi+
+        selection, i.e. take a Lambda_c+, attach a pion, and make some vertex
+        quality requirement.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        combCuts = '((AM - AM1) < {0[Sigmac_AMDiff_MAX]})'.format(self.config)
+
+        dstarCuts = '(VFASPF(VCHI2/VDOF) < {0[Sigmac_VCHI2VDOF_MAX]})'.format(
+            self.config
+        )
+
+        _Sigmac = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            CombinationCut=combCuts,
+            MotherCut=dstarCuts
+        )
+
+        return Selection(name, Algorithm=_Sigmac, RequiredSelections=inputSel)
+
+    def makeMVASelection(self, name, inputSel):
+        # Don't apply a BDT if the weights file has not been specified
+        if not self.config['Lambdac_MVA_Weights']:
+            return inputSel
+
+        cut = (
+            "VALUE('LoKi::Hybrid::DictValue/{0}') > {1[Lambdac_MVA_MIN]}"
+        ).format(name, self.config)
+        mva = FilterDesktop('{0}Filter'.format(name), Code=cut)
+
+        addTMVAclassifierValue(
+            Component=mva,
+            XMLFile=self.config['Lambdac_MVA_Weights'],
+            Variables=self.config['Lambdac_MVA_Variables'],
+            ToolName=name
+        )
+
+        return Selection(name, Algorithm=mva, RequiredSelections=[inputSel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V03H.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V03H.py
new file mode 100644
index 000000000..60c2d808f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V03H.py
@@ -0,0 +1,298 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of general decay topologies
+    [Lambda_c+ -> (V0 -> h+ h-) h+ h+ h-]CC
+In this file the stripping line for this decay is build 
+    [Lambda_c+ -> (Lambda0 -> p+ pi-) pi+ pi+ pi-]CC
+    [Lambda_c+ -> (Lambda0 -> p+ pi-) K+ pi+ pi-]CC
+Throughout this file, 'Bachelor' refers to the children of the Lambda_c+ which is
+not part of the V0 decay.
+"""
+
+__author__ = ['Andrea Merli']
+__date__ = '07/04/2016'
+
+__all__ = (
+    'default_config',
+    'StrippingLambdac2V03HConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop, DaVinci__N4BodyDecays
+from StandardParticles import StdNoPIDsPions as InputPions
+from StandardParticles import StdNoPIDsKaons as InputKaons
+from StandardParticles import StdLooseLambdaLL as InputLambdasLL
+from StandardParticles import StdLooseLambdaDD as InputLambdasDD
+
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME': 'Lambdac2V03H',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingLambdac2V03HConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum Lc+ bachelor momentum
+        'Bach_P_MIN': 2.0*GeV,
+        # Minimum L0 momentum
+        'Lambda0_P_MIN': 2000*MeV,
+        # Minimum L0 transverse momentum
+        'Lambda0_PT_MIN': 250*MeV,
+        # Minimum flight distance chi^2 of L0 from the primary vertex
+        'Lambda0_FDCHI2_MIN': 49,
+        # Maximum L0 vertex chi^2 per vertex fit DoF
+        'Lambda0_VCHI2VDOF_MAX': 12.0,
+        # Lc+ mass window around the nominal Lc+ mass before the vertex fit
+        'Comb_ADAMASS_WIN': 120.0*MeV,
+        # Lc+ mass window around the nominal Lc+ mass after the vertex fit
+        'Lambdac_ADMASS_WIN': 90.0*MeV,
+        # Maximum distance of closest approach of Lc+ children
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Maximum Lc+ vertex chi^2 per vertex fit DoF
+        'Lambdac_VCHI2VDOF_MAX': 12.0,
+        # Maximum angle between Lc+ momentum and Lc+ direction of flight
+        'Lambdac_acosBPVDIRA_MAX': 140.0*mrad,
+        # Primary vertex displacement requirement, either that the Lc+ is some
+        # sigma away from the PV, or it has a minimum flight time
+        'Lambdac_PVDispCut': '(BPVVDCHI2 > 16.0)',
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleLambdac2Lambda3PiLL': 1.0,
+        'PrescaleLambdac2Lambda3PiDD': 1.0,
+        'PrescaleLambdac2LambdaK2PiLL': 1.0,
+        'PrescaleLambdac2LambdaK2PiDD': 1.0,
+        # Fraction of candidates to randomly throw away after stripping
+        'PostscaleLambdac2Lambda3PiLL': 1.0,
+        'PostscaleLambdac2Lambda3PiDD': 1.0,
+        'PostscaleLambdac2LambdaK2PiLL': 1.0,
+        'PostscaleLambdac2LambdaK2PiDD': 1.0
+    }
+}
+
+
+class StrippingLambdac2V03HConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        # Decay descriptors
+        self.Lambdac2Lambda3Pi = ['[Lambda_c+ -> Lambda0 pi+ pi+ pi-]cc']
+        self.Lambdac2LambdaK2Pi = ['[Lambda_c+ -> Lambda0 K+ pi+ pi-]cc']
+        
+        # Line names
+        # 'LL' and 'DD' will be appended to these names for the LL and DD
+        # Selection and StrippingLine instances
+        self.Lambdac2Lambda3Pi_name = '{0}_Lambdac2Lambda3Pi'.format(name)
+        self.Lambdac2LambdaK2Pi_name = '{0}_Lambdac2LambdaK2Pi'.format(name)
+        
+        # Build bachelor pion and kaon cut strings
+        # Cuts MIPCHI2DV(PRIMARY)>4 & PT>250*MeV already present in the InputsParticles
+        childCuts = (
+            '(P > {0[Bach_P_MIN]})'
+        ).format(self.config)
+        
+        kineticCuts = '{0}'.format(childCuts)
+
+        # Build Lambda0 cut strings
+        lambda0Cuts = (
+            '(P > {0[Lambda0_P_MIN]})'
+            '& (PT > {0[Lambda0_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[Lambda0_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Lambda0_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+        # Define any additional cuts on LL/DD difference
+        lambda0LLCuts = lambda0Cuts
+        lambda0DDCuts = lambda0Cuts
+        
+        # Filter Input particles
+        self.Pions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                 Code = kineticCuts
+            ),
+            RequiredSelections=[InputPions]
+        )
+
+        self.Kaons = Selection(
+            'KaonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                  Code = kineticCuts
+            ),
+            RequiredSelections=[InputKaons]
+        )
+        
+        # Filter Input Lambdas
+        self.Lambda0LL = Selection(
+            'Lambda0LLFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code=lambda0LLCuts
+            ),
+            RequiredSelections=[InputLambdasLL]
+        )
+        self.Lambda0DD = Selection(
+            'Lambda0DDFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code=lambda0DDCuts
+            ),
+            RequiredSelections=[InputLambdasDD]
+        )
+
+        # Build selection for Lc -> L 3pi
+        self.selLambdac2Lambda3Pi = self.makeLambdac2V03H(
+            name=self.Lambdac2Lambda3Pi_name,
+            inputSelLL=[self.Lambda0LL, self.Pions],
+            inputSelDD=[self.Lambda0DD, self.Pions],
+            decDescriptors=self.Lambdac2Lambda3Pi
+        )
+
+        # Build selection for Lc -> L K 2pi
+        self.selLambdac2LambdaK2Pi = self.makeLambdac2V03H(
+            name=self.Lambdac2LambdaK2Pi_name,
+            inputSelLL=[self.Lambda0LL, self.Kaons, self.Pions],
+            inputSelDD=[self.Lambda0DD, self.Kaons, self.Pions],
+            decDescriptors=self.Lambdac2LambdaK2Pi
+        )
+
+        # Make line for Lc -> L 3pi
+        self.line_Lambdac2Lambda3PiLL = self.make_line(
+            name='{0}LLLine'.format(self.Lambdac2Lambda3Pi_name),
+            selection=self.selLambdac2Lambda3Pi[0],
+            prescale=config['PrescaleLambdac2Lambda3PiLL'],
+            postscale=config['PostscaleLambdac2Lambda3PiLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Lambdac2Lambda3PiDD = self.make_line(
+            name='{0}DDLine'.format(self.Lambdac2Lambda3Pi_name),
+            selection=self.selLambdac2Lambda3Pi[1],
+            prescale=config['PrescaleLambdac2Lambda3PiDD'],
+            postscale=config['PostscaleLambdac2Lambda3PiDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        # Make line for Lc -> L K 2pi
+        self.line_Lambdac2LambdaK2PiLL = self.make_line(
+            name='{0}LLLine'.format(self.Lambdac2LambdaK2Pi_name),
+            selection=self.selLambdac2LambdaK2Pi[0],
+            prescale=config['PrescaleLambdac2LambdaK2PiLL'],
+            postscale=config['PostscaleLambdac2LambdaK2PiLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Lambdac2LambdaK2PiDD = self.make_line(
+            name='{0}DDLine'.format(self.Lambdac2LambdaK2Pi_name),
+            selection=self.selLambdac2LambdaK2Pi[1],
+            prescale=config['PrescaleLambdac2LambdaK2PiDD'],
+            postscale=config['PostscaleLambdac2LambdaK2PiDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeLambdac2V03H(self, name, inputSelLL, inputSelDD, decDescriptors):
+        """Return two Selection instances for a Lambda_c+ -> V0 h+ h+ h- decay.
+
+        The return value is a two-tuple of Selection instances as
+            (LL Selection, DD Selection)
+        where LL and DD are the method of reconstruction for the V0.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLL -- List of inputs passed to Selection.RequiredSelections
+                      for the LL Selection
+        inputSelDD -- List of inputs passed to Selection.RequiredSelections
+                      for the DD Selection
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        combCuts = (
+            "(ADAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(1,4) < {0[Comb_ADOCAMAX_MAX]})"
+        ).format(self.config)
+
+        lambdacCuts = (
+            "(VFASPF(VCHI2/VDOF) < {0[Lambdac_VCHI2VDOF_MAX]})"
+            "& ({0[Lambdac_PVDispCut]})"
+            "& (BPVDIRA > cos({0[Lambdac_acosBPVDIRA_MAX]}))"
+            "& (ADMASS('Lambda_c+') < {0[Lambdac_ADMASS_WIN]})"
+        ).format(self.config)
+
+        comb12Cuts = (
+            "(DAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            ).format(self.config)
+
+        comb123Cuts = (
+            "(DAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})"
+            ).format(self.config)
+
+        _Lambdac = DaVinci__N4BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=lambdacCuts,
+            Combination12Cut=comb12Cuts,
+            Combination123Cut=comb123Cuts
+            )
+
+        selLL = Selection(
+            '{0}LL'.format(name),
+            Algorithm=_Lambdac,
+            RequiredSelections=inputSelLL
+        )
+        selDD = Selection(
+            '{0}DD'.format(name),
+            Algorithm=_Lambdac,
+            RequiredSelections=inputSelDD
+        )
+        return selLL, selDD
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V0H.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V0H.py
new file mode 100644
index 000000000..7d66c7622
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V0H.py
@@ -0,0 +1,465 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of
+    [Lambda_c+ -> (Lambda0 -> p+ pi-) pi+]CC
+    [Lambda_c+ -> (Lambda0 -> p+ pi-) K+]CC
+    [Lambda_c+ -> p+ (KS0 -> pi+ pi-)]CC
+Throughout this file, 'Bachelor' refers to the child of the Lambda_c+ which is
+not part of the V0 decay, e.g. the proton in the [Lambda_c+ -> p+ KS0]CC decay.
+
+Update on 2021/02/28 by Miroslav Saur:
+Added one additional line:
+    [Xi_c+ -> p+ (KS0 -> pi+ pi-)]CC
+"""
+
+__author__ = ['Alex Pearce', 'Mohamad Kozeiha', 'Miroslav Saur']
+__date__ = '2021/03/19'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = (
+    'default_config',
+    'StrippingLambdac2V0HConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from Configurables import CombineParticles, FilterDesktop
+from StandardParticles import (
+    StdLooseLambdaLL,
+    StdLooseLambdaDD,
+    StdLooseKsLL,
+    StdLooseKsDD,
+    StdLooseProtons,
+    StdLooseKaons,
+    StdLoosePions
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME': 'Lambdac2V0H',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingLambdac2V0HConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum transverse momentum all Lc+ bachelors must satisfy
+        'Bach_All_PT_MIN': 750.0*MeV,
+        # Minimum best primary vertex IP chi^2 all Lc+ bachelors must satisfy
+        'Bach_All_BPVIPCHI2_MIN': 4.0,
+        # Minimum Lc+ bachelor momentum
+        'Bach_P_MIN': 2.0*GeV,
+        # Maximum Lc+ bachelor momentum
+        'Bach_P_MAX': 100.0*GeV,
+        # Minimum Lc+ bachelor pseudorapidity
+        'Bach_ETA_MIN': 2.0,
+        # Maximum Lc+ bachelor pseudorapidity
+        'Bach_ETA_MAX': 5.0,
+        # Minimum Lc+ bachelor proton DLLp
+        'Proton_PIDpPIDpi_MIN': 7.0,
+        # Minimum Lc+ bachelor proton DLLp - DLLK
+        'Proton_PIDpPIDK_MIN': 2.0,
+        # Minimum Lc+ bachelor kaon DLLK
+        'K_PIDK_MIN': 5.0,
+        # Maximum Lc+ bachelor pion DLLK
+        'Pi_PIDK_MAX': 3.0,
+        # Minimum L0 momentum
+        'Lambda0_P_MIN': 2000*MeV,
+        # Minimum L0 transverse momentum
+        'Lambda0_PT_MIN': 500*MeV,
+        # Minimum flight distance chi^2 of L0 from the primary vertex
+        'Lambda0_FDCHI2_MIN': 100,
+        # Maximum L0 vertex chi^2 per vertex fit DoF
+        'Lambda0_VCHI2VDOF_MAX': 10.0,
+        # Minimum KS0 momentum
+        'KS0_P_MIN': 2000*MeV,
+        # Minimum KS0 transverse momentum
+        'KS0_PT_MIN': 500*MeV,
+        # Minimum flight distance chi^2 of KS0 from the primary vertex
+        'KS0_FDCHI2_MIN': 100,
+        # Maximum KS0 vertex chi^2 per vertex fit DoF
+        'KS0_VCHI2VDOF_MAX': 10.0,
+        # Lc+ mass window around the nominal Lc+ mass before the vertex fit
+        'Comb_ADAMASS_WIN': 90.0*MeV,
+        # Maximum distance of closest approach of Lc+ children
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Minimum transverse momentum of Lc+ children
+        'Comb_PT_MIN': 1.0*GeV,
+        # Maximum Lc+ vertex chi^2 per vertex fit DoF
+        'Lambdac_VCHI2VDOF_MAX': 10.0,
+        # Maximum angle between Lc+ momentum and Lc+ direction of flight
+        'Lambdac_acosBPVDIRA_MAX': 140.0*mrad,
+        # Primary vertex displacement requirement, either that the Lc+ is some
+        # sigma away from the PV, or it has a minimum flight time
+        'Lambdac_PVDispCut': '(BPVVDCHI2 > 16.0)',
+        # Xic+ mass window around the nominal Lc+ mass before the vertex fit
+        'Comb_XicPlus_ADAMASS_WIN': 90.0*MeV,
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleLambdac2Lambda0PiLL': 1.0,
+        'PrescaleLambdac2Lambda0PiDD': 1.0,
+        'PrescaleLambdac2Lambda0KLL': 1.0,
+        'PrescaleLambdac2Lambda0KDD': 1.0,
+        'PrescaleLambdac2pKS0LL': 1.0,
+        'PrescaleLambdac2pKS0DD': 1.0,
+        'PrescaleXic2pKS0LL': 1.0,
+        'PrescaleXic2pKS0DD': 1.0,
+        # Fraction of candidates to randomly throw after before stripping
+        'PostscaleLambdac2Lambda0PiLL': 1.0,
+        'PostscaleLambdac2Lambda0PiDD': 1.0,
+        'PostscaleLambdac2Lambda0KLL': 1.0,
+        'PostscaleLambdac2Lambda0KDD': 1.0,
+        'PostscaleLambdac2pKS0LL': 1.0,
+        'PostscaleLambdac2pKS0DD': 1.0,
+        'PostscaleXic2pKS0LL': 1.0,
+        'PostscaleXic2pKS0DD': 1.0,
+    }
+}
+
+
+class StrippingLambdac2V0HConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    Lambdac2Lambda0Pi = ['[Lambda_c+ -> Lambda0 pi+]cc']
+    Lambdac2Lambda0K = ['[Lambda_c+ -> Lambda0 K+]cc']
+    Lambdac2pKS0 = ['[Lambda_c+ -> p+ KS0]cc']
+    Xic2pKS0 = ['[Xi_c+ -> p+ KS0]cc']
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        # Line names
+        # 'LL' and 'DD' will be appended to these names for the LL and DD
+        # Selection and StrippingLine instances
+        Lambdac2Lambda0Pi_name = '{0}Lambdac2Lambda0Pi'.format(name)
+        Lambdac2Lambda0K_name = '{0}Lambdac2Lambda0K'.format(name)
+        Lambdac2pKS0_name = '{0}Lambdac2pKS0'.format(name)
+        Xic2pKS0_name = '{0}Xic2pKS0'.format(name)
+
+        # Build bachelor pion, kaon, and proton cut strings
+        childCuts = (
+            '(PT > {0[Bach_All_PT_MIN]})'
+            '& (BPVIPCHI2() > {0[Bach_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+        pidFiducialCuts = (
+            '(in_range({0[Bach_P_MIN]}, P, {0[Bach_P_MAX]}))'
+            '& (in_range({0[Bach_ETA_MIN]}, ETA, {0[Bach_ETA_MAX]}))'
+        ).format(self.config)
+        protonPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDp - PIDpi) > {0[Proton_PIDpPIDpi_MIN]})'
+            '& ((PIDp - PIDK) > {0[Proton_PIDpPIDK_MIN]})'
+        ).format(self.config)
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDK - PIDpi) > {0[K_PIDK_MIN]})'
+        ).format(self.config)
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDK - PIDpi) < {0[Pi_PIDK_MAX]})'
+        ).format(self.config)
+        pionCuts = '{0} & {1}'.format(childCuts, pionPIDCuts)
+        kaonCuts = '{0} & {1}'.format(childCuts, kaonPIDCuts)
+        protonCuts = '{0} & {1}'.format(childCuts, protonPIDCuts)
+
+        # Build Lambda0 and KS0 cut strings
+        lambda0Cuts = (
+            '(P > {0[Lambda0_P_MIN]})'
+            '& (PT > {0[Lambda0_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[Lambda0_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Lambda0_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+        ks0Cuts = (
+            '(P > {0[KS0_P_MIN]})'
+            '& (PT > {0[KS0_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[KS0_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[KS0_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+        # Define any additional cuts on LL/DD difference
+        lambda0LLCuts = lambda0Cuts
+        lambda0DDCuts = lambda0Cuts
+        ks0LLCuts = ks0Cuts
+        ks0DDCuts = ks0Cuts
+
+        # Filter StdLoose particles
+        self.inPions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterPionsFor{0}'.format(name),
+                Code=pionCuts
+            ),
+            RequiredSelections=[StdLoosePions]
+        )
+        self.inKaons = Selection(
+            'KaonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterKaonsFor{0}'.format(name),
+                Code=kaonCuts
+            ),
+            RequiredSelections=[StdLooseKaons]
+        )
+        self.inProtons = Selection(
+            'ProtonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterProtonsFor{0}'.format(name),
+                Code=protonCuts
+            ),
+            RequiredSelections=[StdLooseProtons]
+        )
+        self.inLambda0LL = Selection(
+            'Lambda0LLFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterLambda0LLFor{0}'.format(name),
+                Code=lambda0LLCuts
+            ),
+            RequiredSelections=[StdLooseLambdaLL]
+        )
+        self.inLambda0DD = Selection(
+            'Lambda0DDFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterLambda0DDFor{0}'.format(name),
+                Code=lambda0DDCuts
+            ),
+            RequiredSelections=[StdLooseLambdaDD]
+        )
+        self.inKS0LL = Selection(
+            'KS0LLFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterKS0LLFor{0}'.format(name),
+                Code=ks0LLCuts
+            ),
+            RequiredSelections=[StdLooseKsLL]
+        )
+        self.inKS0DD = Selection(
+            'KS0DDFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterKS0DDFor{0}'.format(name),
+                Code=ks0DDCuts
+            ),
+            RequiredSelections=[StdLooseKsDD]
+        )
+
+        self.selLambdac2Lambda0Pi = self.makeLambdac2V0H(
+            name=Lambdac2Lambda0Pi_name,
+            inputSelLL=[self.inLambda0LL, self.inPions],
+            inputSelDD=[self.inLambda0DD, self.inPions],
+            decDescriptors=self.Lambdac2Lambda0Pi
+        )
+
+        self.selLambdac2Lambda0K = self.makeLambdac2V0H(
+            name=Lambdac2Lambda0K_name,
+            inputSelLL=[self.inLambda0LL, self.inKaons],
+            inputSelDD=[self.inLambda0DD, self.inKaons],
+            decDescriptors=self.Lambdac2Lambda0K
+        )
+
+        self.selLambdac2pKS0 = self.makeLambdac2V0H(
+            name=Lambdac2pKS0_name,
+            inputSelLL=[self.inKS0LL, self.inProtons],
+            inputSelDD=[self.inKS0DD, self.inProtons],
+            decDescriptors=self.Lambdac2pKS0
+        )
+
+        self.selXic2pKS0 = self.makeXic2V0H(
+            name=Xic2pKS0_name,
+            inputSelLL=[self.inKS0LL, self.inProtons],
+            inputSelDD=[self.inKS0DD, self.inProtons],
+            decDescriptors=self.Xic2pKS0
+        )
+
+        self.line_Lambdac2Lambda0PiLL = self.make_line(
+            name='{0}LLLine'.format(Lambdac2Lambda0Pi_name),
+            selection=self.selLambdac2Lambda0Pi[0],
+            prescale=config['PrescaleLambdac2Lambda0PiLL'],
+            postscale=config['PostscaleLambdac2Lambda0PiLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Lambdac2Lambda0PiDD = self.make_line(
+            name='{0}DDLine'.format(Lambdac2Lambda0Pi_name),
+            selection=self.selLambdac2Lambda0Pi[1],
+            prescale=config['PrescaleLambdac2Lambda0PiDD'],
+            postscale=config['PostscaleLambdac2Lambda0PiDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Lambdac2Lambda0KLL = self.make_line(
+            name='{0}LLLine'.format(Lambdac2Lambda0K_name),
+            selection=self.selLambdac2Lambda0K[0],
+            prescale=config['PrescaleLambdac2Lambda0KLL'],
+            postscale=config['PostscaleLambdac2Lambda0KLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Lambdac2Lambda0KDD = self.make_line(
+            name='{0}DDLine'.format(Lambdac2Lambda0K_name),
+            selection=self.selLambdac2Lambda0K[1],
+            prescale=config['PrescaleLambdac2Lambda0KDD'],
+            postscale=config['PostscaleLambdac2Lambda0KDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Lambdac2pKS0LL = self.make_line(
+            name='{0}LLLine'.format(Lambdac2pKS0_name),
+            selection=self.selLambdac2pKS0[0],
+            prescale=config['PrescaleLambdac2pKS0LL'],
+            postscale=config['PostscaleLambdac2pKS0LL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Lambdac2pKS0DD = self.make_line(
+            name='{0}DDLine'.format(Lambdac2pKS0_name),
+            selection=self.selLambdac2pKS0[1],
+            prescale=config['PrescaleLambdac2pKS0DD'],
+            postscale=config['PostscaleLambdac2pKS0DD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Xic2pKS0LL = self.make_line(
+            name='{0}LLLine'.format(Xic2pKS0_name),
+            selection=self.selXic2pKS0[0],
+            prescale=config['PrescaleXic2pKS0LL'],
+            postscale=config['PostscaleXic2pKS0LL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Xic2pKS0DD = self.make_line(
+            name='{0}DDLine'.format(Xic2pKS0_name),
+            selection=self.selXic2pKS0[1],
+            prescale=config['PrescaleXic2pKS0DD'],
+            postscale=config['PostscaleXic2pKS0DD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeLambdac2V0H(self, name, inputSelLL, inputSelDD, decDescriptors):
+        """Return two Selection instances for a Lambda_c+ -> V0 h+ decay.
+
+        The return value is a two-tuple of Selection instances as
+            (LL Selection, DD Selection)
+        where LL and DD are the method of reconstruction for the V0.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLL -- List of inputs passed to Selection.RequiredSelections
+                      for the LL Selection
+        inputSelDD -- List of inputs passed to Selection.RequiredSelections
+                      for the DD Selection
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        combCuts = (
+            "(ADAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ACUTDOCA({0[Comb_ADOCAMAX_MAX]}, ''))"
+        ).format(self.config)
+
+        lambdacCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[Lambdac_VCHI2VDOF_MAX]})'
+            '& ({0[Lambdac_PVDispCut]})'
+            '& (BPVDIRA > cos({0[Lambdac_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+
+        _Lambdac = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=lambdacCuts
+        )
+
+        selLL = Selection(
+            '{0}LL'.format(name),
+            Algorithm=_Lambdac,
+            RequiredSelections=inputSelLL
+        )
+        selDD = Selection(
+            '{0}DD'.format(name),
+            Algorithm=_Lambdac,
+            RequiredSelections=inputSelDD
+        )
+        return selLL, selDD
+
+    def makeXic2V0H(self, name, inputSelLL, inputSelDD, decDescriptors):
+        """Return two Selection instances for a Xic_c+ -> V0 h+ decay."""
+
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        combCuts = (
+            "(ADAMASS('Xi_c+') < {0[Comb_XicPlus_ADAMASS_WIN]})"
+            "& (ACUTDOCA({0[Comb_ADOCAMAX_MAX]}, ''))"
+        ).format(self.config)
+
+        xicCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[Lambdac_VCHI2VDOF_MAX]})'
+            '& ({0[Lambdac_PVDispCut]})'
+            '& (BPVDIRA > cos({0[Lambdac_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+
+        #for now fully reusing Lc cuts
+        _Xic = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=xicCuts
+        )
+
+        selLL = Selection(
+            '{0}LL'.format(name),
+            Algorithm=_Xic,
+            RequiredSelections=inputSelLL
+        )
+        selDD = Selection(
+            '{0}DD'.format(name),
+            Algorithm=_Xic,
+            RequiredSelections=inputSelDD
+        )
+        return selLL, selDD
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V2H.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V2H.py
new file mode 100644
index 000000000..ff6c214e0
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdac2V2H.py
@@ -0,0 +1,369 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of general decay topologies
+    [Lambda_c+ -> (V- -> (V0 -> h+ h-) h-) h+ h+]CC
+In this file the stripping line for this decay is build
+    [Lambda_c+ -> (Xi- -> (Lambda0 -> p+ pi-) pi-) K+ pi+]CC
+Throughout this file, 'Bachelor' refers to the children of the Lambda_c+ which is
+not part of the V- decay.
+"""
+__author__ = ['Andrea Merli']
+__date__ = '07/04/2016'
+
+__all__ = (
+    'default_config',
+    'StrippingLambdac2V2HConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop, DaVinci__N3BodyDecays
+from StandardParticles import StdNoPIDsDownPions as InputDownPions
+from StandardParticles import StdNoPIDsPions as InputPions
+from StandardParticles import StdNoPIDsKaons as InputKaons
+from StandardParticles import StdLooseLambdaLL as InputLambdasLL
+from StandardParticles import StdLooseLambdaDD as InputLambdasDD
+
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME': 'Lambdac2V2H',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingLambdac2V2HConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum Lc+ bachelor momentum
+        'Bach_P_MIN': 2.0*GeV,
+        # Minimum L0 momentum
+        'Lambda0_P_MIN': 2000*MeV,
+        # Minimum L0 transverse momentum
+        'Lambda0_PT_MIN': 250*MeV,
+        # Minimum flight distance chi^2 of L0 from the primary vertex
+        'Lambda0_FDCHI2_MIN': 49,
+        # Maximum L0 vertex chi^2 per vertex fit DoF
+        'Lambda0_VCHI2VDOF_MAX': 12.0,
+        # Minimum Xi- momentum
+        'Xim_P_MIN': 2000*MeV,
+        # Minimum Xi- transverse momentum
+        'Xim_PT_MIN': 250*MeV,
+        # Minimum flight distance chi^2 of Xi- from the primary vertex
+        'Xim_FDCHI2_MIN': 49,
+        # Maximum Xi- vertex chi^2 per vertex fit DoF
+        'Xim_VCHI2VDOF_MAX': 12.0,
+        # Lc+ mass window around the nominal Lc+ mass before the vertex fit
+        'Comb_ADAMASS_WIN': 120.0*MeV,
+        # Lc+ mass window around the nominal Lc+ mass after the vertex fit
+        'Lambdac_ADMASS_WIN': 90.0*MeV,
+        # Maximum distance of closest approach of Lc+ children
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Maximum Lc+ vertex chi^2 per vertex fit DoF
+        'Lambdac_VCHI2VDOF_MAX': 12.0,
+        # Maximum angle between Lc+ momentum and Lc+ direction of flight
+        'Lambdac_acosBPVDIRA_MAX': 140.0*mrad,
+        # Primary vertex displacement requirement, either that the Lc+ is some
+        # sigma away from the PV, or it has a minimum flight time
+        'Lambdac_PVDispCut': '(BPVVDCHI2 > 16.0)',
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleLambdac2XiKPiLLL': 1.0,
+        'PrescaleLambdac2XiKPiDDD': 1.0,
+        'PrescaleLambdac2XiKPiDDL': 1.0,
+        # Fraction of candidates to randomly throw away after stripping
+        'PostscaleLambdac2XiKPiLLL': 1.0,
+        'PostscaleLambdac2XiKPiDDD': 1.0,
+        'PostscaleLambdac2XiKPiDDL': 1.0
+    }
+}
+
+
+class StrippingLambdac2V2HConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+        
+        # Decay descriptors
+        self.Lambdac2XiKpi = ['[Lambda_c+ -> Xi- K+ pi+]cc']
+        self.Xi2Lambdapi = ['[Xi- -> Lambda0 pi-]cc']
+        # Line names
+        # 'LLL', 'DDD' and 'DDL' will be appended to these names for the LLL, DDD, DDL
+        # Selection and StrippingLine instances
+        self.Lambdac2XiKpi_name = '{0}_Lambdac2XiKpi'.format(name)
+        # Build bachelor pion and kaon cut strings
+        # Cuts MIPCHI2DV(PRIMARY)>4 & PT>250*MeV already present in the InputsParticles
+        childCuts = (
+            '(P > {0[Bach_P_MIN]})'
+        ).format(self.config)
+        
+        kineticCuts = '{0}'.format(childCuts)
+
+        # Build Lambda0 cut strings
+        lambda0Cuts = (
+            '(P > {0[Lambda0_P_MIN]})'
+            '& (PT > {0[Lambda0_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[Lambda0_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Lambda0_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+        ximCuts = (
+            '(P > {0[Xim_P_MIN]})'
+            '& (PT > {0[Xim_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[Xim_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Xim_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+        # Define any additional cuts on LL/DD difference
+        lambda0LLCuts = lambda0Cuts
+        lambda0DDCuts = lambda0Cuts
+        ximLLLCuts = ximCuts
+        ximDDDCuts = ximCuts
+        ximDDLCuts = ximCuts
+        
+        # Filter Input particles
+        self.Pions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                 Code = kineticCuts
+            ),
+            RequiredSelections=[InputPions]
+        )
+
+        self.Kaons = Selection(
+            'KaonsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                 Code = kineticCuts
+            ),
+            RequiredSelections=[InputKaons]
+        )
+
+        self.DownPions = Selection(
+            'DownPionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                 Code = kineticCuts
+            ),
+            RequiredSelections=[InputDownPions]
+        )
+        # Filter Input Lambdas
+        self.Lambda0LL = Selection(
+            'Lambda0LLFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code=lambda0LLCuts
+            ),
+            RequiredSelections=[InputLambdasLL]
+        )
+        self.Lambda0DD = Selection(
+            'Lambda0DDFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                Code=lambda0DDCuts
+            ),
+            RequiredSelections=[InputLambdasDD]
+        )
+
+        # Make Xim
+        self.Xim = self.makeXi2LambdaPi(
+            name = name,
+            inputSelLLL = [self.Lambda0LL,self.Pions],
+            inputSelDDD = [self.Lambda0DD,self.DownPions],
+            inputSelDDL = [self.Lambda0DD,self.Pions],
+            LLLFilter = ximLLLCuts,
+            DDDFilter = ximDDDCuts,
+            DDLFilter = ximDDLCuts,
+            decDescriptors=self.Xi2Lambdapi
+        )
+
+        # Build selection for Lc -> Xi K pi
+        self.selLambdac2XiKPi = self.makeLambdac2VHH(
+            name=self.Lambdac2XiKpi_name,
+            inputSelLLL=[self.Xim['LLL'],self.Kaons,self.Pions],
+            inputSelDDD=[self.Xim['DDD'],self.Kaons,self.Pions],
+            inputSelDDL=[self.Xim['DDL'],self.Kaons,self.Pions],
+            decDescriptors=self.Lambdac2XiKpi
+        )
+
+        # Make line for Lc -> Xi K pi
+        self.line_Lambdac2XiKPiLLL = self.make_line(
+            name='{0}LLLLine'.format(self.Lambdac2XiKpi_name),
+            selection=self.selLambdac2XiKPi['LLL'],
+            prescale=config['PrescaleLambdac2XiKPiLLL'],
+            postscale=config['PostscaleLambdac2XiKPiLLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+        self.line_Lambdac2XiKPiDDD = self.make_line(
+            name='{0}DDDLine'.format(self.Lambdac2XiKpi_name),
+            selection=self.selLambdac2XiKPi['DDD'],
+            prescale=config['PrescaleLambdac2XiKPiDDD'],
+            postscale=config['PostscaleLambdac2XiKPiDDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter'],
+            #RequiredRawEvents = ["Rich"]
+        )
+
+        self.line_Lambdac2XiKPiDDL = self.make_line(
+            name='{0}DDLLine'.format(self.Lambdac2XiKpi_name),
+            selection=self.selLambdac2XiKPi['DDL'],
+            prescale=config['PrescaleLambdac2XiKPiDDL'],
+            postscale=config['PostscaleLambdac2XiKPiDDL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeXi2LambdaPi(self, name, inputSelLLL, inputSelDDD, inputSelDDL, LLLFilter, DDDFilter, DDLFilter, decDescriptors):
+        """Return the dictionary for three Selection instances for a Xi- -> V0 h- decay.
+        The return value is a two-tuple of Selection instances as
+               {'LLL':LLL Selection, 'DDD':DDD Selection, 'DDL': DDL Selection}.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLLL -- List of inputs passed to Selection.RequiredSelections for the LLL Selection (LambdaLL and Pions Long)
+        inputSelDDD -- List of inputs passed to Selection.RequiredSelections for the DDD Selection (LambdaDD and Pions Downstream)
+        inputSelDDL -- List of inputs passed to Selection.RequiredSelections for the DDL Selection (LambdaDD and Pions Long)
+        decDescriptors -- List of decay descriptors for CombineParticles
+
+        The cuts are equal to LambdaDD and LambdaLL
+        """
+
+        # Xim StandardCuts as Lambda0 + Filters
+        _XimLLL = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts = {'pi+': '(P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)'},
+            CombinationCut = "(ADAMASS('Xi-')<50*MeV) & (ADOCACHI2CUT(30, ''))",
+            MotherCut = "(ADMASS('Xi-')<35*MeV) & (VFASPF(VCHI2)<30) & {0}".format(LLLFilter),
+        )
+
+        _XimDDD = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts = {'pi+': '(P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)'},
+            CombinationCut = "(ADAMASS('Xi-')<80*MeV) & (ADOCACHI2CUT(25, ''))",
+            MotherCut = "(ADMASS('Xi-')<64*MeV) & (VFASPF(VCHI2)<25) & {0}".format(DDDFilter),
+        )
+
+        _XimDDL = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            DaughtersCuts = {'pi+': '(P>2*GeV) & (MIPCHI2DV(PRIMARY)>4)'},
+            CombinationCut = "(ADAMASS('Xi-')<80*MeV) & (ADOCACHI2CUT(25, ''))",
+            MotherCut = "(ADMASS('Xi-')<64*MeV) & (VFASPF(VCHI2)<25) & {0}".format(DDLFilter),
+        )
+
+        selXimLLL = Selection(
+            'XimLLLFor{0}'.format(name),
+            Algorithm=_XimLLL,
+            RequiredSelections=inputSelLLL
+        )
+        selXimDDD = Selection(
+            'XimDDDFor{0}'.format(name),
+            Algorithm=_XimDDD,
+            RequiredSelections=inputSelDDD
+        )
+        selXimDDL = Selection(
+            'XimDDLFor{0}'.format(name),
+            Algorithm=_XimDDL,
+            RequiredSelections=inputSelDDL
+        )
+
+        
+        return {'LLL':selXimLLL,'DDD':selXimDDD,'DDL':selXimDDL}
+
+    def makeLambdac2VHH(self, name, inputSelLLL, inputSelDDD, inputSelDDL, decDescriptors):
+        """Return two Selection instances for a Lambda_c+ -> V- h+ h+ decay.
+
+        The return value is a dictionary of Selection instances as
+            {'LLL': LLL Selection, 'DDD': DDD Selection, 'DDL': DDL Selection}
+        depending on how the V has been reconstructed.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLLL -- List of inputs passed to Selection.RequiredSelections
+                       for the LLL Selection
+        inputSelDDD -- List of inputs passed to Selection.RequiredSelections
+                       for the DDD Selection
+        inputSelDDL -- List of inputs passed to Selection.RequiredSelections
+                       for the DDL Selection
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        combCuts = (
+            "(ADAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            "& (ADOCA(1,3) < {0[Comb_ADOCAMAX_MAX]})"
+        ).format(self.config)
+
+        lambdacCuts = (
+            "(VFASPF(VCHI2/VDOF) < {0[Lambdac_VCHI2VDOF_MAX]})"
+            "& ({0[Lambdac_PVDispCut]})"
+            "& (BPVDIRA > cos({0[Lambdac_acosBPVDIRA_MAX]}))"
+            "& (ADMASS('Lambda_c+') < {0[Lambdac_ADMASS_WIN]})"
+        ).format(self.config)
+
+        comb12Cuts = (
+            "(DAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ADOCA(1,2) < {0[Comb_ADOCAMAX_MAX]})"
+            ).format(self.config)
+
+        _Lambdac = DaVinci__N3BodyDecays(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=lambdacCuts,
+            Combination12Cut=comb12Cuts,
+        )
+
+        selLLL = Selection(
+            '{0}LLL'.format(name),
+            Algorithm=_Lambdac,
+            RequiredSelections=inputSelLLL
+        )
+        selDDD = Selection(
+            '{0}DDD'.format(name),
+            Algorithm=_Lambdac,
+            RequiredSelections=inputSelDDD
+        )
+        selDDL = Selection(
+            '{0}DDL'.format(name),
+            Algorithm=_Lambdac,
+            RequiredSelections=inputSelDDL
+        )
+        
+        return {'LLL': selLLL, 'DDD': selDDD, 'DDL': selDDL}
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdacForNeutronPID.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdacForNeutronPID.py
new file mode 100644
index 000000000..d31da12e5
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLambdacForNeutronPID.py
@@ -0,0 +1,226 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of LmbdacForNeutronPID Stripping Selections and StrippingLines.
+Provides functions to build Lc, Sigmac selections.
+Provides class LambdacForNeutronPIDConf, which constructs the Selections and
+StrippingLines given a configuration dictionary.
+Exported selection makers: 'makeLc', 'makeSigmac', 'makeSigmacWS',
+
+"""
+
+__author__  = ['Marco Pappagallo']
+__date__    = '17/03/2021'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('LambdacForNeutronPIDConf',
+           'makeLc',
+           'makeSigmac',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.PhysicalConstants import c_light
+
+default_config = {
+    'NAME'              : 'LambdacForNeutronPID',
+    'BUILDERTYPE'       : 'LambdacForNeutronPIDConf',
+    'CONFIG'    : {
+                        #Lc*
+                        'MinTrackPT'         : 400.      # MeV
+                        ,'MinNeutronPT'      : 400.      # MeV
+                        ,'TrGhostProb'       : 0.3       # Dimensionless
+                        ,'MinTrackIPchi2'    : 9         # Dimensionless
+                        ,'KaonPID'           : 5.        # Dimensionless
+                        ,'PionPID'           : 0.        # Dimensionless
+                        ,'MinLcMass'         : 1400      # MeV
+                        ,'MaxLcMass'         : 2200      # MeV
+                        ,'ctau'              : 0.1       # mm
+                        ,'MinLcPT'           : 4000      # MeV
+                        ,'MaxLcVertChi2DOF'  : 16        # Dimensionless 
+                        #Sigmac
+                        ,'MaxTrackIPchi2'       : 9         # Dimensionless
+                        ,'MinPionPT'            : 250       # MeV
+                        ,'SigmacPT'             : 0         # MeV 
+                        ,'QValueSigmacDecay'    : 120        # MeV
+                        ,'MaxSigmacVertChi2DOF' : 16         # Dimensionless 
+                        # Pre- and postscales
+                        ,'LambdacForNeutronPIDPreScale'     : 1.0
+                        ,'LambdacForNeutronPIDPostScale'    : 1.0
+                        },
+    'STREAMS' : [ 'Charm' ],
+    'WGs'    : [ 'Charm' ]
+    }
+
+
+class LambdacForNeutronPIDConf(LineBuilder):
+    """
+    Definition of Sigmac -> Lambdac pi+-, Lambdac -> n K- pi+ pi+ stripping
+    
+    Constructs Sigmac -> Lambdac pi+- Selections and StrippingLines from
+    a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> gammaConf = StrippingB2XGammaConf('StrippingB2XGammaTest',config)
+    >>> gammaLines = gammaConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selLc                           : nominal Lc -> K pi Selection object
+    selSigmac                       : nominal Sigmac -> Lc pi- Selection object 
+    selSigmacWS                     : nominal Sigmac -> Lc pi+ Selection object
+    lines                  : List of lines
+
+    Exports as class data member:
+    StrippingB2XGammaConf.__configuration_keys__ : List of required configuration parameters.    
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        # if name not set outside, set it to empty
+        #if name == None:
+        #    name = ""   
+
+        # Selection of Lc and Sigmac
+
+        self.selLc  = makeLc('LcFor%s' % name,
+                             config['KaonPID'],
+                             config['PionPID'],
+                             config['TrGhostProb'],
+                             config['MinTrackPT'],
+                             config['MinNeutronPT'],
+                             config['MinTrackIPchi2'],
+                             config['MinLcMass'],
+                             config['MaxLcMass'],
+                             config['MinLcPT'],
+                             config['MaxLcVertChi2DOF'],
+                             config['ctau']
+                             )
+
+        self.selSigmac = makeSigmac('Sigmac02LcpiFor%s' % name,
+                                    self.selLc,
+                                    '[Sigma_c0 -> Lambda_c+ pi-]cc', #DecayDescriptor
+                                    config['TrGhostProb'],
+                                    config['MinPionPT'],
+                                    config['MaxTrackIPchi2'],
+                                    config['SigmacPT'],
+                                    config['QValueSigmacDecay'],
+                                    config['MaxSigmacVertChi2DOF'],
+                                    config['PionPID'])
+        
+        self.selSigmacWS = makeSigmac('Sigmacpp2LcpiFor%s' % name,
+                                      self.selLc,
+                                      '[Sigma_c++ -> Lambda_c+ pi+]cc', #DecayDescriptor
+                                      config['TrGhostProb'],
+                                      config['MinPionPT'],
+                                      config['MaxTrackIPchi2'],
+                                      config['SigmacPT'],
+                                      config['QValueSigmacDecay'],
+                                      config['MaxSigmacVertChi2DOF'],
+                                      config['PionPID'])
+
+        # Create and register stripping lines
+        ## Rate is too high
+        #        self.Lc2nKpipiLine = StrippingLine("%sLc2nKpipiLine" % name,
+        #                                             prescale =config['LambdacForNeutronPIDPreScale'],
+        #                                             postscale=config['LambdacForNeutronPIDPostScale'],
+        #                                             selection=self.selLc)
+        #        self.registerLine(self.Lc2nKpipiLine)
+        
+        self.Sigmac2LcpiLine = StrippingLine("%sSigmac02LcpiLine" % name,
+                                             prescale =config['LambdacForNeutronPIDPreScale'],
+                                             postscale=config['LambdacForNeutronPIDPostScale'],
+                                             selection=self.selSigmac)
+        self.registerLine(self.Sigmac2LcpiLine)
+
+        self.SigmacWS2LcpiLine = StrippingLine("%sSigmacpp2LcpiLine" % name,
+                                               prescale =config['LambdacForNeutronPIDPreScale'],
+                                               postscale=config['LambdacForNeutronPIDPostScale'],
+                                               selection=self.selSigmacWS)
+        self.registerLine(self.SigmacWS2LcpiLine)
+
+        
+def makeLc(name, KaonPID, PionPID, TrGhostProb, MinTrackPT, MinNeutronPT, MinTrackIPchi2, MinLcMass, MaxLcMass, MinLcPT, MaxLcVertChi2DOF, ctau) :
+    """
+    Create and return a Lc -> n K- pi+ pi+ Selection object
+    
+    @arg name: name of the Selection.
+    @arg KaonPID: PID of Kaon
+    @arg PionPID: PID of pion
+    @arg TrGhostProb: Ghost probability of pion/kaon
+    @arg MinTrackPT: PT of the tracks
+    @arg MinNeutronPT: PT of photon (used instead of neutron)
+    @arg MinTrackIPchi2: IPchi2 of tracks
+    @arg MinLcPT: Lc PT
+    @arg MaxLcVertChi2DOF: vertex chi2
+    @arg ctau: Lc ctau
+    @return: Selection object
+    
+    """
+
+    _daughterCutK  = "(TRGHOSTPROB<%(TrGhostProb)s) & (PT > %(MinTrackPT)s) & (MIPCHI2DV(PRIMARY) > %(MinTrackIPchi2)s) & (PIDK  > %(KaonPID)s)" % locals()
+    _daughterCutpi = "(TRGHOSTPROB<%(TrGhostProb)s) & (PT > %(MinTrackPT)s) & (MIPCHI2DV(PRIMARY) > %(MinTrackIPchi2)s) & (PIDK  < %(PionPID)s)" % locals()
+    _daughterCutn  = "(PT > %(MinNeutronPT)s)" % locals()
+    
+    _combinationCut = "(in_range( (%(MinLcMass)s*MeV-50*MeV), AM, (%(MaxLcMass)s*MeV+50*MeV))) & (APT > (%(MinLcPT)s*MeV-300*MeV))" % locals()
+    _motherCut      = "(in_range( (%(MinLcMass)s*MeV), M, (%(MaxLcMass)s*MeV))) & ((BPVLTIME(9)*c_light) >  %(ctau)s*mm) & (PT > %(MinLcPT)s*MeV) & (VFASPF(VCHI2/VDOF) < %(MaxLcVertChi2DOF)s)" % locals()
+    _Lc = CombineParticles(DecayDescriptor = "[Lambda_c+ ->  gamma K- pi+ pi+]cc",
+                             DaughtersCuts   = {"K+"    : _daughterCutK,
+                                                "pi+"   : _daughterCutpi,
+                                                "gamma" : _daughterCutn},
+                             CombinationCut  = _combinationCut,
+                             MotherCut       = _motherCut)
+    
+    _stdKaon = DataOnDemand(Location="Phys/StdAllLooseKaons/Particles")
+    _stdPion = DataOnDemand(Location="Phys/StdAllLoosePions/Particles")
+    _stdNeutron = DataOnDemand(Location="Phys/StdLooseAllPhotons/Particles")
+    
+    return Selection(name, Algorithm=_Lc, RequiredSelections=[_stdKaon, _stdPion, _stdNeutron])
+
+def makeSigmac(name, LcSel, DecDescr, TrGhostProb, MinPionPT, MaxTrackIPchi2, SigmacPT, QValueSigmacDecay, MaxSigmacVertChi2DOF, PionPID):
+    """
+    Create and return a Sigmac -> Lambda_c+ pi+- Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg LcSel: Lc selection.
+    @arg DecDescr: Decay descriptor
+    @arg TrGhostProb: Ghost probability of kaon
+    @arg MinPionPT: PT of soft pionn
+    @arg MaxTrackIPchi2: IPCHI2 soft pion
+    @arg SigmacPT: PT Sigmac
+    @arg QValueSigmacDecay: Mass difference m(Lcpi) - m(Lc) - m(pi)
+    @arg MaxSigmacVertChi2DOF: chi2/NDOF
+    @arg PionPID: Pion PID
+    @return: Selection object
+    """
+
+    #["[Sigma_c0 -> Lambda_c+ pi-]cc", "[Sigma_c++ -> Lambda_c+ pi+]cc"],
+
+    _daughterCutpi  = "(TRGHOSTPROB<%(TrGhostProb)s) & (PT > %(MinPionPT)s) & (MIPCHI2DV(PRIMARY) < %(MaxTrackIPchi2)s) & (PIDK  < %(PionPID)s)" % locals()
+    _combinationCut = "((AM-AM1-AM2) < (1.5*%(QValueSigmacDecay)s*MeV)) & (APT > (0.75*%(SigmacPT)s*MeV))" % locals()
+    _motherCut = "((M-M1-M2) < %(QValueSigmacDecay)s*MeV) & (VFASPF(VCHI2/VDOF) < %(MaxSigmacVertChi2DOF)s) & (PT > %(SigmacPT)s*MeV)" % locals()
+    _Sigmac = CombineParticles(DecayDescriptor  = DecDescr, 
+                               DaughtersCuts    = {"pi+" : _daughterCutpi},
+                               CombinationCut   = _combinationCut,
+                               MotherCut        = _motherCut)
+    
+    _stdPion = DataOnDemand(Location="Phys/StdAllLoosePions/Particles")
+    return Selection(name, Algorithm=_Sigmac, RequiredSelections=[LcSel, _stdPion])
+                                
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLc2L0DDpi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLc2L0DDpi.py
new file mode 100644
index 000000000..af2c22743
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLc2L0DDpi.py
@@ -0,0 +1,261 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of
+    [Lambda_c+ -> (Lambda0 -> p+ pi-) pi+]CC
+Throughout this file, 'Bachelor' refers to the child of the Lambda_c+ which is
+not part of the V0 decay, e.g. the proton in the [Lambda_c+ -> p+ KS0]CC decay.
+"""
+
+__author__ = ['Xiaopan Yang', 'Guiyun Ding', 'Yuehong Xie']
+
+__all__ = (
+    'default_config',
+    'StrippingLambdac2L0DDpiConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from Configurables import CombineParticles, FilterDesktop
+from StandardParticles import (
+    StdLooseLambdaLL,
+    StdLooseLambdaDD,
+    StdLoosePions
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME': 'Lambdac2L0DDpi', 
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingLambdac2L0DDpiConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum transverse momentum all Lc+ bachelors must satisfy
+        #'Bach_All_PT_MIN': 750.0*MeV,
+        'Bach_All_PT_MIN': 300.0*MeV,
+        # Minimum best primary vertex IP chi^2 all Lc+ bachelors must satisfy
+        'Bach_All_BPVIPCHI2_MIN': 4.0,
+        # Minimum Lc+ bachelor momentum
+        'Bach_P_MIN': 2.0*GeV,
+        # Maximum Lc+ bachelor momentum
+        'Bach_P_MAX': 100.0*GeV,
+        # Minimum Lc+ bachelor pseudorapidity
+        'Bach_ETA_MIN': 2.0,
+        # Maximum Lc+ bachelor pseudorapidity
+        'Bach_ETA_MAX': 5.0,
+        # Minimum Lc+ bachelor proton DLLp
+        'Proton_PIDpPIDpi_MIN': 7.0,
+        # Minimum Lc+ bachelor proton DLLp - DLLK
+        'Proton_PIDpPIDK_MIN': 2.0,
+        # Maximum Lc+ bachelor pion DLLK
+        'Pi_PIDK_MAX': 3.0,
+        # Minimum L0 momentum
+        'Lambda0_P_MIN': 2000*MeV,
+        # Minimum L0 transverse momentum
+        # 'Lambda0_PT_MIN': 500*MeV,
+        'Lambda0_PT_MIN': 500*MeV,
+        # Minimum flight distance chi^2 of L0 from the primary vertex
+        'Lambda0_FDCHI2_MIN': 100,
+        # Maximum L0 vertex chi^2 per vertex fit DoF
+        'Lambda0_VCHI2VDOF_MAX': 10.0,
+        # Lc+ mass window around the nominal Lc+ mass before the vertex fit
+        'Comb_ADAMASS_WIN': 90.0*MeV,
+        # Maximum distance of closest approach of Lc+ children
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Maximum Lc+ vertex chi^2 per vertex fit DoF
+        'Lambdac_VCHI2VDOF_MAX': 10.0,
+        # Maximum angle between Lc+ momentum and Lc+ direction of flight
+        'Lambdac_acosBPVDIRA_MAX': 140.0*mrad,
+        # Primary vertex displacement requirement, either that the Lc+ is some
+        # sigma away from the PV, or it has a minimum flight time
+        'Lambdac_PVDispCut': '(BPVVDCHI2 > 16.0)',
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleLambdac2Lambda0PiLL': 1.0,
+        'PrescaleLambdac2Lambda0PiDD': 1.0,
+        # Fraction of candidates to randomly throw after before stripping
+        'PostscaleLambdac2Lambda0PiLL': 1.0,
+        'PostscaleLambdac2Lambda0PiDD': 1.0,
+    }
+}
+
+
+class StrippingLambdac2L0DDpiConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    Lambdac2Lambda0Pi = ['[Lambda_c+ -> Lambda0 pi+]cc']
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        # Line names
+        # 'LL' and 'DD' will be appended to these names for the LL and DD
+        # Selection and StrippingLine instances
+        Lambdac2Lambda0Pi_name = '{0}Lambdac2Lambda0Pi'.format(name)
+
+        # Build bachelor pion, kaon, and proton cut strings
+        childCuts = (
+            '(PT > {0[Bach_All_PT_MIN]})'
+            '& (BPVIPCHI2() > {0[Bach_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+        pidFiducialCuts = (
+            '(in_range({0[Bach_P_MIN]}, P, {0[Bach_P_MAX]}))'
+            '& (in_range({0[Bach_ETA_MIN]}, ETA, {0[Bach_ETA_MAX]}))'
+        ).format(self.config)
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDK - PIDpi) < {0[Pi_PIDK_MAX]})'
+        ).format(self.config)
+        pionCuts = '{0} & {1}'.format(childCuts, pionPIDCuts)
+
+        # Build Lambda0 and KS0 cut strings
+        lambda0Cuts = (
+            '(P > {0[Lambda0_P_MIN]})'
+            '& (PT > {0[Lambda0_PT_MIN]})'
+            '& (BPVVDCHI2 > {0[Lambda0_FDCHI2_MIN]})'
+            '& (VFASPF(VCHI2/VDOF) < {0[Lambda0_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+        # Define any additional cuts on LL/DD difference
+        lambda0LLCuts = lambda0Cuts
+        lambda0DDCuts = lambda0Cuts
+
+        # Filter StdLoose particles
+        self.inPions = Selection(
+            'PionsFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterPionsFor{0}'.format(name),
+                Code=pionCuts
+            ),
+            RequiredSelections=[StdLoosePions]
+        )
+        self.inLambda0LL = Selection(
+            'Lambda0LLFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterLambda0LLFor{0}'.format(name),
+                Code=lambda0LLCuts
+            ),
+            RequiredSelections=[StdLooseLambdaLL]
+        )
+        self.inLambda0DD = Selection(
+            'Lambda0DDFor{0}'.format(name),
+            Algorithm=FilterDesktop(
+                'FilterLambda0DDFor{0}'.format(name),
+                Code=lambda0DDCuts
+            ),
+            RequiredSelections=[StdLooseLambdaDD]
+        )
+
+        self.selLambdac2Lambda0Pi = self.makeLambdac2V0H(
+            name=Lambdac2Lambda0Pi_name,
+            inputSelLL=[self.inLambda0LL, self.inPions],
+            inputSelDD=[self.inLambda0DD, self.inPions],
+            decDescriptors=self.Lambdac2Lambda0Pi
+        )
+
+        self.line_Lambdac2Lambda0PiLL = self.make_line(
+            name='{0}LLLine'.format(Lambdac2Lambda0Pi_name),
+            selection=self.selLambdac2Lambda0Pi[0],
+            prescale=config['PrescaleLambdac2Lambda0PiLL'],
+            postscale=config['PostscaleLambdac2Lambda0PiLL'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+        self.line_Lambdac2Lambda0PiDD = self.make_line(
+            name='{0}DDLine'.format(Lambdac2Lambda0Pi_name),
+            selection=self.selLambdac2Lambda0Pi[1],
+            prescale=config['PrescaleLambdac2Lambda0PiDD'],
+            postscale=config['PostscaleLambdac2Lambda0PiDD'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeLambdac2V0H(self, name, inputSelLL, inputSelDD, decDescriptors):
+        """Return two Selection instances for a Lambda_c+ -> V0 h+ decay.
+
+        The return value is a two-tuple of Selection instances as
+            (LL Selection, DD Selection)
+        where LL and DD are the method of reconstruction for the V0.
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSelLL -- List of inputs passed to Selection.RequiredSelections
+                      for the LL Selection
+        inputSelDD -- List of inputs passed to Selection.RequiredSelections
+                      for the DD Selection
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        combCuts = (
+            "(ADAMASS('Lambda_c+') < {0[Comb_ADAMASS_WIN]})"
+            "& (ACUTDOCA({0[Comb_ADOCAMAX_MAX]}, ''))"
+        ).format(self.config)
+
+        lambdacCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[Lambdac_VCHI2VDOF_MAX]})'
+            '& ({0[Lambdac_PVDispCut]})'
+            '& (BPVDIRA > cos({0[Lambdac_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+
+        _Lambdac = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=lambdacCuts
+        )
+
+        selLL = Selection(
+            '{0}LL'.format(name),
+            Algorithm=_Lambdac,
+            RequiredSelections=inputSelLL
+        )
+        selDD = Selection(
+            '{0}DD'.format(name),
+            Algorithm=_Lambdac,
+            RequiredSelections=inputSelDD
+        )
+        return selLL, selDD
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLc2L0LLpi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLc2L0LLpi.py
new file mode 100644
index 000000000..99e34f63a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingLc2L0LLpi.py
@@ -0,0 +1,190 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting Lambda_c+->Lambda pi+
+'''
+
+__author__=['Guiyun Ding', 'Jiesheng Yu', 'Yuehong Xie']
+__date__ = '28/11/2016'
+__version__= '$Revision: 2.0$'
+
+
+__all__ = (
+    'Lc2L0LLpiConf',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              :  'Lc2L0LLpi',
+    'BUILDERTYPE'       :  'Lc2L0LLpiConf',
+    'CONFIG'    : {
+        'ProtonCuts'      : "(P > 2000*MeV) & (MIPCHI2DV(PRIMARY) > 9.) ",
+        'PiminusCuts'      : "(PT > 50*MeV) & (P > 2000*MeV) & (MIPCHI2DV(PRIMARY) > 9.) ",
+        'PionCuts'      : "(PT > 400*MeV) & (MIPCHI2DV(PRIMARY) > 4.) & (BPVIPCHI2() > 4.0) & (in_range(2000.0*MeV, P, 100000.0)) & (in_range(2.0, ETA, 5.0)) & ((PIDK - PIDpi) < 3.0) ", 
+        #'PionCuts'      : "(PT > 100*MeV) & (P > 1000*MeV) & (MIPCHI2DV(PRIMARY) > 9.) ",
+        #'Lambda0ComAMCuts' : "(P > 2000.0*MeV) & (PT > 500.0*MeV) & (BPVVDCHI2 > 100) & (VFASPF(VCHI2/VDOF) < 10.0)",
+        'Lambda0MomN4Cuts' : """
+                           (VFASPF(VCHI2) < 30.) 
+                           & (ADMASS('Lambda0')<35*MeV) 
+                           & (P > 2000.0*MeV)
+                           & (PT > 500.0*MeV)
+                           & (BPVVDCHI2 > 100)
+                           & (VFASPF(VCHI2/VDOF) < 10.0)
+                           """,
+        'Lambda0ComCuts'   : "(ADAMASS('Lambda0')<50*MeV) & (ADOCACHI2CUT(30, ''))",
+        'LcComCuts'     : "(ADAMASS('Lambda_c+') < 90.0*MeV) & (ACUTDOCA(0.5, ''))",
+        'LcMomCuts'     : """
+                          (VFASPF(VCHI2/VDOF) < 10.) 
+                          & (BPVDIRA> 0.999) 
+                          & (BPVVDCHI2>16.)
+                          """,
+        'Prescale'      : 1.,
+        'RelatedInfoTools': [{
+                      'Type'              : 'RelInfoVertexIsolation',
+                      'Location'          : 'RelInfoVertexIsolation'
+                  }, {
+                      'Type'              : 'RelInfoVertexIsolationBDT',
+                      'Location'          : 'RelInfoVertexIsolationBDT'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 1.0,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                      'Location'          : 'RelInfoConeVariables_1.0'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 1.5,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                      'Location'          : 'RelInfoConeVariables_1.5'
+                  }, {
+                      'Type'              : 'RelInfoConeVariables',
+                      'ConeAngle'         : 2.0,
+                      "Variables" : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                      'Location'          : 'RelInfoConeVariables_2.0'
+                  }]        
+        },
+    'STREAMS'           : ['Charm' ],
+    'WGs'               : ['Charm'],
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+#from Configurables import DaVinci__N4BodyDecays
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+from PhysSelPython.Wrappers import MergedSelection
+from Configurables import LoKi__VoidFilter
+from StandardParticles import ( StdAllLoosePions, StdLooseProtons,
+                                StdLoosePions, StdNoPIDsUpPions )
+from StandardParticles import StdLooseAllPhotons, StdVeryLooseAllPhotons
+
+class Lc2L0LLpiConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+
+        self.SelPiminus = self.createSubSel( OutputList = self.name + "SelPiminus",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllLoosePions/Particles' ), 
+                                           Cuts = config['PiminusCuts']
+                                           )
+
+        self.SelPions = self.createSubSel( OutputList = self.name + "SelPions",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdAllLoosePions/Particles' ), 
+                                           Cuts = config['PionCuts']
+                                           )
+
+        self.SelProtons = self.createSubSel( OutputList = self.name + "SelProtons",
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLooseProtons/Particles' ), 
+                                           Cuts = config['ProtonCuts']
+                                           )
+
+        
+        #"""
+        #Lambda0
+        #"""
+        ## Both LL and DD 
+        #self.InputLambda0 = MergedSelection( self.name + "InputLambda0",
+        #                                RequiredSelections = [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles"),
+        #                                                      DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")] )
+
+        #self.SelLambda0 = self.createSubSel( OutputList = self.name + "SelLambda0",
+        #                                InputList = self.InputLambda0,
+        #                                Cuts = config['Lambda0Cuts'] ) 
+
+        #                                             
+
+        """
+        Lambda0-> p Pi
+        """
+        self.SelLambda02pPi = self.createCombinationSel( OutputList = self.name + "SelLambda02pPi",
+                                                        DaughterLists = [ self.SelPiminus, self.SelProtons],
+                                                        DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                                        PreVertexCuts  = config['Lambda0ComCuts'], 
+                                                        PostVertexCuts = config['Lambda0MomN4Cuts']
+                                                        )
+        """
+        Lc-> Lambda0 Pi 
+        """
+        self.SelLc2Lambda0Pi_pPiPi = self.createCombinationSel( OutputList = self.name + "SelLc2Lambda0Pi_pPiPi",
+                                                              DecayDescriptor = "[Lambda_c+ -> Lambda0 pi+]cc",
+                                                              DaughterLists = [ self.SelLambda02pPi, self.SelPions],                    
+                                                              PreVertexCuts  = config['LcComCuts'],
+                                                              PostVertexCuts = config['LcMomCuts'] )
+
+        self.SelLc2Lambda0Pi_pPiPiLine = StrippingLine( self.name + '_pPiPiLine',                                                
+                                                   prescale  = config['Prescale'],
+                                                 #  HLT       = config['HLTCuts'],
+                                                   algos     = [ self.SelLc2Lambda0Pi_pPiPi ],
+                                                   EnableFlavourTagging = False,
+                                                   MDSTFlag = False,
+                                                   RelatedInfoTools = self.config['RelatedInfoTools']                                                   
+                                                   )
+
+        self.registerLine( self.SelLc2Lambda0Pi_pPiPiLine )
+        
+        
+
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+
+    
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingNeutralCBaryons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingNeutralCBaryons.py
new file mode 100644
index 000000000..65e4490b8
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingNeutralCBaryons.py
@@ -0,0 +1,456 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+1)Xi_c0->Lz Ks
+2)Xi_c0->Lz K- pi+
+3)Xi_c0->Xi- pi+, Xi->Lz pi-, Lz->p pi
+4)Xi_c0->Xi- K+, Xi->Lz pi-, Lz->p pi
+5)Omega_c0 ->Omega- pi+, Omega-> Lz K-
+
+Update on 2021/02/08
+Added following decays:
+Xi_c0 -> p+ K-
+Omega+c0 -> Lambda KS0
+Omega_c0 -> p+ K-
+Omega_c0 -> Labda K- pi+
+'''
+
+
+__author__ = ['Xuesong Liu, Xiao-Rui Lyu, Zhenwei Yang', 'Miroslav Saur', 'Ziyi Wang']
+__date__ = '2021/03/19'
+__version__ = '$Revision: 1.1 $'
+__all__ = ('StrippingNeutralCBaryonsConf'
+           ,'default_config')
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons
+from StandardParticles import  StdAllLoosePions, StdAllLooseKaons, StdAllLooseProtons
+
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from PhysSelPython.Wrappers import MultiSelectionSequence
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, mm, picosecond
+
+
+default_name='NeutralCBaryons'
+    #### This is the dictionary of all tunable cuts ########
+default_config={
+      'NAME'        :   'NeutralCBaryons',
+      'WGs'         :   ['Charm'],
+      'BUILDERTYPE' : 'StrippingNeutralCBaryonsConf',
+      'STREAMS'     : ['Charm'],
+      'CONFIG'      : {
+                     'TRCHI2DOFMax'           : 3.0
+                   , 'PionPIDK'               :  10.0
+                   , 'KaonPIDK'               :  -5.0
+                   , 'ProtonPIDp'             : 5 #to be studied
+                   , 'ProtonPIDpK'            : -3
+                   , 'tight_ProtonPIDp'       : 7 #to be studied
+                   , 'tight_ProtonPIDppi'     :  5.0
+                   , 'tight_ProtonPIDpK'      :  0.0
+                   , 'tight_KaonPIDpi'        :  5.0
+                   , 'tight_KaonPIDK'         :  0.0
+                   , 'LambdaLLMinDecayTime'   :  5.0 * picosecond
+                   , 'LambdaLLVtxChi2Max'     :   5.0
+                   , 'LambdaDDVtxChi2Max'     :   5.0
+                   , 'LambdaLLMassWin'        : 5.7 * MeV
+                   , 'LambdaDDMassWin'        : 5.7 * MeV
+                   , 'LambdaLLMinVZ'          : -100. * mm
+                   , 'LambdaLLMaxVZ'          :  400. * mm
+                   , 'LambdaDDMinVZ'          :  400. * mm
+                   , 'LambdaDDMaxVZ'          : 2275. * mm
+                   , 'TrGhostProbMax'         :  0.25
+                   , 'ProbNNkMin'             :  0.10
+                   , 'ProbNNpMinLL'           :  0.10
+                   , 'ProbNNpMinDD'           :  0.05
+                   , 'Bachelor_PT_MIN'        : 50 * MeV
+                   , 'LambdaDeltaZ_MIN'       :  5.0 * mm
+                   , 'LambdaPr_PT_MIN'        : 500. * MeV
+                   , 'LambdaPi_PT_MIN'        : 100. * MeV
+      } ## end of 'CONFIG' 
+}  ## end of default_config
+
+#-------------------------------------------------------------------------------------------------------------
+class StrippingNeutralCBaryonsConf(LineBuilder) :
+        __configuration_keys__ = default_config['CONFIG'].keys()
+
+        def __init__(self, name, config) :
+            LineBuilder.__init__(self, name, config)
+            self.name = name
+            self.config = config
+
+            # take all long tracks - Long Protons
+            self.LongProtonsList = MergedSelection("LongProtonsFor" + self.name,
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLooseProtons/Particles")])
+
+            # take all long tracks - Long Pions
+            self.LongPionsList = MergedSelection("LongPionsFor" + self.name,
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")])
+
+            # take all long tracks - Long Kaons
+            self.LongKaonsList = MergedSelection("LongKaonsFor" + self.name,
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")])
+
+            # take all long tracks - Down Pions
+            self.DownstreamPionsList = MergedSelection("DownstreamPionsFor" + self.name,
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")])
+
+            # take all long tracks = Down Kaons
+            self.DownstreamKaonsList = MergedSelection("DownstreamKaonsFor" + self.name,
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseDownKaons/Particles")])
+
+            # Good tracks - Long Protons
+            self.GoodLongProtonsList = self.createSubSel( OutputList = "GoodLongProtonsFor" + self.name,
+                                                InputList = self.LongProtonsList,
+                                                Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                                " & (TRGHOSTPROB <%(TrGhostProbMax)s )" \
+                                                " & (PIDp > %(ProtonPIDp)s) "\
+                                                " & ((PIDp-PIDK)> %(ProtonPIDpK)s) " % self.config )
+
+            # Good tracks - Tight Protons
+            self.GoodTightProtonsList = self.createSubSel( OutputList = "GoodTightProtonsFor" + self.name,
+                                                InputList = self.LongProtonsList,
+                                                Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                                " & (TRGHOSTPROB <%(TrGhostProbMax)s )" \
+                                                " & (PIDp > %(tight_ProtonPIDp)s) "\
+                                                " & ((PIDp-PIDpi) > %(tight_ProtonPIDppi)s) "\
+                                                " & ((PIDp-PIDK)  > %(tight_ProtonPIDpK)s) " % self.config )
+            # Good tracks - Long Pions
+            self.GoodLongPionsList = self.createSubSel( OutputList = "GoodLongPionsFor" + self.name,
+                                                InputList = self.LongPionsList,
+                                                Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                                " & (TRGHOSTPROB <%(TrGhostProbMax)s )" \
+                                                " & (PIDK < %(PionPIDK)s )" % self.config )
+
+            # Good tracks - Long Kaons
+            self.GoodLongKaonsList = self.createSubSel( OutputList = "GoodLongKaonsFor" + self.name,
+                                                InputList = self.LongKaonsList,
+                                                Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                                " & (TRGHOSTPROB < %(TrGhostProbMax)s )" \
+                                                " & (PROBNNk > %(ProbNNkMin)s )" \
+                                                " & (PIDK > %(KaonPIDK)s )" % self.config )
+
+            # Good tracks - Tight Kaons
+            self.GoodTightKaonsList = self.createSubSel( OutputList = "GoodTightKaonsFor" + self.name,
+                                                InputList = self.LongKaonsList,
+                                                Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                                " & (TRGHOSTPROB < %(TrGhostProbMax)s )" \
+                                                " & (PROBNNk > %(ProbNNkMin)s )" \
+                                                " & ((PIDK-PIDpi)>%(tight_KaonPIDpi)s)"\
+                                                " & (PIDK > %(tight_KaonPIDK)s )" % self.config )
+
+            # Good tracks - Down Pions
+            self.GoodDownstreamPionsList = self.createSubSel( OutputList = "GoodDownstreamPionsFor" + self.name,
+                                                InputList = self.DownstreamPionsList,
+                                                Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                                " & (PIDK < %(PionPIDK)s )" % self.config )
+
+            # Good tracks - Down Kaons
+            self.GoodDownstreamKaonsList = self.createSubSel( OutputList = "GoodDownstreamKaonsFor" + self.name,
+                                                InputList = self.DownstreamKaonsList,
+                                                Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                                " & (PROBNNk > %(ProbNNkMin)s )" \
+                                                " & (PIDK > %(KaonPIDK)s )" % self.config )
+
+            self.LambdaListLooseDD = MergedSelection("StdLooseDDLambdaFor" + self.name,
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")])
+
+            self.LambdaListLooseLL = MergedSelection("StdLooseLLLambdaFor" + self.name,
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")])
+
+            self.LambdaListLL =  self.createSubSel(OutputList = "LambdaLLFor" + self.name,
+                                                 InputList = self.LambdaListLooseLL ,
+                                                 Cuts = "(MAXTREE('p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                                                 "& (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                                                 "& (MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMinLL)s ) "\
+                                                 "& (MINTREE('pi-'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                                                 "& (MINTREE('p+'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                                                 "& (ADMASS('Lambda0') < %(LambdaLLMassWin)s ) "
+                                                 "& (VFASPF(VCHI2/VDOF) < %(LambdaLLVtxChi2Max)s ) "\
+                                                 "& (VFASPF(VZ) > %(LambdaLLMinVZ)s ) " \
+                                                 "& (VFASPF(VZ) < %(LambdaLLMaxVZ)s ) " \
+                                                 "& (BPVLTIME() > %(LambdaLLMinDecayTime)s )" % self.config \
+                                                 )
+
+            self.LambdaListDD =  self.createSubSel(OutputList = "LambdaDDFor" + self.name,
+                                                 InputList = self.LambdaListLooseDD ,
+                                                 Cuts = "(MAXTREE('p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                                                 "& (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                                                 "& (MAXTREE('p+'==ABSID, PROBNNp) > %(ProbNNpMinDD)s ) "\
+                                                 "& (ADMASS('Lambda0') < %(LambdaDDMassWin)s ) " \
+                                                 "& (VFASPF(VCHI2/VDOF) <  %(LambdaDDVtxChi2Max)s ) "\
+                                                 "& (VFASPF(VZ) < %(LambdaDDMaxVZ)s ) " \
+                                                 "& (VFASPF(VZ) > %(LambdaDDMinVZ)s )" % self.config \
+                                                 )
+
+            self.LambdaList = MergedSelection("LambdaFor" + self.name,
+                                              RequiredSelections = [self.LambdaListLL, self.LambdaListDD]
+                                              )
+
+            self.KS0ListLooseDD = MergedSelection("StdLooseDDKS0For" + self.name,
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseKsDD/Particles")])
+
+            self.KS0ListLooseLL = MergedSelection("StdLooseLLKS0For" + self.name,
+                                                   RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseKsLL/Particles")])
+
+            self.KS0ListLL =  self.createSubSel(OutputList = "KS0LLFor" + self.name,
+                                                 InputList = self.KS0ListLooseLL ,
+                                                 Cuts = "(BPVVDZ > 0.0 * mm) " \
+                                                 "& (BPVVDZ < 2300.0 * mm) " \
+                                                 "& (BPVDIRA > 0.99995 ) " \
+                                                 "& (ADMASS('KS0') < 40.0 *MeV) " \
+                                                 "& (BPVVDCHI2> 100)" % self.config \
+                                                 )
+
+            self.KS0ListDD =  self.createSubSel(OutputList = "KS0DDFor" + self.name,
+                                                 InputList = self.KS0ListLooseDD ,
+                                                 Cuts = "(BPVVDZ > -1000.0 * mm) " \
+                                                 "& (BPVVDZ < 650.0 * mm) " \
+                                                 "& (BPVDIRA > 0.99997 ) " \
+                                                 "& (ADMASS('KS0') < 20.0 *MeV) " \
+                                                 "& (BPVVDCHI2> 100)" % self.config \
+                                                 )
+
+            self.KS0List = MergedSelection("KS0For" + self.name,
+                                              RequiredSelections = [self.KS0ListLL, self.KS0ListDD])
+
+            self.Xic0List = self.makeXic0()
+            self.Omegac0List = self.makeOmegac0()
+
+        #------------------------------------------------------------------------------------------
+        #------------------------------------------------------------------------------------------
+
+        def createSubSel( self, OutputList, InputList, Cuts ) :
+            '''create a selection using a FilterDesktop'''
+            filter = FilterDesktop(Code = Cuts)
+            return Selection( OutputList,
+                             Algorithm = filter,
+                             RequiredSelections = [ InputList ] )
+
+        def createCombinationSel( self, OutputList,
+                                 DecayDescriptor,
+                                 DaughterLists,
+                                 DaughterCuts = {} ,
+                                 PreVertexCuts = "ALL",
+                                 PostVertexCuts = "ALL" ) :
+            '''create a selection using a ParticleCombiner with a single decay descriptor'''
+            combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                        DaughtersCuts = DaughterCuts,
+                                        MotherCut = PostVertexCuts,
+                                        CombinationCut = PreVertexCuts,
+                                        ReFitPVs = True)
+            return Selection ( OutputList,
+                              Algorithm = combiner,
+                              RequiredSelections = DaughterLists)
+
+        def makeXic0( self ):
+            ''' Stripping Xi_c0->Lambda0 KS0'''
+            Xic02LambdaKS0 = self.createCombinationSel(OutputList = "Xic02LambdaKS0"+ self.name,
+                                                           DecayDescriptor = "[Xi_c0 -> Lambda0 KS0 ]cc",
+                                                           DaughterLists   = [self.LambdaList, self.KS0List],
+                                                           PreVertexCuts   = "(ADAMASS('Xi_c0') < 120 *MeV)",
+                                                           PostVertexCuts  = "(ADMASS('Xi_c0') < 90 *MeV) & (BPVVDCHI2 > 16.0) & (BPVDIRA >0.999) "
+                                                           )
+            Xic02LambdaKS0Line = StrippingLine( self.name + "Xic02LambdaKS0Line", algos = [ Xic02LambdaKS0 ], EnableFlavourTagging = True )
+            self.registerLine (Xic02LambdaKS0Line)
+
+            ''' Stripping Xi_c0->Lambda0 K- pi+'''
+            Xic02LambdaKpi = self.createCombinationSel(OutputList = "Xic02LambdaKpi"+ self.name,
+                                                           DecayDescriptor = "[Xi_c0 -> Lambda0 K- pi+ ]cc",
+                                                           DaughterLists   = [self.LambdaList, self.GoodLongKaonsList, self.GoodLongPionsList],
+                                                           DaughterCuts    = {"K-"      : " (MIPCHI2DV(PRIMARY)>4)",
+                                                                              "pi+"     : " (MIPCHI2DV(PRIMARY)>4)"},
+                                                           PreVertexCuts   = "(ADAMASS('Xi_c0') < 120 *MeV)",
+                                                           PostVertexCuts  = "(ADMASS('Xi_c0') < 90 *MeV) &(VFASPF(VCHI2/VDOF)< 12.) & (BPVVDCHI2 > 16.0) & (BPVDIRA >0.999) "
+                                                           )
+            Xic02LambdaKpiLine = StrippingLine( self.name + "Xic02LambdaKpiLine", algos = [ Xic02LambdaKpi ], EnableFlavourTagging = True )
+            self.registerLine (Xic02LambdaKpiLine)
+
+            ''' Stripping Xi_c- -> Lambda0(DD) pi-(Long)'''
+            Ximinus2LambdaPiDDL = self.createCombinationSel(OutputList = "Ximinus2LambdaPiDDL"+ self.name,
+                                                         DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                                                         DaughterLists   = [self.GoodLongPionsList, self.LambdaListDD],
+                                                         DaughterCuts    = {"pi-"      : "(MIPCHI2DV(PRIMARY)>4) "},
+                                                         PreVertexCuts   = "(ADAMASS('Xi-') < 80*MeV) & (ADOCACHI2CUT(30, ''))",
+                                                         PostVertexCuts  = "(ADMASS('Xi-')<64*MeV) & (VFASPF(VCHI2)<25) & (P> 2000*MeV) &(PT > 250*MeV) & (BPVVDCHI2 > 49.0 ) & (VFASPF(VCHI2/VDOF) < 12.0)"
+                                                         )
+
+            ''' Stripping Xi_c- -> Lambda0(LL) pi-(Long)'''
+            Ximinus2LambdaPiLLL = self.createCombinationSel(OutputList = "Ximinus2LambdaPiLLL"+ self.name,
+                                                         DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                                                         DaughterLists   = [self.GoodLongPionsList, self.LambdaListLL],
+                                                         DaughterCuts    = {"pi-"      : "(MIPCHI2DV(PRIMARY)>9)"},
+                                                         PreVertexCuts   = "(ADAMASS('Xi-') < 50*MeV) & (ADOCACHI2CUT(30, ''))",
+                                                         PostVertexCuts  = "(ADMASS('Xi-')<35*MeV) & (VFASPF(VCHI2)<25) & (P> 2000*MeV) &(PT > 250*MeV) & (BPVVDCHI2 > 49.0 ) & (VFASPF(VCHI2/VDOF) < 12.0)"
+                                                         )
+
+            ''' Stripping Xi_c- -> Lambda0(DD) pi-(Down)'''
+            Ximinus2LambdaPiDDD = self.createCombinationSel(OutputList = "Ximinus2LambdaPiDDD"+ self.name,
+                                                         DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                                                         DaughterLists   = [self.GoodDownstreamPionsList, self.LambdaListDD],
+                                                         DaughterCuts    = {"pi-"      : "(MIPCHI2DV(PRIMARY)>4) "},
+                                                         PreVertexCuts   = "(ADAMASS('Xi-') < 80*MeV) & (ADOCACHI2CUT(30, ''))",
+                                                         PostVertexCuts  = "(ADMASS('Xi-')<64*MeV) & (VFASPF(VCHI2)<25) & (P> 2000*MeV) &(PT > 250*MeV) & (BPVVDCHI2 > 49.0 ) & (VFASPF(VCHI2/VDOF) < 12.0)"
+                                                         )
+
+            ## Ximinus2LambdaPi is a "Selection" object; MergedSelection passes everything which gets to it
+            ## even when the output list is empty
+            Ximinus2LambdaPi = MergedSelection("Ximinus2LambdaPi"+self.name,
+                                               RequiredSelections = [Ximinus2LambdaPiLLL,Ximinus2LambdaPiDDL,Ximinus2LambdaPiDDD] )
+
+            ## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+            ## This one will pass all candidates
+            NullFilter= FilterDesktop(Code = "ALL")
+            ## Ximinus2Lambda2PiSelection is *also* a Selection, but it is "more selective" 
+            ## than  Ximinus2LambdaPi in the sense that it passes only events when something
+            ## is in the output list
+            Ximinus2LambdaPiSelection = Selection( "Ximinus2LambdaPiSelection"+self.name,
+                                                  Algorithm = NullFilter,
+                                                  RequiredSelections = [Ximinus2LambdaPi])
+
+            ''' Stripping Xi_c0 -> p+ K-'''
+            Xic02pK = self.createCombinationSel(OutputList = "Xic02pK"+ self.name,
+                                                         DecayDescriptor = "[Xi_c0 -> p+ K-]cc",
+                                                         DaughterLists   = [self.GoodTightProtonsList, self.GoodTightKaonsList],
+                                                         DaughterCuts    = {"K-"      : " (MIPCHI2DV(PRIMARY)>4)",
+                                                                            "p+"     : " (MIPCHI2DV(PRIMARY)>4)"},
+                                                         PreVertexCuts   = "(ADAMASS('Xi_c0') < 120 *MeV)",
+                                                         PostVertexCuts  = "(ADMASS('Xi_c0') < 90 *MeV) &(VFASPF(VCHI2/VDOF)< 12.) & (BPVVDCHI2 > 16.0) & (BPVDIRA >0.999) "
+                                                         )
+            #Xic02pKLine = StrippingLine( self.name + "Xic02pKLine", prescale = 0.5, algos = [ Xic02pK ], EnableFlavourTagging = True )
+            Xic02pKLine = StrippingLine( self.name + "Xic02pKLine", algos = [ Xic02pK ], EnableFlavourTagging = True )
+            self.registerLine (Xic02pKLine)
+
+            ''' Stripping Xi_c0->Xi- pi+'''
+            Xic02Xipi = self.createCombinationSel(OutputList = "Xic02Xipi"+ self.name,
+                                                         DecayDescriptor = "[Xi_c0 -> Xi- pi+]cc",
+                                                         DaughterLists   = [self.GoodLongPionsList, Ximinus2LambdaPiSelection],
+                                                         DaughterCuts    = {"pi+"      : "(PT> %(Bachelor_PT_MIN)s ) "% self.config},
+                                                         PreVertexCuts   = "(ADAMASS('Xi_c0') < 120 *MeV)",
+                                                         PostVertexCuts  = "(ADMASS('Xi_c0') < 90 *MeV) &(VFASPF(VCHI2/VDOF)< 12.) & (BPVVDCHI2 > 16.0) & (BPVDIRA >0.999) "
+                                                         )
+
+            Xic02XipiLine = StrippingLine( self.name + "Xic02XipiLine", algos = [ Xic02Xipi ], EnableFlavourTagging = True )
+            self.registerLine (Xic02XipiLine)
+
+            ''' Stripping Xi_c0->Xi- K+'''
+            Xic02XiK = self.createCombinationSel(OutputList = "Xic02XiK"+ self.name,
+                                                         DecayDescriptor = "[Xi_c0 -> Xi- K+]cc",
+                                                         DaughterLists   = [self.GoodLongKaonsList, Ximinus2LambdaPiSelection],
+                                                         DaughterCuts    = {"K+"      : "(PT> %(Bachelor_PT_MIN)s ) "% self.config},
+                                                         PreVertexCuts   = "(ADAMASS('Xi_c0') < 120 *MeV)",
+                                                         PostVertexCuts  = "(ADMASS('Xi_c0') < 90 *MeV) &(VFASPF(VCHI2/VDOF)< 12.) & (BPVVDCHI2 > 16.0) & (BPVDIRA >0.999) "
+                                                         )
+
+            Xic02XiKLine = StrippingLine( self.name + "Xic02XiKLine", algos = [ Xic02XiK ], EnableFlavourTagging = True )
+            self.registerLine (Xic02XiKLine)
+
+        ##  --------------------  end of makeXiminus  ------------
+        #------------------------------------------------------------------------------------------
+
+        def makeOmegac0( self ):
+
+            ''' Make an Omega minus candidate '''
+            Omegaminus2LambdaKLLL = self.createCombinationSel(OutputList = "Omegaminus2LambdaKLLL"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+                                                           DaughterLists   = [self.GoodLongKaonsList, self.LambdaListLL],
+                                                           DaughterCuts    = {"K-"      : "(MIPCHI2DV(PRIMARY)>9) "},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < 50*MeV) & (ADOCACHI2CUT(30, ''))",
+                                                           PostVertexCuts  = "(ADMASS('Omega-')<35*MeV) & (VFASPF(VCHI2)<25) & (P> 2000*MeV) &(PT > 250*MeV) & (BPVVDCHI2 > 49.0 ) & (VFASPF(VCHI2/VDOF) < 12.0)"
+                                                           )
+
+            ''' Make an Omega minus candidate '''
+            Omegaminus2LambdaKDDL = self.createCombinationSel(OutputList = "Omegaminus2LambdaKDDL"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+                                                           DaughterLists   = [self.GoodLongKaonsList, self.LambdaListDD],
+                                                           DaughterCuts    = {"K-"      : "(MIPCHI2DV(PRIMARY)>4) "},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < 80*MeV) & (ADOCACHI2CUT(30, ''))",
+                                                           PostVertexCuts  = "(ADMASS('Omega-')<64*MeV) & (VFASPF(VCHI2)<25) & (P> 2000*MeV) &(PT > 250*MeV) & (BPVVDCHI2 > 49.0 ) & (VFASPF(VCHI2/VDOF) < 12.0)"
+                                                           )
+
+            ''' Make an Omega minus candidate '''
+            Omegaminus2LambdaKDDD = self.createCombinationSel(OutputList = "Omegaminus2LambdaKDDD"+ self.name,
+                                                         DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+                                                         DaughterLists   = [self.GoodDownstreamKaonsList, self.LambdaListDD],
+                                                         DaughterCuts    = {"K-"      : "(MIPCHI2DV(PRIMARY)>4) "},
+                                                         PreVertexCuts   = "(ADAMASS('Omega-') < 80*MeV) & (ADOCACHI2CUT(30, ''))",
+                                                         PostVertexCuts  = "(ADMASS('Omega-')<64*MeV) & (VFASPF(VCHI2)<25) & (P> 2000*MeV) &(PT > 250*MeV) & (BPVVDCHI2 > 49.0 ) & (VFASPF(VCHI2/VDOF) < 12.0)"
+                                                         )
+
+
+            ## Omegaminus2LambdaK is a "Selection" object; MergedSelection passes everything which gets to it
+            ## even when the output list is empty
+            Omegaminus2LambdaK = MergedSelection("Omegaminus2LambdaK"+self.name,
+                                                 RequiredSelections = [Omegaminus2LambdaKLLL,Omegaminus2LambdaKDDL,Omegaminus2LambdaKDDD] )
+
+            ## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+            ## This one will pass all candidates
+            NullFilter= FilterDesktop(Code = "ALL")
+            ## Omegaminus2Lambda2PiSelection is *also* a Selection, but it is "more selective" 
+            ## than  Omegaminus2LambdaK in the sense that it passes only events when something
+            ## is in the output list
+            Omegaminus2LambdaKSelection = Selection( "Omegaminus2LambdaKSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Omegaminus2LambdaK])
+
+            ''' Stripping Omega_c0->Omega- pi+'''
+            Omegac02Omegapi = self.createCombinationSel(OutputList = "Omegac02Omegapi"+ self.name,
+                                                           DecayDescriptor = "[Omega_c0 -> Omega- pi+]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, Omegaminus2LambdaKSelection],
+                                                           DaughterCuts    = {"pi+"      : "(PT> %(Bachelor_PT_MIN)s ) "% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega_c0') < 120 *MeV)",
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< 12.) & (BPVVDCHI2 > 16.0) & (BPVDIRA >0.999) & (ADMASS('Omega_c0') < 90 *MeV)"
+                                                           )
+
+            Omegac02OmegapiLine = StrippingLine( self.name + "Omegac02OmegapiLine", algos = [ Omegac02Omegapi ], EnableFlavourTagging = True )
+            self.registerLine (Omegac02OmegapiLine)
+
+            ''' Stripping Omega_c0-> p+- K-'''
+            Omegac02pK = self.createCombinationSel(OutputList = "Omegac02pK"+ self.name,
+                                                           DecayDescriptor = "[Omega_c0 -> p+ K-]cc",
+                                                           DaughterLists   = [self.GoodTightProtonsList, self.GoodTightKaonsList],
+                                                           DaughterCuts    = {"K-"      : " (MIPCHI2DV(PRIMARY)>4)",
+                                                                              "p+"     : " (MIPCHI2DV(PRIMARY)>4)"},
+                                                           PreVertexCuts   = "(ADAMASS('Omega_c0') < 120 *MeV)",
+                                                           PostVertexCuts  = "(ADMASS('Omega_c0')<35*MeV) & (VFASPF(VCHI2)<25) & (P> 2000*MeV) &(PT > 250*MeV) & (BPVVDCHI2 > 49.0 ) & (VFASPF(VCHI2/VDOF) < 12.0)"
+                                                           )
+
+            Omegac02pKLine = StrippingLine( self.name + "Omegac02pKLine", algos = [ Omegac02pK ], EnableFlavourTagging = True )
+            self.registerLine (Omegac02pKLine)
+
+
+            ## Code for Omega_c0 -> Lambda0 KS0; four relevant track classes: LL, LD, DL, DD - those are based on LambdaList and KS0List
+            Omegac02LambdaKS0 = self.createCombinationSel(OutputList = "Omegac02LambdaKS0"+ self.name,
+                                                         DecayDescriptor = "[Omega_c0 -> Lambda0 KS0 ]cc",
+                                                         DaughterLists   = [self.LambdaList, self.KS0List],
+                                                         PreVertexCuts   = "(ADAMASS('Omega_c0') < 120 *MeV)",
+                                                         PostVertexCuts  = "(ADMASS('Omega_c0') < 90 *MeV) & (BPVVDCHI2 > 16.0) & (BPVDIRA >0.999) "
+                                                         )
+            Omegac02LambdaKS0Line = StrippingLine( self.name + "Omegac02LambdaKS0Line", algos = [ Omegac02LambdaKS0 ], EnableFlavourTagging = True )
+            self.registerLine (Omegac02LambdaKS0Line)
+
+
+            ## Code for Omega_c0 -> Lambda0 K- pi+, two relevant track classed: LL, DD
+            Omegac02LambdaKpi = self.createCombinationSel(OutputList = "Omegac02LambdaKpi"+ self.name,
+                                                         DecayDescriptor = "[Omega_c0 -> Lambda0 K- pi+ ]cc",
+                                                         DaughterLists   = [self.LambdaList, self.GoodLongKaonsList, self.GoodLongPionsList],
+                                                         DaughterCuts    = {"K-"      : " (MIPCHI2DV(PRIMARY)>4)",
+                                                                            "pi+"     : " (MIPCHI2DV(PRIMARY)>4)"},
+                                                         PreVertexCuts   = "(ADAMASS('Omega_c0') < 120 *MeV)",
+                                                         PostVertexCuts  = "(ADMASS('Omega_c0') < 90 *MeV) &(VFASPF(VCHI2/VDOF)< 12.) & (BPVVDCHI2 > 16.0) & (BPVDIRA >0.999) "
+                                                         )
+            Omegac02LambdaKpiLine = StrippingLine( self.name + "Omegac02LambdaKpiLine", algos = [ Omegac02LambdaKpi ], EnableFlavourTagging = True )
+            self.registerLine (Omegac02LambdaKpiLine)
+        ## --------------------  end of makeOmegaminus  ------------
+        #------------------------------------------------------------------------------------------
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingPromptCharm.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingPromptCharm.py
new file mode 100644
index 000000000..241750a17
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingPromptCharm.py
@@ -0,0 +1,2477 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+## @file
+#
+#  The attempt for coherent stripping of all stable charm hadrons :
+#
+#    - D0        -> K pi ,
+#    - D+        -> K pi pi
+#    - Ds+/D+    -> ( phi -> K K ) pi
+#    - D*+       -> ( D0 -> K pi ) pi+
+#    
+#    - D0        -> KK, pipi                 ## for Eva 
+#    - D*+       ->  ( D0 -> KK , pipi) pi+  ## for Eva 
+#    
+#    - Lambda_c+/Xi_c -> p K pi              ## for Lesha Dziuba  
+#    - Lambda_c+/Xi_c -> p K K               ## for Lesha Dziuba 
+#    - Xic0           -> Lc+ pi-             ## for Lesha Dziuba 
+#    - Xi_c0          -> p K K pi            ## for Marco Pappagallo
+#    - Omega_c0       -> p K K pi            ## for Marco Pappagallo  
+# 
+#  Excited charm baryons 
+#
+#    - Sigma_c(0,++) -> Lambda_c+ pi        ( 2455 & 2520 )
+#    - Xi_c0*        -> Xi_c+ pi                            
+#    - Lambda_c+*    -> Lambda_c+ pi+ pi-   ( 2595, 2625 & 2880 )
+#    - Xi'_c+        -> Xi_c+ gamma          ## for Marco Pappagallo
+#    - Xi_c+*        -> Xi_c0 pi+            ## for Marco Pappagallo  
+#    - Omega_c0*     -> Lambda_c+/Xic+ K-    ## for Marco Pappagallo 
+#    - Omega_c0*     -> Xic0 pi+ K-          ## for Marco Pappagallo
+#    - Omega_c0*     -> Xic'+ K-             ## for Marco Pappagallo
+#    - Xi_c(2815)+   -> Lambda_c+ pi+ K-     ## for Marco Pappagallo 
+#    - Omega_cc+     -> Xic+ pi+ K-          ## for Marco Pappagallo
+#    - Omega_cc+     -> Xic+ K+ K-           ## for Marco Pappagallo
+#
+#  Also one has the combinations for 2xCharm studies
+#
+#    - Charm +   Charm            ( both Charm/Charm and Charm/anti-Charm )
+#    - Charm +   Dimuon
+#    - Charm + ( Dimuon + gamma ) ( get for free chi_(c,b) )
+#
+#  Associative production of  charm & W+ :
+#
+#    - Charm     & W+
+#    - dimuons   & W+
+#    - chi_(c,b) & W+
+#
+#  Triple charm (added Apr 6, 2k+17) :  
+#    - Charm  + Charm  + Charm  ( including Charm  + Charm + anti-Charm )
+#    - DiMuon + Charm  + Charm  ( including DiMuon + Charm + anti-Charm )
+#    - DiMuon + DiMuon + DiMuon
+# 
+#  The cuts more or less correspond to D*+ selection by Alexandr Kozlinzkiy.
+#  In addition the PT-cut for the long-lived charmed particle has been applied.
+#  Thanks to Marco Gersabeck & Harry Cliff for nice idea.
+#
+#
+# Usage:
+#
+# @code
+#
+#   stream = ...
+#
+#   from StrippingSelections.StirppingPromptCharm import StrippingPromptCharmConf
+#   from StrippingSelections.StirppingPromptCharm import default_config 
+#
+#   conf = default_config['CONFIG']
+#   name = default_config['NAME'  ]
+#   
+#   builder = StrippingPromptCharmConf ( name , config = conf )
+#
+#   stream.appendLines ( builder.lines() )
+#
+# @endcode
+#
+# @todo Increment PT-threshold for D0,D+,D_s+, Lambda_c+
+#
+# =============================================================================
+"""The attempt for coherent stripping of all stable charm hadrons :
+   
+    - D0        -> K pi ,
+    - D+        -> K pi pi
+    - Ds+/D+    -> ( phi -> K K ) pi
+    - D*+       -> ( D0 -> K pi ) pi+
+    
+    - D0        -> KK, pipi                 ## for Eva 
+    - D*+       ->  ( D0 -> KK , pipi) pi+  ## for Eva 
+    
+    - Lambda_c+/Xi_c -> p K pi              ## for Lesha Dziuba  
+    - Lambda_c+/Xi_c -> p K K               ## for Lesha Dziuba 
+
+    Excited charm baryons 
+
+    - Sigma_c(0,++) -> Lambda_c+ pi        ( 2455 & 2520 )
+    - Lambda_c+*    -> Lambda_c+ pi+ pi-   ( 2595, 2625 & 2880 )
+    
+    Also one has the combinations for 2xCharm studies
+    
+    - Charm +   Charm            ( both Charm/Charm and Charm/anti-Charm )
+    - Charm +   Dimuon
+    - Charm + ( Dimuon + gamma ) ( get for free chi_(c,b) )
+
+    Associative production of  charm & W+ :
+    
+    - Charm     & W+
+    - dimuons   & W+
+    - chi_(c,b) & W+
+
+  Usage:
+
+  stream = ...
+  
+  from StrippingSelections.StirppingPromptCharm import StrippingPromptCharmConf
+  from StrippingSelections.StirppingPromptCharm import default_config 
+  
+  conf = default_config['CONFIG']
+  name = default_config['NAME'  ]
+  
+  builder = StrippingPromptCharmConf ( name , config = conf )
+  
+  stream.appendLines ( builder.lines() )
+
+  
+"""
+# =============================================================================
+__author__  = 'Vanya BELYAEV Ivan.Belyaev@itep.ru'
+__date__    = '2010-08-03'
+__version__ = '$Revision: 177629 $'
+# =============================================================================
+__all__ = (
+    'StrippingPromptCharmConf',
+    'default_config' 
+    )
+# =============================================================================
+from Gaudi.Configuration import *
+from GaudiKernel.SystemOfUnits             import GeV, MeV, mm
+from StrippingUtils.Utils                  import LineBuilder
+# =============================================================================
+## logging
+# =============================================================================
+import logging
+logger = logging.getLogger(__name__)
+if not logger.handlers :
+    logging.basicConfig()
+logger.setLevel(logging.INFO)
+# =============================================================================
+## Define the default configuration
+_default_configuration_ = {
+    #
+    # use for simulation:
+    'NOPIDHADRONS'   : False   , 
+    #
+    ## PT-cuts
+    ## attention: with 1GeV pt-cut prescale is needed for D0,D+,D*+ and Ds
+    #
+    'pT(D0)'     :  1.0 * GeV ,    ## pt-cut for  prompt   D0
+    'pT(D+)'     :  1.0 * GeV ,    ## pt-cut for  prompt   D+
+    'pT(Ds+)'    :  1.0 * GeV ,    ## pt-cut for  prompt   Ds+
+    'pT(Lc+)'    :  1.0 * GeV ,    ## pt-cut for  prompt   Lc+
+    'pT(Xic0)'   :  1.0 * GeV ,    ## pt-cut for  prompt   Xic0/Omegac0
+    'pT(Omgcc)'  :  1.0 * GeV ,    ## pt-cut for  prompt   Omegacc
+    #
+    'pT(D0->HH)' :  1.0 * GeV ,    ## pt-cut for  prompt   D0->KK,pipi models 
+    #
+    # Selection of basic particles
+    #
+    'TrackCut' : """
+    ( CLONEDIST   > 5000      ) &
+    ( TRGHOSTPROB < 0.5       ) &
+    in_range ( 2  , ETA , 4.9 ) &
+    HASRICH
+    """ ,
+    # 
+    'PionCut'   : """
+    ( PT          > 250 * MeV ) & 
+    ( CLONEDIST   > 5000      ) & 
+    ( TRGHOSTPROB < 0.5       ) &
+    in_range ( 2          , ETA , 4.9       ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     &
+    ( MIPCHI2DV()  > 9        )
+    """ ,
+    #
+    'KaonCut'   : """
+    ( PT          > 250 * MeV ) & 
+    ( CLONEDIST   > 5000      ) & 
+    ( TRGHOSTPROB < 0.5       ) &
+    in_range ( 2          , ETA , 4.9       ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     &
+    ( MIPCHI2DV()  > 9        )
+    """ ,
+    #
+    'ProtonCut'   : """
+    ( PT           > 250 * MeV ) & 
+    ( CLONEDIST    > 5000      ) & 
+    ( TRGHOSTPROB  < 0.5       ) & 
+    in_range ( 2         , ETA , 4.9       ) &
+    in_range ( 10 * GeV  , P   , 150 * GeV ) &
+    HASRICH                      &
+    ( MIPCHI2DV()  > 9         ) 
+    """ ,
+    ##
+    'MuonCut'   : """
+    ISMUON &
+    in_range ( 2 , ETA , 4.9     ) &
+    ( PT            >  550 * MeV ) &
+    ( PIDmu - PIDpi >    0       ) &
+    ( CLONEDIST     > 5000       )     
+    """ ,
+    ## cust for prompt kaon
+    'PromptKaonCut'   : """
+    ( CLONEDIST   > 5000         ) & 
+    ( TRGHOSTPROB < 0.5          ) &
+    in_range ( 2          , ETA , 4.9       ) &
+    in_range ( 3.2 * GeV  , P   , 150 * GeV ) &
+    HASRICH                     
+    """ ,
+    #
+    ## PID-cuts for hadrons 
+    #
+    'PionPIDCut'   : " PROBNNpi > 0.1 " ,
+    'KaonPIDCut'   : " PROBNNk  > 0.1 " ,
+    'ProtonPIDCut' : " PROBNNp  > 0.1 " ,
+    'PhotonCLCut'  : 0.05,
+    ##
+    #
+    ## photons from chi_(c,b)
+    #
+    'GammaChi'        : " ( PT > 400 * MeV ) & ( CL > 0.05 ) " ,
+    #
+    ## W+- selection
+    #
+    'WCuts'           : " ( 'mu+'== ABSID ) & ( PT > 15 * GeV )" ,
+    #
+    # Global Event cuts
+    #
+    'CheckPV'         : True ,
+    #
+    # Technicalities:
+    #
+    'Preambulo'       : [
+    # the D0 decay channels
+    "pipi   = DECTREE ('[D0]cc -> pi- pi+   ') " ,
+    "kk     = DECTREE ('[D0]cc -> K-  K+    ') " ,
+    "kpi    = DECTREE ('[D0    -> K-  pi+]CC') " ,
+    # number of kaons in final state (as CombinationCuts)
+    "ak2    = 2 == ANUM( 'K+' == ABSID ) "       ,
+    # shortcut for chi2 of vertex fit
+    'chi2vx = VFASPF(VCHI2) '                    ,
+    # shortcut for the c*tau
+    "from GaudiKernel.PhysicalConstants import c_light" ,
+    "ctau     = BPVLTIME (   9 ) * c_light "  , ## use the embedded cut for chi2(LifetimeFit)<9
+    "ctau_9   = BPVLTIME (   9 ) * c_light "  , ## use the embedded cut for chi2(LifetimeFit)<9
+    "ctau_16  = BPVLTIME (  16 ) * c_light "  , ## use the embedded cut for chi2(LifetimeFit)<16
+    "ctau_25  = BPVLTIME (  25 ) * c_light "  , ## use the embedded cut for chi2(LifetimeFit)<25
+    "ctau_100 = BPVLTIME ( 100 ) * c_light "  , ## use the embedded cut for chi2(LifetimeFit)<100
+    "ctau_400 = BPVLTIME ( 400 ) * c_light "  , ## use the embedded cut for chi2(LifetimeFit)<400
+    "ctau_no  = BPVLTIME (     ) * c_light "  , ## no embedded cut for chi2(lifetimeFit)
+    # dimuons:
+    "psi           =   ADAMASS ('J/psi(1S)') < 150 * MeV"  ,
+    "psi_prime     =   ADAMASS (  'psi(2S)') < 150 * MeV"  ,
+    ] ,
+    # Q Values:
+    'QvalueXiCK'     :  600 * MeV ,
+    'QvalueXiCprime' :  250 * MeV ,
+    'QvalueXiCstar'  :  150 * MeV ,
+    'QvalueXiCPiK'   :  600 * MeV ,
+    'QvalueXiCprimeK':  600 * MeV ,
+    'QvalueLcPiK'    :  700 * MeV ,
+    'QvalueOmegaCC'  : 4500 * MeV ,
+    ## monitoring ?
+    'Monitor'     : False ,
+    ## pescales
+    'D0Prescale'                   : 0.3 ,
+    'D*Prescale'                   : 1.0 ,
+    'DsPrescale'                   : 0.7 ,
+    'D+Prescale'                   : 0.4 ,
+    'LambdaCPrescale'              : 1.0 ,
+    'LambdaCLooseChi2IPPrescale'   : 1.0 ,
+    'XiC0Prescale'                 : 1.0 ,
+    'OmegaC0Prescale'              : 1.0 ,
+    'LambdaCpKKPrescale'           : 1.0 ,
+    'LambdaC*Prescale'             : 1.0 ,
+    'OmegaC*Prescale'              : 1.0 ,
+    'XiCprimePrescale'             : 1.0 ,
+    'XiC*Prescale'                 : 1.0 ,
+    'OmegaC*2XiCPiKPrescale'       : 1.0 ,
+    'OmegaC*2XiCprimeKPrescale'    : 1.0 ,
+    'XiC**2LcPiKPrescale'          : 1.0 ,
+    'OmegaCCPrescale'              : 1.0 ,
+    'SigmaCPrescale'               : 1.0 ,
+    'Xic02LcPiPrescale'            : 1.0 ,
+    #
+    'OmegaCC2XiCKpiPrescale'       : 1.0 ,
+    'OmegaCC2XiCKKPrescale'        : 1.0 ,
+    ##
+    'D02KKPrescale'                : 1.0 ,
+    'D02pipiPrescale'              : 1.0 ,
+    'D*CPPrescale'                 : 1.0 ,
+    ##
+    'DiCharmPrescale'              : 1.0 ,
+    'DiMu&CharmPrescale'           : 1.0 ,
+    'DoubleDiMuonPrescale'         : 1.0 ,
+    'Chi&CharmPrescale'            : 1.0 ,
+    'Charm&WPrescale'              : 1.0 ,
+    'DiMuon&WPrescale'             : 1.0 ,
+    'Chi&WPrescale'                : 1.0 ,
+    ## triple charm & friends 
+    'TripleDiMuPrescale'           : 1.0 ,
+    'TriCharmPrescale'             : 1.0 ,
+    'DiMuonAndDiCharmPrescale'     : 1.0 ,
+    'DoubleDiMuonAndCharmPrescale' : 1.0 ,
+    ## ========================================================================
+    }
+# =============================================================================
+## the mandatory element for stripping framework 
+default_config = {
+    #
+    'NAME'        :   'PromptCharm'          ,
+    'WGs'         : [ 'BandQ' ] ,
+    'CONFIG'      : _default_configuration_  , 
+    'BUILDERTYPE' :   'StrippingPromptCharmConf'    ,
+    'STREAMS'     : {
+    'Charm'    : [
+    'StrippingD02KpiForPromptCharm'                 , 
+    'StrippingDstarForPromptCharm'                  , 
+    'StrippingDForPromptCharm'                      , 
+    'StrippingDsForPromptCharm'                     ,
+    'StrippingLambdaCForPromptCharm'                ,
+    'StrippingLambdaCLooseChi2IPForPromptCharm'     ,
+    'StrippingXiC0ForPromptCharm'                   ,
+    'StrippingLambdaC2pKKForPromptCharm'            ,
+    'StrippingSigmaCForPromptCharm'                 ,
+    'StrippingLambdaCstarForPromptCharm'            ,
+    'StrippingOmegaCstarForPromptCharm'             ,
+    'StrippingXiCprimeForPromptCharm'               ,
+    'StrippingXiCstarForPromptCharm'                ,
+    'StrippingOmegaCstar2XiCPiKForPromptCharm'      ,
+    'StrippingOmegaCstar2XiCprimeKForPromptCharm'   ,
+    'StrippingXiCstarstar2LambdaCPiKForPromptCharm' ,
+    'StrippingOmegaCC2XiCKpiForPromptCharm'         ,
+    'StrippingOmegaCC2XiCKKForPromptCharm'          ,
+    'StrippingXic02LcPiForPromptCharm'              ,
+    'StrippingChiAndCharmForPromptCharm'            ,
+    'StrippingCharmAndWForPromptCharm'              ,
+    'StrippingDiMuonAndCharmForPromptCharm'         ,
+    'StrippingDiCharmForPromptCharm'                ,  
+    ## triple charm and friends 
+    'StrippingTriCharmForPromptCharm'               , ## added 2017-04-06
+    'StrippingDiMuonAndDiCharmForPromptCharm'       , ## added 2017-04-06
+    'StrippingDoubleDiMuonAndCharmForPromptCharm'   , ## added 2017-04-06
+    ## for Eva
+    'StrippingD02KKForPromptCharm'                  , 
+    'StrippingD02pipiForPromptCharm'                ,
+    'StrippingDstarCPForPromptCharm'
+    ] , 
+    ##
+    'CharmCompleteEvent' : [
+    'StrippingOmegaC0ForPromptCharm'
+    ] ,
+    'Leptonic'           : [
+    'StrippingDiMuonAndWForPromptCharm'     ,
+    'StrippingChiAndWForPromptCharm'        ,
+    'StrippingDoubleDiMuonForPromptCharm'   , 
+    'StrippingTripleDiMuonForPromptCharm'   , ## added 2017-04-06
+    ]
+    } ## STREAM 
+    } ## CONFIG 
+
+## ============================================================================
+## @class  StrippingPromptCharmConf
+#  Helper class required by Tom & Greig
+#  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+#  @date 2010-09-26
+class StrippingPromptCharmConf(LineBuilder) :
+    """Helper class to confiugure 'PromptCharm'-lines
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    ## get the default configuration
+    @staticmethod
+    def defaultConfiguration( key = None ) :
+        """Get the defualt configurtaion
+
+        >>> conf = StrippingPromptCharmConf.defaultConfiguration()
+
+
+        Get the elements of default configurtaion:
+
+        >>> d0prescale = StrippingPromptCharmConf.defaultConfiguration( 'D0Prescale' )
+        """
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+        if key : return _config[ key ]
+        return _config
+
+    ## constructor
+    def __init__ ( self , name , config ) :
+        """
+        Constructor
+        """
+        # check the names
+        if not name : name = 'PromptCharm'
+        # check the names
+        if 'PromptCharm' != name :
+            logger.warning ( 'The non-default name is specified "%s"' % name  )
+
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+
+        if isinstance ( config , dict ):
+            _config.update ( config )
+            LineBuilder.__init__( self , name , _config )
+        else :
+            LineBuilder.__init__( self , name ,  config )
+
+        ## private set of selections
+        self.__selections_ = {}
+
+        LineBuilder.__init__( self , name , _config )
+
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {}
+
+        self.__selections_[ self.name() ]['CONFIG'] = deepcopy ( _config )
+
+        keys = _config.keys()
+        for key in keys :
+
+            if not key in _default_configuration_ :
+                raise KeyError ("Invalid key is specified: '%s'" % key )
+
+            val = _config[key]
+            if val != _default_configuration_ [ key ] :
+                logger.debug ('new configuration: %-16s : %s ' % ( key , _config[key] ) )
+
+        ## cehck for prescales
+        for keys in self.keys() :
+            if 0 > key.find('Prescale') and 0 > key.find('prescale') :  continue
+            if 1 != self[key] : logger.warning ( '%s is %s' % ( key , self[key] ) )
+
+        for line in self._lines_charm() :
+            self.registerLine(line)
+            logger.debug ( "Register line: %s" %  line.name () )
+
+    # =========================================================================
+    ## pure technical method for creation of selections
+    # =========================================================================
+    def make_selection ( self      ,
+                         tag       , 
+                         algotype  ,
+                         inputs    , 
+                         *args     ,
+                         **kwargs  ) :
+        """Technical method for creation of 1-step selections 
+        """
+        sel_tag  = '%s_Selection' % tag
+        sel_name = 'Sel%sFor%s'   % ( tag , self.name() )
+        #
+        ## check existing selection
+        #
+        sel      = self._selection ( sel_tag )
+        if sel : return sel 
+        
+        #
+        ## adjust a bit the arguments
+        if not kwargs.has_key('Preambulo')           :
+            kwargs ['Preambulo'        ] = self['Preambulo']
+
+        if not kwargs.has_key ( 'ParticleCombiners' ) :
+            kwargs ['ParticleCombiners'] = { '' : 'LoKi::VertexFitter:PUBLIC' }
+
+        #
+        ## use "simple-selection"
+        #
+        from PhysSelPython.Wrappers import SimpleSelection
+        sel = SimpleSelection (
+            sel_name ,
+            algotype ,
+            inputs   , 
+            *args    ,
+            **kwargs )
+        # 
+        return self._add_selection( sel_tag , sel ) 
+                           
+    ## get the selections
+    def _selections_private ( self ) :
+
+        sel = self._selection ( 'Selections' )
+        if sel : return sel
+
+        sel =  [ self.D02Kpi                 () ,
+                 self.Dstar                  () ,
+                 self.Ds                     () ,
+                 self.Dplus                  () ,
+                 self.preLamC                () ,
+                 self.LamC                   () ,
+                 self.LamCLooseChi2IP        () ,
+                 self.preXiC0                () ,
+                 self.XiC0                   () ,
+                 self.OmegaC0                () ,
+                 self.LamC2pKK               () ,
+                 self.SigC                   () ,
+                 self.LamCstar               () ,
+                 self.OmgCstar               () ,
+                 self.XiCprime               () ,
+                 self.XiCstar                () ,
+                 self.OmgCstar2XiCPiK        () ,
+                 self.OmgCstar2XiCprimeK     () ,
+                 self.XiCstarstar2LambdaCPiK () ,
+                 self.OmgCC2XicKpi           () ,
+                 self.OmgCC2XiCKK            () ,
+                 self.Xic02LcPi              () ,
+                 self.DiMuon                 () ,
+                 self.DiCharm                () ,
+                 self.DoubleDiMuon           () ,
+                 self.ChiAndCharm            () ,
+                 self.W                      () ,
+                 self.CharmAndW              () ,
+                 self.DiMuonAndW             () ,
+                 self.ChiAndW                () ,
+                 ## for Eva
+                 self.D02KK                  () ,
+                 self.D02pipi                () ,
+                 self.D02CP                  () ,
+                 self.DstarCP                () ,
+                 ## triple charm
+                 self.TripleDiMuon           () ,
+                 self.TriCharm               () ,
+                 self.DiMuonAndDiCharm       () ,
+                 self.DoubleDiMuonAndCharm   () ,
+                 ]
+
+        return self._add_selection ( 'Selections' , sel )
+
+    ## get the selection, associated with some nickname name
+    def _selection ( self , nick ) :
+        """
+        Get the selection, associated with some nickname name
+        """
+
+        if not self.__selections_.has_key ( self.name() ) :
+            self.__selections_[ self.name() ] = {}
+
+        return self.__selections_[ self.name() ].get( nick , None )
+
+    ## add the selection, associated with some nickname name
+    def _add_selection ( self , nick , sel ) :
+        """
+        add the selection, associated with some nickname name
+        """
+        if not self.__selections_.has_key ( self.name() ) : self.__selections_[ self.name() ] = {}
+
+        if self.__selections_[ self.name()].has_key( nick ) :
+            raise AttributeError , "Selection '%s'already exists " % nick
+
+        self.__selections_[ self.name() ][ nick ] = sel
+
+        return sel
+
+    ## get all single charm lines
+    def _lines_charm   ( self ) :
+        """
+        Get all (single) charm lines
+        """
+        sel = self._selection ( 'CharmLines' )
+        if sel : return sel
+        #
+        from StrippingConf.StrippingLine           import StrippingLine
+        #
+        sel = [
+            ##
+            StrippingLine (
+            "D02KpiFor" + self.name()         ,
+            prescale = self['D0Prescale'   ]  , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'      ]  ,
+            algos    =     [ self.D02Kpi() ]  ,
+            ) ,
+            ##
+            StrippingLine (
+            "DstarFor" + self.name() ,
+            prescale = self['D*Prescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'     ] ,
+            algos    =     [ self.Dstar() ]
+            ) ,
+            ##
+            StrippingLine (
+            "DFor" + self.name() ,
+            prescale = self['D+Prescale'   ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'      ] ,
+            algos    =     [ self.Dplus () ]
+            ) ,
+            ##
+            StrippingLine (
+            "DsFor" + self.name() ,
+            prescale = self['DsPrescale']    , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'   ]    ,
+            algos    =     [ self.Ds()  ]
+            ) ,
+            ##
+            StrippingLine (
+            "LambdaCFor" + self.name() ,
+            prescale = self['LambdaCPrescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'        ] ,
+            algos    =     [ self.LamC ()    ]
+            ) ,
+            ##
+            StrippingLine (
+            "LambdaCLooseChi2IPFor" + self.name()    ,
+            prescale = self['LambdaCLooseChi2IPPrescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'        ]       ,
+            algos    =     [ self.LamCLooseChi2IP () ]
+            ) ,
+            ## Xi_c0
+            StrippingLine (
+            "XiC0For" + self.name() ,
+            prescale = self['XiC0Prescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'        ] ,
+            algos    =     [ self.XiC0 ()    ]
+            ) ,
+            ## Omega_c0
+            StrippingLine (
+            "OmegaC0For" + self.name() ,
+            prescale = self['OmegaC0Prescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'        ] ,
+            algos    =     [ self.OmegaC0 () ]
+            ) ,
+            ##
+            StrippingLine (
+            "LambdaC2pKKFor" + self.name() ,
+            prescale = self['LambdaCpKKPrescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'            ] ,
+            algos    =     [ self.LamC2pKK ()    ]
+            ) ,
+            ## Sigma_c
+            StrippingLine (
+            "SigmaCFor" + self.name() ,
+            prescale = self['SigmaCPrescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'       ] ,
+            algos    =     [ self.SigC ()   ]
+            ) ,
+            ## Omega_c* -> Xic+ K-
+            StrippingLine (
+            "OmegaCstarFor" + self.name() ,
+            prescale = self['OmegaC*Prescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.OmgCstar () ]
+            ) ,
+            ## Xi'_c+
+            StrippingLine (
+            "XiCprimeFor" + self.name() ,
+            prescale = self['XiCprimePrescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.XiCprime () ]
+            ) ,
+            ## Xi*_c+
+            StrippingLine (
+            "XiCstarFor" + self.name() ,
+            prescale = self['XiC*Prescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.XiCstar () ]
+            ) ,
+            ## Omega_c* -> Xic0 pi+ K-
+            StrippingLine (
+            "OmegaCstar2XiCPiKFor" + self.name() ,
+            prescale = self['OmegaC*2XiCPiKPrescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.OmgCstar2XiCPiK () ]
+            ) ,
+            ## Omega_c* -> Xic+' K-
+            StrippingLine (
+            "OmegaCstar2XiCprimeKFor" + self.name() ,
+            prescale = self['OmegaC*2XiCprimeKPrescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.OmgCstar2XiCprimeK () ]
+            ) ,
+            ## Xi_c** -> Lc+ pi+ K-
+            StrippingLine (
+            "XiCstarstar2LambdaCPiKFor" + self.name() ,
+            prescale = self['XiC**2LcPiKPrescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.XiCstarstar2LambdaCPiK () ]
+            ) ,
+            ## Omega_cc -> Xic+  K- pi+
+            StrippingLine (
+            "OmegaCC2XiCKpiFor" + self.name() ,
+            prescale = self['OmegaCC2XiCKpiPrescale' ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'            ] ,
+            algos    =     [ self.OmgCC2XicKpi ()    ]
+            ) ,
+            ## Omega_cc -> Xic+  K- K+
+            StrippingLine (
+            "OmegaCC2XiCKKFor" + self.name() ,
+            prescale = self['OmegaCC2XiCKKPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'            ] ,
+            algos    =     [ self.OmgCC2XiCKK ()     ]
+            ) ,
+            ## Lambda_c*
+            StrippingLine (
+            "LambdaCstarFor" + self.name() ,
+            prescale = self['LambdaC*Prescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.LamCstar () ]
+            ) ,
+            ## Xic0 -> Lc pi 
+            StrippingLine (
+            "Xic02LcPiFor" + self.name() ,
+            prescale = self['Xic02LcPiPrescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'          ] ,
+            algos    =     [ self.Xic02LcPi () ]
+            ) ,
+            ## DiCharm
+            StrippingLine (
+            "DiCharmFor" + self.name() ,
+            prescale = self['DiCharmPrescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'        ] ,
+            algos    =     [ self.DiCharm () ] , 
+            MDSTFlag = False                          ## keep event in MDST.DST 
+            ) ,
+            ## TriCharm
+            StrippingLine (
+            "TriCharmFor" + self.name() ,
+            prescale = self['TriCharmPrescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.TriCharm () ] , 
+            MDSTFlag = False                          ## keep event in MDST.DST 
+            ) ,
+            ##
+            ## DiMuon+DiCharm
+            StrippingLine (
+            "DiMuonAndDiCharmFor" + self.name()       ,
+            prescale = self['DiMuonAndDiCharmPrescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'                 ] ,
+            algos    =     [ self.DiMuonAndDiCharm () ] , 
+            MDSTFlag = False                          ## keep event in MDST.DST 
+            ) ,
+            ##
+            StrippingLine (
+            "DiMuonAndCharmFor" + self.name()         ,
+            prescale = self['DiMu&CharmPrescale'    ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'               ] ,
+            algos    =     [ self.DiMuonAndCharm () ] ,
+            MDSTFlag = False                             ## keep event in MDST.DST 
+            ) ,
+            ##
+            StrippingLine (
+            "DoubleDiMuonFor" + self.name()         ,
+            prescale = self['DoubleDiMuonPrescale'] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'             ] ,
+            algos    =     [ self.DoubleDiMuon () ] , 
+            MDSTFlag = False                          ## keep event in MDST.DST 
+            ) ,
+            ##
+            StrippingLine (
+            "TripleDiMuonFor" + self.name()         ,
+            prescale = self['TripleDiMuPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'             ] ,
+            algos    =     [ self.TripleDiMuon () ] , 
+            MDSTFlag = False                          ## keep event in MDST.DST 
+            ) ,
+            ##
+            StrippingLine (
+            "DoubleDiMuonAndCharmFor" + self.name()         ,
+            prescale = self['DoubleDiMuonAndCharmPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'             ] ,
+            algos    =     [ self.DoubleDiMuonAndCharm () ] , 
+            MDSTFlag = False                          ## keep event in MDST.DST 
+            ) ,
+            ##
+            StrippingLine (
+            "ChiAndCharmFor" + self.name() ,
+            prescale = self['Chi&CharmPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'            ] ,
+            algos    =     [ self.ChiAndCharm () ] , 
+            MDSTFlag = False                          ## keep event in MDST.DST 
+            ) ,
+            ##
+            StrippingLine (
+            "CharmAndWFor" + self.name() ,
+            prescale   = self['Charm&WPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV    = self['CheckPV'          ] ,
+            algos      =     [ self.CharmAndW () ] , 
+            MDSTFlag   = False                        ## keep event in MDST.DST 
+            ) ,
+            ##
+            StrippingLine (
+            "DiMuonAndWFor" + self.name() ,
+            prescale   = self['DiMuon&WPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV    = self['CheckPV'           ] ,
+            algos      =     [ self.DiMuonAndW () ] ,
+            MDSTFlag   = False                         ## keep event in MDST.DST 
+            ) ,
+            ##
+            StrippingLine (
+            "ChiAndWFor" + self.name() ,
+            prescale   = self['Chi&WPrescale'  ] , ## ATTENTION! Prescale here !!
+            checkPV    = self['CheckPV'        ] ,
+            algos      =     [ self.ChiAndW () ] , 
+            MDSTFlag   = False                       ## keep event in MDST.DST 
+            ) ,
+            #
+            ## For Eva
+            #
+            ## D0 -> K- K+ 
+            StrippingLine (
+            "D02KKFor" + self.name() ,
+            prescale = self['D02KKPrescale'   ] ,  ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.D02KK ()    ]
+            ) ,
+            ## D0 -> pi- pi+ 
+            StrippingLine (
+            "D02pipiFor" + self.name() ,
+            prescale = self['D02pipiPrescale' ] ,  ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.D02pipi ()  ]
+            ) ,
+            ##
+            ## D*+ -> ( D0 -> K- K+ , pi- pi+ ) pi+
+            StrippingLine (
+            "DstarCPFor" + self.name() ,
+            prescale = self['D*CPPrescale'    ] ,  ## ATTENTION! Prescale here !!
+            checkPV  = self['CheckPV'         ] ,
+            algos    =     [ self.DstarCP ()  ]
+            ) ,
+            ]
+        #
+        return self._add_selection ( 'CharmLines' , sel )
+
+
+    ## get all stripping lines
+    def _lines_private ( self ) :
+        """
+        get Charm stripping lines
+        """
+        return self._lines_charm ()
+    
+    def muonCuts     ( self ) : return self [ 'MuonCut' ]
+    
+    # ========================================================================
+    ## muons:
+    # ========================================================================
+    def muons    ( self ) :
+        """
+        Muons 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from StandardParticles                     import StdAllLooseMuons as inpts 
+        ##
+        return self.make_selection (
+            'Muon'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = self['MuonCut'] ,
+            )
+
+    # ========================================================================
+    ## pions :
+    # ========================================================================
+    def pions    ( self ) :
+        """
+        Pions
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        ##
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdNoPIDsPions as inpts
+            pioncut = self['PionCut']
+        else                    :
+            from StandardParticles import StdLooseANNPions as inpts
+            pioncut = "(%s)&(%s)" % ( self['PionCut'] , self['PionPIDCut'] ) 
+        ##
+        return self.make_selection (
+            'Pion'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = pioncut         ,
+            )
+    
+    # ========================================================================
+    ## kaons 
+    # ========================================================================
+    def kaons     ( self ) :
+        """
+        Kaons for   B -> psi X lines 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        #
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdNoPIDsKaons as inpts
+            kaoncut = self['KaonCut']
+        else                    :
+            from StandardParticles import StdLooseANNKaons as inpts 
+            kaoncut = "(%s)&(%s)" % ( self['KaonCut'] , self['KaonPIDCut'] ) 
+        #
+        return self.make_selection (
+            'Kaon'                 ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = kaoncut         ,
+            )
+
+    # ========================================================================
+    ## protons :
+    # ========================================================================
+    def protons    ( self ) :
+        """Protons for   b -> psi X lines 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        ##
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdNoPIDsProtons as inpts
+            protoncut = self['ProtonCut']
+        else                    :
+            from StandardParticles import StdLooseANNProtons as inpts 
+            protoncut = "(%s)&(%s)" % ( self['ProtonCut'] , self['ProtonPIDCut'] ) 
+        ##
+        return self.make_selection (
+            'Proton'                 ,
+            FilterDesktop            ,
+            [ inpts ]                ,
+            Code = protoncut         ,
+            )
+    
+    # =========================================================================
+    ## Prompt slow pions for D*+, Sigma_c, Lambda_c**: essentially no cuts at all
+    # =========================================================================
+    def slowPions ( self ) :
+        """Prompt slow pions for D*+, Sigma_c, Lamda_c**, ...
+        - essentially no cuts at all
+        """
+        ##
+        if self['NOPIDHADRONS'] : from StandardParticles import StdAllNoPIDsPions   as slow_pions 
+        else                    : from StandardParticles import StdAllLooseANNPions as slow_pions  
+        ##
+        return slow_pions 
+    
+
+    # =========================================================================
+    ## prompt kaons fro Omega_c*
+    # =========================================================================
+    def promptKaons ( self ) :
+        """Prompt kaons for e.g. Omega_c* 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        #
+        if self['NOPIDHADRONS'] :
+            from StandardParticles import   StdAllNoPIDsKaons as inpts
+            kaoncut = self['PromptKaonCut']
+        else                    :
+            from StandardParticles import StdAllLooseANNKaons as inpts 
+            kaoncut = "(%s)&(%s)" % ( self['PromptKaonCut'] , self['KaonPIDCut'] ) 
+            #
+        return self.make_selection (
+            'PromptKaon'           ,
+            FilterDesktop          ,
+            [ inpts ]              ,
+            Code = kaoncut         ,
+            )
+    
+        
+    ## get the common preambulo:
+    def preambulo ( self ) : return self['Preambulo']
+    
+    
+    # =========================================================================
+    # D0 -> Kpi
+    # =============================================================================
+    def D02Kpi ( self ) :
+        """Get D0->K-pi+
+        """
+        #
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles 
+        #
+        ## D0 -> K- pi+ 
+        return self.make_selection (
+            'D02Kpi'       ,
+            ## the algorithm type
+            CombineParticles  ,
+            ## required selections
+            [ self.kaons() , self.pions() ]  ,
+            #
+            ## algorithm configuration
+            DecayDescriptor = "[D0  -> K-  pi+]cc",
+            ## combination cut : wide mass-cut & PT-cut
+            CombinationCut  = """
+            ( ADAMASS('D0') < 85 * MeV ) &
+            ( APT >  %s  )
+            """ %  ( 0.95 * self['pT(D0)'] ) ,
+            ## mother cut
+            MotherCut      = """
+            ( chi2vx < 9 )              &
+            ( PT     > %s             ) &
+            ( ADMASS('D0') < 75 * MeV ) &
+            ( ctau > 0.1 * mm )
+            """ %  self['pT(D0)'] 
+            )           
+    
+    # =============================================================================
+    # D0 -> KK
+    # =============================================================================
+    def D02KK ( self ) :
+        """Get D0->K-K+
+        """
+        #
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles 
+        #
+        ## D0 -> K- K+ 
+        return self.make_selection (
+            'D02KK'           ,
+            ## the algorithm type
+            CombineParticles  ,
+            ## required selections
+            [ self.kaons() ]  ,
+            #
+            ## algorithm configuration
+            DecayDescriptor = "D0  -> K- K+",
+            ## combination cut : wide mass-cut & PT-cut
+            CombinationCut  = """
+            ( ADAMASS('D0') < 85 * MeV ) &
+            ( APT >  %s  )
+            """ %  ( 0.95 * self['pT(D0->HH)'] ) ,
+            ## mother cut
+            MotherCut      = """
+            ( chi2vx < 9 )              &
+            ( PT     > %s             ) &
+            ( ADMASS('D0') < 75 * MeV ) &
+            ( ctau > 0.1 * mm )
+            """ %  self['pT(D0->HH)'] 
+            )           
+
+    # =============================================================================
+    # D0 -> pipi
+    # =============================================================================
+    def D02pipi ( self ) :
+        """Get D0->pi-pi+
+        """
+        #
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles 
+        #
+        ## D0 -> pi- pi+ 
+        return self.make_selection (
+            'D02pipi'           ,
+            ## the algorithm type
+            CombineParticles  ,
+            ## required selections
+            [ self.pions() ]  ,
+            #
+            ## algorithm configuration
+            DecayDescriptor = "D0  -> pi- pi+",
+            ## combination cut : wide mass-cut & PT-cut
+            CombinationCut  = """
+            ( ADAMASS('D0') < 85 * MeV ) &
+            ( APT >  %s  )
+            """ %  ( 0.95 * self['pT(D0->HH)'] ) ,
+            ## mother cut
+            MotherCut      = """
+            ( chi2vx < 9 )              &
+            ( PT     > %s             ) &
+            ( ADMASS('D0') < 75 * MeV ) &
+            ( ctau > 0.1 * mm )
+            """ %  self['pT(D0->HH)'] 
+            )           
+    
+    # =============================================================================
+    # Merged selection of D0 -> KK and D0 -> pi pi
+    # =============================================================================
+    def D02CP ( self ) :
+        """Merged selection of D0 -> KK and D0 -> pi pi
+        """
+        tag      = "D02CP"
+        ##
+        sel_tag  = '%s_Selection' % tag
+        sel_name = 'Sel%sFor%s'   % ( tag , self.name() )
+        #
+        ## check existing selection
+        #
+        sel      = self._selection ( sel_tag )
+        if sel : return sel
+        #
+        ## make merged selections 
+        from PhysSelPython.Wrappers import MergedSelection
+        sel = MergedSelection (
+            sel_name , RequiredSelections = [ self.D02KK() , self.D02pipi() ] 
+            )
+        # 
+        return self._add_selection( sel_tag , sel ) 
+    
+    # =============================================================================
+    # D*+ -> (D0 -> Kpi) pi+ selection
+    # =============================================================================
+    def Dstar ( self ) :
+        """D*+ -> (D0 -> K- pi+) pi+ selection
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ##
+        return self.make_selection (
+            'Dstar'                   ,
+            CombineParticles          ,
+            [ self.D02Kpi() , self.slowPions() ] ,
+            #
+            ## algorithm properties 
+            #
+            DecayDescriptor = " [D*(2010)+ -> D0 pi+]cc" ,
+            ##
+            CombinationCut = """
+            ( AM       < 2.5 * GeV ) &
+            ( AM - AM1 < 165 * MeV )
+            """ ,
+            ##
+            MotherCut      = """
+            ( chi2vx < 64        ) &
+            ( M - M1 < 155 * MeV )
+            """ 
+            )
+    
+    # =============================================================================
+    # D*+ -> (D0 -> KK, pipi) pi+ selection
+    # =============================================================================
+    def DstarCP ( self ) :
+        """D*+ -> (D0 -> K- K+ , pi- p+ ) pi+ selection
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ##
+        return self.make_selection (
+            'DstarCP'                ,
+            CombineParticles         ,
+            [ self.D02CP() , self.slowPions() ] ,
+            #
+            ## algorithm properties 
+            #
+            DecayDescriptors = [
+            " D*(2010)+ -> D0 pi+ " , 
+            " D*(2010)- -> D0 pi- " , 
+            ] ,
+            ##
+            CombinationCut = """
+            ( AM       < 2.5 * GeV ) &
+            ( AM - AM1 < 165 * MeV )
+            """ ,
+            ##
+            MotherCut      = """
+            ( chi2vx < 64        ) &
+            ( M - M1 < 155 * MeV )
+            """ 
+            )
+    
+    # =============================================================================
+    # Ds+/D+ -> KKpi   selection
+    # =============================================================================
+    def Ds ( self ) :
+        """``Preselection'' for Ds+
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ## 
+        return self.make_selection (
+            'Ds' ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays           ,
+            ## required selections 
+            [ self.kaons() , self.pions() ] ,
+            #
+            ## algorithm properties
+            # 
+            DecayDescriptor = " [D_s+ -> K-  K+  pi+ ]cc" , 
+            ##
+            Preambulo      = self.preambulo()  + [
+            "admD  = ADAMASS ('D+'  )  <   65 * MeV " , ## D+  mass window for combination cut
+            "admDs = ADAMASS ('D_s+')  <   65 * MeV " , ## Ds+ mass window for combination cut
+            "dmD   = ADMASS  ('D+'  )  <   55 * MeV " , ## D+  mass window
+            "dmDs  = ADMASS  ('D_s+')  <   55 * MeV " , ## Ds+ mass window
+            ] ,
+            ## # require phi
+            ## Combination12Cut = """
+            ## ( AM < 1050 * MeV      ) &
+            ## ( ACHI2DOCA(1,2)  < 16 ) 
+            ## """ ,
+            # do not require phi anymore
+            Combination12Cut = """
+            ( AM < 2000 * MeV      ) &
+            ( ACHI2DOCA(1,2)  < 16 ) 
+            """ ,
+            ## # require phi
+            ## CombinationCut = """
+            ## ( AM12 < 1050 * MeV   ) &
+            ## ( APT  > %s           ) &
+            ## ( admD | admDs        ) & 
+            ## ( ACHI2DOCA(1,3) < 16 ) &
+            ## ( ACHI2DOCA(2,3) < 16 ) 
+            ## """  %  ( 0.95 * self['pT(Ds+)'] ) ,
+            ## #
+            # do not require phi anymore
+            CombinationCut = """
+            ( APT  > %s           ) &
+            ( admD | admDs        ) & 
+            ( ACHI2DOCA(1,3) < 16 ) &
+            ( ACHI2DOCA(2,3) < 16 ) 
+            """  %  ( 0.95 * self['pT(Ds+)'] ) ,
+            #
+            ## 
+            MotherCut      = """
+            ( chi2vx  < 25  ) &
+            ( PT      > %s  ) & 
+            ( dmD  | dmDs   ) &
+            ( ctau    > 0.1 * mm )
+            """  % self['pT(Ds+)' ] 
+            )
+
+    # =============================================================================
+    # D+ -> Kpipi   selection
+    # =============================================================================
+    def Dplus ( self ) :
+        """D+ -> Kpipi   selection
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        return self.make_selection (
+            'D' ,
+            DaVinci__N3BodyDecays ,
+            ## inputs 
+            [ self.kaons() , self.pions()] ,
+            #
+            ## algorithm properties 
+            #
+            DecayDescriptor = " [D+ -> K-  pi+  pi+ ]cc" ,
+            ##
+            Combination12Cut = """
+            ( AM < 1.9 * GeV      ) &
+            ( ACHI2DOCA(1,2) < 16 )  
+            """ ,
+            CombinationCut   = """
+            ( ADAMASS('D+')  < 65 * MeV ) &
+            ( APT > %s                  ) & 
+            ( ACHI2DOCA(1,3) < 16       ) &
+            ( ACHI2DOCA(2,3) < 16       ) 
+            """ % ( 0.95 * self['pT(D+)' ] ) ,
+            ##
+            MotherCut      = """
+            ( chi2vx  < 25                 ) &
+            ( PT      > %s                 ) &
+            ( ADMASS  ('D+'  )  < 55 * MeV ) &
+            ( ctau    > 0.1 * mm   )
+            """ % self['pT(D+)' ] ,
+            )
+    
+    # =============================================================================
+    # preselection of Lambda_c,Xi_c -> ( pKpi )   NO POINTING HERE! 
+    # =============================================================================
+    def preLamC ( self ) :
+        """Lambda_c,Xi_c -> ( pKpi )  pre-selection
+        """ 
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        #
+        return self.make_selection (
+            'preLambdaC' ,
+            DaVinci__N3BodyDecays ,
+            ## inputs 
+            [ self.protons() , self.kaons() , self.pions()] ,
+            ##
+            DecayDescriptor = " [ Lambda_c+ -> p+  K-  pi+ ]cc" ,
+            ##
+            Combination12Cut  = """
+            ( AM < 2.6 * GeV      ) &
+            ( ACHI2DOCA(1,2) < 16 ) 
+            """ ,
+            ## 
+            CombinationCut = """
+            ( ( ADAMASS ( 'Lambda_c+' ) < 65 * MeV ) 
+            | ( ADAMASS ( 'Xi_c+'     ) < 65 * MeV ) ) &
+            ( APT            > %s ) & 
+            ( ACHI2DOCA(1,3) < 16 ) &
+            ( ACHI2DOCA(2,3) < 16 ) 
+            """ % ( 0.85 * self[ 'pT(Lc+)' ] ) ,
+            ##
+            MotherCut      = """
+            ( chi2vx  < 25 )                          &
+            ( PT      > %s                          ) &
+            ( ( ADMASS ( 'Lambda_c+' ) < 55 * MeV ) 
+            | ( ADMASS ( 'Xi_c+'     ) < 55 * MeV ) ) 
+            """ %  self [ 'pT(Lc+)'] 
+            )
+    
+    # =============================================================================
+    # Lambda_c,Xi_c -> ( pKpi ) 
+    # =============================================================================
+    ## selection of "prompt" Lambda_c
+    def LamC ( self ) :
+        """Lambda_c,Xi_c -> ( pKpi )  selection
+        """ 
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        #
+        return self.make_selection (
+            'LambdaC'     ,
+            FilterDesktop ,
+            ## inputs 
+            [ self.preLamC() ] ,
+            ##
+            Code = """
+            ( PT   > %s       ) &
+            ( ctau > 0.1 * mm )
+            """ % self['pT(Lc+)']
+            )
+    
+    # =============================================================================
+    # Lambda_c,Xi_c -> ( pKpi ) 
+    # =============================================================================
+    ## selection of "prompt" Lambda_c with very loose IP-cut
+    #  @attention: very loose chi2(IP) cuts here:  chi2(IP)<400
+    def LamCLooseChi2IP ( self ) :
+        """Lambda_c,Xi_c -> ( pKpi )  selection
+        Attention: very loose chi2(IP) cuts here:  chi2(IP)<400
+        """ 
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        #
+        return self.make_selection (
+            'LambdaCLooseChi2IP' ,
+            FilterDesktop        ,
+            ## inputs 
+            [ self.preLamC() ]   ,
+            ##
+            Code = """
+            ( PT       > %s         ) &
+            ( ctau_400 > 0.1 * mm   )
+            """ % self['pT(Lc+)']
+            )
+
+    # =============================================================================
+    # preselection of Xi_c0/Omegac -> ( pKKpi )   NO POINTING HERE! Marco Pappagallo
+    # =============================================================================
+    def preXiC0 ( self ) :
+        """Xi_c0/Omega_c0 -> ( pKKpi )  pre-selection
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+        #
+        return self.make_selection (
+            'preXiC0' ,
+            DaVinci__N4BodyDecays ,
+            ## inputs
+            [ self.protons() , self.kaons() , self.pions()] ,
+            ##
+            DecayDescriptor = " [ Xi_c0 -> p+  K-  K- pi+ ]cc" ,
+            ##
+            Combination12Cut  = """
+            ( ACHI2DOCA(1,2) < 16 )
+            """ ,
+            Combination123Cut  = """
+            ( ACHI2DOCA(1,3) < 16 ) &
+            ( ACHI2DOCA(2,3) < 16 )
+            """ ,
+            ##
+            CombinationCut = """
+            ( ( ADAMASS ( 'Omega_c0' ) < 65 * MeV )
+            | ( ADAMASS ( 'Xi_c0'     ) < 65 * MeV ) ) &
+            ( APT            > %s ) &
+            ( ACHI2DOCA(1,4) < 16 ) &
+            ( ACHI2DOCA(2,4) < 16 ) &
+            ( ACHI2DOCA(3,4) < 16 )
+            """ % ( 0.85 * self[ 'pT(Xic0)' ] ) ,
+            ##
+            MotherCut      = """
+            ( chi2vx  < 25 )                          &
+            ( PT      > %s                          ) &
+            ( ( ADMASS ( 'Omega_c0' ) < 55 * MeV )
+            | ( ADMASS ( 'Xi_c0'    ) < 55 * MeV ) )
+            """ %  self [ 'pT(Xic0)']
+            )
+                                    
+    # =============================================================================
+    # Xi_c0 -> ( pKKpi ) Marco Pappagallo
+    # =============================================================================
+    def XiC0 ( self ) :
+        """Xi_c0 -> ( pKKpi )  selection
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        #
+        return self.make_selection (
+            'XiC0'     ,
+            FilterDesktop ,
+            ## inputs
+            [ self.preXiC0() ] ,
+            ##
+            Code = """
+            ( ADMASS ( 'Xi_c0' ) < 55 * MeV ) &
+            ( PT > %s ) & ( ctau > 0.1 * mm )
+            """ % self['pT(Xic0)']
+            )    
+    # =============================================================================
+    # Omega_c0 -> ( pKKpi ) Marco Pappagallo
+    # =============================================================================
+    def OmegaC0 ( self ) :
+        """Omega_c0 -> ( pKKpi )  selection
+        """
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        #
+        return self.make_selection (
+            'OmegaC0'     ,
+            FilterDesktop ,
+            ## inputs
+            [ self.preXiC0() ] ,
+            ##
+            Code = """
+            ( ADMASS ( 'Omega_c0' ) < 55 * MeV ) &
+            ( PT > %s ) & ( ctau > 0.1 * mm )
+            """ % self['pT(Xic0)']
+            )
+    
+    # =============================================================================
+    #  Xi_c0 -> Lc+ pi-
+    # ============================================================================= 
+    ## new decay mode \f$ \Xi_c^0 \rightarrow \Lambda_c^+ \pi^-\f$
+    #  the evidence for this decay is obtained by Belle in Phys.Rev. D89 (2014) 9, 091102 
+    #  @see http://dx.doi.org/10.1103/PhysRevD.89.091102
+    #  Also Alexey Dziuba and Alex Pearce see the hint for this peak in his charm baryon studies 
+    def Xic02LcPi ( self ) :
+        """Xi_c0 -> Lc+ pi-
+        The peak seen by Belle in Phys.Rev. D89 (2014) 9, 091102 
+        There is a hint in LHCb data 
+        """ 
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ## 
+        from StandardParticles  import StdAllLoosePions as inpts 
+        #
+        return self.make_selection (
+            'Xic02LcPi'      ,
+            CombineParticles ,
+            ## inputs 
+            [ self.preLamC() , inpts ] ,
+            ##
+            DecayDescriptor = " [ Xi_c0 -> Lambda_c+ pi-]cc" ,
+            DaughtersCuts   = {
+            ## use only Lambda_c+ here, skip Xi_c+
+            'Lambda_c+' : "ADMASS ( 'Lambda_c+' ) < 60 * MeV"
+            }, 
+            ##
+            CombinationCut  = """
+            ( APT > %s ) & ( ( AM - AM1 ) < 240 * MeV ) 
+            """  % ( 0.95 * self['pT(Lc+)'] ) ,
+            ##
+            MotherCut      = """
+            ( chi2vx  < 25 )              &
+            ( PT      > %s              ) &
+            ( ctau    > 0.05 * mm )  
+            """ % self [ 'pT(Lc+)']
+            )
+    
+    # =============================================================================
+    # Lambda_c,Xi_c -> ( pKK ) 
+    # =============================================================================
+    def LamC2pKK ( self ) :
+        """Lambda_c,Xi_c -> ( pKK )  selection
+        """ 
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        #
+        return self.make_selection (
+            'LambdaCpKK' ,
+            DaVinci__N3BodyDecays ,
+            ## inputs 
+            [ self.protons() , self.kaons() ] ,
+            ##
+            DecayDescriptor = " [ Lambda_c+ -> p+ K- K+ ]cc" ,
+            ##
+            Combination12Cut  = """
+            ( AM < 2.5 * GeV      ) &
+            ( ACHI2DOCA(1,2) < 16 ) 
+            """ ,
+            ## 
+            CombinationCut = """
+            ( ( ADAMASS ( 'Lambda_c+' ) < 65 * MeV ) 
+            | ( ADAMASS ( 'Xi_c+'     ) < 65 * MeV ) ) &
+            ( APT            > %s ) & 
+            ( ACHI2DOCA(1,3) < 16 ) &
+            ( ACHI2DOCA(2,3) < 16 ) 
+            """ % ( 0.95 * self[ 'pT(Lc+)' ] ) ,
+            ##
+            MotherCut      = """
+            ( chi2vx  < 25 )                          &
+            ( PT      > %s                          ) &
+            ( ( ADMASS ( 'Lambda_c+' ) < 55 * MeV ) 
+            | ( ADMASS ( 'Xi_c+'     ) < 55 * MeV ) ) &
+            ( ctau_400  > 0.1 * mm                  )  
+            """ % self [ 'pT(Lc+)']
+            )
+
+    # =============================================================================
+    # Sigma_C -> Lambda_C pi selection
+    # =============================================================================
+    def SigC ( self ) :
+        """Sigma_C -> Lambda_C pi selection
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        return self.make_selection (
+            'SigmaC'         ,
+            CombineParticles ,
+            [ self.LamC()    , self.slowPions() ] , 
+            #
+            ## algorithm properties 
+            DecayDescriptors = [
+            " [ Sigma_c0  -> Lambda_c+ pi- ]cc" ,
+            " [ Sigma_c++ -> Lambda_c+ pi+ ]cc" ,
+            ] ,
+            ##
+            CombinationCut = """
+            ( AM - AM1 < ( 140 * MeV + 140 * MeV ) ) 
+            """ ,
+            ##
+            MotherCut      = """
+            ( chi2vx  < 16 )
+            """ ,
+            )
+
+    # =============================================================================
+    # Lambda_C* -> Lambda_C pi pi selection
+    # =============================================================================
+    def LamCstar ( self ) :
+        """Lambda_C* -> Lambda_C pi pi selection
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+        ## 
+        return self.make_selection (
+            ## the unique tag 
+            'LambdaCstar'                       ,
+            ## algorithm type to be used
+            DaVinci__N3BodyDecays               ,
+            [ self.LamC() , self.slowPions() ]  ,
+            #
+            ## algorithm properties 
+            # 
+            DecayDescriptor = " [ Lambda_c(2625)+ -> Lambda_c+ pi+ pi-]cc", 
+            ##
+            Combination12Cut = """
+            ( AM < 3 * GeV         ) &
+            ( ACHI2DOCA(1,2) < 16  ) 
+            """ , 
+            CombinationCut = """
+            ( AM - AM1 <  ( 2 * 140 * MeV + 80 * MeV ) ) & 
+            ( ACHI2DOCA(1,3) < 16  ) &
+            ( ACHI2DOCA(2,3) < 16  ) 
+            """ ,
+            MotherCut      = """
+            ( chi2vx  < 25 )
+            """ ,
+            ##
+            )
+
+    # =============================================================================
+    # Omega_C*0 -> Xi_c+ K- selection for Marco Pappagallo
+    # =============================================================================
+    def OmgCstar ( self ) :
+        """Omega_C* -> Xi_c+ K- selection for Marco Pappagallo
+        The line also includes   Lambda_C+ K- 
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ##
+        return self.make_selection (
+            'OmegaCstar'         ,
+            CombineParticles     ,
+            [ self.LamC() , self.promptKaons() ] , 
+            #
+            ## algorithm properties 
+            DecayDescriptors  = [
+            "[ Omega_c*0 -> Lambda_c+ K- ]cc",
+            "[ Omega_c*0 -> Lambda_c+ K+ ]cc"
+            ] ,
+            ##
+            CombinationCut   = " AM - AM1 < ( 500 * MeV + %s ) " %  self['QvalueXiCK'],
+            ##
+            MotherCut        = " chi2vx  < 16 "
+            )
+
+    # =============================================================================
+    # Xi'_c+ -> Xi_c+ gamma selection for Marco Pappagallo
+    # =============================================================================
+    def XiCprime ( self ) :
+        """Xi'_c+ -> Xi_c+ gamma selection for Marco Pappagallo
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from StandardParticles import StdLooseAllPhotons as     inpts
+        ##
+        photoncut = "CL > %s " % self['PhotonCLCut']                
+        ##
+        pre_XiCprime = self.make_selection (
+            'PreXiCprime'         ,
+            CombineParticles   ,
+            [ self.LamC() , inpts ] ,
+            #
+            ## algorithm properties
+            DecayDescriptor  = " [ Xi'_c+ -> Lambda_c+ gamma ]cc" ,
+            ## refine kaon selection
+            DaughtersCuts    = {
+            'Lambda_c+' : "M > 2400 * MeV",
+            'gamma'     : photoncut
+            } ,
+            ##
+            CombinationCut   = " AM - AM1 < %s  " %  self['QvalueXiCprime'],
+            ##
+            MotherCut        = " ALL "
+            )
+        
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+        ##
+        return self.make_selection (
+            'XiCprime'                 ,
+            Pi0Veto__Tagger               ,
+            [ pre_XiCprime ]                   ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25020     ## unique !
+            )
+
+    # =============================================================================
+    # Xi*_c+ -> Xi_C0 pi+ selection for Marco Pappagallo
+    # =============================================================================
+    def XiCstar ( self ) :
+        """Xi*_c+ -> Xi_C0 pi+ selection for Marco Pappagallo
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ##
+        pioncut = """
+        ( CLONEDIST   > 5000      ) &
+        ( TRGHOSTPROB < 0.5       ) &
+        in_range ( 2  , ETA , 4.9 ) &
+        HASRICH
+        """
+        ##
+        return self.make_selection (
+            'XiCstar'         ,
+            CombineParticles  ,
+            [ self.XiC0()     , self.slowPions()  ] ,
+            #
+            ## algorithm properties
+            DecayDescriptor = " [ Xi_c*+ -> Xi_c0 pi+ ]cc" ,
+            ##
+            DaughtersCuts    = {'pi+' : pioncut} ,
+            ##
+            CombinationCut   = " AM - AM1 < ( 140 * MeV + %s ) " %  self['QvalueXiCstar'],
+            ##
+            MotherCut      = """
+            ( chi2vx  < 16 )
+            """ ,
+            )
+
+    # =============================================================================
+    # Omega_c*0 -> Xi_C0 pi+ K- selection for Marco Pappagallo
+    # =============================================================================
+    def OmgCstar2XiCPiK ( self ) :
+        """Omega_c*0 -> Xi_C0 pi+ K- selection for Marco Pappagallo
+        """
+        
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays        
+        ##
+
+        return self.make_selection (
+            'OmegaCstar2XiCPiK'         ,
+            DaVinci__N3BodyDecays       ,
+            [ self.XiC0() , self.promptKaons() , self.slowPions()  ] ,
+            #
+            ## algorithm properties
+            DecayDescriptors = [
+            "[ Omega_c*0 -> Xi_c0 K- pi+ ]cc",
+            "[ Omega_c*0 -> Xi_c0 K+ pi+ ]cc",
+            "[ Omega_c*0 -> Xi_c0 K- pi- ]cc",
+            "[ Omega_c*0 -> Xi_c0 K+ pi- ]cc"
+            ],
+            ##
+            DaughtersCuts    = {
+            'pi+' : self['TrackCut']
+            } ,
+            ##
+            Combination12Cut = """
+            ( ACHI2DOCA(1,2)  < 16 ) & ( AM < 6 * GeV ) 
+            """,
+            ##
+            CombinationCut   = """
+            ( AM - AM1 < ( 500 * MeV + %s ) ) &
+            ( ACHI2DOCA(1,3)  < 16 ) & 
+            ( ACHI2DOCA(2,3)  < 16 ) 
+            """ %  self['QvalueXiCPiK'] ,
+            ##
+            MotherCut      = """
+            ( chi2vx  < 16 )
+            """ ,
+            )
+
+    # =============================================================================
+    # Omega_c*0 -> Xi'_C+ K- selection for Marco Pappagallo
+    # =============================================================================
+    def OmgCstar2XiCprimeK ( self ) :
+        """Omega_c*0 -> Xi'_C+ K- selection for Marco Pappagallo
+        """
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        ##
+        pre_OmegaCstar2XiCprimeK = self.make_selection (
+            'PreOmegaCstar2XiCprimeK'         ,
+            CombineParticles  ,
+            [ self.XiCprime() , self.promptKaons() ] ,
+            #
+            ## algorithm properties
+            DecayDescriptors = [
+            "[ Omega_c*0 -> Xi'_c+ K- ]cc",
+            "[ Omega_c*0 -> Xi'_c+ K+ ]cc"
+            ] ,
+            ##
+            CombinationCut   = " AM - AM1 < ( 500 * MeV + %s ) " %  self['QvalueXiCprimeK'],
+            ##
+            MotherCut      = """
+            ( chi2vx  < 16 )
+            """ ,
+            )
+
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+        ##
+        return self.make_selection (
+            'OmegaCstar2XiCprimeK'                 ,
+            Pi0Veto__Tagger               ,
+            [pre_OmegaCstar2XiCprimeK ]                   ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25025     ## unique !
+            )
+
+    # =============================================================================
+    # Xi_c**+ -> Lambda_c+ pi+ K- selection for Marco Pappagallo
+    # =============================================================================
+    def XiCstarstar2LambdaCPiK ( self ) :
+        """Xi_c(2815)+ -> Lambda_c+ pi+ K- selection for Marco Pappagallo
+        """
+        
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        ##
+
+        return self.make_selection (
+            'XiCstarstar2LambdaCPiK'         ,
+            DaVinci__N3BodyDecays       ,
+            [ self.LamC(), self.promptKaons() , self.slowPions()  ] ,
+            #
+            ## algorithm properties
+            DecayDescriptors = [
+            "[ Xi_c(2815)+ -> Lambda_c+ K- pi+ ]cc",
+            #"[ Xi_c(2815)+ -> Lambda_c+ K+ pi+ ]cc",
+            "[ Xi_c(2815)+ -> Lambda_c+ K- pi- ]cc"#,
+            #"[ Xi_c(2815)+ -> Lambda_c+ K+ pi- ]cc"
+            ],
+            ##
+            DaughtersCuts    = {
+            'Lambda_c+' : "M < 2400 * MeV",
+            'pi+' : self['TrackCut']
+            } ,
+            ##
+            Combination12Cut = """
+            ( ACHI2DOCA(1,2)  < 16 ) & ( AM < 6 * GeV )
+            """,
+            ##
+            CombinationCut   = """
+            ( AM - AM1 < ( 500 * MeV + %s ) ) &
+            ( ACHI2DOCA(1,3)  < 16 ) &
+            ( ACHI2DOCA(2,3)  < 16 )
+            """ %  self['QvalueLcPiK'] ,
+            ##
+            MotherCut      = """
+            ( chi2vx  < 16 )
+            """ ,
+            )
+                                                                
+
+    # =============================================================================
+    # Omega_cc+ -> Xi_C+ K- pi+ selection for Marco Pappagallo
+    # =============================================================================
+    def OmgCC2XicKpi( self ) :
+        """Omega_cc+ -> Xi_C+ K- pi+ selection for Marco Pappagallo
+        """
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        ##
+        return self.make_selection (
+            'OmegaCC2XiCKpi'      ,
+            DaVinci__N3BodyDecays ,
+            [ self.preLamC() , self.promptKaons () , self.slowPions() ] ,
+            #
+            ## algorithm properties
+            DecayDescriptors = [
+            " [ Omega_cc+ -> Lambda_c+ K- pi+ ]cc" ,
+            #" [ Omega_cc+ -> Lambda_c+ K+ pi+ ]cc" ,
+            " [ Omega_cc+ -> Lambda_c+ K- pi- ]cc" #,
+            #" [ Omega_cc+ -> Lambda_c+ K+ pi- ]cc"
+            ],
+            ##
+            DaughtersCuts    = {
+            'Lambda_c+' : "M > 2400 * MeV",
+            'pi+' : self['TrackCut']
+            } ,
+            ##
+            Combination12Cut = """
+            ( ACHI2DOCA(1,2)  < 16 )  & ( AM < 6 * GeV ) 
+            """,
+            ##
+            CombinationCut   = """
+            ( AM <  %s )             &
+            ( ACHI2DOCA(1,3)  < 16 ) & 
+            ( ACHI2DOCA(2,3)  < 16 )              
+            """ %  self['QvalueOmegaCC'],
+            ##
+            MotherCut      = """
+            ( chi2vx  < 16 ) & ( PT > %s )
+            """ % self['pT(Omgcc)'] ,
+            )
+
+    # =============================================================================
+    # Omega_cc+ -> Xi_C+ K- K+ selection for Marco Pappagallo
+    # =============================================================================
+    def OmgCC2XiCKK ( self ) :
+        """Omega_cc+ -> Xi_c+ K- K+ selection for Marco Pappagallo
+        """        
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        ##
+        return self.make_selection (
+            'OmegaCC2XiCKK'       ,
+            DaVinci__N3BodyDecays ,
+            [ self.preLamC() , self.promptKaons () ] ,
+            #
+            ## algorithm properties
+            DecayDescriptors = [
+            " [ Omega_cc+ -> Lambda_c+ K- K+  ]cc",
+            #" [ Omega_cc+ -> Lambda_c+ K+ K+  ]cc",
+            " [ Omega_cc+ -> Lambda_c+ K- K-  ]cc"
+            ] ,
+            ##
+            DaughtersCuts    = {
+            'Lambda_c+' : "M > 2400 * MeV",
+            } ,
+            ##
+            Combination12Cut = """
+            ( ACHI2DOCA(1,2)  < 16 )  & ( AM < 6 * GeV ) 
+            """,
+            ##
+            CombinationCut   = """
+            ( AM <  %s )             &
+            ( ACHI2DOCA(1,3)  < 16 ) & 
+            ( ACHI2DOCA(2,3)  < 16 )              
+            """ %  self['QvalueOmegaCC'],
+            ##
+            MotherCut      = """
+            ( chi2vx  < 16 ) & ( PT > %s )
+            """ % self['pT(Omgcc)'],
+            )
+
+    # =============================================================================    
+    ## helper merged selection of all charmed particles
+    def PromptCharm ( self ) :
+        """Helper merged selection of all charmed particles
+        """
+        sel = self._selection ( 'PromptCharm_Selection' )
+        if sel : return sel
+
+        from PhysSelPython.Wrappers import MergedSelection
+        sel =  MergedSelection (
+            ##
+            'PromptCharmFor' + self.name ()         ,
+            RequiredSelections = [ self.D02Kpi   () ,
+                                   self.Dstar    () ,
+                                   self.Ds       () ,
+                                   self.Dplus    () ,
+                                   self.LamC     () ,
+                                   self.SigC     () , ## added for pentaquark searches
+                                   self.LamCstar () , ## added 
+                                   ] 
+            )
+        
+        return self._add_selection ( 'PromptCharm_Selection' , sel )
+
+    
+    ## selection of W+-
+    def W ( self )  :
+        """Get simple  W+-selection
+        """
+        from GaudiConfUtils.ConfigurableGenerators      import FilterDesktop 
+        from StandardParticles  import StdAllLooseMuons as     inpts 
+        #
+        return self.make_selection (
+            'W'           ,
+            FilterDesktop ,
+            [ inpts ]     , 
+            #
+            ## algorithm properties
+            #
+            Preambulo = self.preambulo () + [ 
+            "ptCone_ = SUMCONE (   0.25 , PT , '/Event/Phys/StdAllLoosePions/Particles'   )",
+            "etCone_ = SUMCONE (   0.25 , PT , '/Event/Phys/StdLooseAllPhotons/Particles' )",
+            "ptCone  =   SINFO (  55001 , ptCone_ , True ) " ,
+            "etCone  =   SINFO (  55002 , etCone_ , True ) " ,
+            ] ,
+            ##
+            Code = self [ 'WCuts'] + """
+            & ( -100 * GeV < ptCone ) 
+            & ( -100 * GeV < etCone ) 
+            """ 
+            )
+    
+    ## get "Di-Charm"-selection
+    def DiCharm ( self ) :
+        """Di-Charm selection
+        """
+        from GaudiConfUtils.ConfigurableGenerators      import CombineParticles 
+        return self.make_selection (
+            'DiCharm'        ,
+            CombineParticles ,
+            [ self.PromptCharm() ] , 
+            #
+            ## algorithm properties
+            # 
+            ## the decays to be reconstructed
+            DecayDescriptors = [
+            #
+            # charm-anti-charm
+            #
+            "   psi(3770) -> D0        D~0                 "     ,
+            " [ psi(3770) -> D0        D*(2010)-       ]cc "     ,
+            " [ psi(3770) -> D0        D-              ]cc "     ,
+            " [ psi(3770) -> D0        D_s-            ]cc "     ,
+            " [ psi(3770) -> D0        Lambda_c~-      ]cc "     ,
+            " [ psi(3770) -> D0        Sigma_c~0       ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> D0        Sigma_c~--      ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> D0        Lambda_c(2625)~-]cc "     , ## addded 2017-04-06
+            #
+            "   psi(3770) -> D*(2010)+ D*(2010)-           "     ,
+            " [ psi(3770) -> D*(2010)+ D-              ]cc "     ,
+            " [ psi(3770) -> D*(2010)+ D_s-            ]cc "     ,
+            " [ psi(3770) -> D*(2010)+ Lambda_c~-      ]cc "     ,
+            " [ psi(3770) -> D*(2010)+ Sigma_c~0       ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> D*(2010)+ Sigma_c~--      ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> D*(2010)+ Lambda_c(2625)~-]cc "     , ## addded 2017-04-06
+            #
+            "   psi(3770) -> D+        D-                  "     ,
+            " [ psi(3770) -> D+        D_s-            ]cc "     ,
+            " [ psi(3770) -> D+        Lambda_c~-      ]cc "     ,
+            " [ psi(3770) -> D+        Sigma_c~0       ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> D+        Sigma_c~--      ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> D+        Lambda_c(2625)~-]cc "     , ## addded 2017-04-06
+            #
+            "   psi(3770) -> D_s+      D_s-                "     ,
+            " [ psi(3770) -> D_s+      Lambda_c~-      ]cc "     ,
+            " [ psi(3770) -> D_s+      Sigma_c~0       ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> D_s+      Sigma_c~--      ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> D_s+      Lambda_c(2625)~-]cc "     , ## addded 2017-04-06
+            #
+            "   psi(3770) -> Lambda_c+ Lambda_c~-          "     ,
+            " [ psi(3770) -> Lambda_c+ Sigma_c~0       ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> Lambda_c+ Sigma_c~--      ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> Lambda_c+ Lambda_c(2625)~-]cc "     , ## addded 2017-04-06
+            #
+            "   psi(3770) -> Sigma_c0  Sigma_c~0           "     , ## addded 2015-07-21
+            " [ psi(3770) -> Sigma_c0  Sigma_c~--      ]cc "     , ## addded 2015-07-21
+            " [ psi(3770) -> Sigma_c0  Lambda_c(2625)~-]cc "     , ## addded 2017-04-06
+            #
+            "   psi(3770) -> Sigma_c++ Sigma_c~--           "    , ## addded 2015-07-21
+            " [ psi(3770) -> Sigma_c++  Lambda_c(2625)~-]cc "    , ## addded 2017-04-06
+            #
+            "   psi(3770) -> Lambda_c(2625)+ Lambda_c(2625)~- "  , ## addded 2017-04-06
+            
+            #
+            # double charm
+            #
+            " [ psi(3770) -> D0        D0             ]cc"   ,
+            " [ psi(3770) -> D0        D*(2010)+      ]cc "  ,
+            " [ psi(3770) -> D0        D+             ]cc "  ,
+            " [ psi(3770) -> D0        D_s+           ]cc "  ,
+            " [ psi(3770) -> D0        Lambda_c+      ]cc "  ,
+            " [ psi(3770) -> D0        Sigma_c0       ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> D0        Sigma_c++      ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> D0        Lambda_c(2625)+]cc "  , ## addded 2017-04-06
+            
+            #
+            " [ psi(3770) -> D*(2010)+ D*(2010)+      ]cc "  ,
+            " [ psi(3770) -> D*(2010)+ D+             ]cc "  ,
+            " [ psi(3770) -> D*(2010)+ D_s+           ]cc "  ,
+            " [ psi(3770) -> D*(2010)+ Lambda_c+      ]cc "  ,
+            " [ psi(3770) -> D*(2010)+ Sigma_c0       ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> D*(2010)+ Sigma_c++      ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> D*(2010)+ Lambda_c(2625)+]cc "  , ## addded 2017-04-06
+            #
+            " [ psi(3770) -> D+        D+             ]cc "  ,
+            " [ psi(3770) -> D+        D_s+           ]cc "  ,
+            " [ psi(3770) -> D+        Lambda_c+      ]cc "  ,
+            " [ psi(3770) -> D+        Sigma_c0       ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> D+        Sigma_c++      ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> D+        Lambda_c(2625)+]cc "  , ## addded 2017-04-06
+            #
+            " [ psi(3770) -> D_s+      D_s+           ]cc "  ,
+            " [ psi(3770) -> D_s+      Lambda_c+      ]cc "  ,
+            " [ psi(3770) -> D_s+      Sigma_c0       ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> D_s+      Sigma_c++      ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> D_s+      Lambda_c(2625)+]cc "  , ## addded 2017-04-06
+            #
+            " [ psi(3770) -> Lambda_c+ Lambda_c+      ]cc "  ,
+            " [ psi(3770) -> Lambda_c+ Sigma_c0       ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> Lambda_c+ Sigma_c++      ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> Lambda_c+ Lambda_c(2625)+]cc "  , ## addded 2017-04-06
+            #
+            " [ psi(3770) -> Sigma_c0  Sigma_c0       ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> Sigma_c0  Sigma_c++      ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> Sigma_c0  Lambda_c(2625)+]cc "  , ## addded 2017-04-06
+            #
+            " [ psi(3770) -> Sigma_c++ Sigma_c++      ]cc "  , ## addded 2015-07-21
+            " [ psi(3770) -> Sigma_c++ Lambda_c(2625)+]cc "  , ## addded 2017-04-06
+            #
+            " [ psi(3770) -> Lambda_c(2625)+ Lambda_c(2625)+]cc "  , ## addded 2017-04-06
+            #
+            ] ,
+            ## combination cut : accept all
+            CombinationCut = " AALL " ,
+            ##      mother cut : accept all
+            MotherCut      = "  ALL " , 
+            #
+            )
+
+    ## get "Tri-Charm"-selection
+    def TriCharm ( self ) :
+        """Tri-Charm selection
+        """
+        parts  = ( 'D0'         , 'D+'        , 'D_s+'       , 'D*(2010)+'       ,
+                   'Lambda_c+'  , 'Sigma_c0'  , 'Sigma_c++'  , 'Lambda_c(2625)+' )
+        aparts = ( 'D~0'        , 'D-'        , 'D_s-'       , 'D*(2010)-'       ,
+                   'Lambda_c~-' , 'Sigma_c~0' , 'Sigma_c~--' , 'Lambda_c(2625)~-')
+
+        def _comb3 ( cnt ) :            
+            decs = set()
+            l = len(cnt) 
+            for i in range(l) :
+                ip = cnt[i]
+                for j in range(i,l) : 
+                    jp = cnt[j]
+                    for k in range(j,l) :
+                        kp = cnt[k]
+                        decs.add ( '[chi_c2(1P) -> %s %s %s]cc' % ( ip , jp , kp ) )            
+            return decs
+
+        def _comb2 ( cnt1 , cnt2 ) :
+            
+            decs = set()
+            l1 = len(cnt1) 
+            l2 = len(cnt2) 
+            for i in range(l1) :
+                ip = cnt1[i]
+                for j in range(i,l1) : 
+                    jp = cnt1[j]
+                    for k in range(l2) :
+                        kp = cnt2[k]
+                        decs.add ( '[chi_c2(1P) -> %s %s %s]cc' % ( ip , jp , kp ) )
+            return decs
+
+        _decs3 = _comb3 ( parts          ) ## 84 
+        _decs2 = _comb2 ( parts , aparts ) ## 196
+        decs   = list(_decs2.union(_decs3))
+        decs.sort() 
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        return self.make_selection (
+            'TriCharm'             ,
+            CombineParticles       ,
+            [ self.PromptCharm() ] ,
+            #
+            ## algorithm properties:
+            #
+            ## 1) the decays to be reconstructed
+            DecayDescriptors = decs     ,
+            ## 2) combination cut : accept all
+            CombinationCut   = " AALL " ,
+            ## 3) mother cut : accept all
+            MotherCut        = "  ALL " , 
+            #
+            )            
+
+    ## get "dimuon+ DiCharm"-selection
+    def DiMuonAndDiCharm ( self ) :
+        """Dimuon + di-charm selection
+        """
+        parts  = ( 'D0'         , 'D+'        , 'D_s+'       , 'D*(2010)+'       ,
+                   'Lambda_c+'  , 'Sigma_c0'  , 'Sigma_c++'  , 'Lambda_c(2625)+' )
+        aparts = ( 'D~0'        , 'D-'        , 'D_s-'       , 'D*(2010)-'       ,
+                   'Lambda_c~-' , 'Sigma_c~0' , 'Sigma_c~--' , 'Lambda_c(2625)~-')
+
+        def _comb_1 ( cnt ) :            
+            decs = set()
+            l = len(cnt) 
+            for i in range(l) :
+                ip = cnt[i]
+                for j in range(i,l) :
+                    jp = cnt[j]
+                    decs.add ( '[chi_c0(1P) -> J/psi(1S) %s %s]cc' % ( ip , jp ) )            
+            return decs
+
+        def _comb_2 ( cnt1 , cnt2  ) :            
+            decs = set()
+            l1 = len(cnt1) 
+            l2 = len(cnt2) 
+            for i in range(l1) :
+                ip = cnt1[i]
+                for j in range(i,l2) :
+                    jp = cnt2[j]
+                    if i == j : decs.add ( ' chi_c0(1P) -> J/psi(1S) %s %s'    % ( ip , jp  ) )
+                    else      : decs.add ( '[chi_c0(1P) -> J/psi(1S) %s %s]cc' % ( ip , jp  ) )
+            return decs
+
+
+        _decs3 = _comb_1 ( parts          ) 
+        _decs2 = _comb_2 ( parts , aparts ) 
+        decs   = list(_decs2.union(_decs3))
+        decs.sort()
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        return self.make_selection (
+            'DiMuonDiCharm'            ,
+            CombineParticles           ,
+            [ self.DiMuon() , self.PromptCharm() ] , 
+            #
+            ## algorithm properties:
+            # 
+            ## 1) the decays to be reconstructed
+            DecayDescriptors = decs     , 
+            ## 2) combination cut : accept all
+            CombinationCut   = " AALL " ,
+            ## 3) mother cut : accept all
+            MotherCut        = "  ALL " , 
+            #
+            )            
+
+
+    ## charm & W
+    def CharmAndW ( self ) :
+        """Charm & W+-
+        """
+        parts  = ( 'D0'         , 'D+'        , 'D_s+'       , 'D*(2010)+'       ,
+                   'Lambda_c+'  , 'Sigma_c0'  , 'Sigma_c++'  , 'Lambda_c(2625)+' )
+        decs   = [ '[chi_b0(2P) -> %s  mu+]cc' % i for i in parts  ]
+        decs  += [ '[chi_b0(2P) -> %s  mu-]cc' % i for i in parts  ]
+        ## 
+        from GaudiConfUtils.ConfigurableGenerators      import CombineParticles 
+        return self.make_selection (
+            'CharmW'        ,
+            CombineParticles ,
+            [ self.W() , self.PromptCharm() ] , 
+            #
+            ## algorithm properties
+            # 
+            ## the decays to be reconstructed
+            DecayDescriptors = decs ,
+            ## combination cut : accept all
+            CombinationCut   = " AALL " ,
+            ##      mother cut : accept all
+            MotherCut        = "  ALL " , 
+            #
+            )
+    
+    ## get the dimuons
+    def DiMuon ( self ) :
+        """Get the dimuons
+        """
+        from GaudiConfUtils.ConfigurableGenerators      import CombineParticles 
+        return self.make_selection (
+            'DiMuon'         ,
+            CombineParticles ,
+            [ self.muons() ] , 
+            #
+            ## algorihtm properties
+            # 
+            ## the decays to be reconstructed
+            DecayDescriptor = 'J/psi(1S) -> mu+ mu-' ,
+            ## combination cut
+            CombinationCut  = " psi | psi_prime | ( AM > 8 * GeV ) " ,
+            ##      mother cut
+            MotherCut       = " chi2vx < 20 " ,
+            )
+    
+    ## get the 2xdimuons
+    def DoubleDiMuon ( self ) :
+        """Get the 2xdimuons
+        """
+        from GaudiConfUtils.ConfigurableGenerators      import CombineParticles 
+        return self.make_selection (
+            'DoubleDiMuon'         ,
+            CombineParticles ,
+            [ self.DiMuon() ] , 
+            #
+            ## algorihtm properties
+            # 
+            ## the decays to be reconstructed
+            DecayDescriptor = 'Upsilon(1S) -> J/psi(1S) J/psi(1S)' ,
+            ## combination cut
+            CombinationCut  = "AALL" ,
+            ##      mother cut
+            MotherCut       = " ALL" 
+            )
+
+    ## get the 3xdimuons
+    def TripleDiMuon ( self ) :
+        """Get the 3xdimuons
+        """
+        from GaudiConfUtils.ConfigurableGenerators      import CombineParticles 
+        return self.make_selection (
+            'TripleDiMuon'    ,
+            CombineParticles  ,
+            [ self.DiMuon() ] , 
+            #
+            ## algorihtm properties
+            # 
+            ## 1) the decays to be reconstructed
+            DecayDescriptor = 'Upsilon(2S) -> J/psi(1S) J/psi(1S) J/psi(1S)' ,
+            ## 2) combination cut
+            CombinationCut  = "AALL" ,
+            ## 3) mother cut
+            MotherCut       = " ALL" 
+            )
+    
+    ## get the dimuons & charn
+    def DiMuonAndCharm ( self ) :
+        """Get charm & dimuon :
+        Select events with at least one charm particle and
+        at least one dimuon
+        """
+        from GaudiConfUtils.ConfigurableGenerators      import CombineParticles
+        ##
+        parts  = ( 'D0'         , 'D+'        , 'D_s+'       , 'D*(2010)+'       ,
+                   'Lambda_c+'  , 'Sigma_c0'  , 'Sigma_c++'  , 'Lambda_c(2625)+' )
+        decs   = [ '[Upsilon(1S) -> J/psi(1S) %s]cc' % i for i in parts  ]
+        ## 
+        return self.make_selection (
+            'DiMuonAndCharm' ,
+            CombineParticles ,
+            [ self.DiMuon()  , self.PromptCharm() ] , 
+            #
+            ## algorithm properties
+            #
+            DecayDescriptors = decs ,
+            CombinationCut   = " AALL " ,
+            MotherCut        = "  ALL " , 
+            #
+            )
+    
+    ## get the 2xdimuons+charm
+    def DoubleDiMuonAndCharm ( self ) :
+        """Get the 2xdimuons+charm 
+        """
+        from GaudiConfUtils.ConfigurableGenerators      import CombineParticles
+        
+        parts  = ( 'D0'         , 'D+'        , 'D_s+'       , 'D*(2010)+'       ,
+                   'Lambda_c+'  , 'Sigma_c0'  , 'Sigma_c++'  , 'Lambda_c(2625)+' )
+        decs   = [ '[Upsilon(2S) -> J/psi(1S) J/psi(1S) %s]cc' % i for i in parts  ]
+        ## 
+        return self.make_selection (
+            'DoubleDiMuonAndCharm' ,
+            CombineParticles ,
+            [ self.DiMuon()  , self.PromptCharm() ] , 
+            #
+            ## algorithm properties
+            # 
+            DecayDescriptors = decs ,
+            CombinationCut   = " AALL " ,
+            MotherCut        = "  ALL " , 
+            #
+            )
+    
+        from GaudiConfUtils.ConfigurableGenerators      import CombineParticles 
+        return self.make_selection (
+            'DoubleDiMuon'         ,
+            CombineParticles ,
+            [ self.DiMuon() ] , 
+            #
+            ## algorihtm properties
+            # 
+            ## the decays to be reconstructed
+            DecayDescriptor = 'Upsilon(1S) -> J/psi(1S) J/psi(1S)' ,
+            ## combination cut
+            CombinationCut  = "AALL" ,
+            ##      mother cut
+            MotherCut       = " ALL" 
+            )
+    
+    ## get the dimuons & charn
+    def ChiAndCharm ( self ) :
+        """Get charm & chi:
+        Select events with at leats one charm particle and
+        at least one chi
+        """
+        from GaudiConfUtils.ConfigurableGenerators       import DaVinci__N3BodyDecays
+        from StandardParticles import StdLooseAllPhotons as     inpts 
+        #
+        pre_chi = self.make_selection (
+            'PreChiAndCharm'      ,
+            DaVinci__N3BodyDecays ,
+            [ self.DiMuonAndCharm () , self.DiMuon() , self.PromptCharm() , inpts ] ,
+            #
+            ## algorithm proeprties
+            # 
+            DecayDescriptors = [
+            "[ Upsilon(1S) -> J/psi(1S) D0        gamma ]cc" ,
+            "[ Upsilon(1S) -> J/psi(1S) D*(2010)+ gamma ]cc" ,
+            "[ Upsilon(1S) -> J/psi(1S) D+        gamma ]cc" ,
+            "[ Upsilon(1S) -> J/psi(1S) D_s+      gamma ]cc" ,
+            "[ Upsilon(1S) -> J/psi(1S) Lambda_c+ gamma ]cc"
+            ] ,
+            ##
+            DaughtersCuts = {
+            #                    J/psi                              Upsilon(1S)
+            "J/psi(1S)" : " ( M  < 3.21 * GeV ) | in_range ( 9.3 * GeV , M , 9.6 * GeV ) " ,
+            "gamma"     : self [ 'GammaChi' ]
+            } ,
+            ##
+            Combination12Cut = """
+            ACHI2DOCA(1,2) < 100 
+            """ ,
+            ## require chi_(c,b)
+            CombinationCut = """
+            AM13 - AM1 < 1.01 * GeV
+            """,
+            ##
+            MotherCut      = "  ALL " , 
+            )
+        
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+        ## 
+        return self.make_selection (
+            'ChiAndCharm'                 ,
+            Pi0Veto__Tagger               ,
+            [ pre_chi ]                   ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25010     ## unique ! 
+            )
+    
+    ## DiMuon & W
+    def DiMuonAndW ( self ) :
+        """Dimuon & W+-
+        """
+        from GaudiConfUtils.ConfigurableGenerators   import CombineParticles 
+        ##
+        return self.make_selection (
+            'DiMuonAndW'                 ,
+            CombineParticles             ,
+            [ self.W() , self.DiMuon() ] ,
+            #
+            ## algorithm properties
+            # 
+            ## the decays to be reconstructed
+            DecayDescriptors = [
+            " [ chi_b0(2P) -> J/psi(1S) mu+ ]cc " ,
+            ] ,
+            ##
+            ## combination cut : accept all
+            CombinationCut = " AALL " ,
+            ##      mother cut : accept all
+            MotherCut      = "  ALL " , 
+            )
+    
+    ## get the dimuons & charn
+    def ChiAndW ( self ) :
+        """Get chi & W :
+        Select events with at leats one charm particle and
+        at least one chi
+        """
+        from GaudiConfUtils.ConfigurableGenerators       import DaVinci__N3BodyDecays
+        from StandardParticles import StdLooseAllPhotons as     inpts 
+        #
+        pre_chiw = self.make_selection (
+            'PreChiAndW'          ,
+            DaVinci__N3BodyDecays ,
+            [ self.DiMuonAndW () , self.W() , self.DiMuon() , inpts ] ,
+            #
+            ## algorihtm properties
+            # 
+            ##
+            DecayDescriptor = "[ chi_b1(2P) -> J/psi(1S) mu+ gamma ]cc" ,
+            ##
+            DaughtersCuts = {
+            "J/psi(1S)" : " ( M  < 3.21 * GeV ) | in_range ( 8.5 * GeV , M , 12.0 * GeV ) " ,
+            "gamma"     : self [ 'GammaChi' ]
+            },
+            ##
+            Combination12Cut = """
+            ACHI2DOCA(1,2) < 100 
+            """ , 
+            ## require chi_(c,b)
+            CombinationCut = """
+            AM13 - AM1 < 1.01 * GeV
+            """,
+            ##
+            MotherCut      = "  ALL " , 
+            #
+            )
+        ##
+        from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
+        ## 
+        return self.make_selection (
+            'ChiAndW'                     ,
+            Pi0Veto__Tagger               ,
+            [ pre_chiw ]                  ,
+            MassWindow     = 25 * MeV     ,
+            MassChi2       = -1           ,
+            ExtraInfoIndex = 25015     ## unique ! 
+            )
+    
+# =============================================================================
+if '__main__' == __name__ :
+
+    logger.info ( 80*'*'  ) 
+    logger.info (  __doc__ ) 
+    logger.info ( ' Author :  %s' % __author__ ) 
+    logger.info ( ' Date   :  %s' % __date__   )
+    logger.info ( 80 * '*' ) 
+    ##
+    clines = set() 
+    logger.info ( 70 * '-' ) 
+    logger.info ( ' %-15s | %-40s ' % ( 'STREAM' , 'LINE' ) )
+    logger.info ( 70 * '-' ) 
+    for stream in default_config['STREAMS'] :
+        lines = default_config['STREAMS'][stream]
+        for l in lines :
+            logger.info ( ' %-15s | %-40s ' % ( stream , l ) )
+            clines.add ( l )
+    logger.info ( 80 * '*' ) 
+    ##
+    logger.info ( ' The output locations for the default configuration: ' )
+    ##
+    _conf = StrippingPromptCharmConf ( 'PromptCharm' , 
+                                       config = default_config['CONFIG']  )
+    ##
+    _ln   = ' ' + 61*'-' + '+' + 55*'-'
+    logger.info ( _ln ) 
+    logger.info ( '  %-60s| %-40s | %s ' % ( 'Output location'     ,
+                                             'Stripping line name' ,
+                                             'MDST.DST'            ) ) 
+    logger.info ( _ln )
+    for l in _conf.lines() :
+        lout  = l.outputLocation()
+        lname = l.name()
+        flag  = l.MDSTFlag
+        logger.info ( '  %-60s| %-40s | %s ' % ( lout, lname , flag ) )
+        if not lname in clines :
+            raise AttributeError ('Unknown Line %s' % lname )
+        clines.remove ( lname )
+        
+    logger.info ( _ln ) 
+    logger.info ( 80*'*'  ) 
+    if clines :
+        raise AttributeError('Undeclared lines: %s' % clines )
+
+    keys = default_config['CONFIG'].keys()
+    keys.sort()
+    prescale = [ i for i in keys if 0 <= i.find('Prescale') ]
+    other    = [ i for i in keys if not i in prescale       ] 
+    logger.info ( 'Configuration keys are: %s' % other    ) 
+    logger.info ( 'Prescale      keys are: %s' % prescale ) 
+    logger.info ( 80*'*' ) 
+
+    ## make dot-graphs 
+    try:    
+        selections = _conf._selections_private() 
+        for s in selections :
+            from SelPy.graph import graph
+            o = graph ( s , format = 'png' )
+            if o : logger.info  ( "Generate DOT-graph: %s"          % o        )
+            else : logger.error ( "Can't produce DOT=-graph for %s" % s.name() )
+            
+    except : pass
+        
+        
+# =============================================================================
+# The END
+# =============================================================================
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXcpToLambdaKSHp.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXcpToLambdaKSHp.py
new file mode 100644
index 000000000..c1636c8ed
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXcpToLambdaKSHp.py
@@ -0,0 +1,128 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+"""
+Exclusive lines for Xc+ -> Lambda0 KS0 h+
+"""
+__author__ = ["Marian Stahl"]
+
+__all__ = ("XcpToLambdaKSHpConf", "default_config")
+
+moduleName = "XcpToLambdaKSHp"
+
+# Import Packages
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import AutomaticData
+from PhysConf.Selections import FilterSelection, Combine3BodySelection, MergedSelection
+from Configurables import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+
+# Default configuration dictionary
+default_config = {
+  "NAME": "XcpToLambdaKSHp",
+  "BUILDERTYPE": "XcpToLambdaKSHpConf",
+  "CONFIG": {
+    "descriptor_pion" : ["[Xi_c+ -> Lambda0 KS0 pi+]cc"],
+    "descriptor_kaon" : ["[Xi_c+ -> Lambda0 KS0 K+]cc"],
+    "bach_pion" : {
+      "tes"    : "Phys/StdAllNoPIDsPions/Particles",
+      "filter" : "(P>2*GeV) & (PT>150*MeV) & (MIPCHI2DV(PRIMARY)>1.5) & (PROBNNpi>0.05)"
+    },
+    "bach_kaon" : {
+      "tes"    : "Phys/StdAllNoPIDsKaons/Particles",
+      "filter" : "(P>4.5*GeV) & (PT>300*MeV) & (MIPCHI2DV(PRIMARY)>1) & (PROBNNk>0.05)"
+    },
+    "kshort_ll" : {
+      "tes"    : "Phys/StdVeryLooseKsLL/Particles",
+      "filter" : """(ADMASS('KS0')<25*MeV) & (PT>300*MeV) & (CHI2VXNDF<24) & (BPVVDZ>4*mm) & (BPVVDCHI2>12) & (CHILDIP(1)<0.8*mm) &
+                    (CHILDIP(2)<0.8*mm) & (DOCA(1,2)<0.8*mm) & (MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))>12) & (MAXTREE('pi+'==ABSID,PT)>100*MeV)"""
+    },
+    "kshort_dd" : {
+      "tes"    : "Phys/StdLooseKsDD/Particles",
+      "filter" : "(ADMASS('KS0')<25*MeV) & (PT>400*MeV) & (CHI2VXNDF<24) & (CHILDIP(1)<3*mm) & (CHILDIP(2)<3*mm) & (MAXTREE('pi+'==ABSID,PT)>150*MeV)"
+    },
+    "lambda_ll" : {
+      "tes"    : "Phys/StdVeryLooseLambdaLL/Particles",
+      "filter" : """(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>800*MeV) & (BPVVDZ>8*mm) & (BPVVDCHI2>32) &
+                    (DOCA(1,2)<0.6*mm) & (DOCACHI2(1,2)<16) & (MAXTREE('p+'==ABSID,PT)>600*MeV) & (MAXTREE('p+'==ABSID,P)>7.5*GeV) &
+                    (MAXTREE('p+'==ABSID,MIPCHI2DV(PRIMARY))>16) & (MAXTREE('pi+'==ABSID,PT)>100*MeV) & (MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))>16)"""
+    },
+    "lambda_dd" : {
+      "tes"    : "Phys/StdLooseLambdaDD/Particles",
+      "filter" : """(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>1*GeV) & (CHILDIP(1)<2*mm) & (MAXTREE('p+'==ABSID,P)>9*GeV) &
+                    (MAXTREE('p+'==ABSID,PT)>800*MeV) & (MAXTREE('pi+'==ABSID,PT)>150*MeV)"""
+    },
+    "xcp_ll" : {
+      "comb12_cut"      : "(ACHI2DOCA(1,2)<12) & (ADOCA(1,2)<0.4*mm) & (AMASS(1,2)<2470*MeV)",
+      "comb_cut"        : "(ADOCA(1,3)<0.25*mm) & (ADOCA(2,3)<0.3*mm) & (ACHI2DOCA(1,3)<12) & (ACHI2DOCA(1,3)<12) & (ASUM(PT)>2*GeV) & (in_range(2070*MeV,AMASS(),2610*MeV))",
+      "mother_cut"      : """(P>24*GeV) & (PT>1.5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0*mm) & (in_range(2120*MeV,M,2560*MeV)) &
+                             (CHILDIP(1)<0.25*mm) & (CHILDIP(2)<0.4*mm) & (CHILDIP(3)<0.2*mm) & (CHILDIPCHI2(1)<12) & (CHILDIPCHI2(2)<12) & (CHILDIPCHI2(3)<8) &
+                             ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>8*mm) & ((CHILD(VFASPF(VZ),2) - VFASPF(VZ))>4*mm)"""
+    },
+    "xcp_ld" : {
+      "comb12_cut"      : "(ADOCA(1,2)<2*mm) & (ACHI2DOCA(1,2)<24) & (AMASS(1,2)<2470*MeV)",
+      "comb_cut"        : "(ADOCA(1,3)<0.3*mm) & (ADOCA(2,3)<1.6*mm) & (ACHI2DOCA(1,3)<12) & (ACHI2DOCA(2,3)<16) & (ASUM(PT)>2.1*GeV) & (in_range(2070*MeV,AMASS(),2610*MeV))",
+      "mother_cut"      : """(P>24*GeV) & (PT>1.5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0*mm) & (in_range(2120*MeV,M,2560*MeV)) & (CHILDIP(1)<0.25*mm) & (CHILDIP(2)<3*mm) &
+                             (CHILDIP(3)<0.2*mm) & (CHILDIPCHI2(1)<14) & (CHILDIPCHI2(2)<16) & (CHILDIPCHI2(3)<8) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>8*mm)"""
+    },
+    "xcp_dl" : {
+      "comb12_cut"      : "(ADOCA(1,2)<2*mm) & (ACHI2DOCA(1,2)<20) & (AMASS(1,2)<2470*MeV)",
+      "comb_cut"        : "(ADOCA(1,3)<1.4*mm) & (ADOCA(2,3)<0.3*mm) & (ACHI2DOCA(1,3)<16) & (ACHI2DOCA(2,3)<12) & (ASUM(PT)>2.2*GeV) & (in_range(2070*MeV,AMASS(),2610*MeV))",
+      "mother_cut"      : """(P>24*GeV) & (PT>1.5*GeV) & (CHI2VXNDF<12) & (BPVVDZ>0*mm) & (in_range(2120*MeV,M,2560*MeV)) & (CHILDIP(1)<2*mm) & (CHILDIP(2)<0.4*mm) &
+                             (CHILDIP(3)<0.2*mm) & (CHILDIPCHI2(1)<16) & (CHILDIPCHI2(2)<14) & (CHILDIPCHI2(3)<8) & ((CHILD(VFASPF(VZ),2) - VFASPF(VZ))>4*mm)"""
+    },
+  },
+  "STREAMS" : {
+      "Charm" : ["StrippingXcpToLambdaKSHp_PiLine","StrippingXcpToLambdaKSHp_KLine"]
+  },
+  "WGs": ["Charm"]
+}
+
+class XcpToLambdaKSHpConf(LineBuilder):
+
+  __configuration_keys__ = default_config["CONFIG"].keys()
+
+  def __init__(self, moduleName, config):
+    LineBuilder.__init__(self, moduleName, config)
+
+    bach_pion = FilterSelection(moduleName+"_bach_pion", [AutomaticData(config["bach_pion"]["tes"])], Code=config["bach_pion"]["filter"])
+    bach_kaon = FilterSelection(moduleName+"_bach_kaon", [AutomaticData(config["bach_kaon"]["tes"])], Code=config["bach_kaon"]["filter"])
+    lambda_ll = FilterSelection(moduleName+"_lambda_ll", [AutomaticData(config["lambda_ll"]["tes"])], Code=config["lambda_ll"]["filter"])
+    lambda_dd = FilterSelection(moduleName+"_lambda_dd", [AutomaticData(config["lambda_dd"]["tes"])], Code=config["lambda_dd"]["filter"])
+    kshort_ll = FilterSelection(moduleName+"_kshort_ll", [AutomaticData(config["kshort_ll"]["tes"])], Code=config["kshort_ll"]["filter"])
+    kshort_dd = FilterSelection(moduleName+"_kshort_dd", [AutomaticData(config["kshort_dd"]["tes"])], Code=config["kshort_dd"]["filter"])
+
+    xcp_lkspi_ll = Combine3BodySelection(moduleName+"_xcp_lkspi_ll", [lambda_ll, kshort_ll, bach_pion], DecayDescriptors=config["descriptor_pion"],
+                                         Combination12Cut=config["xcp_ll"]["comb12_cut"], CombinationCut=config["xcp_ll"]["comb_cut"],
+                                         MotherCut=config["xcp_ll"]["mother_cut"])
+    xcp_lkspi_ld = Combine3BodySelection(moduleName+"_xcp_lkspi_ld", [lambda_ll, kshort_dd, bach_pion], DecayDescriptors=config["descriptor_pion"],
+                                         Combination12Cut=config["xcp_ll"]["comb12_cut"], CombinationCut=config["xcp_ll"]["comb_cut"],
+                                         MotherCut=config["xcp_ll"]["mother_cut"])
+    xcp_lkspi_dl = Combine3BodySelection(moduleName+"_xcp_lkspi_dl", [lambda_dd, kshort_ll, bach_pion], DecayDescriptors=config["descriptor_pion"],
+                                         Combination12Cut=config["xcp_ll"]["comb12_cut"], CombinationCut=config["xcp_ll"]["comb_cut"],
+                                         MotherCut=config["xcp_ll"]["mother_cut"])
+
+    xcp_lksk_ll = Combine3BodySelection(moduleName+"_xcp_lksk_ll", [lambda_ll, kshort_ll, bach_kaon], DecayDescriptors=config["descriptor_kaon"],
+                                        Combination12Cut=config["xcp_ll"]["comb12_cut"], CombinationCut=config["xcp_ll"]["comb_cut"],
+                                        MotherCut=config["xcp_ll"]["mother_cut"])
+    xcp_lksk_ld = Combine3BodySelection(moduleName+"_xcp_lksk_ld", [lambda_ll, kshort_dd, bach_kaon], DecayDescriptors=config["descriptor_kaon"],
+                                        Combination12Cut=config["xcp_ll"]["comb12_cut"], CombinationCut=config["xcp_ll"]["comb_cut"],
+                                        MotherCut=config["xcp_ll"]["mother_cut"])
+    xcp_lksk_dl = Combine3BodySelection(moduleName+"_xcp_lksk_dl", [lambda_dd, kshort_ll, bach_kaon], DecayDescriptors=config["descriptor_kaon"],
+                                        Combination12Cut=config["xcp_ll"]["comb12_cut"], CombinationCut=config["xcp_ll"]["comb_cut"],
+                                        MotherCut=config["xcp_ll"]["mother_cut"])
+
+    xcp_lkspi = MergedSelection(moduleName+"_lkspi_comb", RequiredSelections=[xcp_lkspi_ll, xcp_lkspi_ld, xcp_lkspi_dl])
+    xcp_lksk  = MergedSelection(moduleName+"_lksk_comb",  RequiredSelections=[xcp_lksk_ll,  xcp_lksk_ld,  xcp_lksk_dl])
+
+    # Create the stripping lines
+    self.registerLine(StrippingLine(moduleName+"_PiLine", algos=[xcp_lkspi]))
+    self.registerLine(StrippingLine(moduleName+"_KLine", algos=[xcp_lksk]))
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXcpToXiPipHp.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXcpToXiPipHp.py
new file mode 100644
index 000000000..19696a55a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXcpToXiPipHp.py
@@ -0,0 +1,154 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+"""
+Stripping lines for Xic+ -> Xi- pi+ pi+, Lc+ -> Xi- pi+ K+ and Xic+ -> Xi- pi+ K+.
+The lines are used to complement the inclusive Xi Turbo lines by adding
+Velo raw banks to study if the Xi- can be reconstructed as an upstream track.
+"""
+__author__ = ["Marian Stahl", "Laurent Dufour"]
+
+__all__ = ("XcpToXiPipHpConf", "default_config")
+
+moduleName = "XcpToXiPipHp"
+
+# Import Packages
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import AutomaticData
+from PhysConf.Selections import (FilterSelection, CombineSelection, Combine3BodySelection, MergedSelection)
+from Configurables import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+
+# Default configuration dictionary
+default_config = {
+  "NAME": "XcpToXiPipHp",
+  "BUILDERTYPE": "XcpToXiPipHpConf",
+  "CONFIG": {
+    "descriptor_xi"     : ["[Xi- -> Lambda0 pi-]cc"],
+    "descriptor_xipipi" : ["[Xi_c+ -> Xi- pi+ pi+]cc"],
+    "descriptor_xikpi"  : ["[Xi_c+ -> Xi- K+ pi+]cc"],
+    "RequiredRawEvents" : ["Velo"],
+    "bach_pion" : {
+      "tes"    : "Phys/StdAllNoPIDsPions/Particles",
+      "filter" : "(P>2*GeV) & (PT>100*MeV) & (MIPDV(PRIMARY)>0.01*mm) & (MIPCHI2DV(PRIMARY)>1) & (PROBNNpi>0.03)"
+    },
+    "down_pion" : {
+      "tes"    : "Phys/StdNoPIDsDownPions/Particles",
+      "filter" : "(P>2*GeV) & (PT>150*MeV) & (PROBNNpi>0.03)"
+    },
+    "bach_kaon" : {
+      "tes"    : "Phys/StdAllNoPIDsKaons/Particles",
+      "filter" : "(P>4.5*GeV) & (PT>300*MeV) & (MIPCHI2DV(PRIMARY)>1) & (PROBNNk>0.1)"
+    },
+    "lambda_ll" : {
+      "tes"    : "Phys/StdVeryLooseLambdaLL/Particles",
+      "filter" : """(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>800*MeV) & (BPVVDZ>8*mm) & (BPVVDCHI2>32) & (CHI2VXNDF<24) &
+                    (DOCA(1,2)<0.6*mm) & (DOCACHI2(1,2)<16) & (MAXTREE('p+'==ABSID,PT)>600*MeV) & (MAXTREE('p+'==ABSID,P)>7.5*GeV) &
+                    (MAXTREE('p+'==ABSID,MIPCHI2DV(PRIMARY))>9) & (MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))>9)"""
+    },
+    "lambda_dd" : {
+      "tes"    : "Phys/StdLooseLambdaDD/Particles",
+      "filter" : """(ADMASS('Lambda0')<20*MeV) & (P>12*GeV) & (PT>1*GeV) & (CHILDIP(1)<2*mm) & (MAXTREE('p+'==ABSID,P)>9*GeV) & (CHI2VXNDF<24) &
+                    (MAXTREE('p+'==ABSID,PT)>800*MeV) & (MAXTREE('pi+'==ABSID,PT)>150*MeV)"""
+    },
+    "xi_lll" : {
+      "comb_cut"   : "(ADOCA(1,2)<0.3*mm) & (ACHI2DOCA(1,2)<16) & (ASUM(PT)>1*GeV) & (ADAMASS('Xi-')<60*MeV) & (ACHILD(2,MIPCHI2DV(PRIMARY))>9)",
+      "mother_cut" : """(ADMASS('Xi-')<30*MeV) & (P>10*GeV) & (PT>700*MeV) & (BPVVDCHI2>40) & (BPVVD>12*mm) & (CHI2VXNDF<16) &
+                         (CHILDIP(1)<0.16*mm) & (CHILDIP(2)<0.28*mm) & (CHILDIPCHI2(1)<8) & (CHILDIPCHI2(2)<8)"""
+    },
+    "xi_ddl" : {
+      "comb_cut"   : "(ADOCA(1,2)<2*mm) & (ACHI2DOCA(1,2)<24) & (ASUM(PT)>1.1*GeV) & (ADAMASS('Xi-')<60*MeV) & (ACHILD(2,MIPCHI2DV(PRIMARY))>9)",
+      "mother_cut" : "(ADMASS('Xi-')<30*MeV) & (P>15*GeV) & (PT>800*MeV) & (CHI2VXNDF<16) & (CHILDIP(1)<2.5*mm) & (CHILDIP(2)<0.35*mm)"
+    },
+    "xi_ddd" : {
+      "comb_cut"   : "(ADOCA(1,2)<3*mm) & (ACHI2DOCA(1,2)<32) & (ASUM(PT)>1.2*GeV) & (ADAMASS('Xi-')<60*MeV)",
+      "mother_cut" : "(ADMASS('Xi-')<30*MeV) & (P>16*GeV) & (PT>800*MeV) & (CHI2VXNDF<16) & (CHILDIP(1)<3*mm) & (CHILDIP(2)<1*mm)"
+    },
+    "amass_xipipi" : "(in_range(2360*MeV,AMASS(),2580*MeV)) & ",
+    "amass_xikpi"  : "(in_range(2160*MeV,AMASS(),2580*MeV)) & ",
+    "mass_xipipi"  : "(in_range(2400*MeV,M,2540*MeV)) & ",
+    "mass_xikpi"   : "(in_range(2220*MeV,M,2540*MeV)) & ",
+    "xc_lll" : {
+      "comb12_cut" : "(AMASS(1,2)<2510*MeV) & (ADOCA(1,2)<0.24*mm) & (ACHI2DOCA(1,2)<12)",
+      "comb_cut"   : """(APT>1.3*GeV) & (ASUM(PT)>1.75*GeV) & (ADOCA(1,3)<0.35*mm) & (ACHI2DOCA(1,3)<10) & (ADOCA(2,3)<0.35*mm) & (ACHI2DOCA(2,3)<9) &
+                        (AHASCHILD(ISBASIC & HASTRACK & (PT>300*MeV) & (P>3*GeV) & (MIPCHI2DV(PRIMARY)>2)))""",
+      "mother_cut" : """(P>20*GeV) & (PT>1.5*GeV) & (BPVVDZ>0.25*mm) & (BPVVDZ<200*mm) & (CHI2VXNDF<9) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>12*mm) &
+                        (CHILDIP(1)<0.15*mm) & (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.45*mm) & (CHILDIPCHI2(1)<9) & (CHILDIPCHI2(2)<6) & (CHILDIPCHI2(3)<9) &
+                        ((CHILD(2,PX)*CHILD(3,PX)+CHILD(2,PY)*CHILD(3,PY)+CHILD(2,PZ)*CHILD(3,PZ))/(CHILD(2,P)*CHILD(3,P))<0.99999998)"""
+    },
+    "xc_ddl" : {
+      "comb12_cut" : "(AMASS(1,2)<2510*MeV) & (ADOCA(1,2)<1.5*mm) & (ACHI2DOCA(1,2)<12)",
+      "comb_cut"   : """(APT>1.3*GeV) & (ASUM(PT)>1.8*GeV) & (ADOCA(1,3)<1.8*mm) & (ACHI2DOCA(1,3)<12) & (ADOCA(2,3)<0.5*mm) & (ACHI2DOCA(2,3)<12) &
+                        (AHASCHILD(ISBASIC & HASTRACK & (PT>300*MeV) & (P>3*GeV) & (MIPCHI2DV(PRIMARY)>2)))""",
+      "mother_cut" : """(P>20*GeV) & (PT>1.5*GeV) & (BPVVDZ>0.25*mm) & (BPVVDZ<200*mm) & (CHI2VXNDF<9) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>12*mm) &
+                        (CHILDIP(1)<1.4*mm) & (CHILDIP(2)<0.2*mm) & (CHILDIP(3)<0.4*mm) & (CHILDIPCHI2(1)<12) & (CHILDIPCHI2(2)<6) & (CHILDIPCHI2(3)<9) &
+                        ((CHILD(2,PX)*CHILD(3,PX)+CHILD(2,PY)*CHILD(3,PY)+CHILD(2,PZ)*CHILD(3,PZ))/(CHILD(2,P)*CHILD(3,P))<0.99999998)"""
+    },
+    "xc_ddd" : {
+      "comb12_cut" : "(AMASS(1,2)<2510*MeV) & (ADOCA(1,2)<2*mm) & (ACHI2DOCA(1,2)<16)",
+      "comb_cut"   : """(APT>1.3*GeV) & (ASUM(PT)>1.9*GeV) & (ADOCA(1,3)<3*mm) & (ACHI2DOCA(1,3)<16) & (ADOCA(2,3)<1*mm) & (ACHI2DOCA(2,3)<16) &
+                        (AHASCHILD(ISBASIC & HASTRACK & (PT>300*MeV) & (P>3*GeV) & (MIPCHI2DV(PRIMARY)>2)))""",
+      "mother_cut" : """(P>20*GeV) & (PT>1.5*GeV) & (BPVVDZ>0.25*mm) & (BPVVDZ<200*mm) & (CHI2VXNDF<9) & ((CHILD(VFASPF(VZ),1) - VFASPF(VZ))>12*mm) &
+                        (CHILDIP(1)<2*mm) & (CHILDIP(2)<0.3*mm) & (CHILDIP(3)<0.4*mm) & (CHILDIPCHI2(1)<16) & (CHILDIPCHI2(2)<12) & (CHILDIPCHI2(3)<12) &
+                        ((CHILD(2,PX)*CHILD(3,PX)+CHILD(2,PY)*CHILD(3,PY)+CHILD(2,PZ)*CHILD(3,PZ))/(CHILD(2,P)*CHILD(3,P))<0.99999998)"""
+    },
+  },
+  "STREAMS" : {
+      "CharmCompleteEvent" : ["StrippingXcpToXiPipHp_{0}{1}Line".format(h,tt) for h in ["Pi","K"] for tt in ["LLL","DDL","DDD"]]
+  },
+  "WGs": ["Charm"]
+}
+
+class XcpToXiPipHpConf(LineBuilder):
+
+  __configuration_keys__ = default_config["CONFIG"].keys()
+
+  def __init__(self, moduleName, config):
+    LineBuilder.__init__(self, moduleName, config)
+    # decay products
+    bach_pion = FilterSelection(moduleName+"_bach_pion", [AutomaticData(config["bach_pion"]["tes"])], Code=config["bach_pion"]["filter"])
+    down_pion = FilterSelection(moduleName+"_down_pion", [AutomaticData(config["down_pion"]["tes"])], Code=config["down_pion"]["filter"])
+    bach_kaon = FilterSelection(moduleName+"_bach_kaon", [AutomaticData(config["bach_kaon"]["tes"])], Code=config["bach_kaon"]["filter"])
+    lambda_ll = FilterSelection(moduleName+"_lambda_ll", [AutomaticData(config["lambda_ll"]["tes"])], Code=config["lambda_ll"]["filter"])
+    lambda_dd = FilterSelection(moduleName+"_lambda_dd", [AutomaticData(config["lambda_dd"]["tes"])], Code=config["lambda_dd"]["filter"])
+    xi_lll    = CombineSelection(moduleName+"_xi_lll", [lambda_ll, bach_pion], DecayDescriptors=config["descriptor_xi"],
+                                 CombinationCut=config["xi_lll"]["comb_cut"], MotherCut=config["xi_lll"]["mother_cut"])
+    xi_ddl    = CombineSelection(moduleName+"_xi_ddl", [lambda_dd, bach_pion], DecayDescriptors=config["descriptor_xi"],
+                                 CombinationCut=config["xi_ddl"]["comb_cut"], MotherCut=config["xi_ddl"]["mother_cut"])
+    xi_ddd    = CombineSelection(moduleName+"_xi_ddd", [lambda_dd, down_pion], DecayDescriptors=config["descriptor_xi"],
+                                 CombinationCut=config["xi_ddd"]["comb_cut"], MotherCut=config["xi_ddd"]["mother_cut"])
+    # charm baryon candidates; this could look a bit nicer when looping over track types and channels...
+    xipipi_lll = Combine3BodySelection(moduleName+"_xipipi_lll", [xi_lll, bach_pion], DecayDescriptors=config["descriptor_xipipi"],
+                                       Combination12Cut=config["xc_lll"]["comb12_cut"], CombinationCut=config["amass_xipipi"]+config["xc_lll"]["comb_cut"],
+                                       MotherCut=config["mass_xipipi"]+config["xc_lll"]["mother_cut"])
+    xipipi_ddl = Combine3BodySelection(moduleName+"_xipipi_ddl", [xi_ddl, bach_pion], DecayDescriptors=config["descriptor_xipipi"],
+                                       Combination12Cut=config["xc_ddl"]["comb12_cut"], CombinationCut=config["amass_xipipi"]+config["xc_ddl"]["comb_cut"],
+                                       MotherCut=config["mass_xipipi"]+config["xc_ddl"]["mother_cut"])
+    xipipi_ddd = Combine3BodySelection(moduleName+"_xipipi_ddd", [xi_ddd, bach_pion], DecayDescriptors=config["descriptor_xipipi"],
+                                       Combination12Cut=config["xc_ddd"]["comb12_cut"], CombinationCut=config["amass_xipipi"]+config["xc_ddd"]["comb_cut"],
+                                       MotherCut=config["mass_xipipi"]+config["xc_ddd"]["mother_cut"])
+
+    xikpi_lll  = Combine3BodySelection(moduleName+"_xikpi_lll", [xi_lll, bach_pion, bach_kaon], DecayDescriptors=config["descriptor_xikpi"],
+                                       Combination12Cut=config["xc_lll"]["comb12_cut"], CombinationCut=config["amass_xikpi"]+config["xc_lll"]["comb_cut"],
+                                       MotherCut=config["mass_xikpi"]+config["xc_lll"]["mother_cut"])
+    xikpi_ddl  = Combine3BodySelection(moduleName+"_xikpi_ddl", [xi_ddl, bach_pion, bach_kaon], DecayDescriptors=config["descriptor_xikpi"],
+                                       Combination12Cut=config["xc_ddl"]["comb12_cut"], CombinationCut=config["amass_xikpi"]+config["xc_ddl"]["comb_cut"],
+                                       MotherCut=config["mass_xikpi"]+config["xc_ddl"]["mother_cut"])
+    xikpi_ddd  = Combine3BodySelection(moduleName+"_xikpi_ddd", [xi_ddd, bach_pion, bach_kaon], DecayDescriptors=config["descriptor_xikpi"],
+                                       Combination12Cut=config["xc_ddd"]["comb12_cut"], CombinationCut=config["amass_xikpi"]+config["xc_ddd"]["comb_cut"],
+                                       MotherCut=config["mass_xikpi"]+config["xc_ddd"]["mother_cut"])
+    # Create the stripping lines
+    self.registerLine(StrippingLine(moduleName+"_PiLLLLine", RequiredRawEvents=config["RequiredRawEvents"], algos=[xipipi_lll]))
+    self.registerLine(StrippingLine(moduleName+"_PiDDLLine", RequiredRawEvents=config["RequiredRawEvents"], algos=[xipipi_ddl]))
+    self.registerLine(StrippingLine(moduleName+"_PiDDDLine", RequiredRawEvents=config["RequiredRawEvents"], algos=[xipipi_ddd]))
+    self.registerLine(StrippingLine(moduleName+"_KLLLLine",  RequiredRawEvents=config["RequiredRawEvents"], algos=[xikpi_lll]))
+    self.registerLine(StrippingLine(moduleName+"_KDDLLine",  RequiredRawEvents=config["RequiredRawEvents"], algos=[xikpi_ddl]))
+    self.registerLine(StrippingLine(moduleName+"_KDDDLine",  RequiredRawEvents=config["RequiredRawEvents"], algos=[xikpi_ddd]))
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2HHH.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2HHH.py
new file mode 100644
index 000000000..5532893b5
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2HHH.py
@@ -0,0 +1,597 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+all
+''' Xic+ and Theta+ lines Designed by Yury Shcheglov, Alexey Dzyuba, Nelya Sagidova to study Xic+ and Theta+ particles '''
+
+__author__ = ['Yury Shcheglov']
+__date__ = '2016/20/05'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = ( 'StrippingXic2HHHConf',
+            'makeXic2HHH',
+            'default_config' )
+
+
+
+import re
+from Gaudi.Configuration import *
+from StrippingConf.StrippingLine import StrippingLine
+from GaudiKernel.SystemOfUnits import MeV, mm, ns
+from LHCbKernel.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, AutomaticData, MergedSelection
+from PhysSelPython.Wrappers import MultiSelectionSequence
+
+#from Configurables import LoKi__VoidFilte
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdNoPIDsPions, StdNoPIDsKaons,StdNoPIDsProtons, StdAllNoPIDsProtons
+
+from Configurables import TisTosParticleTagger
+
+
+default_config = {
+    'NAME'        : 'BetacHHH',
+    "BUILDERTYPE": "StrippingXic2HHHConf", 
+    "CONFIG": {
+        "Comb_ADOCAMAX_MAX": 0.3, 
+        "Comb_MASS_MAX": 2800.0, 
+        "Comb_MASS_MIN": 2200.0, 
+        "Daug_All_PT_MIN": 300.0, 
+        "Daug_P_MIN": 3000.0, 
+        "Daug_TRCHI2DOF_MAX": 3.0, 
+        "K_IPCHI2_MIN": 4.0, 
+        "PostscaleBetac2LcKS0": 1.0, 
+        "PostscaleBetac2pDs": 0.0, 
+        "PostscaleBetacLb1": 1.0, 
+        "PostscaleBetacLb2": 1.0, 
+        "PostscaleXic2PKK": 1.0, 
+        "PostscaleXic2PKPi": 0.0, 
+        "PrescaleBetac2LcKS0": 1.0, 
+        "PrescaleBetac2pDs": 0.0, 
+        "PrescaleBetacLb1": 1.0, 
+        "PrescaleBetacLb2": 1.0, 
+        "PrescaleXic2PKK": 1.0, 
+        "PrescaleXic2PKPi": 0.0, 
+        "RelatedInfoTools": [
+            {
+                "ConeAngle": 1.5, 
+                "Location": "Cone1", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "ConeAngle": 0.75, 
+                "Location": "Cone2", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "ConeAngle": 0.5, 
+                "Location": "Cone3", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "ConeAngle": 0.25, 
+                "Location": "Cone4", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPTASYM"
+                ]
+            }, 
+            {
+                "ConeAngle": 0.1, 
+                "Location": "Cone5", 
+                "Type": "RelInfoConeVariables", 
+                "Variables": [
+                    "CONEANGLE", 
+                    "CONEMULT", 
+                    "CONEPTASYM"
+                ]
+            }
+        ], 
+        "Xic_BPVDIRA_MIN": 0.999, 
+        "Xic_BPVIPCHI2_MAX": 12.0, 
+        "Xic_BPVLTIME_MAX": 0.003, 
+        "Xic_BPVLTIME_MIN": 0.0002, 
+        "Xic_BPVVDCHI2_MIN": 0.0, 
+        "Xic_PT_MIN": 2000.0, 
+        "Xic_VCHI2VDOF_MAX": 10.0, 
+        "pion_IPCHI2_MIN": 4.0
+    }, 
+    "STREAMS": [ "Charm" ], 
+    "WGs": ["Charm"] # Note, this should always be a list.
+}
+
+
+class StrippingXic2HHHConf(LineBuilder): 
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    __confdict__={}
+    ## Possible parameters and default values copied from the definition
+    ##   of StrippingLine
+    def _strippingLine ( self,
+                          name             ,   # the base name for the Line
+                          prescale  = 1.0  ,   # prescale factor
+                          ODIN      = None ,   # ODIN predicate
+                          L0DU      = None ,   # L0DU predicate
+                          FILTER    = None ,   # 'VOID'-predicate, e.g. Global Event Cut
+                          checkPV   = True ,   # Check PV before running algos
+                          algos     = None ,   # the list of stripping members
+                          selection = None ,
+                          postscale = 1.0    ,   # postscale factor
+                          MaxCandidates = "Override",   # Maximum number
+                          MaxCombinations = "Override", # Maximum number
+                          HDRLocation = None, # other configuration parameter 
+                          RelatedInfoTools = None ) : # RelatedInfoTools to be included  
+
+
+        if (prescale > 0) and (postscale > 0) : 
+            line = StrippingLine( name,
+                                  prescale        = prescale,
+                                  ODIN            = ODIN,
+                                  L0DU            = L0DU,
+                                  FILTER          = FILTER,
+                                  checkPV         = checkPV,
+                                  algos           = algos,
+                                  selection       = selection,
+                                  postscale       = postscale,
+                                  MaxCandidates   = MaxCandidates,
+                                  MaxCombinations = MaxCombinations,
+                                  HDRLocation     = HDRLocation, 
+                                  RelatedInfoTools  = RelatedInfoTools)
+
+            self.registerLine(line)
+            return line
+
+        else : 
+            return False
+
+
+
+    def __init__(self, name, config) : 
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__= config
+
+        xic_PKPi_name =  name + 'Xic2PKPi'
+        xic_pKK_name  =  name + 'Xic2PKK'
+        betac_lcks_name  =  name + 'Betac2LcKS0'
+        betac_pds_name  =  name + 'Betac2pDs'
+        betac_lb1_name  =  name + 'BetacLb1'
+        betac_lb2_name  =  name + 'BetacLb2'
+
+        self.KS0LL = DataOnDemand(Location = "Phys/StdLooseKsLL/Particles")
+        self.KS0DD = DataOnDemand(Location = "Phys/StdLooseKsDD/Particles")
+
+
+ ############### PROTON SELECTIONS #########################################
+
+
+        self.inProtons = Selection( "Protonsfor" + name,
+                                  Algorithm = self._protonFilter(),
+                                  RequiredSelections = [StdNoPIDsProtons])
+
+
+ ############### PIONS, Lambda0, KS0 and KAONS SELECTIONS ##################
+        
+        self.inPions  = Selection( "Pionsfor" + name,
+                                  Algorithm = self._pionFilter(),
+                                  RequiredSelections = [StdNoPIDsPions])
+
+        self.inKS0LL  = Selection( "KS0LLFor" + name,
+                                  Algorithm = self._KS0LLFilter(),
+                                  RequiredSelections = [self.KS0LL])
+        
+        self.inKS0DD  = Selection( "KS0DDFor" + name,
+                                  Algorithm = self._KS0DDFilter(),
+                                  RequiredSelections = [self.KS0DD])
+
+
+        self.inKS0   =  MergedSelection( "KS0for" + name,
+                                  RequiredSelections = [self.inKS0LL,self.inKS0DD])
+
+        self.inKaons  = Selection( "Kaonsfor" + name,
+                                  Algorithm = self._kaonFilter(),
+                                  RequiredSelections = [StdNoPIDsKaons])
+
+
+ ###############################################################
+        self.selXic2PKPi = makeXic2PKPi( name = xic_PKPi_name
+               , inputSel = [ self.inProtons, self.inKaons, self.inPions]
+               , Daug_All_PT_MIN = config['Daug_All_PT_MIN']
+               , Daug_P_MIN = config['Daug_P_MIN']
+               , Daug_TRCHI2DOF_MAX = config['Daug_TRCHI2DOF_MAX']
+               , Comb_MASS_MIN  = 2190. * MeV
+               , Comb_MASS_MAX  = 2570. * MeV
+               , Comb_ADOCAMAX_MAX = config['Comb_ADOCAMAX_MAX']
+               , Xic_PT_MIN = config['Xic_PT_MIN']
+               , Xic_VCHI2VDOF_MAX = config['Xic_VCHI2VDOF_MAX']
+               , Xic_BPVVDCHI2_MIN = config['Xic_BPVVDCHI2_MIN']
+               , Xic_BPVDIRA_MIN = config['Xic_BPVDIRA_MIN']
+               , Xic_BPVIPCHI2_MAX = config['Xic_BPVIPCHI2_MAX'] 
+               , Xic_BPVLTIME_MAX = config['Xic_BPVLTIME_MAX']
+               , Xic_BPVLTIME_MIN = config['Xic_BPVLTIME_MIN']
+             )
+                                      
+        self.selXic2PKK = makeXic2PKPi( name = xic_pKK_name
+               , inputSel = [self.inKaons, self.inProtons]
+               , Daug_All_PT_MIN = config['Daug_All_PT_MIN']
+               , Daug_P_MIN = config['Daug_P_MIN']
+               , Daug_TRCHI2DOF_MAX = config['Daug_TRCHI2DOF_MAX']
+               , Comb_MASS_MIN  = config['Comb_MASS_MIN']
+               , Comb_MASS_MAX  = 2800. * MeV
+               , Comb_ADOCAMAX_MAX = config['Comb_ADOCAMAX_MAX']
+               , Xic_PT_MIN = config['Xic_PT_MIN']
+               , Xic_VCHI2VDOF_MAX = config['Xic_VCHI2VDOF_MAX']  
+               , Xic_BPVVDCHI2_MIN = config['Xic_BPVVDCHI2_MIN']
+               , Xic_BPVDIRA_MIN = config['Xic_BPVDIRA_MIN']
+               , Xic_BPVIPCHI2_MAX = config['Xic_BPVIPCHI2_MAX']
+               , Xic_BPVLTIME_MAX = config['Xic_BPVLTIME_MAX']
+               , Xic_BPVLTIME_MIN = config['Xic_BPVLTIME_MIN']  
+               , decDescriptors = [ "[Lambda_c+ -> p+ K- K+]cc" ]
+             )
+
+        self.selBetac2LcKS0 = makeBetac2LcKS0 ( name = betac_lcks_name
+               , inputSel = [ self.inProtons, self.inKaons,  self.inPions, self.inKS0]
+               , Daug_All_PT_MIN =  config['Daug_All_PT_MIN']
+               , Daug_P_MIN = config['Daug_P_MIN']
+               , Daug_TRCHI2DOF_MAX = config['Daug_TRCHI2DOF_MAX']
+               , Comb_MASS_MIN  = 2770. * MeV            
+               , Comb_MASS_MAX  = 3600. * MeV            
+               , Comb_ADOCAMAX_MAX = 1.0 * mm
+               , Xic_PT_MIN = 3000. * MeV
+               , Xic_BPVDIRA_MIN = -100.
+               , Xic_BPVIPCHI2_MAX = config['Xic_BPVIPCHI2_MAX']
+               , Xic_BPVLTIME_MAX = config['Xic_BPVLTIME_MAX']
+               , Xic_BPVLTIME_MIN = config['Xic_BPVLTIME_MIN']
+               , decDescriptors = [ "[Lambda_c+ -> p+ K- pi+ KS0]cc" ]
+             )
+
+
+        self.selBetac2pDs = makeBetac2pDs ( name = betac_pds_name
+               , inputSel = [ self.inProtons,self.inPions,self.inKaons]
+               , Daug_All_PT_MIN =  config['Daug_All_PT_MIN']
+               , Daug_P_MIN = config['Daug_P_MIN']
+               , Daug_TRCHI2DOF_MAX = config['Daug_TRCHI2DOF_MAX']
+               , Comb_MASS_MIN  = 2500. * MeV
+               , Comb_MASS_MAX  = 3700. * MeV
+               , Comb_ADOCAMAX_MAX = 1.0 * mm
+               , Xic_PT_MIN = 5000. * MeV
+               , Xic_BPVDIRA_MIN = -100.
+               , Xic_BPVIPCHI2_MAX = config['Xic_BPVIPCHI2_MAX']
+               , Xic_BPVLTIME_MAX = config['Xic_BPVLTIME_MAX']
+               , Xic_BPVLTIME_MIN = config['Xic_BPVLTIME_MIN']
+               , decDescriptors = [ "[Sigma_c++ -> p+ pi+ K- pi+]cc" ]
+             )
+
+
+        self.selBetacLb1 = makeBetacLb1 ( name = betac_lb1_name
+               , inputSel = [ self.inProtons, self.inKaons, self.inKS0, self.inPions]
+               , Daug_All_PT_MIN =  config['Daug_All_PT_MIN']
+               , Daug_P_MIN = config['Daug_P_MIN']
+               , Daug_TRCHI2DOF_MAX = config['Daug_TRCHI2DOF_MAX']
+               , Comb_MASS_MIN  = 5000. * MeV
+               , Comb_MASS_MAX  = 6000. * MeV
+               , Comb_ADOCAMAX_MAX = 1.0 * mm
+               , Xic_PT_MIN = 2000. * MeV
+               , Xic_BPVDIRA_MIN = -100.
+               , Xic_BPVIPCHI2_MAX = config['Xic_BPVIPCHI2_MAX']
+               , Xic_BPVLTIME_MAX = config['Xic_BPVLTIME_MAX']
+               , Xic_BPVLTIME_MIN = config['Xic_BPVLTIME_MIN']
+               , decDescriptors = [ "[Lambda_b0 -> p+ K- K+ KS0 pi-]cc" ]
+             )
+                                         
+        self.selBetacLb2 = makeBetacLb2 ( name = betac_lb2_name  
+               , inputSel = [ self.inProtons, self.inKaons,  self.inPions, self.inKS0, self.inPions]
+               , Daug_All_PT_MIN =  config['Daug_All_PT_MIN']
+               , Daug_P_MIN = config['Daug_P_MIN']
+               , Daug_TRCHI2DOF_MAX = config['Daug_TRCHI2DOF_MAX']
+               , Comb_MASS_MIN  = 5000. * MeV
+               , Comb_MASS_MAX  = 6000. * MeV
+               , Comb_ADOCAMAX_MAX = 1.0 * mm
+               , Xic_PT_MIN = 2000. * MeV
+               , Xic_BPVDIRA_MIN = -100. 
+               , Xic_BPVIPCHI2_MAX = config['Xic_BPVIPCHI2_MAX']
+               , Xic_BPVLTIME_MAX = config['Xic_BPVLTIME_MAX']
+               , Xic_BPVLTIME_MIN = config['Xic_BPVLTIME_MIN']
+               , decDescriptors = [ "[Lambda_b0 -> p+ K- pi+ KS0 KS0 pi-]cc" ]
+             )
+
+
+        self.line_Xic2PKPi = self._strippingLine( name = xic_PKPi_name + 'Line',
+                                         prescale  = config['PrescaleXic2PKPi'],
+                                         postscale = config['PostscaleXic2PKPi'],
+                                         RelatedInfoTools = config['RelatedInfoTools'],
+                                         selection = self.selXic2PKPi,
+                                       )
+
+        self.line_Xic2PKK = self._strippingLine( name = xic_pKK_name + 'Line',
+                                         prescale  = config['PrescaleXic2PKK'],
+                                         postscale = config['PostscaleXic2PKK'],
+                                         RelatedInfoTools = config['RelatedInfoTools'],
+                                         selection = self.selXic2PKK,
+                                       )
+
+        self.line_Betac2LcKS0 = self._strippingLine( name = betac_lcks_name + 'Line',
+                                         prescale  = config['PrescaleBetac2LcKS0'],
+                                         postscale = config['PostscaleBetac2LcKS0'],
+                                         RelatedInfoTools = config['RelatedInfoTools'],
+                                         selection = self.selBetac2LcKS0,
+                                       )
+
+        self.line_Betac2pDs = self._strippingLine( name = betac_pds_name + 'Line',
+                                         prescale  = config['PrescaleBetac2pDs'],
+                                         postscale = config['PostscaleBetac2pDs'],
+                                         RelatedInfoTools = config['RelatedInfoTools'],
+                                         selection = self.selBetac2pDs,
+                                       )
+
+        self.line_BetacLb1 = self._strippingLine( name = betac_lb1_name + 'Line',
+                                         prescale  = config['PrescaleBetacLb1'],
+                                         postscale = config['PostscaleBetacLb1'],
+                                         RelatedInfoTools = config['RelatedInfoTools'],
+                                         selection = self.selBetacLb1,
+                                       )
+
+        self.line_BetacLb2= self._strippingLine( name = betac_lb2_name + 'Line', 
+                                         prescale  = config['PrescaleBetacLb2'], 
+                                         postscale = config['PostscaleBetacLb2'], 
+                                         RelatedInfoTools = config['RelatedInfoTools'],
+                                         selection = self.selBetacLb2, 
+                                       )
+
+
+    def _protonFilter( self ):
+          _code = "(PROBNNp > 0.55) &(TRGHP < 0.4) & (P> 2000.0*MeV) & (TRCHI2DOF < %(Daug_TRCHI2DOF_MAX)s)" % self.__confdict__
+          _proton = FilterDesktop( Code = _code )
+          return _proton
+
+
+    def _pionFilter( self ):
+          _code = "(PROBNNpi > 0.15) &(TRGHP < 0.4) & (MIPCHI2DV(PRIMARY) > %(pion_IPCHI2_MIN)s) &(P>2000*MeV)& (PT>300*MeV)&(TRCHI2DOF < %(Daug_TRCHI2DOF_MAX)s) " % self.__confdict__
+          _pion = FilterDesktop( Code = _code )
+          return _pion
+
+
+    def _kaonFilter( self ):
+          _code = "(PROBNNk > 0.4) &(TRGHP < 0.4) & (MIPCHI2DV(PRIMARY) > %(K_IPCHI2_MIN)s) & (P>2000*MeV) & (PT>300*MeV) &(TRCHI2DOF < %(Daug_TRCHI2DOF_MAX)s)" % self.__confdict__          
+          _kaon = FilterDesktop( Code = _code )
+          return _kaon
+
+
+    def _KS0LLFilter( self ):
+          _code = "(P>3000.*MeV)&(PT>800.*MeV)&(BPVLTIME()>3.0*ps)&CHILDCUT((TRCHI2DOF<4.),1)&CHILDCUT((TRCHI2DOF<4.),2)" \
+                                                "& (BPVVDZ > 0.0 * mm) " \
+                                                "& (BPVVDZ < 2300.0 * mm) " \
+                                                "& (BPVDIRA > 0.99995 ) " \
+                                                "& (ADMASS('KS0') < 15.0 *MeV) " \
+                                                "& (BPVVDCHI2> 100)" % self.__confdict__
+          _KS0LL = FilterDesktop( Code = _code )
+          return _KS0LL
+                                  
+    def _KS0DDFilter( self ):
+          _code = "(P>3000.*MeV)&(PT>800.*MeV)&(BPVLTIME()>3.0*ps)&CHILDCUT((TRCHI2DOF<4.),1)&CHILDCUT((TRCHI2DOF<4.),2)" \
+                                                "& (BPVVDZ > -1000.0 * mm) " \
+                                                "& (BPVVDZ < 650.0 * mm) " \
+                                                "& (BPVDIRA > 0.99995 ) " \
+                                                "& (ADMASS('KS0') < 15.0 *MeV) " \
+                                                "& (BPVVDCHI2> 100)" % self.__confdict__
+               
+          _KS0DD = FilterDesktop( Code = _code )
+          return _KS0DD
+
+
+def makeXic2PKPi( name
+               , inputSel
+               , Daug_All_PT_MIN
+               , Daug_P_MIN
+               , Daug_TRCHI2DOF_MAX
+               , Comb_MASS_MIN 
+               , Comb_MASS_MAX
+               , Comb_ADOCAMAX_MAX
+               , Xic_PT_MIN
+               , Xic_VCHI2VDOF_MAX
+               , Xic_BPVVDCHI2_MIN
+               , Xic_BPVDIRA_MIN
+               , Xic_BPVIPCHI2_MAX 
+               , Xic_BPVLTIME_MAX
+               , Xic_BPVLTIME_MIN
+               , decDescriptors = [ "[Lambda_c -> p+ K- pi+]cc" ]
+             ) : 
+
+
+    combCuts = "(AM > %(Comb_MASS_MIN)s)" \
+               "& (AM < %(Comb_MASS_MAX)s)" \
+               "& (AMINCHILD(PT) > %(Daug_All_PT_MIN)s)" \
+               "& (AMINCHILD(P)  > %(Daug_P_MIN)s)" \
+               "& (ADOCAMAX('') < %(Comb_ADOCAMAX_MAX)s)" % locals()
+
+
+    xicCuts =  "(PT > %(Xic_PT_MIN)s)" \
+               "& (VFASPF(VCHI2/VDOF) < %(Xic_VCHI2VDOF_MAX)s)" \
+               "& (BPVIPCHI2() < %(Xic_BPVIPCHI2_MAX)s)" \
+               "& (BPVVDCHI2 > %(Xic_BPVVDCHI2_MIN)s)" \
+               "& (BPVDIRA > %(Xic_BPVDIRA_MIN)s)" \
+               "& (BPVLTIME() > %(Xic_BPVLTIME_MIN)s)" \
+               "& (BPVLTIME() < %(Xic_BPVLTIME_MAX)s)" % locals()
+
+
+    _Xic = CombineParticles(
+        DecayDescriptors = decDescriptors
+
+        , CombinationCut = combCuts
+        , MotherCut = xicCuts 
+    )
+
+    return Selection( name,
+                      Algorithm = _Xic,
+                      RequiredSelections = inputSel
+                    )
+
+
+def makeBetac2LcKS0( name
+               , inputSel
+               , Daug_All_PT_MIN
+               , Daug_P_MIN
+               , Daug_TRCHI2DOF_MAX
+               , Comb_MASS_MIN
+               , Comb_MASS_MAX
+               , Comb_ADOCAMAX_MAX
+               , Xic_PT_MIN
+               , Xic_BPVDIRA_MIN
+               , Xic_BPVIPCHI2_MAX
+               , Xic_BPVLTIME_MAX
+               , Xic_BPVLTIME_MIN
+               , decDescriptors = [ "[Lambda_c+ -> p+ K- pi+ KS0]cc" ]
+             ) :
+
+    combCuts = "(AM > %(Comb_MASS_MIN)s)" \
+               "& (AM <  %(Comb_MASS_MAX)s)" \
+               "& (AMINCHILD(P)  > %(Daug_P_MIN)s)" \
+               "& (AMINCHILD(PT) > %(Daug_All_PT_MIN)s)" % locals()
+
+    betacCuts = "(PT > %(Xic_PT_MIN)s)" % locals()
+
+    _Betac2LcKS0 = CombineParticles(
+        DecayDescriptors = decDescriptors
+        , CombinationCut = combCuts
+        , MotherCut = betacCuts
+    )
+
+    return Selection( name,
+                      Algorithm = _Betac2LcKS0,
+                      RequiredSelections = inputSel
+                    )
+
+
+def makeBetac2pDs( name
+               , inputSel
+               , Daug_All_PT_MIN
+               , Daug_P_MIN
+               , Daug_TRCHI2DOF_MAX
+               , Comb_MASS_MIN
+               , Comb_MASS_MAX
+               , Comb_ADOCAMAX_MAX
+               , Xic_PT_MIN
+               , Xic_BPVDIRA_MIN
+               , Xic_BPVIPCHI2_MAX
+               , Xic_BPVLTIME_MAX
+               , Xic_BPVLTIME_MIN
+               , decDescriptors = [ "[Sigma_c++ -> p+ pi+ K- pi+]cc" ]
+             ) :
+
+    combCuts = "(AM > %(Comb_MASS_MIN)s)" \
+               "& (AM <  %(Comb_MASS_MAX)s)" \
+               "& (AMINCHILD(P)  > %(Daug_P_MIN)s)" \
+               "& (AMINCHILD(PT) > %(Daug_All_PT_MIN)s)" % locals()
+
+    betacCuts = "(PT > %(Xic_PT_MIN)s)" % locals()
+
+    _Betac2pDs = CombineParticles(
+        DecayDescriptors = decDescriptors
+        , CombinationCut = combCuts
+        , MotherCut = betacCuts
+    )
+
+    return Selection( name,
+                      Algorithm = _Betac2pDs,
+                      RequiredSelections = inputSel
+                    )    
+
+
+def makeBetacLb1( name
+               , inputSel
+               , Daug_All_PT_MIN
+               , Daug_P_MIN
+               , Daug_TRCHI2DOF_MAX
+               , Comb_MASS_MIN
+               , Comb_MASS_MAX
+               , Comb_ADOCAMAX_MAX 
+               , Xic_PT_MIN
+               , Xic_BPVDIRA_MIN
+               , Xic_BPVIPCHI2_MAX
+               , Xic_BPVLTIME_MAX
+               , Xic_BPVLTIME_MIN
+               , decDescriptors = [ "[Lambda_b0 -> p+ K- K+ KS0 pi-]cc" ]
+             ) :
+                     
+    combCuts = "(AM > %(Comb_MASS_MIN)s)" \
+               "& (AM <  %(Comb_MASS_MAX)s)" \
+               "& (( ACHILD(MIPCHI2DV(), 1) + ACHILD(MIPCHI2DV(), 2) + ACHILD(MIPCHI2DV(), 3)+ ACHILD(MIPCHI2DV(), 6) )>25)" \
+               "& (AMINCHILD(P)  > %(Daug_P_MIN)s)" \
+               "& (AMINCHILD(PT) > %(Daug_All_PT_MIN)s)" % locals()
+                              
+    betacCuts = "(PT > %(Xic_PT_MIN)s)" % locals()
+               
+    _BetacLb1 = CombineParticles(
+        DecayDescriptors = decDescriptors
+        , CombinationCut = combCuts
+        , MotherCut = betacCuts 
+    )
+               
+    return Selection( name,
+                      Algorithm = _BetacLb1,
+                      RequiredSelections = inputSel
+                    )
+    
+def makeBetacLb2( name
+               , inputSel
+               , Daug_All_PT_MIN
+               , Daug_P_MIN
+               , Daug_TRCHI2DOF_MAX
+               , Comb_MASS_MIN
+               , Comb_MASS_MAX
+               , Comb_ADOCAMAX_MAX 
+               , Xic_PT_MIN
+               , Xic_BPVDIRA_MIN
+               , Xic_BPVIPCHI2_MAX
+               , Xic_BPVLTIME_MAX
+               , Xic_BPVLTIME_MIN
+               , decDescriptors = [ "[Lambda_b0 -> p+ K- pi+ KS0 KS0 pi-]cc" ]
+             ) :
+    
+    combCuts = "(AM > %(Comb_MASS_MIN)s)" \
+               "& (AM <  %(Comb_MASS_MAX)s)" \
+               "& ((ACHILD(MIPCHI2DV(), 1) + ACHILD(MIPCHI2DV(), 2) + ACHILD(MIPCHI2DV(), 3) + ACHILD(MIPCHI2DV(), 6) )>25)" \
+               "& (AMINCHILD(P)  > %(Daug_P_MIN)s)" \
+               "& (AMINCHILD(PT) > %(Daug_All_PT_MIN)s)" % locals()
+               
+    betacCuts = "(PT > %(Xic_PT_MIN)s)" % locals()
+               
+    _BetacLb2 = CombineParticles( 
+        DecayDescriptors = decDescriptors
+        , CombinationCut = combCuts
+        , MotherCut = betacCuts   
+    )
+               
+    return Selection( name,
+                      Algorithm = _BetacLb2,
+                      RequiredSelections = inputSel
+                    )
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2PKKPiForXSec.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2PKKPiForXSec.py
new file mode 100644
index 000000000..c2b35bd99
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2PKKPiForXSec.py
@@ -0,0 +1,259 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of
+    [Xi_c0 -> p+ K- K- pi+]cc
+for open charm cross section measurement.
+"""
+
+__author__ = ['Alex Pearce']
+
+__all__ = (
+    'default_config',
+    'StrippingXic2PKKPiForXSecConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from Configurables import CombineParticles, FilterDesktop
+from StandardParticles import (
+    StdAllNoPIDsProtons,
+    StdAllNoPIDsKaons,
+    StdAllNoPIDsPions
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+from MVADictHelpers import addTMVAclassifierValue
+
+default_config = {
+    'NAME': 'Xic2PKKPiForXSec',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingXic2PKKPiForXSecConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum transverse momentum all Xic0 daughters must satisfy
+        'Daug_All_PT_MIN': 250.0*MeV,
+        # Minimum transverse momentum at least 3 Xic0 daughters must satisfy
+        'Daug_3of4_PT_MIN': 300.0*MeV,
+        # Minimum transverse momentum at least 2 Xic0 daughters must satisfy
+        'Daug_2of4_PT_MIN': 400.0*MeV,
+        # Minimum transverse momentum at least 1 Xic0 daughter must satisfy
+        'Daug_1of4_PT_MIN': 800.0*MeV,
+        # Minimum best primary vertex IP chi^2 all Xic0 daughters must satisfy
+        'Daug_All_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 3 Xic0 daughters must satisfy
+        'Daug_3of4_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 2 Xic0 daughters must satisfy
+        'Daug_2of4_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 1 Xic0 daughter must satisfy
+        'Daug_1of4_BPVIPCHI2_MIN': 4.0,
+        # Minimum Xic0 daughter momentum
+        'Daug_P_MIN': 3.0*GeV,
+        # Maximum Xic0 daughter momentum
+        'Daug_P_MAX': 100.0*GeV,
+        # Minimum Xic0 daughter pseudorapidity
+        'Daug_ETA_MIN': 2.0,
+        # Maximum Xic0 daughter pseudorapidity
+        'Daug_ETA_MAX': 5.0,
+        # Minimum Xic0 daughter proton DLLp
+        'Proton_PIDpPIDpi_MIN': 10.0,
+        # Minimum Xic0 daughter proton DLLp - DLLK
+        'Proton_PIDpPIDK_MIN': 5.0,
+        # Minimum Xic0 daughter kaon DLLK
+        'K_PIDK_MIN': 5.0,
+        # Maximum Xic0 daughter pion DLLK
+        'Pi_PIDK_MAX': 3.0,
+        # Xic0 mass window around the nominal Xic0 mass before the vertex fit
+        'Comb_ADAMASS_WIN': 90.0*MeV,
+        # Maximum distance of closest approach of Xic0 daughters
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Maximum Xic0 vertex chi^2 per vertex fit DoF
+        'Xic_VCHI2VDOF_MAX': 25.0,
+        # Maximum angle between Xic0 momentum and Xic0 direction of flight
+        'Xic_acosBPVDIRA_MAX': 35.0*mrad,
+        # Primary vertex displacement requirement, that the Xic0 is some sigma
+        # away from the PV and it has a minimum flight time
+        'Xic_PVDispCut': (
+            '((BPVVDCHI2 > 4.0) &'
+            '(BPVLTIME() > 0.075*picosecond))'
+        ),
+        # Minimum Xic0 MVA discriminant value
+        'Xic_MVA_MIN': -0.3,
+        # Path to the Xic0 MVA weights file
+        # BDT is not applied if this is the empty string or None
+        'Xic_MVA_Weights': None,
+        # Dictionary of LoKi functors defining the Xic0 MVA input variables
+        # The keys must match those used when training the MVA
+        'Xic_MVA_Variables': {
+        },
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleXic2PKKPi': 0.0,
+        # Fraction of candidates to randomly throw after before stripping
+        'PostscaleXic2PKKPi': 1.0
+    }
+}
+
+
+class StrippingXic2PKKPiForXSecConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    Xic2PKKPi = ['[Xi_c0 -> p+ K- K- pi+]cc']
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        xic_pkkpi_name = '{0}Xic2PKKPi'.format(name)
+
+        self.inPions = StdAllNoPIDsPions
+        self.inKaons = StdAllNoPIDsKaons
+        self.inProtons = StdAllNoPIDsProtons
+
+        self.selXic2PKKPi = self.makeXic2PKKPi(
+            name=xic_pkkpi_name,
+            inputSel=[self.inProtons, self.inKaons, self.inPions],
+            decDescriptors=self.Xic2PKKPi
+        )
+        self.selXic2PKKPiMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(xic_pkkpi_name),
+            self.selXic2PKKPi
+        )
+
+        self.line_Xic2PKKPi = self.make_line(
+            name='{0}Line'.format(xic_pkkpi_name),
+            selection=self.selXic2PKKPiMVA,
+            prescale=config['PrescaleXic2PKKPi'],
+            postscale=config['PostscaleXic2PKKPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeXic2PKKPi(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a Xi_c0 -> p+ h- h- h+ decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        daugCuts = (
+            '(PT > {0[Daug_All_PT_MIN]})'
+            '& (BPVIPCHI2() > {0[Daug_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+
+        pidFiducialCuts = (
+            '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+            '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+        ).format(self.config)
+
+        protonPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDp - PIDpi) > {0[Proton_PIDpPIDpi_MIN]})'
+            '& ((PIDp - PIDK) > {0[Proton_PIDpPIDK_MIN]})'
+        ).format(self.config)
+
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDK - PIDpi) > {0[K_PIDK_MIN]})'
+        ).format(self.config)
+
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDK - PIDpi) < {0[Pi_PIDK_MAX]})'
+        ).format(self.config)
+
+        combCuts = (
+            "(ADAMASS('Xi_c0') < {0[Comb_ADAMASS_WIN]})"
+            '& (AMAXCHILD(PT) > {0[Daug_1of4_PT_MIN]})'
+            '& (AMAXCHILD(BPVIPCHI2()) > {0[Daug_1of4_BPVIPCHI2_MIN]})'
+            '& (ANUM(PT > {0[Daug_3of4_PT_MIN]}) >= 3)'
+            '& (ANUM(PT > {0[Daug_2of4_PT_MIN]}) >= 2)'
+            '& (ANUM(BPVIPCHI2() > {0[Daug_3of4_BPVIPCHI2_MIN]}) >= 3)'
+            '& (ANUM(BPVIPCHI2() > {0[Daug_2of4_BPVIPCHI2_MIN]}) >= 2)'
+            "& (ACUTDOCA({0[Comb_ADOCAMAX_MAX]}, ''))"
+        ).format(self.config)
+
+        xicCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[Xic_VCHI2VDOF_MAX]})'
+            '& ({0[Xic_PVDispCut]})'
+            '& (BPVDIRA > cos({0[Xic_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+
+        _Xic = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            DaughtersCuts={
+                'pi+': '{0} & {1}'.format(daugCuts, pionPIDCuts),
+                'K+': '{0} & {1}'.format(daugCuts, kaonPIDCuts),
+                'p+': '{0} & {1}'.format(daugCuts, protonPIDCuts)
+            },
+            CombinationCut=combCuts,
+            MotherCut=xicCuts
+        )
+
+        return Selection(name, Algorithm=_Xic, RequiredSelections=inputSel)
+
+    def makeMVASelection(self, name, inputSel):
+        # Don't apply a BDT if the weights file has not been specified
+        if not self.config['Xic_MVA_Weights']:
+            return inputSel
+
+        cut = "VALUE('LoKi::Hybrid::DictValue/{0}') > {1[Xic_MVA_MIN]}".format(
+            name, self.config
+        )
+        mva = FilterDesktop('{0}Filter'.format(name), Code=cut)
+
+        addTMVAclassifierValue(
+            Component=mva,
+            XMLFile=self.config['Xic_MVA_Weights'],
+            Variables=self.config['Xic_MVA_Variables'],
+            ToolName=name
+        )
+
+        return Selection(name, Algorithm=mva, RequiredSelections=[inputSel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2PKPiForXSec.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2PKPiForXSec.py
new file mode 100644
index 000000000..d0be8cb8c
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXic2PKPiForXSec.py
@@ -0,0 +1,253 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of
+    [Xi_c+ -> p+ K- pi+]cc
+for open charm cross section measurement.
+"""
+
+__author__ = ['Alex Pearce']
+
+__all__ = (
+    'default_config',
+    'StrippingXic2PKPiForXSecConf'
+)
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, mrad
+from Configurables import CombineParticles, FilterDesktop
+from StandardParticles import (
+    StdAllNoPIDsProtons,
+    StdAllNoPIDsKaons,
+    StdAllNoPIDsPions
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+from MVADictHelpers import addTMVAclassifierValue
+
+default_config = {
+    'NAME': 'Xic2PKPiForXSec',
+    'WGs': ['Charm'],
+    'BUILDERTYPE': 'StrippingXic2PKPiForXSecConf',
+    'STREAMS': ['Charm'],
+    'CONFIG': {
+        # Minimum transverse momentum all Xic+ daughters must satisfy
+        'Daug_All_PT_MIN': 200.0*MeV,
+        # Minimum transverse momentum at least 2 Xic+ daughters must satisfy
+        'Daug_2of3_PT_MIN': 400.0*MeV,
+        # Minimum transverse momentum at least 1 Xic+ daughter must satisfy
+        'Daug_1of3_PT_MIN': 1000.0*MeV,
+        # Minimum best primary vertex IP chi^2 all Xic+ daughters must satisfy
+        'Daug_All_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 2 Xic+ daughters must satisfy
+        'Daug_2of3_BPVIPCHI2_MIN': 4.0,
+        # Minimum best PV IP chi^2 at least 1 Xic+ daughter must satisfy
+        'Daug_1of3_BPVIPCHI2_MIN': 4.0,
+        # Minimum Xic+ daughter momentum
+        'Daug_P_MIN': 3.0*GeV,
+        # Maximum Xic+ daughter momentum
+        'Daug_P_MAX': 100.0*GeV,
+        # Minimum Xic+ daughter pseudorapidity
+        'Daug_ETA_MIN': 2.0,
+        # Maximum Xic+ daughter pseudorapidity
+        'Daug_ETA_MAX': 5.0,
+        # Minimum Xic+ daughter proton DLLp
+        'Proton_PIDpPIDpi_MIN': 10.0,
+        # Minimum Xic+ daughter proton DLLp - DLLK
+        'Proton_PIDpPIDK_MIN': 5.0,
+        # Minimum Xic+ daughter kaon DLLK
+        'K_PIDK_MIN': 5.0,
+        # Maximum Xic+ daughter pion DLLK
+        'Pi_PIDK_MAX': 3.0,
+        # Xic+ mass window around the nominal Xic+ mass before the vertex fit
+        'Comb_ADAMASS_WIN': 90.0*MeV,
+        # Maximum distance of closest approach of Xic+ daughters
+        'Comb_ADOCAMAX_MAX': 0.5*mm,
+        # Maximum Xic+ vertex chi^2 per vertex fit DoF
+        'Xic_VCHI2VDOF_MAX': 25.0,
+        # Maximum angle between Xic+ momentum and Xic+ direction of flight
+        'Xic_acosBPVDIRA_MAX': 35.0*mrad,
+        # Primary vertex displacement requirement, that the Xic+ is some sigma
+        # away from the PV and it has a minimum flight time
+        'Xic_PVDispCut': (
+            '((BPVVDCHI2 > 16.0) &'
+            '(BPVLTIME() > 0.150*picosecond))'
+        ),
+        # Minimum Xic MVA discriminant value
+        'Xic_MVA_MIN': -0.3,
+        # Path to the Xic MVA weights file
+        # BDT is not applied if this is the empty string or None
+        'Xic_MVA_Weights': None,
+        # Dictionary of LoKi functors defining the Xic MVA input variables
+        # The keys must match those used when training the MVA
+        'Xic_MVA_Variables': {
+        },
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Hlt1Filter': None,
+        'Hlt2Filter': None,
+        # Fraction of candidates to randomly throw away before stripping
+        'PrescaleXic2PKPi': 0.0,
+        # Fraction of candidates to randomly throw after before stripping
+        'PostscaleXic2PKPi': 1.0
+    }
+}
+
+
+class StrippingXic2PKPiForXSecConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    Xic2PKPi = ['[Xi_c+ -> p+ K- pi+]cc']
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+        xic_pkpi_name = '{0}Xic2PKPi'.format(name)
+
+        self.inPions = StdAllNoPIDsPions
+        self.inKaons = StdAllNoPIDsKaons
+        self.inProtons = StdAllNoPIDsProtons
+
+        self.selXic2PKPi = self.makeXic2PKPi(
+            name=xic_pkpi_name,
+            inputSel=[self.inProtons, self.inKaons, self.inPions],
+            decDescriptors=self.Xic2PKPi
+        )
+        self.selXic2PKPiMVA = self.makeMVASelection(
+            '{0}MVASelection'.format(xic_pkpi_name),
+            self.selXic2PKPi
+        )
+
+        self.line_Xic2PKPi = self.make_line(
+            name='{0}Line'.format(xic_pkpi_name),
+            selection=self.selXic2PKPiMVA,
+            prescale=config['PrescaleXic2PKPi'],
+            postscale=config['PostscaleXic2PKPi'],
+            HLT1=config['Hlt1Filter'],
+            HLT2=config['Hlt2Filter']
+        )
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeXic2PKPi(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a Xi_c+ -> p+ h- h+ decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        daugCuts = (
+            '(PT > {0[Daug_All_PT_MIN]})'
+            '& (BPVIPCHI2() > {0[Daug_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+
+        pidFiducialCuts = (
+            '(in_range({0[Daug_P_MIN]}, P, {0[Daug_P_MAX]}))'
+            '& (in_range({0[Daug_ETA_MIN]}, ETA, {0[Daug_ETA_MAX]}))'
+        ).format(self.config)
+
+        protonPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDp - PIDpi) > {0[Proton_PIDpPIDpi_MIN]})'
+            '& ((PIDp - PIDK) > {0[Proton_PIDpPIDK_MIN]})'
+        ).format(self.config)
+
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDK - PIDpi) > {0[K_PIDK_MIN]})'
+        ).format(self.config)
+
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& ((PIDK - PIDpi) < {0[Pi_PIDK_MAX]})'
+        ).format(self.config)
+
+        combCuts = (
+            "(ADAMASS('Xi_c+') < {0[Comb_ADAMASS_WIN]})"
+            '& (AMAXCHILD(PT) > {0[Daug_1of3_PT_MIN]})'
+            '& (AMAXCHILD(BPVIPCHI2()) > {0[Daug_1of3_BPVIPCHI2_MIN]})'
+            '& (ANUM(PT > {0[Daug_2of3_PT_MIN]}) >= 2)'
+            '& (ANUM(BPVIPCHI2() > {0[Daug_2of3_BPVIPCHI2_MIN]}) >= 2)'
+            "& (ACUTDOCA({0[Comb_ADOCAMAX_MAX]}, ''))"
+        ).format(self.config)
+
+        xicCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[Xic_VCHI2VDOF_MAX]})'
+            '& ({0[Xic_PVDispCut]})'
+            '& (BPVDIRA > cos({0[Xic_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+
+        _Xic = CombineParticles(
+            name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            DaughtersCuts={
+                'pi+': '{0} & {1}'.format(daugCuts, pionPIDCuts),
+                'K+': '{0} & {1}'.format(daugCuts, kaonPIDCuts),
+                'p+': '{0} & {1}'.format(daugCuts, protonPIDCuts)
+            },
+            CombinationCut=combCuts,
+            MotherCut=xicCuts
+        )
+
+        return Selection(name, Algorithm=_Xic, RequiredSelections=inputSel)
+
+    def makeMVASelection(self, name, inputSel):
+        # Don't apply a BDT if the weights file has not been specified
+        if not self.config['Xic_MVA_Weights']:
+            return inputSel
+
+        cut = "VALUE('LoKi::Hybrid::DictValue/{0}') > {1[Xic_MVA_MIN]}".format(
+            name, self.config
+        )
+        mva = FilterDesktop('{0}Filter'.format(name), Code=cut)
+
+        addTMVAclassifierValue(
+            Component=mva,
+            XMLFile=self.config['Xic_MVA_Weights'],
+            Variables=self.config['Xic_MVA_Variables'],
+            ToolName=name
+        )
+
+        return Selection(name, Algorithm=mva, RequiredSelections=[inputSel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXicToSigmaKPi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXicToSigmaKPi.py
new file mode 100644
index 000000000..00e636593
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXicToSigmaKPi.py
@@ -0,0 +1,256 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Exclusive lines for Xic+ -> Sigma0 KS0 pi+, Xic0 -> Sigma0 K- pi+ and Xic+ -> Sigma+ K- pi+ with Sigma+ from long proton tracks.
+(The Sigma+ lifetime is about as long as that of the KS, which has a large portion of long tracks)
+"""
+__author__ = ["Marian Stahl"]
+
+__all__ = ("XicToSigmaKPiConf", "default_config")
+
+moduleName = "XicToSigmaKPi"
+
+# Import Packages
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import AutomaticData
+from PhysConf.Selections import (FilterSelection, Combine3BodySelection,
+                                 MergedSelection, SimpleSelection)
+from Configurables import (FilterDesktop, ResolvedPi0Maker, PhotonMaker)
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from GaudiKernel.SystemOfUnits import MeV
+from CommonParticles.Utils import updateDoD
+
+# Default configuration dictionary
+default_config = {
+    "NAME": "XicToSigmaKPi",
+    "BUILDERTYPE": "XicToSigmaKPiConf",
+    "CONFIG": {
+        "pi": {
+            "TES":
+            "Phys/StdAllNoPIDsPions/Particles",
+            "Filter":
+            "(P>2000*MeV) & (PT>150*MeV) & (MIPCHI2DV(PRIMARY)>0.2) & (PROBNNpi>0.1)"
+        },
+        "K": {
+            "TES":
+            "Phys/StdAllNoPIDsKaons/Particles",
+            "Filter":
+            "(P>2000*MeV) & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>0.2) & (PROBNNk>0.1)"
+        },
+        "p": {
+            "TES":
+            "Phys/StdAllNoPIDsProtons/Particles",
+            "Filter":
+            "(P>4000*MeV) & (PT>250*MeV) & (PROBNNp>0.1) & (MIPCHI2DV(PRIMARY)>12)"
+        },
+        "gamma": {
+            "TES": "Phys/StdVeryLooseAllPhotons/Particles",
+            "Filter": "CL>0.4"
+        },
+        "piz": {
+            "MassWindow": 60 * MeV,
+            "PhotonPT": 100 * MeV,
+            "PhotonCL": 0.4,
+            "Filter": "(CL>0.4) & (PT>180*MeV)"
+        },
+        'KShortLL': {
+            'TES':
+            "Phys/StdVeryLooseKsLL/Particles",
+            'Filter':
+            "(ADMASS('KS0')<25*MeV) & (MAXTREE('pi+'==ABSID,PROBNNpi)>0.05) & (MAXTREE('pi+'==ABSID,MIPCHI2DV(PRIMARY))>6) & (CHI2VXNDF<6) & (BPVVDCHI2>12)"
+        },
+        'KShortDD': {
+            'TES':
+            "Phys/StdLooseKsDD/Particles",
+            'Filter':
+            "(ADMASS('KS0')<25*MeV) & (MAXTREE('pi+'==ABSID,PROBNNpi)>0.05) & (CHI2VXNDF<6) & (BPVVDCHI2>12) & (BPVVDZ>500*mm)"
+        },
+        'LambdaLL': {
+            'TES':
+            'Phys/StdVeryLooseLambdaLL/Particles',
+            'Filter':
+            """(ADMASS('Lambda0')<20*MeV) & (MAXTREE('p+'==ABSID,PROBNNp)>0.1) & (MAXTREE('pi+'==ABSID,PROBNNpi)>0.05) & (CHI2VXNDF<6) & (BPVVDCHI2>48) &
+                     (MAXTREE('p+'==ABSID,PT)>250*MeV) & (MAXTREE('p+'==ABSID,P)>7500*MeV) & (MAXTREE('pi+'==ABSID,TRGHOSTPROB)<0.3) &
+                     (MAXTREE('p+'==ABSID,TRGHOSTPROB)<0.3) & (P>12*GeV) & (PT>600*MeV)"""
+        },
+        'LambdaDD': {
+            'TES':
+            'Phys/StdLooseLambdaDD/Particles',
+            'Filter':
+            """(ADMASS('Lambda0')<20*MeV) & (MAXTREE('p+'==ABSID,PROBNNp)>0.25) & (MAXTREE('pi+'==ABSID,PROBNNpi)>0.1) & (CHI2VXNDF<6) & (BPVVDZ>500*mm) &
+                     (MAXTREE('p+'==ABSID,PT)>300*MeV) & (MAXTREE('p+'==ABSID,P)>7500*MeV) & (MAXTREE('pi+'==ABSID,TRGHOSTPROB)<0.3) &
+                     (MAXTREE('p+'==ABSID,TRGHOSTPROB)<0.3) & (BPVVDCHI2>48) & (P>12*GeV) & (PT>600*MeV)"""
+        },
+        "Sigmap": {
+            "DD": ["[Sigma+ -> p+ pi0]cc"],
+            "CombCut": "ADAMASS('Sigma+')<100*MeV",
+            "MotherCut": "(BPVVDZ>5*mm)"
+        },
+        "Sigmaz": {
+            "DD": ["[Sigma0 -> Lambda0 gamma]cc"],
+            "CombCut": "ADAMASS('Sigma0')<100*MeV",
+            "MotherCut": "ALL"
+        },
+        "XicpToSpKmPip": {
+            "DD": ["[Xi_c+ -> K- pi+ Sigma+]cc"],
+            "Comb12Cut":
+            "(ACHI2DOCA(1,2)<8) & (AMASS(1,2)<1500*MeV) & (ASUM(PT)>1800*MeV)",
+            "CombCut":
+            "ADAMASS('Xi_c+')<80*MeV",
+            "MotherCut":
+            "(ADMASS('Xi_c+')<52*MeV) & (BPVDIRA>0.999) & (BPVIPCHI2()<12) & (CHI2VXNDF<6) & (BPVVDZ>0*mm) & (CHILD(3,VFASPF(VZ))-VFASPF(VZ)>5*mm)"
+        },
+        "XicpToSzKzPip": {
+            "DD": ["[Xi_c+ -> pi+ KS0 Sigma0]cc"],
+            "Comb12Cut":
+            "(ACHI2DOCA(1,2)<15) & (AMASS(1,2)<1500*MeV) & (ASUM(PT)>1800*MeV)",
+            "CombCut":
+            "ADAMASS('Xi_c+')<100*MeV",
+            "MotherCut":
+            "(ADMASS('Xi_c+')<52*MeV) & (BPVDIRA>0.999) & (BPVIPCHI2()<12) & (CHI2VXNDF<6) & (BPVVDZ>0*mm)"
+        },
+        "XiczToSzKmPip": {
+            "DD": ["[Xi_c0 -> K- pi+ Sigma0]cc"],
+            "Comb12Cut":
+            "(ACHI2DOCA(1,2)<8) & (AMASS(1,2)<1500*MeV) & (ASUM(PT)>1800*MeV)",
+            "CombCut":
+            "ADAMASS('Xi_c0')<80*MeV",
+            "MotherCut":
+            "(ADMASS('Xi_c0')<52*MeV) & (BPVDIRA>0.999) & (BPVIPCHI2()<12) & (CHI2VXNDF<6) & (BPVVDZ>0*mm)"
+        },
+    },
+    "STREAMS": {
+        "Charm": [
+            "StrippingXicpToSpKmPipLine",
+            "StrippingXicpToSzKzPipLine",
+            "StrippingXiczToSzKmPipLine",
+        ]
+    },
+    "WGs": ["Charm"]
+}
+
+
+# Configure the LineBuilder
+class XicToSigmaKPiConf(LineBuilder):
+
+    __configuration_keys__ = default_config["CONFIG"].keys()
+
+    def __init__(self, moduleName, config):
+        LineBuilder.__init__(self, moduleName, config)
+
+        # Stable daughters in the decay
+        pi = FilterSelection(
+            moduleName + "DetachedLongPions",
+            [AutomaticData(config["pi"]["TES"])],
+            Code=config["pi"]["Filter"])
+        K = FilterSelection(
+            moduleName + "DetachedLongKaons",
+            [AutomaticData(config["K"]["TES"])],
+            Code=config["K"]["Filter"])
+        p = FilterSelection(
+            moduleName + "DetachedLongProtons",
+            [AutomaticData(config["p"]["TES"])],
+            Code=config["p"]["Filter"])
+
+        gamma = FilterSelection(
+            moduleName + "Gammas", [AutomaticData(config["gamma"]["TES"])],
+            Code=config["gamma"]["Filter"])
+
+        # pi0s from Sigma+ decays are very soft. We can gain efficiency by loosening StdResolvedPi0
+        pizr = ResolvedPi0Maker(
+            moduleName + "VeryLoosePi02gg",
+            DecayDescriptor="pi0",
+            MassWindow=config["piz"]["MassWindow"])
+        make_loose_photons = PhotonMaker(
+            moduleName + "LoosePhotons",
+            PtCut=config["piz"]["PhotonPT"],
+            ConfLevelCut=config["piz"]["PhotonCL"])
+        pizr.addTool(make_loose_photons)
+        #adding this to DoD since I don't know how to access the output of the Makers directly
+        updateDoD(pizr)
+
+        LambdaLL = FilterSelection(
+            moduleName + "LambdaLL",
+            [AutomaticData(config['LambdaLL']['TES'])],
+            Code=config['LambdaLL']['Filter'])
+        LambdaDD = FilterSelection(
+            moduleName + "LambdaDD",
+            [AutomaticData(config['LambdaDD']['TES'])],
+            Code=config['LambdaDD']['Filter'])
+        KShortLL = FilterSelection(
+            moduleName + "KShortLL",
+            [AutomaticData(config['KShortLL']['TES'])],
+            Code=config['KShortLL']['Filter'])
+        KShortDD = FilterSelection(
+            moduleName + "KShortDD",
+            [AutomaticData(config['KShortDD']['TES'])],
+            Code=config['KShortDD']['Filter'])
+
+        Lambda = MergedSelection(
+            moduleName + "MergedLambdas",
+            RequiredSelections=[LambdaLL, LambdaDD])
+        KShort = MergedSelection(
+            moduleName + "MergedKShorts",
+            RequiredSelections=[KShortLL, KShortDD])
+
+        # When building the Sigma+, we try to cut as loose as possible, because the pi0 still points back to the PV region.
+        Sigmap = SimpleSelection(
+            moduleName + "Sigmap",
+            CombineParticles, [
+                p,
+                AutomaticData("Phys/" + moduleName +
+                              "VeryLoosePi02gg/Particles")
+            ],
+            DaughtersCuts={
+                "pi0": config["piz"]["Filter"],
+                "p+": "ALL"
+            },
+            DecayDescriptors=config["Sigmap"]["DD"],
+            CombinationCut=config["Sigmap"]["CombCut"],
+            MotherCut=config["Sigmap"]["MotherCut"])
+
+        Sigmaz = SimpleSelection(
+            moduleName + "Sigmaz",
+            CombineParticles, [Lambda, gamma],
+            DecayDescriptors=config["Sigmaz"]["DD"],
+            CombinationCut=config["Sigmaz"]["CombCut"],
+            MotherCut=config["Sigmaz"]["MotherCut"])
+
+        # Do the 3-body combination. Use DTF offline
+        XicpToSpKmPip = Combine3BodySelection(
+            moduleName + "XicpToSpKmPip", [Sigmap, K, pi],
+            DecayDescriptors=config["XicpToSpKmPip"]["DD"],
+            Combination12Cut=config["XicpToSpKmPip"]["Comb12Cut"],
+            CombinationCut=config["XicpToSpKmPip"]["CombCut"],
+            MotherCut=config["XicpToSpKmPip"]["MotherCut"])
+
+        XicpToSzKzPip = Combine3BodySelection(
+            moduleName + "XicpToSzKzPip", [Sigmaz, KShort, pi],
+            DecayDescriptors=config["XicpToSzKzPip"]["DD"],
+            Combination12Cut=config["XicpToSzKzPip"]["Comb12Cut"],
+            CombinationCut=config["XicpToSzKzPip"]["CombCut"],
+            MotherCut=config["XicpToSzKzPip"]["MotherCut"])
+
+        XiczToSzKmPip = Combine3BodySelection(
+            moduleName + "XiczToSzKmPip", [Sigmaz, K, pi],
+            DecayDescriptors=config["XiczToSzKmPip"]["DD"],
+            Combination12Cut=config["XiczToSzKmPip"]["Comb12Cut"],
+            CombinationCut=config["XiczToSzKmPip"]["CombCut"],
+            MotherCut=config["XiczToSzKmPip"]["MotherCut"])
+
+        # Create the stripping lines
+        self.registerLine(
+            StrippingLine("XicpToSpKmPipLine", algos=[XicpToSpKmPip]))
+        self.registerLine(
+            StrippingLine("XicpToSzKzPipLine", algos=[XicpToSzKzPip]))
+        self.registerLine(
+            StrippingLine("XiczToSzKmPipLine", algos=[XiczToSzKmPip]))
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXicc.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXicc.py
new file mode 100644
index 000000000..f1994c813
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXicc.py
@@ -0,0 +1,751 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id$
+'''
+Speculative code for doubly-charmed baryon searches.
+The following six final states are used:
+  Xicc+  -> Lambdac+ K- pi+
+  Xicc++ -> Lambdac+ K- pi+ pi+
+  Xicc+  -> Xic0 pi+
+  Xicc++ -> Xic0 pi+ pi+
+  Xicc+  -> Xic+ pi+ pi-
+  Xicc++ -> Xic+ pi+
+where the daughter charmed baryon is reconstructed via:
+  Lambdac+ -> p K- pi+ (from StdLooseLambdac2PKPi)
+  Xic0 -> Xi- pi+
+  Xic+ -> Xi- pi+ pi+
+and where the Xi- is reconstructed via:
+  Xi- -> Lambda pi-, Lambda -> p pi- (from StdLooseLambdaDD and StdLooseLambdaLL)
+In addition to the six Xicc signal lines, three control lines are written out
+for the Lambdac+, Xic0, and Xic+. It will certainly be necessary to prescale
+the Lambdac+ control line, and perhaps the others too.
+'''
+
+__author__ = ['Patrick Spradlin', 'Mat Charles']
+__date__ = '2015 May 13'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = ( 'XiccBuilder'               ## LineBuilder class specialization
+            , 'default_name'            ## Default name for XiccBuilder object
+            , 'default_config'          ## Default config for XiccBuilder object
+            , 'makeLc'                  ## Lambda_c+ selection
+            , 'makeXi'                  ## Xi selection
+            , 'makeXicZero'             ## Xi_c^0 selection
+            , 'makeXicPlusToXiPiPi'     ## Xi_c^+ selection
+            , 'makeXicPlusToPKPi'       ## Xi_c^+ selection
+            , 'makeXicc'                ## Xi_cc^{+(+)} selection
+            , 'makeTisTos'              ## Apply TisTos filters
+            , 'filterKaons'
+            , 'filterPions'
+            , 'filterProtons'
+            , 'filterDplus'
+            , 'filterDsplus'
+            , 'filterD0' 
+            , 'filterLcForControl'
+          )
+
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLoosePions, StdAllLooseKaons, StdAllLooseProtons
+from StandardParticles import StdLoosePions
+from CommonParticles.StdLooseLambda import StdLooseLambdaLL, StdLooseLambdaDD
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from Configurables import TisTosParticleTagger
+
+
+default_config = {
+    'NAME'  : 'Xicc'
+    , 'WGs'   : [ 'Charm' ]
+    , 'BUILDERTYPE' : 'XiccBuilder'
+    , 'CONFIG' : { 'LongTrackGEC' : 150
+                   , 'controlPrescaleLc'       : 0.05
+                   , 'controlPrescaleXic'      : 0.05
+                   , 'controlPrescaleDp'       : 0.01
+                   , 'controlPrescaleD0'       : 0.01
+                   , 'controlPrescaleDsp'      : 0.01
+                   , 'signalPrescaleViaLc'     : 1.0
+                   , 'signalPrescaleViaLcWC'   : 1.0
+                   , 'signalPrescaleViaLcDCS'  : 1.0
+                   , 'signalPrescaleViaXic'    : 1.0
+                   , 'signalPrescaleViaXicWC'  : 1.0
+                   , 'signalPrescaleViaDp'     : 1.0
+                   , 'signalPrescaleViaDpWC'   : 1.0
+                   , 'signalPrescaleViaD0'     : 1.0
+                   , 'signalPrescaleViaD0WC'   : 1.0
+                   , 'signalPrescaleViaD0DCS'  : 1.0
+                   , 'LcHlt2TisTosSpec' : { 'Hlt2CharmHadLcpToPpKmPip.*Decision%TOS' : 0, 'Hlt2Global%TIS' : 0 }
+                   , 'DzHlt2TisTosSpec' : { 'Hlt2CharmHad.*Decision%TOS' : 0, 'Hlt2Global.*%TIS' : 0 }
+                   , 'DpHlt2TisTosSpec' : { 'Hlt2CharmHadDpToKmPipPip.*Decision%TOS' : 0, 'Hlt2Global%TIS' : 0 }
+                   , 'XiHlt2TisTosSpec' : { 'Hlt2CharmHadXim2LamPim.*Decision%TOS' : 0, 'Hlt2Global%TIS' : 0 }
+                 }
+    , 'STREAMS' : [ 'Charm' ]
+}
+
+
+## These configuration parameters should not be changed outside of this file.
+_my_immutable_config = {
+        'Lc_Pi_InputList'               : 'Phys/StdLoosePions/Particles'
+        , 'Lc_K_InputList'              : 'Phys/StdLooseKaons/Particles'
+        , 'Lc_P_InputList'              : 'Phys/StdLooseProtons/Particles'
+        , 'Xi_Pi_InputList'             : 'Phys/StdLoosePions/Particles'
+        , 'Xicc_Pi_InputList'           : 'Phys/StdAllLoosePions/Particles'
+        , 'Xicc_K_InputList'            : 'Phys/StdAllLooseKaons/Particles'
+        , 'Xicc_P_InputList'            : 'Phys/StdAllLooseProtons/Particles'
+        , 'Xicc_Dp_InputList'           : 'Phys/StdLooseDplus2KPiPi/Particles'
+        , 'Xicc_Dsp_InputList'          : 'Phys/StdLooseDsplus2KKPi/Particles'
+        , 'Xicc_D0_InputList'           : 'Phys/StdLooseD02KPi/Particles'
+        , 'Lc_Daug_TRCHI2DOF_Max'       :   5.0
+        , 'Lc_Daug_PT_Min'              : 200.0*MeV
+        , 'Lc_Daug_P_Min'               :   2.0*GeV
+        , 'Lc_Daug_1of3_MIPCHI2DV_Min'  :   4.0
+        , 'Lc_K_PIDKPIDpi_Min'          :   5.0
+        , 'Lc_Pi_PIDpiPIDK_Min'         :   0.0
+        , 'Lc_P_PIDpPIDpi_Min'          :   5.0
+        , 'Lc_P_PIDpPIDK_Min'           :   0.0
+        , 'Lc_ADMASS_HalfWin'           :  75.0*MeV
+        , 'Lc_APT_Min'                  :   1.0*GeV
+        , 'Lc_ADOCAMAX_Max'             :   0.5*mm
+        , 'Lc_VCHI2_Max'                :  30.0
+        , 'Lc_BPVVDCHI2_Min'            :  16.0
+        , 'Lc_BPVDIRA_Min'              :   0.99
+        , 'LcControl_BPVDIRA_Min'       :   0.999
+        , 'Dp_ADMASS_HalfWin'           :  75.0*MeV
+        , 'Dp_BPVVDCHI2_Min'            : 100.0
+        , 'Dsp_ADMASS_HalfWin'          :  75.0*MeV
+        , 'Dsp_BPVVDCHI2_Min'           :  64.0
+        , 'D0_ADMASS_HalfWin'           :  75.0*MeV
+        , 'D0_BPVVDCHI2_Min'            :  64.0
+        , 'Xi_Pi_P_Min'                 :   2.0*GeV
+        , 'Xi_Pi_TRCHI2DOF_Max'         :   4.0
+        , 'Xi_Pi_PT_Min'                : 250.0*MeV
+        , 'Xi_Pi_MIPCHI2DV_Min'         :  25.0
+        , 'Xi_VCHI2_Max'                :  20.0
+        , 'Xi_LL_ADAMASS_HalfWin'       :  50.0*MeV
+        , 'Xi_LL_ADMASS_HalfWin'        :  35.0*MeV
+        , 'Xi_DD_ADAMASS_HalfWin'       :  80.0*MeV
+        , 'Xi_DD_ADMASS_HalfWin'        :  50.0*MeV
+        , 'Xic0_ADAMASS_HalfWin'        : 170.0*MeV
+        , 'Xic0_ADMASS_HalfWin'         : 120.0*MeV
+        , 'Xic0_BPVDIRA_Min'            :   0.9
+        , 'Xic0_BPVVDCHI2_Min'          :  25.0
+        , 'Xic0_VCHI2_Max'              :  30.0
+        , 'Xicplus_ADAMASS_HalfWin'     : 170.0*MeV
+        , 'Xicplus_ADMASS_HalfWin'      : 120.0*MeV
+        , 'Xicplus_BPVDIRA_Min'         :   0.9
+        , 'Xicplus_BPVVDCHI2_Min'       :  25.0
+        , 'Xicplus_VCHI2_Max'           :  60.0
+        , 'Xicplus_1of2_MIPCHI2DV_Min'  :  10.0
+        , 'Xicc_Daug_TRCHI2DOF_Max'     :   5.0
+        , 'Xicc_Daug_P_Min'             :   2.0*GeV
+        , 'Xicc_Daug_PT_Min'            : 250.0*MeV
+        , 'Xicc_Daug_MIPCHI2DV_Min'     :  -1.0
+        , 'Xicc_Pi_PIDpiPIDK_Min'       :   0.0
+        , 'Xicc_K_PIDKPIDpi_Min'        :   5.0
+        , 'Xicc_P_PIDpPIDpi_Min'        :   5.0
+        , 'Xicc_P_PIDpPIDK_Min'         :   0.0
+        , 'Xicc_APT_Min'                :   2.0*GeV # Mat changes from 1.0 to 2.0 GeV for S20
+        , 'Xicc_ADOCAMAX_Max'           :   0.5*mm
+        , 'Xicc_BPVDIRA_Min'            :   0.0
+        , 'Xicc_BPVVDCHI2_Min'          :  -1.0
+        , 'Xicc_Lc_delta_VZ_Min'        :   0.01*mm
+        , 'Xicc_2Dau_VCHI2_Max'         :  20.0
+        , 'Xicc_3Dau_VCHI2_Max'         :  30.0
+        , 'Xicc_4Dau_VCHI2_Max'         :  60.0
+        , 'Xicc_AM_Max'                 :   4.0*GeV
+        }
+
+
+
+
+class XiccBuilder(LineBuilder) :
+    """
+    Search for Xicc
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    ## Possible parameters and default values copied from the definition
+    ##   of StrippingLine
+    def _strippingLine ( self,
+                          name             ,   # the base name for the Line
+                          prescale  = 1.0  ,   # prescale factor
+                          ODIN      = None ,   # ODIN predicate
+                          L0DU      = None ,   # L0DU predicate
+                          HLT1      = None ,   # HltDecReports predicate
+                          HLT2      = None ,   # HltDecReports predicate
+                          FILTER    = None ,   # 'VOID'-predicate, e.g. Global Event Cut
+                          checkPV   = True ,   # Check PV before running algos
+                          algos     = None ,   # the list of stripping members
+                          selection = None ,
+                          postscale = 1.0    ,   # postscale factor
+                          MaxCandidates = "Override",   # Maxumum number
+                          MaxCombinations = "Override", # Maxumum number
+                          HDRLocation = None ) : # other configuration parameters
+    # {
+
+        if (prescale > 0) and (postscale > 0) : # {
+            line = StrippingLine( name,
+                                  prescale        = prescale,
+                                  ODIN            = ODIN,
+                                  L0DU            = L0DU,
+                                  HLT1            = HLT1,
+                                  HLT2            = HLT2,
+                                  FILTER          = FILTER,
+                                  checkPV         = checkPV,
+                                  algos           = algos,
+                                  selection       = selection,
+                                  postscale       = postscale,
+                                  MaxCandidates   = MaxCandidates,
+                                  MaxCombinations = MaxCombinations,
+                                  HDRLocation     = HDRLocation )
+
+            self.registerLine(line)
+            return line
+        # }
+        else : 
+            return False
+
+    # }
+
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        # Set up global event cuts.
+        # Conceptually these come first, although the place where they're
+        # inserted into the line is at the bottom of the code.
+        _globalEventCutsCode = "(recSummary (LHCb.RecSummary.nLongTracks, 'Rec/Track/Long') < %(LongTrackGEC)s )" % config
+        _globalEventCuts = { 'Code' : _globalEventCutsCode, 'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        # Pick up standard kaons, pions
+        # Filter them for use as daughter particles:
+        self.dauPi = filterPions(name+'FilteredPions')
+        self.dauK  = filterKaons(name+'FilteredKaons')
+        self.dauP  = filterProtons(name+'FilteredProtons')
+
+        # Optionally, apply additional ghost-prob filtering:
+        self.dauPi_GP = filterGhosts(name+'FilteredPionsGP', self.dauPi)
+        self.dauK_GP = filterGhosts(name+'FilteredKaonsGP', self.dauK)
+        self.dauP_GP = filterGhosts(name+'FilteredProtonsGP', self.dauP)
+
+        # Pick up standard Lambdac -> p K- pi+ then filter it to reduce rate:
+        self.filterLc = makeLc(name+'FilterLc')
+        self.filterLcTisTos = makeTisTos(name+"filterLcTisTos", selection = self.filterLc, hltTisTosSpec = config['LcHlt2TisTosSpec'])
+        self.filterLcForControl = filterLcForControl(name+'FilterLcForControl', self.filterLcTisTos)
+
+        # Pick up standard D+ -> K- pi+ pi+ then filter it to reduce rate:
+        self.dplus  = filterDplus(name+'FilteredDplus2KPiPi')
+        self.dplusTisTos = makeTisTos(name+"dplusTisTos", selection = self.dplus, hltTisTosSpec = config['DpHlt2TisTosSpec'])
+
+        # Pick up standard D_s+ -> K- K+ pi+ then filter it to reduce rate:
+        self.dsplus = filterDsplus(name+'FilteredDsplus2KKPi')
+        self.dsplusTisTos = makeTisTos(name+"dsplusTisTos", selection = self.dsplus, hltTisTosSpec = config['DpHlt2TisTosSpec'])
+
+        # Pick up standard D0 -> K- pi+ then filter it to reduce rate:
+        self.dzero = filterD0(name+'FilteredD02KPi')
+        self.dzeroTisTos = makeTisTos(name+"dzeroTisTos", selection = self.dzero, hltTisTosSpec = config['DzHlt2TisTosSpec'])
+
+        ## Some generic cuts for Xicc.
+        ## Vertex chi2 cut depends on number of daughters:
+        ##      (2 dau => 1 NDF; 3 dau => 3 NDF; 4 dau => 5 NDF)
+        _strCutComb  = "(AM<%(Xicc_AM_Max)s)" \
+                       "& (APT>%(Xicc_APT_Min)s)" \
+                       "& (ADOCAMAX('')<%(Xicc_ADOCAMAX_Max)s)" % _my_immutable_config
+        _strCutMoth  = "(CHILD(VFASPF(VZ),1) - VFASPF(VZ) > %(Xicc_Lc_delta_VZ_Min)s)" \
+                       "& (BPVVDCHI2 > %(Xicc_BPVVDCHI2_Min)s)" \
+                       "& (BPVDIRA > %(Xicc_BPVDIRA_Min)s)" % _my_immutable_config
+
+        _strChi2Moth2 = "(VFASPF(VCHI2)<%(Xicc_2Dau_VCHI2_Max)s)" % _my_immutable_config
+        _strChi2Moth3 = "(VFASPF(VCHI2)<%(Xicc_3Dau_VCHI2_Max)s)" % _my_immutable_config
+        _strChi2Moth4 = "(VFASPF(VCHI2)<%(Xicc_4Dau_VCHI2_Max)s)" % _my_immutable_config
+
+        _strCutMoth2 = _strChi2Moth2 + '&' + _strCutMoth
+        _strCutMoth3 = _strChi2Moth3 + '&' + _strCutMoth
+        _strCutMoth4 = _strChi2Moth4 + '&' + _strCutMoth
+
+
+        # Combine Lambda with pion to make Xi-
+        self.stdLambdaLL = DataOnDemand(Location = 'Phys/StdLooseLambdaLL/Particles')
+        self.stdLambdaDD = DataOnDemand(Location = 'Phys/StdLooseLambdaDD/Particles')
+        self.combineXiLL = makeXi(name+'CombineXiLL', self.stdLambdaLL, _my_immutable_config['Xi_LL_ADAMASS_HalfWin'], _my_immutable_config['Xi_LL_ADMASS_HalfWin'])
+        self.combineXiDD = makeXi(name+'CombineXiDD', self.stdLambdaDD, _my_immutable_config['Xi_DD_ADAMASS_HalfWin'], _my_immutable_config['Xi_DD_ADMASS_HalfWin'])
+        self.combineXi   = mergeLists(name+'CombineXi', [ self.combineXiLL, self.combineXiDD ] )
+        # Apply TISTOS filter
+        self.combineXiTisTos = makeTisTos(name+"CombineXiTisTos", selection = self.combineXi, hltTisTosSpec = config['XiHlt2TisTosSpec'])
+
+        # Combine Xi- with pion(s) to make Xic0, Xic+
+        self.combineXicZero = makeXicZero(name+"CombineXicZero", [ self.combineXiTisTos, self.dauPi ])
+        self.combineXicPlusToXiPiPi = makeXicPlusToXiPiPi(name+"CombineXicPlusToXiPiPi", [ self.combineXiTisTos, self.dauPi ])
+        #self.combineXicPlusToPKPi   = makeXicPlusToPKPi(name+"CombineXicPlusToPKPi", [ self.dauP_GP, self.dauK_GP, self.dauPi_GP ])
+        #self.combineXicPlus = mergeLists(name+'CombineXicPlus', [ self.combineXicPlusToPKPi, self.combineXicPlusToXiPiPi ])
+        self.combineXicPlus = self.combineXicPlusToXiPiPi
+
+        # Combine Lc+ with a K and a pi to make a Xicc+ or Xicc++:
+        self.combineXicc1 = makeXicc(name+'CombineXicc1', [ self.filterLcTisTos, self.dauPi, self.dauK ], '[Xi_cc+ -> Lambda_c+ K- pi+]cc', _strCutComb, _strCutMoth3)
+        self.combineXicc2 = makeXicc(name+'CombineXicc2', [ self.filterLcTisTos, self.dauPi, self.dauK ], '[Xi_cc++ -> Lambda_c+ K- pi+ pi+]cc', _strCutComb, _strCutMoth4)
+        ## Construct charge violating combinations.
+        self.combineXicc1WC = makeXicc(name+'CombineXicc1WC', [ self.filterLcTisTos, self.dauPi, self.dauK ], '[Xi_cc+ -> Lambda_c+ K- pi-]cc', _strCutComb, _strCutMoth3)
+        self.combineXicc2WC = makeXicc(name+'CombineXicc2WC', [ self.filterLcTisTos, self.dauPi, self.dauK ], '[Xi_cc++ -> Lambda_c+ K- pi+ pi-]cc', _strCutComb, _strCutMoth4)
+
+        ## Construct DCS combinations (background modelling check)
+        self.combineXicc1DCS = makeXicc(name+'CombineXicc1DCS', [ self.filterLcTisTos, self.dauPi, self.dauK ], '[Xi_cc+ -> Lambda_c+ K+ pi-]cc', _strCutComb, _strCutMoth3)
+        self.combineXicc2DCS = makeXicc(name+'CombineXicc2DCS', [ self.filterLcTisTos, self.dauPi, self.dauK ], '[Xi_cc++ -> Lambda_c+ K+ pi- pi+]cc', _strCutComb, _strCutMoth4)
+
+
+        # Combine D+ with a K and a p to make a Xicc+ or Xicc++:
+        self.combineXicc1a = makeXicc(name+'CombineXicc1a', [ self.dplusTisTos, self.dauP, self.dauK ], '[Xi_cc+ -> D+ p+ K-]cc', _strCutComb, _strCutMoth3)
+        self.combineXicc2a = makeXicc(name+'CombineXicc2a', [ self.dplusTisTos, self.dauP, self.dauK, self.dauPi ], '[Xi_cc++ -> D+ p+ K- pi+]cc', _strCutComb, _strCutMoth4)
+
+        ## Construct charge violating combinations.
+        self.combineXicc1aWC = makeXicc(name+'CombineXicc1aWC', [ self.dplusTisTos, self.dauP, self.dauK ], '[Xi_cc+ -> D+ p+ K+]cc', _strCutComb, _strCutMoth3)
+        self.combineXicc2aWC = makeXicc(name+'CombineXicc2aWC', [ self.dplusTisTos, self.dauP, self.dauK, self.dauPi ], '[Xi_cc++ -> D+ p+ K+ pi+]cc', _strCutComb, _strCutMoth4)
+        self.combineXicc2aWC0 = makeXicc(name+'CombineXicc2aWC0', [ self.dplusTisTos, self.dauP, self.dauK, self.dauPi ], '[Xi_cc++ -> D+ p+ K- pi-]cc', _strCutComb, _strCutMoth4)
+
+
+        # Combine D0 with a K, a p and a pi to make a Xicc+ or Xicc++:
+        # NB 5-body decays (#8) have the ghost prob cut applied
+        self.combineXicc7 = makeXicc(name+'CombineXicc7', [ self.dzeroTisTos, self.dauP, self.dauK, self.dauPi ], '[Xi_cc+ -> D0 p+ K- pi+]cc', _strCutComb, _strCutMoth4)
+        self.combineXicc8 = makeXicc(name+'CombineXicc8', [ self.dzeroTisTos, self.dauP_GP, self.dauK_GP, self.dauPi_GP ], '[Xi_cc++ -> D0 p+ K- pi+ pi+]cc', _strCutComb, _strCutMoth4)
+
+        ## Construct charge violating combinations.
+        ## NB 5-body decays (#8) have the ghost prob cut applied
+        self.combineXicc7WC = makeXicc(name+'CombineXicc7WC', [ self.dzeroTisTos, self.dauP, self.dauK, self.dauPi ], '[Xi_cc+ -> D0 p+ K- pi-]cc', _strCutComb, _strCutMoth4)
+        self.combineXicc8WC = makeXicc(name+'CombineXicc8WC', [ self.dzeroTisTos, self.dauP_GP, self.dauK_GP, self.dauPi_GP ], '[Xi_cc++ -> D0 p+ K- pi+ pi-]cc', _strCutComb, _strCutMoth4)
+
+        ## Construct DCS combinations (background modelling check)
+        ## NB 5-body decays (#8) have the ghost prob cut applied
+        self.combineXicc7DCS = makeXicc(name+'CombineXicc7DCS', [ self.dzeroTisTos, self.dauP, self.dauK, self.dauPi ], '[Xi_cc+ -> D0 p+ K+ pi-]cc', _strCutComb, _strCutMoth4)
+        self.combineXicc8DCS = makeXicc(name+'CombineXicc8DCS', [ self.dzeroTisTos, self.dauP_GP, self.dauK_GP, self.dauPi_GP ], '[Xi_cc++ -> D0 p+ K+ pi+ pi-]cc', _strCutComb, _strCutMoth4)
+
+
+        # Combine Xic0/+ with pion(s) to make Xicc+, Xicc++
+        self.combineXicc3 = makeXicc(name+'CombineXicc3', [ self.combineXicZero, self.dauPi ], '[Xi_cc+ -> Xi_c0 pi+]cc', _strCutComb, _strCutMoth2)
+        self.combineXicc4 = makeXicc(name+'CombineXicc4', [ self.combineXicZero, self.dauPi ], '[Xi_cc++ -> Xi_c0 pi+ pi+]cc', _strCutComb, _strCutMoth3)
+        self.combineXicc5 = makeXicc(name+'CombineXicc5', [ self.combineXicPlus, self.dauPi ], '[Xi_cc+ -> Xi_c+ pi+ pi-]cc', _strCutComb, _strCutMoth3)
+        self.combineXicc6 = makeXicc(name+'CombineXicc6', [ self.combineXicPlus, self.dauPi ], '[Xi_cc++ -> Xi_c+ pi+]cc', _strCutComb, _strCutMoth2)
+
+        ## Construct charge violating combinations.
+        self.combineXicc3WC = makeXicc(name+'CombineXicc3WC', [ self.combineXicZero, self.dauPi ], '[Xi_cc+ -> Xi_c0 pi-]cc', _strCutComb, _strCutMoth2)
+        self.combineXicc4WC = makeXicc(name+'CombineXicc4WC', [ self.combineXicZero, self.dauPi ], '[Xi_cc++ -> Xi_c0 pi+ pi-]cc', _strCutComb, _strCutMoth3)
+        self.combineXicc5WC = makeXicc(name+'CombineXicc5WC', [ self.combineXicPlus, self.dauPi ], '[Xi_cc+ -> Xi_c+ pi+ pi-]cc', _strCutComb, _strCutMoth3)
+        self.combineXicc6WC = makeXicc(name+'CombineXicc6WC', [ self.combineXicPlus, self.dauPi ], '[Xi_cc++ -> Xi_c+ pi-]cc', _strCutComb, _strCutMoth2)
+
+        # Control lines (to be prescaled!)
+        self.lineControl1 = self._strippingLine(name = name+'ControlLc',
+                                          prescale = config['controlPrescaleLc'],
+                                          postscale = 1.0,
+                                          FILTER = _globalEventCuts,
+                                          selection = self.filterLcForControl)
+        self.lineControl2 = self._strippingLine(name = name+'ControlXicZero',
+                                          prescale = config['controlPrescaleXic'],
+                                          postscale = 1.0,
+                                          FILTER = _globalEventCuts,
+                                          selection = self.combineXicZero)
+        self.lineControl3 = self._strippingLine(name = name+'ControlXicPlus',
+                                          prescale = config['controlPrescaleXic'],
+                                          postscale = 1.0,
+                                          FILTER = _globalEventCuts,
+                                          selection = self.combineXicPlus)
+        self.lineControl4 = self._strippingLine(name = name+'ControlDp',
+                                          prescale = config['controlPrescaleDp'],
+                                          postscale = 1.0,
+                                          FILTER = _globalEventCuts,
+                                          selection = self.dplusTisTos)
+        self.lineControl5 = self._strippingLine(name = name+'ControlD0',
+                                          prescale = config['controlPrescaleD0'],
+                                          postscale = 1.0,
+                                          FILTER = _globalEventCuts,
+                                          selection = self.dzeroTisTos)
+        self.lineControl6 = self._strippingLine(name = name+'ControlDsp',
+                                          prescale = config['controlPrescaleDsp'],
+                                          postscale = 1.0,
+                                          FILTER = _globalEventCuts,
+                                          selection = self.dsplusTisTos)
+
+        # Physics lines
+        self.lineXicc1 = self._strippingLine(name = name+'XiccPlusToLcKPi',
+                                      prescale = config['signalPrescaleViaLc'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc1)
+        self.lineXicc2 = self._strippingLine(name = name+'XiccPlusPlusToLcKPiPi',
+                                      prescale = config['signalPrescaleViaLc'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc2)
+        self.lineXicc1WC = self._strippingLine(name = name+'XiccPlusToLcKPiWC',
+                                      prescale = config['signalPrescaleViaLcWC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc1WC)
+        self.lineXicc2WC = self._strippingLine(name = name+'XiccPlusPlusToLcKPiPiWC',
+                                      prescale = config['signalPrescaleViaLcWC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc2WC)
+        self.lineXicc1DCS = self._strippingLine(name = name+'XiccPlusToLcKPiDCS',
+                                      prescale = config['signalPrescaleViaLcDCS'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc1DCS)
+        self.lineXicc2DCS = self._strippingLine(name = name+'XiccPlusPlusToLcKPiPiDCS',
+                                      prescale = config['signalPrescaleViaLcDCS'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc2DCS)
+        self.lineXicc1a = self._strippingLine(name = name+'XiccPlusToDpPK',
+                                      prescale = config['signalPrescaleViaDp'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc1a)
+        self.lineXicc2a = self._strippingLine(name = name+'XiccPlusPlusToDpPKPi',
+                                      prescale = config['signalPrescaleViaDp'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc2a)
+        self.lineXicc1aWC = self._strippingLine(name = name+'XiccPlusToDpPKWC',
+                                      prescale = config['signalPrescaleViaDpWC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc1aWC)
+        self.lineXicc2aWC = self._strippingLine(name = name+'XiccPlusPlusToDpPKPiWC',
+                                      prescale = config['signalPrescaleViaDpWC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc2aWC)
+        self.lineXicc2aWC0 = self._strippingLine(name = name+'XiccPlusPlusToDpPKPiWC0',
+                                      prescale = config['signalPrescaleViaDpWC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc2aWC0)
+        self.lineXicc3 = self._strippingLine(name = name+'XiccPlusToXicZeroPi',
+                                      prescale = config['signalPrescaleViaXic'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc3)
+        self.lineXicc4 = self._strippingLine(name = name+'XiccPlusPlusToXicZeroPiPi',
+                                      prescale = config['signalPrescaleViaXic'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc4)
+        self.lineXicc5 = self._strippingLine(name = name+'XiccPlusToXicPlusPiPi',
+                                      prescale = config['signalPrescaleViaXic'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc5)
+        self.lineXicc6 = self._strippingLine(name = name+'XiccPlusPlusToXicPlusPi',
+                                      prescale = config['signalPrescaleViaXic'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc6)
+        self.lineXicc3WC = self._strippingLine(name = name+'XiccPlusToXicZeroPiWC',
+                                      prescale = config['signalPrescaleViaXicWC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc3WC)
+        self.lineXicc4WC = self._strippingLine(name = name+'XiccPlusPlusToXicZeroPiPiWC',
+                                      prescale = config['signalPrescaleViaXicWC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc4WC)
+        self.lineXicc5WC = self._strippingLine(name = name+'XiccPlusToXicPlusPiPiWC',
+                                      prescale = config['signalPrescaleViaXicWC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc5WC)
+        self.lineXicc6WC = self._strippingLine(name = name+'XiccPlusPlusToXicPlusPiWC',
+                                      prescale = config['signalPrescaleViaXicWC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc6WC)
+        self.lineXicc7 = self._strippingLine(name = name+'XiccPlusToD0PKPi',
+                                      prescale = config['signalPrescaleViaD0'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc7)
+        self.lineXicc8 = self._strippingLine(name = name+'XiccPlusPlusToD0PKPiPi',
+                                      prescale = config['signalPrescaleViaD0'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc8)
+        self.lineXicc7WC = self._strippingLine(name = name+'XiccPlusToD0PKPiWC',
+                                      prescale = config['signalPrescaleViaD0WC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc7WC)
+        self.lineXicc8WC = self._strippingLine(name = name+'XiccPlusPlusToD0PKPiPiWC',
+                                      prescale = config['signalPrescaleViaD0WC'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc8WC)
+        self.lineXicc7DCS = self._strippingLine(name = name+'XiccPlusToD0PKPiDCS',
+                                      prescale = config['signalPrescaleViaD0DCS'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc7DCS)
+        self.lineXicc8DCS = self._strippingLine(name = name+'XiccPlusPlusToD0PKPiPiDCS',
+                                      prescale = config['signalPrescaleViaD0DCS'],
+                                      postscale = 1.0,
+                                      FILTER = _globalEventCuts,
+                                      selection = self.combineXicc8DCS)
+
+
+def mergeLists(localName, inputSelections) :
+    return MergedSelection ( localName,
+                             RequiredSelections = inputSelections )
+
+def makeLc(localName, configDict = _my_immutable_config) :
+    ## Pick up standard Lambdac -> p K- pi+
+    _LcKaons = DataOnDemand(Location = configDict['Lc_K_InputList'])
+    _LcPions = DataOnDemand(Location = configDict['Lc_Pi_InputList'])
+    _LcProtons = DataOnDemand(Location = configDict['Lc_P_InputList'])
+
+    ## Daughter cuts
+    _strCutAllDaug = "(TRCHI2DOF<%(Lc_Daug_TRCHI2DOF_Max)s)" \
+                     "& (PT>%(Lc_Daug_PT_Min)s)" \
+                     "& (P>%(Lc_Daug_P_Min)s)" % configDict
+    _strCutK  = _strCutAllDaug + '&' + "(HASRICH)&((PIDK - PIDpi)>%(Lc_K_PIDKPIDpi_Min)s)" % configDict
+    _strCutpi = _strCutAllDaug + '&' + "(HASRICH)&((PIDpi - PIDK)>%(Lc_Pi_PIDpiPIDK_Min)s)" % configDict
+    _strCutp  = _strCutAllDaug + '&' + "(HASRICH)&((PIDp - PIDpi)>%(Lc_P_PIDpPIDpi_Min)s)&((PIDp-PIDK)>%(Lc_P_PIDpPIDK_Min)s)" % configDict
+
+    _daughterCuts = { 'pi+' : _strCutpi,
+                      'K-'  : _strCutK,
+                      'p+'  : _strCutp }
+
+    ## Combination cuts
+    _strCutComb = "(ADAMASS('Lambda_c+')<1.1*%(Lc_ADMASS_HalfWin)s)" \
+                  "& (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                  "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+                  "& (APT>%(Lc_APT_Min)s)" % configDict
+
+    _strCutMoth = "(VFASPF(VCHI2) < %(Lc_VCHI2_Max)s)" \
+                  "& (ADMASS('Lambda_c+')<%(Lc_ADMASS_HalfWin)s)" \
+                  "& (BPVVDCHI2>%(Lc_BPVVDCHI2_Min)s)" \
+                  "& (BPVDIRA>%(Lc_BPVDIRA_Min)s)" % configDict
+
+    _combineLambdac2PKPi = CombineParticles(
+        DecayDescriptor = "[Lambda_c+ -> K- p+ pi+]cc",
+        DaughtersCuts = _daughterCuts,
+        CombinationCut = _strCutComb,
+        MotherCut = _strCutMoth
+    )
+
+    return Selection ( localName,
+                       Algorithm = _combineLambdac2PKPi,
+                       RequiredSelections = [ _LcKaons, _LcPions, _LcProtons ] )
+
+
+def filterLcForControl(localName, inputSel, configDict = _my_immutable_config) :
+    # Apply additional cuts for prompt Lc:
+    _strCutDIRA = "( BPVDIRA > %(LcControl_BPVDIRA_Min)s)" % configDict
+    _filterLc = FilterDesktop(Code = _strCutDIRA)
+    return Selection ( localName,
+                       Algorithm = _filterLc,
+                       RequiredSelections = [ inputSel ] )
+
+
+def filterKaons(localName, configDict = _my_immutable_config) :
+    # Pick up standard input list
+    _stdK = DataOnDemand(Location = configDict['Xicc_K_InputList'])
+    # Filter:
+    _strCutDauK = "(TRCHI2DOF<%(Xicc_Daug_TRCHI2DOF_Max)s)" \
+                   "& (P>%(Xicc_Daug_P_Min)s)" \
+                   "& (HASRICH)&(PIDK-PIDpi>%(Xicc_K_PIDKPIDpi_Min)s)" \
+                   "& (PT>%(Xicc_Daug_PT_Min)s)" \
+                   "& (MIPCHI2DV(PRIMARY)>%(Xicc_Daug_MIPCHI2DV_Min)s)" % configDict
+
+    _filterK = FilterDesktop(Code = _strCutDauK)
+    return Selection ( localName,
+                       Algorithm = _filterK,
+                       RequiredSelections = [ _stdK ] )
+
+
+def filterPions(localName, configDict = _my_immutable_config) :
+    # Pick up standard input list
+    _stdPi = DataOnDemand(Location = configDict['Xicc_Pi_InputList'])
+    # Filter:
+    _strCutDauPi = "(TRCHI2DOF<%(Xicc_Daug_TRCHI2DOF_Max)s)" \
+                   "& (P>%(Xicc_Daug_P_Min)s)" \
+                   "& (HASRICH)&(PIDpi-PIDK>%(Xicc_Pi_PIDpiPIDK_Min)s)" \
+                   "& (PT>%(Xicc_Daug_PT_Min)s)" \
+                   "& (MIPCHI2DV(PRIMARY)>%(Xicc_Daug_MIPCHI2DV_Min)s)" % configDict
+
+    _filterPi = FilterDesktop(Code = _strCutDauPi)
+    return Selection ( localName,
+                       Algorithm = _filterPi,
+                       RequiredSelections = [ _stdPi ] )
+
+
+def filterProtons(localName, configDict = _my_immutable_config) :
+    # Pick up standard input list
+    _stdP = DataOnDemand(Location = configDict['Xicc_P_InputList'])
+    # Filter:
+    _strCutDauP  = "(TRCHI2DOF<%(Xicc_Daug_TRCHI2DOF_Max)s)" \
+                   "& (P>%(Xicc_Daug_P_Min)s)" \
+                   "& (HASRICH)&(PIDp-PIDpi>%(Xicc_P_PIDpPIDpi_Min)s)" \
+                   "& (HASRICH)&(PIDp-PIDK>%(Xicc_P_PIDpPIDK_Min)s)" \
+                   "& (PT>%(Xicc_Daug_PT_Min)s)" \
+                   "& (MIPCHI2DV(PRIMARY)>%(Xicc_Daug_MIPCHI2DV_Min)s)" % configDict
+
+    _filterP  = FilterDesktop(Code = _strCutDauP)
+    return Selection ( localName,
+                       Algorithm = _filterP,
+                       RequiredSelections = [ _stdP ] )
+
+def filterGhosts(localName, inputSelection) :
+    _strCutGhost = '( TRGHOSTPROB < 0.5 )'
+    _filter = FilterDesktop(Code = _strCutGhost)
+    return Selection(localName,
+                     Algorithm = _filter,
+                     RequiredSelections = [ inputSelection ] )
+
+def filterDplus(localName, configDict = _my_immutable_config) :
+    # Pick up standard input list
+    _stdDplus = DataOnDemand(Location = configDict['Xicc_Dp_InputList'])
+    # Filter:
+    _strCutDplus = "(ADMASS('D+')<%(Dp_ADMASS_HalfWin)s)" \
+                   "& (BPVVDCHI2>%(Dp_BPVVDCHI2_Min)s)" % configDict
+
+    _filterDplus = FilterDesktop(Code = _strCutDplus)
+    return Selection ( localName,
+                       Algorithm = _filterDplus,
+                       RequiredSelections = [ _stdDplus ] )
+
+
+def filterDsplus(localName, configDict = _my_immutable_config) :
+    # Pick up standard input list
+    _stdDsplus = DataOnDemand(Location = configDict['Xicc_Dsp_InputList'])
+    # Filter:
+    _strCutDsplus = "(ADMASS('D_s+')<%(Dsp_ADMASS_HalfWin)s)" \
+                    "& (BPVVDCHI2>%(Dsp_BPVVDCHI2_Min)s)" % configDict
+
+    _filterDsplus = FilterDesktop(Code = _strCutDsplus)
+    return Selection ( localName,
+                       Algorithm = _filterDsplus,
+                       RequiredSelections = [ _stdDsplus ] )
+
+
+def filterD0(localName, configDict = _my_immutable_config) :
+    # Pick up standard input list
+    _stdD0 = DataOnDemand(Location = configDict['Xicc_D0_InputList'])
+    # Filter:
+    _strCutD0 = "(ADMASS('D0')<%(D0_ADMASS_HalfWin)s)" \
+                "& (BPVVDCHI2>%(D0_BPVVDCHI2_Min)s)" % configDict
+
+    _filterD0 = FilterDesktop(Code = _strCutD0)
+    return Selection ( localName,
+                       Algorithm = _filterD0,
+                       RequiredSelections = [ _stdD0 ] )
+
+
+def makeXi(localName, inputList, cutWide, cutTight, configDict = _my_immutable_config) :
+    _stdPi = DataOnDemand(Location = configDict['Xi_Pi_InputList'])
+
+    _strCutPiForXi = "(P>%(Xi_Pi_P_Min)s)" \
+                     "& (TRCHI2DOF<%(Xi_Pi_TRCHI2DOF_Max)s)" \
+                     "& (PT>%(Xi_Pi_PT_Min)s)" \
+                     "& (MIPCHI2DV(PRIMARY)>%(Xi_Pi_MIPCHI2DV_Min)s)" % configDict
+    _strCutCombXi = "( ADAMASS('Xi-') < %(cutWide)s * MeV )" % locals()
+    _strCutMothMass = "( ADMASS('Xi-') < %(cutTight)s * MeV )" % locals()
+    _strCutMothChi2 = "(VFASPF(VCHI2)<%(Xi_VCHI2_Max)s)" % configDict
+    _strCutMothXi = _strCutMothMass + '&' + _strCutMothChi2
+    _combineXi = CombineParticles( DecayDescriptor = '[Xi- -> Lambda0 pi-]cc',
+                                   DaughtersCuts = { "pi-": _strCutPiForXi },
+                                   CombinationCut = _strCutCombXi,
+                                   MotherCut = _strCutMothXi )
+
+    return Selection ( localName,
+                       Algorithm = _combineXi,
+                       RequiredSelections = [ inputList, _stdPi ] )
+
+
+def makeXicc(localName, inputSelections, decay, cutComb, cutMoth) :
+    _combineXicc = CombineParticles( DecayDescriptor = decay,
+                                     CombinationCut = cutComb,
+       	       	       	       	     MotherCut = cutMoth )
+    return Selection ( localName,
+                       Algorithm = _combineXicc,
+                       RequiredSelections = inputSelections)
+
+def makeXicZero(localName, inputSelections, configDict = _my_immutable_config) :
+    _strCutCombXicZero = "( ADAMASS('Xi_c0') < %(Xic0_ADAMASS_HalfWin)s )" % configDict
+    _strCutMothXicZero = "(ADMASS('Xi_c0') < %(Xic0_ADMASS_HalfWin)s)" \
+                         "& (VFASPF(VCHI2)<%(Xic0_VCHI2_Max)s)" \
+                         "& (BPVVDCHI2 > %(Xic0_BPVVDCHI2_Min)s )" \
+                         "& (BPVDIRA > %(Xic0_BPVDIRA_Min)s)" % configDict
+
+    _combineXicZero = CombineParticles( DecayDescriptor = '[Xi_c0 -> Xi- pi+]cc',
+                                        CombinationCut = _strCutCombXicZero,
+                                        MotherCut = _strCutMothXicZero )
+    return Selection( localName,
+                      Algorithm = _combineXicZero,
+                      RequiredSelections = inputSelections )
+
+
+def makeXicPlusToXiPiPi(localName, inputSelections, configDict = _my_immutable_config) :
+    _strCutCombXicPlus = "(( ADAMASS('Xi_c+') < %(Xicplus_ADAMASS_HalfWin)s )" \
+                         "& ( AHASCHILD( (ABSID == 'pi+') & (MIPCHI2DV(PRIMARY) > %(Xicplus_1of2_MIPCHI2DV_Min)s) ) ) )" % configDict
+
+    _strCutMothXicPlus = "( ADMASS('Xi_c+') < %(Xicplus_ADMASS_HalfWin)s )" \
+                         "& (VFASPF(VCHI2)<%(Xicplus_VCHI2_Max)s)" \
+                         "& (BPVVDCHI2 > %(Xicplus_BPVVDCHI2_Min)s)" \
+                         "& (BPVDIRA > %(Xicplus_BPVDIRA_Min)s)" % configDict
+
+    _combineXicPlus = CombineParticles( DecayDescriptor = '[Xi_c+ -> Xi- pi+ pi+]cc',
+                                        CombinationCut = _strCutCombXicPlus,
+                                        MotherCut = _strCutMothXicPlus )
+
+    return Selection(localName,
+                      Algorithm = _combineXicPlus,
+                      RequiredSelections = inputSelections )
+
+## NEW for Stripping 21
+## This is Xic -> pKpi -- uses very similar cuts to Lc -> pKpi
+def makeXicPlusToPKPi(localName, inputSelections, configDict = _my_immutable_config) :
+    _strCutComb = "( ( ADAMASS('Xi_c+') < %(Xicplus_ADAMASS_HalfWin)s )" \
+                  "& (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                  "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+                  "& (APT>%(Lc_APT_Min)s) )" % configDict
+
+    _strCutMoth = "( (VFASPF(VCHI2) < %(Lc_VCHI2_Max)s)" \
+                  "& ( ADMASS('Xi_c+') < %(Xicplus_ADMASS_HalfWin)s )" \
+                  "& (BPVVDCHI2>%(Xicplus_BPVVDCHI2_Min)s)" \
+                  "& (BPVDIRA>%(Xicplus_BPVDIRA_Min)s) )" % configDict
+
+    _combineXicPlus = CombineParticles( DecayDescriptor = '[Xi_c+ -> p+ K- pi+]cc',
+                                        CombinationCut = _strCutComb,
+                                        MotherCut = _strCutMoth )
+
+    return Selection(localName,
+                      Algorithm = _combineXicPlus,
+                      RequiredSelections = inputSelections )
+
+
+def makeTisTos( name, selection, hltTisTosSpec = { } ) :  # {
+    outSel = selection
+    if len(hltTisTosSpec) > 0 : # {
+        _tisTosFilter = TisTosParticleTagger( name + 'TisTos'
+                                              , TisTosSpecs = hltTisTosSpec )
+
+        outSel = Selection( name
+                            , Algorithm = _tisTosFilter
+                            , RequiredSelections = [ selection ] )
+    # }
+
+    return outSel
+# }
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXiccSL.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXiccSL.py
new file mode 100644
index 000000000..ff0a26899
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/StrippingXiccSL.py
@@ -0,0 +1,798 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Speculative code for doubly-charmed baryon searches.
+The following five final states are used:
+  Xicc+  -> Xic0 mu nu
+  Xicc++ -> Lambdac+ mu nu
+  Xicc++ -> Xic+ mu nu
+  Omegacc+ -> Omegac0 mu nu
+  Omegacc+ -> Xic0 mu nu
+where the daughter charmed baryon is reconstructed via:
+  Lambdac+ -> p K- pi+ (from StdLooseLambdac2PKPi)
+  Xic+ -> p K- pi+
+  Xic0 -> p K- K- pi+
+  Oemgac0 -> p K- K- pi+
+Additional normalization channels for Omegacc decays are used:
+  Omegacc+ -> Omegac0 pi+
+  Omegacc+ -> Xic0 pi+
+Based on original stripping code done by Patrick Spradlin and Mat Charles and Xicc Turbo lines
+
+2017: part of Charm stream, went to MDST
+2018: switched to CharmCompleteEvent, went to DST
+2016: Add Xicc++ -> Lc+ pi+ NC channel 
+'''
+
+
+__author__ = ['Xiao-Rui Lyu', 'Miroslav Saur', 'Ziyi Wang']
+__date__ = '2021/09/02'
+__version__ = '$Revision: 0.3 $'
+__all__ = ('StrippingXiccSL'
+           ,'default_config')
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons
+from StandardParticles import  StdAllLoosePions, StdAllLooseKaons, StdLooseMuons, StdAllLooseProtons, StdAllLooseMuons, StdAllVeryLooseMuons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from PhysSelPython.Wrappers import MultiSelectionSequence
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, picosecond
+from Configurables import TisTosParticleTagger
+import sys
+
+
+default_name='XiccSL'
+    #### This is the dictionary of all tunable cuts ########
+default_config={
+      'NAME'        : 'XiccSL',
+      'WGs'         : ['Charm'],
+      'BUILDERTYPE' : 'StrippingXiccSL',
+      'STREAMS'     : ['CharmCompleteEvent'],
+      'CONFIG'      : {
+        'LcHlt2TisTosSpec' : { 'Hlt2CharmHadLcpToPpKmPip.*Decision%TOS' : 0, 'Hlt2Global%TIS' : 0 }
+        , 'signalPrescaleViaLc'         : 1.0
+        , 'signalPrescaleViaXicp'       : 1.0
+        , 'signalPrescaleViaXicz'       : 1.0
+        , 'signalPrescaleViaOmegaz'     : 0.2
+        , 'controlPrescaleViaLcPi'      : 0.2
+        , 'controlPrescaleViaOmegaczPi' : 0.05
+        , 'controlPrescaleViaXiczPi'    : 0.05
+        , 'signalPrescaleViaLcWS'       : 0.5
+        , 'TRCHI2DOFMax'            :   3.0
+        , 'Xicc_Daug_TRCHI2DOF_Max' :   5.0
+        , 'Xicc_Daug_P_Min'         :   2.0*GeV
+        , 'Xicc_Daug_PT_Min'        : 250.0*MeV
+        , 'Xicc_Daug_MIPCHI2DV_Min' :  -1.0
+        , 'TrGhostProbMax'          :   0.5 #can be tightened if needed.  < 0.3 -> same for all particles
+        , 'Xicc_P_PIDpPIDpi_Min'    :   5.0
+        , 'Xicc_P_PIDpPIDK_Min'     :   0.0
+        , 'Xicc_Pi_PIDpiPIDK_Min'   :   0.0
+        , 'Xicc_K_PIDKPIDpi_Min'    :   5.0
+        , 'PionPIDK'                :  10.0
+        , 'TRCHI2'                  :   3.0
+        , 'MuonP'                   :   6.0*GeV
+        , 'MuonPT'                  :  1000*MeV
+        , 'MuonIPCHI2'              :   0.0 
+        , 'MuonPIDmu'               :   0.0
+        , 'GhostProb'               :   0.35
+        , 'Lc_Daug_TRCHI2DOF_Max'   :   5.0
+        , 'Lc_Daug_PT_Min'          : 200.0*MeV
+        , 'Lc_Daug_P_Min'           :   2.0*GeV
+        , 'Lc_K_PIDKPIDpi_Min'      :   5.0
+        , 'Lc_Pi_PIDpiPIDK_Min'     :   0.0
+        , 'Lc_P_PIDpPIDpi_Min'      :   5.0
+        , 'Lc_P_PIDpPIDK_Min'       :   0.0
+        , 'Lc_ADMASS_HalfWin'       :  75.0*MeV
+        , 'Lc_Daug_1of3_MIPCHI2DV_Min': 4.0
+        , 'Lc_ADOCAMAX_Max'         :   0.5*mm
+        , 'Lc_APT_Min'              :   1.0*GeV
+        , 'Lc_VCHI2_Max'            :  30.0
+        , 'Lc_BPVVDCHI2_Min'        :  16.0
+        , 'Lc_BPVDIRA_Min'          :   0.99
+        , 'Xicplus_ADAMASS_HalfWin' : 170.0*MeV
+        , 'Xicplus_ADMASS_HalfWin'  : 120.0*MeV
+        , 'Xicplus_BPVVDCHI2_Min'   :  25.0
+        , 'Xicplus_BPVDIRA_Min'     :   0.99
+        , 'Xic0_ADAMASS_HalfWin'    : 170.0*MeV
+        , 'Xic0_ADMASS_HalfWin'     :  50.0*MeV
+        , 'Xic0_BPVVDCHI2_Min'      :  25.0
+        , 'Xic0_BPVDIRA_Min'        :   0.9
+        , 'Omegac0_ADAMASS_HalfWin' : 170.0*MeV
+        , 'Omegac0_ADMASS_HalfWin'  :  50.0*MeV
+        , 'Omegac0_4Dau_VCHI2_Max'  :  60.0
+        , 'Omegac0_BPVVDCHI2_Min'   :  25.0
+        , 'Omegac0_BPVDIRA_Min'     :   0.9
+        , 'Xicc_AM_Min'             :   2.3*GeV #maybe 3.1 if rates too high
+        , 'Xicc_AM_Max'             :   5.0*GeV #maybe 4.0 if rates too high 
+        , 'Xicc_APT_Min'            :   2.0*GeV
+        , 'Xicc_ADOCAMAX_Max'       :   2.0*mm #increase form 0.5 to 2 
+        , 'Xicc_Lc_delta_VZ_Min'    :  -5.0*mm #increase to -5 from -2 
+        , 'Xicc_BPVVDCHI2_Min'      :  -1.0
+        , 'Xicc_BPVDIRA_Min'        :   0.9 
+        , 'Omegacc_AM_Min'          :   2.5*GeV
+        , 'Omegacc_AM_Max'          :   5.2*GeV 
+        , 'Omegacc_APT_Min'         :   2.0*GeV
+        , 'Omegacc_ADOCAMAX_Max'    :   2.0*mm #increase form 0.5 to 2 
+        , 'Omegacc_Lc_delta_VZ_Min' :  -5.0*mm #increase to -5 from -2 
+        , 'Omegacc_BPVVDCHI2_Min'   :  -1.0
+        , 'Omegacc_BPVDIRA_Min'     :   0.9 
+        , 'BVCHI2DOF'               :  20.0 #increase from 9 to 20 
+        , 'Omegacc_2Dau_VCHI2_Max'  :  20.0
+        , 'Xicc_2Dau_VCHI2_Max'     :  60.0 #set to 60 from 20 
+        , 'Xicc_3Dau_VCHI2_Max'     :  60.0 #set to 60 form 30 
+        , 'Xicc_4Dau_VCHI2_Max'     :  60.0
+        , 'MINIPCHI2'               :   4.0  # adimensiional, orig. 9 
+        , 'MINIPCHI2Loose'          :   4.0  # adimensiional 
+        , 'Xicc_Zero_BPVDIRA_Min'   :   0.0 # Neutral
+        , 'Omegacc_Zero_BPVDIRA_Min':   0.0 # Neutral
+      } ## end of 'CONFIG' 
+}  ## end of default_config
+
+#-------------------------------------------------------------------------------------------------------------
+class StrippingXiccSL(LineBuilder) :
+        __configuration_keys__ = default_config['CONFIG'].keys()
+
+        def __init__(self, name, config) :
+            LineBuilder.__init__(self, name, config)
+            self.name = name
+            self.config = config
+
+            # All Loose Protons
+            self.AllLooseProtonsList = MergedSelection("AllLooseProtonsFor" + self.name,
+                    RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLooseProtons/Particles")])
+
+            # All Loose Pions
+            self.AllLoosePionsList = MergedSelection("AllLoosePionsFor" + self.name,
+                    RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")])
+
+            # All Loose Kaons
+            self.AllLooseKaonsList = MergedSelection("AllLooseKaonsFor" + self.name,
+                    RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")])
+
+            # Loose Muons
+            self.LooseMuonsList = MergedSelection("LooseMuonsFor" + self.name,
+                    RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllVeryLooseMuons/Particles")])
+
+            # Good tracks - All Loose Protons
+            self.GoodAllLooseProtonsList = self.createSubSel( OutputList = "GoodAllLooseProtonsFor" + self.name,
+                    InputList = self.AllLooseProtonsList,
+                    Cuts = "(TRCHI2DOF < %(Xicc_Daug_TRCHI2DOF_Max)s)"\
+                            "& (P>%(Xicc_Daug_P_Min)s)"\
+                            "& (PT>%(Xicc_Daug_PT_Min)s)"\
+                            "& (MIPCHI2DV(PRIMARY)>%(Xicc_Daug_MIPCHI2DV_Min)s)"\
+                            "& (HASRICH)&(PIDp-PIDpi>%(Xicc_P_PIDpPIDpi_Min)s)"\
+                            "& (HASRICH)&(PIDp-PIDK>%(Xicc_P_PIDpPIDK_Min)s)"\
+                            "& (TRGHOSTPROB<%(TrGhostProbMax)s)"\
+                            "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)" % self.config )
+
+            # Good tracks - All Loose Pions
+            self.GoodAllLoosePionsList = self.createSubSel( OutputList = "GoodAllLoosePionsFor" + self.name,
+                    InputList = self.AllLoosePionsList,
+                    Cuts = "(TRCHI2DOF < %(Xicc_Daug_TRCHI2DOF_Max)s)"\
+                            "& (P>%(Xicc_Daug_P_Min)s)" \
+                            "& (PT>%(Xicc_Daug_PT_Min)s)" \
+                            "& (MIPCHI2DV(PRIMARY)>%(Xicc_Daug_MIPCHI2DV_Min)s)"\
+                            "& (HASRICH)&(PIDpi-PIDK>%(Xicc_Pi_PIDpiPIDK_Min)s)"\
+                            "& (PIDK<%(PionPIDK)s)"\
+                            "& (TRGHOSTPROB<%(TrGhostProbMax)s)"\
+                            "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2Loose)s)" % self.config )
+
+            # Good tracks - All Loose Kaons
+            self.GoodAllLooseKaonsList = self.createSubSel( OutputList = "GoodAllLooseKaonsFor" + self.name,
+                    InputList = self.AllLooseKaonsList,
+                    Cuts = "(TRCHI2DOF < %(Xicc_Daug_TRCHI2DOF_Max)s)"\
+                            "& (P>%(Xicc_Daug_P_Min)s)"\
+                            "& (PT>%(Xicc_Daug_PT_Min)s)"\
+                            "& (MIPCHI2DV(PRIMARY)>%(Xicc_Daug_MIPCHI2DV_Min)s)"\
+                            "& (HASRICH)&(PIDK-PIDpi>%(Xicc_K_PIDKPIDpi_Min)s)"\
+                            "& (TRGHOSTPROB<%(TrGhostProbMax)s)"\
+                            "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2Loose)s)" % self.config )
+
+            # For Neutral Xic/Oc - Good tracks - All Loose Protons
+            self.GoodNeutralStatesProtonsList = self.createSubSel( OutputList = "GoodNeutralStatesProtonsFor" + self.name,
+                    InputList = self.AllLooseProtonsList,
+                    Cuts = "(TRCHI2DOF < %(Xicc_Daug_TRCHI2DOF_Max)s)"\
+                            "& (P>%(Xicc_Daug_P_Min)s)"\
+                            "& (PT>%(Xicc_Daug_PT_Min)s)"\
+                            "& (MIPCHI2DV(PRIMARY)>%(Xicc_Daug_MIPCHI2DV_Min)s)"\
+                            "& (HASRICH)&(PIDp-PIDpi>%(Xicc_P_PIDpPIDpi_Min)s)"\
+                            "& (HASRICH)&(PIDp-PIDK>%(Xicc_P_PIDpPIDK_Min)s)"\
+                            "& (TRGHOSTPROB<%(TrGhostProbMax)s)" % self.config )
+
+            # For Neutral Xic/Oc - Good tracks - All Loose Pions
+            self.GoodNeutralStatesPionsList = self.createSubSel( OutputList = "GoodNeutralStatesPionsFor" + self.name,
+                    InputList = self.AllLoosePionsList,
+                    Cuts = "(TRCHI2DOF < %(Xicc_Daug_TRCHI2DOF_Max)s)"\
+                            "& (P>%(Xicc_Daug_P_Min)s)" \
+                            "& (PT>%(Xicc_Daug_PT_Min)s)" \
+                            "& (MIPCHI2DV(PRIMARY)>%(Xicc_Daug_MIPCHI2DV_Min)s)"\
+                            "& (HASRICH)&(PIDpi-PIDK>%(Xicc_Pi_PIDpiPIDK_Min)s)"\
+                            "& (PIDK<%(PionPIDK)s)"\
+                            "& (TRGHOSTPROB<%(TrGhostProbMax)s)" % self.config )
+
+            # For Neutral Xic/Oc - Good tracks - All Loose Kaons
+            self.GoodNeutralStatesKaonsList = self.createSubSel( OutputList = "GoodNeutralStatesKaonsFor" + self.name,
+                    InputList = self.AllLooseKaonsList,
+                    Cuts = "(TRCHI2DOF < %(Xicc_Daug_TRCHI2DOF_Max)s)"\
+                            "& (P>%(Xicc_Daug_P_Min)s)"\
+                            "& (PT>%(Xicc_Daug_PT_Min)s)"\
+                            "& (MIPCHI2DV(PRIMARY)>%(Xicc_Daug_MIPCHI2DV_Min)s)"\
+                            "& (HASRICH)&(PIDK-PIDpi>%(Xicc_K_PIDKPIDpi_Min)s)"\
+                            "& (TRGHOSTPROB<%(TrGhostProbMax)s)" % self.config )
+
+            # Good tracks - Loose Muons
+            self.GoodLooseMuonsList = self.createSubSel( OutputList = "GoodLooseMuonsFor" + self.name,
+                    InputList = self.LooseMuonsList,
+                    Cuts = "(TRCHI2DOF < %(TRCHI2)s)"\
+                            "& (P>%(MuonP)s)"\
+                            "& (PT>%(MuonPT)s)"\
+                            "& (MIPCHI2DV(PRIMARY)>%(MuonIPCHI2)s)"\
+                            "& (PIDmu > %(MuonPIDmu)s )" \
+                            "& (TRGHOSTPROB < %(GhostProb)s)" % self.config )
+
+            self.BasicList = self.makeBasicLcXicOmegac()
+            self.XiccList = self.makeXicc()
+            self.OmegaccList = self.makeOmegacc()
+
+        #------------------------------------------------------------------------------------------
+        #------------------------------------------------------------------------------------------
+
+        def createSubSel( self, OutputList, InputList, Cuts ) :
+            '''create a selection using a FilterDesktop'''
+            filter = FilterDesktop(Code = Cuts)
+            return Selection( OutputList,
+                             Algorithm = filter,
+                             RequiredSelections = [ InputList ] )
+
+        def createCombinationSel( self, OutputList,
+                                 DecayDescriptor,
+                                 DaughterLists,
+                                 DaughterCuts = {} ,
+                                 PreVertexCuts = "ALL",
+                                 PostVertexCuts = "ALL") :
+            '''create a selection using a ParticleCombiner with a single decay descriptor'''
+            combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                        DaughtersCuts = DaughterCuts,
+                                        MotherCut = PostVertexCuts,
+                                        CombinationCut = PreVertexCuts,
+                                        ReFitPVs = True)
+            return Selection ( OutputList,
+                              Algorithm = combiner,
+                              RequiredSelections = DaughterLists)
+
+        def makeBasicLcXicOmegac( self ):
+            # Make Lambda_c+
+            # Pick up standard Lambdac -> p K- pi+ then filter it to reduce rate:
+            self.filterLc = self.makeLc(self.name+'filterLc')
+            #LambdacList = self.makeTisTos(self.name+"LambdacList", selection = self.filterLc, hltTisTosSpec = config['LcHlt2TisTosSpec'])
+            self.LambdacList = self.makeTisTos(self.name+"LambdacList", selection = self.filterLc, hltTisTosSpec = { 'Hlt2CharmHadLcpToPpKmPip.*Decision%TOS' : 0, 'Hlt2Global%TIS' : 0 })
+
+            # Make Xic+
+            self.XicPlus2pKpi = self.createCombinationSel( OutputList = "XicPlus2pKpi"+ self.name,
+                    DecayDescriptor = "[Xi_c+ -> p+ K- pi+]cc",
+                    DaughterLists   = [self.GoodAllLooseProtonsList, self.GoodAllLooseKaonsList, self.GoodAllLoosePionsList],
+                    PreVertexCuts   = "( (ADAMASS('Xi_c+') < %(Xicplus_ADAMASS_HalfWin)s )" \
+                                    "& (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                                    "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+                                    "& (APT>%(Lc_APT_Min)s) )" % self.config,
+                    PostVertexCuts  = "( (VFASPF(VCHI2)<%(Lc_VCHI2_Max)s)" \
+                                    "& (ADMASS('Xi_c+') < %(Xicplus_ADMASS_HalfWin)s)" \
+                                    "& (BPVVDCHI2>%(Xicplus_BPVVDCHI2_Min)s)" \
+                                    "& (BPVDIRA>%(Xicplus_BPVDIRA_Min)s) )" % self.config )
+            # Make Xic0
+            self.XicZero2pKKpi = self.createCombinationSel( OutputList = "XicZero2pKKpi"+ self.name,
+                    DecayDescriptor = "[Xi_c0 -> p+ K- K- pi+]cc",
+                    DaughterLists   = [self.GoodNeutralStatesProtonsList, self.GoodNeutralStatesKaonsList, self.GoodNeutralStatesKaonsList, self.GoodNeutralStatesPionsList],
+                    PreVertexCuts   = "( (ADAMASS('Xi_c0') < %(Xic0_ADAMASS_HalfWin)s )" \
+                                    "& (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                                    "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+                                    "& (APT>%(Lc_APT_Min)s) )" % self.config,
+                    PostVertexCuts  = "( (VFASPF(VCHI2)<%(Omegac0_4Dau_VCHI2_Max)s)" \
+                                    "& (ADMASS('Xi_c0') < %(Xic0_ADMASS_HalfWin)s)" \
+                                    "& (BPVVDCHI2>%(Xic0_BPVVDCHI2_Min)s)" \
+                                    "& (BPVDIRA>%(Xic0_BPVDIRA_Min)s) )" % self.config)
+            # Make Omegac0
+            self.OmegacZero2pKKpi = self.createCombinationSel( OutputList = "OmegacZero2pKKpi"+ self.name,
+                    DecayDescriptor = "[Omega_c0 -> p+ K- K- pi+]cc",
+                    DaughterLists   = [self.GoodNeutralStatesProtonsList, self.GoodNeutralStatesKaonsList, self.GoodNeutralStatesKaonsList, self.GoodNeutralStatesPionsList],
+                    PreVertexCuts   = "( (ADAMASS('Omega_c0') < %(Omegac0_ADAMASS_HalfWin)s )" \
+                                    "& (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                                    "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+                                    "& (APT>%(Lc_APT_Min)s) )" % self.config,
+                    PostVertexCuts  = "( (VFASPF(VCHI2)<%(Omegac0_4Dau_VCHI2_Max)s)" \
+                                    "& (ADMASS('Omega_c0') < %(Omegac0_ADMASS_HalfWin)s)" \
+                                    "& (BPVVDCHI2>%(Omegac0_BPVVDCHI2_Min)s)" \
+                                    "& (BPVDIRA>%(Omegac0_BPVDIRA_Min)s) )" % self.config)
+
+        def makeXicc( self ):
+            _strCutComb  = "  (AM>%(Xicc_AM_Min)s)"\
+                           "& (AM<%(Xicc_AM_Max)s)"\
+                           "& (APT>%(Xicc_APT_Min)s)"\
+                           "& (ADOCAMAX('')<%(Xicc_ADOCAMAX_Max)s)" % self.config
+            _strChi2Moth2 = "(VFASPF(VCHI2/VDOF)<%(BVCHI2DOF)s)" % self.config
+            # Charged FS Xic/Lc
+            _strCutMoth  = "(CHILD(VFASPF(VZ),1) - VFASPF(VZ) > %(Xicc_Lc_delta_VZ_Min)s)" \
+                           "& (BPVDIRA > %(Xicc_BPVDIRA_Min)s)" % self.config
+            # Neutral FS Xic0/Oc0
+            _strCutMoth_Zero  = "(CHILD(VFASPF(VZ),1) - VFASPF(VZ) > %(Xicc_Lc_delta_VZ_Min)s)" \
+                           "& (BPVDIRA > %(Xicc_Zero_BPVDIRA_Min)s)" % self.config
+            
+            _strCutMoth2       = _strChi2Moth2 + '&' + _strCutMoth
+            _strCutMoth2_Zero  = _strChi2Moth2 + '&' + _strCutMoth_Zero
+
+            ''' Stripping Xi_cc++ -> Lambda_c+ mu+ '''
+            Xicc2LambdacMuNu = self.createCombinationSel(OutputList = "Xicc2LambdacMuNu" + self.name,
+                    DecayDescriptor = "[Xi_cc++ -> Lambda_c+ mu+]cc",
+                    DaughterLists   = [self.LambdacList, self.GoodLooseMuonsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2
+                    )
+            Xicc2LambdacMuNuLine = StrippingLine( self.name + "Xicc2LambdacMuNuLine", 
+                    prescale = self.config['signalPrescaleViaLc'],
+                    algos = [ Xicc2LambdacMuNu ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoXiccppD3Body())
+            self.registerLine (Xicc2LambdacMuNuLine)
+
+            ''' Stripping Xi_cc++ -> Xi_c+ mu+ '''
+            Xicc2XicPlusMuNu = self.createCombinationSel(OutputList = "Xicc2XicPlusMuNu" + self.name,
+                    DecayDescriptor = "[Xi_cc++ -> Xi_c+ mu+]cc",
+                    DaughterLists   = [self.XicPlus2pKpi, self.GoodLooseMuonsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2
+                    )
+            Xicc2XicPlusMuNuLine = StrippingLine( self.name + "Xicc2XicPlusMuNuLine", 
+                    prescale = self.config['signalPrescaleViaXicp'],
+                    algos = [ Xicc2XicPlusMuNu ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoXiccppD3Body())
+            self.registerLine (Xicc2XicPlusMuNuLine)
+
+            ''' Stripping Xi_cc+ -> Xi_c0 mu+ '''
+            Xicc2XicZeroMuNu = self.createCombinationSel(OutputList = "Xicc2XicZeroMuNu" + self.name,
+                    DecayDescriptor = "[Xi_cc+ -> Xi_c0 mu+]cc",
+                    DaughterLists   = [self.XicZero2pKKpi, self.GoodLooseMuonsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2_Zero
+                    )
+            Xicc2XicZeroMuNuLine = StrippingLine( self.name + "Xicc2XicZeroMuNuLine", 
+                    prescale = self.config['signalPrescaleViaXicz'],
+                    algos = [ Xicc2XicZeroMuNu ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoXiccpD4Body())
+            self.registerLine (Xicc2XicZeroMuNuLine)
+
+            ''' -------------------------------- '''
+            ''' Create wrong charge combinations '''
+            ''' -------------------------------- '''
+            ''' WS Stripping Xi_cc++ -> Lambda_c+ mu- '''
+            Xicc2LambdacMuNuWS = self.createCombinationSel(OutputList = "Xicc2LambdacMuNuWS" + self.name,
+                    DecayDescriptor = "[Xi_cc++ -> Lambda_c+ mu-]cc",
+                    DaughterLists   = [self.LambdacList, self.GoodLooseMuonsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2
+                    )
+            Xicc2LambdacMuNuWSLine = StrippingLine( self.name + "Xicc2LambdacMuNuWSLine", 
+                    prescale = self.config['signalPrescaleViaLcWS'],
+                    algos = [ Xicc2LambdacMuNuWS ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoXiccppD3BodyWS())
+            self.registerLine (Xicc2LambdacMuNuWSLine)
+
+            ''' WS Stripping Xi_cc++ -> Xi_c+ mu- '''
+            Xicc2XicPlusMuNuWS = self.createCombinationSel(OutputList = "Xicc2XicPlusMuNuWS" + self.name,
+                    DecayDescriptor = "[Xi_cc++ -> Xi_c+ mu-]cc",
+                    DaughterLists   = [self.XicPlus2pKpi, self.GoodLooseMuonsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2
+                    )
+            Xicc2XicPlusMuNuWSLine = StrippingLine( self.name + "Xicc2XicPlusMuNuWSLine", 
+                    prescale = self.config['signalPrescaleViaLcWS'],
+                    algos = [ Xicc2XicPlusMuNuWS ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoXiccppD3BodyWS())
+            self.registerLine (Xicc2XicPlusMuNuWSLine)
+
+            ''' WS Stripping Xi_cc+ -> Xi_c0 mu- '''
+            Xicc2XicZeroMuNuWS = self.createCombinationSel(OutputList = "Xicc2XicZeroMuNuWS" + self.name,
+                    DecayDescriptor = "[Xi_cc+ -> Xi_c0 mu-]cc",
+                    DaughterLists   = [self.XicZero2pKKpi, self.GoodLooseMuonsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2_Zero
+                    )
+            Xicc2XicZeroMuNuWSLine = StrippingLine( self.name + "Xicc2XicZeroMuNuWSLine", 
+                    prescale = self.config['signalPrescaleViaLcWS'],
+                    algos = [ Xicc2XicZeroMuNuWS ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoXiccpD4BodyWS())
+            self.registerLine (Xicc2XicZeroMuNuWSLine)
+            
+            ''' ---------------------- '''
+            ''' Normalization channels '''
+            ''' ---------------------- '''
+            ''' NC Stripping Xi_cc++ -> Lambda_c+ pi+ '''
+            Xicc2LambdacNC = self.createCombinationSel(OutputList = "Xicc2LambdacNC" + self.name,
+                    DecayDescriptor = "[Xi_cc++ -> Lambda_c+ pi+]cc",
+                    DaughterLists   = [self.LambdacList, self.GoodAllLoosePionsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2
+                    )
+            Xicc2LambdacNCLine = StrippingLine( self.name + "Xicc2LambdacNCLine", 
+                    prescale = self.config['controlPrescaleViaLcPi'],
+                    algos = [ Xicc2LambdacNC ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoXiccppD3BodyPi())
+            self.registerLine (Xicc2LambdacNCLine)
+        ##  --------------------  end of makeXicc  ------------
+        #------------------------------------------------------------------------------------------
+
+        def makeOmegacc( self ):
+            _strCutComb  = "  (AM>%(Omegacc_AM_Min)s)"\
+                           "& (AM<%(Omegacc_AM_Max)s)"\
+                           "& (APT>%(Omegacc_APT_Min)s)"\
+                           "& (ADOCAMAX('')<%(Omegacc_ADOCAMAX_Max)s)" % self.config
+            _strChi2Moth2 = "(VFASPF(VCHI2/VDOF)<%(BVCHI2DOF)s)" % self.config
+            # Charged FS Xic/Lc
+            _strCutMoth  = "(CHILD(VFASPF(VZ),1) - VFASPF(VZ) > %(Omegacc_Lc_delta_VZ_Min)s)" \
+                           "& (BPVDIRA > %(Omegacc_BPVDIRA_Min)s)" % self.config
+            # Neutral FS Xic0/Oc0
+            _strCutMoth_Zero  = "(CHILD(VFASPF(VZ),1) - VFASPF(VZ) > %(Omegacc_Lc_delta_VZ_Min)s)" \
+                           "& (BPVDIRA > %(Omegacc_Zero_BPVDIRA_Min)s)" % self.config
+
+            _strCutMoth2      = _strChi2Moth2 + '&' + _strCutMoth
+            _strCutMoth2_Zero = _strChi2Moth2 + '&' + _strCutMoth_Zero
+
+            ''' Stripping Omega_cc+ -> Omega_c0 mu+ '''
+            Omegacc2OmegacMuNu = self.createCombinationSel(OutputList = "Omegacc2OmegacMuNu" + self.name,
+                    DecayDescriptor = "[Omega_cc+ -> Omega_c0 mu+]cc",
+                    DaughterLists   = [self.OmegacZero2pKKpi, self.GoodLooseMuonsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2_Zero
+                    )
+            Omegacc2OmegacMuNuLine = StrippingLine( self.name + "Omegacc2OmegacMuNuLine", 
+                    prescale = self.config['signalPrescaleViaOmegaz'],
+                    algos = [ Omegacc2OmegacMuNu ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoOmegaccpD4Body())
+            self.registerLine (Omegacc2OmegacMuNuLine)
+
+            ''' Stripping Omega_cc+ -> Xi_c0 mu+ '''
+            Omegacc2XicMuNu = self.createCombinationSel(OutputList = "Omegacc2XicMuNu" + self.name,
+                    DecayDescriptor = "[Omega_cc+ -> Xi_c0 mu+]cc",
+                    DaughterLists   = [self.XicZero2pKKpi, self.GoodLooseMuonsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2_Zero
+                    )
+            Omegacc2XicMuNuLine = StrippingLine( self.name + "Omegacc2XicMuNuLine", 
+                    prescale = self.config['signalPrescaleViaXicz'],
+                    algos = [ Omegacc2XicMuNu ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoOmegaccpD4Body())
+            self.registerLine (Omegacc2XicMuNuLine)
+
+            ''' ---------------------- '''
+            ''' Normalization channels '''
+            ''' ---------------------- '''
+            ''' NC Stripping Omega_cc+ -> Omega_c0 pi+ '''
+            Omegacc2OmegacNC = self.createCombinationSel(OutputList = "Omegacc2OmegacNC" + self.name,
+                    DecayDescriptor = "[Omega_cc+ -> Omega_c0 pi+]cc",
+                    DaughterLists   = [self.OmegacZero2pKKpi, self.GoodAllLoosePionsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2_Zero
+                    )
+            Omegacc2OmegacNCLine = StrippingLine( self.name + "Omegacc2OmegacNCLine", 
+                    prescale = self.config['controlPrescaleViaOmegaczPi'],
+                    algos = [ Omegacc2OmegacNC ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoOmegaccpD4BodyPi())
+            self.registerLine (Omegacc2OmegacNCLine)
+
+            ''' NC Stripping Omega_cc+ -> Xi_c0 pi+ '''
+            Omegacc2XicNC = self.createCombinationSel(OutputList = "Omegacc2XicNC" + self.name,
+                    DecayDescriptor = "[Omega_cc+ -> Xi_c0 pi+]cc",
+                    DaughterLists   = [self.XicZero2pKKpi, self.GoodAllLoosePionsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2_Zero
+                    )
+            Omegacc2XicNCLine = StrippingLine( self.name + "Omegacc2XicNCLine", 
+                    prescale = self.config['controlPrescaleViaXiczPi'],
+                    algos = [ Omegacc2XicNC ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoOmegaccpD4BodyPi())
+            self.registerLine (Omegacc2XicNCLine)
+
+            ''' -------------------------------- '''
+            ''' Create wrong charge combinations '''
+            ''' -------------------------------- '''
+            ''' WS Stripping Omega_cc+ -> Omega_c0 mu- '''
+            Omegacc2OmegacMuNuWS = self.createCombinationSel(OutputList = "Omegacc2OmegacMuNuWS" + self.name,
+                    DecayDescriptor = "[Omega_cc+ -> Omega_c0 mu-]cc",
+                    DaughterLists   = [self.OmegacZero2pKKpi, self.GoodLooseMuonsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2_Zero
+                    )
+            Omegacc2OmegacMuNuWSLine = StrippingLine( self.name + "Omegacc2OmegacMuNuWSLine", 
+                    prescale = self.config['signalPrescaleViaLcWS'],
+                    algos = [ Omegacc2OmegacMuNuWS ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoOmegaccpD4BodyWS())
+            self.registerLine (Omegacc2OmegacMuNuWSLine)
+
+            ''' WS Stripping Omega_cc+ -> Xi_c0 mu- '''
+            Omegacc2XicMuNuWS = self.createCombinationSel(OutputList = "Omegacc2XicMuNuWS" + self.name,
+                    DecayDescriptor = "[Omega_cc+ -> Xi_c0 mu-]cc",
+                    DaughterLists   = [self.XicZero2pKKpi, self.GoodLooseMuonsList],
+                    PreVertexCuts   = _strCutComb,
+                    PostVertexCuts  = _strCutMoth2_Zero
+                    )
+            Omegacc2XicMuNuWSLine = StrippingLine( self.name + "Omegacc2XicMuNuWSLine", 
+                    prescale = self.config['signalPrescaleViaLcWS'],
+                    algos = [ Omegacc2XicMuNuWS ], 
+                    EnableFlavourTagging = False,
+                    RelatedInfoTools = self._getRelInfoOmegaccpD4BodyWS())
+            self.registerLine (Omegacc2XicMuNuWSLine)
+        ## --------------------  end of makeOmegaminus  ------------
+        #------------------------------------------------------------------------------------------
+
+        def makeLc(self, name) :
+            ## Pick up standard Lambdac -> p K- pi+
+            _LcPions   = DataOnDemand(Location = 'Phys/StdLoosePions/Particles')
+            _LcKaons   = DataOnDemand(Location = 'Phys/StdLooseKaons/Particles')
+            _LcProtons = DataOnDemand(Location = 'Phys/StdLooseProtons/Particles')
+
+            ## Daughter cuts
+            _strCutAllDaug = "(TRCHI2DOF<%(Lc_Daug_TRCHI2DOF_Max)s)" \
+                             "& (PT>%(Lc_Daug_PT_Min)s)" \
+                             "& (P>%(Lc_Daug_P_Min)s)" % self.config
+            _strCutK  = _strCutAllDaug + '&' + "(HASRICH)&((PIDK - PIDpi)>%(Lc_K_PIDKPIDpi_Min)s)" % self.config
+            _strCutpi = _strCutAllDaug + '&' + "(HASRICH)&((PIDpi- PIDK)>%(Lc_Pi_PIDpiPIDK_Min)s)" % self.config
+            _strCutp  = _strCutAllDaug + '&' + "(HASRICH)&((PIDp - PIDpi)>%(Lc_P_PIDpPIDpi_Min)s)&((PIDp-PIDK)>%(Lc_P_PIDpPIDK_Min)s)" % self.config
+
+            _daughterCuts = { 'p+'  : _strCutp,
+                              'K-'  : _strCutK,
+                              'pi+' : _strCutpi }
+
+            ## Combination cuts
+            _strCutComb = "(ADAMASS('Lambda_c+')<1.1*%(Lc_ADMASS_HalfWin)s)" \
+                          "& (AMAXCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                          "& (ADOCAMAX('')<%(Lc_ADOCAMAX_Max)s)" \
+                          "& (APT>%(Lc_APT_Min)s)" % self.config
+
+            _strCutMoth = "(VFASPF(VCHI2) < %(Lc_VCHI2_Max)s)" \
+                          "& (ADMASS('Lambda_c+')<%(Lc_ADMASS_HalfWin)s)" \
+                          "& (BPVVDCHI2>%(Lc_BPVVDCHI2_Min)s)" \
+                          "& (BPVDIRA>%(Lc_BPVDIRA_Min)s)" % self.config
+
+            _combineLambdac2PKPi = CombineParticles(
+                DecayDescriptor = "[Lambda_c+ -> p+ K- pi+]cc",
+                DaughtersCuts = _daughterCuts,
+                CombinationCut = _strCutComb,
+                MotherCut = _strCutMoth )
+            return Selection ( name,
+                               Algorithm = _combineLambdac2PKPi,
+                               RequiredSelections = [ _LcProtons, _LcKaons, _LcPions ] )
+
+        def makeTisTos( self, name, selection, hltTisTosSpec = { } ) :
+            outSel = selection
+            if len(hltTisTosSpec) > 0 :
+                _tisTosFilter = TisTosParticleTagger( name + 'TisTos' , TisTosSpecs = hltTisTosSpec )
+                outSel = Selection( name , Algorithm = _tisTosFilter , RequiredSelections = [ selection ] )
+            return outSel
+
+        def _getRelInfoD3Body(self):
+            relInfo = []
+            for coneAngle in [0.8,1.0,1.3,1.5,1.7,2.0]:
+                conestr = str(coneAngle).replace('.','')
+                relInfo += [ { "Type"          : "RelInfoConeVariables",
+                  "ConeAngle"    : coneAngle,
+                  "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                  "IgnoreUnmatchedDescriptors" : True,
+                  "DaughterLocations" : {
+                       "^[Beauty -> (Charm -> p+ X- X+) mu+]CC" : 'P2ConeVar%s_DCB' % conestr,
+                       "[Beauty -> ^(Charm -> p+ X- X+) mu+]CC" : 'P2ConeVar%s_CB'  % conestr,
+                       "[Beauty -> (Charm -> ^p+ X- X+) mu+]CC" : 'P2ConeVar%s_P'   % conestr,
+                       "[Beauty -> (Charm -> p+ ^X- X+) mu+]CC" : 'P2ConeVar%s_1'   % conestr,
+                       "[Beauty -> (Charm -> p+ X- ^X+) mu+]CC" : 'P2ConeVar%s_2'   % conestr,
+                       "[Beauty -> (Charm -> p+ X- X+) ^mu+]CC" : 'P2ConeVar%s_Mu'  % conestr } }
+                           ]
+            relInfo += [ { "Type" : "RelInfoVertexIsolation",
+                   "IgnoreUnmatchedDescriptors" : True,
+                   "DaughterLocations" : {
+                       "^[Beauty -> (Charm -> p+ X- X+) mu+]CC" : 'VertexIsoInfo_DCB',
+                       "[Beauty -> ^(Charm -> p+ X- X+) mu+]CC" : 'VertexIsoInfo_CC'} } ]                        
+            return relInfo 
+
+        def _getRelInfoXiccppD3Body(self):
+            relInfo = []
+            for coneAngle in [0.8,1.0,1.3,1.5,1.7,2.0]:
+                conestr = str(coneAngle).replace('.','')
+                relInfo += [ { "Type"          : "RelInfoConeVariables",
+                  "ConeAngle"    : coneAngle,
+                  "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                  "IgnoreUnmatchedDescriptors" : True,
+                  "DaughterLocations" : {
+                       "^[Xi_cc++ -> (Charm -> p+ X- X+) mu+]CC" : 'P2ConeVar%s_DCB' % conestr,
+                       "[Xi_cc++ -> ^(Charm -> p+ X- X+) mu+]CC" : 'P2ConeVar%s_CB'  % conestr,
+                       "[Xi_cc++ -> (Charm -> ^p+ X- X+) mu+]CC" : 'P2ConeVar%s_P'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ ^X- X+) mu+]CC" : 'P2ConeVar%s_1'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ X- ^X+) mu+]CC" : 'P2ConeVar%s_2'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ X- X+) ^mu+]CC" : 'P2ConeVar%s_Mu'  % conestr } }
+                           ]
+            relInfo += [ { "Type" : "RelInfoVertexIsolation",
+                   "IgnoreUnmatchedDescriptors" : True,
+                   "DaughterLocations" : {
+                       "^[Xi_cc++ -> (Charm -> p+ X- X+) mu+]CC" : 'VertexIsoInfo_DCB',
+                       "[Xi_cc++ -> ^(Charm -> p+ X- X+) mu+]CC" : 'VertexIsoInfo_CC'} } ]                        
+            return relInfo 
+
+        def _getRelInfoXiccppD3BodyWS(self):
+            relInfo = []
+            for coneAngle in [0.8,1.0,1.3,1.5,1.7,2.0]:
+                conestr = str(coneAngle).replace('.','')
+                relInfo += [ { "Type"          : "RelInfoConeVariables",
+                  "ConeAngle"    : coneAngle,
+                  "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                  "IgnoreUnmatchedDescriptors" : True,
+                  "DaughterLocations" : {
+                       "^[Xi_cc++ -> (Charm -> p+ X- X+) mu-]CC" : 'P2ConeVar%s_DCB' % conestr,
+                       "[Xi_cc++ -> ^(Charm -> p+ X- X+) mu-]CC" : 'P2ConeVar%s_CB'  % conestr,
+                       "[Xi_cc++ -> (Charm -> ^p+ X- X+) mu-]CC" : 'P2ConeVar%s_P'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ ^X- X+) mu-]CC" : 'P2ConeVar%s_1'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ X- ^X+) mu-]CC" : 'P2ConeVar%s_2'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ X- X+) ^mu-]CC" : 'P2ConeVar%s_Mu'  % conestr } }
+                           ]
+            relInfo += [ { "Type" : "RelInfoVertexIsolation",
+                   "IgnoreUnmatchedDescriptors" : True,
+                   "DaughterLocations" : {
+                       "^[Xi_cc++ -> (Charm -> p+ X- X+) mu-]CC" : 'VertexIsoInfo_DCB',
+                       "[Xi_cc++ -> ^(Charm -> p+ X- X+) mu-]CC" : 'VertexIsoInfo_CC'} } ]                        
+            return relInfo 
+
+        def _getRelInfoXiccppD3BodyPi(self):
+            relInfo = []
+            for coneAngle in [0.8,1.0,1.3,1.5,1.7,2.0]:
+                conestr = str(coneAngle).replace('.','')
+                relInfo += [ { "Type"          : "RelInfoConeVariables",
+                  "ConeAngle"    : coneAngle,
+                  "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                  "IgnoreUnmatchedDescriptors" : True,
+                  "DaughterLocations" : {
+                       "^[Xi_cc++ -> (Charm -> p+ X- X+) pi+]CC" : 'P2ConeVar%s_DCB' % conestr,
+                       "[Xi_cc++ -> ^(Charm -> p+ X- X+) pi+]CC" : 'P2ConeVar%s_CB'  % conestr,
+                       "[Xi_cc++ -> (Charm -> ^p+ X- X+) pi+]CC" : 'P2ConeVar%s_P'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ ^X- X+) pi+]CC" : 'P2ConeVar%s_1'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ X- ^X+) pi+]CC" : 'P2ConeVar%s_2'   % conestr,
+                       "[Xi_cc++ -> (Charm -> p+ X- X+) ^pi+]CC" : 'P2ConeVar%s_Mu'  % conestr } }
+                           ]
+            relInfo += [ { "Type" : "RelInfoVertexIsolation",
+                   "IgnoreUnmatchedDescriptors" : True,
+                   "DaughterLocations" : {
+                       "^[Xi_cc++ -> (Charm -> p+ X- X+) pi+]CC" : 'VertexIsoInfo_DCB',
+                       "[Xi_cc++ -> ^(Charm -> p+ X- X+) pi+]CC" : 'VertexIsoInfo_CC'} } ]                        
+            return relInfo 
+
+        def _getRelInfoXiccpD4BodyWS(self):
+            relInfo = []
+            for coneAngle in [0.8,1.0,1.3,1.7]:
+                conestr = str(coneAngle).replace('.','')
+                relInfo += [
+                { "Type"         : "RelInfoConeVariables",
+                "ConeAngle"    : coneAngle,
+                "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "DaughterLocations" : {
+                    "^[Xi_cc+ -> (Charm -> p+ X- X- X+) mu-]CC" : 'P2ConeVar%s_DCB' % conestr,
+                    "[Xi_cc+ -> ^(Charm -> p+ X- X- X+) mu-]CC" : 'P2ConeVar%s_CB'  % conestr,
+                    "[Xi_cc+ -> (Charm -> ^p+ X- X- X+) mu-]CC" : 'P2ConeVar%s_P'   % conestr,
+                    "[Xi_cc+ -> (Charm -> p+ ^X- X- X+) mu-]CC" : 'P2ConeVar%s_1'   % conestr,
+                    "[Xi_cc+ -> (Charm -> p+ X- ^X- X+) mu-]CC" : 'P2ConeVar%s_2'   % conestr,
+                    "[Xi_cc+ -> (Charm -> p+ X- X- ^X+) mu-]CC" : 'P2ConeVar%s_3'   % conestr,
+                    "[Xi_cc+ -> (Charm -> p+ X- X- X+) ^mu-]CC" : 'P2ConeVar%s_Mu'  % conestr } }
+                           ]
+            relInfo += [ { "Type" : "RelInfoVertexIsolation",
+                "DaughterLocations" : {
+                    "^[Xi_cc+ -> (Charm -> p+ X- X- X+) mu-]CC" : 'VertexIsoInfo_DCB',
+                    "[Xi_cc+ -> ^(Charm -> p+ X- X- X+) mu-]CC" : 'VertexIsoInfo_CB'} } ]
+            return relInfo
+
+        def _getRelInfoXiccpD4Body(self):
+            relInfo = []
+            for coneAngle in [0.8,1.0,1.3,1.7]:
+                conestr = str(coneAngle).replace('.','')
+                relInfo += [
+                { "Type"         : "RelInfoConeVariables",
+                "ConeAngle"    : coneAngle,
+                "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "DaughterLocations" : {
+                    "^[Xi_cc+ -> (Charm -> p+ X- X- X+) mu+]CC" : 'P2ConeVar%s_DCB' % conestr,
+                    "[Xi_cc+ -> ^(Charm -> p+ X- X- X+) mu+]CC" : 'P2ConeVar%s_CB'  % conestr,
+                    "[Xi_cc+ -> (Charm -> ^p+ X- X- X+) mu+]CC" : 'P2ConeVar%s_P'   % conestr,
+                    "[Xi_cc+ -> (Charm -> p+ ^X- X- X+) mu+]CC" : 'P2ConeVar%s_1'   % conestr,
+                    "[Xi_cc+ -> (Charm -> p+ X- ^X- X+) mu+]CC" : 'P2ConeVar%s_2'   % conestr,
+                    "[Xi_cc+ -> (Charm -> p+ X- X- ^X+) mu+]CC" : 'P2ConeVar%s_3'   % conestr,
+                    "[Xi_cc+ -> (Charm -> p+ X- X- X+) ^mu+]CC" : 'P2ConeVar%s_Mu'  % conestr } }
+                           ]
+            relInfo += [ { "Type" : "RelInfoVertexIsolation",
+                "DaughterLocations" : {
+                    "^[Xi_cc+ -> (Charm -> p+ X- X- X+) mu+]CC" : 'VertexIsoInfo_DCB',
+                    "[Xi_cc+ -> ^(Charm -> p+ X- X- X+) mu+]CC" : 'VertexIsoInfo_CB'} } ]
+            return relInfo
+
+        def _getRelInfoOmegaccpD4Body(self):
+            relInfo = []
+            for coneAngle in [0.8,1.0,1.3,1.7]:
+                conestr = str(coneAngle).replace('.','')
+                relInfo += [
+                { "Type"         : "RelInfoConeVariables",
+                "ConeAngle"    : coneAngle,
+                "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "DaughterLocations" : {
+                    "^[Omega_cc+ -> (Charm -> p+ X- X- X+) mu+]CC" : 'P2ConeVar%s_DCB' % conestr,
+                    "[Omega_cc+ -> ^(Charm -> p+ X- X- X+) mu+]CC" : 'P2ConeVar%s_CB'  % conestr,
+                    "[Omega_cc+ -> (Charm -> ^p+ X- X- X+) mu+]CC" : 'P2ConeVar%s_P'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ ^X- X- X+) mu+]CC" : 'P2ConeVar%s_1'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ X- ^X- X+) mu+]CC" : 'P2ConeVar%s_2'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ X- X- ^X+) mu+]CC" : 'P2ConeVar%s_3'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ X- X- X+) ^mu+]CC" : 'P2ConeVar%s_Mu'  % conestr } }
+                           ]
+            relInfo += [ { "Type" : "RelInfoVertexIsolation",
+                "DaughterLocations" : {
+                    "^[Omega_cc+ -> (Charm -> p+ X- X- X+) mu+]CC" : 'VertexIsoInfo_DCB',
+                    "[Omega_cc+ -> ^(Charm -> p+ X- X- X+) mu+]CC" : 'VertexIsoInfo_CB'} } ]
+            return relInfo
+
+        def _getRelInfoOmegaccpD4BodyWS(self):
+            relInfo = []
+            for coneAngle in [0.8,1.0,1.3,1.7]:
+                conestr = str(coneAngle).replace('.','')
+                relInfo += [
+                { "Type"         : "RelInfoConeVariables",
+                "ConeAngle"    : coneAngle,
+                "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "DaughterLocations" : {
+                    "^[Omega_cc+ -> (Charm -> p+ X- X- X+) mu-]CC" : 'P2ConeVar%s_DCB' % conestr,
+                    "[Omega_cc+ -> ^(Charm -> p+ X- X- X+) mu-]CC" : 'P2ConeVar%s_CB'  % conestr,
+                    "[Omega_cc+ -> (Charm -> ^p+ X- X- X+) mu-]CC" : 'P2ConeVar%s_P'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ ^X- X- X+) mu-]CC" : 'P2ConeVar%s_1'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ X- ^X- X+) mu-]CC" : 'P2ConeVar%s_2'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ X- X- ^X+) mu-]CC" : 'P2ConeVar%s_3'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ X- X- X+) ^mu-]CC" : 'P2ConeVar%s_Mu'  % conestr } }
+                           ]
+            relInfo += [ { "Type" : "RelInfoVertexIsolation",
+                "DaughterLocations" : {
+                    "^[Omega_cc+ -> (Charm -> p+ X- X- X+) mu-]CC" : 'VertexIsoInfo_DCB',
+                    "[Omega_cc+ -> ^(Charm -> p+ X- X- X+) mu-]CC" : 'VertexIsoInfo_CB'} } ]
+            return relInfo
+
+        def _getRelInfoOmegaccpD4BodyPi(self):
+            relInfo = []
+            for coneAngle in [0.8,1.0,1.3,1.7]:
+                conestr = str(coneAngle).replace('.','')
+                relInfo += [
+                { "Type"         : "RelInfoConeVariables",
+                "ConeAngle"    : coneAngle,
+                "Variables"    : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                "DaughterLocations" : {
+                    "^[Omega_cc+ -> (Charm -> p+ X- X- X+) pi+]CC" : 'P2ConeVar%s_DCB' % conestr,
+                    "[Omega_cc+ -> ^(Charm -> p+ X- X- X+) pi+]CC" : 'P2ConeVar%s_CB'  % conestr,
+                    "[Omega_cc+ -> (Charm -> ^p+ X- X- X+) pi+]CC" : 'P2ConeVar%s_P'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ ^X- X- X+) pi+]CC" : 'P2ConeVar%s_1'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ X- ^X- X+) pi+]CC" : 'P2ConeVar%s_2'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ X- X- ^X+) pi+]CC" : 'P2ConeVar%s_3'   % conestr,
+                    "[Omega_cc+ -> (Charm -> p+ X- X- X+) ^pi+]CC" : 'P2ConeVar%s_Pi'  % conestr } }
+                           ]
+            relInfo += [ { "Type" : "RelInfoVertexIsolation",
+                "DaughterLocations" : {
+                    "^[Omega_cc+ -> (Charm -> p+ X- X- X+) pi+]CC" : 'VertexIsoInfo_DCB',
+                    "[Omega_cc+ -> ^(Charm -> p+ X- X- X+) pi+]CC" : 'VertexIsoInfo_CB'} } ]
+            return relInfo
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/__init__.py
new file mode 100644
index 000000000..e5ee9987d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingCharm/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ('StrippingBs2st2pKpipipi', 'StrippingCharmFromBSemi', 'StrippingCharmedBaryonSL', 'StrippingD2HMuNu', 'StrippingD2KPiPiMuNu', 'StrippingDstarD2KSHHPi0', 'StrippingDstarD2XGamma', 'StrippingLambdac2V0H', 'StrippingLambdacForNeutronPID', 'StrippingNeutralCBaryons', 'StrippingXcpToLambdaKSHp', 'StrippingXcpToXiPipHp', 'StrippingXiccSL')
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeL2ppppi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeL2ppppi.py
new file mode 100644
index 000000000..f6c8c631a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeL2ppppi.py
@@ -0,0 +1,164 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+"""
+Module for construction of HeL->ppppi Stripping Selections and StrippingLines.
+Provides class HeL2ppppiConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Exported symbols (use python help!):
+   - HeL2ppppiConf
+"""
+
+__author__  = ['Hendrik Jage', 'Gediminas Sarpis']
+__date__    = '19/03/2021'
+__version__ = 'v1r0'
+__all__     = {'HeL2ppppiConf',
+               'default_config'}
+
+from Gaudi.Configuration                   import *
+from PhysSelPython.Wrappers                import Selection
+from StrippingConf.StrippingLine           import StrippingLine
+from StrippingUtils.Utils                  import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, DaVinci__N4BodyDecays
+
+from StandardParticles                     import StdLooseANNPions   as Pions
+from StandardParticles                     import StdLooseANNProtons as Protons
+
+default_config = {
+    'NAME'        : 'HeL2ppppi',
+    'WGs'         : ['IFT'],
+    'BUILDERTYPE' : 'HeL2ppppiConf',
+    'CONFIG'      : {'Trk_MaxChi2Ndof'    : 3.0,
+                     'Trk_MaxGhostProb'   : 0.4,
+                     'Trk_MinIPChi2'      : 9.0,
+
+                     'Proton_MinP'        : 3000.0,
+                     'Proton_MinProbNNp'  : 0.10,
+                     'Pion_MinP'          : 1500.0,
+                     'Pion_MinProbNNpi'   : 0.05,
+
+                     'HeL_MaxM_4body'     : 5200.0,
+                     'HeL_MaxM'           : 5000.0,
+                     'HeL_MaxDOCAChi2'    : 20.0,
+                     'HeL_MaxVtxChi2Ndof' : 10.0,
+                     'HeL_MinFDChi2'      : 100.0,
+                     'HeL_MaxIPChi2'      : 25.0,
+                     'HeL_MinDira'        : 0.9995,
+                     'Prescale'          : 1.0,
+                     'Postscale'         : 1.0
+                     },
+    'STREAMS'     : ['BhadronCompleteEvent']
+    }
+
+class HeL2ppppiConf(LineBuilder) :
+    """
+    Builder of HeL -> ppppi Stripping Selection and StrippingLine.
+    Constructs HeL -> ppppi Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config              = { .... }
+    >>> HeL2ppppiConf  = HeL2ppppiConf('HeL2ppppiTest', config)
+    >>> HeL2ppppiLines = HeL2ppppiConf.lines
+    >>> for line in HeL2ppppiLines :
+    >>>   print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selHeL2ppppi   : HeL -> ppppi
+    lineHeL2ppppi  : StrippingLine made out of selHeL2ppppi
+    lines        : List of lines, [lineHeL2ppppi]
+
+    Exports as class data member:
+    HeL2ppppiConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        self.pion      = Pions
+        self.proton    = Protons
+
+        trkFilterP     = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Proton_MinP)s *MeV)    & \
+                                               (PROBNNp            > %(Proton_MinProbNNp)s)' % config )
+
+        trkFilterPi    = FilterDesktop(Code = '(MIPCHI2DV(PRIMARY) > %(Trk_MinIPChi2)s)    & \
+                                               (TRGHOSTPROB        < %(Trk_MaxGhostProb)s) & \
+                                               (TRCHI2DOF          < %(Trk_MaxChi2Ndof)s)  & \
+                                               (P                  > %(Pion_MinP)s *MeV)    & \
+                                               (PROBNNpi           > %(Pion_MinProbNNpi)s)' % config )
+
+        self.myPions   = Selection( 'PionsFor'+name,
+                                    Algorithm = trkFilterPi,
+                                    RequiredSelections = [self.pion] )
+
+        self.myProtons = Selection( 'ProtonsFor'+name,
+                                    Algorithm = trkFilterP,
+                                    RequiredSelections = [self.proton] )
+
+        self.makeHeL2ppppi(name+'_4body', config)
+
+        self.lineHeL2ppppi = StrippingLine('HeL2ppppiLine',
+                                         prescale         = config['Prescale'],
+                                         postscale        = config['Postscale'],
+                                         selection        = self.selHeL2ppppi,
+                                         RequiredRawEvents = ["Rich","Velo","Tracker","Calo"],
+                                         )
+
+        self.registerLine(self.lineHeL2ppppi)
+
+    def makeHeL2ppppi(self, name, config) :
+        # Define all the cuts
+        _mass12CutPreVtx          = '(AM < (%s - 1000)*MeV)'                                  % config['HeL_MaxM_4body']
+        _doca12chi2CutPreVtx      = '(ACHI2DOCA(1,2) < %s)'                                   % config['HeL_MaxDOCAChi2']
+        _combCuts12               = _mass12CutPreVtx
+        _combCuts12              += ' & '+_doca12chi2CutPreVtx
+
+        _mass123CutPreVtx         = '(AM < (%s - 100)*MeV)'                                   % config['HeL_MaxM_4body']
+        _doca123chi2CutPreVtx13   = '(ACHI2DOCA(1,3) < %s)'                                   % config['HeL_MaxDOCAChi2']
+        _doca123chi2CutPreVtx23   = '(ACHI2DOCA(2,3) < %s)'                                   % config['HeL_MaxDOCAChi2']
+        _combCuts123              = _mass123CutPreVtx
+        _combCuts123             += ' & '+_doca123chi2CutPreVtx13
+        _combCuts123             += ' & '+_doca123chi2CutPreVtx23
+
+        _massCutPreVtx            = '(AM             < %s*MeV)'                               % config['HeL_MaxM_4body']
+        _docachi2CutPreVtx14      = '(ACHI2DOCA(1,4) < %s)'                                   % config['HeL_MaxDOCAChi2']
+        _docachi2CutPreVtx24      = '(ACHI2DOCA(2,4) < %s)'                                   % config['HeL_MaxDOCAChi2']
+        _docachi2CutPreVtx34      = '(ACHI2DOCA(3,4) < %s)'                                   % config['HeL_MaxDOCAChi2']
+
+        _combCuts                 = _massCutPreVtx
+        _combCuts                += ' & '+_docachi2CutPreVtx14
+        _combCuts                += ' & '+_docachi2CutPreVtx24
+        _combCuts                += ' & '+_docachi2CutPreVtx34
+
+        _massCutVtx               = '(M                   < %s*MeV)'                           % config['HeL_MaxM']
+        _vtxChi2CutPostVtx        = '(VFASPF(VCHI2/VDOF)  < %s)'                               % config['HeL_MaxVtxChi2Ndof']
+        _fdChi2CutPostVtx         = '(BPVVDCHI2           > %s)'                               % config['HeL_MinFDChi2']
+        _diraCutPostVtx           = '(BPVDIRA             > %s)'                               % config['HeL_MinDira']
+        _ipChi2CutPostVtx         = '(BPVIPCHI2()         < %s)'                               % config['HeL_MaxIPChi2']
+        _motherCuts               = _massCutVtx
+        _motherCuts              += ' & '+_vtxChi2CutPostVtx
+        _motherCuts              += ' & '+_fdChi2CutPostVtx
+        _motherCuts              += ' & '+_diraCutPostVtx 
+        _motherCuts              += ' & '+_ipChi2CutPostVtx
+
+        _HeL                       = DaVinci__N4BodyDecays()
+        _HeL.Combination12Cut      = _combCuts12
+        _HeL.Combination123Cut     = _combCuts123
+        _HeL.CombinationCut        = _combCuts
+        _HeL.MotherCut             = _motherCuts
+        _HeL.DecayDescriptor       = "[Lambda_b0 -> p+ p+ p+ pi-]cc"
+        _HeL.ReFitPVs              = True
+
+        self.selHeL2ppppi           = Selection(name, Algorithm = _HeL, RequiredSelections = [self.myProtons, self.myPions])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeMedian.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeMedian.py
new file mode 100644
index 000000000..018dadcf1
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeMedian.py
@@ -0,0 +1,79 @@
+from __future__ import print_function
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+'''
+Stripping selection of He3 candidates via Median DEDX
+'''
+
+__author__ = ['Gediminas Sarpis, Hendrik Jage']
+__date__ = '19.03.2021'
+__version__ = 'v0r1'
+
+__all__ = ('HeMedianConf', 'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+
+from StandardParticles import StdAllNoPIDsProtons as Protons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter as VoidFilter
+
+default_config = {
+    'NAME': 'HeMedian',
+    'BUILDERTYPE': 'HeMedianConf',
+    'WGs': ['IFT'],
+    'STREAMS': ['BhadronCompleteEvent'],
+    'CONFIG': {
+         'Prescale': 1.0,
+         'HeliumMedian': 115.0,
+         'HeliumP': 2500,
+         'HeliumPT': 300,
+         'TrackGhostProb': 0.15,
+         'eta': 5.0,
+         'NumVeloClusters' : 12,
+         'TrackProbNNpi'    : 0.5,
+         'RequiredRawEvents' : ["Calo", "Rich", "Velo", "Tracker"],
+    },
+}
+
+class HeMedianConf(LineBuilder):
+    __configuration_keys__ = list(default_config['CONFIG'].keys())
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+        _heliumCuts = "(TRVELOCLUSTERDEDXMEDIAN > %(HeliumMedian)s)" % self.config
+        _heliumCuts += " & (P > %(HeliumP)s *MeV)" % self.config
+        _heliumCuts += " & (PT > %(HeliumPT)s *MeV)" % self.config
+        _heliumCuts += " & (TRGHOSTPROB< %(TrackGhostProb)s)" % self.config
+        _heliumCuts += " & (ETA < %(eta)s)" % self.config
+        _heliumCuts += " & (TRVELOCLUSTERS > %(NumVeloClusters)s)" % self.config
+        _heliumCuts += " & (PROBNNpi < %(TrackProbNNpi)s)" % self.config 
+        
+        heliumFilter = FilterDesktop(Code = _heliumCuts)
+
+        myHelium = Selection('HeliumForSel',
+                                Algorithm = heliumFilter,
+                                RequiredSelections = [Protons] )
+
+
+        HeliumMedianLine = StrippingLine(
+            self.name + '_Line',
+            prescale=self.config['Prescale'],
+            RequiredRawEvents=self.config['RequiredRawEvents'],
+            selection=myHelium)
+
+        self.registerLine(HeliumMedianLine)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeNOverflows.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeNOverflows.py
new file mode 100644
index 000000000..390488b54
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeNOverflows.py
@@ -0,0 +1,68 @@
+from __future__ import print_function
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+'''
+Stripping selection of He3 candidates via VELO strip overflows
+'''
+
+__author__ = ['Gediminas Sarpis, Hendrik Jage']
+__date__ = '19.03.2021'
+__version__ = 'v0r1'
+
+__all__ = ('HeNOverflowsConf', 'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+
+from StandardParticles import StdAllNoPIDsProtons as Protons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter as VoidFilter
+
+default_config = {
+    'NAME': 'HeNOverflows',
+    'BUILDERTYPE': 'HeNOverflowsConf',
+    'WGs': ['IFT'],
+    'STREAMS': ['BhadronCompleteEvent'],
+    'CONFIG': {
+        'Prescale': 1.0,
+         'Trk_nOverflows': 3,
+         'RequiredRawEvents' : ["Calo", "Rich", "Velo", "Tracker"],
+
+    },
+}
+
+class HeNOverflowsConf(LineBuilder):
+    __configuration_keys__ = list(default_config['CONFIG'].keys())
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+        _heNOverflowCuts = "(TRVELOCLUSTEROVERFLOWS() > %(Trk_nOverflows)s)" % self.config
+
+        heNOverflowsFilter = FilterDesktop(Code = _heNOverflowCuts)
+
+        myHeNOverflows = Selection('HeliumForOverflowsSel',
+                                Algorithm = heNOverflowsFilter,
+                                RequiredSelections = [Protons] )
+
+
+        HeNOverflowsLine = StrippingLine(
+            self.name + '_Line',
+            prescale=self.config['Prescale'],
+            RequiredRawEvents=self.config['RequiredRawEvents'],
+            selection=myHeNOverflows)
+
+        self.registerLine(HeNOverflowsLine)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonConvertedPhoton.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonConvertedPhoton.py
new file mode 100644
index 000000000..a4c47d498
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonConvertedPhoton.py
@@ -0,0 +1,430 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting converted photons
+'''
+
+__author__ = ['Tom Boettcher']
+__date__ = ''
+__version__ = '$Revision: 1.0 $'
+
+__all__ = (
+    'HeavyIonConvertedPhotonConf',
+    'default_config'
+    )
+
+from Gaudi.Configuration import *
+from CommonParticles.Utils import *
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from Configurables import ( DiElectronMaker,
+                            ProtoParticleCALOFilter,
+                            ParticleTransporter,
+                            LoKi__VertexFitter,
+                            )
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME' : 'HeavyIonConvertedPhoton',
+    'WGs' : ['IFT'],
+    'STREAMS' : ['IFT'],
+    'BUILDERTYPE' : 'HeavyIonConvertedPhotonConf',
+    'CONFIG' : {
+        'odin' : ['NoBeam', 'Beam1', 'Beam2', 'BeamCrossing'],
+
+        #=================
+        # Hlt2 passthrough
+        'Hlt2Pass' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : ("HLT_PASS('Hlt2EWConvPhotonLLHighPtDecision') | HLT_PASS('Hlt2EWConvPhotonDDHighPtDecision')"),
+            'Prescale' : 1.0
+            },
+
+        #====================
+        # Analysis level cuts
+        'LL' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonLLHighPtDecision')",
+            'Prescale' : 1.0,
+            'TrackType' : 'Long',
+            'AddBrem' : True,
+            'MinPt' : 5000.0*MeV,
+            'MaxPt' : 100000.0*MeV,
+            'MaxMass' : 80.0*MeV,
+            'MinPIDe' : 0.0,
+            'MaxIPChi2' : 200.0,
+            'MaxPointing' : 0.03
+            },
+
+        'DD' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonDDHighPtDecision')",
+            'TrackType' : 'Downstream',
+            'Prescale' : 1.0,
+            'AddBrem' : True,
+            'MinPt' : 5000.0*MeV,
+            'MaxPt' : 100000.0*MeV,
+            'MaxMass' : 100.0*MeV,
+            'MinPIDe' : 0.0,
+            'MaxIPChi2' : 200.0,
+            'MaxPointing' : 0.03
+            },
+
+        'LLNoBrem' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonLLHighPtDecision')",
+            'Prescale' : 1.0,
+            'TrackType' : 'Long',
+            'AddBrem' : False,
+            'MinPt' : 5000.0*MeV,
+            'MaxPt' : 100000.0*MeV,
+            'MaxMass' : 80.0*MeV,
+            'MinPIDe' : 0.0,
+            'MaxIPChi2' : 200.0,
+            'MaxPointing' : 0.03
+            },
+
+        'DDNoBrem' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonDDHighPtDecision')",
+            'Prescale' : 1.0,
+            'TrackType' : 'Downstream',
+            'AddBrem' : False,
+            'MinPt' : 5000.0*MeV,
+            'MaxPt' : 100000.0*MeV,
+            'MaxMass' : 100.0*MeV,
+            'MinPIDe' : 0.0,
+            'MaxIPChi2' : 200.0,
+            'MaxPointing' : 0.03
+            },
+
+        #=================
+        # Low-pt prescaled
+        'LowPtLL' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonLLHighPtDecision')",
+            'Prescale' : 0.2,
+            'TrackType' : 'Long',
+            'AddBrem' : True,
+            'MinPt' : 5000.0*MeV,
+            'MaxPt' : 10000.0*MeV,
+            'MaxMass' : 80.0*MeV,
+            'MinPIDe' : -2.0,
+            'MaxIPChi2' : 1000.0,
+            'MaxPointing' : 1.0
+            },
+
+        'LowPtDD' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonDDHighPtDecision')",
+            'Prescale' : 0.2,
+            'TrackType' : 'Downstream',
+            'AddBrem' : True,
+            'MinPt' : 5000.0*MeV,
+            'MaxPt' : 10000.0*MeV,
+            'MaxMass' : 100.0*MeV,
+            'MinPIDe' : -2.0,
+            'MaxIPChi2' : 1000.0,
+            'MaxPointing' : 1.0
+            },
+
+        'LowPtLLNoBrem' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonLLHighPtDecision')",
+            'Prescale' : 0.2,
+            'TrackType' : 'Long',
+            'AddBrem' : False,
+            'MinPt' : 5000.0*MeV,
+            'MaxPt' : 10000.0*MeV,
+            'MaxMass' : 80.0*MeV,
+            'MinPIDe' : -2.0,
+            'MaxIPChi2' : 1000.0,
+            'MaxPointing' : 1.0
+            },
+
+        'LowPtDDNoBrem' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonDDHighPtDecision')",
+            'Prescale' : 0.2,
+            'TrackType' : 'Downstream',
+            'AddBrem' : True,
+            'MinPt' : 5000.0*MeV,
+            'MaxPt' : 10000.0*MeV,
+            'MaxMass' : 100.0*MeV,
+            'MinPIDe' : -2.0,
+            'MaxIPChi2' : 1000.0,
+            'MaxPointing' : 1.0
+            },
+
+        #=========
+        # High-pt
+        'HighPtLL' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonLLHighPtDecision')",
+            'Prescale' : 0.2,
+            'TrackType' : 'Long',
+            'AddBrem' : True,
+            'MinPt' : 10000.0*MeV,
+            'MaxPt' : 100000.0*MeV,
+            'MaxMass' : 80.0*MeV,
+            'MinPIDe' : -2.0,
+            'MaxIPChi2' : 1000.0,
+            'MaxPointing' : 1.0
+            },
+
+        'HighPtDD' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonDDHighPtDecision')",
+            'Prescale' : 0.2,
+            'TrackType' : 'Downstream',
+            'AddBrem' : True,
+            'MinPt' : 10000.0*MeV,
+            'MaxPt' : 100000.0*MeV,
+            'MaxMass' : 100.0*MeV,
+            'MinPIDe' : -2.0,
+            'MaxIPChi2' : 1000.0,
+            'MaxPointing' : 1.0
+            },
+
+        'HighPtLLNoBrem' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonLLHighPtDecision')",
+            'Prescale' : 0.2,
+            'TrackType' : 'Long',
+            'AddBrem' : False,
+            'MinPt' : 10000.0*MeV,
+            'MaxPt' : 100000.0*MeV,
+            'MaxMass' : 80.0*MeV,
+            'MinPIDe' : -2.0,
+            'MaxIPChi2' : 1000.0,
+            'MaxPointing' : 1.0
+            },
+
+        'HighPtDDNoBrem' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : "HLT_PASS('Hlt2EWConvPhotonDDHighPtDecision')",
+            'Prescale' : 0.2,
+            'TrackType' : 'Downstream',
+            'AddBrem' : True,
+            'MinPt' : 10000.0*MeV,
+            'MaxPt' : 100000.0*MeV,
+            'MaxMass' : 100.0*MeV,
+            'MinPIDe' : -2.0,
+            'MaxIPChi2' : 1000.0,
+            'MaxPointing' : 1.0
+            }   
+        }
+    }
+
+class HeavyIonConvertedPhotonConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+        odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in config['odin'] if odin_type in ["NoBeam","Beam1","Beam2","BeamCrossing"]])
+
+        #=======================
+        # Hlt2 passthrough line
+        self.Hlt2PassLine = StrippingLine(
+            name = 'ConvPhotonHlt2Pass',
+            prescale = self.config['Hlt2Pass']['Prescale'],
+            HLT1 = self.config['Hlt2Pass']['Hlt1Filter'],
+            HLT2 = self.config['Hlt2Pass']['Hlt2Filter'],
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.Hlt2PassLine)
+
+        #================================
+        # Lines with analysis level cuts
+        # Brem
+        self.LLLine = StrippingLine(
+            name = 'ConvPhotonLL',
+            prescale = self.config['LL']['Prescale'],
+            HLT1 = self.config['LL']['Hlt1Filter'],
+            HLT2 = self.config['LL']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonLL',config['LL']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.LLLine)
+        
+        self.DDLine = StrippingLine(
+            name = 'ConvPhotonDD',
+            prescale = self.config['DD']['Prescale'],
+            HLT1 = self.config['DD']['Hlt1Filter'],
+            HLT2 = self.config['DD']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonDD',config['DD']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.DDLine)
+
+        # No Brem
+        self.LLNoBremLine = StrippingLine(
+            name = 'ConvPhotonLLNoBrem',
+            prescale = self.config['LLNoBrem']['Prescale'],
+            HLT1 = self.config['LLNoBrem']['Hlt1Filter'],
+            HLT2 = self.config['LLNoBrem']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonLLNoBrem',config['LLNoBrem']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.LLNoBremLine)
+
+        self.DDNoBremLine = StrippingLine(
+            name = 'ConvPhotonDDNoBrem',
+            prescale = self.config['DDNoBrem']['Prescale'],
+            HLT1 = self.config['DDNoBrem']['Hlt1Filter'],
+            HLT2 = self.config['DDNoBrem']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonDDNoBrem',config['DDNoBrem']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.DDNoBremLine)            
+
+        #========================
+        # Prescaled Low Pt lines
+        # Brem
+        self.LowPtLLLine = StrippingLine(
+            name = 'ConvPhotonLowPtLL',
+            prescale = self.config['LowPtLL']['Prescale'],
+            HLT1 = self.config['LowPtLL']['Hlt1Filter'],
+            HLT2 = self.config['LowPtLL']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonLowPtLL',config['LowPtLL']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.LowPtLLLine)
+        
+        self.LowPtDDLine = StrippingLine(
+            name = 'ConvPhotonLowPtDD',
+            prescale = self.config['LowPtDD']['Prescale'],
+            HLT1 = self.config['LowPtDD']['Hlt1Filter'],
+            HLT2 = self.config['LowPtDD']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonLowPtDD',config['LowPtDD']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.LowPtDDLine)
+
+        # No Brem
+        self.LowPtLLNoBremLine = StrippingLine(
+            name = 'ConvPhotonLowPtLLNoBrem',
+            prescale = self.config['LowPtLLNoBrem']['Prescale'],
+            HLT1 = self.config['LowPtLLNoBrem']['Hlt1Filter'],
+            HLT2 = self.config['LowPtLLNoBrem']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonLowPtLLNoBrem',config['LowPtLLNoBrem']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.LowPtLLNoBremLine)
+
+        self.LowPtDDNoBremLine = StrippingLine(
+            name = 'ConvPhotonLowPtDDNoBrem',
+            prescale = self.config['LowPtDDNoBrem']['Prescale'],
+            HLT1 = self.config['LowPtDDNoBrem']['Hlt1Filter'],
+            HLT2 = self.config['LowPtDDNoBrem']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonLowPtDDNoBrem',config['LowPtDDNoBrem']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.LowPtDDNoBremLine)            
+
+        #===============
+        # High-pt lines
+        # Brem
+        self.HighPtLLLine = StrippingLine(
+            name = 'ConvPhotonHighPtLL',
+            prescale = self.config['HighPtLL']['Prescale'],
+            HLT1 = self.config['HighPtLL']['Hlt1Filter'],
+            HLT2 = self.config['HighPtLL']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonHighPtLL',config['HighPtLL']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.HighPtLLLine)
+        
+        self.HighPtDDLine = StrippingLine(
+            name = 'ConvPhotonHighPtDD',
+            prescale = self.config['HighPtDD']['Prescale'],
+            HLT1 = self.config['HighPtDD']['Hlt1Filter'],
+            HLT2 = self.config['HighPtDD']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonHighPtDD',config['HighPtDD']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.HighPtDDLine)
+
+        # No Brem
+        self.HighPtLLNoBremLine = StrippingLine(
+            name = 'ConvPhotonHighPtLLNoBrem',
+            prescale = self.config['HighPtLLNoBrem']['Prescale'],
+            HLT1 = self.config['HighPtLLNoBrem']['Hlt1Filter'],
+            HLT2 = self.config['HighPtLLNoBrem']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonHighPtLLNoBrem',config['HighPtLLNoBrem']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.HighPtLLNoBremLine)
+
+        self.HighPtDDNoBremLine = StrippingLine(
+            name = 'ConvPhotonHighPtDDNoBrem',
+            prescale = self.config['HighPtDDNoBrem']['Prescale'],
+            HLT1 = self.config['HighPtDDNoBrem']['Hlt1Filter'],
+            HLT2 = self.config['HighPtDDNoBrem']['Hlt2Filter'],
+            selection = self.makeConvertedPhoton('SelConvPhotonHighPtDDNoBrem',config['HighPtDDNoBrem']),
+            ODIN = odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+            )
+        self.registerLine(self.HighPtDDNoBremLine)            
+
+    #==============================
+    # Make selections for each line
+    def makeConvertedPhoton(self, name, config):
+        alg = DiElectronMaker(name+'Maker')
+        alg.DecayDescriptor = 'gamma -> e+ e-'
+        selector = trackSelector(alg, trackTypes=[config['TrackType']])
+        alg.addTool(ProtoParticleCALOFilter, name='Electron')
+        alg.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'%s'"%config['MinPIDe']]
+        alg.DeltaY = 3.0
+        alg.DeltaYmax = 200.0*mm
+        alg.DiElectronMassMax = config['MaxMass']
+        alg.DiElectronPtMin = 200.0*MeV
+        alg.AddBrem = config['AddBrem']
+        
+        # Extra setup for DD pairs
+        if config['TrackType'] == 'Downstream':
+            alg.ParticleCombiners.update({"" : "LoKi::VertexFitter"})
+            alg.addTool(LoKi__VertexFitter)
+            alg.LoKi__VertexFitter.addTool(ParticleTransporter, name='Transporter')
+            alg.LoKi__VertexFitter.Transporter.TrackExtrapolator = "TrackRungeKuttaExtrapolator"
+            alg.LoKi__VertexFitter.DeltaDistance = 100*mm
+
+        code = ("(BPVVDZ > 0)"
+                " & (BPVIPCHI2() < %s)"
+                " & (BPVDIRA > 1 - %s*PT/P)"
+                " & (PT > %s)"
+                " & (PT < %s)"
+                %(config['MaxIPChi2'], config['MaxPointing'], config['MinPt'], config['MaxPt']))
+        print code
+        preSel = Selection('Pre'+name, Algorithm=alg)
+        sel = Selection(name,
+                        Algorithm=FilterDesktop(Code=code),
+                        RequiredSelections=[preSel])
+        
+        return sel
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonD02KPiPi0.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonD02KPiPi0.py
new file mode 100644
index 000000000..90e3ccf83
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonD02KPiPi0.py
@@ -0,0 +1,170 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Regis Lefevre'
+__date__ = '16/07/2014'
+__version__ = '$Revision: 1.6 $'
+
+'''
+Stripping selection for D0 -> K pi pi0 
+'''
+####################################################################
+# Stripping selection for D0 -> K pi pi0 
+#  2 lines : one for merged, one for resolved pi0
+####################################################################
+
+__all__ = ('StrippingHeavyIonD02KPiPi0Conf',
+           'makeD02KPiPi0R',
+           'makeD02KPiPi0M',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdTightPions,StdTightKaons,StdLooseMergedPi0,StdLooseResolvedPi0
+
+default_config = {
+    'NAME'        : 'HeavyIonD02KPiPi0',
+    'WGs'         : ['IFT'],
+    'BUILDERTYPE' : 'StrippingHeavyIonD02KPiPi0Conf',
+    'CONFIG'      : {   'TrackMinPT_M'         : 300       # MeV
+                       ,'TrackMinPT_R'         : 600       # MeV
+                       ,'TrackMinTrackProb'    : 0.000001  # unitless
+                       ,'TrackMaxGhostProb'    : 0.3       # unitless
+                       ,'TrackMinIPChi2'       : 16        # unitless
+                       ,'Pi0MinPT_M'           : 2000      # MeV
+                       ,'Pi0MinPT_R'           : 1000      # MeV
+                       ,'ResPi0MinGamCL'       : 0.2       # unitless
+                       ,'D0MinM'               : 1600      # MeV
+                       ,'D0MaxM'               : 2100      # MeV
+                       ,'D0MinVtxProb'         : 0.001     # unitless
+                       ,'D0MaxIPChi2'          : 9         # unitless
+                       ,'D0MinDIRA'            : 0.9999    # unitless
+                       ,'D0MinVVDChi2'         : 64        # unitless
+                       ,'MergedLinePrescale'   : 0.5       # unitless
+                       ,'MergedLinePostscale'  : 1.        # unitless
+                       ,'ResolvedLinePrescale' : 0.5       # unitless
+                       ,'ResolvedLinePostscale': 1.        # unitless
+                      },
+    #    'STREAMS'     : ['Calibration']
+    'STREAMS'     : ['IFT']
+    }
+
+class StrippingHeavyIonD02KPiPi0Conf(LineBuilder) :
+
+    __configuration_keys__ = (  'TrackMinPT_M'
+                               ,'TrackMinPT_R'
+                               ,'TrackMinTrackProb'
+                               ,'TrackMaxGhostProb'
+                               ,'TrackMinIPChi2'
+                               ,'Pi0MinPT_M'
+                               ,'Pi0MinPT_R'
+                               ,'ResPi0MinGamCL'
+                               ,'D0MinM'
+                               ,'D0MaxM'
+                               ,'D0MinVtxProb'
+                               ,'D0MaxIPChi2'
+                               ,'D0MinDIRA'
+                               ,'D0MinVVDChi2'
+                               ,'MergedLinePrescale'
+                               ,'MergedLinePostscale'
+                               ,'ResolvedLinePrescale'
+                               ,'ResolvedLinePostscale'
+                               )
+
+##############################################################
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        myPions       = StdTightPions
+        myKaons       = StdTightKaons
+        myMergedPi0   = StdLooseMergedPi0
+        myResolvedPi0 = StdLooseResolvedPi0
+
+        #---------------------------------------
+        # B -> HHPi0 selections
+        self.selresolved = makeD02KPiPi0R( name + 'R',
+                                           config,
+                                           DecayDescriptor = '[D0 -> K- pi+ pi0]cc',
+                                           inputSel = [myKaons, myPions, myResolvedPi0]
+                                           )
+        self.selmerged = makeD02KPiPi0M( name + 'M',
+                                         config,
+                                         DecayDescriptor = '[D0 -> K- pi+ pi0]cc',
+                                         inputSel = [myKaons, myPions, myMergedPi0]
+                                         )
+        #---------------------------------------
+        # Stripping lines
+        self.D02KPiPi0R_line = StrippingLine(name + "_R" %locals()['config'],
+                                             prescale = config['ResolvedLinePrescale'],
+                                             postscale = config['ResolvedLinePostscale'],
+                                             RequiredRawEvents = ["Calo"],
+                                             selection = self.selresolved
+                                             )
+        self.D02KPiPi0M_line = StrippingLine(name + "_M" %locals()['config'],
+                                             prescale = config['MergedLinePrescale'],
+                                             postscale = config['MergedLinePostscale'],
+                                             RequiredRawEvents = ["Calo"],
+                                             selection = self.selmerged
+                                             )
+        # register lines
+        self.registerLine(self.D02KPiPi0R_line)
+        self.registerLine(self.D02KPiPi0M_line)
+
+##############################################################
+def makeD02KPiPi0R( name,
+                  config,
+                  DecayDescriptor,
+                  inputSel
+                  ) :
+
+    _TrackCuts    = "(PT>%(TrackMinPT_R)s *MeV) & (TRPCHI2>%(TrackMinTrackProb)s) & (TRGHOSTPROB<%(TrackMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPChi2)s)" %locals()['config']    
+    _pi0Cuts      = "(PT>%(Pi0MinPT_R)s *MeV) & (CHILD(CL,1)>%(ResPi0MinGamCL)s) & (CHILD(CL,2)>%(ResPi0MinGamCL)s)" %locals()['config']
+    _daughterCuts = { 'K-' : _TrackCuts, 'pi+' : _TrackCuts, 'pi0' : _pi0Cuts }
+    _combCuts     = "(AM>%(D0MinM)s *MeV) & (AM<%(D0MaxM)s *MeV)" % locals()['config']
+    _motherCuts   = "(VFASPF(VPCHI2)>%(D0MinVtxProb)s) & (BPVVDCHI2>%(D0MinVVDChi2)s) & (BPVIPCHI2()<%(D0MaxIPChi2)s) & (BPVDIRA>%(D0MinDIRA)s)" % locals()['config']
+
+    _D = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _D,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
+def makeD02KPiPi0M( name,
+                  config,
+                  DecayDescriptor,
+                  inputSel
+                  ) :
+
+    _TrackCuts    = "(PT>%(TrackMinPT_M)s *MeV) & (TRPCHI2>%(TrackMinTrackProb)s) & (TRGHOSTPROB<%(TrackMaxGhostProb)s) & (MIPCHI2DV(PRIMARY)>%(TrackMinIPChi2)s)" %locals()['config']    
+    _pi0Cuts      = "(PT>%(Pi0MinPT_M)s *MeV)" %locals()['config']
+    _daughterCuts = { 'K-' : _TrackCuts, 'pi+' : _TrackCuts, 'pi0' : _pi0Cuts }
+    _combCuts     = "(AM>%(D0MinM)s *MeV) & (AM<%(D0MaxM)s *MeV)" % locals()['config']
+    _motherCuts   = "(VFASPF(VPCHI2)>%(D0MinVtxProb)s) & (BPVVDCHI2>%(D0MinVVDChi2)s) & (BPVIPCHI2()<%(D0MaxIPChi2)s) & (BPVDIRA>%(D0MinDIRA)s)" % locals()['config']
+
+    _D = CombineParticles( DecayDescriptor = DecayDescriptor,
+                           MotherCut = _motherCuts,
+                           CombinationCut = _combCuts,
+                           DaughtersCuts = _daughterCuts
+                           )
+
+    return Selection( name+'Sel',
+                      Algorithm = _D,
+                      RequiredSelections = inputSel
+                      )
+##############################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonDiMuon.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonDiMuon.py
new file mode 100644
index 000000000..5a2c81d20
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonDiMuon.py
@@ -0,0 +1,295 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting J/psi, Psi(2S), Upsilon, Drell-Yan
+Based on those by Jibo, developped by Yanxi ZHANG (version 1.0)
+'''
+
+__author__=['Emilie MAURICE']
+__date__ = ''
+__version__= '$Revision: 2.0 $'
+
+
+__all__ = (
+    'HeavyIonDiMuonConf',
+    'default_config'
+    )
+
+default_config =  {
+    'NAME'            : 'HeavyIonDiMuon',
+    'BUILDERTYPE'     : 'HeavyIonDiMuonConf',
+    'WGs'             : ['IFT'],
+    'STREAMS'         : ['IFT'],
+    'CONFIG'          : {
+        "odin": ["NoBeam","Beam1","Beam2","BeamCrossing"],
+        'CheckPV'    :  False,
+        "VCHI2VDOF_max"    : 25,
+        #       "Track_CHI2"       : 3,
+        "Track_CHI2"       : 5,
+        #        "DOCA_max"         : 0.5,
+        "DOCA_max"         : 2.,
+        #        "PTmu_min"         : 700,   # MeV
+        "PTmu_min"         : 500,   # MeV
+        "AM"               : 2900,   # MeV
+        "AM_4000MeV"       : 4000,   # MeV
+        "AM_8500MeV"       : 8500,   # MeV
+        "AMDY"             : 2500,   # MeV
+
+        'PrescaleHighMass'            :  1.0,
+        'PostscaleHighMass'           : 1.0, 
+        'PrescaleLowMass'            :  1.0,
+        'PostscaleLowMass'           : 1.0, 
+        'PrescaleSameSign'            :  1.0,
+        'PostscaleSameSign'           : 1.0, 
+        'PrescaleDY'            :  1.0,
+        'PostscaleDY'           : 1.0, 
+
+        'Hlt1FilterHighMass'          : None,
+        'Hlt2FilterHighMass'          : None,
+        'Hlt1FilterLowMass'           : None,     
+        'Hlt2FilterLowMass'           : None,
+        'Hlt1FilterSameSign'          : None, 
+        'Hlt2FilterSameSign'          : None,
+        'Hlt1FilterDY'           : None,
+        'Hlt2FilterDY1'          : None,
+        'Hlt2FilterDY2'          : None,
+        'Hlt2FilterDY3'          : None,
+        'Hlt2FilterDY4'          : None,
+        'Hlt2FilterDYSS'         : None
+        }
+    }
+
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+
+class HeavyIonDiMuonConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+        self.inMuons = StdAllLooseMuons
+
+        _monCuts = ( "(VFASPF(VCHI2/VDOF)<{0[VCHI2VDOF_max]})").format(self.config)
+
+        _dauCuts = {"mu+":("(PT>{0[PTmu_min]}) & (TRCHI2DOF<{0[Track_CHI2]})").format(self.config)}
+
+        _comCutsHighMass = ( 
+              "( AM > {0[AM]})"
+              "&( (AM < {0[AM_4000MeV]}) | (AM > {0[AM_8500MeV]}))"
+              "&(ACUTDOCA({0[DOCA_max]}, ''))"
+              ).format(self.config)
+        self.makeJpsi = self.makeDiMuon(
+              name = "Jpsi2MuMu",
+              daughterCuts = _dauCuts,
+              motherCuts = _monCuts,
+              combCuts = _comCutsHighMass
+              )
+
+        _comCutsHighMass_SameSign = ( 
+              "(ACUTDOCA({0[DOCA_max]}, ''))"
+              ).format(self.config)
+        self.makeDiMuonSameSign = self.makeDiMuonSameSign(
+              name = "DiMuMuSameSign",
+              daughterCuts = _dauCuts,
+              motherCuts = _monCuts,
+              combCuts = _comCutsHighMass
+              )
+
+        _comCutsLowMass = ( 
+              "(AM < {0[AM]})"
+              #              "&(PROBNNmu > {0[ProbNNmu_min]}, ''))"
+              ).format(self.config)
+        self.makeDiMuonLow = self.makeDiMuon(
+              name = "LowDiMuon",
+              daughterCuts = _dauCuts,
+              motherCuts = _monCuts,
+              combCuts = _comCutsLowMass
+              )
+
+
+        _comCutsDY = ( 
+            "(AM > {0[AMDY]})"
+            ).format(self.config)
+
+        self.makeDY = self.makeDYMuMu(
+            name = "DY",
+            daughterCuts = _dauCuts,
+            motherCuts = _monCuts,
+            combCuts = _comCutsDY
+            )
+
+        self.makeDYSS = self.makeDYMuMuSS(
+            name = "DYSS",
+            daughterCuts = _dauCuts,
+            motherCuts = _monCuts,
+            combCuts = _comCutsDY
+            )
+        
+        odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in self.config['odin'] if odin_type in ["NoBeam","Beam1","Beam2","BeamCrossing"]])
+
+        self.JpsiLine = StrippingLine( name+'Jpsi2MuMuLine',
+              prescale  = self.config['PrescaleHighMass'],
+              postscale  = self.config['PostscaleHighMass'],                                                                      
+              checkPV   = self.config['CheckPV'],
+              HLT1       =self.config['Hlt1FilterHighMass'],
+              HLT2       =self.config['Hlt2FilterHighMass'],
+              algos     = [ self.makeJpsi],
+              ODIN      = odin,
+              RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+              )
+        self.registerLine( self.JpsiLine )
+
+        self.SameSignDiMuonLine = StrippingLine( name+'SameSignDiMuonLine',
+              prescale  = self.config['PrescaleSameSign'],
+              postscale  = self.config['PostscaleSameSign'],                                                                      
+              checkPV   = self.config['CheckPV'],
+              HLT1       =self.config['Hlt1FilterSameSign'],
+              HLT2       =self.config['Hlt2FilterSameSign'],
+              algos     = [ self.makeDiMuonSameSign],
+              ODIN      = odin,
+              RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+              )
+        self.registerLine( self.SameSignDiMuonLine )
+
+        self.LowDiMuonLine = StrippingLine( name+'LowDiMuonLine',
+              prescale  = self.config['PrescaleLowMass'],
+              postscale  = self.config['PostscaleLowMass'],                                                                      
+              checkPV   = self.config['CheckPV'],
+              HLT1       =self.config['Hlt1FilterLowMass'],
+              HLT2       =self.config['Hlt2FilterLowMass'],
+              algos     = [ self.makeDiMuonLow],
+              ODIN      = odin,           
+              RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+              )
+        self.registerLine( self.LowDiMuonLine )
+
+        self.DY1Line = StrippingLine( name+'DY1Line',
+              prescale  = self.config['PrescaleDY'],
+              postscale  = self.config['PostscaleDY'],                                                                      
+              checkPV   = self.config['CheckPV'],
+              HLT1       =self.config['Hlt1FilterDY'],
+              HLT2       =self.config['Hlt2FilterDY1'],
+              algos     = [ self.makeDY],
+              ODIN      = odin,
+              RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+              )
+        self.registerLine( self.DY1Line )
+
+
+        self.DY2Line = StrippingLine( name+'DY2Line',
+              prescale  = self.config['PrescaleDY'],
+              postscale  = self.config['PostscaleDY'],                                                                      
+              checkPV   = self.config['CheckPV'],
+              HLT1       =self.config['Hlt1FilterDY'],
+              HLT2       =self.config['Hlt2FilterDY2'],
+              algos     = [ self.makeDY],
+              ODIN      = odin,
+              RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+              )
+        self.registerLine( self.DY2Line )
+
+
+        self.DY3Line = StrippingLine( name+'DY3Line',
+              prescale  = self.config['PrescaleDY'],
+              postscale  = self.config['PostscaleDY'],                                                                      
+              checkPV   = self.config['CheckPV'],
+              HLT1       =self.config['Hlt1FilterDY'],
+              HLT2       =self.config['Hlt2FilterDY3'],
+              algos     = [ self.makeDY],
+              ODIN      = odin,
+              RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+              )
+        self.registerLine( self.DY3Line )
+
+        self.DY4Line = StrippingLine( name+'DY4Line',
+              prescale  = self.config['PrescaleDY'],
+              postscale  = self.config['PostscaleDY'],                                                                      
+              checkPV   = self.config['CheckPV'],
+              HLT1       =self.config['Hlt1FilterDY'],
+              HLT2       =self.config['Hlt2FilterDY4'],
+              algos     = [ self.makeDY],
+              ODIN      = odin,
+              RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+              )
+        self.registerLine( self.DY4Line )
+
+
+        self.DYSSLine = StrippingLine( name+'DYSSLine',
+              prescale  = self.config['PrescaleDY'],
+              postscale  = self.config['PostscaleDY'],                                                                      
+              checkPV   = self.config['CheckPV'],
+              HLT1       =self.config['Hlt1FilterDY'],
+              HLT2       =self.config['Hlt2FilterDYSS'],
+              algos     = [ self.makeDYSS],
+              ODIN      = odin,
+              RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+              )
+        self.registerLine( self.DYSSLine )
+
+    def makeDiMuon( self,name, daughterCuts, motherCuts, combCuts) :
+        '''create a selection using a CombineParticles'''
+        diMuon = CombineParticles(
+              DecayDescriptors   = ["J/psi(1S) -> mu+ mu-"],
+              CombinationCut     = combCuts,
+              MotherCut          = motherCuts,
+              DaughtersCuts       = daughterCuts,
+              )
+        return Selection( name,
+                          Algorithm = diMuon,
+                          RequiredSelections = [ self.inMuons] )
+
+
+    def makeDiMuonSameSign( self,name, daughterCuts, motherCuts, combCuts) :
+        '''create a selection using a CombineParticles'''
+        diMuonSS = CombineParticles(
+            DecayDescriptors   = ["J/psi(1S) -> mu+ mu+"],
+            CombinationCut     = combCuts,
+            MotherCut          = motherCuts,
+            DaughtersCuts       = daughterCuts    
+        )
+        return Selection( name,
+                          Algorithm = diMuonSS,
+                          RequiredSelections = [ self.inMuons] )
+                          
+    
+    def makeDYMuMu( self,name, daughterCuts, motherCuts, combCuts) :
+        '''create a selection using a CombineParticles'''
+        DYmumu = CombineParticles(
+            DecayDescriptors   = ["Z0 -> mu+ mu-"],
+            CombinationCut     = combCuts,
+            MotherCut          = motherCuts,
+            DaughtersCuts       = daughterCuts,
+            )
+        return Selection( name,
+                          Algorithm = DYmumu,
+                          RequiredSelections = [ self.inMuons] )
+
+
+    def makeDYMuMuSS( self,name, daughterCuts, motherCuts, combCuts) :
+        '''create a selection using a CombineParticles'''
+        DYmumu = CombineParticles(
+            DecayDescriptors   = ["Z0 -> mu+ mu+"],
+            CombinationCut     = combCuts,
+            MotherCut          = motherCuts,
+            DaughtersCuts       = daughterCuts,
+            )
+        return Selection( name,
+                          Algorithm = DYmumu,
+                          RequiredSelections = [ self.inMuons] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonDst2D0KPiForPID.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonDst2D0KPiForPID.py
new file mode 100644
index 000000000..bc7f7ac0e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonDst2D0KPiForPID.py
@@ -0,0 +1,172 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingDst2D0KPiForPID.py,v 1.1 2010-09-03 22:38:21 pxing Exp $
+
+__author__  = ['Philip Xing', 'Andrew Powell']
+__date__    = '23rd August 2012'
+__version__ = '$Revision: 7.0 $'
+
+'''
+Configurable for the RICH calibration using D*+ -> pi+ D0( K- pi+).
+
+Usage:
+ >>> stream = ...
+ >>> from StrippingSelections.StrippingDst2D0KPiForPID import Dst2D0KPiForPIDConf as builder_dst
+ >>> from StrippingSelections.StrippingDst2D0KPiForPID import default_config as config_dst
+ >>> lb_dst = builder_dst(name='noPIDDstar', config=config_dst)
+ >>> stream.appendLines( lb_dst.lines() )
+
+'''
+
+__all__ =('HeavyIonDst2D0KPiForPIDConf','default_config',"D0","Dstar")
+
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+from GaudiKernel.SystemOfUnits import mm, cm , MeV, GeV
+## from Configurables import FilterDesktop, CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsKaons, StdAllNoPIDsPions
+
+
+default_config =  {
+    'NAME'       : 'HeavyIonNoPIDDstar',
+    'WGs'        : ['IFT'],
+    'BUILDERTYPE': 'HeavyIonDst2D0KPiForPIDConf',
+    'CONFIG'     :{
+    
+      'DaugPt'           : 250 * MeV      ## GeV
+    , 'DaugP'            : 2.0 * GeV      ## GeV
+    , 'DaugIPChi2'       : 9             ## unitless
+    , 'DaugTrkChi2'      : 3              ## unitless
+    , 'D0MassWin'        : 85 * MeV       ## MeV
+    , 'D0Pt'             : 0.0 * GeV      ## GeV
+    , 'D0VtxChi2Ndof'    : 10             ## unitless
+    , 'D0FDChi2'         : 25             ## unitless
+    , 'D0BPVDira'        : 0.9999         ## unitless
+    , 'D0IPChi2'         : 20             ## unit
+    , 'SlowPiPt'         : 100 * MeV      ## MeV
+    , 'SlowPiTrkChi2'    : 3              ## unitless
+    , 'DstarPt'          : 0. * GeV      ## GeV
+    , 'DstarVtxChi2Ndof' : 15             ## unitless
+    , 'DeltaM_Min'       : 130 * MeV      ## MeV
+    , 'DeltaM_Max'       : 155 * MeV      ## MeV
+    ##
+    , 'DCS_WrongMass'    : 25 * MeV       ## MeV (3 sigma veto)
+    , 'KK_WrongMass'     : 25 * MeV       ## MeV (3 sigma veto)
+    , 'PiPi_WrongMass'   : 25 * MeV       ## MeV (3 sigma veto)
+    ##
+    , 'Prescale'         : 1.00          ## unitless
+    , 'Postscale'        : 1.00           ## unitless
+    ,"odin": ["NoBeam","Beam1","Beam2","BeamCrossing"]
+    , 'Hlt1Filter'          : None  # "HLT_PASS_RE('Hlt1SMOGKPiDecision')"
+    ,'Hlt2Filter'          : None #"HLT_PASS_RE('Hlt2PIDD02KPiTagDecision')"   # no events in 1000, The 'name' is doubly checked correct, because rate too low?
+
+    ##
+      },
+    'STREAMS'     :['IFT']
+
+}
+class HeavyIonDst2D0KPiForPIDConf(LineBuilder) :
+    """
+    Definition of prompt D*+ -> D0( K- pi+) pi+ stripping lines.
+    The the main user method is Lines(), which returns a list of the
+    StrippingLine objects defined and configured by this configurable.
+    """
+    __configuration_keys__ =  default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in config['odin'] if odin_type in ["NoBeam","Beam1","Beam2","BeamCrossing"]])
+        self.selD02KPi = D0(name, config)
+
+        self.selDstar2D0Pi = Dstar(name, self.selD02KPi, config)
+
+        # 'StripDstarNoPIDsWithD02RSKPiLine'
+        self.Dstar2D0Pi_line = StrippingLine(name+'Line',
+             prescale = config['Prescale'],
+             postscale = config['Postscale'],
+             selection = self.selDstar2D0Pi,
+             RequiredRawEvents = ["Muon"],
+             HLT1       =config['Hlt1Filter'],
+             HLT2       =config['Hlt2Filter'],
+             ODIN      = odin
+             )  
+
+        self.registerLine(self.Dstar2D0Pi_line)
+
+
+def D0 ( name, config) :
+    """
+    Selection for D0
+    """
+    
+    _D0 = CombineParticles()
+    _D0.DecayDescriptor = "[D0 -> K- pi+]cc"
+    dauCutStr = "(PT > %(DaugPt)s) & (P > %(DaugP)s) & (TRCHI2DOF < %(DaugTrkChi2)s) & (MIPCHI2DV(PRIMARY) > %(DaugIPChi2)s)" %locals()['config']
+    _D0.DaughtersCuts = { "K+" : dauCutStr,
+                          "pi+" : dauCutStr
+                          }
+    _D0.CombinationCut = "(AMINDOCA('')<0.5)&(ADAMASS('D0')<85 * MeV)" %locals()['config']
+    mothercut = """
+    (PT>%(D0Pt)s)
+    & (VFASPF(VCHI2PDOF)<%(D0VtxChi2Ndof)s)
+    & (BPVVDCHI2>%(D0FDChi2)s)
+    & (BPVDIRA>%(D0BPVDira)s)
+    & (BPVIPCHI2()<%(D0IPChi2)s)
+    & (ADMASS('D0') < %(D0MassWin)s )
+    & ( ADWM( 'D0' , WM( 'pi-' , 'K+') ) > %(DCS_WrongMass)s)
+    """
+# take these out as they shape the sidebands
+   # & ( ADWM( 'D0' , WM( 'K-' , 'K+') ) > %(KK_WrongMass)s)
+   # & ( ADWM( 'D0' , WM( 'pi-' , 'pi+') ) > %(PiPi_WrongMass)s)
+   # """
+    _D0.MotherCut = mothercut %locals()['config']
+    
+    D0 = Selection("SelD02RSKPiFor"+name,
+                   Algorithm = _D0,
+                   RequiredSelections = [StdAllNoPIDsKaons,
+                                         StdAllNoPIDsPions])
+    return D0
+    
+def Dstar ( name, D0Sel, config) :
+    """
+    Selection for D*
+    """
+    
+    _DSt = CombineParticles()
+    _DSt.DecayDescriptor = "[D*(2010)+ -> D0 pi+]cc"
+    slowPiCuts = "(PT>%(SlowPiPt)s) & (TRCHI2DOF < %(SlowPiTrkChi2)s)" %locals()['config']
+    d0Cuts = "ALL"
+    _DSt.DaughtersCuts   = { 'pi+' : slowPiCuts, 'D0' : d0Cuts }
+    combcut = """
+    (APT>%(DstarPt)s)
+    & (ADAMASS('D*(2010)+')<75)
+    & (AM - AM1 < 165 * MeV) 
+    """
+    _DSt.CombinationCut = combcut %locals()['config']
+    mothercut = """
+    (VFASPF(VCHI2PDOF)<%(DstarVtxChi2Ndof)s)
+    & (M-MAXTREE('D0'==ABSID,M)<%(DeltaM_Max)s)
+    & (M-MAXTREE('D0'==ABSID,M)>%(DeltaM_Min)s)
+    """
+    _DSt.MotherCut =  mothercut %locals()['config']
+    
+    DSt = Selection("SelDSt2D0PiFor"+name,
+                    Algorithm = _DSt,
+                    RequiredSelections = [StdAllNoPIDsPions,
+                                          D0Sel])
+    
+    return DSt
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonGammaHadron.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonGammaHadron.py
new file mode 100644
index 000000000..58dcb2b4d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonGammaHadron.py
@@ -0,0 +1,160 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping selections or Gamma+Hadron physics.
+Based on those by Patrick K.
+'''
+
+
+__author__ = 'Cesar da Silva'
+__date__ = '30/04/2017'
+__version__ = '$Revision: 0 $'
+
+
+__all__ = (
+    'HeavyIonGammaHadronConf',
+    'default_config'
+    )
+
+default_config =  {
+    'NAME'            : 'HeavyIonGammaHadron',
+    'WGs'             : ['IFT'],
+    'STREAMS'         : ['IFT'],
+    'BUILDERTYPE'     : 'HeavyIonGammaHadronConf',
+    'CONFIG'          : {
+        "odin": ["NoBeam","Beam1","Beam2","BeamCrossing"],
+        'CheckPV'    :  True,
+        'MicroBiasPrescale'            :  1.0,
+        'MicroBiasPostscale'           :  1.0, 
+        "MicroBiasHlt1Filter"         : None, #"(HLT_PASS('Hlt1MBMicroBiasVeloDecision'))", #(HLT_PASS('Hlt1MB.*Decision')) #Hlt1MBMicroBiasVelo
+        "MicroBiasHlt2Filter"         : None, #"(HLT_PASS('Hlt2PassThroughDecision'))|(HLT_PASS('Hlt2SMOGPhysicsDecision'))",
+
+        'MicroBiasLowMultPrescale'            :  1.0,
+        'MicroBiasLowMultPostscale'           :  1.0, 
+        "MicroBiasLowMultHlt1Filter"         : None, #"(HLT_PASS('Hlt1MBMicroBiasLowMultVeloDecision'))", #(HLT_PASS('Hlt1MB.*Decision')) #Hlt1MBMicroBiasVelo
+        "MicroBiasLowMultHlt2Filter"         : None, #"(HLT_PASS('Hlt2PassThroughDecision'))",
+        'NoBiasPrescale'            :  1.0, #0.2,
+        'NoBiasPostscale'           :  1.0, 
+        "NoBiasHlt1Filter"         : None, #"(HLT_PASS('Hlt1MBNoBiasLeadingCrossingDecision'))", #(HLT_PASS('Hlt1MB.*Decision')) #Hlt1MBMicroBiasVelo
+        "NoBiasHlt2Filter"         : None, #"(HLT_PASS('Hlt2PassThroughDecision'))",
+        'gammaPT1'              : 1500    # MeV/c
+        ,'gammaPT2'             : 5000    # MeV/c
+        ,'gammaCL'             : 0.9     # adimensional
+        ,'gammaConvPT'         : 1500    # MeV/c
+        ,'gammaConvMDD'        : 60     # MeV/cc
+        ,'gammaConvIPCHI'      : 0     # adimensional
+        ,'NoConvHCAL2ECAL'     : 0.05   # adimensional
+        ,'LLProbNNe'           : 0.    # adimensional
+        ,'DDProbNNe'           : 0.    # adimensional
+        ,'ConvGhostLL'         : 0.3    # adimensional
+        ,'ConvGhostDD'         : 0.3    # adimensional
+        }
+    }
+
+from Gaudi.Configuration import *
+from StandardParticles           import StdLoosePhotons, StdAllLooseGammaLL, StdAllLooseGammaDD, StandardBasic
+from Configurables               import FilterDesktop, CombineParticles
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+class HeavyIonGammaHadronConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+        print "inside GammaHadron",config
+        odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in config['odin'] if odin_type in ["NoBeam","Beam1","Beam2","BeamCrossing"]])
+
+    ## Filter events with jets
+#        filterJets = " ( CONTAINS('Phys/StdJets/Particles') > 0 ) "
+
+        fltrCode_LL = "(MAXTREE(ISBASIC,TRGHOSTPROB)<%(ConvGhostLL)s) & (PT>(%(gammaConvPT)s-200.0)*MeV) & (MIPCHI2DV(PRIMARY)>%(gammaConvIPCHI)s) & (MAXTREE(ISBASIC,PPINFO( LHCb.ProtoParticle.ProbNNe,-1 ))>%(LLProbNNe)s) & INTREE('gamma'==ABSID)" % config
+        self._trkFilter_LL = FilterDesktop(name = "LLFilterFor"+name, Code = fltrCode_LL )
+        fltrCode_DD = "(MAXTREE(ISBASIC,TRGHOSTPROB)<%(ConvGhostDD)s) & (M<%(gammaConvMDD)s*MeV) & (PT>%(gammaConvPT)s*MeV) & (MIPCHI2DV(PRIMARY)>(2.0/3.0)*%(gammaConvIPCHI)s) & (MAXTREE(ISBASIC,PPINFO( LHCb.ProtoParticle.ProbNNe,-1 ))>%(DDProbNNe)s) & INTREE('gamma'==ABSID)" % config
+        self._trkFilter_DD = FilterDesktop(name = "DDFilterFor"+name, Code = fltrCode_DD )
+        fltrCode_nonConvLowPt = "(PT>%(gammaPT1)s*MeV) & (CL>%(gammaCL)s) & (MAXTREE(ISBASIC,PPINFO( LHCb.ProtoParticle.CaloNeutralHcal2Ecal,1000 ))<%(NoConvHCAL2ECAL)s)" % config
+        self._trkFilterNonConvLowPt = FilterDesktop(name = "NoConvLowPtGammaFilterFor"+name, Code = fltrCode_nonConvLowPt )
+
+        fltrCode_nonConv = "(PT>%(gammaPT2)s*MeV) & (CL>%(gammaCL)s) & (MAXTREE(ISBASIC,PPINFO( LHCb.ProtoParticle.CaloNeutralHcal2Ecal,1000 ))<%(NoConvHCAL2ECAL)s)" % config
+        self._trkFilterNonConv = FilterDesktop(name = "NoConvGammaFilterFor"+name, Code = fltrCode_nonConv )
+
+        self.convPhotons_LL = DataOnDemand(Location='Phys/StdAllLooseGammaLL/Particles')
+        self.convPhotons_DD = DataOnDemand(Location='Phys/StdAllLooseGammaDD/Particles')
+        stdPhotons     = DataOnDemand(Location='Phys/StdLoosePhotons/Particles')
+        #
+        # Clean up the converted photons to reduce the timing
+        self.convPhotons_LL_clean = Selection( 'PhotonConvFilterLL' + name, Algorithm = self._trkFilter_LL, RequiredSelections = [self.convPhotons_LL])
+        self.convPhotons_DD_clean = Selection( 'PhotonConvFilterDD' + name, Algorithm = self._trkFilter_DD, RequiredSelections = [self.convPhotons_DD])
+    # Clean up the non-converted photons to reduce the timing
+        self.stdLowPtPhotons_clean = Selection( 'LowPtPhotonFilter' + name, Algorithm = self._trkFilterNonConvLowPt, RequiredSelections = [stdPhotons])
+        self.stdPhotons_clean = Selection( 'PhotonFilter' + name, Algorithm = self._trkFilterNonConv, RequiredSelections = [stdPhotons])
+
+        self.NoConvLowPtGammaLine = StrippingLine( 
+            name = 'NoConvLowPtGamma',
+            prescale  = 0.025,
+            postscale  = self.config['MicroBiasPostscale'],
+            HLT1       =self.config['MicroBiasHlt1Filter'],
+            HLT2       =self.config['MicroBiasHlt2Filter'],
+#            FILTER     = filterJets,
+            checkPV   = self.config['CheckPV'],
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+            ODIN      = odin,
+            selection = self.stdLowPtPhotons_clean  
+            )
+        self.registerLine( self.NoConvLowPtGammaLine )
+
+        self.NoConvGammaLine = StrippingLine(
+            name = 'NoConvGamma',
+            prescale  = 1.0,
+            postscale  = self.config['MicroBiasPostscale'],
+            HLT1       =self.config['MicroBiasHlt1Filter'],
+            HLT2       =self.config['MicroBiasHlt2Filter'],
+ #           FILTER     = filterJets,
+            checkPV   = self.config['CheckPV'],
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+            ODIN      = odin,
+            selection = self.stdPhotons_clean
+            )
+        self.registerLine( self.NoConvGammaLine )
+
+
+        self.LLGammaLine = StrippingLine(
+            name = 'LLGamma',
+            prescale  = 0.1,
+            postscale  = self.config['MicroBiasPostscale'],
+            HLT1       =self.config['MicroBiasHlt1Filter'],
+            HLT2       =self.config['MicroBiasHlt2Filter'],
+#            FILTER     = filterJets,
+            checkPV   = self.config['CheckPV'],
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+            ODIN      = odin,
+            selection = self.convPhotons_LL_clean
+            )
+        self.registerLine( self.LLGammaLine )
+
+        self.DDGammaLine = StrippingLine(
+            name = 'DDGamma',
+            prescale  = 0.1,
+            postscale  = self.config['MicroBiasPostscale'],
+            HLT1       =self.config['MicroBiasHlt1Filter'],
+            HLT2       =self.config['MicroBiasHlt2Filter'],
+#            FILTER     = filterJets,
+            checkPV   = self.config['CheckPV'],
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+            ODIN      = odin,
+            selection =self.convPhotons_DD_clean
+            )
+        self.registerLine( self.DDGammaLine )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonMiniBias.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonMiniBias.py
new file mode 100644
index 000000000..4524a3c86
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonMiniBias.py
@@ -0,0 +1,133 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping selections or Minimum Bias physics.
+Based on those by Patrick K.
+'''
+
+__author__ = 'Yanxi ZHANG, Emilie MAURICE'
+__date__ = '06/09/2017'
+__version__ = '$Revision: 0 $'
+
+
+__all__ = (
+    'HeavyIonMiniBiasConf',
+    'default_config'
+    )
+
+default_config =  {
+    'NAME'            : 'HeavyIonMiniBias',
+    'WGs'             : ['IFT'],
+    'STREAMS'         : ['IFT'],
+    'BUILDERTYPE'     : 'HeavyIonMiniBiasConf',
+    'CONFIG'          : {
+        "odin": ["NoBeam","Beam1","Beam2","BeamCrossing"],
+        'CheckPV'    :  False,
+
+        'MicroBiasPrescale'            :  1.0,
+        'MBNoBiasPrescale'            :  1.0,
+        'MicroBiasPostscale'           :  1.0, 
+        'MBNoBiasPostscale'           :  1.0, 
+        'MicroBiasNoBackwardCutPostscale'           :  0.5, 
+
+        "MicroBiasHlt1Filter"         : "(HLT_PASS('Hlt1BEMicroBiasVeloDecision'))", 
+        "MicroBiasHlt2Filter"         : None,
+                                                                                                   
+        "GEC_LowMultBackwardCut"       : "( recSummaryTrack(LHCb.RecSummary.nVeloTracks, TrVELO) > 1) & ( recSummaryTrack(LHCb.RecSummary.nBackTracks, TrBACKWARD) < 10) ",
+        "GEC_LowMult"       : "( recSummaryTrack(LHCb.RecSummary.nVeloTracks, TrVELO) > 1)  ",
+
+        #Only PbAr trigger available for LowMult MicroBias
+        'MicroBiasLowMultPrescale'            :  0.01,
+        'MicroBiasLowMultPostscale'           :  1.0, 
+        "MicroBiasLowMultHlt1Filter"         : "(HLT_PASS('Hlt1BEMicroBiasLowMultVeloDecision'))", #(HLT_PASS('Hlt1MB.*Decision')) #Hlt1MBMicroBiasVelo
+        "MicroBiasLowMultHlt2Filter"         : None,
+
+        "MBNoBiasHlt1Filter"         : "(HLT_PASS('Hlt1BENoBiasDecision'))", #(HLT_PASS('Hlt1MB.*Decision')) #Hlt1MBMicroBiasVel
+        "MBNoBiasHlt2Filter"         : None
+
+        }
+    }
+
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+class HeavyIonMiniBiasConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+        print "inside MiniBias",config
+        #        odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in config['odin'] if odin_type in ["NoBeam","Beam1","Beam2","BeamCrossing"]])      
+        odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in config['odin'] if odin_type in ["NoBeam","Beam1","Beam2"]])      
+        _filter1 = {'Code': config['GEC_LowMultBackwardCut'], 'Preambulo' : ["from LoKiTracks.decorators import *" ,
+                                                                                        "from LoKiCore.functions    import * ",
+                                                                                        "from GaudiKernel.SystemOfUnits import *"]}
+
+        _filter2 = {'Code': config['GEC_LowMult'], 'Preambulo' : ["from LoKiTracks.decorators import *" ,
+                                                                                        "from LoKiCore.functions    import * ",
+                                                                                        "from GaudiKernel.SystemOfUnits import *"]}
+        
+        self.MicroBiasLine = StrippingLine( 
+            name = 'MBBackwardCutMicroBias',
+            prescale  = self.config['MicroBiasPrescale'],
+            postscale  = self.config['MicroBiasPostscale'],                 
+            FILTER = _filter1,
+            HLT1       =self.config['MicroBiasHlt1Filter'],
+            HLT2       =self.config['MicroBiasHlt2Filter'],
+            checkPV   = self.config['CheckPV'],
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+            ODIN      = odin
+            )
+        self.registerLine( self.MicroBiasLine )
+
+        self.MicroBiasLine = StrippingLine( 
+            name = 'MBMicroBias',
+            prescale  = self.config['MicroBiasPrescale'],
+            postscale  = self.config['MicroBiasNoBackwardCutPostscale'],                 
+            FILTER = _filter2,
+            HLT1       =self.config['MicroBiasHlt1Filter'],
+            HLT2       =self.config['MicroBiasHlt2Filter'],
+            checkPV   = self.config['CheckPV'],
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+            ODIN      = odin
+            )
+        self.registerLine( self.MicroBiasLine )
+        
+
+        self.MicroBiasLowMultLine = StrippingLine( 
+            name = 'MicroBiasLowMult',
+            prescale  = self.config['MicroBiasLowMultPrescale'],
+            postscale  = self.config['MicroBiasLowMultPostscale'],                             
+            HLT1       =self.config['MicroBiasLowMultHlt1Filter'],
+            HLT2       =self.config['MicroBiasLowMultHlt2Filter'],
+            checkPV   = self.config['CheckPV'],
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+            ODIN      = odin
+            )
+        self.registerLine( self.MicroBiasLowMultLine )
+        
+        self.NoMicroBiasLine = StrippingLine( 
+            name = 'MBNoBias',
+            prescale  = self.config['MBNoBiasPrescale'],
+            postscale  = self.config['MBNoBiasPostscale'],                 
+            HLT1       =self.config['MBNoBiasHlt1Filter'],
+            HLT2       =self.config['MBNoBiasHlt2Filter'],
+            checkPV   = self.config['CheckPV'],
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+            ODIN      = odin
+            )
+        self.registerLine( self.NoMicroBiasLine )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonOpenCharm.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonOpenCharm.py
new file mode 100644
index 000000000..4d64062ec
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonOpenCharm.py
@@ -0,0 +1,599 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping lines for selection of
+    [D0 -> K- pi+]cc
+    [D*(2010)+ -> (D0 -> K- pi+) pi+]cc
+
+    [D+ -> K- pi+ pi+]cc
+    [D+ -> K- K+ pi+]cc
+    [D_s+ -> pi+ (phi(1020) -> K- K+)]cc
+    [Lambda_c+ -> p+ K- pi+]cc
+for open charm cross section measurement.
+!!! based on those implemented by [Alex Pearce]
+Done by Yanxi Zhang
+Added : D0 -> pi pi, D0 -> K K, Lc -> pKK
+"""
+
+__author__ = ['Emilie MAURICE, Yanxi ZHANG']
+
+__all__ = (
+    'default_config',
+    'HeavyIonOpenCharmConf'
+)
+
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mrad, mm
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+#from Configurables import CombineParticles, FilterDesktop
+from StandardParticles import (
+    StdAllNoPIDsKaons,
+    StdAllNoPIDsPions,
+    StdAllNoPIDsProtons,
+)
+from PhysSelPython.Wrappers import Selection
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME': 'HeavyIonOpenCharm',
+    'WGs': ['IFT'],
+    'BUILDERTYPE': 'HeavyIonOpenCharmConf',
+    'STREAMS': ['IFT'],
+    'CONFIG': {
+        "odin": ["NoBeam","Beam1","Beam2","BeamCrossing"], 
+        'Track_CHI2'         : 5,         # Minimum track chi2
+        #
+        #####################
+        ###  D0 -> K- pi+   #
+        #####################
+        'D0_Daug_All_PT_MIN'         : 250.0*MeV,         # Minimum transverse momentum all D0 daughters must satisfy before fit
+        'D0_Daug_AllA_PT_MIN'         : 500.0*MeV,         # Minimum transverse momentum at least one D0 daughters must satisfy after fit
+        'D0_Daug_P_MIN'              : 3.0*GeV,           # Minimum D0 daughter momentum
+        'D0_Daug_P_MAX'              : 1.E6*GeV,          # Maximum D0 daughter momentum,       'do it offline"
+        'D0_Daug_ETA_MIN'            : 0.0,               # Minimum D0 daughter pseudorapidity, 'do it offline'
+        'D0_Daug_ETA_MAX'            : 10.0,              # Maximum D0 daughter pseudorapidity, 'do it offline'
+        'D0_K_PIDK_MIN'              : 5.0,               # Minimum Dpm daughter kaon DLLK       'in trigger of pAr hlt2'
+        'D0_Pi_PIDK_MAX'             : 5.0,              # Maximum Dpm daughter pion DLLK,       'in trigger of pAr hlt2'
+        'D0_Comb_ADOCAMAX_MAX'       : 0.5,               # DOCA
+        'D0_Daug_All_BPVIPCHI2_MIN'  : 4.0,               # Minimum best primary vertex IP chi^2 all D0 daughters must satisfy
+        'D0_VCHI2VDOF_MAX'           : 10.0,              # Maximum Dpm vertex chi^2 per vertex fit DoF 
+        'D0_acosBPVDIRA_MAX'         : 35.0*mrad,         # Maximum angle between D0 momentum and D0 direction of flight, '10 at HLT2 of pAr'
+
+        'D0_ADAMASS_WIN'             : 150.0*MeV,         # D0 mass window around the nominal D0 mass before the vertex fit, '90 MeV at HLT2 of pAr'
+
+        'D0_Prescale':  1.0,
+        'D0_Postscale': 1.0, 
+
+        'D0_Hlt1Filter': None, #"HLT_PASS_RE('Hlt1SMOG.*Decision')",   #Hlt1SMOGD0KPiDecision ?
+        'D0_Hlt2Filter': None, #"HLT_PASS_RE('Hlt2SMOGD02KPiDecision')",
+
+
+        ##################################
+        ###  D*+ -> (D0 -> K- pi+) pi+   #
+        ##################################
+        'Dst_AMDiff_MAX'        : 200.0*MeV,         # Maximum delta mass value m(D*{0,+}) - m(D0)
+        'Dst_VCHI2VDOF_MAX'     : 10.0,              # Maximum D*+ vertex chi^2 per vertex DoF (_not_ applied to D*0)
+
+        'Dst_Prescale'     : 1.0, 
+        'Dst_Postscale'    : 1.0,
+
+        'Dst_Hlt1Filter': None, #"HLT_PASS_RE('Hlt1SMOG.*Decision')",   #Hlt1SMOGD0KPiDecision ?
+        'Dst_Hlt2Filter': None, #"HLT_PASS_RE('Hlt2SMOGD02KPiDecision')",
+
+
+        ########################################
+        ### D+ -> K- pi+ pi+, Ds+ -> K- K+ pi+, Lambda_c+ -> p+ K- pi+ #
+        ########################################
+        'D_Daug_All_PT_MIN'             : 200.0*MeV,         # Minimum transverse momentum all D daughters must satisfy
+        'D_Daug_2of3_PT_MIN'            : 400.0*MeV, # Minimum transverse momentum at least 2 D daughters must satisfy
+        'D_Daug_1of3_PT_MIN'            : 1000.0*MeV, # Minimum transverse momentum at least 1 D daughter must satisfy
+        'D_Daug_All_BPVIPCHI2_MIN'      : 2.0,               # Minimum best primary vertex IP chi^2 all D daughters must satisfy
+        'D_Daug_2of3_BPVIPCHI2_MIN'     : 4.0, # Minimum best PV IP chi^2 at least 2 D daughters must satisfy
+        'D_Daug_1of3_BPVIPCHI2_MIN'     : 9.0, # Minimum best PV IP chi^2 at least 1 D daughter must satisfy
+        'D_Daug_P_MIN'                  : 3.0*GeV,           # Minimum D daughter momentum
+        'D_Daug_P_MAX'                  : 1.E6*GeV,          # Maximum D daughter momentum,       'do it offline"
+        'D_Daug_ETA_MIN'                : 0.0,               # Minimum D daughter pseudorapidity, 'do it offline'
+        'D_Daug_ETA_MAX'                : 10.0,              # Maximum D daughter pseudorapidity, 'do it offline'
+        'D_K_PIDK_MIN'                  : 5.0,               # Minimum D daughter kaon DLLK       'in trigger of pAr hlt2'
+        'D_Pi_PIDK_MAX'                 : 5.0,              # Maximum D daughter pion DLLK,       'in trigger of pAr hlt2'
+        'D_P_PIDp_MIN'                  : 5.0,              # Maximum D (Lc) daughter proton DLLp,       'in trigger of pAr hlt2'
+        'D_P_PIDpPIDK_MIN'              : 5.0,              # Maximum D (Lc) daughter proton DLLp-DLLK,       'in trigger of pAr hlt2'
+        'D_Comb_ADOCAMAX_MAX'           : 2.0,         # Maximum distance of closest approach of D daughters
+        'D_VCHI2VDOF_MAX'               : 25.0,              # Maximum Dpm vertex chi^2 per vertex fit DoF
+        'D_acosBPVDIRA_MAX'             : 35.0*mrad,         # Maximum angle between Dpm momentum and Dpm direction of flight
+
+        'Dp_ADAMASS_WIN'          : 300.0*MeV,         # D+ mass window around the nominal D+ mass before the vertex fit, '90 MeV at HLT2 of pAr'
+
+        'Dp_Prescale': 1.0,
+        'Dp_Postscale': 1.0, 
+
+        'Dp_Hlt1Filter': None, #"HLT_PASS_RE('Hlt1SMOG.*Decision')",   #Hlt1SMOGDpmKKPiDecision ?
+        'Dp_Hlt2Filter': None, #"HLT_PASS_RE('Hlt2SMOGDpm2KPiPiDecision')",
+       
+
+        'Ds_ADAMASS_WIN'          : 300.0*MeV,         # Ds+ mass window around the nominal Ds+ mass before the vertex fit, '90 MeV at HLT2 of pAr'
+
+        'Ds_Prescale': 1.0,
+        'Ds_Postscale': 1.0, 
+
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Ds_Hlt1Filter': None, #"HLT_PASS_RE('Hlt1SMOG.*Decision')",   #Hlt1SMOGDpmKPiDecision ?
+        'Ds_Hlt2Filter': None, #"HLT_PASS_RE('Hlt2SMOGDs2KKPiDecision')",
+
+        'Lc_ADAMASS_WIN'          : 500.0*MeV,         # Lc+ mass window around the nominal Lc+ mass before the vertex fit, '90 MeV at HLT2 of pAr'
+
+        'Lc_Prescale': 1.0,
+        'Lc_Postscale': 1.0, 
+
+        # HLT filters, only process events firing triggers matching the RegEx
+        'Lc_Hlt1Filter': None, #"HLT_PASS_RE('Hlt1SMOG.*Decision')",   #Hlt1SMOGDpmKPiDecision ?
+        'Lc_Hlt2Filter': None #"HLT_PASS_RE('Hlt2SMOGLc2KPPiDecision')",
+        
+
+    }
+}
+
+
+class HeavyIonOpenCharmConf(LineBuilder):
+    """Creates LineBuilder object containing the stripping lines."""
+    # Allowed configuration keys
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Decay descriptors
+    decays = {
+          "D0kpi"      :["[D0 -> K- pi+]cc"],
+          "Dst"        :["[D*(2010)+ -> D0 pi+]cc"],
+          "Dp"         :["[D+ -> K- pi+ pi+]cc"],
+          "Ds"         :["[D_s+ -> K+ K- pi+]cc"],
+          "LcpKpi"     :["[Lambda_c+ -> p+ K- pi+]cc"],
+          "D0kk"       :["[D0 -> K- K+]cc"],
+          "D0pipi"     :["[D0 -> pi- pi+]cc"],
+          "LcpKK"      :["[Lambda_c+ -> p+ K- K+]cc"],
+          }
+
+    def __init__(self, name, config):
+        """Initialise this LineBuilder instance."""
+        self.name = name
+        self.config = config
+        LineBuilder.__init__(self, name, config)
+
+
+        # P: p+/p-
+        # K: K+/K-
+        # H: pi+/pi-, (hadron)
+        D02kpi_name = '{0}D02kpi'.format(name)
+        Dst2D0Pi_name = '{0}Dst2D0Pi'.format(name)
+        Dp2KHH_name = '{0}Dp2KHH'.format(name)
+        Ds2KKH_name = '{0}Ds2KKH'.format(name)
+        Lc2PKpi_name = '{0}Lc2PKpi'.format(name)
+        D02kk_name = '{0}D02kk'.format(name)
+        D02pipi_name = '{0}D02pipi'.format(name)
+        Lc2PKK_name = '{0}Lc2PKK'.format(name)
+
+        self.inPions = StdAllNoPIDsPions
+        self.inKaons = StdAllNoPIDsKaons
+        self.inProtons = StdAllNoPIDsProtons
+
+        self.selD02kpi = self.makeD02kpi(
+            D02kpi_name,
+            inputSel=[self.inKaons, self.inPions],
+            decDescriptors=self.decays["D0kpi"]
+        )
+
+        self.selD02kk = self.makeD02kk(
+            D02kk_name,
+            inputSel=[self.inKaons],
+            decDescriptors=self.decays["D0kk"]
+        )
+
+        self.selD02pipi = self.makeD02pipi(
+            D02pipi_name,
+            inputSel=[self.inPions],
+            decDescriptors=self.decays["D0pipi"]
+        )
+
+        self.selDst2D0Pi = self.makeDst2D0Pi(
+            name            = Dst2D0Pi_name,
+            inputSel        =[self.selD02kpi, self.inPions],
+            decDescriptors  =self.decays["Dst"]
+        )
+
+        self.selDp2KHH = self.makeThreeProng(
+            name            = Dp2KHH_name,
+            inputSel        =[self.inKaons, self.inPions],
+            decDescriptors  =self.decays["Dp"],
+            particle        = "D+"
+        )
+        self.selDs2KKH = self.makeThreeProng(
+            name            =Ds2KKH_name,
+            inputSel        =[self.inKaons, self.inPions],
+            decDescriptors  =self.decays["Ds"],
+            particle        = "D_s+"
+        )
+        self.selLc2PKpi = self.makeThreeProng(
+            name            =Lc2PKpi_name,
+            inputSel        =[self.inKaons, self.inPions, self.inProtons],
+            decDescriptors  =self.decays["LcpKpi"],
+            particle        = "Lambda_c+"
+        )
+        self.selLc2PKK = self.makeThreeProng(
+            name            =Lc2PKK_name,
+            inputSel        =[self.inKaons, self.inProtons],
+            decDescriptors  =self.decays["LcpKK"],
+            particle        = "Lambda_c+"
+        )
+
+
+
+        #odin = []
+        #for odin_type in config['odin']:
+        #    if odin_type not in ["NoBeam","Beam1","Beam2","BeamCrossing"]:
+        #        continue
+        #    odin.append( "(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) )
+        #odin = "|".join(odin)
+        odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in self.config['odin'] if odin_type in ["NoBeam","Beam1","Beam2","BeamCrossing"]])
+        #"( ODIN_BXTYP == LHCb.ODIN.Beam1) | (ODIN_BXTYP == LHCb.ODIN.Beam2) | (ODIN_BXTYP == LHCb.ODIN.BeamCrossing) | (ODIN_BXTYP == LHCb.ODIN.NoBeam)",        ##[ 'NoBeam', 'BeamCrossing','Beam1','Beam2']
+
+        self.line_D02kpi = self.make_line(
+            name='{0}Line'.format(D02kpi_name),
+            prescale  =self.config['D0_Prescale'],
+            postscale =self.config['D0_Postscale'],
+            selection =self.selD02kpi,
+            HLT1      =self.config['D0_Hlt1Filter'],
+            HLT2      =self.config['D0_Hlt2Filter'],
+            ODIN      =odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+        )
+
+        self.line_D02pipi = self.make_line(
+            name='{0}Line'.format(D02pipi_name),
+            prescale  =self.config['D0_Prescale'],
+            postscale =self.config['D0_Postscale'],
+            selection =self.selD02pipi,
+            HLT1      =self.config['D0_Hlt1Filter'],
+            HLT2      =self.config['D0_Hlt2Filter'],
+            ODIN      =odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+        )
+
+        self.line_D02kk = self.make_line(
+            name='{0}Line'.format(D02kk_name),
+            prescale  =self.config['D0_Prescale'],
+            postscale =self.config['D0_Postscale'],
+            selection =self.selD02kk,
+            HLT1      =self.config['D0_Hlt1Filter'],
+            HLT2      =self.config['D0_Hlt2Filter'],
+            ODIN      =odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+        )
+
+
+        self.line_Dst2D0Pi= self.make_line(
+            name='{0}Line'.format(Dst2D0Pi_name),
+            prescale   =self.config['Dst_Prescale'],
+            postscale  =self.config['Dst_Postscale'],
+            selection  =self.selDst2D0Pi,
+            HLT1       =self.config['Dst_Hlt1Filter'],
+            HLT2       =self.config['Dst_Hlt2Filter'],
+            ODIN       =odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+        )
+
+        self.line_Dp2KHH = self.make_line(
+            name='{0}Line'.format(Dp2KHH_name),
+            prescale   =self.config['Dp_Prescale'],
+            postscale  =self.config['Dp_Postscale'],
+            selection  =self.selDp2KHH,
+            HLT1       =self.config['Dp_Hlt1Filter'],
+            HLT2       =self.config['Dp_Hlt2Filter'],
+            ODIN       =odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+        )
+
+        self.line_Ds2KKH = self.make_line(
+            name='{0}Line'.format(Ds2KKH_name),
+            prescale   =self.config['Ds_Prescale'],
+            postscale  =self.config['Ds_Postscale'],
+            selection  =self.selDs2KKH,
+            HLT1       =self.config['Ds_Hlt1Filter'],
+            HLT2       =self.config['Ds_Hlt2Filter'],
+            ODIN       =odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+        )
+
+        self.line_Lc2PKpi = self.make_line(
+            name='{0}Line'.format(Lc2PKpi_name),
+            prescale   =self.config['Lc_Prescale'],
+            postscale  =self.config['Lc_Postscale'],
+            selection  =self.selLc2PKpi,
+            HLT1       =self.config['Lc_Hlt1Filter'],
+            HLT2       =self.config['Lc_Hlt2Filter'],
+            ODIN       =odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+        )
+
+
+        self.line_Lc2PKK = self.make_line(
+            name='{0}Line'.format(Lc2PKK_name),
+            prescale   =self.config['Lc_Prescale'],
+            postscale  =self.config['Lc_Postscale'],
+            selection  =self.selLc2PKK,
+            HLT1       =self.config['Lc_Hlt1Filter'],
+            HLT2       =self.config['Lc_Hlt2Filter'],
+            ODIN       =odin,
+            RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+        )
+
+
+    def make_line(self, name, selection, prescale, postscale, **kwargs):
+        """Create the stripping line defined by the selection.
+
+        Keyword arguments:
+        name -- Base name for the Line
+        selection -- Selection instance
+        prescale -- Fraction of candidates to randomly drop before stripping
+        postscale -- Fraction of candidates to randomly drop after stripping
+        **kwargs -- Keyword arguments passed to StrippingLine constructor
+        """
+        # Only create the line with positive pre- and postscales
+        # You can disable each line by setting either to a negative value
+        if prescale > 0 and postscale > 0:
+            line = StrippingLine(
+                name,
+                selection=selection,
+                prescale=prescale,
+                postscale=postscale,
+                **kwargs
+            )
+            self.registerLine(line)
+            return line
+        else:
+            return False
+
+    def makeD02kpi(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D0 -> h- h+ decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        daugCuts = (
+            '(PT > {0[D0_Daug_All_PT_MIN]})'
+            '&(TRCHI2DOF<{0[Track_CHI2]})'
+            '& (BPVIPCHI2() > {0[D0_Daug_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+
+        pidFiducialCuts = (
+            '(in_range({0[D0_Daug_P_MIN]}, P, {0[D0_Daug_P_MAX]}))'
+            '& (in_range({0[D0_Daug_ETA_MIN]}, ETA, {0[D0_Daug_ETA_MAX]}))'
+        ).format(self.config)
+
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi > {0[D0_K_PIDK_MIN]})'
+        ).format(self.config)
+
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi < {0[D0_Pi_PIDK_MAX]})'
+        ).format(self.config)
+
+        combCuts = "(ADAMASS('D0') < {0[D0_ADAMASS_WIN]}) & (AMINDOCA('')<{0[D0_Comb_ADOCAMAX_MAX]}) & (((APT1 > {0[D0_Daug_AllA_PT_MIN]}))|((APT2 > {0[D0_Daug_AllA_PT_MIN]})))".format(self.config)
+
+        d0Cuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[D0_VCHI2VDOF_MAX]})'
+        ).format(self.config)
+
+        print decDescriptors
+
+        _D0 = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            DaughtersCuts={
+                'pi+': '{0} & {1}'.format(daugCuts, pionPIDCuts),
+                'K+': '{0} & {1}'.format(daugCuts, kaonPIDCuts)
+                },
+            CombinationCut=combCuts,
+            MotherCut=d0Cuts
+            )
+
+        return Selection(name, Algorithm=_D0, RequiredSelections=inputSel)
+
+
+    def makeD02kk(self, name, inputSel, decDescriptors):
+        lclPreambulo = ['from math import cos' ]
+        daugCuts = ('(PT > {0[D0_Daug_All_PT_MIN]})'
+                    '&(TRCHI2DOF<{0[Track_CHI2]})'
+                    '& (BPVIPCHI2() > {0[D0_Daug_All_BPVIPCHI2_MIN]})'
+                    ).format(self.config)
+        pidFiducialCuts = (
+            '(in_range({0[D0_Daug_P_MIN]}, P, {0[D0_Daug_P_MAX]}))'
+            '& (in_range({0[D0_Daug_ETA_MIN]}, ETA, {0[D0_Daug_ETA_MAX]}))'
+            ).format(self.config)
+
+        kaonPIDCuts = (pidFiducialCuts +
+                       '& (PIDK-PIDpi > {0[D0_K_PIDK_MIN]})'
+                       ).format(self.config)
+        
+        combCuts = "(ADAMASS('D0') < {0[D0_ADAMASS_WIN]}) & (AMINDOCA('')<{0[D0_Comb_ADOCAMAX_MAX]}) & (((APT1 > {0[D0_Daug_AllA_PT_MIN]}))|((APT2 > {0[D0_Daug_AllA_PT_MIN]})))".format(self.config)
+
+        d0Cuts = ( '(VFASPF(VCHI2/VDOF) < {0[D0_VCHI2VDOF_MAX]})'
+                   ).format(self.config)
+        
+        _D0 = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            DaughtersCuts={
+                'K+': '{0} & {1}'.format(daugCuts, kaonPIDCuts)
+                },
+            CombinationCut=combCuts,
+            MotherCut=d0Cuts
+            )
+
+        return Selection(name, Algorithm=_D0, RequiredSelections=inputSel)
+
+
+    def makeD02pipi(self, name, inputSel, decDescriptors):
+        lclPreambulo = ['from math import cos' ]
+        daugCuts = ('(PT > {0[D0_Daug_All_PT_MIN]})'
+                    '&(TRCHI2DOF<{0[Track_CHI2]})'
+                    '& (BPVIPCHI2() > {0[D0_Daug_All_BPVIPCHI2_MIN]})'
+                    ).format(self.config)
+        pidFiducialCuts = (
+            '(in_range({0[D0_Daug_P_MIN]}, P, {0[D0_Daug_P_MAX]}))'
+            '& (in_range({0[D0_Daug_ETA_MIN]}, ETA, {0[D0_Daug_ETA_MAX]}))'
+            ).format(self.config)
+
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi < {0[D0_Pi_PIDK_MAX]})'
+        ).format(self.config)
+        
+        combCuts = "(ADAMASS('D0') < {0[D0_ADAMASS_WIN]}) & (AMINDOCA('')<{0[D0_Comb_ADOCAMAX_MAX]}) & (((APT1 > {0[D0_Daug_AllA_PT_MIN]}))|((APT2 > {0[D0_Daug_AllA_PT_MIN]})))".format(self.config)
+
+        d0Cuts = ( '(VFASPF(VCHI2/VDOF) < {0[D0_VCHI2VDOF_MAX]})'
+                   ).format(self.config)
+        
+        _D0 = CombineParticles(
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            DaughtersCuts={
+                'pi+': '{0} & {1}'.format(daugCuts, pionPIDCuts),
+                },
+            CombinationCut=combCuts,
+            MotherCut=d0Cuts
+            )
+        
+        return Selection(name, Algorithm=_D0, RequiredSelections=inputSel)
+    
+
+    def makeDst2D0Pi(self, name, inputSel, decDescriptors):
+        """Return a Selection instance for a D*+ -> D0 pi+ decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        combCuts = '((AM - AM1) < {0[Dst_AMDiff_MAX]})'.format(self.config)
+
+        daugCuts = ( '(TRCHI2DOF<{0[Track_CHI2]})').format(self.config)
+        dstarCuts = '(VFASPF(VCHI2/VDOF) < {0[Dst_VCHI2VDOF_MAX]})'.format( self.config)
+
+        _Dst = CombineParticles(
+            #name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            CombinationCut=combCuts,
+            MotherCut=dstarCuts,
+            DaughtersCuts={ 'pi+': daugCuts }
+        )
+
+        return Selection(name, Algorithm=_Dst, RequiredSelections=inputSel)
+    
+    def makeThreeProng(self, name, inputSel, decDescriptors,particle):
+        """Return a Selection instance for a D+/Ds+/Lc+ -> h+ h+ h- decay.
+
+        Keyword arguments:
+        name -- Name to give the Selection instance
+        inputSel -- List of inputs passed to Selection.RequiredSelections
+        decDescriptors -- List of decay descriptors for CombineParticles
+        """
+        #from the string to guess the particle nick name
+        _part = {
+              "D+":"Dp",
+              "D-":"Dp",
+              "D_s+":"Ds",
+              "D_s-":"Ds",
+              "Lambda_c+":"Lc",
+              "Lambda_c~-":"Lc",
+              }
+        nickname =  _part[particle]
+        #if particle not in _part.keys:
+        #   print "particle name required!!"
+
+        lclPreambulo = [
+            'from math import cos'
+        ]
+
+        daugCuts = (
+            '(PT > {0[D_Daug_All_PT_MIN]})'
+            '&(TRCHI2DOF<{0[Track_CHI2]})'
+            '& (BPVIPCHI2() > {0[D_Daug_All_BPVIPCHI2_MIN]})'
+        ).format(self.config)
+        pidFiducialCuts = (
+            '(in_range({0[D_Daug_P_MIN]}, P, {0[D_Daug_P_MAX]}))'
+            '& (in_range({0[D_Daug_ETA_MIN]}, ETA, {0[D_Daug_ETA_MAX]}))'
+        ).format(self.config)
+        pionPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi < {0[D_Pi_PIDK_MAX]})'
+        ).format(self.config)
+        kaonPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDK-PIDpi > {0[D_K_PIDK_MIN]})'
+        ).format(self.config)
+        protonPIDCuts = (
+            pidFiducialCuts +
+            '& (PIDp-PIDpi > {0[D_P_PIDp_MIN]})'
+            '& (PIDp-PIDK > {0[D_P_PIDpPIDK_MIN]})'
+        ).format(self.config)
+
+        _dauCuts = {
+              "Dp":{
+                 "pi+": '{0} & {1}'.format(daugCuts, pionPIDCuts),
+                 "K+" : '{0} & {1}'.format(daugCuts, kaonPIDCuts)
+              },
+              "Ds":{
+                 "pi+": '{0} & {1}'.format(daugCuts, pionPIDCuts),
+                 "K+" : '{0} & {1}'.format(daugCuts, kaonPIDCuts)
+              },
+              "Lc":{
+                 "pi+": '{0} & {1}'.format(daugCuts, pionPIDCuts),
+                 "K+" : '{0} & {1}'.format(daugCuts, kaonPIDCuts),
+                 "p+" : '{0} & {1}'.format(daugCuts, protonPIDCuts)
+              }
+        }
+       
+
+        # Add 10 MeV either side of the ADAMASS checks to account for the
+        # poorer mass resolution before the vertex fit
+        combCuts = (
+            '(AMAXCHILD(PT) > {0[D_Daug_1of3_PT_MIN]})'
+            '& (AMAXCHILD(BPVIPCHI2()) > {0[D_Daug_1of3_BPVIPCHI2_MIN]})'
+            '& (ANUM(PT > {0[D_Daug_2of3_PT_MIN]}) >= 2)'
+            '& (ANUM(BPVIPCHI2() > {0[D_Daug_2of3_BPVIPCHI2_MIN]}) >= 2)'
+            "& (ACUTDOCA({0[D_Comb_ADOCAMAX_MAX]}, ''))"
+        ).format(self.config)
+
+        combCuts = combCuts +  ("&(ADAMASS('{0}') < {1})").format(particle,self.config[ nickname+"_ADAMASS_WIN" ])
+        dCuts = (
+            '(VFASPF(VCHI2/VDOF) < {0[D_VCHI2VDOF_MAX]})'
+            #            '& (BPVDIRA > cos({0[D_acosBPVDIRA_MAX]}))'
+        ).format(self.config)
+        #        dCuts = dCuts + ('& ({0})').format(self.config[ nickname+"_PVDispCut" ])
+
+        _dplus = CombineParticles(
+            #name='Combine{0}'.format(name),
+            DecayDescriptors=decDescriptors,
+            Preambulo=lclPreambulo,
+            CombinationCut=combCuts,
+            MotherCut=dCuts,
+            DaughtersCuts=_dauCuts[nickname]
+        )
+
+        return Selection(name, Algorithm=_dplus, RequiredSelections=inputSel)
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonOthercc.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonOthercc.py
new file mode 100644
index 000000000..1cb936d67
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonOthercc.py
@@ -0,0 +1,170 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting dielectron (J/psi, ...), pp (eta_c, ...)
+and W->MuNu 
+'''
+
+__author__=['Emilie MAURICE']
+__date__ = ''
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'HeavyIonOtherccConf',
+    'default_config'
+    )
+
+default_config =  {
+    'NAME'            : 'HeavyIonOthercc',
+    'WGs'             : ['IFT'],
+    'STREAMS'         : ['IFT'],
+    'BUILDERTYPE'     : 'HeavyIonOtherccConf',
+    'CONFIG'          : {
+        "odin": ["NoBeam","Beam1","Beam2","BeamCrossing"],
+        'CheckPV'    :  False,
+        
+              
+        "VCHI2VDOF_max"    : 16,
+        "Track_CHI2"       : 5,
+        "DOCA_max"         : 10,
+
+        "PT_min"         : 500,   # MeV
+        "AM"               : 2900,   # MeV
+        "AMmax"               : 4000,   # MeV
+        "Electron_PIDe"    : 1,
+
+        'PrescaleDiElectron'            :  1.0,
+        'PostscaleDiElectron'           : 1.0, 
+
+        'Hlt1FilterDiElectron'          : None, #"HLT_PASS_RE('Hlt1SingleElectronNoIP')",
+        'Hlt2FilterDiElectron'          : None,
+
+        # etac -> ppbar
+        'ProtonPIDppi'     :    5.  , # CombDLL(p-pi)                                                                                                                         
+        'ProtonPIDpK'      :    3.  , # CombDLL(p-K)                                                                                                                          
+        'CombMinMass'      :  2750.  , # MeV, before Vtx fit                                                                                                                   
+        'MaxMass'          :  4000.  , # MeV, after Vtx fit                                                                                                                    
+
+        'PrescaleDiProton'            :  1.0,
+        'PostscaleDiProton'           : 1.0, 
+
+        'Hlt1FilterDiProton'          : None,
+        'Hlt2FilterDiProton'          : None,
+        }
+    }
+
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdNoPIDsElectrons, StdLooseProtons, StdLooseMuons
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+
+class HeavyIonOtherccConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+        self.inElectrons = StdNoPIDsElectrons
+        self.inProtons = StdLooseProtons
+        self.inMuons = StdLooseMuons
+        
+        _monCuts = ( "(VFASPF(VCHI2/VDOF)<{0[VCHI2VDOF_max]})").format(self.config)
+        
+        _dauCuts = {"e+":("(PT>{0[PT_min]}) & (TRCHI2DOF<{0[Track_CHI2]})").format(self.config)}
+        
+        _comCutsHighMass = ( 
+            "(AM > {0[AM]}) & (AM < {0[AMmax]} ) "
+            ).format(self.config)
+        
+        self.makeJpsi = self.makeDiElectron(
+            name = "Jpsi2ee",
+            daughterCuts = _dauCuts,
+            motherCuts = _monCuts,
+            combCuts = _comCutsHighMass
+            )
+        
+        _dauCuts_proton = {"p+":("(TRCHI2DOF<{0[Track_CHI2]}) & ((PIDp-PIDpi) > {0[ProtonPIDppi]}) & ((PIDp-PIDK) > {0[ProtonPIDpK]})").format(self.config)}
+        
+        _comCuts_pp = (
+            "(AM > {0[CombMinMass]}) & (AM < {0[MaxMass]})"
+            ).format(self.config)
+        self.makeEtac = self.makeDiProton(
+            name = "etac2ppbar",
+            daughterCuts = _dauCuts_proton,
+            motherCuts = _monCuts,
+            combCuts = _comCuts_pp
+            )
+
+        
+        odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in self.config['odin'] if odin_type in ["NoBeam","Beam1","Beam2","BeamCrossing"]])
+        
+        self.JpsiLine = StrippingLine( name+'Jpsi2eeLine',
+                                       prescale  = self.config['PrescaleDiElectron'],
+                                       postscale  = self.config['PostscaleDiElectron'],                                                                      
+                                       checkPV   = self.config['CheckPV'],
+                                       HLT1       =self.config['Hlt1FilterDiElectron'],
+                                       HLT2       =self.config['Hlt2FilterDiElectron'],
+                                       algos     = [ self.makeJpsi],
+                                       ODIN      = odin,
+                                       RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+                                       )
+        self.registerLine( self.JpsiLine )
+        
+        self.EtacLine = StrippingLine( name+'Etac2ppLine',
+                                       prescale  = self.config['PrescaleDiProton'],
+                                       postscale  = self.config['PostscaleDiProton'],                                                                      
+                                       checkPV   = self.config['CheckPV'],
+                                       HLT1       =self.config['Hlt1FilterDiProton'],
+                                       HLT2       =self.config['Hlt2FilterDiProton'],
+                                       algos     = [ self.makeEtac],
+                                       ODIN      = odin,
+                                       RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+                                       )
+        self.registerLine( self.EtacLine )
+        
+
+        
+        
+    def makeDiElectron( self,name, daughterCuts, motherCuts, combCuts) :
+        diElectron = CombineParticles(
+            #name               = 'Combine{0}'.format(name),
+            DecayDescriptors   = ["J/psi(1S) -> e+ e-"],
+            CombinationCut     = combCuts,
+            MotherCut          = motherCuts,
+            DaughtersCuts       = daughterCuts,
+            )
+        return Selection( name,
+                          Algorithm = diElectron,
+                          RequiredSelections = [ self.inElectrons] )
+        
+        
+
+    def makeDiProton( self,name, daughterCuts, motherCuts, combCuts) :
+        '''create a selection using a CombineParticles'''
+        diProton = CombineParticles(
+            #name               = 'Combine{0}'.format(name),
+            DecayDescriptors   = ["J/psi(1S) -> p+ p~-"],
+            CombinationCut     = combCuts,
+            MotherCut          = motherCuts,
+            DaughtersCuts       = daughterCuts,
+            )
+        return Selection( name,
+                          Algorithm = diProton,
+                          RequiredSelections = [ self.inProtons] )
+    
+        
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonPIDCalib.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonPIDCalib.py
new file mode 100644
index 000000000..b236593f8
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonPIDCalib.py
@@ -0,0 +1,485 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+################################################################################
+## StrippingPIDCalib.py                                                       ##
+## Lucio Anderlini, Sneha Malde, Barbara Sciascia                             ##
+##                                                                            ##
+## LineBuilder to create StrippingLines for the calibration samples used in   ##
+## PIDCalib. Only single-vertex decays are defined here. Dedicated line       ##
+## builders are defined for other samples (such as D* and Lb decay chains).   ##
+##                                                                            ##
+## Implemented lines:                                                         ##
+##  . StrippingPIDCalibJpsi2MuMuLine                                          ##
+##  . StrippingPIDCalibBu2KMuMuLine                                           ##
+##  . StrippingPIDCalibL02ppiLowPLine                                         ##
+##  . StrippingPIDCalibL02ppiHighPLine                                        ##
+##  . StrippingPIDCalibJpsi2eeLine                                            ##
+##  . StrippingPIDCalibBu2KeeLine                                             ##
+##                                                                            ##
+################################################################################
+
+
+'''
+Module defining PIDCalib single-vertex stripping lines, based on those by Lucio Anderlini
+#####For HI, remove ee line, low mass mumu line, add prompt Jpsi2MuMu line
+'''
+
+__author__  = ['Yanxi ZHANG']
+__date__    =  '25/02/2015'
+__version__ =  '$Revision: 1.0 $'
+
+
+__all__ = (
+    'PIDCalibLineBuilder',
+    'default_config'
+    )
+
+default_config = {
+    'NAME'              : 'HeavyIonPIDCalib',
+    'WGs'               : [ 'IFT' ],
+    'BUILDERTYPE'       : 'HeavyIonPIDCalibConf',
+    'STREAMS'           : [ 'IFT' ],
+    'CONFIG'            : {
+      "odin": ["NoBeam","Beam1","Beam2","BeamCrossing"], #"( ODIN_BXTYP == LHCb.ODIN.Beam1) | (ODIN_BXTYP == LHCb.ODIN.Beam2) | (ODIN_BXTYP == LHCb.ODIN.BeamCrossing) | (ODIN_BXTYP == LHCb.ODIN.NoBeam)",        ##[ 'NoBeam', 'BeamCrossing','Beam1','Beam2']
+
+      'Jpsi2MuMuPrompt'       : { # Replaces old StrippingMuIDCalib_JpsiKFromBNoPIDNoMip
+        'Prescale'      : 1.0
+        , 'CheckPV'     : False
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : False
+        , 'Hlt1Filter'        : None # "HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'Hlt2Filter'        : None # "HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "J/psi(1S) -> mu+ mu-"
+        , 'TagAndProbeIndices' : [ 1, 2 ]
+        , 'InputTES'    : [ 'Phys/StdAllNoPIDsMuons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'mu+' : "(ISLONG) & (P>3*GeV) & (PT>500*MeV) & (TRCHI2DOF<3)"
+          }
+        , 'TagAndProbeCut'     : "(ACHILDCUT(ISMUON, #tag)) & (ACHILD(P, #tag) > 6*GeV) & (ACHILD(PT, #tag) > 1.5*GeV)" + "& (ACHILD(PIDmu, #tag)>0.)"
+        , 'CombinationCut'     : "(in_range(3096.916-160, AM, 3096.916+160)) & (ACHI2DOCA(1,2) < 10)"
+        , 'MotherCut'          : "(VFASPF(VCHI2)<5)"
+      },
+
+
+      'Jpsi2MuMu'       : { # Replaces old StrippingMuIDCalib_JpsiKFromBNoPIDNoMip
+        'Prescale'      : 1.0
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : False
+        , 'Hlt1Filter'        : None #"HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'Hlt2Filter'        : None #"HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "J/psi(1S) -> mu+ mu-"
+        , 'TagAndProbeIndices' : [ 1, 2 ]
+        , 'InputTES'    : [ 'Phys/StdNoPIDsMuons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'mu+' : "(ISLONG) & (P>3*GeV) & (PT>800*MeV) & (MIPCHI2DV(PRIMARY)>10) & (TRCHI2DOF<3)"
+          }
+        , 'TagAndProbeCut'     :
+            "(ACHILDCUT(ISMUON, #tag)) & (ACHILD(P, #tag) > 6*GeV) & (ACHILD(PT, #tag) > 1.5*GeV) & (ACHILD(MIPCHI2DV(PRIMARY), #tag) > 25)"
+        , 'CombinationCut'     :
+            "(in_range(3096-200, AM, 3096+200)) & (ACHI2DOCA(1,2) < 10)"
+        , 'MotherCut'          :
+            "(VFASPF(VCHI2)<5) & (BPVVDCHI2 > 225)"
+      },
+
+
+
+      'L02ppi' : {
+            #        'Prescale'      : .14
+            'Prescale'      : 1.
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : False
+        , 'Hlt1Filter'        : None#"HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'Hlt2Filter'        : None#"HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "[Lambda0 -> p+ pi-]cc"
+        , 'InputTES'    : [ 'Phys/StdAllNoPIDsPions/Particles', 
+                                   'Phys/StdAllNoPIDsProtons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'p+'               : "( 2.0 * GeV < P ) &  ( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 35 )",
+            'pi-'              : "( 2.0 * GeV < P ) &  ( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 35 )"
+          }
+        , 'CombinationCut'     :
+            "(AM < 1.5 * GeV) & (ACHI2DOCA(1,2) < 20)"
+        , 'MotherCut'          : (
+            "   ( ADMASS ( 'Lambda0') < 25 ) " + 
+            " & ( in_range ( 0 , VFASPF ( VCHI2 ) , 16 ) )" + 
+            " & ( VFASPF ( VZ ) < 2200 ) "  +
+            " & ( in_range ( 0 , BPVLTFITCHI2() , 49 ) )" + 
+            " & ( BPVLTIME() * c_light > 5  ) " +
+            " & ( ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > 20 )"
+          )
+      },
+
+      'L02ppiHighPT' : {
+        'CloneLine' : "L02ppi"
+        , 'Prescale'  : 1.0
+        , 'DaughtersCuts'       : {
+            'p+'               : "(PT > 3.5*GeV) & ( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )",
+            'pi-'              : "( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )"
+          }
+      },
+
+      'L02ppiVeryHighPT' : {
+        'CloneLine' : "L02ppi"
+        , 'Prescale'  : 1.0
+        , 'DaughtersCuts'       : {
+            'p+'               : "(PT > 10*GeV) & ( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )",
+            'pi-'              : "( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )"
+          }
+      },
+
+      'L02ppiIsMuon' : {
+        'CloneLine' : "L02ppi"
+        , 'Prescale'  : 1.0
+        , 'DaughtersCuts'       : {
+            'p+'               : "(ISMUON) & ( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )",
+            'pi-'              : "( 2.0*GeV < P ) &( TRCHI2DOF < 5 ) & ( MIPCHI2DV(PRIMARY) > 25 )"
+          }
+      },
+
+      'L02ppiDD' : {
+        'CloneLine' : "L02ppi"
+        #        , 'Prescale'  : .14
+        , 'Prescale'  : 1.
+        , 'InputTES'    : [ 'Phys/StdNoPIDsDownPions/Particles', 
+                                   'Phys/StdNoPIDsDownProtons/Particles' ]
+      },
+
+      'L02ppiDDHighPT' : {
+        'CloneLine' : "L02ppiHighPT"
+        , 'Prescale'  : 1.0
+        , 'InputTES'    : [ 'Phys/StdNoPIDsDownPions/Particles', 
+                                   'Phys/StdNoPIDsDownProtons/Particles' ]
+      },
+
+      'L02ppiDDVeryHighPT' : {
+        'CloneLine' : "L02ppiVeryHighPT"
+        , 'Prescale'  : 1.0
+        , 'InputTES'    : [ 'Phys/StdNoPIDsDownPions/Particles', 
+                                   'Phys/StdNoPIDsDownProtons/Particles' ]
+      },
+
+
+      'Bu2Jpsi_mumuK' :  {
+        'Prescale'       : 1.0
+        , 'CheckPV'      : True
+        , 'RawEvent'    : ['Calo']
+        , 'MDST.DST'    : False
+        , 'Hlt1Filter'        : None#"HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'Hlt2Filter'        : None#"HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'    : "[B+ -> J/psi(1S) K+]cc"
+        , 'DecayDescriptorJpsi': "J/psi(1S) -> mu+ mu-"
+        , 'InputTES'    : [ 'Phys/StdNoPIDsKaons/Particles' ]
+        , 'InputTESJpsi': [ 'Phys/StdNoPIDsMuons/Particles' ]
+        , 'DaughtersCuts'       : {
+            'mu+' : "(BPVIPCHI2()> 10.0) ",
+            'K+'  : "(MIPCHI2DV(PRIMARY)>25)"
+          }
+        , 'TagAndProbeCut'     :
+            "(ACHILDCUT(ISMUON, #tag)) & (ACHILD(P, #tag) > 6*GeV) & (ACHILD(PT, #tag) > 1.5*GeV) & (ACHILD(MIPCHI2DV(PRIMARY), #tag) > 25)"
+        , 'JpsiCombinationCut' :
+            "(ADAMASS('J/psi(1S)')<200*MeV)"
+        , 'JpsiMotherCut'      :
+            "(VFASPF(VCHI2/VDOF)<5) & (BPVVDCHI2 > 225) "
+        , 'CombinationCut'     :
+            "ADAMASS('B+') < 500.*MeV"
+        , 'MotherCut'          :
+            "(BPVIPCHI2()<25)"
+      },
+
+
+      'Ks02pipi'      :{
+            #        'Prescale'      : 0.024
+            'Prescale'      : 1.
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : False
+        , 'Hlt1Filter'        : None#"HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'Hlt2Filter'        : None#"HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'DecayDescriptor'       : "KS0 -> pi+ pi-"
+        , 'InputTES'              : ['Phys/StdNoPIDsPions/Particles']
+        , 'DaughtersCuts'         : {
+            'pi+' : " ( 2.0 * GeV < P ) & ( MIPCHI2DV(PRIMARY) > 25 )"
+          }
+        , 'CombinationCut'        : " ( ADAMASS('KS0') < 100 ) & (ACHI2DOCA(1,2) < 20 )"
+        , 'MotherCut'             : (
+            "( ADMASS ( 'KS0') < 50 ) & "+
+            " in_range ( 0 , VFASPF ( VCHI2 ) , 16 ) & " + 
+            " ( VFASPF ( VZ ) < 2200 ) & " + 
+            " (BPVVDCHI2 > 25) & " +
+            " ( ADWM( 'Lambda0' , WM( 'p+' , 'pi-') ) > 9 ) & " + 
+            " ( ADWM( 'Lambda0' , WM( 'pi+' , 'p~-') ) > 9 )"
+          )
+      },
+    
+      'Ks02pipiDD' : {
+        'CloneLine'    : 'Ks02pipi'
+        #, 'Prescale'   : 0.024
+        , 'Prescale'   : 1.
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : False
+        , 'Hlt1Filter'        : None#"HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'Hlt2Filter'        : None#"HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'InputTES'   : ['Phys/StdNoPIDsDownPions/Particles']
+        , 'MotherCut'             : (
+            "( ADMASS ( 'KS0') < 50 ) & "+
+            " in_range ( 0 , VFASPF ( VCHI2 ) , 16 ) & " + 
+            " ( VFASPF ( VZ ) < 2200 ) & " + 
+            " (BPVVDCHI2 > 25) & " +
+            " ( ADWM( 'Lambda0' , WM( 'p+' , 'pi-') ) > 18 ) & " + 
+            " ( ADWM( 'Lambda0' , WM( 'pi+' , 'p~-') ) > 18 )"
+        )
+      },
+    
+      'Lc2pKpi' : {
+        'Prescale':   1.0
+        , 'CheckPV'     : True
+        , 'RawEvent'    : ['Muon']
+        , 'MDST.DST'    : False
+        , 'Hlt1Filter'        : None#"HLT_PASS_RE('Hlt1.*Decision')" 
+        , 'Hlt2Filter'        : None#"HLT_PASS_RE('Hlt2.*Decision')" 
+        , 'RefitPV'     : False
+        , 'InputTES' : [  'Phys/StdNoPIDsKaons/Particles' , 
+                          'Phys/StdNoPIDsPions/Particles' , 
+                          'Phys/StdNoPIDsProtons/Particles' 
+                       ]
+        , 'DecayDescriptor' : "[Lambda_c+ -> K- p+ pi+]cc"
+        , 'DaughtersCuts' : {
+          'K+'    : '( PT>250*MeV ) & ( P>2*GeV ) & ( TRPCHI2>0.0001 ) & ( MIPCHI2DV(PRIMARY)>8. ) ' 
+          , 'p+'  : '( PT>250*MeV ) & ( P>2*GeV ) & ( TRPCHI2>0.0001 ) & ( MIPCHI2DV(PRIMARY)>8. ) ' 
+          , 'pi+' : '( PT>250*MeV ) & ( P>2*GeV ) & ( TRPCHI2>0.0001 ) & ( MIPCHI2DV(PRIMARY)>8. ) '
+          }
+        , 'Combination12Cut' : "( ACHI2DOCA(1,2) < 25 )"
+        , 'CombinationCut'   : "( ADAMASS('Lambda_c+')<150*MeV ) & ( APT>1.*GeV ) & ( ADOCACHI2CUT(50, '') )"
+        , 'MotherCut'        : (
+                #            "( M > 2.240*GeV ) & " +
+            "( M > 2.186*GeV ) & " +
+            #" ( M<2.330*GeV ) & " +
+            " ( M<2.386*GeV ) & " +
+            " ( VFASPF(VCHI2/VDOF)<8 ) & " +
+            #   " ( BPVDIRA>0.99999 ) & " +
+            #" ( MIPCHI2DV(PRIMARY)<4. ) & " +
+            " ( MIPCHI2DV(PRIMARY)< 25. ) & " +
+            " in_range( 0.85*GeV, M13, 0.95*GeV ) & " +
+            " ( (WM( 'K-' , 'pi+' , 'pi+' )>1.89*GeV) | (WM( 'K-' , 'pi+' , 'pi+' )<1.80*GeV) )"
+        )
+    }
+  }
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+#from Configurables import CombineParticles
+#from Configurables import DaVinci__N3BodyDecays 
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays 
+
+class HeavyIonPIDCalibConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    
+##==============================================================================
+## PIDCalibLineBuilder constructor
+##==============================================================================
+    def __init__(self, name, config ): 
+      
+      LineBuilder.__init__(self, name, config)
+      self.name = name 
+      self.config = config
+      self.odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in config['odin'] if odin_type in ["NoBeam","Beam1","Beam2","BeamCrossing"]])
+
+      self.registerLine ( self.buildPIDLine ( 'Jpsi2MuMuPrompt'    , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'Jpsi2MuMu'          , bodies = 2) )
+
+      self.registerLine ( self.buildPIDLine ( 'L02ppi'             , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiHighPT'       , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiVeryHighPT'   , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiDD'           , bodies = 2) )
+      
+      self.registerLine ( self.buildPIDLine ( 'L02ppiDDHighPT'     , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiDDVeryHighPT' , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'L02ppiIsMuon'       , bodies = 2) )
+      self.registerLine ( self.buildPIDLine ( 'Ks02pipi'           , bodies = 2) )
+
+      self.registerLine ( self.buildPIDLine ( 'Ks02pipiDD'         , bodies = 2) )
+
+      self.registerLine ( self.buildPIDLine ( 'Lc2pKpi'            , bodies = 3) )
+      self.registerLine ( self.buildPIDLineWithJpsi ( 'Bu2Jpsi_mumuK' ) )
+
+
+##==============================================================================
+## PIDCalibLineBuilder::_builderTagProbeCut 
+##    takes as input a cutPattern defining tag and probe requirements using 
+##    #tag and #probe key words which are replaced by tge indices of the 
+##    tag and probe particles as defined in the configuration dictionary.
+##    Tag and probe tracks are then swapped and the resulting cuts AND-ed.
+##==============================================================================
+    def _buildTagProbeCut(self, cutPattern, indices):
+      "service function to swap tag and probe and build the combination cut"
+      cut  = '(('
+      cut +=  cutPattern.replace('#tag',indices[0]).replace('#probe',indices[1])
+      cut += ")|("
+      cut +=  cutPattern.replace('#tag',indices[1]).replace('#probe',indices[0])
+      cut += "))"
+      return cut
+
+
+##==============================================================================
+## PIDCalibLineBuilder::_resolveCloning 
+##    check if the config declares a "CloneLine" keyword, if yes it clones the 
+##    pointed line, if the latter declares a "CloneLine" keyword imports from
+##    that the missing keywords and so on.
+##    Returns a _copy_ of the updated dictionary
+##==============================================================================
+    def _resolveCloning(self, configRowId):
+      from copy import copy
+      _config = copy(self.config [ configRowId ])
+      ## If the line inherit another line clones and updates the dictionary
+      while 'CloneLine' in _config:
+###        print "Cloning " + configRowId + " from " + _config['CloneLine']
+        _newConfig = {}
+        _newConfig.update ( self.config[_config['CloneLine']] ) 
+        del _config['CloneLine']
+        _newConfig.update ( _config )
+        _config = _newConfig
+      return _config
+
+
+##==============================================================================
+## PIDCalibLineBuilder::buildPIDLine
+##   Parses the configuration dictionary to build the lines as defined in the 
+##   configuration dictionaries
+##==============================================================================
+    def buildPIDLine(self, configRowId, bodies):
+      "Parses the configuration dictionary to build the line"
+
+      ## Resolves possible clone statements
+      _config = self._resolveCloning(configRowId)
+      
+      ## Selects the algorithm according to the number of bodies
+      _algorithm = None
+      if (bodies == 2)   :
+        _algorithm = CombineParticles()
+        #_algorithm = CombineParticles(self.name + configRowId + 'Algorithm')
+      elif (bodies == 3) :
+        #_algorithm = DaVinci__N3BodyDecays(self.name + configRowId + 'Line')
+        #_algorithm = DaVinci__N3BodyDecays(self.name + configRowId + 'Algorithm')
+        _algorithm = DaVinci__N3BodyDecays()
+        _algorithm.Combination12Cut = _config['Combination12Cut']
+
+      ## Prepares the tag&probe cut if needed
+      _combinationCut = _config['CombinationCut']
+      if 'TagAndProbeIndices' in _config:   ## Tag & Probe defined
+        _id = [str(x) for x in _config['TagAndProbeIndices']]
+        _combinationCut += ' & '
+        _combinationCut += self._buildTagProbeCut(_config['TagAndProbeCut'], _id)
+
+###        print _combinationCut
+
+      _algorithm.CombinationCut  = _combinationCut
+      _algorithm.DaughtersCuts   = _config['DaughtersCuts']
+      _algorithm.MotherCut       = _config['MotherCut']
+      _algorithm.DecayDescriptor = _config['DecayDescriptor']
+      
+      _requiredSelections = [DataOnDemand(x) for x in _config['InputTES']]
+      _selection = Selection(self.name + configRowId + 'Selection'
+                              , Algorithm = _algorithm
+                              , RequiredSelections = _requiredSelections
+                            )
+
+      _line = StrippingLine( name                      =self.name + configRowId + 'Line'
+                              , prescale               = _config['Prescale']
+                              , checkPV                = _config['CheckPV']
+                              , EnableFlavourTagging   = False
+                              , RequiredRawEvents      = _config['RawEvent']
+                              #, MDSTFlag              = _config['MDST.DST']
+                              , HLT1             = _config['Hlt1Filter'] 
+                              , HLT2             = _config['Hlt2Filter'] 
+                              , algos    = [ _selection ]
+                              , ODIN     = self.odin
+                           )
+      
+      return _line
+
+##==============================================================================
+## PIDCalibLineBuilder::buildPIDLineWithJpsi
+##   Parses the configuration dictionary to build the lines as defined in the 
+##   configuration dictionaries, this function allows two subsequent fits,
+##   and uses the output of the former as input of the latter
+##==============================================================================
+    def buildPIDLineWithJpsi(self, configRowId):
+      ## Resolves possible clone statements
+      _config = self._resolveCloning(configRowId)
+
+      ## Prepares the tag&probe cut if needed
+      _combinationCutJpsi = _config['JpsiCombinationCut']
+      _combinationCut     = _config['CombinationCut']
+
+      if 'TagAndProbeCut' in _config:
+        _id = ["1", "2"]
+        _combinationCutJpsi += ' & '
+        _combinationCutJpsi += self._buildTagProbeCut(_config['TagAndProbeCut'], _id)
+
+        ###print _combinationCut
+
+      _algorithmJpsi = CombineParticles()
+      #_algorithmJpsi = CombineParticles(self.name + configRowId + 'JpsiAlgorithm')
+
+      _algorithmJpsi.CombinationCut  = _combinationCutJpsi
+      _algorithmJpsi.DaughtersCuts   = _config['DaughtersCuts']
+      _algorithmJpsi.MotherCut       = _config['JpsiMotherCut']
+      _algorithmJpsi.DecayDescriptor = _config['DecayDescriptorJpsi']
+      
+      _requiredSelections = [DataOnDemand(x) for x in _config['InputTESJpsi']]
+      _selectionJpsi = Selection(self.name + configRowId + 'SelectionJpsi'
+                                  , Algorithm = _algorithmJpsi
+                                  , RequiredSelections = _requiredSelections
+                                )
+
+      _algorithm = CombineParticles()
+      #_algorithm = CombineParticles(self.name + configRowId + 'Algorithm')
+
+      _algorithm.CombinationCut  = _combinationCut
+      _algorithm.DaughtersCuts   = _config['DaughtersCuts']
+      _algorithm.MotherCut       = _config['MotherCut']
+      _algorithm.DecayDescriptor = _config['DecayDescriptor']
+      
+      _requiredSelections = [_selectionJpsi] + [DataOnDemand(x) for x in _config['InputTES']]
+      _selection = Selection(self.name + configRowId + 'Selection'
+                              , Algorithm = _algorithm
+                              , RequiredSelections = _requiredSelections
+                            )
+
+      _line = StrippingLine( self.name + configRowId + 'Line'
+                              , prescale = _config['Prescale']
+                              , checkPV  = _config['CheckPV']
+                              , EnableFlavourTagging = False
+                              , RequiredRawEvents    = _config['RawEvent']
+                              #, MDSTFlag             = _config['MDST.DST']
+                              , HLT1                 = _config['Hlt1Filter'] 
+                              , HLT2                 = _config['Hlt2Filter'] 
+                              , algos    = [ _selection ]
+                              , ODIN     = self.odin
+                           )
+      
+      return _line
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonSingleElectron.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonSingleElectron.py
new file mode 100644
index 000000000..5be01c4e8
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonSingleElectron.py
@@ -0,0 +1,104 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping selections for single scattered electrons
+'''
+
+__author__ = 'Giacomo Graziani'
+__date__ = '25/11/2016'
+__version__ = '$Revision: 0 $'
+
+
+__all__ = (
+    'HeavyIonSingleElectronConf',
+    'default_config'
+    )
+
+from GaudiKernel.SystemOfUnits import *
+
+default_config =  {
+    'NAME'            : 'HeavyIonSingleElectron',
+    'WGs'             : ['IFT'],
+    'STREAMS'         : ['IFT'],
+    'BUILDERTYPE'     : 'HeavyIonSingleElectronConf',
+    'CONFIG'          : {
+        'odin': ["NoBeam","Beam1","Beam2","BeamCrossing"],
+        'Prescale'            :  1.0,
+        'Postscale'           :  1.0, 
+        #        'Hlt1Filter'         : "(HLT_PASS('Hlt1BEMicroBiasLowMultVeloDecision'))", 
+        #        'Hlt1Filter'         : "(HLT_PASS('Hlt1BEMicroBiasLowMult.*Decision'))", 
+        'Hlt1Filter'         : "(HLT_PASS('Hlt1BEMicroBiasLowMultVeloDecision') ) | (HLT_PASS('Hlt1BEMicroBiasLowMultVeloNoBiasDecision') )", 
+        'Hlt2Filter'         : None,
+        "MaxNvelo"           : 5,
+        "MaxNTT"             : 3,
+        "MaxNDown"           : 4,
+        "MaxNBack"           : 2,
+        "MaxNUp"             : 4,
+        "MaxNSpd"            : 50,
+        "MaxP"               : 25*GeV,
+        "MaxPt"              : 180*MeV,
+        "MinEta"           : 3.5,
+        "MaxEta"           : 7.0
+      }
+    }
+
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StandardParticles import StdAllNoPIDsElectrons
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+
+class HeavyIonSingleElectronConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+        print "inside SingleElectron",config
+        odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in config['odin'] if odin_type in ["NoBeam","Beam1","Beam2","BeamCrossing"]])
+
+        # filter electrons in the relevant kinematic range
+        myFilter = FilterDesktop().configurable("myFilter")
+        myFilter.Code = "(PT < %(MaxPt)s) & (P < %(MaxP)s) & ( ETA < %(MaxEta)s) & ( ETA > %(MinEta)s)" % config
+        self.makeElectron = Selection("SingleElectronSel",
+                                      Algorithm = myFilter,
+                                      RequiredSelections = [  StdAllNoPIDsElectrons ])
+
+        # require event to have very little other activity
+        myEvfilter  =  "( RECSUMMARY(LHCb.RecSummary.nVeloTracks,-1) < %d )" %self.config['MaxNvelo']
+        myEvfilter  += "& ( RECSUMMARY(LHCb.RecSummary.nTTracks,-1) < %d )" %self.config['MaxNTT']
+        myEvfilter  += "& ( RECSUMMARY(LHCb.RecSummary.nDownstreamTracks,-1) < %d )" %self.config['MaxNDown']
+        myEvfilter  += "& ( RECSUMMARY(LHCb.RecSummary.nBackTracks,-1) < %d )" %self.config['MaxNBack']
+        myEvfilter  += "& ( RECSUMMARY(LHCb.RecSummary.nUpstreamTracks,-1) < %d )" %self.config['MaxNUp']
+        myEvfilter  += "& ( RECSUMMARY(LHCb.RecSummary.nSPDhits,-1) < %d )" %self.config['MaxNSpd']
+        self.EventFilter = {'Code' : myEvfilter,
+                            'Preambulo' : ["from LoKiNumbers.functions import RECSUMMARY"]
+                            }
+        
+        self.SingleElectronLine = StrippingLine( 
+	      name = 'SingleElectron',
+              prescale  = self.config['Prescale'],
+              postscale = self.config['Postscale'],                                                                      
+              HLT1      = self.config['Hlt1Filter'],
+              HLT2      = self.config['Hlt2Filter'],
+              checkPV   = False,
+	      RequiredRawEvents = [],
+              algos     = [ self.makeElectron ],
+              ODIN      = odin,
+              FILTER= self.EventFilter
+              )
+        self.registerLine( self.SingleElectronLine )
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTopology.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTopology.py
new file mode 100644
index 000000000..a0ad6b984
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTopology.py
@@ -0,0 +1,139 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting specific topology
+'''
+
+__author__=['Emilie MAURICE']
+__date__ = ''
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'HeavyIonTopologyConf',
+    'default_config'
+    )
+
+default_config =  {
+    'NAME'            : 'HeavyIonTopology',
+    'BUILDERTYPE'     : 'HeavyIonTopologyConf',
+    'WGs'             : ['IFT'],
+    'STREAMS'         : ['IFT'],
+    'CONFIG'          : {
+        "odin": ["NoBeam","Beam1","Beam2","BeamCrossing"],
+
+        # For pPb/Pbp
+        # "GEC"       : "( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 20)",
+        # For PbPb / PbAr
+        "GEC"       : "( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 20) & ( recSummary(LHCb.RecSummary.nSPDhits, 'Raw/Spd/Digits') < 2000) & ( recSummaryTrack(LHCb.RecSummary.nVeloTracks, TrVELO) < 11) & ( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG)  > 0) ",
+        "GECGamma"       : "( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 20) & ( recSummary(LHCb.RecSummary.nSPDhits, 'Raw/Spd/Digits') < 2000) & ( recSummaryTrack(LHCb.RecSummary.nVeloTracks, TrVELO) < 11)  ",
+        
+        'CheckPVfalse'    :  False,
+
+        'PrescaleLowMult'            :  1.0,
+        'PostscaleLowMult'           : 1.0, 
+
+        'PrescaleGammaLowMult'            :  1.0,
+        'PostscaleGammaLowMult'           : 1.0, 
+
+        'PrescaleEE'            :  1.0,
+        'PostscaleEE'           : 1.0, 
+
+        'Hlt1FilterLowMult'          : None,
+        'Hlt2FilterLowMult'          : None,
+
+        'Hlt1FilterE'          : None, 
+        'Hlt2FilterE'          : None,
+
+        'gammaPT' : 200
+        }
+    }
+
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons, StdAllLoosePions, StdAllNoPIDsPions, StdLoosePhotons
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from Configurables               import FilterDesktop, CombineParticles
+
+
+class HeavyIonTopologyConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+        self.name = name 
+        self.config = config
+
+
+        odin = "|".join( ["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,) for odin_type in self.config['odin'] if odin_type in ["NoBeam","Beam1","Beam2","BeamCrossing"]])
+        
+        _filterGEC = {'Code': config['GEC'], 'Preambulo' : ["from LoKiTracks.decorators import *" ,
+                                                            "from LoKiCore.functions    import * ",
+                                                            "from GaudiKernel.SystemOfUnits import *"]}
+
+        _filterGECGamma = {'Code': config['GECGamma'], 'Preambulo' : ["from LoKiTracks.decorators import *" ,
+                                                                      "from LoKiCore.functions    import * ",
+                                                                      "from GaudiKernel.SystemOfUnits import *"]}
+        
+        
+        _filterGamma = "(PT>%(gammaPT)s*MeV)" % config
+        self._FilterGamma = FilterDesktop(name = "GammaFilterFor"+name, Code = _filterGamma )
+
+        stdPhotons     = DataOnDemand(Location='Phys/StdLoosePhotons/Particles')
+        self.stdPhotons_lowmult = Selection( 'PhotonFilter' + name, Algorithm = self._FilterGamma, RequiredSelections = [stdPhotons])
+        
+        
+        
+        self.LowActivityLine = StrippingLine( name+'LowActivityLine',
+                                              prescale  = self.config['PrescaleLowMult'],
+                                              postscale  = self.config['PostscaleLowMult'],
+                                              FILTER = _filterGEC,
+                                              checkPV   = self.config['CheckPVfalse'],
+                                              ODIN      = odin,
+                                              RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+                                              )
+        self.registerLine( self.LowActivityLine )
+
+
+        # Gamma line with low activity
+        self.GammaLowActivityLine = StrippingLine( name+'GammaLowActivityLine',
+                                                   prescale  = self.config['PrescaleGammaLowMult'],
+                                                   postscale  = self.config['PostscaleGammaLowMult'],
+                                                   FILTER = _filterGECGamma,
+                                                   checkPV   = self.config['CheckPVfalse'],
+                                                   ODIN      = odin,
+                                                   RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+                                                   selection = self.stdPhotons_lowmult
+                                                   )
+        self.registerLine( self.GammaLowActivityLine )
+   
+        
+        
+        odinEE = "(ODIN_BXTYP == LHCb.ODIN.NoBeam)"
+   
+        self.EmptyEmptyLine = StrippingLine( name+'EmptyEmptyLine',
+                                             prescale  = self.config['PrescaleEE'],
+                                             postscale  = self.config['PostscaleEE'],
+                                             checkPV   = self.config['CheckPVfalse'],
+                                             ODIN      = odinEE,
+                                             RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC"]
+                                             )
+        self.registerLine( self.EmptyEmptyLine )
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffDownMuon.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffDownMuon.py
new file mode 100644
index 000000000..a29b82f4b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffDownMuon.py
@@ -0,0 +1,444 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+## #####################################################################
+# A stripping selection for Downstream J/psi->mu+mu- decays
+# To be used for tracking studies
+#
+# @authors G. Krocker, P. Seyfert, S. Wandernoth
+# @date 2010-Aug-17
+#
+# @authors P. Seyfert, A. Jaeger
+# @date 2011-Mar-17
+# 
+# @author M. Kolpin
+# @date 2015-Mar-23
+# 
+#######################################################################
+
+__author__ = [ 'Michael Kolpin']
+__date__ = '23/03/2015'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = ('HeavyIonTrackEffDownMuonConf',
+           'default_config',
+           'TrackEffDownMuon',
+	   'selMuonPParts',
+           'makeMyMuons',
+           'DownJPsi',
+           'DownZ',
+           'DownUpsilon',
+           'selHlt1Jpsi',
+           'selHlt2Jpsi',
+           'trackingDownPreFilter'
+           )
+
+#FIXME Write includes in a cleaner way
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+from DAQSys.DecoderClass import Decoder
+from Configurables import GaudiSequencer 
+from Configurables import UnpackTrack, ChargedProtoParticleMaker, DelegatingTrackSelector, TrackSelector, BestPIDParticleMaker
+from TrackFitter.ConfiguredFitters import ConfiguredFit
+from Configurables import TrackStateInitAlg
+from StrippingConf.StrippingLine import StrippingLine
+from Configurables import ChargedProtoParticleAddMuonInfo, MuonIDAlgLite
+from MuonID import ConfiguredMuonIDs
+from Configurables import ChargedProtoCombineDLLsAlg, ProtoParticleMUONFilter 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter
+from os import environ
+from Gaudi.Configuration import *
+import GaudiKernel.ProcessJobOptions
+from GaudiKernel.SystemOfUnits import mm
+
+from GaudiConfUtils.ConfigurableGenerators import TisTosParticleTagger
+from StandardParticles import StdAllLooseMuons
+from Configurables import GaudiSequencer
+from Configurables import TrackToDST
+from Configurables import TrackSys
+from Configurables import PatSeeding, PatSeedingTool, PatLongLivedTracking
+from PhysSelPython.Wrappers import AutomaticData
+# Get the fitters
+from TrackFitter.ConfiguredFitters import ConfiguredFit, ConfiguredFitSeed, ConfiguredFitDownstream
+from PatAlgorithms import PatAlgConf
+
+from SelPy.utils import ( UniquelyNamedObject,
+                          ClonableObject,
+                          SelectionBase )
+
+
+default_config = {
+    'NAME'        : 'HeavyIonTrackEffDownMuon',
+    'WGs'         : ['IFT'],
+    'BUILDERTYPE' : 'HeavyIonTrackEffDownMuonConf',
+    'CONFIG'      : { 
+				'MuMom':		2000.	# MeV
+			,	'MuTMom':		200.	# MeV
+			,	'ZMuMom':		0.	# MeV
+			,	'ZMuTMom':		20000.	# MeV
+			,	'UpsilonMuMom':		0.	# MeV
+			,	'UpsilonMuTMom':	500.	# MeV
+			,	'ZMuMinEta':		2.	# adimensional
+			,	'ZMuMaxEta':		4.5	# adimensional
+			,	'TrChi2':		10.	# MeV
+			,	'MassPreComb':		2000.	# MeV
+			,	'MassPostComb':		200.	# MeV
+			,	'ZMassPreComb':		100000.	# MeV
+			,	'ZMassPostComb':	1500.	# MeV
+			,	'UpsilonMassPreComb':	100000.	# MeV
+			,	'UpsilonMassPostComb':	00.	# MeV
+			,	'Doca':			5.	# mm
+			,	'VertChi2':		25.	# adimensional
+			,	'SeedingMinP':		1500.	# MeV
+                	,       'DataType':             '2011'  # for ConfiguredMuonIDs configuration
+			,	'NominalLinePrescale':  1. # proposal: 0.2 to stay below 0.15% retention rate 
+			,	'NominalLinePostscale': 1.
+			,	'ValidationLinePrescale':0.0015 #0.5 in stripping15: 0.1 gives 1.42% retention rate , ValidationLine further prescaled
+			,	'ValidationLinePostscale': 1.
+			,	'ZLinePrescale':  1. # proposal: 0.2 to stay below 0.15% retention rate 
+			,	'ZLinePostscale':  1.  
+			,	'UpsilonLinePrescale':  1. # proposal: 0.2 to stay below 0.15% retention rate 
+			,	'UpsilonLinePostscale':  1. 
+            ,   'JpsiHlt1Filter' : 'Hlt1.*Decision'
+            ,   'JpsiHlt2Filter' : 'Hlt2.*Decision'
+            #'JpsiHlt1Triggers'            :  { "Hlt1GlobalDecision%TOS" : 0, "Hlt1GlobalDecision%TIS" : 0},
+			,	'HLT1TisTosSpecs': { "Hlt1GlobalDecision%TOS" : 0, "Hlt1GlobalDecision%TIS" : 0} #no reg. expression allowed(see selHlt1Jpsi )
+			,	'ZHLT1TisTosSpecs'      : { "Hlt1GlobalDecision%TOS" : 0, "Hlt1GlobalDecision%TIS" : 0} #no reg. expression allowed(see selHlt1Jpsi )
+			,	'UpsilonHLT1TisTosSpecs': { "Hlt1GlobalDecision%TOS" : 0, "Hlt1GlobalDecision%TIS" : 0} #no reg. expression allowed(see selHlt1Jpsi )
+			,	'HLT1PassOnAll': True
+			,	'HLT2TisTosSpecs': { "Hlt2TrackEffDiMuonDownstream.*Decision%TOS" : 0, "Hlt2.*Decision%TOS" : 0} #reg. expression allowed
+			,	'ZHLT2TisTosSpecs': { "Hlt2TrackEffDiMuonDownstream.*Decision%TOS" : 0, "Hlt2.*Decision%TOS" : 0} #reg. expression allowed
+			,	'UpsilonHLT2TisTosSpecs': { "Hlt2TrackEffDiMuonDownstream.*Decision%TOS": 0, "Hlt2.*Decision%TOS" : 0} #reg. expression allowed
+			,	'HLT2PassOnAll': False
+                    },
+    'STREAMS'     :  ["IFT"]
+    }
+
+
+class HeavyIonTrackEffDownMuonConf(LineBuilder):
+    """
+    Definition of Downstream J/Psi stripping.
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+				
+    def __init__(self, name, config) :
+
+          LineBuilder.__init__(self, name, config)
+          
+          nominal_name = name + 'Nominal'
+          valid_name = name + 'Validation'
+          Z_name = name + 'Z'
+          Upsilon_name = name + 'Upsilon'
+          
+          self.TisTosPreFilter1Jpsi = selHlt1Jpsi('TisTosFilter1Jpsi'+name, HLT1TisTosSpecs = config['HLT1TisTosSpecs'], HLT1PassOnAll = config['HLT1PassOnAll'])
+          self.TisTosPreFilter2Jpsi = selHlt2Jpsi('TisTosFilter2Jpsi'+name, hlt1Filter = self.TisTosPreFilter1Jpsi, HLT2TisTosSpecs = config['HLT2TisTosSpecs'], HLT2PassOnAll = config['HLT2PassOnAll'])
+          
+          self.TisTosPreFilter1Z = selHlt1Jpsi('TisTosFilter1Z'+name, HLT1TisTosSpecs = config['ZHLT1TisTosSpecs'], HLT1PassOnAll = config['HLT1PassOnAll'])
+          self.TisTosPreFilter2Z = selHlt2Jpsi('TisTosFilter2Z'+name, hlt1Filter = self.TisTosPreFilter1Z, HLT2TisTosSpecs = config['ZHLT2TisTosSpecs'], HLT2PassOnAll = config['HLT2PassOnAll'])
+          
+          self.TisTosPreFilter1Upsilon = selHlt1Jpsi('TisTosFilter1Upsilon'+name, HLT1TisTosSpecs = config['UpsilonHLT1TisTosSpecs'], HLT1PassOnAll = config['HLT1PassOnAll'])
+          self.TisTosPreFilter2Upsilon = selHlt2Jpsi('TisTosFilter2Upsilon'+name, hlt1Filter = self.TisTosPreFilter1Upsilon, HLT2TisTosSpecs = config['UpsilonHLT2TisTosSpecs'], HLT2PassOnAll = config['HLT2PassOnAll'])
+          
+          self.TrackingPreFilter = trackingDownPreFilter(nominal_name, self.TisTosPreFilter2Jpsi, config['SeedingMinP'])
+          self.DownMuProtoPFilter = selMuonPParts(nominal_name, config['DataType'], self.TrackingPreFilter)
+          self.DownMuPFilter = makeMyMuons(nominal_name, self.DownMuProtoPFilter)
+          self.DownJpsiFilter = DownJPsi( 'DownJpsiSel'+nominal_name, self.DownMuPFilter, config['TrChi2'], 
+          		config['MuTMom'], config['MuMom'], config['MassPreComb'], config['Doca'], 
+          		config['MassPostComb'], config['VertChi2'] )
+          
+          self.ZTrackingPreFilter = trackingDownPreFilter( Z_name, self.TisTosPreFilter2Z, config['SeedingMinP'])
+          self.ZDownMuProtoPFilter = selMuonPParts(Z_name, config['DataType'], self.ZTrackingPreFilter)
+          self.ZDownMuPFilter = makeMyMuons(Z_name, self.ZDownMuProtoPFilter)
+          self.DownZFilter = DownZ( 'DownSel'+Z_name, self.ZDownMuPFilter,  
+          		config['ZMuMom'], config['ZMuTMom'], config['ZMuMinEta'], config['ZMuMaxEta'], 
+          		config['ZMassPreComb'], config['ZMassPostComb'], )
+          
+          self.UpsilonTrackingPreFilter = trackingDownPreFilter( Upsilon_name, self.TisTosPreFilter2Upsilon, config['SeedingMinP'])
+          self.UpsilonDownMuProtoPFilter = selMuonPParts(Upsilon_name, config['DataType'], self.UpsilonTrackingPreFilter)
+          self.UpsilonDownMuPFilter = makeMyMuons(Upsilon_name, self.UpsilonDownMuProtoPFilter)
+          self.DownUpsilonFilter = DownUpsilon( 'DownSel'+Upsilon_name, self.UpsilonDownMuPFilter,  
+          		config['UpsilonMuMom'], config['UpsilonMuTMom'], 
+          		config['UpsilonMassPreComb'], config['UpsilonMassPostComb'], )
+          
+          self.nominal_line =  StrippingLine(nominal_name + 'Line'
+                                             , prescale = config['NominalLinePrescale']
+                                             , postscale = config['NominalLinePostscale']
+                                             , algos=[self.DownJpsiFilter]
+                                             , HLT1 = "HLT_PASS_RE('%(JpsiHlt1Filter)s')" % config
+                                             , HLT2 = "HLT_PASS_RE('%(JpsiHlt2Filter)s')" % config
+                                             )
+          
+          self.valid_line = StrippingLine(valid_name + 'Line', prescale = config['ValidationLinePrescale'], postscale = config['ValidationLinePostscale'], algos=[self.TisTosPreFilter2Jpsi])
+          
+          self.Z_line =  StrippingLine(Z_name + 'Line',  prescale = config['ZLinePrescale'], postscale = config['ZLinePostscale'], algos=[self.DownZFilter])
+          
+          self.Upsilon_line =  StrippingLine(Upsilon_name + 'Line',  prescale = config['UpsilonLinePrescale'], postscale = config['UpsilonLinePostscale'], algos=[self.DownUpsilonFilter])
+          
+          self.registerLine(self.nominal_line)
+          self.registerLine(self.valid_line)
+          self.registerLine(self.Z_line)
+          self.registerLine(self.Upsilon_line)
+
+# ########################################################################################
+# Make the protoparticles
+# ########################################################################################
+def selMuonPParts(name, DataType, downstreamSeq):
+   """
+       Make ProtoParticles out of Downstream tracks
+   """
+   unpacker = UnpackTrack(name+"UnpackTrack")  # do we need this or is it here for historical reason ?
+   unpacker.InputName="pRec/"+name+"_Downstream/FittedTracks"
+   unpacker.OutputName="Rec/"+name+"_Downstream/FittedTracks"
+
+   cm=ConfiguredMuonIDs.ConfiguredMuonIDs( DataType ) #data=DaVinci().getProp("DataType"))
+   idalg = cm.configureMuonIDAlgLite(name+"IDalg")
+   idalg.TracksLocations = ["Rec/"+name+"_Downstream/FittedTracks"]
+   idalg.MuonIDLocation = "Rec/"+name+"_Muon/DownstreamMuonPID"
+   idalg.MuonTrackLocation = "Rec/"+name+"_Track/MuonForDownstream" # I would call it FromDownstream
+
+   downprotoseq = GaudiSequencer(name+"ProtoPSeq")
+   downprotos = ChargedProtoParticleMaker(name+"ProtoPMaker")
+   downprotos.Inputs = ["Rec/"+name+"_Downstream/FittedTracks"]
+   downprotos.Output = "Rec/ProtoP/"+name+"_ProtoPMaker/ProtoParticles"
+   downprotos.addTool( DelegatingTrackSelector, name="TrackSelector" )
+   #tracktypes = [ "Long","Upstream","Downstream","Ttrack","Velo","VeloR" ] # only downstream needed 
+   tracktypes = ["Downstream"]
+   #if (trackcont == "Best") :
+   #	tracktypes = [ "Long" ]
+   downprotos.TrackSelector.TrackTypes = tracktypes
+   selector = downprotos.TrackSelector
+   for tsname in tracktypes:
+   	selector.addTool(TrackSelector,name=tsname)
+   	ts = getattr(selector,tsname)
+   	# Set Cuts
+   	ts.TrackTypes = [tsname]
+#	ts.MinNDoF = 1 
+   	ts.MaxChi2Cut = 10
+
+   addmuonpid = ChargedProtoParticleAddMuonInfo(name+"addmuoninfo")
+   addmuonpid.InputMuonPIDLocation = "Rec/"+name+"_Muon/DownstreamMuonPID"
+   addmuonpid.ProtoParticleLocation = "Rec/ProtoP/"+name+"_ProtoPMaker/ProtoParticles"
+   #addmuonpid.OutputLevel = 0
+   combinedll = ChargedProtoCombineDLLsAlg(name+"CombineDLL")
+   combinedll.ProtoParticleLocation = "Rec/ProtoP/"+name+"_ProtoPMaker/ProtoParticles"
+   #combinedll.OutputLevel = 0
+   # DST post treatment
+   #TrackToDST(name+"TrackToDST").TracksInContainer = "Rec/Downstream/Tracks"
+   #downprotoseq.Members += [ TrackToDST(name+"TrackToDST"), downprotos, addmuonpid, combinedll ]
+   downprotoseq.Members += [ downprotos, addmuonpid, combinedll ]
+#        
+   DataOnDemandSvc().AlgMap.update( {
+                "/Event/Rec/"+name+"_Downstream/Tracks" : unpacker.getFullName(),
+                "/Event/Rec/"+name+"_Muon/DownstreamMuonPID" : idalg.getFullName(),
+#                "/Event/Rec/ProtoP/"+name+"ProtoPMaker" : downprotoseq.getFullName()
+		} )
+
+   return GSWrapper(name="WrappedDownMuonProtoPSeqFor"+name,
+                    sequencer=downprotoseq,
+                    output='Rec/ProtoP/' + name +'_ProtoPMaker/ProtoParticles',
+                    requiredSelections = [ downstreamSeq])
+   #     return Selection(name+"_SelPParts", Algorithm = MuonTTPParts, OutputBranch="Rec/ProtoP", Extension="ProtoParticles",RequiredSelections=[downstreamSeq], InputDataSetter=None)
+
+def makeMyMuons(name, protoParticlesMaker):
+   """
+     Make Particles out of the muon ProtoParticles
+   """
+   particleMaker =  BestPIDParticleMaker(name+"ParticleMaker" , Particle = "muon")
+   particleMaker.addTool(ProtoParticleMUONFilter,name="muon")
+   particleMaker.muon.Selection = ["RequiresDet='MUON' IsMuonLoose=True"]
+   particleMaker.Particles = [ "muon" ]
+   particleMaker.Input = "Rec/ProtoP/"+name+"_ProtoPMaker/ProtoParticles"
+   #particleMaker.OutputLevel = 0
+
+   DataOnDemandSvc().AlgMap.update( {
+           "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(),
+           "/Event/Phys/" + particleMaker.name() + '/Vertices'  : particleMaker.getFullName() 
+   } )
+
+
+   return Selection(name+"SelDownMuonParts", Algorithm = particleMaker, RequiredSelections = [protoParticlesMaker], InputDataSetter=None)
+
+#
+def DownJPsi( name,
+		protoPartSel,
+		TrChi2,
+		MuTMom,
+		MuMom,
+		MassPreComb,
+		Doca,
+		MassPostComb,
+		VertChi2 ) :
+   #self.makeMyMuons("DownMuonsForTrackEff", "Downstream")
+   
+   _MuCuts =  "((TRCHI2DOF < %(TrChi2)s) & (PT > %(MuTMom)s*MeV) & (P > %(MuMom)s*MeV) )" % locals()
+   _CombinationCuts = "((ADAMASS('J/psi(1S)') < %(MassPreComb)s * MeV) & (AMAXDOCA('') < %(Doca)s*mm) )" % locals()
+   _MotherCuts = "((ADMASS('J/psi(1S)') < %(MassPostComb)s * MeV) & (VFASPF(VCHI2/VDOF) < %(VertChi2)s))" % locals()
+   
+   _MyDownJpsis = CombineParticles( DecayDescriptor = "J/psi(1S) -> mu+ mu-" ,
+   DaughtersCuts = { "mu+": _MuCuts,  "mu-": _MuCuts }, CombinationCut = _CombinationCuts, MotherCut = _MotherCuts)
+
+   return Selection ( name,
+                      Algorithm = _MyDownJpsis,
+                      RequiredSelections = [protoPartSel])
+ 
+#########################################################################################
+def DownZ( name,
+		protoPartSel,
+		MuMom,
+		MuTMom,
+		MuMinEta,
+		MuMaxEta,
+		MassPreComb,
+		MassPostComb) :
+   #self.makeMyMuons("DownMuonsForTrackEff", "Downstream")
+   
+   _MuCuts =  "((ETA < %(MuMaxEta)s*MeV) & (ETA > %(MuMinEta)s*MeV) & (P > %(MuMom)s*MeV) & (PT > %(MuTMom)s*MeV) )" % locals()
+   _CombinationCuts = "((ADAMASS('Z0') < %(MassPreComb)s * MeV))" % locals()
+   _MotherCuts = "((ADMASS('Z0') < %(MassPostComb)s * MeV))" % locals()
+   
+   _MyDownZ = CombineParticles( DecayDescriptor = "Z0 -> mu+ mu-" ,
+   DaughtersCuts = { "mu+": _MuCuts,  "mu-": _MuCuts }, CombinationCut = _CombinationCuts, MotherCut = _MotherCuts)
+
+   return Selection ( name,
+                      Algorithm = _MyDownZ,
+                      RequiredSelections = [protoPartSel])
+ 
+#########################################################################################
+def DownUpsilon( name,
+		protoPartSel,
+		MuMom,
+		MuTMom,
+		MassPreComb,
+		MassPostComb) :
+   #self.makeMyMuons("DownMuonsForTrackEff", "Downstream")
+   
+   _MuCuts =  "( (P > %(MuMom)s*MeV) & (PT > %(MuTMom)s*MeV) )" % locals()
+   _CombinationCuts = "((ADAMASS('Z0') < %(MassPreComb)s * MeV))" % locals()
+   _MotherCuts = "((ADMASS('Upsilon(1S)') < %(MassPostComb)s * MeV))" % locals()
+   
+   _MyDownZ = CombineParticles( DecayDescriptor = "Upsilon(1S) -> mu+ mu-" ,
+   DaughtersCuts = { "mu+": _MuCuts,  "mu-": _MuCuts }, CombinationCut = _CombinationCuts, MotherCut = _MotherCuts)
+
+   return Selection ( name,
+                      Algorithm = _MyDownZ,
+                      RequiredSelections = [protoPartSel])
+ 
+#########################################################################################
+"""
+Define TisTos Prefilters
+
+"""
+
+
+def selHlt1Jpsi(name, HLT1TisTosSpecs, HLT1PassOnAll):
+   """
+   Filter the long track muon to be TOS on a HLT1 single muon trigger,
+   for J/psi selection
+   """
+   Hlt1Jpsi = TisTosParticleTagger(
+   TisTosSpecs = HLT1TisTosSpecs 
+   ,ProjectTracksToCalo = False
+   ,CaloClustForCharged = False
+   ,CaloClustForNeutral = False
+   ,TOSFrac = { 4:0.0, 5:0.0 }
+   ,NoRegex = True
+   )
+   Hlt1Jpsi.PassOnAll = HLT1PassOnAll
+
+   return Selection(name+"_SelHlt1Jpsi", Algorithm = Hlt1Jpsi, RequiredSelections = [ StdAllLooseMuons ])
+
+#########################################################
+def selHlt2Jpsi(name, hlt1Filter, HLT2TisTosSpecs, HLT2PassOnAll):
+   """
+   Filter the long track muon to be TOS on a HLT2 single muon trigger,
+   for J/psi selection
+   """
+   Hlt2Jpsi = TisTosParticleTagger(
+   TisTosSpecs =HLT2TisTosSpecs 
+   ,ProjectTracksToCalo = False
+   ,CaloClustForCharged = False
+   ,CaloClustForNeutral = False
+   ,TOSFrac = { 4:0.0, 5:0.0 }
+   ,NoRegex = False
+   )
+   Hlt2Jpsi.PassOnAll = HLT2PassOnAll
+   
+   return Selection(name+"_SelHlt2Jpsi", Algorithm = Hlt2Jpsi, RequiredSelections = [ hlt1Filter ])
+##########################################################
+        
+
+def trackingDownPreFilter(name, prefilter, seedcut):
+    #Test code for debugging
+    #Jpsi_already_there = LoKi__VoidFilter("Jpsi_already_there")
+    #Jpsi_already_there.Code = "1 <= CONTAINS('Rec/Track/Downstream')"
+
+    #Jpsi_not_yet_there = LoKi__VoidFilter("Jpsi_not_yet_there")
+    #Jpsi_not_yet_there.Code = "1 > CONTAINS('Rec/Track/Downstream')"
+
+    TrackToDST(name+"_DownTrackToDST").TracksInContainer = "Rec/"+name+"_Downstream/FittedTracks"
+
+    jpsidotracking=GaudiSequencer("DownTrackingFor" + name)
+    
+    #Add seed tracking
+    DownSeeding = PatSeeding(name+"_DownSeeding")
+    DownSeeding.OutputTracksName = "Rec/"+name+"_DownSeeding/Tracks" 
+    PatAlgConf.SeedingConf().configureAlg( SeedAlg = DownSeeding )
+    #DownSeeding.addTool(PatSeedingTool, name=name+"_PatSeedingTool")
+    #DownSeeding.addTool(PatSeedingTool)
+    #PatSeedingTool(name+"_PatSeedingTool").MinMomentum = seedcut
+    seedtoolname = name+"_PatSeedingTool"
+    DownSeeding.addTool(PatSeedingTool, name=seedtoolname)
+    seedtool = getattr(DownSeeding, seedtoolname)
+    seedtool.MinMomentum = seedcut
+
+    jpsidotracking.Members += [DownSeeding]
+    #Add Seed Fit
+    jpsidotracking.Members += [GaudiSequencer(name+"_TrackSeedFitSeq")]
+    #AddPatLongLivedTracking
+    downstreamTracking = PatLongLivedTracking(name+"_PatLongLivedTracking")
+    downstreamTracking.InputLocation = DownSeeding.OutputTracksName
+    downstreamTracking.OutputLocation = 'Rec/'+name+'_Downstream/Tracks'
+    jpsidotracking.Members += [ downstreamTracking ];
+    #AddDownstreamFitSeq
+    DownInitAlg = TrackStateInitAlg(name+"_InitSeedDownstream")
+    jpsidotracking.Members += [DownInitAlg]
+    DownInitAlg.TrackLocation = "Rec/"+name+"_Downstream/Tracks"
+    downstreamFit = ConfiguredFitDownstream(name+"_FitDownstream")
+    downstreamFit.TracksInContainer = 'Rec/'+name+'_Downstream/Tracks'
+    downstreamFit.TracksOutContainer = 'Rec/'+name+'_Downstream/FittedTracks'
+    jpsidotracking.Members += [downstreamFit]
+    jpsidotracking.Members += [TrackToDST(name+"_DownTrackToDST")]
+
+
+    return GSWrapper(name="WrappedDownstreamTracking"+name,
+                     sequencer=jpsidotracking,
+                     output='Rec/'+name+'_Downstream/FittedTracks',
+                     requiredSelections = [ prefilter])
+
+
+
+class GSWrapper(UniquelyNamedObject,
+                ClonableObject,
+                SelectionBase) :
+    
+    def __init__(self, name, sequencer, output, requiredSelections) :
+        UniquelyNamedObject.__init__(self, name)
+        ClonableObject.__init__(self, locals())
+        SelectionBase.__init__(self,
+                               algorithm = sequencer,
+                               outputLocation = output,
+                               requiredSelections = requiredSelections )
+
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffMuonTT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffMuonTT.py
new file mode 100644
index 000000000..6b7050524
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffMuonTT.py
@@ -0,0 +1,883 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+###'''
+###Module for construction of Jpsi -> mu mu /  Upsilon -> mu mu /  Z -> mu mu / B -> J/psi K to be used to measure tracking efficiency.  
+###Provides functions to build a Jpsi / Upsilon / Z / B selection , with a long track and a muonTT track.
+###Provides class HeavyIonTrackEffMuonTTConf, which constructs the Selections and 
+###StrippingLines given a configuration dictionary.
+###Original autor: Michel De Cian
+###Exported symbols (use python help!):
+###           - HeavyIonTrackEffMuonTTConf
+###           - selFilterLongPartsMu
+###           - selFilterLongPartsK
+###           - selMakeMuonTT
+###           - selMuonTTPParts
+###           - selMuonTTParts
+###           - selHlt1Jpsi
+###           - selHlt1Upsilon
+###           - selHlt1Z
+###           - selHlt2Jpsi
+###           - selHlt2Upsilon
+###           - selHlt2Z
+###           - selHlt2BJpsiKMu
+###           - selHlt2BJpsiKK
+###           - chargeFilter
+###           - makeResonanceMuMuTrackEff
+###           - makeBJpsiKTrackEff
+###           - filterHLT2ForBJpsiK
+###      
+###'''
+
+__author__ = ['Michael Kolpin']
+__date__ = '23/03/2015'
+__version__ = '$Revision: 1.1 $'
+
+
+__all__ = ('HeavyIonTrackEffMuonTTConf', 
+           'default_config',
+           'selFilterLongPartsMu',
+           'selFilterLongPartsMuUpsilonZ',
+           'selFilterLongPartsK',
+           'selMakeMuonTT',
+           'selMuonTTPParts',
+           'selMuonTTParts',
+           'selHlt1Jpsi',
+           'selHlt1Upsilon',
+           'selHlt1Z',
+           'selHlt2Jpsi',
+           'selHlt2Upsilon',
+           'selHlt2Z',
+           'selHlt2BJpsiKMu',
+           'selHlt2BJpsiKK',
+           'chargeFilter',
+           'makeResonanceMuMuTrackEff',
+           'makeBJpsiKTrackEff',
+           'filterHLT2ForBJpsiK')
+
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import Selection, DataOnDemand, ChargedProtoParticleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StrippingUtils.Utils import LineBuilder, checkConfig
+from StandardParticles import StdLooseKaons, StdLooseMuons, StdAllLooseMuons 
+
+
+from Configurables import (MuonCombRec, 
+                           MuonTTTrack,
+			   MuonHitDecode,
+                           PatAddTTCoord, 
+                           TrackMasterFitter, 
+                           TrackMasterExtrapolator, 
+                           TrackSelector, 
+                           NoPIDsParticleMaker,
+                           TisTosParticleTagger
+                           )
+
+
+#default_name = 'TrackEffMuonTT'
+
+default_config = {
+    'NAME'        : 'HeavyIonTrackEffMuonTT',
+    'WGs'         : ['IFT'],
+    'BUILDERTYPE' : 'HeavyIonTrackEffMuonTTConf',
+    'CONFIG'      : { 
+			'JpsiMassWin'                 : 500,
+			'UpsilonMassWin'              : 1500,
+			'ZMassWin'                    : 40000,
+			'BMassWin'                    : 500,
+			'JpsiMuonTTPT'                : 0,
+			'UpsilonMuonTTPT'             : 500,
+			'ZMuonTTPT'                   : 500,
+			'JpsiLongPT'                  : 1300,
+			'UpsilonLongPT'               : 1000,
+			'ZLongPT'                     : 10000,
+			'JpsiPT'                      : 1000,
+			'UpsilonPT'                   : 0,
+			'ZPT'                         : 0,
+			'JpsiLongMuonMinIP'           : 0.0, # removed, yanxi
+			'UpsilonLongMuonMinIP'        : 0,
+			'ZLongMuonMinIP'              : 0,
+			'JpsiMINIP'                   : 10000,   # make it dummy, yanxi
+			'UpsilonMINIP'                : 10000, #this is a dummy
+			'ZMINIP'                      : 10000, #this is a dummy
+			'BJpsiKMINIP'                 : 10000, #this is a dummy
+			'JpsiLongMuonTrackCHI2'       : 5,
+			'UpsilonLongMuonTrackCHI2'    : 5,
+			'ZLongMuonTrackCHI2'          : 5,
+			'VertexChi2'                  : 5,
+			'LongMuonPID'                 : 2,
+            'JpsiHlt1Filter'              : 'Hlt1.*Decision',
+            'JpsiHlt2Filter'              : 'Hlt2.*Decision',
+            'JpsiHlt1Triggers'            :  { "Hlt1GlobalDecision%TOS" : 0, "Hlt1GlobalDecision%TIS" : 0},
+            'Hlt1PassOnAll'               : True,
+			'UpsilonHlt1Triggers'         :  { "Hlt1GlobalDecision%TOS" : 0, "Hlt1GlobalDecision%TIS" : 0},
+			'ZHlt1Triggers'               :  { "Hlt1GlobalDecision%TOS" : 0, "Hlt1GlobalDecision%TIS" : 0},
+            'JpsiHlt2Triggers'            :  { "Hlt2TrackEffDiMuonMuonTT.*Decision%TOS" : 0, "Hlt2.*Decision%TOS" : 0},  # for test
+			#'JpsiHlt2Triggers'            :  { "Hlt2TrackEffDiMuonMuonTT.*Decision%TOS" : 0},
+			'UpsilonHlt2Triggers'         :  { "Hlt2TrackEffDiMuonMuonTT.*Decision%TOS" : 0, "Hlt2.*Decision%TOS" : 0},
+			'ZHlt2Triggers'               :  { "Hlt2TrackEffDiMuonMuonTT.*Decision%TOS" : 0, "Hlt2.*Decision%TOS" : 0},
+			'BJpsiKHlt2TriggersTUS'       :  { "Hlt2TrackEffDiMuonMuonTT.*Decision%TUS" : 0, "Hlt2.*Decision%TUS" : 0},
+			'BJpsiKHlt2TriggersTOS'       :  { "Hlt2TrackEffDiMuonMuonTT.*Decision%TOS" : 0, "Hlt2.*Decision%TOS" : 0, "Hlt2.*Decision%TIS" : 0},
+			'JpsiPrescale'                : 1,
+			'UpsilonPrescale'             : 1,
+			'ZPrescale'                   : 1,
+			'BJpsiKPrescale'              : 1,
+			'Postscale'                   : 1
+                    },
+    'STREAMS'     :   ["IFT"]
+    }
+
+
+class HeavyIonTrackEffMuonTTConf(LineBuilder) :
+    """
+    Builder of Jpsi->mu mu, Upsilon-> mu mu, Z-> mu mu and B -> J/psi K stripping Selection and StrippingLine for measuring the tracking efficiency.
+    Constructs the Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> TrackEffMuonTTConfig = { .... }
+    >>> from StrippingSelections import StrippingTrackEffMuonTT
+    >>> confTrackEffMuonTT = StrippingTrackEffMuonTT.HeavyIonTrackEffMuonTTConf(name = "bla", config = TrackEffMuonTTConfig)
+    >>> stream.appendLines( confTrackEffMuonTT.lines() )
+    And:
+    >>> trackEffLines = confTrackEffMuonTT.lines()
+    >>> for line in trackEffLines :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Lines of interest:
+
+    TrackEffMuonTT_JpsiLine1       : Jpsi-> mu mu, long: minus, muonTT: plus
+    TrackEffMuonTT_JpsiLine2       : Jpsi-> mu mu, long: plus, muonTT: minus
+
+    TrackEffMuonTT_UpsilonLine1    : Upsilon-> mu mu, long: minus, muonTT: plus
+    TrackEffMuonTT_UpsilonLine2    : Upsilon-> mu mu, long: plus, muonTT: minus
+    
+    TrackEffMuonTT_ZLine1          : Z-> mu mu, long: minus, muonTT: plus
+    TrackEffMuonTT_ZLine2          : Z-> mu mu, long: plus, muonTT: minus
+
+    TrackEffMuonTT_BJpsiKLine1     : B->Jpsi K, long: minus, muon: plus
+    TrackEffMuonTT_BJpsiKLine2     : B->Jpsi K, long: plus, muon: minus
+
+    lines                          : List of all lines
+
+    Exports as class data member:
+    HeavyIonTrackEffMuonTTConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    ################################################################################################
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config = None):
+            
+        LineBuilder.__init__(self, name, config)
+
+                
+        # ########################################################################################
+        # -->
+        # --> INITIALIZING ALL THE OBJECTS NEEDED TO FORM THE LINES <--
+        # -->
+        # ########################################################################################
+
+        # initialize all the general things 
+        # idea: initialize the first object, that will be called, pass it to the second one, etc.
+                                
+        # make the muonTT tracks (two instances, as the Z has a different seed station for the muon system than the rest)
+        self.SelMakeMuonTTJpsi = selMakeMuonTT(name+'Jpsi', XTolParam = 25.0, MaxChi2TolParam = 7.0, MinAxProjParam = 5.5, MajAxProjParam = 25.0, seedStation = 2)
+        self.SelMakeMuonTTZ = selMakeMuonTT(name+'Z', XTolParam = 25.0, MaxChi2TolParam = 7.0, MinAxProjParam = 5.5, MajAxProjParam = 25.0, seedStation = 4)
+        self.SelMuonTTPPartsJpsi = selMuonTTPParts(name+'Jpsi', muonTTTrackMaker = self.SelMakeMuonTTJpsi )
+        self.SelMuonTTPPartsZ = selMuonTTPParts(name+'Z', muonTTTrackMaker = self.SelMakeMuonTTZ )
+        self.SelMuonTTPartsJpsi = selMuonTTParts(name+'Jpsi', protoParticlesMaker = self.SelMuonTTPPartsJpsi )
+        self.SelMuonTTPartsZ = selMuonTTParts(name+'Z', protoParticlesMaker = self.SelMuonTTPPartsZ )
+
+        self.SelFilterLongPartsMuJpsi = selFilterLongPartsMu(name+'Jpsi')
+        self.SelFilterLongPartsMuUpsilonZ  = selFilterLongPartsMuUpsilonZ(name+'UpsilonZ')
+        # ####################################
+        # J/psis
+        self.SelHlt1JpsiMinus = selHlt1Jpsi(name+'JpsiMinus', longPartsFilter = self.SelFilterLongPartsMuJpsi, triggers = config['JpsiHlt1Triggers'], passonall = config['Hlt1PassOnAll'])
+        self.SelHlt1JpsiPlus = selHlt1Jpsi(name+'JpsiPlus', longPartsFilter = self.SelFilterLongPartsMuJpsi, triggers = config['JpsiHlt1Triggers'], passonall = config['Hlt1PassOnAll'])
+        self.SelHlt2JpsiMinus = selHlt2Jpsi(name+'JpsiMinus', hlt1Filter = self.SelHlt1JpsiMinus, triggers = config['JpsiHlt2Triggers'])
+        self.SelHlt2JpsiPlus = selHlt2Jpsi(name+'JpsiPlus', hlt1Filter = self.SelHlt1JpsiPlus, triggers = config['JpsiHlt2Triggers'])
+
+        self.muonTTMinusJpsi = chargeFilter(name+'MuonTTJpsiMinus', trackAlgo =  'MuonTT',   partSource =  self.SelMuonTTPartsJpsi , charge = -1)
+        self.muonTTPlusJpsi = chargeFilter(name+'MuonTTJpsiPlus', trackAlgo = 'MuonTT',  partSource = self.SelMuonTTPartsJpsi,  charge = 1)
+        self.longMinusJpsi = chargeFilter( name+'LongJpsiMinus', trackAlgo = 'LongMu',   partSource = self.SelHlt2JpsiMinus, charge = -1)
+        self.longPlusJpsi = chargeFilter( name+'LongJpsiPlus', trackAlgo =  'LongMu',   partSource = self.SelHlt2JpsiPlus  , charge = 1)
+        # ##########################################
+        # Upsilons
+        self.SelHlt1UpsilonMinus = selHlt1Upsilon(name+'UpsilonMinus', longPartsFilter = self.SelFilterLongPartsMuUpsilonZ, triggers = config['UpsilonHlt1Triggers'])
+        self.SelHlt1UpsilonPlus = selHlt1Upsilon(name+'UpsilonPlus', longPartsFilter = self.SelFilterLongPartsMuUpsilonZ, triggers = config['UpsilonHlt1Triggers'])
+        self.SelHlt2UpsilonMinus = selHlt2Upsilon(name+'UpsilonMinus', hlt1Filter = self.SelHlt1UpsilonMinus, triggers = config['UpsilonHlt2Triggers'])
+        self.SelHlt2UpsilonPlus = selHlt2Upsilon(name+'UpsilonPlus', hlt1Filter = self.SelHlt1UpsilonPlus, triggers = config['UpsilonHlt2Triggers'])
+
+        self.muonTTPlusUpsilon = chargeFilter(name+'MuonTTUpsilonPlus', trackAlgo = 'MuonTT',  partSource = self.SelMuonTTPartsJpsi ,  charge = 1)
+        self.muonTTMinusUpsilon = chargeFilter(name+'MuonTTUpsilonMinus', trackAlgo =  'MuonTT',   partSource =  self.SelMuonTTPartsJpsi , charge = -1)
+        self.longPlusUpsilon = chargeFilter( name+'LongUpsilonPlus', trackAlgo =  'LongMu',   partSource = self.SelHlt2UpsilonPlus  , charge = 1)
+        self.longMinusUpsilon = chargeFilter( name+'LongUpsilonMinus', trackAlgo = 'LongMu',   partSource = self.SelHlt2UpsilonMinus, charge = -1)
+        # ##########################################
+        # Zs
+        self.SelHlt1ZMinus = selHlt1Z(name+'ZMinus', longPartsFilter = self.SelFilterLongPartsMuUpsilonZ, triggers = config['ZHlt1Triggers'])
+        self.SelHlt1ZPlus = selHlt1Z(name+'ZPlus', longPartsFilter = self.SelFilterLongPartsMuUpsilonZ, triggers = config['ZHlt1Triggers'])
+        self.SelHlt2ZMinus = selHlt2Z(name+'ZMinus', hlt1Filter = self.SelHlt1ZMinus, triggers = config['ZHlt2Triggers'])
+        self.SelHlt2ZPlus = selHlt2Z(name+'ZPlus', hlt1Filter = self.SelHlt1ZPlus, triggers = config['ZHlt2Triggers'])
+
+        self.muonTTPlusZ = chargeFilter(name+'MuonTTZPlus', trackAlgo = 'MuonTT',  partSource = self.SelMuonTTPartsZ ,  charge = 1)
+        self.muonTTMinusZ = chargeFilter(name+'MuonTTZMinus', trackAlgo =  'MuonTT',   partSource =  self.SelMuonTTPartsZ , charge = -1)
+        self.longPlusZ = chargeFilter( name+'LongZPlus', trackAlgo =  'LongMu',   partSource = self.SelHlt2ZPlus  , charge = 1)
+        self.longMinusZ = chargeFilter( name+'LongZMinus', trackAlgo = 'LongMu',   partSource = self.SelHlt2ZMinus, charge = -1)
+        # ##########################################
+        # B-> J/psi K
+        # first for the J/psi object
+        self.SelHlt1BJpsiKMinus = selHlt1Jpsi(name+'BJpsiKMinus', longPartsFilter = self.SelFilterLongPartsMuJpsi, triggers = config['JpsiHlt1Triggers'], passonall = config['Hlt1PassOnAll']) # HLT1 is the same as for Jpsis!
+        self.SelHlt1BJpsiKPlus = selHlt1Jpsi(name+'BJpsiKPlus', longPartsFilter = self.SelFilterLongPartsMuJpsi, triggers = config['JpsiHlt1Triggers'], passonall = config['Hlt1PassOnAll'])
+        self.SelHlt2BJpsiKMinus = selHlt2BJpsiKMu(name+'BJpsiKMinus', hlt1Filter = self.SelHlt1BJpsiKMinus, triggers = config['BJpsiKHlt2TriggersTUS'])
+        self.SelHlt2BJpsiKPlus = selHlt2BJpsiKMu(name+'BJpsiKPlus', hlt1Filter = self.SelHlt1BJpsiKPlus, triggers = config['BJpsiKHlt2TriggersTUS'])
+        
+        # and now for the K (no distinction for charged needed, will be done automatically be the decay descriptor)
+        self.SelFilterLongPartsBJpsiKK = selFilterLongPartsK(name+'BJpsiK')
+        self.SelHlt2BJpsiKK = selHlt2BJpsiKK( name+'BJpsiK',longPartsFilter = self.SelFilterLongPartsBJpsiKK, triggers = config['BJpsiKHlt2TriggersTUS'])
+        
+        self.muonTTPlusBJpsiK = chargeFilter(name+'MuonTTBJpsiKPlus', trackAlgo = 'MuonTT',  partSource = self.SelMuonTTPartsJpsi ,  charge = 1)
+        self.muonTTMinusBJpsiK = chargeFilter(name+'MuonTTBJpsiKMinus', trackAlgo =  'MuonTT',   partSource =  self.SelMuonTTPartsJpsi , charge = -1)
+        self.longPlusBJpsiK = chargeFilter( name+'LongBJpsiKPlus', trackAlgo =  'LongMu',   partSource = self.SelHlt2BJpsiKPlus  , charge = 1)
+        self.longMinusBJpsiK = chargeFilter( name+'LongBJpsiKMinus', trackAlgo = 'LongMu',   partSource = self.SelHlt2BJpsiKMinus, charge = -1)
+        # ##################################################################################################################1
+        # def makeResonanceMuMuTrackEff(name, resonanceName, decayDescriptor, plusCharge, minusCharge, 
+        # mode, massWin, vertexChi2, resonancePT, muonTTPT, longPT, longMuonPID, longMuonMinIPCHI2, longMuonTrackCHI2):
+
+        # J/psi -> mu mu, tag-and-probe
+        self.makeJpsiMuMuTrackEff1 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuTrackEff1', 
+                                                               resonanceName = 'J/psi(1S)',
+                                                               decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                               plusCharge = self.muonTTPlusJpsi, 
+                                                               minusCharge = self.longMinusJpsi,
+                                                               mode = 1,
+                                                               massWin = config['JpsiMassWin'], 
+                                                               vertexChi2 = config['VertexChi2'],
+                                                               resonancePT = config['JpsiPT'],
+                                                               muonTTPT = config['JpsiMuonTTPT'], 
+                                                               longPT = config['JpsiLongPT'], 
+                                                               longMuonPID = config['LongMuonPID'],
+                                                               longMuonMinIP = config['JpsiLongMuonMinIP'],
+                                                               longMuonTrackCHI2 = config['JpsiLongMuonTrackCHI2'],
+                                                               motherMinIP = config['JpsiMINIP'])
+        # J/psi -> mu mu, probe-and-tag
+        self.makeJpsiMuMuTrackEff2 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuTrackEff2', 
+                                                               resonanceName = 'J/psi(1S)',
+                                                               decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                               minusCharge = self.muonTTMinusJpsi,
+                                                               plusCharge = self.longPlusJpsi, 
+                                                               mode = 2,
+                                                               massWin = config['JpsiMassWin'], 
+                                                               vertexChi2 = config['VertexChi2'],
+                                                               resonancePT = config['JpsiPT'],
+                                                               muonTTPT = config['JpsiMuonTTPT'], 
+                                                               longPT = config['JpsiLongPT'], 
+                                                               longMuonPID = config['LongMuonPID'],
+                                                               longMuonMinIP = config['JpsiLongMuonMinIP'],
+                                                               longMuonTrackCHI2 = config['JpsiLongMuonTrackCHI2'],
+                                                               motherMinIP = config['JpsiMINIP'])
+        # ##################################################################################################################
+        # # Upsilon -> mu mu, tag-and-probe
+        self.makeUpsilonMuMuTrackEff1 = makeResonanceMuMuTrackEff(name+'_MakeUpsilonMuMuTrackEff1', 
+                                                                  resonanceName = 'Upsilon(1S)',
+                                                                  decayDescriptor = 'Upsilon(1S) -> mu+ mu-',
+                                                                  plusCharge = self.muonTTPlusUpsilon, 
+                                                                  minusCharge = self.longMinusUpsilon,
+                                                                  mode = 1,
+                                                                  massWin = config['UpsilonMassWin'], 
+                                                                  vertexChi2 = config['VertexChi2'],
+                                                                  resonancePT = config['UpsilonPT'],
+                                                                  muonTTPT = config['UpsilonMuonTTPT'], 
+                                                                  longPT = config['UpsilonLongPT'], 
+                                                                  longMuonPID = config['LongMuonPID'],
+                                                                  longMuonMinIP = config['UpsilonLongMuonMinIP'],
+                                                                  longMuonTrackCHI2 = config['UpsilonLongMuonTrackCHI2'],
+                                                                  motherMinIP = config['UpsilonMINIP'])
+        # Upsilon -> mu mu, probe-and-tag
+        self.makeUpsilonMuMuTrackEff2 = makeResonanceMuMuTrackEff(name+'_MakeUpsilonMuMuTrackEff2', 
+                                                                  resonanceName = 'Upsilon(1S)',
+                                                                  decayDescriptor = 'Upsilon(1S) -> mu+ mu-',
+                                                                  plusCharge = self.longPlusUpsilon, 
+                                                                  minusCharge = self.muonTTMinusUpsilon,
+                                                                  mode = 2,
+                                                                  massWin = config['UpsilonMassWin'], 
+                                                                  vertexChi2 = config['VertexChi2'],
+                                                                  resonancePT = config['UpsilonPT'],
+                                                                  muonTTPT = config['UpsilonMuonTTPT'], 
+                                                                  longPT = config['UpsilonLongPT'], 
+                                                                  longMuonPID = config['LongMuonPID'],
+                                                                  longMuonMinIP = config['UpsilonLongMuonMinIP'],
+                                                                  longMuonTrackCHI2 = config['UpsilonLongMuonTrackCHI2'],
+                                                                  motherMinIP = config['UpsilonMINIP'])
+        # ##################################################################################################################
+        # Z -> mu mu, tag-and-probe
+        self.makeZMuMuTrackEff1 = makeResonanceMuMuTrackEff(name+'_MakeZMuMuTrackEff1', 
+                                                            resonanceName = 'Z0',
+                                                            decayDescriptor = 'Z0 -> mu+ mu-',
+                                                            plusCharge = self.muonTTPlusZ, 
+                                                            minusCharge = self.longMinusZ,
+                                                            mode = 1,
+                                                            massWin = config['ZMassWin'], 
+                                                            vertexChi2 = config['VertexChi2'],
+                                                            resonancePT = config['ZPT'],
+                                                            muonTTPT = config['ZMuonTTPT'], 
+                                                            longPT = config['ZLongPT'], 
+                                                            longMuonPID = config['LongMuonPID'],
+                                                            longMuonMinIP = config['ZLongMuonMinIP'],
+                                                            longMuonTrackCHI2 = config['ZLongMuonTrackCHI2'],
+                                                            motherMinIP = config['ZMINIP'])
+        # Z -> mu mu, probe-and-tag
+        self.makeZMuMuTrackEff2 = makeResonanceMuMuTrackEff(name+'_MakeZMuMuTrackEff2', 
+                                                            resonanceName = 'Z0',
+                                                            decayDescriptor = 'Z0 -> mu+ mu-',
+                                                            plusCharge = self.longPlusZ, 
+                                                            minusCharge = self.muonTTMinusZ,
+                                                            mode = 2,
+                                                            massWin = config['ZMassWin'], 
+                                                            vertexChi2 = config['VertexChi2'],
+                                                            resonancePT = config['ZPT'],
+                                                            muonTTPT = config['ZMuonTTPT'], 
+                                                            longPT = config['ZLongPT'], 
+                                                            longMuonPID = config['LongMuonPID'],
+                                                            longMuonMinIP = config['ZLongMuonMinIP'],
+                                                            longMuonTrackCHI2 = config['ZLongMuonTrackCHI2'],
+                                                            motherMinIP = config['ZMINIP'])
+        # ##################################################################################################################
+        # B -> J/psi K exclusive, tag-and-probe
+        self.makeJpsiMuMuForBJpsiKTrackEff1 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuForBJpsiKTrackEff1', 
+                                                                        resonanceName = 'J/psi(1S)',
+                                                                        decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                                        plusCharge = self.muonTTPlusBJpsiK , 
+                                                                        minusCharge = self.longMinusBJpsiK,
+                                                                        mode = 1,
+                                                                        massWin = config['JpsiMassWin'], 
+                                                                        vertexChi2 = config['VertexChi2'],
+                                                                        resonancePT = config['JpsiPT'],
+                                                                        muonTTPT = config['JpsiMuonTTPT'], 
+                                                                        longPT = config['JpsiLongPT'], 
+                                                                        longMuonPID = config['LongMuonPID'],
+                                                                        longMuonMinIP = config['JpsiLongMuonMinIP'],
+                                                                        longMuonTrackCHI2 = config['JpsiLongMuonTrackCHI2'],
+                                                                        motherMinIP = config['BJpsiKMINIP'])
+        self.makeBJpsiKTrackEff1 = makeBJpsiKTrackEff(name+'_MakeBJpsiKTrackEff1',
+                                                      JpsiSel = self.makeJpsiMuMuForBJpsiKTrackEff1,
+                                                      KSel = self.SelHlt2BJpsiKK,
+                                                      massWin = config['BMassWin'], 
+                                                      vertexChi2 = config['VertexChi2'])
+        self.BJpsiKHLT2Filter1 = filterHLT2ForBJpsiK( name+'_BJpsiKHLT2Filter1', BJpsiKSel = self.makeBJpsiKTrackEff1, triggers = config['BJpsiKHlt2TriggersTOS']) # Event must be filtered to be sure its TOS on the tag muon and the Kaon
+        
+        # B -> J/psi K exclusive, probe-and-tag
+        self.makeJpsiMuMuForBJpsiKTrackEff2 = makeResonanceMuMuTrackEff(name+'_MakeJpsiMuMuForBJpsiKTrackEff2', 
+                                                                        resonanceName = 'J/psi(1S)',
+                                                                        decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+                                                                        plusCharge = self.longPlusBJpsiK , 
+                                                                        minusCharge = self.muonTTMinusBJpsiK,
+                                                                        mode = 2,
+                                                                        massWin = config['JpsiMassWin'], 
+                                                                        vertexChi2 = config['VertexChi2'],
+                                                                        resonancePT = config['JpsiPT'],
+                                                                        muonTTPT = config['JpsiMuonTTPT'], 
+                                                                        longPT = config['JpsiLongPT'], 
+                                                                        longMuonPID = config['LongMuonPID'],
+                                                                        longMuonMinIP = config['JpsiLongMuonMinIP'],
+                                                                        longMuonTrackCHI2 = config['JpsiLongMuonTrackCHI2'],
+                                                                        motherMinIP = config['BJpsiKMINIP'])
+        
+        self.makeBJpsiKTrackEff2 = makeBJpsiKTrackEff(name+'_MakeBJpsiKTrackEff2',
+                                                      JpsiSel = self.makeJpsiMuMuForBJpsiKTrackEff2,
+                                                      KSel = self.SelHlt2BJpsiKK,
+                                                      massWin = config['BMassWin'], 
+                                                      vertexChi2 = config['VertexChi2'])
+        
+        self.BJpsiKHLT2Filter2 = filterHLT2ForBJpsiK( name+'_BJpsiKHLT2Filter2', BJpsiKSel = self.makeBJpsiKTrackEff2, triggers = config['BJpsiKHlt2TriggersTOS'])  # Event must be filtered to be sure its TOS on the tag muon and the Kaon
+        # # ##################################################################################################################
+    
+
+
+        ################################################
+        # Jpsi -> mu mu stripping lines (long + muonTT)
+        ################################################
+        self.TrackEffMuonTTJpsi_line1 = StrippingLine(name+'_JpsiLine1',
+                                                      prescale = config['JpsiPrescale'],
+                                                      postscale = config['Postscale'],
+                                                      HLT1 = "HLT_PASS_RE('%(JpsiHlt1Filter)s')" % config,
+                                                      HLT2 = "HLT_PASS_RE('%(JpsiHlt2Filter)s')" % config,
+                                                      selection = self.makeJpsiMuMuTrackEff1)
+        
+
+        self.TrackEffMuonTTJpsi_line2 = StrippingLine(name+'_JpsiLine2',
+                                                      prescale = config['JpsiPrescale'],
+                                                      postscale = config['Postscale'],
+                                                      HLT1 = "HLT_PASS_RE('%(JpsiHlt1Filter)s')" % config,
+                                                      HLT2 = "HLT_PASS_RE('%(JpsiHlt2Filter)s')" % config,
+                                                      selection = self.makeJpsiMuMuTrackEff2)
+
+    
+        ################################################
+        # Upsilon -> mu mu stripping lines (long + muonTT)
+        ################################################
+        self.TrackEffMuonTTUpsilon_line1 = StrippingLine(name+'_UpsilonLine1',
+                                                         prescale = config['UpsilonPrescale'],
+                                                         postscale = config['Postscale'],
+                                                         selection = self.makeUpsilonMuMuTrackEff1)
+                                                         
+
+        self.TrackEffMuonTTUpsilon_line2 = StrippingLine(name+'_UpsilonLine2',
+                                                         prescale = config['UpsilonPrescale'],
+                                                         postscale = config['Postscale'],
+                                                         selection = self.makeUpsilonMuMuTrackEff2)
+                                                         
+        
+        ################################################
+        # Z -> mu mu stripping lines (long + muonTT)
+        ################################################
+        self.TrackEffMuonTTZ_line1 = StrippingLine(name+'_ZLine1',
+                                                   prescale = config['ZPrescale'],
+                                                   postscale = config['Postscale'],
+                                                   selection = self.makeZMuMuTrackEff1)
+        
+
+
+        self.TrackEffMuonTTZ_line2 = StrippingLine(name+'_ZLine2',
+                                                   prescale = config['ZPrescale'],
+                                                   postscale = config['Postscale'],
+                                                   selection = self.makeZMuMuTrackEff2)
+        
+        ################################################
+        # B -> J/psi K stripping lines (long + muonTT + long)
+        ################################################                                        
+        self.TrackEffMuonTTBJpsiK_line1 = StrippingLine(name+'_BJpsiKLine1',
+                                                        prescale = config['BJpsiKPrescale'],
+                                                        postscale = config['Postscale'],
+                                                        #HLT = "HLT_PASS('Hlt2MuTrackDecision')",
+                                                        selection = self.BJpsiKHLT2Filter1
+                                                        )
+        
+        self.TrackEffMuonTTBJpsiK_line2 = StrippingLine(name+'_BJpsiKLine2',
+                                                        prescale = config['BJpsiKPrescale'],
+                                                        postscale = config['Postscale'],
+                                                        #HLT = "HLT_PASS('Hlt2MuTrackDecision')",
+                                                        selection = self.BJpsiKHLT2Filter2)
+                                                        
+
+        
+        ################################################
+        # register the lines
+        ################################################
+        self.registerLine( self.TrackEffMuonTTJpsi_line1 )
+        self.registerLine( self.TrackEffMuonTTJpsi_line2 )
+        self.registerLine( self.TrackEffMuonTTUpsilon_line1 )
+        self.registerLine( self.TrackEffMuonTTUpsilon_line2 )
+        self.registerLine( self.TrackEffMuonTTZ_line1 )
+        self.registerLine( self.TrackEffMuonTTZ_line2 )
+        self.registerLine( self.TrackEffMuonTTBJpsiK_line1 )
+        self.registerLine( self.TrackEffMuonTTBJpsiK_line2 )
+
+
+
+
+
+# ########################################################################################
+# -->
+# --> PREPARE THE LONG TRACKS <--
+# -->
+# ########################################################################################
+
+# ########################################################################################
+# The long track preparation, including hard coded cuts
+# ########################################################################################
+def selFilterLongPartsMu(name):
+    """
+    Get Muons from StdAllLooseMuons for detached Jpsi , changed from StdLooseMuons by yanxi
+    """
+    Filter = FilterDesktop()
+    FilterLongPartsMu = Filter.configurable(name+"FilterLongPartsMu")
+    FilterLongPartsMu.Code = "(HASMUON) & (ISMUON) & (PIDmu > 2.0) & (P > 10000) & (PT > 1300*MeV) & (TRCHI2DOF < 2.0)"  # remove IP cut, yanxi
+    #FilterLongPartsMu.Code = "(HASMUON) & (ISMUON) & (PIDmu > 2.0) & (P > 10000) & (PT > 1300*MeV) & (MIPDV(PRIMARY) > 0.5) & (TRCHI2DOF < 2.0) & (MIPCHI2DV(PRIMARY) > 200)" 
+    # These cuts are now tighter than the trigger that follows
+
+    return Selection(name+"_SelFilterLongPartsMu", Algorithm = FilterLongPartsMu, RequiredSelections = [StdAllLooseMuons])
+# ########################################################################################
+def selFilterLongPartsMuUpsilonZ(name):
+    """
+    Get Muons from StdAllLooseMuons for Upsilon and Z
+    """
+    Filter = FilterDesktop()
+    FilterLongPartsMuUpsilonZ = Filter.configurable(name+"FilterLongPartsMuUpsilonZ")
+    FilterLongPartsMuUpsilonZ.Code = "(HASMUON) & (ISMUON) & (PIDmu > 2.0) & (P > 10000) & (PT > 3000*MeV) & (TRCHI2DOF < 2.0)"
+
+    return Selection(name+"_SelFilterLongPartsMuUpsilonZ", Algorithm = FilterLongPartsMuUpsilonZ, RequiredSelections = [StdAllLooseMuons])
+# ########################################################################################
+def selFilterLongPartsK(name):
+    """
+    Get Kaons from StdLooseKaons
+    """
+    Filter = FilterDesktop()
+    FilterLongPartsK = Filter.configurable(name+"FilterLongPartsK")
+    FilterLongPartsK.Code = "((~HASMUON) | (~ISMUON)) & (P > 10000) & (PT > 800) & (PIDK > 0) & (TRCHI2DOF < 5.0) & (MIPDV(PRIMARY) > 0.1*mm)"
+#
+    return Selection(name+"_SelFilterLongPartsK", Algorithm = FilterLongPartsK, RequiredSelections = [StdLooseKaons])
+# ########################################################################################
+
+# ########################################################################################
+# -->
+# --> PATTERN RECOGNITION AND MUONTT TRACK MAKING <--
+# -->
+# ########################################################################################
+
+# ########################################################################################
+# The pattern recognition -> muonTT track stuff
+# ########################################################################################
+def selMakeMuonTT(name, XTolParam, MaxChi2TolParam, MinAxProjParam, MajAxProjParam, seedStation):
+    """
+    Make a muonTT track out of hits in the muon station and TT, and give it some options to configure
+    """
+    MakeMuonTT = MuonTTTrack(name+"MakeMuonTT")
+    MakeMuonTT.ToolName = "MuonCombRec"
+    MakeMuonTT.addTool( MuonCombRec )
+    MakeMuonTT.MuonCombRec.MeasureTime = True
+    MakeMuonTT.MuonCombRec.CloneKiller = False
+    MakeMuonTT.MuonCombRec.SkipStation = -1 # -1=no skip, 0=M1, 1=M2, 2=M3, 3=M4, 4=M5
+    MakeMuonTT.MuonCombRec.DecodingTool = "MuonHitDecode"
+    MakeMuonTT.MuonCombRec.PadRecTool = "MuonPadFromCoord"
+    MakeMuonTT.MuonCombRec.ClusterTool = "MuonFakeClustering" # to enable: "MuonClusterRec"
+    MakeMuonTT.MuonCombRec.PhysicsTiming = True
+    MakeMuonTT.MuonCombRec.AssumeCosmics = False
+    MakeMuonTT.MuonCombRec.AssumePhysics = True
+    MakeMuonTT.MuonCombRec.StrongCloneKiller = False 
+    MakeMuonTT.MuonCombRec.SeedStation = seedStation # default seet station is M5
+    MakeMuonTT.MuonCombRec.addTool( MuonHitDecode, ("MuonHitDecode") )
+    MakeMuonTT.MuonCombRec.MuonHitDecode.SkipHWNumber = True
+    # #############################################################
+    MakeMuonTT.addTool( PatAddTTCoord )
+    MakeMuonTT.PatAddTTCoord.YTolSlope = 400000.0
+    MakeMuonTT.PatAddTTCoord.XTol = XTolParam
+    MakeMuonTT.PatAddTTCoord.XTolSlope = 400000.0
+    MakeMuonTT.PatAddTTCoord.MinAxProj = MinAxProjParam
+    MakeMuonTT.PatAddTTCoord.MajAxProj = MajAxProjParam
+    MakeMuonTT.PatAddTTCoord.MaxChi2Tol = MaxChi2TolParam
+    # ################################################################
+    MakeMuonTT.addTool( TrackMasterFitter)
+    MakeMuonTT.TrackMasterFitter.MaterialLocator = "SimplifiedMaterialLocator"
+    MakeMuonTT.addTool( TrackMasterExtrapolator ) 
+    MakeMuonTT.TrackMasterExtrapolator.MaterialLocator = "SimplifiedMaterialLocator"
+    # ################################################################
+    MakeMuonTT.AddTTHits = True
+    MakeMuonTT.MC = False
+    MakeMuonTT.OutputLevel = 4
+    #
+    #return Selection(name+"_SelMakeMuonTT", Algorithm = MakeMuonTT,  InputDataSetter=None)
+    return Selection(name+"_SelMakeMuonTT", Algorithm = MakeMuonTT,  OutputBranch='Rec', Extension='Tracks', InputDataSetter=None)
+# ########################################################################################
+# Make the protoparticles
+# ########################################################################################
+def selMuonTTPParts(name, muonTTTrackMaker):
+    """
+    Make ProtoParticles out of muonTT tracks
+    """
+    return ChargedProtoParticleSelection(name+"_SelMuonTTPParts", RequiredSelections=[muonTTTrackMaker] )
+# ################################################################
+def selMuonTTParts(name, protoParticlesMaker):
+    """
+    Make Particles out of the muonTT ProtoParticles
+    """
+    MuonTTParts = NoPIDsParticleMaker(name+"MuonTTParts")
+    MuonTTParts.Particle = 'muon'
+    MuonTTParts.addTool( TrackSelector )
+    MuonTTParts.TrackSelector.TrackTypes = [ "Long" ]
+    MuonTTParts.Input =  "Rec/"+name+"_SelMuonTTPParts/ProtoParticles"
+    MuonTTParts.OutputLevel = 4
+#
+    return Selection(name+"_SelMuonTTParts", Algorithm = MuonTTParts, RequiredSelections = [protoParticlesMaker], InputDataSetter=None)
+# ########################################################################################
+
+
+# ########################################################################################
+# -->
+# --> HLT STUFF <--
+# -->
+# ########################################################################################
+
+
+# ########################################################################################
+# HLT 1 lines we run on
+# ########################################################################################
+def selHlt1Jpsi(name, longPartsFilter, triggers, passonall):
+    """
+    Filter the long track muon to be TOS on a HLT1 single muon trigger, for J/psi selection
+    """
+    Hlt1Jpsi = TisTosParticleTagger(name+"Hlt1Jpsi")
+    #Hlt1Jpsi.TisTosSpecs = { "Hlt1TrackMuonDecision%TOS" : 0}
+    Hlt1Jpsi.TisTosSpecs = triggers
+    Hlt1Jpsi.ProjectTracksToCalo = False
+    Hlt1Jpsi.CaloClustForCharged = False
+    Hlt1Jpsi.CaloClustForNeutral = False
+    Hlt1Jpsi.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt1Jpsi.NoRegex = True
+    Hlt1Jpsi.PassOnAll = passonall # TESTING!
+#
+    return Selection(name+"_SelHlt1Jpsi", Algorithm = Hlt1Jpsi, RequiredSelections = [ longPartsFilter ])
+# ################################################################
+def selHlt1Upsilon(name, longPartsFilter, triggers):
+    """
+    Filter the long track muon to be TOS on a HLT1 single muon trigger, for Upsilon selection
+    """
+    Hlt1Upsilon = TisTosParticleTagger(name+"Hlt1Upsilon")
+    #Hlt1Upsilon.TisTosSpecs = { "Hlt1TrackMuonDecision%TOS" : 0, "Hlt1SingleMuonNoIPDecision%TOS" : 0, "Hlt1SingleMuonHighPTDecision%TOS" : 0} 
+    Hlt1Upsilon.TisTosSpecs = triggers
+    Hlt1Upsilon.ProjectTracksToCalo = False
+    Hlt1Upsilon.CaloClustForCharged = False
+    Hlt1Upsilon.CaloClustForNeutral = False
+    Hlt1Upsilon.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt1Upsilon.NoRegex = True
+    #Hlt1Upsilon.PassOnAll = True # TESTING!
+#
+    return Selection(name+"_SelHlt1Upsilon", Algorithm = Hlt1Upsilon, RequiredSelections = [ longPartsFilter ])
+# ################################################################
+def selHlt1Z(name, longPartsFilter, triggers):
+    """
+    Filter the long track muon to be TOS on a HLT1 single muon trigger, for Z selection
+    """
+    Hlt1Z = TisTosParticleTagger(name+"Hlt1Z")
+    #Hlt1Z.TisTosSpecs = { "Hlt1SingleMuonHighPTDecision%TOS" : 0}
+    Hlt1Z.TisTosSpecs = triggers
+    Hlt1Z.ProjectTracksToCalo = False
+    Hlt1Z.CaloClustForCharged = False
+    Hlt1Z.CaloClustForNeutral = False
+    Hlt1Z.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt1Z.NoRegex = True
+    #Hlt1Z.PassOnAll = True # TESTING!
+#
+    return Selection(name+"_SelHlt1Z", Algorithm = Hlt1Z, RequiredSelections = [ longPartsFilter ])
+# ################################################################
+
+# ########################################################################################
+# HLT 2 lines we run on
+# ########################################################################################
+def selHlt2Jpsi(name, hlt1Filter, triggers):
+    """
+    Filter the long track muon to be TOS on a HLT2 single muon trigger, for J/psi selection
+    """
+    Hlt2Jpsi = TisTosParticleTagger(name+"Hlt2Jpsi")
+    #Hlt2Jpsi.TisTosSpecs = { "Hlt2SingleMuon.*Decision%TOS" : 0} # take all HLT2SingleMuon triggers
+    Hlt2Jpsi.TisTosSpecs = triggers
+    Hlt2Jpsi.ProjectTracksToCalo = False
+    Hlt2Jpsi.CaloClustForCharged = False
+    Hlt2Jpsi.CaloClustForNeutral = False
+    Hlt2Jpsi.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2Jpsi.NoRegex = False
+    #Hlt2Jpsi.PassOnAll = True # TESTING!
+#
+    return Selection(name+"_SelHlt2Jpsi", Algorithm = Hlt2Jpsi, RequiredSelections = [ hlt1Filter ])
+# ################################################################
+def selHlt2Upsilon(name, hlt1Filter, triggers):
+    """
+    Filter the long track muon to be TOS on a HLT2 single muon trigger, for Upsilon selection
+    """
+    Hlt2Upsilon = TisTosParticleTagger(name+"Hlt2Upsilon")
+    #Hlt2Upsilon.TisTosSpecs = { "Hlt2SingleMuonLowPTDecision%TOS" : 0} 
+    Hlt2Upsilon.TisTosSpecs = triggers
+    Hlt2Upsilon.ProjectTracksToCalo = False
+    Hlt2Upsilon.CaloClustForCharged = False
+    Hlt2Upsilon.CaloClustForNeutral = False
+    Hlt2Upsilon.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2Upsilon.NoRegex = True
+    #Hlt2Upsilon.PassOnAll = True # TESTING!
+#
+    return Selection(name+"_SelHlt2Upsilon", Algorithm = Hlt2Upsilon, RequiredSelections = [ hlt1Filter ])
+# ################################################################
+def selHlt2Z(name, hlt1Filter, triggers):
+    """
+    Filter the long track muon to be TOS on a HLT2 single muon trigger, for Z selection
+    """
+    Hlt2Z = TisTosParticleTagger(name+"Hlt2Z")
+    #Hlt2Z.TisTosSpecs = { "Hlt2SingleMuonHighPTDecision%TOS" : 0}
+    Hlt2Z.TisTosSpecs = triggers
+    Hlt2Z.ProjectTracksToCalo = False
+    Hlt2Z.CaloClustForCharged = False
+    Hlt2Z.CaloClustForNeutral = False
+    Hlt2Z.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2Z.NoRegex = True
+    #Hlt2Z.PassOnAll = True # TESTING!
+#
+    return Selection(name+"_SelHlt2Z", Algorithm = Hlt2Z, RequiredSelections = [ hlt1Filter ])
+# ################################################################
+def selHlt2BJpsiKMu(name, hlt1Filter, triggers):
+    """
+    Filter the long track muon to be TUS on a HLT2 mu+track trigger, for B->J/psi K selection (mainly a speed up)
+    """
+    Hlt2BJpsiKMu = TisTosParticleTagger(name+"Hlt2BJpsiKMu")
+    #Hlt2BJpsiKMu.TisTosSpecs = { "Hlt2MuTrackDecision%TUS" : 0} # TUS, not TOS, not a typo!!!
+    Hlt2BJpsiKMu.TisTosSpecs = triggers
+    Hlt2BJpsiKMu.ProjectTracksToCalo = False
+    Hlt2BJpsiKMu.CaloClustForCharged = False
+    Hlt2BJpsiKMu.CaloClustForNeutral = False
+    Hlt2BJpsiKMu.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2BJpsiKMu.NoRegex = True
+    #Hlt2BJpsiKMu.PassOnAll = True # TESTING!
+#
+    return Selection(name+"_SelHlt2BJpsiKMu", Algorithm = Hlt2BJpsiKMu, RequiredSelections = [ hlt1Filter ])
+# ################################################################
+def selHlt2BJpsiKK(name, longPartsFilter, triggers): # No HLT1 needed, as event in HLT1 already triggered with single muon
+    """
+    Filter the long track Kaon to be TUS on a HLT2 mu+track trigger, for B->J/psi K selection (mainly a speed up)
+    """
+    Hlt2BJpsiKK = TisTosParticleTagger(name+"Hlt2BJpsiKK")
+    #Hlt2BJpsiKK.TisTosSpecs = { "Hlt2MuTrackDecision%TUS" : 0}  # TUS, not TOS, not a typo!!!
+    Hlt2BJpsiKK.TisTosSpecs = triggers
+    Hlt2BJpsiKK.ProjectTracksToCalo = False
+    Hlt2BJpsiKK.CaloClustForCharged = False
+    Hlt2BJpsiKK.CaloClustForNeutral = False
+    Hlt2BJpsiKK.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2BJpsiKK.NoRegex = True
+    #Hlt2BJpsiKK.PassOnAll = True # TESTING!
+    #
+    return Selection(name+"_SelHlt2BJpsiKK", Algorithm = Hlt2BJpsiKK, RequiredSelections = [ longPartsFilter ])
+# ########################################################################################
+        
+# ########################################################################################
+# -->
+# --> FILTERS AND RESONANCE MAKERS <--
+# -->
+# ########################################################################################
+
+
+# ########################################################################################
+# Charge filter, that filters, well, the charge and takes the particles from the right source (long or muonTT)
+# ########################################################################################
+def chargeFilter(name, trackAlgo,  partSource, charge):
+    """
+    Select plus or minus charge for muonTT or long track
+    """
+    Filter = FilterDesktop() #there is maybe a change needed
+    myFilter1 = Filter.configurable(name+"chargeFilter1")
+        
+    if(charge == -1):
+        myFilter1.Code = "(Q < 0)"
+    if(charge == 1):
+        myFilter1.Code = "(Q > 0)"    
+        
+    if(trackAlgo == 'MuonTT'):
+        return Selection( name+'_chargeFilter'+'MuonTT', Algorithm = myFilter1, RequiredSelections = [  partSource ] )
+    if(trackAlgo == 'LongMu'):
+        return Selection( name+'_chargeFilter'+'LongMu', Algorithm = myFilter1, RequiredSelections = [  partSource ] )
+# ################################################################
+
+
+# ########################################################################################
+# Resonance maker, that fits two muons to a resonance (J/psi, Upsilon, Z)
+# ########################################################################################    
+def makeResonanceMuMuTrackEff(name, resonanceName, decayDescriptor, plusCharge, minusCharge, 
+                              mode, massWin, vertexChi2, resonancePT, muonTTPT, longPT, longMuonPID, longMuonMinIP, longMuonTrackCHI2, motherMinIP):    
+    """
+    Create and return a Resonance -> mu mu Selection object, with one track a long track
+    and the other a MuonTT track.
+    Arguments:
+    name                 : name of the selection
+    resonanceName        : name of the resonance
+    decayDescriptor      : decayDescriptor of the decay
+    plusCharge           : algorithm for selection positvely charged tracks
+    minusCharge          : algorithm for selection negatively charged tracks
+    mode                 : Tag(-)-and-Probe(+) (1) or  Tag(+)-and-Probe(-) (2)
+    massWin              : mass window around J/psi mass
+    VertexChi2           : vertex chi2 / ndof of mu mu vertex
+    resonancePT          : Pt of the resonance particle (f.ex. J/psi)
+    muonTTPT             : Pt of MuonTT-track muon
+    longPT               : Pt of Long-track muon
+    longMuonPID          : CombDLL(mu-pi) of long-track muon
+    motherMinIP          : Minimal IP of the mother
+    NOT IMPLEMENTED YET:
+    longMuonMinIPCHI2    : MinIPCHI2 of long-track muon
+    longMuonTrackCHI2    : Track-Chi2 of long-track muon
+    """
+    
+    massWinCombCut = 2 * massWin
+    
+    Combine = CombineParticles()
+    MuonTTResonance = Combine.configurable(name+"MuonTTResonance")
+    MuonTTResonance.DecayDescriptor = decayDescriptor
+
+    MuonTTResonance.OutputLevel = 4 
+
+    if(mode == 1):
+        MuonTTResonance.DaughtersCuts = {"mu+"	:	"PT > %(muonTTPT)s"  % locals(),
+                                         "mu-"	:	"(PT > %(longPT)s) & (PIDmu > %(longMuonPID)s)"  % locals() }
+
+        MuonTTResonance.CombinationCut = "ADAMASS('%(resonanceName)s') < %(massWinCombCut)s" % locals()
+        MuonTTResonance.MotherCut = "(ADMASS('%(resonanceName)s') < %(massWin)s) & (VFASPF(VCHI2/VDOF) < %(vertexChi2)s) & (MIPDV(PRIMARY) < %(motherMinIP)s)" % locals()
+    
+        return Selection( name, Algorithm = MuonTTResonance, RequiredSelections = [minusCharge, plusCharge] )
+     
+    if(mode == 2):
+        MuonTTResonance.DaughtersCuts = {"mu-"	:	"PT > %(muonTTPT)s"  % locals(),
+                                         "mu+"	:	"(PT > %(longPT)s) & (PIDmu > %(longMuonPID)s)"  % locals() }
+
+        MuonTTResonance.CombinationCut = "ADAMASS('%(resonanceName)s') < %(massWinCombCut)s" % locals()
+        MuonTTResonance.MotherCut = "(ADMASS('%(resonanceName)s') < %(massWin)s) & (VFASPF(VCHI2/VDOF) < %(vertexChi2)s) & (MIPDV(PRIMARY) < %(motherMinIP)s)" % locals()
+        
+        return Selection( name, Algorithm = MuonTTResonance, RequiredSelections = [plusCharge, minusCharge] )
+    
+    
+# ################################################################
+
+# ########################################################################################
+# Make a B->J/psi K out of a J/psi and a K
+# ########################################################################################
+def makeBJpsiKTrackEff(name, JpsiSel, KSel, massWin, vertexChi2): 
+    """
+    Create and return a B -> J/psi K Selection object, with a J/psi (long+muonTT) and a Kaon.
+
+    Arguments:
+    name                 : name of the selection
+    massWin              : width of the mass window
+    vertexChi2           : vertexChi2/ndof for vertex
+    """
+
+    massWinCombCut = 2 * massWin
+    
+    Combine = CombineParticles()
+    MuonTTBJpsiK = Combine.configurable(name+"BJpsiK")
+    MuonTTBJpsiK.DecayDescriptor = "[B+ -> J/psi(1S) K+]cc"
+
+    MuonTTBJpsiK.OutputLevel = 4 
+    
+    MuonTTBJpsiK.DaughtersCuts = {"J/psi(1S)"	:	"DMASS('J/psi(1S)') < 500" ,
+                                  "K+"          :	"ALL" }
+             
+    MuonTTBJpsiK.CombinationCut = "ADAMASS('B+') < %(massWinCombCut)s" % locals()
+    MuonTTBJpsiK.MotherCut = "(ADMASS('B+') < %(massWin)s) & (VFASPF(VCHI2/VDOF) < %(vertexChi2)s) & (BPVDIRA > 0.95)" % locals()
+
+    return Selection( name, Algorithm = MuonTTBJpsiK, RequiredSelections = [ KSel, JpsiSel ] )
+# ################################################################
+
+# ########################################################################################
+# Filter the B->J/psi K to be triggered on the long muon and the Kaon
+# ########################################################################################
+def filterHLT2ForBJpsiK(name, BJpsiKSel, triggers):
+    """
+    Filter B->J/psi K to be triggered on mu+track for the long track muon and Kaon
+    """
+    Hlt2BJpsiK = TisTosParticleTagger(name+"_Hlt2BJpsiK")
+    #Hlt2BJpsiK.TisTosSpecs = { "Hlt2MuTrackDecision%TOS" : 0}
+    Hlt2BJpsiK.TisTosSpecs = triggers
+    Hlt2BJpsiK.ProjectTracksToCalo = False
+    Hlt2BJpsiK.CaloClustForCharged = False
+    Hlt2BJpsiK.CaloClustForNeutral = False
+    Hlt2BJpsiK.TOSFrac = { 4:0.0, 5:0.0 }
+    Hlt2BJpsiK.NoRegex = False
+    #Hlt2BJpsiK.PassOnAll = True
+    return Selection( name, Algorithm = Hlt2BJpsiK, RequiredSelections = [BJpsiKSel] )
+# ########################################################################################
+
+
+
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffVeloMuon.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffVeloMuon.py
new file mode 100644
index 000000000..bff62114d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonTrackEffVeloMuon.py
@@ -0,0 +1,525 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+## #####################################################################
+# A stripping selection for VeloMuon J/Psi->mu+mu- decays
+# To be used for tracking studies
+#
+# @authors G. Krocker, P. Seyfert, S. Wandernoth
+# @date 2010-Aug-17
+#
+# @authors P. Seyfert, A. Jaeger
+# @date 2011-Mar-17
+# 
+# @author M. Kolpin
+# @date 2015-Mar-23
+# 
+#######################################################################
+
+__author__ = ['Michael Kolpin']
+__date__ = '23/03/2015'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = ('HeavyIonTrackEffVeloMuonConf',
+           'default_config',
+           'chargeFilter',
+           'longtrackFilter',
+           'selMuonPParts',
+           'makeMyMuons',
+           'makeResonanceVeloMuTrackEff',
+           'selHlt1Jpsi',
+           'selHlt2Jpsi',
+           'trackingPreFilter',
+           )
+
+
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles	
+#from Configurables import CombineParticles	
+from PhysSelPython.Wrappers import Selection, SelectionSequence, DataOnDemand
+from Configurables import ChargedProtoParticleMaker, NoPIDsParticleMaker, DataOnDemandSvc, DelegatingTrackSelector, TrackSelector, CombinedParticleMaker, BestPIDParticleMaker
+from Configurables import FastVeloTracking
+  
+from StrippingConf.StrippingLine import StrippingLine
+from Configurables import TrackStateInitAlg, TrackEventFitter, TrackPrepareVelo,TrackContainerCopy, Tf__PatVeloSpaceTool, StandaloneMuonRec
+from Configurables import TrackCloneFinder
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons  # changed from StdLooseMuons, yanxi
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, TisTosParticleTagger
+#from Configurables import TisTosParticleTagger
+
+from Configurables import GaudiSequencer
+from Configurables import TrackSys
+from PhysSelPython.Wrappers import AutomaticData
+# Get the fitters
+from TrackFitter.ConfiguredFitters import ConfiguredFit
+
+from Configurables import TrackEventCloneKiller,VeloMuonBuilder
+from Configurables import TrackEventFitter, TrackMasterFitter
+from Configurables import TrackKalmanFilter, TrackMasterExtrapolator
+#from TrackFitter.ConfiguredFitters import ConfiguredFastFitter
+#from Configurables import TrackCloneFinder
+
+from SelPy.utils import ( UniquelyNamedObject,
+                          ClonableObject,
+                          SelectionBase )
+
+default_config = {
+    'NAME'        : 'HeavyIonTrackEffVeloMuon',
+    'WGs'         : ['IFT'],
+    'BUILDERTYPE' : 'HeavyIonTrackEffVeloMuonConf',
+    'CONFIG'      : {
+			"TrChi2VeMu":		5.	# adimensional
+		,	"TrChi2LongMu":		3.	# adimensional
+		,	"JpsiPt":		0.5	# GeV
+		,	"ZPt":			0.5	# GeV
+		,	"UpsilonPt":		0.5	# GeV
+		,	"TrPt":			100.	# MeV
+		,	"TrP":			5.	# GeV
+		,	"ZTrPt":		20000.	# MeV
+		,	"ZTrP":			0.	# MeV
+		,	"UpsilonTrPt":		500.	# MeV
+		,	"UpsilonTrP":		0.	# MeV
+		,	"LongP":		7.	# GeV
+		,	"ZTrMinEta":		2.0	# adimensional
+		,	"ZTrMaxEta":		4.5	# adimensional
+		,	"MuDLL":		1.	# adimensional
+		,	"VertChi2":		2.	# adimensional
+		,	"ZVertChi2":		10000.	# adimensional, dummy
+		,	"UpsilonVertChi2":	10000.	# adimensional, dummy
+		,	"MassPreComb":		1000.	# MeV
+		,	"ZMassPreComb":		100000. # MeV
+		,	"UpsilonMassPreComb":	100000. # MeV
+		,	"MassPostComb":		400.	# MeV
+		,	"ZMassPostComb":	40000.	# MeV
+		,	"UpsilonMassPostComb":	1500.	# MeV
+		,	"Prescale":		1.	# adimensional
+		,	"ZPrescale":		1.	# adimensional
+		,	"UpsilonPrescale":	1.	# adimensional
+		,	"Postscale":		1.	# adimensional
+		,	"ZPostscale":		1.	# adimensional
+		,	"UpsilonPostscale":	1.	# adimensional
+        ,   'JpsiHlt1Filter' : 'Hlt1.*Decision'
+        ,   'JpsiHlt2Filter' : 'Hlt2.*Decision'
+		,	'HLT1TisTosSpecs'	: { "Hlt1GlobalDecision%TOS" : 0, "Hlt1GlobalDecision%TIS" : 0} #no reg. expression allowed(see selHlt1Jpsi )
+		,	'ZHLT1TisTosSpecs'	: { "Hlt1GlobalDecision%TOS" : 0, "Hlt1GlobalDecision%TIS" : 0 } #no reg. expression allowed(see selHlt1Jpsi )
+		,	'UpsilonHLT1TisTosSpecs': { "Hlt1GlobalDecision%TOS" : 0, "Hlt1GlobalDecision%TIS" : 0 } #no reg. expression allowed(see selHlt1Jpsi )
+		,	'HLT1PassOnAll'		: True
+	    #		'UpsilonHlt2Triggers'         :  { "Hlt2TrackEffDiMuonMuonTT.*Decision%TOS" : 0, "Hlt2.*Decision%TOS" : 0, "Hlt2.*Decision%TIS" : 0},
+		,	'HLT2TisTosSpecs'	: { "Hlt2TrackEffDiMuonVeloMuon.*Decision%TOS" : 0, "Hlt2.*Decision%TOS" : 0} #reg. expression allowed
+		,	'ZHLT2TisTosSpecs'	: { "Hlt2TrackEffDiMuonVeloMuon.*Decision%TOS" : 0, "Hlt2.*Decision%TOS" : 0} #reg. expression allowed
+		,	'UpsilonHLT2TisTosSpecs': { "Hlt2TrackEffDiMuonVeloMuon.*Decision%TOS" : 0, "Hlt2.*Decision%TOS" : 0} #reg. expression allowed
+		,	'HLT2PassOnAll'		: False
+         },
+    'STREAMS'     :  ["IFT"]
+    }
+
+
+
+class HeavyIonTrackEffVeloMuonConf(LineBuilder):
+    """
+    Definition of tag and probe JPsi stripping.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+	
+	# CHECK TRIGGER
+        self.TisTosPreFilter1Jpsi = selHlt1Jpsi('TisTosFilter1Jpsifor'+name, HLT1TisTosSpecs = config['HLT1TisTosSpecs'], HLT1PassOnAll = config['HLT1PassOnAll'])
+        self.TisTosPreFilter2Jpsi = selHlt2Jpsi('TisTosFilter2Jpsifor'+name, hlt1Filter = self.TisTosPreFilter1Jpsi, HLT2TisTosSpecs = config['HLT2TisTosSpecs'], HLT2PassOnAll = config['HLT2PassOnAll'])
+        
+        self.TisTosPreFilter1Z = selHlt1Jpsi('TisTosFilter1Zfor'+name, HLT1TisTosSpecs = config['ZHLT1TisTosSpecs'], HLT1PassOnAll = config['HLT1PassOnAll'])
+        self.TisTosPreFilter2Z = selHlt2Jpsi('TisTosFilter2Zfor'+name, hlt1Filter = self.TisTosPreFilter1Z, HLT2TisTosSpecs = config['ZHLT2TisTosSpecs'], HLT2PassOnAll = config['HLT2PassOnAll'])
+        
+        self.TisTosPreFilter1Upsilon = selHlt1Jpsi('TisTosFilter1Upsilonfor'+name, HLT1TisTosSpecs = config['UpsilonHLT1TisTosSpecs'], HLT1PassOnAll = config['HLT1PassOnAll'])
+        self.TisTosPreFilter2Upsilon = selHlt2Jpsi('TisTosFilter2Upsilonfor'+name, hlt1Filter = self.TisTosPreFilter1Upsilon, HLT2TisTosSpecs = config['UpsilonHLT2TisTosSpecs'], HLT2PassOnAll = config['HLT2PassOnAll'])
+        
+        # CHECK FOR TAG-TRACKS
+        muCut = "((TRCHI2DOF < %(TrChi2LongMu)s)) & (PT > %(TrPt)s) & (P > %(LongP)s) & (PIDmu > %(MuDLL)s)" % config
+        vmCut = "((TRCHI2DOF < %(TrChi2VeMu)s)) & (PT > %(TrPt)s) & (P > %(TrP)s)" % config
+        ZmuCut = "((PT > %(ZTrPt)s) & (ETA > %(ZTrMinEta)s) & (ETA < %(ZTrMaxEta)s) & (P > %(ZTrP)s) )" % config
+        UpsilonmuCut = "((PT > %(UpsilonTrPt)s) & (P > %(UpsilonTrP)s) )" % config
+        
+        self.longbothJpsi = longtrackFilter( name+'LongJpsiBoth', trackAlgo = 'LongMu', partSource = StdAllLooseMuons, muCut = muCut)
+        self.longMinusJpsi = chargeFilter( name+'LongJpsiMinus', trackAlgo = 'LongMu',   partSource = self.longbothJpsi, charge = -1, vmCut = vmCut, muCut = muCut)
+        self.longPlusJpsi = chargeFilter( name+'LongJpsiPlus', trackAlgo =  'LongMu',   partSource = self.longbothJpsi, charge = 1, vmCut = vmCut, muCut = muCut)
+        
+        self.longbothZ = longtrackFilter( name+'LongZBoth', trackAlgo = 'LongMu', partSource = StdAllLooseMuons, muCut = ZmuCut)
+        self.longMinusZ = chargeFilter( name+'LongZMinus', trackAlgo = 'LongMu',   partSource = self.longbothZ, charge = -1, vmCut = ZmuCut, muCut = ZmuCut)
+        self.longPlusZ = chargeFilter( name+'LongZPlus', trackAlgo =  'LongMu',   partSource = self.longbothZ, charge = 1, vmCut = ZmuCut, muCut = ZmuCut)
+        
+        self.longbothUpsilon = longtrackFilter( name+'LongUpsilonBoth', trackAlgo = 'LongMu', partSource = StdAllLooseMuons, muCut = UpsilonmuCut)
+        self.longMinusUpsilon = chargeFilter( name+'LongUpsilonMinus', trackAlgo = 'LongMu',   partSource = self.longbothUpsilon, charge = -1, vmCut = UpsilonmuCut, muCut = UpsilonmuCut)
+        self.longPlusUpsilon = chargeFilter( name+'LongUpsilonPlus', trackAlgo =  'LongMu',   partSource = self.longbothUpsilon, charge = 1, vmCut = UpsilonmuCut, muCut = UpsilonmuCut)
+        
+        # RECONSTRUCT PROBE-TRACKS
+        self.TrackingPreFilter = trackingPreFilter(name+"_Jpsi", [self.TisTosPreFilter2Jpsi,self.longbothJpsi]) 
+        self.VeloMuProtoPFilter = selMuonPParts(name+"_Jpsi", self.TrackingPreFilter)
+        self.VeloMuPFilter = makeMyMuons(name+"_Jpsi", self.VeloMuProtoPFilter)
+        
+        self.ZTrackingPreFilter = trackingPreFilter(name+"_Z", [self.TisTosPreFilter2Z,self.longbothZ]) 
+        self.ZVeloMuProtoPFilter = selMuonPParts(name+"_Z", self.ZTrackingPreFilter)
+        self.ZVeloMuPFilter = makeMyMuons(name+"_Z", self.ZVeloMuProtoPFilter)
+           
+        self.UpsilonTrackingPreFilter = trackingPreFilter(name+"_Upsilon", [self.TisTosPreFilter2Upsilon,self.longbothUpsilon]) 
+        self.UpsilonVeloMuProtoPFilter = selMuonPParts(name+"_Upsilon", self.UpsilonTrackingPreFilter)
+        self.UpsilonVeloMuPFilter = makeMyMuons(name+"_Upsilon", self.UpsilonVeloMuProtoPFilter)
+           
+        self.veloMuonMinusJpsi = chargeFilter(name+'MuonVeloJpsiMinus', trackAlgo =  'VeloMuon',   partSource =  self.VeloMuPFilter , charge = -1, vmCut = vmCut, muCut = muCut)
+        self.veloMuonPlusJpsi = chargeFilter(name+'MuonVeloJpsiPlus', trackAlgo = 'VeloMuon',  partSource = self.VeloMuPFilter,  charge = 1, vmCut = vmCut, muCut = muCut)
+        
+        self.veloMuonMinusZ = chargeFilter(name+'MuonVeloZMinus', trackAlgo =  'VeloMuon',   partSource =  self.ZVeloMuPFilter , charge = -1, vmCut = ZmuCut, muCut = ZmuCut)
+        self.veloMuonPlusZ = chargeFilter(name+'MuonVeloZPlus', trackAlgo = 'VeloMuon',  partSource = self.ZVeloMuPFilter,  charge = 1, vmCut = ZmuCut, muCut = ZmuCut)
+        
+        self.veloMuonMinusUpsilon = chargeFilter(name+'MuonVeloUpsilonMinus', trackAlgo =  'VeloMuon',   partSource =  self.UpsilonVeloMuPFilter , charge = -1, vmCut = UpsilonmuCut, muCut = UpsilonmuCut)
+        self.veloMuonPlusUpsilon = chargeFilter(name+'MuonVeloUpsilonPlus', trackAlgo = 'VeloMuon',  partSource = self.UpsilonVeloMuPFilter,  charge = 1, vmCut = UpsilonmuCut, muCut = UpsilonmuCut)
+        
+        # TAG-AND-PROBE
+        self.JpsiMuMuTrackEff1 = makeResonanceVeloMuTrackEff(name + "VeloMuJpsiSel1", 
+        						   resonanceName = 'J/psi(1S)', 
+        						   decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+        						   plusCharge = self.veloMuonPlusJpsi, 
+        						   minusCharge = self.longMinusJpsi,
+        						   mode = 1,
+        						   TrPt = config['TrPt'], 
+        						   TrP = config['TrP'],
+        						   MuDLL = config['MuDLL'],
+        						   MassPreComb = config['MassPreComb'], 
+        						   VertChi2 = config['VertChi2'], 
+        						   MassPostComb = config['MassPostComb'], 
+        						   JpsiPt = config['JpsiPt'])   
+        
+        self.JpsiMuMuTrackEff2 = makeResonanceVeloMuTrackEff(name + "VeloMuJpsiSel2", 
+        						   resonanceName = 'J/psi(1S)', 
+        						   decayDescriptor = 'J/psi(1S) -> mu+ mu-',
+        						   plusCharge = self.longPlusJpsi, 
+        						   minusCharge = self.veloMuonMinusJpsi,
+        						   mode = 2,
+        						   TrPt = config['TrPt'],  
+        						   TrP = config['TrP'],
+        						   MuDLL = config['MuDLL'],
+        						   MassPreComb = config['MassPreComb'], 
+        						   VertChi2 = config['VertChi2'], 
+        						   MassPostComb = config['MassPostComb'], 
+        						   JpsiPt = config['JpsiPt'])    
+        
+        self.ZMuMuTrackEff1 = makeResonanceVeloMuTrackEff(name + "VeloMuZSel1", 
+        						  resonanceName = 'Z0', 
+        						  decayDescriptor = 'Z0 -> mu+ mu-',
+        						  plusCharge = self.veloMuonPlusZ, 
+        						  minusCharge = self.longMinusZ,
+        						  mode = 1,
+        						  TrPt = config['ZTrPt'], 
+        						  TrP = config['ZTrP'],
+        						  MuDLL = config['MuDLL'],
+        						  MassPreComb = config['ZMassPreComb'], 
+        						  VertChi2 = config['ZVertChi2'], 
+        						  MassPostComb = config['ZMassPostComb'], 
+        						  JpsiPt = config['ZPt'])   
+        
+        self.ZMuMuTrackEff2 = makeResonanceVeloMuTrackEff(name + "VeloMuZSel2", 
+        						  resonanceName = 'Z0', 
+        						  decayDescriptor = 'Z0 -> mu+ mu-',
+        						  plusCharge = self.longPlusZ, 
+        						  minusCharge = self.veloMuonMinusZ,
+        						  mode = 2,
+        						  TrPt = config['ZTrPt'], 
+        						  TrP = config['ZTrP'],
+        						  MuDLL = config['MuDLL'],
+        						  MassPreComb = config['ZMassPreComb'], 
+        						  VertChi2 = config['ZVertChi2'], 
+        						  MassPostComb = config['ZMassPostComb'], 
+        						  JpsiPt = config['ZPt'])   
+        
+        self.UpsilonMuMuTrackEff1 = makeResonanceVeloMuTrackEff(name + "VeloMuUpsilonSel1", 
+        						  resonanceName = 'Upsilon(1S)', 
+        						  decayDescriptor = 'Upsilon(1S) -> mu+ mu-',
+        						  plusCharge = self.veloMuonPlusUpsilon, 
+        						  minusCharge = self.longMinusUpsilon,
+        						  mode = 1,
+        						  TrPt = config['UpsilonTrPt'], 
+        						  TrP = config['UpsilonTrP'],
+        						  MuDLL = config['MuDLL'],
+        						  MassPreComb = config['UpsilonMassPreComb'], 
+        						  VertChi2 = config['UpsilonVertChi2'], 
+        						  MassPostComb = config['UpsilonMassPostComb'], 
+        						  JpsiPt = config['UpsilonPt'])   
+        
+        self.UpsilonMuMuTrackEff2 = makeResonanceVeloMuTrackEff(name + "VeloMuUpsilonSel2", 
+        						  resonanceName = 'Upsilon(1S)', 
+        						  decayDescriptor = 'Upsilon(1S) -> mu+ mu-',
+        						  plusCharge = self.longPlusUpsilon, 
+        						  minusCharge = self.veloMuonMinusUpsilon,
+        						  mode = 2,
+        						  TrPt = config['UpsilonTrPt'], 
+        						  TrP = config['UpsilonTrP'],
+        						  MuDLL = config['MuDLL'],
+        						  MassPreComb = config['UpsilonMassPreComb'], 
+        						  VertChi2 = config['UpsilonVertChi2'], 
+        						  MassPostComb = config['UpsilonMassPostComb'], 
+        						  JpsiPt = config['UpsilonPt'])   
+        
+        self.nominal_line1 =  StrippingLine(name + 'Line1'
+                                            , prescale = config['Prescale']
+                                            , postscale = config['Postscale']
+                                            , algos=[self.JpsiMuMuTrackEff1]
+                                            , RequiredRawEvents = ["Trigger","Muon","Velo","Tracker"]
+                                            , HLT1 = "HLT_PASS_RE('%(JpsiHlt1Filter)s')" % config
+                                            , HLT2 = "HLT_PASS_RE('%(JpsiHlt2Filter)s')" % config
+                                            , MDSTFlag = True)
+
+        self.nominal_line2 =  StrippingLine(name + 'Line2'
+                                            , prescale = config['Prescale']
+                                            , postscale = config['Postscale']
+                                            , algos=[self.JpsiMuMuTrackEff2]
+                                            , RequiredRawEvents = ["Trigger","Muon","Velo","Tracker"]
+                                            , HLT1 = "HLT_PASS_RE('%(JpsiHlt1Filter)s')" % config
+                                            , HLT2 = "HLT_PASS_RE('%(JpsiHlt2Filter)s')" % config
+                                            , MDSTFlag = True)
+        
+        self.Z_line1 =  StrippingLine(name + 'ZLine1',  prescale = config['ZPrescale'], postscale = config['ZPostscale'], algos=[self.ZMuMuTrackEff1], RequiredRawEvents = ["Trigger","Muon","Velo","Tracker"], MDSTFlag = True)
+        self.Z_line2 =  StrippingLine(name + 'ZLine2',  prescale = config['ZPrescale'], postscale = config['ZPostscale'], algos=[self.ZMuMuTrackEff2], RequiredRawEvents = ["Trigger","Muon","Velo","Tracker"], MDSTFlag = True)
+        
+        self.Upsilon_line1 =  StrippingLine(name + 'UpsilonLine1',  prescale = config['UpsilonPrescale'], postscale = config['UpsilonPostscale'], algos=[self.UpsilonMuMuTrackEff1], RequiredRawEvents = ["Trigger","Muon","Velo","Tracker"], MDSTFlag = True)
+        self.Upsilon_line2 =  StrippingLine(name + 'UpsilonLine2',  prescale = config['UpsilonPrescale'], postscale = config['UpsilonPostscale'], algos=[self.UpsilonMuMuTrackEff2], RequiredRawEvents = ["Trigger","Muon","Velo","Tracker"], MDSTFlag = True)
+        
+        self.registerLine(self.nominal_line1)
+        self.registerLine(self.nominal_line2)
+        
+        self.registerLine(self.Z_line1)
+        self.registerLine(self.Z_line2)
+        
+        self.registerLine(self.Upsilon_line1)
+        self.registerLine(self.Upsilon_line2)
+	
+# ########################################################################################
+# Make the protoparticles
+# ########################################################################################
+def selMuonPParts(name, trackingSeq):
+   """
+       Make ProtoParticles out of VeloMuon tracks
+   """
+   veloprotos = ChargedProtoParticleMaker(name+"ProtoPMaker")
+   veloprotos.Inputs = ["Rec/VeloMuon/"+name+"Tracks"]
+   veloprotos.Output = "Rec/ProtoP/ProtoPMaker/"+name+"ProtoParticles"
+   veloprotos.addTool( DelegatingTrackSelector, name="TrackSelector" )
+   tracktypes = [ "Long" ]
+   veloprotos.TrackSelector.TrackTypes = tracktypes
+   selector = veloprotos.TrackSelector
+   for tsname in tracktypes:
+   	selector.addTool(TrackSelector,name=tsname)
+   	ts = getattr(selector,tsname)
+   	# Set Cuts
+   	ts.TrackTypes = [tsname]
+
+   veloprotoseq = GaudiSequencer(name+"ProtoPSeq")
+   veloprotoseq.Members += [ veloprotos ]
+
+   return GSWrapper(name="WrappedVeloMuonProtoPSeqFor" + name,
+                    sequencer=veloprotoseq,
+                    output='Rec/ProtoP/ProtoPMaker/'+name+'ProtoParticles',
+                    requiredSelections = [ trackingSeq])
+#   return Selection(name+"_SelPParts", Algorithm = veloprotos, OutputBranch="Rec/ProtoP", Extension="ProtoParticles",RequiredSelections=[trackingSeq], InputDataSetter=None)
+
+def makeMyMuons(name, protoParticlesMaker):
+   """
+     Make Particles out of the muon ProtoParticles
+   """
+   particleMaker =  NoPIDsParticleMaker(name+"ParticleMaker" , Particle = "Muon")
+   particleMaker.Input = "Rec/ProtoP/ProtoPMaker/"+name+"ProtoParticles"
+   #particleMaker.OutputLevel = 0
+
+   DataOnDemandSvc().AlgMap.update( {
+           "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(),
+           "/Event/Phys/" + particleMaker.name() + '/Vertices'  : particleMaker.getFullName() 
+   } )
+
+
+   return Selection(name+"SelVeloMuonParts", Algorithm = particleMaker, RequiredSelections = [protoParticlesMaker], InputDataSetter=None)
+
+def makeResonanceVeloMuTrackEff(name, resonanceName, decayDescriptor, plusCharge, minusCharge, 
+                              mode, TrPt, TrP, MuDLL, MassPreComb, VertChi2, MassPostComb, JpsiPt):    
+   """
+   Create and return a Resonance -> mu mu Selection object, with one track a long track
+   and the other a MuonVelo track.
+   Arguments:
+   name                 : name of the selection
+   resonanceName        : name of the resonance
+   decayDescriptor      : decayDescriptor of the decay
+   plusCharge           : algorithm for selection positvely charged tracks
+   minusCharge          : algorithm for selection negatively charged tracks
+   mode                 : Tag(-)-and-Probe(+) (1) or  Tag(+)-and-Probe(-) (2)
+   """
+    
+    
+   MuonVeloResonance = CombineParticles()
+   #MuonVeloResonance = CombineParticles('_'+name)
+   MuonVeloResonance.DecayDescriptor = decayDescriptor
+   MuonVeloResonance.OutputLevel = 4 
+
+
+   if(mode == 1):
+       #MuonVeloResonance.DaughtersCuts = {"mu+": muCut,
+       #                                   "mu-": vmCut}
+
+       MuonVeloResonance.CombinationCut = "ADAMASS('%(resonanceName)s')<%(MassPreComb)s*MeV"% locals()
+       MuonVeloResonance.MotherCut = "(VFASPF(VCHI2/VDOF)< %(VertChi2)s) & (ADMASS('%(resonanceName)s')<%(MassPostComb)s*MeV) & (PT > %(JpsiPt)s*GeV)"% locals()
+        
+       return Selection( name, Algorithm = MuonVeloResonance, RequiredSelections = [minusCharge, plusCharge] )
+     
+   if(mode == 2):
+       #MuonVeloResonance.DaughtersCuts = {"mu-": muCut  % locals(),
+       #                                   "mu+": vmCut  % locals() }
+
+       MuonVeloResonance.CombinationCut = "ADAMASS('%(resonanceName)s')<%(MassPreComb)s*MeV"% locals()
+       MuonVeloResonance.MotherCut = "(VFASPF(VCHI2/VDOF)< %(VertChi2)s) & (ADMASS('%(resonanceName)s')<%(MassPostComb)s*MeV) & (PT > %(JpsiPt)s*GeV)"% locals()
+            
+       return Selection( name, Algorithm = MuonVeloResonance, RequiredSelections = [plusCharge, minusCharge] )
+
+# ########################################################################################
+# Charge filter, that filters, well, the charge and takes the particles from the right source (long or Velomuon)
+# TODO: I introduced vmCut and muCut here although muCut is already been done somewhere else ... clean this some day
+# ########################################################################################
+def chargeFilter(name, trackAlgo,  partSource, charge, vmCut, muCut):
+    """
+        Select plus or minus charge for Velomuon or long track
+    """
+    Filter = FilterDesktop() #there is maybe a change needed
+    myFilter1 = Filter.configurable("myFilter1")
+            
+    if(charge == -1):
+        myFilter1.Code = "(Q < 0) & "
+    if(charge == 1):
+        myFilter1.Code = "(Q > 0) & "    
+            
+    if(trackAlgo == 'VeloMuon'):
+        myFilter1.Code += vmCut
+    if(trackAlgo == "LongMu"):
+        myFilter1.Code += muCut
+    if(trackAlgo == 'VeloMuon'):
+        return Selection( name+'_chargeFilter'+'VeloMuon', Algorithm = myFilter1, RequiredSelections = [  partSource ] )
+    if(trackAlgo == 'LongMu'):
+        return Selection( name+'_chargeFilter'+'LongMu', Algorithm = myFilter1, RequiredSelections = [  partSource ] )
+# ################################################################
+
+# ##########################
+# high quality muons
+# ##########################
+def longtrackFilter(name, trackAlgo, partSource, muCut):
+    """
+        Select plus or minus charge for longtrack
+    """
+    Filter = FilterDesktop() #there is maybe a change needed
+    myFilter1 = Filter.configurable("mylongFilter1")
+            
+    myFilter1.Code = muCut
+    return Selection( name+'_longFilter'+'LongMu', Algorithm = myFilter1, RequiredSelections = [  partSource ] )
+# ################################################################
+
+"""
+Define TisTos Prefilters
+
+"""
+#getMuonParticles = DataOnDemand(Location = 'Phys/StdAllLooseMuons')
+
+
+#def selHlt1Jpsi(name, longPartsFilter):
+def selHlt1Jpsi(name, HLT1TisTosSpecs, HLT1PassOnAll):
+   """
+   Filter the long track muon to be TOS on a HLT1 single muon trigger,
+   for J/psi selection
+   """
+   #Hlt1Jpsi = TisTosParticleTagger(name+"Hlt1Jpsi")
+   Hlt1Jpsi = TisTosParticleTagger(
+   TisTosSpecs = HLT1TisTosSpecs #{ "Hlt1TrackMuonDecision%TOS" : 0, "Hlt1SingleMuonNoIPL0Decision%TOS" : 0}
+   ,ProjectTracksToCalo = False
+   ,CaloClustForCharged = False
+   ,CaloClustForNeutral = False
+   ,TOSFrac = { 4:0.0, 5:0.0 }
+   ,NoRegex = True
+   ,PassOnAll = HLT1PassOnAll
+   )
+   #Hlt1Jpsi.PassOnAll = True # TESTING!
+   #
+   return Selection(name+"_SelHlt1Jpsi", Algorithm = Hlt1Jpsi, RequiredSelections = [ StdAllLooseMuons ])
+
+#########################################################
+def selHlt2Jpsi(name, hlt1Filter, HLT2TisTosSpecs, HLT2PassOnAll):
+   """
+   Filter the long track muon to be TOS on a HLT2 single muon trigger,
+   for J/psi selection
+   """
+   #Hlt2Jpsi = TisTosParticleTagger("Hlt2Jpsi")
+   Hlt2Jpsi = TisTosParticleTagger(
+   TisTosSpecs =HLT2TisTosSpecs #{ "Hlt2SingleMuon.*Decision%TOS" : 0}
+   ,ProjectTracksToCalo = False
+   ,CaloClustForCharged = False
+   ,CaloClustForNeutral = False
+   ,TOSFrac = { 4:0.0, 5:0.0 }
+   ,NoRegex = False
+   ,PassOnAll = HLT2PassOnAll
+   )
+   #Hlt2Jpsi.PassOnAll = True # TESTING!
+   #
+   return Selection(name+"_SelHlt2Jpsi", Algorithm = Hlt2Jpsi, RequiredSelections = [ hlt1Filter ])
+##########################################################
+        
+
+def trackingPreFilter(name, prefilter):
+
+   VeloMuonBuilder1 = VeloMuonBuilder("VeloMuonBuilder"+name)
+   VeloMuonBuilder1.OutputLevel = 6
+   #VeloMuonBuilder1.MuonLocation = "Rec/Track/"+name+"MuonStandalone"
+   #VeloMuonBuilder1.MuonLocation = "Hlt1/Track/MuonSeg"
+   VeloMuonBuilder1.MuonLocation = "Rec/Track/"+name+"MuonStandalone"
+   VeloMuonBuilder1.VeloLocation = "Rec/Track/"+name+"UnFittedVelo"
+   VeloMuonBuilder1.lhcbids = 4
+   VeloMuonBuilder1.OutputLocation = "Rec/VeloMuon/"+name+"Tracks"
+
+   preve = TrackPrepareVelo(name+"preve")
+   preve.inputLocation = "Rec/"+name+"_Track/Velo"
+   preve.outputLocation = "Rec/Track/"+name+"UnFittedVelo"
+   preve.bestLocation = ""
+
+   #TODO: apparently FastVelo is now (april 2012) run with fixes in the production which don't neccessarily apply to the stripping...
+   alg = GaudiSequencer("VeloMuonTrackingFor"+name,
+                         Members = [ FastVeloTracking(name+"FastVelo",OutputTracksName="Rec/"+name+"_Track/Velo"),
+				 preve, 
+				 #StandaloneMuonRec(name+"MuonStandalone", OutputMuonTracksName = "Rec/Track/"+name+"MuonStandalone"), VeloMuonBuilder1])
+				 StandaloneMuonRec(name+"MuonStandalone",OutputMuonTracksName="Rec/Track/"+name+"MuonStandalone"), VeloMuonBuilder1])
+
+   return GSWrapper(name="WrappedVeloMuonTracking"+name,
+                     sequencer=alg,
+                     output='Rec/VeloMuon/'+name+'Tracks',
+                     requiredSelections =  prefilter)
+
+
+
+class GSWrapper(UniquelyNamedObject,
+                ClonableObject,
+                SelectionBase) :
+    
+    def __init__(self, name, sequencer, output, requiredSelections) :
+        UniquelyNamedObject.__init__(self, name)
+        ClonableObject.__init__(self, locals())
+        SelectionBase.__init__(self,
+                               algorithm = sequencer,
+                               outputLocation = output,
+                               requiredSelections = requiredSelections )
+
+
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonWMuNu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonWMuNu.py
new file mode 100644
index 000000000..f260ccff7
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingHeavyIonWMuNu.py
@@ -0,0 +1,165 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping Lines for W->MuNu and studies of their background
+Electroweak Group (Conveners: S.Bifani, J.Anderson; Stripping contact: W.Barter)
+
+S.Bifani
+
+WMu signal:           StdAllLooseMuons,  pT>20GeV
+WMu control:          StdAllLooseMuons,  pT>15GeV                    (10% PRESCALE)
+WMu background:       StdAllNoPIDsMuons, pT>5GeV  &  Hlt1MBNoBias Dec (RATE LIMITED, 20% PRESCALE)
+SingleMuon control:   StdAllLooseMuons,  pT>10GeV &  Hlt2SingleMuonHighPT Dec     (1% PRESCALE)
+SingleMuon control:   StdAllLooseMuons,  pT>4.8GeV & Hlt2SingleMuonLowPT Dec      (20% PRESCALE)
+"""
+
+__all__ = 'HeavyIonWMuNuConf', 'default_config'
+__author__ = 'S. Bifani'
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons, StdAllNoPIDsMuons
+from GaudiKernel.SystemOfUnits import GeV
+
+
+default_config = {
+  'NAME'        : 'HeavyIonWMuNu',
+  'BUILDERTYPE' : 'HeavyIonWMuNuConf',
+  'WGs'         : [ 'IFT'],
+  'STREAMS'     : [ 'IFT' ],
+  'CONFIG'      : { 
+    'WMu_Prescale'          : 1.0,
+    'WMuLow_Prescale'       : 0.1,
+    'STNB_Prescale'         : 0.2,
+    'WMu_Postscale'         : 1.0,
+    'SingMuon10_Prescale'   : 0.01,
+    'SingMuon48_Prescale'   : 0.4,
+    'pT'                    : 20. * GeV,
+    'pTlow'                 : 15. * GeV,
+    'pTvlow'                :  5. * GeV,
+    'SingMuon10_pT'         : 10. * GeV,
+    'SingMuon48_pT'         : 4.8 * GeV,
+    #
+    'HLT2_Control10'        : "HLT_PASS_RE('Hlt2(EW)?SingleMuon(V)?High.*')",
+    'HLT2_Control4800'      : "HLT_PASS_RE('Hlt2(EW)?SingleMuonLow.*')",
+    'HLT1_SingleTrackNoBias': "HLT_PASS( 'Hlt1MBNoBiasDecision' )",
+    #
+    'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+
+    
+    "ProbNNmu_min"     : 0.5,
+
+  },
+}
+
+class HeavyIonWMuNuConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    #---------------------------#
+    # Single Muon Control Lines #
+    #---------------------------#
+
+    sel = makeFilter(name+'Mu10', StdAllLooseMuons, config['SingMuon10_pT'])
+
+    self.registerLine(StrippingLine( name + 'Control10Line',
+      prescale  = config[ 'SingMuon10_Prescale' ],
+      postscale = config[ 'WMu_Postscale' ],
+      HLT2      = config[ 'HLT2_Control10'],
+      checkPV   = False,
+      selection = sel,
+    ))
+
+    #-----------------------------------------------------------------        
+
+    sel = makeFilter(name+'Mu48', StdAllLooseMuons, config['SingMuon48_pT'])
+
+    self.registerLine(StrippingLine( name + 'Control4800Line',
+      prescale  = config[ 'SingMuon48_Prescale' ],
+      postscale = config[ 'WMu_Postscale' ],
+      HLT2      = config[ 'HLT2_Control4800'],
+      checkPV   = False,
+      selection = sel,
+    ))
+
+
+    #------------#
+    # WMu signal #
+    #------------#
+
+    sel = makeFilter(name+'Wmu', StdAllLooseMuons, config['pT'])
+
+    self.registerLine(StrippingLine( name + 'Line',
+      prescale  = config[ 'WMu_Prescale'  ],
+      postscale = config[ 'WMu_Postscale' ],
+      checkPV   = False,
+      selection = sel,
+      RequiredRawEvents = config['RawEvents'],
+    ))
+
+
+    #-------------#
+    # WMu control #
+    #-------------#
+
+    sel = makeFilter(name+'WMuLow', StdAllLooseMuons, config['pTlow'])
+
+    self.registerLine(StrippingLine( name + 'LowLine',
+      prescale  = config[ 'WMuLow_Prescale' ],
+      postscale = config[ 'WMu_Postscale'   ],
+      checkPV   = False,
+      selection = sel,
+      RequiredRawEvents = config['RawEvents'],
+    ))
+
+    #----------------#
+    # WMu background #
+    #----------------#
+
+    sel = makeFilter(name+'SingleTrackNoBias', StdAllNoPIDsMuons, config['pTlow'])
+
+    self.registerLine(StrippingLine( name + 'SingleTrackNoBiasLine',
+        prescale  = config[ 'WMu_Prescale'  ],
+        postscale = config[ 'WMu_Postscale' ],
+        HLT1      = config[ 'HLT1_SingleTrackNoBias'],
+        checkPV   = False,
+        selection = sel,
+    ))
+
+
+    #---------------------------
+
+    sel = makeFilter(name+'SingleTrackNoBiasPS', StdAllNoPIDsMuons, config['pTvlow'])
+
+    self.registerLine(StrippingLine( name + 'SingleTrackNoBiasLinePS',
+        prescale  = config[ 'STNB_Prescale' ],
+        postscale = config[ 'WMu_Postscale' ],
+        HLT1      = config[ 'HLT1_SingleTrackNoBias'],
+        checkPV   = False,
+        selection = sel,
+    ))
+
+
+def makeFilter(name, single_input, min_PT):
+  """
+  Simple FilterDesktop selection having only min PT cut.
+  """
+  return SimpleSelection(name, FilterDesktop, [single_input],
+                         Preambulo = [ "from LoKiTracks.decorators import *" ],    
+                         Code      = 'PT > {}'.format(min_PT)
+                         )
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingLb2V0pphh.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingLb2V0pphh.py
new file mode 100644
index 000000000..d3e0411c4
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingLb2V0pphh.py
@@ -0,0 +1,309 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+"""
+Module for construction of Lb->V0pphh stripping Selections and StrippingLines.
+Provides functions to build Lambda0->DD, Lambda0->LL, and Lambda0->LD selections.
+Stripping20 with an inclusive approach for Lb->Lambda pp hh modes.
+Provides class Lb2V0pphhConf, which constructs the Selections and StrippingLines
+given a configuration dictionary.
+Selections based on previous version of the V04h line by Xiaokang Zhou, etc.
+Exported symbols (use python help!):
+   - Lb2V0pphhConf
+"""
+
+__author__ = ["Hendrik Jage", "Gediminas Sarpis"]
+__date__ = '19/03/2021'
+__version__ = 'v1r0'
+__all__ = {'Lb2V0pphhConf', 'default_config'}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from StandardParticles import StdNoPIDsPions as Pions
+from StandardParticles import StdNoPIDsProtons as Protons
+
+default_config = {
+    'NAME': 'Lb2V0pphh',
+    'WGs': ['IFT'],
+    'BUILDERTYPE': 'Lb2V0pphhConf',
+    'STREAMS': ['BhadronCompleteEvent'],
+    'CONFIG': {
+        'Trk_Chi2'               : 3.0,
+        'Trk_GhostProb'          : 0.4,
+        'Trk_IPChi2'             :   9,
+   
+        'ProtonP'                : 15000,
+        'ProtonPT'               : 500,
+        'ProtonProbNNp'          : 0.05,
+        'ProtonPIDppi'           : 5,
+        'ProtonPIDpK'            : 0,
+        'PionP'                  : 1500,
+        'PionPT'                 :  500,
+ 
+        'Lambda_LL_MassWindow'   : 20.0,
+        'Lambda_LL_VtxChi2'      : 15.0,
+        'Lambda_LL_FDChi2'       : 80.0,
+
+        'Lb_Mlow'                : 1319.0,
+        'Lb_Mhigh'               : 600.0,
+        'Lb_APTmin'              : 250.0,
+        'Lb_PTmin'               : 250.0,
+
+        'LbDaug_MedPT_PT'        : 800.0,
+        'LbDaug_MaxPT_IP'        : 0.05,
+        'LbDaug_LL_maxDocaChi2'  : 10.0,
+        'LbDaug_LL_PTsum'        : 1500.0,
+
+        'Lbh_LL_PTMin'           : 500.0,
+        'Lb_VtxChi2Ndof'         : 12.0,
+        'Lb_LL_Dira'             : 0.995,
+        'Lb_LL_IPCHI2wrtPV'      : 20.0,
+        'Lb_FDwrtPV'             : 1.0,
+        'Lb_LL_FDChi2'           : 40.0,
+
+        'GEC_MaxTracks'          : 250,
+        # 2015 Triggers
+        'HLT1Dec'                : 'Hlt1(Two)?TrackMVADecision',
+        'HLT2Dec'                : 'Hlt2Topo[234]BodyDecision',
+        'Prescale'               : 1.0,
+        'Postscale'              : 1.0,
+    },
+}
+
+
+class Lb2V0pphhConf(LineBuilder):
+    """
+    Builder of Lb->V0pphh stripping Selection and StrippingLine.
+    Constructs Lb -> V0 p+ p- h+ h- Selections and StrippingLines from a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> lb2v0pphhConf = LB2V0pphhConf('Lb2V0pphhTest',config)
+    >>> lb2v0pphhLines = lb2v0pphhConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selLambda2DD           : Lambda0 -> Down Down Selection object
+    selLambda2LL           : Lambda0 -> Long Long Selection object
+
+    selLb2V0DDpphh           : Lb -> Lambda0(DD) p+ p- h+ h- Selection object
+    selLb2V0LLpphh           : Lb -> Lambda0(LL) p+ p- h+ h- Selection object
+
+    Lb_dd_line             : StrippingLine made out of selLb2V0DDpphh
+    Lb_ll_line             : StrippingLine made out of selLb2V0LLpphh
+
+    lines                  : List of lines, [Lb_dd_line, Lb_ll_line, Lb_ld_line]
+
+    Exports as class data member:
+    Lb2V0pphhConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+
+        GECCode = {
+            'Code':
+            "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" %
+            config['GEC_MaxTracks'],
+            'Preambulo': ["from LoKiTracks.decorators import *"]
+        }
+
+        self.hlt1Filter = {
+            'Code': "HLT_PASS_RE('%s')" % config['HLT1Dec'],
+            'Preambulo': ["from LoKiCore.functions import *"]
+        }
+        self.hlt2Filter = {
+            'Code': "HLT_PASS_RE('%s')" % config['HLT2Dec'],
+            'Preambulo': ["from LoKiCore.functions import *"]
+        }
+
+        # Tracks
+        _trackCuts          =    "(TRCHI2DOF          < %s)"         % config['Trk_Chi2']
+        _trackCuts         += " & (TRGHOSTPROB        < %s)"         % config['Trk_GhostProb']
+        _trackCuts         += " & (MIPCHI2DV(PRIMARY) > %s)"         % config['Trk_IPChi2']
+
+        # Proton
+        #_protonPidCuts      =    "(PROBNNp            > %s)"         % config['ProtonProbNNp']
+
+        _protonKinCuts      =    "(PT                 > %s *MeV)"    % config['ProtonPT']
+        _protonKinCuts     += " & (P                  > %s *MeV)"    % config['ProtonP']
+        _protonCuts         = _trackCuts + " & " + _protonKinCuts
+        #_protonCuts         = _trackCuts + " & " + _protonPidCuts + " & " + _protonKinCuts
+
+        # Pion
+        _pionKinCuts        =    "(PT                 > %s *MeV)"    % config['PionPT']
+        _pionKinCuts       += " & (P                  > %s *MeV)"    % config['PionP']
+        _pionCuts           = _trackCuts + " & " + _pionKinCuts
+
+        self.ProtonForLb2V0pphh = SimpleSelection( "ProtonFor" + name, FilterDesktop,
+          [ Protons ],
+          Code  = _protonCuts,
+        )
+
+        self.PionForLb2V0pphh = SimpleSelection( "PionFor" + name, FilterDesktop,
+          [ Pions ],
+          Code  = _pionCuts,
+        )
+
+        self.makeLambda2LL('Lambda0LLLb2V0pphhLines', config)
+
+        namesSelections = [
+            (name + 'LL', self.makeLb2V0LLpphh(name + 'LL', config)),
+            (name + 'LLSS', self.makeLb2V0LLpphh(name + 'LLSS', config)),
+        ]
+
+        # make lines
+
+        for selName, sel in namesSelections:
+
+            extra = {}
+
+            if 'SS' in selName:
+                extra['HLT1'] = self.hlt1Filter
+                extra['HLT2'] = self.hlt2Filter
+
+            line = StrippingLine(
+                selName + 'Line',
+                selection=sel,
+                prescale=config['Prescale'],
+                postscale=config['Postscale'],
+                RequiredRawEvents = ["Rich","Velo","Tracker","Calo"],
+                FILTER=GECCode,
+                **extra)
+
+            self.registerLine(line)
+
+    def makeLambda2LL(self, name, config):
+        # define all the cuts
+        _massCut              = "(ADMASS('Lambda0')<%s*MeV)"         % config['Lambda_LL_MassWindow']
+        _vtxCut               = "(VFASPF(VCHI2)<%s)"                 % config['Lambda_LL_VtxChi2']
+        _trkChi2Cut1          = "(CHILDCUT((TRCHI2DOF<%s),1))"       % config['Trk_Chi2']
+        _trkChi2Cut2          = "(CHILDCUT((TRCHI2DOF<%s),2))"       % config['Trk_Chi2']
+        _trkGhostProbCut1     = "(CHILDCUT((TRGHOSTPROB<%s),1))"     % config['Trk_GhostProb']
+        _trkGhostProbCut2     = "(CHILDCUT((TRGHOSTPROB<%s),2))"     % config['Trk_GhostProb']
+
+        _allCuts = _massCut
+        _allCuts += '&' + _trkChi2Cut1
+        _allCuts += '&' + _trkChi2Cut2
+        _allCuts += '&' + _vtxCut
+        _allCuts += '&' + _trkGhostProbCut1
+        _allCuts += '&' + _trkGhostProbCut2
+
+        # get the Lambda's to filter
+        _stdLambdaLL = DataOnDemand(
+            Location="Phys/StdVeryLooseLambdaLL/Particles")
+
+        # make the filter
+        _filterLambdaLL = FilterDesktop(Code=_allCuts)
+
+        # make and store the Selection object
+        self.selLambda2LL = Selection(
+            name, Algorithm=_filterLambdaLL, RequiredSelections=[_stdLambdaLL])
+
+        return self.selLambda2LL
+
+    def makeLb2V0LLpphh(self, name, config):
+        """
+        Create and store a Lb -> Lambda0(LL) p+ h- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+        _protonPidCuts     =    "((PIDp-PIDpi)       > %s)"         % config['ProtonPIDppi']
+        _protonPidCuts    += " & ((PIDp-PIDK)        > %s)"         % config['ProtonPIDpK']
+        #_protonPidCuts      =    "(PROBNNp            > %s)"         % config['ProtonProbNNp']
+
+        _massCutLow     = "(AM>(5619-%s)*MeV)"                   % config['Lb_Mlow']
+        _massCutHigh    = "(AM<(5619+%s)*MeV)"                   % config['Lb_Mhigh']
+        _aptCut         = "(APT>%s*MeV)"                         % config['Lb_APTmin']
+        _daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"                 % config['LbDaug_MedPT_PT']
+        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))"                % config['LbDaug_LL_maxDocaChi2']
+
+        _combCuts = _aptCut
+        _combCuts += '&' + _daugMedPtCut
+        _combCuts += '&' + _massCutLow
+        _combCuts += '&' + _massCutHigh
+        _combCuts += '&' + _maxDocaChi2Cut
+
+        _ptCut             = "(PT>%s*MeV)"                        % config['Lb_PTmin']
+        _vtxChi2Cut        = "(VFASPF(VCHI2/VDOF)<%s)"            % config['Lb_VtxChi2Ndof']
+        _diraCut           = "(BPVDIRA>%s)"                       % config['Lb_LL_Dira']
+        _ipChi2Cut         = "(BPVIPCHI2()<%s)"                   % config['Lb_LL_IPCHI2wrtPV']
+        _fdCut             = "(VFASPF(VMINVDDV(PRIMARY))>%s)"     % config['Lb_FDwrtPV']
+        _fdChi2Cut         = "(BPVVDCHI2>%s)"                     % config['Lb_LL_FDChi2']
+
+        _motherCuts = _ptCut
+        _motherCuts += '&' + _vtxChi2Cut
+        _motherCuts += '&' + _diraCut
+        _motherCuts += '&' + _ipChi2Cut
+        _motherCuts += '&' + _fdChi2Cut
+        _motherCuts += '&' + _fdCut
+        _Lb = CombineParticles()
+
+        if 'SS' in name:  # Same sign
+
+            _Lb.DecayDescriptors = [
+                "Lambda_b0  -> p+  p+  pi+ pi+ Lambda0",
+                "Lambda_b0  -> p~- p~- pi- pi- Lambda0",
+                #"Lambda_b0  -> p+  p+  pi+ pi- Lambda0",
+                #"Lambda_b0  -> p~- p~- pi- pi+ Lambda0",
+                #"Lambda_b0  -> p+  p+  pi- pi- Lambda0",
+                #"Lambda_b0  -> p~- p~- pi+ pi+ Lambda0",
+                #"Lambda_b0  -> p+  p~- pi+ pi+ Lambda0",
+                #"Lambda_b0  -> p~- p+  pi- pi- Lambda0",
+                "Lambda_b~0 -> p+  p+  pi+ pi+ Lambda~0",
+                "Lambda_b~0 -> p~- p~- pi- pi- Lambda~0",
+                #"Lambda_b~0 -> p+  p+  pi+ pi- Lambda~0",
+                #"Lambda_b~0 -> p~- p~- pi- pi+ Lambda~0",
+                #"Lambda_b~0 -> p+  p+  pi- pi- Lambda~0",
+                #"Lambda_b~0 -> p~- p~- pi+ pi+ Lambda~0",
+                #"Lambda_b~0 -> p+  p~- pi+ pi+ Lambda~0",
+                #"Lambda_b~0 -> p~- p+  pi- pi- Lambda~0",
+            ]
+
+        else:
+
+            _Lb.DecayDescriptors = [
+                "Lambda_b0  -> p+  p~- pi+ pi- Lambda0",
+                "Lambda_b~0 -> p~- p+  pi- pi+ Lambda~0"
+            ]
+
+        _Lb.DaughtersCuts = {"pi+" : "ALL",
+                             "pi-" : "ALL",
+                             "p+"  : "ALL",
+                             "p~-" : _protonPidCuts}
+
+        _Lb.CombinationCut = _combCuts
+        _Lb.MotherCut = _motherCuts
+        _Lb.ReFitPVs = True
+
+        _LbConf = _Lb.configurable(name + '_combined')
+
+        if 'SS' in name:  # Same sign
+            self.selLb2V0LLpphhSS = Selection(
+                name,
+                Algorithm=_LbConf,
+                RequiredSelections=[self.selLambda2LL, self.ProtonForLb2V0pphh, self.PionForLb2V0pphh])
+            return self.selLb2V0LLpphhSS
+        else:
+            self.selLb2V0LLpphh = Selection(
+                name,
+                Algorithm=_LbConf,
+                RequiredSelections=[self.selLambda2LL, self.ProtonForLb2V0pphh, self.PionForLb2V0pphh])
+            return self.selLb2V0LLpphh
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingLb2dpX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingLb2dpX.py
new file mode 100644
index 000000000..b641f92d7
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingLb2dpX.py
@@ -0,0 +1,202 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+'''
+Stripping selection of Lb -> d p pi (pi) + X 
+   Lb -> dppi + X
+   Lb -> dppipi + X
+This line is based on the StrippingLb2dp line by Paula Alvarez.
+'''
+
+__author__ = ['Gediminas Sarpis', 'Hendrik Jage']
+__date__ = '03/19/2021'
+__version__ = 'v1r0'
+
+__all__ = ('Lb2dpXConf',
+           'default_config'
+           )
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+
+from StandardParticles import StdAllNoPIDsPions as Pions
+from StandardParticles import StdAllNoPIDsProtons as Protons
+from StandardParticles import StdAllNoPIDsKaons as Kaons
+from PhysSelPython.Wrappers import Selection, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter as VoidFilter
+
+default_config = {
+    'NAME'        : 'Lb2dpX',
+    'BUILDERTYPE' : 'Lb2dpXConf',
+    'WGs'         : ['IFT'],
+    'STREAMS'     : ['BhadronCompleteEvent'],
+    'CONFIG'      : {
+        'Prescale_pi'          : 0.5 ,      
+        'Prescale_pipi'        : 1.0 ,
+
+        'TrackChi2Ndof'        : 3.0,
+        'TrackGhostProb'       : 0.4,
+        'TrackIPChi2'          : 16.,
+
+        'PionPT'               : 500,
+        'PionP'                : 1500,
+        'PionPIDKpi'           : 0,
+        
+        'ProtonPT'             : 500,
+        'ProtonP'              : 15000,
+        'ProtonPIDppi'         : 15,
+        'ProtonPIDpK'          : 10,
+
+        'DeuteronPT'           : 500,
+        'DeuteronP'            : 35000,
+        
+        'LbMassMax'            : 7000. ,
+        'LbVtxChi2'            : 5. ,
+        'LbDIRA_pipi'          : 0.999,
+        'LbDIRA_pi'            : 0.9999,
+        'LbFDChi2'             : 150,
+        'LbPT'                 : 1500,
+        'LbIPChi2_pi'          : 25, 
+        'LbIPChi2_pipi'        : 50, 
+    },
+}
+
+class Lb2dpXConf(LineBuilder) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+        # Tracks
+        _trackCuts          =    "(TRCHI2DOF          < %s)"         % self.config['TrackChi2Ndof']
+        _trackCuts         += " & (TRGHOSTPROB        < %s)"         % self.config['TrackGhostProb']
+        _trackCuts         += " & (MIPCHI2DV(PRIMARY) > %s)"         % self.config['TrackIPChi2']
+
+        # Proton
+        _protonPidCuts      =    "((PIDp-PIDpi)       > %s)"         % self.config['ProtonPIDppi']
+        _protonPidCuts     += " & ((PIDp-PIDK)        > %s)"         % self.config['ProtonPIDpK']
+
+        _protonKinCuts      =    "(PT                 > %s *MeV)"    % self.config['ProtonPT']
+        _protonKinCuts     += " & (P                  > %s *MeV)"    % self.config['ProtonP']
+        _protonCuts         = _trackCuts + " & " + _protonPidCuts + " & " + _protonKinCuts
+
+        # Pion
+        _pionPidCuts        =    "((PIDK - PIDpi)     < %s )"        % self.config['PionPIDKpi']
+
+        _pionKinCuts        =    "(PT                 > %s *MeV)"    % self.config['PionPT']
+        _pionKinCuts       += " & (P                  > %s *MeV)"    % self.config['PionP']
+        _pionCuts           = _trackCuts + " & " + _pionPidCuts + " & " + _pionKinCuts
+
+        # Deuteron
+        _deuteronKinCuts    =    "(PT                 > %s *MeV)"    % self.config['DeuteronPT']
+        _deuteronKinCuts   += " & (P                  > %s *MeV)"    % self.config['DeuteronP']
+
+        _deuteronCuts       = _trackCuts + " & " + _deuteronKinCuts
+
+
+        # Substitute deuteron hypothesis
+        from Configurables import SubstitutePID
+        subst_K2d = SubstitutePID(
+            'subst_K2d',
+            Code = "DECTREE('[K+]CC')",
+            # note that SubstitutePID can't handle automatic CC
+            Substitutions = {
+            'K+ ': 'deuteron',
+            'K-' : 'deuteron~',
+            },
+            MaxChi2PerDoF   = -1,
+            UsePVConstraint = False,
+        )
+        
+        # create a selection using the substitution algorithm
+        Deuterons = Selection(
+            'subst_K2d_Sel',
+            Algorithm=subst_K2d,
+            RequiredSelections=[Kaons]
+        )
+
+        # Daughters
+        self.ProtonForLb2dpX = SimpleSelection( "ProtonFor" + self.name, FilterDesktop,
+          [ Protons ],
+          Code  = _protonCuts,
+        )
+
+        self.PionForLb2dpX = SimpleSelection( "PionFor" + self.name, FilterDesktop,
+          [ Pions ],
+          Code  = _pionCuts,
+        )
+
+        self.DeuteronForLb2dpX = SimpleSelection( "DeuteronFor" + self.name, FilterDesktop, 
+          [ Deuterons ],
+          Code  = _deuteronCuts,
+        )
+        self.makeLb2dppi()
+        self.makeLb2dppipi()
+
+    
+
+    def makeLb2dppi(self):
+
+        _decayDescriptors = ["[Lambda_b0 -> p~- pi+ deuteron]cc", "[Lambda_b0 -> p~- pi- deuteron]cc"]
+
+        _motherCut                = "   (BPVDIRA            > %s)"        % self.config['LbDIRA_pi'] 
+        _motherCut               += " & (VFASPF(VCHI2/VDOF) < %s)"        % self.config['LbVtxChi2']
+        _motherCut               += " & (BPVVDCHI2          > %s)"        % self.config['LbFDChi2']
+        _motherCut               += " & (MIPCHI2DV(PRIMARY) < %s)"        % self.config['LbIPChi2_pi']
+        _motherCut               += " & (PT                 > %s)"        % self.config['LbPT']
+        _motherCut               += " & (M                  < %s)"        % self.config['LbMassMax']
+
+        _Lb2dppi = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                     MotherCut = _motherCut)                            
+
+        _Lb2dppi_sel = Selection( self.name+"pi",
+                                Algorithm = _Lb2dppi,
+                                RequiredSelections = [self.DeuteronForLb2dpX, self.ProtonForLb2dpX, self.PionForLb2dpX])
+
+        Lb2dppiLine = StrippingLine( self.name + '_piLine',
+                                   prescale = self.config['Prescale_pi'],
+                                   selection =  _Lb2dppi_sel,
+                                   RequiredRawEvents = ["Rich","Velo","Tracker","Calo"])
+        
+        self.registerLine(Lb2dppiLine)
+
+
+        
+    def makeLb2dppipi(self):
+
+        _decayDescriptors = ["[Lambda_b0 -> p~- pi+ pi- deuteron]cc"]
+
+        _motherCut                = "   (BPVDIRA            > %s)"        % self.config['LbDIRA_pipi'] 
+        _motherCut               += " & (VFASPF(VCHI2/VDOF) < %s)"        % self.config['LbVtxChi2']
+        _motherCut               += " & (BPVVDCHI2          > %s)"        % self.config['LbFDChi2']
+        _motherCut               += " & (MIPCHI2DV(PRIMARY) < %s)"        % self.config['LbIPChi2_pipi']
+        _motherCut               += " & (PT                 > %s)"        % self.config['LbPT']
+        _motherCut               += " & (M                  < %s)"        % self.config['LbMassMax']
+
+        _Lb2dppipi = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                       #CombinationCut = _combCut,
+                                       MotherCut = _motherCut)                            
+
+        _Lb2dppipi_sel = Selection( self.name+"pipi",
+                                Algorithm = _Lb2dppipi,
+                                RequiredSelections = [self.DeuteronForLb2dpX, self.ProtonForLb2dpX, self.PionForLb2dpX])
+
+        Lb2dppipiLine = StrippingLine( self.name + '_pipiLine',
+                                   prescale = self.config['Prescale_pipi'],
+                                   selection =  _Lb2dppipi_sel,
+                                   RequiredRawEvents = ["Rich","Velo","Tracker","Calo"])
+
+        
+        self.registerLine(Lb2dppipiLine)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingV0ForPID_ForIFT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingV0ForPID_ForIFT.py
new file mode 100755
index 000000000..5a51b4cbf
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/StrippingV0ForPID_ForIFT.py
@@ -0,0 +1,1734 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# @file StripingSelections/StrippingV0ForPID.py
+#
+# Configuration file for PID V0 ( K0S and  Lambda0) stripping.
+#
+# This series of stripping lines are designed for the purpose of PID
+# calibration/monitoring of the RICH and MUON systems. Tracks from these
+# samples will be used to determine ID and mis-ID in each of these
+# sub-detectors. In order to enhance the number of tracks reconstructed in
+# the periphery of phase-space, the selections are binned in terms of the
+# V0's rapidity and pT. Each bin is then assigned its own
+# pre-scale.
+# 
+#
+# Acknowledgements:
+#
+# Vanya Belyaev
+# The selection cuts used in this series of lines are essentially a tightened
+# version of those developed by Vanya Belyaev for the original V0 stripping
+# performed in 2009 at /sqrt{s} = 0.9 TeV. Furthermore, the selection code
+# borrows heavily on his original stripping lines (StrippingV0Conf).
+#
+# For more information see:
+#
+#  http://indico.cern.ch/conferenceDisplay.py?confId=74536
+#  http://indico.cern.ch/materialDisplay.py?contribId=13&sessionId=2&materialId=0&confId=78767
+#
+# @author Andrew Powell a.powell1@physics.ox.ac.uk
+# @date 2010-09-05
+# =============================================================================
+"""
+Usage:
+ >>> stream = ...
+ >>> from StrippingSelections.StrippingV0ForPID import StrippingV0ForPIDConf as builder_v0
+ >>> from StrippingSelections.StrippingV0ForPID import default_config as config_v0
+ >>> lb_v0  = builder_v0( name='noPIDV0', config=config_v0)
+ >>> stream.appendLines( lb_v0.lines()  )
+ 
+Results from running over:
+$STRIPPINGSELECTIONSROOT/tests/data/Reco13c_Run124134.py
+
+StrippingReport                                                INFO Event 100000, Good event 100000
+|                                    *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+|!StrippingK0SLLLinenoPIDV0                         |  0.3290|       329|  1.116|   0.388|
+|!StrippingK0SDDLinenoPIDV0                         |  0.3190|       319|  1.135|   0.931|
+|!StrippingLam0LLLine1noPIDV0                       |  0.5050|       505|  1.085|   2.783|
+|!StrippingLam0LLLine2noPIDV0                       |  0.2960|       296|  1.017|  16.511|
+|!StrippingLam0DDLinenoPIDV0                        |  0.2920|       292|  1.051|   4.443|
+|!StrippingLam0LLIsMUONLine1noPIDV0                 |  0.1640|       164|  1.043|   0.117|
+|!StrippingLam0LLIsMUONLine2noPIDV0                 |  0.0080|         8|  1.000|   0.116|
+|!StrippingLam0DDIsMUONLinenoPIDV0                  |  0.1270|       127|  1.031|  39.297|                
+"""
+# =============================================================================
+__author__  = 'Andrew Powell a.powell1@physics.ox.ac.uk'
+__date__    = '27-08-2011'
+__version__ = '$Revision: 1.7 $'
+__all__ = ('StrippingV0ForPIDConf','default_config')
+# =============================================================================
+
+from Gaudi.Configuration       import *
+from LHCbKernel.Configuration  import *
+from GaudiKernel.SystemOfUnits import mm, cm , MeV, GeV
+
+# =============================================================================
+# @class StrippingV0ForPIDConf
+#
+# Configurable for PID V0 ( K0S and  Lambda0 ) stripping.
+##
+# @author Andrew Powell a.powell1@physics.ox.ac.uk
+# @date 2010-09-05
+# =============================================================================
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand        
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsPions, StdNoPIDsDownPions, StdAllNoPIDsProtons, StdNoPIDsDownProtons, StdAllNoPIDsKaons
+
+#import logging
+#log = logging.getLogger('StrippingPromptCharm')
+
+# =============================================================================
+## Define the default configuration
+_default_configuration_ = {
+    'TrackChi2'            :  5       ,          ## Track Chi2/ndof quality 
+    'VertexChi2'           :  16      ,          ## Cut on Vertex chi2-quality
+    'DeltaMassK0S'         :  50 * MeV,          ## Mass-window (half)-width for K0S 
+    'DeltaMassPhi'         :  20 * MeV,          ##  Mass-window (half)-width for Phi (S??) 
+    'DeltaMassLambda'      :  25 * MeV,          ## Mass-window (half)-width for Lambda 
+    'MaxMassLambdastar'    :1560 * MeV,          ## Mass-window (half)-width for Lambda 
+    'MaxZ'                 : 220 * cm ,          ## Maximal allowed vertex Z-position
+    'DaughtersIPChi2'      :  25      ,          ## minimal IP-chi2 for daughter particles  
+    'LTimeFitChi2'         :  49      ,          ## Chi2 from LifeTime Fitter
+    ##
+    'WrongMassK0S'         :   9 * MeV,          ## Mass-window (half)-width for ppi hypthesis
+    'WrongMassK0S_DD'      :  18 * MeV,          ## Mass-window (half)-width for ppi hypthesis (DD-case)
+    ##
+    'WrongMassPhi'         :   9 * MeV,          ## Mass-window (half)-width for pipi hypthesis (S??)
+    ##
+    'WrongMassLambda'      :  20 * MeV,          ## Mass-window (half)-width for pipi hypthesis
+    'WrongMassLambda_DD'   :  40 * MeV,          ## Mass-window (half)-width for pipi hypthesis (DD-case)
+    ##
+    'CTauK0S'              :   1 * mm ,          ## Cut on c*tau for K0S 
+    'CTauK0S_DD'           :  10 * mm ,          ## Cut on c*tau for K0S (DD-case)
+    ##
+    'CTauLambda0'          :   5 * mm ,          ## Cut on c*tau for Lambda0
+    'CTauLambda0_DD'       :  20 * mm ,          ## Cut on c*tau for Lambda0 (DD-case)
+    ##
+    'Proton_IsMUONCut'     :  "(INTREE( (ABSID=='p+') & ISMUON ) )" , 
+    ## 
+    'Phi_GhostProb_Tag'    : 0.025,               ##GhostProb threshold for the tag kaon in phi decay 
+    'Phi_HiPt_PIDK_Tag'    : 7,                   ##PIDK threshold for the tag kaon in the high pT phi decay 
+    'Phi_HiPt_PT_Tag'      : 1050 * MeV,          ##pT threshold for the tag kaon in the high pT phi decay 
+    'Phi_LoPt_ProbNNK_Tag' : 0.75 ,               ##ProbNNK threshold for the tag kaon in Low pT phi decay 
+    'phimaxDOCA'           : 10,                  ##Max K+K- DOCA in Phi decay 
+
+    'K0s_HiPt_Pt_thre'     : 1250 * MeV,          ##Pt threshold for the high pT K0S line
+    'Lambda_HiPt_Pt_thre'  : 750 * MeV,           ##Pt threshold for the high pT Lambda0 line
+    'minimum_Pt'           : 380 * MeV,           ##minimum daughters Pt
+
+    'ghostprob_Lambdastar' : 0.15,                 ## Ghost Prob thresholds for proton and kaon in the Lambda(1520) decay
+    'otherKcuts_Lambdastar': '(PIDK > 10) & ((PIDK - PIDp) > 0)',               ## Other cuts for the K selection in Lambda(1520) decay 
+    'PIDp_Lambdastar'      : 20 ,                 ## PIDp threshold for the proton selection in Lambda(1520) decay 
+    'PIDpPIDK_Lambdastar'  : 10 ,                 ## (PIDp - PIDK) threshold for the proton selection in Lambda(1520) decay 
+    'otherpcuts_Lambdastar': 'ALL',               ## Other cuts for the K selection in Lambda(1520) decay 
+
+    # Technicalities:
+    ##
+    'Monitor'              :  False    ,          ## Activate the monitoring ?
+    ##
+    "HLT"                  : "HLT_PASS_RE('Hlt1MB.*Decision')" ,  ## HLT-cut
+    ##
+    'Preambulo'       : [
+    ## import c_light
+    "from GaudiKernel.PhysicalConstants import c_light" ,
+    ## define DD-category of K0S 
+    "DD =    CHILDCUT ( ISDOWN , 1 ) & CHILDCUT ( ISDOWN , 2 ) " ,
+    ## define LL-category of K0S 
+    "LL =    CHILDCUT ( ISLONG , 1 ) & CHILDCUT ( ISLONG , 2 ) "
+    ] ,
+
+    #    'KS0LL_Prescale'                 : 0.160 ,
+    'KS0LL_Prescale'                 : 1.0 ,
+    'KS0LL_Prescale_HiPt'            : 1.000 ,
+    'KS0DD_Prescale'                 : 0.000 , 
+    'PhiLL_Prescale'                 : 0.000 ,
+    #    'PhiLL_Prescale_KmProbe_LoPt'    : 0.170 ,
+    'PhiLL_Prescale_KmProbe_LoPt'    : 1.0 ,
+    #    'PhiLL_Prescale_KpProbe_LoPt'    : 0.200 ,
+    'PhiLL_Prescale_KpProbe_LoPt'    : 1.0 ,
+    'PhiLL_Prescale_KmProbe_HiPt'    : 1.000 ,
+    'PhiLL_Prescale_KpProbe_HiPt'    : 1.000 ,
+    #    'LamLL_Prescale_LoP'             : 0.680 , 
+    'LamLL_Prescale_LoP'             : 1.0 , 
+    'LamLL_Prescale_HiP'             : 0.000 ,
+    'LamLL_Prescale_HiPt'            : 1.000 ,
+    'Lamstar_Prescale'               : 1.000 ,
+    'LamDD_Prescale'                 : 0.000 , 
+    'LamLLIsMUON_Prescale_LoP'       : 0.000 ,
+    'LamLLIsMUON_Prescale_HiP'       : 0.000 ,
+    'LamDDIsMUON_Prescale'           : 0.000   
+
+    }
+
+## the mandatory element
+
+default_config ={
+    'NAME'        :   'VznoPID_ForIFT'       ,
+    'WGs'         : [ 'IFT' ] ,
+    'CONFIG'      : _default_configuration_  , 
+    'BUILDERTYPE' :   'StrippingV0ForPIDConf_ForIFT'            ,
+    'STREAMS'     :  [ 'IFT']
+              }    
+
+
+
+# =============================================================================
+class StrippingV0ForPIDConf_ForIFT(LineBuilder) :    
+    """
+    Helper class to configure 'V0ForPID'-lines
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    ## get the default configuration 
+    #@staticmethod
+    def defaultConfiguration( key = None ) :
+        
+        from copy import deepcopy
+        _config = deepcopy ( _default_configuration_ )
+        if key : return _config[ key ]
+        return _config
+    
+    ## constructor
+    def __init__(self, name, config) :
+        """
+        Constructor
+        """        
+                
+        self._name            = name
+
+        self._trackChi2        = config[ 'TrackChi2' ]
+        self._vertexChi2       = config[ 'VertexChi2' ]
+        self._deltaMassK0S     = config[ 'DeltaMassK0S' ]
+        self._deltaMassPhi     = config[ 'DeltaMassPhi' ]
+        self._deltaMassLambda  = config[ 'DeltaMassLambda' ]
+        self._maxMassLambdastar  = config[ 'MaxMassLambdastar' ]
+        self._maxZ             = config[ 'MaxZ' ]
+        self._daughtersIPChi2  = config[ 'DaughtersIPChi2' ]
+        self._lTimeFitChi2     = config[ 'LTimeFitChi2' ]
+
+        self.Phi_GhostProb_Tag      = config[ 'Phi_GhostProb_Tag' ]
+        self.Phi_HiPt_PIDK_Tag      = config[ 'Phi_HiPt_PIDK_Tag' ]
+        self.Phi_HiPt_PT_Tag        = config[ 'Phi_HiPt_PT_Tag' ]
+        self.Phi_LoPt_ProbNNK_Tag   = config[ 'Phi_LoPt_ProbNNK_Tag' ]
+        
+        self._wrongMassK0S       = config[ 'WrongMassK0S' ]
+        self._wrongMassK0S_DD    = config[ 'WrongMassK0S_DD' ]
+        self._wrongMassPhi       = config[ 'WrongMassPhi' ]
+        self._wrongMassLambda    = config[ 'WrongMassLambda' ]
+        self._wrongMassLambda_DD = config[ 'WrongMassLambda_DD' ] 
+        
+        self.Lambda_HiPt_Pt_thre = config[ 'Lambda_HiPt_Pt_thre' ] 
+        self.K0s_HiPt_Pt_thre    = config[ 'K0s_HiPt_Pt_thre' ]
+
+        self._phimaxDOCA     = config[ 'phimaxDOCA' ]
+        self._cTauK0S        = config[ 'CTauK0S' ]
+        self._cTauK0S_DD     = config[ 'CTauK0S_DD' ]
+        self._cTauLambda0    = config[ 'CTauLambda0' ]
+        self._cTauLambda0_DD = config[ 'CTauLambda0_DD' ]
+
+        self._protonIsmuon   = config[ 'Proton_IsMUONCut' ]
+
+        self._ghostprob_Lambdastar   = config[ 'ghostprob_Lambdastar' ]
+        self._otherKcuts_Lambdastar  = config[ 'otherKcuts_Lambdastar' ]
+        self._PIDp_Lambdastar        = config[ 'PIDp_Lambdastar' ] 
+        self._PIDpPIDK_Lambdastar    = config[ 'PIDpPIDK_Lambdastar' ]
+        self._otherpcuts_Lambdastar  = config[ 'otherpcuts_Lambdastar' ]
+                            
+        self._KS0LLPrescale                 = config[ 'KS0LL_Prescale' ]
+        self._KS0LLPrescale_HiPt            = config[ 'KS0LL_Prescale_HiPt' ]
+        self._KS0DDPrescale                 = config[ 'KS0DD_Prescale' ] 
+        self._PhiLLPrescale                 = config[ 'PhiLL_Prescale' ] 
+        self._PhiLLPrescale_KmProbe_LoPt    = config[ 'PhiLL_Prescale_KmProbe_LoPt' ]
+        self._PhiLLPrescale_KpProbe_LoPt    = config[ 'PhiLL_Prescale_KpProbe_LoPt' ]
+        self._PhiLLPrescale_KmProbe_HiPt    = config[ 'PhiLL_Prescale_KmProbe_HiPt' ]
+        self._PhiLLPrescale_KpProbe_HiPt    = config[ 'PhiLL_Prescale_KpProbe_HiPt' ] 
+        self._LamLLPrescale_HiP             = config[ 'LamLL_Prescale_HiP' ]
+        self._LamLLPrescale_HiPt            = config[ 'LamLL_Prescale_HiPt' ]
+        self._LamLLPrescale_LoP             = config[ 'LamLL_Prescale_LoP' ]
+        self._LamDDPrescale                 = config[ 'LamDD_Prescale' ]
+        self._LamLLIsMUONPrescale_HiP       = config[ 'LamLLIsMUON_Prescale_HiP' ]
+        self._LamLLIsMUONPrescale_LoP       = config[ 'LamLLIsMUON_Prescale_LoP' ]
+        self._LamDDIsMUONPrescale           = config[ 'LamDDIsMUON_Prescale' ]
+        self._LamstarPrescale               = config[ 'Lamstar_Prescale' ]
+        self._minimumPt                     = config[ 'minimum_Pt']
+
+        self._monitor      = config[ 'Monitor' ]
+        self._hlt          = config[ 'HLT' ]
+        self._Preambulo    = config[ 'Preambulo' ]
+        
+       
+        LineBuilder.__init__( self , name , config )
+        
+        for line in self._lines_inner() :
+            self.registerLine(line)
+
+    def _lines_inner ( self ) :
+        if hasattr ( self , '_Lines' ) : return self._Lines
+
+        self._Lines = [
+            ##
+            StrippingLine (
+            "K0SLLLine" + self._name ,
+            prescale   = self._KS0LLPrescale ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.K0S_LL_Bin1() ],
+            RequiredRawEvents = ["Muon"],    
+            RelatedInfoTools = [ addRelInfoMuonIsolation("KS0 -> pi+ pi-")  ]  
+            ) ,
+            ##
+            StrippingLine (
+            "K0SLLLine_HiPt" + self._name ,
+            prescale   = self._KS0LLPrescale_HiPt ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.K0S_LL_Bin2() ],
+            RequiredRawEvents = ["Muon"],    
+            RelatedInfoTools = [ addRelInfoMuonIsolation("KS0 -> pi+ pi-")  ]  
+            ) ,
+            ## 
+            StrippingLine (
+            "K0SDDLine" + self._name ,
+            prescale   = self._KS0DDPrescale ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.K0S_DD_Bin1() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [ addRelInfoMuonIsolation("KS0 -> pi+ pi-")  ] 
+            ) ,
+            ## (S)
+            StrippingLine (
+            "PhiLLLine" + self._name ,
+            prescale   = self._PhiLLPrescale ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Phi_LL_Bin1() ],
+            RequiredRawEvents = ["Muon"], #??   
+            RelatedInfoTools = [ addRelInfoMuonIsolation("phi(1020) -> K+ K-")  ]  
+            ) ,
+            ##
+            StrippingLine (
+            "PhiLLLine_KmProbe_LoPt" + self._name ,
+            prescale   = self._PhiLLPrescale_KmProbe_LoPt ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Phi_LL_KmProbe_LoPt() ],
+            RequiredRawEvents = ["Muon"], #??   
+            RelatedInfoTools = [ addRelInfoMuonIsolation("phi(1020) -> K+ K-")  ]  
+            ) ,
+            StrippingLine (
+            "PhiLLLine_KpProbe_LoPt" + self._name ,
+            prescale   = self._PhiLLPrescale_KpProbe_LoPt ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Phi_LL_KpProbe_LoPt() ],
+            RequiredRawEvents = ["Muon"], #??   
+            RelatedInfoTools = [ addRelInfoMuonIsolation("phi(1020) -> K+ K-")  ]  
+            ) ,
+            StrippingLine (
+            "PhiLLLine_KmProbe_HiPt" + self._name ,
+            prescale   = self._PhiLLPrescale_KmProbe_HiPt ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Phi_LL_KmProbe_HiPt() ],
+            RequiredRawEvents = ["Muon"], #??   
+            RelatedInfoTools = [ addRelInfoMuonIsolation("phi(1020) -> K+ K-")  ]  
+            ) ,
+            StrippingLine (
+            "PhiLLLine_KpProbe_HiPt" + self._name ,
+            prescale   = self._PhiLLPrescale_KpProbe_HiPt ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Phi_LL_KpProbe_HiPt() ],
+            RequiredRawEvents = ["Muon"], #??   
+            RelatedInfoTools = [ addRelInfoMuonIsolation("phi(1020) -> K+ K-")  ]  
+            ) ,
+            #
+            StrippingLine (
+            "Lam0LLLine_LoP" + self._name ,
+            prescale   = self._LamLLPrescale_LoP ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_LL_Bin1() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ]  
+                ) ,
+            ## 
+            StrippingLine (
+            "Lam0LLLine_HiP" + self._name ,
+            prescale   = self._LamLLPrescale_HiP ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_LL_Bin2() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            ) ,
+            ## 
+            StrippingLine (
+            "Lam0LLLine_HiPt" + self._name ,
+            prescale   = self._LamLLPrescale_HiPt ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_LL_Bin3() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            ) ,
+            ## 
+            StrippingLine (
+            "Lam0DDLine" + self._name ,
+            prescale   = self._LamDDPrescale ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_DD_Bin1() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            ),
+            ## 
+            StrippingLine (
+            "Lam0LLIsMUONLine1" + self._name ,
+            prescale   = self._LamLLIsMUONPrescale_LoP ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_LL_Bin1_IsMUON() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            )
+            ,
+            ## 
+            StrippingLine (
+            "Lam0LLIsMUONLine2" + self._name ,
+            prescale   = self._LamLLIsMUONPrescale_HiP ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_LL_Bin2_IsMUON() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            )
+            ,
+            ## 
+            StrippingLine (
+            "Lam0DDIsMUONLine" + self._name ,
+            prescale   = self._LamDDIsMUONPrescale ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lam0_DD_Bin1_IsMUON() ],
+            RequiredRawEvents = ["Muon"],
+            RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda0 -> p+ pi-]CC")  ] 
+            )
+            ,
+            ##
+            StrippingLine (
+            "LamstarLine" + self._name ,
+            prescale   = self._LamstarPrescale ,
+            checkPV    = True , ## attention! PV is required!
+            postscale  = 1 ,
+            #HLT        = self._hlt , 
+            algos      = [ self.Lamstar0_LL_Bin1() ],
+            #RequiredRawEvents = ["Muon"],
+            #RelatedInfoTools = [  addRelInfoMuonIsolation("[ Lambda(1520)0 -> p+ K-]CC")] 
+            )
+            
+
+            ]
+
+        return self._Lines
+    
+    def K0S ( self ) :
+        """
+        Selection for K0S 
+        """
+        if hasattr ( self , 'K0S_LL' ) :
+            return self.K0S_LL
+
+        _K0S = CombineParticles(
+            #self.name + "StripK0S" ,
+            DecayDescriptor = "KS0 -> pi+ pi-" ,
+            Preambulo       = self._Preambulo,
+            DaughtersCuts   = {
+            '' : self._k0s_daughtersCuts ()
+            } ,
+            CombinationCut  = "AM < 1.0 * GeV " , 
+            MotherCut       = self._k0s_motherCut()
+            )
+
+        if self._monitor == True :
+            _K0S.Preambulo       += [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'K0S, LL-case' , 0.45 , 0.55 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _K0S.Monitor         = True ,
+            _K0S.HistoProduce    = True ,
+            _K0S.MotherMonitor = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+        
+        self.K0S_LL = Selection("SelK0S2PiPi_LL_" + self._name,
+                                Algorithm = _K0S,
+                                RequiredSelections = [ StdAllNoPIDsPions ]) 
+            
+        return self.K0S_LL
+
+    def K0SDD ( self ) :
+        """
+        Selection for K0S DD 
+        """
+        if hasattr ( self , 'K0S_DD' ) :
+            return self.K0S_DD
+        
+        _K0SDD = CombineParticles(
+            #self.name + "StripK0S_DD" ,
+            DecayDescriptor = "KS0 -> pi+ pi-" ,
+            Preambulo       = self._Preambulo,
+            DaughtersCuts   = {
+            '' : self._k0s_daughtersCuts ()
+            } ,
+            CombinationCut  = "AM < 1.0 * GeV " ,
+            MotherCut       = self._k0s_motherCut()
+            )
+
+        if self._monitor == True :
+            _K0SDD.Preambulo       += [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massDD     = monitor ( M / GeV ,             Histo ( 'K0S, DD-case' , 0.45 , 0.55 , 100 ) , 'M_DD'    ) " ,
+                "p1DD       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'K0S, DD-case' , 0.00 , 120 ,  100 ) , 'p1_DD'   ) " ,
+                "p2DD       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'K0S, DD-case' , 0.00 , 120 ,  100 ) , 'p2_DD'   ) " ,
+                ]
+            _K0SDD.Monitor         = True ,
+            _K0SDD.HistoProduce    = True ,
+            _K0SDD.MotherMonitor = """ process ( massDD )
+            >> process ( p1DD )
+            >> process ( p2DD )
+            >> EMPTY
+            """
+        
+        self.K0S_DD = Selection("SelK0S2PiPi_DD_" + self._name,
+                                Algorithm = _K0SDD,
+                                RequiredSelections = [ StdNoPIDsDownPions ]) 
+
+        return self.K0S_DD
+####(S)
+    def Phi ( self ) :
+        """
+        Selection for Phi 
+        """
+        if hasattr ( self , 'Phi_LL' ) :
+            return self.Phi_LL
+
+        _Phi = CombineParticles(
+            #self.name + "StripK0S" ,
+            DecayDescriptor = "phi(1020) -> K+ K-" ,
+            Preambulo       = self._Preambulo,
+            DaughtersCuts   = {
+            '' : self._phi_daughtersCuts ()
+            } ,
+            CombinationCut  = "(ADAMASS ('phi(1020)') < 40) & (ACUTDOCACHI2({},'') )".format(self._phimaxDOCA), #"AM < 1.5 * GeV " , 
+            MotherCut       = self._phi_motherCut()
+            )
+
+        if self._monitor == True :
+            _Phi.Preambulo       += [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'K0S, LL-case' , 0.96 , 1.1 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _Phi.Monitor         = True ,
+            _Phi.HistoProduce    = True ,
+            _Phi.MotherMonitor = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+        
+        self.Phi_LL = Selection("SelPhi2KK_LL_" + self._name,
+                                Algorithm = _Phi,
+                                RequiredSelections = [ StdAllNoPIDsKaons ]) 
+            
+        return self.Phi_LL
+
+
+    def Lam0 ( self ) :
+        """
+        Selection for Lam0 
+        """
+        if hasattr ( self , 'Lam0_LL' ) :
+            return self.Lam0_LL
+
+        _Lam0 = CombineParticles(
+            #self.name + "StripLam0" ,
+            DecayDescriptor = "[ Lambda0 -> p+ pi-]cc" ,
+            Preambulo       = self._Preambulo,
+            DaughtersCuts   = {
+            '' : self._lam0_daughtersCuts ()
+            } ,
+            CombinationCut  = "AM < 1.5 * GeV " ,
+            MotherCut       = self._lam0_motherCut()
+            )
+
+        if  self._monitor == True :
+            _Lam0.Preambulo       += [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0.Monitor         = True ,
+            _Lam0.HistoProduce    = True ,
+            _Lam0.MotherMonitor = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+        
+
+        self.Lam0_LL = Selection("SelLam02PPi_LL" + self._name,
+                                 Algorithm = _Lam0,
+                                 RequiredSelections = [ StdAllNoPIDsPions, StdAllNoPIDsProtons ]) 
+
+        return self.Lam0_LL
+
+    def Lam0DD ( self ) :
+        """
+        Selection for Lam0 DD 
+        """
+        if hasattr ( self , 'Lam0_DD' ) :
+            return self.Lam0_DD
+
+        _Lam0DD = CombineParticles(
+            #self.name + "StripLam0_DD" ,
+            DecayDescriptor = "[ Lambda0 -> p+ pi-]cc" ,
+            Preambulo       = self._Preambulo,
+            DaughtersCuts   = {
+            '' : self._lam0_daughtersCuts (),
+            } ,
+            CombinationCut  = "AM < 1.5 * GeV " ,
+            MotherCut       = self._lam0_motherCut()        
+            )
+
+        if  self._monitor == True :
+            _Lam0DD.Preambulo       += [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massDD     = monitor ( M / GeV ,             Histo ( 'Lambda0, DD-case' , 1.080 , 1.140 , 100 ) , 'M_DD'    ) " ,
+                "p1DD       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p1_DD'   ) " ,
+                "p2DD       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p2_DD'   ) " ,
+                ]
+            _Lam0DD.Monitor         = True ,
+            _Lam0DD.HistoProduce    = True ,
+            _Lam0DD.MotherMonitor = """ process ( massDD )
+            >> process ( p1DD )
+            >> process ( p2DD )
+            >> EMPTY
+            """
+        self.Lam0_DD = Selection("SelLam02PiPi_DD" + self._name ,
+                                 Algorithm = _Lam0DD,
+                                 RequiredSelections = [ StdNoPIDsDownPions , StdNoPIDsDownProtons]) 
+        
+        return self.Lam0_DD
+
+
+    def Lamstar0 ( self ) :
+        """
+        Selection for Lamstar0 
+        """
+        if hasattr ( self , 'Lamstar0_LL' ) :
+            return self.Lamstar0_LL
+
+        _Lamstar0 = CombineParticles(
+            #self.name + "StripLam0" ,
+            DecayDescriptor = "[ Lambda(1520)0 -> p+ K-]cc" ,
+            Preambulo       = self._Preambulo,
+            DaughtersCuts   = {
+            '' : self._lamstar0_daughtersCuts ()
+            } ,
+            CombinationCut  = "AM < 2.0 * GeV " ,
+            MotherCut       = self._lamstar0_motherCut()
+            )
+
+        if  self._monitor == True :
+            _Lamstar0.Preambulo       += [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lamstar0.Monitor         = True ,
+            _Lamstar0.HistoProduce    = True ,
+            _Lamstar0.MotherMonitor = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+        
+
+        self.Lamstar0_LL = Selection("SelLamstar02PK_LL" + self._name,
+                                 Algorithm = _Lamstar0,
+                                 RequiredSelections = [ StdAllNoPIDsProtons, StdAllNoPIDsKaons ]) 
+
+        return self.Lamstar0_LL
+
+
+
+    def K0S_LL_Bin1 ( self ) :
+        """
+        Selection for K0S LL Bin1
+        """
+        if hasattr(self, 'K0S_LL_Bin1_V0ForPID') :
+            return self.K0S_LL_Bin1_V0ForPID
+
+        K0S = self.K0S()
+        _K0S_LL_Bin1_Filter = FilterDesktop (
+            #self.name + 'K0S_LL_Bin1_Filter' ,
+            Code         = self._k0s_bin1Cut_LL()
+            )
+
+        if self._monitor == True :
+            _K0S_LL_Bin1_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'K0S, LL-case' , 0.45 , 0.55 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _K0S_LL_Bin1_Filter.Monitor      = True  ,
+            _K0S_LL_Bin1_Filter.HistoProduce = True  ,
+            _K0S_LL_Bin1_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.K0S_LL_Bin1_V0ForPID = Selection(
+            "SelK0S_LL_Bin1" + self._name,
+            Algorithm          = _K0S_LL_Bin1_Filter,
+            RequiredSelections = [ K0S ]
+            )
+        return self.K0S_LL_Bin1_V0ForPID
+  
+    ####(S)
+    def K0S_LL_Bin2 ( self ) :
+        """
+        Selection for K0S LL Bin2
+        """
+        if hasattr(self, 'K0S_LL_Bin2_V0ForPID') :
+            return self.K0S_LL_Bin2_V0ForPID
+
+        K0S = self.K0S()
+        _K0S_LL_Bin2_Filter = FilterDesktop (
+            #self.name + 'K0S_LL_Bin1_Filter' ,
+            Code         = self._k0s_bin2Cut_LL()
+            )
+
+        if self._monitor == True :
+            _K0S_LL_Bin2_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'K0S, LL-case' , 0.45 , 0.55 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'K0S, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _K0S_LL_Bin2_Filter.Monitor      = True  ,
+            _K0S_LL_Bin2_Filter.HistoProduce = True  ,
+            _K0S_LL_Bin2_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.K0S_LL_Bin2_V0ForPID = Selection(
+            "SelK0S_LL_Bin2" + self._name,
+            Algorithm          = _K0S_LL_Bin2_Filter,
+            RequiredSelections = [ K0S ]
+            )
+        return self.K0S_LL_Bin2_V0ForPID
+
+    #####
+
+    def K0S_DD_Bin1 ( self ) :
+        """
+        Selection for K0S DD Bin1
+        """
+        if hasattr(self, 'K0S_DD_Bin1_V0ForPID') :
+            return self.K0S_DD_Bin1_V0ForPID
+
+        _K0S_DD_Bin1_Filter = FilterDesktop (
+            #self.name + 'K0S_DD_Bin1_Filter' ,
+            Code         = self._k0s_bin1Cut_DD()
+            )
+
+        if self._monitor == True :
+            _K0S_DD_Bin1_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor DD-case
+                "massDD     = monitor ( M / GeV ,             Histo ( 'K0S, DD-case' , 0.45 , 0.55 , 100 ) , 'M_DD'    ) " ,
+                "p1DD       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'K0S, DD-case' , 0.00 , 120 ,  100 ) , 'p1_DD'   ) " ,
+                "p2DD       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'K0S, DD-case' , 0.00 , 120 ,  100 ) , 'p2_DD'   ) " ,
+                ]
+            _K0S_DD_Bin1_Filter.Monitor      = True  ,
+            _K0S_DD_Bin1_Filter.HistoProduce = True  ,
+            _K0S_DD_Bin1_Filter.PostMonitor  = """ process ( massDD )
+            >> process ( p1DD )
+            >> process ( p2DD )
+            >> EMPTY
+            """
+
+        self.K0S_DD_Bin1_V0ForPID = Selection(
+            "SelK0S_DD_Bin1" + self._name,
+            Algorithm          = _K0S_DD_Bin1_Filter,
+            RequiredSelections = [ self.K0SDD() ]
+            )
+        return self.K0S_DD_Bin1_V0ForPID
+
+
+#####(S)
+    def Phi_LL_Bin1 ( self ) :
+        """
+        Selection for Phi LL Bin1
+        """
+        if hasattr(self, 'Phi_LL_Bin1_V0ForPID') :
+            return self.Phi_LL_Bin1_V0ForPID
+
+        Phi = self.Phi()
+        _Phi_LL_Bin1_Filter = FilterDesktop (
+            #self.name + 'K0S_LL_Bin1_Filter' ,
+            Code         = self._phi_bin1Cut_LL()
+            )
+
+        if self._monitor == True :
+            _Phi_LL_Bin1_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Phi, LL-case' , 0.96 , 1.08 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Phi, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Phi, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _Phi_LL_Bin1_Filter.Monitor      = True  ,
+            _Phi_LL_Bin1_Filter.HistoProduce = True  ,
+            _Phi_LL_Bin1_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Phi_LL_Bin1_V0ForPID = Selection(
+            "SelPhi_LL_Bin1" + self._name,
+            Algorithm          = _Phi_LL_Bin1_Filter,
+            RequiredSelections = [ Phi ]
+            )
+        return self.Phi_LL_Bin1_V0ForPID
+
+#####(S)
+    def Phi_LL_KmProbe_LoPt ( self ) :
+        """
+        Selection for Phi LL at Low pT applying tag to the Kplus
+        """
+        if hasattr(self, 'Phi_LL_KmProbe_LoPt_V0ForPID') :
+            return self.Phi_LL_KmProbe_LoPt_V0ForPID
+
+        Phi = self.Phi()
+        _Phi_LL_KmProbe_LoPt_Filter = FilterDesktop (
+            #self.name + 'K0S_LL_Bin1_Filter' ,
+            Code         = self._phi_KmProbe_LoPt_Cut_LL()
+            )
+
+        if self._monitor == True :
+            _Phi_LL_KmProbe_LoPt_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Phi, LL-case' , 0.96 , 1.08 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Phi, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Phi, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _Phi_LL_KmProbe_LoPt_Filter.Monitor      = True  ,
+            _Phi_LL_KmProbe_LoPt_Filter.HistoProduce = True  ,
+            _Phi_LL_KmProbe_LoPt_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Phi_LL_KmProbe_LoPt_V0ForPID = Selection(
+            "SelPhi_LL_KmProbe_LoPt" + self._name,
+            Algorithm          = _Phi_LL_KmProbe_LoPt_Filter,
+            RequiredSelections = [ Phi ]
+            )
+        return self.Phi_LL_KmProbe_LoPt_V0ForPID
+
+#####(S)
+    def Phi_LL_KpProbe_LoPt ( self ) :
+        """
+        Selection for Phi LL at Low pT applying tag to the Kminus
+        """
+        if hasattr(self, 'Phi_LL_KpProbe_LoPt_V0ForPID') :
+            return self.Phi_LL_KpProbe_LoPt_V0ForPID
+
+        Phi = self.Phi()
+        _Phi_LL_KpProbe_LoPt_Filter = FilterDesktop (
+            #self.name + 'K0S_LL_Bin1_Filter' ,
+            Code         = self._phi_KpProbe_LoPt_Cut_LL()
+            )
+
+        if self._monitor == True :
+            _Phi_LL_KpProbe_LoPt_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Phi, LL-case' , 0.96 , 1.08 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Phi, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Phi, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _Phi_LL_KpProbe_LoPt_Filter.Monitor      = True  ,
+            _Phi_LL_KpProbe_LoPt_Filter.HistoProduce = True  ,
+            _Phi_LL_KpProbe_LoPt_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Phi_LL_KpProbe_LoPt_V0ForPID = Selection(
+            "SelPhi_LL_KpProbe_LoPt" + self._name,
+            Algorithm          = _Phi_LL_KpProbe_LoPt_Filter,
+            RequiredSelections = [ Phi ]
+            )
+        return self.Phi_LL_KpProbe_LoPt_V0ForPID
+
+#####(S)
+    def Phi_LL_KmProbe_HiPt ( self ) :
+        """
+        Selection for Phi LL at Low pT applying tag to the Kplus
+        """
+        if hasattr(self, 'Phi_LL_KmProbe_HiPt_V0ForPID') :
+            return self.Phi_LL_KmProbe_HiPt_V0ForPID
+
+        Phi = self.Phi()
+        _Phi_LL_KmProbe_HiPt_Filter = FilterDesktop (
+            #self.name + 'K0S_LL_Bin1_Filter' ,
+            Code         = self._phi_KmProbe_HiPt_Cut_LL()
+            )
+
+        if self._monitor == True :
+            _Phi_LL_KmProbe_HiPt_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Phi, LL-case' , 0.96 , 1.08 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Phi, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Phi, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _Phi_LL_KmProbe_HiPt_Filter.Monitor      = True  ,
+            _Phi_LL_KmProbe_HiPt_Filter.HistoProduce = True  ,
+            _Phi_LL_KmProbe_HiPt_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Phi_LL_KmProbe_HiPt_V0ForPID = Selection(
+            "SelPhi_LL_KmProbe_HiPt" + self._name,
+            Algorithm          = _Phi_LL_KmProbe_HiPt_Filter,
+            RequiredSelections = [ Phi ]
+            )
+        return self.Phi_LL_KmProbe_HiPt_V0ForPID
+
+#####(S)
+    def Phi_LL_KpProbe_HiPt ( self ) :
+        """
+        Selection for Phi LL at Low pT applying tag to the Kminus
+        """
+        if hasattr(self, 'Phi_LL_KpProbe_HiPt_V0ForPID') :
+            return self.Phi_LL_KpProbe_HiPt_V0ForPID
+
+        Phi = self.Phi()
+        _Phi_LL_KpProbe_HiPt_Filter = FilterDesktop (
+            #self.name + 'K0S_LL_Bin1_Filter' ,
+            Code         = self._phi_KpProbe_HiPt_Cut_LL()
+            )
+
+        if self._monitor == True :
+            _Phi_LL_KpProbe_HiPt_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Phi, LL-case' , 0.96 , 1.08 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Phi, LL-case' , 0.00 , 120 ,  100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Phi, LL-case' , 0.00 , 120 ,  100 ) , 'p2_LL'   ) " ,
+                ]
+            _Phi_LL_KpProbe_HiPt_Filter.Monitor      = True  ,
+            _Phi_LL_KpProbe_HiPt_Filter.HistoProduce = True  ,
+            _Phi_LL_KpProbe_HiPt_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Phi_LL_KpProbe_HiPt_V0ForPID = Selection(
+            "SelPhi_LL_KpProbe_HiPt" + self._name,
+            Algorithm          = _Phi_LL_KpProbe_HiPt_Filter,
+            RequiredSelections = [ Phi ]
+            )
+        return self.Phi_LL_KpProbe_HiPt_V0ForPID
+
+
+    def Lam0_LL_Bin1 ( self ) :
+        """
+        Selection for Lam0 LL Bin1
+        """
+        if hasattr(self, 'Lam0_LL_Bin1_V0ForPID') :
+            return self.Lam0_LL_Bin1_V0ForPID
+
+        Lam0 = self.Lam0()
+        _Lam0_LL_Bin1_Filter = FilterDesktop (
+            #self.name + 'Lam0_LL_Bin1_Filter' ,
+            Code         = self._lam0_bin1Cut_LL()
+            )
+        
+        if self._monitor == True :
+            _Lam0_LL_Bin1_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0_LL_Bin1_Filter.Monitor      = True  ,
+            _Lam0_LL_Bin1_Filter.HistoProduce = True ,
+            _Lam0_LL_Bin1_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Lam0_LL_Bin1_V0ForPID = Selection(
+            "SelLam0_LL_Bin1" + self._name,
+            Algorithm          = _Lam0_LL_Bin1_Filter,
+            RequiredSelections = [ Lam0 ]
+            )
+        return self.Lam0_LL_Bin1_V0ForPID
+
+    def Lam0_LL_Bin2 ( self ) :
+        """
+        Selection for Lam0 LL Bin2
+        """
+        if hasattr(self, 'Lam0_LL_Bin2_V0ForPID') :
+            return self.Lam0_LL_Bin2_V0ForPID
+
+        Lam0 = self.Lam0()
+        _Lam0_LL_Bin2_Filter = FilterDesktop (
+            #self.name + 'Lam0_LL_Bin2_Filter' ,
+            Code         = self._lam0_bin2Cut_LL()
+            )
+
+        if self._monitor == True :
+            _Lam0_LL_Bin2_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0_LL_Bin2_Filter.Monitor      = True  ,
+            _Lam0_LL_Bin2_Filter.HistoProduce = True  ,
+            _Lam0_LL_Bin2_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Lam0_LL_Bin2_V0ForPID = Selection(
+            "SelLam0_LL_Bin2" + self._name,
+            Algorithm          = _Lam0_LL_Bin2_Filter,
+            RequiredSelections = [ Lam0 ]
+            )
+        return self.Lam0_LL_Bin2_V0ForPID
+
+    ####
+    def Lam0_LL_Bin3 ( self ) :
+        """
+        Selection for Lam0 LL Bin3
+        """
+        if hasattr(self, 'Lam0_LL_Bin3_V0ForPID') :
+            return self.Lam0_LL_Bin3_V0ForPID
+
+        Lam0 = self.Lam0()
+        _Lam0_LL_Bin3_Filter = FilterDesktop (
+            #self.name + 'Lam0_LL_Bin1_Filter' ,
+            Code         = self._lam0_bin3Cut_LL()
+            )
+        
+        if self._monitor == True :
+            _Lam0_LL_Bin3_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0_LL_Bin3_Filter.Monitor      = True  ,
+            _Lam0_LL_Bin3_Filter.HistoProduce = True ,
+            _Lam0_LL_Bin3_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Lam0_LL_Bin3_V0ForPID = Selection(
+            "SelLam0_LL_Bin3" + self._name,
+            Algorithm          = _Lam0_LL_Bin3_Filter,
+            RequiredSelections = [ Lam0 ]
+            )
+        return self.Lam0_LL_Bin3_V0ForPID
+
+
+    def Lam0_LL_Bin1_IsMUON ( self ) :
+        """
+        Selection for Lam0 LL Bin1
+        """
+        if hasattr(self, 'Lam0_LL_Bin1_IsMUON_V0ForPID') :
+            return self.Lam0_LL_Bin1_IsMUON_V0ForPID
+        
+        Lam0 = self.Lam0()
+        _Lam0_LL_Bin1_IsMUON_Filter = FilterDesktop (
+            #self.name + 'Lam0_LL_Bin1_Filter' ,
+            Code         = self._lam0_bin1Cut_LL_IsMUON()
+            )
+
+        if self._monitor == True :
+            _Lam0_LL_Bin1_IsMUON_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0_LL_Bin1_IsMUON_Filter.Monitor      = True  ,
+            _Lam0_LL_Bin1_IsMUON_Filter.HistoProduce = True ,
+            _Lam0_LL_Bin1_IsMUON_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Lam0_LL_Bin1_IsMUON_V0ForPID = Selection(
+            "SelLam0_LL_Bin1_ISMUON" + self._name,
+            Algorithm          = _Lam0_LL_Bin1_IsMUON_Filter,
+            RequiredSelections = [ Lam0 ]
+            )
+        return self.Lam0_LL_Bin1_IsMUON_V0ForPID
+
+    def Lam0_LL_Bin2_IsMUON ( self ) :
+        """
+        Selection for Lam0 LL Bin2
+        """
+        if hasattr(self, 'Lam0_LL_Bin2_IsMUON_V0ForPID') :
+            return self.Lam0_LL_Bin2_IsMUON_V0ForPID
+        
+        Lam0 = self.Lam0()
+        _Lam0_LL_Bin2_IsMUON_Filter = FilterDesktop (
+            #self.name + 'Lam0_LL_Bin2_Filter' ,
+            Code         = self._lam0_bin2Cut_LL_IsMUON()
+            )
+        
+        if self._monitor == True :
+            _Lam0_LL_Bin2_IsMUON_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lam0_LL_Bin2_IsMUON_Filter.Monitor      = True  ,
+            _Lam0_LL_Bin2_IsMUON_Filter.HistoProduce = True  ,
+            _Lam0_LL_Bin2_IsMUON_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Lam0_LL_Bin2_IsMUON_V0ForPID = Selection(
+            "SelLam0_LL_Bin2_ISMUON" + self._name,
+            Algorithm          = _Lam0_LL_Bin2_IsMUON_Filter,
+            RequiredSelections = [ Lam0 ]
+            )
+        return self.Lam0_LL_Bin2_IsMUON_V0ForPID
+
+    def Lam0_DD_Bin1 ( self ) :
+        """
+        Selection for Lam0 DD Bin1
+        """
+        if hasattr(self, 'Lam0_DD_Bin1_V0ForPID') :
+            return self.Lam0_DD_Bin1_V0ForPID
+        
+        Lam0DD = self.Lam0DD()
+        _Lam0_DD_Bin1_Filter = FilterDesktop (
+            ##
+            #self.name + 'Lam0_DD_Bin1_Filter' ,
+            ##
+            Code         = self._lam0_bin1Cut_DD()
+            )
+        
+        if self._monitor == True :
+            _Lam0_DD_Bin1_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor DD-case
+                "massDD     = monitor ( M / GeV ,             Histo ( 'Lambda0, DD-case' , 1.080 , 1.140 , 100 ) , 'M_DD'    ) " ,
+                "p1DD       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p1_DD'   ) " ,
+                "p2DD       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p2_DD'   ) " ,
+                ]
+            _Lam0_DD_Bin1_Filter.Monitor      = True  ,
+            _Lam0_DD_Bin1_Filter.HistoProduce = True ,
+            _Lam0_DD_Bin1_Filter.PostMonitor  = """ process ( massDD )
+            >> process ( p1DD )
+            >> process ( p2DD )
+            >> EMPTY
+            """
+
+        self.Lam0_DD_Bin1_V0ForPID = Selection(
+            "SelLam0_DD_Bin1" + self._name,
+            Algorithm          = _Lam0_DD_Bin1_Filter,
+            RequiredSelections = [ Lam0DD ]
+            )
+        return self.Lam0_DD_Bin1_V0ForPID
+
+    def Lam0_DD_Bin1_IsMUON ( self ) :
+        """
+        Selection for Lam0 DD Bin1
+        """
+        if hasattr(self, 'Lam0_DD_Bin1_IsMUON_V0ForPID') :
+            return self.Lam0_DD_Bin1_IsMUON_V0ForPID
+        
+        Lam0DD = self.Lam0DD()
+        _Lam0_DD_Bin1_IsMUON_Filter = FilterDesktop (
+            ##
+            #self.name + 'Lam0_DD_Bin1_Filter' ,
+            ##
+            Code         = self._lam0_bin1Cut_LL_IsMUON()
+            )
+        
+        if self._monitor == True :
+            _Lam0_DD_Bin1_IsMUON_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor DD-case
+                "massDD     = monitor ( M / GeV ,             Histo ( 'Lambda0, DD-case' , 1.080 , 1.140 , 100 ) , 'M_DD'    ) " ,
+                "p1DD       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p1_DD'   ) " ,
+                "p2DD       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, DD-case' , 0.00  , 120   , 100 ) , 'p2_DD'   ) " ,
+                ]
+            _Lam0_DD_Bin1_IsMUON_Filter.Monitor      = True  ,
+            _Lam0_DD_Bin1_IsMUON_Filter.HistoProduce = True ,
+            _Lam0_DD_Bin1_IsMUON_Filter.PostMonitor  = """ process ( massDD )
+            >> process ( p1DD )
+            >> process ( p2DD )
+            >> EMPTY
+            """
+
+        self.Lam0_DD_Bin1_IsMUON_V0ForPID = Selection(
+            "SelLam0_DD_Bin1_ISMUON" + self._name,
+            Algorithm          = _Lam0_DD_Bin1_IsMUON_Filter,
+            RequiredSelections = [ Lam0DD ]
+            )
+        return self.Lam0_DD_Bin1_IsMUON_V0ForPID
+
+
+    def Lamstar0_LL_Bin1 ( self ) :
+        """
+        Selection for Lamstar0 LL Bin1
+        """
+        if hasattr(self, 'Lamstar0_LL_Bin1_V0ForPID') :
+            return self.Lamstar0_LL_Bin1_V0ForPID
+
+        Lamstar0 = self.Lamstar0()
+        _Lamstar0_LL_Bin1_Filter = FilterDesktop (
+            #self.name + 'Lam0_LL_Bin1_Filter' ,
+            Code         = self._lamstar0_bin1Cut_LL()
+            )
+        
+        if self._monitor == True :
+            _Lamstar0_LL_Bin1_Filter.Preambulo    = [
+                ## define historam type (shortcut)
+                "Histo  = Gaudi.Histo1DDef"  ,
+                ## monitor LL-case
+                "massLL     = monitor ( M / GeV ,             Histo ( 'Lambda0, LL-case' , 1.080 , 1.140 , 100 ) , 'M_LL'    ) " ,
+                "p1LL       = monitor ( CHILD( P, 1 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p1_LL'   ) " ,
+                "p2LL       = monitor ( CHILD( P, 2 ) / GeV , Histo ( 'Lambda0, LL-case' , 0.00  , 120   , 100 ) , 'p2_LL'   ) " ,
+                ]
+            _Lamstar0_LL_Bin1_Filter.Monitor      = True  ,
+            _Lamstar0_LL_Bin1_Filter.HistoProduce = True ,
+            _Lamstar0_LL_Bin1_Filter.PostMonitor  = """ process ( massLL )
+            >> process ( p1LL )
+            >> process ( p2LL )
+            >> EMPTY
+            """
+
+        self.Lamstar0_LL_Bin1_V0ForPID = Selection(
+            "SelLamstar0_LL_Bin1" + self._name,
+            Algorithm          = _Lamstar0_LL_Bin1_Filter,
+            RequiredSelections = [ Lamstar0 ]
+            )
+        return self.Lamstar0_LL_Bin1_V0ForPID
+
+
+    def trackChi2       ( self ) : return self._trackChi2
+    def daughtersIPChi2 ( self ) : return self._daughtersIPChi2
+    
+    ## define daughter cuts for K0S 
+    def _k0s_daughtersCuts ( self ) :
+        """
+        Define 'DaughtersCuts' for K0S
+        """
+        cuts = """
+        ( 2 * GeV < P )
+        & ( ISLONG | ISDOWN )
+        & ( TRCHI2DOF < %g )
+        & ( MIPCHI2DV(PRIMARY) > %g )
+        """
+        cuts = cuts %( self._trackChi2, self._daughtersIPChi2 )
+        return cuts.replace ( '\n' , ' ' ) 
+
+    ## define daughter cuts for Phi0 (S)
+    def _phi_daughtersCuts ( self ) :
+        """
+        Define 'DaughtersCuts' for Phi0
+        """
+        cuts = """
+        ( ISLONG | ISDOWN )
+        & ( TRCHI2DOF < %g )
+        & ( PT > %g )
+        """
+        cuts = cuts %( self._trackChi2, 
+                       self._minimumPt)
+        return cuts.replace ( '\n' , ' ' ) 
+
+    
+    ## define daughter cuts for Lambda0
+    def _lam0_daughtersCuts ( self ) :
+        """
+        Define 'DaughtersCuts' for Lambda0
+        """
+        return self._k0s_daughtersCuts () 
+
+    def _lamstar0_daughtersCuts ( self ) :
+        """
+        Define 'DaughtersCuts' for Lambdastar0
+        """
+        cuts = """
+        ( 12 * GeV < P )
+        & ( ISLONG | ISDOWN )
+        & ( TRCHI2DOF < %g ) 
+        & (PT > %g)
+        """
+        cuts = cuts %( self._trackChi2, 
+                       self._minimumPt)
+        return cuts.replace ( '\n' , ' ' ) 
+
+
+    ## define "MotherCut" for K0s 
+    def _k0s_motherCut      ( self ) :
+        """
+        Define 'MotherCut' for K0S
+        """
+        cut       = """
+        ( ADMASS ( 'KS0') < %g  )
+        & in_range ( 0 , VFASPF ( VCHI2 ) ,  %g   )
+        & ( VFASPF ( VZ   ) < %g          )
+        & in_range ( 0 , BPVLTFITCHI2()   ,  %g )
+        & ( BPVLTIME()*c_light > switch ( DD , %g , %g ) )
+        & ( ADWM( 'Lambda0' , WM( 'p+' , 'pi-') ) > switch( DD, %g , %g ) )
+        & ( ADWM( 'Lambda0' , WM( 'pi+' , 'p~-') ) > switch( DD, %g , %g ) )
+        """
+        cut = cut %(self._deltaMassK0S,
+                    self._vertexChi2,
+                    self._maxZ,
+                    self._lTimeFitChi2,
+                    self._cTauK0S_DD,
+                    self._cTauK0S,
+                    self._wrongMassK0S_DD,
+                    self._wrongMassK0S,
+                    self._wrongMassK0S_DD,
+                    self._wrongMassK0S
+                    )
+        
+        return cut.replace ( '\n' , ' ' )  
+
+    ## define "MotherCut" for K0s (S)
+    def _phi_motherCut      ( self ) :
+        """
+        Define 'MotherCut' for Phi
+        """
+        cut       = """
+        ( ADMASS ( 'phi(1020)') < %g  )
+        & in_range ( 0 , VFASPF ( VCHI2 ) ,  %g   )
+        & ( VFASPF ( VZ   ) < %g          )
+        """        
+        #
+        #        
+        #& in_range ( 0 , BPVLTFITCHI2()   ,  %g )
+        #& ( BPVLTIME()*c_light > switch ( DD , %g , %g ) )
+        #& ( ADWM( 'Lambda0' , WM( 'p+' , 'pi-') ) > switch( DD, %g , %g ) )
+        #& ( ADWM( 'Lambda0' , WM( 'pi+' , 'p~-') ) > switch( DD, %g , %g ) )
+        
+        cut = cut %(self._deltaMassPhi,
+                    self._vertexChi2,
+                    self._maxZ
+                    #self._lTimeFitChi2,
+                    #self._cTauK0S_DD,
+                    #self._cTauK0S,
+                    #self._wrongMassK0S_DD,
+                    #self._wrongMassK0S,
+                    #self._wrongMassK0S_DD,
+                    #self._wrongMassK0S
+                    )
+        
+        return cut.replace ( '\n' , ' ' )  
+        
+    ## define "MotherCut" for Lambda0
+    def _lam0_motherCut      ( self ) :
+        """
+        Define 'MotherCut' for Lambda0
+        """
+        cut       = """
+        ( ADMASS ( 'Lambda0')   < %g )
+        & in_range ( 0 , VFASPF ( VCHI2 ) ,  %g   )
+        & ( VFASPF ( VZ       ) < %g            )
+        & in_range ( 0 , BPVLTFITCHI2()   ,  %g )
+        & ( BPVLTIME()*c_light > switch ( DD , %g , %g ) )
+        & ( ADWM( 'KS0' , WM( 'pi+' , 'pi-') ) > switch( DD, %g  , %g ) ) 
+        """
+        cut = cut %(self._deltaMassLambda,
+                    self._vertexChi2,
+                    self._maxZ,
+                    self._lTimeFitChi2,
+                    self._cTauLambda0_DD,
+                    self._cTauLambda0,
+                    self._wrongMassLambda_DD,
+                    self._wrongMassLambda
+                    )
+        
+        return cut.replace ( '\n' , ' ' ) 
+
+    ## define "MotherCut" for Lambdastar0
+    def _lamstar0_motherCut      ( self ) :
+        """
+        Define 'MotherCut' for Lambda0
+        """
+        cut       = """
+        ( M < %g )
+        & in_range ( 0 , VFASPF ( VCHI2 ) ,  %g   )
+        & ( VFASPF ( VZ       ) < %g            )
+        & ( INTREE ( (ABSID == 'K+' ) & (TRGHP < %g) & (%s)) )
+        & (INTREE ( (ABSID == 'p+' ) & (PIDp > %g) & ((PIDp - PIDK) > %g) & (TRGHP < %g) & (%s) ))
+        """
+        cut = cut %(self._maxMassLambdastar,
+                    self._vertexChi2,
+                    self._maxZ,
+                    self._ghostprob_Lambdastar,
+                    self._otherKcuts_Lambdastar,
+                    self._PIDp_Lambdastar,
+                    self._PIDpPIDK_Lambdastar,
+                    self._ghostprob_Lambdastar,
+                    self._otherpcuts_Lambdastar,
+                    )
+        
+        return cut.replace ( '\n' , ' ' ) 
+        
+
+    ## define "Bin1 Cut" for K0S LL
+    def _k0s_bin1Cut_LL ( self ) :
+        """
+        Define 'Bin1 Cut' for K0S LL
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+
+    ## define "Bin1 Cut" for K0S LL
+    def _k0s_bin2Cut_LL ( self ) :
+        """
+        Define 'Bin2 Cut' for K0S LL
+        """
+        cut       = """
+        PT > %g 
+        """
+        cut = cut %(self.K0s_HiPt_Pt_thre)
+        return cut.replace ( '\n' , ' ' ) 
+    #1250 MeV
+
+    ##define "Bin1 Cut" for Phi LL (S)
+    def _phi_bin1Cut_LL ( self ) :
+        """
+        Define 'Bin1 Cut' for Phi LL
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+    ##define "KpProbe Cut" for Low pT Phi LL (S)
+    def  _phi_KpProbe_LoPt_Cut_LL ( self ) :
+        """
+        Define 'KpProbe Cut' for Phi LL
+        """
+        cut       = """
+        INTREE ( (ID == 'K-' ) & (PROBNNK > %g) & (TRGHP < %g) ) 
+        """
+        cut = cut % (self.Phi_LoPt_ProbNNK_Tag,
+                     self.Phi_GhostProb_Tag,
+                   )
+        return cut.replace ( '\n' , ' ' ) 
+
+    ##define "KmProbe Cut" for low pT Phi LL (S)
+    def  _phi_KmProbe_LoPt_Cut_LL ( self ) :
+        """
+        Define 'KmProbe Cut' for Phi LL
+        """
+        cut       = """
+        INTREE ( (ID == 'K+' ) & (PROBNNK > %g) & (TRGHP < %g) )
+        """
+        cut = cut % (self.Phi_LoPt_ProbNNK_Tag,
+                     self.Phi_GhostProb_Tag,
+                     )
+        return cut.replace ( '\n' , ' ' ) 
+
+    ##define "KpProbe Cut" for High pT Phi LL (S)
+    def  _phi_KpProbe_HiPt_Cut_LL ( self ) :
+        """
+        Define 'KpProbe Cut' for Phi LL
+        """
+        cut       = """
+        INTREE ( (ID == 'K-' ) & (PIDK > %g) & (TRGHP < %g) & (PT > %g) )
+        """
+        cut = cut % (self.Phi_HiPt_PIDK_Tag,
+                     self.Phi_GhostProb_Tag,
+                     self.Phi_HiPt_PT_Tag,
+                   )
+        return cut.replace ( '\n' , ' ' ) 
+
+    ##define "KmProbe Cut" for high pT Phi LL (S)
+    def  _phi_KmProbe_HiPt_Cut_LL ( self ) :
+        """
+        Define 'KmProbe Cut' for Phi LL
+        """
+        cut       = """
+        INTREE ( (ID == 'K+' ) & (PIDK > %g) & (TRGHP < %g) & (PT > %g) )
+        """
+        cut = cut % (self.Phi_HiPt_PIDK_Tag,
+                     self.Phi_GhostProb_Tag,
+                     self.Phi_HiPt_PT_Tag
+                     )
+        return cut.replace ( '\n' , ' ' ) 
+
+    ##define "Bin1 Cut" for Phi LL (S)
+    def _phi_bin1Cut_LL ( self ) :
+        """
+        Define 'Bin1 Cut' for Phi LL
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+    ## define "Bin1 Cut" for Lambda0 LL
+    def _lam0_bin1Cut_LL ( self ) :
+        """
+        Define 'Bin1 Cut' for Lambda0 LL
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+    ## define "Bin2 Cut" for Lambda0 LL
+    def _lam0_bin2Cut_LL ( self ) :
+        """
+        Define 'Bin2 Cut' for Lambda0 LL
+        """
+        cut       = """
+        (INTREE( (ABSID=='p+') & ( P > 40 * GeV ) ) )
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+
+    ## define "Bin3 Cut" for Lambda0 LL
+    def _lam0_bin3Cut_LL ( self ) :
+        """
+        Define 'Bin3 Cut' for Lambda0 LL
+        """
+        cut       = """
+        (INTREE( (ABSID=='p+') & ( PT > %g ) ) )
+        """
+        cut = cut %( self.Lambda_HiPt_Pt_thre)
+        #PT > 750 * MeV
+        return cut.replace ( '\n' , ' ' ) 
+
+
+    ## define "Bin1 IsMUON Cut" for Lambda0 LL 
+    def _lam0_bin1Cut_LL_IsMUON ( self ) :
+        """
+        Define 'Bin1 Cut' for Lambda0 LL
+        """
+        cut       = """
+        (INTREE( (ABSID=='p+') & ISMUON ) )
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+    ## define "Bin1 IsMUON Cut" for Lambda0 LL 
+    def _lam0_bin2Cut_LL_IsMUON ( self ) :
+        """
+        Define 'Bin2 Cut' for Lambda0 LL
+        """
+        cut       = """
+        (INTREE( (ABSID=='p+') & ( ISMUON & (P > 40 * GeV) ) ) )
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+
+    ## define "Bin1 Cut" for K0S DD
+    def _k0s_bin1Cut_DD ( self ) :
+        """
+        Define 'Bin1 Cut' for K0S DD
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+ 
+
+    ## define "Bin1 Cut" for Lambda0 DD
+    def _lam0_bin1Cut_DD ( self ) :
+        """
+        Define 'Bin1 Cut' for Lambda0 DD
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+    ## define "Bin1 Cut" for Lambda0 LL
+    def _lamstar0_bin1Cut_LL ( self ) :
+        """
+        Define 'Bin1 Cut' for Lambdastar0 LL
+        """
+        cut       = """
+        ALL
+        """
+        cut = cut % locals()
+        return cut.replace ( '\n' , ' ' ) 
+
+
+if '__main__' == __name__ :
+
+    print __doc__
+    print 'Author : %s ' % __author__
+    print 'Date   : %s ' % __date__
+    print __version__
+
+    conf = StrippingV0ForPIDConf_ForIFT()
+    
+    print conf
+
+    props = [ 'DaughtersCuts'   ,
+              'CombinationCut'  ,
+              'MotherCut'       ,
+              'DecayDescriptor' ,
+              'DecayDescriptors'] 
+                           
+    for l in conf.K0S     () : print __enroll__ ( l , lst = props ) 
+    for l in conf.Lambda0 () : print __enroll__ ( l , lst = props )
+    for l in conf.Phi     () : print __enroll__ ( l,  lst = props )  #(S)
+    
+
+def addRelInfoMuonIsolation( decdes ):    
+    import re
+    _DauLoc={}
+    _daughters = re.match(r'(.*)->([ |\[]*)([^\]]+)(.*)', decdes)
+    if _daughters:    
+        _particles = _daughters.group(3).split()
+        _ip=1
+        _gp=1
+        for _p in _particles:
+            if re.match(r'(pi|p|K|e|mu)[\+|-]',_p):
+                _key= _daughters.group(1)+"->"+_daughters.group(2)
+                _jp=1
+                for _p2 in _particles:
+                    _key+=" "
+                    if _jp==_ip: _key+="^"
+                    _key+=_p2
+                    _jp=_jp+1
+                _key+=_daughters.group(4).replace("cc","CC")
+                _DauLoc[_key] = "MudetIso"+str(_gp)
+                _gp=_gp+1
+            _ip=_ip+1
+    else:
+        return {}
+    return {  "Type" : "RelInfoMuonIsolation", "DaughterLocations" : _DauLoc}
+
+
+# =============================================================================
+# The END 
+# =============================================================================
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/Utils.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/Utils.py
new file mode 100644
index 000000000..3ab3a31cf
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/Utils.py
@@ -0,0 +1,366 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Helpers for construction of Stripping Selections
+'''
+__author__ = "Juan Palacios juan.palacios@cern.ch"
+__date__ = "30/06/2010"
+
+__all__ = ('lineBuilder')
+
+import inspect
+from os import environ
+from pprint import *
+from Gaudi.Configuration import *
+
+from StrippingSettings.Utils import lineBuilderConfiguration
+from StrippingSettings.Utils import strippingConfiguration
+
+def checkConfig(reference_keys, configuration) :
+    # IMPORTANT: don't remove this function
+    # as it is needed to check the correctness of
+    # LineBuilder configurations
+    pass
+
+
+def lineBuilder(stripping, lineBuilderName, WGs = None) :
+    """
+    Create a line builder from a stripping version and a line builder
+    instance name.  The instance name must be registered in the database.
+    Usage:
+    lb = lineBuilder('Stripping13', 'B2XGamma')
+    print lb.lines()
+    """
+    from StrippingSelections import lineBuilders
+    if isinstance(stripping, basestring) :
+        _config = lineBuilderConfiguration(stripping, lineBuilderName)
+    else :
+        _config = stripping[lineBuilderName]
+
+    try:
+        _lb = lineBuilders(WGs)[_config['BUILDERTYPE']](lineBuilderName,_config['CONFIG'])
+    except Exception, x:
+        log.error("Unable to configure %s because of %s" %(_config['BUILDERTYPE'],str(x)))
+    else:
+        return _lb
+
+
+def streamNames(stripping) :
+    from SelPy.utils import flattenList, removeDuplicates
+    from StrippingSettings.Utils import strippingConfiguration
+    if isinstance(stripping, basestring) :
+        _db = strippingConfiguration( stripping )
+    else :
+        _db = stripping
+
+    streams =  [v['STREAMS'] for v in _db.values()]
+    return list(set(flattenList(streams)))
+
+def cloneLinesFromStream(stream, prefix = 'Clone' , prescale = 1.0):
+    """
+    Clone the lines belonging to a StrippingStream with a
+    global prescale and return them as a flat list
+    >>> stream = StrippingStream('Test')
+    >>> lines  = cloneLinesFromStream(stream,prefix='Clone',prescale=1.0)
+    """
+
+    clonedLines = []
+
+    for _line in stream.lines:
+        clonedLine = _line.clone( prefix + _line.name().lstrip('Stripping'),
+                                  prescale = _line.prescale()*prescale )
+        clonedLines.append( clonedLine )
+    return clonedLines
+
+
+def cloneStream( stream, newStreamName = 'Full', linePrefix = 'Full', prescale = 1.0 ):
+	"""
+	Clone the stream
+	"""
+	from StrippingConf.StrippingStream import StrippingStream
+	lines = cloneLinesFromStream( stream, linePrefix, prescale )
+	stream = StrippingStream( newStreamName )
+	stream.appendLines( lines )
+	return stream
+
+
+
+def addBuilderToStreamGrouping( streams, config, lb ):
+    """
+    Append lines from a line builder to a dictionary
+    mapping lines to stream names.
+    """
+    from StrippingUtils.Utils import lineFromName
+
+    for stream in config['STREAMS']:
+        if stream in streams:
+            if isinstance(config['STREAMS'],dict):
+                for linename in config['STREAMS'][stream]:
+                    line = lineFromName( lb,   linename )
+                    if line:
+                        streams[stream] += [ line ]
+                    else:
+                        raise Exception('The line you have requested does not exist '+linename + \
+                                        ", stream " + stream + ", builder " + config['BUILDERTYPE'])
+            elif isinstance(config['STREAMS'],list):
+                streams[stream] += [ line for line in lb.lines() ]
+            else:
+                raise Exception( 'Unsupported type, expected list' +
+                                 'or dict for line-to-STREAM mapping' )
+        else:
+            if isinstance(config['STREAMS'],dict):
+                for linename in config['STREAMS'][stream]:
+                    line = lineFromName( lb,   linename )
+                    if line:
+                        if stream not in streams:
+                            streams[stream] = [ line ]
+                        else:
+                            streams[stream] += [ line ]
+                    else:
+                        raise Exception('The line you have requested does not exist '+linename + \
+                                        ", stream " + stream + ", builder " + config['BUILDERTYPE'])
+            elif isinstance(config['STREAMS'],list):
+                streams[stream] = [ line for line in lb.lines() ]
+            else:
+                raise Exception( 'Unsupported type, expected list' +
+                                 'or dict for line-to-STREAM mapping' )
+    return
+
+
+def buildStream( stripping, streamName = '', WGs = None ):
+    """
+    Create a StrippingStream from the lineBuilder database
+    Usage:
+    >>> streamDimuon = strippingStream('Stripping13','Dimuon')
+    or:
+    >>> conf = strippingConfiguration('Stripping13')
+    >>> streamDimuon = strippingStream(conf,'Dimuon')
+
+    """
+
+    from StrippingConf.StrippingStream import StrippingStream
+    from StrippingSettings.Utils import strippingConfiguration
+    from StrippingSelections import lineBuilders
+    from StrippingUtils.Utils import lineFromName
+
+    stream = StrippingStream( streamName )
+
+    if isinstance(stripping, basestring) :
+        _db = strippingConfiguration( stripping )
+    else :
+        _db = stripping
+
+
+    for key in _db.keys():
+        _conf = _db[key]
+        if stream.name() in _conf['STREAMS']:
+            if WGs and not any( WG for WG in _conf['WGs'] if WG in WGs): continue
+            try:
+                _lb = lineBuilders()[_conf['BUILDERTYPE']](key,_conf['CONFIG'])
+            except Exception, x:
+                log.error("Unable to configure %s because of %s" %(_conf['BUILDERTYPE'], str(x)))
+            else:
+                if isinstance(_conf['STREAMS'],dict):
+                    for linename in _conf['STREAMS'][stream.name()]:
+                        line = lineFromName( _lb, linename )
+                        if line:
+                            stream.appendLines( [ line ] )
+                        else:
+                            raise Exception('The line you have requested does not exist '+linename)
+                elif isinstance(_conf['STREAMS'],list):
+                    stream.appendLines( _lb.lines() )
+                else:
+                    raise Exception( 'Unsupported type, expected list ' +
+                                     'or dict for line-to-STREAM mapping' )
+    return stream
+
+
+def buildStreams( stripping, WGs = None ):
+    """
+    Build and return a set of StrippingStreams for a given
+    stripping configuration.
+    Usage:
+
+    >>> streams = buildStreams('Stripping13')
+    >>> for s in streams :
+    ...   print s.name(), s.lines
+
+
+    It is also possible to use a configuration dictionary
+    directly:
+
+    >>> conf = strippingConfiguration('Stripping13')
+    >>> streams = buildStreams(conf)
+
+    To select only streams belonging to the RD or the
+    Gamma from trees WGs:
+
+    >>> streams = buildStreams('stripping13', WGs = ['RD','GammaFromTrees'] )
+    >>>
+
+    """
+    from StrippingConf.StrippingStream import StrippingStream
+    from StrippingSettings.Utils import strippingConfiguration
+    from StrippingSelections import lineBuilders
+
+    streams = {}
+
+    if isinstance(stripping, basestring) :
+        scdb = strippingConfiguration(stripping)
+    else :
+        scdb = stripping
+
+    for k, v in scdb.iteritems() :
+        if 'STREAMS' in v.keys() and not WGs or 'WGs' in v.keys():
+            if not WGs or any( WG for WG in v['WGs'] if WG in WGs ):
+                try:
+                    lb = lineBuilders()[v['BUILDERTYPE']](k,v['CONFIG'])
+                except Exception, x:
+                    log.error("Unable to configure %s because of %s" %(v['BUILDERTYPE'],str(x)))
+                else:
+                    addBuilderToStreamGrouping( streams, v, lb )
+        else:
+            raise Exception('Config',k,'missing either STREAM or WG data data.')
+
+    strippingStreams=[]
+    for stream in streams:
+        lines = [ line for line in streams[stream] ]
+        print ( 'Creating ' + stream + ' stream with '
+                + str( len(lines) ) + ' lines' )
+        strippingStreams.append( StrippingStream( stream, Lines = lines ) )
+    return strippingStreams
+
+def buildStreamsFromBuilder(conf, names ):
+    """
+    Build and return a set of StrippingStreams for a given line builder configuration
+    Usage:
+
+    >>> streams = buildStreamsFromBuilder(somelinebuilder, 'B2ppipiSigmacmm_Lcpi')
+    """
+    
+    from StrippingConf.StrippingStream import StrippingStream
+    from StrippingSettings.Utils import strippingConfiguration
+    from StrippingSelections import lineBuilders
+
+    streams = {}
+
+    if not isinstance(names, list):
+      names = [names]
+    
+    for name in names:
+      _conf = {}
+      if conf.has_key(name) :
+        _conf[name] = conf[name]
+      else:
+        log.error("The requested name %s is not present in the default_config of any LineBuilder" %name) 
+    
+      #_conf=lb.default_config
+      #if isinstance(stripping, basestring) :
+          #scdb = strippingConfiguration(stripping)
+      #else :
+          #scdb = stripping
+
+      for k, v in _conf.iteritems() :
+          if 'STREAMS' in v.keys():
+            
+              try:
+                  lb = lineBuilders()[v['BUILDERTYPE']](k,v['CONFIG'])
+              except Exception, x:
+                  log.error("Unable to configure %s because of %s" %(v['BUILDERTYPE'],str(x)))
+              else:
+                  addBuilderToStreamGrouping( streams, v, lb )
+          else:
+              raise Exception('Config',k,'missing either STREAM.')
+    ##
+
+    strippingStreams=[]
+    for stream in streams:
+        lines = [ line for line in streams[stream] ]
+        print ( 'Creating ' + stream + ' stream with '
+                + str( len(lines) ) + ' lines' )
+        strippingStreams.append( StrippingStream( stream, Lines = lines ) )
+    return strippingStreams
+
+## def buildStream(stripping, streamName = ''):
+##     """
+##     Create a StrippingStream from the lineBuilder database
+##     Usage:
+##     >>> streamDimuon = strippingStream('Stripping13','Dimuon')
+##     or:
+##     >>> conf = strippingConfiguration('Stripping13')
+##     >>> streamDimuon = strippingStream(conf,'Dimuon')
+
+##     """
+
+##     from StrippingConf.StrippingStream import StrippingStream
+##     from StrippingSettings.Utils import strippingConfiguration
+##     from StrippingSelections import lineBuilders
+
+##     stream = StrippingStream( streamName )
+
+##     if isinstance(stripping, basestring) :
+##         _db = strippingConfiguration( stripping )
+##     else :
+##         _db = stripping
+
+##     for key in _db.keys():
+##         _conf = _db[key]
+##         if stream.name() in _conf['STREAMS']:
+##             _lb = lineBuilders()[_conf['BUILDERTYPE']](key,_conf['CONFIG'])
+##             stream.appendLines( _lb.lines() )
+##     return stream
+
+## def buildStreams(stripping) :
+##     """
+##     Build and return a set of StrippingStreams for a given stripping
+##     configuration.
+##     Usage:
+
+##     >>> streams = buildStreams('Stripping13')
+##     >>> for s in streams :
+##     ...   print s.name(), s.lines
+
+
+##     It is also possible to use a configuration dictionary directly:
+
+##     >>> conf = strippingConfiguration('Stripping13')
+##     >>> streams = buildStreams(conf)
+
+##     """
+##     from StrippingConf.StrippingStream import StrippingStream
+##     streams = {}
+##     if isinstance(stripping, basestring) :
+##         scdb = strippingConfiguration(stripping)
+##     else :
+##         scdb = stripping
+
+##     for k, v in scdb.iteritems() :
+##         if 'STREAMS' in v.keys() :
+##             for stream in v['STREAMS'] :
+##                 if stream in streams.keys() :
+##                     streams[stream] += [k]
+##                 else :
+##                     streams[stream] = [k]
+##         else :
+##             print 'ERROR: config',k,'had no STREAMS data. Ignore!!!'
+##     builderMap = {}
+##     for builder in scdb.keys() :
+##         builderMap[builder] = lineBuilder(scdb, builder)
+
+##     strippingStreams=[]
+##     for stream, builderNames in streams.iteritems() :
+##         lines=[]
+##         for b in builderNames :
+##             lines +=  [line for line in builderMap[b].lines()]
+##         print 'Creating steam', stream, 'with lines', lines
+##         strippingStreams.append(StrippingStream(stream, Lines = lines))
+##     return strippingStreams
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/__init__.py
new file mode 100644
index 000000000..2b055e69b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingIFT/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ('StrippingHeL2ppppi', 'StrippingHeMedian', 'StrippingHeNOverflows', 'StrippingLb2V0pphh', 'StrippingLb2dpX')
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/StrippingBadEvents.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/StrippingBadEvents.py
new file mode 100644
index 000000000..86cb1849a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/StrippingBadEvents.py
@@ -0,0 +1,57 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Andrea Contu'
+__date__ = '21/11/2014'
+__version__ = '$Revision: 1 $'
+
+"""
+Stripping selections for BadEvents.
+"""
+
+# Begin StrippingBadEvents.py
+
+default_config = {
+    'NAME'        : 'BadEvents',
+    'BUILDERTYPE' : 'BadEventsConf',
+    'CONFIG'      : { "GEC"       : "((TrSOURCE('/Event/Rec/Track/Best', TrLONG)"\
+                                    " >> (sum(TrPT,TrP<1 * TeV))>1 * TeV))",
+                      "prescale": 1.0,
+                      "postscale": 1.0 },
+    'WGs'         : [ 'ALL' ],
+    'STREAMS'     : [ 'MiniBias' ]
+}
+
+__all__ = ('BadEventsConf' )
+
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import Selection
+
+class BadEventsConf(LineBuilder) :
+    """
+    Builder for BadEvent lines
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+      LineBuilder.__init__(self, name, config)
+      
+      _filter={'Code': config['GEC'], 'Preambulo' : ["from LoKiTracks.decorators import *" ,
+                                                     "from LoKiCore.functions    import * ",
+                                                     "from GaudiKernel.SystemOfUnits import *"]}
+                                      
+      line = StrippingLine(name
+                           ,FILTER = _filter
+                           ,prescale = config["prescale"]
+                           ,postscale = config["postscale"]
+                           , RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC" ])
+      self.registerLine( line )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/StrippingMiniBias.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/StrippingMiniBias.py
new file mode 100644
index 000000000..fa657dadd
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/StrippingMiniBias.py
@@ -0,0 +1,82 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Patrick Koppenburg'
+__date__ = '25/02/2011'
+__version__ = '$Revision: 2 $'
+
+"""
+Stripping selections or Minimum Bias physics.
+"""
+
+# Begin StrippingMinBias.py
+
+default_config = { 'NAME': 'MiniBias',
+                   'WGs': ['ALL'],
+                   'BUILDERTYPE': 'MiniBiasConf',
+                   'STREAMS': ['MiniBias'],
+                   'CONFIG' : { "NoBiasLine_RE"       : "(HLT_PASS('Hlt1MBNoBiasDecision'))",
+                                "NoBiasLine_Rate" : 1,
+                                "NoBiasLine_Limiter" : "Hlt1MBNoBiasODINFilter",
+                                "NoBiasLine_CondDB" : True , # False before 2012
+                                "L0AnyPSLine_RE"      : "(HLT_PASS_RE('Hlt1L0Any.*Decision'))",
+                                "L0AnyPSLine_PS"  : 0.1,
+                              }
+                 }
+
+__all__ = ('MiniBiasConf' )
+
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+class MiniBiasConf(LineBuilder) :
+    """
+    Builder for Minimum bias lines
+    """
+    NoBiasLine = None
+    L0AnyLineRateLimited = None
+    L0AnyLinePrescaled = None
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+      LineBuilder.__init__(self, name, config)
+      self.NoBiasLine = self._makeLine("MBNoBias",
+                                       config["NoBiasLine_RE"],
+                                       config["NoBiasLine_Limiter"],
+                                       config["NoBiasLine_Rate"],
+                                       UseConditionDB=config["NoBiasLine_CondDB"] )
+      
+      self.L0AnyLinePrescaled = StrippingLine("Hlt1L0AnyPrescaled"
+                                              , HLT1 = config["L0AnyPSLine_RE"]
+                                              , checkPV = False
+                                              , prescale = config["L0AnyPSLine_PS"]
+                                              , RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC" ])
+      self.registerLine( self.L0AnyLinePrescaled )
+
+    def _makeLine(self,name,RE,limiter,rate,UseConditionDB=False):
+      from Configurables import OfflineRateLimiter  
+
+      orl = OfflineRateLimiter(name+"ORL",
+                               HltLimiter = limiter,  
+                               Rate = rate,
+                               UseCondition = UseConditionDB,
+                               FallBack = UseConditionDB)
+
+      line = StrippingLine(name
+                           , HLT1 =  RE
+                           , checkPV = False
+                           , algos = [ orl ] 
+                           , RequiredRawEvents = ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker", "HC" ])
+
+      self.registerLine( line )
+      return line
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/__init__.py
new file mode 100644
index 000000000..8cd9dba4a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingMiniBias/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ()
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/DisplVertices_Utils.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/DisplVertices_Utils.py
new file mode 100644
index 000000000..69b010d7a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/DisplVertices_Utils.py
@@ -0,0 +1,99 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Utilities for displaced vertex stripping: wrapper class around PatPV3D
+"""
+
+__all__ = ( "SelectionFromAlgorithmWithTools", "SelectionPatPV3DWrapper" )
+
+from GaudiConfUtils import isConfigurable
+
+from SelPy.utils import ( UniquelyNamedObject, ClonableObject, SelectionBase
+                        , compatibleSequences, IncompatibleInputLocations
+                        , CloneCallable, makeOutputLocation, setOutputLocation )
+
+from PhysSelPython.Wrappers import checkConfigurable, checkName
+
+def connectToRequiredSelections(selection, inputSetter) :
+    """
+    Make selection get input data from its requiredSelections via an inputSetter method (str).
+    Changed from SelPy.utils to descend into the configurable tree of PatPV3D if inputSetter contains "."
+    """
+    _outputLocations = [sel.outputLocation() for sel in selection.requiredSelections()]
+    _outputLocations = filter(lambda s : s != '', _outputLocations)
+    configurable = selection.algorithm()
+
+    if inputSetter:
+        attrTree = inputSetter.split(".")
+        for attrName in attrTree[:-1]:
+            if hasattr(configurable, attrName):
+                configurable = getattr(configurable, attrName)
+        _inputLocations = getattr(configurable, attrTree[-1])
+        if len(_inputLocations) != 0 :
+            if not compatibleSequences(_outputLocations,
+                                       _inputLocations) :
+                raise IncompatibleInputLocations('InputLocations of input algorithm incompatible with RequiredSelections!'\
+                                                 '\nInputLocations: '+str(_inputLocations)+\
+                                                 '\nRequiredSelections: '+str(_outputLocations))
+        configurable.__setattr__(attrTree[-1], list(_outputLocations))
+
+"""
+Selection-like class, constructed from a configurable algorithm (instead of ConfigurableGenerator),
+with the option to set delegate the input location to a tool property (e.g. PVOfflineTool for PatPV3D
+Merged code from PhysSelPython.Wrappers and SelPy.selection
+"""
+class SelectionFromAlgorithmWithTools( UniquelyNamedObject, ClonableObject, SelectionBase ) :
+
+    def __init__( self
+                , name
+                , Algorithm
+                , RequiredSelections = []
+                , OutputBranch       = "Phys"
+                , InputDataSetter    = "Inputs"
+                , OutputDataSetter   = "Output"
+                , Extension          = "Particles" ) :
+
+        checkName(name)
+
+        UniquelyNamedObject.__init__(self, name)
+        ClonableObject.__init__(self, locals())
+
+        _outputLocation = makeOutputLocation(name = self.name(),
+                                             branch    = OutputBranch,
+                                             leaf      = Extension)
+
+        alg = Algorithm.clone(name)
+
+        SelectionBase.__init__(self,
+                               algorithm = alg,
+                               outputLocation = _outputLocation,
+                               requiredSelections = RequiredSelections )
+
+        connectToRequiredSelections(self, InputDataSetter)
+        setOutputLocation(self, OutputDataSetter)
+
+"""
+Construct a SelectionFromAlgorithmWithTools with default settings for PatPV3D
+"""
+def SelectionPatPV3DWrapper( name
+                           , Algorithm
+                           , RequiredSelections = []
+                           , OutputBranch       = "Phys"
+                           , InputDataSetter    = "PVOfflineTool.InputTracks"
+                           , OutputDataSetter   = "OutputVerticesName"
+                           , Extension          = "Vertices" ) :
+    return SelectionFromAlgorithmWithTools( name
+             , Algorithm
+             , RequiredSelections = RequiredSelections
+             , OutputBranch       = OutputBranch
+             , InputDataSetter    = InputDataSetter
+             , OutputDataSetter   = OutputDataSetter
+             , Extension          = Extension )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA1MuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA1MuMu.py
new file mode 100755
index 000000000..a73f67139
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA1MuMu.py
@@ -0,0 +1,123 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+################################################
+#      Stripping lines for A_1 -> mu+ mu-      #
+#                                              #
+#                                              #
+# Author: Ch. Elsasser elsasser@cern.ch (2012) #
+# Modified by C. Vazquez Sierra (06/Apr/2016)  #
+#             carlos.vazquez@cern.ch           #
+################################################
+
+"""
+
+A_1 -> mu+ mu-, based on functionality from StrippingDiMuonNew by Jibo He.
+
+"""
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import Selection, DataOnDemand, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+from StandardParticles import StdLooseDiMuon, StdLooseDiMuonSameSign
+
+
+__author__  = 'Carlos Vazquez Sierra', 'Christian Elsasser'
+__date__    = '06/04/2016'
+__version__ = '$Revision: 2.0$'
+__all__     = 'A1MuMuConf', 'default_config'
+
+default_config = {
+  'NAME'        : 'A1MuMu',
+  'BUILDERTYPE' : 'A1MuMuConf',
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : [ 'Dimuon' ], # FullDST for iso5 variables.
+  'CONFIG'      : {
+    'A1MuMu_LinePrescale'   : 1.0,
+    'A1MuMu_LinePostscale'  : 1.0,
+    'A1MuMu_checkPV'        : False,
+    'DIMUON_LOW_MASS'       : 5000.0 * MeV,
+    'PT_MUON_MIN'           : 2500.0 * MeV,
+    'P_MUON_MIN'            : 2500.0 * MeV, # (sanity cut: de facto no cut)
+    'TRACKCHI2_MUON_MAX'    : 10,         # dimensionless
+    'PT_DIMUON_MIN'         : 7500.0 * MeV,
+    'VCHI2_DIMUON_MAX'      : 12,         # dimensionless
+  },
+}
+
+
+class A1MuMuConf(LineBuilder) :
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+
+    ### A1 -> mu+ mu- line:
+    sel = filterDiMuon( name + '_SelMuMu', 
+      [StdLooseDiMuon],
+      MuonPT        = config['PT_MUON_MIN'],
+      MuonP         = config['P_MUON_MIN'],
+      MuonTRCHI2DOF = config['TRACKCHI2_MUON_MAX'],
+      MuMuMinMass   = config['DIMUON_LOW_MASS'],
+      MuMuVCHI2PDOF = config['VCHI2_DIMUON_MAX'],
+      MuMuPT        = config['PT_DIMUON_MIN'],
+    )
+
+    self.registerLine(StrippingLine(name + 'Line',
+      prescale  = config['A1MuMu_LinePrescale'],
+      postscale = config['A1MuMu_LinePrescale'],
+      #RequiredRawEvents = ["Muon","Calo","Rich","Velo","Tracker"],
+      RequiredRawEvents = ["Muon"],
+      checkPV   = config['A1MuMu_checkPV'],
+      selection = sel,
+    ))
+
+    ### [A1 -> mu- mu-]cc line:
+    sel = filterDiMuon( name + '_SelMuMuSS',
+      [StdLooseDiMuonSameSign],
+      MuonPT        = config['PT_MUON_MIN'],
+      MuonP         = config['P_MUON_MIN'],
+      MuonTRCHI2DOF = config['TRACKCHI2_MUON_MAX'],
+      MuMuMinMass   = config['DIMUON_LOW_MASS'],
+      MuMuVCHI2PDOF = config['VCHI2_DIMUON_MAX'],
+      MuMuPT        = config['PT_DIMUON_MIN'],
+    )
+            
+    self.registerLine(StrippingLine(name + 'SameSign' + 'Line',
+      prescale  = config['A1MuMu_LinePrescale'],
+      postscale = config['A1MuMu_LinePrescale'],
+      #RequiredRawEvents = ["Muon","Calo","Rich","Velo","Tracker"],
+      RequiredRawEvents = ["Muon"],
+      checkPV   = config['A1MuMu_checkPV'],
+      selection = sel,
+    ))
+
+
+# Filtering DiMuon selection:
+def filterDiMuon( name,
+                  inputs,
+                  MuonPT,
+                  MuonP,
+                  MuonTRCHI2DOF,
+                  MuMuMinMass,
+                  MuMuVCHI2PDOF,
+                  MuMuPT ):
+
+  MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(MuonTRCHI2DOF)s)" % locals()
+  MuMuCut = "(MM > %(MuMuMinMass)s) & (VFASPF(VCHI2PDOF)< %(MuMuVCHI2PDOF)s) & (PT > %(MuMuPT)s)" % locals()
+  code    = MuonCut + " & " + MuMuCut
+  return SimpleSelection( name, FilterDesktop, inputs, Code=code)
+
+### END OF FILE ###
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA2MuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA2MuMu.py
new file mode 100644
index 000000000..e2564afdd
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA2MuMu.py
@@ -0,0 +1,88 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Lines for A->MuMu
+#
+# A2MuMusignal: StdAllLooseMuons,  pT > 2.5 GeV & 12 < MM < 60 [GeV]
+
+__all__ = (
+  'A2MuMuConf',
+  'default_config',
+)
+
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons, StdAllNoPIDsMuons
+from GaudiKernel.SystemOfUnits import GeV
+
+
+default_config = {
+    'NAME'        : 'A2MuMu',
+    'BUILDERTYPE' : 'A2MuMuConf',
+    'WGs'         : [ 'QEE'],
+    'STREAMS'     : [ 'EW' ],
+    'CONFIG'      : { 
+        'A2MuMu_Prescale'  : 1.0,
+        'A2MuMu_Postscale' : 1.0,
+        'pT'               : 2.5 * GeV,
+        'MMmin'            : 12. * GeV,
+        'MMmax'            : 60. * GeV,
+    },
+}
+
+
+class A2MuMuConf( LineBuilder ) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ) :
+
+        LineBuilder.__init__( self, name, config )
+
+        # Define the cuts
+        _pT      = '(PT>%(pT)s)'%config
+        _MMrange = '(MM>%(MMmin)s) & (MM<%(MMmax)s)'%config
+
+
+        # A2MuMu signal
+        sel_A2MuMu = makeCombination( name + 'A2MuMu',
+                                            StdAllLooseMuons,
+                                            _pT,
+                                            _MMrange
+                                            )
+
+        line_A2MuMu = StrippingLine( name + 'Line',
+                                           prescale  = config[ 'A2MuMu_Prescale' ],
+                                           postscale = config[ 'A2MuMu_Postscale' ],
+                                           #RequiredRawEvents = ["Muon","Calo","Rich","Velo","Tracker"],
+                                           RequiredRawEvents = ["Muon"],
+                                           checkPV   = False,
+                                           selection = sel_A2MuMu
+                                           )
+
+        self.registerLine( line_A2MuMu )
+      
+
+def makeCombination( name, _input, _daughters, _mother ) :
+
+    _combination = CombineParticles( DecayDescriptor    = 'Z0 -> mu+ mu-',
+                                     DaughtersCuts      = { 'mu+' : _daughters, 
+                                                            'mu-' : _daughters },
+                                     MotherCut          = _mother,
+                                     WriteP2PVRelations = False
+                                     )
+
+    return Selection ( name,
+                       Algorithm          = _combination,
+                       RequiredSelections = [ _input ]
+                       )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA2MuMuSameSign.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA2MuMuSameSign.py
new file mode 100644
index 000000000..3cac5e327
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingA2MuMuSameSign.py
@@ -0,0 +1,88 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Lines for A->MuMu
+#
+# A2MuMuSameSignsignal: StdAllLooseMuons,  pT > 2.5 GeV & 12 < MM < 60 [GeV]
+
+__all__ = (
+  'A2MuMuSameSignConf',
+  'default_config',
+)
+
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons, StdAllNoPIDsMuons
+from GaudiKernel.SystemOfUnits import GeV
+
+
+default_config = {
+    'NAME'        : 'A2MuMuSameSign',
+    'BUILDERTYPE' : 'A2MuMuSameSignConf',
+    'WGs'         : [ 'QEE'],
+    'STREAMS'     : [ 'EW' ],
+    'CONFIG'      : { 
+        'A2MuMuSameSign_Prescale'  : 1.0,
+        'A2MuMuSameSign_Postscale' : 1.0,
+        'pT'               : 2.5 * GeV,
+        'MMmin'            : 12. * GeV,
+        'MMmax'            : 60. * GeV,
+    },
+}
+
+
+class A2MuMuSameSignConf( LineBuilder ) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ) :
+
+        LineBuilder.__init__( self, name, config )
+
+        # Define the cuts
+        _pT      = '(PT>%(pT)s)'%config
+        _MMrange = '(MM>%(MMmin)s) & (MM<%(MMmax)s)'%config
+
+
+        # A2MuMuSameSign signal
+        sel_A2MuMuSameSign = makeCombination( name + 'A2MuMuSameSign',
+                                            StdAllLooseMuons,
+                                            _pT,
+                                            _MMrange
+                                            )
+
+        line_A2MuMuSameSign = StrippingLine( name + 'Line',
+                                           prescale  = config[ 'A2MuMuSameSign_Prescale' ],
+                                           postscale = config[ 'A2MuMuSameSign_Postscale' ],
+                                           #RequiredRawEvents = ["Muon","Calo","Rich","Velo","Tracker"],
+                                           RequiredRawEvents = ["Muon"],
+                                           checkPV   = False,
+                                           selection = sel_A2MuMuSameSign
+                                           )
+
+        self.registerLine( line_A2MuMuSameSign )
+      
+
+def makeCombination( name, _input, _daughters, _mother ) :
+
+    _combination = CombineParticles( DecayDescriptor    = '[Z0 -> mu+ mu+]cc',
+                                     DaughtersCuts      = { 'mu+' : _daughters, 
+                                                            'mu-' : _daughters },
+                                     MotherCut          = _mother,
+                                     WriteP2PVRelations = False
+                                     )
+
+    return Selection ( name,
+                       Algorithm          = _combination,
+                       RequiredSelections = [ _input ]
+                       )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingALP2TauTau.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingALP2TauTau.py
new file mode 100644
index 000000000..5b1ee169a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingALP2TauTau.py
@@ -0,0 +1,313 @@
+###############################################################################
+# (c) Copyright 2000-2021 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 Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, OfflineVertexFitter
+from PhysSelPython.Wrappers import Selection, DataOnDemand, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from CommonParticles import StdAllNoPIDsPions
+from StrippingUtils.Utils import LineBuilder
+
+'''
+Stripping lines for ALP -> tautau searches (both displaced and prompt). 
+Various decay mode combinations of the tau leptons are considered.
+Authots: Xabier Cid Vidal, Carlos Vazquez Sierra.
+'''
+
+__all__ = ('ALP2TauTauConf', 'default_config')
+
+default_config =  {
+  'NAME'                 : 'ALP2TauTau',
+  'BUILDERTYPE'          : 'ALP2TauTauConf',
+  'WGs'                  : [ 'QEE' ],
+  'CONFIG'               : {
+                           'SpdMult'                   : '6000',
+                           # Leptons (e, mu) [tighter cuts with respect to arXiv:xxxx.xxxx - no max(e_ISO, mu_ISO) for emu mode]:
+                           'TAUE_PROBNN_EMU'           : 0.5,
+                           'TAUE_PT'                   : 3500 * MeV,
+                           'TAUE_P'                    : 10000 * MeV,
+                           'TAUE_IP'                   : 0.03 * mm,
+                           'TAUE_PROBNN'               : 0.25,
+                           'TAUE_ISO'                  : .99,
+                           'TAUMU_PT'                  : 3500 * MeV,
+                           'TAUMU_P'                   : 10000 * MeV,
+                           'TAUMU_IP'                  : 0.01 * mm,
+                           'TAUMU_PROBNN'              : 0.8,
+                           'TAUMU_ISO'                 : .99,
+                           # Tau leptons and pion daughters:
+                           'TAUCOMB_DOCA'              : 0.05*mm,
+                           'TAU_MASS_HIGH'             : 1700.*MeV,
+                           'TAU_MASS_LOW'              : 0.*MeV,
+                           'TAUPI_MINPT'               : 1000 * MeV,
+                           'TAUPI_MINP'                : 2000 * MeV,
+                           'TAUPI_MINIP'               : 0.01 * mm,
+                           'TAUPI_MINPID'              : 0.,
+                           'TAU_IPMAX'                 : 0.2* mm,
+                           'TAU_MCORR_MAX'             : 2500.*MeV,
+                           'TAU_MCORR_MIN'             : 1200.*MeV,
+                           'TAU_PT'                    : 10000.*MeV,
+                           'TAU_ISO'                   : .15, # this cut kills signal but also helps to reduce background.
+                           ## Specific cuts for full hadronic modes:
+                           'TAUPI_MINPT_FH'            : 500 * MeV,
+                           'TAU_IPMAX_FH'              : 0.1* mm,
+                           'TAU_RHO_MIN_FH'            : 0.1* mm,
+                           'TAU_RHO_MAX_FH'            : 5.* mm,
+                           'TAU_PT_FH'                 : 2500.*MeV,
+                           ## ALP combination:
+                           'HTAU_IPMAX'                : 0.2*mm,
+                           'HTAU_DOCA'                 : 0.4*mm,
+                           'HTAU_FDMAX'                : 1*mm,
+                           'HTAU_DOCA_FH'              : 0.1*mm,
+                           'HTAU_FDMAX_FH'             : 0.25*mm,
+                           'HTAU_IPMAX_FH'             : 0.1*mm,
+                           'HTAU_MASS_LOW'             : 0.*MeV,
+                           'HTAU_MASS_HIGH'            : 1e6*MeV,
+                           'HTAU_ETA_MIN'              : 2,
+                           'HTAU_ETA_MAX'              : 4.5,
+                           'HTAU_PT_MIN'               : 15*GeV,
+                           'HTAU_PT_MAX'               : 150*GeV,
+                           'HTAU_PT_DAUG_MIN'          : 5.*GeV,
+                           'HTAU_PT_DAUG_MAX'          : 7.5*GeV,
+                           'HTAU_ETA_DAUG_MIN'         : 1.5,
+                           'HTAU_ETA_DAUG_MAX'         : 5,
+                           ## Prescales and postscales:
+                           'HTau3HTau3H_LinePrescale'  : 1,
+                           'HTau3HTau3H_LinePostscale' : 1,
+                           'HTau3HTauMu_LinePrescale'  : 1,
+                           'HTau3HTauMu_LinePostscale' : 1,
+                           'HTau3HTauE_LinePrescale'   : 1,
+                           'HTau3HTauE_LinePostscale'  : 1,
+                           'HTauMuTauE_LinePrescale'   : 1,
+                           'HTauMuTauE_LinePostscale'  : 1
+                           },
+                           'STREAMS'     : ['BhadronCompleteEvent']
+                           }
+
+##########################################################################
+
+class ALP2TauTauConf(LineBuilder) :
+  ''' Build all the ALP lines for different combinations of tau lepton decays'''
+
+  __configuration_keys__ = default_config['CONFIG'].keys()  
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+
+    self.FilterSPD = {'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" % config ,
+                      'Preambulo' : ["from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"]}
+    
+    # Build the input objects for the lines:
+
+    self.config = config
+
+    self.taus3H    = self._makeMyH3Tau( name+"_Tau3HSel" )
+    self.taus3H_FH = self._makeMyH3TauFullHadronic( name+"_Tau3HSel_for3H3H" )
+    self.tausMu    = self._makeTau2Lep( name+"_TauMuSel", "muon" )
+    self.tausE     = self._makeTau2Lep( name+"_TauESel", "electron" )
+    self.tausE_Emu = self._makeTau2Lep( name+"_TauEForEMuSel", "electron_emu")
+
+    self.selH2Tau3HTau3H = self._makeHLepLep( name+"_H2tau3Htau3H", [self.taus3H_FH],  channel = 0 )
+    self.selH2Tau3HTauMu = self._makeHLepLep( name+"_H2tau3HtauMu", [self.tausMu, self.taus3H],  channel = 1 )
+    self.selH2Tau3HTauE  = self._makeHLepLep( name+"_H2tau3HtauE",  [self.tausE, self.taus3H],  channel = 2 )
+    self.selH2TauMuTauE  = self._makeHLepLep( name+"_H2tauMutauE",  [self.tausE_Emu, self.tausMu],  channel = 3 )
+
+    ## Finished making selections build and register lines
+
+    self.HTau3HTau3H_Line  = self._makeLine("HTau3HTau3HLine", self.selH2Tau3HTau3H,
+                                            config['HTau3HTau3H_LinePrescale'],
+                                            config['HTau3HTau3H_LinePostscale'])
+
+    self.HTau3HTauMu_Line  = self._makeLine("HTau3HTauMuLine", self.selH2Tau3HTauMu,
+                                            config['HTau3HTauMu_LinePrescale'],
+                                            config['HTau3HTauMu_LinePostscale'])
+      
+    self.HTau3HTauE_Line  = self._makeLine("HTau3HTauELine", self.selH2Tau3HTauE,
+                                           config['HTau3HTauE_LinePrescale'],
+                                           config['HTau3HTauE_LinePostscale'])
+
+    self.HTauMuTauE_Line  = self._makeLine("HTauMuTauELine", self.selH2TauMuTauE,
+                                           config['HTauMuTauE_LinePrescale'],
+                                           config['HTauMuTauE_LinePostscale'])
+
+    ## Displaces lines
+
+    self.taus3H_Dis    = self._makeMyH3Tau( name+"_Tau3HSel_Dis", displaced = True )
+    self.taus3H_FH_Dis = self._makeMyH3TauFullHadronic( name+"_Tau3HSel_for3H3H_Dis", displaced = True)
+
+    self.selH2Tau3HTau3H_Dis = self._makeHLepLep( name+"_H2tau3Htau3H_Dis", [self.taus3H_FH_Dis],  channel = 0, displaced = True)
+    self.selH2Tau3HTauMu_Dis = self._makeHLepLep( name+"_H2tau3HtauMu_Dis", [self.tausMu, self.taus3H_Dis],  channel = 1, displaced = True)
+    self.selH2Tau3HTauE_Dis = self._makeHLepLep( name+"_H2tau3HtauE_Dis",  [self.tausE, self.taus3H_Dis],  channel = 2, displaced = True)
+    self.selH2TauMuTauE_Dis  = self._makeHLepLep( name+"_H2tauMutauE_Dis",  [self.tausE_Emu, self.tausMu],  channel = 3, displaced = True)
+
+    self.HTau3HTau3HDis_Line  = self._makeLine("HTau3HTau3HDisplacedLine", self.selH2Tau3HTau3H_Dis,
+                                               config['HTau3HTau3H_LinePrescale'],
+                                               config['HTau3HTau3H_LinePostscale'])
+
+    self.HTau3HTauMuDis_Line  = self._makeLine("HTau3HTauMuDisplacedLine", self.selH2Tau3HTauMu_Dis,
+                                               config['HTau3HTauMu_LinePrescale'],
+                                               config['HTau3HTauMu_LinePostscale'])
+      
+    self.HTau3HTauEDis_Line  = self._makeLine("HTau3HTauEDisplacedLine", self.selH2Tau3HTauE_Dis,
+                                              config['HTau3HTauE_LinePrescale'],
+                                              config['HTau3HTauE_LinePostscale'])
+      
+    self.HTauMuTauEDis_Line  = self._makeLine("HTauMuTauEDisplacedLine", self.selH2TauMuTauE_Dis,
+                                              config['HTauMuTauE_LinePrescale'],
+                                              config['HTauMuTauE_LinePostscale'])
+
+  ##########################################################################
+
+  def _makeTau2Lep(self, name, daugh):
+    ''' Filter muons and electrons to build the ALP objects'''
+
+    if daugh=="muon":
+      mysel = DataOnDemand("Phys/StdAllNoPIDsMuons/Particles")
+      _code = "( PT > %(TAUMU_PT)s )" \
+              "& ( P > %(TAUMU_P)s )" \
+              "& ( MIPDV(PRIMARY)> %(TAUMU_IP)s )" \
+              "& ( PT/(PT+PTCONE) > %(TAUMU_ISO)s )" \
+              "& ( PROBNNmu > %(TAUMU_PROBNN)s )" % self.config
+
+    if "electron" in daugh:
+      mysel = DataOnDemand("Phys/StdAllNoPIDsElectrons/Particles")
+      _code = "( PT > %(TAUE_PT)s )" \
+              "& ( P > %(TAUE_P)s )" \
+              "& ( MIPDV(PRIMARY)> %(TAUE_IP)s )" \
+              "& ( PT/(PT+PTCONE) > %(TAUE_ISO)s )" % self.config
+
+      if daugh=="electron_emu": _code += "& ( PROBNNe > %(TAUE_PROBNN_EMU)s )" % self.config
+      else: _code += "& ( PROBNNe > %(TAUE_PROBNN)s )" % self.config
+ 
+    _Filter = FilterDesktop(Code = _code, Preambulo = ["PTCONE  = SUMCONE (0.05, PT, '/Event/Phys/StdAllNoPIDsPions/Particles')"])
+
+    return Selection(name, Algorithm = _Filter, RequiredSelections = [ mysel ] )
+
+  ##########################################################################
+
+  def _makeMyH3Tau(self, name, displaced = False):
+    ''' Build tau leptons from 3-prong modes'''
+
+    pions = DataOnDemand("Phys/StdAllNoPIDsPions/Particles")
+
+    combcut   = " (AMAXDOCA('')<%(TAUCOMB_DOCA)s) & (AM<%(TAU_MASS_HIGH)s) & (AM>%(TAU_MASS_LOW)s) "\
+                "& (AMINCHILD(PT, 211==ABSID) > %(TAUPI_MINPT)s) & (AMINCHILD(P, 211==ABSID) > %(TAUPI_MINP)s)"\
+                "& (AMINCHILD(MIPDV(PRIMARY),211==ABSID) > %(TAUPI_MINIP)s) & (AMINCHILD(PROBNNpi,211==ABSID) > %(TAUPI_MINPID)s)" % self.config
+
+    if displaced: # inverted IPmax cut, looser requirement.
+      mothercut = "( MIPDV(PRIMARY) > %(TAU_IPMAX_FH)s) "\
+                  "& ( BPVCORRM < %(TAU_MCORR_MAX)s )" \
+                  "& ( BPVCORRM > %(TAU_MCORR_MIN)s )" \
+                  "& ( PT/(PT+PTCONE) > %(TAU_ISO)s )" \
+                  "& (M<%(TAU_MASS_HIGH)s) & (M>%(TAU_MASS_LOW)s) & (PT>%(TAU_PT)s)" % self.config
+    else:
+      mothercut = "( MIPDV(PRIMARY) < %(TAU_IPMAX)s) "\
+                  "& ( BPVCORRM < %(TAU_MCORR_MAX)s )" \
+                  "& ( BPVCORRM > %(TAU_MCORR_MIN)s )" \
+                  "& ( PT/(PT+PTCONE) > %(TAU_ISO)s )" \
+                  "& (M<%(TAU_MASS_HIGH)s) & (M>%(TAU_MASS_LOW)s) & (PT>%(TAU_PT)s)" % self.config
+
+    return SimpleSelection(name, 
+                           CombineParticles,
+                           [pions],
+                           DecayDescriptors = ["[tau+ -> pi+ pi- pi+]cc"],
+                           Preambulo        = ["PTCONE  = SUMCONE (10., PT, '/Event/Phys/StdAllNoPIDsPions/Particles')"],
+                           CombinationCut   = combcut,
+                           MotherCut        = mothercut )
+
+  ##########################################################################
+
+  def _makeMyH3TauFullHadronic(self, name, displaced = False):
+    ''' Build tau leptons from 3-prong modes, for ALP modes to both tau with 3-prongs'''
+
+    pions = DataOnDemand("Phys/StdAllNoPIDsPions/Particles")
+
+    combcut   = " (AMAXDOCA('')<%(TAUCOMB_DOCA)s) & (AM<%(TAU_MASS_HIGH)s) & (AM>%(TAU_MASS_LOW)s) "\
+                "& (AMINCHILD(PT, 211==ABSID) > %(TAUPI_MINPT_FH)s) & (AMINCHILD(P, 211==ABSID) > %(TAUPI_MINP)s)"\
+                "& (AMINCHILD(MIPDV(PRIMARY), 211==ABSID) > %(TAUPI_MINIP)s) & (AMINCHILD(PROBNNpi, 211==ABSID) > %(TAUPI_MINPID)s) " % self.config
+
+    if displaced: # inverted IPmax cut, and removed RHO cuts.
+      mothercut = "( MIPDV(PRIMARY) > %(TAU_IPMAX_FH)s) "\
+                  "& ( BPVCORRM < %(TAU_MCORR_MAX)s )" \
+                  "& ( BPVCORRM > %(TAU_MCORR_MIN)s )" \
+                  "& ( PT/(PT+PTCONE) > %(TAU_ISO)s )" \
+                  "& (M<%(TAU_MASS_HIGH)s) & (M>%(TAU_MASS_LOW)s) & (PT>%(TAU_PT_FH)s)" % self.config
+                  #"& (M<%(TAU_MASS_HIGH)s) & (BPVVDRHO>%(TAU_RHO_MAX_FH)s) & (M>%(TAU_MASS_LOW)s) & (PT>%(TAU_PT_FH)s)" % self.config
+    else:
+      mothercut = "( MIPDV(PRIMARY) < %(TAU_IPMAX_FH)s) "\
+                  "& ( BPVCORRM < %(TAU_MCORR_MAX)s )" \
+                  "& ( BPVCORRM > %(TAU_MCORR_MIN)s )" \
+                  "& ( PT/(PT+PTCONE) > %(TAU_ISO)s )" \
+                  "& (M<%(TAU_MASS_HIGH)s) & (BPVVDRHO>%(TAU_RHO_MIN_FH)s) & (BPVVDRHO<%(TAU_RHO_MAX_FH)s) & (M>%(TAU_MASS_LOW)s) & (PT>%(TAU_PT_FH)s)" % self.config
+
+    return SimpleSelection(name, 
+                           CombineParticles, 
+                           [pions],
+                           DecayDescriptors = ["[tau+ -> pi+ pi- pi+]cc"],
+                           Preambulo        = ["PTCONE  = SUMCONE (10., PT, '/Event/Phys/StdAllNoPIDsPions/Particles')"],
+                           CombinationCut   = combcut,
+                           MotherCut        = mothercut )
+
+  ##########################################################################
+
+  def _makeHLepLep(self, name, inps, channel, displaced = False) :
+    ''' Build the full ALP from the different combinations of tau decay modes'''
+
+    preambulo  = ["from LoKiPhysMC.decorators import *", "from PartProp.Nodes import CC"]
+
+    combcut    = "( (AMAXDOCA('')<%(HTAU_DOCA)s) )"  % self.config
+    if displaced: mothercut  = "( ( BPVVD > %(HTAU_FDMAX_FH)s ) & ( MIPDV(PRIMARY) < %(HTAU_IPMAX)s ) )" % self.config # invertex FD, looser requirements.
+    else: mothercut  = "( ( BPVVD < %(HTAU_FDMAX)s ) & ( MIPDV(PRIMARY) < %(HTAU_IPMAX)s ) )" % self.config
+
+    if channel==0: # tau3htau3h, replace cuts with FH ones:
+      combcut    = "( (AMAXDOCA('')<%(HTAU_DOCA_FH)s) )"  % self.config
+      if not displaced: mothercut  = "( ( BPVVD < %(HTAU_FDMAX_FH)s ) & ( MIPDV(PRIMARY) < %(HTAU_IPMAX_FH)s ) )" % self.config
+      else: mothercut  = "( ( BPVVD > %(HTAU_FDMAX_FH)s ) & ( MIPDV(PRIMARY) < %(HTAU_IPMAX_FH)s ) )" % self.config
+      mydecay   = ["H_30 -> tau+ tau-"]
+    elif channel==1: mydecay = ["[H_30 -> tau+ mu-]cc"] # tau3htauMu
+    elif channel==2: mydecay = ["[H_30 -> tau+ e-]cc"] # tau3htauE
+    elif channel==3: # tauMutauE, add sanity mass cuts:
+      mydecay = ["[H_30 -> mu+ e-]cc"]
+      combcut += " & ( (AM>%(HTAU_MASS_LOW)s) & (AM<%(HTAU_MASS_HIGH)s) )" % self.config
+      mothercut += " & ( (M>%(HTAU_MASS_LOW)s) & (M<%(HTAU_MASS_HIGH)s) )" % self.config
+    
+    mothercut += " & (PT > %(HTAU_PT_MIN)s) & (PT < %(HTAU_PT_MAX)s)"\
+                 " & (ETA > %(HTAU_ETA_MIN)s) & (ETA < %(HTAU_ETA_MAX)s)" % self.config
+
+    combcut   += " & (AMAXCHILD(PT) > %(HTAU_PT_DAUG_MAX)s) "\
+                 " & (AMINCHILD(PT) > %(HTAU_PT_DAUG_MIN)s) "\
+                 " & (AMAXCHILD(ETA) < %(HTAU_ETA_DAUG_MAX)s) "\
+                 " & (AMINCHILD(ETA) > %(HTAU_ETA_DAUG_MIN)s) " % self.config
+
+    return SimpleSelection(name, 
+                           CombineParticles, 
+                           inps,
+                           DecayDescriptors = mydecay,
+                           Preambulo        = preambulo,
+                           CombinationCut   = combcut,
+                           MotherCut        = mothercut)
+
+  ##########################################################################
+
+  def _makeLine(self, name, sel, presc, postsc):
+
+    line = StrippingLine(name,
+                         prescale    = presc,
+                         postscale   = postsc,
+                         FILTER = self.FilterSPD,
+                         selection = sel,
+                         MaxCandidates = 50 )
+
+    self.registerLine( line )
+
+    return line
+
+  ##########################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2EHNLLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2EHNLLines.py
new file mode 100644
index 000000000..fd49c01b2
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2EHNLLines.py
@@ -0,0 +1,262 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+"""
+B->Lambda0 E  reconstruction
+ - Lambda0 -> EPiX
+ - Lambda0 -> EEX 
+ - Lambda0 -> MuEX
+
+Lambda0 == HNL
+Lines stored in this file:
+- StrippingB2EHNL2EPiXLine SS and OS
+- StrippingB2EHNL2EEXLine
+- StrippingB2EHNL2MuEXLine  SS and OS
+"""
+
+__author__ = ['Serhii Cholak','Martino Borsato', 'Federico Redi']
+__date__ = '16/03/2021'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = ('B2EHNLLines','default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdAllNoPIDsPions, StdLoosePions, StdLooseMuons, StdLooseDownMuons, StdNoPIDsDownPions, StdLooseElectrons, StdNoPIDsDownElectrons
+from PhysSelPython.Wrappers import CombineSelection, DataOnDemand, Selection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+default_config = {
+    'NAME'        : 'B2EHNL',
+    'WGs'         : ['QEE'],
+    'BUILDERTYPE' : 'B2EHNLLines',
+    'CONFIG'      : { "GEC_nLongTrk"          : 300.  ,#adimensional
+                      #Muons
+                      "MuonGHOSTPROB"         : 0.5   ,#adimensional
+                      "MuonTRCHI2"            : 4.    ,#adimensional
+                      "MuonP"                 : 3000. ,#MeV
+                      "MuonPT"                : 250.  ,#MeV
+                      "MuonPIDmu"             : 0.    ,#adimensional
+                      "MuonMINIPCHI2"         : 12    ,#adminensional
+
+                      "ElectronGHOSTPROB"         : 0.5   ,#adimensional
+                      "ElectronTRCHI2"            : 4.    ,#adimensional
+                      "ElectronP"                 : 3000. ,#MeV
+                      "ElectronPT"                : 250.  ,#MeV
+                      "ElectronPIDK"              : 3.0    ,#adimensional
+                      "ElectronPIDpi"             : 3.0    ,#adimensional
+                      "ElectronPIDp"              : 3.0    ,#adimensional
+                      "ElectronMINIPCHI2"         : 12    ,#adminensional
+
+                      #Lambda Daughter Cuts
+                      "ElectronPIDe"          : 3.    ,#adimensional
+                      "Lambda0DaugP"          : 2000. ,#MeV
+                      "Lambda0DaugPT"         : 250.  ,#MeV
+                      "Lambda0DaugTrackChi2"  : 4.    ,#adimensional
+                      "Lambda0DaugMIPChi2"    : 10.   ,#adimensional
+                      #Lambda cuts
+                      "MajoranaCutFDChi2"     : 100.  ,#adimensional
+                      "MajoranaCutBPVCORRMin"   : 1000. ,#MeV
+                      "MajoranaCutBPVCORRMax"   : 6500. ,#MeV
+
+                      "Lambda0VertexChi2"     : 16.   ,#adimensional
+                      "Lambda0PT"             : 500.  ,#adimensional
+                      #B Mother Cuts
+                      "LambdaMuMassLowTight"  : 1500. ,#MeV
+                      "BDIRA"                 : 0.99  ,#adminensional
+                      "BVCHI2DOF"             : 16.    ,#adminensional
+                      "XMuMassUpperHigh"      : 6500. ,#MeV
+                      'LambdaZ_prompt'        : -1.,     #mm
+                      'LambdaEPiOSZ_displ'   : 20.,     #mm
+                      'LambdaEPiSSZ_displ'   : 20.,     #mm
+                      'LambdaEEZ_displ'      : -1.,     #mm
+
+                      "HLT1"      : "HLT_PASS_RE('Hlt1.*SingleElectronNoIPDecision')", #Hlt1SingleElectronNoIPDecision
+                      "HLT2"      : "HLT_PASS_RE('Hlt2TopoE2BodyDecision')",
+                      } ,
+    'STREAMS' : ['Bhadron']
+    }
+
+class B2EHNLLines(LineBuilder) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self._name = name
+        self._config = config
+
+        self._stdLooseKsLL = DataOnDemand("Phys/StdLooseKsLL/Particles")
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        self.makeHNL2EXX()
+
+    ### Stripping lines:
+
+    def makeHNL2EXX( self ):
+
+        HNL2EXX_LLDD = {}
+        HNL2EXX_LL = {}
+        HNL2EXX_DD = {}
+
+        decaysList ={
+            ## eeX
+            "EX":{ "tr_name"    : 'e',
+                   "hnldecays"   : ["Lambda0 -> e- e+"],
+                   "bdecays"     : ["B- -> Lambda0 e-", "B+ -> Lambda0 e+"],
+                   "tr_Long"     : self._electronFilter("Long_HNL2EE"),
+                   "tr_Down"     : self._downElectronFilter("Down_HNL2EE"),
+                   "HNL_FDZ"     : "%(LambdaZ_prompt)s" % self._config, 
+                   "HNL_daugPID" : "",
+                   },
+            ## epiX SS/OS 
+            "PiXSS":{ "tr_name"  : 'pi',
+                   "hnldecays"   : ["Lambda0 -> e- pi+", "Lambda~0 -> e+ pi-"],
+                   "bdecays"  : ["[B- -> Lambda0 e-]cc"],
+                   "tr_Long"  : StdLoosePions,
+                   "tr_Down"  : StdNoPIDsDownPions,
+                   "HNL_FDZ"  : "%(LambdaEPiSSZ_displ)s" % self._config,
+                   "HNL_daugPID" : "", 
+                   },
+            "PiXOS":{ "tr_name"  : 'pi',
+                   "hnldecays"   : ["Lambda0 -> e+ pi-", "Lambda~0 -> e- pi+"],
+                   "bdecays"     : ["[B- -> Lambda0 e-]cc"],
+                   "tr_Long"     : StdLoosePions,
+                   "tr_Down"     : StdNoPIDsDownPions,
+                   "HNL_FDZ"     : "%(LambdaEPiOSZ_displ)s" % self._config,
+                   "HNL_daugPID" : "", 
+                   },
+            ## mueX SS/OS
+            "MuXSS":{ "tr_name"  : 'e',
+                   "hnldecays"   : ["Lambda0 -> mu- e+", "Lambda~0 -> mu+ e-"],
+                   "bdecays"     : ["[B- -> Lambda0 e-]cc"],
+                   "tr_Long"     : self._muonFilter("Long_HNL2EMuSS"),
+                   "tr_Down"     : self._downMuonFilter("Down_HNL2EMuSS"),
+                   "HNL_FDZ"     : "%(LambdaZ_prompt)s" % self._config,
+                   "HNL_daugPID" : "", 
+
+                   },
+            "MuXOS":{ "tr_name"   : 'e',
+                   "hnldecays"   : ["Lambda0 -> mu- e+", "Lambda~0 -> mu+ e-"],
+                   "bdecays"     : ["[B- -> Lambda0 e-]cc"],
+                   "tr_Long"     : self._muonFilter("Long_HNL2EMuOS"),
+                   "tr_Down"     : self._downMuonFilter("Down_HNL2EMuOS"),
+                   "HNL_FDZ"     : "%(LambdaEEZ_displ)s" % self._config, 
+                   "HNL_daugPID" : "",
+                   },
+
+        }
+
+        for nn in decaysList:
+            ## common algorithm for all HNLs
+            _Lambda = CombineParticles(
+                DecayDescriptors = decaysList[nn]['hnldecays'],
+                DaughtersCuts   = {"%s+" %decaysList[nn]["tr_name"] :"(P > %(Lambda0DaugP)s)& (PT > %(Lambda0DaugPT)s)"\
+                                   "& (TRCHI2DOF < %(Lambda0DaugTrackChi2)s)" \
+                                   "& (MIPCHI2DV(PRIMARY) > %(Lambda0DaugMIPChi2)s)"   % self._config
+                                   },
+                CombinationCut  = "(ADOCACHI2CUT(25, ''))"% self._config,
+                MotherCut       = "( BPVCORRM < %(MajoranaCutBPVCORRMax)s*MeV )&( BPVCORRM > %(MajoranaCutBPVCORRMin)s*MeV )&( BPVVDCHI2 > %(MajoranaCutFDChi2)s )&( VFASPF(VCHI2/VDOF) < %(Lambda0VertexChi2)s )&( PT > %(Lambda0PT)s*MeV )" % self._config
+                )
+            _Lambda.DaughtersCuts["%s+" %decaysList[nn]["tr_name"]]+= decaysList[nn]["HNL_daugPID"]
+
+
+
+            ## Combine HNL from the LongLong and DownDown tracks
+            HNL2EXX_LL[nn]=Selection("LongLong_HNL2E"+nn+self._name,
+                                          Algorithm=_Lambda,
+                                          RequiredSelections = [decaysList[nn]["tr_Long"], self._electronFilter("LongLong_HNL2E"+nn)])
+            HNL2EXX_DD[nn]=Selection("DownDown_HNL2E"+nn+self._name,
+                                          Algorithm=_Lambda,
+                                          RequiredSelections = [decaysList[nn]["tr_Down"], self._downElectronFilter("DownDown_HNL2E"+nn)])
+            
+            HNL2EXX_LLDD[nn] = MergedSelection("HNL2EXX_LLDD"+nn + self._name,
+                                      RequiredSelections = [ HNL2EXX_LL[nn], HNL2EXX_DD[nn] ])
+            
+        B2EHNLs,_B2EHNLLines = {},{}
+        for key in HNL2EXX_LLDD:
+
+            B2EHNLs[key] = self.makeB2EHNL( name = "B2EHNL2E"+key + "X"+"Selection", 
+                                              bdecays = decaysList[key]['bdecays'], 
+                                              HNL_FDZ = decaysList[key]["HNL_FDZ"],
+                                              inputs = [self._electronFilter("B2EHNL2E"+key), HNL2EXX_LLDD[key]])
+
+            _B2EHNLLines[key] = StrippingLine( self._name + "2E" + key + "Line", 
+                                                algos = [ B2EHNLs[key] ],
+                                                FILTER=self.GECs,
+
+                                                prescale = 1.0, )
+
+        for key in _B2EHNLLines: self.registerLine(_B2EHNLLines[key])
+
+    def makeB2EHNL(self, name, bdecays, HNL_FDZ,inputs):
+        
+        decay = bdecays
+        comboCuts = "(AM>%(LambdaMuMassLowTight)s*MeV) & (AM<%(XMuMassUpperHigh)s*MeV)" % self._config
+        momCuts = "( MINTREE((ABSID=='Lambda0'),VFASPF(VZ)) - VFASPF(VZ) > %s *mm )" % HNL_FDZ
+        momCuts += "& (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)" % self._config
+
+
+        return  CombineSelection( name,
+                                  inputs,
+                                  DecayDescriptors = decay,
+                                  # DaughtersCuts  = daughterCuts,
+                                  CombinationCut = comboCuts,
+                                  MotherCut = momCuts,
+                                  ReFitPVs = True,
+                                  )
+
+
+
+    ## Muons
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (PIDmu> %(MuonPIDmu)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+  
+               
+    def _downMuonFilter( self, name ):
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("downMuon_for"+name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseDownMuons])
+        return _muSel
+
+    def _muonFilter( self, name ):
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("Muon_for"+name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseMuons])
+        return _muSel
+
+    ## Electrons
+    def _NominalESelection( self ):
+            return "(TRCHI2DOF < %(ElectronTRCHI2)s ) &  (P> %(ElectronP)s *MeV) &  (PT> %(ElectronPT)s* MeV)"\
+                   "& (TRGHOSTPROB < %(ElectronGHOSTPROB)s)"\
+                   "& (PIDe > %(ElectronPIDe)s )"\
+                   "& (MIPCHI2DV(PRIMARY)> %(ElectronMINIPCHI2)s )"
+    def _downElectronFilter( self, name ):
+            
+        _e = FilterDesktop( Code = self._NominalESelection() % self._config )
+        _eSel=Selection("downElectron_for"+name,
+                             Algorithm=_e,
+                             RequiredSelections = [StdNoPIDsDownElectrons])
+        return _eSel
+
+    def _electronFilter( self, name ):
+        
+        _e = FilterDesktop( Code = self._NominalESelection() % self._config )
+        _eSel=Selection("Electron_for"+name,
+                         Algorithm=_e,
+                         RequiredSelections = [StdLooseElectrons])
+        return _eSel
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2LLP2HH.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2LLP2HH.py
new file mode 100644
index 000000000..119b6de36
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2LLP2HH.py
@@ -0,0 +1,122 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping lines for dark pions into light hadrons analysis (produced from B, D or Ks).
+'''
+
+__author__ = ['Xabier Cid Vidal', 'Carlos Vazquez Sierra', 'Igor Kostiuk', 'Wouter Hulsbergen']
+__date__ = '25/01/2019'
+
+__all__ = ('B2LLPV0_sConf','default_config')
+
+from Gaudi.Configuration import *
+from StandardParticles import StdAllNoPIDsPions
+from PhysSelPython.Wrappers import CombineSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import GeV
+from LoKiPhys.functions import SOURCE, SIZE
+
+default_config = {
+    'NAME'              : 'B2LLPV0',
+    'WGs'               : ['QEE'],
+    'BUILDERTYPE'       : 'B2LLPV0_sConf',
+    'CONFIG'    : {     '2MixedMuPrescale'      :  1.0
+                  ,     '2MixedKPrescale'       :  1.0
+                  ,     '2MixedElPrescale'      :  1.0
+                  ,     '2MixedPPrescale'       :  1.0
+                  ,     'Multi_daugsP'          :  2.*GeV
+                  ,     'Multi_daugsChi2dv'     :  50.
+                  ,     'Multi_combChi2'        :  15.
+                  ,     'Multi_motherChi2dv'    :  25.
+                  ,     'Multi_motherChi2vx'    :  10.
+                  ,     'Multi_SUMPT'           :  "1000*MeV"   
+                  ,     'Multi_DELTAM'          :  "100*MeV"
+                  ,     'Multi_VCHI2DOF'        :  25
+                  ,     'Multi_FDCHI2'          :  50
+                  ,     'Multi_DaughIPCHI2'     :  25
+                  ,     'Multi_ProbNNmu'        :  0.
+                  ,     'Multi_ProbNNK'         :  0.2
+                  ,     'Multi_ProbNNe'         :  0.2
+                  ,     'Multi_ProbNNp'         :  0.2
+                  },
+    'STREAMS' : ['BhadronCompleteEvent']
+    }
+
+### Lines stored in this file:
+# StrippingB2LLPV02MixedMuLine
+# StrippingB2LLPV02MixedElLine
+# StrippingB2LLPV02MixedKLine
+# StrippingB2LLPV02MixedPLine
+
+class B2LLPV0_sConf(LineBuilder) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+        self.makeV02HH()
+
+    ### Stripping lines:
+
+    def makeV02HH( self ):
+
+        V02HHNOIP = {}
+        for nn,pid,cutn in [["Mu","PROBNNmu","Multi_ProbNNmu"],
+                            ["El","PROBNNe","Multi_ProbNNe"],
+                            ["P","PROBNNp","Multi_ProbNNp"],
+                            ["K","PROBNNK","Multi_ProbNNK"]]:
+                       
+            V02HHNOIP[nn] = CombineSelection( "V02HHNOIP"+nn + self.name,
+                                              StdAllNoPIDsPions,
+                                              DecayDescriptor = "KS0 -> pi+ pi-",
+                                              DaughtersCuts  = {"pi+" : "(P > %(Multi_daugsP)s) & (MIPCHI2DV(PRIMARY) > %(Multi_daugsChi2dv)s) & "% self.config + "("+pid+">"+str(self.config[cutn])+")", 
+                                                                "pi-" : "(P > %(Multi_daugsP)s) & (MIPCHI2DV(PRIMARY) > %(Multi_daugsChi2dv)s) & "% self.config + "("+pid+">"+str(self.config[cutn])+")" },
+                                              CombinationCut = "( ADOCACHI2CUT(%(Multi_combChi2)s, '') )" % self.config,
+                                              MotherCut = "( CHI2VX < %(Multi_motherChi2vx)s )" % self.config
+                                              )
+
+        V02Mixed,V02MixedLine = {},{}
+        for key in V02HHNOIP:
+            V02Mixed[key] = self.V0CombineSelection("Mixed"+key+"Selection", V02HHNOIP[key])
+
+            V02MixedLine[key] = StrippingLine( self.name + "2Mixed"+key+"Line", algos = [ V02Mixed[key] ],
+                                               prescale = self.config['2Mixed'+key+'Prescale'] )
+
+        for key in V02MixedLine: self.registerLine(V02MixedLine[key])
+
+    def V0CombineSelection(self, name,inputs):
+        
+        Preambulo = ["MS1 = ACHILD(M,1)",
+                     "MS2 = ACHILD(M,2)"]
+
+        ## Generic cuts for detached selection
+        comboCuts = "(ASUM(PT)>%(Multi_SUMPT)s) " \
+                    "& ( abs(MS1-MS2)<%(Multi_DELTAM)s )"%self.config
+        
+        momCuts = "(VFASPF(VCHI2/VDOF)< %(Multi_VCHI2DOF)s)"\
+                  "& (BPVVDCHI2> %(Multi_FDCHI2)s)" %self.config
+
+        daughterCuts = {"KS0":"(BPVIPCHI2()> %(Multi_DaughIPCHI2)s)" %self.config}
+
+        ## first half of decay depends on the mother, inputs depend also on the daughter
+        decay = "B0 -> KS0 KS0"
+
+        ## build B candidate
+        return  CombineSelection( name,
+                                  [inputs],
+                                  DecayDescriptor = decay,
+                                  DaughtersCuts  = daughterCuts,
+                                  CombinationCut = comboCuts,
+                                  MotherCut = momCuts,
+                                  Preambulo = Preambulo)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2MuHNLLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2MuHNLLines.py
new file mode 100644
index 000000000..f286aba78
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2MuHNLLines.py
@@ -0,0 +1,238 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+"""
+B->Lambda0 Mu  reconstruction
+ - Lambda0 -> MuPiX
+ - Lambda0 -> MuMuX 
+ - Lambda0 -> MuEX
+
+Lambda0 == HNL
+Lines stored in this file:
+- StrippingB2MuHNL2MuPiXLine SS and OS
+- StrippingB2MuHNL2MuMuXLine
+- StrippingB2MuHNL2MuEXLine  SS and OS
+"""
+
+__author__ = ['Serhii Cholak','Martino Borsato', 'Federico Redi']
+__date__ = '16/03/2021'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = ('B2MuHNLLines','default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdAllNoPIDsPions, StdLoosePions, StdLooseMuons, StdLooseDownMuons, StdNoPIDsDownPions, StdLooseElectrons, StdNoPIDsDownElectrons
+from PhysSelPython.Wrappers import CombineSelection, DataOnDemand, Selection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+default_config = {
+    'NAME'        : 'B2MuHNL',
+    'WGs'         : ['QEE'],
+    'BUILDERTYPE' : 'B2MuHNLLines',
+    'CONFIG'      : { "GEC_nLongTrk"          : 300.  ,#adimensional
+                      #Muons
+                      "MuonGHOSTPROB"         : 0.5   ,#adimensional
+                      "MuonTRCHI2"            : 4.    ,#adimensional
+                      "MuonP"                 : 3000. ,#MeV
+                      "MuonPT"                : 250.  ,#MeV
+                      "MuonPIDmu"             : 0.    ,#adimensional
+                      "MuonMINIPCHI2"         : 12    ,#adminensional
+                      #Lambda Daughter Cuts
+                      "ElectronPIDe"          : 3.    ,#adimensional
+                      "Lambda0DaugP"          : 2000. ,#MeV
+                      "Lambda0DaugPT"         : 250.  ,#MeV
+                      "Lambda0DaugTrackChi2"  : 4.    ,#adimensional
+                      "Lambda0DaugMIPChi2"    : 10.   ,#adimensional
+                      #Lambda cuts
+                      "MajoranaCutFDChi2"     : 100.  ,#adimensional
+                      "MajoranaCutBPVCORRMin"   : 1000. ,#MeV
+                      "MajoranaCutBPVCORRMax"   : 6500. ,#MeV
+
+                      "Lambda0VertexChi2"     : 16.   ,#adimensional
+                      "Lambda0PT"             : 500.  ,#adimensional
+                      #B Mother Cuts
+                      "LambdaMuMassLowTight"  : 1500. ,#MeV
+                      "XMuMassUpperHigh"      : 6500. ,#MeV
+                      'LambdaZ_prompt'        : -1.,     #mm
+                      'LambdaMuPiOSZ_displ'   : 15.,     #mm
+                      'LambdaMuPiSSZ_displ'   : 15.,     #mm
+                      'LambdaMuEZ_displ'      : -1.,     #mm
+
+                      "HLT1"      : "HLT_PASS_RE('Hlt1.*TrackMuonDecision')",
+                      "HLT2"      : "HLT_PASS_RE('Hlt2TopoMu2BodyDecision')"\
+                                  "| HLT_PASS_RE('Hlt2Topo2BodyDecision')"\
+                                  "| HLT_PASS_RE('Hlt2MajoranaBLambdaMuDDDecision')"\
+                                  "| HLT_PASS_RE('Hlt2ExoticaRHNuDecision')", 
+
+
+
+                      } ,
+    'STREAMS' : ['Bhadron']
+    }
+
+class B2MuHNLLines(LineBuilder) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self._name = name
+        self._config = config
+
+        self._stdLooseKsLL = DataOnDemand("Phys/StdLooseKsLL/Particles")
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        self.makeHNL2MuXX()
+
+    ### Stripping lines:
+
+    def makeHNL2MuXX( self ):
+
+        HNL2MuXX_LLDD = {}
+        HNL2MuXX_LL = {}
+        HNL2MuXX_DD = {}
+
+        decaysList ={
+            ## mumuX
+            "MuX":{ "tr_name"    : 'mu',
+                   "hnldecays"   : ["Lambda0 -> mu- mu+"],
+                   "bdecays"     : ["B- -> Lambda0 mu-", "B+ -> Lambda0 mu+"],
+                   "tr_Long"     : self._muonFilter("Long_HNL2MuMu"),
+                   "tr_Down"     : self._downMuonFilter("Down_HNL2MuMu"),
+                   "HNL_FDZ"     : "%(LambdaZ_prompt)s" % self._config, 
+                   "HNL_daugPID" : "",
+                   },
+            ## mupiX SS/OS 
+            "PiXSS":{ "tr_name"  : 'pi',
+                   "hnldecays"   : ["Lambda0 -> mu- pi+", "Lambda~0 -> mu+ pi-"],
+                   "bdecays"  : ["[B- -> Lambda0 mu-]cc"],
+                   "tr_Long"  : StdLoosePions,
+                   "tr_Down"  : StdNoPIDsDownPions,
+                   "HNL_FDZ"  : "%(LambdaMuPiSSZ_displ)s" % self._config,
+                   "HNL_daugPID" : "", 
+                   },
+            "PiXOS":{ "tr_name"  : 'pi',
+                   "hnldecays"   : ["Lambda0 -> mu+ pi-", "Lambda~0 -> mu- pi+"],
+                   "bdecays"     : ["[B- -> Lambda0 mu-]cc"],
+                   "tr_Long"     : StdLoosePions,
+                   "tr_Down"     : StdNoPIDsDownPions,
+                   "HNL_FDZ"     : "%(LambdaMuPiOSZ_displ)s" % self._config,
+                   "HNL_daugPID" : "", 
+                   },
+            ## mueX SS/OS
+            "EXSS":{ "tr_name"  : 'e',
+                   "hnldecays"   : ["Lambda0 -> mu- e+", "Lambda~0 -> mu+ e-"],
+                   "bdecays"     : ["[B- -> Lambda0 mu-]cc"],
+                   "tr_Long"     : StdLooseElectrons,
+                   "tr_Down"     : StdNoPIDsDownElectrons,
+                   "HNL_FDZ"     : "%(LambdaZ_prompt)s" % self._config,
+                   "HNL_daugPID" : " & (PIDe> %(ElectronPIDe)s)" % self._config, 
+                   },
+            "EXOS":{ "tr_name"   : 'e',
+                   "hnldecays"   : ["Lambda0 -> mu+ e-", "Lambda~0 -> mu- e+"],
+                   "bdecays"     : ["[B- -> Lambda0 mu-]cc"],
+                   "tr_Long"     : StdLooseElectrons,
+                   "tr_Down"     : StdNoPIDsDownElectrons,
+                   "HNL_FDZ"     : "%(LambdaMuEZ_displ)s" % self._config, 
+                   "HNL_daugPID" : " & (PIDe> %(ElectronPIDe)s)" % self._config,
+                   },
+
+        }
+
+        for nn in decaysList:
+            ## common algorithm for all HNLs
+            _Lambda = CombineParticles(
+                DecayDescriptors = decaysList[nn]['hnldecays'],
+                DaughtersCuts   = {"%s+" %decaysList[nn]["tr_name"] :"(P > %(Lambda0DaugP)s)& (PT > %(Lambda0DaugPT)s)"\
+                                   "& (TRCHI2DOF < %(Lambda0DaugTrackChi2)s)" \
+                                   "& (MIPCHI2DV(PRIMARY) > %(Lambda0DaugMIPChi2)s)"   % self._config
+                                   },
+                CombinationCut  = "(ADOCACHI2CUT(25, ''))"% self._config,
+                MotherCut       = "( BPVCORRM < %(MajoranaCutBPVCORRMax)s*MeV )&( BPVCORRM > %(MajoranaCutBPVCORRMin)s*MeV )&( BPVVDCHI2 > %(MajoranaCutFDChi2)s )&( VFASPF(VCHI2/VDOF) < %(Lambda0VertexChi2)s )&( PT > %(Lambda0PT)s*MeV )" % self._config
+                )
+            _Lambda.DaughtersCuts["%s+" %decaysList[nn]["tr_name"]]+= decaysList[nn]["HNL_daugPID"]
+
+
+
+            ## Combine HNL from the LongLong and DownDown tracks
+            HNL2MuXX_LL[nn]=Selection("LongLong_HNL2Mu"+nn+self._name,
+                                          Algorithm=_Lambda,
+                                          RequiredSelections = [decaysList[nn]["tr_Long"], self._muonFilter("LongLong_HNL2Mu"+nn)])
+            HNL2MuXX_DD[nn]=Selection("DownDown_HNL2Mu"+nn+self._name,
+                                          Algorithm=_Lambda,
+                                          RequiredSelections = [decaysList[nn]["tr_Down"], self._downMuonFilter("DownDown_HNL2Mu"+nn)])
+            
+            HNL2MuXX_LLDD[nn] = MergedSelection("HNL2MuXX_LLDD"+nn + self._name,
+                                      RequiredSelections = [ HNL2MuXX_LL[nn], HNL2MuXX_DD[nn] ])
+            
+        B2MuHNLs,_B2MuHNLLines = {},{}
+        for key in HNL2MuXX_LLDD:
+
+            B2MuHNLs[key] = self.makeB2MuHNL( name = "B2MuHNL2Mu"+key + "X"+"Selection", 
+                                              bdecays = decaysList[key]['bdecays'], 
+                                              HNL_FDZ = decaysList[key]["HNL_FDZ"],
+                                              inputs = [self._muonFilter("B2MuHNL2Mu"+key), HNL2MuXX_LLDD[key]])
+
+            if decaysList[key]['tr_name'] == 'pi':
+                _B2MuHNLLines[key] = StrippingLine( self._name + "2Mu" + key + "Line", 
+                                                algos = [ B2MuHNLs[key] ],
+                                                FILTER=self.GECs,
+                                                HLT1 = self._config['HLT1'],
+                                                HLT2 = self._config['HLT2'],
+                                                prescale = 1.0, )
+            else:
+                _B2MuHNLLines[key] = StrippingLine( self._name + "2Mu" + key + "Line", 
+                                                algos = [ B2MuHNLs[key] ],
+                                                FILTER=self.GECs,
+                                                prescale = 1.0, )
+
+        for key in _B2MuHNLLines: self.registerLine(_B2MuHNLLines[key])
+
+    def makeB2MuHNL(self, name, bdecays, HNL_FDZ,inputs):
+        
+        decay = bdecays
+        comboCuts = "(AM>%(LambdaMuMassLowTight)s*MeV) & (AM<%(XMuMassUpperHigh)s*MeV)" % self._config
+        momCuts = "( MINTREE((ABSID=='Lambda0'),VFASPF(VZ)) - VFASPF(VZ) > %s *mm )" % HNL_FDZ
+
+        return  CombineSelection( name,
+                                  inputs,
+                                  DecayDescriptors = decay,
+                                  # DaughtersCuts  = daughterCuts,
+                                  CombinationCut = comboCuts,
+                                  MotherCut = momCuts,
+                                  ReFitPVs = True,
+                                  )
+
+
+
+
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (PIDmu> %(MuonPIDmu)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+  
+               
+    def _downMuonFilter( self, name ):
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("downMuon_for"+name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseDownMuons])
+        return _muSel
+
+    def _muonFilter( self, name ):
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("Muon_for"+name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseMuons])
+        return _muSel
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2SS.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2SS.py
new file mode 100644
index 000000000..fcfff39be
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingB2SS.py
@@ -0,0 +1,509 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of B-->S(hh)S(hh) and
+B-->S(hh)S(hh) (detached) stripping selections and lines. Can be Bs->SS, B0->K*SS or B+->K+SS
+'''
+
+__author__ = ['Xabier Cid Vidal']
+## based on StrippingB2MuMuMuMuLines by Diego Martinez Santos, Johannes Albrecht, Konstantinos A. Petridis, Alexander Baranov
+__date__ = '20/01/2019'
+__version__ = '$Revision: 1.0 $'
+__all__ = ('B2SSConf','default_config')
+
+
+default_config = {
+    'NAME' : 'B2SS',
+    'WGs' : ['QEE'],
+    'BUILDERTYPE' : 'B2SSConf',
+    'CONFIG'      : {
+        ## Kaon
+        'B2KstSSKaonLinePrescale'    : 1 ,
+        'B2KstSSKaonLinePostscale'   : 1,
+        'B2KstSSKaonDetLinePrescale'    : 1,
+        'B2KstSSKaonDetLinePostscale'   : 1,
+
+        'Bu2KSSKaonLinePrescale'    : 1,
+        'Bu2KSSKaonLinePostscale'   : 1,
+        'Bu2KSSKaonDetLinePrescale'    : 1,
+        'Bu2KSSKaonDetLinePostscale'   : 1,
+
+        'Bs2SSKaonLinePrescale'    : 1,
+        'Bs2SSKaonLinePostscale'   : 1,
+        'Bs2SSKaonDetLinePrescale'    : 1,
+        'Bs2SSKaonDetLinePostscale'   : 1,
+
+        ## Pion
+        'B2KstSSPionLinePrescale'    : 1 ,
+        'B2KstSSPionLinePostscale'   : 1,
+        'B2KstSSPionDetLinePrescale'    : 1,
+        'B2KstSSPionDetLinePostscale'   : 1,
+    
+        'Bu2KSSPionLinePrescale'    : 1,
+        'Bu2KSSPionLinePostscale'   : 1,
+        'Bu2KSSPionDetLinePrescale'    : 1,
+        'Bu2KSSPionDetLinePostscale'   : 1,
+
+        'Bs2SSPionLinePrescale'    : 1,
+        'Bs2SSPionLinePostscale'   : 1,
+        'Bs2SSPionDetLinePrescale'    : 1,
+        'Bs2SSPionDetLinePostscale'   : 1,
+
+        ## Proton
+        'B2KstSSProtonLinePrescale'    : 1 ,
+        'B2KstSSProtonLinePostscale'   : 1,
+        'B2KstSSProtonDetLinePrescale'    : 1,
+        'B2KstSSProtonDetLinePostscale'   : 1,
+    
+        'Bu2KSSProtonLinePrescale'    : 1,
+        'Bu2KSSProtonLinePostscale'   : 1,
+        'Bu2KSSProtonDetLinePrescale'    : 1,
+        'Bu2KSSProtonDetLinePostscale'   : 1,
+
+        'Bs2SSProtonLinePrescale'    : 1,
+        'Bs2SSProtonLinePostscale'   : 1,
+        'Bs2SSProtonDetLinePrescale'    : 1,
+        'Bs2SSProtonDetLinePostscale'   : 1,
+
+        ## Muon
+        'B2KstSSMuonLinePrescale'    : 1 ,
+        'B2KstSSMuonLinePostscale'   : 1,
+        'B2KstSSMuonDetLinePrescale'    : 1,
+        'B2KstSSMuonDetLinePostscale'   : 1,
+    
+        'Bu2KSSMuonLinePrescale'    : 1,
+        'Bu2KSSMuonLinePostscale'   : 1,
+        'Bu2KSSMuonDetLinePrescale'    : 1,
+        'Bu2KSSMuonDetLinePostscale'   : 1,
+
+        ## BS24Mu lines effectively already there in StrippingB2MuMuMuMuLines
+ 
+        ## Electron
+        'B2KstSSElectronLinePrescale'    : 1 ,
+        'B2KstSSElectronLinePostscale'   : 1,
+        'B2KstSSElectronDetLinePrescale'    : 1,
+        'B2KstSSElectronDetLinePostscale'   : 1,
+    
+        'Bu2KSSElectronLinePrescale'    : 1,
+        'Bu2KSSElectronLinePostscale'   : 1,
+        'Bu2KSSElectronDetLinePrescale'    : 1,
+        'Bu2KSSElectronDetLinePostscale'   : 1,
+
+        'Bs2SSElectronLinePrescale'    : 1,
+        'Bs2SSElectronLinePostscale'   : 1,
+        'Bs2SSElectronDetLinePrescale'    : 1,
+        'Bs2SSElectronDetLinePostscale'   : 1,
+
+        # PIONS
+        "DAUGHPIIPCHI2": 25,
+        "DAUGHPIPT": "500*MeV",
+
+        # HADRONS
+        "DAUGHHADIPCHI2": 25,
+        "DAUGHHADPT": "250*MeV",
+
+        # LEPTONS
+        "DAUGHLEPIPCHI2": 15,
+        "DAUGHLEPPT": "25*MeV",
+        
+        # KAON
+        "DAUGHKAONPID": 0,
+        "DAUGHPROTONPID": 0,
+
+        # KSTAR
+        "KSTARPT": "750*MeV",
+        "KSTARMASSWIN": "130*MeV",
+        "KSTARFDCHI2": 25,
+        "KSTARVCHI2DOF": 5,
+
+        # PROMPT
+        "SPrompt_BVCHI2DOF": 9,
+        "SPrompt_BDIRA": 0,
+        "SPrompt_BFDCHI2": 100,
+        "SPrompt_BIPCHI2": 15,
+        "SPrompt_BMAXDOCA": " 0.3*mm",
+        'SPrompt_BMASS_MIN': '4600*MeV',
+        'SPrompt_BMASS_MAX': '6000*MeV',
+        'SPrompt_SDELTAM': '100*MeV',
+
+        # PROMPT PION
+        "SPrompt_BPIVCHI2DOF": 3,
+        "SPrompt_BPIDIRA": 0,
+        "SPrompt_BPIFDCHI2": 125,
+        "SPrompt_BPIIPCHI2": 10,
+        "SPrompt_BPIMAXDOCA": " 0.2*mm",
+        'SPrompt_BPIMASS_MIN': '4900*MeV',
+        'SPrompt_BPIMASS_MAX': '5800*MeV',
+        'SPrompt_SDELTAMPI': '50*MeV',
+        
+        # DETACHED PAIRS
+        'SDet_PAIRMAXDOCA'  : '0.5*mm',
+        'SDet_PAIRSUMPT'    : '1000*MeV',
+        'SDet_PAIRVCHI2DOF'  : 16,
+        'SDet_PAIRFDCHI2'    : 25,
+        'SDet_PAIRIPCHI2'    : 25,
+
+        # DETACHED PAIRS PIONS
+        'SDet_PAIRPIMAXDOCA'  : '0.25*mm',
+        'SDet_PAIRPISUMPT'    : '2000*MeV',
+        'SDet_PAIRPIVCHI2DOF' : 5,
+        'SDet_PAIRPIFDCHI2'   : 25,
+        'SDet_PAIRPIIPCHI2'   : 25,
+
+        # DETACHED PAIRS LEPTONS
+        'SDet_PAIRLEMAXDOCA'  : '0.5*mm',
+        'SDet_PAIRLESUMPT'    : '50*MeV',
+        'SDet_PAIRLEVCHI2DOF' : 16,
+        'SDet_PAIRLEFDCHI2'   : 15,
+        'SDet_PAIRLEIPCHI2'   : 10,
+
+        # 'BFromDetached'
+        'SDet_BSUMPT'       : '2000*MeV',
+        'SDet_BVCHI2DOF'    : 5,
+        'SDet_BIPCHI2'      : 15,
+        'SDet_BFDCHI2'      : 50,
+        'SDet_BDIRA'        : 0.0,
+        'SDet_BMASS_MIN'    : '4600*MeV',
+        'SDet_BMASS_MAX'    : '6000*MeV',
+        'SDet_SDELTAM'    : '100*MeV'
+        },
+    
+    'STREAMS' : ['EW'],
+    }
+
+
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseProtons, StdAllLoosePions, StdAllLooseKaons
+from StandardParticles import StdAllLooseMuons, StdAllLooseElectrons
+from CommonParticles.StdLooseKstar import *
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays as Combine4Particles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N5BodyDecays as Combine5Particles
+
+#from StrippingSelections.Utils import checkConfig
+
+class B2SSConf(LineBuilder) :
+    """
+    B2SS
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        self.name = name
+        self.__confdict__ = config
+        self.config = config
+        
+        LineBuilder.__init__(self, name, config)
+
+        finalStates = ["Muon","Electron","Kaon",
+                       "Pion","Proton"]
+
+        Bids = ["B0","B+","B_s0"]
+        
+        # Generaly used input particles
+        self.inDaughters = {}
+        for daugh in finalStates:
+            self.inDaughters[daugh] = self.filterDaughters(daugh+"sFor"+name,daugh)
+        self.inDaughters["Kstar"] = self.filterDaughters("KstarsFor"+name,"Kstar")
+        
+        # Prompt selection
+        self.B2Prompt = {}
+        for bid in Bids:
+            self.B2Prompt[bid]={}
+            for daugh in finalStates:
+                if daugh=="Muon" and bid=="B_s0": continue ## already covered at another module
+                self.B2Prompt[bid][daugh]=self.makeB2Prompt(bid+"2"+daugh+"PromptFor"+name,bid,daugh)
+
+        # Detached selection
+        # Pairs
+        self.inDetachedPairs = {}
+        for daugh in finalStates:
+            self.inDetachedPairs[daugh] = self.makeDetachedPairs('Detached'+daugh+"PairFor"+name,
+                                                               daugh)
+        
+        ## build B combination
+        self.B2Det = {}
+        for bid in Bids:
+            self.B2Det[bid]={}
+            for daugh in finalStates:
+                if daugh=="Muon" and bid=="B_s0": continue ## already covered at another module
+                self.B2Det[bid][daugh]=self.makeB2Det(bid+"2"+daugh+"DetFor"+name,bid,daugh)
+                
+        
+        # Stripping lines
+        StrippingLines = []
+        for bid in Bids:
+            if bid=="B0": line_name0 = "B2KstSS"
+            if bid=="B+": line_name0 = "Bu2KSS"
+            if bid=="B_s0": line_name0 = "Bs2SS"            
+            for daugh in finalStates:
+                if daugh=="Muon" and bid=="B_s0": continue ## already covered at another module
+                line_name1 = line_name0+daugh
+                i1=1
+                for sel in [self.B2Prompt[bid][daugh],self.B2Det[bid][daugh]]:
+                    if i1==2: line_name = line_name1+"DetLine"
+                    else: line_name = line_name1+"Line"
+                    i1+=1                                        
+                    StrippingLines.append(StrippingLine(name+line_name,
+                                                        prescale=config[line_name+'Prescale'],
+                                                        postscale=config[line_name+'Postscale'],
+                                                        algos=[sel]))
+                    self.registerLine(StrippingLines[-1])
+
+
+    def filterDaughters(self,name,daugh):
+        """
+        Daughters selection
+        """
+
+        ## for K+, need some sort of PID to reduce number of candidates
+        if daugh=="Kaon":
+            _code = "(PIDK > %(DAUGHKAONPID)s) &" %self.config
+
+        elif daugh=="Proton":
+            _code = "(PIDp > %(DAUGHPROTONPID)s) &" %self.config
+        
+        else: _code = ""
+
+
+        if daugh=="Muon" or daugh=="Electron":
+        ## apply first cuts to the daughters (faster)            
+            _code += "( PT > %(DAUGHLEPPT)s)" \
+                     "& ( MIPCHI2DV(PRIMARY)> %(DAUGHLEPIPCHI2)s)" %self.config
+        elif daugh=="Pion":
+            ## apply first cuts to the daughters (faster)
+            _code += "( PT > %(DAUGHPIPT)s)" \
+                     "& ( MIPCHI2DV(PRIMARY)> %(DAUGHPIIPCHI2)s)" %self.config
+        else:
+            ## apply first cuts to the daughters (faster)
+            _code += "( PT > %(DAUGHHADPT)s)" \
+                     "& ( MIPCHI2DV(PRIMARY)> %(DAUGHHADIPCHI2)s)" %self.config
+        
+        if daugh=="Muon": mysel = StdAllLooseMuons
+        if daugh=="Electron": mysel = StdAllLooseElectrons
+        if daugh=="Kaon": mysel = StdAllLooseKaons
+        if daugh=="Pion": mysel = StdAllLoosePions
+        if daugh=="Proton": mysel = StdAllLooseProtons
+        ## reduce number of Kstar candidates
+        if daugh=="Kstar":
+            _code += "& (PT > %(KSTARPT)s )"\
+                     "& (M < ( 892*MeV + %(KSTARMASSWIN)s ) )"\
+                     "& (M > ( 892*MeV - %(KSTARMASSWIN)s ) )"\
+                     "& (VFASPF(VCHI2/VDOF) < %(KSTARVCHI2DOF)s )"\
+                     "& ( CHILD( MIPCHI2DV(PRIMARY), 1) > %(DAUGHHADIPCHI2)s ) "\
+                     "& ( CHILD( MIPCHI2DV(PRIMARY), 2) > %(DAUGHHADIPCHI2)s ) " \
+                     "& (BPVVDCHI2 > %(KSTARFDCHI2)s )" %self.config
+            mysel = DataOnDemand(Location="Phys/StdLooseKstar2Kpi/Particles")
+
+        _Filter = FilterDesktop(Code = _code)
+        
+        return Selection(name,
+                         Algorithm = _Filter,
+                         RequiredSelections = [ mysel] )
+    
+    
+    def makeB2Prompt(self,name,bid,daugh):
+        """
+        B --> 4 identical particles prompt selection
+        """
+
+        ## DEFINE MASS SUBCOMBINATIONS
+        Preambulo = ["MYAM12=AMASS(1,2)",
+                     "MYAM13=AMASS(1,3)",
+                     "MYAM14=AMASS(1,4)",
+                     "MYAM23=AMASS(2,3)",
+                     "MYAM24=AMASS(2,4)",
+                     "MYAM34=AMASS(3,4)"]
+
+        if daugh=="Pion":
+            ## Generic cuts for prompt selection
+            comboDOCA = "(AMAXDOCA('')<%(SPrompt_BPIMAXDOCA)s)" %self.config
+            comboCuts = "(AM>%(SPrompt_BPIMASS_MIN)s) & (AM<%(SPrompt_BPIMASS_MAX)s) "%self.config
+
+            comboMass= "( (abs(MYAM12-MYAM34)< %(SPrompt_SDELTAMPI)s) | "\
+                       "  (abs(MYAM13-MYAM24)< %(SPrompt_SDELTAMPI)s) | "\
+                       "  (abs(MYAM14-MYAM23)< %(SPrompt_SDELTAMPI)s) )" %self.config
+
+            
+            momCuts = "(VFASPF(VCHI2/VDOF)< %(SPrompt_BPIVCHI2DOF)s)"\
+                      "& (BPVDIRA > %(SPrompt_BPIDIRA)s)"\
+                      "& (BPVVDCHI2> %(SPrompt_BPIFDCHI2)s)"\
+                      "& (BPVIPCHI2()< %(SPrompt_BPIIPCHI2)s)"%self.config
+            
+            
+        else:
+            ## Generic cuts for prompt selection
+            comboDOCA = "(AMAXDOCA('')<%(SPrompt_BMAXDOCA)s) "%self.config
+            comboCuts = "(AM>%(SPrompt_BMASS_MIN)s) & (AM<%(SPrompt_BMASS_MAX)s) "%self.config
+
+            ## build all possible combinations for daughters,
+            ## ensure at least one of the S masses is the same
+            comboMass = "( (abs(MYAM12-MYAM34)< %(SPrompt_SDELTAM)s) | "\
+                        "  (abs(MYAM13-MYAM24)< %(SPrompt_SDELTAM)s) | "\
+                        "  (abs(MYAM14-MYAM23)< %(SPrompt_SDELTAM)s) )" %self.config
+            
+            momCuts = "(VFASPF(VCHI2/VDOF)< %(SPrompt_BVCHI2DOF)s)"\
+                      "& (BPVDIRA > %(SPrompt_BDIRA)s)"\
+                      "& (BPVVDCHI2> %(SPrompt_BFDCHI2)s)"\
+                      "& (BPVIPCHI2()< %(SPrompt_BIPCHI2)s)"%self.config
+
+        
+        ## second half of decay depends on the mother
+        if bid=="B0":
+            decay2 = " K*(892)0"
+            inputs = [self.inDaughters["Kstar"]]
+        if bid=="B+":
+            decay2 = " K+"
+            inputs = [self.inDaughters["Kaon"]]
+        if bid=="B_s0":
+            decay2 = ""
+            inputs = []
+
+        
+        ## second half of decay depends on the daughters
+        if daugh=="Muon": decay1 = bid+" -> mu+ mu- mu+ mu-"
+        if daugh=="Electron": decay1 = bid+" -> e+ e- e+ e-"
+        if daugh=="Kaon": decay1 = bid+" -> K+ K- K+ K-"
+        if daugh=="Pion": decay1 = bid+"  -> pi+ pi- pi+ pi-"
+        if daugh=="Proton": decay1 = bid+" -> p+ p~- p+ p~-"
+
+        ## this must be applied to the final combination too
+        comboCuts+="& ("+comboMass+")"
+        comboCuts+="& ("+comboDOCA+")"
+
+        ## input corresponds to accompaining particle + daughters
+        if not (daugh=="Kaon" and bid=="B+"): inputs.append(self.inDaughters[daugh])
+        ## skip B+ and kaon, since kaons are already an input in that case (avoids warning)
+
+        ## build B candidate
+        if bid=="B_s0":
+            B2PromptS = Combine4Particles()
+            B2PromptS.DecayDescriptor = decay1+decay2
+            B2PromptS.Combination12Cut = comboDOCA
+            B2PromptS.Combination123Cut = comboDOCA
+            B2PromptS.CombinationCut = comboCuts
+            B2PromptS.MotherCut = momCuts
+            B2PromptS.Preambulo = Preambulo
+        else:
+            B2PromptS = Combine5Particles()
+            B2PromptS.DecayDescriptor = "["+decay1+decay2+"]cc"
+            B2PromptS.Combination12Cut = comboDOCA
+            B2PromptS.Combination123Cut = comboDOCA
+            B2PromptS.Combination1234Cut = "( ("+comboDOCA + ") & ("+comboMass+") )"
+            B2PromptS.CombinationCut = comboCuts
+            B2PromptS.MotherCut = momCuts
+            B2PromptS.Preambulo = Preambulo
+        print decay1+decay2
+        return Selection(
+            name,
+            Algorithm=B2PromptS,
+            RequiredSelections=inputs,
+            )
+
+
+    def makeDetachedPairs(self,name,daugh):
+        """
+        KS0->daugh daugh selection
+        """
+
+        ## FOR PIONS, NEED TIGHTER CUTS
+        ## Generic cuts for detached pairs
+        if daugh=="Pion":
+            comboCuts = "(AMAXDOCA('')<%(SDet_PAIRPIMAXDOCA)s) &" \
+                        "(ASUM(PT)>%(SDet_PAIRPISUMPT)s)" %self.config
+            momCuts = "(VFASPF(VCHI2/VDOF)< %(SDet_PAIRPIVCHI2DOF)s)"\
+                      "& (BPVVDCHI2 > %(SDet_PAIRPIFDCHI2)s)"\
+                      "& (BPVIPCHI2()> %(SDet_PAIRPIIPCHI2)s)" %self.config
+
+        elif daugh=="Muon" or daugh=="Electron":
+            comboCuts = "(AMAXDOCA('')<%(SDet_PAIRLEMAXDOCA)s) &" \
+                        "(ASUM(PT)>%(SDet_PAIRLESUMPT)s)" %self.config
+            momCuts = "(VFASPF(VCHI2/VDOF)< %(SDet_PAIRLEVCHI2DOF)s)"\
+                      "& (BPVVDCHI2 > %(SDet_PAIRLEFDCHI2)s)"\
+                      "& (BPVIPCHI2()> %(SDet_PAIRLEIPCHI2)s)" %self.config
+        else:
+            comboCuts = "(AMAXDOCA('')<%(SDet_PAIRMAXDOCA)s) &" \
+                        "(ASUM(PT)>%(SDet_PAIRSUMPT)s)" %self.config
+            momCuts = "(VFASPF(VCHI2/VDOF)< %(SDet_PAIRVCHI2DOF)s)"\
+                      "& (BPVVDCHI2 > %(SDet_PAIRFDCHI2)s)"\
+                      "& (BPVIPCHI2()> %(SDet_PAIRIPCHI2)s)" %self.config
+
+        
+        KS2MuMu = CombineParticles("Combine"+name)
+        inputs = [self.inDaughters[daugh]]
+        if daugh=="Muon": KS2MuMu.DecayDescriptor = "KS0 ->  mu+ mu-"
+        if daugh=="Electron": KS2MuMu.DecayDescriptor = "KS0 ->  e+ e-"
+        if daugh=="Kaon": KS2MuMu.DecayDescriptor = "KS0 ->  K+ K-"
+        if daugh=="Pion": KS2MuMu.DecayDescriptor = "KS0 ->  pi+ pi-"
+        if daugh=="Proton": KS2MuMu.DecayDescriptor = "KS0 ->  p+ p~-"
+        KS2MuMu.CombinationCut=comboCuts
+        KS2MuMu.MotherCut=momCuts
+        
+        return Selection(
+            name,
+            Algorithm=KS2MuMu,
+            RequiredSelections=inputs
+            )
+    
+
+    def makeB2Det(self,name,bid,daugh):
+        """
+        B --> S S selection
+        """
+
+        ## DEFINE MASS OF THE DAUGHTERS, FOR B0 AND B+ WE CARE ABOUT DAUGHTERS 2 AND 3
+        if bid=="B_s0": Preambulo = ["MS1 = ACHILD(M,1)",
+                                     "MS2 = ACHILD(M,2)"]
+        else: Preambulo = ["MS1 = ACHILD(M,2)",
+                           "MS2 = ACHILD(M,3)"]
+
+        ## Generic cuts for detached selection
+        comboCuts = "(ASUM(PT)>%(SDet_BSUMPT)s) " \
+                    "& (AM>%(SDet_BMASS_MIN)s) & (AM<%(SDet_BMASS_MAX)s) "\
+                    "& ( abs(MS1-MS2)<%(SDet_SDELTAM)s )"%self.config
+        
+        momCuts = "(VFASPF(VCHI2/VDOF)< %(SDet_BVCHI2DOF)s)"\
+                  "& (BPVDIRA > %(SDet_BDIRA)s)"\
+                  "& (BPVVDCHI2> %(SDet_BFDCHI2)s)"\
+                  "& (BPVIPCHI2()< %(SDet_BIPCHI2)s)"%self.config
+
+        ## first half of decay depends on the mother, inputs depend also on the daughter
+        if bid=="B0":
+            decay = "[B0 -> K*(892)0 KS0 KS0]cc"
+            inputs = [self.inDaughters["Kstar"],self.inDetachedPairs[daugh]]
+        if bid=="B+":
+            decay = "[B+ -> K+ KS0 KS0]cc"
+            inputs = [self.inDaughters["Kaon"],self.inDetachedPairs[daugh]]
+        if bid=="B_s0":
+            decay = "B_s0 -> KS0 KS0"
+            inputs = [self.inDetachedPairs[daugh]]
+            
+
+        ## build B candidate
+        B2DetS = CombineParticles("Combine"+name)
+        B2DetS.DecayDescriptor = decay
+        B2DetS.CombinationCut = comboCuts
+        B2DetS.MotherCut = momCuts
+        B2DetS.Preambulo = Preambulo
+        
+        return Selection(
+            name,
+            Algorithm=B2DetS,
+            RequiredSelections=inputs,
+            )
+
+        
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingConvertedPhoton.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingConvertedPhoton.py
new file mode 100644
index 000000000..d0001050f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingConvertedPhoton.py
@@ -0,0 +1,174 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting converted photons
+'''
+
+__author__ = ['Tom Boettcher']
+__date__ = ''
+__version__ = '$Revision: 1.0 $'
+
+__all__ = (
+    'ConvertedPhotonConf',
+    'default_config'
+    )
+
+from Gaudi.Configuration import *
+from CommonParticles.Utils import *
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from Configurables import ( DiElectronMaker,
+                            ProtoParticleCALOFilter,
+                            ParticleTransporter,
+                            LoKi__VertexFitter,
+                            )
+from PhysSelPython.Wrappers import (Selection,
+                                    SimpleSelection,
+                                    MergedSelection,
+                                    AutomaticData)
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+    'NAME' : 'ConvertedPhoton',
+    'BUILDERTYPE' : 'ConvertedPhotonConf',
+    'WGs' : ['QEE'],
+    'STREAMS' : ['EW'],
+    'CONFIG' : {
+        'odin' : ['NoBeam','Beam1','Beam2','BeamCrossing'],
+
+        #==================
+        # Low pT selection
+        'LowPt' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : ("HLT_PASS('Hlt2EWConvPhotonLLHighPtDecision') | "
+                            "HLT_PASS('Hlt2EWConvPhotonDDHighPtDecision')"),
+            'Prescale' : 0.1,
+            'AddBrem' : True,
+            'MinPt' : 5000.0*MeV,
+            'MaxPt' : 10000.0*MeV,
+            'MaxMass' : 100.0*MeV,
+            'MinPIDe' : 0.0,
+            'MaxIPChi2' : 200.0
+            },
+
+        #==================
+        # High pT selection
+        'HighPt' : {
+            'Hlt1Filter' : None,
+            'Hlt2Filter' : ("HLT_PASS('Hlt2EWConvPhotonLLHighPtDecision') | "
+                            "HLT_PASS('Hlt2EWConvPhotonDDHighPtDecision')"),
+            'Prescale' : 0.25,
+            'AddBrem' : True,
+            'MinPt' : 10000.0*MeV,
+            'MaxPt' : 100000.0*MeV,
+            'MaxMass' : 100.0*MeV,
+            'MinPIDe' : 0.0,
+            'MaxIPChi2' : 200.0
+            }
+        }
+    }
+
+
+class ConvertedPhotonConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+        odin = "|".join(["(ODIN_BXTYP == LHCb.ODIN.%s)"%(odin_type,)
+                         for odin_type in config['odin']
+                         if odin_type in ['NoBeam','Beam1','Beam2','BeamCrossing']])
+
+        #=============
+        # Low pT line
+        lowPtLL = self.makeConvertedPhoton('SelConvPhotonLowPtLL',
+                                           config['LowPt'],
+                                           'Long')
+        lowPtDD = self.makeConvertedPhoton('SelConvPhotonLowPtDD',
+                                           config['LowPt'],
+                                           'Downstream')
+        self.LowPtLine = StrippingLine(
+            name = 'ConvPhotonLowPt',
+            prescale = self.config['LowPt']['Prescale'],
+            HLT1 = self.config['LowPt']['Hlt1Filter'],
+            HLT2 = self.config['LowPt']['Hlt2Filter'],
+            selection = MergedSelection(
+                'SelConvPhotonLowPt',
+                RequiredSelections = [lowPtLL, lowPtDD]
+                ),
+            ODIN = odin
+            )
+        self.registerLine(self.LowPtLine)
+
+        #=============
+        # High pT line
+        highPtLL = self.makeConvertedPhoton('SelConvPhotonHighPtLL',
+                                            config['HighPt'],
+                                            'Long')
+        highPtDD = self.makeConvertedPhoton('SelConvPhotonHighPtDD',
+                                            config['HighPt'],
+                                            'Downstream')
+        self.HighPtLine = StrippingLine(
+            name = 'ConvPhotonHighPt',
+            prescale = self.config['HighPt']['Prescale'],
+            HLT1 = self.config['LowPt']['Hlt1Filter'],
+            HLT2 = self.config['LowPt']['Hlt2Filter'],
+            selection = MergedSelection(
+                'SelConvPhotonHighPt',
+                RequiredSelections = [highPtLL, highPtDD]
+                ),
+            ODIN = odin
+            )
+        self.registerLine(self.HighPtLine)
+
+    #================================
+    # Create selections for each line
+    def makeConvertedPhoton(self, name, config, tracks):
+        alg = DiElectronMaker(name+'Maker')
+        alg.DecayDescriptor = 'gamma -> e+ e-'
+        selector = trackSelector(alg, trackTypes=[tracks])
+        alg.addTool(ProtoParticleCALOFilter, name='Electron')
+        alg.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'%s'"
+                                  % config['MinPIDe']]
+        alg.DeltaY = 3.0
+        alg.DeltaYmax = 200.0*mm
+        alg.DiElectronMassMax = config['MaxMass']
+        alg.DiElectronPtMin = 200.0*MeV
+
+
+        # Extra setup for better performance on DD pairs
+        if tracks == 'Downstream':
+            alg.ParticleCombiners.update({"" : "LoKi::VertexFitter"})
+            alg.addTool(LoKi__VertexFitter)
+            alg.LoKi__VertexFitter.addTool(ParticleTransporter,
+                                           name='Transporter')
+            alg.LoKi__VertexFitter.Transporter.TrackExtrapolator = (
+                "TrackRungeKuttaExtrapolator")
+            alg.LoKi__VertexFitter.DeltaDistance = 100*mm
+
+        code = ("(BPVVDZ > 0)"
+                " & (BPVIPCHI2() < %s)"
+                " & (PT > %s)"
+                " & (PT < %s)"
+                " & (MM < (20 + 0.04*VFASPF(VZ))*MeV)"
+                % (config['MaxIPChi2'],config['MinPt'],config['MaxPt']))
+
+
+
+        preSel = Selection('Pre'+name, Algorithm=alg)
+        sel = Selection(name,
+                        Algorithm=FilterDesktop(Code=code),
+                        RequiredSelections=[preSel])
+        return sel
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDY2MuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDY2MuMu.py
new file mode 100644
index 000000000..873efc336
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDY2MuMu.py
@@ -0,0 +1,163 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping Lines for DY->MuMu
+Electroweak Group (Conveners: S.Bifani, J.Anderson; Stripping contact: W.Barter)
+
+J.Anderson
+
+DY2MuMu1    (3.2-5GeV): StdAllLooseMuons & TrkPChi2>0.1% & P>10GeV & pT>1.5GeV & DLLmu>-3           (5% PRESCALE)
+DY2MuMu1Hlt (>3.2GeV):  StdAllLooseMuons & TrkPChi2>0.1% & P>10GeV & pT>1.5GeV & Hlt2DiMuonDY* Dec (50% PRESCALE)
+DY2MuMu2    (5-10GeV):  StdAllLooseMuons & TrkPChi2>0.1% & P>10GeV & pT>3GeV                       (25% PRESCALE)
+DY2MuMu2Hlt (>5GeV):    StdAllLooseMuons & TrkPChi2>0.1% & P>10GeV & pT>3GeV   & Hlt2DiMuonDY* Dec
+DY2MuMu3    (10-20GeV): StdAllLooseMuons & TrkPChi2>0.1% & P>10GeV & pT>3GeV
+DY2MuMu4    (20-40GeV): StdAllLooseMuons & TrkPChi2>0.1% & P>10GeV & pT>3GeV
+"""
+
+__author__ = ['J. Anderson']
+
+__all__ = 'DY2MuMuConf', 'default_config'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons
+from GaudiKernel.SystemOfUnits import GeV
+
+
+default_config = {
+    'NAME'        : 'DY2MuMu',
+    'BUILDERTYPE' : 'DY2MuMuConf',
+    'WGs'         : [ 'QEE' ],
+    'STREAMS'     : [ 'EW'  ],
+    'CONFIG'      : { 
+        'DY2MuMu1LinePrescale'    : 0.05,
+        'DY2MuMu1LineHltPrescale' : 0.1,
+        'DY2MuMu2LinePrescale'    : 0.25,
+        'DY2MuMu2LineHltPrescale' : 0.5,
+        'DY2MuMu3LinePrescale'    : 1.0,  
+        'DY2MuMu4LinePrescale'    : 1.0,
+        'DY2MuMuLinePostscale'    : 1.0,
+        #
+        'DY2MuMu1HLT2': "HLT_PASS_RE( 'Hlt2(EW)?DiMuonDY[1-4]Decision' )",
+        'DY2MuMu2HLT2': "HLT_PASS_RE( 'Hlt2(EW)?DiMuonDY[1-4]Decision' )",
+        #
+        #'RawEvents'   : ["Muon","Calo","Rich","Velo","Tracker"],
+        #
+        'DY1MinMass'  :  3.2 * GeV,
+        'DY1MaxMass'  :  5. * GeV,
+        'DY2MinMass'  :  5. * GeV,
+        'DY2MaxMass'  : 10. * GeV,
+        'DY3MinMass'  : 10. * GeV,
+        'DY3MaxMass'  : 20. * GeV,
+        'DY4MinMass'  : 20. * GeV,
+        'DY4MaxMass'  : 40. * GeV,
+        'p'           : 10. * GeV,
+        'pT1'         :  1.5 * GeV,
+        'pT2'         :  3. * GeV,
+        'trkpchi2'    :  0.001,
+        'pid'         : -3.
+    },
+}
+
+class DY2MuMuConf( LineBuilder ) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ) :
+
+        LineBuilder.__init__( self, name, config )
+
+        # Define the cuts
+
+        cut1 = '(P>%(p)s) & (PT>%(pT1)s) & (TRPCHI2>%(trkpchi2)s) & ((PIDmu-PIDpi)>%(pid)s)'%config
+        cut2 = '(P>%(p)s) & (PT>%(pT2)s) & (TRPCHI2>%(trkpchi2)s)'%config
+
+        DY1MassCut    = '(MM>%(DY1MinMass)s) & (MM<%(DY1MaxMass)s)'%config
+        DY1MassCutHlt = '(MM>%(DY1MinMass)s)'%config
+        DY2MassCut    = '(MM>%(DY2MinMass)s) & (MM<%(DY2MaxMass)s)'%config
+        DY2MassCutHlt = '(MM>%(DY2MinMass)s)'%config
+        DY3MassCut    = '(MM>%(DY3MinMass)s) & (MM<%(DY3MaxMass)s)'%config
+        DY4MassCut    = '(MM>%(DY4MinMass)s) & (MM<%(DY4MaxMass)s)'%config
+
+        ## DY2MuMu1
+
+        sel = makeCombination( name + 'DYDecay1', cut1, DY1MassCut )
+        self.registerLine(StrippingLine( name + 'Line1',
+            prescale  = config['DY2MuMu1LinePrescale'],
+            postscale = config['DY2MuMuLinePostscale'],
+            #RequiredRawEvents = config['RawEvents'],
+            selection = sel,
+        ))
+
+        ## DY2MuMu1Hlt
+
+        sel = makeCombination( name + 'DYDecay1Hlt', cut1, DY1MassCutHlt )
+        self.registerLine(StrippingLine( name + 'Line1Hlt',
+           prescale  = config[ 'DY2MuMu1LineHltPrescale' ],
+           postscale = config[ 'DY2MuMuLinePostscale' ],
+           #RequiredRawEvents = config['RawEvents'],
+           HLT2      = config[ 'DY2MuMu1HLT2' ],
+           selection = sel,
+        ))
+
+
+        ## DY2MuMu2
+
+        sel = makeCombination( name + 'DYDecay2', cut2, DY2MassCut )
+        self.registerLine(StrippingLine( name + 'Line2',
+            prescale  = config['DY2MuMu2LinePrescale'],
+            postscale = config['DY2MuMuLinePostscale'],
+            #RequiredRawEvents = config['RawEvents'],
+            selection = sel,
+        ))
+
+        ## DY2MuMu2Hlt
+
+        sel = makeCombination( name + 'DYDecay2Hlt', cut2, DY2MassCutHlt )
+        self.registerLine(StrippingLine( name + 'Line2Hlt',
+           prescale  = config[ 'DY2MuMu2LineHltPrescale' ],
+           postscale = config[ 'DY2MuMuLinePostscale' ],
+           #RequiredRawEvents = config['RawEvents'],
+           HLT2      = config[ 'DY2MuMu1HLT2' ],
+           selection = sel,
+        ))
+
+        ## DY2MuMu3
+
+        sel = makeCombination( name + 'DY2MuMuDecay3', cut2, DY3MassCut )
+        self.registerLine(StrippingLine( name + 'Line3',
+            prescale  = config[ 'DY2MuMu3LinePrescale' ],
+            postscale = config[ 'DY2MuMuLinePostscale' ],
+            #RequiredRawEvents = config['RawEvents'],
+            selection = sel,
+        ))
+
+        ## DY2MuMu4
+
+        sel = makeCombination( name + 'DY2MuMuDecay4', cut2, DY4MassCut )
+        self.registerLine(StrippingLine( name + 'Line4',
+            prescale  = config[ 'DY2MuMu4LinePrescale' ],
+            postscale = config[ 'DY2MuMuLinePostscale' ],
+            #RequiredRawEvents = config['RawEvents'],
+            selection = sel,
+        ))
+
+
+def makeCombination( name, daughters, mother ) :
+    return SimpleSelection( name, CombineParticles, [StdAllLooseMuons],
+        DecayDescriptor    = 'Z0 -> mu+ mu-',
+        DaughtersCuts      = { 'mu+' : daughters, 'mu-' : daughters },
+        MotherCut          = mother,
+        WriteP2PVRelations = False,
+    )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDY2ee.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDY2ee.py
new file mode 100644
index 000000000..a634db76b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDY2ee.py
@@ -0,0 +1,122 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Lines for DY->ee
+# Electroweak Group (Conveners: S.Bifani, J.Anderson; Stripping contact: W.Barter)
+#
+# S.Bifani and D.Ward
+#
+# DY2ee3 (10-20GeV): StdAllNoPIDsElectrons & pT>3GeV & p>10GeV & PRS>50Mev & E_ECal/P>0.1 & E_HCal/P<0.05
+# DY2ee4 (20-40GeV): StdAllNoPIDsElectrons & pT>5GeV & p>10GeV & PRS>50Mev & E_ECal/P>0.1 & E_HCal/P<0.05
+
+__author__ = ['S.Bifani', 'D.Ward']
+
+__all__ = ( 'DY2eeConf', 'default_config' )
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import  StdAllNoPIDsElectrons
+from GaudiKernel.SystemOfUnits import GeV
+
+
+default_config = {
+    'NAME'        : 'DY2ee',
+    'BUILDERTYPE' : 'DY2eeConf',
+    'STREAMS'     : [ 'EW'  ],
+    'WGs'         : [ 'QEE' ],
+    'CONFIG'      : { 
+        'DY2eeLine3Prescale' : 1.0,
+        'DY2eeLine4Prescale' : 1.0, 
+        'DY2eeLinePostscale' : 1.0,  
+        'DY3MinMass'  : 10. * GeV,
+        'DY3MaxMass'  : 20. * GeV,
+        'DY4MinMass'  : 20. * GeV,
+        'DY4MaxMass'  : 40. * GeV,
+        'ePID'        :  1.,
+        'PrsCalMin'   : 50.,
+        'ECalMin'     :  0.1,
+        'HCalMax'     :  0.05,
+        'pT3'         :  3. * GeV,
+        'pT4'         :  5. * GeV,
+        'p3'          : 10. * GeV,
+        'p4'          : 10. * GeV,
+    },
+}
+
+class DY2eeConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__( self, name, config ) :
+
+        LineBuilder.__init__( self, name, config )
+
+
+        # Define the cuts
+
+        _cut3 = '(P>%(p3)s) &((PT>%(pT3)s) & (PPINFO(LHCb.ProtoParticle.CaloPrsE,0)>%(PrsCalMin)s) & (PPINFO(LHCb.ProtoParticle.CaloEcalE,0)>P*%(ECalMin)s) & (PPINFO(LHCb.ProtoParticle.CaloHcalE,99999)<P*%(HCalMax)s))'%config
+        _cut4 = '(P>%(p4)s) &((PT>%(pT4)s) & (PPINFO(LHCb.ProtoParticle.CaloPrsE,0)>%(PrsCalMin)s) & (PPINFO(LHCb.ProtoParticle.CaloEcalE,0)>P*%(ECalMin)s) & (PPINFO(LHCb.ProtoParticle.CaloHcalE,99999)<P*%(HCalMax)s))'%config
+
+        _DY3MassCut = '(MM>%(DY3MinMass)s) & (MM<%(DY3MaxMass)s)'%config
+        _DY4MassCut = '(MM>%(DY4MinMass)s) & (MM<%(DY4MaxMass)s)'%config
+
+
+        # DY2ee3
+
+        sel_DY2ee3 = makeCombination( name + 'DY2ee3', 
+                                           StdAllNoPIDsElectrons,
+                                           _cut3,
+                                           _DY3MassCut
+                                           )
+     
+        line_DY2ee3 = StrippingLine( name + 'Line3',
+                                          prescale  = config[ 'DY2eeLine3Prescale' ],
+                                          postscale = config[ 'DY2eeLinePostscale' ],
+                                          #RequiredRawEvents = ["Muon","Calo","Rich","Velo","Tracker"],
+                                          selection = sel_DY2ee3
+                                          )
+
+        self.registerLine( line_DY2ee3 )
+
+
+        # DY2ee4
+
+        sel_DY2ee4 = makeCombination( name + 'DY2ee4', 
+                                           StdAllNoPIDsElectrons,
+                                           _cut4,
+                                           _DY4MassCut
+                                           )
+     
+        line_DY2ee4 = StrippingLine( name + 'Line4',
+                                          prescale  = config[ 'DY2eeLine4Prescale' ],
+                                          postscale = config[ 'DY2eeLinePostscale' ],
+                                          #RequiredRawEvents = ["Muon","Calo","Rich","Velo","Tracker"],
+                                          selection = sel_DY2ee4
+                                          )
+
+        self.registerLine( line_DY2ee4 )
+
+
+def makeCombination( name, _input, _daughters, _mother ) :
+
+    _combination = CombineParticles( DecayDescriptor    = 'Z0 -> e+ e-',
+                                     DaughtersCuts      = { 'e+' : _daughters,
+                                                            'e-' : _daughters },
+                                     MotherCut          = _mother,
+                                     WriteP2PVRelations = False
+                                     )
+
+    return Selection ( name,
+                       Algorithm          = _combination,
+                       RequiredSelections = [ _input ]
+                       )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDisplVertices.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDisplVertices.py
new file mode 100644
index 000000000..1bd4ea164
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDisplVertices.py
@@ -0,0 +1,850 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+
+Configuration for the Exotic Displaced Vertex Stripping lines
+
+Status as of 2016-04-04: No maintainer. The script can be picked up by any
+analyst, otherwise the lines will simply be here with adequate prescale.
+
+"""
+
+__author__ = [
+  "Aurelio Bay",
+  ## previously:
+  "Pieter David <pieter.david@cern.ch>",
+  "Victor Coco",
+  "Veerle Heijne",
+  "Neal Gauvin" 
+]
+
+__date__ = "04/11/2015"
+
+__all__ = ( 'DisplVerticesConf', 'default_config' )
+
+from Gaudi.Configuration import *
+from GaudiKernel import SystemOfUnits as units
+from LHCbKernel.Configuration import DEBUG, VERBOSE
+
+import logging
+logger = logging.getLogger(__name__)
+
+from PhysSelPython.Wrappers import AutomaticData, Selection, PassThroughSelection, EventSelection, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import GaudiSequencer as GaudiSequenceroid
+from Configurables import GaudiSequencer
+from PhysConf.Filters import LoKi_Filters
+
+from .DisplVertices_Utils import SelectionPatPV3DWrapper
+
+def addPrivateToolAndGet( motherConf, toolConfType, name=None ):
+    from GaudiKernel.Configurable import Configurable
+    if not issubclass(toolConfType, Configurable) or not isinstance(motherConf, Configurable):
+        logger.fatal("addPrivateToolAndGet: first argument should be a configurable instance, second a configurable class")
+        return
+    if name is None:
+        name = toolConfType.__name__
+    motherConf.addTool(toolConfType, name=name)
+    return getattr(motherConf, name)
+
+# constants
+LLPLHCbName = "~chi_10"
+
+default_config = {
+  'NAME'        : 'DisplVertices',
+  'BUILDERTYPE' : 'DisplVerticesConf',
+  'STREAMS'     : [ 'EW'  ],
+  'WGs'         : [ 'QEE' ],
+  'CONFIG'      : {
+    ## Velo GEC
+    "VeloGEC": { 
+      "Apply"                : True,
+      "MaxVeloRatio"         : 0.1,
+      "MaxPhiVectorSize"     : 250.,
+    },
+    ## Velo tracks filter
+    "FilterVelo": { 
+      "Apply"                : True,
+      "MinNumTracks"         : 4,
+      "PVLocation"           : "Rec/Vertex/Primary",
+      "RemoveBackwardTracks" : True,
+      "RemovePVTracks"       : False, # use IP(CHI2) cut instead
+      "MinIP"                : 0.1*units.mm,
+      "MinIPChi2"            : -1.0,
+      "MinDOCABeamLine"      : -2.0,
+      "RemoveVeloClones"     : True,
+    },
+    "JetID": "( 0.8 > JMPF ) & ( 0.1 < JCPF ) & ( 900. < JMPT )",
+
+    #==========        SELECTION CUT VALUES         ==========#
+
+    ## Velo reconstruction
+    "RV2PWithVelo": { 
+      "MinRho"               :  0.4*units.mm,
+      "MinMass"              :  0.0*units.GeV,
+      "MinSumPT"             :  0.0*units.GeV,
+      "MinNumTracks"         :  4,
+      "MaxFractE1Track"      :  10.,
+      "MaxFractTrwHitBefore" :  10.,
+      "ApplyMatterVeto"      :  False,
+      ## Reco only
+      "MaxChi2NonVeloOnly"   : 5.0,
+      "UseVeloTracks"        : False,
+      "ComputeMatterVeto"    : True,
+      "FirstPVMaxRho"        : 0.3*units.mm,
+      "FirstPVMinZ"          : -300.0*units.mm,
+      "FirstPVMaxZ"          : 500.0*units.mm,
+      "FirstPVMinNumTracks"  : 10,
+    },
+
+    ## Single LLP line
+    "SinglePSSelection": { 
+      "PreScale"             : 0.005,
+      "RawEvents"            : [],
+      "MinRho"               : 0.5*units.mm,
+      "MinMass"              : 3.0*units.GeV,
+      "MinSumPT"             : 0.0*units.GeV,
+      "MinNumTracks"         : 5,
+      "ApplyMatterVeto"      : False,
+      "MaxFractE1Track"      : 10.,
+      "MaxFractTrwHitBefore" : 10.,
+    },
+
+    ## with the jet sequence
+    "JetSingleLowMassSelection": { 
+      "PreScale"             : 0.5,
+      "RawEvents"            : [],
+      "MinRho"               : 0.4,
+      "MinMass"              : 0.0*units.GeV,
+      "MinSumPT"             : 10.0*units.GeV,
+      "MinNumTracks"         : 5,
+      "ApplyMatterVeto"      : True,
+      "MaxFractE1Track"      : 0.8,
+      "MaxFractTrwHitBefore" : 0.49,
+      ## Jet-related cuts
+      "ConeSize"             : 1.2,
+      "MinDOCABL"            : 0.1*units.mm,
+      "MinNumJets"           : 1,
+      "SingleJet"            : True,
+      "MinNJetMass"          : 0.0,
+      "MinNJetTransvMass"    : None,
+      "JetIDCut"             : "( JNWITHPVINFO >= 5 ) & ( JMPT > 1800. ) & ( (PT/M) > 2.5 )",
+    },
+    "JetSingleHighMassSelection" : { 
+      "PreScale"             : 1.0,
+      "RawEvents"            : [],
+      "MinRho"               : 0.4,
+      "MinMass"              : 5.0*units.GeV,
+      "MinSumPT"             : 7.0*units.GeV,
+      "MinNumTracks"         : 5,
+      "ApplyMatterVeto"      : True,
+      "MaxFractE1Track"      : 0.8,
+      "MaxFractTrwHitBefore" : 0.49,
+      ## Jet-related cuts
+      "ConeSize"             : 0.7,
+      "MinDOCABL"            : -2.,
+      "MinNumJets"           : 2,
+      "SingleJet"            : False,
+      "MinNJetMass"          : 0.0,
+      "MinNJetTransvMass"    : None,
+      "JetIDCut"             : None,
+    },
+    
+    ## jet sequence on top of Hlt2 candidates
+    "JetHltSingleLowMassSelection": { 
+      "PreScale"         :  0.1,
+      "RawEvents"        : [],
+      ## Jet-related cuts
+      "ConeSize"         :  1.2,
+      "MinDOCABL"        :  0.1*units.mm,
+      "MinNumJets"       :  1,
+      "SingleJet"        :  True,
+      "MinNJetMass"      :  0.0,
+      "MinNJetTransvMass": None,
+      "JetIDCut"         : "( JNWITHPVINFO >= 5 ) & ( JMPT > 1800. ) & ( (PT/M) > 1.5 )",
+    },
+    "JetHltSingleHighMassSelection": { 
+      "PreScale"         :  0.1,
+      "RawEvents"        : [],
+      ## Jet-related cuts
+      "ConeSize"         :  0.7,
+      "MinDOCABL"        :  -2.,
+      "MinNumJets"       :  2,
+      "SingleJet"        :  False,
+      "MinNJetMass"      :  0.0,
+      "MinNJetTransvMass": None,
+      "JetIDCut"         : None,
+    },
+
+    ## Double LLP line
+    "DoubleSelection": { 
+      "PreScale"             : 1.0,
+      "RawEvents"            : [],
+      "MinRho"               : 0.4*units.mm,
+      "MinMass"              : 4.0*units.GeV,
+      "MinSumPT"             : 3.0*units.GeV,
+      "MinNumTracks"         : 4,
+      "ApplyMatterVeto"      : False,
+      "MaxFractE1Track"      : 10.,
+      "MaxFractTrwHitBefore" : 10.,
+      ## Double only
+      "MinHighestMass"       : 4.5*units.GeV,
+      "ApplyMatterVetoOne"   : True,
+    },
+
+    ## Downstream reconstruction
+    "RV2PDown": { 
+      "MinRho"               :  2.0*units.mm,
+      "MinMass"              :  3.0*units.GeV,
+      "MinSumPT"             :  0.0*units.GeV,
+      "MinNumTracks"         :  4,
+      "MaxFractE1Track"      :  10.,
+      "MaxFractTrwHitBefore" :  10.,
+      "ApplyMatterVeto"      :  False,
+      ## Reco only
+      "MaxChi2NonVeloOnly"   : 5.0,
+      "UseVeloTracks"        : False,
+      "ComputeMatterVeto"    : False,
+      "FirstPVMaxRho"        : 0.3*units.mm,
+      "FirstPVMinZ"          : -300.0*units.mm,
+      "FirstPVMaxZ"          : 500.0*units.mm,
+      "FirstPVMinNumTracks"  : 10,
+    },
+
+    #========== Other lines for efficiency studies ==========#
+    "HLTPS": { 
+      "PreScale"  : 0.2,
+      "RawEvents" : [],
+    },
+#    "HltEffCharmHLTSelection" : { 
+#      "PreScale"             : 1.0,
+#      "RawEvents"            : [],
+#      "MinRho"               : 0.6*units.mm,
+#      "MinMass"              : 6.*units.GeV,
+#      "MinSumPT"             : 3.0*units.GeV,
+#      "MinNumTracks"         : 6,
+#      "ApplyMatterVeto"      : False,
+#      "MaxFractE1Track"      : 10.,
+#      "MaxFractTrwHitBefore" : 10.,
+#    },
+
+    #==========     HLT filters for all lines      ==========#
+    "HLT"                     : { 
+      #"CharmHLT"     : "HLT_PASS('Hlt2CharmHadD02HH_D02KPiDecision')",
+      "HLTPS"        : [ 
+        ( ("0x001c0028", "0x002f002c"), "HLT_PASS_RE('Hlt2DisplVerticesSinglePostScaledDecision')" ),
+        ( ("0x00340032", "0x00730035"), "HLT_PASS_RE('Hlt2DisplVerticesSinglePostScaledDecision')" ),
+        ( ("0x00750037", "0x007b0038"), "HLT_PASS_RE('Hlt2DisplVertices(Single|Double|SingleMV)PostScaledDecision')" ),
+        ( ("0x007e0039", "0x0097003d"), "HLT_PASS_RE('Hlt2DisplVertices(Single|Double|SingleMV)PostScaledDecision')" ),
+        ( ("0x00990042", "0x40000000"), "HLT_PASS_RE('Hlt2DisplVertices(Single|SingleLoose|Double)PSDecision')" ),
+      ],
+      ## For reviving Hlt2 candidates
+      "SignalLines": [ 
+        ( ("0x001c0028", "0x002f002c"), ["Hlt2DisplVerticesSingleDecision"] ),
+        ( ("0x00340032", "0x00730035"), ["Hlt2DisplVerticesHighFDSingleDecision", "Hlt2DisplVerticesHighMassSingleDecision", "Hlt2DisplVerticesLowMassSingleDecision", "Hlt2DisplVerticesSingleDownDecision"] ),
+        ( ("0x00750037", "0x007b0038"), ["Hlt2DisplVerticesSingleDecision", "Hlt2DisplVerticesSingleDownDecision", "Hlt2DisplVerticesSingleHighFDPostScaledDecision", "Hlt2DisplVerticesSingleHighMassPostScaledDecision"] ),
+        ( ("0x007e0039", "0x0097003d"), ["Hlt2DisplVerticesSingleDecision", "Hlt2DisplVerticesSingleDownDecision", "Hlt2DisplVerticesSingleHighFDPostScaledDecision", "Hlt2DisplVerticesSingleHighMassPostScaledDecision"] ),
+        ( ("0x00990042", "0x40000000"), ["Hlt2DisplVerticesSingleDecision", "Hlt2DisplVerticesSingleDownDecision", "Hlt2DisplVerticesSingleHighFDDecision", "Hlt2DisplVerticesSingleHighMassDecision", "Hlt2DisplVerticesSingleVeryHighFDDecision"] ),
+      ]
+    }
+  },
+}
+
+
+
+class DisplVerticesConf(LineBuilder):
+    """
+    Configuration for the Exotic Displaced Vertex Stripping lines
+
+    The selection is achieved in 3 steps :
+        - (optional) tracks not originating from a PV are selected,
+          through a minimum IP cut
+        - vertex reconstruction (PatPV3D with settings for low-multiplicity vertices)
+        - LLParticlesFromRecVertices creates particles out of these vertices, applying some common cuts already (to keep timing low)
+        - Each line applies cuts optimised for a different part of phasespace.
+          "Single" lines add a FilterDesktop and "Double" lines a CombineParticles algorithm
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def validatedGetProps(self, selName, propsToSet):
+        """
+        Get the __configuration_keys__[selName] dictionary, checking it contains all propsToSet
+        """
+        settings = self.configurationParameter(selName)
+        for p in propsToSet:
+            if not p in settings:
+                logger.error("Missing configuration parameter for %s : %s", selName, p )
+            assert p in settings
+        return settings
+    def validatedSetProps(self, selName, propsToSet, conf, ignoreIfMissing=False):
+        """
+        Helper method to validate (all propsToSet MUST be in __configuration_keys__[selName])
+        and set all properties propNames of configurable conf
+        """
+        settings = self.validatedGetProps(selName, propsToSet)
+        for p in propsToSet:
+            if not ignoreIfMissing:
+                setattr( conf, p, settings[p] )
+
+    veloGECCuts = [ "MaxVeloRatio", "MaxPhiVectorSize" ]
+    veloWithIPCuts = [ "MinNumTracks", "PVLocation", "RemoveBackwardTracks", "RemoveVeloClones", "RemovePVTracks", "MinIP", "MinIPChi2", "MinDOCABeamLine" ]
+    singleCuts = [ "MinNumTracks", "MinRho", "MinMass", "MinSumPT", "ApplyMatterVeto", "MaxFractE1Track", "MaxFractTrwHitBefore" ]
+    jetCuts = [ "MinNJetMass", "MinNJetTransvMass", "SingleJet", "ConeSize", "MinNumJets", "JetIDCut", "MinDOCABL" ]
+    jetHltCuts = [ "HltLines" ]
+    downCuts = [ "MinZ" ]
+    doubleResonanceCuts = [ "MinHighestMass", "ApplyMatterVetoOne" ]
+    recoCuts = [ "MaxChi2NonVeloOnly", "UseVeloTracks", "ComputeMatterVeto", "FirstPVMaxRho", "FirstPVMinZ", "FirstPVMaxZ", "FirstPVMinNumTracks" ]
+
+    llpSelectionPreambulo = [ "from LoKiPhys.decorators import *"
+                            , "from LoKiTracks.decorators import *"
+                            , "INMATTER                           = ( INFO( 51, -1000.0 ) > 0.5 )"
+                            , "ENDVERTEXRHO                       =   INFO( 52, -1000.0 )"
+                            #, "VSIGMARHO                          =   INFO( 53, -1000.0 )"
+                            #, "VSIGMAZ                            =   INFO( 54, -1000.0 )"
+                            , "FRACTDAUGHTERTRACKSWITHUPSTREAMHIT =   INFO( 55, -1000.0 )"
+                            , "MAXFRACTENERGYINSINGLETRACK        =   INFO( 56, -1000.0 )"
+                            , "SUMPT                              =   INFO( 57, -1000.0 )"
+                            ]
+
+    jetSelectionPreambulo = [ "from DisplVertices.JetFunctions import *"
+                            , "from LoKiCore.math import sqrt"
+                            , "ISLLP = ( ABSID == '%s' )" % LLPLHCbName
+                            , "ISJET = ( ABSID == 'CELLjet' )"
+                            ]
+
+    def getLLPSelection(self, cutValues):
+        selCuts        = [ "~ISBASIC" ]
+        selCutsConf    = { "MinMass"              : "MM > {cutVal}"
+                         , "MinSumPT"             : "SUMPT > {cutVal}"
+                         , "MinNumTracks"         : "NDAUGS >= {cutVal}"
+                         , "MinRho"               : "ENDVERTEXRHO > {cutVal}"
+                         , "MaxFractTrwHitBefore" : "FRACTDAUGHTERTRACKSWITHUPSTREAMHIT < {cutVal}"
+                         , "MaxFractE1Track"      : "MAXFRACTENERGYINSINGLETRACK < {cutVal}"
+                         }
+        if cutValues["ApplyMatterVeto"]:
+            selCuts.insert(1, "~INMATTER")
+        if "MinZ" in cutValues:
+            selCutsConf["MinZ"] = "VFASPF(VZ) > {cutVal}"
+
+        # Loop over cuts, remember which are complicated
+        specificCuts = []
+        for cut, funct in selCutsConf.iteritems():
+            if hasattr(cutValues[cut], "__iter__"):
+                specificCuts.append(cut)
+            else:
+                selCuts.append(funct.format(cutVal=cutValues[cut]))
+        # concatenate AND
+        commonCutsCode = "\n & ".join( "( %s )" % cutFunct for cutFunct in selCuts )
+        if len(specificCuts) > 0:
+            # Sanity check on "merged selection cut values"
+            nPaths = len(cutValues[specificCuts[0]])
+            for specCut in specificCuts[1:]:
+                assert len(cutValues[specCut]) == nPaths
+            # Construct and concatenate (AND) the merged selection paths
+            specificCutsCodes = [ "( %s )" % " & ".join( "( %s )" % selCutsConf[cut].format(cutVal=cutValues[cut][i]) for cut in specificCuts ) for i in xrange(nPaths) ]
+            # Return the total LoKi functor
+            return "%s \n & ( %s )" % ( commonCutsCode, "\n   | ".join(specificCutsCodes) )
+        else:
+            return commonCutsCode
+
+    def getLLPJetSelection(self, cutValues):
+        cut = "ALL"
+        if cutValues["SingleJet"]:
+            sel = "( MM > {MinNJetMass} )".format(**cutValues)
+            if cutValues["MinNJetTransvMass"] is not None:
+                sel = "{0} & ( sqrt(MM**2+PT**2) > {MinNJetTransvMass} )".format(sel, **cutValues)
+            cut = sel
+        else:
+            cut = "( NINTREE(ISJET) >= {MinNumJets} ) & ( MM > {MinNJetMass} )".format(**cutValues)
+        return "ISLLP & {0}".format(cut)
+
+    def getResonanceSelection(self, cutValues):
+        combCuts = [ "AHASCHILD( MM > %(MinHighestMass)s )"
+                   ]
+        if cutValues["ApplyMatterVetoOne"]:
+            combCuts.insert(0, "AHASCHILD( ~INMATTER )")
+
+        combCode = "\n & ".join( "( %s )" % ( cut % cutValues ) for cut in combCuts )
+
+        motherCode = "ALL"
+
+        return combCode, motherCode
+
+    def makeJetCandidateAlg(self, name, JetIDCut=None, MinNumJets=1, ConeSize=0.7, MinDOCABL=-2.):
+        #######################################################################
+        ###                                                                 ###
+        ###     JET RECONSTRUCTION                                          ###
+        ###                                                                 ###
+        #######################################################################
+
+        from Configurables import DisplacedVertexJetCandidateMakerS20p3
+
+        jetCandidateAlg = DisplacedVertexJetCandidateMakerS20p3(name)
+
+        from CommonParticles.StdParticleFlow import locations as pfLocations
+        jetCandidateAlg.PFInputLocation = pfLocations.keys()[0]
+        jetCandidateAlg.Preambulo += ( self.jetSelectionPreambulo
+                                     + [ "PF = LHCb.ParticleFlowType" ] )
+        jetCandidateAlg.PFInputCut = "in_list( PFTYPE, PF.ChargedHadron, PF.Muon, PF.Electron, PF.Photon, PF.Pi0, PF.NeutralHadron, PF.NeutralRecovery, PF.V0, PF.Charged0Momentum, PF.BadPhoton, PF.IsolatedPhoton, PF.MergedPi0, PF.ResolvedPi0 )"
+
+        # partitioning
+        jetCandidateAlg.MinIP2PV = 0.
+        jetCandidateAlg.MaxIP2DV = 2.
+        jetCandidateAlg.MinIPChi22PV = 20.
+        jetCandidateAlg.MaxIPChi22DVDown = 30.
+        jetCandidateAlg.MinDOCABL = MinDOCABL
+
+        from Configurables import LoKi__FastJetMaker
+        jetMaker = addPrivateToolAndGet( jetCandidateAlg, LoKi__FastJetMaker )
+        jetCandidateAlg.JetMaker = jetMaker.getTitleName()
+        jetMaker.Type = 2 # anti-kt
+        jetMaker.RParameter = ConeSize
+        jetMaker.PtMin = 5.*units.GeV
+        jetMaker.Recombination = 0
+        jetMaker.JetID = 98
+
+        # no JEC in Stripping21, needs to be applied later
+        from Configurables import PerPVOffsetJECS20p3
+        jecTool = addPrivateToolAndGet( jetCandidateAlg, PerPVOffsetJECS20p3, name="JEC" )
+        jetCandidateAlg.ParticleReFitters["JEC"] = jecTool.getTitleName()
+        jecTool.Apply = False
+        jecTool.HistoPath = "%s_JEC" % self.name()
+        from Configurables import HistogramSvc
+        hSvc = HistogramSvc("HistogramDataSvc")
+        jecFile = "%s DATAFILE='$PARAMFILESROOT/data/JetEnergyCorrections_Reco12_v2.root' TYP='ROOT'" % jecTool.getProp("HistoPath")
+        if jecFile not in hSvc.Input:
+            hSvc.Input.append(jecFile)
+
+        from Configurables import AddJetIDInfoS20p3
+        jetIDTool = addPrivateToolAndGet( jetCandidateAlg, AddJetIDInfoS20p3, name="JetIDInfo" )
+        jetCandidateAlg.JetIDTool = jetIDTool.getTitleName()
+
+        jetCandidateAlg.JetIDCut = ( JetIDCut if JetIDCut is not None else self.configurationParameter("JetID") )
+        jetCandidateAlg.MinNumberOfJets = MinNumJets
+        jetCandidateAlg.CandidatePID = LLPLHCbName
+        jetCandidateAlg.ParticleCombiners["MomentumCombiner"] = "MomentumCombiner:PUBLIC"
+
+        return jetCandidateAlg
+
+    def __init__( self, name, config ):
+        LineBuilder.__init__( self, name, config )
+
+        #######################################################################
+        ###                                                                 ###
+        ###     VELO BASED VERTEXING SEQUENCE                               ###
+        ###                                                                 ###
+        #######################################################################
+
+        bestTracks = AutomaticData("Rec/Track/Best")
+
+        withVeloTracksForVertexing = bestTracks
+
+        if self.configurationParameter("VeloGEC")["Apply"]:
+            from GaudiConfUtils.ConfigurableGenerators import VeloEventShapeCutsS20p3
+
+            veloGEC = VeloEventShapeCutsS20p3()
+            self.validatedSetProps( "VeloGEC", DisplVerticesConf.veloGECCuts, veloGEC )
+
+            withVeloTracksForVertexing = PassThroughSelection( "%sVeloGEC" % self.name()
+                                           , RequiredSelection = withVeloTracksForVertexing
+                                           , Algorithm = veloGEC
+                                           )
+
+        if self.configurationParameter("FilterVelo")["Apply"]:
+            from GaudiConfUtils.ConfigurableGenerators import SelectVeloTracksNotFromPVS20p3
+
+            veloWithIP = SelectVeloTracksNotFromPVS20p3()
+            self.validatedSetProps( "FilterVelo", DisplVerticesConf.veloWithIPCuts, veloWithIP )
+
+            withVeloTracksForVertexing = Selection( "%sVeloFilteredTracks" % self.name()
+                                           , RequiredSelections = [ withVeloTracksForVertexing ]
+                                           , Algorithm = veloWithIP
+                                           )
+
+        # Displaced Vertex reconstruction with best tracks (dominated by those with a Velo segment)
+        from Configurables import PatPV3D, PVOfflineTool, PVSeed3DTool, LSAdaptPV3DFitter, LSAdaptPVFitter
+
+        withVeloVertexAlg = PatPV3D( "%sWithVeloVertexAlg" % self.name() )
+        withVeloVertexFinder = addPrivateToolAndGet(withVeloVertexAlg, PVOfflineTool)
+        withVeloVertexFinder.PVsChi2Separation = 0
+        withVeloVertexFinder.PVsChi2SeparationLowMult = 0
+        withVeloSeeder = addPrivateToolAndGet(withVeloVertexFinder, PVSeed3DTool )
+        withVeloVertexFinder.PVSeedingName = withVeloSeeder.getTitleName()
+        withVeloSeeder.MinCloseTracks = 3
+        withVeloFitter = addPrivateToolAndGet(withVeloVertexFinder, LSAdaptPV3DFitter)
+        withVeloVertexFinder.PVFitterName = withVeloFitter.getTitleName()
+        withVeloFitter.MinTracks      = 4
+
+        withVeloVertexing = SelectionPatPV3DWrapper( "%sWithVeloVertexing" % self.name()
+                              , withVeloVertexAlg
+                              , RequiredSelections = [ withVeloTracksForVertexing ]
+                              )
+
+        # Make Particles out of the RecVertices
+        from GaudiConfUtils.ConfigurableGenerators import LLParticlesFromRecVertices
+
+        rv2pWithVelo = LLParticlesFromRecVertices(
+                           VerticesFromVeloOnly = False
+                         , RequireUpstreamPV    = False
+                         , WriteP2PVRelations   = False
+                         , ForceP2PVBuild       = False
+                         , VeloProtoParticlesLocation = "Phys/%s/VeloProtoP" % self.name()
+                         )
+        self.validatedSetProps( "RV2PWithVelo", DisplVerticesConf.recoCuts + DisplVerticesConf.singleCuts, rv2pWithVelo )
+
+        withVeloCandidates = Selection( "%sWithVeloCandidates" % self.name()
+                               , RequiredSelections = [ withVeloVertexing ]
+                               , Algorithm          = rv2pWithVelo
+                               , InputDataSetter    = "RecVertexLocations"
+                               )
+
+        #######################################################################
+        ###                                                                 ###
+        ###     DOWNSTREAM VERTEXING SEQUENCE                               ###
+        ###                                                                 ###
+        #######################################################################
+
+        from GaudiConfUtils.ConfigurableGenerators import CopyDownstreamTracks
+
+        downTracks = Selection( "%sDownstreamTracks" % self.name()
+                       , RequiredSelections = [ bestTracks ]
+                       , Algorithm          = CopyDownstreamTracks()
+                       )
+
+        # Displaced Vertex reconstruction from downstream tracks
+        downVertexAlg = PatPV3D( "%sDownVertexAlg" % self.name() )
+        downVertexFinder = addPrivateToolAndGet( downVertexAlg, PVOfflineTool )
+        downVertexFinder.RequireVelo = False
+        downVertexFinder.PVsChi2Separation = 0
+        downVertexFinder.PVsChi2SeparationLowMult = 0
+        downSeeder = addPrivateToolAndGet( downVertexFinder, PVSeed3DTool )
+        downVertexFinder.PVSeedingName  = downSeeder.getTitleName()
+        downSeeder.TrackPairMaxDistance = 2.0*units.mm
+        downSeeder.zMaxSpread           = 20.0*units.mm
+        downSeeder.MinCloseTracks       = 4
+        downFitter = addPrivateToolAndGet( downVertexFinder, LSAdaptPVFitter )
+        downVertexFinder.PVFitterName = downFitter.getTitleName()
+        downFitter.MinTracks          = 4
+        downFitter.maxChi2            = 400.0
+        downFitter.maxDeltaZ          = 0.0005 *units.mm
+        downFitter.maxDeltaChi2NDoF   = 0.002
+        downFitter.acceptTrack        = 0.000000001
+        downFitter.trackMaxChi2       = 9
+        downFitter.trackMaxChi2Remove = 64
+
+        downVertexing = SelectionPatPV3DWrapper( "%sDownVertexing" % self.name()
+                          , downVertexAlg
+                          , RequiredSelections = [ downTracks ]
+                          )
+
+        # Make Particles out of the RecVertices
+        rv2pDown = LLParticlesFromRecVertices(
+                       VerticesFromVeloOnly = False
+                     , RequireUpstreamPV    = False
+                     , WriteP2PVRelations   = False
+                     , ForceP2PVBuild       = False
+                     #, OutputLevel          = VERBOSE
+                     )
+        self.validatedSetProps( "RV2PDown", DisplVerticesConf.recoCuts + DisplVerticesConf.singleCuts, rv2pDown )
+
+        downCandidates = Selection( "%sDownCandidates" % self.name()
+                           , RequiredSelections = [ downVertexing ]
+                           , Algorithm          = rv2pDown
+                           , InputDataSetter    = "RecVertexLocations"
+                           )
+
+        #######################################################################
+        ###                                                                 ###
+        ###     HLT JET SEQUENCE                                            ###
+        ###                                                                 ###
+        #######################################################################
+        # timing is already fine, so one algo with loose JetID is sufficient
+
+        # Hlt prefilter and vertex candidates from Hlt2
+        from Configurables import HltVertexConverterS20p3
+        revivedHlt2Candidates = "Phys/%sHlt2Cand/Particles" % self.name()
+        hltCandReviver = GaudiSequenceroid(ModeOR = True, ShortCircuit = False,
+            Members = [ GaudiSequencer( "%sHlt2CandFilterTCK%s-%s" % (self.name(), tckBegin, tckEnd),
+                                        Members = ( LoKi_Filters(HLT2_Code="in_range( {begin}, HLT_TCK % 0x40000000 , {end} ) & ( {decisions} )".format(begin=tckBegin, end=tckEnd, decisions=" | ".join("HLT_PASS('%s')" % ln for ln in hltLines))).filters("%sHlt2DecisionFilterTCK%s-%s" % (self.name(), tckBegin, tckEnd))
+                                                  + [ HltVertexConverterS20p3("%sHltConverter%s-%s" % (self.name(), tckBegin, tckEnd), HltSelReports="Hlt2/SelReports", HltLines=hltLines, Recursive=True, Output=revivedHlt2Candidates, WriteP2PVRelations=False, ForceP2PVBuild=False) ] ) )
+                        for (tckBegin, tckEnd), hltLines in self.configurationParameter("HLT")["SignalLines"]
+                      ]
+            )
+        hltCandSelection = EventSelection( "%sHltCandidates" % self.name()
+                          , Algorithm = hltCandReviver
+                          )
+
+        hltVeloGEC = VeloEventShapeCutsS20p3()
+        self.validatedSetProps( "VeloGEC", DisplVerticesConf.veloGECCuts, hltVeloGEC )
+        hltVeloGEC.HistoProduce = False
+        hltVeloGECSel = EventSelection( "%sHltVeloGEC" % self.name(), Algorithm=hltVeloGEC )
+
+        inputs = [ hltCandSelection, AutomaticData(revivedHlt2Candidates), hltVeloGECSel ]
+        hlt2CandAndGECSelection = SimpleSelection(self.name()+"Hlt2CandVertices", FilterDesktop, inputs,
+          Code = "( ABSID == '{pid}' )".format(pid=LLPLHCbName),
+          WriteP2PVRelations  = False,
+          ForceP2PVBuild      = False,
+        )
+
+        #######################################################################
+        ###                                                                 ###
+        ###     LINE DEFINITIONS                                            ###
+        ###                                                                 ###
+        #######################################################################
+        # one line for every configuratoin key of the format
+        # "Single.*Selection"
+        # "JetSingle.*Selection"
+        # "JetHltSingle.*Selection"
+        # "Double.*Selection"
+        # ".*HLTPS"
+        # "HltEff.*Selection"
+
+        ##============================== Single ===================================##
+
+        singleLineNames = [ p.split("Single")[1].split("Selection")[0]
+                                for p in self.configKeys()
+                                    if p.startswith("Single")
+                                    and p.endswith("Selection")
+                          ]
+
+        for lAcroName in singleLineNames:
+            lShortName = "Single%s" % lAcroName             # SingleMedium
+            lSelName   = "%sSelection" % lShortName         # SingleMediumSelection
+            lLineName  = "%s%s" % (self.name(), lShortName) # DisplVerticesSingleMedium
+
+            # Choose between Velo-based and downstream vertexing input
+            candidates = withVeloCandidates
+            code = None
+            if "Down" in lAcroName:
+                candidates = downCandidates
+                code = self.getLLPSelection( self.validatedGetProps(lSelName, DisplVerticesConf.singleCuts + DisplVerticesConf.downCuts) )
+            else:
+                code = self.getLLPSelection( self.validatedGetProps(lSelName, DisplVerticesConf.singleCuts) )
+
+            lineSel = SimpleSelection(self.name()+lSelName, FilterDesktop, [candidates],
+              DecayDescriptor    = LLPLHCbName,
+              Preambulo          = DisplVerticesConf.llpSelectionPreambulo,
+              Code               = code,
+              WriteP2PVRelations = False,
+              ForceP2PVBuild     = False,
+            )
+
+            line = StrippingLine(lLineName
+                     , prescale  = self.validatedGetProps(lSelName, ["PreScale"])["PreScale"]
+                     , selection = lineSel
+                     , RequiredRawEvents = config[lSelName]['RawEvents']
+                     , RelatedInfoTools = [ { "Type" : "AddVeloEventShapeS21", "TopSelection" : lineSel, "Location" : "P2VES" } ]
+                     )
+            if lShortName in self.configurationParameter("HLT"):
+                line.HLT2 = self.configurationParameter("HLT")[lShortName]
+
+            self.registerLine(line)
+
+        ##========================= Single with jets ==============================##
+
+        jetSingleLineNames = [ p.split("JetSingle")[1].split("Selection")[0]
+                                for p in self.configKeys()
+                                    if p.startswith("JetSingle")
+                                    and p.endswith("Selection")
+                             ]
+
+        for lAcroName in jetSingleLineNames:
+            lShortName = "JetSingle%s" % lAcroName          # JetSingleMedium
+            lSelName   = "%sSelection" % lShortName         # JetSingleMediumSelection
+            lLineName  = "%s%s" % (self.name(), lShortName) # DisplVerticesJetSingleMedium
+
+            # Choose between Velo-based and downstream vertexing input
+            vertexCandidates = withVeloCandidates
+            code = self.getLLPSelection( self.validatedGetProps(lSelName, DisplVerticesConf.singleCuts) )
+
+            goodVertices = SimpleSelection("".join(( self.name(), lSelName, "Vertices" )),
+              FilterDesktop, [vertexCandidates],
+              DecayDescriptor    = LLPLHCbName,
+              Preambulo          = DisplVerticesConf.llpSelectionPreambulo,
+              Code               = code,
+              WriteP2PVRelations = False,
+              ForceP2PVBuild     = False,
+            )
+
+            jetProps = self.validatedGetProps(lSelName, DisplVerticesConf.jetCuts)
+            vertWithJets = Selection( "".join(( self.name(), lSelName, "Jets" ))
+                           , RequiredSelections = [ goodVertices ]
+                           , Algorithm          = self.makeJetCandidateAlg("".join((self.name(), lSelName, "JetAlg"))
+                                                      , MinNumJets = jetProps["MinNumJets"]
+                                                      , ConeSize   = jetProps["ConeSize"]
+                                                      , JetIDCut   = jetProps["JetIDCut"]
+                                                      , MinDOCABL  = jetProps["MinDOCABL"]
+                                                      )
+                           )
+
+            lineSel = SimpleSelection(self.name()+lSelName, FilterDesktop, [vertWithJets],
+              DecayDescriptor    = LLPLHCbName,
+              Preambulo          = self.jetSelectionPreambulo,
+              Code               = self.getLLPJetSelection(jetProps),
+              WriteP2PVRelations = False,
+              ForceP2PVBuild     = False,
+            )
+
+            line = StrippingLine(lLineName
+                     , prescale  = self.validatedGetProps(lSelName, ["PreScale"])["PreScale"]
+                     , selection = lineSel
+                     , RequiredRawEvents = config[lSelName]['RawEvents']
+                     , RelatedInfoTools = [ { "Type" : "AddVeloEventShapeS21", "TopSelection" : lineSel, "Location" : "P2VES" } ]
+                     )
+            if lShortName in self.configurationParameter("HLT"):
+                line.HLT2 = self.configurationParameter("HLT")[lShortName]
+
+            self.registerLine(line)
+
+        ##============= Single with jets based on Hlt candidate ==================##
+
+        jetHltSingleLineNames = [ p.split("JetHltSingle")[1].split("Selection")[0]
+                                   for p in self.configKeys()
+                                       if p.startswith("JetHltSingle")
+                                       and p.endswith("Selection")
+                                ]
+
+        for lAcroName in jetHltSingleLineNames:
+            lShortName = "JetHltSingle%s" % lAcroName       # JetHltSingleMedium
+            lSelName   = "%sSelection" % lShortName         # JetHltSingleMediumSelection
+            lLineName  = "%s%s" % (self.name(), lShortName) # DisplVerticesJetHltSingleMedium
+
+            jetProps = self.validatedGetProps(lSelName, DisplVerticesConf.jetCuts)
+            vertWithJets = Selection( "".join(( self.name(), lSelName, "HltJets" ))
+                           , RequiredSelections = [ hlt2CandAndGECSelection ]
+                           , Algorithm          = self.makeJetCandidateAlg("".join((self.name(), lSelName, "HltJetAlg"))
+                                                      , MinNumJets = jetProps["MinNumJets"]
+                                                      , ConeSize   = jetProps["ConeSize"]
+                                                      , JetIDCut   = jetProps["JetIDCut"]
+                                                      , MinDOCABL  = jetProps["MinDOCABL"]
+                                                      )
+                           )
+
+            lineSel = SimpleSelection(self.name()+lSelName, FilterDesktop, [vertWithJets],
+              DecayDescriptor    = LLPLHCbName,
+              Preambulo          = self.jetSelectionPreambulo,
+              Code               = self.getLLPJetSelection(jetProps),
+              WriteP2PVRelations = False,
+              ForceP2PVBuild     = False,
+            )
+
+            line = StrippingLine(lLineName
+                     , prescale  = self.validatedGetProps(lSelName, ["PreScale"])["PreScale"]
+                     , selection = lineSel
+                     , RequiredRawEvents = config[lSelName]['RawEvents']
+                     , RelatedInfoTools = [ { "Type" : "AddVeloEventShapeS21", "TopSelection" : lineSel, "Location" : "P2VES" } ]
+                     )
+            if lShortName in self.configurationParameter("HLT"):
+                line.HLT2 = self.configurationParameter("HLT")[lShortName]
+
+            self.registerLine(line)
+
+        ##============================== Double ===================================##
+
+        doubleLineNames = [ p.split("Double")[1].split("Selection")[0]
+                                for p in self.configKeys()
+                                    if p.startswith("Double")
+                                    and p.endswith("Selection")
+                          ]
+        for lAcroName in doubleLineNames:
+            lShortName = "Double%s" % lAcroName
+            lSelName   = "%sSelection" % lShortName
+            lLineName  = "%s%s" % (self.name(), lShortName)
+
+            combinationCut, motherCut = self.getResonanceSelection( self.validatedGetProps(lSelName, DisplVerticesConf.doubleResonanceCuts) )
+            lineFilter = CombineParticles(
+                             DecayDescriptor    = "H_10 -> %s %s" % (LLPLHCbName, LLPLHCbName)
+                           , Preambulo          = DisplVerticesConf.llpSelectionPreambulo
+                           , DaughtersCuts      = { LLPLHCbName : self.getLLPSelection( self.validatedGetProps(lSelName, DisplVerticesConf.singleCuts) ) }
+                           , CombinationCut     = combinationCut
+                           , MotherCut          = motherCut
+                           , WriteP2PVRelations = False
+                           , ForceP2PVBuild     = False
+                           #, OutputLevel        = VERBOSE
+                           )
+            lineSel = Selection( "".join(( self.name(), lSelName ))
+                        , RequiredSelections = [ withVeloCandidates ]
+                        , Algorithm          = lineFilter
+                        )
+            line = StrippingLine(lLineName
+                     , prescale  = self.validatedGetProps(lSelName, ["PreScale"])["PreScale"]
+                     , selection = lineSel
+                     , RequiredRawEvents = config[lSelName]['RawEvents']
+                     , RelatedInfoTools = [ { "Type" : "AddVeloEventShapeS21", "TopSelection" : lineSel, "Location" : "P2VES" } ]
+                     )
+            if lShortName in self.configurationParameter("HLT"):
+                line.HLT2 = self.configurationParameter("HLT")[lShortName]
+
+            self.registerLine(line)
+
+        ##============================== HLT PS ===================================##
+
+        hltPSLineNames = [ p.split("HLTPS")[0]
+                               for p in self.configKeys()
+                                   if p.endswith("HLTPS")
+                         ]
+        for lAcroName in hltPSLineNames:
+            lShortName = "%sHLTPS" % lAcroName
+            lLineName  = "%s%s" % (self.name(), lShortName) # DisplVerticesSingleMedium
+
+            orFilters = []
+            for (tckBegin, tckEnd), hltFilter in self.validatedGetProps("HLT", [lShortName])[lShortName]:
+                filters = LoKi_Filters(HLT2_Code="in_range( {begin}, HLT_TCK % 0x40000000, {end} ) & ( {decisions} )".format(begin=tckBegin, end=tckEnd, decisions=hltFilter)).filters("%sHlt2FilterTCK%s-%s" % (lLineName, tckBegin, tckEnd))
+                assert len(filters) == 1
+                orFilters.append(filters[0])
+            assert len(orFilters) == len(self.validatedGetProps("HLT", [lShortName])[lShortName])
+
+            hltSelection = EventSelection( "%sHltFilter" % lLineName
+                              , Algorithm = GaudiSequenceroid(ModeOR = True, ShortCircuit = False, Members=orFilters)
+                              )
+
+            line = StrippingLine(lLineName
+                     , prescale  = self.validatedGetProps(lShortName, ["PreScale"])["PreScale"]
+                     , selection = hltSelection
+                     , RequiredRawEvents = config[lSelName]['RawEvents']
+                     )
+
+            self.registerLine(line)
+
+        ##============================== OTHER  ===================================##
+
+#        hltEffLineNames = [ p.split("HltEff")[1].split("Selection")[0]
+#                                for p in self.configKeys()
+#                                    if p.startswith("HltEff")
+#                                    and p.endswith("Selection")
+#                          ]
+#        for lShortName in hltEffLineNames:
+#            lSelName  = "HltEff%sSelection" % lShortName
+#            lLineName = "%s%s" % (self.name(), lShortName)
+#
+#            # HltEff lines are single, Velo-vertexing based lines
+#            lineSel = SimpleSelection(self.name()+lSelName, FilterDesktop, [withVeloCandidates],
+#              DecayDescriptor    = LLPLHCbName,
+#              Preambulo          = DisplVerticesConf.llpSelectionPreambulo,
+#              Code               = self.getLLPSelection( self.validatedGetProps(lSelName, DisplVerticesConf.singleCuts) ),
+#              WriteP2PVRelations = False,
+#              ForceP2PVBuild     = False,
+#            )
+#
+#            line = StrippingLine(lLineName
+#                     , prescale  = self.validatedGetProps(lSelName, ["PreScale"])["PreScale"]
+#                     # these lines MUST have an HLT filter
+#                     , HLT2      = self.configurationParameter("HLT")[lShortName]
+#                     , selection = lineSel
+#                     , RequiredRawEvents = config[lSelName]['RawEvents']
+#                     , RelatedInfoTools = [ { "Type" : "AddVeloEventShapeS21", "TopSelection" : lineSel, "Location" : "P2VES" } ]
+#                     )
+#
+#            self.registerLine(line)
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDitau.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDitau.py
new file mode 100755
index 000000000..3a7c4e542
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingDitau.py
@@ -0,0 +1,922 @@
+#! /usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+"""
+
+Stripping line for Ditau -> tau+ tau-
+======================================
+
+Possible signals
+----------------
+
+Higgs: H -> AA -> (b bbar) (tau+ tau-)
+m_H ~ 125 GeV
+m_A ~  30 GeV
+
+Z0: Z0 -> tau+ tau-
+
+
+PDG 2012 Data
+-------------
+
+Tau decays with following branching ratio
+
+- 17.41 % : Muon              ( mu )
+- 17.83 % : Electron          ( e  )
+- 50.11 % : 1-Prong hadronic  ( h1 )
+- 14.57 % : 3-Prongs hadronic ( h3 ) 
+- < 0.1 % : Others: 5-prongs, etc.
+
+Ditau decays in major channels are thus:
+
+\%                mu                e                h1                h3
+--- ---------------- ---------------- ----------------- -----------------
+mu  $3.031\pm 0.010$ $6.208\pm 0.020$ $17.448\pm 0.051$ $14.602\pm 0.075$
+e   ---              $3.179\pm 0.010$ $17.869\pm 0.051$ $5.196\pm 0.028$
+h1  ---              ---              $25.110\pm 0.090$ $14.602\pm 0.075$
+h3  ---              ---              ---               $2.123\pm 0.020$
+
+
+Structure
+---------
+
+The selection is separated into 2 stages: Tau-candidates, and Ditau-candidates.
+
+At the first level, each 4 types of tau ( e / h1 / h3 / mu ) will have their
+own config dictionary. A selection cut will apply to this level before entering
+the second stage. It's design to made this way since each of these modes required 
+their own condition on PT, isolation cone, etc.
+
+At the ditau level, each of the 10 possibilities of ditau will be made from the 
+tau-candidates made at previous level. Each of the 10 modes will also has it own
+config dictionary too, allowing maximum flexibility. Once these ditau are made,
+they will be groupped into 3 lines which should shared several overlapping events
+already, reducing the retention load.
+
+EXLine: ee  , eh1 , eh3 , emu 
+MXLine: emu , h1mu, h3mu, mumu 
+HHLine: h1h1, h1h3, h3h3 
+
+(As well as the same-sign lines, auto-gen on-the-fly: EXss, MXss, HHss)
+
+The selection is based entirely on FilterDesktop + Combine particle. The config 
+dictionary ( 14 of them in total ) is used to generate the cuts on-the-fly.
+This allow further flexibility for cutting (not to mention the usefulness during
+dev process) by omitting/adding key-val dynamically. 
+
+For example, adding key:
+
+    { 'min_XXX' : 12345 } 
+
+will generate loki-ready cut:
+
+    '(XXX > 12345)' 
+
+dynamically to the `Code`
+
+    The functor should be standard one, or otherwise put it in the `preambulo` section.
+Alternatively, provide the loki-ready string to `extracut` which will also be used.
+
+
+Version history
+---------------
+
+## 2.5 -- 2016-November ( For S26r1, S24r1 )
+- Change track cut to TRCHI2DOF, (depreciated TRPCHI2, TRGHP)
+- Change narrow-ETA requirement on hadron to InAccHcal instead
+
+## 2.4 -- 2016-March ( For S26 )
+- Tuned for 2016 data
+- Change the isolation technique to use `RelInfoConeVariables`, instead of
+  previously-used `SUMCONE` functor. The key to use this trick is:
+      `RelInfoConeVariables + AddRelatedInfo + PassThroughSelection`
+- Clean up unused portion of codes.
+- New helper function to get minimal ntuple for debugging.
+
+## 2.3 -- 2015-Dec ( For S21rXp1 )
+- Tuned for Run-I incremental stripping. S21 had problem of Cone-radius-square.
+
+## 2.2 -- 2015-Nov ( For S24, S21rXp1 )
+- `default_config` tuned to S24 campaign.
+- Use `from GaudiConfUtils.ConfigurableGenerators` where applicable
+- Deleagated more tuning to default_config. Make better use of pythonic-dict unpacking.
+  - At tool level, e.g., PVReFitting in tau_h3
+  - At Line's constructor. Easing the development of RelatedInfoTools
+- Restructure of control lines: 
+  - Now there are 2 control Lines: 'XXnoiso', 'XXssnoiso'.
+  - Both are made like the signal lines, but with isolation removed, in exchange 
+    for prescale. This is planned to used for background such as QCD, V+jet
+- New `RelatedInfo::RelInfoConeVariables` in place, which can be used immediately
+  in the offline analysis.
+
+## 2.1 -- 150729 (S23 Tuning period summer 2015)
+- Properly expand SS lines (*explicit is better than implicit*)
+- Fixed duplication in decay descriptor of same particle 
+- Separate prescale between os/ss lines
+- support for float/boolean value for autocut.
+- Option for TES source of particle
+- Option for extra preambulo
+- Option for CombineParticles.ParticleCombiners
+- Option for CombineParticles.Daughtercuts in ditau dict.
+
+## 2.0
+- Optimized for Run-II Stripping 23.
+- Extends the code into 3 lines: EX, MX, HH. This covers all 10 possibilities of 
+  ditau's decay modes.
+- Generate SS lines automatically
+- Generate cuts automatically + extra preambulo
+
+## 1.2
+- Start working on new Mu3Pi. A lot of non-backward structural changes
+
+## 1.1
+- Change to conform with new Stripping guideline (default_config['CONFIG'])
+
+## 1.0
+- First version.
+- The lines aims to supersede `StrippingZ02TauTau.py` from S.Farry & P. Ilten
+- The parameters has been optimized for 8 TeV MC of bbtautau & Ztautau
+  At least, it shouldn't make it worse than Z02TauTauLines...
+
+
+-----------------------------------------
+Author: chitsanu.khurewathanakul@epfl.ch
+Derived from works of S.Farry & P. Ilten
+-----------------------------------------
+
+"""
+
+import os
+from GaudiKernel.SystemOfUnits import MeV, GeV, micrometer
+from PhysSelPython.Wrappers import Selection, SimpleSelection, PassThroughSelection, MergedSelection, AutomaticData
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import AddRelatedInfo
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles as GenCombineParticles
+from Configurables import CombineParticles
+from Configurables import LoKi__PVReFitter
+from Configurables import RelInfoConeVariables # Tool
+from Configurables import GaudiSequencer
+
+
+__author__  = 'chitsanu.khurewathanakul@cern.ch'
+__date__    = '2016-11-28'
+__version__ = 2.5
+__all__     = 'DitauConf', 'default_config', 'Tuples'
+
+
+#-----#
+# TAU #
+#-----#
+
+config_tau_e = {
+  'min_PT'        : 4. * GeV,
+  'min_ETA'       : 2.0,
+  'max_ETA'       : 4.5,
+  'max_TRCHI2DOF' : 5,
+  'ISMUONLOOSE'   : False,
+  'InAccEcal'     : True,
+  'InAccHcal'     : True,
+  'min_CaloPrsE'  : 50 * MeV,
+  'min_ECALFrac'  : 0.05, # looser than usual 0.1
+  'max_HCALFrac'  : 0.05,
+  'extracut'      : 'ALL'
+}
+
+config_tau_mu = {
+  'min_PT'        : 4. * GeV,
+  'min_ETA'       : 2.0,
+  'max_ETA'       : 4.5,
+  'max_TRCHI2DOF' : 5,
+  'ISMUON'        : True,
+  'extracut'      : 'ALL',  
+}
+
+config_tau_h1 = {
+  'min_PT'        : 4. * GeV,
+  'min_ETA'       : 2.0,
+  'max_ETA'       : 4.5,
+  'max_TRCHI2DOF' : 5,
+  'ISMUONLOOSE'   : False,
+  'InAccHcal'     : True,
+  'min_HCALFrac'  : 0.05,
+  'extracut'      : 'ALL'  
+}
+
+config_tau_h3 = {
+  'dcuts': {
+    'min_PT'        : 500 * MeV,
+    'min_ETA'       : 2.0,
+    'max_ETA'       : 4.5,
+    'max_TRCHI2DOF' : 5,
+    'ISMUONLOOSE'   : False,
+    'InAccHcal'     : True,
+    'min_HCALFrac'  : 0.01,  # Looser than usual 0.05
+    'extracut'      : 'ALL',
+  },
+  'ccuts': {
+    'min_AM'      : 700.  * MeV,
+    'max_AM'      : 1500. * MeV,
+    'min_APTMAX'  : 2000. * MeV, 
+  },
+  'mcuts': {
+    'min_PT'        : 4 * GeV,
+    'max_DRTRIOMAX' : 0.3,
+    'max_VCHI2PDOF' : 20.,
+  }
+}
+
+## Isolation fraction for each tau type
+# Defined as pt(tau) / (p(tau)+p(cone))_T
+# i.e., relative amount in PT of tau candidate, over the vectorial-sum of 
+# momenta of candidate and cone. 
+# Full isolated ~ 1
+# Anti isolated ~ 0
+config_tau_isolation = {
+  'tau_e' : 0.7,
+  'tau_mu': 0.8,
+  'tau_h1': 0.8,
+  'tau_h3': 0.8,
+}
+
+
+#-------#
+# DITAU #
+#-------#
+
+## Blank default fallback. 
+# Remember the Zen: *Explicit is better than Implicit*
+pcuts0 = {'extracut': 'ALL'} 
+
+config_ditau_e_e = {
+  'dcuts': { 'e':pcuts0 },
+  'ccuts': {
+    'min_APTMAX':  9 * GeV,
+    'min_AM'    : 12 * GeV,
+  },
+  'mcuts': pcuts0,
+}
+
+config_ditau_e_h1 = {
+  'dcuts': { 'e' : pcuts0, 'pi': pcuts0 },
+  'ccuts': {
+    'min_APTMAX':   9 * GeV,
+    'min_AM'    :  12 * GeV,
+    'extracut'  : 'ATRUE',  
+  },
+  'mcuts': pcuts0,
+}
+
+config_ditau_e_h3 = {
+  'dcuts': { 'e' : pcuts0, 'tau': pcuts0 },
+  'ccuts': {
+    'min_APTMAX':  9 * GeV,
+    'min_AM'    : 12 * GeV,
+  },
+  'mcuts': pcuts0,
+}
+
+config_ditau_e_mu = {
+  'dcuts': { 'e' : pcuts0, 'mu': pcuts0 },
+  'ccuts': {
+    'min_APTMAX':  9 * GeV,
+    'min_AM'    : 12 * GeV,
+  },
+  'mcuts': pcuts0,
+}
+
+config_ditau_h1_h1 = {
+  'dcuts': { 'pi' : pcuts0 },
+  'ccuts': {
+    'min_APTMAX' : 12 * GeV,
+    'min_AM'     : 16 * GeV,
+  },
+  'mcuts': pcuts0,
+}
+
+config_ditau_h1_h3 = {
+  'dcuts': { 'pi' : pcuts0, 'tau': pcuts0 },
+  'ccuts': {
+    'min_APTMAX': 12 * GeV,
+    'min_AM'    : 16 * GeV,
+  },
+  'mcuts': pcuts0,
+}
+
+config_ditau_h1_mu = {
+  'dcuts': { 'pi' : pcuts0, 'mu': pcuts0 },
+  'ccuts': {
+    'min_APTMAX':  9 * GeV,
+    'min_AM'    : 12 * GeV,
+  },
+  'mcuts': pcuts0,
+}
+
+config_ditau_h3_h3 = {
+  'dcuts': { 'tau' : pcuts0 },
+  'ccuts': {
+    'min_APTMAX': 12 * GeV,
+    'min_AM'    : 16 * GeV,
+  },
+  'mcuts': pcuts0,
+}
+
+config_ditau_h3_mu = {
+  'dcuts': { 'tau' : pcuts0, 'mu': pcuts0 },
+  'ccuts': {
+    'min_APTMAX' :  9 * GeV,
+    'min_AM'     : 12 * GeV,
+  },
+  'mcuts': pcuts0,
+}
+
+config_ditau_mu_mu = {
+  'dcuts': { 'mu': pcuts0 },
+  'ccuts': {
+    'min_APTMAX'  :  4 * GeV,
+    'min_AM'      :  8 * GeV,
+  },
+  'mcuts': pcuts0,
+}
+
+
+## Specify how the decay is groupped into each line
+# Groupped by Line's name.
+# Note that each decay have selection name, this is quite special.
+# - Each has to be unique!
+# - The first half before '_' is used to pick the appropriate ditau-level config
+# - 
+lines_decays = {
+  'EX': {
+    'ee_os' : '  Z0 ->  e-    e+   ',
+    'eh1_os': '[ Z0 ->  e-    pi+  ]cc',
+    'eh3_os': '[ Z0 ->  e-    tau+ ]cc',
+    'emu_os': '[ Z0 ->  e-    mu+  ]cc',
+  },
+  'EXnoiso': {
+    'ee_os_noiso' : '  Z0 ->  e-    e+   ',
+    'eh1_os_noiso': '[ Z0 ->  e-    pi+  ]cc',
+    'eh3_os_noiso': '[ Z0 ->  e-    tau+ ]cc',
+    'emu_os_noiso': '[ Z0 ->  e-    mu+  ]cc',
+  },
+  'EXssnoiso': {
+    'ee_ss_noiso' : '[ Z0 ->  e-    e-   ]cc',
+    'eh1_ss_noiso': '[ Z0 ->  e-    pi-  ]cc',
+    'eh3_ss_noiso': '[ Z0 ->  e-    tau- ]cc',
+    'emu_ss_noiso': '[ Z0 ->  e-    mu-  ]cc',  
+  },
+  'MX': {
+    'emu_os'  : '[ Z0 ->  e-    mu+  ]cc',
+    'h1mu_os' : '[ Z0 ->  pi-   mu+  ]cc',
+    'h3mu_os' : '[ Z0 ->  tau-  mu+  ]cc',
+    'mumu_os' : '  Z0 ->  mu-   mu+     ',
+  },
+  'MXnoiso': {
+    'emu_os_noiso'  : '[ Z0 ->  e-    mu+  ]cc',
+    'h1mu_os_noiso' : '[ Z0 ->  pi-   mu+  ]cc',
+    'h3mu_os_noiso' : '[ Z0 ->  tau-  mu+  ]cc',
+    'mumu_os_noiso' : '  Z0 ->  mu-   mu+     ',
+  },
+  'MXssnoiso': {
+    'emu_ss_noiso'  : '[ Z0 ->  e-    mu-  ]cc',
+    'h1mu_ss_noiso' : '[ Z0 ->  pi-   mu-  ]cc',
+    'h3mu_ss_noiso' : '[ Z0 ->  tau-  mu-  ]cc',
+    'mumu_ss_noiso' : '[ Z0 ->  mu-   mu-  ]cc',
+  },
+  'HH': {
+    'h1h1_os' : '  Z0 ->  pi-   pi+     ',
+    'h1h3_os' : '[ Z0 ->  pi-   tau+ ]cc',
+    'h3h3_os' : '  Z0 ->  tau-  tau+    ',
+  },
+  'HHnoiso': {
+    'h1h1_os_noiso' : '  Z0 ->  pi-   pi+     ',
+    'h1h3_os_noiso' : '[ Z0 ->  pi-   tau+ ]cc',
+    'h3h3_os_noiso' : '  Z0 ->  tau-  tau+    ',
+  },
+  'HHssnoiso': {
+    'h1h1_ss_noiso' : '[ Z0 ->  pi-   pi-  ]cc',
+    'h1h3_ss_noiso' : '[ Z0 ->  pi-   tau- ]cc',
+    'h3h3_ss_noiso' : '[ Z0 ->  tau-  tau- ]cc',
+  },
+}
+
+## Default config for the RelatedInfoTool framework.
+config_rit_default = [
+  {
+    'Type'      : 'RelInfoConeVariables',
+    'ConeAngle' : 0.5,
+    'DaughterLocations': {
+      'X0 -> ^X-  X+': 'IsoPlus',
+      'X0 ->  X  ^X+': 'IsoMinus',
+    },
+  },
+]
+
+#==============================================================================
+
+default_config = {
+  'NAME'        : 'Ditau',
+  'BUILDERTYPE' : 'DitauConf',
+  'STREAMS'     : [ 'EW'  ],
+  'WGs'         : [ 'QEE' ],
+  'CONFIG'      : {
+
+    ## Particle identification, full path to ./Particles please
+    'TES_mu': 'Phys/StdAllLooseMuons/Particles', 
+    'TES_e' : 'Phys/StdAllNoPIDsElectrons/Particles',
+    'TES_pi': 'Phys/StdAllNoPIDsPions/Particles',
+
+    ## Individual tau
+    'tau_e'   : config_tau_e,
+    'tau_h1'  : config_tau_h1,
+    'tau_h3'  : config_tau_h3,
+    'tau_mu'  : config_tau_mu,
+
+    ## Isolation cuts, removed in same-sign control lines.
+    'tau_isolation': config_tau_isolation,
+
+    ## Individual ditau
+    'DITAU': {
+      'ee'   : config_ditau_e_e,
+      'eh1'  : config_ditau_e_h1,
+      'eh3'  : config_ditau_e_h3,
+      'emu'  : config_ditau_e_mu,
+      'h1h1' : config_ditau_h1_h1,
+      'h1h3' : config_ditau_h1_h3,
+      'h1mu' : config_ditau_h1_mu,
+      'h3h3' : config_ditau_h3_h3,
+      'h3mu' : config_ditau_h3_mu,
+      'mumu' : config_ditau_mu_mu,
+    },
+
+    ## StrippingLine constructors. To be auto-populated with **kwargs
+    'CONSTRUCTORS': {
+      'EX': {
+        'prescale'        : 1.,
+        'checkPV'         : True,
+        'RelatedInfoTools': config_rit_default, 
+      },
+      'EXnoiso': {
+        'prescale'        : 0.02,
+        'checkPV'         : True,
+        'RelatedInfoTools': config_rit_default, 
+      },
+      'EXssnoiso': {
+        'prescale'        : 0.02,
+        'checkPV'         : True,
+        # 'RelatedInfoTools': config_rit_default, 
+      },
+      'HH': {
+        'prescale'        : 1.,
+        'checkPV'         : True,
+        'RelatedInfoTools': config_rit_default, 
+      },
+      'HHnoiso': {
+        'prescale'        : 0.02,
+        'checkPV'         : True,
+        'RelatedInfoTools': config_rit_default, 
+      },
+      'HHssnoiso': {
+        'prescale'        : 0.02,
+        'checkPV'         : True,
+        # 'RelatedInfoTools': config_rit_default, 
+      },
+      'MX': {
+        'prescale'        : 1.,
+        'checkPV'         : True,
+        'RelatedInfoTools': config_rit_default, 
+      },
+      'MXnoiso': {
+        'prescale'        : 0.05,
+        'checkPV'         : True,
+        'RelatedInfoTools': config_rit_default, 
+      },
+      'MXssnoiso': {
+        'prescale'        : 0.05,
+        'checkPV'         : True,
+        # 'RelatedInfoTools': config_rit_default, 
+      },
+    },
+
+    ## For advance usage
+    ## Extra preambulo, give me barestring with proper linebreak.
+    'preambulo'   : '\n', 
+    ## Choice of ParticleCombiner for ditau
+    'ditau_pcomb' : {'': 'MomentumCombiner:PUBLIC'},
+    ## Fine-tuning the BPV threshold for PVRefit.
+    # If this is null, then PV-Refitting in tau_h3 is not performed
+    # In general, disable me unless there's cut based on BPV.
+    'PVRefitter'  : None
+    #   {
+    #   'CheckTracksByLHCbIDs': True,
+    #   'DeltaChi2'           : 0.01,
+    #   'DeltaDistance'       : 5 * micrometer,
+    # }
+  }
+}
+
+#==============================================================================
+
+## Default preambulo
+
+preambulo0 = """
+
+def _MakeTrio(f1, f2, f3):
+  #Helper method to generate trio-functors for p with 3 children.
+  from LoKiCore.math import min as lkmin
+  from LoKiCore.math import max as lkmax
+  from LoKiPhys.decorators import NDAUGHTERS
+  from LoKiCore.functions import switch
+  fmin = lkmin(f1, f2, f3)
+  fmax = lkmax(f1, f2, f3)
+  fmid = (f1+f2+f3) - fmin - fmax
+  # also with guard.
+  trioguard = lambda f: switch(NDAUGHTERS==3, f, -1)
+  return trioguard(fmin), trioguard(fmid), trioguard(fmax)
+
+def _MakeChildrenDR(i1, i2):                           
+  from LoKiPhys.decorators import CHILD,ETA,PHI  
+  from LoKiCore.math import cos,acos
+  DETA = abs(CHILD(ETA,i1)-CHILD(ETA,i2))
+  DPHI = abs(CHILD(PHI,i1)-CHILD(PHI,i2))
+  DPHI = acos(cos(DPHI))  # mod pi       
+  return (DPHI**2 + DETA**2)**0.5
+
+DRTRIOMIN, DRTRIOMID, DRTRIOMAX = _MakeTrio( _MakeChildrenDR(1,2), _MakeChildrenDR(2,3), _MakeChildrenDR(3,1) )
+
+## Combinations
+ABPVCORRMMAX  = AMAXCHILD(BPVCORRM)
+APTMIN        = AMINCHILD(PT)
+APTMAX        = AMAXCHILD(PT)
+
+## instantiated
+_VCHI2PDOF  = VCHI2PDOF
+VCHI2PDOF   = VFASPF(_VCHI2PDOF)
+
+## PID
+CaloPrsE  = PPFUN(PP_CaloPrsE, -1)
+CaloHcalE = PPFUN(PP_CaloHcalE, -1)     # For lowerbound req
+HCALFrac  = PPFUN(PP_CaloHcalE, -1)/P
+ECALFrac  = PPFUN(PP_CaloEcalE, 0)/P
+InAccHcal = PPFUN(PP_InAccHcal, -1)==1
+InAccEcal = PPFUN(PP_InAccEcal, -1)==1
+
+""".split('\n')
+
+
+def parse_single_cut( key, val ):
+  """
+  Auto-generate the cut string from config key-val. 
+  Designed for on-demand cut.
+  
+  >>> parse_single_cut( 'min_PT', 500 )
+  'PT > 500'
+  >>> parse_single_cut( 'ISMUON', False )  # Boolean
+  '~ISMUON'
+  >>> parse_single_cut( 'ABSID', 13 )  # Float
+  'ABSID == 13'
+  >>> parse_single_cut( 'extracut', 'ISPINKELEPHANT' )
+  'ISPINKELEPHANT'
+
+  """
+  key = key.strip()
+  if key == 'extracut':
+    return val
+  if key.startswith('max_'):
+    var = key.replace('max_', '')
+    return '%s < %s' % (var,val)
+  if key.startswith('min_'):
+    var = key.replace('min_', '')
+    return '%s > %s' % (var,val)
+  if isinstance(val, bool):
+    return '%s%s' % ( '' if val else '~', key )
+  # finally... last fallback, bare equality
+  return '%s == %s' % (key,val)
+
+def join(cuts):
+  """
+  Join each predicate in cuts with '&' with bracket.
+  - Ignore None
+  - Not recursive
+  """
+  cuts = [ c for c in cuts if c is not None ]
+  return "("+") & (".join(cuts)+")"
+
+def parse_cuts_auto(config):
+  """
+  Given the custom-formatted config-dict, return LoKi-ready string cut generated 
+  on-the-fly for each key-val in config (see `parse_single_cut`).
+
+  Note: Since the content inside config may vary, the optional argument
+  *cuts should therefore be provided with at least one AND-nullpotent cut,
+  such as ALL (for single particle cut), or ATRUE (for combination cut).
+  Just to be safe...
+  """
+  return join([ parse_single_cut(key,val) for key,val in config.iteritems() ])
+
+def doubling_sign_dict(d):
+  """
+  Given a dict of unsigned-partice, return new dict with both sign.
+  Useful for symmetric dict in CombineParticles.DaughtersCuts
+
+  >>> doubling_sign_dict({'pi': 'PT>500'})
+  {'pi-': 'PT>500', 'pi+': 'PT>500' }
+  """
+  return { key+sign:val for key,val in d.iteritems() for sign in ('+','-') }
+
+# def cut_iso_child( index, infoloc ):
+#   """
+#   Make on-demand functor that cut on isolation var calculated by RelInfoConeVar.
+#   This is the former `PTFrac05C` functor.
+#   More bump since the PT-fraction needs to be calculated manually.
+  
+#   ** ACTS ON MOTHER, BUT GET INFO OF CHILD***
+
+#   Remark that, due to the (weird) design of relatedInfo, even when I want to 
+#   retrieve the isolation info of a child, I need to use its mother as a pointer,
+#   and select the appropriate location where the child's info is stored.
+#   As such, the isolation info is outside the CHILDCUT functor, but act on 
+#   mother directly.  
+
+#   """
+#   PT = 'CHILD(PT,%i)'%index
+#   PX = 'CHILD(PX,%i)'%index
+#   PY = 'CHILD(PY,%i)'%index
+#   CONEPX = "RELINFO('%s', 'CONEPX', 1E12)"%infoloc
+#   CONEPY = "RELINFO('%s', 'CONEPY', 1E12)"%infoloc
+#   return '({PT}/(({PX}+{CONEPX})**2+({PY}+{CONEPY})**2)**0.5)'.format(**locals())
+
+# def cut_iso_tauchild( index, infoloc, tau_e, tau_mu, tau_h1, tau_h3, **kwargs ):
+#   """
+#   Extension of above, again, acts on ditau, in order to cut of tau's isolation.
+#   This time with conf of isolation values.
+#   """
+#   func  = cut_iso_child( index, infoloc )
+#   taue  = "(CHILDCUT(ABSID==11,{index})   & ({func} > {tau_e}))"
+#   taumu = "(CHILDCUT(ABSID==13,{index})   & ({func} > {tau_mu}))"
+#   tauh3 = "(CHILDCUT(ABSID==15,{index})   & ({func} > {tau_h3}))"
+#   tauh1 = "(CHILDCUT(ABSID==211,{index})  & ({func} > {tau_h1}))"
+#   cut   = '({taue}) | ({taumu}) | ({tauh1}) | ({tauh3})'
+#   return cut.format(**locals()).format(**locals())
+
+# def cut_iso_ditau( loc1, loc2, tau_mu, tau_e, tau_h1, tau_h3 ):
+#   """
+#   Even more complex for cutting on isolation from di-tau...
+#   """
+#   cut1 = cut_iso_tauchild( 1, loc1, **locals())
+#   cut2 = cut_iso_tauchild( 2, loc2, **locals())
+#   return join([cut1,cut2])
+
+def cut_iso_tau( infoloc, tau_e, tau_mu, tau_h1, tau_h3, **kwargs ):
+  """
+  The version where tau itself is a pointer to RIF, not mom.
+  """
+  CONEPX = "RELINFO('%s', 'CONEPX')"%infoloc
+  CONEPY = "RELINFO('%s', 'CONEPY')"%infoloc
+  func   = '(PT/((PX+{CONEPX})**2+(PY+{CONEPY})**2)**0.5)'.format(**locals())
+  #
+  c1 = '(ABSID==11)  & ({func} > {tau_e})'
+  c2 = '(ABSID==13)  & ({func} > {tau_mu})'
+  c3 = '(ABSID==15)  & ({func} > {tau_h3})'
+  c4 = '(ABSID==211) & ({func} > {tau_h1})'
+  return  '({c1}) | ({c2}) | ({c3}) | ({c4})'.format(**locals()).format(**locals())
+
+
+#------------------------------------------------------------------------------
+# SELECTION
+#------------------------------------------------------------------------------
+
+def selection_filt( config, preambulo, sel, newname ):
+  """
+  Given a selection, apply FilterDesktop on top of it, 
+  with cuts from config to be parsed.
+  """
+  return SimpleSelection( newname, FilterDesktop, sel,
+    Preambulo = preambulo0 + preambulo.split('\n'),
+    Code      = parse_cuts_auto(config),
+  )
+
+def selection_tau_h3( Config, preambulo, inputs ):
+  config = Config['tau_h3']  ## Pickout tau_h3 config from big one.
+  #
+  dcut = parse_cuts_auto(config['dcuts'])
+  algo = CombineParticles('CombTauNoiso_h3')
+  algo.DecayDescriptor   = '[ tau- -> pi- pi- pi+ ]cc'
+  algo.Preambulo         = preambulo0 + preambulo.split('\n')
+  algo.DaughtersCuts     = {'pi-':dcut, 'pi+':dcut}
+  algo.CombinationCut    = parse_cuts_auto( config['ccuts'] )
+  algo.MotherCut         = parse_cuts_auto( config['mcuts'] )
+  #
+  config_refit = Config['PVRefitter']
+  if config_refit:
+    tool = LoKi__PVReFitter('PVRefitter_tauh3', **config_refit)
+    algo.ReFitPVs = True
+    algo.IgnoreP2PVFromInputLocations = True
+    algo.addTool( tool )
+    algo.PVReFitters.update({ '': 'LoKi::PVReFitter/PVRefitter_tauh3' })
+  #
+  return Selection( 'SelTauNoiso_h3', Algorithm=algo, RequiredSelections=inputs )
+
+
+def selection_tauiso( tau_noiso, conf ):
+  """
+  Take single Selection containing heteregenous list of 'tau' (11,13,15,211),
+  cut on isolation variable given for each tau type.
+
+  The code is separated into 2 parts:
+  1. Attach related info to given Selection: Phys/TauNoiso/Iso
+  2. Perform actual cut
+
+  Sadly, I couldn't find a way to add info without staging a new selection,
+  so I use PassThroughSelection.
+
+  """
+  ## First part is attaching
+  tool          = RelInfoConeVariables('TauIsoInfo', ConeAngle=0.5)
+  algo          = AddRelatedInfo()
+  algo.Inputs   = [ tau_noiso.outputLocation() ]
+  algo.Location = 'Iso' # Use for chaining!
+  algo.Tool     = tool.getFullName()
+  tau_withinfo  = PassThroughSelection( 'TauInfo', Algorithm=algo, RequiredSelection=tau_noiso )
+
+  ## Second part is filtering
+  loc  = tau_noiso.outputLocation().replace('/Particles', '/Iso')
+  code = cut_iso_tau( loc, **conf )
+  return SimpleSelection( 'TauIso', FilterDesktop, [tau_withinfo], Code=code )
+
+
+def selection_ditau( config, preambulo, pcomb, dcname, decay, inputs ):
+  ## dcuts are quite complicate since it's a-priori nested dict index by particle-name.
+  dcuts = { key:parse_cuts_auto(val) for key,val in doubling_sign_dict(config['dcuts']).iteritems() }
+  return SimpleSelection( 'SelDitau_'+dcname, GenCombineParticles, inputs,
+    Preambulo         = preambulo0 + preambulo.split('\n'),
+    DecayDescriptor   = decay,
+    DaughtersCuts     = dcuts,
+    CombinationCut    = parse_cuts_auto(config['ccuts']),
+    MotherCut         = parse_cuts_auto(config['mcuts']),
+    ParticleCombiners = pcomb,
+    # CombinationCut  = 'AALLSAMEBPV',  # BUGGY, don't use me!
+  )
+
+# def rif_isolation( fulllinename, conf ):
+#   """
+#   Make FilterDesktop to be used as RelatedInfoFilter
+#   fulllinename ~ DitauEXssnoisoLine
+#   """
+#   code = cut_iso_ditau( 'Phys/TauNoiso/Iso', **conf )
+
+#   # ## Prepare the cut, delegates hard work externally.
+#   # locm = 'Phys/%s/IsoMinus'%fulllinename
+#   # locp = 'Phys/%s/IsoPlus' %fulllinename
+#   # code = cut_iso_ditau( loc1, loc2, **conf )
+
+#   ## Prepare the algo, use vanilla version
+#   from Configurables import FilterDesktop
+#   filt = FilterDesktop(fulllinename.replace('Line','isoLine'))
+#   filt.Code   = code
+#   filt.Inputs = [ 'Phys/%s/Particles'%fulllinename ]
+#   filt.CloneFilteredParticles = True
+
+#   print filt
+
+#   return filt
+
+#==============================================================================
+
+## Nomenclatures on name, just to not get myself confused...
+# NAME    : Formal name of stripping line, by default, 'Ditau'
+# dtype   : Decay type of ditau (no sign), e.g., eh1, mumu
+# dcname  : Decay name of ditau (with sign), e.g., eh1_ss, mumu_os
+# linename: Short line name, e.g., EX, MXss 
+#           (note that opposite-sign os is dropped)
+
+
+class DitauConf(LineBuilder):
+
+  __configuration_keys__ = default_config['CONFIG'].keys()  # Legacy field
+
+  # Note: To be instantiated by LineBuilder( default_config['NAME'], default_config['CONFIG'] )
+  def __init__(self, NAME, CONFIG):
+
+    ## Required the explicit name/dconfig, no default allow
+    LineBuilder.__init__(self, NAME, CONFIG)
+
+    ## Prepare raw particle for identification
+    preambulo   = CONFIG['preambulo']
+    ditau_pcomb = CONFIG['ditau_pcomb']
+    input_e     = [ AutomaticData(Location=CONFIG['TES_e'])  ]
+    input_mu    = [ AutomaticData(Location=CONFIG['TES_mu']) ]
+    input_pi    = [ AutomaticData(Location=CONFIG['TES_pi']) ]
+
+    ## Make pre-selection tau candidates, no isolation here.
+    ## Merge these together (parallel, not sequential selection)
+    tau_noiso = MergedSelection('TauNoiso', [
+      selection_filt  ( CONFIG['tau_e']  , preambulo, input_e  , 'SelTauNoiso_e'  ),
+      selection_filt  ( CONFIG['tau_mu'] , preambulo, input_mu , 'SelTauNoiso_mu' ),
+      selection_filt  ( CONFIG['tau_h1'] , preambulo, input_pi , 'SelTauNoiso_h1' ),
+      selection_tau_h3( CONFIG           , preambulo, input_pi ),
+    ])
+
+    # ## Cut on isolation: RelInfoConeVariables + AddRelatedInfo + FilterDesktop
+    tau_iso = selection_tauiso( tau_noiso, CONFIG['tau_isolation'] )
+
+    ## Prepare selection of ditau
+    # Selections, indexed by dcname (for emu sharing). Think of it as caching.
+    sels_ditau = {}  
+
+    ## Loop over all lines, make groupping
+    for linename, condict in CONFIG['CONSTRUCTORS'].iteritems():
+      ## Make the fullname: e.g., 'Ditau' + 'EXss' + 'Line'
+      fullname = NAME + linename + 'Line'
+      ## Get list of decay, indexed by Line's name      
+      dcdict = lines_decays[linename]  
+      ## Make list of selections to be put in single line
+      sels = []
+      for dcname, decay in dcdict.iteritems():
+        ## Make selection if it hasn't been done.
+        if dcname not in sels_ditau:
+          dtype   = dcname.split('_')[0]      # eh1_ss --> eh1
+          config  = CONFIG['DITAU'][dtype]    # Same ditau-level config for OS/SS
+          inputs  = [ tau_noiso if 'noiso' in linename else tau_iso ]
+          # inputs  = [ tau_noiso ]
+          sel     = selection_ditau( config, preambulo, ditau_pcomb, dcname, decay, inputs )
+          sels_ditau[dcname] = sel
+        sels.append(sels_ditau[dcname])
+      ## Finally, merged it
+      selection = MergedSelection( 'Sel'+linename, sels )
+
+      # ## Adding isolation cut on the ditau level.
+      # filt = None 
+      # if 'noiso' not in linename:
+      #   filt = rif_isolation( fullname, CONFIG['tau_isolation'] )
+
+      ## Finally, compose a stripping line, register
+      self.registerLine(StrippingLine( fullname,
+        selection         = selection,
+        # RelatedInfoFilter = filt,
+        **CONFIG['CONSTRUCTORS'][linename]
+      ))
+
+#===============================================================================
+
+def Tuples():
+  """
+  Simple class-like method to return DecayTreeTuple which can be used to 
+  do quick-check on the output DST.
+
+  Usage:
+  >> from StrippingSelections.StrippingQEE import StrippingDitau
+  >> DaVinci().appendToMainSequence( StrippingDitau.Tuples() )
+  >> DaVinci().TupleFile = 'tuple.root'
+
+  """
+  import re
+  from DecayTreeTuple.Configuration import DecayTreeTuple, EventTuple
+
+  seq = GaudiSequencer('TupleSeq')
+  seq.ModeOR       = True
+  seq.ShortCircuit = False
+  for lname, decays in lines_decays.iteritems():
+    for process, desc in decays.iteritems():
+      desc = re.sub( r'  ([a-z])', r' ^\1', desc) # regex insert ^
+      desc = desc.replace('cc', 'CC') # different between CombineP & DTT
+      #
+      ## Extra complication for cand with RIF, such that the input location
+      # after isolation filter is not at default line location, but on the 
+      # last algo's location. Otherwise the tuple will pick up candidates 
+      # before isolation filtering.
+      root = 'Phys/Ditau%sLine'%lname
+      # if 'noiso' not in root:
+      #   root = root.replace('Line','isoLine')
+      #
+      tup   = DecayTreeTuple('Tup_'+process, NTupleDir='Ditau', TupleName=process)
+      tup.Inputs    = [ root+'/Particles' ]
+      tup.Decay     = desc
+      tup.ToolList  = [
+        'TupleToolKinematic',
+      ]
+      tool = tup.addTupleTool('TupleToolConeIsolation')
+      tool.MinConeSize = 0.5
+      tool.MaxConeSize = 0.5
+      tool = tup.addTupleTool('LoKi::Hybrid::TupleTool')
+      tool.Variables = {
+        'CONEPX1': "RELINFO('%s/IsoPlus' , 'CONEPX')"%root,
+        'CONEPX2': "RELINFO('%s/IsoMinus', 'CONEPX')"%root,
+        'CONEPY1': "RELINFO('%s/IsoPlus' , 'CONEPY')"%root,
+        'CONEPY2': "RELINFO('%s/IsoMinus', 'CONEPY')"%root,
+        'CONEPT1': "RELINFO('%s/IsoPlus' , 'CONEPT')"%root,
+        'CONEPT2': "RELINFO('%s/IsoMinus', 'CONEPT')"%root,
+      }
+      seq.Members.append(tup)
+  return [seq]
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingExotica.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingExotica.py
new file mode 100755
index 000000000..e73ee74df
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingExotica.py
@@ -0,0 +1,522 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+"""
+
+StrippingLine making exotic candidates based on Hlt2Exotica.
+
+### Exotica Lines written by Phil Ilten and Mike Williams (mwill@mit.edu)
+Hlt2ExoticaDisplPhiPhi
+Hlt2ExoticaRHNu
+Hlt2ExoticaSharedDiMuonNoIP
+Hlt2ExoticaQuadMuonNoIP
+Hlt2ExoticaDisplDiMuon
+Hlt2ExoticaDisplDiMuonNoPoint
+Hlt2ExoticaPrmptDiMuonTurbo
+Hlt2ExoticaPrmptDiMuonSSTurbo
+Hlt2ExoticaPrmptDiMuonHighMass
+
+"""
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, picosecond
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, SimpleSelection, MergedSelection, AutomaticData
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+
+__author__  = 'Chitsanu Khurewathanakul', 'Philip Ilten', 'Michael Williams'
+__date__    = '2016-04-08'
+__version__ = 1.3
+__all__     = 'ExoticaConf', 'default_config'
+
+default_config = {
+  'NAME'        : 'Exotica',
+  'BUILDERTYPE' : 'ExoticaConf',
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : {
+    'EW': [
+      'StrippingExoticaDisplPhiPhiLine',
+      'StrippingExoticaRHNuLine',
+      'StrippingExoticaRHNuHighMassLine',
+      'StrippingExoticaDiRHNuLine',
+      'StrippingExoticaPrmptDiMuonHighMassLine',
+      'StrippingExoticaQuadMuonNoIPLine',
+      'StrippingExoticaDisplDiELine',
+      'StrippingExoticaDisplDiEHighMassLine',
+    ],
+    'Dimuon': [
+      'StrippingExoticaDisplDiMuonLine',
+      'StrippingExoticaDisplDiMuonHighMassLine',
+      'StrippingExoticaDisplDiMuonNoPointLine',
+      'StrippingExoticaDisplDiMuonNoPointRLine',
+    ],
+  },
+  'CONFIG'      : {
+    'Common': {
+      'GhostProb': 0.3,
+    },
+    'Prescales': {
+      'DisplPhiPhi'         : 1.0,
+      'RHNu'                : 1.0,
+      'RHNuHighMass'        : 1.0,
+      'DiRHNu'              : 1.0,
+      'DisplDiE'            : 1.0,
+      'DisplDiEHighMass'    : 1.0,
+      'DisplDiMuon'         : 1.0,
+      'DisplDiMuonHighMass' : 1.0,
+      'DisplDiMuonNoPoint'  : 1.0,
+      'DisplDiMuonNoPointR' : 1.0,
+      'PrmptDiMuonHighMass' : 1.0,
+      'QuadMuonNoIP'        : 1.0,
+    },
+    'DisplPhiPhi': {
+      # 'TOS_HLT2'      : 'Hlt2ExoticaDisplPhiPhiDecision',
+      'input'         : 'Phys/StdLoosePhi2KK/Particles',
+      'TisTosSpec'    : "Hlt1IncPhi.*Decision",
+      'KPT'           : 500*MeV,
+      'KIPChi2'       : 16,
+      'KProbNNk'      : 0.1,
+      'PhiPT'         : 1000*MeV,
+      'PhiMassWindow' : 20*MeV,
+      'VChi2'         : 10,
+      'FDChi2'        : 45,
+    },
+    'SharedRHNu' : {
+      'input'    : ['Phys/StdAllLooseMuons/Particles',
+                    'Phys/StdNoPIDsPions/Particles'],
+      'PT'       : 500*MeV,
+      'P'        : 10000*MeV,
+      'ProbNNmu' : 0.5,
+      'IPChi2'   : 16,
+      'VChi2'    : 10,
+      'XIPChi2'  : 16,
+      'M'        : 0,
+      'TAU'      : 1*picosecond,
+      'FDChi2'   : 45,
+      },
+    'RHNu' : {
+      'M'   : 0,
+      'TAU' : 1*picosecond,
+      },
+    'RHNuHighMass' : {
+      'ProbNNmu' : 0.5,
+      'M'        : 5000*MeV,
+      'TAU'      : 1*picosecond,
+      },
+    'DiRHNu' : {
+      'PT'    : 0,
+      'VChi2' : 10,
+      },
+    'SharedDiENoIP': {
+      'input'       : 'Phys/StdAllLooseElectrons/Particles',
+      'EPT'         : 500*MeV,
+      'EP'          : 5000*MeV,
+      'EProbNNe'    : 0.1,
+      'DOCA'        : 0.5*mm,
+      'MM'          : 0*MeV,
+      'VChi2'       : 25,
+      },
+    'SharedDiMuonNoIP': {
+      'input'       : 'Phys/StdAllLooseMuons/Particles',
+      'MuPT'        : 500*MeV,
+      'MuP'         : 10000*MeV,
+      'MuProbNNmu'  : 0.5,
+      'DOCA'        : 0.5*mm,
+      'VChi2'       : 10,
+    },
+    'DisplDiE': {
+      # 'TOS_HLT2'  : 'Hlt2ExoticaDisplDiEDecision',
+      'TisTosSpec': "Hlt1TrackMVA.*Decision",
+      'EProbNNe'  : 0.1,
+      'EIPChi2'   : 4,
+      'MaxMM'     : 500*MeV,
+      'PT'        : 500*MeV,
+      'IPChi2'    : 32,
+      'FDChi2'    : 0,
+    },
+    'DisplDiEHighMass': {
+      # 'TOS_HLT2'  : 'Hlt2ExoticaDisplDiEDecision',
+      'TisTosSpec': "Hlt1TrackMVA.*Decision",
+      'EProbNNe'  : 0.1,
+      'EIPChi2'   : 4,
+      'MinMM'     : 500*MeV,
+      'PT'        : 500*MeV,
+      'IPChi2'    : 32,
+      'FDChi2'    : 0,
+      'TAU'       : 1*picosecond,
+    },
+    'DisplDiMuon': {
+      # 'TOS_HLT2'  : 'Hlt2ExoticaDisplDiMuonDecision',
+      'MuProbNNmu': 0.5,
+      'MuIPChi2'  : 4,
+      'MaxMM'     : 500*MeV,
+      'PT'        : 1000*MeV,
+      'IPChi2'    : 16,
+      'FDChi2'    : 4,
+    },
+    'DisplDiMuonHighMass': {
+      # 'TOS_HLT2'  : 'Hlt2ExoticaDisplDiMuonDecision',
+      'MuProbNNmu': 0.8,
+      'MuIPChi2'  : 9,
+      'MinMM'     : 500*MeV,
+      'PT'        : 1000*MeV,
+      'IPChi2'    : 16,
+      'FDChi2'    : 4,
+      'TAU'       : 1*picosecond,
+    },
+    'DisplDiMuonNoPoint': {
+      # 'TOS_HLT2'  : 'Hlt2ExoticaDisplDiMuonNoPointDecision',
+      'MSwitch'             : 500*MeV,
+      'MuProbNNmu_lowmass'  : 0.5,
+      'MuProbNNmu_highmass' : 0.8,
+      'MuIPChi2_lowmass'    : 4,
+      'MuIPChi2_highmass'   : 25,
+      'PT'                  : 1000*MeV,
+      'FDChi2'              : 16,
+      'R'                   : 0*mm,
+    },
+    'DisplDiMuonNoPointR': {
+      # 'TOS_HLT2'  : 'Hlt2ExoticaDisplDiMuonNoPointDecision',
+      'MSwitch'             : 500*MeV,
+      'MuProbNNmu_lowmass'  : 0.5,
+      'MuProbNNmu_highmass' : 0.8,
+      'MuIPChi2_lowmass'    : 4,
+      'MuIPChi2_highmass'   : 25,
+      'PT'                  : 1000*MeV,
+      'FDChi2'              : 16,
+      'R'                   : 2.75*mm,
+    },
+    'PrmptDiMuonHighMass': {
+      # 'TOS_HLT2'  : 'Hlt2ExoticaPrmptDiMuonHighMassDecision',
+      'MuPT'         : 500*MeV,
+      'MuPTPROD'     : 1*GeV*GeV,
+      'MuP'          : 10000*MeV,
+      'M'            : 3200*MeV,
+      'M_switch_ab'  : 740*MeV,
+      'M_switch_bc'  : 1100*MeV,
+      'M_switch_cd'  : 3000*MeV,
+      'M_switch_de'  : 3200*MeV,
+      'M_switch_ef'  : 9000*MeV,
+      'MuProbNNmu_a' : 0.8,
+      'MuProbNNmu_b' : 0.8,
+      'MuProbNNmu_c' : 0.95,
+      'MuProbNNmu_d' : 2.0,
+      'MuProbNNmu_e' : 0.95,
+      'MuProbNNmu_f' : 0.9,
+      'MuIPChi2'     : 6,
+      'PT'           : 1000*MeV,
+      'FDChi2'       : 45
+     },
+    'QuadMuonNoIP': {
+      # 'TOS_HLT2'  : 'Hlt2ExoticaQuadMuonNoIPDecision',
+      'PT'        : 0,
+      'VChi2'     : 10,
+    },
+  },
+}
+
+#===============================================================================
+
+def DisplPhiPhi( conf ):
+
+  inputs = [ AutomaticData(Location=conf['input'])  ]
+
+  dc = ("TOS('%(TisTosSpec)s','Hlt1TriggerTisTos')"
+        "& (PT > %(PhiPT)s) "
+        "& (MINTREE('K+'==ABSID,PT) > %(KPT)s) "
+        "& (MINTREE('K+'==ABSID,BPVIPCHI2()) > %(KIPChi2)s) "
+        "& (MAXTREE('K+'==ABSID,TRGHOSTPROB) < %(GhostProb)s) "
+        "& (MINTREE('K+'==ABSID,PROBNNK) > %(KProbNNk)s) "
+        "& (VFASPF(VCHI2PDOF) < %(VChi2)s) "
+        "& (in_range( PDGM('phi(1020)') - %(PhiMassWindow)s , M , PDGM('phi(1020)') + %(PhiMassWindow)s ) )")%conf
+
+  mc =  ("(HASVERTEX)"
+         "& (VFASPF(VCHI2) < %(VChi2)s) "
+         "& (BPVVDCHI2 > %(FDChi2)s)")%conf
+
+  ## TOS on HLT2 on-demand
+  if 'TOS_HLT2' in conf:
+    mc += '& (TOS("%(TOS_HLT2)s", "Hlt2TriggerTisTos"))'%conf
+
+  return SimpleSelection( 'DisplPhiPhi', CombineParticles, inputs,
+    DecayDescriptor = 'B0 -> phi(1020) phi(1020)',
+    DaughtersCuts   = {'phi(1020)': dc},
+    MotherCut       = mc,
+  )
+
+
+def SharedRHNu( conf ):
+
+  inputs = [AutomaticData(Location = loc) for loc in conf['input']]
+
+  dc = {}
+  dc['mu+'] = ("(PT > %(PT)s) "
+               "& (P > %(P)s) "
+               "& (BPVIPCHI2() > %(IPChi2)s) "
+               "& (TRGHOSTPROB < %(GhostProb)s) "
+               "& (PROBNNmu > %(ProbNNmu)s) ")%conf
+  dc['pi+'] = ("(PT > %(PT)s) "
+               "& (P > %(P)s) "
+               "& (BPVIPCHI2() > %(IPChi2)s) "
+               "& (TRGHOSTPROB < %(GhostProb)s)")%conf
+  cc = "(APT > 2*%(PT)s) &  (AM > %(M)s) & (ACUTDOCACHI2(%(VChi2)s,''))"%conf
+  mc = ("(PT > 2*%(PT)s)"
+        "& (HASVERTEX)"
+        "& (VFASPF(VCHI2PDOF) < %(VChi2)s) "
+        "& (BPVIPCHI2() < %(XIPChi2)s)"
+        "& (BPVVDCHI2 > %(FDChi2)s)"
+        "& (BPVLTIME() > %(TAU)s)")%conf
+
+  return SimpleSelection( 'SharedRHNu', CombineParticles, inputs,
+    DecayDescriptor = "[KS0 -> mu+ pi-]cc",
+    CombinationCut  = cc,
+    DaughtersCuts   = dc,
+    MotherCut       = mc
+  )
+
+def RHNu( conf, name, sharedRHNu ):
+  code = ("(M > %(M)s)"
+          "& (HASVERTEX)"
+          "& (BPVLTIME() > %(TAU)s)")%conf
+
+  ## TOS on HLT2 on-demand
+  if 'TOS_HLT2' in conf:
+    code += '& (TOS("%(TOS_HLT2)s", "Hlt2TriggerTisTos"))'%conf
+
+  return SimpleSelection( name, FilterDesktop, sharedRHNu, Code=code)
+
+def DiRHNu( conf, sharedRHNu ):
+
+  cc = "APT > %(PT)s"%conf
+  mc =  ("(HASVERTEX)"
+         "& (VFASPF(VCHI2) < %(VChi2)s) ")%conf
+
+  return SimpleSelection( 'DiRHNu', CombineParticles, sharedRHNu,
+    DecayDescriptor = "B0 -> KS0 KS0",
+    CombinationCut  = cc,
+    MotherCut       = mc,
+  )
+
+#-------------------------------------------------------------------------------
+
+def SharedDiENoIP( conf ):
+
+  inputs = [ AutomaticData(Location=conf['input'])  ]
+
+  dc = ("(PT > %(EPT)s) "
+        "& (P > %(EP)s) "
+        "& (TRGHOSTPROB < %(GhostProb)s) "
+        "& (PROBNNe > %(EProbNNe)s) ")%conf
+  cc = "(AMAXDOCA('') < %(DOCA)s) & (AM > %(MM)s)"%conf
+  mc = "(VFASPF(VCHI2PDOF) < %(VChi2)s) "%conf
+
+  return SimpleSelection( 'SharedDiENoIP', CombineParticles, inputs,
+    DecayDescriptor = "KS0 -> e+ e-",
+    DaughtersCuts   = {'e+':dc, 'e-':dc},
+    CombinationCut  = cc,
+    MotherCut       = mc,
+  )
+
+def SharedDiMuonNoIP( conf ):
+
+  inputs = [ AutomaticData(Location=conf['input'])  ]
+
+  dc = ("(PT > %(MuPT)s) "
+        "& (P > %(MuP)s) "
+        "& (TRGHOSTPROB < %(GhostProb)s) "
+        "& (PROBNNmu > %(MuProbNNmu)s) ")%conf
+  cc = "(AMAXDOCA('') < %(DOCA)s)"%conf
+  mc = "(VFASPF(VCHI2PDOF) < %(VChi2)s) "%conf
+
+  return SimpleSelection( 'SharedDiMuonNoIP', CombineParticles, inputs,
+    DecayDescriptor = "KS0 -> mu+ mu-",
+    DaughtersCuts   = {'mu+':dc, 'mu-':dc},
+    CombinationCut  = cc,
+    MotherCut       = mc,
+  )
+
+def DisplDiE( conf, name, sharedDiE ):
+  code = ("TOS('%(TisTosSpec)s','Hlt1TriggerTisTos')"
+          "& (MINTREE('e+'==ABSID,BPVIPCHI2()) > %(EIPChi2)s)"
+          "& (MINTREE('e+'==ABSID,PROBNNe) > %(EProbNNe)s)"
+          "& (PT > %(PT)s)"
+          "& (HASVERTEX)"
+          "& (BPVIPCHI2() < %(IPChi2)s)"
+          "& (BPVVDCHI2 > %(FDChi2)s)")%conf
+  if 'TAU' in conf: code += "& (BPVLTIME() > %(TAU)s)"%conf
+  if 'MinMM' in conf: code += "& (MM > %(MinMM)s)"%conf
+  if 'MaxMM' in conf: code += "& (MM < %(MaxMM)s)"%conf
+
+  ## TOS on HLT2 on-demand
+  if 'TOS_HLT2' in conf:
+    code += '& (TOS("%(TOS_HLT2)s", "Hlt2TriggerTisTos"))'%conf
+
+  return SimpleSelection( name, FilterDesktop, sharedDiE, Code=code)
+
+def DisplDiMuon( conf, name, sharedDiMuon ):
+  code = ("(MINTREE('mu+'==ABSID,BPVIPCHI2()) > %(MuIPChi2)s)"
+          "& (MINTREE('mu+'==ABSID,PROBNNmu) > %(MuProbNNmu)s)"
+          "& (PT > %(PT)s)"
+          "& (HASVERTEX)"
+          "& (BPVIPCHI2() < %(IPChi2)s)"
+          "& (BPVVDCHI2 > %(FDChi2)s)")%conf
+  if 'TAU' in conf: code += "& (BPVLTIME() > %(TAU)s)"%conf
+  if 'MinMM' in conf: code += "& (MM > %(MinMM)s)"%conf
+  if 'MaxMM' in conf: code += "& (MM < %(MaxMM)s)"%conf
+
+  ## TOS on HLT2 on-demand
+  if 'TOS_HLT2' in conf:
+    code += '& (TOS("%(TOS_HLT2)s", "Hlt2TriggerTisTos"))'%conf
+
+  return SimpleSelection( name, FilterDesktop, sharedDiMuon, Code=code)
+
+def DisplDiMuonNoPoint( conf, name, sharedDiMuon ):
+  code = ("(((MM < %(MSwitch)s) & (MINTREE('mu+'==ABSID,BPVIPCHI2()) > %(MuIPChi2_lowmass)s)) | ((MM > %(MSwitch)s) & (MINTREE('mu+'==ABSID,BPVIPCHI2()) > %(MuIPChi2_highmass)s)))"
+          "&(((MM < %(MSwitch)s) & (MINTREE('mu+'==ABSID,PROBNNmu) > %(MuProbNNmu_lowmass)s)) | ((MM > %(MSwitch)s) & (MINTREE('mu+'==ABSID,PROBNNmu) > %(MuProbNNmu_highmass)s)))"
+          "& (PT > %(PT)s)"
+          "& (HASVERTEX)"
+          "& (BPVVDCHI2 > %(FDChi2)s)"
+          "& (BPVVDR > %(R)s)")%conf
+
+  ## TOS on HLT2 on-demand
+  if 'TOS_HLT2' in conf:
+    code += '& (TOS("%(TOS_HLT2)s", "Hlt2TriggerTisTos"))'%conf
+
+  return SimpleSelection( name, FilterDesktop, sharedDiMuon, Code=code)
+
+def PrmptDiMuonHighMass( conf, sharedDiMuon ):
+  nregions = 6
+  region_names = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
+
+  code = '(M > %(M)s) &'
+  code += ("(MINTREE('mu+'==ABSID,PT) > %(MuPT)s) "
+           "& (MINTREE('mu+'==ABSID,P) > %(MuP)s)"
+           "& (MINTREE('mu+'==ABSID,BPVIPCHI2()) < %(MuIPChi2)s)")
+  for n in range(nregions):
+    if n==0: code += "& ( ((M < %(M_switch_{1}{2})s) & (MINTREE('mu+'==ABSID,PROBNNmu) > %(MuProbNNmu_{1})s)) ".format(None,region_names[n],region_names[n+1])
+    elif n==nregions-1: code += "  | ((M > %(M_switch_{0}{1})s) & (MINTREE('mu+'==ABSID,PROBNNmu) > %(MuProbNNmu_{1})s)) )".format(region_names[n-1], region_names[n], None)
+    else: code += "  | ((M > %(M_switch_{0}{1})s) & (M < %(M_switch_{1}{2})s) & (MINTREE('mu+'==ABSID,PROBNNmu) > %(MuProbNNmu_{1})s))".format(region_names[n-1], region_names[n],region_names[n+1])
+  code += ("& (CHILD(PT,1)*CHILD(PT,2) > %(MuPTPROD)s)"
+           "& (PT > %(PT)s)"
+           "& (HASVERTEX)"
+           "& (BPVVDCHI2 < %(FDChi2)s)")
+  code = code%conf
+
+  ## TOS on HLT2 on-demand
+  if 'TOS_HLT2' in conf:
+    code += '& (TOS("%(TOS_HLT2)s", "Hlt2TriggerTisTos"))'%conf
+
+  return SimpleSelection( 'PrmptDiMuonHighMass', FilterDesktop, sharedDiMuon, Code=code)
+
+def QuadMuonNoIP( conf, sharedDiMuon ):
+  cc = "APT > %(PT)s"%conf
+  mc = "(HASVERTEX) & (VFASPF(VCHI2) < %(VChi2)s)"%conf
+
+  ## TOS on HLT2 on-demand
+  if 'TOS_HLT2' in conf:
+    mc += '& (TOS("%(TOS_HLT2)s", "Hlt2TriggerTisTos"))'%conf
+
+  return SimpleSelection( 'QuadMuonNoIP', CombineParticles, sharedDiMuon,
+    DecayDescriptor = 'B0 -> KS0 KS0',
+    CombinationCut  = cc,
+    MotherCut       = mc,
+  )
+
+#===============================================================================
+
+class ExoticaConf(LineBuilder):
+
+  __configuration_keys__ = default_config['CONFIG'].keys()  # Legacy field
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+
+    ## Inject 'Common' into all other confs
+    d = config.pop('Common')
+    for key in config:
+      config[key].update(d)
+
+    ## Shared.
+    sharedRHNu = [SharedRHNu(config['SharedRHNu'])]
+    sharedDiE = [SharedDiENoIP(config['SharedDiENoIP'])]
+    sharedDiMuon = [SharedDiMuonNoIP(config['SharedDiMuonNoIP'])]
+
+    ## Register lines
+    prescales = config['Prescales']
+
+    self.registerLine(StrippingLine( name+'DisplPhiPhiLine',
+      selection = DisplPhiPhi(config['DisplPhiPhi']),
+      prescale  = prescales['DisplPhiPhi'],
+    ))
+
+    self.registerLine(StrippingLine( name+'RHNuLine',
+      selection = RHNu(config['RHNu'], 'RHNu', sharedRHNu),
+      prescale  = prescales['RHNu'],
+    ))
+
+    self.registerLine(StrippingLine( name+'RHNuHighMassLine',
+      selection = RHNu(config['RHNuHighMass'], 'RHNuHighMass', sharedRHNu),
+      prescale  = prescales['RHNuHighMass'],
+    ))
+
+    self.registerLine(StrippingLine( name+'DiRHNuLine',
+      selection = DiRHNu(config['DiRHNu'], sharedRHNu),
+      prescale  = prescales['DiRHNu'],
+    ))
+
+    self.registerLine(StrippingLine( name+'DisplDiELine',
+      selection = DisplDiE(config['DisplDiE'], 'DisplDiE', sharedDiE),
+      prescale  = prescales['DisplDiE'],
+    ))
+
+    self.registerLine(StrippingLine( name+'DisplDiEHighMassLine',
+      selection = DisplDiE(config['DisplDiEHighMass'],
+                           'DisplDiEHighMass', sharedDiE),
+      prescale  = prescales['DisplDiEHighMass'],
+    ))
+
+    self.registerLine(StrippingLine( name+'DisplDiMuonLine',
+      selection = DisplDiMuon(config['DisplDiMuon'],
+                              'DisplDiMuon', sharedDiMuon),
+      prescale  = prescales['DisplDiMuon'],
+    ))
+
+    self.registerLine(StrippingLine( name+'DisplDiMuonHighMassLine',
+      selection = DisplDiMuon(config['DisplDiMuonHighMass'],
+                              'DisplDiMuonHighMass', sharedDiMuon),
+      prescale  = prescales['DisplDiMuonHighMass'],
+    ))
+
+    self.registerLine(StrippingLine( name+'DisplDiMuonNoPointLine',
+      selection = DisplDiMuonNoPoint(config['DisplDiMuonNoPoint'],
+                                     'DisplDiMuonNoPoint', sharedDiMuon),
+      prescale  = prescales['DisplDiMuonNoPoint'],
+    ))
+
+    self.registerLine(StrippingLine( name+'DisplDiMuonNoPointRLine',
+      selection = DisplDiMuonNoPoint(config['DisplDiMuonNoPointR'],
+                                     'DisplDiMuonNoPointR', sharedDiMuon),
+      prescale  = prescales['DisplDiMuonNoPointR'],
+    ))
+
+    self.registerLine(StrippingLine( name+'PrmptDiMuonHighMassLine',
+      selection = PrmptDiMuonHighMass(config['PrmptDiMuonHighMass'],
+                                      sharedDiMuon),
+      prescale  = prescales['PrmptDiMuonHighMass'],
+    ))
+
+    self.registerLine(StrippingLine( name+'QuadMuonNoIPLine',
+      selection = QuadMuonNoIP(config['QuadMuonNoIP'], sharedDiMuon),
+      prescale  = prescales['QuadMuonNoIP'],
+    ))
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingFullDiJets.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingFullDiJets.py
new file mode 100644
index 000000000..b23d9bb1f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingFullDiJets.py
@@ -0,0 +1,84 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 Gaudi.Configuration import *
+from Configurables       import FilterDesktop, CombineParticles, LoKi__VertexFitter
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import  StdJets
+from CommonParticles.Utils import *
+from Configurables import FilterJet
+from GaudiKernel.SystemOfUnits import GeV
+
+__author__  = "Xabier Cid Vidal", "Cedric Potterat", "William Barter"
+__all__     = "default_config", "FullDiJetsConf"
+
+## if you want to prescale this line, please contact the authors before!
+
+default_config = {
+  'NAME'        : 'FullDiJets',
+  'BUILDERTYPE' : 'FullDiJetsConf',
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : [ 'EW' ],
+  'CONFIG': {
+    'FullDiJetsLine_Prescale'   : 0.05, 
+    'FullDiJetsLine_Postscale'  : 1.0,
+    'RequiredRawEvents'         : [],
+    'min_jet_pT'                : 20. * GeV,
+    'TOS_HLT2'                  : None, # 'Hlt2JetsDiJetDecision'
+  }
+}
+
+
+class FullDiJetsConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+        
+    sel_FullDiJets  = self.makeJetGroup(name + 'FullDiJets', config )
+        
+    self.registerLine(StrippingLine( name + 'Line',
+      prescale  = config[ 'FullDiJetsLine_Prescale' ],
+      postscale = config[ 'FullDiJetsLine_Postscale' ],
+      checkPV   = False,
+      selection = sel_FullDiJets,
+      RequiredRawEvents = config['RequiredRawEvents'],
+    ))
+
+  def makeJetGroup(self, name, config):
+
+    JetGroup = CombineParticles("Combine"+name)
+    JetGroup.DecayDescriptor = "H_10 -> CELLjet CELLjet"    
+      
+    JetGroup.ParticleCombiners = {"" : "LoKi::VertexFitter"}
+    JetGroup.addTool( LoKi__VertexFitter, name="LoKi::VertexFitter" )
+    vfitter = getattr ( JetGroup , "LoKi::VertexFitter" )
+    vfitter.Jets = ""
+      
+    JetGroup.DaughtersCuts = { "CELLjet" :" (PT > %(min_jet_pT)s ) " %config }   
+    JetGroup.CombinationCut = "AALLSAMEBPV(-1,-1,-1) "
+    JetGroup.MotherCut = "ALL"
+    
+    ## TOS_HLT2 on-demand
+    hlt = config['TOS_HLT2']
+    if hlt:
+      JetGroup.MotherCut += '& (TOS("%s", "Hlt2TriggerTisTos"))'%hlt
+
+    requiredSelections = [DataOnDemand(Location = "Phys/StdJets/Particles")]
+      
+    return Selection ("Sel"+name,
+                      Algorithm = JetGroup,
+                      RequiredSelections = requiredSelections)
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingGluinos.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingGluinos.py
new file mode 100644
index 000000000..10e148db0
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingGluinos.py
@@ -0,0 +1,119 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Xabier Cid Vidal', 'Carlos Vazquez Sierra', 'Igor Kostiuk']
+__date__   = '27/01/2019'
+
+__all__ = ('GluinosJetsConf', 'default_config')
+
+from Gaudi.Configuration import *
+from StandardParticles import StdJets
+from PhysSelPython.Wrappers import FilterSelection, PassThroughSelection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import GeV
+from LoKiPhys.functions import SOURCE, SIZE
+from CommonParticles.Utils import *
+from Configurables import FilterDesktop, JetVertexAlg
+
+default_config = {
+    'NAME'              : 'GluinosJets',
+    'WGs'               : ['QEE'],
+    'BUILDERTYPE'       : 'GluinosJetsConf',
+    'CONFIG'            : { 'JET_PT'                   : 20*GeV 
+                          , 'MIN_IPCHI2'               : 25
+                          , 'DG_NDISPLONG'             : 1
+                          , 'HF_NDISPLONG'             : 3 
+                          , 'HF_GDAUGS'                : 5
+                          , 'DisplacedGluinoPrescale'  : 1.
+                          , 'SixLightPrescale'         : 1.
+                          , 'TwoLightOneHFPrescale'    : 1.
+                          , 'RawBanks'                 : ['Calo', 'Trigger', 'Velo', 'Tracker']
+                          },
+    'STREAMS'             : [ 'BhadronCompleteEvent' ]             
+    }
+
+### Lines stored in this file:  
+# StrippingGluinosJetsSixJetsLine
+# StrippingGluinosJetsDisplacedGluinoLine
+# StrippingGluinosJetsThreeJetsOneHFLine
+
+class GluinosJetsConf(LineBuilder) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+        ### Define the jet cuts:
+
+        _displacedGluinoCuts = ("(PT > %(JET_PT)s) "
+                                "& (NINTREE(ISBASIC & HASTRACK & ISLONG & (%(MIN_IPCHI2)s < MIPCHI2DV(PRIMARY))) > %(DG_NDISPLONG)s)") % self.config
+
+        _heavyFlavourCuts  = ("(PT > %(JET_PT)s) "
+                              "& (NINTREE(ISBASIC & HASTRACK & ISLONG & (%(MIN_IPCHI2)s < MIPCHI2DV(PRIMARY))) > %(HF_NDISPLONG)s) "
+                              "& (SUMTREE( ('D0'==ABSID) & (0.9*mm < abs(VFASPF(VX_BEAMSPOTRHO(6*mm)))), NDAUGS ) >= %(HF_GDAUGS)s)") % self.config
+
+        ## Add daughter vertices to jets:
+
+        jetVertexAlg  = JetVertexAlg( self.name + "jetVertexAlg", 
+                                      Input=StdJets.outputLocation(), Output="Phys/StdJetsVtxAlgGluinos/Particles" )
+        _StdJetVtxAlg = updateDoD( jetVertexAlg, name="StdJetsVtxAlgGluinos" )
+
+        ## Create the containers:
+
+        displacedGluinoSel     = FilterDesktop( self.name + "displacedGluino", Inputs = [_StdJetVtxAlg.keys()[0]], Code = _displacedGluinoCuts )
+        self.displacedGluinoLoc = updateDoD ( displacedGluinoSel )
+
+        heavyFlavourJetsSel        = FilterDesktop( self.name + "heavyFlavourJets", Inputs = [_StdJetVtxAlg.keys()[0]], Code = _heavyFlavourCuts )
+        self.heavyFlavourJetsLoc   = updateDoD ( heavyFlavourJetsSel )
+
+        ### Create the container for the candidates to be saved:
+
+        self.looseJets = FilterSelection( self.name + "looseJets", StdJets, Code = "(PT > %(JET_PT)s)" % self.config )
+
+        ### Six light jets line:
+
+        sixJetSelection = self.MultiJetSelection( self.name + "SixJetSelection", self.looseJets, 'SixJets')
+        sixJetLine      = StrippingLine( self.name + "SixJetsLine", algos = [sixJetSelection],
+                                         RequiredRawEvents = self.config['RawBanks'], prescale = self.config['SixLightPrescale'] )
+        self.registerLine(sixJetLine)
+
+        ### Displaced gluino into three light jets:
+
+        dGluinoSelection = self.MultiJetSelection( self.name + "DisplacedGluinoSelection", self.looseJets, 'DisplacedGluino')
+        dGluinoLine      = StrippingLine( self.name + "DisplacedGluinoLine", algos = [dGluinoSelection],
+                                         RequiredRawEvents = self.config['RawBanks'], prescale = self.config['DisplacedGluinoPrescale'] )
+        self.registerLine(dGluinoLine)
+
+        ### Three jets from where at least one heavy flavour jet:
+
+        TwoLightOneHFSelection = self.MultiJetSelection( self.name + "TwoLightOneHFSelection", self.looseJets, 'TwoLightOneHF')
+        TwoLightOneHFLine      = StrippingLine( self.name + "ThreeJetsOneHFLine", algos = [TwoLightOneHFSelection],
+                                                RequiredRawEvents = self.config['RawBanks'], prescale = self.config['TwoLightOneHFPrescale'] )
+        self.registerLine(TwoLightOneHFLine)
+
+    def MultiJetSelection (self, name, input, typeCombination):
+        if typeCombination == "SixJets":
+          _Preambulo = [ "lightJets = SOURCE ( '%s', ALL ) >> SIZE" % input.outputLocation() ]
+          _Code      = "(lightJets >= 6)"
+        if typeCombination == "DisplacedGluino":
+          _Preambulo = [ "DGluinoJets  = SOURCE ( '%s', ALL ) >> SIZE" % self.displacedGluinoLoc.keys()[0] ]
+          _Code      = "(DGluinoJets >= 3)"
+        if typeCombination == "TwoLightOneHF":
+          _Preambulo = [ "HFJets       = SOURCE ( '%s', ALL ) >> SIZE" % self.heavyFlavourJetsLoc.keys()[0],
+                         "lightJets = SOURCE ( '%s', ALL ) >> SIZE" % input.outputLocation() ]
+          _Code      = "(lightJets >= 3) & (HFJets >= 1)"
+
+        from GaudiConfUtils.ConfigurableGenerators import LoKi__VoidFilter as _VFilter_
+        return PassThroughSelection (name,
+                                     Algorithm         = _VFilter_(Code = _Code , Preambulo = _Preambulo) ,
+                                     RequiredSelection = input )
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingH24Mu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingH24Mu.py
new file mode 100644
index 000000000..1d7579611
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingH24Mu.py
@@ -0,0 +1,344 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of h-->MuMuMuMu stripping selection
+
+Exported symbols (use python help!):
+   - H24MuConf
+
+Based on Bsmumu stripping lines
+'''
+
+__author__ = ['Xabier Cid Vidal']
+__date__ = '11/22/2013'
+
+__all__ = ('H24MuConf',
+           'default_name',
+           'default_config'
+           )
+
+from Gaudi.Configuration import *
+from Configurables import CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+
+default_name = 'H24Mu'
+
+#### This is the dictionary of all tunable cuts ########
+default_config={
+  'NAME'        : default_name,
+  'BUILDERTYPE' : 'H24MuConf',
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : [ 'Leptonic' ],
+  'CONFIG': {
+    'DefaultPostscale'       : 1,
+    'PromptLinePrescale'     : 1,
+    'SimpleLinePrescale'     : 1,
+    'DetachedLinePrescale'   : 1,
+    'LooseLinePrescale'      : 0.01,
+
+    'RequiredRawEvents'      : ['Muon'],
+    'MDSTFlag'               : False,
+              
+    'MuTrackChi2DoF'         : 3,
+    'MupTprompt'             : 500 * MeV,  # 375 MeV
+    'MupTdetached'           : 250 * MeV,
+    'MuGhostProb'            : 0.4,
+    'MuMaxIPchi2'            : 3,
+    'MuMinIPchi2'            : 1,
+    'MuPIDdll'               : -3, # muon combDLL
+    'MuNShared'              : 3, # muon NShared
+              
+    'A1maxMass'              : 2000 * MeV,
+    'A1Doca'                 : 0.2 * mm,
+    'A1DocaTight'            : 0.1 * mm,
+    'A1Vchi2'                : 7.5,
+    'A1Vchi2Tight'           : 1,
+    'A1Dira'                 : 0,
+    'A1maxIPchi2'            : 25,
+    'A1FDChi2'               : 4,
+              
+    'HmaxDOCA'               : 0.75 * mm,
+    'HmaxDOCATight'          : 0.25 * mm,
+    'HVchi2'                 : 10,
+    'HVchi2Tight'            : 2,
+    'HpT'                    : 1200 * MeV,
+              
+    'MuTrackChi2DoF_loose'   : 10,
+    'MupT_loose'             : 0 * MeV,
+    'MuMaxIPchi2_loose'      : 1000000,
+    'A1maxMass_loose'        : 5000 * MeV,
+    'A1Doca_loose'           : 10 * mm,
+    'A1Vchi2_loose'          : 20,
+    'HmaxDOCA_loose'         : 1000000 * mm,
+    'HpT_loose'              : 300 * MeV,
+    'HVchi2_loose'           : 50,          
+  },
+}
+
+
+class H24MuConf(LineBuilder) :
+    """
+    Builder of:
+     - H-> mumumumu stripping lines: prompt, detached and control,
+
+    Usage:
+    >>> config = { .... }
+    >>> Conf = H24MuLinesConf('Test',config)
+    >>> myLines = Conf.lines
+    >>> for line in myLines:
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+
+    Exports as instance data members:
+    selPrompt     : nominal prompt H24mu stripping line
+    selSimple     : nominal simple H24mu stripping line (no pT, IP cuts)
+    selDetached   : nominal detached H24mu stripping line
+    selLoose      : loose H24mu stripping line to understand systematics (prescaled)
+    promptLine    : Stripping line made from selPrompt
+    simpleLine    : Stripping line made from selSimple
+    detachedLine  : Stripping line made from selDetached
+    looseLine     : Stripping line made from selLoose
+    lines         : list of lines:  [ promptLine, simpleLine, detachedLine, looseLine ]
+    
+    """
+ 
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, 
+                 name = default_name,
+                 config = None,
+                 debug_cuts = 0):
+                 
+
+        LineBuilder.__init__(self, name, config)
+
+        prompt_name=name+'Prompt'
+        simple_name=name+'Simple'
+        detached_name=name+'Detached'
+        loose_name=name+'Loose'
+
+        self.config_dict = config
+        self.debug_cuts = debug_cuts
+        self.selPrompt = self.makeDefault(prompt_name,type = 0)
+        self.selSimple = self.makeDefault(simple_name,type = 1)
+        self.selDetached = self.makeDefault(detached_name,type = 2)
+        self.selLoose = self.makeDefault(loose_name,type = 3)
+
+        ExtraInfoTools = [{'Type' : 'ConeVariables',
+                           'ConeNumber' : 1,
+                           'ConeAngle' : 1.0,
+                           'Variables' : ['angle', 'mult','p','pt',
+                                          'ptasy','pasy']},
+                          {'Type' : 'ConeVariables', 
+                           'ConeNumber' : 2, 
+                           'ConeAngle' : 1.5, 
+                           'Variables' : ['angle', 'mult','p','pt',
+                                          'ptasy','pasy']},
+                          {'Type' : 'ConeVariables',
+                           'ConeNumber' : 3,
+                           'ConeAngle' : 2.0,
+                           'Variables' : ['angle', 'mult','p','pt',
+                                          'ptasy','pasy']},
+                          
+                          {'Type' : 'VertexIsolation'}]
+
+        ExtraInfoDaughters = {"prompt"  : [getattr(self,"A1"+prompt_name)],
+                              "simple"  : [getattr(self,"A1"+simple_name)],
+                              "detached": [getattr(self,"A1"+detached_name)],
+                              "loose"   : [getattr(self,"A1"+loose_name)]}
+        
+        self.promptLine = StrippingLine(prompt_name+"Line",
+                                        prescale = config['PromptLinePrescale'],
+                                        postscale = config['DefaultPostscale'],
+                                        selection = self.selPrompt,
+                                        ExtraInfoTools = ExtraInfoTools,
+                                        ExtraInfoSelections = ExtraInfoDaughters["prompt"],
+                                        MDSTFlag = config['MDSTFlag'],
+                                        RequiredRawEvents = config['RequiredRawEvents'],
+                                        )
+
+        self.simpleLine = StrippingLine(simple_name+"Line",
+                                        prescale = config['SimpleLinePrescale'],
+                                        postscale = config['DefaultPostscale'],
+                                        selection = self.selSimple,
+                                        ExtraInfoTools = ExtraInfoTools,
+                                        ExtraInfoSelections = ExtraInfoDaughters["simple"],
+                                        MDSTFlag = config['MDSTFlag'],
+                                        RequiredRawEvents = config['RequiredRawEvents'],
+                                        )
+
+
+        self.detachedLine = StrippingLine(detached_name+"Line",
+                                          prescale = config['DetachedLinePrescale'],
+                                          postscale = config['DefaultPostscale'],
+                                          selection = self.selDetached,
+                                          ExtraInfoTools = ExtraInfoTools,
+                                          ExtraInfoSelections = ExtraInfoDaughters["detached"],
+                                          MDSTFlag = config['MDSTFlag'],
+                                          RequiredRawEvents = config['RequiredRawEvents'],
+                                          )
+        
+## 2015-11-10 ckhurewa: Instantiated but unused Line raises warning...
+#         ## no need for mdst or raw data in the loose line...
+#         self.looseLine = StrippingLine(loose_name+"Line",
+#                                        prescale = config['LooseLinePrescale'],
+#                                        postscale = config['DefaultPostscale'],
+# #                                       algos = [ self.selLoose ],
+#                                        selection = self.selLoose,
+#                                        ExtraInfoTools = ExtraInfoTools,
+#                                        ExtraInfoSelections = ExtraInfoDaughters["loose"],
+#                                        )
+
+        self.registerLine(self.promptLine)
+        self.registerLine(self.simpleLine)
+        self.registerLine(self.detachedLine)
+        #self.registerLine(self.looseLine)
+
+
+
+    def makeA1(self,name,type) :
+        """
+        Prompt A1 selection
+        Arguments:
+        name        : name of the Selection.
+        type        : 0 (prompt), 1 (simple), 2 (detached), 3 (loose)
+        """
+
+        A1 = CombineParticles("Combine"+name)
+        A1.DecayDescriptor = "KS0 -> mu+ mu-"
+        # prompt
+        if type==0:
+            A1.DaughtersCuts = { "mu+" : "(TRCHI2DOF < %(MuTrackChi2DoF)s ) "\
+                                 "& ( TRGHOSTPROB < %(MuGhostProb)s ) " \
+                                 "& (PT > %(MupTprompt)s ) "\
+                                 "& (MIPCHI2DV(PRIMARY)< %(MuMaxIPchi2)s )" %self.config_dict }
+            
+            A1.CombinationCut = "(AM < %(A1maxMass)s ) "\
+                                 "& (AMAXDOCA('')<%(A1Doca)s )" %self.config_dict
+            
+            A1.MotherCut = "(VFASPF(VCHI2)< %(A1Vchi2)s ) "\
+                           "& (MM < %(A1maxMass)s )" %self.config_dict
+
+        # simple: tighten DOCA and Vchi2, tighten muID cut
+        elif type==1:
+            A1.DaughtersCuts = { "mu+" : "(TRCHI2DOF < %(MuTrackChi2DoF)s ) "\
+                                         "& ( TRGHOSTPROB < %(MuGhostProb)s ) " \
+                                         "& (PIDmu > %(MuPIDdll)s )  "\
+                                         "& (PPINFO(LHCb.ProtoParticle.MuonNShared,99999)<= %(MuNShared)s ) " %self.config_dict }
+            A1.CombinationCut = "(AM < %(A1maxMass)s  ) "\
+                                 "& (AMAXDOCA('')<%(A1DocaTight)s )" %self.config_dict
+            
+            A1.MotherCut = "(VFASPF(VCHI2)< %(A1Vchi2Tight)s ) "\
+                           "& (MM < %(A1maxMass)s )" %self.config_dict
+
+
+        #detached
+        elif type==2:
+
+            #A1.addTool( OfflineVertexFitter )
+            #A1.ParticleCombiners.update( { "" : "OfflineVertexFitter"} )
+            #A1.ReFitPVs = True
+
+            A1.DaughtersCuts = { "mu+" : "(TRCHI2DOF < %(MuTrackChi2DoF)s ) "\
+                                 "& (PT > %(MupTdetached)s ) "\
+                                 "& ( TRGHOSTPROB < %(MuGhostProb)s ) " \
+                                 "& (MIPCHI2DV(PRIMARY)> %(MuMinIPchi2)s )" %self.config_dict }
+            
+            A1.CombinationCut = "(AM < %(A1maxMass)s  ) "\
+                                 "& (AMAXDOCA('')<%(A1Doca)s )" %self.config_dict
+            
+            A1.MotherCut = "(VFASPF(VCHI2)< %(A1Vchi2)s ) "\
+                           "& (MM < %(A1maxMass)s )" \
+                           "& (BPVDIRA > %(A1Dira)s )" \
+                           "& (BPVIPCHI2() < %(A1maxIPchi2)s )" \
+                           "& (BPVVDCHI2 > %(A1FDChi2)s )" %self.config_dict
+
+        #loose
+        else:
+            
+            A1.DaughtersCuts = { "mu+" : "(TRCHI2DOF < %(MuTrackChi2DoF_loose)s ) "\
+                                 "& (PT > %(MupT_loose)s  ) "\
+                                 "& (MIPCHI2DV(PRIMARY)< %(MuMaxIPchi2_loose)s )" %self.config_dict }
+
+            A1.CombinationCut = "(AM < %(A1maxMass_loose)s  ) "\
+                                 "& (AMAXDOCA('')<%(A1Doca_loose)s )" %self.config_dict
+            
+            A1.MotherCut = "(VFASPF(VCHI2)< %(A1Vchi2_loose)s ) "\
+                           "& (MM < %(A1maxMass_loose)s )" %self.config_dict
+
+            
+            
+        _stdAllLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+
+        if self.debug_cuts:
+            print "DEBUG - A1 cuts for type", type
+            print A1.DaughtersCuts
+            print A1.MotherCut
+            print A1.CombinationCut
+
+
+        
+        return Selection ("Sel"+name,
+                          Algorithm = A1,
+                          RequiredSelections = [ _stdAllLooseMuons ])
+
+
+
+
+    def makeDefault(self,name,type=0) :
+        """
+        H-->A0(mumu)A0(mumu) selection.
+        Arguments:
+        name        : name of the Selection.
+        type        : 0 (prompt), 1 (simple), 2 (detached), 3 (loose)
+        """
+        
+        
+        SelA1 = self.makeA1("A1"+name,type)
+        setattr(self,"A1"+name,SelA1)
+        
+        H25 = CombineParticles("Combine_H25"+name)
+        H25.DecayDescriptor = "H_10 -> KS0 KS0"
+        H25.DaughtersCuts = {}
+
+        # simple: do not cut in pT, cut tighter in DOCA, VCHI2
+        if type==1:
+            H25.CombinationCut = "(AMAXDOCA('')< %(HmaxDOCATight)s )" %self.config_dict
+            H25.MotherCut = "(VFASPF(VCHI2)< %(HVchi2Tight)s )" %self.config_dict
+        
+        # loose: loosen all cuts
+        elif type==3:
+            H25.CombinationCut = "(AMAXDOCA('')< %(HmaxDOCA_loose)s )" %self.config_dict
+            H25.MotherCut = "(PT > %(HpT_loose)s ) "\
+                            "& (VFASPF(VCHI2)< %(HVchi2_loose)s ) " %self.config_dict
+
+        # prompt or detached
+        else:
+            H25.CombinationCut = "(AMAXDOCA('')< %(HmaxDOCA)s )" %self.config_dict
+            H25.MotherCut = "(PT > %(HpT)s ) "\
+                            "& (VFASPF(VCHI2)< %(HVchi2)s ) " %self.config_dict
+
+        if self.debug_cuts:
+            print "DEBUG - H cuts for type", type
+            print H25.MotherCut
+            print H25.CombinationCut
+        
+        return Selection( "SelH4mu"+name,
+                          Algorithm = H25,
+                          RequiredSelections=[SelA1] )
+    
+
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingHighPtMuons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingHighPtMuons.py
new file mode 100644
index 000000000..e24302811
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingHighPtMuons.py
@@ -0,0 +1,99 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+## Stripping lines for high pT muons calibration:
+# Tag and probe lines for Z->MuMu and Y->MuMu modes:
+# |!StrippingHighPtMuonsZ02MuMuNoPIDsLine                       |  0.0190|        19|  1.105|  15.969|
+# |!StrippingHighPtMuonsY2MuMuNoPIDsLine                        |  0.4520|       452|  1.069|   0.230|
+# |!StrippingHighPtMuonsZ02MuMuNoPIDsLine_TIMING                |  0.0190|        19|  1.105|   0.209|
+# |!StrippingHighPtMuonsY2MuMuNoPIDsLine_TIMING                 |  0.4520|       452|  1.069|   0.213|
+
+__author__ = ['E. Dall Occo', 'C. Vazquez Sierra', 'M. Borsato']
+
+__all__ = (
+  'HighPtMuonsConf',
+  'default_config',
+)
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsMuons
+from GaudiKernel.SystemOfUnits import GeV
+
+default_config = {
+  'NAME'               : 'HighPtMuons',
+  'BUILDERTYPE'        : 'HighPtMuonsConf',
+  'WGs'                : ['QEE'],
+  'STREAMS'            : {'EW': ['StrippingHighPtMuonsZ02MuMuNoPIDsLine'],
+                          'Leptonic': ['StrippingHighPtMuonsY2MuMuNoPIDsLine'] },
+  'CONFIG'             : { 
+    'Prescale'         : 1.0,
+    'Postscale'        : 1.0,
+    'pT'               : 3.   * GeV,
+    'MZ0'              : 40.  * GeV,
+    'MminY'            : 8.5  * GeV,
+    'MmaxY'            : 11   * GeV,
+    'TrackChi2Mu'      : 5,
+    'VtxChi2MuMu'      : 12,
+    'YPIDcut'          : 0.5, 
+    'RawEvents'        : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+  },
+}
+
+class HighPtMuonsConf( LineBuilder ) :
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+    LineBuilder.__init__( self, name, config )
+
+    self.registerLine(StrippingLine( name + 'Z02MuMuNoPIDsLine',
+      prescale          = config[ 'Prescale'  ],
+      postscale         = config[ 'Postscale' ],
+      RequiredRawEvents = config[ 'RawEvents' ],
+      checkPV           = False,
+      selection         = makeCombinationZ0(name+'Z02MuMuNoPIDs', config),
+    ))
+
+    self.registerLine(StrippingLine( name + 'Y2MuMuNoPIDsLine',
+      prescale          = config[ 'Prescale'  ],
+      postscale         = config[ 'Postscale' ],
+      checkPV           = False,
+      selection         = makeCombinationY(name+'Y2MuMuNoPIDs', config),
+    ))
+
+def makeCombinationZ0( name, config ):
+  dcut = '(PT>%(pT)s)'%config
+  mcut = '(MM>%(MZ0)s)'%config
+  
+  return SimpleSelection(name, CombineParticles, [StdAllNoPIDsMuons],
+    DecayDescriptor    = 'Z0 -> mu+ mu-',
+    DaughtersCuts      = { 'mu+' : dcut, 'mu-' : dcut },
+    MotherCut          = mcut + ' & ((CHILDCUT(ISMUON,1))|(CHILDCUT(ISMUON,2)))',
+    WriteP2PVRelations = False
+  )
+
+def makeCombinationY( name, config ):
+  dcut    = '(TRCHI2DOF<%(TrackChi2Mu)s) & (PT>%(pT)s)'%config
+  mMincut = '(MM>%(MminY)s)'%config
+  mMaxcut = '(MM<%(MmaxY)s)'%config
+  vtxChi2 = '(CHI2VXNDF<%(VtxChi2MuMu)s)'%config
+  mcut    = vtxChi2 + ' & ' + mMincut + ' & ' + mMaxcut
+  pidcut  = '(PROBNNmu>%(YPIDcut)s)'%config
+
+  return SimpleSelection(name, CombineParticles, [StdAllNoPIDsMuons],
+    DecayDescriptor    = 'Upsilon(1S) -> mu+ mu-',
+    DaughtersCuts      = { 'mu+' : dcut, 'mu-' : dcut },
+    MotherCut          = mcut + ' & ((CHILDCUT('+pidcut+',1))|(CHILDCUT('+pidcut+',2)))',
+    WriteP2PVRelations = False
+  )
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingHltQEE.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingHltQEE.py
new file mode 100644
index 000000000..27b8cf9a5
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingHltQEE.py
@@ -0,0 +1,146 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+
+Stripping lines which pass through the HLT decisions.
+
+Hlt2Jets by P.Ilten, M.Williams
+Hlt2Exotica by P.Ilten, M.Williams
+
+The stripping line doesn't create any candidate, just filter event
+passing given HLT decision. This is suitable in case the
+reconstruction strategy is not yet mature and triggered-event is
+suitable as a starting point.  Only the HLT with small rate are
+allowed to be placed here.
+
+"""
+
+__author__  = 'Chitsanu Khurewathanakul'
+__date__    = '08/04/2016'
+__version__ = 1.0
+__all__     = 'default_config', 'HltQEEConf'
+
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+default_config = {
+  'HltQEEJets': {
+    'BUILDERTYPE' : 'HltQEEConf',
+    'WGs'         : ['QEE'],
+    'STREAMS'     : ['BhadronCompleteEvent'],
+    'CONFIG'      : {
+      'common': {
+        'checkPV'           : False,
+        'RequiredRawEvents' : ['Calo'],
+      },
+      'lines': {
+        'DiJetMuMu': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsDiJetMuMuDecision')",
+        },
+        'DiJetMuMuLowPt': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsDiJetMuMuLowPtDecision')",
+        },
+        'DiJetSV': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsDiJetSVDecision')",
+        },
+        'DiJetSVHighPt': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsDiJetSVHighPtDecision')",
+        },
+        'DiJetSVLowPt': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsDiJetSVLowPtDecision')",
+        },
+        'DiJetSVMu': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsDiJetSVMuDecision')",
+        },
+        'DiJetSVMuLowPt': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsDiJetSVMuLowPtDecision')",
+        },
+        'DiJetSVSV': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsDiJetSVSVDecision')",
+        },
+        'DiJetSVSVLowPt': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsDiJetSVSVLowPtDecision')",
+        },
+        'JetLowPt': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsJetLowPtDecision')",
+        },
+        'JetSV': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2JetsJetSVDecision')",
+        },
+      },
+    },
+  },
+  'HltQEEExotica': {
+    'BUILDERTYPE' : 'HltQEEConf',
+    'WGs'         : ['QEE'],
+    'STREAMS'     : ['EW'],
+    'CONFIG'      : {
+      'common': {
+        'checkPV': False,
+      },
+      'lines': {
+        'DisplPhiPhi': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2ExoticaDisplPhiPhiDecision')",
+        },
+        'QuadMuonNoIP': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2ExoticaQuadMuonNoIPDecision')",
+        },
+        'DisplDiMuon': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2ExoticaDisplDiMuonDecision')",
+        },
+        'DisplDiMuonNoPoint': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2ExoticaDisplDiMuonNoPointDecision')",
+        },
+        'DisplDiE': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2ExoticaDisplDiEDecision')",
+        },
+        'RHNu': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2ExoticaRHNuDecision')",
+        },
+        'LFVPrmpt': {
+          'prescale': 1.0,
+          'HLT2'    : "HLT_PASS('Hlt2ExoticaLFVPrmptDecision')",
+        },
+      },
+    },
+  },
+}
+
+
+class HltQEEConf(LineBuilder):
+  __configuration_keys__ = ('common','lines')
+
+  def __init__(self, name, config) :
+    LineBuilder.__init__(self, name, config)
+    conf_common = config['common']
+    for linename, conf_override in config['lines'].iteritems():
+      ## Make a copy, based on common, then update with override on top.
+      conf = dict(conf_common)
+      conf.update(conf_override)
+      self.registerLine(StrippingLine( name+linename+'Line', **conf ))
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingInclQQ.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingInclQQ.py
new file mode 100644
index 000000000..ea9c42f61
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingInclQQ.py
@@ -0,0 +1,86 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+"""
+Stripping selection for inclusive b-jets
+
+"""
+__author__  = ['Marcin Kucharczyk']
+__date__    = '30/01/2012'
+__version__ = '$Revision: 1.0$'
+
+from PhysSelPython.Wrappers import Selection
+from StandardParticles import StdAllNoPIDsPions
+from StandardParticles import StdLooseAllPhotons
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import bJetSeeds
+
+__all__ = (
+  'InclQQLinesConf',
+  'default_config',
+)
+
+
+default_config = {
+    'NAME'        : 'InclQQ',
+    'BUILDERTYPE' : 'InclQQConf',
+    'WGs'         : [ 'QEE' ],
+    'STREAMS'     : [ 'EW'  ],
+    'CONFIG'      : {
+        'NrPVsCut'      : 1,
+        'NrSeedsCut'    : 2,
+        'TrkChi2Cut'    : 3.0,
+        'PrtMomCut'     : 2.0,
+        'PrtPtCut'      : 0.6,
+        'PrtIPSCut'     : 2.5,
+        'DZSVPVCut'     : 1.0,
+        'SumMomSVCut'   : 1.0,
+        'VtxChi2Cut'    : 20.0,
+        'scale'         : 0.05,
+        #
+        'HLT2'          : "HLT_PASS_RE('Hlt2.*Topo.*Decision')",
+        'VertexFitter'  : 'LoKi::VertexFitter:PUBLIC',
+    },
+}
+
+class InclQQConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__ = config
+        self.inclbJetLine = self._makeInclbJetLine(name)
+        self.registerLine(self.inclbJetLine)
+
+    def _makeInclbJetSel(self, name) :
+        selectionAlg = bJetSeeds(
+            NrPVs         = self.__confdict__['NrPVsCut'],
+            NrSeeds       = self.__confdict__['NrSeedsCut'],
+            TrkChi2       = self.__confdict__['TrkChi2Cut'],
+            PrtMom        = self.__confdict__['PrtMomCut'],
+            PrtPt         = self.__confdict__['PrtPtCut'],
+            PrtIPS        = self.__confdict__['PrtIPSCut'],
+            DZSVPV        = self.__confdict__['DZSVPVCut'],
+            SumMomSV      = self.__confdict__['SumMomSVCut'],
+            VtxChi2       = self.__confdict__['VtxChi2Cut'],
+            VertexFitter  = self.__confdict__['VertexFitter'],
+        )
+        return Selection("Sel" + name, Algorithm = selectionAlg,
+                         RequiredSelections = [StdAllNoPIDsPions, StdLooseAllPhotons])
+
+    def _makeInclbJetLine(self, name):
+        return StrippingLine(name ,
+                             HLT2 = self.__confdict__['HLT2'],
+                             prescale = self.__confdict__['scale'],
+                             #RequiredRawEvents = ["Calo"],
+                             selection = self._makeInclbJetSel(name))
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLFVExotica.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLFVExotica.py
new file mode 100755
index 000000000..462d6574e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLFVExotica.py
@@ -0,0 +1,608 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+#############################################################
+#      Stripping lines for LFV direct searches              #
+# Author: X/ Cid Vidal xabier.cid.vidal@cern.ch (2016)      #
+#  Matthieu Marinangeli matthieu.marinangeli@cern.ch (2018) #
+#############################################################
+
+"""
+
+LFV searches, based on functionality from StrippingA1MuMu by C. Elsasser
+
+"""
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV,picosecond
+from StandardParticles import StdAllLooseMuons, StdAllLooseElectrons
+from CommonParticles.Utils import *
+
+__author__  = 'Xabier Cid Vidal, Matthieu Marinangeli'
+__date__    = '22/09/2016'
+__version__ = 3.0
+__all__     = 'LFVExoticaConf', 'default_config'
+
+default_config = {
+  'NAME'        : 'LFVExotica',
+  'BUILDERTYPE' : 'LFVExoticaConf',
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : [ 'Leptonic' ],
+  'CONFIG'      : {
+    'Common': {
+              'checkPV'  : False
+              },
+    'StrippingLFVExoticaPromptLine': {
+              'Prescale'   : 1.0,
+              'Postscale'  : 1.0,
+              'Prescale_SS'   : 0.5,
+              'Postscale_SS'  : 1.0,
+              'Prompt_PT' : 500*MeV,
+              'Prompt_P' : 10000*MeV,                                                  
+              'Prompt_ProbNNmu' : 0.5,
+              'Prompt_ProbNNe' : 0.25,
+              'Prompt_GhostProb': 0.3,
+              'Prompt_IPChi2' : 1,
+              'Prompt_VChi2' : 5,
+              'Prompt_XIPChi2' : 1,
+              'Prompt_M' : 0,
+              'Prompt_FDChi2' : 1,
+              },
+    'StrippingLFVExoticaDetachedLine': {
+              'Prescale'   : 1.0,
+              'Postscale'  : 1.0,
+              'Prescale_SS'   : 1.0,
+              'Postscale_SS'  : 1.0,
+              'Detached_PT' : 500*MeV,
+              'Detached_P' : 10000*MeV,                                                  
+              'Detached_ProbNNmu' : 0.5,
+              'Detached_ProbNNe' : 0.,
+              'Detached_GhostProb': 0.3,
+              'Detached_IPChi2' : 16,
+              'Detached_VChi2' : 10,
+              'Detached_XIPChi2' : 16,
+              'Detached_M' : 0,
+              'Detached_TAU' : 1*picosecond,
+              'Detached_FDChi2' : 45,
+              },
+    'StrippingLFVExoticaEMuXDetachedLine': {
+              'Prescale'   : 1.0,
+              'Postscale'  : 1.0,
+              'Prescale_SS'   : 1.0,
+              'Postscale_SS'  : 1.0,
+              'max_TRCHI2DV'     : 3.0,
+              'Detached_PT' : 1600*MeV,
+              'Detached_P' : 10000*MeV,                                                  
+              'Detached_ProbNNmu' : 0.5,
+              'Detached_GhostProb': 0.20,
+              'Detached_IPChi2' : 25,                                                 
+              'Detached_ProbNNe' : 0.,
+              'Detached_VChi2' : 8,
+              'Detached_M' : 0,
+              'Detached_TAU' : 0.5*picosecond,
+              'Detached_FDChi2' : 225,
+              },        
+     'StrippingLFVExoticaW2EN2EMuXDetachedLine': {
+              'Prescale'   : 1.0,
+              'Postscale'  : 1.0,
+              'Prescale_SS'   : 1.0,
+              'Postscale_SS'  : 1.0,
+              'max_TRCHI2DV'     : 3.0,
+              'Detached_PT' : 500*MeV,
+              'Detached_P' : 10000*MeV,                                                  
+              'Detached_ProbNNmu' : 0.5,
+              'Detached_GhostProb': 0.20,
+              'Detached_IPChi2' : 16,                                                 
+              'Detached_ProbNNe' : 0.,
+              'Detached_VChi2' : 8,
+              'Detached_M' : 0,
+              'Detached_TAU' : 0.5*picosecond,
+              'Detached_FDChi2' : 225,
+              'Prompt_PT' : 2000*MeV,
+              'Prompt_P' : 10000*MeV,                                                                                           
+              'Prompt_ProbNN' : 0.0,
+              'W_M': 0*MeV,
+              'Prompt_IPChi2' : 5,
+              'Prompt_GhostProb': 0.30,
+              },
+    'StrippingLFVExoticaW2MuN2EMuXDetachedLine': {
+              'Prescale'   : 1.0,
+              'Postscale'  : 1.0,
+              'Prescale_SS'   : 1.0,
+              'Postscale_SS'  : 1.0,
+              'max_TRCHI2DV'     : 3.0,
+              'Detached_PT' : 500*MeV,
+              'Detached_P' : 10000*MeV,                                                  
+              'Detached_ProbNNmu' : 0.5,
+              'Detached_GhostProb': 0.20,
+              'Detached_IPChi2' : 16,                                                 
+              'Detached_ProbNNe' : 0.,
+              'Detached_VChi2' : 8,
+              'Detached_M' : 0,
+              'Detached_TAU' : 0.5*picosecond,
+              'Detached_FDChi2' : 225,
+              'Prompt_PT' : 1000*MeV,
+              'Prompt_P' : 10000*MeV,                                                                                           
+              'Prompt_ProbNN' : 0.5,
+              'W_M': 0*MeV,
+              'Prompt_IPChi2' : 5,
+              'Prompt_GhostProb': 0.30,
+              },
+  }
+  }
+
+
+## Jet isolation stuff
+##########################################
+## standard jetID
+from JetAccessories.JetMaker_Config import JetMakerConf
+stdjets_name_noban = "StdJetsNoJetIDNoBan"
+StdJetsNoJetIDNoBan = JetMakerConf(stdjets_name_noban,
+                                   R = 0.7 ,
+                                   PtMin = 500.,
+                                   JetIDCut = False).algorithms[0]
+
+## configure Data-On-Demand service                                                        
+locations = updateDoD ( StdJetsNoJetIDNoBan )
+
+
+# the daughters banning is line dependent (need to provide the location of the daughters!)
+def create_stdjets(strob,line_location,stdjets_name_ban):
+    
+    myconf1 = JetMakerConf(stdjets_name_ban,
+                           R = 0.7 ,
+                           PtMin = 500.,
+                           listOfParticlesToBan = [line_location],
+                           JetIDCut = False).algorithms[0]
+    
+    if "StdJetsNoJetIDBan" in dir(strob): strob.StdJetsNoJetIDBan.append(myconf1)
+    else: strob.StdJetsNoJetIDBan= [myconf1]
+                                      
+    ## configure Data-On-Demand service                                            
+    locations = updateDoD ( myconf1 )
+
+
+relInfoJetsVars = ["JETNOMU1PX","JETNOMU1PY", "JETNOMU1PZ", "JETNOMU1PT", "JETNOMU1JETWIDTH", "JETNOMU1NNTAG", "JETNOMU1MNF", "JETNOMU2PX", "JETNOMU2PY", "JETNOMU2PZ", "JETNOMU2PT", "JETNOMU2JETWIDTH", "JETNOMU2NNTAG", "JETNOMU2MNF", "JETNOMU3PX", "JETNOMU3PY", "JETNOMU3PZ", "JETNOMU3PT", "JETNOMU3JETWIDTH", "JETNOMU3NNTAG", "JETNOMU3MNF", "JETMU1PX", "JETMU1PY", "JETMU1PZ", "JETMU1PT", "JETMU1JETWIDTH", "JETMU1NNTAG", "JETMU1MNF", "JETMU2PX", "JETMU2PY", "JETMU2PZ", "JETMU2PT", "JETMU2JETWIDTH", "JETMU2NNTAG", "JETMU2MNF"]
+
+def JetsRelInfo(stdjets_name_ban):
+  
+    ret = { 'Type' : 'RelInfoJetsVariables',
+            'Location': 'RelatedInfoJets',
+            'Variables': relInfoJetsVars,
+            'UseVarsJetsWithB' : False,
+            'LocationJetsNoMu' : "Phys/"+stdjets_name_ban+"/Particles",
+            'LocationJetsNoRemove' : "Phys/"+stdjets_name_noban+"/Particles"
+          }
+        
+    return ret
+
+relInfoConeVars = ["CONEANGLE","CONEMULT","CONEP","CONEPT","CONEPASYM","CONEPTASYM","CONEDELTAETA","CONEDELTAPHI"]
+
+def IsoConeRelInfo(angle, location, *args):
+  
+    ret = {'Type' : 'RelInfoConeVariables', 'Variables':relInfoConeVars, 'ConeAngle' : angle, 'Location': location}
+    dl = {}
+    for a in args:
+      dl[a["part"]] = a["loc"]
+    ret['DaughterLocations'] = dl
+    
+    return ret
+
+relInfoPFVars = ["PFCHARGEDMASS","PFALLMASS","PFCHARGEDMISSPT","PFALLMISSPT","PFCHARGEDMISSPX","PFALLMISSPX","PFCHARGEDMISSPY","PFALLMISSPY"]
+    
+class LFVExoticaConf(LineBuilder) :
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+    
+    
+    stdjets_name_ban_prompt = "StdJetsNoJetIDBanDaughtersPrompt"
+    stdjets_name_ban_ssprompt = "StdJetsNoJetIDBanDaughtersSameSignPrompt"
+    stdjets_name_ban_detached = "StdJetsNoJetIDBanDaughtersDetached"
+    stdjets_name_ban_ssdetached = "StdJetsNoJetIDBanDaughtersSameSignDetached"
+    
+    RelatedInfoToolsPrompt = [JetsRelInfo(stdjets_name_ban_prompt)]
+    RelatedInfoToolsSSPrompt = [JetsRelInfo(stdjets_name_ban_ssprompt)]
+    RelatedInfoToolsDetached = [JetsRelInfo(stdjets_name_ban_detached)]
+    RelatedInfoToolsSSDetached = [JetsRelInfo(stdjets_name_ban_ssdetached)]
+              
+                                    
+    PFrelatedinfos = {'Type' : 'RelInfoPFVariables', 'Variables':relInfoPFVars, 'Location': 'PFVariables'}
+    VertexIso = {'Type': 'RelInfoVertexIsolation', 'Location':'RelInfoVtxIso' }
+                                    
+    ## cone related infos
+                                    
+    RelatedInfoToolsPrompt +=    [IsoConeRelInfo(0.5, 'ConeVariables05', {"part": '[H_30 -> ^mu+ e-]CC', 'loc': 'MuonConeInfo05'}, 
+                                                                         {"part": '[H_30 -> mu+ ^e-]CC', 'loc': 'ElectronConeInfo05'}),
+                                  IsoConeRelInfo(1.0, 'ConeVariables1',  {"part": '[H_30 -> ^mu+ e-]CC', 'loc': 'MuonConeInfo1'},
+                                                                         {"part": '[H_30 -> mu+ ^e-]CC', 'loc': 'ElectronConeInfo1'}),
+                                  IsoConeRelInfo(2.0, 'ConeVariables2',  {"part": '[H_30 -> ^mu+ e-]CC', 'loc': 'MuonConeInfo2'},
+                                                                         {"part": '[H_30 -> mu+ ^e-]CC', 'loc': 'ElectronConeInfo2'})] 
+                                  
+    RelatedInfoToolsSSPrompt +=  [IsoConeRelInfo(0.5, 'ConeVariables05', {"part": '[H_30 -> ^mu+ e+]CC', 'loc': 'MuonConeInfo05'}, 
+                                                                         {"part": '[H_30 -> mu+ ^e+]CC', 'loc': 'ElectronConeInfo05'}),
+                                  IsoConeRelInfo(1.0, 'ConeVariables1',  {"part": '[H_30 -> ^mu+ e+]CC', 'loc': 'MuonConeInfo1'},
+                                                                         {"part": '[H_30 -> mu+ ^e+]CC', 'loc': 'ElectronConeInfo1'}),
+                                  IsoConeRelInfo(2.0, 'ConeVariables2',  {"part": '[H_30 -> ^mu+ e+]CC', 'loc': 'MuonConeInfo2'},
+                                                                         {"part": '[H_30 -> mu+ ^e+]CC', 'loc': 'ElectronConeInfo2'})]
+                                  
+    RelatedInfoToolsDetached +=  [IsoConeRelInfo(0.5, 'ConeVariables05', {"part": '[H_30 -> ^mu+ e-]CC', 'loc': 'MuonConeInfo05'}, 
+                                                                         {"part": '[H_30 -> mu+ ^e-]CC', 'loc': 'ElectronConeInfo05'}),
+                                  IsoConeRelInfo(1.0, 'ConeVariables1',  {"part": '[H_30 -> ^mu+ e-]CC', 'loc': 'MuonConeInfo1'},
+                                                                         {"part": '[H_30 -> mu+ ^e-]CC', 'loc': 'ElectronConeInfo1'}),
+                                  IsoConeRelInfo(2.0, 'ConeVariables2',  {"part": '[H_30 -> ^mu+ e-]CC', 'loc': 'MuonConeInfo2'},
+                                                                         {"part": '[H_30 -> mu+ ^e-]CC', 'loc': 'ElectronConeInfo2'})] 
+                                  
+    RelatedInfoToolsSSDetached += [IsoConeRelInfo(0.5, 'ConeVariables05', {"part": '[H_30 -> ^mu+ e+]CC', 'loc': 'MuonConeInfo05'}, 
+                                                                         {"part": '[H_30 -> mu+ ^e+]CC', 'loc': 'ElectronConeInfo05'}),
+                                  IsoConeRelInfo(1.0, 'ConeVariables1',  {"part": '[H_30 -> ^mu+ e+]CC', 'loc': 'MuonConeInfo1'},
+                                                                         {"part": '[H_30 -> mu+ ^e+]CC', 'loc': 'ElectronConeInfo1'}),
+                                  IsoConeRelInfo(2.0, 'ConeVariables2',  {"part": '[H_30 -> ^mu+ e+]CC', 'loc': 'MuonConeInfo2'},
+                                                                         {"part": '[H_30 -> mu+ ^e+]CC', 'loc': 'ElectronConeInfo2'})]
+
+  
+    W2EN_RelatedInfos = [IsoConeRelInfo(0.5, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e-)]CC e+ ]CC', 'loc': 'MuonConeInfo05'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e-)]CC e+ ]CC', 'loc': 'ElectronConeInfo05'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e-)]CC e+ ]CC', 'loc': 'HNLConeInfo05'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e-)]CC ^e+ ]CC', 'loc': 'PromptElectronConeInfo05'}),
+                         IsoConeRelInfo(1.0, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e-)]CC e+ ]CC', 'loc': 'MuonConeInfo1'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e-)]CC e+ ]CC', 'loc': 'ElectronConeInfo1'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e-)]CC e+ ]CC', 'loc': 'HNLConeInfo1'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e-)]CC ^e+ ]CC', 'loc': 'PromptElectronConeInfo1'}),
+                         IsoConeRelInfo(2.0, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e-)]CC e+ ]CC', 'loc': 'MuonConeInfo2'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e-)]CC e+ ]CC', 'loc': 'ElectronConeInfo2'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e-)]CC e+ ]CC', 'loc': 'HNLConeInfo2'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e-)]CC ^e+ ]CC', 'loc': 'PromptElectronConeInfo2'})]  
+                                                                
+    W2MuN_RelatedInfos = [IsoConeRelInfo(0.5, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e-)]CC mu+ ]CC', 'loc': 'MuonConeInfo05'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e-)]CC mu+ ]CC', 'loc': 'ElectronConeInfo05'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e-)]CC mu+ ]CC', 'loc': 'HNLConeInfo05'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e-)]CC ^mu+ ]CC', 'loc': 'PromptMuonConeInfo05'}),
+                         IsoConeRelInfo(1.0, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e-)]CC mu+ ]CC', 'loc': 'MuonConeInfo1'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e-)]CC mu+ ]CC', 'loc': 'ElectronConeInfo1'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e-)]CC mu+ ]CC', 'loc': 'HNLConeInfo1'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e-)]CC ^mu+ ]CC', 'loc': 'PromptMuonConeInfo1'}),
+                         IsoConeRelInfo(2.0, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e-)]CC mu+ ]CC', 'loc': 'MuonConeInfo2'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e-)]CC mu+ ]CC', 'loc': 'ElectronConeInfo2'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e-)]CC mu+ ]CC', 'loc': 'HNLConeInfo2'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e-)]CC ^mu+ ]CC', 'loc': 'PromptMuonConeInfo2'})]                                                             
+                                                                
+    W2ENSS_RelatedInfos = [IsoConeRelInfo(0.5, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e+)]CC e+ ]CC', 'loc': 'MuonConeInfo05'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e+)]CC e+ ]CC', 'loc': 'ElectronConeInfo05'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e+)]CC e+ ]CC', 'loc': 'HNLConeInfo05'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e+)]CC ^e+ ]CC', 'loc': 'PromptElectronConeInfo05'}),
+                         IsoConeRelInfo(1.0, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e+)]CC e+ ]CC', 'loc': 'MuonConeInfo1'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e+)]CC e+ ]CC', 'loc': 'ElectronConeInfo1'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e+)]CC e+ ]CC', 'loc': 'HNLConeInfo1'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e+)]CC ^e+ ]CC', 'loc': 'PromptElectronConeInfo1'}),
+                         IsoConeRelInfo(2.0, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e+)]CC e+ ]CC', 'loc': 'MuonConeInfo2'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e+)]CC e+ ]CC', 'loc': 'ElectronConeInfo2'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e+)]CC e+ ]CC', 'loc': 'HNLConeInfo2'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e+)]CC ^e+ ]CC', 'loc': 'PromptElectronConeInfo2'})]  
+                                                                
+    W2MuNSS_RelatedInfos = [IsoConeRelInfo(0.5, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e+)]CC mu+ ]CC', 'loc': 'MuonConeInfo05'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e+)]CC mu+ ]CC', 'loc': 'ElectronConeInfo05'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e+)]CC mu+ ]CC', 'loc': 'HNLConeInfo05'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e+)]CC ^mu+ ]CC', 'loc': 'PromptMuonConeInfo05'}),
+                         IsoConeRelInfo(1.0, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e+)]CC mu+ ]CC', 'loc': 'MuonConeInfo1'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e+)]CC mu+ ]CC', 'loc': 'ElectronConeInfo1'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e+)]CC mu+ ]CC', 'loc': 'HNLConeInfo1'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e+)]CC ^mu+ ]CC', 'loc': 'PromptMuonConeInfo1'}),
+                         IsoConeRelInfo(2.0, 'ConeVariables05', {"part": '[W+ -> [(H_30 -> ^mu+ e+)]CC mu+ ]CC', 'loc': 'MuonConeInfo2'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ ^e+)]CC mu+ ]CC', 'loc': 'ElectronConeInfo2'},
+                                                                {"part": '[W+ -> ^[(H_30 -> mu+ e+)]CC mu+ ]CC', 'loc': 'HNLConeInfo2'},
+                                                                {"part": '[W+ -> [(H_30 -> mu+ e+)]CC ^mu+ ]CC', 'loc': 'PromptMuonConeInfo2'})]                                                                
+                                                                        
+    
+    RelatedInfoToolsPrompt += [PFrelatedinfos, VertexIso]
+    RelatedInfoToolsSSPrompt += [PFrelatedinfos, VertexIso]
+    RelatedInfoToolsDetached += [PFrelatedinfos, VertexIso]
+    RelatedInfoToolsSSDetached += [PFrelatedinfos, VertexIso]
+    W2EN_RelatedInfos += [PFrelatedinfos, VertexIso]
+    W2MuN_RelatedInfos += [PFrelatedinfos, VertexIso]
+
+    ## [A1 -> mu+ e-]cc prompt line:
+    sel_prompt = combinePrompt(name,config['StrippingLFVExoticaPromptLine'])
+    
+    promptline = StrippingLine(name + 'PromptLine',
+                               prescale  = config['StrippingLFVExoticaPromptLine']['Prescale'],
+                               postscale = config['StrippingLFVExoticaPromptLine']['Postscale'],
+                               checkPV   = config['Common']['checkPV'],
+                               selection = sel_prompt,
+                               RelatedInfoTools = RelatedInfoToolsPrompt)
+    self.registerLine(promptline)
+    
+    ### [A1 -> mu- e-]cc prompt line:
+    sel_prompt_ss = combinePrompt(name,config['StrippingLFVExoticaPromptLine'],ss=True)
+            
+    sspromptline = StrippingLine(name + 'SameSignPromptLine',
+                                prescale  = config['StrippingLFVExoticaPromptLine']['Prescale_SS'],
+                                postscale = config['StrippingLFVExoticaPromptLine']['Postscale_SS'],
+                                checkPV   = config['Common']['checkPV'],
+                                selection = sel_prompt_ss,
+                                RelatedInfoTools = RelatedInfoToolsSSPrompt)
+    self.registerLine(sspromptline)
+    
+    ### [A1 -> mu+ e-]cc detached line:
+    sel_detached = combineDetached(name,config['StrippingLFVExoticaDetachedLine'])
+
+    detachedline = StrippingLine(name + 'DetachedLine',
+                                prescale  = config['StrippingLFVExoticaDetachedLine']['Prescale'],
+                                postscale = config['StrippingLFVExoticaDetachedLine']['Postscale'],
+                                checkPV   = config['Common']['checkPV'],
+                                selection = sel_detached,
+                                RelatedInfoTools = RelatedInfoToolsDetached)
+    self.registerLine(detachedline)
+
+    ### [A1 -> mu- e-]cc detached line:
+    sel_detached_ss = combineDetached(name,config['StrippingLFVExoticaDetachedLine'],ss=True)
+
+    ssdetachedline = StrippingLine(name + 'SameSignDetachedLine',
+                                prescale  = config['StrippingLFVExoticaDetachedLine']['Prescale_SS'],
+                                postscale = config['StrippingLFVExoticaDetachedLine']['Postscale_SS'],
+                                checkPV   = config['Common']['checkPV'],
+                                selection = sel_detached_ss,
+                                RelatedInfoTools = RelatedInfoToolsSSDetached)
+    self.registerLine(ssdetachedline)
+    
+    ### [A1 -> mu+ e- X]cc detached line:
+    sel_detached_emux = combineDetached_EMuX(name,config['StrippingLFVExoticaEMuXDetachedLine'])
+
+    detachedline_emux = StrippingLine(name + 'EMuXDetachedLine',
+                        prescale  = config['StrippingLFVExoticaEMuXDetachedLine']['Prescale'],
+                        postscale = config['StrippingLFVExoticaEMuXDetachedLine']['Postscale'],
+                        checkPV   = config['Common']['checkPV'],
+                        selection = sel_detached_emux,
+                        RelatedInfoTools = RelatedInfoToolsDetached)
+    self.registerLine(detachedline_emux)
+
+    ### [A1 -> mu- e- X]cc detached line:
+    sel_detached_ss_emux = combineDetached_EMuX(name,config['StrippingLFVExoticaEMuXDetachedLine'],ss=True)
+
+    ssdetachedline_emux = StrippingLine(name + 'EMuXSameSignDetachedLine',
+                        prescale  = config['StrippingLFVExoticaEMuXDetachedLine']['Prescale_SS'],
+                        postscale = config['StrippingLFVExoticaEMuXDetachedLine']['Postscale_SS'],
+                        checkPV   = config['Common']['checkPV'],
+                        selection = sel_detached_ss_emux,
+                        RelatedInfoTools = RelatedInfoToolsSSDetached)
+    self.registerLine(ssdetachedline_emux)
+    
+    
+    ### [W+ -> e+ (HNL -> mu- e+ X)]cc detached line:
+    sel_detached_N_e_emux = makeW2LeptonN2EMuX(name, config['StrippingLFVExoticaW2EN2EMuXDetachedLine'],  lepton="e", ss=False)
+
+    N_e_detachedline_emux = StrippingLine(name + 'W2EN2EMuXDetachedLine',
+              prescale  = config['StrippingLFVExoticaW2EN2EMuXDetachedLine']['Prescale'],
+              postscale = config['StrippingLFVExoticaW2EN2EMuXDetachedLine']['Postscale'],
+              checkPV   = config['Common']['checkPV'],
+              selection = sel_detached_N_e_emux,
+              RelatedInfoTools = W2EN_RelatedInfos)
+    self.registerLine(N_e_detachedline_emux)
+    
+    ### [W+ -> mu+ (HNL -> mu- e+ X)]cc detached line:
+    sel_detached_N_mu_emux = makeW2LeptonN2EMuX(name, config['StrippingLFVExoticaW2MuN2EMuXDetachedLine'], lepton="mu", ss=False)
+
+    N_mu_detachedline_emux = StrippingLine(name + 'W2MuN2EMuXDetachedLine',
+              prescale  = config['StrippingLFVExoticaW2MuN2EMuXDetachedLine']['Prescale'],
+              postscale = config['StrippingLFVExoticaW2MuN2EMuXDetachedLine']['Postscale'],
+              checkPV   = config['Common']['checkPV'],
+              selection = sel_detached_N_mu_emux,
+              RelatedInfoTools = W2MuN_RelatedInfos)
+    self.registerLine(N_mu_detachedline_emux)
+    
+    
+    ### [W+ -> e+ (HNL -> mu+ e+ X)]cc detached line:
+    sel_detached_N_e_emux_SS = makeW2LeptonN2EMuX(name, config['StrippingLFVExoticaW2EN2EMuXDetachedLine'],  lepton="e", ss=True)
+
+    N_e_detachedline_emux_SS = StrippingLine(name + 'W2EN2EMuXSSDetachedLine',
+              prescale  = config['StrippingLFVExoticaW2EN2EMuXDetachedLine']['Prescale_SS'],
+              postscale = config['StrippingLFVExoticaW2EN2EMuXDetachedLine']['Postscale_SS'],
+              checkPV   = config['Common']['checkPV'],
+              selection = sel_detached_N_e_emux_SS,
+              RelatedInfoTools = W2ENSS_RelatedInfos)
+    self.registerLine(N_e_detachedline_emux_SS)
+    
+    ### [W+ -> mu+ (HNL -> mu+ e+ X)]cc detached line:
+    sel_detached_N_mu_emux_SS = makeW2LeptonN2EMuX(name, config['StrippingLFVExoticaW2MuN2EMuXDetachedLine'], lepton="mu", ss=True)
+
+    N_mu_detachedline_emux_SS = StrippingLine(name + 'W2MuN2EMuXSSDetachedLine',
+              prescale  = config['StrippingLFVExoticaW2MuN2EMuXDetachedLine']['Prescale_SS'],
+              postscale = config['StrippingLFVExoticaW2MuN2EMuXDetachedLine']['Postscale_SS'],
+              checkPV   = config['Common']['checkPV'],
+              selection = sel_detached_N_mu_emux_SS,
+              RelatedInfoTools = W2MuNSS_RelatedInfos)
+    self.registerLine(N_mu_detachedline_emux_SS)
+
+    create_stdjets(self,promptline.outputLocation(),stdjets_name_ban_prompt)
+    create_stdjets(self,sspromptline.outputLocation(),stdjets_name_ban_ssprompt)
+    create_stdjets(self,detachedline.outputLocation(),stdjets_name_ban_detached)
+    create_stdjets(self,ssdetachedline.outputLocation(),stdjets_name_ban_ssdetached)
+    
+
+def combinePrompt(name,config,ss=False):
+    
+  daugh_cut={'mu': ("(PT > {Prompt_PT}) " 
+                    "& (P > {Prompt_P}) " 
+                    "& (BPVIPCHI2() < {Prompt_IPChi2}) " 
+                    "& (TRGHOSTPROB < {Prompt_GhostProb}) " 
+                    "& (PROBNNmu > {Prompt_ProbNNmu}) ").format(**config),
+            'e': ("(PT > {Prompt_PT}) " 
+                    "& (P > {Prompt_P}) " 
+                    "& (PROBNNe > {Prompt_ProbNNe}) " 
+                    "& (BPVIPCHI2() < {Prompt_IPChi2}) " 
+                    "& (TRGHOSTPROB < {Prompt_GhostProb}) ").format(**config)}
+    
+  comb_cut = ("(APT > 2.0*{Prompt_PT}) &  (AM > {Prompt_M}) &" 
+              "(ACUTDOCACHI2({Prompt_VChi2},''))").format(**config)
+  
+  mother_cut = ("(PT > 2*{Prompt_PT})" 
+                "& (HASVERTEX)" 
+                "& (VFASPF(VCHI2PDOF) < {Prompt_VChi2}) " 
+                "& (BPVIPCHI2() < {Prompt_XIPChi2})" 
+                "& (BPVVDCHI2 < {Prompt_FDChi2})" ).format(**config)
+    
+  decay = "[H_30 -> mu+ e-]cc"
+  ename = "e-"
+  namesel = name+"PromptSel"
+  if ss:
+    decay = "[H_30 -> mu+ e+]cc"
+    ename = "e+" 
+    namesel = name+"SSPromptSel"
+  
+  _combination = CombineParticles( DecayDescriptor    = decay,
+                                   CombinationCut     = comb_cut,
+                                   DaughtersCuts      = { 'mu+' : daugh_cut["mu"],
+                                                          ename : daugh_cut["e"] },
+                                   MotherCut          = mother_cut,
+                                   )
+
+  return Selection ( namesel,
+                     Algorithm          = _combination,
+                     RequiredSelections = [ StdAllLooseMuons, StdAllLooseElectrons]
+                     )
+
+
+def combineDetached(name,config,ss=False):
+  
+  
+  daugh_cut={'mu': ("(PT > {Detached_PT}) " 
+                    "& (P > {Detached_P}) " 
+                    "& (MIPCHI2DV(PRIMARY) > {Detached_IPChi2}) " 
+                    "& (TRGHOSTPROB < {Detached_GhostProb}) " 
+                    "& (PROBNNmu > {Detached_ProbNNmu}) ").format(**config),
+            'e': ("(PT > {Detached_PT}) " 
+                    "& (P > {Detached_P}) " 
+                    "& (PROBNNe > {Detached_ProbNNe}) " 
+                    "& (MIPCHI2DV(PRIMARY) > {Detached_IPChi2}) " 
+                    "& (TRGHOSTPROB < {Detached_GhostProb}) ").format(**config)}
+    
+  comb_cut = ("(APT > 2.0*{Detached_PT}) &  (AM > {Detached_M}) &" 
+              "(ACUTDOCACHI2({Detached_VChi2},''))").format(**config)
+  
+  mother_cut = ("(PT > 2*{Detached_PT})" 
+                "& (HASVERTEX)" 
+                "& (VFASPF(VCHI2PDOF) < {Detached_VChi2}) " 
+                "& (BPVIPCHI2() < {Detached_XIPChi2})" 
+                "& (BPVVDCHI2 > {Detached_FDChi2})" 
+                "& (BPVLTIME() > {Detached_TAU})").format(**config)
+            
+  decay = "[H_30 -> mu+ e-]cc"
+  ename = "e-"
+  namesel = name+"DetachedSel"
+  if ss:
+    decay = "[H_30 -> mu+ e+]cc"
+    ename = "e+" 
+    namesel = name+"SSDetachedSel"
+
+  _combination = CombineParticles( DecayDescriptor    = decay,
+                                   CombinationCut     = comb_cut,
+                                   DaughtersCuts      = { 'mu+' : daugh_cut["mu"],
+                                                          ename : daugh_cut["e"] },
+                                   MotherCut          = mother_cut,
+                                   )
+
+  return Selection ( namesel,
+                     Algorithm          = _combination,
+                     RequiredSelections = [ StdAllLooseMuons, StdAllLooseElectrons]
+                     )
+                    
+def combineDetached_EMuX(name,config,ss=False):
+  
+    daugh_cut={'mu': ("(PT > {Detached_PT}) " 
+                      "& (P > {Detached_P}) " 
+                      "& (MIPCHI2DV(PRIMARY) > {Detached_IPChi2}) " 
+                      "& (TRGHOSTPROB < {Detached_GhostProb}) " 
+                      "& (PROBNNmu > {Detached_ProbNNmu}) "
+                      "& (TRCHI2DOF < {max_TRCHI2DV})").format(**config),
+              'e': ("(PT > {Detached_PT}) " 
+                      "& (P > {Detached_P}) " 
+                      "& (PROBNNe > {Detached_ProbNNe}) " 
+                      "& (MIPCHI2DV(PRIMARY) > {Detached_IPChi2}) " 
+                      "& (TRGHOSTPROB < {Detached_GhostProb}) "
+                      "& (TRCHI2DOF < {max_TRCHI2DV})").format(**config)}
+      
+    comb_cut = ("(APT > 2.*{Detached_PT}) &  (AM > {Detached_M}) &" 
+                "(ACUTDOCACHI2({Detached_VChi2},''))").format(**config)
+
+    mother_cut = ("(PT > 2.*{Detached_PT})" 
+                  "& (HASVERTEX)" 
+                  "& (VFASPF(VCHI2PDOF) < {Detached_VChi2}) " 
+                  "& (BPVVDCHI2 > {Detached_FDChi2})" 
+                  "& (BPVLTIME() > {Detached_TAU})").format(**config)
+              
+    decay = "[H_30 -> mu+ e-]cc"
+    ename = "e-"
+    namesel = name+"DetachedSel_EMuX"
+    if ss:
+      decay = "[H_30 -> mu+ e+]cc"
+      ename = "e+" 
+      namesel = name+"SSDetachedSel_EMuX"
+
+    _combination = CombineParticles( DecayDescriptor    = decay,
+                                      CombinationCut     = comb_cut,
+                                      DaughtersCuts      = { 'mu+' : daugh_cut["mu"],
+                                                            ename : daugh_cut["e"] },
+                                      MotherCut          = mother_cut,
+                                      )
+
+    return Selection ( namesel,
+                        Algorithm          = _combination,
+                        RequiredSelections = [ StdAllLooseMuons, StdAllLooseElectrons]
+                        )
+
+def makeW2LeptonN2EMuX(name, config, lepton, ss=False):
+  
+    #lepton = e, mu
+
+    EMuX = combineDetached_EMuX("{0}N{1}".format(lepton, name), config, ss)
+    
+    decay = "[W+ -> H_30 {0}+]cc".format(lepton)
+    
+    daugh_cut={
+          "{0}+".format(lepton): ("(PT > {Prompt_PT}) " 
+          "& (P > {Prompt_P}) "
+          "& (PROBNN{0} > {Prompt_ProbNN}) " 
+          "& (TRGHOSTPROB < {Prompt_GhostProb}) "
+          "& (MIPCHI2DV(PRIMARY) < {Prompt_IPChi2}) "
+          ).format(lepton, **config)}
+                    
+    comb_cut = ("AM > {W_M}").format(**config)
+                    
+    mother_cut = ("M > {W_M}").format(**config)
+
+    _combination = CombineParticles(DecayDescriptor = decay,
+                    CombinationCut = comb_cut,
+                    DaughtersCuts  = daugh_cut,
+                    MotherCut = mother_cut)
+                                    
+    namesel = name+"W2{0}N".format(lepton)
+    
+    if ss:
+      namesel += "SS"
+      
+    if lepton == "e":
+        lepton_loc = StdAllLooseElectrons
+    elif lepton == "mu":
+        lepton_loc = StdAllLooseMuons
+                                    
+    return Selection( namesel,
+            Algorithm = _combination,
+            RequiredSelections=[EMuX, lepton_loc] )
+
+    
+    
+  
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2HH.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2HH.py
new file mode 100644
index 000000000..597a8e677
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2HH.py
@@ -0,0 +1,183 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping lines for dark pions into light hadrons analysis. 
+Revisited by CVS w.r.t. previous campaigns.
+'''
+
+__author__ = ['Wouter Hulsbergen', 'Igor Kostiuk', 'Carlos Vazquez Sierra']
+__date__ = '23/06/2021'
+
+__all__ = ('LLPV0_sConf','default_config')
+
+from Gaudi.Configuration import *
+from StandardParticles import StdAllNoPIDsPions
+from PhysSelPython.Wrappers import CombineSelection, PassThroughSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import GeV, picosecond
+from LoKiPhys.functions import SOURCE, SIZE
+
+default_config = {
+    'NAME'              : 'LLPV0',
+    'WGs'               : ['QEE'],
+    'BUILDERTYPE'       : 'LLPV0_sConf',
+    'CONFIG'    : {
+                         '2HHSinglePrescale'     :  0.0135 
+                 ,       '2HHMultiPrescale'      :  1.0
+                 ,       '2HHSingleKaonPrescale' :  0.045
+                 ,       '2HHDoubleKaonPrescale' :  1.0
+                 ,       '2mumuSinglePrescale'   :  0. # line removed
+                 ,       '2MixedPrescale'        :  1.0
+                 ,       'dimuProbNNmu'          :  0.
+                 ,       'dihProbNNmu'           :  0.
+                 ,       'dihProbNNk'            :  0.01
+                 ,       'dikProbNNk'            :  0.55
+                 ,       'dimuProbNNk'           :  0.5
+                 ,       'mixedProbNNk'          :  0.01
+                 ,       'dihhalt'               :  100
+                 ,       'dihHHSingle'           :  1
+                 ,       'dihHHMulti'            :  6
+                 ,       'dikHHSingleKaon'       :  1
+                 ,       'dikHHDoubleKaon'       :  2
+                 ,       'dimuMuonsSingle'       :  1
+                 ,       'dihMuons'              :  0
+                 ,       'dimuMixed'             :  1
+                 ,       'dihMixed'              :  2
+                 ,       'daugsP'                :  5.*GeV
+                 ,       'daugsPT'               :  1.*GeV
+                 ,       'daugsChi2dv'           :  25.
+                 ,       'combChi2'              :  25.
+                 ,       'motherChi2vx'          :  16.
+                 ,       'motherLifetime'        :  1.5*picosecond
+                  },
+    'STREAMS' : ['BhadronCompleteEvent']
+    }
+
+### Lines stored in this file:
+# StrippingLLPV02HHSingleLine
+# StrippingLLPV02HHMultiLine
+# StrippingLLPV02HHSingleKaonLine
+# StrippingLLPV02HHDoubleKaonLine
+# StrippingLLPV02MixedLine
+
+class LLPV0_sConf(LineBuilder) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+        self.makeV02HH()
+
+    ### Stripping lines:
+
+    def makeV02HH( self ):
+        V02HH = CombineSelection( "V02HH" + self.name,
+                                  StdAllNoPIDsPions,
+                                  DecayDescriptor = "KS0 -> pi+ pi-",
+                                  DaughtersCuts  = {"pi+" : "(P > %(daugsP)s) & (MIPCHI2DV(PRIMARY) > %(daugsChi2dv)s) & (PT > %(daugsPT)s)" % self.config,
+                                                   "pi-" : "(P > %(daugsP)s) & (MIPCHI2DV(PRIMARY) > %(daugsChi2dv)s) & (PT > %(daugsPT)s)" % self.config },
+                                  CombinationCut = "( ADOCACHI2CUT(%(combChi2)s, '') )" % self.config,
+                                  MotherCut = "( CHI2VX < %(motherChi2vx)s ) & ( BPVLTIME() > %(motherLifetime)s )" % self.config
+                                  )
+
+        ### Single dipion line, no pid cuts, heavily prescaled
+
+        V02HHSingle = self.MultiMHSelection("HHSingleSelection", V02HH,
+            self.config['dihhalt'], self.config['dihhalt'], self.config['dihHHSingle'],
+            self.config['dihProbNNk'], self.config['dihProbNNmu'])
+
+        V02HHSingleLine = StrippingLine( self.name + "2HHSingleLine", algos = [ V02HHSingle ],
+                                         prescale = self.config['2HHSinglePrescale'] )
+
+        ### Multi dipion line, no pid cuts
+
+        V02HHMulti =  self.MultiMHSelection("HHMultiSelection", V02HH,
+            self.config['dihhalt'], self.config['dihhalt'], self.config['dihHHMulti'],
+            self.config['dihProbNNk'], self.config['dihProbNNmu'])
+
+        V02HHMultiLine = StrippingLine( self.name + "2HHMultiLine", algos = [ V02HHMulti ],
+                                        prescale = self.config['2HHMultiPrescale'] )
+
+        ### Single dikaon line
+
+        V02HHSingleKaon =  self.MultiMHSelection("HHSingleKaonSelection", V02HH,
+            self.config['dihhalt'], self.config['dihhalt'], self.config['dikHHSingleKaon'],
+            self.config['dikProbNNk'], self.config['dihProbNNmu'])
+
+        V02HHSingleKaonLine = StrippingLine( self.name + "2HHSingleKaonLine", algos = [ V02HHSingleKaon ],
+                                            prescale = self.config['2HHSingleKaonPrescale'] )
+
+        ### Double dikaon line
+
+        V02HHDoubleKaon =  self.MultiMHSelection("HHDoubleKaonSelection", V02HH,
+            self.config['dihhalt'], self.config['dihhalt'], self.config['dikHHDoubleKaon'],
+            self.config['dikProbNNk'], self.config['dihProbNNmu'])
+
+        V02HHDoubleKaonLine = StrippingLine( self.name + "2HHDoubleKaonLine", algos = [ V02HHDoubleKaon ],
+                                            prescale = self.config['2HHDoubleKaonPrescale'] )
+
+        ### Single dimuon line
+
+        V02mumuSingle = self.MultiMHSelection("MuMuSingleSelection", V02HH,
+            self.config['dimuMuonsSingle'], self.config['dihMuons'], self.config['dihhalt'],
+            self.config['dimuProbNNk'], self.config['dimuProbNNmu'])
+
+        V02mumuSingleLine = StrippingLine( self.name + "2mumuSingleLine", algos = [ V02mumuSingle ],
+                                           prescale = self.config['2mumuSinglePrescale'] )
+
+        ### Mixed: Single dimuon + single dipion (no pid cuts on dipion) line
+
+        V02Mixed = self.MultiMHSelection("MixedSelection", V02HH,
+            self.config['dimuMixed'], self.config['dihMixed'], self.config['dihhalt'],
+            self.config['mixedProbNNk'], self.config['dimuProbNNmu'])
+
+        V02MixedLine = StrippingLine( self.name + "2MixedLine", algos = [ V02Mixed ],
+                                      prescale = self.config['2MixedPrescale'] )
+
+        self.registerLine(V02HHSingleLine)
+        self.registerLine(V02HHMultiLine)
+        self.registerLine(V02HHSingleKaonLine)
+        self.registerLine(V02HHDoubleKaonLine)
+        self.registerLine(V02mumuSingleLine)
+        self.registerLine(V02MixedLine)
+
+    def MultiMHSelection(self           ,
+                         name           ,
+                         input          ,
+                         mindimu    = 0 ,
+                         mindimudih = 0 ,
+                         mindih     = 0 ,
+                         hprobnnk   = 0 ,
+                         hprobnnmu  = 0
+                        ) :
+
+        """
+        This module looks for dihadrons which satisfy
+        a certain ProbNNk cut and dimuons which satisfy
+        a ProbNNmu cut and then selects events following this logic:
+        (#dimuons>=mindimu & #dihadrons>=mindimudih) | #dihadrons>=mindih
+        """
+
+        preamb = [
+          "ndih  = SOURCE ( '%s', NINGENERATION(PROBNNk>=%s, 1) == 2 ) >> SIZE" % ( input.outputLocation(), hprobnnk ),
+          "ndimu = SOURCE ( '%s', NINGENERATION(PROBNNmu>=%s, 1) == 2 ) >> SIZE" % ( input.outputLocation(), hprobnnmu ),
+          ]
+
+        code = "( ((ndimu >= %s) & (ndih >= %s)) | (ndih >= %s) )" % ( mindimu, mindimudih, mindih )
+
+        from GaudiConfUtils.ConfigurableGenerators import LoKi__VoidFilter as _VFilter_
+        return PassThroughSelection   (
+            name,
+            Algorithm         = _VFilter_(Code = code , Preambulo = preamb),
+            RequiredSelection = input )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2Hadrons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2Hadrons.py
new file mode 100644
index 000000000..cd7fe494e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2Hadrons.py
@@ -0,0 +1,580 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+"""
+Stripping lines selecting scalar long-lived particles decaying to hadrons
+"""
+
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, picosecond
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, SimpleSelection, MergedSelection, AutomaticData
+from StrippingUtils.Utils import LineBuilder
+from StrippingConf.StrippingLine import StrippingLine
+
+
+__author__  = 'Andrii Usachov'
+__date__    = '2021-15-06'
+__version__ = 1.0
+__all__     = 'LLP2HadronsConf', 'default_config'
+
+default_config = {
+  'NAME'        : 'LLP2Hadrons',
+  'BUILDERTYPE' : 'LLP2HadronsConf',
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : {
+    'BhadronCompleteEvent': [
+      'StrippingLLP2Hadrons_KstKst_LongLine',
+      'StrippingLLP2Hadrons_KsKpi_LL_LongLine',
+      'StrippingLLP2Hadrons_KsKpi_DD_LongLine',
+      'StrippingLLP2Hadrons_DpDm_LongLine',
+      'StrippingLLP2Hadrons_DpDz_LongLine',
+      'StrippingLLP2Hadrons_DpDp_LongLine',
+      'StrippingLLP2Hadrons_DzDz_LongLine',
+      'StrippingLLP2Hadrons_DzDzbar_LongLine',
+      'StrippingLLP2Hadrons_EtaPiPi_LongLine',
+      'StrippingLLP2Hadrons_KstKst_DownLine',
+      'StrippingLLP2Hadrons_KsKpi_DD_DownLine',
+      'StrippingLLP2Hadrons_DpDm_DownLine',
+      'StrippingLLP2Hadrons_DpDz_DownLine',
+      'StrippingLLP2Hadrons_DpDp_DownLine',
+      'StrippingLLP2Hadrons_DzDz_DownLine',
+      'StrippingLLP2Hadrons_DzDzbar_DownLine',
+      'StrippingLLP2Hadrons_EtaPiPi_DownLine',
+    ],
+  },
+  'CONFIG'      : {
+    'Common': {
+      'CommonTrackCuts': "(TRGHOSTPROB<0.3) & (P>3.*GeV) & (BPVIPCHI2() > 9.)",
+    },
+    'Prescales': {
+      'KstKst'        : 1.0,
+      'KsKpi'         : 1.0,
+      'DD'            : 1.0,
+      'EtaPiPi'       : 1.0,
+    },
+    'KstKst': {
+      'Long':{
+          'TrackCuts'     : "(PT>500*MeV)",
+          'K_id'          : "(PROBNNk  > 0.4)",
+          'Pi_id'         : "(PROBNNpi > 0.4)",
+          'KstCombCuts'   : "(ADAMASS('K*(892)0')<300*MeV)",
+          'KstMomCuts'    : "(VFASPF(VCHI2PDOF) < 9.) & (in_range( PDGM('K*(892)0') - 120*MeV , M , PDGM('K*(892)0') + 120*MeV ))",
+          'CombCuts'      : "AALL",
+          'MomCuts'       : "(VFASPF(VCHI2PDOF) < 9.) & (BPVDLS > 10) & (PT>2.*GeV) & (BPVIPCHI2() < 9.)"
+      },
+     'Down':{
+          'TrackCuts'     : "(PT>500*MeV)",
+          'KstCombCuts'   : "(ADAMASS('K*(892)0')<300*MeV)",
+          'KstMomCuts'    : "(VFASPF(VCHI2PDOF) < 9.) & (in_range( PDGM('K*(892)0') - 120*MeV , M , PDGM('K*(892)0') + 120*MeV ))",
+          'CombCuts'      : "AALL",
+          'MomCuts'       : "(VFASPF(VCHI2PDOF) < 9.) & (BPVDLS > 5)  & (VFASPF(VZ)>200*mm) & (PT>2.*GeV)"
+      },
+    },
+    'KsKpi_LL': {
+      'Long':{
+          'TrackCuts'    : "(PT > 700*MeV)", 
+          'K_id'         : "(PROBNNk  > 0.4)",
+          'Pi_id'        : "(PROBNNpi > 0.4)",
+          'Ks_PiCuts'    : "(MINTREE('pi-'==ABSID, PROBNNpi) > 0.4) & (MAXTREE('pi-'==ABSID, TRGHOSTPROB) < 0.3) & (MINTREE('pi-'==ABSID, MIPCHI2DV(PRIMARY)) > 9.) & (MINTREE('pi-'==ABSID, PT) > 500*MeV)",
+          'Ks_MomCuts'   : "(VFASPF(VCHI2PDOF) < 9.) & (BPVIPCHI2() > 9.) & (BPVDLS>5) & (ADMASS('KS0') < 30.*MeV)",
+          'CombCuts'     : "in_range(1.0*GeV, AM, 12.2*GeV)",
+          'MomCuts'      : "in_range(1.0*GeV, M, 12.0*GeV) & (VFASPF(VCHI2PDOF)<9.) & (BPVDLS>10) & (PT>2.*GeV) & (BPVIPCHI2()<9.) & (BPVLTIME()>1.5*picosecond)"
+      }
+    },
+    'KsKpi_DD': {
+        'Long':{
+          'TrackCuts'  : "(PT > 700*MeV)", 
+          'K_id'       : "(PROBNNk  > 0.4)",
+          'Pi_id'      : "(PROBNNpi > 0.4)",
+          'Ks_PiCuts'  : "(MAXTREE('pi-'==ABSID, TRGHOSTPROB) < 0.3) & (MINTREE('pi-'==ABSID, MIPCHI2DV(PRIMARY)) > 9.) & (MINTREE('pi-'==ABSID, PT) > 500*MeV)",
+          'Ks_MomCuts' : "(VFASPF(VCHI2PDOF) < 9.) & (ADMASS('KS0') < 30.*MeV) & (BPVIPCHI2() > 9.)",
+          'CombCuts'   : "in_range(1.0*GeV, AM, 12.2*GeV)",
+          'MomCuts'    : "in_range(1.0*GeV, M, 12.0*GeV) & (VFASPF(VCHI2PDOF) < 9.) & (BPVDLS>5) & (PT>2.*GeV) & (BPVIPCHI2() < 9.) & (BPVLTIME()>1.*picosecond)"
+        },
+        'Down':{
+          'TrackCuts'  : "(PT>700*MeV)", 
+          'Ks_PiCuts'  : "(MAXTREE('pi-'==ABSID, TRGHOSTPROB) < 0.3) & (MINTREE('pi-'==ABSID, PT) > 500*MeV)",
+          'Ks_MomCuts' : "(VFASPF(VCHI2PDOF) < 9.) & (ADMASS('KS0') < 50.*MeV) & (BPVIPCHI2() > 9.) & (MINTREE('pi-'==ABSID, PT) > 500*MeV)",
+          'CombCuts'   : "AM>1.*GeV",
+          'MomCuts'    : "(VFASPF(VCHI2PDOF) < 9.) & (BPVDLS>5)  & (VFASPF(VZ)>200*mm) & (BPVIPCHI2() < 9.)"
+        },      
+    },
+    'DD': {
+        'Long':{
+          'TrackCuts'  : "(PT > 500*MeV)", 
+          'K_id'       : "(PROBNNk  > 0.2)",
+          'Pi_id'      : "(PROBNNpi > 0.2)",
+          'DCombCuts'  : "in_range(1.0*GeV, AM, 3.*GeV)",
+          'DMomCuts'   : "(ADMASS('D+') < 80.*MeV) & (VFASPF(VCHI2PDOF) < 9.) & (BPVIPCHI2() > 4.)",
+          'CombCuts'   : "(AM>3.0*GeV)",
+          'MomCuts'    : "(M>3.0*GeV) & (VFASPF(VCHI2PDOF) < 9.) & (PT>1.*GeV) & (BPVDLS>5)"
+        },
+        'Down':{
+          'TrackCuts'  : "(PT>500*MeV)", 
+          'DCombCuts'  : "in_range(1.0*GeV, AM, 3.*GeV)",
+          'DMomCuts'   : "(ADMASS('D+') < 150.*MeV) & (VFASPF(VCHI2PDOF) < 9.) & (BPVIPCHI2() > 9.)",
+          'CombCuts'   : "(AM>3.0*GeV)",
+          'MomCuts'    : "(M>3.0*GeV) & (PT>1.*GeV) & (VFASPF(VCHI2PDOF) < 9.) & (BPVDLS>3) & (VFASPF(VZ)>200*mm)"        
+        },
+    },
+    'EtaPiPi': {
+        'Long':{
+          'TrackCuts'  : "(PT>500*MeV)",
+          'Pi_id'      : "(PROBNNpi > 0.4)",
+          'Pi0_cuts'   : "(PT>600*MeV)",
+          'EtaCombCuts': "(AM<1*GeV)",
+          'EtaMomCuts' : "(ADMASS('eta') < 100.*MeV) & (VFASPF(VCHI2PDOF) < 9.)",
+          'CombCuts'   : "AALL",
+          'MomCuts'    : "(VFASPF(VCHI2PDOF) < 9.) & (PT>2.*GeV) & (BPVDLS>5) & (BPVIPCHI2() < 9.) & (M<2.5*GeV) & (BPVLTIME()>1.5*picosecond)"
+        },
+        'Down':{
+          'TrackCuts'  : "(PT>500*MeV)",
+          'Pi0_cuts'   : "(PT > 600*MeV)",
+          'EtaCombCuts': "AALL",
+          'EtaMomCuts' : "(ADMASS('eta') < 100.*MeV) & (VFASPF(VCHI2PDOF) < 9.)",
+          'CombCuts'   : "AALL",
+          'MomCuts'    : "(VFASPF(VCHI2PDOF) < 9.) & (BPVDLS>5) & (VFASPF(VZ)>200*mm) & (M<2.5*GeV)"
+        },
+    },
+  },
+}
+
+
+#===============================================================================
+
+class LLP2HadronsConf(LineBuilder):
+
+  __configuration_keys__ = default_config['CONFIG'].keys()  # Legacy field
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+
+    ## Inject 'Common' into all other confs
+    d = config.pop('Common')
+
+    prescales = config['Prescales']
+    decays = ['KsKpi_LL','KsKpi_DD','DD','EtaPiPi','KstKst']
+    for key in decays:
+      for tr_type in config[key]:
+        config[key][tr_type].update(d)
+
+    ## Register lines
+    self.EtaPiPi(confs=config['EtaPiPi'])
+    self.KstKst(confs=config['KstKst'])
+    self.KsKpi(confs={"LL": config['KsKpi_LL'], "DD": config['KsKpi_DD']})
+    self.DoubleCharm(confs=config['DD']) 
+
+    self.LLP2EtaPiPi_LongLine = StrippingLine( name+'_EtaPiPi_LongLine', 
+                                          selection = self.SelLLP2EtaPiPi_3pi_Long,
+                                          prescale  = prescales['EtaPiPi'])
+    self.registerLine(self.LLP2EtaPiPi_LongLine)
+
+
+    self.LLP2KstKst_LongLine  = StrippingLine( name+'_KstKst_LongLine', 
+                                          selection = self.SelLLP2KstKst_Long,
+                                          prescale  = prescales['KstKst'])
+    self.registerLine(self.LLP2KstKst_LongLine)
+
+
+    self.LLP2KsKpi_DD_LongLine = StrippingLine( name+'_KsKpi_DD_LongLine', 
+                                          selection = self.SelLLP2KsKpi_DD_Long,
+                                          prescale  = prescales['KsKpi'])
+    self.registerLine( self.LLP2KsKpi_DD_LongLine)
+
+
+    self.LLP2DD_DpDm_LongLine  = StrippingLine( name+'_DpDm_LongLine',
+                                          selection = self.SelLLP2DD_DpDm_Long,
+                                          prescale  = prescales['DD'])
+    self.registerLine(self.LLP2DD_DpDm_LongLine)
+
+
+    self.LLP2DD_DpDp_LongLine  = StrippingLine( name+'_DpDp_LongLine',
+                                          selection = self.SelLLP2DD_DpDp_Long,
+                                          prescale  = prescales['DD'])
+    self.registerLine(self.LLP2DD_DpDp_LongLine)
+
+    self.LLP2DD_DzDz_LongLine  = StrippingLine( name+'_DzDz_LongLine',
+                                          selection = self.SelLLP2DD_DzDz_Long,
+                                          prescale  = prescales['DD'])
+    self.registerLine(self.LLP2DD_DzDz_LongLine)
+
+    self.LLP2DD_DzDzbar_LongLine  = StrippingLine( name+'_DzDzbar_LongLine',
+                                          selection = self.SelLLP2DD_DzDzbar_Long,
+                                          prescale  = prescales['DD'])
+    self.registerLine(self.LLP2DD_DzDzbar_LongLine)
+
+    self.LLP2DD_DpDz_LongLine  = StrippingLine( name+'_DpDz_LongLine',
+                                          selection = self.SelLLP2DD_DpDz_Long,
+                                          prescale  = prescales['DD'])
+    self.registerLine(self.LLP2DD_DpDz_LongLine)
+
+
+    # ==========================================================================================
+    self.LLP2KsKpi_LL_LongLine = StrippingLine( name+'_KsKpi_LL_LongLine',
+                                          selection = self.SelLLP2KsKpi_LL_Long,
+                                          prescale  = prescales['KsKpi'])
+    self.registerLine(self.LLP2KsKpi_LL_LongLine)
+    # ==========================================================================================
+
+      
+    self.LLP2EtaPiPi_DownLine = StrippingLine( name+'_EtaPiPi_DownLine', 
+                                          selection = self.SelLLP2EtaPiPi_3pi_Down,
+                                          prescale  = prescales['EtaPiPi'])
+    self.registerLine(self.LLP2EtaPiPi_DownLine)
+
+
+    self.LLP2KstKst_DownLine  = StrippingLine( name+'_KstKst_DownLine', 
+                                          selection = self.SelLLP2KstKst_Down,
+                                          prescale  = prescales['KstKst'])
+    self.registerLine(self.LLP2KstKst_DownLine)
+
+
+    self.LLP2KsKpi_DD_DownLine = StrippingLine( name+'_KsKpi_DD_DownLine', 
+                                          selection = self.SelLLP2KsKpi_DD_Down,
+                                          prescale  = prescales['KsKpi'])
+    self.registerLine( self.LLP2KsKpi_DD_DownLine)
+
+
+    self.LLP2DD_DpDm_DownLine  = StrippingLine( name+'_DpDm_DownLine',
+                                          selection = self.SelLLP2DD_DpDm_Down,
+                                          prescale  = prescales['DD'])
+    self.registerLine(self.LLP2DD_DpDm_DownLine)
+
+
+    self.LLP2DD_DpDp_DownLine  = StrippingLine( name+'_DpDp_DownLine',
+                                          selection = self.SelLLP2DD_DpDp_Down,
+                                          prescale  = prescales['DD'])
+    self.registerLine(self.LLP2DD_DpDp_DownLine)
+
+    self.LLP2DD_DzDz_DownLine  = StrippingLine( name+'_DzDz_DownLine',
+                                          selection = self.SelLLP2DD_DzDz_Down,
+                                          prescale  = prescales['DD'])
+    self.registerLine(self.LLP2DD_DzDz_DownLine)
+
+    self.LLP2DD_DzDzbar_DownLine  = StrippingLine( name+'_DzDzbar_DownLine',
+                                          selection = self.SelLLP2DD_DzDzbar_Down,
+                                          prescale  = prescales['DD'])
+    self.registerLine(self.LLP2DD_DzDzbar_DownLine)
+
+    self.LLP2DD_DpDz_DownLine  = StrippingLine( name+'_DpDz_DownLine',
+                                          selection = self.SelLLP2DD_DpDz_Down,
+                                          prescale  = prescales['DD'])
+    self.registerLine(self.LLP2DD_DpDz_DownLine)
+
+
+
+  def createSubSel(self, OutputList, InputList, Cuts):
+    '''create a selection using a FilterDesktop'''
+    filt = FilterDesktop(Code=Cuts)
+    return Selection(
+        OutputList, Algorithm=filt, RequiredSelections=[InputList])
+
+  def createCombinationSel( self,
+                            OutputList,
+                            DecayDescriptor,
+                            DaughterLists,
+                            DaughterCuts={},
+                            PreVertexCuts="ALL",
+                            PostVertexCuts="ALL",
+                            ReFitPVs=False):
+    '''create a selection using a ParticleCombiner with a single decay descriptor'''
+    combiner = CombineParticles(
+        DecayDescriptor=DecayDescriptor,
+        DaughtersCuts=DaughterCuts,
+        MotherCut=PostVertexCuts,
+        CombinationCut=PreVertexCuts,
+        ReFitPVs=ReFitPVs)
+    return Selection(OutputList, Algorithm=combiner, RequiredSelections=DaughterLists)
+
+  def sel_Long_kaons(self, conf, name=""):
+    return self.createSubSel(
+                OutputList=name,
+                InputList=AutomaticData(Location='Phys/StdAllNoPIDsKaons/Particles'),
+                Cuts=conf['CommonTrackCuts']+" & "+conf['TrackCuts']+" & "+conf['K_id'])
+
+  def sel_Down_kaons(self, conf, name=""):
+    return self.createSubSel(
+          OutputList=name,
+          InputList=AutomaticData(Location='Phys/StdNoPIDsDownKaons/Particles'),
+          Cuts=conf['CommonTrackCuts']+" & "+conf['TrackCuts'])
+
+  def sel_Long_pions(self, conf, name=""):
+    return self.createSubSel(
+                OutputList=name,
+                InputList=AutomaticData(Location='Phys/StdAllNoPIDsPions/Particles'),
+                Cuts=conf['CommonTrackCuts']+" & "+conf['TrackCuts']+" & "+conf['Pi_id'])
+
+  def sel_Down_pions(self, conf, name=""):
+    return self.createSubSel(
+                OutputList=name,
+                InputList=AutomaticData(Location='Phys/StdNoPIDsDownPions/Particles'),
+                Cuts=conf['CommonTrackCuts']+" & "+conf['TrackCuts'])
+
+
+  def KstKst( self, confs ):
+
+    self.SelKaons4KstKst_Long = self.sel_Long_kaons(conf=confs['Long'], name="SelKaons_KstKst_Long")
+    self.SelPions4KstKst_Long = self.sel_Long_pions(conf=confs['Long'], name="SelPions_KstKst_Long")
+
+    self.SelKst_Long = self.createCombinationSel(
+          OutputList="SelKst_Long",
+          DecayDescriptor="[K*(892)0 -> K+ pi-]cc",
+          DaughterLists=[self.SelKaons4KstKst_Long,self.SelPions4KstKst_Long],
+          PreVertexCuts=confs['Long']['KstCombCuts'],
+          PostVertexCuts=confs['Long']['KstMomCuts'])
+
+    self.SelLLP2KstKst_Long = self.createCombinationSel(
+          OutputList="SelLLP2KstKst_Long",
+          DecayDescriptor="B0 -> K*(892)0 K*(892)~0",
+          DaughterLists=[self.SelKst_Long],
+          PreVertexCuts=confs['Long']['CombCuts'],
+          PostVertexCuts=confs['Long']['MomCuts']) 
+
+    self.SelKaons4KstKst_Down = self.sel_Down_kaons(conf=confs['Down'], name="SelKaons_KstKst_Down")
+    self.SelPions4KstKst_Down = self.sel_Down_pions(conf=confs['Down'], name="SelPions_KstKst_Down")
+
+    self.SelKst_Down = self.createCombinationSel(
+          OutputList="SelKst_Down",
+          DecayDescriptor="[K*(892)0 -> K+ pi-]cc",
+          DaughterLists=[self.SelKaons4KstKst_Down,self.SelPions4KstKst_Down],
+          PreVertexCuts=confs['Down']['KstCombCuts'],
+          PostVertexCuts=confs['Down']['KstMomCuts'])
+
+    self.SelLLP2KstKst_Down = self.createCombinationSel(
+          OutputList="SelLLP2KstKst_Down",
+          DecayDescriptor="B0 -> K*(892)0 K*(892)~0",
+          DaughterLists=[self.SelKst_Down],
+          PreVertexCuts=confs['Down']['CombCuts'],
+          PostVertexCuts=confs['Down']['MomCuts'])
+
+  def EtaPiPi(self, confs ):
+
+    self.MergedPiz4EtaPiPi = MergedSelection(
+            "MergedPiz4EtaPiPi",
+            RequiredSelections=[
+                AutomaticData(Location="Phys/StdLooseResolvedPi0/Particles"),
+                AutomaticData(Location="Phys/StdLooseMergedPi0/Particles")
+            ])
+
+    self.SelPions4EtaPiPi_Long = self.sel_Long_pions(conf=confs['Long'], name="SelPions_EtaPiPi_Long")
+    self.SelPiz4EtaPiPi_Long = self.createSubSel(
+            OutputList="SelPiz_EtaPiPi_Long",
+            InputList=self.MergedPiz4EtaPiPi,
+            Cuts=confs['Long']['Pi0_cuts'])
+    self.SelEta_3pi_Long = self.createCombinationSel(
+          OutputList="SelEta_Long",
+          DecayDescriptor="eta -> pi+ pi- pi0",
+          DaughterLists=[self.SelPiz4EtaPiPi_Long, self.SelPions4EtaPiPi_Long],
+          PreVertexCuts=confs['Long']['EtaCombCuts'],
+          PostVertexCuts=confs['Long']['EtaMomCuts'])
+    self.SelLLP2EtaPiPi_3pi_Long = self.createCombinationSel(
+          OutputList="SelLLP2EtaPiPi_3pi_Long",
+          DecayDescriptor="B0 -> eta pi+ pi-",
+          DaughterLists=[self.SelEta_3pi_Long, self.SelPions4EtaPiPi_Long],
+          PreVertexCuts=confs['Long']['CombCuts'],
+          PostVertexCuts=confs['Long']['MomCuts'])
+
+
+    self.SelPions4EtaPiPi_Down = self.sel_Down_pions(conf=confs['Down'], name="SelPions_EtaPiPi_Down")
+    self.SelPiz4EtaPiPi_Down = self.createSubSel(
+            OutputList="SelPiz_EtaPiPi_Down",
+            InputList=self.MergedPiz4EtaPiPi,
+            Cuts=confs['Down']['Pi0_cuts'])
+    self.SelEta_3pi_Down = self.createCombinationSel(
+          OutputList="SelEta_Down",
+          DecayDescriptor="eta -> pi+ pi- pi0",
+          DaughterLists=[self.SelPiz4EtaPiPi_Down, self.SelPions4EtaPiPi_Down],
+          PreVertexCuts=confs['Down']['EtaCombCuts'],
+          PostVertexCuts=confs['Down']['EtaMomCuts'])
+    self.SelLLP2EtaPiPi_3pi_Down = self.createCombinationSel(
+          OutputList="SelLLP2EtaPiPi_3pi_Down",
+          DecayDescriptor="B0 -> eta pi+ pi-",
+          DaughterLists=[self.SelEta_3pi_Down, self.SelPions4EtaPiPi_Down],
+          PreVertexCuts=confs['Down']['CombCuts'],
+          PostVertexCuts=confs['Down']['MomCuts'])
+
+
+  def KsKpi( self, confs ):
+
+    self.SelKaons4KsKpi_LL_Long = self.sel_Long_kaons(conf=confs['LL']['Long'], name="SelKaons_KsKpi_LL_Long")
+    self.SelPions4KsKpi_LL_Long = self.sel_Long_pions(conf=confs['LL']['Long'], name="SelPions_KsKpi_LL_Long")
+
+    self.SelKs4KsKpi_LL_Long = self.createSubSel(
+        OutputList="SelKs_LL_Long",
+        InputList=AutomaticData(Location="Phys/StdVeryLooseKsLL/Particles"),
+        Cuts=confs['LL']['Long']['Ks_PiCuts']+" & "+confs['LL']['Long']['Ks_MomCuts'])
+
+    self.SelLLP2KsKpi_LL_Long = self.createCombinationSel(
+        OutputList="SelLLP2KsKpi_LL_Long",
+        DecayDescriptor="[B0 -> KS0 K+ pi-]cc",
+        DaughterLists=[self.SelKs4KsKpi_LL_Long, self.SelKaons4KsKpi_LL_Long, self.SelPions4KsKpi_LL_Long],
+        PreVertexCuts=confs['LL']['Long']['CombCuts'],
+        PostVertexCuts=confs['LL']['Long']['MomCuts'])
+
+
+    self.SelKaons4KsKpi_DD_Long = self.sel_Down_kaons(conf=confs['DD']['Long'], name="SelKaons_KsKpi_DD_Long")
+    self.SelPions4KsKpi_DD_Long = self.sel_Down_pions(conf=confs['DD']['Long'], name="SelPions_KsKpi_DD_Long")
+
+    self.SelKs4KsKpi_DD_Long = self.createSubSel(
+        OutputList="SelKs_DD_Long",
+        InputList=AutomaticData(Location="Phys/StdLooseKsDD/Particles"),
+        Cuts=confs['DD']['Long']['Ks_PiCuts']+" & "+confs['DD']['Long']['Ks_MomCuts'])
+
+    self.SelLLP2KsKpi_DD_Long = self.createCombinationSel(
+        OutputList="SelLLP2KsKpi_DD_Long",
+        DecayDescriptor="[B0 -> KS0 K+ pi-]cc",
+        DaughterLists=[self.SelKs4KsKpi_DD_Long, self.SelKaons4KsKpi_DD_Long, self.SelPions4KsKpi_DD_Long],
+        PreVertexCuts=confs['DD']['Long']['CombCuts'],
+        PostVertexCuts=confs['DD']['Long']['MomCuts'])
+
+
+    self.SelKaons4KsKpi_DD_Down = self.sel_Down_kaons(conf=confs['DD']['Down'], name="SelKaons_KsKpi_DD_Down")
+    self.SelPions4KsKpi_DD_Down = self.sel_Down_pions(conf=confs['DD']['Down'], name="SelPions_KsKpi_DD_Down")
+
+    self.SelKs4KsKpi_DD_Down = self.createSubSel(
+        OutputList="SelKs_DD_Down",
+        InputList=AutomaticData(Location="Phys/StdLooseKsDD/Particles"),
+        Cuts=confs['DD']['Down']['Ks_PiCuts']+" & "+confs['DD']['Down']['Ks_MomCuts'])
+
+    self.SelLLP2KsKpi_DD_Down = self.createCombinationSel(
+        OutputList="SelLLP2KsKpi_DD_Down",
+        DecayDescriptor="[B0 -> KS0 K+ pi-]cc",
+        DaughterLists=[self.SelKs4KsKpi_DD_Down, self.SelKaons4KsKpi_DD_Down, self.SelPions4KsKpi_DD_Down],
+        PreVertexCuts=confs['DD']['Down']['CombCuts'],
+        PostVertexCuts=confs['DD']['Down']['MomCuts'])
+
+
+
+  def DoubleCharm( self, confs ):
+
+    self.SelKaons4DD_Long = self.sel_Long_kaons(conf=confs['Long'], name="SelKaons_DoubleD_Long")
+    self.SelPions4DD_Long = self.sel_Long_pions(conf=confs['Long'], name="SelPions_DoubleD_Long")
+
+    self.SelDp_Long = self.createCombinationSel(
+          OutputList="SelDp_Long",
+          DecayDescriptor="[D+ -> K- pi+ pi+]cc",
+          DaughterLists=[self.SelKaons4DD_Long, self.SelPions4DD_Long],
+          PreVertexCuts=confs['Long']['DCombCuts'],
+          PostVertexCuts=confs['Long']['DMomCuts'])
+
+    self.SelDz_Long = self.createCombinationSel(
+          OutputList="SelDz_Long",
+          DecayDescriptor="[D0 -> K- pi+]cc",
+          DaughterLists=[self.SelKaons4DD_Long, self.SelPions4DD_Long],
+          PreVertexCuts=confs['Long']['DCombCuts'],
+          PostVertexCuts=confs['Long']['DMomCuts'])
+
+    self.SelKaons4DD_Down = self.sel_Down_kaons(conf=confs['Down'], name="SelKaons_DoubleD_Down")
+    self.SelPions4DD_Down = self.sel_Down_pions(conf=confs['Down'], name="SelPions_DoubleD_Down")
+
+    self.SelDp_Down = self.createCombinationSel(
+          OutputList="SelDp_Down",
+          DecayDescriptor="[D+ -> K- pi+ pi+]cc",
+          DaughterLists=[self.SelKaons4DD_Down, self.SelPions4DD_Down],
+          PreVertexCuts=confs['Down']['DCombCuts'],
+          PostVertexCuts=confs['Down']['DMomCuts'])
+
+    self.SelDz_Down = self.createCombinationSel(
+          OutputList="SelDz_Down",
+          DecayDescriptor="[D0 -> K- pi+]cc",
+          DaughterLists=[self.SelKaons4DD_Down, self.SelPions4DD_Down],
+          PreVertexCuts=confs['Down']['DCombCuts'],
+          PostVertexCuts=confs['Down']['DMomCuts'])
+
+
+    descriptors = {
+      "DpDm": "Upsilon(1S) -> D+ D-",
+      "DpDp": "[Upsilon(1S) -> D+ D+]cc",
+      "DpDz": "[Upsilon(1S) -> D+ D0]cc",
+      "DzDzbar": "Upsilon(1S) -> D0 D~0",
+      "DzDz": "[Upsilon(1S) -> D0 D0]cc"
+    }
+
+    self.SelLLP2DD_DpDm_Long = self.createCombinationSel(
+        OutputList="SelLLP2DD_DpDm_Long",
+        DecayDescriptor=descriptors["DpDm"],
+        DaughterLists=[self.SelDp_Long],
+        PreVertexCuts=confs['Long']['CombCuts'],
+        PostVertexCuts=confs['Long']['MomCuts'])
+
+    self.SelLLP2DD_DpDp_Long = self.createCombinationSel(
+        OutputList="SelLLP2DD_DpDp_Long",
+        DecayDescriptor=descriptors["DpDp"],
+        DaughterLists=[self.SelDp_Long],
+        PreVertexCuts=confs['Long']['CombCuts'],
+        PostVertexCuts=confs['Long']['MomCuts'])
+
+    self.SelLLP2DD_DpDz_Long = self.createCombinationSel(
+        OutputList="SelLLP2DD_DpDz_Long",
+        DecayDescriptor=descriptors["DpDz"],
+        DaughterLists=[self.SelDz_Long, self.SelDp_Long],
+        PreVertexCuts=confs['Long']['CombCuts'],
+        PostVertexCuts=confs['Long']['MomCuts'])
+
+    self.SelLLP2DD_DzDz_Long = self.createCombinationSel(
+        OutputList="SelLLP2DD_DzDz_Long",
+        DecayDescriptor=descriptors["DzDz"],
+        DaughterLists=[self.SelDz_Long],
+        PreVertexCuts=confs['Long']['CombCuts'],
+        PostVertexCuts=confs['Long']['MomCuts'])
+
+    self.SelLLP2DD_DzDzbar_Long = self.createCombinationSel(
+        OutputList="SelLLP2DD_DzDzbar_Long",
+        DecayDescriptor=descriptors["DzDzbar"],
+        DaughterLists=[self.SelDz_Long],
+        PreVertexCuts=confs['Long']['CombCuts'],
+        PostVertexCuts=confs['Long']['MomCuts'])
+
+    # ============================================================================
+      
+    self.SelLLP2DD_DpDm_Down = self.createCombinationSel(
+        OutputList="SelLLP2DD_DpDm_Down",
+        DecayDescriptor=descriptors["DpDm"],
+        DaughterLists=[self.SelDp_Down],
+        PreVertexCuts=confs['Down']['CombCuts'],
+        PostVertexCuts=confs['Down']['MomCuts'])
+
+    self.SelLLP2DD_DpDp_Down = self.createCombinationSel(
+        OutputList="SelLLP2DD_DpDp_Down",
+        DecayDescriptor=descriptors["DpDp"],
+        DaughterLists=[self.SelDp_Down],
+        PreVertexCuts=confs['Down']['CombCuts'],
+        PostVertexCuts=confs['Down']['MomCuts'])
+
+    self.SelLLP2DD_DpDz_Down = self.createCombinationSel(
+        OutputList="SelLLP2DD_DpDz_Down",
+        DecayDescriptor=descriptors["DpDz"],
+        DaughterLists=[self.SelDz_Down, self.SelDp_Down],
+        PreVertexCuts=confs['Down']['CombCuts'],
+        PostVertexCuts=confs['Down']['MomCuts'])
+
+    self.SelLLP2DD_DzDz_Down = self.createCombinationSel(
+        OutputList="SelLLP2DD_DzDz_Down",
+        DecayDescriptor=descriptors["DzDz"],
+        DaughterLists=[self.SelDz_Down],
+        PreVertexCuts=confs['Down']['CombCuts'],
+        PostVertexCuts=confs['Down']['MomCuts'])
+
+    self.SelLLP2DD_DzDzbar_Down = self.createCombinationSel(
+        OutputList="SelLLP2DD_DzDzbar_Down",
+        DecayDescriptor=descriptors["DzDzbar"],
+        DaughterLists=[self.SelDz_Down],
+        PreVertexCuts=confs['Down']['CombCuts'],
+        PostVertexCuts=confs['Down']['MomCuts'])
+
+
+
+
+    
+
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2Jets.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2Jets.py
new file mode 100644
index 000000000..651f9dfba
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2Jets.py
@@ -0,0 +1,131 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping lines for dark pions
+into displaced jets analysis
+'''
+
+__author__ = ['Igor Kostiuk', 'Wouter Hulsbergen', 'Carlos Vazquez Sierra']
+__date__ = '25/01/2019'
+
+__all__ = ('LLP2Jets_sConf','default_config')
+
+from Gaudi.Configuration import *
+from Configurables import JetVertexAlg
+from StandardParticles import StdJets
+from CommonParticles.Utils import updateDoD
+from PhysSelPython.Wrappers import LimitSelection, FilterSelection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import GeV, mm
+
+default_config = {
+    'NAME'              : 'LLP2Jets',
+    'WGs'               : ['QEE'],
+    'BUILDERTYPE'       : 'LLP2Jets_sConf',
+    'CONFIG'    : {
+                         'MINJETS'                : 2
+                 ,       'MAXJETS'                : 1.e+10
+                 ,       'NDISPLONG_NOVX'         : 4
+                 ,       'NDISPLONG_HM'           : 5
+                 ,       'NDISPLONG_LM'           : 5
+                 ,       'MIN_IPCHI2'             : 25
+                 ,       'JET_PT_NOVX'            : 10*GeV
+                 ,       'JET_PT_HM'              : 10*GeV
+                 ,       'JET_PT_LM'              : 15*GeV
+                 ,       'D0DISP'                 : 0.9*mm
+                 ,       'BSRHODISP'              : 0.6*mm
+                 ,       'MINGD_HM'               : 9
+                 ,       'MINGD_LM'               : 7
+                 ,       'MINDAUGS_LM'            : 3
+                 ,       'SinglePrescale'         : 0.01
+                 ,       'DoublePrescale'         : 1.0
+                 ,       'SingleHighMassPrescale' : 1.0
+                 ,       'SingleLowMassPrescale'  : 1.0
+                 ,       'gtrk'                   : 'ISBASIC & HASTRACK & ISLONG'
+                 ,       'RawBanks'               : ['Calo', 'Trigger', 'Velo', 'Tracker']
+                         },
+    'STREAMS' : ['BhadronCompleteEvent']
+    }
+
+### Lines stored in this file:
+# StrippingLLP2JetsSingleLine
+# StrippingLLP2JetsDoubleLine
+# StrippingLLP2JetsSingleHighMassLine
+# StrippingLLP2JetsSingleLowMassLine
+
+class LLP2Jets_sConf(LineBuilder) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+        self.makeLLP2Jets()
+
+    ### Stripping lines:
+
+    def makeLLP2Jets( self ):
+
+        ### Single line with loose cuts
+
+        NoVtxJets = FilterSelection( "NoVtxJets" + self.name, StdJets,
+            Code = ("(PT > %(JET_PT_NOVX)s)"
+                    "& (NINTREE(%(gtrk)s & (%(MIN_IPCHI2)s < MIPCHI2DV(PRIMARY))) > %(NDISPLONG_NOVX)s)")
+                     % self.config )
+
+        SingleLine = StrippingLine( self.name + "SingleLine", algos = [ NoVtxJets ],
+            RequiredRawEvents = self.config['RawBanks'], prescale = self.config['SinglePrescale'] )
+
+        ### Double line with the same cuts as the Single line
+
+        NoVtxJetsDouble = LimitSelection( NoVtxJets, maxsize = self.config['MAXJETS'], minsize = self.config['MINJETS'] )
+
+        DoubleLine = StrippingLine( self.name + "DoubleLine", algos = [ NoVtxJetsDouble ],
+            RequiredRawEvents = self.config['RawBanks'], prescale = self.config['DoublePrescale'] )
+
+        ### Algorithm to look for vertices in jets
+
+        jetVertexAlg = JetVertexAlg( "JetVertex" + self.name,
+                             Input = StdJets.outputLocation(), Output = "Phys/StdJetsVtxAlg/Particles" )
+
+        StdJetVtxAlg = updateDoD( jetVertexAlg, name="StdJetsVtxAlg" )
+
+        StdJetVtx = DataOnDemand( Location = StdJetVtxAlg.keys()[0] )
+
+        ### Single line with cuts on the number of jets granddaughters
+
+        VtxJetsHighMass = FilterSelection( "VtxJetsHighMass" + self.name, StdJetVtx,
+            Code = ("(PT > %(JET_PT_HM)s)"
+                    "& (NINTREE(%(gtrk)s & (%(MIN_IPCHI2)s < MIPCHI2DV(PRIMARY))) > %(NDISPLONG_HM)s)"
+                    "& (SUMTREE( ('D0'==ABSID) & (%(D0DISP)s < abs(VFASPF(VX_BEAMSPOTRHO(%(BSRHODISP)s)))), NDAUGS) >= %(MINGD_HM)s)")
+                     % self.config )
+
+        SingleHighMassLine = StrippingLine( self.name + "SingleHighMassLine", algos = [ VtxJetsHighMass ],
+            RequiredRawEvents = self.config['RawBanks'], prescale = self.config['SingleHighMassPrescale'] )
+
+        ### Single line with cuts on the number of jets granddaughters and daughters
+
+        VtxJetsLowMass = FilterSelection( "VtxJetsLowMass" + self.name, StdJetVtx,
+            Code = ("(PT > %(JET_PT_LM)s)"
+                    "& (NINTREE(%(gtrk)s & (%(MIN_IPCHI2)s < MIPCHI2DV(PRIMARY))) > %(NDISPLONG_LM)s)"
+                    "& (NINGENERATION( ('D0'==ABSID) & (%(D0DISP)s< abs(VFASPF(VX_BEAMSPOTRHO(%(BSRHODISP)s)))), 1) >= %(MINDAUGS_LM)s)"
+                    "& (SUMTREE( ('D0'==ABSID) & (%(D0DISP)s < abs(VFASPF(VX_BEAMSPOTRHO(%(BSRHODISP)s)))), NDAUGS ) >= %(MINGD_LM)s)")
+                     % self.config )
+
+        SingleLowMassLine = StrippingLine( self.name + "SingleLowMassLine", algos = [ VtxJetsLowMass ],
+            RequiredRawEvents = self.config['RawBanks'], prescale = self.config['SingleLowMassPrescale'] )
+
+        self.registerLine(SingleLine)
+        self.registerLine(DoubleLine)
+        self.registerLine(SingleHighMassLine)
+        self.registerLine(SingleLowMassLine)
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2MuX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2MuX.py
new file mode 100644
index 000000000..748f64586
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLLP2MuX.py
@@ -0,0 +1,63 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Configuration for the high-PT displaced muon line (for exotic long-lived particle decays with neutralino, and jet studies)
+"""
+__author__  = "Pieter David"
+__date__    = "2014-08-28"
+__all__     = ("LLP2MuXConf", "default_config")
+
+from LHCbKernel.Configuration import *
+from GaudiKernel import SystemOfUnits as units
+
+from PhysSelPython.Wrappers import AutomaticData, Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+
+default_config= {
+    'NAME'        : 'LLP2MuX',
+    'BUILDERTYPE' : 'LLP2MuXConf',
+    'STREAMS'     : [ 'EW'  ],
+    'WGs'         : [ 'QEE' ],
+    'CONFIG'      : { 
+        "MinPT"     : 12.00*units.GeV,
+        "MinIP"     :  0.25*units.mm,
+#        "L0DU"      : "L0_CHANNEL('Muon')",
+#        "HLT1"      : "HLT_PASS_RE('Hlt1.*SingleMuonHighPTDecision')",
+#        "HLT2"      : "HLT_PASS_RE('Hlt2.*SingleMuon.*High.*Decision')",  # Prepare for new Hlt2EW name
+        #'RawEvents' : ["Trigger","Muon","Calo","Rich"], ## FIXME "Velo" and "Tracker"
+    },
+}
+
+class LLP2MuXConf(LineBuilder):
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ):
+        LineBuilder.__init__( self, name, config )
+
+        allLooseMuons = AutomaticData("Phys/StdAllLooseMuons/Particles")
+
+        muonSel = Selection( "%sMuonSelection" % self.name(),
+                    RequiredSelections = [ allLooseMuons ],
+                    Algorithm = FilterDesktop( Code = "( PT > %(MinPT)f ) & ( MIPDV('') > %(MinIP)f )" % config )
+                    )
+
+        testLine = StrippingLine( "%sHighPTHighIPMuonLine" % self.name(),
+                        selection = muonSel,
+#                        L0DU = config['L0DU'],
+#                        HLT1 = config['HLT1'],
+#                        HLT2 = config['HLT2'],
+                        #RequiredRawEvents = config['RawEvents'],
+                        )
+
+        self.registerLine(testLine)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLambdaDecaysDM.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLambdaDecaysDM.py
new file mode 100644
index 000000000..4e3bf4e78
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLambdaDecaysDM.py
@@ -0,0 +1,633 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+
+"""
+Lines for searches on DM candidates produced from Lambda decays (arXiv:2101.02706).
+"""
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+
+from CommonParticles.Utils import *
+from CommonParticles import StdAllNoPIDsPions
+from StandardParticles import StdAllLooseKaons, StdAllLooseProtons, StdAllLoosePions
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, picosecond, millimeter
+
+__author__  = ['Xabier Cid Vidal', 'Carlos Vazquez Sierra', 'Saul Lopez Solino']
+__date__    = '18/03/2021'
+__all__     = 'LambdaDecaysDMConf', 'default_config'
+
+default_config = {
+  'NAME'        : 'LambdaDecaysDM',
+  'BUILDERTYPE' : 'LambdaDecaysDMConf',
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : [ 'BhadronCompleteEvent' ],
+  'CONFIG'      : {
+    'Common': {
+              'checkPV'        : False
+              },
+    'StrippingDMLambda1520Line': {
+              'Prescale'            : 1.0,
+              'Postscale'           : 1.0,
+              'Prescale_control'    : 0.1,
+              'Postscale_control'   : 1.0,
+              'Lambda1520_PT'       : 1000*MeV,
+              'Lambda1520_iso'      : 0.85,
+              'Lambda1520_ProbNNK'  : 0.5,
+              'Lambda1520_ProbNNp'  : 0.8,
+              'Lambda1520_Daug_PT'  : 500*MeV,
+              'Lambda1520_GhostProb': 0.3,
+              'Lambda1520_IPChi2'   : 25,
+              'Lambda1520_VChi2'    :  2,
+              'Lambda1520_M_Min'    : 1460,
+              'Lambda1520_M_Max'    : 1580,
+              'Lambda1520_FDChi2'   : 45,
+              'Lambda1520_MaxDoca'  : 0.1*millimeter,
+              },
+    'StrippingDMLambdaToPiPiLine': {
+              'Prescale'            : 1.0,
+              'Postscale'           : 1.0,
+              'Prescale_control'    : 0.1,
+              'Postscale_control'   : 1.0,
+              'LambdaToPiPi_PT'          : 1000*MeV,
+              'LambdaToPiPi_iso'         : 0.6,
+              'LambdaToPiPi_ProbNNpi'    : 0.8,
+              'LambdaToPiPi_Daug_PT'     : 800*MeV,
+              'LambdaToPiPi_Daug_IP_min' : 0.1*millimeter,
+              'LambdaToPiPi_Daug_IP_max' : 3*millimeter,
+              'LambdaToPiPi_Daug_IPChi2' : 20,
+              'LambdaToPiPi_GhostProb'   : 0.2,
+              'LambdaToPiPi_IPChi2'      : 15,
+              'LambdaToPiPi_VChi2'       : 4,
+              'LambdaToPiPi_M_Min'       : 1100,
+              'LambdaToPiPi_M_Max'       : 5700,
+              'LambdaToPiPi_FDChi2'      : 40,
+              'LambdaToPiPi_MaxDoca'     : 0.3*millimeter,
+              'LambdaToPiPi_DOCAChi2'    : 7,
+              'LambdaToPiPi_FD'          : 5,
+              'LambdaToPiPi_IPdivFD'     : 0.1,
+              },
+    'StrippingDMLambdaToKPiLine': {
+              'Prescale'            : 1.0,
+              'Postscale'           : 1.0,
+              'Prescale_control'    : 0.1,
+              'Postscale_control'   : 1.0,
+              'LambdaToKPi_PT'          : 1000*MeV,
+              'LambdaToKPi_iso'         : 0.6,
+              'LambdaToKPi_ProbNNpi'    : 0.8,
+              'LambdaToKPi_Daug_PT'     : 800*MeV,
+              'LambdaToKPi_Daug_IP_min' : 0.1*millimeter,
+              'LambdaToKPi_Daug_IP_max' : 3*millimeter,
+              'LambdaToKPi_Daug_IPChi2' : 20,
+              'LambdaToKPi_GhostProb'   : 0.2,
+              'LambdaToKPi_ProbNNK'     : 0.8,
+              'LambdaToKPi_IPChi2'      : 15,
+              'LambdaToKPi_VChi2'       : 4,
+              'LambdaToKPi_M_Min'       : 1100,
+              'LambdaToKPi_M_Max'       : 5700,
+              'LambdaToKPi_FDChi2'      : 40,
+              'LambdaToKPi_MaxDoca'     : 0.3*millimeter,
+              'LambdaToKPi_DOCAChi2'    : 7,
+              'LambdaToKPi_FD'          : 5,
+              'LambdaToKPi_IPdivFD'     : 0.1,
+              },
+    'StrippingDMLambda2595Line': {
+              'Prescale'                  : 1.0,
+              'Postscale'                 : 1.0,
+              'Prescale_control'          : 0.6,
+              'Postscale_control'         : 1.0,
+              'K_ProbNNghost'             : 0.1,
+              'K_ProbNNk'                 : 0.5,
+              'K_PT'                      : 250*MeV,
+              'p_ProbNNghost'             : 0.1,
+              'p_ProbNNp'                 : 0.5,
+              'p_PT'                      : 250*MeV,
+              'pi_lambda2595_IPchi2'      : 0.5,
+              'pi_lambda2595_ProbNNghost' : 0.1,
+              'pi_lambda2595_PT'          : 100*MeV,
+              'pi_lambdac_ProbNNghost'    : 0.1,
+              'pi_lambdac_PT'             : 250*MeV,
+              'Lambda_DOCA'               : 1.0*millimeter,
+              'Lambda_FDCHI2'             : 50,
+              'Lambda_M_Min'              : 2236*MeV,
+              'Lambda_M_Max'              : 2336*MeV,
+              'Lambda_PT'                 : 1500*MeV,
+              'Lambda_VCHI2'              : 4,
+              'Lambda2595_DOCA'           : 1.0*millimeter,
+              'Lambda2595_FDCHI2'         : 5,
+              'Lambda2595_ISO'            : 0.6,
+              'Lambda2595_M_Min'          : 2545*MeV,
+              'Lambda2595_M_Max'          : 2645*MeV,
+              'Lambda2595_PT'             : 1500*MeV,
+              'Lambda2595_VCHI2'          : 4
+    },
+    'StrippingDMLambdaToDPiLine': {
+              'Prescale'                  : 1.0,
+              'Postscale'                 : 1.0,
+              'Prescale_control'          : 0.6,
+              'Postscale_control'         : 1.0,
+              'K_ProbNNghost'             : 0.1,
+              'K_ProbNNk'                 : 0.9,
+              'K_PT'                      : 800*MeV,
+              'piD_IPchi2'                : 20,
+              'piD_ProbNNghost'           : 0.2,
+              'piD_ProbNNpi'              : 0.8,
+              'piD_PT'                    : 400*MeV,
+              'pi_ProbNNghost'            : 0.1,
+              'pi_PT'                     : 800*MeV,
+              'pi_ProbNNpi'               : 0.8,
+              'D_DOCA'                    : 0.4*millimeter,
+              'D_FDCHI2'                  : 50,
+              'D_M_Min'                   : 1840*MeV,
+              'D_M_Max'                   : 1900*MeV,
+              'D_PT'                      : 2000*MeV,
+              'D_VCHI2'                   : 6,
+              'LambdaToDPi_DOCA'          : 0.3*millimeter,
+              'LambdaToDPi_DOCACHI2'      : 7,
+              'LambdaToDPi_FDCHI2'        : 30,
+              'LambdaToDPi_ISO'           : 0.6,
+              'LambdaToDPi_M_Min'         : 1100*MeV,
+              'LambdaToDPi_M_Max'         : 5700*MeV,
+              'LambdaToDPi_PT'            : 3000*MeV,
+              'LambdaToDPi_VCHI2'         : 8,
+              'LambdaToDPi_IPCHI2'        : 20
+    },
+    'StrippingDMLambdaToDKLine': {
+              'Prescale'                  : 1.0,
+              'Postscale'                 : 1.0,
+              'Prescale_control'          : 0.6,
+              'Postscale_control'         : 1.0,
+              'K_ProbNNghost'             : 0.1,
+              'K_ProbNNk'                 : 0.8,
+              'K_PT'                      : 800*MeV,
+              'KD_IPchi2'                 : 20,
+              'KD_ProbNNghost'            : 0.2,
+              'KD_ProbNNK'                : 0.7,
+              'KD_PT'                     : 250*MeV,
+              'pi_ProbNNghost'            : 0.1,
+              'pi_PT'                     : 800*MeV,
+              'pi_ProbNNpi'               : 0.8,
+              'D_DOCA'                    : 0.4*millimeter,
+              'D_FDCHI2'                  : 50,
+              'D_M_Min'                   : 1840*MeV,
+              'D_M_Max'                   : 1900*MeV,
+              'D_PT'                      : 2000*MeV,
+              'D_VCHI2'                   : 6,
+              'LambdaToDK_DOCA'           : 0.5*millimeter,
+              'LambdaToDK_DOCACHI2'       : 8,
+              'LambdaToDK_FDCHI2'         : 30,
+              'LambdaToDK_ISO'            : 0.6,
+              'LambdaToDK_M_Min'          : 1100*MeV,
+              'LambdaToDK_M_Max'          : 5700*MeV,
+              'LambdaToDK_PT'             : 2000*MeV,
+              'LambdaToDK_VCHI2'          : 8,
+              'LambdaToDK_IPCHI2'         : 25
+    },
+  }
+  }
+
+class LambdaDecaysDMConf(LineBuilder) :
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+
+    sel_lambda1520 = self.combineLambda1520(name, config['StrippingDMLambda1520Line'])
+
+    lambda1520line = StrippingLine(name + 'Lambda1520Line',
+                                           prescale  = config['StrippingDMLambda1520Line']['Prescale'],
+                                           postscale = config['StrippingDMLambda1520Line']['Postscale'],
+                                           checkPV   = config['Common']['checkPV'],
+                                           selection = sel_lambda1520)
+    
+    self.registerLine(lambda1520line)
+
+    sel_lambdaToPiPi = self.combineLambdaToPiPi(name, config['StrippingDMLambdaToPiPiLine'])
+
+    lambdaToPiPiline = StrippingLine(name + 'LambdaToPiPiLine',
+                                           prescale  = config['StrippingDMLambdaToPiPiLine']['Prescale'],
+                                           postscale = config['StrippingDMLambdaToPiPiLine']['Postscale'],
+                                           checkPV   = config['Common']['checkPV'],
+                                           selection = sel_lambdaToPiPi)
+    
+    self.registerLine(lambdaToPiPiline)
+
+    sel_lambdaToDPi = self.combineLambdaToDPi(name, config['StrippingDMLambdaToDPiLine'])
+
+    lambdaToDPiline = StrippingLine(name + 'LambdaToDPiLine',
+                                           prescale  = config['StrippingDMLambdaToDPiLine']['Prescale'],
+                                           postscale = config['StrippingDMLambdaToDPiLine']['Postscale'],
+                                           checkPV   = config['Common']['checkPV'],
+                                           selection = sel_lambdaToDPi)
+    
+    self.registerLine(lambdaToDPiline)
+
+    sel_lambdaToDK = self.combineLambdaToDK(name, config['StrippingDMLambdaToDKLine'])
+
+    lambdaToDKline = StrippingLine(name + 'LambdaToDKLine',
+                                           prescale  = config['StrippingDMLambdaToDKLine']['Prescale'],
+                                           postscale = config['StrippingDMLambdaToDKLine']['Postscale'],
+                                           checkPV   = config['Common']['checkPV'],
+                                           selection = sel_lambdaToDK)
+
+    self.registerLine(lambdaToDKline)
+
+    sel_lambdaToKPi = self.combineLambdaToKPi(name, config['StrippingDMLambdaToKPiLine'])
+
+    lambdaToKPiline = StrippingLine(name + 'LambdaToKPiLine',
+                                           prescale  = config['StrippingDMLambdaToKPiLine']['Prescale'],
+                                           postscale = config['StrippingDMLambdaToKPiLine']['Postscale'],
+                                           checkPV   = config['Common']['checkPV'],
+                                           selection = sel_lambdaToKPi)
+    
+    self.registerLine(lambdaToKPiline)
+
+    sel_lambda1520_control = self.combineLambda1520(name+'_Control', config['StrippingDMLambda1520Line'], isolation = False)
+
+    lambda1520line_control = StrippingLine(name + 'Lambda1520ControlLine',
+                                           prescale  = config['StrippingDMLambda1520Line']['Prescale_control'],
+                                           postscale = config['StrippingDMLambda1520Line']['Postscale_control'],
+                                           checkPV   = config['Common']['checkPV'],
+                                           selection = sel_lambda1520_control)
+
+    self.registerLine(lambda1520line_control)
+  
+    sel_lambda2595 = self.combineLambda2595(name, config['StrippingDMLambda2595Line'], isolation = True)
+
+    lambda2595line = StrippingLine(name + 'Lambda2595Line',
+                                   prescale  = config['StrippingDMLambda2595Line']['Prescale'],
+                                   postscale = config['StrippingDMLambda2595Line']['Postscale'],
+                                   checkPV   = config['Common']['checkPV'],
+                                   selection = sel_lambda2595)
+
+    self.registerLine(lambda2595line)
+    
+    sel_lambda2595_control = self.combineLambda2595(name+'_control', config['StrippingDMLambda2595Line'], isolation = False)
+    
+    lambda2595line_control = StrippingLine(name + 'Lambda2595ControlLine',
+                                           prescale   = config['StrippingDMLambda2595Line']['Prescale_control'],
+                                           postscale = config['StrippingDMLambda2595Line']['Postscale_control'],
+                                           checkPV    = config['Common']['checkPV'],
+                                           selection  = sel_lambda2595_control)
+    
+    self.registerLine(lambda2595line_control)
+
+
+  def combineLambdaToKPi(self, name, config, isolation=True):
+
+    daugh_cut={'pi': ("(PT > {LambdaToKPi_Daug_PT}) " 
+                     "& (MIPCHI2DV(PRIMARY) > {LambdaToKPi_Daug_IPChi2}) " 
+                     "& (TRGHOSTPROB < {LambdaToKPi_GhostProb}) " 
+                     "& (PROBNNpi > {LambdaToKPi_ProbNNpi}) "
+                     "& (BPVIP() > {LambdaToKPi_Daug_IP_min}) "
+                     "& (BPVIP() < {LambdaToKPi_Daug_IP_max})").format(**config),
+               'K': ("(PT > {LambdaToKPi_Daug_PT}) " 
+                     "& (MIPCHI2DV(PRIMARY) > {LambdaToKPi_Daug_IPChi2}) " 
+                     "& (TRGHOSTPROB < {LambdaToKPi_GhostProb}) " 
+                     "& (PROBNNK > {LambdaToKPi_ProbNNK}) "
+                     "& (BPVIP() > {LambdaToKPi_Daug_IP_min}) "
+                     "& (BPVIP() < {LambdaToKPi_Daug_IP_max})").format(**config)}
+    
+    comb_cut = ("(APT > {LambdaToKPi_PT}) &"
+                "(AM > {LambdaToKPi_M_Min}) & (AM < {LambdaToKPi_M_Max}) &"
+                "(AMAXDOCA('') < {LambdaToKPi_MaxDoca}) &"
+                "(ACUTDOCACHI2({LambdaToKPi_DOCAChi2},''))".format(**config))
+
+    if not isolation:                
+      mother_cut = ("(PT > {LambdaToKPi_PT})"
+                  "& (M > {LambdaToKPi_M_Min}) & (M < {LambdaToKPi_M_Max})"
+                  "& (HASVERTEX)" 
+                  "& (VFASPF(VCHI2PDOF) < {LambdaToKPi_VChi2}) " 
+                  "& (BPVIPCHI2() > {LambdaToKPi_IPChi2})" 
+                  "& (BPVVDCHI2 > {LambdaToKPi_FDChi2})".format(**config))
+    else:
+      mother_cut = ("(PT > {LambdaToKPi_PT})"
+                    "& (M > {LambdaToKPi_M_Min}) & (M < {LambdaToKPi_M_Max})"
+                    "& (HASVERTEX)" 
+                    "& (VFASPF(VCHI2PDOF) < {LambdaToKPi_VChi2}) " 
+                    "& (BPVIPCHI2() > {LambdaToKPi_IPChi2})" 
+                    "& (BPVVDCHI2 > {LambdaToKPi_FDChi2})"
+                    "& ((PT/(PT+PTCONE)) > {LambdaToKPi_iso})"
+                    "& (BPVVDR > {LambdaToKPi_FD})".format(**config))
+                    # "& ((BPVIP()/BPVVDR) < {LambdaToKPi_IPdivFD})".format(**config))
+            
+    decay = "[Lambda_b0 -> K+ pi-]cc"
+    namesel = name + "LambdaToKPiSel"
+  
+    _combination = CombineParticles( DecayDescriptor    = decay,
+                                     CombinationCut     = comb_cut,
+                                     DaughtersCuts      = { 'K+' : daugh_cut["K"],
+                                                            'pi-' : daugh_cut["pi"] },
+                                     MotherCut          = mother_cut,
+                                     Preambulo =  ["PTCONE  = SUMCONE (   0.6**2 , PT , '/Event/Phys/StdAllNoPIDsPions/Particles')"]
+                                   )
+    
+    return Selection ( namesel,
+                       Algorithm          = _combination,
+                       RequiredSelections = [ StdAllLooseKaons, StdAllLoosePions ]
+                     )
+    
+  def combineLambda1520(self, name, config, isolation=True):
+
+    daugh_cut={'K': ("(PT > {Lambda1520_Daug_PT}) " 
+                     "& (MIPCHI2DV(PRIMARY) > {Lambda1520_IPChi2}) " 
+                     "& (TRGHOSTPROB < {Lambda1520_GhostProb}) " 
+                     "& (PROBNNK > {Lambda1520_ProbNNK}) ").format(**config),
+               'p': ("(PT > {Lambda1520_Daug_PT}) " 
+                     "& (MIPCHI2DV(PRIMARY) > {Lambda1520_IPChi2}) " 
+                     "& (TRGHOSTPROB < {Lambda1520_GhostProb}) " 
+                     "& (PROBNNp > {Lambda1520_ProbNNp}) ").format(**config)}
+    
+    comb_cut = ("(APT > {Lambda1520_PT}) &"
+                "(AM > {Lambda1520_M_Min}) & (AM < {Lambda1520_M_Max}) &"
+                "(AMAXDOCA('') < {Lambda1520_MaxDoca}) ".format(**config))
+
+    if not isolation:                
+      mother_cut = ("(PT > {Lambda1520_PT})"
+                  "& (M > {Lambda1520_M_Min}) & (M < {Lambda1520_M_Max})"
+                  "& (HASVERTEX)" 
+                  "& (VFASPF(VCHI2PDOF) < {Lambda1520_VChi2}) " 
+                  "& (BPVIPCHI2() > {Lambda1520_IPChi2})" 
+                  "& (BPVVDCHI2 > {Lambda1520_FDChi2})".format(**config))
+    else:
+      mother_cut = ("(PT > {Lambda1520_PT})"
+                    "& (M > {Lambda1520_M_Min}) & (M < {Lambda1520_M_Max})"
+                    "& (HASVERTEX)" 
+                    "& (VFASPF(VCHI2PDOF) < {Lambda1520_VChi2}) " 
+                    "& (BPVIPCHI2() > {Lambda1520_IPChi2})" 
+                    "& (BPVVDCHI2 > {Lambda1520_FDChi2})"
+                    "& ((PT/(PT+PTCONE)) > {Lambda1520_iso})".format(**config))
+            
+    decay = "[Lambda(1520)0 -> K- p+]cc"
+    namesel = name + "Lambda1520Sel"
+  
+    _combination = CombineParticles( DecayDescriptor    = decay,
+                                     CombinationCut     = comb_cut,
+                                     DaughtersCuts      = { 'K-' : daugh_cut["K"],
+                                                            'p+' : daugh_cut["p"] },
+                                     MotherCut          = mother_cut,
+                                     Preambulo =  ["PTCONE  = SUMCONE (   0.6**2 , PT , '/Event/Phys/StdAllNoPIDsPions/Particles')"]
+                                   )
+    
+    return Selection ( namesel,
+                       Algorithm          = _combination,
+                       RequiredSelections = [ StdAllLooseProtons, StdAllLooseKaons ]
+                     )
+
+  def combineLambdaToPiPi(self, name, config, isolation=True):
+
+    daugh_cut={'pi': ("(PT > {LambdaToPiPi_Daug_PT}) " 
+                     "& (MIPCHI2DV(PRIMARY) > {LambdaToPiPi_Daug_IPChi2}) " 
+                     "& (TRGHOSTPROB < {LambdaToPiPi_GhostProb}) " 
+                     "& (PROBNNpi > {LambdaToPiPi_ProbNNpi}) "
+                     "& (BPVIP() > {LambdaToPiPi_Daug_IP_min}) "
+                     "& (BPVIP() < {LambdaToPiPi_Daug_IP_max})").format(**config)}
+    
+    comb_cut = ("(APT > {LambdaToPiPi_PT}) &"
+                "(AM > {LambdaToPiPi_M_Min}) & (AM < {LambdaToPiPi_M_Max}) &"
+                "(AMAXDOCA('') < {LambdaToPiPi_MaxDoca}) &"
+                "(ACUTDOCACHI2({LambdaToPiPi_DOCAChi2},''))".format(**config))
+
+    if not isolation:                
+      mother_cut = ("(PT > {LambdaToPiPi_PT})"
+                  "& (M > {LambdaToPiPi_M_Min}) & (M < {LambdaToPiPi_M_Max})"
+                  "& (HASVERTEX)" 
+                  "& (VFASPF(VCHI2PDOF) < {LambdaToPiPi_VChi2}) " 
+                  "& (BPVIPCHI2() > {LambdaToPiPi_IPChi2})" 
+                  "& (BPVVDCHI2 > {LambdaToPiPi_FDChi2})".format(**config))
+    else:
+      mother_cut = ("(PT > {LambdaToPiPi_PT})"
+                    "& (M > {LambdaToPiPi_M_Min}) & (M < {LambdaToPiPi_M_Max})"
+                    "& (HASVERTEX)" 
+                    "& (VFASPF(VCHI2PDOF) < {LambdaToPiPi_VChi2}) " 
+                    "& (BPVIPCHI2() > {LambdaToPiPi_IPChi2})" 
+                    "& (BPVVDCHI2 > {LambdaToPiPi_FDChi2})"
+                    "& ((PT/(PT+PTCONE)) > {LambdaToPiPi_iso})"
+                    "& (BPVVDR > {LambdaToPiPi_FD})".format(**config))
+                    # "& ((BPVIP()/BPVVDR) < {LambdaToPiPi_IPdivFD})".format(**config))
+            
+    decay = "[Lambda_b0 -> pi+ pi-]cc"
+    namesel = name + "LambdaToPiPiSel"
+  
+    _combination = CombineParticles( DecayDescriptor    = decay,
+                                     CombinationCut     = comb_cut,
+                                     DaughtersCuts      = { 'pi+' : daugh_cut["pi"],
+                                                            'pi-' : daugh_cut["pi"] },
+                                     MotherCut          = mother_cut,
+                                     Preambulo =  ["PTCONE  = SUMCONE (   0.6**2 , PT , '/Event/Phys/StdAllNoPIDsPions/Particles')"]
+                                   )
+    
+    return Selection ( namesel,
+                       Algorithm          = _combination,
+                       RequiredSelections = [ StdAllLoosePions ]
+                     )
+
+  def combineLambda_c(self, name, config):
+
+    daugh_cut={'K': ("(PT > {K_PT} )"
+                     "& (TRGHOSTPROB < {K_ProbNNghost})"
+                     "& (PROBNNK > {K_ProbNNk})").format(**config),
+               'p': ("(PT > {p_PT} )"
+                     "& (TRGHOSTPROB < {p_ProbNNghost})"
+                     "& (PROBNNp > {p_ProbNNp})").format(**config),
+               'pi': ("(PT > {pi_lambdac_PT} )"
+                     "& (TRGHOSTPROB < {pi_lambdac_ProbNNghost})").format(**config)}
+
+    comb_cut = ("(APT > {Lambda_PT}) &"
+                "(AM > {Lambda_M_Min}) & (AM < {Lambda_M_Max}) &"
+                "(AMAXDOCA('') < {Lambda_DOCA})".format(**config))
+
+    mother_cut = ("(PT > {Lambda_PT} ) &"
+                  "( M > {Lambda_M_Min}) & (M < {Lambda_M_Max}) &"
+                  "(VFASPF(VCHI2PDOF) < {Lambda_VCHI2}) &"
+                  "(BPVVDCHI2 > {Lambda_FDCHI2})".format(**config))
+
+    decay = "[Lambda_c+ -> K- p+ pi+]cc"
+    namesel = name+"Lambdac_Lambda2595Sel"
+
+    _combination = CombineParticles( DecayDescriptor    = decay,
+                                     CombinationCut     = comb_cut,
+                                     DaughtersCuts      = { 'K-' : daugh_cut["K"],
+                                                            'p+' : daugh_cut["p"],
+                                                            'pi+': daugh_cut["pi"] },
+                                     MotherCut          = mother_cut
+                                     )
+    return Selection ( namesel,
+                       Algorithm          = _combination,
+                       RequiredSelections = [ StdAllLooseKaons , StdAllLooseProtons, StdAllLoosePions ]
+                       )
+
+  def combineLambda2595(self, name, config, isolation = True):
+
+    SelLambda_c = self.combineLambda_c("Lambda_c"+name, config)
+
+    decay = "[Lambda_c(2595)+ -> Lambda_c+ pi+ pi-]cc"
+
+    daugh_cut={'pi1': ("(PT > {pi_lambda2595_PT} )"
+                      "& (MIPCHI2DV(PRIMARY) > {pi_lambda2595_IPchi2})"
+                      "& (TRGHOSTPROB < {pi_lambda2595_ProbNNghost})").format(**config),
+               'pi2': ("(PT > {pi_lambda2595_PT} )"
+                       "& (MIPCHI2DV(PRIMARY) > {pi_lambda2595_IPchi2})"
+                       "& (TRGHOSTPROB < {pi_lambda2595_ProbNNghost})").format(**config)}
+
+    comb_cut = ("(APT > {Lambda2595_PT} ) &"
+                "(AM > {Lambda2595_M_Min}) & (AM < {Lambda2595_M_Max}) &"
+                "(AMAXDOCA('') < {Lambda2595_DOCA})".format(**config))
+    
+    if not isolation:
+      
+      mother_cut = ("(PT > {Lambda2595_PT} ) &"
+                    "( M > {Lambda2595_M_Min}) & (M < {Lambda2595_M_Max}) &"
+                    " (VFASPF(VCHI2PDOF) < {Lambda2595_VCHI2}) & "
+                    " (BPVVDCHI2 > {Lambda2595_FDCHI2})".format(**config))
+    else:
+
+      mother_cut = ("(PT > {Lambda2595_PT} ) &"
+                    "( M > {Lambda2595_M_Min}) & (M < {Lambda2595_M_Max}) &"
+                    " (VFASPF(VCHI2PDOF) < {Lambda2595_VCHI2}) & "
+                    " (BPVVDCHI2 > {Lambda2595_FDCHI2}) & "
+                    " ((PT/(PT+PTCONE)) > {Lambda2595_ISO})".format(**config))
+
+    Lambda2595 = CombineParticles( DecayDescriptor    = decay,
+                                   CombinationCut     = comb_cut,
+                                   DaughtersCuts      = { 'pi+' : daugh_cut["pi1"],
+                                                          'pi-' : daugh_cut["pi2"]},
+                                   MotherCut          = mother_cut,
+                                   Preambulo =  ["PTCONE  = SUMCONE (   0.6**2 , PT , '/Event/Phys/StdAllNoPIDsPions/Particles')"]
+                                 )
+
+    return Selection("SelLambda2595"+name,
+                     Algorithm = Lambda2595,
+                     RequiredSelections = [SelLambda_c, StdAllLoosePions]
+                    )
+
+  def combineD(self, name, config):
+
+    daugh_cut={'K': ("(PT > {K_PT} )"
+                     "& (TRGHOSTPROB < {K_ProbNNghost})"
+                     "& (PROBNNK > {K_ProbNNk})").format(**config),
+               'pi': ("(PT > {pi_PT} )"
+                      "& (TRGHOSTPROB < {pi_ProbNNghost})"
+                      "& (PROBNNpi > {pi_ProbNNpi})").format(**config)}
+
+    comb_cut = ("(APT > {D_PT}) &"
+                "(AM > {D_M_Min}) & (AM < {D_M_Max}) &"
+                "(AMAXDOCA('') < {D_DOCA})".format(**config))
+
+    mother_cut = ("(PT > {D_PT} ) &"
+                  "( M > {D_M_Min}) & (M < {D_M_Max}) &"
+                  "(VFASPF(VCHI2PDOF) < {D_VCHI2}) &"
+                  "(BPVVDCHI2 > {D_FDCHI2})".format(**config))
+
+    decay = "[D- -> K+ pi- pi-]cc"
+    namesel = name+"D_LambdaToDPiSel"
+
+    _combination = CombineParticles( DecayDescriptor    = decay,
+                                     CombinationCut     = comb_cut,
+                                     DaughtersCuts      = { 'K+' : daugh_cut["K"],
+                                                            'pi-': daugh_cut["pi"] },
+                                     MotherCut          = mother_cut
+                                     )
+    return Selection ( namesel,
+                       Algorithm          = _combination,
+                       RequiredSelections = [ StdAllLooseKaons , StdAllLoosePions ]
+                       )
+
+  def combineLambdaToDPi(self, name, config, isolation = True):
+
+    SelD = self.combineD("DPi"+name, config)
+
+    decay = "[Lambda_b0 -> D- pi+]cc"
+
+    daugh_cut={'piD': ("(PT > {piD_PT} )"
+                      "& (MIPCHI2DV(PRIMARY) > {piD_IPchi2})"
+                      "& (TRGHOSTPROB < {piD_ProbNNghost})"
+                      "& (PROBNNpi > {piD_ProbNNpi})").format(**config)}
+
+    comb_cut = ("(APT > {LambdaToDPi_PT} ) &"
+                "(AM > {LambdaToDPi_M_Min}) & (AM < {LambdaToDPi_M_Max}) &"
+                "(AMAXDOCA('') < {LambdaToDPi_DOCA}) &"
+                "(ACUTDOCACHI2({LambdaToDPi_DOCACHI2},''))".format(**config))
+    
+    if not isolation:
+      
+      mother_cut = ("(PT > {LambdaToDPi_PT} ) &"
+                    "( M > {LambdaToDPi_M_Min}) & (M < {LambdaToDPi_M_Max}) &"
+                    " (VFASPF(VCHI2PDOF) < {LambdaToDPi_VCHI2}) & "
+                    " (BPVVDCHI2 > {LambdaToDPi_FDCHI2})".format(**config))
+    else:
+
+      mother_cut = ("(PT > {LambdaToDPi_PT} ) &"
+                    "( M > {LambdaToDPi_M_Min}) & (M < {LambdaToDPi_M_Max}) &"
+                    " (VFASPF(VCHI2PDOF) < {LambdaToDPi_VCHI2}) & "
+                    " (BPVVDCHI2 > {LambdaToDPi_FDCHI2}) & "
+                    " (BPVIPCHI2() > {LambdaToDPi_IPCHI2}) &" 
+                    " ((PT/(PT+PTCONE)) > {LambdaToDPi_ISO})".format(**config))
+
+    LambdaToDPi = CombineParticles( DecayDescriptor    = decay,
+                                   CombinationCut     = comb_cut,
+                                   DaughtersCuts      = { 'pi+' : daugh_cut["piD"]},
+                                   MotherCut          = mother_cut,
+                                   Preambulo =  ["PTCONE  = SUMCONE (   0.6**2 , PT , '/Event/Phys/StdAllNoPIDsPions/Particles')"]
+                                 )
+
+    return Selection("SelLambdaToDPi"+name,
+                     Algorithm = LambdaToDPi,
+                     RequiredSelections = [SelD, StdAllLoosePions]
+                    )
+
+  def combineLambdaToDK(self, name, config, isolation = True):
+
+    SelD = self.combineD("DK"+name, config)
+
+    decay = "[Lambda_b0 -> D- K+]cc"
+
+    daugh_cut={'KD': ("(PT > {KD_PT} )"
+                      "& (MIPCHI2DV(PRIMARY) > {KD_IPchi2})"
+                      "& (TRGHOSTPROB < {KD_ProbNNghost})"
+                      "& (PROBNNK > {KD_ProbNNK})").format(**config)}
+
+    comb_cut = ("(APT > {LambdaToDK_PT} ) &"
+                "(AM > {LambdaToDK_M_Min}) & (AM < {LambdaToDK_M_Max}) &"
+                "(AMAXDOCA('') < {LambdaToDK_DOCA}) &"
+                "(ACUTDOCACHI2({LambdaToDK_DOCACHI2},''))".format(**config))
+    
+    if not isolation:
+      
+      mother_cut = ("(PT > {LambdaToDK_PT} ) &"
+                    "( M > {LambdaToDK_M_Min}) & (M < {LambdaToDK_M_Max}) &"
+                    " (VFASPF(VCHI2PDOF) < {LambdaToDK_VCHI2}) & "
+                    " (BPVVDCHI2 > {LambdaToDK_FDCHI2})".format(**config))
+    else:
+
+      mother_cut = ("(PT > {LambdaToDK_PT} ) &"
+                    "( M > {LambdaToDK_M_Min}) & (M < {LambdaToDK_M_Max}) &"
+                    " (VFASPF(VCHI2PDOF) < {LambdaToDK_VCHI2}) & "
+                    " (BPVVDCHI2 > {LambdaToDK_FDCHI2}) & "
+                    " (BPVIPCHI2() > {LambdaToDK_IPCHI2}) &" 
+                    " ((PT/(PT+PTCONE)) > {LambdaToDK_ISO})".format(**config))
+
+    LambdaToDK = CombineParticles( DecayDescriptor    = decay,
+                                   CombinationCut     = comb_cut,
+                                   DaughtersCuts      = { 'K+' : daugh_cut["KD"]},
+                                   MotherCut          = mother_cut,
+                                   Preambulo =  ["PTCONE  = SUMCONE (   0.6**2 , PT , '/Event/Phys/StdAllNoPIDsPions/Particles')"]
+                                 )
+
+    return Selection("SelLambdaToDK"+name,
+                     Algorithm = LambdaToDK,
+                     RequiredSelections = [SelD, StdAllLooseKaons]
+                    )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLb2dp.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLb2dp.py
new file mode 100755
index 000000000..de7eb31e2
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLb2dp.py
@@ -0,0 +1,221 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping selection of Lb -> d p (pi pi) 
+   Lb -> dp
+   Lb -> dppipi
+'''
+
+__author__ = ['Paula Alvarez']
+__date__ = '02/11/2015'
+__version__ = 'v2r1'
+
+__all__ = ('Lb2dpConf',
+           'default_config'
+           )
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+from StandardParticles import StdAllNoPIDsPions, StdAllNoPIDsProtons,  StdAllNoPIDsKaons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter as VoidFilter
+
+default_config = {
+    'NAME'        : 'Lb2dp',
+    'BUILDERTYPE' : 'Lb2dpConf',
+    'WGs'         : ['QEE'],
+    'STREAMS'     : ['BhadronCompleteEvent'],
+    'CONFIG'      : {
+        'Prescale'             : 1.0 ,      
+        'Prescale_pipi'        : 1.0 ,
+
+        'TrackChi2Ndof'        : 4.0,
+        'TrackGhostProb'       : 0.4,
+        'TrackIPChi2'          : 16.,
+        'TrackIPChi2_pipi'     : 16.,
+
+        'PionPT'               : 500,
+        'PionP'                : 1500,
+        'PionPIDKpi'           : 2,
+        # 'PionProbNNpi'         : 0.05,
+        
+        'ProtonPT'             : 500,
+        'ProtonP'              : 15000,
+        'ProtonPIDppi'         : 10,
+        'ProtonPIDpK'          : 10,
+
+        'KaonPT'               : 500,
+        'KaonP'                : 20000,
+        'KaonP_pipi'           : 30000,
+        
+        'SumPT'                : 1000,
+
+        'LbMassMin'            : 5000. ,
+        'LbMassMax'            : 7000. ,
+        'LbVtxChi2'            : 20. ,
+        'LbVtxChi2_pipi'       : 20. ,
+        'LbDIRA'               : 0.9999,
+        'LbFDChi2'             : 81,
+        'LbFDChi2_pipi'        : 150,
+        'LbPT'                 : 1500,
+        'LbIPChi2_pipi'        : 25,
+    },
+}
+
+class Lb2dpConf(LineBuilder) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+
+        _trackCuts = "((TRCHI2DOF< %(TrackChi2Ndof)s) & (TRGHOSTPROB< %(TrackGhostProb)s) & (MIPCHI2DV(PRIMARY)> %(TrackIPChi2)s)"% self.config
+        _pionCuts = _trackCuts
+        # _pionCuts += " & (PROBNNpi> %(PionProbNNpi)s ) & (PT> %(PionPT)s *MeV))"% self.config
+        _pionCuts += " & ((PIDK - PIDpi)< %(PionPIDKpi)s ) & (PT> %(PionPT)s *MeV) & (P> %(PionP)s *MeV))"% self.config
+
+        _kaonCuts = _trackCuts
+        _kaonCuts += " & (P> %(KaonP)s *MeV)) & (PT> %(KaonPT)s *MeV)"% self.config
+
+        _protonCuts = _trackCuts
+        _protonCuts += " & ((PIDp-PIDpi)> %(ProtonPIDppi)s) & ((PIDp-PIDK)> %(ProtonPIDpK)s) & (P> %(ProtonP)s *MeV)) & (PT> %(ProtonPT)s *MeV)"%self.config
+
+
+        self.PionForLb2Dp = SimpleSelection( "PionFor" + self.name, FilterDesktop, 
+          [ DataOnDemand(Location = 'Phys/StdAllLoosePions/Particles') ],
+          Code  = _pionCuts,
+        )
+
+        self.ProtonForLb2Dp = SimpleSelection( "ProtonFor" + self.name, FilterDesktop,
+          [ DataOnDemand(Location = 'Phys/StdAllNoPIDsProtons/Particles') ],
+          Code  = _protonCuts,
+        )
+
+        self.DeuteronForLb2Dp = SimpleSelection( "KaonFor" + self.name, FilterDesktop, 
+          [ DataOnDemand(Location = 'Phys/StdAllNoPIDsKaons/Particles') ],
+          Code  = _kaonCuts,
+        )
+        
+        self.makeLb2Dp()
+        self.makeLb2Dppipi()
+
+    ## Note: This functionality is already available in SimpleSelection     
+    # def createSubSel( self, OutputList, InputList, Cuts ) :
+    #     '''create a selection using a FilterDesktop'''
+    #     filter = FilterDesktop(Code = Cuts)
+    #     return Selection( OutputList,
+    #                       Algorithm = filter,
+    #                       RequiredSelections = [ InputList ] )
+    
+
+    def makeLb2Dp(self):
+
+        _decayDescriptors = ["[Lambda_b0 -> K+ p~-]cc"]
+
+        # _daughtersCuts = {  "K+"  : "ALL" % self.config
+        #                     ,"p~-"  : "ALL" % self.config }
+
+        # _combinationCut = "(AM > %(LbMassMin)s *MeV)"\
+        #                   "& ((ACHILD(PT,1)+ACHILD(PT,2)) > %(SumPT)s *MeV)"% self.config
+
+        _combinationCut = "((ACHILD(PT,1)+ACHILD(PT,2)) > %(SumPT)s *MeV)"% self.config
+
+        _motherCut = "(BPVDIRA > %(LbDIRA)s) & (VFASPF(VCHI2/VDOF) < %(LbVtxChi2)s) & (BPVVDCHI2> %(LbFDChi2)s)  & (PT> %(LbPT)s)"\
+                     " & (M_Lb> %(LbMassMin)s) & (M_Lb< %(LbMassMax)s)"% self.config
+
+
+        _preambulo = [ "from LoKiPhys.decorators import *",
+                       "m_deut  = 1.875613*1000",
+                       "P_deut = MINTREE(ABSID=='K+',P)",
+                       "E_deut = sqrt(m_deut*m_deut + P_deut*P_deut)",
+                       "Px_Lb   = (CHILD(PX,1)+CHILD(PX,2))",
+                       "Py_Lb   = (CHILD(PY,1)+CHILD(PY,2))",
+                       "Pz_Lb   = (CHILD(PZ,1)+CHILD(PZ,2))",
+                       "P2_Lb = Px_Lb*Px_Lb + Py_Lb*Py_Lb + Pz_Lb*Pz_Lb",
+                       "E_Lb = E_deut + MINTREE(ABSID=='p+',E)",
+                       "M_Lb = sqrt(E_Lb*E_Lb - P2_Lb)"]
+        
+        _Lb2Dp = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                   # DaughtersCuts = _daughtersCuts,
+                                   CombinationCut = _combinationCut,
+                                   Preambulo = _preambulo,
+                                   MotherCut = _motherCut)                            
+
+
+        _Lb2Dp_sel = Selection( self.name,
+                                Algorithm = _Lb2Dp,
+                                RequiredSelections = [self.DeuteronForLb2Dp, self.ProtonForLb2Dp])
+
+        Lb2DpLine = StrippingLine( self.name + '_Line',
+                                   prescale = self.config['Prescale'],
+                                   selection =  _Lb2Dp_sel)
+                                   #RequiredRawEvents = ["Rich","Velo","Tracker","Trigger","Muon","Calo"])
+        
+        self.registerLine(Lb2DpLine)
+
+
+        
+    def makeLb2Dppipi(self):
+
+        _decayDescriptors = ["[Lambda_b0 -> K+ p~- pi+ pi-]cc"]
+
+        _daughtersCuts = {  "K+"  : "(MIPCHI2DV(PRIMARY)> %(TrackIPChi2_pipi)s) & (P> %(KaonP_pipi)s)" % self.config
+                            ,"p~-"  : "(MIPCHI2DV(PRIMARY)> %(TrackIPChi2_pipi)s)" % self.config
+                            ,"pi+" : "(MIPCHI2DV(PRIMARY)> %(TrackIPChi2_pipi)s)" % self.config }
+
+        _combinationCut = "((ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) + ACHILD(PT,4)) > %(SumPT)s *MeV)"% self.config
+        
+        _motherCut = "(BPVDIRA > %(LbDIRA)s) & (VFASPF(VCHI2/VDOF) < %(LbVtxChi2_pipi)s)"\
+                     " & (M_Lb > %(LbMassMin)s *MeV)  & (M_Lb< %(LbMassMax)s)"\
+                     " & (BPVVDCHI2> %(LbFDChi2_pipi)s) & (PT> %(LbPT)s)"\
+                     " & (MIPCHI2DV(PRIMARY)< %(LbIPChi2_pipi)s)"% self.config
+
+        _preambulo = [ "from LoKiPhys.decorators import *",
+                       "m_deut  = 1.875613*1000",
+                       "P_deut = MINTREE(ABSID=='K+',P)",
+                       "E_deut = sqrt(m_deut*m_deut + P_deut*P_deut)",
+                       "Px_Lb   = (CHILD(PX,1)+CHILD(PX,2)+CHILD(PX,3)+CHILD(PX,4))",
+                       "Py_Lb   = (CHILD(PY,1)+CHILD(PY,2)+CHILD(PY,3)+CHILD(PY,4))",
+                       "Pz_Lb   = (CHILD(PZ,1)+CHILD(PZ,2)+CHILD(PZ,3)+CHILD(PZ,4))",
+                       "P2_Lb = Px_Lb*Px_Lb + Py_Lb*Py_Lb + Pz_Lb*Pz_Lb",
+                       "E_Lb = E_deut + MINTREE(ABSID=='p+',E) + MINTREE(ID=='pi+',E) + MINTREE(ID=='pi-',E)",
+                       "M_Lb = sqrt(E_Lb*E_Lb - P2_Lb)"]
+
+        _Lb2Dp = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                   DaughtersCuts = _daughtersCuts,
+                                   CombinationCut = _combinationCut,
+                                   Preambulo = _preambulo,
+                                   MotherCut = _motherCut)                            
+
+
+        _Lb2Dp_sel = Selection( self.name+"pipi",
+                                Algorithm = _Lb2Dp,
+                                RequiredSelections = [self.DeuteronForLb2Dp, self.ProtonForLb2Dp, self.PionForLb2Dp])
+
+        Lb2DpLine = StrippingLine( self.name + '_pipiLine',
+                                   prescale = self.config['Prescale'],
+                                   selection =  _Lb2Dp_sel)
+                                   #RequiredRawEvents = ["Rich","Velo","Tracker","Trigger","Muon","Calo"])
+
+        
+        self.registerLine(Lb2DpLine)
+
+       
+       
+       
+       
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLowMultINC.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLowMultINC.py
new file mode 100644
index 000000000..b5f66eff1
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingLowMultINC.py
@@ -0,0 +1,571 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for CEP in EM
+Fully inclusive stream or of all Hlt Lines
+A separate file is for exclusive selections
+"""
+
+
+########################################################################
+__author__  = ['Paolo Gandini']
+__date__    = '28/10/2015'
+__version__ = '$Revision:1.0$'
+
+__all__ = ('LowMultINCLines',
+           'default_config')
+
+# from Gaudi.Configuration import *
+# from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+# from StandardParticles                     import StdNoPIDsPions, StdLooseProtons, StdLooseKaons
+
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder
+########################################################################
+
+
+#######################
+# L0 Lines
+#["DiEM,lowMult"]     
+#["Photon,lowMult"]  
+#["DiHadron,lowMult"]
+#["DiMuon,lowMult"]  
+#["Electron,lowMult"]
+#["Muon,lowMult"]    
+#fltrs = LoKi_Filters (
+#        ODIN_Code  = ' in_range ( 5000 , ODIN_RUNNUM , 9000 ) '          ,
+#              L0DU _Code  = ' L0_CHANNEL  ( ... )  '                           ,
+#              HLT_Code   = ' HLT_PASS_RE ( 'Hlt1MBMicro.*Decision')  '         ,
+#              STRIP_Code = ' HLT_PASS    ( 'StrippingBd2KstarGammaDecision') ' ,
+#              VOID_Code  = ' CONTAINS    ('Rec/Vertex/Primary') == 1 '         ,
+#              MC_Code    = ' count ( 'D0' == MCABSID ) > 0.5 '                 ,
+#              GEN_Code   = ' count ( 'D0' ==  GABSID ) > 0.5 '                 ,
+#             )                 
+#"HLT_PASS_RE('Hlt1.*Decision')"
+######################
+
+
+default_config = {
+    'NAME'        : 'LowMultINC',
+    'BUILDERTYPE' : 'LowMultINCLines',
+    'STREAMS'     : ['EW'],
+    'WGs'         : ['QEE'],
+    'CONFIG'      : {
+    #
+    # PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE 
+    # Stripping Liason please inform Paolo Gandini when putting in these settings
+    # PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE      
+    #
+        #
+        #'LowMultRequiredRawEvents' : ["Velo","Calo","HC","Trigger","Muon","Rich","Tracker"],  #Please add this!
+        #
+        'PrescaleL0DiHadron'  : 0,
+        'DecisionL0DiHadron'  : None,#"L0_CHANNEL('DiHadron,lowMult')",
+        'PrescaleL0DiEM'      : 0,
+        'DecisionL0DiEM'      : None,#"L0_CHANNEL('DiEM,lowMult')",
+        'PrescaleL0Photon'    : 0,
+        'DecisionL0Photon'    : None,#"L0_CHANNEL('Photon,lowMult')",
+        'PrescaleL0Muon'      : 0,
+        'DecisionL0Muon'      : None,#"L0_CHANNEL('Muon,lowMult')",
+        'PrescaleL0DiMuon'    : 0,
+        'DecisionL0DiMuon'    : None,#"L0_CHANNEL('DiMuon,lowMult')",
+        'PrescaleL0Electron'  : 0,
+        'DecisionL0Electron'  : None,#"L0_CHANNEL('Electron,lowMult')",
+        #
+        #
+        #
+        #
+        'PrescaleLowMultL2pPi'     : 1,
+        'DecisionLowMultL2pPi'     : "HLT_PASS_RE('Hlt2LowMultL2pPiDecision') | HLT_PASS_RE('Hlt2LowMultL2pPiWSDecision')",
+        'PrescaleLowMultD2KPi'     : 1,
+        'DecisionLowMultD2KPi'     : "HLT_PASS_RE('Hlt2LowMultD2KPiDecision') | HLT_PASS_RE('Hlt2LowMultD2KPiWSDecision')",
+        'PrescaleLowMultD2KPiPi'   : 1,
+        'DecisionLowMultD2KPiPi'   : "HLT_PASS_RE('Hlt2LowMultD2KPiPiDecision') | HLT_PASS_RE('Hlt2LowMultD2KPiPiWSDecision')",
+        'PrescaleLowMultD2KKPi'    : 1,
+        'DecisionLowMultD2KKPi'    : "HLT_PASS_RE('Hlt2LowMultD2KKPiDecision') | HLT_PASS_RE('Hlt2LowMultD2KKPiWSDecision')",
+        'PrescaleLowMultD2K3Pi'    : 1,
+        'DecisionLowMultD2K3Pi'    :"HLT_PASS_RE('Hlt2LowMultD2K3PiDecision') | HLT_PASS_RE('Hlt2LowMultD2K3PiWSDecision')",
+        'PrescaleLowMultChiC2HH'   : 1,
+        'DecisionLowMultChiC2HH'   :"HLT_PASS_RE('Hlt2LowMultChiC2HHDecision') | HLT_PASS_RE('Hlt2LowMultChiC2HHWSDecision')",
+        'PrescaleLowMultChiC2HHHH' : 1,
+        'DecisionLowMultChiC2HHHH' :"HLT_PASS_RE('Hlt2LowMultChiC2HHHHDecision') | HLT_PASS_RE('Hlt2LowMultChiC2HHHHWSDecision')",
+        'PrescaleLowMultChiC2PP'   : 1,
+        'DecisionLowMultChiC2PP'   :"HLT_PASS_RE('Hlt2LowMultChiC2PPDecision') | HLT_PASS_RE('Hlt2LowMultChiC2PPWSDecision')",
+        #
+        'PrescaleLowMultLMR2HH'           : 1,
+        'DecisionLowMultLMR2HH'           :"HLT_PASS_RE('Hlt2LowMultLMR2HHDecision') | HLT_PASS_RE('Hlt2LowMultLMR2HHWSDecision')",
+        'PrescaleLowMultLMR2HHHH'         : 1,
+        'DecisionLowMultLMR2HHHH'         :"HLT_PASS_RE('Hlt2LowMultLMR2HHHHDecision') | HLT_PASS_RE('Hlt2LowMultLMR2HHHHWSDecision')",
+        'PrescaleLowMultLMR2HH_mediumPS'  : 0,
+        'DecisionLowMultLMR2HH_mediumPS'  :"HLT_PASS_RE('Hlt2LowMultLMR2HH_mediumPSDecision') | HLT_PASS_RE('Hlt2LowMultLMR2HHWS_mediumPSDecision')",
+        'PrescaleLowMultLMR2HHHH_mediumPS': 0,
+        'DecisionLowMultLMR2HHHH_mediumPS': "HLT_PASS_RE('Hlt2LowMultLMR2HHHH_mediumPSDecision') | HLT_PASS_RE('Hlt2LowMultLMR2HHHHWS_mediumPSDecision')",
+        'PrescaleLowMultLMR2HH_heavyPS'   : 0,
+        'DecisionLowMultLMR2HH_heavyPS'   : "HLT_PASS_RE('Hlt2LowMultLMR2HH_heavyPSDecision') | HLT_PASS_RE('Hlt2LowMultLMR2HHWS_heavyPSDecision')",
+        'PrescaleLowMultLMR2HHHH_heavyPS' : 0,
+        'DecisionLowMultLMR2HHHH_heavyPS' : "HLT_PASS_RE('Hlt2LowMultLMR2HHHH_heavyPSDecision') | HLT_PASS_RE('Hlt2LowMultLMR2HHHHWS_heavyPSDecision')",
+        # Unbiased hadron line
+        'PrescaleLowMultHadron_noTrFilt' : 1,
+        'DecisionLowMultHadron_noTrFilt' : "HLT_PASS_RE('Hlt2LowMultHadron_noTrFiltDecision')",
+        #
+        #
+        #
+        'PrescaleLowMultDiMuon'             : 1,
+        'DecisionLowMultDiMuon'             : "HLT_PASS('Hlt2LowMultDiMuonDecision')",
+        'PrescaleLowMultDiMuon_PS'          : 1,
+        'DecisionLowMultDiMuon_PS'          : "HLT_PASS('Hlt2LowMultDiMuon_PSDecision')",
+        'PrescaleLowMultMuon'               : 1,
+        'DecisionLowMultMuon'               : "HLT_PASS('Hlt2LowMultMuonDecision')",
+        #
+        'PrescaleLowMultDiElectron'         : 1,
+        'DecisionLowMultDiElectron'         : "HLT_PASS_RE('Hlt2LowMultDiElectronDecision')",
+        'PrescaleLowMultDiElectron_noTrFilt': 1,
+        'DecisionLowMultDiElectron_noTrFilt': "HLT_PASS_RE('Hlt2LowMultDiElectron_noTrFiltDecision')",
+        #
+        'PrescaleLowMultDiPhoton'         : 1,
+        'DecisionLowMultDiPhoton'         : "HLT_PASS_RE('Hlt2LowMultDiPhotonDecision')",
+        'PrescaleLowMultDiPhoton_HighMass': 1,
+        'DecisionLowMultDiPhoton_HighMass': "HLT_PASS_RE('Hlt2LowMultDiPhoton_HighMassDecision')",
+        'PrescaleLowMultPi0'              : 1,
+        'DecisionLowMultPi0'              : "HLT_PASS_RE('Hlt2LowMultPi0Decision')",
+        #
+        'PrescaleLowMultNonBeamBeamNoBias'         : 1,
+        'DecisionLowMultNonBeamBeamNoBias'         : "HLT_PASS_RE('Hlt2NoBiasNonBeamBeamDecision')",
+        'PrescaleLowMultTechnical'                 : 0,
+        'DecisionLowMultTechnical'                 : "HLT_PASS_RE('Hlt2LowMultTechnical_MinBiasDecision')",
+        #
+        'PrescaleHlt1NoBiasNonBeamBeam'   : 1,
+        'DecisionHlt1NoBiasNonBeamBeam'   : "HLT_PASS_RE('Hlt1NoBiasNonBeamBeamDecision')",
+        'PrescaleHlt2PassThrough'         : 1,
+        'DecisionHlt2PassThrough'         : "HLT_PASS_RE('Hlt2PassThroughDecision')",
+        #
+        'PrescaleLowMultTMP1'                 : 0,
+        'DecisionLowMultTMP1'                 : None,
+        'PrescaleLowMultTMP2'                 : 0,
+        'DecisionLowMultTMP2'                 : None,
+        #
+        #
+        #
+        'PrescaleLowMultBXTYPE'   : 1,
+         }
+
+}
+
+
+
+
+class LowMultINCLines( LineBuilder ) :
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__( self,name,config ) :            
+
+        LineBuilder.__init__(self, name, config)
+
+
+#####################################################################################################################
+        self.lineL0DiHadron = StrippingLine( "L0DiHadron"+"Line",
+                                             prescale  = config['PrescaleL0DiHadron'],
+                                             checkPV   = False,
+                                             EnableFlavourTagging = False,
+                                             L0DU      = config['DecisionL0DiHadron']) 
+                                             #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineL0DiHadron)
+        
+
+        self.lineL0DiEM = StrippingLine( "L0DiEM"+"Line",
+                                         prescale  = config['PrescaleL0DiEM'],
+                                         checkPV   = False,
+                                         EnableFlavourTagging = False,
+                                         L0DU      = config['DecisionL0DiEM'])
+                                         #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineL0DiEM)
+
+                
+        self.lineL0Photon = StrippingLine( "L0Photon"+"Line",
+                                           prescale  = config['PrescaleL0Photon'],
+                                           checkPV   = False,
+                                           EnableFlavourTagging = False,
+                                           L0DU      = config['DecisionL0Photon'])
+                                          #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineL0Photon)
+
+
+        self.lineL0DiMuon = StrippingLine( "L0DiMuon"+"Line",
+                                           prescale  = config['PrescaleL0DiMuon'],
+                                           checkPV   = False,
+                                           EnableFlavourTagging = False,
+                                           L0DU      = config['DecisionL0DiMuon'])
+                                           #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineL0DiMuon)
+
+
+        self.lineL0Muon = StrippingLine( "L0Muon"+"Line",
+                                           prescale  = config['PrescaleL0Muon'],
+                                           checkPV   = False,
+                                           EnableFlavourTagging = False,
+                                           L0DU      = config['DecisionL0Muon'])
+                                           #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineL0Muon)
+
+                
+        self.lineL0Electron = StrippingLine( "L0Electron"+"Line",
+                                         prescale  = config['PrescaleL0Electron'],
+                                         checkPV   = False,
+                                         EnableFlavourTagging = False,
+                                         L0DU      = config['DecisionL0Electron'])
+                                         #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineL0Electron)
+
+
+
+
+
+
+
+
+                
+#################################################
+        self.lineLowMultL2pPi = StrippingLine( "LowMultL2pPi"+"Line",
+                                               prescale  = config['PrescaleLowMultL2pPi'],
+                                               checkPV   = False,
+                                               EnableFlavourTagging = False,
+                                               L0DU      = None,
+                                               HLT2 = config['DecisionLowMultL2pPi'],
+                                               RequiredRawEvents = ['HC','Velo'])
+                                               #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultL2pPi)
+
+        self.lineLowMultD2KPi = StrippingLine( "LowMultD2KPi"+"Line",
+                                               prescale  = config['PrescaleLowMultD2KPi'],
+                                               checkPV   = False,
+                                               EnableFlavourTagging = False,
+                                               L0DU      = None,
+                                               HLT2 = config['DecisionLowMultD2KPi'],
+                                               RequiredRawEvents = ['HC','Velo'])
+                                               #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultD2KPi)
+
+        self.lineLowMultD2KPiPi = StrippingLine( "LowMultD2KPiPi"+"Line",
+                                               prescale  = config['PrescaleLowMultD2KPiPi'],
+                                               checkPV   = False,
+                                               EnableFlavourTagging = False,
+                                               L0DU      = None,
+                                               HLT2 = config['DecisionLowMultD2KPiPi'],
+                                               RequiredRawEvents = ['HC','Velo'])
+                                               #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultD2KPiPi)
+                
+        self.lineLowMultD2KKPi = StrippingLine( "LowMultD2KKPi"+"Line",
+                                                 prescale  = config['PrescaleLowMultD2KKPi'],
+                                                 checkPV   = False,
+                                                 EnableFlavourTagging = False,
+                                                 L0DU      = None,
+                                                 HLT2 = config['DecisionLowMultD2KKPi'],
+                                                 RequiredRawEvents = ['HC','Velo'])
+                                                 #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultD2KKPi)
+
+        self.lineLowMultD2K3Pi = StrippingLine( "LowMultD2K3Pi"+"Line",
+                                                prescale  = config['PrescaleLowMultD2K3Pi'],
+                                                checkPV   = False,
+                                                EnableFlavourTagging = False,
+                                                L0DU      = None,
+                                                HLT2 = config['DecisionLowMultD2K3Pi'],
+                                                RequiredRawEvents = ['HC','Velo'])
+                                                #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultD2K3Pi)
+
+        self.lineLowMultChiC2HH = StrippingLine( "LowMultChiC2HH"+"Line",
+                                                prescale  = config['PrescaleLowMultChiC2HH'],
+                                                checkPV   = False,
+                                                EnableFlavourTagging = False,
+                                                L0DU      = None,
+                                                HLT2 = config['DecisionLowMultChiC2HH'],
+                                                RequiredRawEvents = ['HC','Velo'])
+                                                #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultChiC2HH)
+
+        self.lineLowMultChiC2HHHH = StrippingLine( "LowMultChiC2HHHH"+"Line",
+                                                 prescale  = config['PrescaleLowMultChiC2HHHH'],
+                                                 checkPV   = False,
+                                                 EnableFlavourTagging = False,
+                                                 L0DU      = None,
+                                                 HLT2 = config['DecisionLowMultChiC2HHHH'],
+                                                 RequiredRawEvents = ['HC','Velo'])
+                                                 #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultChiC2HHHH)
+
+        self.lineLowMultChiC2PP = StrippingLine( "LowMultChiC2PP"+"Line",
+                                                   prescale  = config['PrescaleLowMultChiC2PP'],
+                                                   checkPV   = False,
+                                                   EnableFlavourTagging = False,
+                                                   L0DU      = None,
+                                                   HLT2 = config['DecisionLowMultChiC2PP'],
+                                                   RequiredRawEvents = ['HC','Velo'])
+                                                   #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultChiC2PP)
+
+#################################################
+
+        self.lineLowMultLMR2HH = StrippingLine( "LowMultLMR2HH"+"Line",
+                                                 prescale  = config['PrescaleLowMultLMR2HH'],
+                                                 checkPV   = False,
+                                                 EnableFlavourTagging = False,
+                                                 L0DU      = None,
+                                                 HLT2 = config['DecisionLowMultLMR2HH'],
+                                                 RequiredRawEvents = ['HC','Velo'])
+                                                 #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultLMR2HH)
+        
+        self.lineLowMultLMR2HHHH = StrippingLine( "LowMultLMR2HHHH"+"Line",
+                                                  prescale  = config['PrescaleLowMultLMR2HHHH'],
+                                                  checkPV   = False,
+                                                  EnableFlavourTagging = False,
+                                                  L0DU      = None,
+                                                  HLT2 = config['DecisionLowMultLMR2HHHH'],
+                                                  RequiredRawEvents = ['HC','Velo'])
+                                                  #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultLMR2HHHH)
+
+#
+
+        self.lineLowMultLMR2HH_mediumPS = StrippingLine( "LowMultLMR2HH_mediumPS"+"Line",
+                                                prescale  = config['PrescaleLowMultLMR2HH_mediumPS'],
+                                                checkPV   = False,
+                                                EnableFlavourTagging = False,
+                                                L0DU      = None,
+                                                HLT2 = config['DecisionLowMultLMR2HH_mediumPS'],
+                                                RequiredRawEvents = ['HC','Velo'])
+                                                #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultLMR2HH_mediumPS)
+        
+        self.lineLowMultLMR2HH_mediumPSHH = StrippingLine( "LowMultLMR2HHHH_mediumPS"+"Line",
+                                                  prescale  = config['PrescaleLowMultLMR2HHHH_mediumPS'],
+                                                  checkPV   = False,
+                                                  EnableFlavourTagging = False,
+                                                  L0DU      = None,
+                                                  HLT2 = config['DecisionLowMultLMR2HHHH_mediumPS'],
+                                                  RequiredRawEvents = ['HC','Velo'])
+                                                  #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultLMR2HH_mediumPSHH)
+
+#
+        
+        self.lineLowMultLMR2HH_heavyPS = StrippingLine( "LowMultLMR2HH_heavyPS"+"Line",
+                                                         prescale  = config['PrescaleLowMultLMR2HH_heavyPS'],
+                                                         checkPV   = False,
+                                                         EnableFlavourTagging = False,
+                                                         L0DU      = None,
+                                                         HLT2 = config['DecisionLowMultLMR2HH_heavyPS'],
+                                                         RequiredRawEvents = ['HC','Velo'])
+                                                         #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultLMR2HH_heavyPS)
+        
+        self.lineLowMultLMR2HH_heavyPSHH = StrippingLine( "LowMultLMR2HHHH_heavyPS"+"Line",
+                                                           prescale  = config['PrescaleLowMultLMR2HHHH_heavyPS'],
+                                                           checkPV   = False,
+                                                           EnableFlavourTagging = False,
+                                                           L0DU      = None,
+                                                           HLT2 = config['DecisionLowMultLMR2HHHH_heavyPS'],
+                                                           RequiredRawEvents = ['HC','Velo'])
+                                                           #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultLMR2HH_heavyPSHH)
+
+#################################################
+                        
+        self.lineLowMultHadron_noTrFilt = StrippingLine( "LowMultHadron_noTrFilt"+"Line",
+                                                 prescale  = config['PrescaleLowMultHadron_noTrFilt'],
+                                                 checkPV   = False,
+                                                 EnableFlavourTagging = False,
+                                                 L0DU      = None,
+                                                 HLT2 =config['DecisionLowMultHadron_noTrFilt'],
+                                                 RequiredRawEvents = ['HC','Velo'])
+                                                 #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultHadron_noTrFilt)
+
+
+
+
+
+
+
+
+
+#################################################
+        self.lineLowMultDiMuon = StrippingLine( "LowMultDiMuon"+"Line",
+                                                prescale  = config['PrescaleLowMultDiMuon'],
+                                                checkPV   = False,
+                                                EnableFlavourTagging = False,
+                                                L0DU      = None,
+                                                HLT2 = config['DecisionLowMultDiMuon'],
+                                                RequiredRawEvents = ['HC','Velo','Rich','Calo'])
+                                                #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultDiMuon)
+
+        self.lineLowMultDiMuon_PS = StrippingLine( "LowMultDiMuon_PS"+"Line",
+                                                prescale  = config['PrescaleLowMultDiMuon_PS'],
+                                                checkPV   = False,
+                                                EnableFlavourTagging = False,
+                                                L0DU      = None,
+                                                HLT2 = config['DecisionLowMultDiMuon_PS'],
+                                                RequiredRawEvents = ['HC','Velo','Rich','Calo'])
+                                                #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultDiMuon_PS)
+
+        self.lineLowMultMuon = StrippingLine( "LowMultMuon"+"Line",
+                                                   prescale  = config['PrescaleLowMultMuon'],
+                                                   checkPV   = False,
+                                                   EnableFlavourTagging = False,
+                                                   L0DU      = None,
+                                                   HLT2 = config['DecisionLowMultMuon'],
+                                                   RequiredRawEvents = ['HC','Velo','Rich','Calo'])
+                                                   #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultMuon)
+                                
+#################################################
+
+        self.lineLowMultDiElectron = StrippingLine( "LowMultDiElectron"+"Line",
+                                              prescale  = config['PrescaleLowMultDiElectron'],
+                                              checkPV   = False,
+                                              EnableFlavourTagging = False,
+                                              L0DU      = None,
+                                              HLT2 = config['DecisionLowMultDiElectron'],
+                                              RequiredRawEvents = ['HC','Velo','Rich','Calo'])
+                                              #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultDiElectron)
+                        
+        self.lineLowMultDiElectron_noTrFilt = StrippingLine( "LowMultDiElectron_noTrFilt"+"Line",
+                                                    prescale  = config['PrescaleLowMultDiElectron_noTrFilt'],
+                                                    checkPV   = False,
+                                                    EnableFlavourTagging = False,
+                                                    L0DU      = None,
+                                                    HLT2 = config['DecisionLowMultDiElectron_noTrFilt'],
+                                                    RequiredRawEvents = ['HC','Velo','Rich','Calo'])
+                                                    #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultDiElectron_noTrFilt)
+
+
+#################################################
+
+
+        self.lineLowMultDiPhoton = StrippingLine( "LowMultDiPhoton"+"Line",
+                                                             prescale  = config['PrescaleLowMultDiPhoton'],
+                                                             checkPV   = False,
+                                                             EnableFlavourTagging = False,
+                                                             L0DU      = None,
+                                                             HLT2 = config['DecisionLowMultDiPhoton'],
+                                                             RequiredRawEvents = ['HC','Velo','Rich','Calo'])
+                                                             #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultDiPhoton)
+
+        self.lineLowMultDiPhoton_HighMass = StrippingLine( "LowMultDiPhoton_HighMass"+"Line",
+                                                  prescale  = config['PrescaleLowMultDiPhoton_HighMass'],
+                                                  checkPV   = False,
+                                                  EnableFlavourTagging = False,
+                                                  L0DU      = None,
+                                                  HLT2 = config['DecisionLowMultDiPhoton_HighMass'],
+                                                  RequiredRawEvents = ['HC','Velo','Rich','Calo'])
+                                                  #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultDiPhoton_HighMass)
+
+        self.lineLowMultPi0 = StrippingLine( "LowMultPi0"+"Line",
+                                                           prescale  = config['PrescaleLowMultPi0'],
+                                                           checkPV   = False,
+                                                           EnableFlavourTagging = False,
+                                                           L0DU      = None,
+                                                           HLT2 = config['DecisionLowMultPi0'],
+                                                           RequiredRawEvents = ['HC','Velo','Rich','Calo'])
+                                                           #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultPi0)
+        
+
+#####
+#####
+        self.lineLowMultNonBeamBeamNoBias = StrippingLine( "LowMultNonBeamBeamNoBias"+"Line",
+                                                   prescale  = config['PrescaleLowMultNonBeamBeamNoBias'],
+                                                   checkPV   = False,
+                                                   EnableFlavourTagging = False,
+                                                   L0DU      = None,
+                                                   HLT2 = config['DecisionLowMultNonBeamBeamNoBias'],
+                                                   RequiredRawEvents = ['HC','Velo','Calo'])
+                                                   #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultNonBeamBeamNoBias)
+                        
+
+        self.lineLowMultTechnical = StrippingLine( "LowMultTechnical"+"Line",
+                                             prescale  = config['PrescaleLowMultTechnical'],
+                                             checkPV   = False,
+                                             EnableFlavourTagging = False,
+                                             L0DU      = None,
+                                             HLT2 = config['DecisionLowMultTechnical'],
+                                             RequiredRawEvents = ['HC','Velo'])
+                                             #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultTechnical)
+        
+#####
+        self.lineHlt1NoBiasNonBeamBeam = StrippingLine( "Hlt1NoBiasNonBeamBeam"+"Line",
+                                                        prescale  = config['PrescaleHlt1NoBiasNonBeamBeam'],
+                                                        checkPV   = False,
+                                                        EnableFlavourTagging = False,
+                                                        L0DU      = None,
+                                                        HLT1 = config['DecisionHlt1NoBiasNonBeamBeam'],
+                                                        RequiredRawEvents = ['HC','Velo','Calo'])
+
+
+        self.registerLine(self.lineHlt1NoBiasNonBeamBeam)
+        self.lineHlt2PassThrough = StrippingLine( "Hlt2PassThrough"+"Line",
+                                                  prescale  = config['PrescaleHlt2PassThrough'],
+                                                  checkPV   = False,
+                                                  EnableFlavourTagging = False,
+                                                  L0DU      = None,
+                                                  HLT2 = config['DecisionHlt2PassThrough'],
+                                                  RequiredRawEvents = ['HC','Velo','Calo'])
+        self.registerLine(self.lineHlt2PassThrough)
+
+        
+#####    
+        self.lineLowMultTMP1 = StrippingLine( "LowMultTMP1"+"Line",
+                                              prescale  = config['PrescaleLowMultTMP1'],
+                                              checkPV   = False,
+                                              EnableFlavourTagging = False,
+                                              L0DU      = None,
+                                              HLT2 = config['DecisionLowMultTMP1'],
+                                              RequiredRawEvents = ['HC','Velo'])
+                                              #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultTMP1)
+
+        
+        self.lineLowMultTMP2 = StrippingLine( "LowMultTMP2"+"Line",
+                                              prescale  = config['PrescaleLowMultTMP2'],
+                                              checkPV   = False,
+                                              EnableFlavourTagging = False,
+                                              L0DU      = None,
+                                              HLT2 = config['DecisionLowMultTMP2'],
+                                              RequiredRawEvents = ['HC','Velo'])
+                                              #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultTMP2)
+
+
+
+####################################################################################################
+        self.lineLowMultBXTYPE = StrippingLine( "LowMultBXTYPE"+"Line",
+                                              prescale  = config['PrescaleLowMultBXTYPE'],
+                                              checkPV   = False,
+                                              EnableFlavourTagging = False,
+                                              ODIN = "( ODIN_BXTYP == LHCb.ODIN.NoBeam)",
+                                              L0DU      = None,
+                                              HLT2 = None,
+                                              RequiredRawEvents = ['HC','Velo'])
+                                              #RequiredRawEvents = config["LowMultRequiredRawEvents"])
+        self.registerLine(self.lineLowMultBXTYPE)
+####################################################################################################
+        
+        
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingMicroDiJets.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingMicroDiJets.py
new file mode 100644
index 000000000..c42b54963
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingMicroDiJets.py
@@ -0,0 +1,93 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 Gaudi.Configuration import *
+from Configurables       import FilterDesktop, CombineParticles, LoKi__VertexFitter
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import  StdJets
+from CommonParticles.Utils import *
+from Configurables import FilterJet, ClearDaughters
+from GaudiKernel.SystemOfUnits import GeV
+
+__author__  = "Xabier Cid Vidal", "Cedric Potterat", "William Barter"
+__all__     = "default_config", "MicroDiJetsConf"
+
+## if you want to prescale this line, please contact the authors before!
+
+default_config = {
+  'NAME'        : 'MicroDiJets',
+  'BUILDERTYPE' : 'MicroDiJetsConf',
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : [ 'Leptonic' ],
+  'CONFIG': {
+    'MicroDiJetsLine_Prescale'  : 0.5,
+    'MicroDiJetsLine_Postscale' : 1.0,
+    'RequiredRawEvents'         : ['Calo'],
+    'min_jet_pT'                : 20. * GeV,
+    'TOS_HLT2'                  : None, # 'Hlt2JetsDiJetDecision'
+    'MDSTFlag'                  : False,
+  },
+}
+
+
+class MicroDiJetsConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    emptySel = ClearDaughters("MDSTJets", Inputs = ["Phys/StdJets/Particles"])
+    emptySelLoc = updateDoD(emptySel)
+    #print emptySelLoc
+    self.emptySelLoc = emptySelLoc.keys()[0]
+    #print self.emptySelLoc
+
+    sel_MicroDiJets = self.makeJetGroup(name + 'MicroDiJets', config)
+
+    self.registerLine(StrippingLine( name + 'Line',
+      prescale  = config[ 'MicroDiJetsLine_Prescale' ],
+      postscale = config[ 'MicroDiJetsLine_Postscale' ],
+      MDSTFlag  = config[ 'MDSTFlag' ],
+      checkPV   = False,
+      selection = sel_MicroDiJets,
+      RequiredRawEvents = config['RequiredRawEvents'],
+    ))
+
+
+  def makeJetGroup(self, name, config):
+
+    JetGroup = CombineParticles("Combine"+ name)
+    JetGroup.DecayDescriptor = "H_10 -> CELLjet CELLjet"
+
+    JetGroup.ParticleCombiners = {"" : "MomentumCombiner"}
+    # JetGroup.addTool( LoKi__VertexFitter, name="LoKi::VertexFitter" )
+    # vfitter = getattr ( JetGroup , "LoKi::VertexFitter" )
+    # vfitter.Jets = ""
+
+    JetGroup.DaughtersCuts = { "CELLjet" :" (PT > %(min_jet_pT)s ) " %config }
+
+    JetGroup.CombinationCut = "AALLSAMEBPV(-1,-1,-1) "
+    JetGroup.MotherCut = "ALL"
+
+    ## TOS_HLT2 on-demand
+    hlt = config['TOS_HLT2']
+    if hlt:
+      JetGroup.MotherCut += '& (TOS("%s", "Hlt2TriggerTisTos"))'%hlt
+
+    return Selection("Sel"+ name, Algorithm = JetGroup, RequiredSelections = [DataOnDemand(self.emptySelLoc)])
+
+
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingMuMuSS.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingMuMuSS.py
new file mode 100644
index 000000000..a014d2c27
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingMuMuSS.py
@@ -0,0 +1,114 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Lines for Study of SameSign Background to DY->MuMu
+# Electroweak Group (Conveners: S.Bifani, J.Anderson; Stripping contact: W.Barter)
+#
+# J.Anderson
+#
+# MuMuSS1 (3.2-5GeV): StdAllLooseMuons & P>10GeV & pT>1.5GeV (10% PRESCALE)
+# MuMuSS2 (5-10GeV):  StdAllLooseMuons & P>10GeV & pT>3GeV
+# MuMuSS3 (10-20GeV): StdAllLooseMuons & P>10GeV & pT>3GeV
+# MuMuSS4 (>20GeV):   StdAllLooseMuons & P>10GeV & pT>3GeV
+
+__all__ = 'default_config', 'MuMuSSConf'
+
+__author__ = (
+  None, ## Current
+  'J. Anderson', ## previous
+)
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons
+from GaudiKernel.SystemOfUnits import GeV
+
+
+default_config = {
+  'NAME'        : 'MuMuSS',
+  'BUILDERTYPE' : 'MuMuSSConf',
+  'WGs'         : [ 'QEE'],
+  'STREAMS'     : [ 'EW' ],
+  'CONFIG'      : {
+    'MuMuSSLine1Prescale' : 0.1,
+    'MuMuSSLine2Prescale' : 1.0,
+    'MuMuSSLine3Prescale' : 1.0,
+    'MuMuSSLine4Prescale' : 1.0,
+    'MuMuSSLine1MinMass'  : 3.2  * GeV,
+    'MuMuSSLine1MaxMass'  :  5.  * GeV,
+    'MuMuSSLine2MinMass'  :  5.  * GeV,
+    'MuMuSSLine2MaxMass'  : 10.  * GeV,
+    'MuMuSSLine3MinMass'  : 10.  * GeV,
+    'MuMuSSLine3MaxMass'  : 20.  * GeV,
+    'MuMuSSLine4MinMass'  : 20.  * GeV,
+    'p'     : 10. * GeV,
+    'pT1'   : 1.5 * GeV,
+    'pT2'   :  3. * GeV,
+  },
+}
+
+
+class MuMuSSConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+    
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    # Define the cuts
+
+    cut1 = '(P>%(p)s) & (PT>%(pT1)s)'%config
+    cut2 = '(P>%(p)s) & (PT>%(pT2)s)'%config
+
+    MuMuSS1MassCut = '(MM>%(MuMuSSLine1MinMass)s) & (MM<%(MuMuSSLine1MaxMass)s)'%config
+    MuMuSS2MassCut = '(MM>%(MuMuSSLine2MinMass)s) & (MM<%(MuMuSSLine2MaxMass)s)'%config
+    MuMuSS3MassCut = '(MM>%(MuMuSSLine3MinMass)s) & (MM<%(MuMuSSLine3MaxMass)s)'%config
+    MuMuSS4MassCut = '(MM>%(MuMuSSLine4MinMass)s)'%config
+
+
+    ## MuMuSS1
+    sel = makeSSCombination( name + 'MuMuSS1', cut1, MuMuSS1MassCut )
+    self.registerLine(StrippingLine( name + 'Line1',
+      prescale  = config[ 'MuMuSSLine1Prescale' ],
+      selection = sel,
+    ))
+
+    ## MuMuSS2
+    sel = makeSSCombination( name + 'MuMuSS2', cut2, MuMuSS2MassCut )
+    self.registerLine(StrippingLine( name + 'Line2',
+      prescale  = config[ 'MuMuSSLine2Prescale' ],
+      selection = sel,
+    ))
+
+    ## MuMuSS3
+    sel = makeSSCombination( name + 'MuMuSS3', cut2, MuMuSS3MassCut )
+    self.registerLine(StrippingLine( name + 'Line3',
+      prescale  = config[ 'MuMuSSLine3Prescale' ],
+      selection = sel,
+    ))
+
+    ## MuMuSS4
+    sel = makeSSCombination( name + 'MuMuSS4', cut2, MuMuSS4MassCut )     
+    self.registerLine(StrippingLine( name + 'Line4',
+      prescale  = config[ 'MuMuSSLine4Prescale' ],
+      selection = sel,
+    ))
+      
+
+def makeSSCombination( name, dcut, mcut ) :
+  return SimpleSelection( name, CombineParticles, [StdAllLooseMuons],
+    DecayDescriptor    = '[Z0 -> mu- mu-]cc',
+    DaughtersCuts      = { 'mu-' : dcut, 'mu+' : dcut },
+    MotherCut          = mcut,
+    WriteP2PVRelations = False,
+  )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingSbarSCorrelations.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingSbarSCorrelations.py
new file mode 100644
index 000000000..1228e86b3
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingSbarSCorrelations.py
@@ -0,0 +1,314 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping lines for Strange s+sbar correlations in form of correlated:tracks
+a) K+ and K-
+b) Lambda0 + K+, Lambda0bar + K-
+c) Lambda0 + Lambda0bar
+
+Long tracks only
+
+'''
+
+__author__  = ['Florin MACIUC']
+__date__    = '24/08/2013'
+__version__ = '$Revision: 1.0 $'
+__all__     = ( 'SbarSCorrelationsConf', 'default_config' )
+
+
+from Gaudi.Configuration                    import *
+from GaudiConfUtils.ConfigurableGenerators  import FilterDesktop, CombineParticles
+from StandardParticles                      import StdAllNoPIDsPions, StdTightKaons, StdAllNoPIDsProtons
+from PhysSelPython.Wrappers                 import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine            import StrippingLine
+from StrippingUtils.Utils                   import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, GeV
+
+
+default_config = {
+  'NAME'        : 'SbarSCorrelations',
+  'BUILDERTYPE' : 'SbarSCorrelationsConf',
+  'STREAMS'     : [ 'EW'  ],
+  'WGs'         : [ 'QEE' ],
+  'CONFIG'      : { 
+      'HLT'               : "HLT_PASS_RE('Hlt1.*NoBias.*Decision')|HLT_PASS_RE('Hlt1.*MB.*Bias.*Decision')|HLT_PASS_RE('Hlt1.*MicroBias.*Decision')",
+      'LongTrackGEC'      : 1000,     # 150 or 500 might be a better choice
+      'Trk_P_MIN'         : 5 * GeV,  # to limit material interactions for Kaons
+      'isLong'            : '(ISLONG)',
+      'KAON_PIDK_MIN'     : 8,        # DLL_KAON_vs_PION
+      'KAON_PIDKp_MIN'    : 0,        # DLL_KAON_vs_PROTON
+      'KAON_ipChi2_MAX'   : 49,       # IPCHI2 with respect to best PV (do not know if UPCHI2 or IP is used, but I guess IPCHI2 was used to tag the best PV )
+#
+      'PION_ipChi2_MIN'   : 9,
+      'PROTON_ipChi2_MIN' : 9,
+      'PION_P_MIN'        : 2 * GeV,
+      'PROTON_P_MIN'      : 2 * GeV,
+#
+      'Fisher'            : 10,
+      'Lambda_V_Chi2_Max' : 9,
+      'Lambda_Adamass'    : 50 * MeV,
+      'Lambda_ipChi2_MAX' : 49,
+#                   
+      'Phiprescale'       : 0.05,
+      'F2prescale'        : 1.0,
+      'LambdaCprescale'   : 1.0,                  
+      'postscale'         : 1.0,
+    },
+}
+
+
+class SbarSCorrelationsConf(LineBuilder):
+    __configuration_keys__ = default_config['CONFIG'].keys() 
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+
+        # Set up global event cuts.
+        # Conceptually these come first, although the place where they're
+        # inserted into the line is at the bottom of the code.
+        _globalEventCuts = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(LongTrackGEC)s )" % config,
+                            "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        # Select all charged kaons, protons and pions.
+        self.selKaon = filterKaons('KFor'+name, 'Phys/StdTightKaons/Particles',
+                                          config['isLong'],
+                                          config['Trk_P_MIN'],
+                                          config['KAON_PIDK_MIN'],
+                                          config['KAON_PIDKp_MIN'],
+                                          config['KAON_ipChi2_MAX'])
+
+        
+        self.selPion = filterPions('PiFor'+name, 'Phys/StdAllNoPIDsPions/Particles',
+                                          config['isLong'],
+                                          config['PION_ipChi2_MIN'],
+                                          config['PION_P_MIN']                                   
+                                          )
+
+        #using the same function/method to select Protons as Pions
+        self.selProton = filterPions('ProtonFor'+name, 'Phys/StdAllNoPIDsProtons/Particles',
+                                          config['isLong'],
+                                          config['PROTON_ipChi2_MIN'],
+                                          config['PROTON_P_MIN']                                        
+                                          )        
+
+        self.selPPi = [self.selPion, self.selProton]
+        self.selKK = [self.selKaon]
+
+        
+        # Now make the various decays e.g. Lambda/Lambda-bar decays which are real
+        # and the dummy decays "f_2(2300) -> Lambda0 Lambda~0", - not real decay but dummy
+        #                      "phi(1020) -> K+ K-" - not real but dummy  
+        #                      "Lambda_c+ -> Lambda0 K+" - not real but dummy
+        #                      "Lambda_c- -> Lambda~0 K-" - not real but dummy
+        #
+        # real decays
+        strDecaysLambda         = ["Lambda0 -> p+ pi-"]
+        strDecaysLambdabar      = ["Lambda~0 -> p~- pi+"]
+        # dummy decays
+        strDecaysF2  = ["f_2(2300) -> Lambda0 Lambda~0"]
+        strDecaysPhi = ["phi(1020) -> K+ K-"]
+        strDecaysLambdaCplus   = ["Lambda_c+ -> Lambda0 K+"]
+        strDecaysLambdaCminus =  ["Lambda_c~- -> Lambda~0 K-"]
+        
+        # make real decays 
+        self.selLambda         = makeLambda('Lambda'        + name, strDecaysLambda,         self.selPPi, config['Fisher'], config['Lambda_V_Chi2_Max'], config['Lambda_Adamass'] , config['Lambda_ipChi2_MAX'])
+        self.selLambdabar      = makeLambda('Lambdabar'        + name, strDecaysLambdabar,         self.selPPi, config['Fisher'],config['Lambda_V_Chi2_Max'], config['Lambda_Adamass'] , config['Lambda_ipChi2_MAX'])
+
+#        print  self.selKK       
+        # make a dummy Phi
+        self.selPhi      = makePhi('Phi'        + name, strDecaysPhi,    self.selKK  )
+
+        
+        # Now make the dummy decays with at least a Lambda 
+#        print [self.selLambda] + [self.selLambdabar]
+#        print [self.selLambda] + self.selKK
+#        print [self.selLambdabar] +  self.selKK
+#        print 'input'
+#        print strDecaysLambda
+#        print strDecaysLambdabar
+
+#        print strDecaysPhi
+#        print strDecaysF2
+#        print strDecaysLambdaCplus
+#        print strDecaysLambdaCminus
+
+        self.selF2         = makePhi('F2LambdaLambdabar'         + name, strDecaysF2, [self.selLambda]+ [self.selLambdabar])
+        self.selLambdaCplus           = makePhi('LambdaCplus'           + name, strDecaysLambdaCplus,[self.selLambda]+ self.selKK)
+        self.selLambdaCminus           = makePhi('LambdaCminus'           + name, strDecaysLambdaCminus,[self.selLambdabar]+ self.selKK)
+
+
+
+        # Make the stripping lines
+        self.linePhi          = StrippingLine(name+'PhiLine',
+                                               FILTER    = _globalEventCuts,
+                                               prescale  = config['Phiprescale'],
+                                               postscale = config['postscale'],
+                                               #RequiredRawEvents = ["Muon","Calo","Rich"],
+                                               HLT1 = config['HLT'],
+                                               selection = self.selPhi)
+        self.lineF2            = StrippingLine(name + 'F2Line',
+                                               FILTER    = _globalEventCuts,
+                                               prescale  = config['F2prescale'],
+                                               postscale = config['postscale'],
+                                               #RequiredRawEvents = ["Muon","Calo","Rich"],
+                                               HLT1 = config['HLT'],
+                                               selection = self.selF2)
+        self.lineLambdaCplus  =  StrippingLine(name+'LambdaCplusLine',
+                                               FILTER    = _globalEventCuts,
+                                               prescale  = config['LambdaCprescale'],
+                                               postscale = config['postscale'],
+                                               #RequiredRawEvents = ["Muon","Calo","Rich"],
+                                               HLT1 = config['HLT'],
+                                               selection = self.selLambdaCplus)
+        self.lineLambdaCminus  = StrippingLine(name+'LambdaCminusLine',
+                                               FILTER    = _globalEventCuts,
+                                               prescale  = config['LambdaCprescale'],
+                                               postscale = config['postscale'],
+                                               #RequiredRawEvents = ["Muon","Calo","Rich"],
+                                               HLT1 = config['HLT'],
+                                               selection = self.selLambdaCminus)
+
+        self.registerLine(self.linePhi)
+        self.registerLine(self.lineF2)
+        self.registerLine(self.lineLambdaCplus)
+        self.registerLine(self.lineLambdaCminus)
+
+        
+def filterPions(name, inputName, isLong, PION_BPV_IPCHI2, PION_P_MIN):
+    """
+    Apply cuts to daughters of Lambdas
+    """
+    _strCutISLONG = "%(isLong)s"                             % locals()
+    _strCutBPVIPCHI2 = "(BPVIPCHI2() > %(PION_BPV_IPCHI2)s)" % locals()
+    _strCutPMIN = "(P  > %(PION_P_MIN)s)"                    % locals()
+    _strCuts = '(' + _strCutISLONG + '&' + _strCutBPVIPCHI2 \
+                   + '&' + _strCutPMIN  + ')'               
+    _trackFilter = FilterDesktop(Code = _strCuts)
+    inputTracks = DataOnDemand(Location = inputName)
+    return Selection(name,
+                     Algorithm          = _trackFilter,
+                     RequiredSelections = [inputTracks])
+
+
+
+                     
+def filterKaons(name, inputName,isLong, Trk_P_MIN, KAON_PIDK_MIN, KAON_PIDKp_MIN, KAON_IPCHI2_MAX):
+    """
+    Apply cuts to daughters of D0
+    """
+    _strCutLONG  = "%(isLong)s"     % locals()
+    _strCutP      = "(P  > %(Trk_P_MIN)s)"                        % locals()
+    _strCutPID    = "(PIDK  > %(KAON_PIDK_MIN)s)"                 % locals()
+    _strCutPID2    = "( (PIDK-PIDp) > %(KAON_PIDKp_MIN)s)"         % locals()
+    
+
+    _strCutIPChi2 = "(BPVIPCHI2() < %(KAON_IPCHI2_MAX)s)" % locals()
+    
+    _strCuts = '(' + _strCutLONG + '&' + _strCutP \
+                   + '&' + _strCutPID \
+                   + '&' + _strCutPID2 + '&' + _strCutIPChi2 + ')'
+
+#    print '_strCuts: filterKaons ', _strCuts
+    _trackFilter = FilterDesktop(Code = _strCuts)
+    inputTracks = DataOnDemand(Location = inputName)
+    return Selection(name,
+                     Algorithm          = _trackFilter,
+                     RequiredSelections = [inputTracks])
+
+
+
+
+
+
+
+def makeLambda(name, inputDecayDescriptors, inputDaughters, FISHER_D, LAMBDA_V_CHI2, LAMBDA_ADAMASS, LAMBDA_IPCHI2_MAX):
+    """
+    Given lists of Lambda daughter tracks  reconstruct Lambda -> p+ pi-. and, alternatively, to  the charge conjugate. The  choice depends on the inputDecayDescriptors.
+    """
+#    "pi+" : "(P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)",
+#    "p+"  : "(P>2*GeV) & (MIPCHI2DV(PRIMARY)>9)"
+#    X.CombinationCut = "(ADAMASS('Lambda0')<50*MeV) & (ADOCACHI2CUT(30, ''))"
+#    X.MotherCut      =  "(ADMASS('Lambda0')<35*MeV) & (VFASPF(VCHI2)<30) & (BPVVDCHI2 > 4.)"
+    
+    _combCutMass = "(ADAMASS('Lambda0')<%(LAMBDA_ADAMASS)s)"  % locals()
+    
+# not needed because pion and proton are originating in Lambda (long-lived) decay vertex    _combCutsPV   = "(AALLSAMEBPV)"
+
+    
+    _combCuts = '(' + _combCutMass + ')'
+    
+    _motherCutFisher   = '( (CHILD(MIPDV(PRIMARY),1)*CHILD(MIPDV(PRIMARY),2)/MIPDV(PRIMARY))>%(FISHER_D)s)'  % locals()
+    _motherCutVtx      = '(VFASPF(VCHI2PDOF) < %(LAMBDA_V_CHI2)s)' % locals()
+    _motherCutIPCHI2_MAX = '( BPVIPCHI2() < %(LAMBDA_IPCHI2_MAX)s)' % locals()
+    
+    _motherCuts = '(' + _motherCutFisher   + '&' + _motherCutVtx + '&' + _motherCutIPCHI2_MAX + ')'
+    
+#    print 'inputDecayDescriptors', inputDecayDescriptors
+#    print '_combCuts:MakeLambda', _combCuts 
+#    print '_motherCuts:MakeLambda', _motherCuts
+
+    _Lambda = CombineParticles(DecayDescriptors = inputDecayDescriptors,
+                            CombinationCut   = _combCuts,
+                            MotherCut        = _motherCuts)
+    return Selection(name,
+                     Algorithm = _Lambda,
+                     RequiredSelections = inputDaughters)
+
+
+
+"""
+Make dummy Phi candidates
+
+"""
+def makePhi(name, inputDecayDescriptors, inputDaughters):
+    """
+    Given lists of K+/K- daughter tracks  reconstruct a dummy phi without applying cuts on combination and with PZ>0 dummy cut on Mother.
+    """
+
+    _combCuts = '(AALLSAMEBPV(-1,-1,-1))' #'(ATRUE)' is nor enough, we need Kaons comming from the same PV in High PileUp
+    _motherCuts =  'PZ>0' 
+
+
+#    print '_combCuts:MakePhi', _combCuts
+#    print '_motherCuts:MakePhi', _motherCuts
+
+    _phi = CombineParticles(DecayDescriptors = inputDecayDescriptors,
+                            CombinationCut   = _combCuts,
+                            MotherCut        = _motherCuts)
+    return Selection(name,
+                     Algorithm = _phi,
+                     RequiredSelections = inputDaughters)
+
+
+
+
+'''
+Make dummy  f_2 candidates - for now not needed as not needed the makeLambdaCplus or  makeLambdaCminus
+'''
+
+#def makeF2(name, inputDecayDescriptors, inputDaughters):
+'''
+    Given lists of Lambda/Lambdabar daughter particles reconstruct a dummy f_2 without applying cuts on combination and with PZ>0 dummy cut on Mother.
+'''
+#    _combCuts = '(AALLSAMEBPV)' #'(ATRUE)' is nor enough, we need Lambdas comming from the same PV in High PileUp
+#    _motherCuts =  'PZ>0' 
+#
+#    _f2 = CombineParticles(DecayDescriptors = inputDecayDescriptors,
+#                            CombinationCut   = _combCuts,
+#                            MotherCut        = _motherCuts)
+#    return Selection(name,
+#                     Algorithm = _f2,
+#                     RequiredSelections = inputDaughters)
+
+                     
+
+    
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingSingleTrackTIS.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingSingleTrackTIS.py
new file mode 100644
index 000000000..8fa46a51b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingSingleTrackTIS.py
@@ -0,0 +1,146 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Lines for study of background to Electroweak processes
+# Electroweak Group (Conveners: S.Bifani, J.Anderson; Stripping contact: W.Barter)
+#
+# S.Bifani
+#
+# SingleTrackTIS:    StdAllNoPIDsMuons, pT>20GeV & TTHits & Hlt1xHlt2 TIS (10% PRESCALE)
+# SingleTrackTISLow: StdAllNoPIDsMuons, pT>15GeV & TTHits & Hlt1xHlt2 TIS ( 1% PRESCALE)
+
+__author__ = ['S. Bifani']
+
+__all__ = (
+  'SingleTrackTISConf',
+  'default_config',
+)
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import Selection
+from StandardParticles import StdAllNoPIDsMuons
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import GeV
+
+
+default_config = {
+    'NAME'        : 'SingleTrackTIS',
+    'BUILDERTYPE' : 'SingleTrackTISConf',
+    'WGs'         : [ 'QEE'],
+    'STREAMS'     : [ 'EW' ],
+    'CONFIG'      : { 
+        'SingleTrackTIS_Prescale'    : 0.1,
+        'SingleTrackTISLow_Prescale' : 0.01,
+        'SingleTrackTIS_Postscale'   : 1.00,
+        'pT'    : 20. * GeV,
+        'pTlow' : 15. * GeV,
+    },
+}
+
+class SingleTrackTISConf( LineBuilder ) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__( self, name, config ) :
+
+        LineBuilder.__init__( self, name, config )
+
+
+        # Define the cuts
+
+        _cut    = "(PT>%(pT)s)    & (HASTRACK & TRCUT(0<TrIDC('isTT')))"%config
+        _cutlow = "(PT>%(pTlow)s) & (HASTRACK & TRCUT(0<TrIDC('isTT')))"%config
+        
+
+        # SingleTrackTIS
+
+        sel_NoPIDs = makeFilter( name + 'NoPIDs',
+                                      StdAllNoPIDsMuons,
+                                      "from LoKiTracks.decorators import *",
+                                      _cut
+                                      )
+
+        sel_Hlt1TIS = makeTISTOS( name + 'Hlt1TIS',
+                                       sel_NoPIDs,
+                                       "Hlt1.*Decision%TIS"
+                                       )
+
+        sel_Hlt2TIS = makeTISTOS( name + 'Hlt2TIS',
+                                       sel_Hlt1TIS,
+                                       "Hlt2.*Decision%TIS"
+                                       )
+
+        line_SingleTrackTIS = StrippingLine( name + 'Line',
+                                                  prescale  = config[ 'SingleTrackTIS_Prescale' ],
+                                                  postscale = config[ 'SingleTrackTIS_Postscale' ],
+                                                  #RequiredRawEvents = ["Muon","Calo","Rich","Velo","Tracker"],
+                                                  checkPV   = False,
+                                                  selection = sel_Hlt2TIS
+                                                  )
+
+        self.registerLine( line_SingleTrackTIS )
+
+
+        # SingleTrackTIS
+
+        sel_NoPIDsLow = makeFilter( name + 'NoPIDsLow',
+                                         StdAllNoPIDsMuons,
+                                         "from LoKiTracks.decorators import *",
+                                         _cutlow
+                                         )
+
+        sel_Hlt1TISLow = makeTISTOS( name + 'Hlt1TISLow',
+                                          sel_NoPIDsLow,
+                                          "Hlt1.*Decision%TIS"
+                                          )
+
+        sel_Hlt2TISLow = makeTISTOS( name + 'Hlt2TISLow',
+                                          sel_Hlt1TISLow,
+                                          "Hlt2.*Decision%TIS"
+                                          )
+
+        line_SingleTrackTISLow = StrippingLine( name + 'LowLine',
+                                                     prescale  = config[ 'SingleTrackTISLow_Prescale' ],
+                                                     postscale = config[ 'SingleTrackTIS_Postscale' ],
+                                                     #RequiredRawEvents = ["Muon","Calo","Rich","Velo","Tracker"],
+                                                     checkPV   = False,
+                                                     selection = sel_Hlt2TISLow
+                                                     )
+
+        self.registerLine( line_SingleTrackTISLow )
+
+
+def makeFilter( name, _input, _preambulo, _code ) :
+
+    _filter = FilterDesktop( Preambulo = [ _preambulo ],
+                             Code      = _code
+                             )
+
+    return Selection ( name,
+                       Algorithm          = _filter,
+                       RequiredSelections = [ _input ]
+                       )
+
+
+def makeTISTOS( name, _input, _trigger ) :
+
+    from Configurables import TisTosParticleTagger
+    _tisTosFilter = TisTosParticleTagger( name + 'Tagger' )
+    _tisTosFilter.TisTosSpecs = { _trigger : 0 }
+    #_tisTosFilter.ProjectTracksToCalo = False
+    #_tisTosFilter.CaloClustForCharged = False
+    #_tisTosFilter.CaloClustForNeutral = False
+    #_tisTosFilter.TOSFrac = { 4:0.0, 5:0.0 }
+
+    return Selection( name,
+                      Algorithm          = _tisTosFilter,
+                      RequiredSelections = [ _input ]
+                      )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingStrangeBaryons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingStrangeBaryons.py
new file mode 100644
index 000000000..a8df8a03b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingStrangeBaryons.py
@@ -0,0 +1,310 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping line for Strange Baryon  studies 
+Author: MS&IB&BP
+
+The Xi, Omega strange baryons are selected from the decays
+Xi -> Lambda pi,   Omega -> Lambda K
+
+LLL DDL DDD
+'''
+
+__author__  = ['Mihai Straticiuc', 'Florin Maciuc', 'Nguyen Thi Dung']
+__date__    = '26/06/2012'
+__version__ = '$Revision: 0.3 $'
+__all__     = ( 'StrippingStrangeBaryonsConf', 'default_config' )
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons, StdLooseProtons, StdNoPIDsDownProtons
+from CommonParticles import StdLooseLambda
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+default_config = {
+    'NAME'        : 'StrangeBaryons',
+    'BUILDERTYPE' : 'StrippingStrangeBaryonsConf',
+    'STREAMS'     : [ 'EW'  ],
+    'WGs'         : [ 'QEE' ],
+    'CONFIG'      : { 
+        'PreScale'    : 1,
+        'checkPV'     : True,
+        'HLT1'        : "HLT_PASS_RE('Hlt1.*NoBias.*Decision')|HLT_PASS_RE('Hlt1.*MB.*Bias.*Decision')|HLT_PASS_RE('Hlt1.*MicroBias.*Decision')",
+        #'RawEvents'   : [ "Muon", "Calo", "Rich" ],
+
+        #PID cuts
+        'ProtonPIDppi'  : -5.,  #(PIDp-PIDpi) > -5                   
+        'PionPIDpiK'    : 0.,   #(PIDp-PIDK) > 0
+
+        # Lambda Decay
+        'TRCHI2DOF'               : 4.,   # < 4 for all 6 cases
+        'minCHI2IPPV_pPi_LL'      : 20.,  # > 20
+        'minCHI2IPPV_pPi'         : 4.,   # > 4 for the rest of 4 cases
+        'CHI2VTX_L'               : 15.,  # < 15 for all 6 cases
+        'L_FDCHI2_OWNPV_LL'       : 150., # > 150
+        'L_FDCHI2_OWNPV'          : 100., # > 100 for the other 5 cases
+        'L_FDCHI2_OWNPV_LL_Omega' : 70.,  # > 150
+        'L_FDCHI2_OWNPV_Omega'    : 70.,  # > 100 for the other 5 cases
+        'minCHI2IPPV_L_LL'        : 9.,   # > 9
+        'minCHI2IPPV_L'           : 2.,   # > 2 for the other 5 cases
+        'Lambda0MassWindow'       : 30.,  # < 6 for all six cases
+        'Lambda0MassWindowPost'   : 6.,   # < 6 for all six cases
+
+        #Bachelor cuts
+        'minCHI2IPPV_Pi_Bachelor_LLL' :   10.,  # > 10
+        'minCHI2IPPV_Pi_Bachelor_DDD' :   4.,   # > 4
+        'minCHI2IPPV_Bachelor'        :   3.,   # > 3 for the other 3 cases: Tight DDL & DDD + Loose DDL
+        'minCHI2IPPV_K_Bachelor_D'    :   3.,   # > 6
+        'minCHI2IPPV_K_Bachelor_L'    :   3.,   # should have been 10 but use it for DDL case too , reduced to 3
+
+        # Xi Decay
+        'CHI2VTX_Xi'            : 25.,    # < 25 for all 6 cases
+        'Xi_FDCHI2_OWNPV_LLL'   : 30.,    # > 30
+        'Xi_FDCHI2_OWNPV_DDL'   : 15.,    # > 15
+        'Xi_FDCHI2_OWNPV'       : 5.,     # > 5 for the other 4 cases
+        'COS_L_Xi'              : 0.9996, # > 0.9996 for all 6 cases
+        'XiMassWindow'          : 50.,    #?????????
+
+        # Omega Decay
+        'CHI2VTX_Omega'       : 9.,     # < 25 for all 6 cases
+        'Omega_FDCHI2_OWNPV'  : 10.,    # > 5 for the other 4 cases
+        'COS_L_Omega'         : 0.9996, # > 0.9996 for all 6 cases
+        'OmegaMassWindow'     : 50.,    #?????????
+    },
+}
+
+
+
+
+#-------------------------------------------------------------------------------------------------------------
+class StrippingStrangeBaryonsConf(LineBuilder) :
+       __configuration_keys__ = default_config['CONFIG'].keys()
+       
+       def __init__(self, name, config) :
+           LineBuilder.__init__(self, name, config)
+           self.name = name
+           self.config = config
+       
+
+           #### LLL case ####
+           PionsForLambdaLList = createSubSel( OutputList = "PionsForLambda" + self.name,
+                                               InputList = DataOnDemand("Phys/StdAllLoosePions/Particles"),
+                                               Cuts = "(ISLONG) & (TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                               "(BPVIPCHI2() > %(minCHI2IPPV_pPi_LL)s)" % self.config )
+           ProtonsForLambdaLList = createSubSel( OutputList = "ProtonsForLambdaLoose" + self.name,
+                                                 InputList = DataOnDemand("Phys/StdAllLooseProtons/Particles"),
+                                                 Cuts = "(ISLONG) & (TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                                 "(BPVIPCHI2() > %(minCHI2IPPV_L_LL)s)" % self.config )
+           PionsForXiLList = createSubSel( OutputList = "PionsForXi" + self.name,
+                                           InputList = DataOnDemand("Phys/StdAllLoosePions/Particles"),
+                                           Cuts = "(ISLONG) & (TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                           "(BPVIPCHI2() > %(minCHI2IPPV_Pi_Bachelor_LLL)s)" % self.config )
+           KaonsForOmegaLList = createSubSel( OutputList = "KaonsForOmega" + self.name,
+                                              InputList = DataOnDemand("Phys/StdAllLooseKaons/Particles"),
+                                              Cuts = "(ISLONG) & (TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                              "(BPVIPCHI2() > %(minCHI2IPPV_K_Bachelor_L)s)" % self.config )
+           
+
+           
+           #### DDL ####
+           PionsForLambdaDList = createSubSel( OutputList = "PionsForLambdaD" + self.name,
+                                               InputList = DataOnDemand("Phys/StdNoPIDsDownPions/Particles"),
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                               "(BPVIPCHI2() > %(minCHI2IPPV_pPi)s)" % self.config )
+           ProtonsForLambdaDList = createSubSel( OutputList = "ProtonsForLambdaD" + self.name,
+                                                 InputList = DataOnDemand("Phys/StdNoPIDsDownProtons/Particles"),
+                                                 Cuts = "HASRICH & ((PIDp-PIDpi) > %(ProtonPIDppi)s) & "\
+                                                 "(TRCHI2DOF < %(TRCHI2DOF)s ) "\
+                                                 "& (BPVIPCHI2() > %(minCHI2IPPV_pPi)s)" % self.config )
+           PionsForXiDLList = createSubSel( OutputList = "PionsForXiDL" + self.name,
+                                            InputList = DataOnDemand("Phys/StdAllLoosePions/Particles"),
+                                            Cuts = "(ISLONG) & (TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                            "(BPVIPCHI2() > %(minCHI2IPPV_Bachelor)s)" % self.config )
+           
+
+           
+           #### DDD ####de adaugat conditiile pentru protoni
+           PionsForXiDDList = createSubSel( OutputList = "PionsForXiDD" + self.name,
+                                            InputList = DataOnDemand("Phys/StdNoPIDsDownPions/Particles"),
+                                            Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                            "(BPVIPCHI2() > %(minCHI2IPPV_Pi_Bachelor_DDD)s)" % self.config )
+           KaonsForOmegaDList = createSubSel( OutputList = "KaonsForOmegaD" + self.name,
+                                              InputList = DataOnDemand("Phys/StdLooseDownKaons/Particles"),
+                                              Cuts = "(TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                              "(BPVIPCHI2() > %(minCHI2IPPV_K_Bachelor_D)s)" % self.config )
+           
+           
+           
+           
+           #print "Lambda0MassWindow: %(Lambda0MassWindow)s*MeV " % self.config
+      	   #print "Lambda0MassWindowPost: %(Lambda0MassWindowPost)s*MeV" % self.config
+           #print "this stripping Line is used, signed Florin"
+           
+           #Create Lambdas
+           Lambda2pPiL = createCombinationSel(OutputList = "Lambda2pPiL"+ self.name,
+                                              DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                              DaughterLists   = [PionsForLambdaLList, ProtonsForLambdaLList],
+                                              DaughterCuts    = {},
+                                              PreVertexCuts   = "(ADAMASS('Lambda0') < %(Lambda0MassWindow)s*MeV)"% self.config,
+  
+                                              PostVertexCuts  = "(BPVIPCHI2() > %(minCHI2IPPV_L_LL)s) & (VFASPF(VCHI2) < %(CHI2VTX_L)s) &"\
+                                              "(BPVVDCHI2 > %(L_FDCHI2_OWNPV_LL)s) & (ADMASS('Lambda0') < %(Lambda0MassWindowPost)s*MeV)" %self.config
+                                              #PostVertexCuts  = "(BPVIPCHI2() > %(minCHI2IPPV_L_Loose)s) & (VFASPF(VCHI2) < %(CHI2VTX_L)s)" %self.config
+                                              )
+
+
+
+           Lambda2pPiLOmega = createCombinationSel(OutputList = "Lambda2pPiLOmega"+ self.name,
+                                              DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                              DaughterLists   = [PionsForLambdaLList, ProtonsForLambdaLList],
+                                              DaughterCuts    = {},
+                                              PreVertexCuts   = "(ADAMASS('Lambda0') < %(Lambda0MassWindow)s*MeV)"% self.config,
+                                              PostVertexCuts  = "(BPVIPCHI2() > %(minCHI2IPPV_L_LL)s) & (VFASPF(VCHI2) < %(CHI2VTX_L)s) &"\
+                                              "(BPVVDCHI2 > %(L_FDCHI2_OWNPV_LL_Omega)s) & (ADMASS('Lambda0') < %(Lambda0MassWindowPost)s*MeV)" %self.config
+                                              #PostVertexCuts  = "(BPVIPCHI2() > %(minCHI2IPPV_L_Loose)s) & (VFASPF(VCHI2) < %(CHI2VTX_L)s)" %self.config
+                                              )
+           
+           
+           
+           Lambda2pPiD = createCombinationSel(OutputList = "Lambda2pPiD"+ self.name,
+                                              DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                              DaughterLists   = [PionsForLambdaDList, ProtonsForLambdaDList],
+                                              DaughterCuts    = {},
+                                              PreVertexCuts   = "(ADAMASS('Lambda0') < %(Lambda0MassWindow)s*MeV)"% self.config,
+                                              PostVertexCuts  = "(BPVIPCHI2() > %(minCHI2IPPV_L)s) & (VFASPF(VCHI2) < %(CHI2VTX_L)s) &"\
+                                              "(BPVVDCHI2 > %(L_FDCHI2_OWNPV)s) & (ADMASS('Lambda0') < %(Lambda0MassWindowPost)s*MeV)" %self.config
+                                              #PostVertexCuts  = "(BPVIPCHI2() > %(minCHI2IPPV_L)s) & (VFASPF(VCHI2) < %(CHI2VTX_L)s)" %self.config
+                                              )
+
+
+           Lambda2pPiDOmega = createCombinationSel(OutputList = "Lambda2pPiDOmega"+ self.name,
+                                              DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                              DaughterLists   = [PionsForLambdaDList, ProtonsForLambdaDList],
+                                              DaughterCuts    = {},
+                                              PreVertexCuts   = "(ADAMASS('Lambda0') < %(Lambda0MassWindow)s*MeV)"% self.config,
+                                              PostVertexCuts  = "(BPVIPCHI2() > %(minCHI2IPPV_L)s) & (VFASPF(VCHI2) < %(CHI2VTX_L)s) &"\
+                                              "(BPVVDCHI2 > %(L_FDCHI2_OWNPV_Omega)s) & (ADMASS('Lambda0') < %(Lambda0MassWindowPost)s*MeV)" %self.config
+                                              #PostVertexCuts  = "(BPVIPCHI2() > %(minCHI2IPPV_L)s) & (VFASPF(VCHI2) < %(CHI2VTX_L)s)" %self.config
+                                              )
+           
+             
+           
+           self.makeXiminus("XiminusLLL",  [Lambda2pPiL, PionsForXiLList], 'Xi_FDCHI2_OWNPV_LLL')
+#           self.makeXiminus("XiminusDDL",  [Lambda2pPiD, PionsForXiDLList], 'Xi_FDCHI2_OWNPV_DDL')
+           self.makeXiminus("XiminusDDD",  [Lambda2pPiD, PionsForXiDDList], 'Xi_FDCHI2_OWNPV')
+           self.makeXiminus("XiminusDDL",  [Lambda2pPiD, PionsForXiDLList], 'Xi_FDCHI2_OWNPV_DDL')
+
+           
+           self.makeOmegaminus("OmegaminusLLL",  [Lambda2pPiLOmega, KaonsForOmegaLList], 'Omega_FDCHI2_OWNPV')
+#           self.makeOmegaminus("OmegaminusDDL",  [Lambda2pPiD, KaonsForOmegaLList], 'Omega_FDCHI2_OWNPV')
+           self.makeOmegaminus("OmegaminusDDD",  [Lambda2pPiDOmega, KaonsForOmegaDList], 'Omega_FDCHI2_OWNPV')
+           self.makeOmegaminus("OmegaminusDDL",  [Lambda2pPiDOmega, KaonsForOmegaLList], 'Omega_FDCHI2_OWNPV')
+
+           
+
+#------------------------------------------------------------------------------------------
+
+       def makeXiminus(self, OutputList, DaughterLists, FDCHI2 ):            
+              ''' Make a Xi minus candidate '''
+              myPostVertexCuts  = "(VFASPF(VCHI2)< %%(CHI2VTX_Xi)s) & (BPVVDCHI2 > %%(%s)s) & "\
+                                                      "((CHILD(PX,1)*CHILD(PX,0)+CHILD(PY,1)*CHILD(PY,0)+CHILD(PZ,1)*CHILD(PZ,0))/(CHILD(P,1)*CHILD(P,0)) > %%(COS_L_Xi)s)" % (FDCHI2)
+              #print "Make %s"%OutputList
+              #PostVertexCuts = "(VFASPF(VCHI2)< %(CHI2VTX_Xi)s) & (LV01 > %(COS_L_Xi)s)" %self.config
+              #PostVertexCuts = "(VFASPF(VCHI2)< %(CHI2VTX_Xi)s) " %self.config
+              #PostVertexCuts += "(BPVVDCHI2 > %s)" %self.config[FDCHI2]
+              myPostVertexCuts += " & (BPVIPCHI2()<1000)" # new cut
+              
+              Ximinus2LambdaPi = createCombinationSel(OutputList = OutputList,
+                                                      DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                                                      DaughterLists   = DaughterLists,
+                                                      PreVertexCuts   = "(ADAMASS('Xi-') < %(XiMassWindow)s*MeV)"% self.config,
+                                                      PostVertexCuts = myPostVertexCuts % self.config
+                                                      #"(LV01 > %(COS_L_Xi)s) " %self.config
+                                                      #PostVertexCuts  = "(VFASPF(VCHI2)< %(CHI2VTX_Xi)s) & (BPVVDCHI2 > %(L_FDCHI2_OWNPV)s)" %self.config
+                                                      # PostVertexCuts  = "(VFASPF(VCHI2)< %(CHI2VTX_Xi)s)" %self.config
+                                                      )
+              
+              #print "1st HLT = ", "%(HLT1)s" %self.config
+              Ximinus2LambdaPiLine = StrippingLine(OutputList+self.name, 
+                  prescale  = self.config['PreScale'], 
+                  HLT1      = self.config['HLT1'], 
+                  algos     = [Ximinus2LambdaPi],
+                  #RequiredRawEvents = self.config['RawEvents'],
+              )
+              self.registerLine (Ximinus2LambdaPiLine)
+
+
+
+              
+       def makeOmegaminus(self, OutputList, DaughterLists, FDCHI2 ): 
+              ''' Make an Omega minus candidate '''
+              #print "Make %s"%OutputList
+              myPostVertexCuts = "(VFASPF(VCHI2)< %%(CHI2VTX_Omega)s) & (BPVVDCHI2 > %%(%s)s) & "\
+                                                        "((CHILD(PX,1)*CHILD(PX,0)+CHILD(PY,1)*CHILD(PY,0)+CHILD(PZ,1)*CHILD(PZ,0))/(CHILD(P,1)*CHILD(P,0)) > %%(COS_L_Xi)s)" % (FDCHI2)
+              myPostVertexCuts += " & (BPVIPCHI2()<1000)" # new cut 
+              Omegaminus2LambdaK = createCombinationSel(OutputList = OutputList,
+                                                        DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+                                                        DaughterLists = DaughterLists,
+#                                                        DaughterCuts = {"K-"      : "(PT>0.*GeV)"},
+                                                        PreVertexCuts = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)" % self.config,
+                                                        PostVertexCuts = myPostVertexCuts % self.config
+                                                        #PostVertexCuts = "(VFASPF(VCHI2/VDOF)<25) & (BPVDLS> %(DLSForLongLived)s) " %self.config
+                                                        #PostVertexCuts = "(VFASPF(VCHI2)< %(CHI2VTX_Omega)s) & (BPVVDCHI2 > %(L_FDCHI2_OWNPV)s) & "\
+                                                        #"((CHILD(PX,1)*CHILD(PX,0)+CHILD(PY,1)*CHILD(PY,0)+CHILD(PZ,1)*CHILD(PZ,0))/(CHILD(P,1)*CHILD(P,0)) > %(COS_L_Xi)s)" %self.config
+                                                        #"(LV01 > %(COS_L_Xi)s) " %self.config
+                                                        )
+       	      # print "2nd HLT = ", "%(HLT1)s" %self.config
+              Omegaminus2LambdaKLine = StrippingLine(OutputList+self.name, 
+                  prescale  = self.config['PreScale'], 
+                  HLT1      = self.config['HLT1'], 
+                  algos     = [Omegaminus2LambdaK],
+                  #RequiredRawEvents = self.config['RawEvents'],
+              )
+              self.registerLine (Omegaminus2LambdaKLine)             
+
+
+              
+
+
+def createSubSel(OutputList, InputList, Cuts ) :
+       '''create a selection using a FilterDesktop'''
+       filter = FilterDesktop(Code = Cuts)
+       return Selection( OutputList,
+                         Algorithm = filter,
+                         RequiredSelections = [ InputList ] )
+
+
+def createCombinationSel( OutputList,
+                          DecayDescriptor,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL" ) :
+       '''create a selection using a ParticleCombiner with a single decay descriptor'''
+#       print "here are combination parameters"
+#       print DecayDescriptor
+#       print DaughterLists
+#       print DaughterCuts
+#       print PreVertexCuts
+#       print PostVertexCuts
+       combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                    DaughtersCuts = DaughterCuts,
+                                    MotherCut = PostVertexCuts,
+                                    CombinationCut = PreVertexCuts,
+                                    ReFitPVs = False)
+       return Selection ( OutputList,
+                          Algorithm = combiner,
+                          RequiredSelections = DaughterLists)
+       
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingStrangeBaryonsNoPID.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingStrangeBaryonsNoPID.py
new file mode 100644
index 000000000..1edb739ad
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingStrangeBaryonsNoPID.py
@@ -0,0 +1,218 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping line for Strange Baryon  studies 
+Author: MF
+
+The Xi, Omega strange baryons are selected from the decays
+Xi -> Lambda pi,   Omega -> Lambda K
+
+LLL
+'''
+
+__author__  = ['Florin Maciuc']
+__date__    = '13/01/2014'
+__version__ = '$Revision: 0.0 $'
+__all__     = ( 'StrippingStrangeBaryonsNoPIDConf', 'default_config' )
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV
+
+
+default_config = {
+    'NAME'        : 'StrangeBaryonsNoPID',
+    'BUILDERTYPE' : 'StrippingStrangeBaryonsNoPIDConf',
+    'STREAMS'     : [ 'EW'  ],
+    'WGs'         : [ 'QEE' ],
+    'CONFIG'      :  { #PID cuts
+        'PreScale'    : 1,
+        'checkPV'     : False,
+        'HLT1'        : "HLT_PASS_RE('Hlt1.*NoBias.*Decision')|HLT_PASS_RE('Hlt1.*MB.*Bias.*Decision')|HLT_PASS_RE('Hlt1.*MicroBias.*Decision')",
+        #'RawEvents'   : [ "Muon", "Calo", "Rich" ],
+        'ProtonPIDppi':       -5.,  #(PIDp-PIDpi) > -5                   
+        'PionPIDpiK'  :       0.,   #(PIDp-PIDK) > 0
+       
+        # Lambda Decay
+        'TRCHI2DOF'               :       4., # < 4 for all 6 cases
+        'minCHI2IPPV_pPi_LL'      :      20., # > 20
+        'minCHI2IPPV_pPi'         :       4., # > 4 for the rest of 4 cases
+        'CHI2VTX_L'               :      15., # < 15 for all 6 cases
+        'L_FDCHI2_OWNPV_LL'       :     150., # > 150
+        'L_FDCHI2_OWNPV'          :     100., # > 100 for the other 5 cases
+        'L_FDCHI2_OWNPV_LL_Omega' :     70., # > 150
+        'L_FDCHI2_OWNPV_Omega'    :     70., # > 100 for the other 5 cases
+        'minCHI2IPPV_L_LL'        :       9., # > 9
+        'minCHI2IPPV_L'           :       2., # > 2 for the other 5 cases
+        'Lambda0MassWindow'       :       30., # < 6 for all six cases
+        'Lambda0MassWindowPost'   :   6., # < 6 for all six cases
+
+        #Bachelor cuts
+        'minCHI2IPPV_Pi_Bachelor_LLL' :      10., # > 10
+        'minCHI2IPPV_Pi_Bachelor_DDD' :       4., # > 4
+        'minCHI2IPPV_Bachelor'        :       3., # > 3 for the other 3 cases: Tight DDL & DDD + Loose DDL
+        'minCHI2IPPV_K_Bachelor_D'    :      3., # > 6
+        'minCHI2IPPV_K_Bachelor_L'    :      3., # should have been 10 but use it for DDL case too , reduced to 3
+       
+        # Xi Decay
+        'CHI2VTX_Xi'          :      25., # < 25 for all 6 cases
+        'Xi_FDCHI2_OWNPV_LLL' :      30., # > 30
+        'Xi_FDCHI2_OWNPV_DDL' :      15., # > 15
+        'Xi_FDCHI2_OWNPV'     :       5., # > 5 for the other 4 cases
+        'COS_L_Xi'            :  0.9996, # > 0.9996 for all 6 cases
+        'XiMassWindow'        :      50., #?????????
+
+        # Omega Decay
+        'CHI2VTX_Omega'       :      9., # < 25 for all 6 cases
+        'Omega_FDCHI2_OWNPV'  :      10., # > 5 for the other 4 cases
+        'COS_L_Omega'         :      0.9996, # > 0.9996 for all 6 cases
+        'OmegaMassWindow'     :      50., #?????????
+    },
+}
+    
+
+
+
+#-------------------------------------------------------------------------------------------------------------
+class StrippingStrangeBaryonsNoPIDConf(LineBuilder) :
+
+       __configuration_keys__ = default_config['CONFIG'].keys()
+       
+       def __init__(self, name, config) :
+           LineBuilder.__init__(self, name, config)
+           self.name = name
+           self.config = config
+       
+
+           #### LLL case ####
+           PionsForLambdaLList = createSubSel( OutputList = "PionsForLambda" + self.name,
+                                               InputList = DataOnDemand("Phys/StdAllNoPIDsPions/Particles"),
+                                               Cuts = "(ISLONG) & (TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                               "(BPVIPCHI2() > %(minCHI2IPPV_pPi_LL)s)" % self.config )
+           ProtonsForLambdaLList = createSubSel( OutputList = "ProtonsForLambdaNoPID" + self.name,
+                                                 InputList = DataOnDemand("Phys/StdAllNoPIDsProtons/Particles"),
+                                                 Cuts = "(ISLONG) & (TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                                 "(BPVIPCHI2() > %(minCHI2IPPV_L_LL)s)" % self.config )
+           PionsForXiLList = createSubSel( OutputList = "PionsForXi" + self.name,
+                                           InputList = DataOnDemand("Phys/StdAllNoPIDsPions/Particles"),
+                                           Cuts = "(ISLONG) & (TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                           "(BPVIPCHI2() > %(minCHI2IPPV_Pi_Bachelor_LLL)s)" % self.config )
+           KaonsForOmegaLList = createSubSel( OutputList = "KaonsForOmega" + self.name,
+                                              InputList = DataOnDemand("Phys/StdAllNoPIDsKaons/Particles"),
+                                              Cuts = "(ISLONG) & (TRCHI2DOF < %(TRCHI2DOF)s ) & "\
+                                              "(BPVIPCHI2() > %(minCHI2IPPV_K_Bachelor_L)s)" % self.config )
+           
+           
+           #Create Lambdas
+           Lambda2pPiL = createCombinationSel(OutputList = "Lambda2pPiL"+ self.name,
+                                              DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                              DaughterLists   = [PionsForLambdaLList, ProtonsForLambdaLList],
+                                              DaughterCuts    = {},
+                                              PreVertexCuts   = "(ADAMASS('Lambda0') < %(Lambda0MassWindow)s*MeV)"% self.config,
+  
+                                              PostVertexCuts  = "(BPVIPCHI2() > %(minCHI2IPPV_L_LL)s) & (VFASPF(VCHI2) < %(CHI2VTX_L)s) &"\
+                                              "(BPVVDCHI2 > %(L_FDCHI2_OWNPV_LL)s) & (ADMASS('Lambda0') < %(Lambda0MassWindowPost)s*MeV)" %self.config
+                                             )
+
+
+           Lambda2pPiLOmega = createCombinationSel(OutputList = "Lambda2pPiLOmega"+ self.name,
+                                              DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                              DaughterLists   = [PionsForLambdaLList, ProtonsForLambdaLList],
+                                              DaughterCuts    = {},
+                                              PreVertexCuts   = "(ADAMASS('Lambda0') < %(Lambda0MassWindow)s*MeV)"% self.config,
+                                              PostVertexCuts  = "(BPVIPCHI2() > %(minCHI2IPPV_L_LL)s) & (VFASPF(VCHI2) < %(CHI2VTX_L)s) &"\
+                                              "(BPVVDCHI2 > %(L_FDCHI2_OWNPV_LL_Omega)s) & (ADMASS('Lambda0') < %(Lambda0MassWindowPost)s*MeV)" %self.config
+                                              )
+           
+           
+           
+           self.makeXiminus("XiminusLLLNoPID",  [Lambda2pPiL, PionsForXiLList], 'Xi_FDCHI2_OWNPV_LLL')
+
+           self.makeOmegaminus("OmegaminusLLLNoPID",  [Lambda2pPiLOmega, KaonsForOmegaLList], 'Omega_FDCHI2_OWNPV')
+
+           
+
+#------------------------------------------------------------------------------------------
+
+       def makeXiminus(self, OutputList, DaughterLists, FDCHI2 ):            
+              ''' Make a Xi minus candidate '''
+              myPostVertexCuts  = "(VFASPF(VCHI2)< %%(CHI2VTX_Xi)s) & (BPVVDCHI2 > %%(%s)s) & "\
+                                                      "((CHILD(PX,1)*CHILD(PX,0)+CHILD(PY,1)*CHILD(PY,0)+CHILD(PZ,1)*CHILD(PZ,0))/(CHILD(P,1)*CHILD(P,0)) > %%(COS_L_Xi)s)" % (FDCHI2)
+              myPostVertexCuts += " & (BPVIPCHI2()<1000)" # new cut
+              
+              Ximinus2LambdaPi = createCombinationSel(OutputList = OutputList,
+                                                      DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+                                                      DaughterLists   = DaughterLists,
+                                                      PreVertexCuts   = "(ADAMASS('Xi-') < %(XiMassWindow)s*MeV)"% self.config,
+                                                      PostVertexCuts = myPostVertexCuts % self.config
+                                                      )
+              
+              Ximinus2LambdaPiLine = StrippingLine(OutputList+self.name, 
+                  prescale  = self.config['PreScale'], 
+                  HLT1      = self.config['HLT1'], 
+                  algos     = [Ximinus2LambdaPi],
+                  #RequiredRawEvents = self.config['RawEvents'],
+              )
+              self.registerLine (Ximinus2LambdaPiLine)
+
+
+
+              
+       def makeOmegaminus(self, OutputList, DaughterLists, FDCHI2 ): 
+              ''' Make an Omega minus candidate '''
+              myPostVertexCuts = "(VFASPF(VCHI2)< %%(CHI2VTX_Omega)s) & (BPVVDCHI2 > %%(%s)s) & "\
+                                                        "((CHILD(PX,1)*CHILD(PX,0)+CHILD(PY,1)*CHILD(PY,0)+CHILD(PZ,1)*CHILD(PZ,0))/(CHILD(P,1)*CHILD(P,0)) > %%(COS_L_Xi)s)" % (FDCHI2)
+              myPostVertexCuts += " & (BPVIPCHI2()<1000)" # new cut 
+              Omegaminus2LambdaK = createCombinationSel(OutputList = OutputList,
+                                                        DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+                                                        DaughterLists = DaughterLists,
+                                                        PreVertexCuts = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)" % self.config,
+                                                        PostVertexCuts = myPostVertexCuts % self.config
+                                                        )
+              Omegaminus2LambdaKLine = StrippingLine(OutputList+self.name, 
+                  prescale  = self.config['PreScale'], 
+                  HLT1      = self.config['HLT1'], 
+                  algos     = [Omegaminus2LambdaK],
+                  #RequiredRawEvents = self.config['RawEvents'],
+              )
+              self.registerLine (Omegaminus2LambdaKLine)             
+
+
+              
+
+
+def createSubSel(OutputList, InputList, Cuts ) :
+       '''create a selection using a FilterDesktop'''
+       filter = FilterDesktop(Code = Cuts)
+       return Selection( OutputList,
+                         Algorithm = filter,
+                         RequiredSelections = [ InputList ] )
+
+
+def createCombinationSel( OutputList,
+                          DecayDescriptor,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL" ) :
+       '''create a selection using a ParticleCombiner with a single decay descriptor'''
+       combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                    DaughtersCuts = DaughterCuts,
+                                    MotherCut = PostVertexCuts,
+                                    CombinationCut = PreVertexCuts,
+                                    ReFitPVs = False)
+       return Selection ( OutputList,
+                          Algorithm = combiner,
+                          RequiredSelections = DaughterLists)
+       
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingTaggedJets.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingTaggedJets.py
new file mode 100755
index 000000000..3f426b08d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingTaggedJets.py
@@ -0,0 +1,132 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 Gaudi.Configuration import *
+from Configurables       import FilterDesktop, CombineParticles, LoKi__VertexFitter
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import  StdJets
+from CommonParticles.Utils import *
+from Configurables import FilterJet
+from GaudiKernel.SystemOfUnits import GeV
+
+__author__=["Xabier Cid Vidal","Cedric Potterat"]
+__all__ = ["default_config","TaggedJetsConf"]
+
+## if you want to prescale this line, please contact the authors before!
+
+default_config = {
+  'NAME'        : 'TaggedJets',
+  'BUILDERTYPE' : 'TaggedJetsConf',
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : [ 'BhadronCompleteEvent' ],
+  'CONFIG': {
+    'TaggedJetsPair_Prescale'               : 1.0,
+    'TaggedJetsPair_Postscale'              : 1.0,
+    'TaggedJetsPairExclusiveDiJet_Prescale' : 1.0,
+    'TaggedJetsPairExclusiveDiJet_Postscale': 1.0,
+    'DiTaggedJetsPair_Prescale'             : 1.0,
+    'DiTaggedJetsPair_Postscale'            : 1.0,
+    'min_jet_pT'                            : 25. * GeV,
+    'min_jet_pT_ExclusiveDiJet'             : 20. * GeV,
+  }
+}
+
+
+class TaggedJetsConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    self._config = config
+
+    ## B TAGGING!!
+    filterJet = FilterJet('BDTTagJets')
+    filterJet.Inputs = ["Phys/StdJets/Particles"]
+    filterJet.tagToolName = 'LoKi::BDTTag'
+    filterJet.Cut = 0
+    taggedJetsLocation = updateDoD ( filterJet )
+    self.__taggedJets = DataOnDemand(Location = taggedJetsLocation.keys()[0])
+
+    ## Making selections        
+    self.sel_DiJet  = self.makeJetGroup (name + 'DiJet', ptcut=1)
+    self.sel_DiJet_ExclusiveDiJet  = self.makeJetGroup (name + 'DiJetExclusiveDiJet',ptcut=2)
+    self.sel_DiJet_noPT  = self.makeJetGroup (name + 'DiJetNoPT')  
+    self.sel_DiJetPair  = self.makeDiJetPair (name + 'DiJetPair')
+        
+    ## Filter events with more than two jets
+    filterJets = " ( CONTAINS('Phys/StdJets/Particles') == 2 ) "
+
+    ## Register lines
+    self.registerLine(StrippingLine( name + 'JetPairLine',
+      prescale  = config[ 'TaggedJetsPair_Prescale' ],
+      postscale = config[ 'TaggedJetsPair_Postscale' ],
+      checkPV   = False,
+      selection = self.sel_DiJet,
+    ))
+
+    self.registerLine(StrippingLine( name + 'JetPairLineExclusiveDiJet',
+     prescale   = config[ 'TaggedJetsPairExclusiveDiJet_Prescale' ],
+     postscale  = config[ 'TaggedJetsPairExclusiveDiJet_Postscale' ],
+     FILTER     = filterJets,
+     checkPV    = False,
+     selection  = self.sel_DiJet_ExclusiveDiJet,
+    ))
+
+        
+    self.registerLine(StrippingLine( name + 'DiJetPairLine',
+      prescale  = config[ 'DiTaggedJetsPair_Prescale' ],
+      postscale = config[ 'DiTaggedJetsPair_Postscale' ],
+      checkPV   = False,
+      selection = self.sel_DiJetPair,
+    ))
+
+
+  def makeJetGroup(self,_name,ptcut=0):
+
+    JetGroup = CombineParticles("Combine"+_name)
+    JetGroup.DecayDescriptor = "H_10 -> CELLjet CELLjet"
+    JetGroup.ParticleCombiners = {"" : "LoKi::VertexFitter"}
+    JetGroup.addTool( LoKi__VertexFitter, name="LoKi::VertexFitter" )
+    vfitter = getattr ( JetGroup , "LoKi::VertexFitter" )
+    vfitter.Jets = ""
+    
+    if ptcut==1: JetGroup.DaughtersCuts = { "CELLjet" :" (PT > %(min_jet_pT)s ) " %self._config }
+    elif ptcut==2: JetGroup.DaughtersCuts = { "CELLjet" :" (PT > %(min_jet_pT_ExclusiveDiJet)s ) " %self._config }    
+    
+    JetGroup.MotherCut = "ALL"
+    
+    requiredSelections = [self.__taggedJets]
+    
+    return Selection ("Sel"+_name,
+                      Algorithm = JetGroup,
+                      RequiredSelections = requiredSelections)
+
+
+
+  def makeDiJetPair(self,_name):
+
+    DiJetPair = CombineParticles("Combine"+_name)
+    DiJetPair.DecayDescriptor = "H_20 -> H_10 H_10"
+    DiJetPair.ParticleCombiners = {"" : "LoKi::VertexFitter"}
+    DiJetPair.addTool( LoKi__VertexFitter, name="LoKi::VertexFitter" )
+    
+    DiJetPair.MotherCut = "ALL"
+    
+    requiredSelections = [self.sel_DiJet_noPT]
+
+    return Selection ("Sel"+_name,
+                      Algorithm = DiJetPair,
+                      RequiredSelections = requiredSelections)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingW2nH.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingW2nH.py
new file mode 100644
index 000000000..dbe997369
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingW2nH.py
@@ -0,0 +1,109 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Lines for W -> nH, n = 3,5,7,9,11
+#
+# Donal Hill
+#
+# W2nH :     StdAllNoPIDsPions, pT>1GeV & MM>60GeV
+
+__all__ = (
+  'W2nHConf',
+  'default_config',
+)
+
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsPions
+from GaudiKernel.SystemOfUnits import GeV
+from GaudiKernel.SystemOfUnits import MeV
+
+
+default_config = {
+    'NAME'        : 'W2nH',
+    'BUILDERTYPE' : 'W2nHConf',
+    'WGs'         : [ 'QEE'],
+    'STREAMS'     : [ 'EW' ],
+    'CONFIG'      : { 
+        'W2nH_Prescale'  : 1.0,
+        'W2nH_Postscale' : 1.0,
+        'pT'        : 3. * GeV,
+        'TrChi2'    : 5.,
+        'pErr'      : 0.01,
+        'vChi2'     : 10,
+        'GhostProb' : 0.4,
+        'pTmin'     : 80. * GeV,    #Minimun pT of the array
+        'MMmin'     : 50. * GeV,
+        'MMmax'     : 110. * GeV,
+    },
+}
+
+
+class W2nHConf( LineBuilder ) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ) :
+
+        LineBuilder.__init__( self, name, config )
+
+        # W23H signal
+        decay = '[W+ -> pi+ pi- pi+]cc'
+        self.registerLine(make_line( name+'3H', config, decay ))
+
+        # W23H WS
+        decay = '[W+ -> pi+ pi+ pi+]cc'
+        self.registerLine(make_line( name+'3HWS', config, decay ))
+
+        # W25H signal
+        decay = '[W+ -> pi+ pi- pi+ pi- pi+]cc'
+        self.registerLine(make_line( name+'5H', config, decay ))
+
+        # W25H WS
+        decay = '[W+ -> pi+ pi+ pi+ pi- pi+]cc'
+        self.registerLine(make_line( name+'5HWS', config, decay ))
+
+        # W27H signal
+        decay = '[W+ -> pi+ pi- pi+ pi- pi+ pi- pi+]cc'
+        self.registerLine(make_line( name+'7H', config, decay ))
+
+        # W27H WS
+        decay = '[W+ -> pi+ pi+ pi+ pi- pi+ pi- pi+]cc'
+        self.registerLine(make_line( name+'7HWS', config, decay ))
+
+#===============================================================================
+
+def make_combination(name, config, decay):
+  dcut = '(PT>%(pT)s) & (TRCHI2DOF<%(TrChi2)s) & ((PERR2)/(P*P)<%(pErr)s) & (TRGHOSTPROB<%(GhostProb)s)'%config
+  ccut = 'APT>%(pTmin)s'%config
+  mcut = '(MM>%(MMmin)s) & (MM<%(MMmax)s) & (VFASPF(VCHI2/VDOF)<%(vChi2)s)'%config
+
+  algo = CombineParticles(
+    DecayDescriptor     = decay,
+    DaughtersCuts       = {'pi+':dcut, 'pi-':dcut },
+    CombinationCut      = ccut,
+    MotherCut           = mcut,
+    WriteP2PVRelations  = False
+  )
+
+  return Selection(name+'Sel', Algorithm=algo, RequiredSelections=[StdAllNoPIDsPions])
+
+
+def make_line(name, config, decay):
+  return StrippingLine( name + 'Line',
+    prescale  = config[ 'W2nH_Prescale' ],
+    postscale = config[ 'W2nH_Postscale' ],
+    checkPV   = False,
+    selection = make_combination(name, config, decay)
+  )
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWJets.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWJets.py
new file mode 100755
index 000000000..83eabc8b2
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWJets.py
@@ -0,0 +1,221 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+
+Stripping Lines for W ( ->e,mu ) + Jet Jet
+
+Based on original works of X. Cid Vidal
+WmuAKTJets + WeAKTJets
+
+For each lepton type (e,mu) there are 2 lines made:
+- Lepton-triggered line
+- Jet-topo-triggered line
+They are then cover a phasespace complementarily on each other.
+
+"""
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from Configurables       import CombineParticles, LoKi__VertexFitter
+from PhysSelPython.Wrappers import Selection, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import  StdAllLooseMuons, StdAllNoPIDsElectrons, StdJets
+from CommonParticles.Utils import *
+from GaudiKernel.SystemOfUnits import GeV, MeV
+
+
+__author__  = "Xabier Cid Vidal"
+__all__     = "default_config", "WJetsConf"
+
+## if you want to prescale this line, please contact X. Cid Vidal before!
+
+default_config = {
+
+  ## Configs for Wmu+Jets lines
+  'WmuJets': {
+    'BUILDERTYPE' : 'WJetsConf',
+    'WGs'         : [ 'QEE' ],
+    'STREAMS'     : [ 'BhadronCompleteEvent' ],
+    'CONFIG': {
+      'WJets_Prescale'        : 1.0,
+      'WJetsTagged_Prescale'  : 1.0,
+      'RequiredRawEvents'     : [],
+      #
+      'config_W': {
+        'TOS'         : 'Hlt2EWSingleMuonVHighPtDecision', # 12.5 GeV
+        'min_mu_pT'   : 10. * GeV,
+        'max_mu_pT'   : 200000. * GeV,
+      },
+      'min_jet_pT'    : 15. * GeV,
+      'dr_lepton_jet' : 0.5,
+      'TOS_Jet'       : 'Hlt2Topo.*Decision',
+    }
+  },
+
+  ## Configs for We+Jets lines
+  'WeJets': {
+    'BUILDERTYPE' : 'WJetsConf',
+    'WGs'         : [ 'QEE' ],
+    'STREAMS'     : [ 'BhadronCompleteEvent' ],
+    'CONFIG': {
+      'WJets_Prescale'        : 1.0,
+      'WJetsTagged_Prescale'  : 1.0,
+      'RequiredRawEvents'     : [],
+      #
+      'config_W': {
+        'TOS'       : 'Hlt2EWSingleElectronVHighPtDecision', # 15 GeV
+        'min_e_pT'  : 10. * GeV,
+        'max_e_pT'  : 200000. * GeV,
+        'PrsCalMin' : 50. * MeV,
+        'ECalMin'   : 0.10,
+        'HCalMax'   : 0.05,      
+      },
+      'min_jet_pT'    : 15. * GeV,
+      'dr_lepton_jet' : 0.5,
+      'TOS_Jet'       : 'Hlt2Topo.*Decision',
+    }
+
+  },
+}
+
+preambulo = """
+## For DR calculation.
+from GaudiKernel.SystemOfUnits import degree
+
+eta_1 = ACHILDFUN(1,ETA)
+eta_2 = ACHILDFUN(2,ETA)
+eta_3 = ACHILDFUN(3,ETA)
+
+phi_1 = ACHILDFUN(1,PHI)
+phi_2 = ACHILDFUN(2,PHI)
+phi_3 = ACHILDFUN(3,PHI)
+
+deta_13 = eta_1 - eta_3
+deta_23 = eta_2 - eta_3
+
+dphi_13 = phi_1 - phi_3 
+dphi_23 = phi_2 - phi_3
+
+dphi_13 = switch ( dphi_13 >  180 * degree ,  dphi_13 - 180 * degree , dphi_13 )
+dphi_13 = switch ( dphi_13 < -180 * degree ,  dphi_13 + 180 * degree , dphi_13 )
+dphi_23 = switch ( dphi_23 >  180 * degree ,  dphi_23 - 180 * degree , dphi_23 )
+dphi_23 = switch ( dphi_23 < -180 * degree ,  dphi_23 + 180 * degree , dphi_23 )
+
+dr_13 = sqrt(deta_13**2 + dphi_13**2)
+dr_23 = sqrt(deta_23**2 + dphi_23**2)
+
+""".split('\n')
+
+#===============================================================================
+
+def SelWmu( name, conf, TOS_HLT2=None ):
+  """ 
+  Define the W->mu selection 
+  """
+  ## Apply cuts, with TOS optionally
+  code = '(PT>%(min_mu_pT)s) & (PT<%(max_mu_pT)s)'%conf
+  if TOS_HLT2:
+    code += "& (TOS('%s','Hlt2TriggerTisTos'))"%TOS_HLT2
+  return SimpleSelection( name, FilterDesktop, [StdAllLooseMuons], Code=code)
+
+
+def SelWe( name, conf, TOS_HLT2=None ):
+  """ 
+  Define the W->e selection 
+  """
+  ## Quality cut.
+  code = '(PT>%(min_e_pT)s) & (PT<%(max_e_pT)s)'\
+          '& (PPINFO(LHCb.ProtoParticle.CaloPrsE,0)>%(PrsCalMin)s) '\
+          '& (PPINFO(LHCb.ProtoParticle.CaloEcalE,0)>P*%(ECalMin)s) '\
+          '& (PPINFO(LHCb.ProtoParticle.CaloHcalE,99999)<P*%(HCalMax)s)'\
+          "& (HASTRACK & TRCUT(0<TrIDC('isTT')))"%conf
+  ## Apply cuts, with TOS optionally
+  if TOS_HLT2:
+    code += "& (TOS('%s','Hlt2TriggerTisTos'))"%TOS_HLT2
+  preambulo = ["from LoKiTracks.decorators import *"]
+  return SimpleSelection( name, FilterDesktop, [StdAllNoPIDsElectrons], 
+    Code=code, Preambulo=preambulo)
+
+
+def SelWDiJets( name, conf, desc, sel_W, TOS_HLT2=None ):
+  """
+  Create the combination of W + DiJets
+  """
+  ## Create CombineParticle, with caveat on jet combining.
+  DiJet = CombineParticles("Combine" + name)
+  DiJet.ParticleCombiners = {"" : "LoKi::VertexFitter"}
+  DiJet.addTool( LoKi__VertexFitter, name="LoKi::VertexFitter" )
+  vfitter = getattr( DiJet , "LoKi::VertexFitter" )
+  vfitter.Jets = ""
+
+  ## Apply cuts, with TOS optionally
+  #  Asking AT LEAST one of the jet to be TOSed by given trigger.
+  ccut = "AALLSAMEBPV(-1,-1,-1) "\
+         "& ( dr_13 > %(dr_lepton_jet)s )"\
+         "& ( dr_23 > %(dr_lepton_jet)s )" %conf
+  if TOS_HLT2:
+    cut_tos     = "(TOS('%s','Hlt2TriggerTisTos'))"%TOS_HLT2
+    cut_tosjet  = '(ACHILDCUT({0}, 1) | ACHILDCUT({0}, 2))'.format(cut_tos)
+    ccut       += ('&' + cut_tosjet)
+
+  DiJet.Preambulo       = preambulo
+  DiJet.DecayDescriptor = desc
+  DiJet.DaughtersCuts   = { "CELLjet": "(PT > %(min_jet_pT)s)"%conf }
+  DiJet.CombinationCut  = ccut
+  DiJet.MotherCut       = "ALL"
+
+  return Selection( name, Algorithm=DiJet, RequiredSelections=[ sel_W, StdJets ])
+
+
+#===============================================================================
+
+class WJetsConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['WmuJets']['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+    LineBuilder.__init__( self, name, config )
+
+    ## Switch the W selection, depends on the name given.
+    if name == 'WmuJets':
+      SelW = SelWmu
+      desc = "[H+ -> CELLjet CELLjet mu+]cc" 
+    elif name == 'WeJets':
+      SelW = SelWe 
+      desc = "[H+ -> CELLjet CELLjet e+]cc"
+    else:
+      raise ValueError('Unknown W to make: %s'%name)
+
+    ## Make W, 2 versions: TOS, no TOS
+    conf    = config['config_W']
+    W_tos   = SelW( name+'_W_tos'  , conf, conf['TOS'] )
+    W_notos = SelW( name+'_W_notos', conf )
+
+    ## Make w+DiJets, also 2 versions, opposite of the TOS used above
+    WJets_toslepton = SelWDiJets( name+'_toslepton', config, desc, W_tos )
+    WJets_tosjet    = SelWDiJets( name+'_tosjet'   , config, desc, W_notos, config['TOS_Jet'])
+
+    ## Finally, register lines
+    self.registerLine(StrippingLine( name + 'Line',
+      prescale          = config['WJets_Prescale'],
+      RequiredRawEvents = config['RequiredRawEvents'],
+      checkPV           = False,
+      selection         = WJets_toslepton,
+    ))
+
+    self.registerLine(StrippingLine( name + 'TaggedLine',
+      prescale          = config['WJetsTagged_Prescale'],
+      RequiredRawEvents = config['RequiredRawEvents'],
+      checkPV           = False,
+      selection         = WJets_tosjet,
+    ))
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWMu.py
new file mode 100644
index 000000000..9c325ae35
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWMu.py
@@ -0,0 +1,249 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping Lines for W->MuNu and studies of their background
+Electroweak Group (Conveners: S.Bifani, J.Anderson; Stripping contact: W.Barter)
+
+S.Bifani
+
+WMu signal:           StdAllLooseMuons,  pT>20GeV
+WMu control:          StdAllLooseMuons,  pT>15GeV                    (10% PRESCALE)
+WMu background:       StdAllNoPIDsMuons, pT>5GeV  &  Hlt1MBNoBias Dec (RATE LIMITED, 20% PRESCALE)
+SingleMuon control:   StdAllLooseMuons,  pT>10GeV &  Hlt2SingleMuonHighPT Dec     (1% PRESCALE)
+SingleMuon control:   StdAllLooseMuons,  pT>4.8GeV & Hlt2SingleMuonLowPT Dec      (20% PRESCALE)
+"""
+
+__all__ = 'WMuConf', 'default_config'
+__author__ = 'S. Bifani'
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from Configurables import FilterDesktop as Filter
+from PhysSelPython.Wrappers import SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons, StdAllNoPIDsMuons
+from GaudiKernel.SystemOfUnits import GeV, mm
+
+
+default_config = {
+  'NAME'        : 'WMu',
+  'BUILDERTYPE' : 'WMuConf',
+  'WGs'         : [ 'QEE'],
+  'STREAMS'     : [ 'EW' ],
+  'CONFIG'      : { 
+    'WMu_Prescale'          : 1.0,
+    'WMuLow_Prescale'       : 0.1,
+    'WMuHighIP_Prescale'    : 1.0,
+    'WMuNoMuID_Prescale'    : 1.0,
+    'WMuIso_Prescale'       : 1.0,
+    'STNB_Prescale'         : 0.2,
+    'WMu_Postscale'         : 1.0,
+    'WMuHighIP_Postscale'   : 1.0,
+    'WMuIso_Postscale'      : 1.0,
+    'WMuNoMuID_Postcale'    : 1.0,
+    'SingMuon10_Prescale'   : 0.01,
+    'SingMuon48_Prescale'   : 0.4,
+    'pT'                    : 20. * GeV,
+    'MinpT_HighIP'          : 15. * GeV,
+    'MinpTiso'              : 15. * GeV,
+    'pTlow'                 : 15. * GeV,
+    'pTvlow'                :  5. * GeV,
+    'SingMuon10_pT'         : 10. * GeV,
+    'SingMuon48_pT'         : 4.8 * GeV,
+    'MinIP'                 : 0.12 * mm,
+    'IsoMax'                : 4 * GeV,
+    #
+    'HLT2_Control10'        : "HLT_PASS_RE('Hlt2(EW)?SingleMuon(V)?High.*')",
+    'HLT2_Control4800'      : "HLT_PASS_RE('Hlt2(EW)?SingleMuonLow.*')",
+    'HLT1_SingleTrackNoBias': "HLT_PASS( 'Hlt1MBNoBiasDecision' )",
+    'HLT2_NoMuID'           : "HLT_PASS( 'Hlt2EWSingleMuonHighPtNoMUIDDecision' )",
+    #
+    'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+  },
+}
+
+class WMuConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    #---------------------------#
+    # Single Muon Control Lines #
+    #---------------------------#
+
+    sel = makeFilter(name+'Mu10', StdAllLooseMuons, min_PT = config['SingMuon10_pT'])
+
+    self.registerLine(StrippingLine( name + 'Control10Line',
+      prescale  = config[ 'SingMuon10_Prescale' ],
+      postscale = config[ 'WMu_Postscale' ],
+      HLT2      = config[ 'HLT2_Control10'],
+      checkPV   = False,
+      selection = sel,
+    ))
+
+    #-----------------------------------------------------------------        
+
+    sel = makeFilter(name+'Mu48', StdAllLooseMuons, min_PT = config['SingMuon48_pT'])
+
+    self.registerLine(StrippingLine( name + 'Control4800Line',
+      prescale  = config[ 'SingMuon48_Prescale' ],
+      postscale = config[ 'WMu_Postscale' ],
+      HLT2      = config[ 'HLT2_Control4800'],
+      checkPV   = False,
+      selection = sel,
+    ))
+
+
+    #------------#
+    # WMu signal #
+    #------------#
+
+    sel = makeFilter(name+'Wmu', StdAllLooseMuons, min_PT = config['pT'])
+
+    self.registerLine(StrippingLine( name + 'Line',
+      prescale  = config[ 'WMu_Prescale'  ],
+      postscale = config[ 'WMu_Postscale' ],
+      checkPV   = False,
+      selection = sel,
+      RequiredRawEvents = config['RawEvents'],
+    ))
+
+
+    #-------------#
+    # WMu control #
+    #-------------#
+
+    sel = makeFilter(name+'WMuLow', StdAllLooseMuons, min_PT = config['pTlow'])
+
+    self.registerLine(StrippingLine( name + 'LowLine',
+      prescale  = config[ 'WMuLow_Prescale' ],
+      postscale = config[ 'WMu_Postscale'   ],
+      checkPV   = False,
+      selection = sel,
+      RequiredRawEvents = config['RawEvents'],
+    ))
+
+    #----------------#
+    # WMu background #
+    #----------------#
+
+    sel = makeFilter(name+'SingleTrackNoBias', StdAllNoPIDsMuons, min_PT = config['pTlow'])
+
+    self.registerLine(StrippingLine( name + 'SingleTrackNoBiasLine',
+      prescale  = config[ 'WMu_Prescale'  ],
+      postscale = config[ 'WMu_Postscale' ],
+      HLT1      = config[ 'HLT1_SingleTrackNoBias'],
+      checkPV   = False,
+      selection = sel,
+    ))
+
+
+    #---------------------------
+
+    sel = makeFilter(name+'SingleTrackNoBiasPS', StdAllNoPIDsMuons, min_PT = config['pTvlow'])
+
+    self.registerLine(StrippingLine( name + 'SingleTrackNoBiasLinePS',
+      prescale  = config[ 'STNB_Prescale' ],
+      postscale = config[ 'WMu_Postscale' ],
+      HLT1      = config[ 'HLT1_SingleTrackNoBias'],
+      checkPV   = False,
+      selection = sel,
+    ))
+    
+    #-----------------#
+    # WMu No muons ID #
+    #-----------------#
+
+    sel = makeFilter(name+'_NoMuID', StdAllNoPIDsMuons, min_PT = config['pTlow'])
+
+    self.registerLine(StrippingLine( name + 'NoMuID',
+      RequiredRawEvents = config['RawEvents'],
+      prescale  = config[ 'WMuNoMuID_Prescale' ],
+      postscale = config[ 'WMuNoMuID_Postcale'],
+      HLT2      = config[ 'HLT2_NoMuID'],
+      checkPV   = False,
+      selection = sel,
+    ))
+    
+    #-------------#
+    # WMu IP Line #
+    #-------------#
+    
+    sel = makeFilter(name+'_HighIP', StdAllLooseMuons, min_PT = config['MinpT_HighIP'], min_IP = config['MinIP'])
+    
+    self.registerLine(StrippingLine( name + 'HighIPLine',
+      RequiredRawEvents = config['RawEvents'],
+      prescale  = config[ 'WMuHighIP_Prescale' ],
+      postscale = config[ 'WMuHighIP_Postscale' ],
+      checkPV   = True,
+      selection = sel
+    ))
+
+    #--------------#
+    # WMu Iso Line #
+    #--------------#
+    
+    # WMu Isolation variables
+    relinfo = [{"Type" : "RelInfoConeVariables",
+          "ConeAngle" : 0.5,
+          "Variables" : ['CONEPT', 'CONEANGLE','CONEMULT','CONEPTASYM'],
+          "Location"  : "Iso"}
+         ]
+    
+    sel = makeFilter(name+'_Iso', StdAllLooseMuons, min_PT = config['MinpTiso'])
+    relinfofilter = Filter(name+"IsoFilter", Code="RELINFO('/Event/Phys/"+name+"IsoLine/Iso', 'CONEPT', 100000.) < "+str(config["IsoMax"]), Inputs=['Phys/'+name+'IsoLine/Particles'])
+    
+    self.registerLine(StrippingLine( name + 'IsoLine',
+      RequiredRawEvents = config['RawEvents'],
+      prescale  = config[ 'WMuIso_Prescale' ],
+      postscale = config[ 'WMuIso_Postscale' ],
+      checkPV   = False,
+      selection = sel,
+      RelatedInfoTools = relinfo,
+      RelatedInfoFilter = relinfofilter
+    ))
+
+
+def makeFilter(name, single_input, min_PT = None , max_PT = None, min_IP = None ):
+  """
+  Simple FilterDesktop selection having min_PT/max_PT/min_IP cuts.
+  """
+  
+  cuts = []
+  
+  if min_PT:
+    cuts.append("PT > {}".format(min_PT))
+  
+  if max_PT:
+    cuts.append("PT < {}".format(max_PT))
+    
+  if min_IP:
+    cuts.append("MIPDV(PRIMARY) > {}".format(min_IP))
+  
+  cut_str = ""
+  for i,c in enumerate(cuts):
+    if i == 0:
+      cut_str += "({})".format(c)
+    else:
+      cut_str += " & ({})".format(c)
+      
+  selection = SimpleSelection(name, FilterDesktop, [single_input],
+    Preambulo = [ "from LoKiTracks.decorators import *" ],    
+    Code      = cut_str
+  )
+  
+  return selection
+  
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWRareDecay.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWRareDecay.py
new file mode 100644
index 000000000..85e9fe546
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWRareDecay.py
@@ -0,0 +1,564 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+
+Modified from StrippingRD/StrippingBeauty2XGammaExclusive.py
+Module for construction of W boson Radiative Decays Stripping Selections and StrippingLines.
+Provides functions to build K*+, rho+, D+, D_s+, and B+ selections.
+
+"""
+
+__author__  = ['Hang Yin', 'Qundong Han']
+__date__    = '11/29/2016'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = 'default_config', 'WRareDecayConf' 
+
+from Gaudi.Configuration import *
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm, picosecond
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseAllPhotons
+
+default_config = {
+  'NAME'        : 'WRareDecay',
+  'BUILDERTYPE' : 'WRareDecayConf',
+  'WGs'         : ['QEE'],
+  'STREAMS'     : ['EW'],
+  'CONFIG'      : {
+    'TrChi2'        : 5.    ,   # dimensionless
+    'TrIPChi2'      : 9.    ,   # dimensionless
+    'TrGhost'       : 0.4   ,   # dimensionless
+          
+    'RhoMassWin'    : 150. * MeV,
+    'KSMassWin'     : 40.  * MeV,
+    'KstMassWin'    : 120. * MeV,
+    'DpMassWin'     : 150. * MeV,
+    'DsMassWin'     : 150. * MeV,
+    'BuMassWin'     : 400. * MeV,
+    'KSLTIME'       : 0.5  * picosecond,
+    'BPVLTIME'      : 0.2  * picosecond,
+
+    'photonPT'      : 2500. * MeV,
+    'photonHighPT'  : 10000.* MeV,
+    'pion0PT'       : 800.  * MeV,
+    'kaonPT'        : 400.  * MeV,
+    'MesonPT'       : 13000.* MeV,
+          
+    'WMassWin'      : 50000. * MeV,
+
+    # Pre- and postscales
+    'W2PionGammaPreScale'   : 1.0,
+    'W2PionGammaPostScale'  : 1.0,
+    'W2KaonGammaPreScale'   : 1.0,
+    'W2KaonGammaPostScale'  : 1.0,
+    'W2KstPGammaPreScale'   : 1.0,
+    'W2KstPGammaPostScale'  : 1.0,
+    'W2RhoGammaPreScale'    : 1.0,
+    'W2RhoGammaPostScale'   : 1.0,
+    'W2DpGammaPreScale'     : 1.0,
+    'W2DpGammaPostScale'    : 1.0,
+    'W2DsGammaPreScale'     : 1.0,
+    'W2DsGammaPostScale'    : 1.0,
+    'W2BuGammaPreScale'     : 1.0,
+    'W2BuGammaPostScale'    : 1.0,
+
+    'RawEvents' : [],
+  },
+}
+
+class WRareDecayConf(LineBuilder):
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        # Selection of W daughters: photon, Ds and kstar
+        # make photon
+        selPhoton = makePhoton('PhotonSel' + name,
+                                    config['photonPT'])
+        selPhotonHi = makePhoton('PhotonHighPTSel' + name,
+                                      config['photonHighPT'])
+        # make pions 
+        selPions = makePions('PionsSel' + name,
+                                  config['TrChi2'],
+                                  config['TrIPChi2'],
+                                  config['TrGhost'],
+                                  config['kaonPT'])
+        selPionsHi = makePions('PionsHighPTSel' + name,
+                                    config['TrChi2'],
+                                    config['TrIPChi2'],
+                                    config['TrGhost'],
+                                    config['MesonPT'])
+        selPion0 = makePion0('Pion0Sel' + name,
+                                  config['pion0PT'])
+        # make Kaons 
+        selKaons = makeKaons('KaonsSel' + name,
+                                  config['TrChi2'],
+                                  config['TrIPChi2'],
+                                  config['TrGhost'],
+                                  config['kaonPT'])
+        selKaonsHi = makeKaons('KaonsHighPTSel' + name,
+                                    config['TrChi2'],
+                                    config['TrIPChi2'],
+                                    config['TrGhost'],
+                                    config['MesonPT'])
+        selKS = makeKS('KSSel' + name,
+                            config['KSLTIME'],
+                            config['KSMassWin'])
+        # make K*+ -> KS pi+, K+, pi0 
+        selKstP1 = makeKstar('KstPSel1' + name,
+                                  selKS,
+                                  selPions,  
+                                  config['KstMassWin'],
+                                  config['MesonPT'])
+        selKstP2 = makeKstar('KstPSel2' + name,
+                                  selKaons,
+                                  selPion0,  
+                                  config['KstMassWin'],
+                                  config['MesonPT'])
+        selKstP = MergedSelection('KstPSel' + name, RequiredSelections=[selKstP1, selKstP2])
+        # make rho+ -> pi+ pi0
+        selRho2PiPi = makeRho2PiPi('RhoSel' + name,
+                                        config['TrChi2'],
+                                        config['RhoMassWin'],
+                                        config['MesonPT'])
+        # make D+ -> pi+ K- Pi+
+        selDp2KPiPi = makeDp2KPiPi('DpSel' + name,
+                                        config['TrChi2'],
+                                        config['DpMassWin'],
+                                        config['MesonPT'])
+        # make D_s+ -> K+ K- Pi+
+        selDs2KKPi = makeDs2KKPi('DsSel' + name,
+                                      config['TrChi2'],
+                                      config['DsMassWin'],
+                                      config['MesonPT'])
+        # make B+ -> Jpsi K+
+        selBu2JpsiK = makeBu2JpsiK('BuSel' + name,
+                                        config['TrChi2'],
+                                        config['BuMassWin'],
+                                        config['MesonPT'],
+                                        config['BPVLTIME'])
+        ##
+        ## W event selection
+        ##
+
+        # W->pi+ Gamma selections
+        selW2PionGamma = makeW2PionGamma(name + 'W2PionGamma',
+                                              selPionsHi,
+                                              selPhotonHi,
+                                              config['WMassWin'])
+        # W->K+ Gamma selections
+        selW2KaonGamma = makeW2KaonGamma(name + 'W2KaonGamma',
+                                              selKaonsHi,
+                                              selPhotonHi,
+                                              config['WMassWin'])
+        # W->K*+ Gamma selections
+        selW2KstPGamma = makeW2KstPGamma(name + 'W2KstPGamma',
+                                              selKstP,
+                                              selPhotonHi,
+                                              config['WMassWin'])
+        # W->rho+ Gamma selections
+        selW2RhoGamma = makeW2RhoGamma(name + 'W2RhoGamma',
+                                            selRho2PiPi,
+                                            selPhotonHi,
+                                            config['WMassWin'])
+        # W->D+ Gamma selections
+        selW2DpGamma = makeW2DpGamma(name + 'W2DpGamma',
+                                          selDp2KPiPi,
+                                          selPhoton,
+                                          config['WMassWin'])
+        # W->Ds+ Gamma selections
+        selW2DsGamma = makeW2DsGamma(name + 'W2DsGamma',
+                                          selDs2KKPi,
+                                          selPhoton,
+                                          config['WMassWin'])
+        # W->B+ Gamma selections
+        selW2BuGamma = makeW2BuGamma(name + 'W2BuGamma',
+                                          selBu2JpsiK,
+                                          selPhoton,
+                                          config['WMassWin'])
+
+        ##
+        ## Stripping lines  
+        ##
+
+        # W-> pi gamma line
+        W2PionGammaLine = StrippingLine(name + 'W2PionGammaLine',
+                                             prescale=config['W2PionGammaPreScale'],
+                                             postscale=config['W2PionGammaPostScale'],
+                                             RequiredRawEvents = config['RawEvents'],
+                                             RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                             selection=selW2PionGamma)
+        self.registerLine(W2PionGammaLine)
+        
+        # W-> K gamma line
+        W2KaonGammaLine = StrippingLine(name + 'W2KaonGammaLine',
+                                             prescale=config['W2KaonGammaPreScale'],
+                                             postscale=config['W2KaonGammaPostScale'],
+                                             RequiredRawEvents = config['RawEvents'],
+                                             RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                             selection=selW2KaonGamma)
+        self.registerLine(W2KaonGammaLine)
+        
+        # W-> K* gamma line
+        W2KstPGammaLine = StrippingLine(name + 'W2KstPGammaLine',
+                                             prescale=config['W2KstPGammaPreScale'],
+                                             postscale=config['W2KstPGammaPostScale'],
+                                             RequiredRawEvents = config['RawEvents'],
+                                             selection=selW2KstPGamma)
+        self.registerLine(W2KstPGammaLine)
+
+        # W-> rho gamma line
+        W2RhoGammaLine = StrippingLine(name + 'W2RhoGammaLine',
+                                            prescale=config['W2RhoGammaPreScale'],
+                                            postscale=config['W2RhoGammaPostScale'],
+                                            RequiredRawEvents = config['RawEvents'],
+                                            selection=selW2RhoGamma)
+        self.registerLine(W2RhoGammaLine)
+
+        # W-> D+ gamma line
+        W2DpGammaLine = StrippingLine(name + 'W2DpGammaLine',
+                                           prescale=config['W2DpGammaPreScale'],
+                                           postscale=config['W2DpGammaPostScale'],
+                                           RequiredRawEvents = config['RawEvents'],
+                                           RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                           selection=selW2DpGamma)
+        self.registerLine(W2DpGammaLine)
+
+        # W-> Ds gamma line
+        W2DsGammaLine = StrippingLine(name + 'W2DsGammaLine',
+                                           prescale=config['W2DsGammaPreScale'],
+                                           postscale=config['W2DsGammaPostScale'],
+                                           RequiredRawEvents = config['RawEvents'],
+                                           RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                           selection=selW2DsGamma)
+        self.registerLine(W2DsGammaLine)
+        
+        # W-> B+ gamma line
+        W2BuGammaLine = StrippingLine(name + 'W2BuGammaLine',
+                                           prescale=config['W2BuGammaPreScale'],
+                                           postscale=config['W2BuGammaPostScale'],
+                                           RequiredRawEvents = config['RawEvents'],
+                                           RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                           selection=selW2BuGamma)
+        self.registerLine(W2BuGammaLine)
+
+###############################################################################
+def makePhoton(name, photonPT):
+    """Create photon Selection object starting from DataOnDemand 'Phys/StdLooseAllPhotons'.
+
+    @arg name: name of the Selection.
+    @arg photonPT: PT of the photon
+    
+    @return: Selection object
+    
+    """
+    code = "(PT > %(photonPT)s)" % locals()
+    gammaFilter = FilterDesktop(Code=code)
+    stdGamma = StdLooseAllPhotons
+    return Selection(name, Algorithm=gammaFilter, RequiredSelections=[stdGamma])
+
+def makePions(name, TrChi2, TrIPChi2, TrGhost, MesonPT):
+    """Create pi+ Selection object starting from DataOnDemand 'Phys/StdLoosePions'.
+
+    @arg name: name of the Selection.
+    @arg TrChi2: track chi2/dof of the pions 
+    @arg TrIPChi2: trakc IP chi2/dof of the pions 
+    @arg TrGhost: trakc ghost probability of the pions 
+    @arg MesonPT: PT of the pions 
+    
+    @return: Selection object
+    
+    """
+    code = "(PT > %(MesonPT)s) & (TRGHOSTPROB < %(TrGhost)s) & (TRCHI2DOF<%(TrChi2)s) & ISBASIC & (MIPCHI2DV(PRIMARY) > %(TrIPChi2)s)" % locals()
+    pionFilter = FilterDesktop(Code=code)
+    stdpion = DataOnDemand(Location="Phys/StdLoosePions/Particles")
+    return Selection(name, Algorithm=pionFilter, RequiredSelections=[stdpion])
+
+def makeKaons(name, TrChi2, TrIPChi2, TrGhost, MesonPT):
+    """Create pi+ Selection object starting from DataOnDemand 'Phys/StdLooseKaons'.
+
+    @arg name: name of the Selection.
+    @arg TrChi2: track chi2/dof of the kaons 
+    @arg TrIPChi2: trakc IP chi2/dof of the kaons 
+    @arg TrGhost: trakc ghost probability of the kaons 
+    @arg MesonPT: PT of the kaons
+    
+    @return: Selection object
+    
+    """
+    code = "(PT > %(MesonPT)s) & (TRGHOSTPROB < %(TrGhost)s) & (TRCHI2DOF<%(TrChi2)s) & ISBASIC & (MIPCHI2DV(PRIMARY) > %(TrIPChi2)s)" % locals()
+    kaonFilter = FilterDesktop(Code=code)
+    stdkaon = DataOnDemand(Location="Phys/StdLooseKaons/Particles")
+    return Selection(name, Algorithm=kaonFilter, RequiredSelections=[stdkaon])
+
+def makePion0(name, pion0PT):
+    """Create pion0 Selection object starting for resloved and merged pi0.
+
+    @arg name: name of the Selection.
+    @arg pion0PT: PT of pi0
+
+    @return: Selection object
+
+    """
+    from StandardParticles import StdLooseResolvedPi0 as pi0resolved
+    from StandardParticles import StdLooseMergedPi0 as pi0merged
+    code1 = "(PT > %(pion0PT)s)" % locals()
+    filter_pi0resolved = FilterDesktop(Code = code1)
+    selpi0resolved = Selection("Selection_"+name+"_pi0resolved", RequiredSelections=[pi0resolved], Algorithm=filter_pi0resolved)
+    code2 = "(PT > %(pion0PT)s)" % locals()
+    filter_pi0merged = FilterDesktop(Code = code2) 
+    selpi0merged = Selection("Selection_"+name+"_pi0merged", RequiredSelections=[pi0merged], Algorithm=filter_pi0merged)
+    return MergedSelection(name, RequiredSelections=[selpi0resolved,selpi0merged])
+
+def makeKS(name, KSLTIME, KSMassWin):
+    """
+    Filter kshort from StdLooseKshort
+    """
+    from StandardParticles import StdLooseKsDD as ksdd
+    from StandardParticles import StdLooseKsLL as ksll
+    code = "(ADMASS('KS0') < %(KSMassWin)s) & (BPVLTIME() > %(KSLTIME)s)" % locals()
+    filter_ksdd = FilterDesktop(Code = code)
+    filter_ksll = FilterDesktop(Code = code)
+    selksdd = Selection("Selection_"+name+"_Ksdd", RequiredSelections = [ ksdd ], Algorithm = filter_ksdd)
+    selksll = Selection("Selection_"+name+"_Ksll", RequiredSelections = [ ksll ], Algorithm = filter_ksll)
+    return MergedSelection("Selection_"+name+"_Kshort", RequiredSelections = [ selksdd, selksll ])
+
+###############################################################################
+
+def makeRho2PiPi(name, TrChi2, RhoMassWin, MesonPT):
+    """
+    Create and return a Rho+ -> Pi+ Pi0 Selection object, starting from DataOnDemand 'Phys/StdLoosePions'.
+    
+    @arg name: name of the Selection.
+    @arg TrChi2: minimum chi2 of the K+ Pi+ tracks
+    @arg RhoMassWin: selected Ds mass window
+    @arg MesonPT: selected rho pT cut 
+    
+    @return: Selection object
+    
+    """
+    preambulo = ["goodPion = (TRCHI2DOF < %(TrChi2)s)" % locals(),
+                  "goodRho = ((ADMASS('rho(770)+') < %(RhoMassWin)s) & (PT > %(MesonPT)s))" % locals()]
+    code = 'goodRho & CHILDCUT( goodPion, 1 )'
+    RhoFilter = FilterDesktop(Preambulo=preambulo, Code=code)
+    stdRho2PiPi = DataOnDemand(Location="Phys/StdLooseRhoPlus/Particles")
+    return Selection(name, Algorithm=RhoFilter, RequiredSelections=[stdRho2PiPi])
+
+def makeKstar(name, Kaons, Pions, KstMassWin, MesonPT):
+    """
+    Make K*(892)+ -> K+ pi0 or Kspi+
+    """
+    kstar = CombineParticles()
+    kstar.DecayDescriptors = ["[K*(892)+ -> K+ pi0]cc", "[K*(892)+ -> KS0 pi+]cc"]
+    kstar.MotherCut = "((ADMASS('K*(892)+') < %(KstMassWin)s ) & (PT > %(MesonPT)s))" % locals()
+
+    kstarConf = kstar.configurable("Combine_"+name+"_KPi")
+    return Selection(name, Algorithm = kstarConf, RequiredSelections = [ Kaons, Pions ] )
+
+def makeDp2KPiPi(name, TrChi2, DpMassWin, MesonPT):
+    """
+    Create and return a D+->KPiPi Selection object, starting from DataOnDemand 'Phys/StdLooseDplus2KKPi'.
+    
+    @arg name: name of the Selection.
+    @arg TrChi2: minimum chi2 of the K+ Pi+ tracks
+    @arg DpMassWin: selected D+ mass window
+    @arg MesonPT: selected Dp pT cut 
+    
+    @return: Selection object
+    
+    """
+    preambulo = ["goodKaon = (TRCHI2DOF < %(TrChi2)s)" % locals(),
+                  "goodDp = ((ADMASS('D+') < %(DpMassWin)s) & (PT > %(MesonPT)s))" % locals()]
+    code = 'goodDp & CHILDCUT( goodKaon, 1 ) & CHILDCUT( goodKaon, 2 ) & CHILDCUT( goodKaon, 3 )'
+    DpFilter = FilterDesktop(Preambulo=preambulo, Code=code)
+    stdDp2KPiPi = DataOnDemand(Location="Phys/StdLooseDplus2KPiPi/Particles")
+    return Selection(name, Algorithm=DpFilter, RequiredSelections=[stdDp2KPiPi])
+
+def makeDs2KKPi(name, TrChi2, DsMassWin, MesonPT):
+    """
+    Create and return a Ds->KKPi Selection object, starting from DataOnDemand 'Phys/StdLooseDplus2KKPi'.
+    
+    @arg name: name of the Selection.
+    @arg TrChi2: minimum chi2 of the K+ Pi+ tracks
+    @arg DsMassWin: selected Ds mass window
+    @arg MesonPT: selected Ds pT cut 
+    
+    @return: Selection object
+    
+    """
+    preambulo = ["goodKaon = (TRCHI2DOF < %(TrChi2)s)" % locals(),
+                  "goodDs = ((ADMASS('D_s+') < %(DsMassWin)s) & (PT > %(MesonPT)s))" % locals()]
+    code = 'goodDs & CHILDCUT( goodKaon, 1 ) & CHILDCUT( goodKaon, 2 ) & CHILDCUT( goodKaon, 3 )'
+    DsFilter = FilterDesktop(Preambulo=preambulo, Code=code)
+    stdDs2KKPi = DataOnDemand(Location="Phys/StdLooseDplus2KKPi/Particles")
+    return Selection(name, Algorithm=DsFilter, RequiredSelections=[stdDs2KKPi])
+
+def makeBu2JpsiK(name, TrChi2, BuMassWin, MesonPT, BPVLTIME):
+    """
+    Create and return a Ds->KKPi Selection object, starting from DataOnDemand 'Phys/StdLooseDplus2KKPi'.
+    
+    @arg name: name of the Selection.
+    @arg TrChi2: minimum chi2 of the K+ Pi+ tracks
+    @arg DsMassWin: selected Ds mass window
+    @arg MesonPT: selected Ds pT cut 
+    
+    @return: Selection object
+    
+    """
+    stdJpsiMuMu = DataOnDemand(Location="Phys/StdLooseJpsi2MuMu/Particles")
+    stdKaon = DataOnDemand(Location="Phys/StdAllNoPIDsKaons/Particles")
+
+    motherCut = "((ADMASS('B+') < %(BuMassWin)s ) & (PT > %(MesonPT)s) & (BPVLTIME() > %(BPVLTIME)s))" % locals()
+    daughtersCutstr = "TRCHI2DOF < %(TrChi2)s" % locals()
+    daughtersCuts = {'K+': daughtersCutstr, 'K-':daughtersCutstr }
+
+    bujpsik = CombineParticles(DecayDescriptor="[B+ -> J/psi(1S) K+]cc",
+                                MotherCut=motherCut,
+                                DaughtersCuts = daughtersCuts,
+                                ReFitPVs=True)
+    return Selection(name, Algorithm = bujpsik, RequiredSelections = [ stdJpsiMuMu,  stdKaon] )
+
+###############################################################################
+
+def makeW2PionGamma(name, pionSel, gammaSel, WMassWin):
+    """
+    Create and return a W+ -> pi+ Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg pionSel: pion selection
+    @arg gammaSel: photon selection
+    @arg WMassWin: W mass window 
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('W+') < %(WMassWin)s)" % locals()
+    Wp = CombineParticles(DecayDescriptor="[W+ -> pi+ gamma]cc",
+                           MotherCut=motherCut,
+                           #ParticleCombiners = {"" : "MomentumCombiner"},
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Wp, RequiredSelections=[gammaSel, pionSel])
+
+def makeW2KaonGamma(name, kaonSel, gammaSel, WMassWin):
+    """
+    Create and return a W+ -> K+ Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg kaonSel: kaon selection
+    @arg gammaSel: photon selection
+    @arg WMassWin: W mass window 
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('W+') < %(WMassWin)s)" % locals()
+    Wp = CombineParticles(DecayDescriptor="[W+ -> K+ gamma]cc",
+                           MotherCut=motherCut,
+                           #ParticleCombiners = {"" : "MomentumCombiner"},
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Wp, RequiredSelections=[gammaSel, kaonSel])
+
+def makeW2KstPGamma(name, kstpSel, gammaSel, WMassWin):
+    """
+    Create and return a W+ -> K+ Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg kaonSel: kaon selection
+    @arg gammaSel: photon selection
+    @arg WMassWin: W mass window 
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('W+') < %(WMassWin)s)" % locals()
+    Wp = CombineParticles(DecayDescriptor="[W+ -> K*(892)+ gamma]cc",
+                           MotherCut=motherCut,
+                           #ParticleCombiners = {"" : "MomentumCombiner"},
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Wp, RequiredSelections=[gammaSel, kstpSel])
+
+def makeW2RhoGamma(name, rhoSel, gammaSel, WMassWin):
+    """
+    Create and return a W+ -> rho+ Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg rhoSel: rho+ -> pi+ pi0 selection
+    @arg gammaSel: photon selection
+    @arg WMassWin: W mass window 
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('W+') < %(WMassWin)s)" % locals()
+    Wp = CombineParticles(DecayDescriptor="[W+ -> rho(770)+ gamma]cc",
+                           MotherCut=motherCut,
+                           #ParticleCombiners = {"" : "MomentumCombiner"},
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Wp, RequiredSelections=[gammaSel, rhoSel])
+
+def makeW2DpGamma(name, DpSel, gammaSel, WMassWin):
+    """
+    Create and return a W -> D+ Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg DpSel: D+ -> Pi+ K- Pi+ selection
+    @arg gammaSel: photon selection
+    @arg WMassWin: W mass window 
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('W+') < %(WMassWin)s)" % locals()
+    Wp = CombineParticles(DecayDescriptor="[W+ -> D+ gamma]cc",
+                           MotherCut=motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Wp, RequiredSelections=[gammaSel, DpSel])
+
+def makeW2DsGamma(name, DsSel, gammaSel, WMassWin):
+    """
+    Create and return a W -> Ds Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg DsSel: D_s+ -> K+ K- Pi+ selection
+    @arg gammaSel: photon selection
+    @arg WMassWin: W mass window 
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('W+') < %(WMassWin)s)" % locals()
+    Wp = CombineParticles(DecayDescriptor="[W+ -> D+ gamma]cc",
+                           MotherCut=motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Wp, RequiredSelections=[gammaSel, DsSel])
+
+def makeW2BuGamma(name, BuSel, gammaSel, WMassWin):
+    """
+    Create and return a W -> B+ Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg BuSel: B+ -> Jpsi K+ selection
+    @arg gammaSel: photon selection
+    @arg WMassWin: W mass window 
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('W+') < %(WMassWin)s)" % locals()
+    Wp = CombineParticles(DecayDescriptor="[W+ -> B+ gamma]cc",
+                           MotherCut=motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Wp, RequiredSelections=[gammaSel, BuSel])
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWe.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWe.py
new file mode 100644
index 000000000..57859a372
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingWe.py
@@ -0,0 +1,83 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping Lines for W->eNu
+Electroweak Group (Conveners: S.Bifani, J.Anderson; Stripping contact: W.Barter)
+
+S.Bifani and D.Ward
+
+We signal:  StdAllNoPIDsElectrons, PRS>50Mev & E_ECal/P>0.1 & E_HCal/P<0.05 & pT>20GeV & TTHits
+We control: StdAllNoPIDsElectrons, PRS>50Mev & E_ECal/P>0.1 & E_HCal/P<0.05 & pT>15GeV          (10% PRESCALE)
+"""
+
+__all__ = 'WeConf', 'default_config'
+__author__ = 'S. Bifani', 'D. Ward'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from PhysSelPython.Wrappers import SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsElectrons
+from GaudiKernel.SystemOfUnits import GeV
+
+
+default_config = {
+  'NAME'        : 'We',
+  'BUILDERTYPE' : 'WeConf',
+  'STREAMS'     : [ 'EW'  ],
+  'WGs'         : [ 'QEE' ],
+  'CONFIG'      : { 
+    'We_Prescale'   : 1.0,
+    'WeLow_Prescale': 0.1,
+    'We_Postscale'  : 1.0,
+    'PrsCalMin'     : 50.,
+    'ECalMin'       :  0.10,
+    'HCalMax'       :  0.05,
+    'pT'            : 20. * GeV,
+    'pTlow'         : 15. * GeV,
+    'RawEvents'     : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+  },
+}
+
+class WeConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+    
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    # Define the cuts
+    _cut    = "(PPINFO(LHCb.ProtoParticle.CaloPrsE,0)>%(PrsCalMin)s) & (PPINFO(LHCb.ProtoParticle.CaloEcalE,0)>P*%(ECalMin)s) & (PPINFO(LHCb.ProtoParticle.CaloHcalE,99999)<P*%(HCalMax)s) & (PT>%(pT)s)"%config
+    _cutLow = '(PPINFO(LHCb.ProtoParticle.CaloPrsE,0)>%(PrsCalMin)s) & (PPINFO(LHCb.ProtoParticle.CaloEcalE,0)>P*%(ECalMin)s) & (PPINFO(LHCb.ProtoParticle.CaloHcalE,99999)<P*%(HCalMax)s) & (PT>%(pTlow)s)'%config
+
+    # We signal
+    self.registerLine(StrippingLine( name + 'Line',
+      selection         = makeFilter( name+'We', _cut),
+      prescale          = config[ 'We_Prescale'  ],
+      postscale         = config[ 'We_Postscale' ],
+      RequiredRawEvents = config[ 'RawEvents'    ],
+    ))
+
+    # We control
+    self.registerLine(StrippingLine( name + 'LowLine',
+      selection         = makeFilter( name+'WeLow', _cutLow ),
+      prescale          = config[ 'WeLow_Prescale' ],
+      postscale         = config[ 'We_Postscale'   ],
+      RequiredRawEvents = config[ 'RawEvents'      ],
+    ))
+
+
+def makeFilter( name, code ):
+  preambulo = ["from LoKiTracks.decorators import *"]
+  return SimpleSelection(name, FilterDesktop, [StdAllNoPIDsElectrons], 
+    Preambulo=preambulo, Code=code)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02MuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02MuMu.py
new file mode 100644
index 000000000..a770b68c6
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02MuMu.py
@@ -0,0 +1,73 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Lines for Z->MuMu and studies of Mu efficiencies
+# Electroweak Group (Conveners: S.Bifani, J.Anderson; Stripping contact: W.Barter)
+#
+# S.Bifani
+#
+# Z02MuMu/High Mass DY signal:     StdAllLooseMuons,  pT>3GeV & MM>40GeV
+
+__author__ = ['S. Bifani']
+
+__all__ = (
+  'Z02MuMuConf',
+  'default_config',
+)
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseMuons
+from GaudiKernel.SystemOfUnits import GeV
+
+default_config = {
+  'NAME'        : 'Z02MuMu',
+  'BUILDERTYPE' : 'Z02MuMuConf',
+  'WGs'         : [ 'QEE'],
+  'STREAMS'     : [ 'EW' ],
+  'CONFIG'      : { 
+    'Prescale'  : 1.0,
+    'Postscale' : 1.0,
+    'pT'        : 3.  * GeV,
+    'MMmin'     : 40. * GeV,
+    'RawEvents' : ["Muon", "Calo", "Rich", "Velo", "Tracker", "HC"],
+  },
+}
+
+class Z02MuMuConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )
+
+    self.registerLine(StrippingLine( name + 'Line',
+      prescale          = config[ 'Prescale'  ],
+      postscale         = config[ 'Postscale' ],
+      RequiredRawEvents = config[ 'RawEvents' ],
+      checkPV           = False,
+      selection         = makeCombination(name+'Z02MuMu', config),
+    ))
+
+
+def makeCombination( name, config ):
+  # Define the cuts
+  dcut = '(PT>%(pT)s)'%config
+  mcut = '(MM>%(MMmin)s)'%config
+
+  return SimpleSelection(name, CombineParticles, [StdAllLooseMuons],
+    DecayDescriptor    = 'Z0 -> mu+ mu-',
+    DaughtersCuts      = { 'mu+' : dcut, 'mu-' : dcut },
+    MotherCut          = mcut,
+    WriteP2PVRelations = False
+  )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02ee.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02ee.py
new file mode 100644
index 000000000..9e514ac3f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02ee.py
@@ -0,0 +1,91 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Lines for Z->ee and studies of their background
+# Electroweak Group (Conveners: S.Bifani, J.Anderson; Stripping contact: W.Barter)
+#
+# S.Bifani and D.Ward
+#
+# Z02ee signal:    StdAllNoPIDsElectrons, PRS>50Mev & E_ECal/P>0.1 & E_HCal/P<0.05 & pT>10GeV & MM>40GeV
+# Z02ee same sign: StdAllNoPIDsElectrons, PRS>50Mev & E_ECal/P>0.1 & E_HCal/P<0.05 & pT>10GeV & MM>40GeV
+
+__author__ = ['S.Bifani', 'D.Ward']
+
+__all__ = (
+  'Z02eeConf',
+  'default_config',
+)
+
+from Gaudi.Configuration import *
+from GaudiKernel.SystemOfUnits import GeV, MeV
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import SimpleSelection
+from StandardParticles import StdAllNoPIDsElectrons
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+default_config = {
+  'NAME'        : 'Z02ee',
+  'BUILDERTYPE' : 'Z02eeConf',
+  'STREAMS'     : [ 'EW'  ],
+  'WGs'         : [ 'QEE' ],
+  'CONFIG'      : { 
+    'Prescale'  : 1.0,
+    'Postscale' : 1.0,
+    'ECalMin'   : 0.1,
+    'HCalMax'   : 0.05,
+    'PrsCalMin' : 50. * MeV,
+    'pT'        : 10. * GeV,
+    'MMmin'     : 40. * GeV,
+    'RawEvents' : ["HC"],
+  },
+}
+
+class Z02eeConf( LineBuilder ) :
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+    
+  def __init__( self, name, config ) :
+
+    LineBuilder.__init__( self, name, config )        
+
+    # Z02ee signal
+    desc  = 'Z0 -> e+ e-'
+    sel   = make_combination( name+'Z02ee', config, desc)
+    self.registerLine(StrippingLine( name+'Line',
+      selection         = sel,
+      prescale          = config[ 'Prescale'  ],
+      postscale         = config[ 'Postscale' ],
+      RequiredRawEvents = config[ 'RawEvents' ],
+    ))
+
+    # Z02ee same sign
+    desc  = '[Z0 -> e- e-]cc'
+    sel   = make_combination( name+'Z02eeSS', config, desc )
+    self.registerLine(StrippingLine( name + 'SSLine',
+      selection         = sel,
+      prescale          = config[ 'Prescale'  ],
+      postscale         = config[ 'Postscale' ],
+      RequiredRawEvents = config[ 'RawEvents' ],
+    ))
+
+
+def make_combination(name, config, desc):
+  # Define the cuts  
+  dcut = '((PT>%(pT)s) & (PPINFO(LHCb.ProtoParticle.CaloPrsE,0)>%(PrsCalMin)s) & (PPINFO(LHCb.ProtoParticle.CaloEcalE,0)>P*%(ECalMin)s) & (PPINFO(LHCb.ProtoParticle.CaloHcalE,99999)<P*%(HCalMax)s))'%config
+  mcut = '(MM>%(MMmin)s)'%config
+
+  return SimpleSelection(name, CombineParticles, [StdAllNoPIDsElectrons], 
+    DecayDescriptor    = desc,
+    DaughtersCuts      = { 'e+' : dcut, 'e-' : dcut },
+    MotherCut          = mcut,
+    WriteP2PVRelations = False,
+  )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02nH.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02nH.py
new file mode 100644
index 000000000..a03ceb492
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ02nH.py
@@ -0,0 +1,117 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Lines for Z -> nH, n = 2,4,6,8,10
+#
+# Donal Hill
+#
+# Z02nH :     StdAllNoPIDsPions, pT>1GeV & MM>60GeV
+
+__all__ = (
+  'Z02nHConf',
+  'default_config',
+)
+
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsPions
+from GaudiKernel.SystemOfUnits import GeV
+from GaudiKernel.SystemOfUnits import MeV
+
+
+default_config = {
+    'NAME'        : 'Z02nH',
+    'BUILDERTYPE' : 'Z02nHConf',
+    'WGs'         : [ 'QEE'],
+    'STREAMS'     : [ 'EW' ],
+    'CONFIG'      : { 
+        'Z02nH_Prescale'  : 1.0,
+        'Z02nH_Postscale' : 1.0,
+        'pT'        : 3. * GeV,
+        'TrChi2'    : 5.,
+        'pErr'      : 0.01,
+        'vChi2'     : 10,
+        'GhostProb' : 0.4,
+        'pTmin'     : 80. * GeV,    #Minimun pT of the array
+        'MMmin'     : 60. * GeV,
+        'MMmax'     : 120. * GeV,
+    },
+}
+
+
+class Z02nHConf( LineBuilder ) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ) :
+
+        LineBuilder.__init__( self, name, config )
+
+        # Z02HH signal
+        decay = 'Z0 -> pi+ pi-'
+        self.registerLine(make_line( name+'2H', config, decay ))
+
+        # Z02HH WS
+        decay = '[Z0 -> pi+ pi+]cc'
+        self.registerLine(make_line( name+'2HWS', config, decay ))
+
+        # Z024H signal
+        decay = 'Z0 -> pi+ pi- pi+ pi-'
+        self.registerLine(make_line( name+'4H', config, decay ))
+
+        # Z024H WS
+        decay = '[Z0 -> pi+ pi+ pi+ pi-]cc'
+        self.registerLine(make_line( name+'4HWS', config, decay ))
+
+        # Z026H signal
+        decay = 'Z0 -> pi+ pi- pi+ pi- pi+ pi-'
+        self.registerLine(make_line( name+'6H', config, decay ))
+
+        # Z026H WS
+        decay = '[Z0 -> pi+ pi+ pi+ pi- pi+ pi-]cc'
+        self.registerLine(make_line( name+'6HWS', config, decay ))
+
+        # Z028H signal
+        decay = 'Z0 -> pi+ pi- pi+ pi- pi+ pi- pi+ pi-'
+        self.registerLine(make_line( name+'8H', config, decay ))
+
+        # Z028H WS
+        decay = '[Z0 -> pi+ pi+ pi+ pi- pi+ pi- pi+ pi-]cc'
+        self.registerLine(make_line( name+'8HWS', config, decay ))
+
+
+#===============================================================================
+
+def make_combination(name, config, decay):
+  # Define the cuts
+  dcut = '(PT>%(pT)s) & (TRCHI2DOF<%(TrChi2)s) & ((PERR2)/(P*P)<%(pErr)s) & (TRGHOSTPROB<%(GhostProb)s)'%config
+  ccut = 'APT>%(pTmin)s'%config
+  mcut = '(MM>%(MMmin)s) & (MM<%(MMmax)s) & (VFASPF(VCHI2/VDOF)<%(vChi2)s)'%config
+
+  algo = CombineParticles(
+    DecayDescriptor     = decay,
+    DaughtersCuts       = {'pi+':dcut, 'pi-':dcut },
+    CombinationCut      = ccut,
+    MotherCut           = mcut,
+    WriteP2PVRelations  = False
+  )
+
+  return Selection(name+'Sel', Algorithm=algo, RequiredSelections=[StdAllNoPIDsPions])
+
+def make_line(name, config, decay):
+  return StrippingLine( name + 'Line',
+    prescale  = config[ 'Z02nH_Prescale' ],
+    postscale = config[ 'Z02nH_Postscale' ],
+    checkPV   = False,
+    selection = make_combination(name, config, decay)
+  )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ0RareDecay.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ0RareDecay.py
new file mode 100644
index 000000000..185512a6a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/StrippingZ0RareDecay.py
@@ -0,0 +1,607 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+
+Modified from StrippingRD/StrippingBeauty2XGammaExclusive.py
+Module for construction of Z boson Radiative Decays Stripping Selections and StrippingLines.
+Provides functions to build K*, rho, omega, D0, Jpsi, and Upsilon selections.
+
+"""
+
+__author__ = ['Hang Yin', 'Qundong Han']
+__date__ = '11/29/2016'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = 'default_config', 'Z0RareDecayConf' 
+
+from Gaudi.Configuration import *
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseAllPhotons
+
+default_config = {
+  'NAME'        : 'Z0RareDecay',
+  'BUILDERTYPE' : 'Z0RareDecayConf',
+  'WGs'         : ['QEE'],
+  'STREAMS'     : ['EW'],
+  'CONFIG'      : {
+    'TrChi2'          : 5.,        # dimensionless, useless (default is 4)
+    'VtxChi2'         : 20.,       # dimensionless, useless (default is 4)
+          
+    'RhoMassWin'      : 230.  * MeV,
+    'OmegaMassWin'    : 230.  * MeV,
+    'KstMassWin'      : 120.  * MeV,
+    'PhiMassWin'      : 200.  * MeV,
+    'D0MassWin'       : 100.  * MeV,
+    'JpsiMassMin'     : 3000. * MeV,
+    'JpsiMassMax'     : 3200. * MeV,
+    'UpsilonMassMin'  : 8500. * MeV,
+
+    'MuonP'           : -8000. * MeV,
+    'MuonPT'          : 650.   * MeV,
+    'photonPT'        : 2500.  * MeV,
+    'pion0PT'         : 860.   * MeV,
+    'Pi0Pi0PT'        : 10000. * MeV,
+    'MesonPT'         : 13000. * MeV,
+
+    'ZMassWin'        : 60000. * MeV,
+
+    # Pre- and postscales
+    'Z2GammaGammaPreScale'  : 1.0,
+    'Z2GammaGammaPostScale' : 1.0,
+    'Z2Pi0GammaPreScale'    : 1.0,
+    'Z2Pi0GammaPostScale'   : 1.0,
+    'Z2Pi0Pi0PreScale'      : 1.0,
+    'Z2Pi0Pi0PostScale'     : 1.0,
+    'Z2RhoGammaPreScale'    : 1.0,
+    'Z2RhoGammaPostScale'   : 1.0,
+    'Z2OmegaGammaPreScale'  : 1.0,
+    'Z2OmegaGammaPostScale' : 1.0,
+    'Z2KstGammaPreScale'    : 1.0,
+    'Z2KstGammaPostScale'   : 1.0,
+    'Z2PhiGammaPreScale'    : 1.0,
+    'Z2PhiGammaPostScale'   : 1.0,
+    'Z2D0GammaPreScale'     : 1.0,
+    'Z2D0GammaPostScale'    : 1.0,
+    'Z2QONGammaPreScale'    : 1.0,
+    'Z2QONGammaPostScale'   : 1.0,
+
+    'RawEvents' : [],
+  },
+}
+
+class Z0RareDecayConf(LineBuilder):
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+        ##
+        ## Selection of Z daughters: photon, pion0, rho, omega, 
+        ##   kstar, phi, Jpsi and Upsilon 
+        ##
+
+        # make photon
+        selPhoton = makePhoton('PhotonSel' + name,
+                                    config['photonPT'])
+        selPhotonHi = makePhoton('PhotonHighSel' + name,
+                                      config['Pi0Pi0PT'])
+        # make pion0
+        selPion0 = makePion0('Pion0SelMy',
+                                  config['pion0PT'])
+        # make rho
+        selRho = makeRho('RhoSel' + name,
+                              config['TrChi2'],
+                              config['MesonPT'],
+                              config['RhoMassWin'])
+        # make omega
+        selOmega = makeOmega('OmegaSel' + name,
+                                 config['MesonPT'],
+                                 config['OmegaMassWin'],
+                                 selPion0)
+        # make Kstar
+        selKst = makeKstar('KStarSel' + name,
+                                config['TrChi2'],
+                                config['MesonPT'],
+                                config['KstMassWin'])
+        # make phi
+        selPhi2KK = makePhi2KK('PhiSel' + name,
+                                    config['TrChi2'],
+                                    config['MesonPT'],
+                                    config['PhiMassWin'])
+        # make D0 
+        selD02KPi = makeD02KPi('D0Sel' + name,
+                                    config['TrChi2'],
+                                    config['MesonPT'],
+                                    config['D0MassWin'])
+        # make quarkonium
+        selQON = makeQON('QniumSel' + name,
+                              config['VtxChi2'],
+                              config['TrChi2'],
+                              config['MesonPT'],
+                              config['MuonPT'],
+                              config['MuonP'],
+                              config['JpsiMassMin'],
+                              config['JpsiMassMax'],
+                              config['UpsilonMassMin'])
+
+        ##
+        ## make event selections 
+        ##
+
+        # Z -> Gamma Gamma selections
+        selZ2GammaGamma = makeZ2GammaGamma(name + 'Z2GammaGamma',
+                                                selPhoton,
+                                                config['Pi0Pi0PT'],
+                                                config['ZMassWin'])
+        # Z -> Pi0 Gamma selections
+        selZ2Pi0Gamma = makeZ2Pi0Gamma(name + 'Z2Pi0Gamma',
+                                            selPion0,
+                                            selPhoton,
+                                            config['Pi0Pi0PT'],
+                                            config['ZMassWin'])
+        # Z -> Pi0 Pi0 selections
+        selZ2Pi0Pi0 = makeZ2Pi0Pi0(name + 'Z2Pi0Pi0',
+                                        selPion0,
+                                        config['Pi0Pi0PT'],
+                                        config['ZMassWin'])
+        # Z -> rho Gamma selections
+        selZ2RhoGamma = makeZ2RhoGamma(name + 'Z2RhoGamma',
+                                            selRho,
+                                            selPhoton,
+                                            config['ZMassWin'])
+        # Z -> Omega Gamma selections
+        selZ2OmegaGamma = makeZ2OmegaGamma(name + 'Z2OmegaGamma',
+                                                selOmega,
+                                                selPhoton,
+                                                config['ZMassWin'])
+        # Z ->Kst Gamma selections
+        selZ2KstGamma = makeZ2KstGamma(name + 'Z2KstGamma',
+                                            selKst,
+                                            selPhotonHi,
+                                            config['ZMassWin'])
+        # Z ->Phi Gamma selections
+        selZ2PhiGamma = makeZ2PhiGamma(name + 'Z2PhiGamma',
+                                            selPhi2KK,
+                                            selPhoton,
+                                            config['ZMassWin'])
+        # Z ->D0 Gamma selections
+        selZ2D0Gamma = makeZ2D0Gamma(name + 'Z2D0Gamma',
+                                          selD02KPi,
+                                          selPhoton,
+                                          config['ZMassWin'])
+        # Z -> Jpsi/Upsilon Gamma selections
+        selZ2QONGamma = makeZ2QONGamma(name + 'Z2QONGamma',
+                                            selQON,
+                                            selPhoton,
+                                            config['ZMassWin'])
+
+        ##
+        ## Stripping lines
+        ##
+
+        # Z-> gamma gamma line
+        Z2GammaGammaLine = StrippingLine(name + 'Z2GammaGammaLine',
+                                              prescale=config['Z2GammaGammaPreScale'],
+                                              postscale=config['Z2GammaGammaPostScale'],
+                                              RequiredRawEvents = config['RawEvents'],
+                                              RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                              selection=selZ2GammaGamma)
+        self.registerLine(Z2GammaGammaLine)
+
+        # Z-> pi0 gamma line
+        Z2Pi0GammaLine = StrippingLine(name + 'Z2Pi0GammaLine',
+                                            prescale=config['Z2Pi0GammaPreScale'],
+                                            postscale=config['Z2Pi0GammaPostScale'],
+                                            RequiredRawEvents = config['RawEvents'],
+                                            RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                            selection=selZ2Pi0Gamma)
+        self.registerLine(Z2Pi0GammaLine)
+
+        # Z-> pi0 pi0 line
+        Z2Pi0Pi0Line = StrippingLine(name + 'Z2Pi0Pi0Line',
+                                          prescale=config['Z2Pi0Pi0PreScale'],
+                                          postscale=config['Z2Pi0Pi0PostScale'],
+                                          RequiredRawEvents = config['RawEvents'],
+                                          RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                          selection=selZ2Pi0Pi0)
+        self.registerLine(Z2Pi0Pi0Line)
+
+        # Z-> rho gamma line
+        Z2RhoGammaLine = StrippingLine(name + 'Z2RhoGammaLine',
+                                            prescale=config['Z2RhoGammaPreScale'],
+                                            postscale=config['Z2RhoGammaPostScale'],
+                                            RequiredRawEvents = config['RawEvents'],
+                                            RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                            selection=selZ2RhoGamma)
+        self.registerLine(Z2RhoGammaLine)
+
+        # Z-> omega gamma line
+        Z2OmegaGammaLine = StrippingLine(name + 'Z2OmegaGammaLine',
+                                              prescale=config['Z2OmegaGammaPreScale'],
+                                              postscale=config['Z2OmegaGammaPostScale'],
+                                              RequiredRawEvents = config['RawEvents'],
+                                              RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                              selection=selZ2OmegaGamma)
+        self.registerLine(Z2OmegaGammaLine)
+
+        # Z-> K* gamma line
+        Z2KstGammaLine = StrippingLine(name + 'Z2KstGammaLine',
+                                            prescale=config['Z2KstGammaPreScale'],
+                                            postscale=config['Z2KstGammaPostScale'],
+                                            RequiredRawEvents = config['RawEvents'],
+                                            RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                            selection=selZ2KstGamma)
+        self.registerLine(Z2KstGammaLine)
+        
+        # Z-> phi gamma line
+        Z2PhiGammaLine = StrippingLine(name + 'Z2PhiGammaLine',
+                                            prescale=config['Z2PhiGammaPreScale'],
+                                            postscale=config['Z2PhiGammaPostScale'],
+                                            RequiredRawEvents = config['RawEvents'],
+                                            RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                            selection=selZ2PhiGamma)
+        self.registerLine(Z2PhiGammaLine)
+
+        # Z-> D0 gamma line
+        Z2D0GammaLine = StrippingLine(name + 'Z2D0GammaLine',
+                                           prescale=config['Z2D0GammaPreScale'],
+                                           postscale=config['Z2D0GammaPostScale'],
+                                           RequiredRawEvents = config['RawEvents'],
+                                           RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                           selection=selZ2D0Gamma)
+        self.registerLine(Z2D0GammaLine)
+
+        # Z-> J/psi, Upsilon gamma line
+        Z2QONGammaLine = StrippingLine(name + 'Z2QONGammaLine',
+                                            prescale=config['Z2QONGammaPreScale'],
+                                            postscale=config['Z2QONGammaPostScale'],
+                                            RequiredRawEvents = config['RawEvents'],
+                                            RelatedInfoTools = [{'Type' : 'RelInfoVertexIsolation', 'Location': "VertexIsoInfo"  }],
+                                            selection=selZ2QONGamma)
+        self.registerLine(Z2QONGammaLine)
+
+#################################################################################
+
+def makePhoton(name, photonPT):
+    """Create photon Selection object starting from DataOnDemand 'Phys/StdLooseAllPhotons'.
+
+    @arg name: name of the Selection.
+    @arg photonPT: PT of the photon
+    
+    @return: Selection object
+    
+    """
+    code = "(PT> %(photonPT)s)" % locals()
+    gammaFilter = FilterDesktop(Code=code)
+    stdGamma = StdLooseAllPhotons
+    return Selection(name, Algorithm=gammaFilter, RequiredSelections=[stdGamma])
+
+def makePion0(name, pion0PT):
+    """Create pion0 Selection object starting for resloved and merged pi0.
+
+    @arg name: name of the Selection.
+    @arg pion0PT: PT of pi0
+
+    @return: Selection object
+
+    """
+    from StandardParticles import StdLooseResolvedPi0 as _pi0resolved
+    from StandardParticles import StdLooseMergedPi0 as _pi0merged
+    code1 = "(PT > %(pion0PT)s)" % locals()
+    filter_pi0resolved = FilterDesktop(Code = code1)
+    selpi0resolved = Selection("Selection_"+name+"_pi0resolved", RequiredSelections=[_pi0resolved], Algorithm=filter_pi0resolved)
+    code2 = "(PT > %(pion0PT)s)" % locals()
+    filter_pi0merged = FilterDesktop(Code = code2) 
+    selpi0merged = Selection("Selection_"+name+"_pi0merged", RequiredSelections=[_pi0merged], Algorithm=filter_pi0merged)
+    return MergedSelection(name, RequiredSelections=[selpi0resolved,selpi0merged])
+
+def makeRho(name, TrChi2, MesonPT, RhoMassWin) :
+    """
+    Create and return a rho -> pi+ pi- Selection object, starting from DataOnDemand 'Phys/StdLooseRho0'.
+    
+    @arg name: name of the Selection.
+    @arg TrChi2: tracks chi2
+    @arg MesonPT: PT of combined particle
+    @arg RhoMassWin: rho(770)0 mass window
+    
+    @return: Selection object
+    
+    """
+    preambulo = ["goodTrack = ((TRCHI2DOF < %(TrChi2)s))" % locals(),
+                  "goodRho = ((ADMASS('rho(770)0') < %(RhoMassWin)s) & (PT > %(MesonPT)s))" % locals()]
+    code = "goodRho & CHILDCUT( goodTrack , 1 ) & CHILDCUT( goodTrack , 2 )"
+    rhoFilter = FilterDesktop(Preambulo=preambulo, Code=code)
+    stdRho2pipi = DataOnDemand(Location="Phys/StdLooseRho0/Particles")
+    return Selection(name, Algorithm=rhoFilter, RequiredSelections=[stdRho2pipi])
+
+def makeOmega(name, MesonPT, OmegaMassWin, selPion0) :
+    """
+    Create and return a omega -> pi+ pi- pi0 Selection object, starting from DataOnDemand 'Phys/StdLoosePions'.
+    
+    @arg name: name of the Selection.
+    @arg MesonPT: PT of combined particle
+    @arg OmegaMassWin: omega(782) mass window
+    @arg selPion0: selected pion0 candidates
+    
+    @return: Selection object
+    
+    """
+    stdPions = DataOnDemand(Location="Phys/StdLoosePions/Particles")
+    omega2pipipizero = CombineParticles()
+    omega2pipipizero.DecayDescriptor = "omega(782) -> pi+ pi- pi0"
+    omega2pipipizero.CombinationCut = "(ADAMASS('omega(782)') < %(OmegaMassWin)s )" % locals()
+    omega2pipipizero.MotherCut = "((ADMASS('omega(782)') < %(OmegaMassWin)s ) & (PT > %(MesonPT)s))" % locals()
+    omegaConf = omega2pipipizero.configurable("Combine_"+name+"_PiPiPi0")
+
+    return Selection(name, Algorithm=omegaConf, RequiredSelections=[stdPions, selPion0])
+
+def makeKstar(name, TrChi2, MesonPT, KstMassWin) :
+    """
+    Create and return a K*->Kpi Selection object, starting from DataOnDemand 'Phys/StdVeryLooseDetachedKst2Kpi'.
+    
+    @arg name: name of the Selection.
+    @arg TrChi2: tracks chi2
+    @arg KstMassWin: K* mass window
+    
+    @return: Selection object
+    
+    """
+    preambulo = ["goodTrack = ((TRCHI2DOF < %(TrChi2)s))" % locals(),
+                  "goodKstar = ((ADMASS('K*(892)0') < %(KstMassWin)s) & (PT > %(MesonPT)s))" % locals()]
+    code = "goodKstar & CHILDCUT( goodTrack , 1 ) & CHILDCUT( goodTrack , 2 )"
+    kstFilter = FilterDesktop(Preambulo=preambulo, Code=code)
+    stdKst2Kpi = DataOnDemand(Location="Phys/StdVeryLooseDetachedKst2Kpi/Particles")
+    return Selection(name, Algorithm=kstFilter, RequiredSelections=[stdKst2Kpi])
+
+def makePhi2KK(name, TrChi2, MesonPT, PhiMassWin) :
+    """
+    Create and return a Phi->KK Selection object, starting from DataOnDemand 'Phys/StdLoosePhi2KK'.
+    
+    @arg name: name of the Selection.
+    @arg TrChi2: minimum chi2 of the K+ tracks
+    @arg MesonPT: selected Phi PT 
+    @arg PhiMassWin: selected Phi mass window
+    
+    @return: Selection object
+    
+    """
+    preambulo = ["goodKaon = ((TRCHI2DOF < %(TrChi2)s))" % locals(),
+                  "goodPhi = ((ADMASS('phi(1020)') < %(PhiMassWin)s) & (PT > %(MesonPT)s))" % locals()]
+    code = 'goodPhi & CHILDCUT( goodKaon, 1 ) & CHILDCUT( goodKaon, 2 )'
+    phiFilter = FilterDesktop(Preambulo=preambulo, Code=code)
+    stdPhi2KK = DataOnDemand(Location="Phys/StdLoosePhi2KK/Particles")
+    return Selection(name, Algorithm=phiFilter, RequiredSelections=[stdPhi2KK])
+
+def makeD02KPi(name, TrChi2, MesonPT, D0MassWin) :
+    """
+    Create and return a D0->KPi Selection object, starting from DataOnDemand 'Phys/StdLooseD02KPi'.
+    
+    @arg name: name of the Selection.
+    @arg TrChi2: minimum chi2 of the K+, pi tracks
+    @arg MesonPT: selected D0 PT 
+    @arg D0MassWin: selected D0 mass window
+    
+    @return: Selection object
+    
+    """
+    preambulo = ["goodKaon = ((TRCHI2DOF < %(TrChi2)s))" % locals(),
+                  "goodD0 = ((ADMASS('D0') < %(D0MassWin)s) & (PT > %(MesonPT)s))" % locals()]
+    code = 'goodD0 & CHILDCUT( goodKaon, 1 ) & CHILDCUT( goodKaon, 2 )'
+    D0Filter = FilterDesktop(Preambulo=preambulo, Code=code)
+    stdD02KPi = DataOnDemand(Location="Phys/StdLooseD02KPi/Particles")
+    return Selection(name, Algorithm=D0Filter, RequiredSelections=[stdD02KPi])
+
+def makeQON(name, VtxChi2, TrChi2, MesonPT, MuonPT, MuonP, JpsiMassMin, JpsiMassMax, UpsilonMassMin) :
+    """
+    Create and return a Jpsi-> mu mu and Upsilon -> mu mu Selection object, starting from DataOnDemand 'Phys/StdLooseDiMuon'.
+    
+    @arg name: name of the Selection.
+    @arg VtxChi2: vertex/dof chi2
+    @arg TrChi2: tracks chi2
+    @arg MesonPT: PT of combined particle
+    @arg MuonPT: PT of Muon 
+    @arg MuonP: P of Muon 
+    @arg JpsiMassMin: Jpsi mass lower cut
+    @arg JpsiMassMax: Jpsi mass higher cut
+    @arg UpsilonMassMin: Upsilon mass lower cut
+    
+    @return: Selection object
+    
+    """
+    MuonCut = "(MINTREE('mu+'==ABSID,PT) > %(MuonPT)s ) & (MINTREE('mu+'==ABSID,P) > %(MuonP)s ) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(TrChi2)s)" % locals()
+    MuMuCut = "(((MM > %(JpsiMassMin)s ) & (MM < %(JpsiMassMax)s )) | (MM > %(UpsilonMassMin)s )) & (VFASPF(VCHI2PDOF)< %(VtxChi2)s) & (PT > %(MesonPT)s )"%locals()
+
+    DiMuFilter = FilterDesktop(Code= MuonCut + "&" + MuMuCut)
+    stdDiMuon = DataOnDemand(Location="Phys/StdLooseDiMuon/Particles")
+    return Selection(name, Algorithm=DiMuFilter, RequiredSelections=[stdDiMuon])
+
+####################################################################################
+
+def makeZ2GammaGamma(name, gammaSel, Pi0Pi0PT, ZMassWin):
+    """
+    Create and return a Z -> Gamma Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg gammaSel: photon selection
+    @arg Pi0Pi0PT: PT of photon
+    @arg ZMassWin: Z0 mass window
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('Z0') < %(ZMassWin)s)" % locals()
+    strCutdau = "PT > %(Pi0Pi0PT)s" % locals()
+    daughtersCuts = {'gamma' : strCutdau}
+    Z0 = CombineParticles(DecayDescriptor="Z0 -> gamma gamma",
+                           MotherCut=motherCut,
+                           DaughtersCuts = daughtersCuts,
+                           ParticleCombiners = {"" : "MomentumCombiner:PUBLIC"}, 
+                           ReFitPVs=False)#True)
+
+
+    return Selection(name, Algorithm=Z0, RequiredSelections=[gammaSel])
+
+def makeZ2Pi0Gamma(name, Pion0Sel, gammaSel, Pi0Pi0PT, ZMassWin):
+    """
+    Create and return a Z -> pi0 Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg Pion0Sel: pi0 selection
+    @arg gammaSel: photon selection
+    @arg Pi0Pi0PT: PT of pi0 and photon
+    @arg ZMassWin: Z0 mass window
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('Z0') < %(ZMassWin)s)" % locals()
+    strCutdau = "PT > %(Pi0Pi0PT)s" % locals()
+    daughtersCuts = {'pi0' : strCutdau, 'gamma' : strCutdau}
+    Z0 = CombineParticles(DecayDescriptor="Z0 -> pi0 gamma",
+                           MotherCut=motherCut,
+                           DaughtersCuts = daughtersCuts,
+                           ParticleCombiners = {"" : "MomentumCombiner:PUBLIC"}, 
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Z0, RequiredSelections=[gammaSel, Pion0Sel])
+
+def makeZ2Pi0Pi0(name, Pion0Sel, Pi0Pi0PT, ZMassWin):
+    """
+    Create and return a Z -> pi0 pi0 Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg Pion0Sel: pi0 selection
+    @arg Pi0Pi0PT: PT of pi0
+    @arg ZMassWin: Z0 mass window
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('Z0') < %(ZMassWin)s)" % locals()
+    strCutdau = "PT > %(Pi0Pi0PT)s" % locals()
+    daughtersCuts = {'pi0' : strCutdau } 
+    Z0 = CombineParticles(DecayDescriptor="Z0 -> pi0 pi0",
+                           MotherCut=motherCut,
+                           DaughtersCuts = daughtersCuts,
+                           ParticleCombiners = {"" : "MomentumCombiner:PUBLIC"}, 
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Z0, RequiredSelections=[Pion0Sel])
+
+def makeZ2RhoGamma(name, RhoSel, gammaSel, ZMassWin):
+    """
+    Create and return a Z -> Rho(770)0 Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg Rho: Rho -> pi+ pi- selection
+    @arg gammaSel: photon selection
+    @arg ZMassWin: Z0 mass window
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('Z0') < %(ZMassWin)s)" % locals()
+    Z0 = CombineParticles(DecayDescriptor="Z0 -> rho(770)0 gamma",
+                           MotherCut=motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Z0, RequiredSelections=[gammaSel, RhoSel])
+
+def makeZ2OmegaGamma(name, OmegaSel, gammaSel, ZMassWin):
+    """
+    Create and return a Z -> Omega(782)0 Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg Omega: Omega -> pi+ pi- pi0 selection
+    @arg gammaSel: photon selection
+    @arg ZMassWin: Z0 mass window
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('Z0') < %(ZMassWin)s)" % locals()
+    Z0 = CombineParticles(DecayDescriptor="Z0 -> omega(782) gamma",
+                           MotherCut=motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Z0, RequiredSelections=[gammaSel, OmegaSel])
+
+def makeZ2KstGamma(name, KstSel, gammaSel, ZMassWin):
+    """
+    Create and return a Z -> K* Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg KstSel: K* -> K+ pi- selection
+    @arg gammaSel: photon selection
+    @arg ZMassWin: Z0 mass window
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('Z0') < %(ZMassWin)s)" % locals()
+    Z0 = CombineParticles(DecayDescriptor="[Z0 -> K*(892)0 gamma]cc",
+                           MotherCut=motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Z0, RequiredSelections=[gammaSel, KstSel])
+
+def makeZ2PhiGamma(name, phiSel, gammaSel, ZMassWin):
+    """
+    Create and return a Z -> Phi Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg phiSel: Phi -> K+ K+ selection
+    @arg gammaSel: photon selection
+    @arg ZMassWin: Z0 mass window
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('Z0') < %(ZMassWin)s)" % locals()
+    Z0 = CombineParticles(DecayDescriptor="Z0 -> phi(1020) gamma",
+                           MotherCut=motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Z0, RequiredSelections=[gammaSel, phiSel])
+
+def makeZ2D0Gamma(name, D0Sel, gammaSel, ZMassWin):
+    """
+    Create and return a Z -> D0 Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg D0Sel: D0 -> K+ pi- selection
+    @arg gammaSel: photon selection
+    @arg ZMassWin: Z0 mass window
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('Z0') < %(ZMassWin)s)" % locals()
+    Z0 = CombineParticles(DecayDescriptor="Z0 -> D0 gamma",
+                           MotherCut=motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Z0, RequiredSelections=[gammaSel, D0Sel])
+
+def makeZ2QONGamma(name, QONSel, gammaSel, ZMassWin):
+    """
+    Create and return a Z -> Jpsi/Upsilon Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg QONSel: Jpsi/Upsilon -> mu mu selection
+    @arg gammaSel: photon selection
+    @arg ZMassWin: Z0 mass window
+    
+    @return: Selection object
+    
+    """  
+    motherCut = "(ADMASS('Z0') < %(ZMassWin)s)" % locals()
+    Z0 = CombineParticles(DecayDescriptor="Z0 -> J/psi(1S) gamma",
+                           MotherCut=motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=Z0, RequiredSelections=[gammaSel, QONSel])
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/__init__.py
new file mode 100644
index 000000000..fde69dcb3
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ('StrippingALP2TauTau', 'StrippingB2EHNLLines', 'StrippingB2MuHNLLines', 'StrippingLLP2HH', 'StrippingLLP2Hadrons', 'StrippingLambdaDecaysDM')
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingDijets.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingDijets.py
new file mode 100644
index 000000000..e3b143b0d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingDijets.py
@@ -0,0 +1,260 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping lines for b and c di-jet analyses.
+# 19/01/2014
+# P. Ilten and M. Williams
+
+__all__ = ('DijetsConf',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePhotons, StdAllNoPIDsPions, StdJets
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from Configurables import CombineParticles
+from Configurables import LoKi__FastJetMaker, LoKi__JetMaker
+from Configurables import LoKi__VertexFitter
+from JetAccessories.JetMaker_Config import JetMakerConf
+
+# Define the default configuration.
+
+default_config = {
+    'NAME'        : 'Dijets',
+    'BUILDERTYPE' : 'DijetsConf',
+    'STREAMS'     : ['EW'],
+    'WGs'         : ['QEE'],
+    'CONFIG'      : { 
+        # Prescale for the calibration line.
+        "PRESCALE" : 0.03,
+        # HLT properties.
+        "HLT"   : {"LINE" : "Hlt1TrackMuon.*Decision"},   # Line to use.
+        # Track properties.
+        "TRK"   : {"MAX_MULT"      : 250,       # Multiplicity.
+                   "MIN_P"         : 5*GeV,     # Momentum.
+                   "MIN_PT"        : 500*MeV,   # Transverse momentum.
+                   "MIN_MIPCHI2DV" : 16,        # Impact parameter chi-squared.
+                   "MAX_GHP"       : 0.4},      # Ghost probability.
+        # Muon properties.
+        "MUO"   : {"MIN_PT"        : 2*GeV,     # Transverse momentum.
+                   "MIN_MIPCHI2DV" : 16},       # Impact parameter chi-squared.
+        # Secondary vertex properties.
+        "SVR"   : {"MAX_CHI2DOCA"  : 8,         # Chi-squared of closest approach.
+                   "MIN_BPVDIRA"   : 0,         # Cos of angle between P and flight.
+                   "MIN_BPVVDCHI2" : 100,       # Chi-squared distance with PV.
+                   "MAX_CHI2"      : 8,         # Chi-squared.
+                   "MAX_M"         : 7*GeV,     # Combined mass.
+                   "MIN_SUM_PT"    : 2*GeV},    # Scalar sum of transverse momenta.
+        # Fully reconstructed jet properties.
+        "JET"   : {"STDJETS"       : False,     # Flag to use StdJets container.
+                   "PF"            : True,      # Flag to use particle flow.
+                   "JEC"           : False,     # If no STDJETS, apply JEC.
+                   "R"             : 0.7,       # If no STDJETS, set jet radius.
+                   "MIN_PT"        : 19*GeV},   # Transverse momentum.
+        # Pair of secondary vertices properties.
+        "DISVR" : {"MAX_COSDPHI"   : 0,         # Cos of transverse angle.
+                   "MAX_COSDALPHA" : 0.99,      # Cos of opening angle.
+                   "MIN_M"         : 2*GeV,     # Combined mass.
+                   "MIN_SUM_PT"    : 10*GeV},   # Scalar sum of transverse momenta.
+        # Pair of jets properties.
+        "DIJET" : {"MAX_COSDPHI"   : -0.8}      # Cos of transverse angle.
+    },
+ }
+
+# Define the class for the di-jet stripping.
+class DijetsConf(LineBuilder):
+
+    # Configuration keys.
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    # Initializer.
+    def __init__(self, name, config) :
+
+        # Initialize the stripping.
+        LineBuilder.__init__(self, name, config)
+        self._config = config
+        self._name = name
+
+        # Preselection strings for HLT and FILTER.
+        hlt1 = "HLT_PASS_RE('%s')" % config["HLT"]["LINE"]
+        flt  = {"Code" : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG)"
+               " < %s)" % config["TRK"]["MAX_MULT"],
+               'Preambulo' : ["from LoKiTracks.decorators import *",
+                              'from LoKiCore.functions    import *']}
+
+        # Select the particles.
+        trks   = self._create_trks([StdAllNoPIDsPions])
+        svrs   = self._create_svrs([trks])
+        jets   = (self._create_jets() if config["JET"]["STDJETS"] is False
+                  else StdJets)
+        disvrs = self._create_disvrs([svrs])
+        dijets = self._create_dijets([disvrs, jets])
+        
+        # The di-jet line.
+        line_dijets = StrippingLine(
+            name + "Line",
+            prescale = 1.0,
+            RequiredRawEvents = ["Calo"],
+            HLT1 = hlt1,
+            FILTER = flt,
+            selection = dijets
+            )
+        self.registerLine(line_dijets)
+
+        # The pre-scaled di-jet line.
+        line_prescaled_dijets = StrippingLine(
+            name + "PrescaledLine",
+            prescale = self._config["PRESCALE"],
+            RequiredRawEvents = ["Calo"],
+            HLT1 = hlt1,
+            FILTER = flt,
+            selection =  self._create_dijets([jets], "Prescaled")
+            )
+        self.registerLine(line_prescaled_dijets)
+
+    # Create the tracks.
+    def _create_trks(self, inputs):
+        code = ("(PT > %s)"
+                % self._config["TRK"]["MIN_PT"]
+                + " & (P > %s)"
+                % self._config["TRK"]["MIN_P"]
+                + " & (MIPCHI2DV(PRIMARY) > %s)"
+                % self._config["TRK"]["MIN_MIPCHI2DV"]
+                + " & (TRGHP < %s)"
+                % self._config["TRK"]["MAX_GHP"])
+        trks = FilterDesktop(Code = code)
+        return Selection(self._name + "TrksSelection",
+                         Algorithm = trks,
+                         RequiredSelections = inputs)
+
+    # Create the svrs.
+    def _create_svrs(self, inputs):
+        cmb_cuts = ("(ADOCACHI2CUT(%s,''))"
+                    % self._config["SVR"]["MAX_CHI2DOCA"]
+                    + " & (AM < %s)"
+                    % self._config["SVR"]["MAX_M"]
+                    + " & (ASUM(PT) > %s)"
+                    % self._config["SVR"]["MIN_SUM_PT"])
+        mom_cuts = ("(BPVDIRA > %s)"
+                    % self._config["SVR"]["MIN_BPVDIRA"]
+                    + " & (BPVVDCHI2 > %s)"
+                    % self._config["SVR"]["MIN_BPVVDCHI2"]
+                    + " & (VFASPF(VCHI2) < %s)"
+                    % self._config["SVR"]["MAX_CHI2"])
+        svrs = CombineParticles(self._name + "D02pipiCombiner",
+            #ParticleCombiners = {"" : "LoKi::VertexFitter"},
+            DecayDescriptors = ["D0 -> pi- pi+", "D0 -> pi- pi-",
+                                "D0 -> pi+ pi+"],
+            CombinationCut = cmb_cuts,
+            MotherCut = mom_cuts
+            )
+        return Selection(self._name + "SvrsSelection",
+                         Algorithm = svrs,
+                         RequiredSelections = inputs)
+
+    # Create the jets.
+    def _create_jets(self):
+        # Use particle flow.
+        if self._config["JET"]["PF"]:
+            pfps = DataOnDemand(Location = "Phys/PFParticles/Particles")
+            jets = JetMakerConf(
+                self._name + "StdJets",
+                R = self._config["JET"]["R"],
+                JetEnergyCorrection = self._config["JET"]["JEC"]).algorithms[0]
+            return Selection(self._name + "JetsSelection",
+                             Algorithm = jets,
+                             RequiredSelections = [pfps])
+        # Just use pions and photons.
+        else:
+            jets =  LoKi__JetMaker(
+                self._name + "JetsMaker",
+                JetMaker = 'LoKi::FastJetMaker',
+                JetID = False,
+                Associate2Vertex = True,
+                ApplyJEC = self._config["JET"]["JEC"],
+                Inputs = ['Phys/StdLoosePhotons/Particles',
+                          'Phys/StdAllNoPIDsPions/Particles']
+                )
+            jets.addTool(LoKi__FastJetMaker)
+            jets.LoKi__FastJetMaker.Type = 2                             
+            jets.LoKi__FastJetMaker.RParameter = self._config["JET"]["R"]
+            jets.LoKi__FastJetMaker.PtMin = self._config["JET"]["MIN_PT"]
+            jets.LoKi__FastJetMaker.Recombination = 0                    
+            return Selection(self._name + "JetsSelection" ,
+                             Algorithm = jets,
+                             RequiredSelections = [StdAllNoPIDsPions, 
+                                                   StdLoosePhotons])
+
+    # Create the di-svrs.
+    def _create_disvrs(self, inputs):
+        pre = ["D1 = ACHILD(BPVVD,1)",
+               "DZ1 = ACHILD(BPVVDZ,1)",
+               "DR1 = ACHILD(BPVVDR,1)",
+               "SIN1 = DR1/D1",
+               "COS1 = DZ1/D1",
+               "SVX1 = ACHILD(VFASPF(VX),1)",
+               "SVY1 = ACHILD(VFASPF(VY),1)",
+               "D2 = ACHILD(BPVVD,2)",
+               "DZ2 = ACHILD(BPVVDZ,2)",
+               "DR2 = ACHILD(BPVVDR,2)",
+               "SIN2 = DR2/D2",
+               "COS2 = DZ2/D2",
+               "SVX2 = ACHILD(VFASPF(VX),2)",
+               "SVY2 = ACHILD(VFASPF(VY),2)",
+               "DSVX = (SVX1-SVX2)",
+               "DSVY = (SVY1-SVY2)",
+               "COSDPHI = (DR1**2 + DR2**2 - DSVX**2 - DSVY**2)/(2*DR1*DR2)",
+               "COSDALPHA = SIN1*SIN2*COSDPHI + COS1*COS2"]
+        cmb_cuts = ("(COSDALPHA < %s)"
+                    % self._config["DISVR"]["MAX_COSDALPHA"]
+                    + " & (COSDPHI < %s)"
+                    % self._config["DISVR"]["MAX_COSDPHI"]
+                    + " & (AM > %s)"
+                    % self._config["DISVR"]["MIN_M"]
+                    + " & (ASUM(SUMTREE(PT,(ISBASIC),0.0)) > %s)"
+                    % self._config["DISVR"]["MIN_SUM_PT"])
+        mom_cuts = ("INTREE(HASMUON & ISMUON"
+                    + " & (PT > %s)"
+                    % self._config["MUO"]["MIN_PT"]
+                    + " & (MIPCHI2DV(PRIMARY) > %s))"
+                    % self._config["MUO"]["MIN_MIPCHI2DV"])
+        disvrs = CombineParticles(self._name + "B02D0D0Combiner",
+            #ParticleCombiners = {"" : "LoKi::VertexFitter"},
+            DecayDescriptors = ["B0 -> D0 D0"],
+            Preambulo = pre,
+            CombinationCut = cmb_cuts,
+            MotherCut = mom_cuts
+            )
+        return Selection(self._name + "DisvrsSelection",
+                         Algorithm = disvrs,
+                         RequiredSelections = inputs)
+
+    # Create the di-jets.
+    def _create_dijets(self, inputs, label = ""):
+        pre = ["COSDPHI = cos(ACHILD(PHI,1) - ACHILD(PHI,2))"]
+        cmb_cuts = "COSDPHI < %s" % self._config["DIJET"]["MAX_COSDPHI"]
+        dijets = CombineParticles(self._name + "H102CjCjCombiner",
+            ParticleCombiners = {"" : "LoKi::VertexFitter"},
+            DecayDescriptor = "H_10 -> CELLjet CELLjet",
+            DaughtersCuts = {"CELLjet" : "PT > %s"
+                             % self._config["JET"]["MIN_PT"]},
+            Preambulo = pre,
+            CombinationCut = cmb_cuts,
+            MotherCut = "ALL"
+            )
+        dijets.addTool( LoKi__VertexFitter, name="LoKi::VertexFitter" )
+        vfitter = getattr ( dijets , "LoKi::VertexFitter" )
+        vfitter.Jets = ""
+        return Selection(self._name + label + "Selection",
+                         Algorithm = dijets,
+                         RequiredSelections = inputs)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingHighPtTopoJets.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingHighPtTopoJets.py
new file mode 100644
index 000000000..60cfe9cc1
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingHighPtTopoJets.py
@@ -0,0 +1,186 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+'''
+b jets tagged with topo candidates
+
+Author: C. Potterat
+'''
+__author__ = ['Cedric Potterat']
+
+__all__ = ( 'default_config', 'HighPtTopoJetsConf' )
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from PhysSelPython.Wrappers import EventSelection
+from Configurables import LoKi__VoidFilter
+from Configurables import HighPtTopoTool
+from GaudiKernel.SystemOfUnits import GeV
+
+
+default_config = {
+  'NAME'        : 'HighPtTopoJets',
+  'BUILDERTYPE' : 'HighPtTopoJetsConf',
+  'WGs'         : [ 'QEE' ],
+  'STREAMS'     : [ 'EW'  ],
+  'CONFIG'      : { 
+    'HighPtTopo40000_Prescale'        : 1.0, 
+    'HighPtTopo20000_Prescale'        : 1.0, 
+    'HighPtTopo10000_Prescale'        : 0.0014,
+    'HighPtTopo1000_Prescale'         : 0.00017,
+    'HighPtTopo20000_Cone55_Prescale' : 0.1, 
+    'HighPtTopo_Postscale'            : 1.0,
+    'pT'        : 40 * GeV,
+    'pT20'      : 20 * GeV,
+    'pT10'      : 10 * GeV,
+    'pT1'       :  1 * GeV,
+    'pTcone'    : 55 * GeV,
+    'conesize'  : 0.3,
+    'HLT2'      : 'Hlt2Topo.*Decision',
+  },
+}
+
+def config_split_HLT(tool):
+    from DAQSys.Decoders import DecoderDB
+    from Configurables import TriggerTisTos
+    tool.addTool(TriggerTisTos, "TriggerTisTosTool")
+    tool.TriggerTisTosTool.HltDecReportsLocation = DecoderDB["HltDecReportsDecoder/Hlt2DecReportsDecoder"].listOutputs()[0]
+    tool.TriggerTisTosTool.HltSelReportsLocation = DecoderDB["HltSelReportsDecoder/Hlt2SelReportsDecoder"].listOutputs()[0]
+    
+
+class HighPtTopoJetsConf( LineBuilder ) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ) :
+
+        LineBuilder.__init__( self, name, config )
+
+
+        # High pT Topo line
+        code = "ACCEPT('HighPtTopoTool/HighPtTopoLine_DT_40000')"
+        alg = LoKi__VoidFilter('HighPtTopoLineFilter_40000',Code=code)
+        sel = EventSelection('HighPtTopoEventSel_40000',Algorithm=alg)
+        dt = HighPtTopoTool('HighPtTopoLine_DT_40000')
+        dt.minpT = config['pT']
+        ## Available after Phys/TopologicalTools v1r1+
+        ## Conditional can be removed afterward (hasattr doesn't work here)
+        if 'hltdecision' in dir(dt):
+          dt.hltdecision = config['HLT2']  
+
+        # Split HLT configuration
+        config_split_HLT(dt)
+        
+        sline = StrippingLine(name+'%(pT)i'%config,
+                              prescale  = config[ 'HighPtTopo40000_Prescale' ],
+                              postscale = config[ 'HighPtTopo_Postscale' ],
+                              selection=sel,
+                              HLT2="HLT_PASS_RE('%s')"%config['HLT2'])
+        self.registerLine(sline)
+
+
+        # High pT Topo line
+        code = "ACCEPT('HighPtTopoTool/HighPtTopoLine_DT_20000')"
+        alg = LoKi__VoidFilter('HighPtTopoLineFilter_20000',Code=code)
+        sel = EventSelection('HighPtTopoEventSel_20000',Algorithm=alg)
+        dt = HighPtTopoTool('HighPtTopoLine_DT_20000')
+        dt.minpT = config['pT20']
+        ## Available after Phys/TopologicalTools v1r1+
+        ## Conditional can be removed afterward (hasattr doesn't work here)
+        if 'hltdecision' in dir(dt):
+          dt.hltdecision = config['HLT2']  
+
+        # Split HLT configuration
+        config_split_HLT(dt)
+
+        sline = StrippingLine(name+'%(pT20)i'%config,
+                              prescale  = config[ 'HighPtTopo20000_Prescale' ],
+                              postscale = config[ 'HighPtTopo_Postscale' ],
+                              selection=sel,
+                              HLT2="HLT_PASS_RE('%s')"%config['HLT2'])
+        self.registerLine(sline)
+
+
+        # High pT Topo line
+        code = "ACCEPT('HighPtTopoTool/HighPtTopoLine_DT_10000')"
+        alg = LoKi__VoidFilter('HighPtTopoLineFilter_10000',Code=code)
+        sel = EventSelection('HighPtTopoEventSel_10000',Algorithm=alg)
+        dt = HighPtTopoTool('HighPtTopoLine_DT_10000')
+        dt.minpT = config['pT10']
+        ## Available after Phys/TopologicalTools v1r1+
+        ## Conditional can be removed afterward (hasattr doesn't work here)
+        if 'hltdecision' in dir(dt):
+          dt.hltdecision = config['HLT2']  
+
+        # Split HLT configuration
+        config_split_HLT(dt)
+
+        sline = StrippingLine(name+'%(pT10)i'%config,
+                              prescale  = config[ 'HighPtTopo10000_Prescale' ],
+                              postscale = config[ 'HighPtTopo_Postscale' ],
+                              selection=sel,
+                              HLT2="HLT_PASS_RE('%s')"%config['HLT2'])
+        self.registerLine(sline)
+
+
+        # High pT Topo line
+        code = "ACCEPT('HighPtTopoTool/HighPtTopoLine_DT_1000')"
+        alg = LoKi__VoidFilter('HighPtTopoLineFilter_1000',Code=code)
+        sel = EventSelection('HighPtTopoEventSel_1000',Algorithm=alg)
+        dt = HighPtTopoTool('HighPtTopoLine_DT_1000')
+        dt.minpT = config['pT1']
+        ## Available after Phys/TopologicalTools v1r1+
+        ## Conditional can be removed afterward (hasattr doesn't work here)
+        if 'hltdecision' in dir(dt):
+          dt.hltdecision = config['HLT2']  
+
+        # Split HLT configuration
+        config_split_HLT(dt)
+
+        sline = StrippingLine(name+'%(pT1)i'%config,
+                              prescale  = config[ 'HighPtTopo1000_Prescale' ],
+                              postscale = config[ 'HighPtTopo_Postscale' ],
+                              selection=sel,
+                              HLT2="HLT_PASS_RE('%s')"%config['HLT2'])
+        self.registerLine(sline)
+
+
+        code = "ACCEPT('HighPtTopoTool/HighPtTopoLine_DT_20000_Cone55')"
+        alg = LoKi__VoidFilter('HighPtTopoLineFilter_20000_Cone55',Code=code)
+        sel = EventSelection('HighPtTopoEventSel_20000_Cone55',Algorithm=alg)
+        dt = HighPtTopoTool('HighPtTopoLine_DT_20000_Cone55')
+        dt.minconepT = config['pTcone']
+        dt.conesize = config['conesize']
+        dt.minpT = config['pT20']
+        ## Available after Phys/TopologicalTools v1r1+
+        ## Conditional can be removed afterward (hasattr doesn't work here)
+        if 'hltdecision' in dir(dt):
+          dt.hltdecision = config['HLT2']  
+
+
+        # Split HLT configuration
+        config_split_HLT(dt)
+
+        sline = StrippingLine(name+'%(pT20)i_Cone55'%config,
+                              prescale  = config[ 'HighPtTopo20000_Cone55_Prescale' ],
+                              postscale = config[ 'HighPtTopo_Postscale' ],
+                              selection=sel,
+                              HLT2="HLT_PASS_RE('%s')"%config['HLT2'])
+        self.registerLine(sline)
+
+    
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingJets.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingJets.py
new file mode 100644
index 000000000..39efe61ed
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingQEE/depreciated/StrippingJets.py
@@ -0,0 +1,368 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping lines for b (di-)jet analyses.
+# 19/01/2014
+# C. Potterat, V. Coco, M. Rangel
+
+__all__ = ('JetsConf',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from JetAccessories.JetMaker_Config import JetMakerConf
+from StandardParticles import StdJets, StdAllNoPIDsPions
+from Configurables import CombineParticles
+from Configurables import TopologicalTagging
+from Configurables import LoKi__VertexFitter
+
+#
+# Define the default configuration.
+default_config = {
+
+    'NAME'        : 'Jets',
+    'BUILDERTYPE' : 'JetsConf',
+    'STREAMS'     : [ 'EW' ] ,
+    'WGs'         : [ 'QEE' ],
+
+    # Prescale for the calibration line.
+    'CONFIG':{
+        "PRESCALE" : {
+            "MB"              : 1.0,
+            "DIFF"            : 1.0,
+            "bJetPT15"        : 0.005,
+            "bJetPT50"        : 0.1,
+            "bJetPT90"        : 1.0,
+            "dibJetT6A"       : 0.05,
+            "dibJetT6PS"      : 1.0,
+            "_3jets_Pt7_3sv"  : 1.0,
+            "_4jets_Pt5_3sv"  : 1.0,
+            "_4jets_Pt5_0sv_Prescaled" : 0.01
+        },
+        # HLT properties.
+        "HLT"   : {
+            "LINETOPO"  : "Hlt2Topo.*Decision", # Line to use for TOPO
+            "LINEMB"    : "Hlt1MBNoBiasDecision",  # Line to use for MB
+        }, 
+        # Track properties.
+        "TRK"   : {
+            "MAX_MULT"       : 2500,      # Multiplicity.
+            "MIN_P"          : 5*GeV,     # Momentum.
+            "MIN_PT"         : 500*MeV,   # Transverse momentum.
+            "MIN_MIPCHI2DV"  : 16,        # Impact parameter chi-squared.
+            "MAX_GHP"        : 0.4,
+            "MAX_PROBNNGHOST": 0.7,       # Ghost probability.
+        },
+        # Secondary vertex properties.
+        "SVR"   : {
+            "MAX_CHI2DOCA"   : 8,         # Chi-squared of closest approach.
+            "MIN_BPVDIRA"    : 0,         # Cos of angle between P and flight.
+            "MIN_BPVVDCHI2"  : 100,       # Chi-squared distance with PV.
+            "MAX_CHI2"       : 8,         # Chi-squared.
+            "MAX_M"          : 7*GeV,     # Combined mass.
+            "MIN_SUM_PT"     : 2*GeV,     # Scalar sum of transverse momenta.
+        },
+        # Fully reconstructed jet p roperties.
+        "JET"   : {
+            "JEC"            : False,     # If no STDJETS, apply JEC.
+            "R"              : 0.5,       # If no STDJETS, set jet radius.
+            "MIN_PT"         :  5*GeV,    # Transverse momentum.
+            "EXTLOW_PT"      :  7*GeV,    # Transverse momentum.
+            "VERYLOW_PT"     : 15*GeV,    # Transverse momentum.
+            "LOW_PT"         : 17*GeV,    # Transverse momentum.
+            "MEDIUM_PT"      : 50*GeV,    # Transverse momentum.
+            "HIGH_PT"        : 90*GeV,    # Transverse momentum.
+        },
+        "DIJET" : {
+            "MAX_COSDPHI"    : -0.8,      # Cos of transverse angle.
+        },
+    },
+
+}
+# Define the class for the di-jet stripping.
+class JetsConf(LineBuilder):
+
+    # Configuration keys.
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    # Initializer.
+    def __init__(self, name, config) :
+
+        # Initialize the stripping.
+        LineBuilder.__init__(self, name, config)
+        self._config = config
+        self._name = name
+
+        # Preselection strings for HLT and FILTER.
+        hlt     = "HLT_PASS_RE('%s')" % config["HLT"]["LINETOPO"]
+        hltMB   = "HLT_PASS_RE('%s')" % config["HLT"]["LINEMB"]
+        fltDIFF = {"Code" : "(recSummary(LHCb.RecSummary.nPVs, 'Rec/Vertex/Primary')<2)"
+                            "& (recSummaryTrack(LHCb.RecSummary.nBackTracks, TrBACKWARD) < 1)",
+                   'Preambulo' : ['from LoKiTracks.decorators import *',
+                                  'from LoKiCore.functions    import *']}
+
+        # Select the particles.
+        trks     = self._create_trks([StdAllNoPIDsPions])
+        svrs     = self._create_svrs([trks])
+        mptJets  = self._filter_hPTJets([StdJets],str(self._config["JET"]["MIN_PT"]) )
+        hptJets  = self._filter_hPTJets([StdJets],str(self._config["JET"]["VERYLOW_PT"]) )
+        bJets    = self._create_bJets(mptJets,svrs)
+        #one jet has 60% of a TOPO object LHCbID, with PT > 15, 50, 90
+        fbJets0   = self._filter_bJets(bJets,0,str(self._config["JET"]["VERYLOW_PT"]))
+        fbJets1   = self._filter_bJets(bJets,0,str(self._config["JET"]["MEDIUM_PT"]))
+        fbJets2   = self._filter_bJets(bJets,0,str(self._config["JET"]["HIGH_PT"]))
+        dijets_T6_A  = self._create_dijets([hptJets, bJets], cut2=0, PT = str(self._config["JET"]["LOW_PT"]))
+        #one jet has 60% of a TOPO object LHCbID, the other has both trk of one 2-trk SV
+        dijets_T6_PS = self._create_dijets([bJets],   cut1=0,  cut3=15, PT = str(self._config["JET"]["LOW_PT"]))
+        #
+        #cut1 and cut2 act on the TopoObject tagging for jet1 and jet2:
+        #    cut1 apply to jet1 and cut2 apply to jet2, or cut2 apply to jet1 and cut1
+        #    apply to jet2
+        #cut3 and cut4 act on the  created SV tagging for jet1 and jet2
+        #
+        # cutX == 0  no tagging
+        # cutX == 1  at least  60% of the LHCbID to the "tagging" object are
+        # continas in the jet
+        # cutX == 11 TOS (or all tracks in the jet)
+        #
+        #The three following lines are designed for the 4b analyses (Contact: Stephane Tourneur):
+        _3jets_Pt7_3sv = self._create_3jets([mptJets, bJets], minPT = str(self._config["JET"]["EXTLOW_PT"]), Nsvtag="2.5")
+        _4jets_Pt5_3sv = self._create_4jets([mptJets, bJets], minPT = str(self._config["JET"]["MIN_PT"]), Nsvtag="2.5")
+        _4jets_Pt5_0sv = self._create_4jets([mptJets, bJets], minPT = str(self._config["JET"]["MIN_PT"]), Nsvtag="-0.5")
+
+        line_jetDIFF = StrippingLine(
+            name + "Diffractive",
+            prescale = self._config["PRESCALE"]["DIFF"],
+            HLT2 = hlt,
+            FILTER = fltDIFF,
+            selection = hptJets,
+            RequiredRawEvents = ["Calo"]
+        )
+        line_jetMB = StrippingLine(
+            name + "MB",
+            prescale = self._config["PRESCALE"]["MB"],
+            HLT1 = hltMB,
+            selection = hptJets,
+            RequiredRawEvents = ["Calo"]
+        )
+        line_jetPT0 = StrippingLine(
+            name + "bJetPT15",
+            prescale = self._config["PRESCALE"]["bJetPT15"],
+            HLT2 = hlt,
+            selection = fbJets0,
+            RequiredRawEvents = ["Calo"]
+            )
+        line_jetPT1 = StrippingLine(
+            name + "bJetPT50",
+            prescale = self._config["PRESCALE"]["bJetPT50"],
+            HLT2 = hlt,
+            selection = fbJets1,
+            RequiredRawEvents = ["Calo"]
+            )
+        line_jetPT2 = StrippingLine(
+            name + "bJetPT90",
+            prescale = self._config["PRESCALE"]["bJetPT90"],
+            HLT2 = hlt,
+            selection = fbJets2,
+            RequiredRawEvents = ["Calo"]
+            )
+        line_Dijets_T6A = StrippingLine(
+            name + "DiJet20_T6A",
+            prescale = self._config["PRESCALE"]["dibJetT6A"],
+            HLT2 = hlt,
+            selection = dijets_T6_A,
+            RequiredRawEvents = ["Calo"]
+            )
+        line_Dijets_T6PS = StrippingLine(
+            name + "DiJet20_T6PS",
+            prescale = self._config["PRESCALE"]["dibJetT6PS"],
+            HLT2 = hlt,
+            selection = dijets_T6_PS,
+            RequiredRawEvents = ["Calo"]
+            )
+        line__3jets_Pt7_3sv  = StrippingLine(
+            name + "_3jets_Pt7_3sv",
+            prescale = self._config["PRESCALE"]["_3jets_Pt7_3sv"],
+            HLT2 = hlt,
+            selection = _3jets_Pt7_3sv,
+            RequiredRawEvents = ["Calo"]
+            )
+        line__4jets_Pt5_3sv  = StrippingLine(
+            name + "_4jets_Pt5_3sv",
+            prescale = self._config["PRESCALE"]["_4jets_Pt5_3sv"],
+            HLT2 = hlt,
+            selection = _4jets_Pt5_3sv,
+            RequiredRawEvents = ["Calo"]
+            )
+        line__4jets_Pt5_0sv_Prescaled  = StrippingLine(
+            name + "_4jets_Pt5_0sv_Prescaled",
+            prescale = self._config["PRESCALE"]["_4jets_Pt5_0sv_Prescaled"],
+            HLT2 = hlt,
+            selection = _4jets_Pt5_0sv,
+            RequiredRawEvents = ["Calo"]
+            )
+
+        self.registerLine(line_jetMB)
+        self.registerLine(line_jetDIFF)
+        self.registerLine(line_jetPT0)
+        self.registerLine(line_jetPT1)
+        self.registerLine(line_jetPT2)
+        self.registerLine(line_Dijets_T6A)
+        self.registerLine(line_Dijets_T6PS)
+        self.registerLine(line__3jets_Pt7_3sv)
+        self.registerLine(line__4jets_Pt5_3sv)
+        self.registerLine(line__4jets_Pt5_0sv_Prescaled)
+
+
+    def _filter_hPTJets(self, inputs, ptlim):
+        code = ("(PT > "+(ptlim)+")")
+        jets = FilterDesktop(Code = code)
+        return Selection(self._name + str(ptlim).split("*")[0]+"GeVJets",
+                         Algorithm = jets,
+                         RequiredSelections = inputs)
+
+    def _create_bJets(self, inputs, test):
+        bjets = TopologicalTagging(self._name+'taggingJet')
+        bjets.ParticleAbsPID = 98
+        bjets.SVLocation = test.outputLocation()
+        bjets.TriggerLine = self._config["HLT"]["LINETOPO"]
+        ## Fix Hlt split configuration
+        config_split_HLT(bjets)
+
+        imergedSel = MergedSelection(self._name+"merged", RequiredSelections=[inputs,test])
+        return Selection(self._name + "bJets",
+                         Algorithm = bjets,
+                         RequiredSelections = [imergedSel])
+
+
+    def _filter_bJets(self, _in2, Type=0, minPT = 30*GeV):
+        _filter = FilterDesktop(Code="(ABSID=='CELLjet') & (PT> "+(minPT)+") & (PINFO(9990,-1)>"+str(Type)+")")
+        return Selection ( self._name+"_bJetFilter"+str(Type)+"PT"+str(minPT).split("*")[0],
+                           Algorithm          = _filter ,
+                           RequiredSelections =  [_in2]
+                       )
+   # Create the tracks.
+    def _create_trks(self, inputs):
+        code = ("(PT > %s)"
+                % self._config["TRK"]["MIN_PT"]
+                + " & (P > %s)"
+                % self._config["TRK"]["MIN_P"]
+                + " & (MIPCHI2DV(PRIMARY) > %s)"
+                % self._config["TRK"]["MIN_MIPCHI2DV"]
+                + " & (TRGHP < %s)"
+                % self._config["TRK"]["MAX_GHP"]
+                + " & (PPINFO(705,-1) < %s)"
+                % self._config["TRK"]["MAX_PROBNNGHOST"])
+        trks = FilterDesktop(Code = code)
+        return Selection(self._name + "TrksSelection",
+                         Algorithm = trks,
+                         RequiredSelections = inputs)
+
+    # Create the svrs.
+    def _create_svrs(self, inputs):
+        cmb_cuts = ("(ADOCACHI2CUT(%s,''))"
+                    % self._config["SVR"]["MAX_CHI2DOCA"]
+                    + " & (AM < %s)"
+                    % self._config["SVR"]["MAX_M"]
+                    + " & (ASUM(PT) > %s)"
+                    % self._config["SVR"]["MIN_SUM_PT"])
+        mom_cuts = ("(BPVDIRA > %s)"
+                    % self._config["SVR"]["MIN_BPVDIRA"]
+                    + " & (BPVVDCHI2 > %s)"
+                    % self._config["SVR"]["MIN_BPVVDCHI2"]
+                    + " & (VFASPF(VCHI2) < %s)"
+                    % self._config["SVR"]["MAX_CHI2"])
+        svrs = CombineParticles(
+            "2ndVertexJetsStrippingLine",
+            DecayDescriptors = ["D0 -> pi- pi+", "D0 -> pi- pi-",
+                                "D0 -> pi+ pi+"],
+            CombinationCut = cmb_cuts,
+            MotherCut = mom_cuts
+            )
+        return Selection(self._name + "SvrsSelection",
+                         Algorithm = svrs,
+                         RequiredSelections = inputs)
+
+    # Create the di-jets.
+    def _create_dijets(self, inputs,cut1=-1, cut2=-1, cut3 = -1, cut4 = -1, PT = 25*GeV,  LeadingPT = 0):
+        pre = ["COSDPHI = cos(ACHILD(PHI,1) - ACHILD(PHI,2))"]
+        cmb_cuts = "(abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),2))<1e-6)  & (COSDPHI < %s) " % self._config["DIJET"]["MAX_COSDPHI"]
+        label = ""
+        if(cut1 >-1 or cut2 > -1):
+            cmb_cuts += "& ((  (ACHILD(PINFO(9990,0),1)>"+str(cut1)+") &  (ACHILD(PINFO(9990,0),2)>"+str(cut2)+"))  |    ((ACHILD(PINFO(9990,0),2)>"+str(cut1)+") &  (ACHILD(PINFO(9990,0),1)>"+str(cut2)+"))) "
+            label += "T"
+        if(cut3 >-1 or cut4 > -1):
+            cmb_cuts += "& ((  (ACHILD(PINFO(9991,0),1)>"+str(cut3)+") &  (ACHILD(PINFO(9991,0),2)>"+str(cut4)+"))  |    ((ACHILD(PINFO(9991,0),2)>"+str(cut3)+") &  (ACHILD(PINFO(9991,0),1)>"+str(cut4)+"))) "
+            label += "PS"
+        if(cut3 >-1 and cut1 > -1):
+            cmb_cuts += "& ((  (ACHILD(PINFO(9990,0),1)>"+str(cut1)+") &  (ACHILD(PINFO(9991,0),2)>"+str(cut3)+"))  |    ((ACHILD(PINFO(9990,0),2)>"+str(cut3)+") &  (ACHILD(PINFO(9991,0),1)>"+str(cut1)+"))) "
+            label += "TPS"
+        dijets = CombineParticles(
+            "DiJetCreatation" + str(PT) + str(LeadingPT) + str(cut1) + str(cut2) + str(cut3) + str(cut4),
+            ParticleCombiners = {"" : "LoKi::VertexFitter"},
+            DecayDescriptor = "H_10 -> CELLjet CELLjet",
+            DaughtersCuts = {"CELLjet" : "(PT > "+str(PT)+")"},
+            #                             % self._config["JET"]["MIN_PT"]},
+            Preambulo = pre,
+            CombinationCut = cmb_cuts,
+            MotherCut = "INTREE((ABSID=='CELLjet')&(PT>"+str(LeadingPT)+"))")
+        dijets.addTool( LoKi__VertexFitter, name="LoKi::VertexFitter" )
+        vfitter = getattr ( dijets , "LoKi::VertexFitter" )
+        vfitter.Jets = ""
+
+        return Selection(self._name + label + "PT" +str(PT).split('*')[0]+"LePT"+ str(LeadingPT).split('*')[0]+ "Selection",
+                                         Algorithm = dijets,
+                                         RequiredSelections = inputs)
+
+    def _create_3jets(self, inputs, minPT = 5*GeV, LeadingPT = 0*GeV, Nsvtag = 0):
+
+        cmb_cuts = "(abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),2))<1*mm) & (abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),3))<1*mm)"
+        _3jets = CombineParticles(
+            "3JetCreatation" + str(minPT) + str(LeadingPT) + str(Nsvtag),
+            ParticleCombiners = {"" : "LoKi::VertexFitter"},
+            DecayDescriptor = "H_10 -> CELLjet CELLjet CELLjet",
+            CombinationCut = cmb_cuts,
+            DaughtersCuts = {"CELLjet" : "(PT > "+str(minPT)+")"},
+            MotherCut = "((INTREE((ABSID=='CELLjet')&(PT>"+str(LeadingPT)+")))&(INTREE((ABSID=='CELLjet')&(PINFO(9990,0)>0)))&("+str(Nsvtag)+" < NINTREE((ABSID=='CELLjet')&(PINFO(9991,0) > 5 ))))")
+        _3jets.addTool( LoKi__VertexFitter, name="LoKi::VertexFitter" )
+        vfitter = getattr ( _3jets , "LoKi::VertexFitter" )
+        vfitter.Jets = ""
+
+
+        return Selection(self._name + "3jets_PTmin" +str(minPT).split('*')[0]+"LeadPT"+ str(LeadingPT).split('*')[0]+ "Nsv" + str(Nsvtag) +"Selection", Algorithm = _3jets, RequiredSelections = inputs)
+
+    def _create_4jets(self, inputs, minPT = 5*GeV, LeadingPT = 0*GeV, Nsvtag = 0):
+
+        cmb_cuts = "(abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),2))<1*mm) & (abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),3))<1*mm) & (abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),4))<1*mm)"
+        _4jets = CombineParticles(
+            "4JetCreatation" + str(minPT) + str(LeadingPT) + str(Nsvtag),
+            ParticleCombiners = {"" : "LoKi::VertexFitter"},
+            DecayDescriptor = "H_10 -> CELLjet CELLjet CELLjet CELLjet",
+            CombinationCut = cmb_cuts,
+            DaughtersCuts = {"CELLjet" : "(PT > "+str(minPT)+")"},
+            MotherCut = "((INTREE((ABSID=='CELLjet')&(PT>"+str(LeadingPT)+")))&(INTREE((ABSID=='CELLjet')&(PINFO(9990,0)>0)))&("+str(Nsvtag)+" < NINTREE((ABSID=='CELLjet')&(PINFO(9991,0) > 5 ))))")
+        _4jets.addTool( LoKi__VertexFitter, name="LoKi::VertexFitter" )
+        vfitter = getattr ( _4jets , "LoKi::VertexFitter" )
+        vfitter.Jets = ""
+
+
+        return Selection(self._name + "4jets_PTmin" +str(minPT).split('*')[0]+"LeadPT"+ str(LeadingPT).split('*')[0]+ "Nsv" + str(Nsvtag) +"Selection", Algorithm = _4jets, RequiredSelections = inputs)
+
+def config_split_HLT(tool):
+    from DAQSys.Decoders import DecoderDB
+    from Configurables import TriggerTisTos
+    tool.addTool(TriggerTisTos, "TriggerTisTos")
+    tool.TriggerTisTos.HltDecReportsLocation = DecoderDB["HltDecReportsDecoder/Hlt2DecReportsDecoder"].listOutputs()[0]
+    tool.TriggerTisTos.HltSelReportsLocation = DecoderDB["HltSelReportsDecoder/Hlt2SelReportsDecoder"].listOutputs()[0]
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/Beauty2Charm_LoKiCuts.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/Beauty2Charm_LoKiCuts.py
new file mode 100644
index 000000000..40399a89c
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/Beauty2Charm_LoKiCuts.py
@@ -0,0 +1,119 @@
+###############################################################################
+# (c) Copyright 2000-2019 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 Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from StandardParticles import StdNoPIDsPions, StdNoPIDsKaons
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+class LoKiCuts(object):
+    ''' Class to automatically build LoKi cut strings.
+
+    Each functor has a "key" which is just the functor name if the functor does
+    not have any special characters or ()s.  See the "functors" dictionary
+    below for the full list of keys (the values are the functor strings).
+
+    The cut string is built by supplying a dictionary of cuts and a list of
+    functor keys to use.  The entries in the cuts dict must be of the form
+    <functor key>_<MIN or MAX> : <value>.
+
+    Ex.) cuts = {"PT_MIN":"500*MeV", "VCHI2DOF_MAX":30, "ASUMPT_MIN":"1*GeV"}
+         code = LoKiCuts(["PT","VCHI2DOF"],cuts).code()
+
+    The result is: "(PT > 500*MeV) & (VFASPF(VCHI2/VDOF) < 30)".  Notice that
+    the MIN and MAX suffixes determine the > or < usage (both are allowed if
+    the user supplies separate entries to the cuts dict).  Also notice how the
+    full functor is used (not the key) and that cuts are ignored if the key
+    is not supplied to LoKiCuts.
+    '''
+    
+    functors = {'TRCHI2DOF' : 'TRCHI2DOF',
+                'P'         : 'P',
+                'PT'        : 'PT',
+                'MIPCHI2DV' : 'MIPCHI2DV(PRIMARY)',
+                'ASUMPT'    : 'ASUM(PT)',
+                'AMAXDOCA'  : "ACUTDOCA(%s,'LoKi::DistanceCalculator')",
+                #'AMAXDOCA' : "AMAXDOCA('LoKi::DistanceCalculator')" 
+                'VCHI2DOF'  : "VFASPF(VCHI2/VDOF)",
+                'BPVVDCHI2' : 'BPVVDCHI2',
+                'BPVDIRA'   : 'BPVDIRA',
+                'SUMPT'     : "ASUM(SUMTREE(PT,(ISBASIC | (ID=='gamma')),0.0))",
+                'BPVIPCHI2' : 'BPVIPCHI2()',
+                'BPVLTIME'  : 'BPVLTIME()',
+                'MM'        : 'MM',
+                'CHILDCL1'  : 'CHILD(CL,1)',
+                'CHILDCL2'  : 'CHILD(CL,2)',
+                'PIDK'      : 'PIDK',
+                'PIDp'      : 'PIDp',
+                'PIDKp'     : 'PIDK-PIDp',
+                'PIDpK'     : 'PIDp-PIDK',
+                'BPVVDRHO'  : 'BPVVDRHO',
+                'BPVVDZ'    : 'BPVVDZ',
+                'DOCAMAX'   : 'DOCAMAX',
+                'AM'        : 'AM',
+                'CL'        : 'CL', 
+                'TRGHP'     : 'TRGHP',
+                'DZ1'       : ' (CHILD(VFASPF(VZ), 1) - VFASPF(VZ))',
+                'DZ2'       : ' (CHILD(VFASPF(VZ), 2) - VFASPF(VZ))',
+                'PROBNNK'   : 'PROBNNK',
+                'PROBNNpi'  : 'PROBNNpi',
+                'PIDmu'     : 'PIDmu',
+                'HASVERTEX' : 'HASVERTEX',
+                'BPVCORRM'  : 'BPVCORRM', 
+                }
+    
+    def __init__(self,cuts,config):
+        self.cuts = cuts
+        self.config = config
+
+    def code(self):
+        cuts = []
+        for cut in self.cuts: cuts += self._getCut(cut)
+        return LoKiCuts.combine(cuts)
+        
+    def _getCut(self,cut):
+        cuts = []
+        fun = self.functors[cut]
+        if cut is 'AMAXDOCA': # Use ACUTDOCA instead (slightly faster)
+            if self.config.has_key(cut+'_MAX'):
+                return [fun%self.config[cut+'_MAX']]
+            else: # Look for ADOCA(N,M) entries
+                for key,val in self.config.iteritems():
+                    if key.startswith('ADOCA') and key.endswith('MAX'):
+                        cuts.append(key.replace('_MAX','')+'<'+str(val))
+                return cuts
+        for key,val in self.config.iteritems():
+            if key.startswith(cut+'_'):                
+                if key.endswith('MIN'): cuts.append(fun+'>'+str(val))
+                else: cuts.append(fun+'<'+str(val))
+        return cuts
+
+    @staticmethod
+    def cutValue(cut):
+        '''Takes X*Units and returns X as an int and Units'''
+        info = cut.split('*')
+        return (int(info[0]),info[1])
+
+    @staticmethod
+    def combine(cuts):
+        '''Simple combine of list of LoKi cut strings.'''
+        cutList = []
+        for c in cuts:
+            if c:
+                if not c.startswith('('): c = '('+c+')'
+                cutList.append(c)
+        return ' & '.join(cutList)
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB02Lcmu_pKpi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB02Lcmu_pKpi.py
new file mode 100644
index 000000000..a13fa02a9
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB02Lcmu_pKpi.py
@@ -0,0 +1,121 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+#Module for selecting B0->(Lambda_c+ -> p+ K- pi+) mu-
+
+__author__=['Nikita Beliy', 'Jibo He']
+__date__ = '28/11/2016'
+__version__= '$Revision: 1.0 $'
+
+__all__ = (
+    'B02Lcmu_pKpiConf'
+    )
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+default_config = {
+    'NAME'              :   'B02Lcmu_pKpi',
+    'BUILDERTYPE'       :   'B02Lcmu_pKpiConf',
+    'CONFIG'    : {
+        'ProtonCuts'    :   '(PROBNNp  > 0.10) & (PT > 400*MeV) & (TRGHOSTPROB<0.4)',
+        'KaonCuts'      :   '(PROBNNk  > 0.10) & (PT > 300*MeV) & (TRGHOSTPROB<0.4)',
+        'PionCuts'      :   '(PROBNNpi > 0.18) & (PT > 200*MeV) & (TRGHOSTPROB<0.4)',
+        'MuonCuts'      :   '(PROBNNmu > 0.10) & (PT > 600*MeV) & (TRGHOSTPROB<0.4)',
+        'LambdacMothCut':  "(ADAMASS('Lambda_c+')<24*MeV)",
+        'LambdacVxCut'  :   '(VFASPF(VCHI2/VDOF) < 14.) & (PT > 1*GeV) & (P > 15*GeV)',
+        'B0MotheCut'    :  "(ADAMASS('B0')<500*MeV)",
+        'B0VxCut'       :   "(VFASPF(VCHI2/VDOF) < 14.) & (BPVDIRA>0.988)",
+        'Prescale'      :  1.
+        },
+    'STREAMS'           : ['Bhadron' ],
+    'WGs'               : ['RD']
+    }
+
+
+class B02Lcmu_pKpiConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys() 
+
+    def __init__(self, name, config ):
+
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        self.config = config
+
+        #Lambda_c
+        self.SelProtons = self.createSubSel( OutputList = name + 'SelProtons',
+                                             InputList =  DataOnDemand(Location = 'Phys/StdLooseProtons/Particles' ),
+                                             Cuts = config['ProtonCuts']
+                                            )
+
+        self.SelKaons = self.createSubSel( OutputList = name + 'SelKaons',
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLooseKaons/Particles' ),
+                                           Cuts = config['KaonCuts']
+                                           )
+        
+        self.SelPions = self.createSubSel( OutputList = name + 'SelPions',
+                                           InputList =  DataOnDemand(Location = 'Phys/StdLoosePions/Particles' ),
+                                           Cuts = config['PionCuts']
+                                           )
+
+        self.SelLc2pKpi = self.createCombinationSel(OutputList = name + 'SelLc2pKpi',
+                                            DecayDescriptor = '[Lambda_c+ -> p+ K- pi+]cc ',
+                                            DaughterLists = [ self.SelProtons, self.SelKaons, self.SelPions ],
+                                            PreVertexCuts  = config['LambdacMothCut'],
+                                            PostVertexCuts = config['LambdacVxCut']
+                                            )
+
+        #B0->Lambda_c+ mu-
+        self.SelMuons = self.createSubSel( OutputList = name + 'SelMuons',
+                                            InputList =  DataOnDemand(Location = 'Phys/StdLooseMuons/Particles' ),
+                                            Cuts = config['MuonCuts']
+                                        )
+
+        self.SelB02Lcmu = self.createCombinationSel ( OutputList = name + 'SelB02Lcmu',
+                                                    DecayDescriptor = '[B0 -> Lambda_c+ mu-]cc',
+                                                    DaughterLists = [self.SelMuons, self.SelLc2pKpi],
+                                                    PreVertexCuts  = config['B0MotheCut'],
+                                                    PostVertexCuts = config['B0VxCut'] 
+                                                    )
+        self.B02Lcmu_pKpiBDTLine = StrippingLine( self.name + 'Line',
+                                                prescale  = config['Prescale'],
+                                                algos     = [self.SelB02Lcmu]
+                                                )
+        self.registerLine( self.B02Lcmu_pKpiBDTLine )
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                      Algorithm = filter,
+                      RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                          DecayDescriptor,
+                          DaughterLists,
+                          DaughterCuts = {} ,
+                          PreVertexCuts = "ALL",
+                          PostVertexCuts = "ALL",
+                          ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                 DaughtersCuts = DaughterCuts,
+                                 MotherCut = PostVertexCuts,
+                                 CombinationCut = PreVertexCuts,
+                                 ReFitPVs = False)
+        return Selection ( OutputList,
+                       Algorithm = combiner,
+                       RequiredSelections = DaughterLists)
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB23MuLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB23MuLines.py
new file mode 100644
index 000000000..36646d83a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB23MuLines.py
@@ -0,0 +1,368 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of B+ -> mu l+ l- lines
+
+Performance:
+
+Full.dst
+########
+StrippingReport                                                INFO Event 1000000, Good event 1000000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |_StrippingGlobal_                                            |  0.0088|        88|       |  10.028|
+ |!StrippingB23MuB23MuLine_TIMING                              |  0.0001|         1|  1.000|   0.068|
+ |!StrippingB23MuB2MueeLine_TIMING                             |  0.0005|         5|  1.000|   0.079|
+ |!StrippingB23MuB23PiLine_TIMING                              |  0.0103|       103|  1.097|   0.151|
+       
+MC: B23Pi (12103002)
+####################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingB23MuB23PiLine                                     | 16.0900|     16090|  1.005|   7.941|
+
+MC: B2KPiPi (12103022)
+######################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingB23MuB23PiLine                                     | 10.8070|     10807|  1.003|   5.839|
+
+MC: B23K (12103012)
+###################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingB23MuB23PiLine                                     |  0.1140|       114|  1.026|   1.742|
+ 
+Exported symbols (use python help!):
+
+"""
+
+__author__ = ["Oliver Gruenberg"]
+__date__ = "08.12.2015"
+__version__ = "$Revision: 1.0 $"
+
+#############################################################################
+
+__all__ = ("B23MuLinesConf",
+           "default_config", )
+
+#############################################################################
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+#from StrippingSelections.Utils import checkConfig
+from GaudiKernel.PhysicalConstants import c_light
+
+#############################################################################
+
+default_config = {
+    "NAME"        : "B23Mu",
+    "WGs"         : [ "RD" ],
+    "STREAMS"     : [ "Leptonic" ],
+    "BUILDERTYPE" : "B23MuLinesConf",
+    "CONFIG"      : {
+    "MDSTflag"             : False, # True or False
+    # TrackCuts
+    "MinTrIPChi2"          : 25.0,
+    "MaxTrChi2Dof"         : 4.0,
+    "MaxTrGhp"             : 0.4,
+    # CombiCuts
+    "MaxDoca"              : 0.3, # (mm)
+    "mDiffBuLoose"         : 500, # (MeV)
+    "mDiffBuTight"         : 100, # (MeV)
+    # MotherCuts
+    "MaxIPChi2"            : 25,
+    "MinVDChi2"            : 225,
+    "MaxVtxChi2Dof"        : 9,
+    "MinDira"              : 0.0,
+    "MinTau"               : 0.0, # (ps)
+    # scalings    
+    "Postscale"            : 1,
+    "B23MuPrescale"        : 1,
+    "B2MueePrescale"       : 1,
+    "B23PiPrescale"        : 1,
+    "CommonRelInfoTools"   : [ { "Type": "RelInfoVertexIsolation", "Location":"VtxIsoInfo" },
+                               { "Type": "RelInfoVertexIsolationBDT", "Location":"VtxIsoInfoBDT" },
+                               { "Type" : "RelInfoBs2MuMuBIsolations",
+                                 "Variables" : [],
+                                 "Location"  : "BsMuMuBIsolation",
+                                 "tracktype" : 3,
+                                 "makeTrackCuts" : False, },
+                               ] # closes CommonRelInfoTools
+    } # closes CONFIG
+    } # closes default_config
+
+class B23MuLinesConf(LineBuilder) :
+    """
+    Builder
+    
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name = "B23Mu", config = default_config) :
+
+        LineBuilder.__init__(self, name, config)
+
+#############################################################################
+
+        self.TrackCuts = """
+                         ( MIPCHI2DV(PRIMARY) > %(MinTrIPChi2)s )
+                         & ( TRCHI2DOF < %(MaxTrChi2Dof)s )
+                         & ( TRGHP < %(MaxTrGhp)s )
+                         """ %config
+
+        self.Combination12Cuts = "(ADOCA(1,2) < %(MaxDoca)s*mm)" %config
+
+        self.CombinationCutsLoose = """
+                                    (ADAMASS('B+') < %(mDiffBuLoose)s*MeV)
+                                    & (ADOCA(1,3) < %(MaxDoca)s*mm)
+                                    & (ADOCA(2,3) < %(MaxDoca)s*mm)
+                                    """ %config
+        
+        self.CombinationCutsTight = """
+                                    (ADAMASS('B+') < %(mDiffBuTight)s*MeV)
+                                    & (ADOCA(1,3) < %(MaxDoca)s*mm)
+                                    & (ADOCA(2,3) < %(MaxDoca)s*mm)
+                                    """ %config
+        
+        self.MotherCuts = """
+                          (BPVIPCHI2() < %(MaxIPChi2)s )
+                          & (BPVVDCHI2 > %(MinVDChi2)s )
+                          & (VFASPF(VCHI2/VDOF) < %(MaxVtxChi2Dof)s )
+                          & (BPVDIRA > %(MinDira)s )
+                          & (BPVLTIME() > %(MinTau)s*ps )
+                          """ %config
+
+#############################################################################
+        
+        B23Mu_name  = name+"B23Mu"
+        B2Muee_name = name+"B2Muee"
+        B23Pi_name  = name+"B23Pi"
+
+        self.selB23Mu  = self.makeB23Mu(B23Mu_name)
+        self.selB2Muee = self.makeB2Muee(B2Muee_name)
+        self.selB23Pi  = self.makeB23Pi(B23Pi_name)
+        
+#############################################################################
+
+        self.B23Mu_Line = StrippingLine(B23Mu_name+"Line",
+                                        prescale = config["B23MuPrescale"],
+                                        postscale = config["Postscale"],
+                                        MDSTFlag = config["MDSTflag"],
+                                        selection = self.selB23Mu,
+                                        RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^mu+  mu+  l]CC"  : "ConeIso05mu1",
+                                             "[B+ ->  mu+ ^mu+  l]CC"  : "ConeIso05mu2",
+                                             "[B+ ->  mu+  mu+ ^l]CC"  : "ConeIso05mu3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^mu+  mu+  l]CC"  : "ConeIso10mu1",
+                                             "[B+ ->  mu+ ^mu+  l]CC"  : "ConeIso10mu2",
+                                             "[B+ ->  mu+  mu+ ^l]CC"  : "ConeIso10mu3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^mu+  mu+  l]CC"  : "ConeIso15mu1",
+                                             "[B+ ->  mu+ ^mu+  l]CC"  : "ConeIso15mu2",
+                                             "[B+ ->  mu+  mu+ ^l]CC"  : "ConeIso15mu3",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^mu+  mu+  l]CC"  : "TrackIsoBDTmu1",
+                                             "[B+ ->  mu+ ^mu+  l]CC"  : "TrackIsoBDTmu2",
+                                             "[B+ ->  mu+  mu+ ^l]CC"  : "TrackIsoBDTmu3",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^mu+  mu+  l]CC"  : "BsMuMuTrackIsomu1",
+                                             "[B+ ->  mu+ ^mu+  l]CC"  : "BsMuMuTrackIsomu2",
+                                             "[B+ ->  mu+  mu+ ^l]CC"  : "BsMuMuTrackIsomu3",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline
+
+        self.B2Muee_Line = StrippingLine(B2Muee_name+"Line",
+                                         prescale = config["B2MueePrescale"],
+                                         postscale = config["Postscale"],
+                                         MDSTFlag = config["MDSTflag"],
+                                         selection = self.selB2Muee,
+                                         RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^l  l  l]CC"  : "ConeIso05mu",
+                                             "[B+ ->  l ^l  l]CC"  : "ConeIso05e1",
+                                             "[B+ ->  l  l ^l]CC"  : "ConeIso05e2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^l  l  l]CC"  : "ConeIso10mu",
+                                             "[B+ ->  l ^l  l]CC"  : "ConeIso10e1",
+                                             "[B+ ->  l  l ^l]CC"  : "ConeIso10e2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^l  l  l]CC"  : "ConeIso15mu",
+                                             "[B+ ->  l ^l  l]CC"  : "ConeIso15e1",
+                                             "[B+ ->  l  l ^l]CC"  : "ConeIso15e2",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^l  l  l]CC"  : "TrackIsoBDTmu",
+                                             "[B+ ->  l ^l  l]CC"  : "TrackIsoBDTe1",
+                                             "[B+ ->  l  l ^l]CC"  : "TrackIsoBDTe2",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^l  l  l]CC"  : "BsMuMuTrackIsomu1",
+                                             "[B+ ->  l ^l  l]CC"  : "BsMuMuTrackIsomu2",
+                                             "[B+ ->  l  l ^l]CC"  : "BsMuMuTrackIsomu3",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                         ) # closes Strippingline
+
+        self.B23Pi_Line = StrippingLine(B23Pi_name+"Line",
+                                        prescale = config["B23PiPrescale"],
+                                        postscale = config["Postscale"],
+                                        MDSTFlag = config["MDSTflag"],
+                                        selection = self.selB23Pi,
+                                        RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^pi+  pi+  pi-]CC"  : "ConeIso05pi1",
+                                             "[B+ ->  pi+ ^pi+  pi-]CC"  : "ConeIso05pi2",
+                                             "[B+ ->  pi+  pi+ ^pi-]CC"  : "ConeIso05pi3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^pi+  pi+  pi-]CC"  : "ConeIso10pi1",
+                                             "[B+ ->  pi+ ^pi+  pi-]CC"  : "ConeIso10pi2",
+                                             "[B+ ->  pi+  pi+ ^pi-]CC"  : "ConeIso10pi3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^pi+  pi+  pi-]CC"  : "ConeIso15pi1",
+                                             "[B+ ->  pi+ ^pi+  pi-]CC"  : "ConeIso15pi2",
+                                             "[B+ ->  pi+  pi+ ^pi-]CC"  : "ConeIso15pi3",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^pi+  pi+  pi-]CC"  : "TrackIsoBDTpi1",
+                                             "[B+ ->  pi+ ^pi+  pi-]CC"  : "TrackIsoBDTpi2",
+                                             "[B+ ->  pi+  pi+ ^pi-]CC"  : "TrackIsoBDTpi3",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^pi+  pi+  pi-]CC"  : "TrackIsoBDTpi1",
+                                             "[B+ ->  pi+ ^pi+  pi-]CC"  : "TrackIsoBDTpi2",
+                                             "[B+ ->  pi+  pi+ ^pi-]CC"  : "TrackIsoBDTpi3",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        ) # closes Strippingline 
+                                                             
+#############################################################################
+
+        self.registerLine(self.B23Mu_Line)
+        self.registerLine(self.B2Muee_Line)
+        self.registerLine(self.B23Pi_Line)
+
+#############################################################################
+
+    def makeB23Mu(self,name):
+    
+        B23Mu = DaVinci__N3BodyDecays("Combine"+name)
+        
+        B23Mu.DecayDescriptors = [ "[B+ -> mu+ mu+ mu-]cc","[B+ -> mu+ mu+ mu+]cc" ]
+        B23Mu.DaughtersCuts = { "mu+" : self.TrackCuts }
+            
+        B23Mu.Combination12Cut = self.Combination12Cuts
+        B23Mu.CombinationCut   = self.CombinationCutsLoose    
+        B23Mu.MotherCut        = self.MotherCuts
+
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    
+        return Selection (name, Algorithm = B23Mu, RequiredSelections = [ _myMuons ])
+
+#############################################################################
+
+    def makeB2Muee(self,name):
+    
+        B2Muee = DaVinci__N3BodyDecays("Combine"+name)
+        B2Muee.DecayDescriptors = [ "[B+ -> mu+ e+ e-]cc","[B+ -> mu- e+ e+]cc","[B+ -> mu+ e+ e+]cc" ]
+        B2Muee.DaughtersCuts = { "mu+" : self.TrackCuts, "e+" : self.TrackCuts }
+        
+        B2Muee.Combination12Cut = self.Combination12Cuts
+        B2Muee.CombinationCut   = self.CombinationCutsLoose     
+        B2Muee.MotherCut        = self.MotherCuts
+
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+        _myElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+        
+        return Selection (name, Algorithm = B2Muee, RequiredSelections = [ _myMuons, _myElectrons ])
+
+#############################################################################
+
+    def makeB23Pi(self,name):
+    
+        B23Pi = DaVinci__N3BodyDecays("Combine"+name)
+        B23Pi.DecayDescriptors = [ "[B+ -> pi+ pi+ pi-]cc" ]
+        B23Pi.DaughtersCuts = { "pi+" : self.TrackCuts }
+        
+        B23Pi.Combination12Cut = self.Combination12Cuts
+        B23Pi.CombinationCut   = self.CombinationCutsTight
+        B23Pi.MotherCut        = self.MotherCuts
+        
+        _myPions = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+    
+        return Selection (name, Algorithm = B23Pi, RequiredSelections = [ _myPions ])
+
+#############################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2DibaryonMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2DibaryonMuMu.py
new file mode 100644
index 000000000..ca43b755c
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2DibaryonMuMu.py
@@ -0,0 +1,446 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__  = 'Vitalii Lisovskyi; based on Bu2LLK lines'
+__date__    = '04/09/2019'
+__version__ = '$Revision: 1 $'
+
+__all__ = ( 'B2DibaryonMuMuConf', 'default_config' )
+
+"""
+Selections for B -> two baryons and dimuon:
+B+ ->  p+ Lambda~0 mu+ mu-
+B+ -> p+ p~- K+ mu+ mu-
+B+ -> p+ p~- pi+ mu+ mu-
+Bs -> Lambda0 Lambda~0 mu+ mu-
+"""
+
+default_config = {
+    'NAME'                       : 'B2DibaryonMuMu',
+    'BUILDERTYPE'                : 'B2DibaryonMuMuConf',
+    'CONFIG'                     :
+        {
+        'BFlightCHI2'            : 36 #100
+        , 'BDIRA'                : 0.999
+        , 'BIPCHI2'              : 25
+        , 'BVertexCHI2'          : 16
+        , 'DiLeptonPT'           : 0
+        , 'DiLeptonFDCHI2'       : 16
+        , 'DiLeptonIPCHI2'       : 0
+        , 'LeptonIPCHI2'         : 9
+        , 'LeptonPT'             : 300
+        , 'KaonIPCHI2'           : 9
+        , 'KaonPT'               : 250
+        , 'UpperMass'            : 5500
+        , 'BMassWindow'          : 1500
+        , 'Trk_Chi2'             : 3
+        , 'Trk_GhostProb'        : 0.3
+        , 'K1_MassWindow_Lo'     : 0
+        , 'K1_MassWindow_Hi'     : 6300
+        , 'K1_VtxChi2'           : 20 #25
+        , 'K1_SumPTHad'          : 800
+        , 'K1_SumIPChi2Had'      : 48.0
+        , 'LamLam_VtxChi2'       : 36
+        , 'V0TAU'               : 0.0005
+        , 'Bu2mmLinePrescale'    : 1
+        },
+    'WGs'     : [ 'RD' ],
+    'STREAMS' : [ 'Leptonic' ]
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class B2DibaryonMuMuConf(LineBuilder) :
+    """
+    Builder for B->2baryons mumu measurements
+    """
+
+    # now just define keys. Default values are fixed later
+    __configuration_keys__ = (
+        'BFlightCHI2'
+        , 'BDIRA'
+        , 'BIPCHI2'
+        , 'BVertexCHI2'
+        , 'DiLeptonPT'
+        , 'DiLeptonFDCHI2'
+        , 'DiLeptonIPCHI2'
+        , 'LeptonIPCHI2'
+        , 'LeptonPT'
+        , 'KaonIPCHI2'
+        , 'KaonPT'
+        , 'UpperMass'
+        , 'BMassWindow'
+        , 'Trk_Chi2'
+        , 'Trk_GhostProb'
+        , 'K1_MassWindow_Lo'
+        , 'K1_MassWindow_Hi'
+        , 'K1_VtxChi2'
+        , 'K1_SumPTHad'
+        , 'K1_SumIPChi2Had'
+        , 'LamLam_VtxChi2'
+        , 'V0TAU'
+        , 'Bu2mmLinePrescale'
+      )
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        self._name = name
+        mmXLine_name   = name
+
+        from StandardParticles import StdLoosePions as Pions
+        from StandardParticles import StdLooseKaons as Kaons
+        from StandardParticles import StdLooseProtons as Protons
+        from StandardParticles import StdVeryLooseLambdaLL as LambdasLL
+        from StandardParticles import StdLooseLambdaDD as LambdasDD
+        from StandardParticles import StdLooseLambdaLD as LambdasLD
+
+        # 1 : Make K, Ks, K*, K1, Phi and Lambdas
+
+        SelKaons  = self._filterHadron( name   = "KaonsFor" + self._name,
+                                        sel    = Kaons,
+                                        params = config )
+
+        SelPions  = self._filterHadron( name   = "PionsFor" + self._name,
+                                        sel    = Pions,
+                                        params = config )
+
+        SelppK = self._makeppK( name   = "ppKFor" + self._name,
+                               kaons  = Kaons,
+                               protons  = Protons,
+                               params = config )
+
+        Selpppi = self._makepppi( name   = "pppiFor" + self._name,
+                               pions  = Pions,
+                               protons  = Protons,
+                               params = config )
+
+        SelpL = self._makepLambda( name   = "pLFor" + self._name,
+                               lambdasLL  = LambdasLL,
+                               lambdasDD  = LambdasDD,
+                               lambdasLD  = LambdasLD,
+                               protons  = Protons,
+                               params = config )
+
+        SelLamLam = self._makeLambdaLambda( name   = "LamLamFor" + self._name,
+                               lambdasLL  = LambdasLL,
+                               lambdasDD  = LambdasDD,
+                               lambdasLD  = LambdasLD,
+                               params = config )
+
+        SelLambdasLL = self._filterLongLivedHadron( name   = "LambdasLLFor" + self._name,
+                                           sel    =  LambdasLL,
+                                           params = config )
+
+        SelLambdasDD = self._filterLongLivedHadron( name   = "LambdasDDFor" + self._name,
+                                           sel    =  LambdasDD,
+                                           params = config )
+
+        SelLambdasLD = self._filterLongLivedHadron( name   = "LambdasLDFor" + self._name,
+                                           sel    =  LambdasLD,
+                                           params = config )
+
+
+        # 2 : Make Dileptons
+
+        from StandardParticles import StdLooseDiMuon as DiMuons
+        MuonID = "(HASMUON)&(ISMUON)"
+        DiMuonID     = "(2 == NINTREE((ABSID==13)&(HASMUON)&(ISMUON)))"
+
+        SelDiMuon = self._filterDiLepton( "SelDiMuonsFor" + self._name,
+                                          dilepton = DiMuons,
+                                          params   = config,
+                                          idcut    = DiMuonID )
+
+        # 4 : Combine Particles
+
+
+        SelB2mmX = self._makeB2LLX(mmXLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelPions, SelKaons, SelLambdasLL , SelLambdasDD , SelLambdasLD, SelppK, Selpppi, SelpL, SelLamLam ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+
+
+        # 5 : Declare Lines
+
+        SPDFilter = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 600 )" ,
+            'Preambulo' : [ "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb" ]
+            }
+
+
+        self.B2mmXLine = StrippingLine(mmXLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = [],
+                                       MDSTFlag          = False )
+
+
+
+        # 6 : Register Lines
+
+
+        self.registerLine( self.B2mmXLine )
+
+
+#####################################################
+    def _filterHadron( self, name, sel, params ):
+        """
+        Filter for all hadronic final states
+        """
+
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+        # need to add the ID here
+        _Code = "(PT > %(KaonPT)s *MeV) & " \
+                "((ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) | " \
+                "(NDAUGHTERS == NINTREE(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))))" % params
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
+#####################################################
+    def _filterLongLivedHadron( self, name, sel, params ):
+        """
+        Filter for all hadronic final states
+        """
+
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+        _Code = "(PT > %(KaonPT)s *MeV) & (BPVLTIME() > %(V0TAU)s * ns)" % params
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
+
+#####################################################
+    def _filterDiLepton( self, name, dilepton, params, idcut = None ) :
+        """
+        Handy interface for dilepton filter
+        """
+
+        _Code = "(ID=='J/psi(1S)') & "\
+                "(PT > %(DiLeptonPT)s *MeV) & "\
+                "(MM < %(UpperMass)s *MeV) & "\
+                "(MINTREE(ABSID<14,PT) > %(LeptonPT)s *MeV) & "\
+                "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(LeptonIPCHI2)s) & "\
+                "(VFASPF(VCHI2/VDOF) < 10) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & "\
+                "(MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s)" % params
+
+        # add additional cut on PID if requested
+        if idcut : _Code += ( " & " + idcut )
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection(name, Algorithm = _Filter, RequiredSelections = [ dilepton ] )
+#####################################################
+    def _makeppK( self, name, kaons, protons, params ) :
+        """
+        Make a K1 -> K+ p+ p~-
+        K1 is just a proxy to get the three-body combination
+        """
+
+        _Decays = "[K_1(1270)+ -> K+ p+ p~-]cc"
+
+         # define all the cuts
+        _K1Comb12Cuts  = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV)" % params
+        _K1CombCuts    = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV) & ((APT1+APT2+APT3) > %(K1_SumPTHad)s*MeV)" % params
+
+        _K1MotherCuts  = "(VFASPF(VCHI2PDOF) < %(K1_VtxChi2)s) & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='K+') | (ABSID=='K-') | (ABSID=='p+') | (ABSID=='p~-')),0.0) > %(K1_SumIPChi2Had)s)" % params
+        _daughtersCutsK = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNk > 0.05) & (HASRICH)" % params
+        _daughtersCutsP = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNp > 0.05) & (P > 5000) & (HASRICH)" % params
+
+        _Combine = DaVinci__N3BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "K+"  : _daughtersCutsK,
+            "p+" : _daughtersCutsP }
+
+        _Combine.Combination12Cut = _K1Comb12Cuts
+        _Combine.CombinationCut   = _K1CombCuts
+        _Combine.MotherCut        = _K1MotherCuts
+
+        # make and store the Selection object
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ kaons, protons ] )
+####################################################
+    def _makepppi( self, name, pions, protons, params ) :
+        """
+        Make an a1 -> pi+ p+ p~-
+        a1 is just a proxy to get the three-body combination
+        """
+
+        _Decays = "[a_1(1260)+ -> pi+ p+ p~-]cc"
+
+         # define all the cuts
+        _K1Comb12Cuts  = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV)" % params
+        _K1CombCuts    = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV) & ((APT1+APT2+APT3) > %(K1_SumPTHad)s*MeV)" % params
+
+        _K1MotherCuts  = "(VFASPF(VCHI2PDOF) < %(K1_VtxChi2)s) & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='K+') | (ABSID=='pi+') | (ABSID=='p+') | (ABSID=='p~-')),0.0) > %(K1_SumIPChi2Had)s)" % params
+        _daughtersCutsPi = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (HASRICH)" % params
+        _daughtersCutsP = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNp > 0.05) & (P > 5000) & (HASRICH)" % params
+
+        _Combine = DaVinci__N3BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "pi+"  : _daughtersCutsPi,
+            "p+" : _daughtersCutsP }
+
+        _Combine.Combination12Cut = _K1Comb12Cuts
+        _Combine.CombinationCut   = _K1CombCuts
+        _Combine.MotherCut        = _K1MotherCuts
+
+        # make and store the Selection object
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+#####################################################
+    def _makepLambda( self, name, lambdasLL, lambdasDD, lambdasLD, protons, params ) :
+        """
+        Make an K* -> p+ Lambda~0
+        K* is just a proxy to get the two-body combination
+        """
+
+        _Decays = "[K*_0(1430)+ -> p+ Lambda~0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2PDOF) < %(K1_VtxChi2)s)" % params
+        _daughtersCutsP = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNp > 0.05) & (P > 5000) & (HASRICH)" % params
+        _daughtersCutsL = "(M > 1105*MeV) & (M<1130*MeV)"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Lambda0"  : _daughtersCutsL,
+            "p+" : _daughtersCutsP }
+
+        #_Combine.CombinationCut   = _CombinationCut
+        #_Combine.MotherCut        = _MotherCut
+
+        #return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+
+        _sel_pLambdaLL = Selection(name+"_LL",
+            RequiredSelections = [ lambdasLL, protons ],
+            Algorithm = _Combine)
+
+        _sel_pLambdaDD = Selection(name+"_DD",
+            RequiredSelections = [ lambdasDD, protons ],
+            Algorithm = _Combine)
+
+        _sel_pLambdaLD = Selection(name+"_LD",
+            RequiredSelections = [ lambdasLD, protons ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_pLambdaLL, _sel_pLambdaDD, _sel_pLambdaLD ])
+
+        return _sel
+
+#####################################################
+    def _makeLambdaLambda( self, name, lambdasLL, lambdasDD, lambdasLD, params ) :
+        """
+        Make an f2 -> Lambda0 Lambda~0
+        f2 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "f_2(2300) -> Lambda0 Lambda~0"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2PDOF) < %(LamLam_VtxChi2)s)" % params
+        _daughtersCutsL = "(M > 1105*MeV) & (M<1130*MeV)"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Lambda0"  : _daughtersCutsL,
+            "Lambda~0"  : _daughtersCutsL, }
+
+        #_Combine.CombinationCut   = _CombinationCut
+        #_Combine.MotherCut        = _MotherCut
+
+        #return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+
+        _sel_LamLamLLLL = Selection(name+"_LLLL",
+            RequiredSelections = [ lambdasLL, lambdasLL ],
+            Algorithm = _Combine)
+
+        _sel_LamLamLLDD = Selection(name+"_LLDD",
+            RequiredSelections = [ lambdasLL, lambdasDD ],
+            Algorithm = _Combine)
+
+        _sel_LamLamDDDD = Selection(name+"_DDDD",
+            RequiredSelections = [ lambdasDD, lambdasDD ],
+            Algorithm = _Combine)
+
+        _sel_LamLamLLLD = Selection(name+"_LLLD",
+            RequiredSelections = [ lambdasLL, lambdasLD ],
+            Algorithm = _Combine)
+
+        _sel_LamLamLDLD = Selection(name+"_LDLD",
+            RequiredSelections = [ lambdasLD, lambdasLD ],
+            Algorithm = _Combine)
+
+        _sel_LamLamDDLD = Selection(name+"_DDLD",
+            RequiredSelections = [ lambdasDD, lambdasLD ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_LamLamLLLL, _sel_LamLamLLDD, _sel_LamLamDDDD, _sel_LamLamLLLD, _sel_LamLamLDLD, _sel_LamLamDDLD ])
+
+        return _sel
+
+#####################################################
+    def _makeB2LLX( self, name, dilepton, hadrons, params, masscut = "(ADAMASS('B+')< 1500 *MeV" ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [
+                    "[ B+ -> J/psi(1S) K_1(1270)+ ]cc",
+                    "[ B+ -> J/psi(1S) K*_0(1430)+ ]cc",
+                    "[ B+ -> J/psi(1S) a_1(1260)+ ]cc",
+                    "B_s0 -> J/psi(1S) f_2(2300)",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+#####################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2EtaMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2EtaMuMu.py
new file mode 100644
index 000000000..fbfcc0446
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2EtaMuMu.py
@@ -0,0 +1,278 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+B->etamumuselection
+'''
+
+__author__ = ['Fred Blanc']
+__date__ = '04/09/2019'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('B2EtaMuMu', 'makeLightResList', 'makeDiMuonList',
+           'makeB2EtaMuMuAllX0', 'default_config')
+
+name = 'B2EtaMuMu'
+
+default_config = {
+    'NAME': 'B2EtaMuMu',
+    'WGs': ['RD'],
+    'BUILDERTYPE': 'B2EtaMuMu',
+    'CONFIG': {
+        'B2EMMPrescale': 1.0,
+
+        # Photon cuts
+        'Photon_Res_PT_Min': 400.0,
+        'Photon_CL_Min': 0.2,
+
+        # Pi0 cuts
+        'Pi0_Res_PT_Min':
+        600.,  # Pt cut on a pi0 with is grandaughter of the B
+
+        # Track cuts
+        'EMMTrkGhostProb': 0.5,
+        'EMMTrkMinIPChi2': 9.,
+        'EMMTrkMinPT': 500.,  #500,
+
+        # Resonance cuts
+        'EMMResMinPT': 600.,  #600,
+        'EMMResMaxMass': 1100.,
+        'EMMResVtxChi2DOF': 9.,
+
+        # Muon cuts
+        'MuonPID': -3.0,
+
+        # Dimuon cuts
+        'EMMDimuon_MaxMass': 6100.,
+
+        # B cuts
+        'EMMBMinPT': 2500,  #2500.,
+        'EMMBMinMass': 4900.,
+        'EMMBMaxMass': 6000.,
+        'EMMBDIRA': 0.995,
+        'EMMBVtxChi2DOF': 9.
+    },
+    'STREAMS': ['Bhadron']  ## This stream puts it into mDST
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, SimpleSelection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdNoPIDsPions, StdLooseAllPhotons, StdLooseMergedPi0, StdLooseResolvedPi0
+from StandardParticles import StdAllNoPIDsMuons, StdAllLooseMuons
+
+
+class B2EtaMuMu(LineBuilder):
+    """
+    Builder for B2EtaMuMu
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        self.name = name
+        LineBuilder.__init__(self, name, config)
+
+        cuts = default_config['CONFIG']
+
+        ## Single particle cuts definition
+        trackCuts = "(MIPCHI2DV(PRIMARY) > %(EMMTrkMinIPChi2)s) & (TRGHOSTPROB < %(EMMTrkGhostProb)s) & (PT > %(EMMTrkMinPT)s)" % cuts
+        gamma_for_Res_Cuts = "(PT > %(Photon_Res_PT_Min)s*MeV) & (CL > %(Photon_CL_Min)s)" % cuts
+        pi0_for_Res_Cuts = "(PT > %(Pi0_Res_PT_Min)s*MeV)" % cuts
+        muonCuts = trackCuts + " & (PIDmu> %(MuonPID)s)" % cuts
+
+        self.TrackList = SimpleSelection(
+            'TrackList' + self.name,
+            FilterDesktop, [StdNoPIDsPions],
+            Code=trackCuts)
+
+        self.Gamma_for_Res_List = SimpleSelection(
+            'Gamma_for_Res_List' + self.name,
+            FilterDesktop, [StdLooseAllPhotons],
+            Code=gamma_for_Res_Cuts)
+
+        self.Pi0_for_Res_List = SimpleSelection(
+            'Pi0_for_Res_List' + self.name,
+            FilterDesktop, [StdLooseResolvedPi0, StdLooseMergedPi0],
+            Code=pi0_for_Res_Cuts)
+
+        self.LightResList = makeLightResList(
+            name="DiTracksForB2EtaMuMu" + self.name,
+            trkList=self.TrackList,
+            gammaList=self.Gamma_for_Res_List,
+            pi0List=self.Pi0_for_Res_List,
+            MinPTCut=config['EMMResMinPT'],
+            MaxMassCut=config['EMMResMaxMass'],
+            VtxChi2DOFCut=config['EMMResVtxChi2DOF'])
+
+        self.MuonList = SimpleSelection(
+            'Muon_for_DiMuon_List' + self.name,
+            FilterDesktop,
+            [StdAllNoPIDsMuons],
+            #[StdAllLooseMuons],
+            Code=muonCuts)
+
+        self.DiMuonList = makeDiMuonList(
+            name="DiMuonForB2EtaMuMu" + self.name,
+            muList=self.MuonList,
+            MinPTCut=config['EMMResMinPT'],
+            MaxMassCut=config['EMMDimuon_MaxMass'],
+            VtxChi2DOFCut=config['EMMResVtxChi2DOF'])
+
+        self.B2EtaMuMuAllX0 = makeB2EtaMuMuAllX0(
+            self.name + "AllX0Selection",
+            diTrkList=self.LightResList,
+            diMuList=self.DiMuonList,
+            MinPTCut=config['EMMBMinPT'],
+            MinMassCut=config['EMMBMinMass'],
+            MaxMassCut=config['EMMBMaxMass'],
+            DIRACut=config['EMMBDIRA'],
+            VtxChi2DOFCut=config['EMMBVtxChi2DOF'])
+
+        self.B2EtaMuMuAllX0Line = StrippingLine(
+            self.name + "AllX0SelectionLine",
+            prescale=config['B2EMMPrescale'],
+            selection=tisTosSelection(self.B2EtaMuMuAllX0),
+            RelatedInfoTools=getRelInfoB2EtaMuMu())
+
+        self.registerLine(self.B2EtaMuMuAllX0Line)
+
+
+def makeLightResList(name, trkList, gammaList, pi0List, MinPTCut, MaxMassCut,
+                     VtxChi2DOFCut):
+    """
+    Di-track or di-track + neutral selection
+    """
+    _diTrackPreVertexCuts = "(APT> %(MinPTCut)s) & (AM< %(MaxMassCut)s)" % locals(
+    )
+    _diTrackPostVertexCuts = "(VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s)" % locals(
+    )
+
+    PiPi = SimpleSelection(
+        name + "_2body",
+        CombineParticles, [trkList],
+        DecayDescriptors=["rho(770)0 -> pi+ pi-"],
+        CombinationCut=_diTrackPreVertexCuts,
+        MotherCut=_diTrackPostVertexCuts)
+
+    PiPiGamma = SimpleSelection(
+        name + "_gamma",
+        CombineParticles, [trkList, gammaList],
+        DecayDescriptors=["rho(770)0 -> pi+ pi- gamma"],
+        CombinationCut=_diTrackPreVertexCuts,
+        MotherCut=_diTrackPostVertexCuts)
+
+    PiPiPi0 = SimpleSelection(
+        name + "_pi0",
+        CombineParticles, [trkList, pi0List],
+        DecayDescriptors=["rho(770)0 -> pi+ pi- pi0"],
+        CombinationCut=_diTrackPreVertexCuts,
+        MotherCut=_diTrackPostVertexCuts)
+
+    return MergedSelection(
+        "Merge" + name, RequiredSelections=[PiPi, PiPiGamma, PiPiPi0])
+
+
+def makeDiMuonList(name, muList, MinPTCut, MaxMassCut, VtxChi2DOFCut):
+
+    _DiMuonPreVertexCuts = "(APT> %(MinPTCut)s) & (AM< %(MaxMassCut)s)" % locals(
+    )
+    _DiMuonPostVertexCuts = "(VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s)" % locals(
+    )
+
+    return SimpleSelection(
+        name,
+        CombineParticles, [muList],
+        DecayDescriptors=["J/psi(1S) -> mu+ mu-"],
+        MotherCut=_DiMuonPostVertexCuts,
+        CombinationCut=_DiMuonPreVertexCuts)
+
+
+def makeB2EtaMuMuAllX0(name, diTrkList, diMuList, MinPTCut, MinMassCut,
+                       MaxMassCut, DIRACut, VtxChi2DOFCut):
+    """
+    B to eta(')mumu selection
+    """
+
+    _B2EtaMuMuPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" % locals(
+    )
+    _B2EtaMuMuPreVertexCuts += " & ( APT > %(MinPTCut)s )" % locals()
+
+    _B2EtaMuMuPostVertexCuts = "(VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s) & (BPVDIRA > %(DIRACut)s)" % locals(
+    )
+
+    return SimpleSelection(
+        name,
+        CombineParticles, [diTrkList, diMuList],
+        DecayDescriptor="B0 -> rho(770)0 J/psi(1S)",
+        MotherCut=_B2EtaMuMuPostVertexCuts,
+        CombinationCut=_B2EtaMuMuPreVertexCuts)
+
+
+def getRelInfoB2EtaMuMu():
+    relInfo = []
+    for coneAngle in [0.8, 1.0, 1.3, 1.7]:
+        conestr = str(coneAngle).replace('.', '')
+        relInfo += [{
+            "Type":
+            "RelInfoConeVariables",
+            "IgnoreUnmatchedDescriptors":
+            True,
+            "ConeAngle":
+            coneAngle,
+            "Variables": [
+                'CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM',
+                'CONEDELTAETA'
+            ],
+            "DaughterLocations": {
+                "^[B0 -> (rho(770)0 -> pi+ pi- {X0}) (J/psi(1S) -> mu- mu+) ]CC":
+                'P2ConeVar%s_B' % conestr,
+                "[B0 -> ^(rho(770)0 -> pi+ pi- {X0}) (J/psi(1S) -> mu- mu+) ]CC":
+                'P2ConeVar%s_X1' % conestr,
+                "[B0 -> (rho(770)0 -> pi+ pi- {X0}) ^(J/psi(1S) -> mu- mu+) ]CC":
+                'P2ConeVar%s_X2' % conestr,
+                "[B0 -> (rho(770)0 -> ^pi+ pi- {X0}) (J/psi(1S) -> mu- mu+) ]CC":
+                'P2ConeVar%s_X11' % conestr,
+                "[B0 -> (rho(770)0 -> pi+ ^pi- {X0}) (J/psi(1S) -> mu- mu+) ]CC":
+                'P2ConeVar%s_X12' % conestr,
+                "[B0 -> (rho(770)0 -> pi+ pi- {X0}) (J/psi(1S) -> ^mu- mu+) ]CC":
+                'P2ConeVar%s_X21' % conestr,
+                "[B0 -> (rho(770)0 -> pi+ pi- {X0}) (J/psi(1S) -> mu- ^mu+) ]CC":
+                'P2ConeVar%s_X22' % conestr
+            }
+        }]
+    relInfo += [{
+        "Type": "RelInfoVertexIsolation",
+        "Location": "VertexIsoInfo"
+    }]
+    return relInfo
+
+
+def makeTISTOSFilter(name):
+    specs = {'Hlt1(Two)?Track.*Decision%TOS': 0}
+    from Configurables import TisTosParticleTagger
+    tisTosFilter = TisTosParticleTagger(name + 'TISTOSFilter')
+    tisTosFilter.TisTosSpecs = specs
+    tisTosFilter.ProjectTracksToCalo = False
+    tisTosFilter.CaloClustForCharged = False
+    tisTosFilter.CaloClustForNeutral = False
+    tisTosFilter.TOSFrac = {4: 0.0, 5: 0.0}
+    return tisTosFilter
+
+
+def tisTosSelection(sel):
+    '''Filters Selection sel to be TOS OR TIS.'''
+    tisTosFilter = makeTISTOSFilter(sel.name())
+    return Selection(
+        sel.name() + 'TISTOS',
+        Algorithm=tisTosFilter,
+        RequiredSelections=[sel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KLLXInclusive.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KLLXInclusive.py
new file mode 100644
index 000000000..b66be6b50
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KLLXInclusive.py
@@ -0,0 +1,355 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = 'P. Owen'
+__date__ = '21/11/2016'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ( 'B2KLLXInclusiveConf' ,'default_config')
+
+"""
+Stripping selection for inclusively selected B->KmumuX decays.
+"""
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import  CombineParticles, FilterDesktop
+
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from LHCbKernel.Configuration import *  #check if needed
+from Configurables import SubstitutePID
+from Configurables import SubPIDMMFilter
+
+
+#################
+#
+#  Define Cuts here
+#
+#################
+
+
+default_config = {
+    'NAME'       : 'B2KLLXInclusive',
+    'BUILDERTYPE' : 'B2KLLXInclusiveConf',
+    'CONFIG'     :
+    {
+    # Incl (dimu) cuts
+    'IPCHI2'     :   9.0,
+    'FlightChi2'     :   100.0,
+    'DIRA'           :   0.995,
+    'VertexCHI2'     :     6.0,
+    'LOWERMASS'       :  0.040, # MeV
+    'UPPERMASS'       :  5000.0, # MeV
+    'CORRM_MIN'       :  3000.0, # MeV
+    'CORRM_MAX'       : 15000.0, # MeV
+    # Track cuts
+    'Track_CHI2nDOF'      :    3.0,
+    'Track_GhostProb'     :    0.5,  
+
+    # Muon cuts
+    'Muon_MinIPCHI2'   :    16.0,
+    'Muon_PIDmu'       :    0.0,
+    'Muon_PIDmuK'       :   0.0,
+    'Muon_PT'          :    500,
+
+    # Muon cuts
+    'Electron_MinIPCHI2'   :    16.0,
+    'Electron_PIDe'       :    1.0,
+    'Electron_PIDeK'       :    1.0,
+    'Electron_PT'          :    500,
+    # Muon cuts
+    'Kaon_MinIPCHI2'   :    9.0,
+    'Kaon_ProbNNK'       :    0.2,
+    'Kaon_ProbNNKpi'       :    0.1,
+    'Kaon_PT'          :    500,
+    # Wrong sign combinations
+    'WS'            :   False,
+
+    # GEC
+    'SpdMult'             :  450,
+    'HLT_FILTER'             :  "HLT_PASS_RE('Hlt2DiMuonDetachedDecision')|HLT_PASS_RE('Hlt2DiMuonDetachedHeavyDecision')|HLT_PASS_RE('Hlt2SingleMuonDecision')",
+     },
+     'WGs'      : ['RD'],
+     'STREAMS'  : ['Leptonic']
+   }
+
+
+#################
+#
+#  Make line here
+#
+#################
+
+defaultName = "B2KLLXInclusive"
+
+
+class B2KLLXInclusiveConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config) :
+
+
+        LineBuilder.__init__(self, name, config)
+
+        self.name = name
+        
+
+        self.InclDiMuCombCut = "(AM > %(LOWERMASS)s *MeV) & " \
+                                     "(AM < %(UPPERMASS)s *MeV)" %config
+        self.InclDiMuCut = "(M > %(LOWERMASS)s) & " \
+                           "(M < %(UPPERMASS)s)" %config
+        self.InclDiMuCutNoPID = self.InclDiMuCut+ "& (INTREE((ABSID == 'mu+')&(switch(ISMUON,1,0) > 0)&(PIDmu > %(Muon_PIDmu)s)))" %config#&(PIDmu-PIDK > %(Muon_PIDmuK)s))" %config
+
+        self.InclKLLCut = "(BPVCORRM > %(CORRM_MIN)s *MeV) & " \
+                           "(BPVCORRM < %(CORRM_MAX)s *MeV) &" \
+                           "(BPVDIRA > %(DIRA)s) & " \
+                           "(BPVVDCHI2 > %(FlightChi2)s) & " \
+                           "(VFASPF(VCHI2/VDOF) < %(VertexCHI2)s)" %config
+
+        self.TrackCuts = "(TRCHI2DOF < %(Track_CHI2nDOF)s) & (TRGHP < %(Track_GhostProb)s)" %config
+        #self.TrackCuts = "(TRCHI2DOF < %(Track_CHI2nDOF)s)" %config
+        
+        self.MuonCut = self.TrackCuts + " & (MIPCHI2DV(PRIMARY) > %(Muon_MinIPCHI2)s) & " \
+                                             " (PIDmu> %(Muon_PIDmu)s) & " \
+                                             " (PIDmu-PIDK> %(Muon_PIDmuK)s) & "\
+                                             " (PT > %(Muon_PT)s)" %config
+        self.MuonCutNoPID = self.TrackCuts + " & (MIPCHI2DV(PRIMARY) > %(Muon_MinIPCHI2)s) & " \
+                                             " (PT > %(Muon_PT)s)" %config
+        self.ElectronCut = "(PT > %(Electron_PT)s *MeV) & "\
+                           "(PIDe > %(Electron_PIDe)s ) & "\
+                           "(PIDe-PIDK > %(Electron_PIDeK)s ) & "\
+                           "(MIPCHI2DV(PRIMARY) > %(Electron_MinIPCHI2)s)" % config
+        self.ElectronCutNoPID = "(PT > %(Electron_PT)s *MeV) & "\
+                           "(MIPCHI2DV(PRIMARY) > %(Electron_MinIPCHI2)s)" % config
+        self.DiElectronCut = "(ID=='J/psi(1S)') & "\
+                           "(MINTREE(ABSID<14,PT) > %(Electron_PT)s *MeV) & "\
+                           "(MINTREE(ABSID<14,PIDe) > %(Electron_PIDe)s) & "\
+                           "(MINTREE(ABSID<14,PIDe-PIDK) > %(Electron_PIDeK)s) & "\
+                           "(MIPCHI2DV(PRIMARY) > %(Electron_MinIPCHI2)s)" % config
+        self.DiElectronCutNoPID = "(ID=='J/psi(1S)') & "\
+                           "(MINTREE(ABSID<14,PT) > %(Electron_PT)s *MeV) & "\
+                           "(MIPCHI2DV(PRIMARY) > %(Electron_MinIPCHI2)s)" % config
+        self.KaonCut = self.TrackCuts + " & (MIPCHI2DV(PRIMARY) > %(Kaon_MinIPCHI2)s) & " \
+                                             " (PPINFO(PROBNNK) > %(Kaon_ProbNNK)s) & " \
+                                             " (PPINFO(PROBNNK)-PPINFO(PROBNNpi) > %(Kaon_ProbNNKpi)s) & "\
+                                             " (PT > %(Kaon_PT)s)" %config
+        self.KaonCutNoPID = self.TrackCuts + " & (MIPCHI2DV(PRIMARY) > %(Kaon_MinIPCHI2)s) & " \
+                                             " (PT > %(Kaon_PT)s)" %config
+
+        #self.KstarFilterCut  = self.KstarCut + " & (INTREE(ABSID=='K+') & " + self.KaonCut + ") & (INTREE(ABSID=='pi+') & " + self.PionCut + ")"
+
+        self.Electrons = self.__Electrons__(config)
+        self.ElectronsNoPID = self.__Electrons__(config,NoPID=True)
+        self.Muons = self.__Muons__(config)
+        self.MuonsNoPID = self.__Muons__(config,NoPID=True)
+        self.Kaons = self.__Kaons__(config)
+        self.KaonsNoPID = self.__Kaons__(config,NoPID=True)
+        self.InclDimu = self.__InclDimu__(config,doWS=False)
+        self.InclDimuNoPID = self.__InclDimu__(config,NoPID=True,doWS=False)
+        self.InclDielectron = self.__InclDielectron__(config,doWS=False)
+        self.InclDielectronNoPID = self.__InclDielectron__(config,NoPID=True,doWS=False)
+        self.InclLeptons = self.__DiLeptons__(config)
+        self.InclLeptonsNoPID = self.__DiLeptons__(config,NoPID=True)
+        self.InclKLL = self.__InclKLL__(config)
+        self.InclKLLNoLeptonPID = self.__InclKLL__(config,NoMuonPID=True)
+        self.InclKLLNoHadronPID = self.__InclKLL__(config,NoHadronPID=True)
+
+        
+
+
+        # inclusive dimuon line
+        self.inclusive_KMuMu_line =  StrippingLine(
+            self.name+"_InclKLLLine",
+            prescale = 1,
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+           # HLT=config["HLT_FILTER"],
+            algos=[self.InclKLL]
+            )
+
+        self.registerLine( self.inclusive_KMuMu_line )
+
+        self.inclusive_KMuMuNoLeptonPID_line =  StrippingLine(
+            self.name+"_InclKLLLine_NoLeptonPID",
+            prescale = 0.02,
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+           # HLT=config["HLT_FILTER"],
+            algos=[self.InclKLLNoLeptonPID]
+            )
+
+        self.inclusive_KMuMuNoHadronPID_line =  StrippingLine(
+            self.name+"_InclKLLLine_NoHadronPID",
+            prescale = 0.05,
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+           # HLT=config["HLT_FILTER"],
+            algos=[self.InclKLLNoHadronPID]
+            )
+        self.registerLine( self.inclusive_KMuMuNoLeptonPID_line )
+        self.registerLine( self.inclusive_KMuMuNoHadronPID_line )
+        # inclusive dimuon line around jpsi and psi2s
+
+    def __Muons__(self, conf,NoPID = False):
+        """
+        Filter muons from StdLooseMuons
+        """ 
+        _code = self.MuonCut
+        _muons = DataOnDemand(Location = 'Phys/StdLooseMuons/Particles')
+        _name = "Selection_"+self.name+"_Muons"
+        if NoPID:
+          _code = self.MuonCutNoPID 
+          _muons = DataOnDemand(Location = 'Phys/StdNoPIDsMuons/Particles')
+          _name+="NoPID"
+        _filter = FilterDesktop(Code = _code)
+        _sel = Selection(_name,
+                         RequiredSelections = [ _muons ] ,
+                         Algorithm = _filter)
+        return _sel
+
+    def __Electrons__(self, conf,NoPID = False):
+        """
+        Filter electrons from StdLooseElectrons
+        """  
+        _code = self.ElectronCut
+        _electrons = DataOnDemand(Location = 'Phys/StdLooseElectrons/Particles')
+        _name = "Selection_"+self.name+"_Electrons"
+        if NoPID:
+          _code = self.ElectronCutNoPID 
+          _electrons = DataOnDemand(Location = 'Phys/StdNoPIDsElectrons/Particles')
+          _name+="NoPID"
+        _filter = FilterDesktop(Code = _code)
+        _sel = Selection(_name,
+                         RequiredSelections = [ _electrons ] ,
+                         Algorithm = _filter)
+        return _sel
+
+    def __DiLeptons__(self, conf,NoPID = False):
+        """
+        Merge electrons and muons
+        """ 
+        electrons = self.InclDielectron
+        muons = self.InclDimu
+        _name = "Selection_"+self.name+"_Leptons"
+        if NoPID:
+          electrons = self.InclDielectronNoPID 
+          muons = self.InclDimuNoPID 
+          _name+="NoPID"
+        _sel = MergedSelection(_name,
+                         RequiredSelections = [ muons,electrons ])
+        return _sel
+ 
+
+    def __Kaons__(self, conf,NoPID = False):
+        """
+        Filter kaons from StdLooseMuons
+        """
+        _code = self.KaonCut
+        _name = "Selection_"+self.name+"_Kaons"
+        if NoPID: 
+          _code = self.KaonCutNoPID
+          _name = "Selection_"+self.name+"_KaonsNoPID"
+
+        _kaons = DataOnDemand(Location = 'Phys/StdNoPIDsKaons/Particles')
+        _filter = FilterDesktop(Code = _code)
+        _sel = Selection(_name,
+                         RequiredSelections = [ _kaons ] ,
+                         Algorithm = _filter)
+        return _sel
+        
+    def __InclDielectron__(self, conf,NoPID=False, doWS=False):
+        '''
+        Create a new dimuon for high q2 inclusive B->Xmumu
+        '''
+        from StandardParticles import StdDiElectronFromTracks as DiElectrons
+        #from StandardParticles import StdLooseDiElectron as DiElectrons
+        
+        _name = "Sel_"+self.name+"_electronfilter"
+        _Code = self.DiElectronCut
+        if NoPID:
+          _Code = self.DiElectronCutNoPID
+          _name+="NoPID"
+        _Filter = FilterDesktop( Code = _Code )
+        from PhysSelPython.Wrappers import Selection
+        SelDiElectron = Selection(_name, Algorithm = _Filter,
+                              RequiredSelections = [ DiElectrons ] )
+        return SelDiElectron
+
+
+    def __InclDimu__(self, conf,NoPID = False, doWS=False):
+        '''
+        Create a new dimuon for high q2 inclusive B->Xmumu
+        '''
+        
+        from  GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        CombineDiMuon = CombineParticles()
+        CombineDiMuon.DecayDescriptors = ["J/psi(1S) -> mu- mu+","[J/psi(1S) -> mu- e+]cc"]
+        CombineDiMuon.MotherCut     = self.InclDiMuCut
+        if NoPID:
+          CombineDiMuon.MotherCut = self.InclDiMuCutNoPID 
+        # choose
+        if doWS == True:
+            CombineDiMuon.DecayDescriptors = ["J/psi(1S) -> mu- mu+", "J/psi(1S) -> mu- mu-", "J/psi(1S) -> mu+ mu+","J/psi(1S) -> e+ e-","J/psi(1S) -> e+ e+","J/psi(1S) -> e- e-"]
+        muons = self.Muons
+        electrons = self.Electrons
+        _name = "Sel_"+self.name+"DiMu"
+        if NoPID:
+          muons = self.MuonsNoPID
+          electrons = self.ElectronsNoPID
+          _name+="_NoPID"
+
+        _sel = MergedSelection(_name+"_Merged",
+                         RequiredSelections = [ muons,electrons ])
+        from PhysSelPython.Wrappers import Selection
+        SelDiMuon = Selection(_name, Algorithm = CombineDiMuon,
+                              RequiredSelections = [_sel ] )
+        return SelDiMuon
+   
+
+
+    def __InclKLL__(self, conf,NoMuonPID = False,NoHadronPID=False):
+        '''
+        Create a new dimuon for high q2 inclusive B->Xmumu
+        '''
+        from  GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        CombineDiMuon = CombineParticles()
+        CombineDiMuon.DecayDescriptors = ["[B+ -> J/psi(1S) K+]cc"]
+        sel_name="InclKLL"
+        CombineDiMuon.MotherCut     = self.InclKLLCut
+        # choose
+        leptons = self.InclLeptons
+        kaons = self.Kaons
+        _name = "Sel_"+self.name+"KMuMu"
+        if NoMuonPID:
+          leptons = self.InclLeptonsNoPID
+          _name+="_NoLeptonPID"
+        if NoHadronPID:
+          kaons = self.KaonsNoPID
+          _name+="_NoHadronPID"
+        from PhysSelPython.Wrappers import Selection
+        SelDiMuon = Selection(_name, Algorithm = CombineDiMuon,
+                              RequiredSelections = [ leptons,kaons ] )
+        return SelDiMuon
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KSKSMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KSKSMuMu.py
new file mode 100644
index 000000000..ba6a16932
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KSKSMuMu.py
@@ -0,0 +1,254 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__  = 'Vitalii Lisovskyi'
+__date__    = '18/06/2021'
+__version__ = '$Revision: 1 $'
+
+__all__ = ( 'B2KSKSMuMuConf', 'default_config' )
+
+"""
+Selections for B -> KS KS mu mu
+"""
+
+default_config = {
+    'NAME'                       : 'B2KSKSMuMu',
+    'BUILDERTYPE'                : 'B2KSKSMuMuConf',
+    'CONFIG'                     :
+        {
+        'BFlightCHI2'            : 36 #100
+        , 'BDIRA'                : 0.999
+        , 'BIPCHI2'              : 25
+        , 'BVertexCHI2'          : 16
+        , 'DiLeptonPT'           : 0
+        , 'DiLeptonFDCHI2'       : 16
+        , 'DiLeptonIPCHI2'       : 0
+        , 'LeptonIPCHI2'         : 9
+        , 'LeptonPT'             : 300
+        , 'KSMassWindow'         : 30
+        , 'KSDIRA'               : 0.9
+        , 'UpperMass'            : 5500
+        , 'BMassWindow'          : 1500
+        , 'K1_MassWindow_Lo'     : 0
+        , 'K1_MassWindow_Hi'     : 6100
+        , 'K1_VtxChi2'           : 20 #25
+        , 'KsKs_VtxChi2'       : 36
+        , 'V0TAU'               : 0.0005
+        , 'Bu2mmLinePrescale'    : 1
+        },
+    'WGs'     : [ 'RD' ],
+    'STREAMS' : [ 'Dimuon' ]
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+
+class B2KSKSMuMuConf(LineBuilder) :
+    """
+    Builder for B->KSKS mumu and B->KSKSKS mumu
+    """
+
+    # now just define keys. Default values are fixed later
+    __configuration_keys__ = (
+        'BFlightCHI2'
+        , 'BDIRA'
+        , 'BIPCHI2'
+        , 'BVertexCHI2'
+        , 'DiLeptonPT'
+        , 'DiLeptonFDCHI2'
+        , 'DiLeptonIPCHI2'
+        , 'LeptonIPCHI2'
+        , 'LeptonPT'
+        , 'KSMassWindow'
+        , 'KSDIRA'
+        , 'UpperMass'
+        , 'BMassWindow'
+        , 'K1_MassWindow_Lo'
+        , 'K1_MassWindow_Hi'
+        , 'K1_VtxChi2'
+        , 'KsKs_VtxChi2'
+        , 'V0TAU'
+        , 'Bu2mmLinePrescale'
+      )
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        self._name = name
+        mmXLine_name   = name
+
+        from StandardParticles import StdVeryLooseKsLL as KsLL
+        from StandardParticles import StdLooseKsDD as KsDD
+        from StandardParticles import StdLooseKsLD as KsLD
+
+        SelKsKs = self._makeKSKS( name   = "KsKsFor" + self._name,
+                               ksLL  = KsLL,
+                               ksDD  = KsDD,
+                               ksLD  = KsLD,
+                               params = config )
+
+        SelKsKsKs = self._makeKSKSKS( name   = "KsKsKsFor" + self._name,
+                               ksLL  = KsLL,
+                               ksDD  = KsDD,
+                               ksLD  = KsLD,
+                               params = config )
+
+        # Make Dileptons
+
+        from StandardParticles import StdLooseDiMuon as DiMuons
+        MuonID = "(HASMUON)&(ISMUON)"
+        DiMuonID     = "(2 == NINTREE((ABSID==13)&(HASMUON)&(ISMUON)&(PROBNNmu>0.01)))"
+
+        SelDiMuon = self._filterDiLepton( "SelDiMuonsFor" + self._name,
+                                          dilepton = DiMuons,
+                                          params   = config,
+                                          idcut    = DiMuonID )
+
+        # Combine Particles
+
+
+        SelB2mmX = self._makeB2LLX(mmXLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelKsKs, SelKsKsKs ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+        # Declare Lines
+
+        SPDFilter = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 900 )" ,
+            'Preambulo' : [ "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb" ]
+            }
+
+        self.B2mmXLine = StrippingLine(mmXLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = [],
+                                       MDSTFlag          = False )
+
+        # Register Lines
+        self.registerLine( self.B2mmXLine )
+
+
+#####################################################
+    def _filterDiLepton( self, name, dilepton, params, idcut = None ) :
+        """
+        Handy interface for dilepton filter
+        """
+
+        _Code = "(ID=='J/psi(1S)') & "\
+                "(PT > %(DiLeptonPT)s *MeV) & "\
+                "(MM < %(UpperMass)s *MeV) & "\
+                "(MINTREE(ABSID<14,PT) > %(LeptonPT)s *MeV) & "\
+                "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(LeptonIPCHI2)s) & "\
+                "(VFASPF(VCHI2/VDOF) < 10) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & "\
+                "(MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s)" % params
+
+        # add additional cut on PID if requested
+        if idcut : _Code += ( " & " + idcut )
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection(name, Algorithm = _Filter, RequiredSelections = [ dilepton ] )
+
+#####################################################
+    def _makeKSKS( self, name, ksLL, ksDD, ksLD, params ) :
+        """
+        Make an f2 -> KS0 KS0
+        f2 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "f'_2(1525) -> KS0 KS0"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2PDOF) < %(KsKs_VtxChi2)s)" % params
+        _daughtersCutsKS = "(BPVLTIME() > %(V0TAU)s * ns) & (BPVDIRA > %(KSDIRA)s) & (ADMASS('KS0') <  %(KSMassWindow)s *MeV)"% params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "KS0"  : _daughtersCutsKS, }
+
+
+        _sel_KsKsAll = Selection(name+"_All",
+            RequiredSelections = [ ksLL, ksLD, ksDD ],
+            Algorithm = _Combine)
+
+        return _sel_KsKsAll
+
+
+    def _makeKSKSKS( self, name, ksLL, ksDD, ksLD, params ) :
+        """
+        Make an f2 -> KS0 KS0 KS0
+        f2 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "f_2(2300) -> KS0 KS0 KS0"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2PDOF) < %(KsKs_VtxChi2)s)" % params
+        _daughtersCutsKS = "(BPVLTIME() > %(V0TAU)s * ns) & (BPVDIRA > %(KSDIRA)s) & (ADMASS('KS0') <  %(KSMassWindow)s *MeV)"% params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "KS0"  : _daughtersCutsKS, }
+
+
+        _sel_KsKsKsAll = Selection(name+"_All",
+            RequiredSelections = [ ksLL, ksDD, ksLD ],
+            Algorithm = _Combine)
+
+        return _sel_KsKsKsAll
+
+#####################################################
+    def _makeB2LLX( self, name, dilepton, hadrons, params, masscut = "(ADAMASS('B+')< 1500 *MeV" ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [
+                    "B_s0 -> J/psi(1S) f'_2(1525)",
+                    "B_s0 -> J/psi(1S) f_2(2300)",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+#####################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KstTauTau.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KstTauTau.py
new file mode 100644
index 000000000..5752d3ad4
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2KstTauTau.py
@@ -0,0 +1,1321 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = [' G. Mancinelli, J. Serrano, F. Polci, T. Fulghesu']
+__date__ = '15/08/2014'
+__version__ = '$Revision: 0.1 $'
+# Stripping line for B->K*tautau
+
+from GaudiKernel.SystemOfUnits import MeV
+from GaudiKernel.SystemOfUnits import mm
+
+"""
+  B->K*TauTau, B->K*TauMu, B->K*TauE
+  """
+__all__ = (
+  'B2KstTauXConf'
+  ,  'default_config'
+  )
+#XMASS_TAU_LOW: 1.0 * GeV ,
+default_config =  {
+  'NAME'                          : 'B2KstTauTau',
+  'BUILDERTYPE'                   : 'B2KstTauXConf',
+  'WGs'                           : [ 'RD' ],
+  'CONFIG'                        : {
+  'SpdMult'                       : '600',
+  'PT_MU'                         : '1000', # MeV
+  'PT_e'                          : '1000', # MeV
+  'TRACKCHI2_MU'                  : '4',    # dimensionless
+  'TRACKCHI2_e'                   : '4',    # dimensionless
+  'ProbNN_e'                      : '0.05',
+  #
+  'FD_B_Max_KTM'                  : '70',
+  'FD_B_Max_KTT'                  : '40',
+  'PT_B_KTM'                      : 3000 * MeV,
+  'PT_B_KTT'                      : 3000 * MeV,
+  'VCHI2_B'                       : '100', # dimensionless
+  'VCHI2_B_Mu'                    : '150', # dimensionless
+  'VCHI2_B_E'                     : '150', # dimensionless
+  'FDCHI2_B'                      : '80',
+  'FD_B_Mu'                       : '3',
+  'FD_B_E'                        : '3',
+  'MASS_LOW_B'                    : 2000 * MeV,  
+  'MASS_HIGH_B'                   : 10000 * MeV,
+  #
+  'MASS_LOW_Kst'                  : '700', # MeV
+  'MASS_HIGH_Kst'                 : '1100', # MeV
+  'VCHI2_Kst'                     : '15',
+  'PT_Kst'                        : '1000',
+  #
+  'MASS_LOW_D'                    : 1840 * MeV,
+  'MASS_HIGH_D'                   : 1900 * MeV,
+  'MASS_LOW_Ds'                   : 1938 * MeV,
+  'MASS_HIGH_Ds'                  : 1998 * MeV,
+  'MASS_LOW_Dmother'                 : 1800 * MeV,
+  'MASS_HIGH_Dmother'                : 2030 * MeV,
+  'APT_D'                         : 800 * MeV,
+  'AMAXDOCA_D'                    : 0.2 * mm,
+  'MaxPT_D'                       : 800 * MeV,
+  'PT_D'                          : 1000 * MeV,
+  'DIRA_D'                        : '0.99',
+  'VCHI2_D'                       : '16',
+  'FDCHI2_D'                      : '16',
+  'VDRHOmin_D'                    : 0.1 * mm,
+  'VDRHOmax_D'                    : 7.0 * mm,
+  'VDZ_D'                         : 5.0 * mm,
+  #
+  'MINIPCHI2_K_KMM'	          : '4', #'16',
+  'MINIPCHI2_PI_KMM'	          : '4', #'16',
+  'DOCAMAX_KST_KMM'	          : '0.15', #'0.15',	
+  'MINIPCHI2_KST_KMM'	          : '3', #'9',
+  'FDCHI2OWNPV_KST_KMM'	          : '120',
+  'MINIPCHI2_MU_KMM'	          : '4', #'16',
+  'MINIPCHI2_e_KMM'	          : '4', #'16',
+  'B_COSDIRA_KMM'  	          : '0.999',
+  'VCHI2_B_Mu_KMM'                : '100', # dimensionless
+  'VCHI2_B_e_KMM'                : '100', # dimensionless
+  'FD_B_Mu_KMM'                   : '3',
+  'FD_B_e_KMM'                   : '3',
+  'FD_Kst_Mu_KMM'                 : '3',
+  'FD_Kst_e_KMM'                 : '3',
+  'MASS_LOW_B_KMM'                : 1500 * MeV,  
+  'MASS_HIGH_B_KMM'               : 10000 * MeV,  
+  'PT_B_KMM'                      : 2000 * MeV,
+  'PT_MU_KMM'                     : '800', #MeV,
+  'PT_e_KMM'                     : '800', #MeV,
+  #
+  'PT_HAD_ALL_FINAL_STATE'        : '250',  # MeV
+  'P_HAD_ALL_FINAL_STATE'         : '2000', # MeV
+  'IPCHI2_HAD_ALL_FINAL_STATE'    : '16',    # dimensionless
+  'TRACKCHI2_HAD_ALL_FINAL_STATE' : '4',    # dimensionless
+  'TRGHOPROB_HAD_ALL_FINAL_STATE' : '0.4',    # dimensionless
+  #
+  'B2KstTauTau_LinePrescale'               : 1,
+  'B2KstTauTau_LinePostscale'              : 1,
+  'B2KstTauMu_LinePrescale'                : 1,
+  'B2KstTauMu_LinePostscale'               : 1,
+  'B2KstTauE_LinePrescale'                : 1,
+  'B2KstTauE_LinePostscale'               : 1,
+  'B2KstTauTau_SameSign_LinePrescale'      : 1,
+  'B2KstTauTau_SameSign_LinePostscale'     : 1,
+  'B2KstTauMu_SameSign_LinePrescale'       : 0.5,
+  'B2KstTauMu_SameSign_LinePostscale'      : 1,
+  'B2KstTauE_SameSign_LinePrescale'       : 0.5,
+  'B2KstTauE_SameSign_LinePostscale'      : 1,
+  'B2KstMuMu_LinePrescale'                 : 1,
+  'B2KstMuMu_LinePostscale'                : 1,
+  'B2KstMuMu_SameSign_LinePrescale'        : 1,
+  'B2KstMuMu_SameSign_LinePostscale'       : 1,
+  'B2DDSL_LinePrescale'                    : 1,
+  'B2DDSL_LinePostscale'                   : 1,
+  'RelatedInfoTools'      : [
+  #1
+  { "Type" : "RelInfoBKsttautauMuonIsolationBDT"
+    , "Variables" : [
+       'BKSTTAUTAUMUONISOBDTFIRSTVALUETAUP', 'BKSTTAUTAUMUONISOBDTSECONDVALUETAUP','BKSTTAUTAUMUONISOBDTTHIRDVALUETAUP',
+       'BKSTTAUTAUMUONISOBDTFIRSTVALUETAUM', 'BKSTTAUTAUMUONISOBDTSECONDVALUETAUM','BKSTTAUTAUMUONISOBDTTHIRDVALUETAUM']
+    , "Location"  : "B2KstTauTau_MuonIsolationBDT"  
+    },
+  { "Type" : "RelInfoBKsttautauTauIsolationBDT"
+    , "Variables" : [
+     'BKSTTAUTAUTAUISOBDTFIRSTVALUETAUP', 'BKSTTAUTAUTAUISOBDTSECONDVALUETAUP','BKSTTAUTAUTAUISOBDTTHIRDVALUETAUP',
+     'BKSTTAUTAUTAUISOBDTFIRSTVALUETAUM', 'BKSTTAUTAUTAUISOBDTSECONDVALUETAUM','BKSTTAUTAUTAUISOBDTTHIRDVALUETAUM',
+     'BKSTTAUTAUTAUISOBDTFIRSTVALUEKST', 'BKSTTAUTAUTAUISOBDTSECONDVALUEKST','BKSTTAUTAUTAUISOBDTTHIRDVALUEKST']
+    , "Location"  : "B2KstTauTau_TauIsolationBDT"  
+    },
+    
+  { "Type" : "RelInfoBKsttautauTrackIsolationBDT" 
+    , "Variables" : [
+      'BKSTTAUTAUTRKISOBDTFIRSTVALUETAUPPIM','BKSTTAUTAUTRKISOBDTSECONDVALUETAUPPIM','BKSTTAUTAUTRKISOBDTTHIRDVALUETAUPPIM',
+      'BKSTTAUTAUTRKISOBDTFIRSTVALUETAUPPIP1','BKSTTAUTAUTRKISOBDTSECONDVALUETAUPPIP1','BKSTTAUTAUTRKISOBDTTHIRDVALUETAUPPIP1',
+      'BKSTTAUTAUTRKISOBDTFIRSTVALUETAUPPIP2','BKSTTAUTAUTRKISOBDTSECONDVALUETAUPPIP2','BKSTTAUTAUTRKISOBDTTHIRDVALUETAUPPIP2',
+      'BKSTTAUTAUTRKISOBDTFIRSTVALUETAUMPIP','BKSTTAUTAUTRKISOBDTSECONDVALUETAUMPIP','BKSTTAUTAUTRKISOBDTTHIRDVALUETAUMPIP',
+      'BKSTTAUTAUTRKISOBDTFIRSTVALUETAUMPIM1','BKSTTAUTAUTRKISOBDTSECONDVALUETAUMPIM1','BKSTTAUTAUTRKISOBDTTHIRDVALUETAUMPIM1',
+      'BKSTTAUTAUTRKISOBDTFIRSTVALUETAUMPIM2','BKSTTAUTAUTRKISOBDTSECONDVALUETAUMPIM2','BKSTTAUTAUTRKISOBDTTHIRDVALUETAUMPIM2',
+      'BKSTTAUTAUTRKISOBDTFIRSTVALUEKSTK','BKSTTAUTAUTRKISOBDTSECONDVALUEKSTK','BKSTTAUTAUTRKISOBDTTHIRDVALUEKSTK',
+      'BKSTTAUTAUTRKISOBDTFIRSTVALUEKSTPI','BKSTTAUTAUTRKISOBDTSECONDVALUEKSTPI','BKSTTAUTAUTRKISOBDTTHIRDVALUEKSTPI']
+    , "Location"  : "B2KstTauTau_TrackIsolationBDT"  
+    },  
+  { "Type" : "RelInfoBstautauCDFIso" 
+    #    , "Variables" : ['BKSTTAUTAUCDFISO']
+    , "Location"  : "B2KstTauTau_CDFIso"  
+    }
+  
+#  ,{"Type" : "RelInfoConeIsolation"
+#      , "Variables" : [
+#        'CC_ANGLE', 'CC_MULT','CC_PX', 'CC_PY', 'CC_PZ', 'CC_VPT', 'CC_SPT', 'CC_PASYM ', 'CC_PTASYM', 'CC_PXASYM', 'CC_PYASYM', 'CC_PZASYM', 'CC_DELTAETA', 'CC_DELTAPHI', 'CC_IT', 'NC_ANGLE', 'NC_MULT', 'NC_PX', 'NC_PY', 'NC_PZ', 'NC_VPT', 'NC_SPT', 'NC_PASYM', 'NC_PTASYM', 'NC_PXASYM', 'NC_PYASYM', 'NC_PZASYM', 'NC_DELTAETA', 'NC_DELTAPHI', 'NC_IT']
+#    , "Location"  : "ConeIsolation" }
+  
+  ]
+  },
+  'STREAMS'     : ['Bhadron']
+  }
+  
+  
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, OfflineVertexFitter, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdTightMuons
+from StandardParticles import StdTightElectrons
+from StandardParticles import StdLoosePions
+from StandardParticles import StdLooseKaons
+from StandardParticles import StdNoPIDsKaons
+
+
+class B2KstTauXConf(LineBuilder) :
+  
+  """
+    Builder for B->K*TauTau, B->K*TauMu, B->K*TauE
+    """
+
+  TauTau_Line    = None
+  TauTau_SS_Line = None
+  TauMu_Line     = None
+  TauMu_SS_Line  = None
+  TauE_Line     = None
+  TauE_SS_Line  = None
+  DDSL_Line    = None
+  MuMu_Line     = None
+  MuMu_SS_Line  = None
+
+
+  __configuration_keys__ = default_config['CONFIG'].keys()  
+
+  
+  def __init__(self, name, config):
+
+    LineBuilder.__init__(self, name, config)
+    #
+    selKstar        = self._makeKstar(      name    = "Kstar"+name,
+                                      config  = config)
+    selKstar_KMM    = self._makeKstar_KMM(      name    = "Kstar_KMM"+name,
+                                      config  = config)
+    
+    self.FilterSPD = {
+                'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+                'Preambulo' : [
+                "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+                ]
+                }
+    
+    rawTau          = DataOnDemand("Phys/StdTightDetachedTau3pi/Particles")
+
+    selElectrons        = self._makeElectrons(      name    = "ElectronsFor"+name,
+                                                    config  = config)
+
+    selPionsForD        = self._makePionsForD(      name    = "PionsDFor"+name, 
+                                      config  = config)
+    selKaonsForD        = self._makeKaonsForD(      name    = "KaonsDFor"+name, 
+                                      config  = config)
+
+    selD            = self._makeD(name       = "DFor"+name,
+                                  pionSel = selPionsForD,
+                                  kaonSel = selKaonsForD,
+                                  config     = config)
+
+    selMuons        = self._makeMuons(      name    = "MuonsFor"+name,
+                                            config  = config)
+    selMuons_KMM    = self._makeMuons_KMM(      name    = "MuonsKMMFor"+name,
+                                            config  = config)
+    
+    selB2KstTauTau     = self._makeB2XX(   name    = name,
+                                           tauSel  = rawTau,
+                                           KstarSel  = selKstar, 
+                                           config  = config)
+    selB2KstTauTauSS = self._makeB2XXSS( name    = name,
+                                         tauSel  = rawTau,
+                                         KstarSel  = selKstar, 
+                                         config  = config)
+
+    selB2KstTauMu    = self._makeB2XMu(  name    = name,
+                                         tauSel  = rawTau,
+                                         muonSel = selMuons,
+                                         KstarSel  = selKstar, 
+                                         config  = config)
+    
+    selB2KstTauE    = self._makeB2XE(  name    = name,
+                                       tauSel  = rawTau,
+                                       electronSel = selElectrons, 
+                                       KstarSel  = selKstar, 
+                                       config  = config)
+    
+    selB2KstTauMuSS = self._makeB2XMuSS(name    = name,
+                                        tauSel  = rawTau,
+                                        muonSel = selMuons,
+                                        KstarSel  = selKstar, 
+                                        config  = config)
+
+    selB2KstTauESS = self._makeB2XESS(name    = name,
+                                      tauSel  = rawTau,
+                                      electronSel = selElectrons, 
+                                      KstarSel  = selKstar, 
+                                      config  = config)
+
+    selB2KstMuMu    = self._makeB2XMuMu(  name    = name+"twoMuons",
+                                         muonSel_KMM = selMuons_KMM,
+                                         KstarSel_KMM  = selKstar_KMM, 
+                                         config  = config)
+    
+    selB2KstMuMuSS = self._makeB2XMuMuSS(name    = name+"twoMuons_SS",
+                                        muonSel_KMM = selMuons_KMM,
+                                        KstarSel_KMM  = selKstar_KMM, 
+                                        config  = config)
+
+    selB2DDSL    = self._makeB2DXMu(  name    = name,
+                                         DSel  = selD,
+                                         muonSel = selMuons,
+                                         KstarSel  = selKstar, 
+                                         config  = config)
+    
+    self.TauTau_Line    = StrippingLine(name+"_TauTau_Line",
+                                           #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2KstTauTau_LinePrescale'],
+                                        postscale   = config['B2KstTauTau_LinePostscale'],
+                                        MDSTFlag = False,
+                                        FILTER = self.FilterSPD,
+                                        #RelatedInfoTools = config['RelatedInfoTools'],
+                                        RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT" ,  "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso" ,             "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[B0 -> ^K*(892)0  tau+  tau-]CC" : "KstarVars_VertexIsoInfo",
+                                                                    "[B0 ->  K*(892)0 ^tau+  tau-]CC" : "TauVars_VertexIsoInfo_0",
+                                                                    "[B0 ->  K*(892)0  tau+ ^tau-]CC" : "TauVars_VertexIsoInfo_1"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",
+                                                                "ConeSize" : 0.5,
+                                                                "Variables" : [],
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[B0 -> K*(892)0 ^tau+  tau-]CC" : "TauVars_ConeIsoInfo_0",
+                                                                    "[B0 -> K*(892)0  tau+ ^tau-]CC" : "TauVars_ConeIsoInfo_1"
+                                                                }
+                                                  }
+                                                  ],
+                                        selection = selB2KstTauTau,
+                                        MaxCandidates = 50 
+                                        )
+
+    self.TauTau_SS_Line = StrippingLine(name+"_TauTau_SameSign_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2KstTauTau_SameSign_LinePrescale'],
+                                        postscale   = config['B2KstTauTau_SameSign_LinePostscale'],
+                                        MDSTFlag = False,
+                                        FILTER = self.FilterSPD,
+                                        #RelatedInfoTools = config['RelatedInfoTools'],
+                                        RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT",   "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso",              "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+  tau+]CC" : "KstarVars_VertexIsoInfo",
+                                                                    "[Beauty ->  X0 ^tau+  tau+]CC" : "TauVars_VertexIsoInfo_0",
+                                                                    "[Beauty ->  X0  tau+ ^tau+]CC" : "TauVars_VertexIsoInfo_1"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",               
+                                                                "ConeSize" : 0.5,
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> X0 ^tau+  tau+]CC" : "TauVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> X0  tau+ ^tau+]CC" : "TauVars_ConeIsoInfo_1"
+                                                                }
+                                                  }
+                                                  ],
+                                        selection   = selB2KstTauTauSS,
+                                        MaxCandidates = 50 
+                                        )
+
+    self.TauMu_Line     = StrippingLine(name+"_TauMu_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2KstTauMu_LinePrescale'],
+                                        postscale   = config['B2KstTauMu_LinePostscale'],
+                                        MDSTFlag = False,
+                                        FILTER = self.FilterSPD,
+                                        #RelatedInfoTools = config['RelatedInfoTools'],
+                                        RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauMuonIsolationBDT",  "Location" : "B2KstTauTau_MuonIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT",   "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso",              "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ mu-]CC" : "KstarVars_VertexIsoInfo_0",
+                                                                    "[Beauty ->  X0 ^tau+ mu-]CC" : "TauVars_VertexIsoInfo_0"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",               
+                                                                "ConeSize" : 0.5,
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ mu-]CC" : "KstarVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> X0 ^tau+  mu-]CC" : "TauVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> X0  tau+ ^mu-]CC" : "MuVars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) mu-]CC" : "Pi1Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) mu-]CC" : "Pi2Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) mu-]CC" : "Pi3Vars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ mu-]CC" : "KVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ mu-]CC" : "PiVars_ConeIsoInfo_0",
+                                                                },
+                                                  },
+
+                                                    {'Type'             : 'RelInfoVertexIsolationBDT',
+                                                     'Location'         : 'VertexIsoBDTInfo',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ mu-]CC" : "KstarVars_VertexIsoBDTInfo",
+                                                                    "[Beauty -> X0 ^tau+  mu-]CC" : "TauVars_VertexIsoBDTInfo_0",
+                                                    }
+                                                   },
+                                                    {'Type'             : 'RelInfoConeVariables',
+                                                     'ConeAngle'        : 0.5,
+                                                     'Location'         : 'ConeVarsInfo05',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ mu-]CC" : "KstarVars_ConeVarsInfo",
+                                                                    "[Beauty -> X0 ^tau+  mu-]CC" : "TauVars_ConeVarsInfo_0",
+                                                                    "[Beauty -> X0  tau+ ^mu-]CC" : "MuVars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) mu-]CC" : "Pi1Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) mu-]CC" : "Pi2Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) mu-]CC" : "Pi3Vars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC tau+ mu-]CC" : "KVars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ mu-]CC" : "PiVars_ConeVarsInfo_0",
+                                                                }},
+                                                    {'Type'             : 'RelInfoTrackIsolationBDT',
+                                                     'Variables' : 2,
+                                                     'WeightsFile'  :  'BsMuMu_TrackIsolationBDT9vars_v1r4.xml',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  mu-]CC" : "TauVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> X0  tau+ ^mu-]CC" : "MuVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) mu-]CC" : "Pi1Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) mu-]CC" : "Pi2Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) mu-]CC" : "Pi3Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ mu-]CC" : "KVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ mu-]CC" : "PiVars_TrackIsoBDTInfo_0",
+                                                  }},
+                                                    {'Type'             : 'RelInfoBs2MuMuTrackIsolations',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  mu-]CC" : "TauVars_TrackIsoBsMMInfo_0",
+                                                                    "[Beauty -> X0  tau+ ^mu-]CC" : "MuVars_TrackIsoBsMMInfo_0",
+                                                  },
+                                                     'tracktype'        : 3,
+                                                     'angle'            : 0.27,
+                                                     'fc'               : 0.60,
+                                                     'doca_iso'         : 0.13,
+                                                     'ips'              : 3.0,
+                                                     'svdis'            : -0.15,
+                                                     'svdis_h'          : 30.,
+                                                     'pvdis'            : 0.5,
+                                                     'pvdis_h'          : 40.,
+                                                     'makeTrackCuts'    : False,
+                                                     'IsoTwoBody'       : False},
+
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 1.0,
+                                     'Location'          : 'ConeVarsInfo10'
+                                     },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                    'ConeAngle'         : 1.5,
+                                     'Location'          : 'ConeVarsInfo15'
+                                    },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 2.0,
+                                     'Location'          : 'ConeVarsInfo20'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.0,
+                                     'Location'          : 'ConeIsoInfo10'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.5,
+                                     'Location'          : 'ConeIsoInfo15'
+                                            },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 2.0,
+                                     'Location'          : 'ConeIsoInfo20'
+                                    },
+
+                                                  
+                                                  ],
+                                        selection   = selB2KstTauMu,
+                                        MaxCandidates = 30 
+                                        )
+   
+    self.TauMu_SS_Line  = StrippingLine(name+"_TauMu_SameSign_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2KstTauMu_SameSign_LinePrescale'],
+                                        postscale   = config['B2KstTauMu_SameSign_LinePostscale'],
+                                        MDSTFlag = False,
+                                        FILTER = self.FilterSPD,
+                                        #RelatedInfoTools = config['RelatedInfoTools'],
+                                        RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauMuonIsolationBDT",  "Location" : "B2KstTauTau_MuonIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT",   "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso",              "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ mu+]CC" : "KstarVars_VertexIsoInfo",
+                                                                    "[Beauty ->  X0 ^tau+ mu+]CC" : "TauVars_VertexIsoInfo_0"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",               
+                                                                "ConeSize" : 0.5,
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ mu+]CC" : "KstarVars_ConeIsoInfo",
+                                                                    "[Beauty -> X0 ^tau+  mu+]CC" : "TauVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> X0  tau+ ^mu+]CC" : "MuVars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) mu+]CC" : "Pi1Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) mu+]CC" : "Pi2Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) mu+]CC" : "Pi3Vars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ mu+]CC" : "KVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ mu+]CC" : "PiVars_ConeIsoInfo_0",
+                                                                }
+                                                  },
+                                          
+                                                    {'Type'             : 'RelInfoVertexIsolationBDT',
+                                                     'Location'         : 'VertexIsoBDTInfo',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ mu+]CC" : "KstarVars_VertexIsoBDTInfo",
+                                                                    "[Beauty -> X0 ^tau+  mu+]CC" : "TauVars_VertexIsoBDTInfo_0",
+                                                    }
+                                                   },
+                                                   {'Type'             : 'RelInfoConeVariables',
+                                                     'ConeAngle'        : 0.5,
+                                                    'Location'         : 'ConeVarsInfo05',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ mu+]CC" : "KstarVars_ConeVarsInfo",
+                                                                    "[Beauty -> X0 ^tau+  mu+]CC" : "TauVars_ConeVarsInfo_0",
+                                                                    "[Beauty -> X0  tau+ ^mu+]CC" : "MuVars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) mu+]CC" : "Pi1Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) mu+]CC" : "Pi2Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) mu+]CC" : "Pi3Vars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ mu+]CC" : "KVars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ mu+]CC" : "PiVars_ConeVarsInfo_0",
+                                                                }},
+                                                    {'Type'             : 'RelInfoTrackIsolationBDT',
+                                                     'Variables' : 2,
+                                                     'WeightsFile'  :  'BsMuMu_TrackIsolationBDT9vars_v1r4.xml',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  mu+]CC" : "TauVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> X0  tau+ ^mu+]CC" : "MuVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) mu+]CC" : "Pi1Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) mu+]CC" : "Pi2Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) mu+]CC" : "Pi3Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ mu+]CC" : "KVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ mu+]CC" : "PiVars_TrackIsoBDTInfo_0",
+                                                  }},
+                                                   {'Type'             : 'RelInfoBs2MuMuTrackIsolations',
+                                                    'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  mu+]CC" : "TauVars_TrackIsoBsMMInfo_0",
+                                                                    "[Beauty -> X0  tau+ ^mu+]CC" : "MuVars_TrackIsoBsMMInfo_0",
+                                                  },
+                                                     'tracktype'        : 3,
+                                                     'angle'            : 0.27,
+                                                     'fc'               : 0.60,
+                                                     'doca_iso'         : 0.13,
+                                                     'ips'              : 3.0,
+                                                     'svdis'            : -0.15,
+                                                     'svdis_h'          : 30.,
+                                                     'pvdis'            : 0.5,
+                                                     'pvdis_h'          : 40.,
+                                                     'makeTrackCuts'    : False,
+                                                     'IsoTwoBody'       : False},
+                                  {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 1.0,
+                                     'Location'          : 'ConeVarsInfo10'
+                                     },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                    'ConeAngle'         : 1.5,
+                                     'Location'          : 'ConeVarsInfo15'
+                                    },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 2.0,
+                                     'Location'          : 'ConeVarsInfo20'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.0,
+                                     'Location'          : 'ConeIsoInfo10'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.5,
+                                     'Location'          : 'ConeIsoInfo15'
+                                            },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 2.0,
+                                     'Location'          : 'ConeIsoInfo20'
+                                    },
+
+                                                  ],
+                                        selection   = selB2KstTauMuSS,
+                                        MaxCandidates = 30 
+                                        )
+
+
+    self.TauE_Line     = StrippingLine(name+"_TauE_Line",
+                                         #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                         prescale    = config['B2KstTauE_LinePrescale'],
+                                         postscale   = config['B2KstTauE_LinePostscale'],
+                                         MDSTFlag = False,
+                                         FILTER = self.FilterSPD,
+                                         #RelatedInfoTools = config['RelatedInfoTools'],
+                                         RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT",   "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso",              "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ e-]CC" : "KstarVars_VertexIsoInfo_0",
+                                                                    "[Beauty ->  X0 ^tau+ e-]CC" : "TauVars_VertexIsoInfo_0"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",               
+                                                                "ConeSize" : 0.5,
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ e-]CC" : "KstarVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> X0 ^tau+  e-]CC" : "TauVars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e-]CC" : "Pi1Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e-]CC" : "Pi2Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e-]CC" : "Pi3Vars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ e-]CC" : "KVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e-]CC" : "PiVars_ConeIsoInfo_0",
+                                                                },
+                                                  },
+
+                                                    {'Type'             : 'RelInfoVertexIsolationBDT',
+                                                     'Location'         : 'VertexIsoBDTInfo',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ e-]CC" : "KstarVars_VertexIsoBDTInfo",
+                                                                    "[Beauty -> X0 ^tau+  e-]CC" : "TauVars_VertexIsoBDTInfo_0",
+                                                    }
+                                                   },
+                                                    {'Type'             : 'RelInfoConeVariables',
+                                                     'ConeAngle'        : 0.5,
+                                                     'Location'         : 'ConeVarsInfo05',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ e-]CC" : "KstarVars_ConeVarsInfo",
+                                                                    "[Beauty -> X0 ^tau+  e-]CC" : "TauVars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e-]CC" : "Pi1Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e-]CC" : "Pi2Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e-]CC" : "Pi3Vars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC tau+ e-]CC" : "KVars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e-]CC" : "PiVars_ConeVarsInfo_0",
+                                                                }},
+                                                    {'Type'             : 'RelInfoTrackIsolationBDT',
+                                                     'Variables' : 2,
+                                                     'WeightsFile'  :  'BsMuMu_TrackIsolationBDT9vars_v1r4.xml',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  e-]CC" : "TauVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e-]CC" : "Pi1Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e-]CC" : "Pi2Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e-]CC" : "Pi3Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ e-]CC" : "KVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e-]CC" : "PiVars_TrackIsoBDTInfo_0",
+                                                  }},
+                                                    {'Type'             : 'RelInfoBs2MuMuTrackIsolations',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  e-]CC" : "TauVars_TrackIsoBsMMInfo_0",
+                                                  },
+                                                     'tracktype'        : 3,
+                                                     'angle'            : 0.27,
+                                                     'fc'               : 0.60,
+                                                     'doca_iso'         : 0.13,
+                                                     'ips'              : 3.0,
+                                                     'svdis'            : -0.15,
+                                                     'svdis_h'          : 30.,
+                                                     'pvdis'            : 0.5,
+                                                     'pvdis_h'          : 40.,
+                                                     'makeTrackCuts'    : False,
+                                                     'IsoTwoBody'       : False},
+
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 1.0,
+                                     'Location'          : 'ConeVarsInfo10'
+                                     },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                    'ConeAngle'         : 1.5,
+                                     'Location'          : 'ConeVarsInfo15'
+                                    },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 2.0,
+                                     'Location'          : 'ConeVarsInfo20'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.0,
+                                     'Location'          : 'ConeIsoInfo10'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.5,
+                                     'Location'          : 'ConeIsoInfo15'
+                                            },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 2.0,
+                                     'Location'          : 'ConeIsoInfo20'
+                                    },
+
+                                                  
+                                                  ],
+                                         selection   = selB2KstTauE,
+                                         MaxCandidates = 30 
+                                         )
+   
+    self.TauE_SS_Line  = StrippingLine(name+"_TauE_SameSign_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2KstTauE_SameSign_LinePrescale'],
+                                        postscale   = config['B2KstTauE_SameSign_LinePostscale'],
+                                        MDSTFlag = False,
+                                        FILTER = self.FilterSPD,
+                                        #RelatedInfoTools = config['RelatedInfoTools'],
+                                        RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT",   "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso",              "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ e+]CC" : "KstarVars_VertexIsoInfo",
+                                                                    "[Beauty ->  X0 ^tau+ e+]CC" : "TauVars_VertexIsoInfo_0"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",               
+                                                                "ConeSize" : 0.5,
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0  tau+ e+]CC" : "KstarVars_ConeIsoInfo",
+                                                                    "[Beauty -> X0 ^tau+  e+]CC" : "TauVars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e+]CC" : "Pi1Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e+]CC" : "Pi2Vars_ConeIsoInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e+]CC" : "Pi3Vars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ e+]CC" : "KVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e+]CC" : "PiVars_ConeIsoInfo_0",
+                                                                }
+                                                  },
+                                          
+                                                    {'Type'             : 'RelInfoVertexIsolationBDT',
+                                                     'Location'         : 'VertexIsoBDTInfo',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ e+]CC" : "KstarVars_VertexIsoBDTInfo",
+                                                                    "[Beauty -> X0 ^tau+  e+]CC" : "TauVars_VertexIsoBDTInfo_0",
+                                                    }
+                                                   },
+                                                   {'Type'             : 'RelInfoConeVariables',
+                                                     'ConeAngle'        : 0.5,
+                                                    'Location'         : 'ConeVarsInfo05',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> ^X0  tau+ e+]CC" : "KstarVars_ConeVarsInfo",
+                                                                    "[Beauty -> X0 ^tau+  e+]CC" : "TauVars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e+]CC" : "Pi1Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e+]CC" : "Pi2Vars_ConeVarsInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e+]CC" : "Pi3Vars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ e+]CC" : "KVars_ConeVarsInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e+]CC" : "PiVars_ConeVarsInfo_0",
+                                                                }},
+                                                    {'Type'             : 'RelInfoTrackIsolationBDT',
+                                                     'Variables' : 2,
+                                                     'WeightsFile'  :  'BsMuMu_TrackIsolationBDT9vars_v1r4.xml',
+                                                     'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  e+]CC" : "TauVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> ^pi+ pi- pi+) e+]CC" : "Pi1Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ ^pi- pi+) e+]CC" : "Pi2Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty ->  X0 (tau+ -> pi+ pi- ^pi+) e+]CC" : "Pi3Vars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> ^K+ pi-)]CC  tau+ e+]CC" : "KVars_TrackIsoBDTInfo_0",
+                                                                    "[Beauty -> [(X0 -> K+ ^pi-)]CC  tau+ e+]CC" : "PiVars_TrackIsoBDTInfo_0",
+                                                  }},
+                                                   {'Type'             : 'RelInfoBs2MuMuTrackIsolations',
+                                                    'DaughterLocations'   : {
+                                                                    "[Beauty -> X0 ^tau+  e+]CC" : "TauVars_TrackIsoBsMMInfo_0",
+                                                  },
+                                                     'tracktype'        : 3,
+                                                     'angle'            : 0.27,
+                                                     'fc'               : 0.60,
+                                                     'doca_iso'         : 0.13,
+                                                     'ips'              : 3.0,
+                                                     'svdis'            : -0.15,
+                                                     'svdis_h'          : 30.,
+                                                     'pvdis'            : 0.5,
+                                                     'pvdis_h'          : 40.,
+                                                     'makeTrackCuts'    : False,
+                                                     'IsoTwoBody'       : False},
+                                  {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 1.0,
+                                     'Location'          : 'ConeVarsInfo10'
+                                     },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                    'ConeAngle'         : 1.5,
+                                     'Location'          : 'ConeVarsInfo15'
+                                    },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 2.0,
+                                     'Location'          : 'ConeVarsInfo20'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.0,
+                                     'Location'          : 'ConeIsoInfo10'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.5,
+                                     'Location'          : 'ConeIsoInfo15'
+                                            },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 2.0,
+                                     'Location'          : 'ConeIsoInfo20'
+                                    },
+
+                                                  ],
+                                        selection   = selB2KstTauESS,
+                                        MaxCandidates = 30 
+                                        )
+
+
+
+    self.MuMu_Line     = StrippingLine(name+"_MuMu_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2KstMuMu_LinePrescale'],
+                                        postscale   = config['B2KstMuMu_LinePostscale'],
+                                        MDSTFlag = False,
+                                        FILTER = self.FilterSPD,
+                                        #RelatedInfoTools = config['RelatedInfoTools'],
+                                        RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauMuonIsolationBDT",  "Location" : "B2KstTauTau_MuonIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT",   "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso",              "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[B0 -> ^K*(892)0 mu+ mu-]CC" : "KstarVars_VertexIsoInfo"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",               
+                                                                "ConeSize" : 0.5,
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[B0 -> K*(892)0 ^mu+  mu-]CC" : "MuVars_ConeIsoInfo_0",
+                                                                    "[B0 -> K*(892)0  mu+ ^mu-]CC" : "MuVars_ConeIsoInfo_1"
+                                                                }
+                                                  }
+                                                  ],
+                                        selection   = selB2KstMuMu,
+                                        MaxCandidates = 30 
+                                        )
+   
+    self.MuMu_SS_Line  = StrippingLine(name+"_MuMu_SameSign_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2KstMuMu_SameSign_LinePrescale'],
+                                        postscale   = config['B2KstMuMu_SameSign_LinePostscale'],
+                                        MDSTFlag = False,
+                                        FILTER = self.FilterSPD,
+                                        #RelatedInfoTools = config['RelatedInfoTools'],
+                                        RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauMuonIsolationBDT",  "Location" : "B2KstTauTau_MuonIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT",   "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso",              "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> ^X0 mu+ mu+]CC" : "KstarVars_VertexIsoInfo"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",               
+                                                                "ConeSize" : 0.5,
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[Beauty -> X0 ^mu+  mu+]CC" : "MuVars_ConeIsoInfo_0",
+                                                                    "[Beauty -> X0  mu+ ^mu+]CC" : "MuVars_ConeIsoInfo_1"
+                                                                }
+                                                  }
+                                                  ],
+                                        selection   = selB2KstMuMuSS,
+                                        MaxCandidates = 30 
+                                        )
+    
+    self.DDSL_Line    = StrippingLine(name+"_DDSL_Line",
+                                      #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                      prescale    = config['B2DDSL_LinePrescale'],
+                                      postscale   = config['B2DDSL_LinePostscale'],
+                                      MDSTFlag = False,
+                                      FILTER = self.FilterSPD,
+                                      #RelatedInfoTools = config['RelatedInfoTools'],
+                                      RelatedInfoTools      = [
+                                                  { "Type" : "RelInfoBKsttautauMuonIsolationBDT",  "Location" : "B2KstTauTau_MuonIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTauIsolationBDT",   "Location" : "B2KstTauTau_TauIsolationBDT" },
+                                                  { "Type" : "RelInfoBKsttautauTrackIsolationBDT", "Location" : "B2KstTauTau_TrackIsolationBDT" },  
+                                                  { "Type" : "RelInfoBstautauCDFIso",              "Location" : "B2KstTauTau_CDFIso" },
+                                                  { "Type" : "RelInfoVertexIsolation",             "Location" : "BVars_VertexIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                    "[B0 -> ^K*(892)0  D+ mu-]CC" : "KstarVars_VertexIsoInfo",
+                                                                    "[B0 ->  K*(892)0 ^D+ mu-]CC" : "DVars_VertexIsoInfo"
+                                                                }
+                                                  },
+                                                  { "Type" : "RelInfoConeIsolation",               
+                                                                "ConeSize" : 0.5,
+                                                                "Location" : "BVars_ConeIsoInfo",
+                                                                "DaughterLocations" : {
+                                                                   "[B0 -> K*(892)0  ^D+  mu-]CC" : "DVars_ConeIsoInfo",
+                                                                   "[B0 -> K*(892)0   D+ ^mu-]CC" : "MuVars_ConeIsoInfo_0"
+                                                                }
+                                                  }
+                                                  ],
+                                      selection = selB2DDSL,
+                                      MaxCandidates = 30
+                                      )
+
+     
+    #
+
+    self.registerLine( self.TauTau_Line )
+    self.registerLine( self.TauMu_Line )
+    self.registerLine( self.TauE_Line )
+    self.registerLine( self.MuMu_Line )
+    self.registerLine( self.TauTau_SS_Line )
+    self.registerLine( self.TauMu_SS_Line )
+    self.registerLine( self.TauE_SS_Line )
+    self.registerLine( self.MuMu_SS_Line )
+    self.registerLine( self.DDSL_Line )
+  
+  
+  #####################################################
+  def _makeB2XX(self, name, tauSel, KstarSel, config):
+    
+#    _combcut = "(AM  > " + config['MASS_LOW_B']    + "*MeV) & "\
+#               "(AM  < " + config['MASS_HIGH_B']   + "*MeV)"
+    
+#    _bcut    = "(VFASPF(VCHI2)  <   "   + config['VCHI2_B']       + ")  &"\
+#               "(BPVVDCHI2          >   "   + config['FDCHI2_B']      + ") & (BPVVD < " +config['FD_B_Max_KTT'] +")" # & (PT > "+config['PT_B_KTT']+" * MeV ) "
+ 
+#    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 -> K*(892)0 tau+ tau-]cc"],
+#                                    CombinationCut   = _combcut,
+#                                    MotherCut        = _bcut)
+
+     _CombineTau = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 tau+ tau-]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = " in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" %config,
+                   MotherCut = "( VFASPF(VCHI2) < %(VCHI2_B)s )"\
+                               "& ( BPVVDCHI2     > %(FDCHI2_B)s )"\
+                               "& ( BPVVD         < %(FD_B_Max_KTT)s )" %config
+                   )
+
+#    _CombineTau = DaVinci__N3BodyDecays("Combine"+name)
+#    _CombineTau = DaVinci__N3BodyDecays("Combine"+name+"_TauTau")
+#    _CombineTau.DecayDescriptors = ["[B0 -> K*(892)0 tau+ tau-]cc"]
+#    _CombineTau.CombinationCut   = _combcut
+#    _CombineTau.MotherCut        = _bcut
+    
+     return (Selection(name+"_TauTau",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel , KstarSel ] ))
+
+
+  #####################################################
+  def _makeB2XXSS(self, name, tauSel, KstarSel, config):
+      
+#    _combcut = "(AM  > " + config['MASS_LOW_B']    + "*MeV) & "\
+#               "(AM  < " + config['MASS_HIGH_B']   + "*MeV)"
+    
+#    _bcut    = "(VFASPF(VCHI2)  <   "   + config['VCHI2_B']       + ") & "\
+#               "(BPVVDCHI2          >   "   + config['FDCHI2_B']      + ") & (BPVVD < " +config['FD_B_Max_KTT'] +")" # & (PT > "+config['PT_B_KTT']+" * MeV ) "
+   
+#    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 ->  K*(892)0 tau+ tau+]cc","[B0 ->  K*(892)0 tau- tau-]cc"],
+#                                    CombinationCut   = _combcut,
+#                                    MotherCut        = _bcut)
+                                      
+     _CombineTau = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 tau+ tau+]cc","[B0 -> K*(892)0 tau- tau-]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = "in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" %config,
+                   MotherCut = "( VFASPF(VCHI2) < %(VCHI2_B)s )"\
+                               "& ( BPVVDCHI2     > %(FDCHI2_B)s )"\
+                               "& ( BPVVD         < %(FD_B_Max_KTT)s )" %config
+                   )
+    
+     return (Selection(name+"_TauTauSS",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel ,KstarSel] ))
+  
+
+  #####################################################
+  def _makeB2XMu(self, name, tauSel,  muonSel, KstarSel, config):
+    
+#    _combcut = "(AM  > " + config['MASS_LOW_B']    + "*MeV) & "\
+#               "(AM  < " + config['MASS_HIGH_B']   + "*MeV)"
+
+#    _bcut    ="(VFASPF(VCHI2)  <   "   + config['VCHI2_B_Mu']       + ") & "\
+#               "(BPVVD          >   "   + config['FD_B_Mu']      + ") & (BPVVD < " +config['FD_B_Max_KTM'] +")" # & (PT > "+config['PT_B_KTM']+" * MeV ) "
+             
+#    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 -> K*(892)0 tau+ mu-]cc","[B0 -> K*(892)0 tau- mu+]cc"],
+#                                    CombinationCut   = _combcut,
+#                                    MotherCut        = _bcut)
+
+     _CombineTau = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 tau+ mu-]cc","[B0 -> K*(892)0 tau- mu+]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = " in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" %config,
+                   MotherCut = "( VFASPF(VCHI2) < %(VCHI2_B_Mu)s )"\
+                               "& ( BPVVD         > %(FD_B_Mu)s )"\
+                               "& ( BPVVD         < %(FD_B_Max_KTM)s )" %config
+                   )
+
+     return (Selection(name+"_TauMu",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel, muonSel, KstarSel ] ))
+  
+    
+  #####################################################
+  def _makeB2XMuSS(self, name, tauSel, muonSel, KstarSel,config):
+        
+#    _combcut = "(AM  > " + config['MASS_LOW_B']    + "*MeV) & "\
+#               "(AM  < " + config['MASS_HIGH_B']   + "*MeV)"
+    
+#    _bcut    ="(VFASPF(VCHI2)  <   "   + config['VCHI2_B_Mu']       + ") & "\
+#               "(BPVVD          >   "   + config['FD_B_Mu']      + ")   & (BPVVD < " +config['FD_B_Max_KTM'] +")" # & (PT > "+config['PT_B_KTM']+" * MeV ) "
+ 
+#    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 ->  K*(892)0 tau+ mu+]cc","[B0 ->  K*(892)0 tau- mu-]cc"],
+#                                   CombinationCut   = _combcut,
+#                                   MotherCut        = _bcut)
+
+     _CombineTau = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 tau+ mu+]cc","[B0 -> K*(892)0 tau- mu-]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = "in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" %config,
+                   MotherCut = " ( VFASPF(VCHI2) < %(VCHI2_B_Mu)s )"\
+                               "& ( BPVVD         > %(FD_B_Mu)s )"\
+                               "& ( BPVVD         < %(FD_B_Max_KTM)s )" %config
+                   )
+    
+     return (Selection(name+"_TauMuSS",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel, muonSel, KstarSel ] ))
+
+
+
+
+  #####################################################
+  def _makeB2XE(self, name, tauSel,  electronSel, KstarSel, config):
+  
+
+     _CombineTau = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 tau+ e-]cc","[B0 -> K*(892)0 tau- e+]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = " in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" %config,
+                   MotherCut = "( VFASPF(VCHI2) < %(VCHI2_B_E)s )"\
+                               "& ( BPVVD         > %(FD_B_E)s )"\
+                               "& ( BPVVD         < %(FD_B_Max_KTM)s )" %config
+                   )
+
+     return (Selection(name+"_TauE",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel, electronSel, KstarSel ] ))
+  
+    
+  #####################################################
+  def _makeB2XESS(self, name, tauSel, electronSel, KstarSel,config):
+        
+
+     _CombineTau = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 tau+ e+]cc","[B0 -> K*(892)0 tau- e-]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = "in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" %config,
+                   MotherCut = " ( VFASPF(VCHI2) < %(VCHI2_B_E)s )"\
+                               "& ( BPVVD         > %(FD_B_E)s )"\
+                               "& ( BPVVD         < %(FD_B_Max_KTM)s )" %config
+                   )
+    
+     return (Selection(name+"_TauESS",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel, electronSel, KstarSel ] ))
+
+
+
+  #####################################################
+  def _makeB2DXMu(self, name, DSel,  muonSel, KstarSel, config):
+    
+#    _combcut = "(AM  > " + config['MASS_LOW_B']    + "*MeV) & "\
+#               "(AM  < " + config['MASS_HIGH_B']   + "*MeV)"
+
+#    _bcut    ="(VFASPF(VCHI2)  <   "   + config['VCHI2_B_Mu']       + ") & "\
+#               "(BPVVD          >   "   + config['FD_B_Mu']      + ")  & (BPVVD < " +config['FD_B_Max_KTM'] +")" # & (PT > "+config['PT_B_KTM']+" * MeV ) "
+            
+#    _CombineD = CombineParticles( DecayDescriptors = ["[B0 ->  K*(892)0 D+ mu-]cc"],
+#                                   CombinationCut   = _combcut,
+#                                   MotherCut        = _bcut)
+
+     _CombineD = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 D+ mu-]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = "in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" %config,
+                   MotherCut = " ( VFASPF(VCHI2) < %(VCHI2_B_Mu)s )"\
+                               "& ( BPVVD         > %(FD_B_Mu)s )"\
+                               "& ( BPVVD         < %(FD_B_Max_KTM)s )" %config
+                   )
+
+     return (Selection(name+"_DDSL",
+                      Algorithm          = _CombineD,
+                      RequiredSelections = [ DSel, muonSel, KstarSel ] ))
+  
+
+  #####################################################
+  def _makeB2XMuMu(self, name, muonSel_KMM, KstarSel_KMM, config):
+    
+#    _combcut = "(AM  > " + config['MASS_LOW_B_KMM']    + "*MeV) & "\
+#               "(AM  < " + config['MASS_HIGH_B_KMM']   + "*MeV)"
+
+#    _bcut    = "(PT > "             + config['PT_B_KMM']   + "*MeV) &"\
+#               "(VFASPF(VCHI2)  <   "   + config['VCHI2_B_Mu_KMM']       + ") & "\
+#               "(BPVVD          >   "   + config['FD_B_Mu_KMM']      + ") & "\
+#               "(BPVDIRA >"         + config['B_COSDIRA_KMM']   + ") "
+         
+#    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 ->  K*(892)0 mu+ mu-]cc"],
+#                                   CombinationCut   = _combcut,
+#                                   MotherCut        = _bcut)
+
+     _CombineTau = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 mu+ mu-]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = "in_range ( %(MASS_LOW_B_KMM)s, AM, %(MASS_HIGH_B_KMM)s )"%config,
+                   MotherCut = " ( PT             > %(PT_B_KMM)s )"\
+                               "& ( VFASPF(VCHI2)  < %(VCHI2_B_Mu_KMM)s )"\
+                               "& ( BPVVD          > %(FD_B_Mu_KMM)s )"\
+                               "& ( BPVDIRA        > %(B_COSDIRA_KMM)s )" %config
+                   )
+ 
+     return (Selection(name+"_MuMu",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ muonSel_KMM, KstarSel_KMM ] ))
+  
+
+  #####################################################
+  def _makeB2XMuMuSS(self, name, muonSel_KMM, KstarSel_KMM, config):
+    
+#    _combcut = "(AM  > " + config['MASS_LOW_B_KMM']    + "*MeV) & "\
+#               "(AM  < " + config['MASS_HIGH_B_KMM']   + "*MeV)"
+
+#    _bcut    = " (PT > "             + config['PT_B_KMM']   + "*MeV) &"\
+#               "(VFASPF(VCHI2)  <   "   + config['VCHI2_B_Mu_KMM']       + ") & "\
+#               "(BPVVD          >   "   + config['FD_B_Mu_KMM']      + ") & "\
+#               " (BPVDIRA >"         + config['B_COSDIRA_KMM']   + ") "
+          
+#    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 ->  K*(892)0 mu+ mu+]cc","[B0 ->  K*(892)0 mu- mu-]cc"],
+#                                   CombinationCut   = _combcut,
+#                                   MotherCut        = _bcut)
+
+     _CombineTau = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[B0 -> K*(892)0 mu+ mu+]cc","[B0 -> K*(892)0 mu- mu-]cc"],
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = "in_range ( %(MASS_LOW_B_KMM)s, AM, %(MASS_HIGH_B_KMM)s )" %config,
+                   MotherCut = "( PT             > %(PT_B_KMM)s )"\
+                               "& ( VFASPF(VCHI2)  < %(VCHI2_B_Mu_KMM)s )"\
+                               "& ( BPVVD          > %(FD_B_Mu_KMM)s )"\
+                               "& ( BPVDIRA        > %(B_COSDIRA_KMM)s )" %config
+                   )
+
+     return (Selection(name+"_MuMuSS",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ muonSel_KMM, KstarSel_KMM ] ))
+  
+
+  #####################################################
+  def _makeKstar(self, name, config) :
+             
+     _combcut = " (AM  > "           + config['MASS_LOW_Kst']    + "*MeV) & "\
+                " (AM  < "           + config['MASS_HIGH_Kst']   + "*MeV)   "
+
+     
+     _bcut = " (PT > "             + config['PT_Kst']   + "*MeV) &"\
+               "(BPVVD          >   "   + config['FD_Kst_Mu_KMM']      + ") & "\
+             " (VFASPF(VCHI2)  <   "   + config['VCHI2_Kst']       + ")  "
+
+
+
+     _daucut = { 'pi+' : '( (TRCHI2DOF < 4) & (PROBNNpi>0.5))',
+                 'K-' : '( (TRCHI2DOF < 4) & (PROBNNk>0.2))' }
+
+     
+     _CombineKst   = CombineParticles( DecayDescriptors = ["[K*(892)0 -> K+ pi-]cc"],
+                                       CombinationCut   = _combcut, 
+                                       MotherCut        = _bcut ,
+                                       DaughtersCuts    = _daucut
+                                       )    
+
+     return Selection(name,
+                      Algorithm          = _CombineKst,
+                      RequiredSelections = [StdLoosePions,StdNoPIDsKaons]
+                      )
+
+  
+  #####################################################
+  def _makeKstar_KMM(self, name, config) :
+             
+     _combcut = " (AM  > "           + config['MASS_LOW_Kst']    + "*MeV) & "\
+                " (AM  < "           + config['MASS_HIGH_Kst']   + "*MeV) &  "\
+		" (AMAXDOCA('')  <"  + config['DOCAMAX_KST_KMM']   + "*mm)"
+
+     
+     _bcut = " (PT > "             + config['PT_Kst']   + "*MeV) &"\
+             " (VFASPF(VCHI2)  <   "   + config['VCHI2_Kst']       + ") &  "\
+	     " (MIPCHI2DV(PRIMARY) > "+config['MINIPCHI2_KST_KMM'] +") &"\
+ 	     " (BPVVDCHI2 > "      + config['FDCHI2OWNPV_KST_KMM']   + ") "
+
+
+     _daucut = { 'pi+' : '( (TRCHI2DOF < 4) & (PROBNNpi>0.5) & (MIPCHI2DV(PRIMARY) > '+config['MINIPCHI2_PI_KMM']  +'))',
+                 'K-' : '( (TRCHI2DOF < 4) & (PROBNNk>0.2)  & (MIPCHI2DV(PRIMARY) > '+config['MINIPCHI2_K_KMM']  +'))' }
+
+     
+     _CombineKst_KMM   = CombineParticles( DecayDescriptors = ["[K*(892)0 -> K+ pi-]cc"],
+                                       CombinationCut   = _combcut, 
+                                       MotherCut        = _bcut ,
+                                       DaughtersCuts    = _daucut
+                                       )    
+
+     return Selection(name,
+                      Algorithm          = _CombineKst_KMM,
+                      RequiredSelections = [StdLoosePions,StdNoPIDsKaons]
+                      )
+
+  #####################################################
+  def _makeElectrons(self, name, config) :
+    """
+    Electrons selection
+    """
+
+    _code =     "(PT > "        + config['PT_e']          + "*MeV) & "\
+                "(TRCHI2DOF < " + config['TRACKCHI2_e']   + ") & "\
+                "(PROBNNe < " + config['ProbNN_e']   + ")"
+    
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdTightElectrons ] )
+
+  #####################################################
+  def _makeMuons(self, name, config) :
+    """                     
+      Muon selection          
+      """                     
+    _code =     "(PT > "                    + config['PT_MU']          + "*MeV) & "\
+            "(TRCHI2DOF < "             + config['TRACKCHI2_MU']   + ")      "
+    
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,  
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdTightMuons ] )    
+
+
+  #####################################################  
+  def _makeMuons_KMM(self, name, config) :
+    """                     
+      Muon selection          
+      """                     
+    _code =     "(PT > "                    + config['PT_MU_KMM']          + "*MeV) & "\
+            "(TRCHI2DOF < "             + config['TRACKCHI2_MU']   + ")      &" \
+	    "(	MIPCHI2DV(PRIMARY) > "+config['MINIPCHI2_MU_KMM']  +")  "
+    
+    _Filter_KMM = FilterDesktop(Code = _code)
+    
+    return Selection(name,  
+                     Algorithm          = _Filter_KMM,
+                     RequiredSelections = [ StdTightMuons ] )    
+
+
+  #####################################################
+  def _makePionsForD(self, name, config) :
+    """
+      Pion selection for B -> DD
+      """
+    _code = self._hadFinalStateKinematicCuts(config) +" & (PROBNNpi > 0.55)"
+    
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdLoosePions ] )
+
+
+  #####################################################
+  def _makeKaonsForD(self, name, config) :
+    """
+      Kaon selection for B -> DD
+      """
+    _code = self._hadFinalStateKinematicCuts(config)  
+    
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdLooseKaons ] )
+  
+
+  #####################################################
+  def _makeD(self, name, pionSel, kaonSel, config) :
+
+     _preambulo = [ "c1c2c3 = ((('pi+') == ABSID) | (('K+') == ABSID))" ,
+                    "ipsm    = MINTREE( c1c2c3 , MIPCHI2DV(PRIMARY) )"]
+            
+#     _combcut = " (((AM  > "           + config['MASS_LOW_D']    + "*MeV) & "\
+#                " (AM  < "           + config['MASS_HIGH_D']   + "*MeV))  | "\
+#                " ((AM  > "           + config['MASS_LOW_Ds']    + "*MeV) & "\
+#                " (AM  < "           + config['MASS_HIGH_Ds']   + "*MeV)))  & "\
+#                " (APT  > "          + config['APT_D']   + "*MeV)  & "\
+#                " (AMAXDOCA('')  <"  + config['AMAXDOCA_D']   + "*mm)  & "\
+#                " (ANUM(PT > "       + config['MaxPT_D']   + "*MeV) >= 1) "
+     
+#     _bcut = " (PT > "             + config['PT_D']   + "*MeV) &"\
+#             " (BPVDIRA >"         + config['DIRA_D']   + ") &"\
+#             " (VFASPF(VCHI2) < "  + config['VCHI2_D']   + ")&"\
+#             " (BPVVDCHI2 > "      + config['FDCHI2_D']   + ") &"\
+#             " (BPVVDRHO >  "      + config['VDRHOmin_D']   + "*mm) &"\
+#             " (BPVVDRHO <  "      + config['VDRHOmax_D']   + "*mm) &"\
+#             " (BPVVDZ >  "        + config['VDZ_D']   + "*mm) "
+       
+#     _CombineD   = CombineParticles( DecayDescriptors = ["[D+ -> pi+ K- pi+]cc","[D+ -> K+ K- pi+]cc"],
+#                                     CombinationCut   = _combcut, 
+#                                     MotherCut        = _bcut+"& (M>1800.*MeV) & (M<2030.*MeV)" ,
+#                                     Preambulo        = _preambulo)
+
+     _CombineD = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[D+ -> pi+ K- pi+]cc","[D+ -> K+ K- pi+]cc"],
+                   Preambulo        = _preambulo,
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = "( ( in_range ( %(MASS_LOW_D)s,  AM, %(MASS_HIGH_D)s ) ) | ( in_range ( %(MASS_LOW_Ds)s, AM, %(MASS_HIGH_Ds)s ) ) )"\
+                                    "& ( APT           > %(APT_D)s )"\
+                                    "& ( AMAXDOCA('')  < %(AMAXDOCA_D)s )"\
+                                    "& ( ANUM(PT       > %(MaxPT_D)s) >= 1 )" %config,
+                   MotherCut = "( PT            > %(PT_D)s )"\
+                               "& ( BPVDIRA       > %(DIRA_D)s )"\
+                               "& ( VFASPF(VCHI2) < %(VCHI2_D)s )"\
+                               "& ( BPVVDCHI2     > %(FDCHI2_D)s )"\
+                               "& ( in_range ( %(VDRHOmin_D)s, BPVVDRHO, %(VDRHOmax_D)s ) )"\
+                               "& ( BPVVDZ        > %(VDZ_D)s )"\
+                               "& ( in_range ( %(MASS_LOW_Dmother)s, M, %(MASS_HIGH_Dmother)s ) )" %config
+                   )    
+
+     return Selection(name,
+                      Algorithm          = _CombineD,
+                      RequiredSelections = [pionSel, kaonSel]
+                      )
+
+
+  #####################################################   
+  def _hadFinalStateKinematicCuts(self, config) :
+    _code = "(P  > "                    + config['P_HAD_ALL_FINAL_STATE']     + "*MeV) & "\
+      "(PT > "                    + config['PT_HAD_ALL_FINAL_STATE']          + "*MeV) & "\
+      "(MIPCHI2DV(PRIMARY) > "    + config['IPCHI2_HAD_ALL_FINAL_STATE']      + ")     & "\
+      "(TRCHI2DOF < "             + config['TRACKCHI2_HAD_ALL_FINAL_STATE']   + ")     & "\
+      "(TRGHOSTPROB < "           + config['TRGHOPROB_HAD_ALL_FINAL_STATE']   + ")     "
+
+    return _code
+  
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDT.py
new file mode 100644
index 000000000..3b4495ffd
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDT.py
@@ -0,0 +1,726 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting B->LL (mumu, ee) X,
+RelatedInfoToos stolen from StrippingBu2LLK
+Note:
+*. CPU-intensive cuts like IPCHI2 are not re-applied
+   if being identical to those in the common particles
+'''
+
+__author__=['Jibo He']
+__date__ = '20/11/2015'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'B2LLXBDTConf',
+    'default_config'
+    )
+
+daughter_locations = {
+    # OPPOSITE SIGN
+    # 3-body
+    "[Beauty -> ^X+  (X0 ->  l+  l-)]CC" : "{0}H",
+    "[Beauty ->  X+  (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty ->  X+  (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 4-body with a strange particle in the final state
+    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l-)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l-)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 4-body with two pions in the final state
+    "[Beauty ->  (X0 -> ^pi+  pi-)  (X0 ->  l+  l-)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X0 ->  l+  l-)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  pi+  pi-)  (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  pi+  pi-) ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 4-body with p and pi in the final state. Here the names are kept generic (H1,H2,L1,L2), for uniformity with strippingof other years. This is needed for Lb->Lll analyses.
+    "[Beauty ->  (X0 -> ^p+  pi-)  (X0 ->  l+  l-)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  p+ ^pi-)  (X0 ->  l+  l-)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  p+  pi-)  (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  p+  pi-)  (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  p+  pi-)  (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  p+  pi-) ^(X0 ->  l+  l-)]CC" : "{0}LL"
+}
+
+daughter_vtx_locations = {
+    # OPPOSITE SIGN
+    # 3-body
+    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 4-body
+    "[Beauty -> ^(X0 ->  X+  X-)  (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  X+  X-) ^(X0 ->  l+  l-)]CC" : "{0}LL"
+}
+
+
+default_config = {
+    'NAME'              :  'B2LLXBDT',
+    'BUILDERTYPE'       :  'B2LLXBDTConf',
+    'CONFIG'    : {
+        'DiElectronCuts': """
+                           (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)
+                           & (INTREE( (ID=='e+') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (PIDe>-2) & (TRGHOSTPROB<0.5) ))
+                           & (INTREE( (ID=='e-') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (PIDe>-2) & (TRGHOSTPROB<0.5) ))
+                          """,
+        'DiMuonCuts'    : """
+                           (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)
+                           & (INTREE( (ID=='mu+') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) ))
+                           & (INTREE( (ID=='mu-') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) ))
+                          """,
+        'PionCuts'      : "(PROBNNpi> 0.2) & (PT>250*MeV) & (TRGHOSTPROB<0.4)",
+        'KaonCuts'      : "(PROBNNk > 0.1) & (PT>300*MeV) & (TRGHOSTPROB<0.4)",
+        'ProtonCuts'    : "(PROBNNp> 0.05) & (PT>300*MeV) & (TRGHOSTPROB<0.4)",
+
+        'Pion4LPCuts'   : "(PROBNNpi> 0.2) & (PT>100*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>9.)",
+
+        'KstarCuts'     : "(VFASPF(VCHI2/VDOF)<16) & (ADMASS('K*(892)0')< 300*MeV)",
+
+        'KsDDCuts'      : "(ADMASS('KS0') < 30.*MeV) & (BPVVDCHI2>25)",
+        'KsLLComCuts'   : "(ADAMASS('KS0') < 50.*MeV) & (ADOCACHI2CUT(25, ''))",  
+        'KsLLCuts'      : "(ADMASS('KS0') < 30.*MeV) & (BPVVDCHI2>25) & (VFASPF(VCHI2) < 25.)",
+        
+        'PhiCuts'       : """
+                          (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<1.05*GeV) & (MIPCHI2DV(PRIMARY)>2.)
+                          & (INTREE( (ID=='K+') & (PT>200*MeV) & (TRGHOSTPROB<0.4) ))
+                          & (INTREE( (ID=='K-') & (PT>200*MeV) & (TRGHOSTPROB<0.4) ))
+                          """ ,
+
+        'LambdaDDCuts'  : "(ADMASS('Lambda0') < 30.*MeV) & (BPVVDCHI2>25)",
+
+        'LambdaLLComCuts': "(ADAMASS('Lambda0')<50*MeV) & (ADOCACHI2CUT(30, ''))",
+        'LambdaLLCuts'   : "(ADMASS('Lambda0') < 30.*MeV) & (BPVVDCHI2>25) & (VFASPF(VCHI2) < 25.)",
+
+        'LambdastarComCuts' : "(AM < 5.6*GeV)",
+        'LambdastarCuts': "(VFASPF(VCHI2) < 25.)",
+        
+        'BComCuts'      : "(in_range(3.7*GeV, AM, 6.8*GeV))",
+        'BMomCuts'      : "(in_range(4.0*GeV,  M, 6.5*GeV)) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVDIRA> 0.999) & (BPVDLS>0) & (BPVIPCHI2()<400)",
+
+        'LbComCuts'     : "(in_range(3.7*GeV, AM, 7.1*GeV))",
+        'LbMomCuts'     : "(in_range(4.0*GeV,  M, 6.8*GeV)) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVDIRA> 0.999) & (BPVDLS>0) & (BPVIPCHI2()<400)",
+
+        'Bu2eeKMVACut'       :  "0.",
+        'Bu2mumuKMVACut'     :  "0.",
+        'Bu2LLKXmlFile'      :  '$TMVAWEIGHTSROOT/data/Bu2eeK_BDT_v1r0.xml',
+
+        'Bd2eeKstarMVACut'   :  "0.",
+        'Bd2mumuKstarMVACut' :  "0.",
+        'Bd2LLKstarXmlFile'  :  '$TMVAWEIGHTSROOT/data/Bd2eeKstar_BDT_v1r0.xml',
+
+        'Bd2eeKsMVACut'      :  "-0.07",
+        'Bd2mumuKsMVACut'    :  "-0.07",
+        'Bd2LLKsXmlFile'     :  '$TMVAWEIGHTSROOT/data/Bd2eeKs_BDT_v1r0.xml',
+
+        'Bs2eePhiMVACut'     :  "-0.06",
+        'Bs2mumuPhiMVACut'   :  "-0.08",
+        'Bs2LLPhiXmlFile'    :  '$TMVAWEIGHTSROOT/data/Bs2eePhi_BDT_v1r0.xml',
+
+        'Lb2eeLambdaMVACut'  :  "-0.11",
+        'Lb2mumuLambdaMVACut':  "-0.15",
+        'Lb2LLLambdaXmlFile' :  '$TMVAWEIGHTSROOT/data/Lb2eeLambda_BDT_v1r0.xml',
+
+        'Lb2eePKMVACut'      :  "-0.05",
+        'Lb2mumuPKMVACut'    :  "-0.11",
+        'Lb2LLPKXmlFile'     :  '$TMVAWEIGHTSROOT/data/Lb2eePK_BDT_v1r0.xml',
+
+        'RelatedInfoTools'     : [
+            {'Type'              : 'RelInfoVertexIsolation',
+             'Location'          : 'VertexIsoInfo',
+             'IgnoreUnmatchedDescriptors': True, 
+             'DaughterLocations' : {key: val.format('VertexIsoInfo') for key, val in daughter_vtx_locations.items()}},
+            {'Type'              : 'RelInfoVertexIsolationBDT',
+             'Location'          : 'VertexIsoBDTInfo',
+             'IgnoreUnmatchedDescriptors': True, 
+             'DaughterLocations' : {key: val.format('VertexIsoBDTInfo') for key, val in daughter_vtx_locations.items()}},
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 0.5,
+             'IgnoreUnmatchedDescriptors': True, 
+             'Location' : 'TrackIsoInfo05',
+             'DaughterLocations' : {key: val.format('TrackIsoInfo') for key, val in daughter_locations.items()}},
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'          : 0.5,
+             'IgnoreUnmatchedDescriptors': True, 
+             'Location' : 'ConeIsoInfo05',
+             'DaughterLocations' : {key: val.format('ConeIsoInfo') for key, val in daughter_locations.items()}},
+            {'Type'              : 'RelInfoBs2MuMuTrackIsolations',
+             'IgnoreUnmatchedDescriptors': True,
+             'Location' : 'TrackIsoBs2MMInfo',
+             'DaughterLocations' : {key: val.format('TrackIsoBs2MMInfo') for key, val in daughter_locations.items()}},
+
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 1.0,
+             'Location'          : 'TrackIsoInfo10'
+            },
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 1.5,
+             'Location'          : 'TrackIsoInfo15'
+            },
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 2.0,
+             'Location'          : 'TrackIsoInfo20'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 1.0,
+             'Location'          : 'ConeIsoInfo10'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 1.5,
+             'Location'          : 'ConeIsoInfo15'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 2.0,
+             'Location'          : 'ConeIsoInfo20'
+            }
+            ]        
+        },
+    'STREAMS'           : ['Leptonic' ],
+    'WGs'               : ['RD']
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class B2LLXBDTConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+        """
+        Di letpons
+        """
+        from StandardParticles import StdDiElectronFromTracks, StdLooseDiMuon
+
+        self.SelDiElectron = self.createSubSel( OutputList = self.name + "SelDiElectron",
+                                                InputList = StdDiElectronFromTracks , 
+                                                Cuts = config['DiElectronCuts']
+                                                )
+        
+        self.SelDiMuon = self.createSubSel( OutputList = self.name + "SelDiMuon",
+                                             InputList = StdLooseDiMuon , 
+                                             Cuts = config['DiMuonCuts']
+                                             )
+                
+        """
+        Basic particles, long tracks
+        """
+        from StandardParticles import StdLooseANNPions, StdLooseANNKaons, StdLooseANNProtons
+        
+        self.SelPions = self.createSubSel( OutputList = self.name + "SelPions",
+                                           InputList =  StdLooseANNPions , 
+                                           Cuts = config['PionCuts']
+                                           )
+        
+        self.SelKaons = self.createSubSel( OutputList = self.name + "SelKaons",
+                                           InputList = StdLooseANNKaons, 
+                                           Cuts = config['KaonCuts']
+                                           )
+                                                   
+        self.SelProtons = self.createSubSel( OutputList = self.name + "SelProtons",
+                                           InputList = StdLooseANNProtons, 
+                                           Cuts = config['ProtonCuts']
+                                           )
+
+        from StandardParticles import StdAllLooseANNPions
+        self.SelPions4LP = self.createSubSel( OutputList = self.name + "SelPions4LP",
+                                              InputList =  StdAllLooseANNPions , 
+                                              Cuts = config['Pion4LPCuts']
+                                              )
+        
+
+        """
+        Kstar
+        """
+        from StandardParticles import StdVeryLooseDetachedKst2Kpi
+        
+        self.SelKstar = self.createSubSel( OutputList = self.name + "SelKstar",
+                                           InputList =  StdVeryLooseDetachedKst2Kpi, 
+                                           Cuts = config['KstarCuts']
+                                           )
+        
+        """
+        Kshort, both LL and DD
+        """
+        from StandardParticles import StdLooseKsDD, StdLooseKsLL
+        
+        self.SelKsDD = self.createSubSel( OutputList = self.name + "SelKsDD",
+                                          InputList = StdLooseKsDD,
+                                          Cuts = config['KsDDCuts'] )
+        
+        """ 
+        self.SelKsLL = self.createSubSel( OutputList = self.name + "SelKsLL",
+                                          InputList = StdLooseKsLL,
+                                          Cuts = config['KsLLCuts'] )
+        """
+        
+        self.SelKsLL = self.createCombinationSel( OutputList = self.name + "SelKsLL",
+                                                  DecayDescriptor = "KS0 -> pi+ pi-",
+                                                  DaughterLists = [ self.SelPions4LP ],                    
+                                                  PreVertexCuts  = config['KsLLComCuts'],
+                                                  PostVertexCuts = config['KsLLCuts'] )
+                
+        self.SelKs = MergedSelection( self.name + "SelKs",
+                                      RequiredSelections = [ self.SelKsDD,
+                                                             self.SelKsLL ] )
+
+                                                           
+        """
+        Phi 
+        """
+        from StandardParticles import StdLoosePhi2KK
+        
+        self.SelPhi = self.createSubSel( OutputList = self.name + "SelPhi",
+                                         InputList =  StdLoosePhi2KK, 
+                                         Cuts = config['PhiCuts']
+                                         )
+
+
+
+        """
+        Lambda, both LL and DD
+        """
+        from StandardParticles import StdLooseLambdaDD, StdLooseLambdaLL
+
+        self.SelLambdaDD = self.createSubSel( OutputList = self.name + "SelLambdaDD",
+                                              InputList = StdLooseLambdaDD,
+                                              Cuts = config['LambdaDDCuts'] )
+
+        self.SelLambdaLL = self.createCombinationSel( OutputList = self.name + "SelLambdaLL",
+                                                      DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                                      DaughterLists = [ self.SelProtons, self.SelPions4LP ],   
+                                                      PreVertexCuts  = config['LambdaLLComCuts'],
+                                                      PostVertexCuts = config['LambdaLLCuts'] )
+        
+        self.SelLambda = MergedSelection( self.name + "SelLambda",
+                                          RequiredSelections = [ self.SelLambdaDD,
+                                                                 self.SelLambdaLL ] )
+
+        """
+        Lambda* -> p K
+        """
+        self.SelLambdastar = self.createCombinationSel( OutputList = self.name + "SelLambdastar",
+                                                        DecayDescriptor = "[Lambda(1520)0 -> p+ K-]cc",
+                                                        DaughterLists = [ self.SelProtons, self.SelKaons ],
+                                                        PreVertexCuts  = config['LambdastarComCuts'],
+                                                        PostVertexCuts = config['LambdastarCuts'] )
+
+
+        #
+        #  Stripping lines here 
+        #
+        self.B2LLHVars = {
+            "sqrt(L1_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(L2_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Jpsi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(H_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(B_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(L1_PT)"                 : "log(CHILD(PT, 1, 1))",
+            "log(L2_PT)"                 : "log(CHILD(PT, 1, 2))", 
+            "log(Jpsi_PT)"               : "log(CHILD(PT, 1))",
+            "log(H_PT)"                  : "log(CHILD(PT, 2))",
+            "log(B_PT)"                  : "log(PT)",
+            "sqrt(Jpsi_FDCHI2_OWNPV)"    : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(B_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "B_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+        
+        """
+        Bu2eeK
+        """
+        self.SelBu2eeK = self.createCombinationSel( OutputList = self.name + "SelBu2eeK",
+                                                    DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                                    DaughterLists = [ self.SelDiElectron, self.SelKaons ],
+                                                    PreVertexCuts  = config['BComCuts'],
+                                                    PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBu2eeK = self.applyMVA( self.name + "MvaBu2eeK",
+                                        SelB        = self.SelBu2eeK,
+                                        MVAVars     = self.B2LLHVars,
+                                        MVACutValue = config['Bu2eeKMVACut'], 
+                                        MVAxmlFile  = config['Bu2LLKXmlFile']
+                                        )
+
+        self.Bu2eeKLine = StrippingLine( self.name + '_Bu2eeKLine',                                                
+                                         RelatedInfoTools = config['RelatedInfoTools'],                                        
+                                         algos     = [ self.MvaBu2eeK ],
+                                         MDSTFlag  = False
+                                         )
+
+        self.registerLine( self.Bu2eeKLine )
+
+
+        """
+        Bu2mumuK
+        """
+        self.SelBu2mumuK = self.createCombinationSel( OutputList = self.name + "SelBu2mumuK",
+                                                      DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                                      DaughterLists = [ self.SelDiMuon, self.SelKaons ],                    
+                                                      PreVertexCuts  = config['BComCuts'],
+                                                      PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBu2mumuK = self.applyMVA( self.name + "MvaBu2mumuK",
+                                          SelB        = self.SelBu2mumuK,
+                                          MVAVars     = self.B2LLHVars,
+                                          MVACutValue = config['Bu2mumuKMVACut'], 
+                                          MVAxmlFile  = config['Bu2LLKXmlFile']
+                                          )
+                
+        self.Bu2mumuKLine = StrippingLine( self.name + '_Bu2mumuKLine',                                                
+                                           RelatedInfoTools = config['RelatedInfoTools'],
+                                           algos     = [ self.MvaBu2mumuK ],
+                                           MDSTFlag  = False
+                                           )
+
+        self.registerLine( self.Bu2mumuKLine )
+        
+
+        #
+        # Bd2LLKstar
+        #
+        """
+        B2LLXVars
+        """
+        self.B2LLXVars = {
+            "sqrt(L1_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(L2_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Jpsi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(H1_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 2, 1))",
+            "sqrt(H2_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 2, 2))",
+            "sqrt(X_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(B_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(L1_PT)"                 : "log(CHILD(PT, 1, 1))",
+            "log(L2_PT)"                 : "log(CHILD(PT, 1, 2))", 
+            "log(Jpsi_PT)"               : "log(CHILD(PT, 1))",
+            "log(H1_PT)"                 : "log(CHILD(PT, 2, 1))",
+            "log(H2_PT)"                 : "log(CHILD(PT, 2, 2))", 
+            "log(X_PT)"                  : "log(CHILD(PT, 2))",
+            "log(B_PT)"                  : "log(PT)",
+            "sqrt(Jpsi_FDCHI2_OWNPV)"    : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(X_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,2))",
+            "sqrt(B_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "B_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+
+        """
+        Bd2eeKstar
+        """
+        self.SelBd2eeKstar = self.createCombinationSel( OutputList = self.name + "SelBd2eeKstar",
+                                                        DecayDescriptor = "[B0 -> J/psi(1S) K*(892)0]cc",
+                                                        DaughterLists = [ self.SelDiElectron, self.SelKstar ],
+                                                        PreVertexCuts  = config['BComCuts'],
+                                                        PostVertexCuts = config['BMomCuts'] )
+        
+        self.MvaBd2eeKstar = self.applyMVA( self.name + "MvaBd2eeKstar",
+                                            SelB        = self.SelBd2eeKstar,
+                                            MVAVars     = self.B2LLXVars,
+                                            MVACutValue = config['Bd2eeKstarMVACut'], 
+                                            MVAxmlFile  = config['Bd2LLKstarXmlFile']
+                                            )
+        
+        self.Bd2eeKstarLine = StrippingLine( self.name + '_Bd2eeKstarLine',                                                
+                                             RelatedInfoTools = config['RelatedInfoTools'], 
+                                             algos     = [ self.MvaBd2eeKstar ],
+                                             MDSTFlag  = False
+                                             )
+
+        self.registerLine( self.Bd2eeKstarLine )
+
+        """
+        Bd2mumuKstar
+        """
+        self.SelBd2mumuKstar = self.createCombinationSel( OutputList = self.name + "SelBd2mumuKstar",
+                                                          DecayDescriptor = "[B0 -> J/psi(1S) K*(892)0]cc",
+                                                          DaughterLists = [ self.SelDiMuon, self.SelKstar ],
+                                                          PreVertexCuts  = config['BComCuts'],
+                                                          PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBd2mumuKstar = self.applyMVA( self.name + "MvaBd2mumuKstar",
+                                              SelB        = self.SelBd2mumuKstar,
+                                              MVAVars     = self.B2LLXVars,
+                                              MVACutValue = config['Bd2mumuKstarMVACut'], 
+                                              MVAxmlFile  = config['Bd2LLKstarXmlFile']
+                                              )
+                
+        self.Bd2mumuKstarLine = StrippingLine( self.name + '_Bd2mumuKstarLine',                                                
+                                               RelatedInfoTools = config['RelatedInfoTools'],
+                                               algos     = [ self.MvaBd2mumuKstar ],
+                                               MDSTFlag  = False
+                                               )
+
+        self.registerLine( self.Bd2mumuKstarLine )
+
+        """
+        Bd2eeKs
+        """
+        self.SelBd2eeKs = self.createCombinationSel( OutputList = self.name + "SelBd2eeKs",
+                                                     DecayDescriptor = "B0 -> J/psi(1S) KS0",
+                                                     DaughterLists = [ self.SelDiElectron, self.SelKs ],
+                                                     PreVertexCuts  = config['BComCuts'],
+                                                     PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBd2eeKs = self.applyMVA( self.name + "MvaBd2eeKs",
+                                         SelB        = self.SelBd2eeKs,
+                                         MVAVars     = self.B2LLXVars,
+                                         MVACutValue = config['Bd2eeKsMVACut'], 
+                                         MVAxmlFile  = config['Bd2LLKsXmlFile']
+                                         )
+        
+        self.Bd2eeKsLine = StrippingLine( self.name + '_Bd2eeKsLine',                                                
+                                          RelatedInfoTools = config['RelatedInfoTools'],                                        
+                                          algos     = [ self.MvaBd2eeKs ],
+                                          MDSTFlag  = False
+                                          )
+        
+        self.registerLine( self.Bd2eeKsLine )
+
+
+        """
+        Bd2mumuKs
+        """
+        self.SelBd2mumuKs = self.createCombinationSel( OutputList = self.name + "SelBd2mumuKs",
+                                                       DecayDescriptor = "B0 -> J/psi(1S) KS0",
+                                                       DaughterLists = [ self.SelDiMuon, self.SelKs ],
+                                                       PreVertexCuts  = config['BComCuts'],
+                                                       PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBd2mumuKs = self.applyMVA( self.name + "MvaBd2mumuKs",
+                                           SelB        = self.SelBd2mumuKs,
+                                           MVAVars     = self.B2LLXVars,
+                                           MVACutValue = config['Bd2mumuKsMVACut'], 
+                                           MVAxmlFile  = config['Bd2LLKsXmlFile']
+                                           )
+        
+        self.Bd2mumuKsLine = StrippingLine( self.name + '_Bd2mumuKsLine',                                                
+                                            RelatedInfoTools = config['RelatedInfoTools'],
+                                            algos     = [ self.MvaBd2mumuKs ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.Bd2mumuKsLine )
+
+
+        """
+        Bs2eePhi
+        """
+        self.SelBs2eePhi = self.createCombinationSel( OutputList = self.name + "SelBs2eePhi",
+                                                      DecayDescriptor = "B_s0 -> J/psi(1S) phi(1020)",
+                                                      DaughterLists = [ self.SelDiElectron, self.SelPhi ],
+                                                      PreVertexCuts  = config['BComCuts'],
+                                                      PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBs2eePhi = self.applyMVA( self.name + "MvaBs2eePhi",
+                                          SelB        = self.SelBs2eePhi,
+                                          MVAVars     = self.B2LLXVars,
+                                          MVACutValue = config['Bs2eePhiMVACut'], 
+                                          MVAxmlFile  = config['Bs2LLPhiXmlFile']
+                                          )
+        
+        self.Bs2eePhiLine = StrippingLine( self.name + '_Bs2eePhiLine',                                                
+                                           RelatedInfoTools = config['RelatedInfoTools'],
+                                           algos     = [ self.MvaBs2eePhi ],
+                                           EnableFlavourTagging = True, 
+                                           MDSTFlag  = False
+                                           )
+        
+        self.registerLine( self.Bs2eePhiLine )
+
+        
+        """
+        Bs2mumuPhi
+        """
+        self.SelBs2mumuPhi = self.createCombinationSel( OutputList = self.name + "SelBs2mumuPhi",
+                                                        DecayDescriptor = "B_s0 -> J/psi(1S) phi(1020)",
+                                                        DaughterLists = [ self.SelDiMuon, self.SelPhi ],
+                                                        PreVertexCuts  = config['BComCuts'],
+                                                        PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBs2mumuPhi = self.applyMVA( self.name + "MvaBs2mumuPhi",
+                                            SelB        = self.SelBs2mumuPhi,
+                                            MVAVars     = self.B2LLXVars,
+                                            MVACutValue = config['Bs2mumuPhiMVACut'], 
+                                            MVAxmlFile  = config['Bs2LLPhiXmlFile']
+                                            )
+        
+        self.Bs2mumuPhiLine = StrippingLine( self.name + '_Bs2mumuPhiLine',                                                
+                                             RelatedInfoTools = config['RelatedInfoTools'],
+                                             algos     = [ self.MvaBs2mumuPhi ],
+                                             EnableFlavourTagging = True, 
+                                             MDSTFlag  = False
+                                             )
+        
+        self.registerLine( self.Bs2mumuPhiLine )
+
+
+        """
+        Lb2eeLambda
+        """
+        self.SelLb2eeLambda = self.createCombinationSel( OutputList = self.name + "SelLb2eeLambda",
+                                                         DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda0]cc",
+                                                         DaughterLists = [ self.SelDiElectron, self.SelLambda ],
+                                                         PreVertexCuts  = config['LbComCuts'],
+                                                         PostVertexCuts = config['LbMomCuts'] )
+
+        self.MvaLb2eeLambda = self.applyMVA( self.name + "MvaLb2eeLambda",
+                                             SelB        = self.SelLb2eeLambda,
+                                             MVAVars     = self.B2LLXVars,
+                                             MVACutValue = config['Lb2eeLambdaMVACut'], 
+                                             MVAxmlFile  = config['Lb2LLLambdaXmlFile']
+                                             )
+        
+        self.Lb2eeLambdaLine = StrippingLine( self.name + '_Lb2eeLambdaLine',                                                
+                                              RelatedInfoTools = config['RelatedInfoTools'],                                        
+                                              algos     = [ self.MvaLb2eeLambda ],
+                                              MDSTFlag  = False
+                                              )
+        
+        self.registerLine( self.Lb2eeLambdaLine )
+
+
+        """
+        Lb2mumuLambda
+        """
+        self.SelLb2mumuLambda = self.createCombinationSel( OutputList = self.name + "SelLb2mumuLambda",
+                                                           DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda0]cc",
+                                                           DaughterLists = [ self.SelDiMuon, self.SelLambda ],
+                                                           PreVertexCuts  = config['LbComCuts'],
+                                                           PostVertexCuts = config['LbMomCuts'] )
+
+        self.MvaLb2mumuLambda = self.applyMVA( self.name + "MvaLb2mumuLambda",
+                                               SelB        = self.SelLb2mumuLambda,
+                                               MVAVars     = self.B2LLXVars,
+                                               MVACutValue = config['Lb2mumuLambdaMVACut'], 
+                                               MVAxmlFile  = config['Lb2LLLambdaXmlFile']
+                                               )
+        
+        self.Lb2mumuLambdaLine = StrippingLine( self.name + '_Lb2mumuLambdaLine',                                                
+                                                RelatedInfoTools = config['RelatedInfoTools'],
+                                                algos     = [ self.MvaLb2mumuLambda ],
+                                                MDSTFlag  = False
+                                                )
+        
+        self.registerLine( self.Lb2mumuLambdaLine )
+
+        
+        #
+        # Lb-> LL Kstar
+        #        
+        """
+        Lb2eePK
+        """
+        
+        self.SelLb2eePK = self.createCombinationSel( OutputList = self.name + "SelLb2eePK",
+                                                     DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc",
+                                                     DaughterLists = [ self.SelDiElectron, self.SelLambdastar ],
+                                                     PreVertexCuts  = config['LbComCuts'],
+                                                     PostVertexCuts = config['LbMomCuts'] )
+        
+        self.MvaLb2eePK = self.applyMVA( self.name + "MvaLb2eePK",
+                                         SelB        = self.SelLb2eePK,
+                                         MVAVars     = self.B2LLXVars,
+                                         MVACutValue = config['Lb2eePKMVACut'], 
+                                         MVAxmlFile  = config['Lb2LLPKXmlFile']
+                                         )
+        
+        self.Lb2eePKLine = StrippingLine( self.name + '_Lb2eePKLine',
+                                          RelatedInfoTools = config['RelatedInfoTools'],                                        
+                                          algos     = [ self.MvaLb2eePK ],
+                                          MDSTFlag  = False
+                                          )
+        
+        self.registerLine( self.Lb2eePKLine )
+
+
+        """
+        Lb2mumuPK
+        """
+        self.SelLb2mumuPK = self.createCombinationSel( OutputList = self.name + "SelLb2mumuPK",
+                                                       DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc",
+                                                       DaughterLists = [ self.SelDiMuon, self.SelLambdastar ],
+                                                       PreVertexCuts  = config['LbComCuts'],
+                                                       PostVertexCuts = config['LbMomCuts'] )
+
+        self.MvaLb2mumuPK = self.applyMVA( self.name + "MvaLb2mumuPK",
+                                           SelB        = self.SelLb2mumuPK,
+                                           MVAVars     = self.B2LLXVars,
+                                           MVACutValue = config['Lb2mumuPKMVACut'], 
+                                           MVAxmlFile  = config['Lb2LLPKXmlFile']
+                                           )
+        
+        self.Lb2mumuPKLine = StrippingLine( self.name + '_Lb2mumuPKLine',       
+                                            RelatedInfoTools = config['RelatedInfoTools'], 
+                                            algos     = [ self.MvaLb2mumuPK ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.Lb2mumuPKLine )
+        
+        
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDTSS.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDTSS.py
new file mode 100644
index 000000000..c65e63406
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDTSS.py
@@ -0,0 +1,777 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting B->LL (mumu, ee) X,
+RelatedInfoToos stolen from StrippingBu2LLK
+Note:
+*. CPU-intensive cuts like IPCHI2 are not re-applied
+   if being identical to those in the common particles
+'''
+
+__author__=['Jibo He', 'Yanting Fan', 'Angel Campoverde']
+__date__ = '17/06/2021'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'B2LLXBDTSSConf',
+    'default_config'
+    )
+
+daughter_locations = {
+    # OPPOSITE SIGN
+    # 3-body
+    "[Beauty -> ^X+  (X0 ->  l+  l+)]CC" : "{0}H",
+    "[Beauty ->  X+  (X0 -> ^l+  l+)]CC" : "{0}L1",
+    "[Beauty ->  X+  (X0 ->  l+ ^l+)]CC" : "{0}L2",
+    "[Beauty ->  X+ ^(X0 ->  l+  l+)]CC" : "{0}LL",
+    # 4-body with a strange particle in the final state
+    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l+)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l+)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l+)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l+)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l+)]CC" : "{0}LL",
+    # 4-body with two pions in the final state
+    "[Beauty ->  (X0 -> ^pi+  pi-)  (X0 ->  l+  l+)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X0 ->  l+  l+)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 -> ^l+  l+)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 ->  l+ ^l+)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  pi+  pi-)  (X0 ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  pi+  pi-) ^(X0 ->  l+  l+)]CC" : "{0}LL",
+    # 4-body with p and pi in the final state. Here the names are kept generic (H1,H2,L1,L2), for uniformity with strippingof other years. This is needed for Lb->Lll analyses.
+    "[Beauty ->  (X0 -> ^p+  pi-)  (X0 ->  l+  l+)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  p+ ^pi-)  (X0 ->  l+  l+)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  p+  pi-)  (X0 -> ^l+  l+)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  p+  pi-)  (X0 ->  l+ ^l+)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  p+  pi-)  (X0 ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  p+  pi-) ^(X0 ->  l+  l+)]CC" : "{0}LL"
+}
+
+daughter_vtx_locations = {
+    # OPPOSITE SIGN
+    # 3-body
+    "[Beauty ->  X+ ^(X0 ->  l+  l+)]CC" : "{0}LL",
+    # 4-body
+    "[Beauty -> ^(X0 ->  X+  X-)  (X0 ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  X+  X-) ^(X0 ->  l+  l+)]CC" : "{0}LL"
+}
+
+
+default_config = {
+    'NAME'              :  'B2LLXBDTSS',
+    'BUILDERTYPE'       :  'B2LLXBDTSSConf',
+    'CONFIG'    : {
+        'ElectronCuts'  : "(APT>100*MeV)",
+        'ElectronMuonComCuts'  : "(APT>100*MeV) & (ADOCACHI2CUT(30, ''))",
+        'DiElectronPCuts': """
+                           (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)
+                           & (INTREE( (ID=='e+') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (PIDe>-2) & (TRGHOSTPROB<0.5) ))
+                          """,
+        'DiElectronMCuts': """
+                           (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)
+                           & (INTREE( (ID=='e-') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (PIDe>-2) & (TRGHOSTPROB<0.5) ))
+                          """,
+        'DiMuonPCuts'    : """
+                           (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)
+                           & (INTREE( (ID=='mu+') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) ))
+                          """,
+        'DiMuonMCuts'    : """
+                           (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)
+                           & (INTREE( (ID=='mu-') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) ))
+                          """,
+        'ElectronMuonMCuts': """
+			     (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)
+			     & (INTREE( (ID=='e+') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) & (PIDe>-2) ))
+			     & (INTREE( (ID=='mu-') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) ))
+			     """,
+        'ElectronMuonPCuts': """
+			     (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<5.0*GeV)
+			     & (INTREE( (ID=='e-') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) & (PIDe>-2) ))
+			     & (INTREE( (ID=='mu+') & (PT>200*MeV) & (MIPCHI2DV(PRIMARY)>1.) & (TRGHOSTPROB<0.5) ))
+			     """,
+        'PionCuts'      : "(PROBNNpi> 0.2) & (PT>250*MeV) & (TRGHOSTPROB<0.4)",
+        'KaonCuts'      : "(PROBNNk > 0.1) & (PT>300*MeV) & (TRGHOSTPROB<0.4)",
+        'ProtonCuts'    : "(PROBNNp> 0.05) & (PT>300*MeV) & (TRGHOSTPROB<0.4)",
+
+        'Pion4LPCuts'   : "(PROBNNpi> 0.2) & (PT>100*MeV) & (TRGHOSTPROB<0.4) & (MIPCHI2DV(PRIMARY)>9.)",
+
+        'KstarCuts'     : "(VFASPF(VCHI2/VDOF)<16) & (ADMASS('K*(892)0')< 300*MeV)",
+
+        'KsDDCuts'      : "(ADMASS('KS0') < 30.*MeV) & (BPVVDCHI2>25)",
+        'KsLLComCuts'   : "(ADAMASS('KS0') < 50.*MeV) & (ADOCACHI2CUT(25, ''))",  
+        'KsLLCuts'      : "(ADMASS('KS0') < 30.*MeV) & (BPVVDCHI2>25) & (VFASPF(VCHI2) < 25.)",
+        
+        'PhiCuts'       : """
+                          (HASVERTEX) & (VFASPF(VCHI2)<16) & (MM<1.05*GeV) & (MIPCHI2DV(PRIMARY)>2.)
+                          & (INTREE( (ID=='K+') & (PT>200*MeV) & (TRGHOSTPROB<0.4) ))
+                          & (INTREE( (ID=='K-') & (PT>200*MeV) & (TRGHOSTPROB<0.4) ))
+                          """ ,
+
+        'LambdaDDCuts'  : "(ADMASS('Lambda0') < 30.*MeV) & (BPVVDCHI2>25)",
+
+        'LambdaLLComCuts': "(ADAMASS('Lambda0')<50*MeV) & (ADOCACHI2CUT(30, ''))",
+        'LambdaLLCuts'   : "(ADMASS('Lambda0') < 30.*MeV) & (BPVVDCHI2>25) & (VFASPF(VCHI2) < 25.)",
+
+        'LambdastarComCuts' : "(AM < 5.6*GeV)",
+        'LambdastarCuts': "(VFASPF(VCHI2) < 25.)",
+        
+        'BComCuts'      : "(in_range(3.7*GeV, AM, 6.8*GeV))",
+        'BMomCuts'      : "(in_range(4.0*GeV,  M, 6.5*GeV)) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVDIRA> 0.999) & (BPVDLS>0) & (BPVIPCHI2()<400)",
+
+        'LbComCuts'     : "(in_range(3.7*GeV, AM, 7.1*GeV))",
+        'LbMomCuts'     : "(in_range(4.0*GeV,  M, 6.8*GeV)) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVDIRA> 0.999) & (BPVDLS>0) & (BPVIPCHI2()<400)",
+
+        'Bu2eeKMVACut'       :  "0.",
+        'Bu2mumuKMVACut'     :  "0.",
+        'Bu2LLKXmlFile'      :  '$TMVAWEIGHTSROOT/data/Bu2eeK_BDT_v1r0.xml',
+
+        'Bd2eeKstarMVACut'   :  "0.",
+        'Bd2mumuKstarMVACut' :  "0.",
+        'Bd2LLKstarXmlFile'  :  '$TMVAWEIGHTSROOT/data/Bd2eeKstar_BDT_v1r0.xml',
+
+        'Bd2eeKsMVACut'      :  "-0.07",
+        'Bd2mumuKsMVACut'    :  "-0.07",
+        'Bd2LLKsXmlFile'     :  '$TMVAWEIGHTSROOT/data/Bd2eeKs_BDT_v1r0.xml',
+
+        'Bs2eePhiMVACut'     :  "-0.06",
+        'Bs2mumuPhiMVACut'   :  "-0.08",
+        'Bs2LLPhiXmlFile'    :  '$TMVAWEIGHTSROOT/data/Bs2eePhi_BDT_v1r0.xml',
+
+        'Lb2eeLambdaMVACut'  :  "-0.11",
+        'Lb2mumuLambdaMVACut':  "-0.15",
+        'Lb2LLLambdaXmlFile' :  '$TMVAWEIGHTSROOT/data/Lb2eeLambda_BDT_v1r0.xml',
+
+        'Lb2eePKMVACut'      :  "-0.03",
+        'Lb2mumuPKMVACut'    :  "-0.07",
+        'Lb2LLPKXmlFile'     :  '$TMVAWEIGHTSROOT/data/Lb2eePK_BDT_v1r0.xml',
+
+        'RelatedInfoTools'     : [
+            {'Type'              : 'RelInfoVertexIsolation',
+             'Location'          : 'VertexIsoInfo',
+             'IgnoreUnmatchedDescriptors': True, 
+             'DaughterLocations' : {key: val.format('VertexIsoInfo') for key, val in daughter_vtx_locations.items()}},
+            {'Type'              : 'RelInfoVertexIsolationBDT',
+             'Location'          : 'VertexIsoBDTInfo',
+             'IgnoreUnmatchedDescriptors': True, 
+             'DaughterLocations' : {key: val.format('VertexIsoBDTInfo') for key, val in daughter_vtx_locations.items()}},
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 0.5,
+             'IgnoreUnmatchedDescriptors': True, 
+             'Location' : 'TrackIsoInfo05',
+             'DaughterLocations' : {key: val.format('TrackIsoInfo') for key, val in daughter_locations.items()}},
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'          : 0.5,
+             'IgnoreUnmatchedDescriptors': True, 
+             'Location' : 'ConeIsoInfo05',
+             'DaughterLocations' : {key: val.format('ConeIsoInfo') for key, val in daughter_locations.items()}},
+            {'Type'              : 'RelInfoBs2MuMuTrackIsolations',
+             'IgnoreUnmatchedDescriptors': True,
+             'Location' : 'TrackIsoBs2MMInfo',
+             'DaughterLocations' : {key: val.format('TrackIsoBs2MMInfo') for key, val in daughter_locations.items()}},
+
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 1.0,
+             'Location'          : 'TrackIsoInfo10'
+            },
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 1.5,
+             'Location'          : 'TrackIsoInfo15'
+            },
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 2.0,
+             'Location'          : 'TrackIsoInfo20'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 1.0,
+             'Location'          : 'ConeIsoInfo10'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 1.5,
+             'Location'          : 'ConeIsoInfo15'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 2.0,
+             'Location'          : 'ConeIsoInfo20'
+            }
+            ]        
+        },
+    'STREAMS'           : ['Leptonic' ],
+    'WGs'               : ['RD']
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class B2LLXBDTSSConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+        """
+        Di letpons
+        """
+        from StandardParticles import StdDiElectronFromTracks, StdLooseDiMuon, StdAllLooseANNElectrons, StdLooseDiMuonSameSign, StdAllLooseMuons
+
+        self.SelDiElectron = self.createCombinationSel( OutputList = self.name + "SelDiElectron",
+							DecayDescriptor = "[J/psi(1S) -> e+ e+]cc",
+							DaughterLists = [ StdAllLooseANNElectrons ],
+							PreVertexCuts = config['ElectronCuts'],
+							PostVertexCuts = "( (" + config['DiElectronPCuts'] + ") | (" + config['DiElectronMCuts'] + ") )"
+						    )
+        
+        self.SelDiMuon = self.createSubSel( OutputList = self.name + "SelDiMuon",
+                                             InputList = StdLooseDiMuonSameSign , 
+                                             Cuts = "( (" + config['DiMuonPCuts'] + ") | (" + config['DiMuonMCuts'] + ") )"\
+                                             )
+        
+	self.SelElectronMuon = self.createCombinationSel( OutputList = self.name + "SelElectronMuon",
+							DecayDescriptor = "[J/psi(1S) -> e+ mu-]cc",
+							DaughterLists = [ StdAllLooseANNElectrons, StdAllLooseMuons],
+							PreVertexCuts = config['ElectronMuonComCuts'],
+							PostVertexCuts = "( (" + config['ElectronMuonPCuts'] + ") | (" + config['ElectronMuonMCuts'] + ") )"
+						    )
+                
+        """
+        Basic particles, long tracks
+        """
+        from StandardParticles import StdLooseANNPions, StdLooseANNKaons, StdLooseANNProtons
+        
+        self.SelPions = self.createSubSel( OutputList = self.name + "SelPions",
+                                           InputList =  StdLooseANNPions , 
+                                           Cuts = config['PionCuts']
+                                           )
+        
+        self.SelKaons = self.createSubSel( OutputList = self.name + "SelKaons",
+                                           InputList = StdLooseANNKaons, 
+                                           Cuts = config['KaonCuts']
+                                           )
+                                                   
+        self.SelProtons = self.createSubSel( OutputList = self.name + "SelProtons",
+                                           InputList = StdLooseANNProtons, 
+                                           Cuts = config['ProtonCuts']
+                                           )
+
+        from StandardParticles import StdAllLooseANNPions
+        self.SelPions4LP = self.createSubSel( OutputList = self.name + "SelPions4LP",
+                                              InputList =  StdAllLooseANNPions , 
+                                              Cuts = config['Pion4LPCuts']
+                                              )
+        
+
+        """
+        Kstar
+        """
+        from StandardParticles import StdVeryLooseDetachedKst2Kpi
+        
+        self.SelKstar = self.createSubSel( OutputList = self.name + "SelKstar",
+                                           InputList =  StdVeryLooseDetachedKst2Kpi, 
+                                           Cuts = config['KstarCuts']
+                                           )
+        
+        """
+        Kshort, both LL and DD
+        """
+        from StandardParticles import StdLooseKsDD, StdLooseKsLL
+        
+        self.SelKsDD = self.createSubSel( OutputList = self.name + "SelKsDD",
+                                          InputList = StdLooseKsDD,
+                                          Cuts = config['KsDDCuts'] )
+        
+        """ 
+        self.SelKsLL = self.createSubSel( OutputList = self.name + "SelKsLL",
+                                          InputList = StdLooseKsLL,
+                                          Cuts = config['KsLLCuts'] )
+        """
+        
+        self.SelKsLL = self.createCombinationSel( OutputList = self.name + "SelKsLL",
+                                                  DecayDescriptor = "KS0 -> pi+ pi-",
+                                                  DaughterLists = [ self.SelPions4LP ],                    
+                                                  PreVertexCuts  = config['KsLLComCuts'],
+                                                  PostVertexCuts = config['KsLLCuts'] )
+                
+        self.SelKs = MergedSelection( self.name + "SelKs",
+                                      RequiredSelections = [ self.SelKsDD,
+                                                             self.SelKsLL ] )
+
+                                                           
+        """
+        Phi 
+        """
+        from StandardParticles import StdLoosePhi2KK
+        
+        self.SelPhi = self.createSubSel( OutputList = self.name + "SelPhi",
+                                         InputList =  StdLoosePhi2KK, 
+                                         Cuts = config['PhiCuts']
+                                         )
+
+
+
+        """
+        Lambda, both LL and DD
+        """
+        from StandardParticles import StdLooseLambdaDD, StdLooseLambdaLL
+
+        self.SelLambdaDD = self.createSubSel( OutputList = self.name + "SelLambdaDD",
+                                              InputList = StdLooseLambdaDD,
+                                              Cuts = config['LambdaDDCuts'] )
+
+        self.SelLambdaLL = self.createCombinationSel( OutputList = self.name + "SelLambdaLL",
+                                                      DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                                      DaughterLists = [ self.SelProtons, self.SelPions4LP ],   
+                                                      PreVertexCuts  = config['LambdaLLComCuts'],
+                                                      PostVertexCuts = config['LambdaLLCuts'] )
+        
+        self.SelLambda = MergedSelection( self.name + "SelLambda",
+                                          RequiredSelections = [ self.SelLambdaDD,
+                                                                 self.SelLambdaLL ] )
+
+        """
+        Lambda* -> p K
+        """
+        self.SelLambdastar = self.createCombinationSel( OutputList = self.name + "SelLambdastar",
+                                                        DecayDescriptor = "[Lambda(1520)0 -> p+ K-]cc",
+                                                        DaughterLists = [ self.SelProtons, self.SelKaons ],
+                                                        PreVertexCuts  = config['LambdastarComCuts'],
+                                                        PostVertexCuts = config['LambdastarCuts'] )
+
+
+        #
+        #  Stripping lines here 
+        #
+        self.B2LLHVars = {
+            "sqrt(L1_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(L2_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Jpsi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(H_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(B_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(L1_PT)"                 : "log(CHILD(PT, 1, 1))",
+            "log(L2_PT)"                 : "log(CHILD(PT, 1, 2))", 
+            "log(Jpsi_PT)"               : "log(CHILD(PT, 1))",
+            "log(H_PT)"                  : "log(CHILD(PT, 2))",
+            "log(B_PT)"                  : "log(PT)",
+            "sqrt(Jpsi_FDCHI2_OWNPV)"    : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(B_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "B_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+        
+        """
+        Bu2emuK
+        """
+        self.SelBu2emuK = self.createCombinationSel( OutputList = self.name + "SelBu2emuK",
+                                                    DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                                    DaughterLists = [ self.SelElectronMuon, self.SelKaons ],
+                                                    PreVertexCuts  = config['BComCuts'],
+                                                    PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBu2emuK = self.applyMVA( self.name + "MvaBu2emuK",
+                                        SelB        = self.SelBu2emuK,
+                                        MVAVars     = self.B2LLHVars,
+                                        MVACutValue = config['Bu2eeKMVACut'], 
+                                        MVAxmlFile  = config['Bu2LLKXmlFile']
+                                        )
+
+        self.Bu2emuKLine = StrippingLine( self.name + '_Bu2emuKLine',                                                
+                                         RelatedInfoTools = config['RelatedInfoTools'],                                        
+                                         algos     = [ self.MvaBu2emuK ],
+                                         MDSTFlag  = False
+                                         )
+
+        self.registerLine( self.Bu2emuKLine )
+
+        """
+        Bu2eeK
+        """
+        self.SelBu2eeK = self.createCombinationSel( OutputList = self.name + "SelBu2eeK",
+                                                    DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                                    DaughterLists = [ self.SelDiElectron, self.SelKaons ],
+                                                    PreVertexCuts  = config['BComCuts'],
+                                                    PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBu2eeK = self.applyMVA( self.name + "MvaBu2eeK",
+                                        SelB        = self.SelBu2eeK,
+                                        MVAVars     = self.B2LLHVars,
+                                        MVACutValue = config['Bu2eeKMVACut'], 
+                                        MVAxmlFile  = config['Bu2LLKXmlFile']
+                                        )
+
+        self.Bu2eeKLine = StrippingLine( self.name + '_Bu2eeKLine',                                                
+                                         RelatedInfoTools = config['RelatedInfoTools'],                                        
+                                         algos     = [ self.MvaBu2eeK ],
+                                         MDSTFlag  = False
+                                         )
+
+        self.registerLine( self.Bu2eeKLine )
+
+
+        """
+        Bu2mumuK
+        """
+        self.SelBu2mumuK = self.createCombinationSel( OutputList = self.name + "SelBu2mumuK",
+                                                      DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                                      DaughterLists = [ self.SelDiMuon, self.SelKaons ],                    
+                                                      PreVertexCuts  = config['BComCuts'],
+                                                      PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBu2mumuK = self.applyMVA( self.name + "MvaBu2mumuK",
+                                          SelB        = self.SelBu2mumuK,
+                                          MVAVars     = self.B2LLHVars,
+                                          MVACutValue = config['Bu2mumuKMVACut'], 
+                                          MVAxmlFile  = config['Bu2LLKXmlFile']
+                                          )
+                
+        self.Bu2mumuKLine = StrippingLine( self.name + '_Bu2mumuKLine',                                                
+                                           RelatedInfoTools = config['RelatedInfoTools'],
+                                           algos     = [ self.MvaBu2mumuK ],
+                                           MDSTFlag  = False
+                                           )
+
+        self.registerLine( self.Bu2mumuKLine )
+        
+
+        #
+        # Bd2LLKstar
+        #
+        """
+        B2LLXVars
+        """
+        self.B2LLXVars = {
+            "sqrt(L1_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(L2_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Jpsi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(H1_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 2, 1))",
+            "sqrt(H2_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 2, 2))",
+            "sqrt(X_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(B_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(L1_PT)"                 : "log(CHILD(PT, 1, 1))",
+            "log(L2_PT)"                 : "log(CHILD(PT, 1, 2))", 
+            "log(Jpsi_PT)"               : "log(CHILD(PT, 1))",
+            "log(H1_PT)"                 : "log(CHILD(PT, 2, 1))",
+            "log(H2_PT)"                 : "log(CHILD(PT, 2, 2))", 
+            "log(X_PT)"                  : "log(CHILD(PT, 2))",
+            "log(B_PT)"                  : "log(PT)",
+            "sqrt(Jpsi_FDCHI2_OWNPV)"    : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(X_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,2))",
+            "sqrt(B_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "B_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+
+        """
+        Bd2eeKstar
+        """
+        self.SelBd2eeKstar = self.createCombinationSel( OutputList = self.name + "SelBd2eeKstar",
+                                                        DecayDescriptor = "[B0 -> J/psi(1S) K*(892)0]cc",
+                                                        DaughterLists = [ self.SelDiElectron, self.SelKstar ],
+                                                        PreVertexCuts  = config['BComCuts'],
+                                                        PostVertexCuts = config['BMomCuts'] )
+        
+        self.MvaBd2eeKstar = self.applyMVA( self.name + "MvaBd2eeKstar",
+                                            SelB        = self.SelBd2eeKstar,
+                                            MVAVars     = self.B2LLXVars,
+                                            MVACutValue = config['Bd2eeKstarMVACut'], 
+                                            MVAxmlFile  = config['Bd2LLKstarXmlFile']
+                                            )
+        
+        self.Bd2eeKstarLine = StrippingLine( self.name + '_Bd2eeKstarLine',                                                
+                                             RelatedInfoTools = config['RelatedInfoTools'], 
+                                             algos     = [ self.MvaBd2eeKstar ],
+                                             MDSTFlag  = False
+                                             )
+
+        self.registerLine( self.Bd2eeKstarLine )
+
+        """
+        Bd2mumuKstar
+        """
+        self.SelBd2mumuKstar = self.createCombinationSel( OutputList = self.name + "SelBd2mumuKstar",
+                                                          DecayDescriptor = "[B0 -> J/psi(1S) K*(892)0]cc",
+                                                          DaughterLists = [ self.SelDiMuon, self.SelKstar ],
+                                                          PreVertexCuts  = config['BComCuts'],
+                                                          PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBd2mumuKstar = self.applyMVA( self.name + "MvaBd2mumuKstar",
+                                              SelB        = self.SelBd2mumuKstar,
+                                              MVAVars     = self.B2LLXVars,
+                                              MVACutValue = config['Bd2mumuKstarMVACut'], 
+                                              MVAxmlFile  = config['Bd2LLKstarXmlFile']
+                                              )
+                
+        self.Bd2mumuKstarLine = StrippingLine( self.name + '_Bd2mumuKstarLine',                                                
+                                               RelatedInfoTools = config['RelatedInfoTools'],
+                                               algos     = [ self.MvaBd2mumuKstar ],
+                                               MDSTFlag  = False
+                                               )
+
+        self.registerLine( self.Bd2mumuKstarLine )
+
+        """
+        Bd2eeKs
+        """
+        self.SelBd2eeKs = self.createCombinationSel( OutputList = self.name + "SelBd2eeKs",
+                                                     DecayDescriptor = "B0 -> J/psi(1S) KS0",
+                                                     DaughterLists = [ self.SelDiElectron, self.SelKs ],
+                                                     PreVertexCuts  = config['BComCuts'],
+                                                     PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBd2eeKs = self.applyMVA( self.name + "MvaBd2eeKs",
+                                         SelB        = self.SelBd2eeKs,
+                                         MVAVars     = self.B2LLXVars,
+                                         MVACutValue = config['Bd2eeKsMVACut'], 
+                                         MVAxmlFile  = config['Bd2LLKsXmlFile']
+                                         )
+        
+        self.Bd2eeKsLine = StrippingLine( self.name + '_Bd2eeKsLine',                                                
+                                          RelatedInfoTools = config['RelatedInfoTools'],                                        
+                                          algos     = [ self.MvaBd2eeKs ],
+                                          MDSTFlag  = False
+                                          )
+        
+        self.registerLine( self.Bd2eeKsLine )
+
+
+        """
+        Bd2mumuKs
+        """
+        self.SelBd2mumuKs = self.createCombinationSel( OutputList = self.name + "SelBd2mumuKs",
+                                                       DecayDescriptor = "B0 -> J/psi(1S) KS0",
+                                                       DaughterLists = [ self.SelDiMuon, self.SelKs ],
+                                                       PreVertexCuts  = config['BComCuts'],
+                                                       PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBd2mumuKs = self.applyMVA( self.name + "MvaBd2mumuKs",
+                                           SelB        = self.SelBd2mumuKs,
+                                           MVAVars     = self.B2LLXVars,
+                                           MVACutValue = config['Bd2mumuKsMVACut'], 
+                                           MVAxmlFile  = config['Bd2LLKsXmlFile']
+                                           )
+        
+        self.Bd2mumuKsLine = StrippingLine( self.name + '_Bd2mumuKsLine',                                                
+                                            RelatedInfoTools = config['RelatedInfoTools'],
+                                            algos     = [ self.MvaBd2mumuKs ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.Bd2mumuKsLine )
+
+
+        """
+        Bs2eePhi
+        """
+        self.SelBs2eePhi = self.createCombinationSel( OutputList = self.name + "SelBs2eePhi",
+                                                      DecayDescriptor = "B_s0 -> J/psi(1S) phi(1020)",
+                                                      DaughterLists = [ self.SelDiElectron, self.SelPhi ],
+                                                      PreVertexCuts  = config['BComCuts'],
+                                                      PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBs2eePhi = self.applyMVA( self.name + "MvaBs2eePhi",
+                                          SelB        = self.SelBs2eePhi,
+                                          MVAVars     = self.B2LLXVars,
+                                          MVACutValue = config['Bs2eePhiMVACut'], 
+                                          MVAxmlFile  = config['Bs2LLPhiXmlFile']
+                                          )
+        
+        self.Bs2eePhiLine = StrippingLine( self.name + '_Bs2eePhiLine',                                                
+                                           RelatedInfoTools = config['RelatedInfoTools'],
+                                           algos     = [ self.MvaBs2eePhi ],
+                                           EnableFlavourTagging = True, 
+                                           MDSTFlag  = False
+                                           )
+        
+        self.registerLine( self.Bs2eePhiLine )
+
+        
+        """
+        Bs2mumuPhi
+        """
+        self.SelBs2mumuPhi = self.createCombinationSel( OutputList = self.name + "SelBs2mumuPhi",
+                                                        DecayDescriptor = "B_s0 -> J/psi(1S) phi(1020)",
+                                                        DaughterLists = [ self.SelDiMuon, self.SelPhi ],
+                                                        PreVertexCuts  = config['BComCuts'],
+                                                        PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBs2mumuPhi = self.applyMVA( self.name + "MvaBs2mumuPhi",
+                                            SelB        = self.SelBs2mumuPhi,
+                                            MVAVars     = self.B2LLXVars,
+                                            MVACutValue = config['Bs2mumuPhiMVACut'], 
+                                            MVAxmlFile  = config['Bs2LLPhiXmlFile']
+                                            )
+        
+        self.Bs2mumuPhiLine = StrippingLine( self.name + '_Bs2mumuPhiLine',                                                
+                                             RelatedInfoTools = config['RelatedInfoTools'],
+                                             algos     = [ self.MvaBs2mumuPhi ],
+                                             EnableFlavourTagging = True, 
+                                             MDSTFlag  = False
+                                             )
+        
+        self.registerLine( self.Bs2mumuPhiLine )
+
+
+        """
+        Lb2eeLambda
+        """
+        self.SelLb2eeLambda = self.createCombinationSel( OutputList = self.name + "SelLb2eeLambda",
+                                                         DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda0]cc",
+                                                         DaughterLists = [ self.SelDiElectron, self.SelLambda ],
+                                                         PreVertexCuts  = config['LbComCuts'],
+                                                         PostVertexCuts = config['LbMomCuts'] )
+
+        self.MvaLb2eeLambda = self.applyMVA( self.name + "MvaLb2eeLambda",
+                                             SelB        = self.SelLb2eeLambda,
+                                             MVAVars     = self.B2LLXVars,
+                                             MVACutValue = config['Lb2eeLambdaMVACut'], 
+                                             MVAxmlFile  = config['Lb2LLLambdaXmlFile']
+                                             )
+        
+        self.Lb2eeLambdaLine = StrippingLine( self.name + '_Lb2eeLambdaLine',                                                
+                                              RelatedInfoTools = config['RelatedInfoTools'],                                        
+                                              algos     = [ self.MvaLb2eeLambda ],
+                                              MDSTFlag  = False
+                                              )
+        
+        self.registerLine( self.Lb2eeLambdaLine )
+
+
+        """
+        Lb2mumuLambda
+        """
+        self.SelLb2mumuLambda = self.createCombinationSel( OutputList = self.name + "SelLb2mumuLambda",
+                                                           DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda0]cc",
+                                                           DaughterLists = [ self.SelDiMuon, self.SelLambda ],
+                                                           PreVertexCuts  = config['LbComCuts'],
+                                                           PostVertexCuts = config['LbMomCuts'] )
+
+        self.MvaLb2mumuLambda = self.applyMVA( self.name + "MvaLb2mumuLambda",
+                                               SelB        = self.SelLb2mumuLambda,
+                                               MVAVars     = self.B2LLXVars,
+                                               MVACutValue = config['Lb2mumuLambdaMVACut'], 
+                                               MVAxmlFile  = config['Lb2LLLambdaXmlFile']
+                                               )
+        
+        self.Lb2mumuLambdaLine = StrippingLine( self.name + '_Lb2mumuLambdaLine',                                                
+                                                RelatedInfoTools = config['RelatedInfoTools'],
+                                                algos     = [ self.MvaLb2mumuLambda ],
+                                                MDSTFlag  = False
+                                                )
+        
+        self.registerLine( self.Lb2mumuLambdaLine )
+
+        
+        #
+        # Lb-> LL Kstar
+        #        
+        """
+        Lb2eePK
+        """
+        
+        self.SelLb2eePK = self.createCombinationSel( OutputList = self.name + "SelLb2eePK",
+                                                     DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc",
+                                                     DaughterLists = [ self.SelDiElectron, self.SelLambdastar ],
+                                                     PreVertexCuts  = config['LbComCuts'],
+                                                     PostVertexCuts = config['LbMomCuts'] )
+        
+        self.MvaLb2eePK = self.applyMVA( self.name + "MvaLb2eePK",
+                                         SelB        = self.SelLb2eePK,
+                                         MVAVars     = self.B2LLXVars,
+                                         MVACutValue = config['Lb2eePKMVACut'], 
+                                         MVAxmlFile  = config['Lb2LLPKXmlFile']
+                                         )
+        
+        self.Lb2eePKLine = StrippingLine( self.name + '_Lb2eePKLine',
+                                          RelatedInfoTools = config['RelatedInfoTools'],                                        
+                                          algos     = [ self.MvaLb2eePK ],
+                                          MDSTFlag  = False
+                                          )
+        
+        self.registerLine( self.Lb2eePKLine )
+
+
+        """
+        Lb2mumuPK
+        """
+        self.SelLb2mumuPK = self.createCombinationSel( OutputList = self.name + "SelLb2mumuPK",
+                                                       DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc",
+                                                       DaughterLists = [ self.SelDiMuon, self.SelLambdastar ],
+                                                       PreVertexCuts  = config['LbComCuts'],
+                                                       PostVertexCuts = config['LbMomCuts'] )
+
+        self.MvaLb2mumuPK = self.applyMVA( self.name + "MvaLb2mumuPK",
+                                           SelB        = self.SelLb2mumuPK,
+                                           MVAVars     = self.B2LLXVars,
+                                           MVACutValue = config['Lb2mumuPKMVACut'], 
+                                           MVAxmlFile  = config['Lb2LLPKXmlFile']
+                                           )
+        
+        self.Lb2mumuPKLine = StrippingLine( self.name + '_Lb2mumuPKLine',       
+                                            RelatedInfoTools = config['RelatedInfoTools'], 
+                                            algos     = [ self.MvaLb2mumuPK ],
+                                            MDSTFlag  = False
+                                            )
+        
+        self.registerLine( self.Lb2mumuPKLine )
+        
+        
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDT_Calib.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDT_Calib.py
new file mode 100644
index 000000000..2acda7d41
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2LLXBDT_Calib.py
@@ -0,0 +1,427 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for selecting B->Jpsi(LL (mumu, ee))K(Kstar),
+RelatedInfoToos stolen from StrippingB2LLXBDT
+Note:
+*. CPU-intensive cuts like IPCHI2 are not re-applied
+   if being identical to those in the common particles
+'''
+
+__author__=['Jibo He', 'Yanting Fan']
+__date__ = '10/03/2021'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'B2LLXBDT_CalibConf',
+    'default_config'
+    )
+
+daughter_locations = {
+    # OPPOSITE SIGN
+    # 3-body
+    "[Beauty -> ^X+  (X0 ->  l+  l-)]CC" : "{0}H",
+    "[Beauty ->  X+  (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty ->  X+  (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 4-body with a strange particle in the final state
+    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l-)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l-)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l-)]CC" : "{0}LL",
+}
+
+daughter_vtx_locations = {
+    # OPPOSITE SIGN
+    # 3-body
+    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 4-body
+    "[Beauty -> ^(X0 ->  X+  X-)  (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  X+  X-) ^(X0 ->  l+  l-)]CC" : "{0}LL"
+}
+
+
+default_config = {
+    'NAME'              :  'B2LLXBDT_Calib',
+    'BUILDERTYPE'       :  'B2LLXBDT_CalibConf',
+    'CONFIG'    : {
+	'EETag1Cuts'	: """
+			   (CHILDCUT( (PT>1.5*GeV),1 )) & (CHILDCUT( (PIDe>5.),1 )) & (CHILDCUT( (P>6.0*GeV),1 ))
+			   & (CHILDCUT( (MIPCHI2DV(PRIMARY)>25.),1 )) & (CHILDCUT( (TRGHOSTPROB<1.),1 )) & (CHILDCUT( (TRCHI2DOF<4.),1 ))
+			   & (CHILDCUT( ISLONG,1 ))
+			  """,
+	'EETag2Cuts'	: """
+			   (CHILDCUT( (PT>1.5*GeV),2 )) & (CHILDCUT( (PIDe>5.),2 )) & (CHILDCUT( (P>6.0*GeV),2 ))
+			   & (CHILDCUT( (MIPCHI2DV(PRIMARY)>25.),2 )) & (CHILDCUT( (TRGHOSTPROB<1.),2 )) & (CHILDCUT( (TRCHI2DOF<4.),2 ))
+			   & (CHILDCUT( ISLONG,2 ))
+			  """,
+	'EEProbe1Cuts'	: """
+			   (CHILDCUT( (PT>200*MeV),1 )) & (CHILDCUT( (P>3.0*GeV),1 )) & (CHILDCUT( (MIPCHI2DV(PRIMARY)>1.),1 ))
+			   & (CHILDCUT( ISLONG,1 )) & (CHILDCUT( (TRCHI2DOF<4.),1 ))
+			  """,
+	'EEProbe2Cuts'	: """
+			   (CHILDCUT( (PT>200*MeV),2 )) & (CHILDCUT( (P>3.0*GeV),2 )) & (CHILDCUT( (MIPCHI2DV(PRIMARY)>1.),2 ))
+			   & (CHILDCUT( ISLONG,2 )) & (CHILDCUT( (TRCHI2DOF<4.),2 ))
+			  """,
+	'MMTag1Cuts'	: """
+			   (CHILDCUT( ISMUON,1 )) & (CHILDCUT( (P>3.0*GeV),1 )) & (CHILDCUT( (PT>1.2*GeV),1 ))
+			   & (CHILDCUT( (TRCHI2DOF<4.),1 )) & (CHILDCUT( ISLONG,1 )) & (CHILDCUT( (TRGHOSTPROB<0.2),1 ))
+			   & (CHILDCUT( (MIPCHI2DV(PRIMARY)>9.),1 ))
+			  """,
+	'MMTag2Cuts'	: """
+			   (CHILDCUT( ISMUON,2 )) & (CHILDCUT( (P>3.0*GeV),2 )) & (CHILDCUT( (PT>1.2*GeV),2 ))
+			   & (CHILDCUT( (TRCHI2DOF<4.),2 )) & (CHILDCUT( ISLONG,2 )) & (CHILDCUT( (TRGHOSTPROB<0.2),2 ))
+			   & (CHILDCUT( (MIPCHI2DV(PRIMARY)>9.),2 ))
+			  """,
+	'MMProbe1Cuts'	: """
+			   (CHILDCUT( (TRCHI2DOF<4.),1 )) & (CHILDCUT( ISLONG,1 )) & (CHILDCUT( (P>3.0*GeV),1 ))
+			   & (CHILDCUT( (PT>200*MeV),1 )) & (CHILDCUT( (MIPCHI2DV(PRIMARY)>1.),1 ))
+			  """,
+	'MMProbe2Cuts'	: """
+			   (CHILDCUT( (TRCHI2DOF<4.),2 )) & (CHILDCUT( ISLONG,2 )) & (CHILDCUT( (P>3.0*GeV),2 ))
+			   & (CHILDCUT( (PT>200*MeV),2 )) & (CHILDCUT( (MIPCHI2DV(PRIMARY)>1.),2 ))
+			  """,
+	'EEBothCuts'	: """
+			   (in_range(2196.0*MeV, M, 3596.0*MeV))
+			  """,
+	'EEComCuts'	: """
+			   (in_range(2096.0*MeV, AM, 3696.0*MeV)) & (ACHI2DOCA(1,2) <18)	  
+			  """,
+	'MMBothCuts'	: """
+			   (in_range(2896.0*MeV, M, 3246.0*MeV))
+			  """,
+	'MMComCuts'	: """
+			   (in_range(2796.0*MeV, AM, 3346.0*MeV)) & (ACHI2DOCA(1,2) < 5)
+			  """,
+
+        'KaonCuts'      : "(PROBNNk > 0.1) & (PT>300*MeV) & (TRGHOSTPROB<0.4)",
+        'KstarCuts'     : "(VFASPF(VCHI2/VDOF)<16) & (ADMASS('K*(892)0')< 300*MeV)",
+        
+        'BComCuts'      : "(in_range(3.7*GeV, AM, 6.8*GeV))",
+        'BMomCuts'      : "(in_range(4.0*GeV,  M, 6.5*GeV)) & (VFASPF(VCHI2/VDOF) < 25.) & (BPVDIRA> 0.999) & (BPVDLS>0) & (BPVIPCHI2()<400)",
+
+
+        'Bu2JpsieeKMVACut'       :  "0.",
+        'Bu2JpsimumuKMVACut'     :  "0.",
+        'Bu2LLKXmlFile'		 :  '$TMVAWEIGHTSROOT/data/Bu2eeK_BDT_v1r0.xml',
+
+        'Bd2JpsieeKstarMVACut'   :  "0.",
+        'Bd2JpsimumuKstarMVACut' :  "0.",
+        'Bd2LLKstarXmlFile'	 :  '$TMVAWEIGHTSROOT/data/Bd2eeKstar_BDT_v1r0.xml',
+        
+	'RelatedInfoTools'     : [
+            {'Type'              : 'RelInfoVertexIsolation',
+             'Location'          : 'VertexIsoInfo',
+             'IgnoreUnmatchedDescriptors': True, 
+             'DaughterLocations' : {key: val.format('VertexIsoInfo') for key, val in daughter_vtx_locations.items()}},
+            {'Type'              : 'RelInfoVertexIsolationBDT',
+             'Location'          : 'VertexIsoBDTInfo',
+             'IgnoreUnmatchedDescriptors': True, 
+             'DaughterLocations' : {key: val.format('VertexIsoBDTInfo') for key, val in daughter_vtx_locations.items()}},
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 0.5,
+             'IgnoreUnmatchedDescriptors': True, 
+             'Location' : 'TrackIsoInfo05',
+             'DaughterLocations' : {key: val.format('TrackIsoInfo') for key, val in daughter_locations.items()}},
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'          : 0.5,
+             'IgnoreUnmatchedDescriptors': True, 
+             'Location' : 'ConeIsoInfo05',
+             'DaughterLocations' : {key: val.format('ConeIsoInfo') for key, val in daughter_locations.items()}},
+            {'Type'              : 'RelInfoBs2MuMuTrackIsolations',
+             'IgnoreUnmatchedDescriptors': True,
+             'Location' : 'TrackIsoBs2MMInfo',
+             'DaughterLocations' : {key: val.format('TrackIsoBs2MMInfo') for key, val in daughter_locations.items()}},
+
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 1.0,
+             'Location'          : 'TrackIsoInfo10'
+            },
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 1.5,
+             'Location'          : 'TrackIsoInfo15'
+            },
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 2.0,
+             'Location'          : 'TrackIsoInfo20'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 1.0,
+             'Location'          : 'ConeIsoInfo10'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 1.5,
+             'Location'          : 'ConeIsoInfo15'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 2.0,
+             'Location'          : 'ConeIsoInfo20'
+            }
+            ]        
+        },
+    'STREAMS'           : ['Leptonic' ],
+    'WGs'               : ['RD']
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles 
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class B2LLXBDT_CalibConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config ): 
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name 
+        self.config = config
+
+        """
+        Di letpons
+        """
+        from StandardParticles import StdDiElectronFromTracks, StdLooseDiMuon, StdAllNoPIDsElectrons, StdAllNoPIDsMuons
+
+
+        self.SelDiElectron = self.createCombinationSel( OutputList = self.name + "SelDiElectron",
+							DecayDescriptor = 'J/psi(1S) -> e+ e-',
+							DaughterLists = [ StdAllNoPIDsElectrons ],
+							PreVertexCuts = config['EEComCuts'],	
+							PostVertexCuts = "( " + config['EEBothCuts'] + " & ( (" + config['EETag1Cuts'] + " & " + config['EEProbe2Cuts'] + ") | (" + config['EETag2Cuts'] + " & " + config['EEProbe1Cuts'] + ") ) )"
+							)
+
+        self.SelDiMuon = self.createCombinationSel( OutputList = self.name + "SelDiMuon",
+						    DecayDescriptor = 'J/psi(1S) -> mu+ mu-',
+						    DaughterLists = [ StdAllNoPIDsMuons ],
+						    PreVertexCuts = config['MMComCuts'],
+						    PostVertexCuts = "( " + config['MMBothCuts'] + " & ( (" + config['MMTag1Cuts'] + " & " + config['MMProbe2Cuts'] + ") | (" + config['MMTag2Cuts'] + " & " + config['MMProbe1Cuts'] + ") ) )"
+						    )
+        """
+        Basic particles, long tracks
+        """
+        from StandardParticles import StdLooseANNKaons
+
+        self.SelKaons = self.createSubSel( OutputList = self.name + "SelKaons",
+                                           InputList = StdLooseANNKaons, 
+                                           Cuts = config['KaonCuts']
+                                           )
+        
+	"""
+        Kstar
+        """
+        from StandardParticles import StdVeryLooseDetachedKst2Kpi
+        
+        self.SelKstar = self.createSubSel( OutputList = self.name + "SelKstar",
+                                           InputList =  StdVeryLooseDetachedKst2Kpi, 
+                                           Cuts = config['KstarCuts']
+                                           )
+                                                   
+        
+        #
+        #  Stripping lines here 
+        #
+        self.B2LLHVars = {
+            "sqrt(L1_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(L2_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Jpsi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(H_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(B_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(L1_PT)"                 : "log(CHILD(PT, 1, 1))",
+            "log(L2_PT)"                 : "log(CHILD(PT, 1, 2))", 
+            "log(Jpsi_PT)"               : "log(CHILD(PT, 1))",
+            "log(H_PT)"                  : "log(CHILD(PT, 2))",
+            "log(B_PT)"                  : "log(PT)",
+            "sqrt(Jpsi_FDCHI2_OWNPV)"    : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(B_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "B_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+        
+        """
+        Bu2JpsieeK
+        """
+        self.SelBu2JpsieeK = self.createCombinationSel( OutputList = self.name + "SelBu2JpsieeK",
+                                                    DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                                    DaughterLists = [ self.SelDiElectron, self.SelKaons ],
+                                                    PreVertexCuts  = config['BComCuts'],
+                                                    PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBu2JpsieeK = self.applyMVA( self.name + "MvaBu2JpsieeK",
+                                        SelB        = self.SelBu2JpsieeK,
+                                        MVAVars     = self.B2LLHVars,
+                                        MVACutValue = config['Bu2JpsieeKMVACut'], 
+                                        MVAxmlFile  = config['Bu2LLKXmlFile']
+                                        )
+
+        self.Bu2JpsieeKLine = StrippingLine( self.name + '_Bu2JpsieeKLine',                                                
+                                         RelatedInfoTools = config['RelatedInfoTools'],                                        
+                                         algos     = [ self.MvaBu2JpsieeK ],
+                                         MDSTFlag  = False
+                                         )
+
+        self.registerLine( self.Bu2JpsieeKLine )
+
+
+        """
+        Bu2JpsimumuK
+        """
+        self.SelBu2JpsimumuK = self.createCombinationSel( OutputList = self.name + "SelBu2JpsimumuK",
+                                                      DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
+                                                      DaughterLists = [ self.SelDiMuon, self.SelKaons ],                    
+                                                      PreVertexCuts  = config['BComCuts'],
+                                                      PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBu2JpsimumuK = self.applyMVA( self.name + "MvaBu2JpsimumuK",
+                                          SelB        = self.SelBu2JpsimumuK,
+                                          MVAVars     = self.B2LLHVars,
+                                          MVACutValue = config['Bu2JpsimumuKMVACut'], 
+                                          MVAxmlFile  = config['Bu2LLKXmlFile']
+                                          )
+                
+        self.Bu2JpsimumuKLine = StrippingLine( self.name + '_Bu2JpsimumuKLine',                                                
+                                           RelatedInfoTools = config['RelatedInfoTools'],
+                                           algos     = [ self.MvaBu2JpsimumuK ],
+                                           MDSTFlag  = False
+                                           )
+
+        self.registerLine( self.Bu2JpsimumuKLine )
+        
+        #
+        # Bd2LLKstar
+        #
+        """
+        B2LLXVars
+        """
+        self.B2LLXVars = {
+            "sqrt(L1_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 1))",
+            "sqrt(L2_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 1, 2))",
+            "sqrt(Jpsi_IPCHI2_OWNPV)"    : "sqrt(CHILD(MIPCHI2DV(), 1 ))",
+            "sqrt(H1_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 2, 1))",
+            "sqrt(H2_IPCHI2_OWNPV)"      : "sqrt(CHILD(MIPCHI2DV(), 2, 2))",
+            "sqrt(X_IPCHI2_OWNPV)"       : "sqrt(CHILD(MIPCHI2DV(), 2 ))",
+            "sqrt(B_IPCHI2_OWNPV)"       : "sqrt(BPVIPCHI2())" ,
+            "log(L1_PT)"                 : "log(CHILD(PT, 1, 1))",
+            "log(L2_PT)"                 : "log(CHILD(PT, 1, 2))", 
+            "log(Jpsi_PT)"               : "log(CHILD(PT, 1))",
+            "log(H1_PT)"                 : "log(CHILD(PT, 2, 1))",
+            "log(H2_PT)"                 : "log(CHILD(PT, 2, 2))", 
+            "log(X_PT)"                  : "log(CHILD(PT, 2))",
+            "log(B_PT)"                  : "log(PT)",
+            "sqrt(Jpsi_FDCHI2_OWNPV)"    : "sqrt(CHILD(BPVVDCHI2,1))",
+            "sqrt(X_FDCHI2_OWNPV)"       : "sqrt(CHILD(BPVVDCHI2,2))",
+            "sqrt(B_FDCHI2_OWNPV)"       : "sqrt(BPVVDCHI2)" ,
+            "B_DIRA_OWNPV"               : "BPVDIRA"
+            }
+
+
+        """
+        Bd2JpsieeKstar
+        """
+        self.SelBd2JpsieeKstar = self.createCombinationSel( OutputList = self.name + "SelBd2JpsieeKstar",
+                                                        DecayDescriptor = "[B0 -> J/psi(1S) K*(892)0]cc",
+                                                        DaughterLists = [ self.SelDiElectron, self.SelKstar ],
+                                                        PreVertexCuts  = config['BComCuts'],
+                                                        PostVertexCuts = config['BMomCuts'] )
+        
+        self.MvaBd2JpsieeKstar = self.applyMVA( self.name + "MvaBd2JpsieeKstar",
+                                            SelB        = self.SelBd2JpsieeKstar,
+                                            MVAVars     = self.B2LLXVars,
+                                            MVACutValue = config['Bd2JpsieeKstarMVACut'], 
+                                            MVAxmlFile  = config['Bd2LLKstarXmlFile']
+                                            )
+        
+        self.Bd2JpsieeKstarLine = StrippingLine( self.name + '_Bd2JpsieeKstarLine',                                                
+                                             RelatedInfoTools = config['RelatedInfoTools'], 
+                                             algos     = [ self.MvaBd2JpsieeKstar ],
+                                             MDSTFlag  = False
+                                             )
+
+        self.registerLine( self.Bd2JpsieeKstarLine )
+
+        """
+        Bd2JpsimumuKstar
+        """
+        self.SelBd2JpsimumuKstar = self.createCombinationSel( OutputList = self.name + "SelBd2JpsimumuKstar",
+                                                          DecayDescriptor = "[B0 -> J/psi(1S) K*(892)0]cc",
+                                                          DaughterLists = [ self.SelDiMuon, self.SelKstar ],
+                                                          PreVertexCuts  = config['BComCuts'],
+                                                          PostVertexCuts = config['BMomCuts'] )
+
+        self.MvaBd2JpsimumuKstar = self.applyMVA( self.name + "MvaBd2JpsimumuKstar",
+                                              SelB        = self.SelBd2JpsimumuKstar,
+                                              MVAVars     = self.B2LLXVars,
+                                              MVACutValue = config['Bd2JpsimumuKstarMVACut'], 
+                                              MVAxmlFile  = config['Bd2LLKstarXmlFile']
+                                              )
+                
+        self.Bd2JpsimumuKstarLine = StrippingLine( self.name + '_Bd2JpsimumuKstarLine',                                                
+                                               RelatedInfoTools = config['RelatedInfoTools'],
+                                               algos     = [ self.MvaBd2JpsimumuKstar ],
+                                               MDSTFlag  = False
+                                               )
+
+        self.registerLine( self.Bd2JpsimumuKstarLine )
+
+       
+
+        
+
+    def createSubSel( self, OutputList, InputList, Cuts ) :
+        '''create a selection using a FilterDesktop'''
+        filter = FilterDesktop(Code = Cuts)
+        return Selection( OutputList,
+                          Algorithm = filter,
+                          RequiredSelections = [ InputList ] )
+
+    def createCombinationSel( self, OutputList,
+                              DecayDescriptor,
+                              DaughterLists,
+                              DaughterCuts = {} ,
+                              PreVertexCuts = "ALL",
+                              PostVertexCuts = "ALL",
+                              ReFitPVs = True ) :
+        '''create a selection using a ParticleCombiner with a single decay descriptor'''
+        combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                     DaughtersCuts = DaughterCuts,
+                                     MotherCut = PostVertexCuts,
+                                     CombinationCut = PreVertexCuts,
+                                     ReFitPVs = False)
+        return Selection ( OutputList,
+                           Algorithm = combiner,
+                           RequiredSelections = DaughterLists)
+
+    def applyMVA( self, name, 
+                  SelB,
+                  MVAVars,
+                  MVAxmlFile,
+                  MVACutValue
+                  ):
+        from MVADictHelpers import addTMVAclassifierValue
+        from Configurables import FilterDesktop as MVAFilterDesktop
+
+        _FilterB = MVAFilterDesktop( name + "Filter",
+                                     Code = "VALUE('LoKi::Hybrid::DictValue/" + name + "')>" + MVACutValue  )
+
+        addTMVAclassifierValue( Component = _FilterB,
+                                XMLFile   = MVAxmlFile,
+                                Variables = MVAVars,
+                                ToolName  = name )
+        
+        return Selection( name,
+                          Algorithm =  _FilterB,
+                          RequiredSelections = [ SelB ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0ELines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0ELines.py
new file mode 100644
index 000000000..f3499ebd9
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0ELines.py
@@ -0,0 +1,162 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+B->Lambda0 E  reconstruction
+"""
+
+__author__ = ['Federico Redi']
+__date__ = '08/04/2015'
+__version__ = '$Revision: 0.2 $'
+
+__all__ = ('B2Lambda0ELines',
+           '_Bu2LambdaSSE',
+           'default_config')
+
+from StandardParticles import StdLoosePions, StdLooseElectrons, StdNoPIDsDownElectrons, StdNoPIDsDownPions
+from Configurables import TisTosParticleTagger
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import DataOnDemand, Selection, MergedSelection
+
+default_config = {
+    'NAME'        : 'B2Lambda0E',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'B2Lambda0ELines',
+    'CONFIG'      : { "GEC_nLongTrk"          : 300.  ,#adimensional
+                      #Electrons
+                      "ElectronGHOSTPROB"         : 0.5   ,#adimensional
+                      "ElectronTRCHI2"            : 4.    ,#adimensional
+                      "ElectronP"                 : 3000. ,#MeV
+                      "ElectronPT"                : 250.  ,#MeV
+                      "ElectronPIDK"              : 3.0    ,#adimensional
+                      "ElectronPIDpi"             : 3.0    ,#adimensional
+                      "ElectronPIDp"              : 3.0    ,#adimensional
+                      "ElectronMINIPCHI2"         : 12    ,#adminensional
+                      #Lambda Daughter Cuts
+                      "Lambda0DaugP"          : 2000. ,#MeV
+                      "Lambda0DaugPT"         : 250.  ,#MeV
+                      "Lambda0DaugTrackChi2"  : 4.    ,#adimensional
+                      "Lambda0DaugMIPChi2"    : 10.   ,#adimensional
+                      #Lambda cuts
+                      "MajoranaCutFDChi2"   : 100.  ,#adimensional
+                      "MajoranaCutM"        : 1500. ,#MeV
+                      "Lambda0VertexChi2"     : 10.   ,#adimensional
+                      "Lambda0PT"             : 700.  ,#adimensional
+                      #B Mother Cuts
+                      "BVCHI2DOF"             : 4.    ,#adminensional
+                      "BDIRA"                 : 0.99  ,#adminensional
+                      "LambdaEMassLowTight"  : 1500. ,#MeV
+                      "XEMassUpperHigh"      : 6500. ,#MeV
+                      'LambdaZ'               : -1.     #mm
+                      } ,
+    'STREAMS'     : ['EW']
+    }
+
+class B2Lambda0ELines( LineBuilder ) :
+    """Definition of B ->Lambda0 E (Lambda0->EPi) stripping"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+
+        self._stdLooseKsLL = DataOnDemand("Phys/StdLooseKsLL/Particles")
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        self._electronSel=None
+        self._downelectronSel=None
+        self._electronFilter()
+        self._selE=None
+        self.registerLine(self._LambdaMajoranaSSE_line())
+
+    def _NominalESelection( self ):
+        return "(TRCHI2DOF < %(ElectronTRCHI2)s ) &  (P> %(ElectronP)s *MeV) &  (PT> %(ElectronPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(ElectronGHOSTPROB)s)"\
+               "& (PIDe-PIDpi> %(ElectronPIDpi)s )"\
+               "& (PIDe-PIDp> %(ElectronPIDp)s )"\
+               "& (PIDe-PIDK> %(ElectronPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(ElectronMINIPCHI2)s )"
+
+    ######LambdaortMajoranaLine######
+    def _LambdaMajoranaSSE_line( self ):
+        return StrippingLine(self._name+'Bu2LambdaSSELine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2LambdaSSE()])
+
+    ######--######
+    def _downElectronFilter( self ):
+        if self._downelectronSel is not None:
+            return self._downelectronSel
+
+        _e = FilterDesktop( Code = self._NominalESelection() % self._config )
+        _eSel=Selection("downElectron_for"+self._name,
+                         Algorithm=_e,
+                         RequiredSelections = [StdNoPIDsDownElectrons])
+        self._downelectronSel=_eSel
+        return _eSel
+
+    def _electronFilter( self ):
+        if self._electronSel is not None:
+            return self._electronSel
+
+        _e = FilterDesktop( Code = self._NominalESelection() % self._config )
+        _eSel=Selection("Electron_for"+self._name,
+                         Algorithm=_e,
+                         RequiredSelections = [StdLooseElectrons])
+        self._electronSel=_eSel
+        return _eSel
+
+    ######--######
+
+    def _LambdaMajoranaEFilter( self ):
+        if self._selE is not None:
+          return self._selE
+
+        _Lambda = CombineParticles(
+            DecayDescriptors = ["[Lambda0 -> e- pi+]cc"],
+            DaughtersCuts   = {"pi+":"(P > %(Lambda0DaugP)s)& (PT > %(Lambda0DaugPT)s)"\
+                               "& (TRCHI2DOF < %(Lambda0DaugTrackChi2)s)" \
+                               "& (MIPCHI2DV(PRIMARY) > %(Lambda0DaugMIPChi2)s)"   % self._config
+                               },
+            CombinationCut  = "(ADOCACHI2CUT(25, ''))"% self._config,
+            MotherCut       = "( M > %(MajoranaCutM)s*MeV )&( BPVVDCHI2 > %(MajoranaCutFDChi2)s )&( VFASPF(VCHI2/VDOF) < %(Lambda0VertexChi2)s )&( PT > %(Lambda0PT)s*MeV )" % self._config
+            )
+        _LambdaMajoranaSSESel=Selection("LambdaMajoranaSSE_for"+self._name,
+                                      Algorithm=_Lambda,
+                                      RequiredSelections = [StdLoosePions, self._electronFilter()])
+        _downLambdaMajoranaSSESel=Selection("downLambdaMajoranaSSE_for"+self._name,
+                                      Algorithm=_Lambda,
+                                      RequiredSelections = [StdNoPIDsDownPions, self._downElectronFilter()])
+        self._LambdaMajoranaSSESel=_LambdaMajoranaSSESel
+        self._downLambdaMajoranaSSESel=_downLambdaMajoranaSSESel
+        _selE = MergedSelection("Selection_"+self._name+"_LambdaMajoranaSSE",
+                                      RequiredSelections = [ _LambdaMajoranaSSESel, _downLambdaMajoranaSSESel ])
+        return _selE
+
+
+    ######Bu->Lambdae SS & OS######
+    def _Bu2LambdaSSE( self ):
+        _LambdaSSE_SSE = CombineParticles(
+            DecayDescriptors = ["[B- -> Lambda0 e-]cc"],
+            CombinationCut = "(AM>%(LambdaEMassLowTight)s*MeV) & (AM<%(XEMassUpperHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+            "& ( MINTREE((ABSID=='Lambda0'),VFASPF(VZ)) - VFASPF(VZ) > %(LambdaZ)s *mm )" % self._config,
+            ReFitPVs = True
+            )
+        _LambdaSSE_SSESel=Selection("LambdaSSE_SSE_for"+self._name,
+                              Algorithm=_LambdaSSE_SSE,
+                              RequiredSelections = [self._electronFilter(), self._LambdaMajoranaEFilter()])
+        return _LambdaSSE_SSESel
+
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0MuLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0MuLines.py
new file mode 100644
index 000000000..80573eacf
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0MuLines.py
@@ -0,0 +1,162 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+B->Lambda0 Mu  reconstruction
+"""
+
+__author__ = ['Federico Redi']
+__date__ = '14/01/2019'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = ('B2Lambda0MuLines',
+           '_Bu2LambdaSSMu',
+           'default_config')
+
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseDownMuons, StdNoPIDsDownPions
+from Configurables import TisTosParticleTagger
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import DataOnDemand, Selection, MergedSelection
+
+default_config = {
+    'NAME'        : 'B2Lambda0Mu',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'B2Lambda0MuLines',
+    'CONFIG'      : { "GEC_nLongTrk"          : 300.  ,#adimensional
+                      #Muons
+                      "MuonGHOSTPROB"         : 0.5   ,#adimensional
+                      "MuonTRCHI2"            : 4.    ,#adimensional
+                      "MuonP"                 : 3000. ,#MeV
+                      "MuonPT"                : 250.  ,#MeV
+                      "MuonPIDK"              : 0.    ,#adimensional
+                      "MuonPIDmu"             : 0.    ,#adimensional
+                      "MuonPIDp"              : 0.    ,#adimensional
+                      "MuonMINIPCHI2"         : 12    ,#adminensional
+                      #Lambda Daughter Cuts
+                      "Lambda0DaugP"          : 2000. ,#MeV
+                      "Lambda0DaugPT"         : 250.  ,#MeV
+                      "Lambda0DaugTrackChi2"  : 4.    ,#adimensional
+                      "Lambda0DaugMIPChi2"    : 10.   ,#adimensional
+                      #Lambda cuts
+                      "MajoranaCutFDChi2"   : 100.  ,#adimensional
+                      "MajoranaCutM"        : 1500. ,#MeV
+                      "Lambda0VertexChi2"     : 10.   ,#adimensional
+                      "Lambda0PT"             : 700.  ,#adimensional
+                      #B Mother Cuts
+                      "BVCHI2DOF"             : 4.    ,#adminensional
+                      "BDIRA"                 : 0.99  ,#adminensional
+                      "LambdaMuMassLowTight"  : 1500. ,#MeV
+                      "XMuMassUpperHigh"      : 6500. ,#MeV
+                      'LambdaZ'               : -1.     #mm
+                      } ,
+    'STREAMS'     : ['Dimuon']
+    }
+
+class B2Lambda0MuLines( LineBuilder ) :
+    """Definition of B ->Lambda0 Mu (Lambda0->MuPi) stripping"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+
+        self._stdLooseKsLL = DataOnDemand("Phys/StdLooseKsLL/Particles")
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        self._muonSel=None
+        self._downmuonSel=None
+        self._muonFilter()
+        self._selMu=None
+        self.registerLine(self._LambdaMajoranaSSMu_line())
+
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (PIDmu-PIDpi> %(MuonPIDmu)s )"\
+               "& (PIDmu-PIDp> %(MuonPIDp)s )"\
+               "& (PIDmu-PIDK> %(MuonPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+
+    ######LambdaortMajoranaLine######
+    def _LambdaMajoranaSSMu_line( self ):
+        return StrippingLine(self._name+'Bu2LambdaSSMuLine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2LambdaSSMu()])
+
+    ######--######
+    def _downMuonFilter( self ):
+        if self._downmuonSel is not None:
+            return self._downmuonSel
+
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("downMuon_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseDownMuons])
+        self._downmuonSel=_muSel
+        return _muSel
+
+    def _muonFilter( self ):
+        if self._muonSel is not None:
+            return self._muonSel
+
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("Muon_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseMuons])
+        self._muonSel=_muSel
+        return _muSel
+
+    ######--######
+
+    def _LambdaMajoranaMuFilter( self ):
+        if self._selMu is not None:
+          return self._selMu
+
+        _Lambda = CombineParticles(
+            DecayDescriptors = ["[Lambda0 -> mu- pi+]cc"],
+            DaughtersCuts   = {"pi+":"(P > %(Lambda0DaugP)s)& (PT > %(Lambda0DaugPT)s)"\
+                               "& (TRCHI2DOF < %(Lambda0DaugTrackChi2)s)" \
+                               "& (MIPCHI2DV(PRIMARY) > %(Lambda0DaugMIPChi2)s)"   % self._config
+                               },
+            CombinationCut  = "(ADOCACHI2CUT(25, ''))"% self._config,
+            MotherCut       = "( M > %(MajoranaCutM)s*MeV )&( BPVVDCHI2 > %(MajoranaCutFDChi2)s )&( VFASPF(VCHI2/VDOF) < %(Lambda0VertexChi2)s )&( PT > %(Lambda0PT)s*MeV )" % self._config
+            )
+        _LambdaMajoranaSSMuSel=Selection("LambdaMajoranaSSMu_for"+self._name,
+                                      Algorithm=_Lambda,
+                                      RequiredSelections = [StdLoosePions, self._muonFilter()])
+        _downLambdaMajoranaSSMuSel=Selection("downLambdaMajoranaSSMu_for"+self._name,
+                                      Algorithm=_Lambda,
+                                      RequiredSelections = [StdNoPIDsDownPions, self._downMuonFilter()])
+        self._LambdaMajoranaSSMuSel=_LambdaMajoranaSSMuSel
+        self._downLambdaMajoranaSSMuSel=_downLambdaMajoranaSSMuSel
+        _selMu = MergedSelection("Selection_"+self._name+"_LambdaMajoranaSSMu",
+                                      RequiredSelections = [ _LambdaMajoranaSSMuSel, _downLambdaMajoranaSSMuSel ])
+        return _selMu
+
+
+    ######Bu->LambdaMu SS & OS######
+    def _Bu2LambdaSSMu( self ):
+        _LambdaSSMu_SSMu = CombineParticles(
+            DecayDescriptors = ["[B- -> Lambda0 mu-]cc"],
+            CombinationCut = "(AM>%(LambdaMuMassLowTight)s*MeV) & (AM<%(XMuMassUpperHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+            "& ( MINTREE((ABSID=='Lambda0'),VFASPF(VZ)) - VFASPF(VZ) > %(LambdaZ)s *mm )" % self._config,
+            ReFitPVs = True
+            )
+        _LambdaSSMu_SSMuSel=Selection("LambdaSSMu_SSMu_for"+self._name,
+                              Algorithm=_LambdaSSMu_SSMu,
+                              RequiredSelections = [self._muonFilter(), self._LambdaMajoranaMuFilter()])
+        return _LambdaSSMu_SSMuSel
+
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0MuOSLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0MuOSLines.py
new file mode 100644
index 000000000..12a49fe08
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0MuOSLines.py
@@ -0,0 +1,162 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+B->Lambda0 Mu OS reconstruction
+"""
+
+__author__ = ['Federico Leo Redi']
+__date__ = '14/01/2019'
+__version__ = '$Revision: 0.1 $'
+
+__all__ = ('B2Lambda0MuOSLines',
+           '_Bu2LambdaOSMu',
+           'default_config')
+
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseDownMuons, StdNoPIDsDownPions
+from Configurables import TisTosParticleTagger
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import DataOnDemand, Selection, MergedSelection
+
+default_config = {
+    'NAME'        : 'B2Lambda0MuOS',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'B2Lambda0MuOSLines',
+    'CONFIG'      : { "GEC_nLongTrk"          : 300.  ,#adimensional
+                      #Muons
+                      "MuonGHOSTPROB"         : 0.5   ,#adimensional
+                      "MuonTRCHI2"            : 4.    ,#adimensional
+                      "MuonP"                 : 3000. ,#MeV
+                      "MuonPT"                : 250.  ,#MeV
+                      "MuonPIDK"              : 0.    ,#adimensional
+                      "MuonPIDmu"             : 0.    ,#adimensional
+                      "MuonPIDp"              : 0.    ,#adimensional
+                      "MuonMINIPCHI2"         : 12    ,#adminensional
+                      #Lambda Daughter Cuts
+                      "Lambda0DaugP"          : 2000. ,#MeV
+                      "Lambda0DaugPT"         : 250.  ,#MeV
+                      "Lambda0DaugTrackChi2"  : 4.    ,#adimensional
+                      "Lambda0DaugMIPChi2"    : 10.   ,#adimensional
+                      #Lambda cuts
+                      "MajoranaCutFDChi2"   : 100.  ,#adimensional
+                      "MajoranaCutM"        : 1500. ,#MeV
+                      "Lambda0VertexChi2"     : 10.   ,#adimensional
+                      "Lambda0PT"             : 700.  ,#adimensional
+                      #B Mother Cuts
+                      "BVCHI2DOF"             : 4.    ,#adminensional
+                      "BDIRA"                 : 0.99  ,#adminensional
+                      "LambdaMuMassLowTight"  : 1500. ,#MeV
+                      "XMuMassUpperHigh"      : 6500. ,#MeV
+                      'LambdaZ'               : 5.0     #mm
+                      } ,
+    'STREAMS'     : ['Dimuon']
+    }
+
+class B2Lambda0MuOSLines( LineBuilder ) :
+    """Definition of B ->Lambda0 Mu (Lambda0->MuPi) OS stripping"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+
+        self._stdLooseKsLL = DataOnDemand("Phys/StdLooseKsLL/Particles")
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        self._muonSel=None
+        self._downmuonSel=None
+        self._muonFilter()
+        self._selMu=None
+        self.registerLine(self._LambdaMajoranaOSMu_line())
+
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (PIDmu-PIDpi> %(MuonPIDmu)s )"\
+               "& (PIDmu-PIDp> %(MuonPIDp)s )"\
+               "& (PIDmu-PIDK> %(MuonPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+
+    ######LambdaortMajoranaLine######
+    def _LambdaMajoranaOSMu_line( self ):
+        return StrippingLine(self._name+'Bu2LambdaOSMuLine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2LambdaOSMu()])
+
+    ######--######
+    def _downMuonFilter( self ):
+        if self._downmuonSel is not None:
+            return self._downmuonSel
+
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("downMuon_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseDownMuons])
+        self._downmuonSel=_muSel
+        return _muSel
+
+    def _muonFilter( self ):
+        if self._muonSel is not None:
+            return self._muonSel
+
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("Muon_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseMuons])
+        self._muonSel=_muSel
+        return _muSel
+
+    ######--######
+
+    def _LambdaMajoranaMuFilter( self ):
+        if self._selMu is not None:
+          return self._selMu
+
+        _Lambda = CombineParticles(
+            DecayDescriptors = ["[Lambda0 -> mu- pi+]cc"],
+            DaughtersCuts   = {"pi+":"(P > %(Lambda0DaugP)s)& (PT > %(Lambda0DaugPT)s)"\
+                               "& (TRCHI2DOF < %(Lambda0DaugTrackChi2)s)" \
+                               "& (MIPCHI2DV(PRIMARY) > %(Lambda0DaugMIPChi2)s)"   % self._config
+                               },
+            CombinationCut  = "(ADOCACHI2CUT(25, ''))"% self._config,
+            MotherCut       = "( M > %(MajoranaCutM)s*MeV )&( BPVVDCHI2 > %(MajoranaCutFDChi2)s )&( VFASPF(VCHI2/VDOF) < %(Lambda0VertexChi2)s )&( PT > %(Lambda0PT)s*MeV )" % self._config
+            )
+        _LambdaMajoranaOSMuSel=Selection("LambdaMajoranaOSMu_for"+self._name,
+                                      Algorithm=_Lambda,
+                                      RequiredSelections = [StdLoosePions, self._muonFilter()])
+        _downLambdaMajoranaOSMuSel=Selection("downLambdaMajoranaOSMu_for"+self._name,
+                                      Algorithm=_Lambda,
+                                      RequiredSelections = [StdNoPIDsDownPions, self._downMuonFilter()])
+        self._LambdaMajoranaOSMuSel=_LambdaMajoranaOSMuSel
+        self._downLambdaMajoranaOSMuSel=_downLambdaMajoranaOSMuSel
+        _selMu = MergedSelection("Selection_"+self._name+"_LambdaMajoranaOSMu",
+                                      RequiredSelections = [ _LambdaMajoranaOSMuSel, _downLambdaMajoranaOSMuSel ])
+        return _selMu
+
+
+    ######Bu->LambdaMu SS & OS######
+    def _Bu2LambdaOSMu( self ):
+        _LambdaOSMu_OSMu = CombineParticles(
+            DecayDescriptors = ["[B- -> Lambda0 mu-]cc","[B- -> Lambda~0 mu-]cc"],
+            CombinationCut = "(AM>%(LambdaMuMassLowTight)s*MeV) & (AM<%(XMuMassUpperHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+            "& ( MINTREE((ABSID=='Lambda0'),VFASPF(VZ)) - VFASPF(VZ) > %(LambdaZ)s *mm )" % self._config,
+            ReFitPVs = True
+            )
+        _LambdaOSMu_OSMuSel=Selection("LambdaOSMu_OSMu_for"+self._name,
+                              Algorithm=_LambdaOSMu_OSMu,
+                              RequiredSelections = [self._muonFilter(), self._LambdaMajoranaMuFilter()])
+        return _LambdaOSMu_OSMuSel
+
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0SSMuMu3PiLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0SSMuMu3PiLines.py
new file mode 100644
index 000000000..1b4ef12e4
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2Lambda0SSMuMu3PiLines.py
@@ -0,0 +1,162 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+B->HNL Mu+ with HNL->Mu+Pi+Pi-Pi+  reconstruction
+"""
+
+__author__ = ['Martino Borsato']
+__date__ = '24/01/2019'
+__version__ = '$Revision: 0.1 $'
+
+__all__ = ('B2Lambda0SSMuMu3PiLines',
+           '_Bu2LambdaSSMu',
+           'default_config')
+
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseDownMuons, StdNoPIDsDownPions
+from Configurables import TisTosParticleTagger
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import DataOnDemand, Selection, MergedSelection
+
+default_config = {
+    'NAME'        : 'B2Lambda0SSMuMu3Pi',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'B2Lambda0SSMuMu3PiLines',
+    'CONFIG'      : { "GEC_nLongTrk"          : 300.  ,#adimensional
+                      #Muons
+                      "MuonGHOSTPROB"         : 0.5   ,#adimensional
+                      "MuonTRCHI2"            : 4.    ,#adimensional
+                      "MuonP"                 : 3000. ,#MeV
+                      "MuonPT"                : 250.  ,#MeV
+                      "MuonPIDK"              : 0.    ,#adimensional
+                      "MuonPIDmu"             : 0.    ,#adimensional
+                      "MuonPIDp"              : 0.    ,#adimensional
+                      "MuonMINIPCHI2"         : 12    ,#adminensional
+                      #Lambda Daughter Cuts
+                      "Lambda0DaugP"          : 2000. ,#MeV
+                      "Lambda0DaugPT"         : 250.  ,#MeV
+                      "Lambda0DaugTrackChi2"  : 4.    ,#adimensional
+                      "Lambda0DaugMIPChi2"    : 10.   ,#adimensional
+                      #Lambda cuts
+                      "MajoranaCutFDChi2"   : 100.  ,#adimensional
+                      "MajoranaCutM"        : 1500. ,#MeV
+                      "Lambda0VertexChi2"     : 10.   ,#adimensional
+                      "Lambda0PT"             : 700.  ,#adimensional
+                      #B Mother Cuts
+                      "BVCHI2DOF"             : 4.    ,#adminensional
+                      "BDIRA"                 : 0.99  ,#adminensional
+                      "LambdaMuMassLowTight"  : 1500. ,#MeV
+                      "XMuMassUpperHigh"      : 6500. ,#MeV
+                      'LambdaZ'               : -1.     #mm
+                      } ,
+    'STREAMS'     : ['Dimuon']
+    }
+
+class B2Lambda0SSMuMu3PiLines( LineBuilder ) :
+    """Definition of B ->Lambda0 Mu (Lambda0->MuPi) stripping"""
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+
+        self._stdLooseKsLL = DataOnDemand("Phys/StdLooseKsLL/Particles")
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        self._muonSel=None
+        self._downmuonSel=None
+        self._muonFilter()
+        self._selMu=None
+        self.registerLine(self._LambdaMajoranaSSMu_line())
+
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (PIDmu-PIDpi> %(MuonPIDmu)s )"\
+               "& (PIDmu-PIDp> %(MuonPIDp)s )"\
+               "& (PIDmu-PIDK> %(MuonPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+
+    ######LambdaortMajoranaLine######
+    def _LambdaMajoranaSSMu_line( self ):
+        return StrippingLine(self._name+'Bu2LambdaSSMuLine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2LambdaSSMu()])
+
+    ######--######
+    def _downMuonFilter( self ):
+        if self._downmuonSel is not None:
+            return self._downmuonSel
+
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("downMuon_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseDownMuons])
+        self._downmuonSel=_muSel
+        return _muSel
+
+    def _muonFilter( self ):
+        if self._muonSel is not None:
+            return self._muonSel
+
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("Muon_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseMuons])
+        self._muonSel=_muSel
+        return _muSel
+
+    ######--######
+
+    def _LambdaMajoranaMuFilter( self ):
+        if self._selMu is not None:
+          return self._selMu
+
+        _Lambda = CombineParticles(
+            DecayDescriptors = ["[Lambda0 -> mu- pi+ pi- pi+]cc"],
+            DaughtersCuts   = {"pi+":"(P > %(Lambda0DaugP)s)& (PT > %(Lambda0DaugPT)s)"\
+                               "& (TRCHI2DOF < %(Lambda0DaugTrackChi2)s)" \
+                               "& (MIPCHI2DV(PRIMARY) > %(Lambda0DaugMIPChi2)s)"   % self._config
+                               },
+            CombinationCut  = "(ADOCACHI2CUT(25, ''))"% self._config,
+            MotherCut       = "( M > %(MajoranaCutM)s*MeV )&( BPVVDCHI2 > %(MajoranaCutFDChi2)s )&( VFASPF(VCHI2/VDOF) < %(Lambda0VertexChi2)s )&( PT > %(Lambda0PT)s*MeV )" % self._config
+            )
+        _LambdaMajoranaSSMuSel=Selection("LambdaMajoranaSSMu_for"+self._name,
+                                      Algorithm=_Lambda,
+                                      RequiredSelections = [StdLoosePions, self._muonFilter()])
+        _downLambdaMajoranaSSMuSel=Selection("downLambdaMajoranaSSMu_for"+self._name,
+                                      Algorithm=_Lambda,
+                                      RequiredSelections = [StdNoPIDsDownPions, self._downMuonFilter()])
+        self._LambdaMajoranaSSMuSel=_LambdaMajoranaSSMuSel
+        self._downLambdaMajoranaSSMuSel=_downLambdaMajoranaSSMuSel
+        _selMu = MergedSelection("Selection_"+self._name+"_LambdaMajoranaSSMu",
+                                      RequiredSelections = [ _LambdaMajoranaSSMuSel, _downLambdaMajoranaSSMuSel ])
+        return _selMu
+
+
+    ######Bu->LambdaMu SS & OS######
+    def _Bu2LambdaSSMu( self ):
+        _LambdaSSMu_SSMu = CombineParticles(
+            DecayDescriptors = ["[B- -> Lambda0 mu-]cc"],
+            CombinationCut = "(AM>%(LambdaMuMassLowTight)s*MeV) & (AM<%(XMuMassUpperHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+            "& ( MINTREE((ABSID=='Lambda0'),VFASPF(VZ)) - VFASPF(VZ) > %(LambdaZ)s *mm )" % self._config,
+            ReFitPVs = True
+            )
+        _LambdaSSMu_SSMuSel=Selection("LambdaSSMu_SSMu_for"+self._name,
+                              Algorithm=_LambdaSSMu_SSMu,
+                              RequiredSelections = [self._muonFilter(), self._LambdaMajoranaMuFilter()])
+        return _LambdaSSMu_SSMuSel
+
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2MuMuMuMuLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2MuMuMuMuLines.py
new file mode 100644
index 000000000..5c41e499e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2MuMuMuMuLines.py
@@ -0,0 +1,537 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of B-->MuMuMuMu and D-->MuMuMuMu stripping selections and
+B-->KS0(mumu)KS0(mumu) (DetachedDimuons) stripping selections and
+and lines.
+'''
+
+__author__ = ['Diego Martinez Santos', 'Johannes Albrecht', 'Konstantinos A. Petridis', 'Alexander Baranov']
+__date__ = '20/10/2010'
+__version__ = '$Revision: 1.0 $'
+__all__ = ('B2MuMuMuMuLinesConf', 'makeB2MuMuMuMu', 'default_config')
+
+
+default_config = {
+    'NAME' : 'B2MuMuMuMu',
+    'WGs' : ['RD'],
+    'BUILDERTYPE' : 'B2MuMuMuMuLinesConf',
+    'CONFIG'      : {
+        'B2MuMuMuMuLinePrescale'    : 1,
+        'B2MuMuMuMuLinePostscale'   : 1,
+        'B23MuPiLinePrescale'    : 1,
+        'B23MuPiLinePostscale'   : 1,
+        'D2MuMuMuMuLinePrescale'    : 1,
+        'D2MuMuMuMuLinePostscale'   : 1,
+        'B2TwoDetachedDimuonLinePrescale'  : 1,
+        'B2TwoDetachedDimuonLinePostscale' : 1,
+        'B2JpsiKmumuLinePrescale'  : 1,
+        'B2JpsiKmumuLinePostscale' : 1,
+        'B2JpsiPhimumuLinePrescale'  : 1,
+        'B2JpsiPhimumuLinePostscale' : 1,
+        'B2DetachedDimuonAndJpsiLinePrescale' : 1,
+        'B2DetachedDimuonAndJpsiLinePostscale': 1,
+        'DetachedDiMuons': {
+            'AMAXDOCA_MAX'  : '0.5*mm',
+            'ASUMPT_MIN'    : '1000*MeV',
+            'VCHI2DOF_MAX'  : 16,
+            'BPVVDCHI2_MIN' : 16,
+        },
+        'B2DetachedDiMuons': {
+            'SUMPT_MIN'        : '2000*MeV',
+            'VCHI2DOF_MAX'     : 6,
+            'BPVIPCHI2_MAX'    : 16,
+            'BPVVDCHI2_MIN'    : 50,
+            'BPVDIRA_MIN'      : 0.0,
+            'MASS_MIN'         : {'B':'4600*MeV'},
+            'MASS_MAX'         : {'B':'6000*MeV'}
+        },
+    },
+    'STREAMS' : ['Dimuon'],
+}
+
+
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays as Combine3Particles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays as Combine4Particles
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import *
+
+#from StrippingSelections.Utils import checkConfig
+
+class B2MuMuMuMuLinesConf(LineBuilder) :
+    """
+    Builder of:
+       ...
+
+
+    Usage:
+    >>> config = { .... }
+    >>> bsConf = Bs2MuMuLinesConf('PrescaledBs2MuMuTest',config)
+    >>> bsLines = bsConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+
+    Exports as instance data members:
+    selDefault     : nominal Bs2mumu stripping line
+    selLoose       : loose Bs2MuMu stripping line to understand systematics
+    defaultLine    : Stripping line made from selDefault
+    looseLine      : Stripping line made from selLoose
+    lines          : lsit of lines:  [ defaultLine, looseLine ]
+
+    Exports as class data member:
+    Bs2MuMuLinesConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        self.name = name
+        #self.__confdict__ = default_config['CONFIG']
+        self.__confdict__ = config
+
+        LineBuilder.__init__(self, name, config)
+        #checkConfig(B2MuMuMuMuLinesConf.__configuration_keys__,config)
+
+        self.BDaughtersCutsLoose = "(TRCHI2DOF < 3 ) & (MIPCHI2DV(PRIMARY)> 6.)"
+        self.BDaughtersCuts = "(TRCHI2DOF < 2.5 ) & (MIPCHI2DV(PRIMARY)> 9.)"
+        self.BMotherCuts = """
+            (VFASPF(VCHI2/VDOF)<9)
+            & (BPVDIRA > 0)
+            & (BPVVDCHI2>100)
+            & (BPVIPCHI2()< 25)
+        """
+
+
+        # Generaly used input particles
+        self.AllMuons = DataOnDemand(Location="Phys/StdAllLooseMuons/Particles")
+        self.inMuons = DataOnDemand(Location="Phys/StdLooseMuons/Particles")
+        self.inKaons = DataOnDemand(Location="Phys/StdAllNoPIDsKaons/Particles")
+        self.inPions = DataOnDemand(Location="Phys/StdAllNoPIDsPions/Particles")
+        self.inDetachedDimuons = makeDetachedDimuons(
+            name +'DetachedDimuons',
+            config['DetachedDiMuons'],
+            inputSel=[self.inMuons]
+        )
+
+        # Generaly used selections
+        Jpsi_name = name + 'Jpsi'
+        Phi_name = name + 'Phi'
+        self.selJpsi = makeJpsi(self, Jpsi_name, inputSel=[self.inMuons])
+        self.selJpsiWide = makeJpsiWide(self, Jpsi_name+"Wide", inputSel=[self.inMuons])
+        self.selPhi = makePhi(self, Phi_name, inputSel=[self.inKaons])
+
+
+        # Stripping lines
+        default_name = name + "B24Mu"
+        self.selDefault = makeDefault(self, default_name, inputSel=[self.inMuons])
+        self.defaultLine = StrippingLine(
+            default_name + "Line",
+            prescale=config['B2MuMuMuMuLinePrescale'],
+            postscale=config['B2MuMuMuMuLinePostscale'],
+            algos=[self.selDefault]
+        )
+        self.registerLine(self.defaultLine)
+
+
+        b23mupi_name = name + "B23MuPi"
+        self.selB23mupi = makeB23mupi(self, b23mupi_name, inputSel=[self.inMuons, self.inPions])
+        self.b23mupiLine = StrippingLine(
+            b23mupi_name + "Line",
+            prescale=config['B23MuPiLinePrescale'],
+            postscale=config['B23MuPiLinePostscale'],
+            algos=[self.selB23mupi]
+        )
+        self.registerLine(self.b23mupiLine)
+
+
+        D_name = name + 'D24Mu'
+        self.selD2MuMuMuMu = makeD2MuMuMuMu(D_name, inputSel=[self.inMuons])
+        self.D2MuMuMuMuLine = StrippingLine(
+            D_name + "Line",
+            prescale=config['D2MuMuMuMuLinePrescale'],
+            postscale=config['D2MuMuMuMuLinePostscale'],
+            algos=[self.selD2MuMuMuMu]
+        )
+        self.registerLine(self.D2MuMuMuMuLine)
+
+
+
+        B2DetachedDimuons_name = name +'B2DetachedDimuons'
+        self.selB2TwoDetachedDimuons = makeB2TwoDetachedDimuons(
+            B2DetachedDimuons_name,
+            config['B2DetachedDiMuons'],
+            inputSel=[self.inDetachedDimuons]
+        )
+        self.B2TwoDetachedDimuonsLine = StrippingLine(
+            B2DetachedDimuons_name+"Line",
+            prescale=config['B2TwoDetachedDimuonLinePrescale'],
+            postscale=config['B2TwoDetachedDimuonLinePostscale'],
+            algos=[self.selB2TwoDetachedDimuons]
+        )
+        self.registerLine(self.B2TwoDetachedDimuonsLine)
+
+
+
+        B2JpsiKmumu_name = name + 'B2JpsiKmumu'
+        self.selB2JpsiKmumu = makeB2JpsiKmumu(
+            self,
+            B2JpsiKmumu_name,
+            inputSel=[self.selJpsi, self.AllMuons,self.inKaons]
+        )
+        self.B2JpsiKmumuLine = StrippingLine(
+            B2JpsiKmumu_name+"Line",
+            prescale=config['B2JpsiKmumuLinePrescale'],
+            postscale=config['B2JpsiKmumuLinePostscale'],
+            RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+            RelatedInfoTools = [
+            { "Type" : "RelInfoMuonIDPlus",
+            "Variables" : ["MU_BDT"],
+            "DaughterLocations"  : {
+            "[ Beauty -> X0 K+ ^mu+ mu- ]CC" : "Muon1softBDT",
+            "[ Beauty -> X0 K+ mu+ ^mu- ]CC" : "Muon2softBDT",
+            "[ Beauty -> (X0 -> ^mu+ mu-) K+ mu+ mu- ]CC" : "Muon1JpsiBDT",
+            "[ Beauty -> (X0 -> mu+ ^mu-) K+ mu+ mu- ]CC" : "Muon2JpsiBDT",
+            }
+            },
+            ],
+            algos=[self.selB2JpsiKmumu]
+        )
+        self.registerLine(self.B2JpsiKmumuLine)
+
+        B2JpsiKee_name = name + 'B2JpsiKee'
+        self.selB2JpsiKee = makeB2JpsiKee(
+            self,
+            B2JpsiKee_name,
+            inputSel1=self.selJpsi, inputSel2=self.inKaons
+        )
+        self.B2JpsiKeeLine = StrippingLine(
+            B2JpsiKee_name+"Line",
+            prescale=config['B2JpsiKmumuLinePrescale'],
+            postscale=config['B2JpsiKmumuLinePostscale'],
+            #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+            algos=[self.selB2JpsiKee]
+        )
+        self.registerLine(self.B2JpsiKeeLine)
+
+
+        B2JpsiPhimumu_name = name + 'B2JpsiPhimumu'
+        self.selB2JpsiPhimumu = makeB2JpsiPhimumu(
+            self,
+            B2JpsiPhimumu_name,
+            inputSel=[self.selJpsi, self.selPhi, self.AllMuons]
+        )
+        self.B2JpsiPhimumuLine = StrippingLine(
+            B2JpsiPhimumu_name+"Line",
+            prescale=config['B2JpsiPhimumuLinePrescale'],
+            postscale=config['B2JpsiPhimumuLinePostscale'],
+            algos=[self.selB2JpsiPhimumu]
+        )
+        self.registerLine(self.B2JpsiPhimumuLine)
+
+
+
+        B2DetachedDimuonAndJpsi_name = name + 'B2DetachedDimuonAndJpsi'
+        self.selB2DetachedDimuonAndJpsi = makeB2DetachedDimuonAndJpsi(
+            B2DetachedDimuonAndJpsi_name,
+            config['B2DetachedDiMuons'],
+            inputSel=[self.selJpsi, self.inDetachedDimuons]
+        )
+        self.B2DetachedDimuonAndJpsiLine = StrippingLine(
+            B2DetachedDimuonAndJpsi_name+"Line",
+            prescale=config['B2DetachedDimuonAndJpsiLinePrescale'],
+            postscale=config['B2DetachedDimuonAndJpsiLinePostscale'],
+            algos=[self.selB2DetachedDimuonAndJpsi]
+        )
+        self.registerLine(self.B2DetachedDimuonAndJpsiLine)
+
+
+def makeDefault(self,name,inputSel) :
+    """
+    B --> 4 mu selection
+    should become     inclusive bb-->4 mu selection  ??
+    """
+    Detached4mu = Combine4Particles(
+        DecayDescriptor="B_s0 -> mu+ mu- mu+ mu-",
+        DaughtersCuts={ "mu+" : self.BDaughtersCutsLoose},
+        Combination12Cut="(AMAXDOCA('')<0.3*mm)",
+        Combination123Cut="(AMAXDOCA('')<0.3*mm)",
+        CombinationCut="(AM>4000*MeV) "\
+                         "& (AMAXDOCA('')<0.3*mm)",
+        MotherCut=self.BMotherCuts + " & (MM>4000*MeV) "
+    )
+
+    return Selection(
+        name,
+        Algorithm=Detached4mu,
+        RequiredSelections=inputSel
+    )
+
+
+def makeB23mupi(self,name,inputSel) :
+    """
+    B --> mu mu mu pi selection. pi = not-strong-selected muon
+    """
+    Detached3mupi = Combine4Particles(
+        DecayDescriptor="[B_s0 -> mu+ mu- mu+ pi-]cc",
+        DaughtersCuts={"mu+" : self.BDaughtersCuts, "pi+": self.BDaughtersCuts},
+        Combination12Cut="(AMAXDOCA('')<0.3*mm)",
+        Combination123Cut="(AMAXDOCA('')<0.3*mm)",
+        CombinationCut="(AM>4000*MeV) "\
+                         "& (AMAXDOCA('')<0.3*mm)",
+        MotherCut=self.BMotherCuts + " & (MM>4000*MeV) "
+    )
+
+    return Selection(
+        name,
+        Algorithm=Detached3mupi,
+        RequiredSelections=inputSel
+    )
+
+
+def makeD2MuMuMuMu(name,inputSel) :
+    """
+    D --> 4 mu selection
+    """
+    D2MuMuMuMu = Combine4Particles(
+        DecayDescriptor = "D0 -> mu+ mu- mu+ mu-",
+        DaughtersCuts = {
+            "mu+" : "(TRCHI2DOF < 3.0 ) "\
+            " & (MIPCHI2DV(PRIMARY)> 4.)"\
+            " & (TRGHOSTPROB<0.3) "\
+            " & (P> 3000.*MeV)"
+        },
+        Combination12Cut = "(AMAXDOCA('')<0.2*mm)",
+        Combination123Cut = "(AMAXDOCA('')<0.2*mm)",
+        CombinationCut =  "(ADAMASS('D0')<300*MeV) "\
+                          "& (AMAXDOCA('')<0.2*mm) ",
+        MotherCut = "(VFASPF(VCHI2/VDOF)<12.) "\
+			      "& (BPVVDZ > 0.) " \
+			      "& (MIPCHI2DV(PRIMARY) < 25. )"
+    )
+
+    return Selection(
+        name,
+        Algorithm=D2MuMuMuMu,
+        RequiredSelections=inputSel
+    )
+
+
+def makeDetachedDimuons(name,config,inputSel):
+    """
+    KS0->mumu selection
+    """
+    comboCuts = LoKiCuts(['ASUMPT','AMAXDOCA'],config).code()
+    momCuts   = LoKiCuts(['VCHI2DOF','BPVVDCHI2'],config).code()
+    KS2MuMu = CombineParticles("Combine"+name)
+    KS2MuMu.DecayDescriptor='KS0 -> mu+ mu-'
+    KS2MuMu.CombinationCut=comboCuts
+    KS2MuMu.MotherCut=momCuts
+
+    return Selection(
+        name,
+        Algorithm=KS2MuMu,
+        RequiredSelections=inputSel
+    )
+
+
+def makeB2TwoDetachedDimuons(name,config,inputSel) :
+    """
+    B --> KS0 KS0 --> 4mu selection
+    """
+    # define cuts on B object
+    wm = ['in_range(%s,AM,%s)' % (config['MASS_MIN']['B'],
+                                  config['MASS_MAX']['B'])]
+    wm = '('+('|'.join(wm))+')'
+    comboCuts = [LoKiCuts(['SUMPT'],config).code(),wm]
+    comboCuts = LoKiCuts.combine(comboCuts)
+    momCuts = LoKiCuts(['VCHI2DOF','BPVVDCHI2','BPVIPCHI2','BPVDIRA'],
+                       config).code()
+    B2KSKS = CombineParticles("Combine"+name)
+    B2KSKS.DecayDescriptor = 'B0 -> KS0 KS0'
+    B2KSKS.CombinationCut = comboCuts
+    B2KSKS.MotherCut = momCuts
+
+    return Selection(
+        name,
+        Algorithm=B2KSKS,
+        RequiredSelections=inputSel
+    )
+
+
+def makeJpsi(self,name,inputSel):
+    """
+    Jpsi->mu+ mu- selection
+    """
+    JpsiMuMu = CombineParticles("Combine"+name)
+    JpsiMuMu.DecayDescriptor='J/psi(1S) -> mu+ mu-'
+    JpsiMuMu.CombinationCut ="(ADAMASS('J/psi(1S)') < 200*MeV)"\
+        "& (AMAXDOCA('')<0.3*mm)"
+    JpsiMuMu.MotherCut = "(ADMASS('J/psi(1S)') < 200*MeV)"\
+        " & (BPVDIRA > 0) "
+    JpsiMuMu.DaughtersCuts = { "mu+" : self.BDaughtersCuts}
+
+    return Selection(
+        name,
+        Algorithm=JpsiMuMu,
+        RequiredSelections=inputSel
+    )
+
+
+def makeJpsiWide(self,name,inputSel):
+    """
+    Jpsi->mu+ mu- selection not in Jpsi mass interval
+    """
+    JpsiMuMu = CombineParticles("Combine"+name)
+    JpsiMuMu.DecayDescriptor='J/psi(1S) -> mu+ mu-'
+    # JpsiMuMu.CombinationCut ="(ADAMASS('J/psi(1S)') > 200*MeV)"\
+    #     "& (AMAXDOCA('')<0.3*mm)"
+    JpsiMuMu.CombinationCut = "(AMAXDOCA('')<0.3*mm)"
+    JpsiMuMu.MotherCut = "(ADMASS('J/psi(1S)') > 200*MeV)"\
+        " & (BPVDIRA > 0) "
+    JpsiMuMu.DaughtersCuts = { "mu+" : self.BDaughtersCuts}
+
+    return Selection(
+        name,
+        Algorithm=JpsiMuMu,
+        RequiredSelections=inputSel
+    )
+
+
+def makePhi(self,name,inputSel):
+    """
+    phi->K+ K- selection
+    """
+    Phimumu = CombineParticles("Combine"+name)
+    Phimumu.DecayDescriptor = 'phi(1020) -> K+ K-'
+    Phimumu.CombinationCut = "(ADAMASS('phi(1020)')<200*MeV)"\
+        "& (AMAXDOCA('')<0.3*mm)"
+    Phimumu.MotherCut = "(ADMASS('phi(1020)') < 200*MeV)"\
+        " & (BPVDIRA > 0) "
+    Phimumu.DaughtersCuts = { "K+" : self.BDaughtersCuts}
+
+    return Selection(
+        name,
+        Algorithm=Phimumu,
+        RequiredSelections=inputSel
+    )
+
+
+def makeB2JpsiKmumu(self,name,inputSel):
+    """
+    B+ -> (Jpsi->mu+ mu-) K+ mu+ mu- selection
+    """
+    B2JpsiKmumu = Combine4Particles(
+        DecayDescriptor="[B+ -> J/psi(1S) K+ mu+ mu-]cc",
+        DaughtersCuts={
+            "mu+" : self.BDaughtersCuts,
+            "K+" : self.BDaughtersCuts
+        },
+        Combination12Cut="(AMAXDOCA('')<0.5*mm)",
+        Combination123Cut="(AMAXDOCA('')<0.75*mm)",
+        CombinationCut="(ADAMASS('B+')<1200*MeV)"\
+                       "& (AMAXDOCA('')<0.75*mm)",
+        MotherCut=self.BMotherCuts + " & (ADMASS('B+')<1100*MeV) "
+    )
+
+    return Selection(
+        name,
+        Algorithm=B2JpsiKmumu,
+        RequiredSelections=inputSel
+    )
+
+def makeB2JpsiKee(self,name,inputSel1, inputSel2):
+    """
+    B+ -> (Jpsi->mu+ mu-) K+ e+ e- selection
+    """
+    from Configurables import DiElectronMaker, ProtoParticleCALOFilter
+    from CommonParticles.Utils import trackSelector
+    dieLL = DiElectronMaker('MyDiElectronFromTracks')
+    dieLL.Particle = "omega(782)"
+    selector = trackSelector ( dieLL , trackTypes = ["Long"] )
+    dieLL.addTool( ProtoParticleCALOFilter, name='Electron' )
+    dieLL.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'-2.0'"]
+    dieLL.DiElectronMassMax = 10000.*MeV
+    dieLL.DiElectronMassMin = 0.*MeV
+    dieLL.DiElectronPtMin = 200.*MeV
+    #locations.update( updateDoD(dieLL) )
+    #MyDiElectronFromTracks = dieLL
+
+    mygreatdielectron = Selection( "greatdielectron", Algorithm = dieLL )
+    B2JpsiKee = Combine3Particles(
+        DecayDescriptor="[B+ -> J/psi(1S) K+ omega(782)]cc",
+        DaughtersCuts={
+            "omega(782)" : "(M<6000*MeV)  & (MINTREE('e+'==ABSID,PROBNNe) > 0.1)  & (MINTREE('e+'==ABSID,PIDe) > 1)", #& (PT > 200*MeV)
+            "K+" : self.BDaughtersCuts
+        },
+        Combination12Cut="(AMAXDOCA('')<0.5*mm)",
+        CombinationCut="(ADAMASS('B+')<1600*MeV)"\
+                       "& (AMAXDOCA('')<0.75*mm)",
+        MotherCut=self.BMotherCuts + " & (ADMASS('B+')<1500*MeV) "
+    )
+
+    return Selection(
+        name,
+        Algorithm=B2JpsiKee,
+        RequiredSelections=[inputSel1,inputSel2,mygreatdielectron]
+    )
+
+def makeB2JpsiPhimumu(self,name,inputSel):
+    """
+    Bs -> (Jpsi->mu+ mu-) (phi -> K+ K-) mu+ mu- selection
+    """
+    B2JpsiPhimumu = Combine4Particles(
+        DecayDescriptor="B_s0 -> J/psi(1S) phi(1020) mu+ mu-",
+        DaughtersCuts={ "mu+" : self.BDaughtersCuts },
+        Combination12Cut="(AMAXDOCA('')<0.5*mm)",
+        Combination123Cut="(AMAXDOCA('')<0.5*mm)",
+        CombinationCut="(ADAMASS('B_s0')<1000*MeV)"\
+                       "& (AMAXDOCA('')<0.5*mm)",
+        MotherCut=self.BMotherCuts + " & (ADMASS('B_s0')<1000*MeV) "
+    )
+
+    return Selection(
+        name,
+        Algorithm=B2JpsiPhimumu,
+        RequiredSelections=inputSel
+    )
+
+
+def makeB2DetachedDimuonAndJpsi(name,config,inputSel) :
+    """
+    B --> J/psi KS0 --> 4mu selection
+    """
+    # define cuts on B object
+    wm = ['in_range(%s,AM,%s)' % (config['MASS_MIN']['B'],
+                                  config['MASS_MAX']['B'])]
+    wm = '('+('|'.join(wm))+')'
+    comboCuts = [LoKiCuts(['SUMPT'],config).code(),wm]
+    comboCuts = LoKiCuts.combine(comboCuts)
+    momCuts = LoKiCuts(['VCHI2DOF','BPVVDCHI2','BPVIPCHI2','BPVDIRA'], config).code()
+
+    B2JpsiKS = CombineParticles("Combine"+name)
+    B2JpsiKS.DecayDescriptor = 'B0 -> J/psi(1S) KS0'
+    B2JpsiKS.CombinationCut = comboCuts
+    B2JpsiKS.MotherCut = momCuts
+
+    return Selection(
+        name,
+        Algorithm=B2JpsiKS,
+        RequiredSelections=inputSel
+    )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2OCMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2OCMuMu.py
new file mode 100644
index 000000000..4baebc6fb
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2OCMuMu.py
@@ -0,0 +1,1240 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__  = 'Vitalii Lisovskyi'
+__date__    = '05/03/2021'
+__version__ = '$Revision: 0 $'
+
+__all__ = ( 'B2OCMuMuConf', 'default_config' )
+
+"""
+Selections for B to open charm hadrons decays, but with initial state radiation emission of a dimuon.
+B0 -> D- pi mumu
+B- -> D0 pi mumu
+Bs -> Ds pi mumu
+Lb -> Lc pi mumu
+Xib- -> Xic0 pi- mumu
+B0 -> D- K mumu
+B- -> D0 K mumu
+B0 -> D- D+ mumu
+B0 -> D0 D~0 mumu
+B0 -> Lc Lc~ mumu
+
+bonus: B_c -> B+ mumu with B+ -> Dpi or B+ ->JpsiK (two lines: with and without pointing requirements).
+"""
+
+
+default_config = {
+    'NAME'                       : 'B2OCMuMu',
+    'BUILDERTYPE'                : 'B2OCMuMuConf',
+    'CONFIG'                     :
+        {
+        'BFlightCHI2'            : 50 #100
+        , 'BcFlightCHI2'         : 25
+        , 'BDIRA'                : 0.999
+        , 'BIPCHI2'              : 25
+        , 'BVertexCHI2'          : 12
+        , 'BVertexCHI2Loose'     : 20
+        , 'LeptonIPCHI2'         : 9
+        , 'KaonIPCHI2'           : 9
+        , 'KaonPT'               : 250
+        , 'BMassWindow'          : 1500
+        , 'Trk_Chi2'             : 3
+        , 'Trk_GhostProb'        : 0.3
+        , 'B_MassWindow_Hi'      : 5200
+        , 'Bc_MassWindow_Hi'     : 6200
+        , 'Lb_MassWindow_Hi'     : 5600
+        , 'PTHad'                : 1000
+        , 'K1_SumIPChi2Had'      : 48.0
+        , 'DiHadronVtxCHI2'      : 10
+        , 'MinProbNN'            : 0.02
+        , 'MinProbNNTight'       : 0.1
+        , 'DiHadronADOCACHI2'    : 30
+        , 'DiHadronADOCA'        : 0.75 #0.5
+        , 'Bu2mmLinePrescale'    : 1
+        },
+    'WGs'     : [ 'RD' ],
+    'STREAMS' : [ 'Leptonic' ]
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop #as FilterDesktop_GC
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, DaVinci__N3BodyDecays, DaVinci__N4BodyDecays
+from Configurables import (ResolvedPi0Maker, PhotonMaker)
+#from Configurables import FilterDesktop as FilterDesktop_C
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from CommonParticles.Utils import updateDoD
+from GaudiKernel.SystemOfUnits import MeV
+
+class B2OCMuMuConf(LineBuilder) :
+    """
+    Builder for rare baryonic mumu measurements
+    """
+
+    # now just define keys. Default values are fixed later
+    __configuration_keys__ = (
+        'BFlightCHI2'
+        , 'BcFlightCHI2'
+        , 'BDIRA'
+        , 'BIPCHI2'
+        , 'BVertexCHI2'
+        , 'BVertexCHI2Loose'
+        , 'LeptonIPCHI2'
+        , 'KaonIPCHI2'
+        , 'KaonPT'
+        , 'BMassWindow'
+        , 'Trk_Chi2'
+        , 'Trk_GhostProb'
+        , 'B_MassWindow_Hi'
+        , 'Bc_MassWindow_Hi'
+        , 'Lb_MassWindow_Hi'
+        , 'PTHad'
+        , 'K1_SumIPChi2Had'
+        , 'DiHadronVtxCHI2'
+        , 'MinProbNN'
+        , 'MinProbNNTight'
+        , 'DiHadronADOCACHI2'
+        , 'DiHadronADOCA'
+        , 'Bu2mmLinePrescale'
+      )
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        self._name = name
+        mmCharmLine_name   = name
+        mmCharmSSLine_name   = name+'SS'
+        BcLine_name   = name+"Bc"
+        BcNoPointLine_name   = name+"BcNoPoint"
+
+        from StandardParticles import StdLoosePions as Pions
+        from StandardParticles import StdLooseKaons as Kaons
+        from StandardParticles import StdLooseProtons as Protons
+        from StandardParticles import StdAllNoPIDsPions as AllPions
+        from StandardParticles import StdAllNoPIDsKaons as AllKaons
+        from StandardParticles import StdAllNoPIDsProtons as AllProtons
+        from StandardParticles import StdLooseJpsi2MuMu as StdJpsis
+        # from StandardParticles import StdVeryLooseLambdaLL as LambdasLL
+        # from StandardParticles import StdLooseLambdaDD as LambdasDD
+        # from StandardParticles import StdLooseLambdaLD as LambdasLD
+        # from StandardParticles import StdVeryLooseKsLL as KsLL
+        # from StandardParticles import StdLooseKsDD as KsDD
+        # from StandardParticles import StdLooseKsLD as KsLD
+        # from StandardParticles import StdLoosePhi2KK as Phis
+        # from StandardParticles import StdNoPIDsDownProtons as DownProtons
+
+
+        # charm hadrons
+
+        SelD0 = self._makeD02Kpi( name   = "D0For" + self._name,
+                              params = config )
+
+        SelDp = self._makeDp2Kpipi( name   = "DpFor" + self._name,
+                              params = config )
+
+        SelDs = self._makeDs2KKpi( name   = "DsFor" + self._name,
+                              params = config )
+
+        SelXic0 = self._makeXic02pKKpi( name   = "Xic0For" + self._name,
+                              pions  = AllPions,
+                              kaons  = AllKaons,
+                              protons = AllProtons,
+                              params = config )
+
+        # SelLc = self._makeLc2pKpi( name   = "LcFor" + self._name,
+        #                       pions  = AllPions,
+        #                       kaons  = AllKaons,
+        #                       protons = AllProtons,
+        #                       params = config )
+
+        SelLc = self._makeLc2pKpi( name   = "LcFor" + self._name,
+                              params = config )
+
+        SelXicp = self._makeXic2pKpi( name   = "XicpFor" + self._name,
+                              pions  = AllPions,
+                              kaons  = AllKaons,
+                              protons = AllProtons,
+                              params = config )
+
+
+
+        # 2 : Make Dileptons
+
+        SelDiMuon = self._makeDiMuonDetached( "SelDiMuonsFor" + self._name,
+                                          params   = config)
+        SelDiMuonSS = self._makeDiMuonDetachedSS( "SelDiMuonsSSFor" + self._name,
+                                          params   = config)
+        SelDiMuonPrompt = self._makeDiMuonPrompt( "SelPromptDiMuonsFor" + self._name,
+                                          params   = config)
+
+        # 3: charm + pion
+        SelLcpi = self._makeLcpi( name   = "LcpiFor" + self._name,
+                              lambdacs = SelLc,
+                              pions  = AllPions,
+                              params = config )
+
+        SelXic0pi = self._makeXi0cpi( name   = "Xic0piFor" + self._name,
+                              xics = SelXic0,
+                              pions  = AllPions,
+                              params = config )
+
+        SelXicppi = self._makeXipcpi( name   = "XicppiFor" + self._name,
+                              xics = SelXicp,
+                              pions  = AllPions,
+                              params = config )
+
+        SelD0pi = self._makeD0pi( name   = "D0piFor" + self._name,
+                              d0s = SelD0,
+                              pions  = AllPions,
+                              params = config )
+
+        SelDppi = self._makeDppi( name   = "DppiFor" + self._name,
+                              dplus = SelDp,
+                              pions  = AllPions,
+                              params = config )
+
+        SelDspi = self._makeDspi( name   = "DspiFor" + self._name,
+                              ds = SelDs,
+                              pions  = AllPions,
+                              params = config )
+
+        SelDpK = self._makeDmKp( name   = "DpKFor" + self._name,
+                              dplus = SelDp,
+                              kaons  = Kaons,
+                              params = config )
+
+        SelD0K = self._makeD0K( name   = "D0KFor" + self._name,
+                              d0s = SelD0,
+                              kaons  = Kaons,
+                              params = config )
+
+        SelD0D0 = self._makeD0D0( name   = "D0D0For" + self._name,
+                              d0s = SelD0,
+                              params = config )
+
+        SelDpDp = self._makeDpDm( name   = "DpDmFor" + self._name,
+                              dplus = SelDp,
+                              params = config )
+
+        SelLcLc = self._makeLcLc( name   = "LcLcFor" + self._name,
+                              lcs = SelLc,
+                              params = config )
+
+        SelB2Dpi = self._makeB2D0pi( name   = "B2D0piFor" + self._name,
+                              d0s = SelD0,
+                              pions  = AllPions,
+                              params = config )
+
+        SelB2JpsiK = self._makeB2JpsiK( name   = "B2JpsiKFor" + self._name,
+                              jpsis = StdJpsis,
+                              kaons  = AllKaons,
+                              params = config )
+
+        #SS
+        SelLcpiSS = self._makeLcpiSS( name   = "LcpiSSFor" + self._name,
+                              lambdacs = SelLc,
+                              pions  = AllPions,
+                              params = config )
+
+        SelD0piSS = self._makeD0piSS( name   = "D0piSSFor" + self._name,
+                              d0s = SelD0,
+                              pions  = AllPions,
+                              params = config )
+
+        SelDppiSS = self._makeDppiSS( name   = "DppiSSFor" + self._name,
+                              dplus = SelDp,
+                              pions  = AllPions,
+                              params = config )
+
+        SelDspiSS = self._makeDspiSS( name   = "DspiSSFor" + self._name,
+                              ds = SelDs,
+                              pions  = AllPions,
+                              params = config )
+
+        # 4 : Combine Particles
+
+
+        SelB2mmX_charm = self._makeB2LLX_charm(mmCharmLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelLcpi, SelD0pi, SelDppi, SelDspi, SelDpK, SelD0K, SelD0D0, SelDpDp, SelLcLc, SelXic0pi], #, SelXicppi],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B0') <  %(BMassWindow)s *MeV"% config)
+
+        SelB2mmX_charmSS = self._makeB2LLX_charmSS(mmCharmSSLine_name,
+                                   dileptonSS = SelDiMuonSS,
+                                   hadrons  = [ SelLcpiSS, SelD0piSS, SelDppiSS, SelDspiSS, SelD0D0, SelDpDp, SelLcLc],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B0') <  %(BMassWindow)s *MeV"% config)
+
+        SelB2mmX_Bc = self._makeB2LLX_Bc(BcLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelB2Dpi, SelB2JpsiK ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B_c+') <  %(BMassWindow)s *MeV"% config)
+
+        SelB2mmX_BcNoPoint = self._makeB2LLX_BcNoPoint(BcNoPointLine_name,
+                                   dilepton = SelDiMuonPrompt,
+                                   hadrons  = [ SelB2Dpi, SelB2JpsiK ],
+                                   params   = config,
+                                   masscut  = "(AM>0)"% config)
+
+
+        # 5 : Declare Lines
+
+        SPDFilter = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 600 )" ,
+            'Preambulo' : [ "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb" ]
+            }
+
+
+        self.B2mmCharmLine = StrippingLine(mmCharmLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_charm,
+                                       FILTER            = SPDFilter,
+                                       #RequiredRawEvents = [],
+                                       RelatedInfoTools = [
+                                       { "Type" : "RelInfoMuonIDPlus",
+                                       "Variables" : ["MU_BDT"],
+                                       "DaughterLocations"  : {
+                                       "[ Beauty -> X (X -> ^mu+ mu-) ]CC" : "Muon1BDT",
+                                       "[ Beauty -> X (X -> mu+ ^mu-) ]CC" : "Muon2BDT",}
+                                       },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B2mmCharmSSLine = StrippingLine(mmCharmSSLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_charmSS,
+                                       FILTER            = SPDFilter,
+                                       #RequiredRawEvents = [],
+                                       RelatedInfoTools = [
+                                       { "Type" : "RelInfoMuonIDPlus",
+                                       "Variables" : ["MU_BDT"],
+                                       "DaughterLocations"  : {
+                                       "[ Beauty -> X (X -> ^mu+ mu+) ]CC" : "Muon1BDT",
+                                       "[ Beauty -> X (X -> mu+ ^mu+) ]CC" : "Muon2BDT",}
+                                       },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.BcLine = StrippingLine(BcLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_Bc,
+                                       FILTER            = SPDFilter,
+                                       #RequiredRawEvents = [],
+                                       RelatedInfoTools = [
+                                       { "Type" : "RelInfoMuonIDPlus",
+                                       "Variables" : ["MU_BDT"],
+                                       "DaughterLocations"  : {
+                                       "[ Beauty -> X- (X -> ^mu+ mu-) ]CC" : "Muon1BDT",
+                                       "[ Beauty -> X- (X -> mu+ ^mu-) ]CC" : "Muon2BDT",}
+                                       },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.BcNoPointLine = StrippingLine(BcNoPointLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_BcNoPoint,
+                                       FILTER            = SPDFilter,
+                                       #RequiredRawEvents = [],
+                                       RelatedInfoTools = [
+                                       { "Type" : "RelInfoMuonIDPlus",
+                                       "Variables" : ["MU_BDT"],
+                                       "DaughterLocations"  : {
+                                       "[ Beauty -> X- (X -> ^mu+ mu-) ]CC" : "Muon1BDT",
+                                       "[ Beauty -> X- (X -> mu+ ^mu-) ]CC" : "Muon2BDT",}
+                                       },
+                                       ],
+                                       MDSTFlag          = False )
+
+        # 6 : Register Lines
+
+        self.registerLine( self.B2mmCharmLine )
+        self.registerLine( self.B2mmCharmSSLine )
+        self.registerLine( self.BcLine )
+        self.registerLine( self.BcNoPointLine )
+
+    #dimuon builders
+
+    def _makeDiMuonDetached( self, name, params ) :
+        """
+        Make a dimuon
+        rho(770)0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "rho(770)0 -> mu+ mu-"
+
+         # define all the cuts
+        _CombCuts    = "(AM > 0*MeV) & (ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 9) & (BPVVDCHI2 > 4) & (0.5 < NINTREE((ABSID==13)&(PROBNNmu > %(MinProbNNTight)s)))" % params
+        _daughtersCutsmu = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+        _stdAllLooseMuons = DataOnDemand(Location = "Phys/StdAllVeryLooseMuons/Particles")
+        # make and store the Selection object
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdAllLooseMuons ] )
+
+    def _makeDiMuonDetachedSS( self, name, params ) :
+        """
+        Make a dimuon
+        rho(770)0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "[rho(770)0 -> mu+ mu+]cc"
+
+         # define all the cuts
+        _CombCuts    = "(AM > 0*MeV) & (ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 9) & (BPVVDCHI2 > 4) & (0.5 < NINTREE((ABSID==13)&(PROBNNmu > %(MinProbNNTight)s)))" % params
+        _daughtersCutsmu = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+        _stdAllLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+        # make and store the Selection object
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdAllLooseMuons ] )
+
+    def _makeDiMuonPrompt( self, name, params ) :
+        """
+        Make a dimuon
+        rho(770)0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "rho(770)0 -> mu+ mu-"
+
+         # define all the cuts
+        _CombCuts    = "(AM > 0*MeV) & (ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 9) & (0.5 < NINTREE((ABSID==13)&(PROBNNmu > %(MinProbNNTight)s)))" % params
+        _daughtersCutsmu = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+        _stdAllLooseMuons = DataOnDemand(Location = "Phys/StdAllVeryLooseMuons/Particles")
+        # make and store the Selection object
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdAllLooseMuons ] )
+
+
+
+#####################################################
+# builders charm hadrons
+#####################################################
+
+    def _makeXic02pKKpi(self, name, pions, kaons, protons, params):
+        '''Makes Xic0 -> p K- K- pi+
+           borrowed from Xib2Xic0PiXic02PKKPiBeauty2CharmLine, adapted a bit
+        '''
+        comboCuts12 = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)"% params
+        comboCuts123 = "(ADOCA(1,3)<%(DiHadronADOCA)s*mm) & (ADOCA(2,3)<%(DiHadronADOCA)s*mm)"% params
+        comboCuts = "(ASUM(PT)>1500*MeV) & (ADAMASS('Xi_c0') < 100*MeV) & (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<3.) & (PT > 500*MeV) & (P > 5000*MeV)))) & (ADOCA(1,4)<%(DiHadronADOCA)s*mm) & (ADOCA(2,4)<%(DiHadronADOCA)s*mm) & (ADOCA(3,4)<%(DiHadronADOCA)s*mm) & (ADOCAMAX('')<0.5*mm)" % params
+        momCuts = "(ADMASS('Xi_c0') < 100*MeV) & (VFASPF(VCHI2/VDOF)<10) & (BPVVDCHI2>36) & (BPVDIRA>0.9) & (2 == NINTREE((ABSID==321) & (PROBNNk > %(MinProbNNTight)s))) & (1 == NINTREE((ABSID==2212)&(PROBNNp > %(MinProbNNTight)s)))" % params
+        cp = DaVinci__N4BodyDecays(
+            Combination12Cut=comboCuts12,
+            Combination123Cut=comboCuts123,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_c0 -> p+ K- K- pi+]cc"])
+        cp.DaughtersCuts = {
+            "p+"  : "(P > 2*GeV)",
+            "K-"  : "(P > 2*GeV)",
+            "pi+"  : "(P > 1*GeV)",
+            }
+        return Selection(
+            name+'_Xic02PKKPi',
+            Algorithm=cp,
+            RequiredSelections=[pions, kaons, protons])
+#####################################################
+    # def _makeLc2pKpi(self, name, pions, kaons, protons, params):
+    #     '''Makes Lc -> p K pi '''
+    #     comboCuts12 = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)"% params
+    #     comboCuts = "(ASUM(PT)>1800*MeV) & (ADAMASS('Lambda_c+') < 100*MeV) & (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 400*MeV) & (P > 4000*MeV)))) & (ADOCA(1,3)<%(DiHadronADOCA)s*mm) & (ADOCA(2,3)<%(DiHadronADOCA)s*mm)" % params
+    #     momCuts = "(ADMASS('Lambda_c+') < 100*MeV) & (VFASPF(VCHI2/VDOF)<25) & (BPVVDCHI2>25) & (BPVDIRA>0) & (1 == NINTREE((ABSID==321) & (PROBNNk > %(MinProbNNTight)s))) & (1 == NINTREE((ABSID==2212)&(PROBNNp > %(MinProbNNTight)s)))" % params
+    #     cp = DaVinci__N3BodyDecays(
+    #         Combination12Cut=comboCuts12,
+    #         CombinationCut=comboCuts,
+    #         MotherCut=momCuts,
+    #         DecayDescriptors=["[Lambda_c+ -> p+ K- pi+]cc"])
+    #     cp.DaughtersCuts = {
+    #         "p+"  : "(P > 4*GeV)",
+    #         "K-"  : "(P > 2*GeV)",
+    #         "pi+"  : "(P > 1*GeV)",
+    #         }
+    #     return Selection(
+    #         name+'_Lc2PKPi',
+    #         Algorithm=cp,
+    #         RequiredSelections=[pions, kaons, protons])
+#####################################################
+    def _makeXic2pKpi(self, name, pions, kaons, protons, params):
+        '''Makes Xic+ -> p K pi '''
+        comboCuts12 = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)"% params
+        comboCuts = "(ASUM(PT)>1800*MeV) & (ADAMASS('Xi_c+') < 100*MeV) & (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 400*MeV) & (P > 4000*MeV)))) & (ADOCA(1,3)<%(DiHadronADOCA)s*mm) & (ADOCA(2,3)<%(DiHadronADOCA)s*mm) & (ADOCAMAX('')<0.5*mm)" % params
+        momCuts = "(ADMASS('Xi_c+') < 100*MeV) & (VFASPF(VCHI2/VDOF)<10) & (BPVVDCHI2>36) & (BPVDIRA>0.9) & (1 == NINTREE((ABSID==321) & (PROBNNk > %(MinProbNNTight)s))) & (1 == NINTREE((ABSID==2212)&(PROBNNp > %(MinProbNNTight)s)))" % params
+        cp = DaVinci__N3BodyDecays(
+            Combination12Cut=comboCuts12,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_c+ -> p+ K- pi+]cc"])
+        cp.DaughtersCuts = {
+            "p+"  : "(P > 4*GeV)",
+            "K-"  : "(P > 2*GeV)",
+            "pi+"  : "(P > 1*GeV)",
+            }
+
+        return Selection(
+            name+'_Xicp2PKPi',
+            Algorithm=cp,
+            RequiredSelections=[pions, kaons, protons])
+
+#####################################################
+    def _makeLc2pKpi(self, name, params):
+        '''Makes Lc -> p K- pi+
+        '''
+        _Code = "(PT > %(KaonPT)s *MeV) & (1== NINTREE((ABSID==321) & (PROBNNk>0.1))) & (1== NINTREE((ABSID==2212) & (PROBNNp>0.1)))"% params
+        _Filter = FilterDesktop( Code = _Code )
+        _stdLc= DataOnDemand(Location = "Phys/StdLooseLambdac2PKPi/Particles")
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ _stdLc ] )
+
+#####################################################
+# for mesons we just recycle the Std particles...
+#####################################################
+    def _makeD02Kpi(self, name, params):
+        '''Makes D0 -> K- pi+
+        '''
+        _Code = "(PT > %(KaonPT)s *MeV) & (1== NINTREE((ABSID==321) & (PROBNNk>0.1)))"% params
+        _Filter = FilterDesktop( Code = _Code )
+        _stdD0 = DataOnDemand(Location = "Phys/StdLooseD02KPi/Particles")
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ _stdD0 ] )
+#####################################################
+    def _makeDp2Kpipi(self, name, params):
+        '''Makes D+ -> K- pi+ pi+
+        '''
+        _Code = "(PT > %(KaonPT)s *MeV) & (1== NINTREE((ABSID==321) & (PROBNNk>0.1)))"% params
+        _Filter = FilterDesktop( Code = _Code )
+        _stdDp = DataOnDemand(Location = "Phys/StdLooseDplus2KPiPi/Particles")
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ _stdDp ] )
+#####################################################
+    def _makeDs2KKpi(self, name, params):
+        '''Makes Ds+ -> K- K+ pi+
+        '''
+        _Code = "(PT > %(KaonPT)s *MeV) & (2== NINTREE((ABSID==321) & (PROBNNk>0.1)))"% params
+        _Filter = FilterDesktop( Code = _Code )
+        _stdDs = DataOnDemand(Location = "Phys/StdLooseDsplus2KKPi/Particles")
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ _stdDs ] )
+
+
+#####################################################
+# now, build the charm+pi combinations
+#####################################################
+    def _makeLcpi( self, name, lambdacs, pions, params):
+        """
+        Make a Sigmac0 -> Lc+ pi-
+        """
+
+        _Decays = "[Sigma_c0 -> Lambda_c+ pi-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Lb_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < 16) & (BPVVDCHI2>25) & (BPVDIRA>0.99)" #% params
+
+        _LcCut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Lambda_c+"  : _LcCut,
+            "pi-"  : _PionCut
+            }
+
+        _sel_Sigmac = Selection(name+"_all",
+            RequiredSelections = [ lambdacs, pions ],
+            Algorithm = _Combine)
+
+        return _sel_Sigmac
+#####################################################
+    def _makeXi0cpi( self, name, xics, pions, params):
+        """
+        Make a Xi_c(2790)~- -> Xic0 pi-
+        """
+
+        _Decays = "[Xi_c(2790)~- -> Xi_c0 pi-]cc"
+
+        _CombinationCut = "(APT > %(PTHad)s *MeV) & " \
+                          "(AM < %(B_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < 9) & (BPVVDCHI2>36) & (BPVDIRA>0.995)" #% params
+
+        _XicCut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 250 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Xi_c0"  : _XicCut,
+            "pi-"  : _PionCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ xics, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+#####################################################
+    def _makeXipcpi( self, name, xics, pions, params):
+        """
+        Make a Xi_c(2790)0 -> Xic+ pi-
+        """
+
+        _Decays = "[Xi_c(2790)0 -> Xi_c+ pi-]cc"
+
+        _CombinationCut = "(APT > %(PTHad)s *MeV) & " \
+                          "(AM < %(B_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < 9) & (BPVVDCHI2>36) & (BPVDIRA>0.995)" #% params
+
+        _XicCut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 250 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Xi_c+"  : _XicCut,
+            "pi-"  : _PionCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ xics, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+#####################################################
+    def _makeD0pi( self, name, d0s, pions, params):
+        """
+        Make a D*(2010)- -> D0 pi-
+        """
+
+        _Decays = "[D*(2010)- -> D0 pi-]cc"
+
+        _CombinationCut = "(APT > %(PTHad)s *MeV) & " \
+                          "(AM < %(B_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" % params
+
+        _D0Cut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D0"  : _D0Cut,
+            "pi-"  : _PionCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ d0s, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+#####################################################
+    def _makeDppi( self, name, dplus, pions, params):
+        """
+        Make a D*(2007)0 -> D+ pi-
+        """
+
+        _Decays = "[D*(2007)0 -> D+ pi-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(B_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" % params
+
+        _DCut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D+"  : _DCut,
+            "pi-"  : _PionCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ dplus, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+#####################################################
+    def _makeDspi( self, name, ds, pions, params):
+        """
+        Make a D_1(2420)0 -> Ds+ pi-
+        """
+
+        _Decays = "[D_1(2420)0 -> D_s+ pi-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(B_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" % params
+
+        _DCut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D_s+"  : _DCut,
+            "pi-"  : _PionCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ ds, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#some SS versions
+#####################################################
+    def _makeLcpiSS( self, name, lambdacs, pions, params):
+        """
+        Make a Sigmac0 -> Lc+ pi+
+        """
+
+        _Decays = "[Sigma_c0 -> Lambda_c+ pi+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Lb_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < 16) & (BPVVDCHI2>25) & (BPVDIRA>0.99)" #% params
+
+        _LcCut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Lambda_c+"  : _LcCut,
+            "pi+"  : _PionCut
+            }
+
+        _sel_Sigmac = Selection(name+"_all",
+            RequiredSelections = [ lambdacs, pions ],
+            Algorithm = _Combine)
+
+        return _sel_Sigmac
+
+    def _makeD0piSS( self, name, d0s, pions, params):
+        """
+        Make a D*(2010)+ -> D0 pi+
+        """
+
+        _Decays = "[D*(2010)+ -> D0 pi+]cc"
+
+        _CombinationCut = "(APT > %(PTHad)s *MeV) & " \
+                          "(AM < %(B_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" % params
+
+        _D0Cut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D0"  : _D0Cut,
+            "pi+"  : _PionCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ d0s, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+#####################################################
+    def _makeDppiSS( self, name, dplus, pions, params):
+        """
+        Make a D*(2007)0 -> D+ pi+
+        """
+
+        _Decays = "[D*(2007)0 -> D+ pi+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(B_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" % params
+
+        _DCut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D+"  : _DCut,
+            "pi+"  : _PionCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ dplus, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+#####################################################
+    def _makeDspiSS( self, name, ds, pions, params):
+        """
+        Make a D_1(2420)0 -> Ds+ pi+
+        """
+
+        _Decays = "[D_1(2420)0 -> D_s+ pi+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(B_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" % params
+
+        _DCut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D_s+"  : _DCut,
+            "pi+"  : _PionCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ ds, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#charm pairs
+#####################################################
+    def _makeDpDm( self, name, dplus, params):
+        """
+        Make a psi(3770) -> D+ D-
+        """
+
+        _Decays = "psi(3770) -> D+ D-"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Lb_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" % params
+
+        _DCut = "(PT > %(PTHad)s * MeV)" %params
+        #_PionCut = "(PT > 100 *MeV) & " \
+        #           "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D+"  : _DCut,
+            "D-"  : _DCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ dplus ],
+            Algorithm = _Combine)
+
+        return _sel
+#####################################################
+    def _makeD0D0( self, name, d0s, params):
+        """
+        Make a psi(4040) -> D0 D~0
+        """
+
+        _Decays = "psi(4040) -> D0 D~0"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Lb_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" % params
+
+        _D0Cut = "(PT > %(PTHad)s * MeV)" %params
+        #_PionCut = "(PT > 100 *MeV) & " \
+        #           "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D0"  : _D0Cut,
+            "D~0"  : _D0Cut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ d0s ],
+            Algorithm = _Combine)
+
+        return _sel
+#####################################################
+    def _makeLcLc( self, name, lcs, params):
+        """
+        Make a psi(4415) -> Lambda_c+ Lambda_c~-
+        """
+
+        _Decays = "psi(4415) -> Lambda_c+ Lambda_c~-"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Lb_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < 25) & (BPVVDCHI2>10) & (BPVDIRA>0.9)" #% params
+
+        _LcCut = "(PT > %(PTHad)s * MeV)" %params
+        #_PionCut = "(PT > 100 *MeV) & " \
+        #           "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Lambda_c+"  : _LcCut,
+            "Lambda_c~-"  : _LcCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ lcs ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#exotic
+#####################################################
+    def _makeDmKp( self, name, dplus, kaons, params):
+        """
+        Make a D*(2640)0 -> D- K+
+        """
+
+        _Decays = "[D*(2640)0 -> D- K+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(B_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" % params
+
+        _DCut = "(PT > %(PTHad)s * MeV)" %params
+        _KaonCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) & (PROBNNk>0.1)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D-"  : _DCut,
+            "K+"  : _KaonCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ dplus, kaons ],
+            Algorithm = _Combine)
+
+        return _sel
+#####################################################
+    def _makeD0K( self, name, d0s, kaons, params):
+        """
+        Make a D_s1(2460)- -> D0 K-
+        """
+
+        _Decays = "[D_s1(2460)- -> D0 K-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(B_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" % params
+
+        _D0Cut = "(PT > %(PTHad)s * MeV)" %params
+        _KaonCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) & (PROBNNk>0.1)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D0"  : _D0Cut,
+            "K-"  : _KaonCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ d0s, kaons ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#B decays for B_c
+#####################################################
+    def _makeB2D0pi( self, name, d0s, pions, params):
+        """
+        Make a B- -> D0 pi- (for B_c decays)
+        """
+
+        _Decays = "[B- -> D0 pi-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Bc_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        #_MotherCut = "(VFASPF(VCHI2PDOF) < 10) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" #% params
+        _MotherCut = "(VFASPF(VCHI2/VDOF)<10) & (INTREE(HASTRACK & (P>5000*MeV) & (PT>800*MeV) & (TRCHI2DOF<4.) & (MIPCHI2DV(PRIMARY)>9) & (MIPDV(PRIMARY)>0.1*mm))) & (NINTREE((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))) > 1) & (BPVLTIME()>0.05*ps) & (BPVDIRA>0.9)"
+
+        _D0Cut = "(PT > %(PTHad)s * MeV)" %params
+        _PionCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "D0"  : _D0Cut,
+            "pi-"  : _PionCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ d0s, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+    def _makeB2JpsiK( self, name, jpsis, kaons, params):
+        """
+        Make a B- -> Jpsi K- (for B_c decays)
+        """
+
+        _Decays = "[B- -> J/psi(1S) K-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Bc_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        #_MotherCut = "(VFASPF(VCHI2PDOF) < 10) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" #% params
+        _MotherCut = "(VFASPF(VCHI2/VDOF)<10) & (INTREE(HASTRACK & (P>5000*MeV) & (PT>800*MeV) & (TRCHI2DOF<4.) & (MIPCHI2DV(PRIMARY)>9) & (MIPDV(PRIMARY)>0.1*mm))) & (NINTREE((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > 5000*MeV))) > 1) & (BPVLTIME()>0.05*ps) & (BPVDIRA>0.9)"
+
+        _JpsiCut = "(PT > %(PTHad)s * MeV) & (2 == NINTREE((ABSID==13)&(PROBNNmu > %(MinProbNN)s)))" %params
+        _KaonCut = "(PT > %(KaonPT)s *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) & (PROBNNk>%(MinProbNNTight)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "J/psi(1S)"  : _JpsiCut,
+            "K-"  : _KaonCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ jpsis, kaons ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+# final builder
+#####################################################
+
+#####################################################
+    def _makeB2LLX_charm( self, name, dilepton, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [
+                    "[ B- -> rho(770)0 D*(2010)- ]cc",
+                    "[ B- -> rho(770)0 D_s1(2460)- ]cc",
+                    "[ B0 -> rho(770)0 D*(2007)0 ]cc",
+                    "[ B0 -> rho(770)0 D*(2640)0 ]cc",
+                    "[ B_s0 -> rho(770)0 D_1(2420)0 ]cc",
+                    "[ Lambda_b0 -> rho(770)0 Sigma_c0 ]cc",
+
+                    " B0 -> rho(770)0 psi(3770) ",
+                    " B0 -> rho(770)0 psi(4040) ",
+                    " B0 -> rho(770)0 psi(4415) ",
+                    #"[ Xi_b0 -> rho(770)0  Xi_c(2790)0  ]cc",
+                    "[ Xi_b- -> rho(770)0  Xi_c(2790)~-  ]cc",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+
+#####################################################
+    def _makeB2LLX_charmSS( self, name, dileptonSS, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the SS channels (2101.05566)
+        """
+
+        _Decays = [
+                    "[ B- -> rho(770)0 D*(2010)- ]cc",
+                    #"[ B- -> rho(770)0 D_s1(2460)- ]cc",
+                    "[ B0 -> rho(770)0 D*(2007)~0 ]cc",
+                    #"[ B0 -> rho(770)0 D*(2640)0 ]cc",
+                    "[ B_s0 -> rho(770)0 D_1(2420)~0 ]cc",
+                    "[ Lambda_b0 -> rho(770)0 Sigma_c~0 ]cc",
+
+                    " B0 -> rho(770)0 psi(3770) ",
+                    " B0 -> rho(770)0 psi(4040) ",
+                    " B0 -> rho(770)0 psi(4415) ",
+                    #"[ Xi_b0 -> rho(770)0  Xi_c(2790)0  ]cc",
+                    #"[ Xi_b- -> rho(770)0  Xi_c(2790)~-  ]cc",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dileptonSS, _Merge ] )
+
+#####################################################
+    def _makeB2LLX_Bc( self, name, dilepton, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the B_c decays
+        """
+
+        _Decays = [
+                    "[ B_c- -> rho(770)0 B- ]cc",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BcFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+#####################################################
+    def _makeB2LLX_BcNoPoint( self, name, dilepton, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the B_c decays
+        """
+
+        _Decays = [
+                    "[ B_c- -> rho(770)0 B- ]cc",
+                  ]
+
+        _Cut = "(VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) " % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Combine.DaughtersCuts = {
+            "rho(770)0"  : "(1 < NINTREE((ABSID==13)&(PROBNNmu > %(MinProbNNTight)s)))" %params,
+            }
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XLL.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XLL.py
new file mode 100755
index 000000000..2edf121a9
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XLL.py
@@ -0,0 +1,495 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__  = 'Raja Nandakumar, Fergus Wilson, Stefania Ricciardi'
+__date__    = '04/11/2015'
+__version__ = '$Revision: 0 $'
+
+__all__ = ( 'B2XLLConf', 'default_config' )
+
+"""
+  B --> ll X selections where:
+
+  ll = e+e- / mu+mu- / mu+e- / mu+e+ / e+e+ / mu+mu+
+  X  = rho0 / D0 /  D*+ / J/psi / psi(2S) / K*0 / phi / K+ / pi+ / proton / K1(1270)0 / K1(1270)+
+  and anti-particles of the above
+"""
+
+default_config = {
+    'NAME'         : 'B2XLL',
+    'BUILDERTYPE'  : 'B2XLLConf',
+    'CONFIG'       :
+        {
+        'BFlightCHI2'      : 100
+        , 'BDIRA'          : 0.9995
+        , 'BIPCHI2'        : 25
+        , 'BVertexCHI2'    : 9
+        , 'DiLeptonPT'     : 0
+        , 'DiLeptonFDCHI2' : 16
+        , 'DiLeptonIPCHI2' : 0
+        , 'LeptonIPCHI2'   : 9
+        , 'LeptonPT'       : 300
+        , 'KaonIPCHI2'     : 9
+        , 'KaonPT'         : 400
+        , 'DiHadronMass'   : 2600
+        , 'UpperMass'      : 5500
+        , 'BMassWindow'    : 1500
+        , 'ProbNNe'        : 0.05
+        , 'ProbNNmu'       : 0.05
+        , 'ProbNNp'        : 0.05
+        , 'ProbNNk'        : 0.05
+        , 'ProbNNpi'       : 0.95
+        , 'TrGhostProb'    : 0.4
+        , 'TrChi2DOF'      : 4
+        , 'mmXLinePrescale'  : 1
+        , 'meXLinePrescale'  : 1
+        , 'eeXLinePrescale'  : 1
+        , 'mmXSSLinePrescale': 1
+        , 'meXSSLinePrescale': 1
+        , 'eeXSSLinePrescale': 1
+        },
+    'WGs'     : [ 'RD' ],
+    'STREAMS' : [ 'Leptonic' ]
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class B2XLLConf(LineBuilder) :
+    """
+    Builder for R_X measurements
+    """
+
+    # now just define keys. Default values are fixed later
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        self._name = name
+
+        mmXLine_name = name+"_mm"
+        meXLine_name = name+"_me"
+        eeXLine_name = name+"_ee"
+        mmXSSLine_name = name+"_mmSS"
+        meXSSLine_name = name+"_meSS"
+        eeXSSLine_name = name+"_eeSS"
+
+        from StandardParticles import StdLooseKaons as Kaons
+        from StandardParticles import StdLoosePions as Pions
+        from StandardParticles import StdLooseProtons as Protons
+        from StandardParticles import StdLooseKstar2Kpi as Kstars
+        from StandardParticles import StdLoosePhi2KK as Phis
+        from StandardParticles import StdLooseD02KPi as DZeros
+        from StandardParticles import StdLooseDplus2hhh as DPlus
+        from StandardParticles import StdLooseDstarWithD02KPi as DStars
+        from StandardParticles import StdLooseRho0 as Rhos
+        from StandardParticles import StdLooseJpsi2MuMu as JPsis
+        from StandardParticles import StdLoosePhotons as Gammas
+
+        # 1 : Make the particles we will be actually using
+        SelKaons  = self._filterHadron( name = "KaonsFor" + self._name, sel = Kaons, params = config )
+        SelPions  = self._filterHadron( name = "PionsFor" + self._name, sel = Pions, params = config )
+        SelKstars = self._filterHadron( name = "KstarsFor"+ self._name, sel = Kstars,params = config )
+        SelRhos   = self._filterHadron( name = "RhosFor"  + self._name, sel = Rhos,  params = config )
+        SelPhis   = self._filterHadron( name = "PhisFor"  + self._name, sel = Phis,  params = config )
+        SelJPsis  = self._filterHadron( name = "JPsisFor" + self._name, sel = JPsis, params = config )
+        SelProtons= self._filterHadron( name = "ProtonsFor"+ self._name, sel = Protons, params = config )
+        SelDZeros = self._filterHadron( name = "DZerosFor" + self._name, sel = DZeros,  params = config )
+        SelDPlus  = self._filterHadron( name = "DPlusFor"  + self._name, sel = DPlus,   params = config )
+        SelDStars = self._filterHadron( name = "DStarsFor" + self._name, sel = DStars,  params = config )
+        SelPi0s   = self._myPi0s("PiZeros")
+        SelKs     = self._myKshort("KShorts")
+        SelOmega  = self._omega2PiPiPi0( name="OmegasFor"+self._name, Pions=SelPions, Pi0=SelPi0s )
+        SKStPl1   = self._kstarPlus(name="KStarPlus1For"+self._name, Kaons=SelKs,    Pions=SelPions)
+        SKStPl2   = self._kstarPlus(name="KStarPlus2For"+self._name, Kaons=SelKaons, Pions=SelPi0s)
+        SelKStarPlus=MergedSelection(name="KStarPlusFor"+self._name, RequiredSelections=[SKStPl1,SKStPl2])
+        Self0s    = self._myf0(name="f0(980)sFor"+self._name, pions=SelPions)
+        SelPsi2S  = self._psi2s2jpsihh( name="Psi2SFor"+self._name, jpsi=SelJPsis, pions=SelPions )
+        SelDsPlus = self._dSPlus( name="DsPlusFor"+self._name, Pion=SelPions, Kaons=SelKaons )
+        SelDsStars= self._dSStarPlus( name="DsStarFor"+self._name, DPlus=SelDsPlus, Gamma=Gammas )
+        SelKpipis = self._kpipiPlus( name="KpipiFor"+self._name, Kaons=SelKaons, Pions=SelPions)
+        SelKSpipis= self._kpipiZero( name="KSpipiFor"+self._name, Kaons=SelKs, Pions=SelPions)
+
+        # 2 : Dileptons
+        self._muonCut = "(HASMUON) & (ISMUON) & (PROBNNmu>%(ProbNNmu)s)" %config
+        self._electronCut = "(PROBNNe>%(ProbNNe)s)" %config
+        self._DaughtersCut = "(PT > %(LeptonPT)s) & (MIPCHI2DV(PRIMARY)>%(LeptonIPCHI2)s) & (TRGHOSTPROB<%(TrGhostProb)s) & (TRCHI2DOF<%(TrChi2DOF)s) & (PROBNNpi<%(ProbNNpi)s)" % config
+        MuMu = self._makeMuMu( "MuMuFor"+ self._name, params = config )
+        MuE  = self._makeMuE ( "MuEFor" + self._name, params = config )
+        EE   = self._makeEE  ( "EEFor"  + self._name, params = config )
+
+        MuMu_SS= self._makeMuMu( "MuMuSSFor"+ self._name, params = config, samesign=True )
+        MuE_SS = self._makeMuE ( "MuESSFor" + self._name, params = config, samesign=True )
+        EE_SS  = self._makeEE  ( "EESSFor"  + self._name, params = config, samesign=True )
+
+        SelMuMu= self._filterDiLepton("SelMuMuFor"+ self._name, dilepton = MuMu,params = config, idcut = None )
+        SelMuE = self._filterDiLepton("SelMuEFor" + self._name, dilepton = MuE, params = config, idcut = None )
+        SelEE  = self._filterDiLepton("SelEEFor"  + self._name, dilepton = EE,  params = config, idcut = None )
+
+        SelMuMu_SS= self._filterDiLepton("SelMuMuSSFor"+ self._name, dilepton = MuMu_SS, params= config, idcut = None )
+        SelMuE_SS = self._filterDiLepton("SelMuESSFor" + self._name, dilepton = MuE_SS, params = config, idcut = None )
+        SelEE_SS  = self._filterDiLepton("SelEESSFor"  + self._name, dilepton = EE_SS, params  = config, idcut = None )
+
+        # 3 : Combine
+        # Wanted = [ SelKaons, SelPions, SelKstars, SelRhos, SelPhis, SelJPsis, SelPsi2S, SelProtons, SelDZeros, SelDPlus, SelDStars, SelOmega, Self0s, SelKStarPlus, SelDsPlus, SelDsStars, SelKpipis, SelKSpipis ]
+        # Put everything except the J/Psi(1S) in the Wanted array
+        Wanted = [ SelKaons, SelPions, SelKstars, SelRhos, SelPhis, SelPsi2S, SelProtons, SelDZeros, SelDPlus, SelDStars, SelOmega, Self0s, SelKStarPlus, SelDsPlus, SelDsStars, SelKpipis, SelKSpipis ]
+        SelmmX = self._makeB2LLX(mmXLine_name, dilepton=SelMuMu, XPart=Wanted, lhcbJPsi=SelJPsis, params=config, masscut="ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+        SelmeX = self._makeB2LLX(meXLine_name, dilepton=SelMuE,  XPart=Wanted, lhcbJPsi=SelJPsis, params=config, masscut="ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+        SeleeX = self._makeB2LLX(eeXLine_name, dilepton=SelEE,   XPart=Wanted, lhcbJPsi=SelJPsis, params=config, masscut="ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+        SelmmX_SS = self._makeB2LLX(mmXSSLine_name, dilepton=SelMuMu_SS, XPart=Wanted, lhcbJPsi=SelJPsis, params=config, masscut="ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+        SelmeX_SS = self._makeB2LLX(meXSSLine_name, dilepton=SelMuE_SS,  XPart=Wanted, lhcbJPsi=SelJPsis, params=config, masscut="ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+        SeleeX_SS = self._makeB2LLX(eeXSSLine_name, dilepton=SelEE_SS,   XPart=Wanted, lhcbJPsi=SelJPsis, params=config, masscut="ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+
+        # 4 : Declare Lines
+        SPDFilter = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 600 )" ,
+            'Preambulo' : [ "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb" ]
+            }
+        self.eeXLine = StrippingLine(eeXLine_name+"Line", prescale = config['eeXLinePrescale'], postscale = 1, selection = SeleeX, RelatedInfoTools = self._RelInfoTools(SeleeX),
+                                     FILTER = SPDFilter, RequiredRawEvents = [], MDSTFlag = False )
+        self.mmXLine = StrippingLine(mmXLine_name+"Line", prescale = config['mmXLinePrescale'], postscale = 1, selection = SelmmX, RelatedInfoTools = self._RelInfoTools(SelmmX),
+                                     FILTER = SPDFilter, RequiredRawEvents = [], MDSTFlag = False )
+        self.meXLine = StrippingLine(meXLine_name+"Line", prescale = config['meXLinePrescale'], postscale = 1, selection = SelmeX, RelatedInfoTools = self._RelInfoTools(SelmeX),
+                                     FILTER = SPDFilter, RequiredRawEvents = [], MDSTFlag = False )
+        self.mmX_SSLine = StrippingLine(mmXSSLine_name+"Line", prescale = config['mmXSSLinePrescale'], postscale = 1, selection = SelmmX_SS, RelatedInfoTools = self._RelInfoTools(SelmmX_SS),
+                                        FILTER = SPDFilter, RequiredRawEvents = [], MDSTFlag = False )
+        self.meX_SSLine = StrippingLine(meXSSLine_name+"Line", prescale = config['meXSSLinePrescale'], postscale = 1, selection = SelmeX_SS, RelatedInfoTools = self._RelInfoTools(SelmeX_SS),
+                                        FILTER = SPDFilter, RequiredRawEvents = [], MDSTFlag = False )
+        self.eeX_SSLine = StrippingLine(eeXSSLine_name+"Line", prescale = config['eeXSSLinePrescale'], postscale = 1, selection = SeleeX_SS, RelatedInfoTools = self._RelInfoTools(SeleeX_SS),
+                                        FILTER = SPDFilter, RequiredRawEvents = [], MDSTFlag = False )
+
+        # 5 : register Line
+        self.registerLine( self.mmXLine )
+        self.registerLine( self.meXLine )
+        self.registerLine( self.eeXLine )
+        self.registerLine( self.mmX_SSLine )
+        self.registerLine( self.meX_SSLine )
+        self.registerLine( self.eeX_SSLine )
+
+#####################################################
+    def _RelInfoTools(self, selection) :
+        """
+        Return related information for the given selection
+        """
+        # Use defaults where ever possible
+        _decay1 = "Bottom -> (J/psi(1S) -> ^[l+]CC [l-]CC) X"
+        _decay2 = "Bottom -> (J/psi(1S) -> [l+]CC ^[l-]CC) X"
+        RelInfo = [{ "Type":"RelInfoConeVariables", "Location":"ConeIsoInfo" },
+                   { "Type":"RelInfoVertexIsolation", "Location":"VtxIsoInfo" },
+                   { "Type":"RelInfoVertexIsolationBDT", "Location":"VtxIsoInfoBDT" },
+                   { "Type":"RelInfoBs2MuMuBIsolations", "Location":"BSMUMUVARIABLES"},
+                   # { "Type":"RelInfoBs2MuMuTrackIsolations", "Location":"BSMUMUTrackVARIABLES"},
+                   { "Type":"RelInfoBs2MuMuTrackIsolations", "DaughterLocations":{_decay1:"Muon1MuMuTrkIso", _decay2:"Muon2MuMuTrackIso"} },
+                   { "Type":"RelInfoMuonIsolation", "DaughterLocations":{_decay1:"Muon1Iso", _decay2:"Muon2Iso"} },
+                   ]
+        return RelInfo
+
+#####################################################
+    def _filterHadron( self, name, sel, params ):
+        """
+        Filter for all hadronic final states
+        """
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+        # Added a ghost probability cut to reduce the runI rate
+        _Code = "(PT > %(KaonPT)s *MeV) & " \
+                "((ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) | " \
+                "(NDAUGHTERS == NINTREE( ISBASIC &  (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))))" % params
+        # Mass window
+        if (name.startswith("JPsisFor")):
+            _Code += "& (M <  3200*MeV)" # Avoid psi(2S) resonance in the uppser sideband
+        else :
+            _Code += "& (M <  %(DiHadronMass)s*MeV) " % params
+        # Ghost Probability cut
+        if (name.startswith("KaonsFor") or name.startswith("PionsFor") or name.startswith("ProtonsFor")):
+            _Code += "& (TRGHOSTPROB<%(TrGhostProb)s) & (TRCHI2DOF<%(TrChi2DOF)s) " % params
+        # PID cuts
+        if name.startswith("KaonsFor"):
+            _Code += "& (PROBNNk > %(ProbNNk)s) & (PROBNNpi < %(ProbNNpi)s)" % params
+        elif name.startswith("ProtonsFor"):
+            _Code += "& (PROBNNp > %(ProbNNp)s) & (PROBNNpi < %(ProbNNpi)s)" % params
+        # Actually implement the stuff
+        _Filter = FilterDesktop(Code = _Code)
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
+
+#####################################################
+    def _filterDiLepton(self, name, dilepton, params, idcut = None ) :
+        """
+        Handy interface for dilepton filter
+        """
+        # No Ghost probability cut here, as it is already implemented in the _makell functions
+        _Code = "(ID=='J/psi(1S)') & "\
+                "(PT > %(DiLeptonPT)s *MeV) & "\
+                "(MM < %(UpperMass)s *MeV) & "\
+                "(MINTREE(ABSID<14,PT)>%(LeptonPT)s *MeV) & "\
+                "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY))>%(LeptonIPCHI2)s) & "\
+                "(VFASPF(VCHI2/VDOF)<9) & (BPVVDCHI2> %(DiLeptonFDCHI2)s) & "\
+                "(MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s )" % params
+
+        # add additional cut on PID if requested
+        if idcut: _Code += ( " & " + idcut )
+        _Filter = FilterDesktop( Code = _Code )
+        return Selection(name, Algorithm = _Filter, RequiredSelections = [ dilepton ] )
+
+#####################################################
+    def _psi2s2jpsihh( self, name, jpsi, pions ):
+        """
+        Combine J/Psi and 2 pions to make psi(2S)
+        """
+        _psi2S = CombineParticles()
+        _psi2S.DecayDescriptor = "psi(2S) -> J/psi(1S) pi+ pi-"
+        _psi2S.CombinationCut = "(ADAMASS('psi(2S)')<200*MeV)"
+        _psi2S.MotherCut = "(ADMASS('psi(2S)')<200*MeV)"
+        return Selection(name, Algorithm = _psi2S, RequiredSelections = [ jpsi, pions ])
+
+#####################################################
+    def _myPi0s(self, name):
+        """
+        Filter Pi0 from Std Pi0
+        """
+        from StandardParticles import StdLooseResolvedPi0 as _pi0resolved
+        from StandardParticles import StdLooseMergedPi0 as _pi0merged
+        _filter_pi0resolved = FilterDesktop(Code="PT>800*MeV")
+        _filter_pi0merged = FilterDesktop(Code="PT>800*MeV")
+        _selpi0resolved = Selection("Selection_"+name+"_pi0resolved", RequiredSelections=[_pi0resolved], Algorithm=_filter_pi0resolved)
+        _selpi0merged = Selection("Selection_"+name+"_pi0merged", RequiredSelections=[_pi0merged], Algorithm=_filter_pi0merged)
+        _sel = MergedSelection("Selection_"+name+"_pi0", RequiredSelections=[_selpi0resolved,_selpi0merged])
+        return _sel
+
+#####################################################
+    def _omega2PiPiPi0( self, name, Pions, Pi0):
+        """
+        Make omega -> pi+ pi- pi0
+        """
+        _omega2pipipizero = CombineParticles()
+        _omega2pipipizero.DecayDescriptor = "omega(782) -> pi+ pi- pi0"
+        _omega2pipipizero.CombinationCut = "(ADAMASS('omega(782)') < 200 *MeV)"
+        _omega2pipipizero.MotherCut = "(ADMASS('omega(782)') < 200 *MeV) & (VFASPF(VPCHI2)> 0.00001)"
+        _omegaConf = _omega2pipipizero.configurable("Combine_"+name+"_PiPiPi0")
+        _selOMEGA2PIPIPIZERO = Selection( "Selection_"+name+"_omega2pipipizero",
+                                          Algorithm = _omegaConf,
+                                          RequiredSelections = [ Pions, Pi0 ] )
+        return _selOMEGA2PIPIPIZERO
+
+#####################################################
+    def _myf0(self, name, pions):
+        """
+        Copy of the stuff which makes the StdLooseDetachedDipion
+        """
+        _f0 = CombineParticles()
+        _f0.DecayDescriptor = "f_0(980) -> pi+ pi-"
+        _f0.CombinationCut = "(AM<2700.0*MeV)"
+        _f0.MotherCut = "(M<2700.0*MeV)"
+        _f0Conf = _f0.configurable("Combine_"+name)
+        _self0 = Selection("SelectionOff0For"+name, RequiredSelections=[pions], Algorithm=_f0Conf)
+        return _self0
+
+#####################################################
+    def _myKshort(self, name):
+        """
+        Filter kshort from StdLooseKshort
+        """
+        from StandardParticles import StdLooseKsDD as _ksdd
+        from StandardParticles import StdLooseKsLL as _ksll
+        _filter_ksdd = FilterDesktop(Code = "(ADMASS('KS0') < 50*MeV) & (BPVLTIME() > 0.5*ps)")
+        _filter_ksll = FilterDesktop(Code = "(ADMASS('KS0') < 50*MeV) & (BPVLTIME() > 0.5*ps)")
+        _selksdd = Selection("Selection_"+name+"_Ksdd", RequiredSelections = [ _ksdd ], Algorithm = _filter_ksdd)
+        _selksll = Selection("Selection_"+name+"_Ksll", RequiredSelections = [ _ksll ], Algorithm = _filter_ksll)
+        _sel = MergedSelection("Selection_"+name+"_Kshort", RequiredSelections = [ _selksdd, _selksll ])
+        return _sel
+
+#####################################################
+    def _dSPlus( self, name, Pion, Kaons ):
+        """
+        Make Ds -> K K Pi
+        """
+        _dsPlus = CombineParticles()
+        _dsPlus.DecayDescriptor = "[D_s+ -> K+ K- pi+]cc"
+        _dsPlus.MotherCut = "(ADMASS('D_s+') < 300 *MeV)"
+        _dsPlusConf = _dsPlus.configurable("Combine_"+name+"_Dsplus")
+        _selDsPlus = Selection( "Selection_"+name+"_DsPlus", Algorithm = _dsPlusConf, RequiredSelections = [ Pion, Kaons ] )
+        return _selDsPlus
+
+#####################################################
+    def _dSStarPlus( self, name, DPlus, Gamma ):
+        """
+        Make Ds* -> Ds (=D_s+ for us) Gamma
+        """
+        _dsstar = CombineParticles()
+        _dsstar.DecayDescriptor = "[D*_s+ -> D_s+ gamma]cc"
+        _dsstar.MotherCut = "(ADMASS('D*_s+') < 300 *MeV)"
+        _dsstar.DaughtersCuts = { 'gamma' : '(CL > 0.25)' }
+        _dsstarConf = _dsstar.configurable("Combine_"+name+"_Dsstar")
+        _selDsSTAR = Selection( "Selection_"+name+"_DsStar", Algorithm = _dsstarConf, RequiredSelections = [ DPlus, Gamma ] )
+        return _selDsSTAR
+
+#####################################################
+    def _kstarPlus( self, name, Kaons, Pions):
+        """
+        Make K*(892)+ -> K+ pi0 or Kspi+
+        """
+        _kstar = CombineParticles()
+        _kstar.DecayDescriptors = ["[K*(892)+ -> K+ pi0]cc", "[K*(892)+ -> KS0 pi+]cc"]
+        _kstar.MotherCut = "(ADMASS('K*(892)+') < 300 *MeV)"
+        _kstarConf = _kstar.configurable("Combine_"+name+"_KPi")
+        _selKSTAR2KPIZERO = Selection( "Selection_"+name+"_Kstar2kaonpion", Algorithm = _kstarConf, RequiredSelections = [ Kaons, Pions ] )
+        return _selKSTAR2KPIZERO
+
+#####################################################
+    def _kpipiPlus( self, name, Kaons, Pions):
+        """
+        Make K1(1270)+ -> K+ pi- pi+
+        """
+        _kpipi = CombineParticles()
+        _kpipi.DecayDescriptors = ["[K_1(1270)+ -> K+ pi- pi+]cc"]
+        _kpipi.MotherCut = "in_range(500*MeV, M, 3000*MeV) & ( VFASPF(VCHI2PDOF) < 36 )"
+        _kpipiConf = _kpipi.configurable("Combine_"+name+"_KPiPi")
+        _selKPiPiPlus = Selection( "Selection_"+name+"_kpipi", Algorithm = _kpipiConf, RequiredSelections = [ Kaons, Pions ] )
+        return _selKPiPiPlus
+
+#####################################################
+    def _kpipiZero( self, name, Kaons, Pions):
+        """
+        Make K1(1270)0 -> KS pi- pi+
+        """
+        _kpipi = CombineParticles()
+        _kpipi.DecayDescriptors = ["K_1(1270)0 -> KS0 pi- pi+"]
+        _kpipi.MotherCut = "in_range(500*MeV, M, 3000*MeV) & ( VFASPF(VCHI2PDOF) < 36 )"
+        _kpipiConf = _kpipi.configurable("Combine_"+name+"_KSPiPi")
+        _selKPiPiZero = Selection( "Selection_"+name+"_kspipi", Algorithm = _kpipiConf, RequiredSelections = [ Kaons, Pions ] )
+        return _selKPiPiZero
+
+#####################################################
+    def _makeB2LLX( self, name, dilepton, XPart, lhcbJPsi, params, masscut = "(ADAMASS('B+')<1500*MeV)" ):
+
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Cut   = "((VFASPF(VCHI2/VDOF)< %(BVertexCHI2)s ) "\
+                 "& (BPVIPCHI2()< %(BIPCHI2)s ) "\
+                 "& (BPVDIRA> %(BDIRA)s ) "\
+                 "& (BPVVDCHI2> %(BFlightCHI2)s ))" % params
+
+        _Decays =  ["[ B+ -> J/psi(1S) K+ ]cc",
+                    "[ B+ -> J/psi(1S) pi+ ]cc",
+                    "[ B+ -> J/psi(1S) p+ ]cc",
+                    "[ B+ -> J/psi(1S) D+ ]cc",
+                    "[ B+ -> J/psi(1S) D*(2010)+ ]cc",
+                    "[ B+ -> J/psi(1S) K*(892)+ ]cc",
+                    "[ B+ -> J/psi(1S) D_s+ ]cc",
+                    "[ B+ -> J/psi(1S) D*_s+ ]cc",
+                    "[ B0 -> J/psi(1S) K*(892)0 ]cc",
+                    "[ B0 -> J/psi(1S) D0 ]cc",
+                    "[ B+ -> J/psi(1S) K_1(1270)+ ]cc",
+                    "B0 -> J/psi(1S) phi(1020)",
+                    "B0 -> J/psi(1S) rho(770)0",
+                    "B0 -> J/psi(1S) J/psi(1S)",
+                    "B0 -> J/psi(1S) psi(2S)",
+                    "B0 -> J/psi(1S) omega(782)",
+                    "B0 -> J/psi(1S) f_0(980)",
+                    "B0 -> J/psi(1S) K_1(1270)0",
+                    ]
+
+        _Combine = CombineParticles(DecayDescriptors = _Decays,
+                                    CombinationCut = masscut,
+                                    MotherCut = _Cut )
+
+        _Merge   = MergedSelection("Merge"+name,
+                                   RequiredSelections = XPart )
+
+        # Do it this way to prevent multiple candidates coming from the same J/psi candidate being in XPart and dilepton
+        selMyB1 = Selection("AllExceptJpsi"+name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ])
+        selMyB2 = Selection("OnlyTheJpsi"+name,   Algorithm = _Combine, RequiredSelections = [ dilepton, lhcbJPsi ])
+        return MergedSelection(name, RequiredSelections = [ selMyB1, selMyB2 ] )
+
+#####################################################
+    def _makeMuE( self, name, params, samesign = False):
+        """
+        Makes MuE combinations
+        """
+        from StandardParticles import StdLooseElectrons as Electrons
+        from StandardParticles import StdLooseMuons as Muons
+
+        _MassCut = "(AM > 100*MeV)"
+
+        _DecayDescriptor = "[J/psi(1S) -> mu+ e-]cc"
+        if samesign: _DecayDescriptor = "[J/psi(1S) -> mu+ e+]cc"
+
+        _Combine = CombineParticles( DecayDescriptor = _DecayDescriptor,
+                                     CombinationCut  = _MassCut,
+                                     MotherCut       = "(VFASPF(VCHI2/VDOF) < 9)")
+
+        _Combine.DaughtersCuts   = {
+            "e+"  : self._DaughtersCut + " & " + self._electronCut,
+            "mu+" : self._DaughtersCut + " & " + self._muonCut
+            }
+
+        return Selection(name,
+                         Algorithm = _Combine,
+                         RequiredSelections = [ Muons, Electrons ] )
+#####################################################
+    def _makeMuMu( self, name, params, samesign = False):
+        """
+        Makes MuMu combinations
+        """
+        from StandardParticles import StdLooseMuons as Muons
+        _MassCut = "(AM > 100*MeV)"
+        _DecayDescriptor = "J/psi(1S) -> mu+ mu-"
+        if samesign: _DecayDescriptor = "[J/psi(1S) -> mu+ mu+]cc"
+        _Combine = CombineParticles( DecayDescriptor = _DecayDescriptor,
+                                     CombinationCut  = _MassCut,
+                                     MotherCut       = "(VFASPF(VCHI2/VDOF) < 9)")
+        _Combine.DaughtersCuts   = {
+            "mu-" : self._DaughtersCut + " & " + self._muonCut,
+            "mu+" : self._DaughtersCut + " & " + self._muonCut
+            }
+        return Selection(name,
+                         Algorithm = _Combine,
+                         RequiredSelections = [ Muons ] )
+
+#####################################################
+    def _makeEE( self, name, params, samesign = False):
+        """
+        Makes EE combinations
+        """
+        # from StandardParticles import StdLooseElectrons as Electrons
+        # _MassCut = "(AM > 100*MeV)"
+        # _DecayDescriptor = "J/psi(1S) -> e+ e-"
+        # if samesign: _DecayDescriptor = "[J/psi(1S) -> e+ e+]cc"
+        # _Combine = CombineParticles( DecayDescriptor = _DecayDescriptor,
+        #                              CombinationCut  = _MassCut,
+        #                              MotherCut       = "(VFASPF(VCHI2/VDOF) < 9)")
+        # _Combine.DaughtersCuts   = {
+        #     "e+" : self._DaughtersCut + " & " + self._electronCut,
+        #     "e-" : self._DaughtersCut + " & " + self._electronCut
+        #     }
+        # return Selection(name,
+        #                  Algorithm = _Combine,
+        #                  RequiredSelections = [ Electrons ] )
+
+        from Configurables import DiElectronMaker,ProtoParticleCALOFilter
+        from CommonParticles.Utils import trackSelector 
+        ee = DiElectronMaker('diElectronsForXLL' + name)
+        ee.Particle = "J/psi(1S)"
+        ee.DecayDescriptor = "J/psi(1S) -> e+ e-"
+        selector = trackSelector(ee, trackTypes=["Long", "Downstream"]) 
+        if samesign:
+            ee.OppositeSign = False
+        ee.addTool( ProtoParticleCALOFilter('Electron'))
+        ee.Electron.Selection = ["RequiresDet='CALO'"]
+        ee.DiElectronMassMin = 100
+        return Selection(name+'eeSelection',Algorithm=ee)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XMuMu.py
new file mode 100644
index 000000000..84e53f252
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XMuMu.py
@@ -0,0 +1,1131 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping selection for nearly all electroweak penguin analyses. Includes same-sign combinations.
+"""
+
+__author__ = 'Paul Schaack, M. Kreps, T. Blake'
+__date__ = '12/02/2011'
+__version__ = '$Revision: 1.2 $'
+
+__all__ = ( 'B2XMuMuConf', 'default_config' )
+
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *  #check if needed
+
+
+from GaudiConfUtils.ConfigurableGenerators import  CombineParticles, FilterDesktop, DaVinci__N3BodyDecays, DaVinci__N4BodyDecays
+
+from PhysSelPython.Wrappers import Selection, AutomaticData, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from Configurables import SubstitutePID,  SubPIDMMFilter
+
+
+#################
+#
+#  Define Cuts here
+#
+#################
+
+default_config = {
+    'NAME'       : 'B2XMuMu',
+    'BUILDERTYPE' : 'B2XMuMuConf',
+    'CONFIG'     :
+    {
+    "A1_Comb_MassHigh": 4200.0, 
+    "A1_Comb_MassLow": 0.0, 
+    "A1_Dau_MaxIPCHI2": 16.0, 
+    "A1_FlightChi2": 36.0, 
+    "A1_MassHigh": 4000.0, 
+    "A1_MassLow": 0.0, 
+    "A1_MinIPCHI2": 4.0, 
+    "A1_VtxChi2": 8.0, 
+    "B_Comb_MassHigh": 7100.0, 
+    "B_Comb_MassLow": 4600.0, 
+    "B_DIRA": 0.9999, 
+    "B_Dau_MaxIPCHI2": 9.0, 
+    "B_FlightCHI2": 64.0, 
+    "B_IPCHI2": 16.0, 
+    "B_MassHigh": 7000.0, 
+    "B_MassLow": 4700.0, 
+    "B_VertexCHI2": 8.0, 
+    "DECAYS": [
+    "B0 -> J/psi(1S) phi(1020)", 
+    "[B0 -> J/psi(1S) K*(892)0]cc", 
+    "B0 -> J/psi(1S) rho(770)0", 
+    "[B+ -> J/psi(1S) rho(770)+]cc", 
+    "B0 -> J/psi(1S) f_2(1950)", 
+    "B0 -> J/psi(1S) KS0", 
+    "[B0 -> J/psi(1S) D~0]cc", 
+    "[B+ -> J/psi(1S) K+]cc", 
+    "[B+ -> J/psi(1S) pi+]cc", 
+    "[B+ -> J/psi(1S) K*(892)+]cc", 
+    "[B+ -> J/psi(1S) D+]cc", 
+    "[B+ -> J/psi(1S) D*(2010)+]cc", 
+    "[Lambda_b0 -> J/psi(1S) Lambda0]cc", 
+    "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc", 
+    "B0 -> J/psi(1S) pi0", 
+    "[B+ -> J/psi(1S) a_1(1260)+]cc", 
+    "[B+ -> J/psi(1S) K_1(1270)+]cc", 
+    "[B+ -> J/psi(1S) K_2(1770)+]cc", 
+    "B0 -> J/psi(1S) K_1(1270)0", 
+    "[B+ -> J/psi(1S) K_1(1400)+]cc", 
+    "B0 -> J/psi(1S) K_1(1400)0",
+    "[Xi_b- -> J/psi(1S) Xi-]cc",
+    "[Omega_b- -> J/psi(1S) Omega-]cc", 
+    "B0 -> J/psi(1S) f_1(1285)", 
+    "B0 -> J/psi(1S) omega(782)"
+    ],
+    "Dau_DIRA": -0.9, 
+    "Dau_VertexCHI2": 12.0, 
+    "Dimu_Dau_MaxIPCHI2": 6.0, 
+    "Dimu_FlightChi2": 9.0, 
+    "DimuonUPPERMASS": 7100.0, 
+    "DimuonWS": True, 
+    "HLT1_FILTER": None, 
+    "HLT2_FILTER": None, 
+    "HadronWS": False, 
+    "Hadron_MinIPCHI2": 6.0, 
+    "K12OmegaK_CombMassHigh": 2000, 
+    "K12OmegaK_CombMassLow": 400, 
+    "K12OmegaK_MassHigh": 2100, 
+    "K12OmegaK_MassLow": 300, 
+    "K12OmegaK_VtxChi2": 8.0, 
+    "KpiVXCHI2NDOF": 8.0, 
+    "KsWINDOW": 30.0, 
+    "Kstar_Comb_MassHigh": 6200.0, 
+    "Kstar_Comb_MassLow": 0.0, 
+    "Kstar_Dau_MaxIPCHI2": 6.0, 
+    "Kstar_FlightChi2": 16.0, 
+    "Kstar_MassHigh": 6200.0, 
+    "Kstar_MassLow": 0.0, 
+    "Kstar_MinIPCHI2": 0.0, 
+    "KstarplusWINDOW": 300.0, 
+    "L0DU_FILTER": None, 
+    "LambdaWINDOW": 30.0, 
+    "LongLivedPT": 0.0, 
+    "LongLivedTau": 2,
+    'HyperonWindow' : 50.0,
+    'HyperonCombWindow' : 65.0,
+    'HyperonMaxDocaChi2' : 20.0,
+    "MuonNoPIDs_PIDmu": 0.0, 
+    "MuonPID": -3.0, 
+    "Muon_IsMuon": True, 
+    "Muon_MinIPCHI2": 6.0, 
+    "OmegaChi2Prob": 1e-05, 
+    "Omega_CombMassWin": 400, 
+    "Omega_MassWin": 400, 
+    "Pi0ForOmegaMINPT": 800.0, 
+    "Pi0MINPT": 800.0, 
+    "RelatedInfoTools": [
+     {
+     "Location": "KSTARMUMUVARIABLES",
+     "Type": "RelInfoBKstarMuMuBDT",
+     "Variables": ['MU_SLL_ISO_1', 'MU_SLL_ISO_2']
+     },
+     {
+    "Location": "KSTARMUMUVARIABLES2",
+    "Type": "RelInfoBKstarMuMuHad",
+    "Variables": ['K_SLL_ISO_HAD', 'PI_SLL_ISO_HAD' ]
+    },
+    {
+    "Location": "ConeIsoInfo", 
+    "Type": "RelInfoConeVariables", 
+    "Variables": [
+    "CONEANGLE", 
+    "CONEMULT", 
+    "CONEPTASYM", 
+    "CONEPT", 
+    "CONEP", 
+    "CONEPASYM", 
+    "CONEDELTAETA", 
+    "CONEDELTAPHI"
+    ]
+    }, 
+    {
+    "Location": "VtxIsoInfo", 
+    "Type": "RelInfoVertexIsolation", 
+    "Variables": [
+    "VTXISONUMVTX", 
+    "VTXISODCHI2ONETRACK", 
+    "VTXISODCHI2MASSONETRACK", 
+    "VTXISODCHI2TWOTRACK", 
+    "VTXISODCHI2MASSTWOTRACK"
+    ]
+    },
+    {
+    "Location": "VtxIsoBDTInfo", 
+    "Type": "RelInfoVertexIsolationBDT"
+    },
+    {
+    "Location": "TrackIsolationBDT2",
+    "Type": "RelInfoTrackIsolationBDT2",
+    "Particles": [1,2]
+    }
+    ], 
+    "SpdMult": 600, 
+    "Track_GhostProb": 0.5, 
+    "UseNoPIDsHadrons": True
+    }, 
+    
+    #{"Type" : "RelInfoConeIsolation"
+    #     ,'ConeSize'         : 1.0
+    #     ,'Variables' : [ 'CC_ANGLE', 'CC_MULT', 'CC_SPT', 'CC_VPT', 'CC_PX', 'CC_PY', 'CC_PZ', 'CC_PASYM', 'CC_PTASYM', 'CC_PXASYM', 'CC_PYASYM', 'CC_PZASYM', 'CC_DELTAETA', 'CC_DELTAPHI', 'CC_IT',  'CC_MAXPT_Q', 'CC_MAXPT_PT', 'CC_MAXPT_PX', 'CC_MAXPT_PY', 'CC_MAXPT_PZ', 'CC_MAXPT_PE',  'NC_ANGLE', 'NC_MULT', 'NC_SPT', 'NC_VPT', 'NC_PX', 'NC_PY', 'NC_PZ', 'NC_PASYM', 'NC_PTASYM', 'NC_PXASYM', 'NC_PYASYM', 'NC_PZASYM', 'NC_DELTAETA', 'NC_DELTAPHI', 'NC_IT',  'NC_MAXPT_PT', 'NC_MAXPT_PX', 'NC_MAXPT_PY', 'NC_MAXPT_PZ' ]
+    #     ,'Location':'ConeIsoInfoCCNC'}
+    
+    'WGs'     : [ 'RD' ],
+    'STREAMS' : ['Leptonic'] 
+    }
+
+#################
+#
+#  Make line here
+#
+#################
+
+
+
+class B2XMuMuConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+
+        LineBuilder.__init__(self, name, config)
+
+        self.name = name
+        
+        # Bd2KstartMuMu cuts definitions
+        self.BdCombCut = "(AM > %(B_Comb_MassLow)s * MeV) & (AM < %(B_Comb_MassHigh)s * MeV)" %config
+
+        self.BdCut = "(abs(SUMQ) < 3) & " \
+                     "(M > %(B_MassLow)s * MeV) & " \
+                     "(M < %(B_MassHigh)s * MeV) & " \
+                     "(VFASPF(VCHI2/VDOF) < %(B_VertexCHI2)s) & " \
+                     "(BPVIPCHI2() < %(B_IPCHI2)s) & " \
+                     "(BPVDIRA> %(B_DIRA)s) & " \
+                     "(BPVVDCHI2 > %(B_FlightCHI2)s) & " \
+                     "(MAXTREE(ISBASIC,MIPCHI2DV(PRIMARY))> %(B_Dau_MaxIPCHI2)s )" %config
+
+        DaughterCuts = "(VFASPF(VCHI2/VDOF) < %(Dau_VertexCHI2)s) & " \
+                       "(BPVDIRA> %(Dau_DIRA)s)" %config
+        
+        self.KstarCombCut = "(AM > %(Kstar_Comb_MassLow)s * MeV) & " \
+                            "(AM < %(Kstar_Comb_MassHigh)s * MeV) & " \
+                            "(ADOCACHI2CUT(20.,''))" %config
+        self.KstarCut = DaughterCuts + " & (M > %(Kstar_MassLow)s * MeV) & " \
+                        "(M < %(Kstar_MassHigh)s * MeV) & " \
+                        "(BPVVDCHI2 > %(Kstar_FlightChi2)s) & " \
+                        "(MIPCHI2DV(PRIMARY) > %(Kstar_MinIPCHI2)s) & " \
+                        "(MAXTREE(ISBASIC,MIPCHI2DV(PRIMARY))> %(Kstar_Dau_MaxIPCHI2)s )" %config
+        
+        self.DiMuonCombCut = "(AM < %(DimuonUPPERMASS)s *MeV)" %config 
+        self.DiMuonCut = DaughterCuts + " & (BPVVDCHI2 > %(Dimu_FlightChi2)s) & " \
+                         "(MAXTREE(ISBASIC,MIPCHI2DV(PRIMARY))> %(Dimu_Dau_MaxIPCHI2)s )" %config
+        
+
+        self.TrackCuts = "(TRGHP < %(Track_GhostProb)s)" %config
+
+        self.HypBachCuts = "(MIPCHI2DV(PRIMARY) > %(Hadron_MinIPCHI2)s)" %config
+        
+        self.HadronCuts = "(MIPCHI2DV(PRIMARY) > %(Hadron_MinIPCHI2)s) & (HASRICH)" %config
+        
+        self.KaonCut = self.TrackCuts + " & " + self.HadronCuts
+        self.PionCut = self.TrackCuts + " & " + self.HadronCuts
+        
+        self.MuonCut = self.TrackCuts + " & (MIPCHI2DV(PRIMARY) > %(Muon_MinIPCHI2)s) & (PIDmu> %(MuonPID)s)" %config
+
+        self.Dimuon = self.__Dimuon__(config)
+
+        self.Protons = self.__Protons__(config)
+        self.Kaons = self.__Kaons__(config)
+        self.Pions = self.__Pions__(config)       
+        self.Kshort = self.__Kshort__(config)
+        self.Dplus = self.__Dplus__(config)
+        self.Dzero = self.__Dzero__(config)
+        self.LambdaLL, self.LambdaDD = self.__LambdaSeparate__(config)
+        self.Lambda = self.__Lambda__(self.LambdaLL, self.LambdaDD, config)
+        self.Pi0 = self.__Pi0__(config)
+        self.Pi0ForOmega = self.__Pi0ForOmega__(config)
+        self.Rho = self.__Rho__(self.Pions, config)
+        self.F2 = self.__F2__(self.Rho, config)
+        self.Phi = self.__Phi__(self.Rho, config)
+        self.Kstar = self.__Kstar__(self.Rho, config)        
+        self.Lambdastar = self.__Lambdastar__(self.Rho, config)
+        self.Xi = self.__Xi__(self.LambdaLL, self.LambdaDD, config)
+        self.Omega = self.__Omega__(self.LambdaLL, self.LambdaDD, config)
+        self.Kstar2KsPi = self.__Kstar2KsPi__(self.Kshort, self.Pions, config)
+        self.Kstar2KPi0 = self.__Kstar2KPi0__(self.Kaons, self.Pi0, config)
+        self.Rho2PiPi0 = self.__Rho2PiPi0__(self.Pions, self.Pi0, config)
+        self.Omega2PiPiPi0 = self.__Omega2PiPiPi0__(self.Pions, self.Pi0ForOmega, config)
+        self.K12OmegaK = self.__K12OmegaK__(self.Kaons, self.Omega2PiPiPi0, config)
+        self.K12OmegaKS = self.__K12OmegaKS__(self.Kshort, self.Omega2PiPiPi0, config)
+        self.Dstar = self.__Dstar__(config)
+        self.A1 = self.__A1__(self.Pions, config)
+        self.K1 = self.__K1__(self.A1, config)
+        self.K2 = self.__K2__(self.A1, config)
+        self.K10 = self.__K10__(self.Kshort,self.Pions,config)
+        self.F1 = self.__F1__(self.Pions, config)
+
+        self.AvailableDaughters = {
+            'rho(770)0'     : [ self.Rho   ] ,
+            'K*(892)0'      : [ self.Kstar ] ,
+            'phi(1020)'     : [ self.Phi   ] ,
+            'f_2(1950)'     : [ self.F2    ] ,
+            'KS0'           : [ self.Kshort] ,
+            'D~0'           : [ self.Dzero ] ,
+            'K+'            : [ self.Kaons ] ,
+            'pi+'           : [ self.Pions ] ,
+            'K*(892)+'      : [ self.Kstar2KsPi, self.Kstar2KPi0 ],
+            'rho(770)+'     : [ self.Rho2PiPi0 ],
+            'omega(782)'    : [ self.Omega2PiPiPi0 ],
+            'D+'            : [ self.Dplus ] ,
+            'D*(2010)+'     : [ self.Dstar ] ,
+            'Lambda0'       : [ self.Lambda ] ,
+            'Lambda(1520)0' : [ self.Lambdastar ] ,
+            'Xi-'           : [ self.Xi ],
+            'Omega-'        : [ self.Omega ],
+            'pi0'           : [ self.Pi0 ] ,
+            'a_1(1260)+'    : [ self.A1 ],
+            'K_1(1270)+'    : [ self.K1 ],
+            'K_2(1770)+'    : [ self.K2 ],
+            'K_1(1270)0'    : [ self.K10 ],
+            'K_1(1400)+'    : [ self.K12OmegaK ],
+            'K_1(1400)0'    : [ self.K12OmegaKS ], 
+            'f_1(1285)'     : [ self.F1 ]
+            }
+
+        self.DeclaredDaughters = [] 
+        
+        for d in config['DECAYS']:
+            for k in self.AvailableDaughters.keys():
+                if k in d: self.DeclaredDaughters += self.AvailableDaughters.pop(k) 
+                
+        
+        self.Bs = self.__Bs__( self.Dimuon,
+                               daughters = self.DeclaredDaughters,  
+                               conf = config)
+
+        self.FilterSPD = {
+                'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+                'Preambulo' : [
+                "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+                ]
+                }
+        
+        if config['DECAYS']:
+            # standard lines
+            self.line = StrippingLine(
+                self.name+"_Line",
+                prescale = 1,
+                RelatedInfoTools = config['RelatedInfoTools'],
+                HLT2 = config['HLT2_FILTER'],
+                HLT1 = config['HLT1_FILTER'],
+                L0DU = config['L0DU_FILTER'],
+                FILTER = self.FilterSPD,
+                algos=[self.Bs],
+                MDSTFlag=False,
+                EnableFlavourTagging = True,
+                MaxCandidates = 4000
+                )
+        
+            self.registerLine(self.line)
+
+
+        
+    def __Dimuon__(self, conf):
+        '''
+        Create a new dimuon from scratch
+        '''
+        wsCombinations=conf['DimuonWS']
+        from  GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        CombineDiMuon = CombineParticles()
+        if wsCombinations == True:
+            CombineDiMuon.DecayDescriptors = ["J/psi(1S) -> mu- mu+", "J/psi(1S) -> mu+ mu+", " J/psi(1S) -> mu- mu-"]
+        else:
+            CombineDiMuon.DecayDescriptors = ["J/psi(1S) -> mu- mu+"]
+        CombineDiMuon.DaughtersCuts = { "mu+" : self.MuonCut, "mu-" : self.MuonCut }
+        CombineDiMuon.CombinationCut = self.DiMuonCombCut 
+        CombineDiMuon.MotherCut     = self.DiMuonCut
+
+        IsMuonFlag = conf['Muon_IsMuon'] 
+        from StandardParticles import StdAllLooseMuons, StdAllNoPIDsMuons
+        Muons = StdAllLooseMuons if IsMuonFlag else StdAllNoPIDsMuons
+         
+        from PhysSelPython.Wrappers import Selection
+        SelDiMuon = Selection("Sel_" + self.name + "_DiMuon", Algorithm = CombineDiMuon, RequiredSelections = [ Muons ] )
+        return SelDiMuon
+
+
+    
+    def __Kaons__(self, conf):
+        """
+        Filter kaons from StdAllNoPIDsKaons or StdAllLooseKaons
+        """  
+
+        _kaons = None
+        UseNoPIDsHadrons=conf['UseNoPIDsHadrons']
+        if (UseNoPIDsHadrons == True):
+            _kaons = AutomaticData(Location = 'Phys/StdAllNoPIDsKaons/Particles')
+        else:
+            _kaons = AutomaticData(Location = 'Phys/StdAllLooseKaons/Particles')
+
+        _filter = FilterDesktop(Code = self.TrackCuts+" & "+self.HadronCuts)
+        _sel = Selection("Selection_"+self.name+"_StdAllNoPIDsKaons",
+                         RequiredSelections = [ _kaons ] ,
+                         Algorithm = _filter)
+        return _sel
+
+    def __Protons__(self, conf):
+        """
+        Filter protons from StdAllLooseProtons or StdAllLooseProtons
+        """  
+
+        _protons = None
+        UseNoPIDsHadrons=conf['UseNoPIDsHadrons']
+        if (UseNoPIDsHadrons == True):
+            _protons = AutomaticData(Location = 'Phys/StdAllNoPIDsProtons/Particles')
+        else:
+            _protons = AutomaticData(Location = 'Phys/StdAllLooseProtons/Particles')
+        _filter = FilterDesktop(Code = self.TrackCuts+" & "+self.HadronCuts)
+        _sel = Selection("Selection_"+self.name+"_StdAllNoPIDsProtons",
+                         RequiredSelections = [ _protons ] ,
+                         Algorithm = _filter)
+        return _sel
+
+
+
+    def __Pions__(self, conf):
+        """
+        Filter pions from StdAllNoPIDsPions or StdAllLoosePions
+        """  
+
+        _pions = None
+        UseNoPIDsHadrons=conf['UseNoPIDsHadrons']
+        if (UseNoPIDsHadrons == True):
+            _pions = AutomaticData(Location = 'Phys/StdAllNoPIDsPions/Particles')
+        else:
+            _pions = AutomaticData(Location = 'Phys/StdAllLoosePions/Particles')
+        _filter = FilterDesktop(Code = self.TrackCuts+" & "+self.HadronCuts)
+        _sel = Selection("Selection_"+self.name+"_StdAllNoPIDsPions",
+                         RequiredSelections = [ _pions ] ,
+                         Algorithm = _filter)
+        return _sel
+ 
+    def __A1CombCut__(self, conf):
+        """
+        Returns the A1 cut string
+        """
+        _A1CombCut = "(AM > %(A1_Comb_MassLow)s * MeV) &"\
+        "(AM < %(A1_Comb_MassHigh)s * MeV) & "\
+        "(ADOCACHI2CUT(20.,'')) &" \
+        "(AHASCHILD(MIPCHI2DV(PRIMARY) > %(A1_Dau_MaxIPCHI2)s ))" %conf
+        return _A1CombCut
+        
+    def __A1Cut__(self, conf):
+        """
+        Returns the A1 cut string
+        """
+        _A1Cut = "(M > %(A1_MassLow)s * MeV) &"\
+        "(M < %(A1_MassHigh)s * MeV) & "\
+        "(VFASPF(VCHI2PDOF) < %(A1_VtxChi2)s) & "\
+        "(BPVVDCHI2 > %(A1_FlightChi2)s) & "\
+        "(MIPCHI2DV(PRIMARY) > %(A1_MinIPCHI2)s) " %conf 
+        return _A1Cut
+        
+
+    def __KsCuts__(self, conf):
+        """
+        Returns the KaonPion cut string
+        """
+        _KsCuts = """
+        (ADMASS('KS0') < %(KsWINDOW)s* MeV) &
+        (PT > %(LongLivedPT)s *MeV) &
+        (BPVLTIME() > %(LongLivedTau)s *ps)
+        """ % conf
+        return _KsCuts
+
+
+    def __Kshort__(self, conf):
+        """
+        Filter kshort from StdLooseKshort
+        """  
+        _ksdd = AutomaticData(Location = 'Phys/StdLooseKsDD/Particles')
+        _ksll = AutomaticData(Location = 'Phys/StdVeryLooseKsLL/Particles')
+        _filter_ksdd = FilterDesktop(Code = self.__KsCuts__(conf))
+        _filter_ksll = FilterDesktop(Code = self.__KsCuts__(conf))        
+        _selksdd = Selection("Selection_"+self.name+"_Ksdd",
+                             RequiredSelections = [ _ksdd ] ,
+                             Algorithm = _filter_ksdd)
+        _selksll = Selection("Selection_"+self.name+"_Ksll",
+                             RequiredSelections = [ _ksll ] ,
+                             Algorithm = _filter_ksll)
+
+        _sel = MergedSelection("Selection_"+self.name+"_Kshort",
+                               RequiredSelections = [ _selksdd, _selksll ])
+        return _sel
+
+    def __LambdaCuts__(self, conf):
+        """
+        Returns the Lambda cut string
+        """
+        _LambdaCuts = """
+        (ADMASS('Lambda0') < %(LambdaWINDOW)s *MeV) & 
+        (PT > %(LongLivedPT)s *MeV) &
+        (BPVLTIME() > %(LongLivedTau)s *ps)
+        """ % conf
+        return _LambdaCuts
+
+    def __LambdaSeparate__(self, conf):
+        """
+        Filter Lambda from StdVeryLooseLambdaLL and StdLooseLambdaDD
+        """  
+        _lambdadd = AutomaticData(Location = 'Phys/StdLooseLambdaDD/Particles')
+        _lambdall = AutomaticData(Location = 'Phys/StdVeryLooseLambdaLL/Particles')
+        _filter_lambdadd = FilterDesktop(Code = self.__LambdaCuts__(conf))
+        _filter_lambdall = FilterDesktop(Code = self.__LambdaCuts__(conf))        
+        _sellambdadd = Selection("Selection_"+self.name+"_Lambdadd",
+                             RequiredSelections = [ _lambdadd ] ,
+                             Algorithm = _filter_lambdadd)
+        _sellambdall = Selection("Selection_"+self.name+"_Lambdall",
+                             RequiredSelections = [ _lambdall ] ,
+                             Algorithm = _filter_lambdall)
+        return _sellambdall, _sellambdadd
+
+    def __Lambda__(self, LambdaLL, LambdaDD, conf):
+        _sel = MergedSelection("Selection_"+self.name+"_Lambda",
+                               RequiredSelections = [ LambdaLL, LambdaDD ])
+        return _sel
+
+    def __Hyperon__(self, LambdaLL, LambdaDD, LongTracks, DownTracks, hyperon, descriptor, conf):
+        """
+        Assemble Xi- (Omega-) -> Lambda0 pi- (K-) using:
+         - The filtered Lambda0 created by __LambdaSeparate__. Handle LL and DD Lambda0
+           separately because not all the track type combinations make sense (e.g. LL
+           Lambda0 combined with a downstream pi- (K-) to make Xi- (Omega-))
+         - pi- (K-) can be long or downstream, depending on what type of Lambda0 is used.
+
+        Variable names mostly correspond to Xi- -> Lambda0 pi- but the code can be reused
+        for Omega- -> Lambda0 K-
+        """
+        _xicuts = "(PT > %(LongLivedPT)s * MeV)" \
+            + " & (ADMASS('" + hyperon + "-') < %(HyperonWindow)s * MeV)" \
+            + " & (VFASPF(VCHI2) < %(HyperonMaxDocaChi2)s)" \
+            + " & (BPVLTIME() > %(LongLivedTau)s * ps)"
+        _xicombcuts = "(ADAMASS('" + hyperon + "-') < %(HyperonCombWindow)s * MeV)" \
+            + " & (ADOCACHI2CUT(%(HyperonMaxDocaChi2)s, ''))"
+
+        _xi2lambda0pi = CombineParticles(
+            DecayDescriptor = descriptor,
+            CombinationCut = _xicombcuts%(conf),
+            MotherCut = _xicuts%(conf)
+            )
+
+        _sel_xi2lambda0pi_lll = Selection("Selection_"+self.name+"_"+hyperon+"LLL",
+            RequiredSelections = [ LambdaLL, LongTracks ],
+            Algorithm = _xi2lambda0pi)
+        
+        _sel_xi2lambda0pi_ddl = Selection("Selection_"+self.name+"_"+hyperon+"DDL",
+            RequiredSelections = [ LambdaDD, LongTracks ],
+            Algorithm = _xi2lambda0pi)
+        
+        _sel_xi2lambda0pi_ddd = Selection("Selection_"+self.name+"_"+hyperon+"DDD",
+            RequiredSelections = [ LambdaDD, DownTracks ],
+            Algorithm = _xi2lambda0pi)
+
+        _sel = MergedSelection("Selection_"+self.name+"_"+hyperon,
+            RequiredSelections = [ _sel_xi2lambda0pi_lll, _sel_xi2lambda0pi_ddl,
+              _sel_xi2lambda0pi_ddd ])
+
+        return _sel
+
+    def __Xi__(self, LambdaLL, LambdaDD, conf):
+        """
+        Use __Hyperon__() to create Xi- candidates.
+        """
+        UseNoPIDsHadrons = conf['UseNoPIDsHadrons']
+        if (UseNoPIDsHadrons == True):
+            _longpions = AutomaticData(Location = 'Phys/StdAllNoPIDsPions/Particles')
+        else:
+            _longpions = AutomaticData(Location = 'Phys/StdAllLoosePions/Particles')
+        _downpions = AutomaticData(Location = 'Phys/StdNoPIDsDownPions/Particles')
+
+        _filter_longpions = FilterDesktop(Code = self.TrackCuts + '&' + self.HypBachCuts)
+        _filter_downpions = FilterDesktop(Code = self.TrackCuts + '&' + self.HypBachCuts)
+
+        _sel_longpions = Selection("Selection_"+self.name+"_LongXiPions",
+            RequiredSelections = [ _longpions ],
+            Algorithm = _filter_longpions)
+        _sel_downpions = Selection("Selection_"+self.name+"_DownXiPions",
+            RequiredSelections = [ _downpions ],
+            Algorithm = _filter_downpions)
+
+        return self.__Hyperon__(LambdaLL, LambdaDD, _sel_longpions, _sel_downpions,
+            "Xi", "[Xi- -> Lambda0 pi-]cc", conf)
+
+    def __Omega__(self, LambdaLL, LambdaDD, conf):
+        """
+        Use __Hyperon__() to create Omega- candidates.
+        """
+        UseNoPIDsHadrons = conf['UseNoPIDsHadrons']
+        if (UseNoPIDsHadrons == True):
+            _longkaons = AutomaticData(Location = 'Phys/StdAllNoPIDsKaons/Particles')
+        else:
+            _longkaons = AutomaticData(Location = 'Phys/StdAllLooseKaons/Particles')
+        _downkaons = AutomaticData(Location = 'Phys/StdNoPIDsDownKaons/Particles')
+
+        _filter_longkaons = FilterDesktop(Code = self.TrackCuts + '&' + self.HypBachCuts)
+        _filter_downkaons = FilterDesktop(Code = self.TrackCuts + '&' + self.HypBachCuts)
+
+        _sel_longkaons = Selection("Selection_"+self.name+"_LongOmegaKaons",
+            RequiredSelections = [ _longkaons ],
+            Algorithm = _filter_longkaons)
+        _sel_downkaons = Selection("Selection_"+self.name+"_DownOmegaKaons",
+            RequiredSelections = [ _downkaons ],
+            Algorithm = _filter_downkaons)
+
+        return self.__Hyperon__(LambdaLL, LambdaDD, _sel_longkaons, _sel_downkaons,
+            "Omega", "[Omega- -> Lambda0 K-]cc", conf)
+
+    def __Pi0Cuts__(self, conf):
+        """
+        Returns the KaonPion cut string
+        """
+        _Pi0Cuts = """
+        (PT > %(Pi0MINPT)s )
+        """ % conf
+        return _Pi0Cuts
+
+
+
+    def __Pi0__(self, conf):
+        """
+        Filter Pi0 from Std Pi0
+        """  
+        _pi0resolved = AutomaticData(Location = 'Phys/StdLooseResolvedPi0/Particles')
+        _pi0merged = AutomaticData(Location = 'Phys/StdLooseMergedPi0/Particles')
+        _filter_pi0resolved = FilterDesktop(Code = self.__Pi0Cuts__(conf) )
+        #+ " & ( 250*MeV < MINTREE('gamma' == ID, PT))"  )
+        _filter_pi0merged = FilterDesktop(Code = self.__Pi0Cuts__(conf)  )        
+        _selpi0resolved = Selection("Selection_"+self.name+"_pi0resolved",
+                             RequiredSelections = [ _pi0resolved ] ,
+                             Algorithm = _filter_pi0resolved)
+        _selpi0merged = Selection("Selection_"+self.name+"_pi0merged",
+                             RequiredSelections = [ _pi0merged ] ,
+                             Algorithm = _filter_pi0merged)
+        _sel = MergedSelection("Selection_"+self.name+"_pi0",
+                              RequiredSelections = [ _selpi0resolved,_selpi0merged ])
+        return _sel
+
+
+    def __Pi0ForOmegaCuts__(self, conf):
+        """
+        Returns the KaonPion cut string
+        """
+        
+        _Pi0Cuts = """
+        (PT > %(Pi0ForOmegaMINPT)s )
+        """ % conf
+        return _Pi0Cuts
+
+    
+    def __Pi0ForOmega__(self, conf):
+        """
+        Filter Pi0 from Std Pi0
+        """
+        _pi0resolved = AutomaticData(Location = 'Phys/StdLooseResolvedPi0/Particles')
+        _pi0merged = AutomaticData(Location = 'Phys/StdLooseMergedPi0/Particles')
+        _filter_pi0resolved = FilterDesktop(Code = self.__Pi0ForOmegaCuts__(conf) )
+        _filter_pi0merged = FilterDesktop(Code = self.__Pi0ForOmegaCuts__(conf)  )
+        _selpi0resolved = Selection("Selection_"+self.name+"_pi0foromegaresolved",
+                                    RequiredSelections = [ _pi0resolved ] ,
+                                    Algorithm = _filter_pi0resolved)
+        _selpi0merged = Selection("Selection_"+self.name+"_pi0foromegamerged",
+                                  RequiredSelections = [ _pi0merged ] ,
+                                  Algorithm = _filter_pi0merged)
+        _sel = MergedSelection("Selection_"+self.name+"_pi0foromega",
+                               RequiredSelections = [ _selpi0resolved,_selpi0merged ])
+        return _sel
+
+    
+    def __Kstar2KPi0__( self, Kaons, Pi0, conf):
+        """
+        Make K*(892)+ -> K+ pi0 
+        """
+        _kstar2kpizero = CombineParticles()
+        _kstar2kpizero.DecayDescriptor = "[K*(892)+ -> K+ pi0]cc"
+        _kstar2kpizero.MotherCut = "(ADMASS('K*(892)+') < %(KstarplusWINDOW)s *MeV)" % conf
+
+        _kstarConf = _kstar2kpizero.configurable("Combine_"+self.name+"_KPi0")
+                                                 
+        _selKSTAR2KPIZERO = Selection( "Selection_"+self.name+"_Kstar2kpizero",
+                                       Algorithm = _kstarConf,
+                                       RequiredSelections = [ Kaons, Pi0 ] )
+        return _selKSTAR2KPIZERO
+        
+
+
+    def __Rho2PiPi0__( self, Pions, Pi0, conf):
+        """
+        Make rho(770)+ -> pi+ pi0 
+        """
+        _rho2pipizero = CombineParticles()
+        _rho2pipizero.DecayDescriptor = "[rho(770)+ -> pi+ pi0]cc"
+        _rho2pipizero.MotherCut = "(ADMASS('rho(770)+') < %(KstarplusWINDOW)s *MeV)" % conf
+
+        _rhoConf = _rho2pipizero.configurable("Combine_"+self.name+"_PiPi0")
+                                                 
+        _selRHO2PIPIZERO = Selection( "Selection_"+self.name+"_rho2pipizero",
+                                       Algorithm = _rhoConf,
+                                       RequiredSelections = [ Pions, Pi0 ] )
+        return _selRHO2PIPIZERO
+
+
+    def __Omega2PiPiPi0__( self, Pions, Pi0, conf):
+        """
+        Make omega -> pi+ pi- pi0 
+        """
+        #_omega2pipipizero = CombineParticles()
+        
+        _omega2pipipizero = DaVinci__N3BodyDecays() 
+        _omega2pipipizero.DecayDescriptor = "omega(782) -> pi+ pi- pi0"
+        _omega2pipipizero.CombinationCut = "(ADAMASS('omega(782)') < %(Omega_CombMassWin)s * MeV) " %conf
+        _omega2pipipizero.Combination12Cut = "(AM < 800*MeV)&(ACHI2DOCA(1,2) < 8)"
+        
+        _omega2pipipizero.MotherCut = "(ADMASS('omega(782)') < %(Omega_MassWin)s *MeV) & " \
+                                      "(VFASPF(VPCHI2)> %(OmegaChi2Prob)s )"  %conf
+                         
+                                 
+
+        #_omegaConf = _omega2pipipizero.configurable("Combine_"+self.name+"_PiPiPi0")
+        #_omegaConf.ParticleCombiners.update ( { '' : 'OfflineVertexFitter:PUBLIC' } )
+                                                 
+        _selOMEGA2PIPIPIZERO = Selection( "Selection_"+self.name+"_omega2pipipizero",
+                                          Algorithm = _omega2pipipizero,
+                                          RequiredSelections = [ Pions, Pi0 ] )
+        return _selOMEGA2PIPIPIZERO
+
+
+    def __K12OmegaK__(self, K, Omega, conf):
+        """
+        Make a K1-> Omega(782) K+
+        """      
+        _k12omegak = CombineParticles()
+        _k12omegak.DecayDescriptor = "[K_1(1400)+ -> K+ omega(782)]cc"
+        _k12omegak.CombinationCut = "(AM > %(K12OmegaK_MassLow)s * MeV) & (AM < %(K12OmegaK_MassHigh)s * MeV)" %conf
+        _k12omegak.MotherCut = "(M > %(K12OmegaK_CombMassLow)s * MeV) & (M < %(K12OmegaK_CombMassHigh)s * MeV) & (VFASPF(VCHI2PDOF) < %(K12OmegaK_VtxChi2)s)" %conf
+        
+        #_k12omegakConf = _k12omegak.configurable("Combine_"+self.name+"_OmegaK")
+        #_k12omegakConf.ParticleCombiners.update ( { '' : 'OfflineVertexFitter:PUBLIC' } )                   
+        
+        _selK12OMEGAK = Selection( "Selection_"+self.name+"_k12omegak",
+                                     Algorithm = _k12omegak,
+                                     RequiredSelections = [ K, Omega ] )
+        return _selK12OMEGAK
+
+
+    def __K12OmegaKS__(self, Kshort, Omega, conf):
+        """
+        Make a K1-> Omega(782) K+
+        """      
+        _k12omegaks = CombineParticles()
+        _k12omegaks.DecayDescriptor = "K_1(1400)0 -> KS0 omega(782)"
+        _k12omegaks.CombinationCut = "(AM > %(K12OmegaK_MassLow)s * MeV) & (AM < %(K12OmegaK_MassHigh)s * MeV)" %conf
+        _k12omegaks.MotherCut = "(M > %(K12OmegaK_CombMassLow)s * MeV) & " \
+                                "(M < %(K12OmegaK_CombMassHigh)s * MeV) & " \
+                                "(VFASPF(VCHI2PDOF) < %(K12OmegaK_VtxChi2)s)" %conf
+
+        #_k12omegaksConf = _k12omegaks.configurable("Combine_"+self.name+"_OmegaKs")
+        #_k12omegaksConf.ParticleCombiners.update ( { '' : 'OfflineVertexFitter:PUBLIC' } )
+                
+        _selK12OMEGAKS = Selection( "Selection_"+self.name+"_k12omegaks",
+                                     Algorithm = _k12omegaks,
+                                     RequiredSelections = [ Kshort, Omega ] )
+        return _selK12OMEGAKS
+
+
+    def __KpiCuts__(self, conf):
+        """
+        Returns the Kpi cut string
+        """
+        _KpiCuts = """
+        (VFASPF(VCHI2PDOF)< %(KpiVXCHI2NDOF)s )
+        """ % conf
+        return _KpiCuts
+
+
+    def __Kstar2KsPi__(self, Kshort, Pions, conf):
+        """
+        Make a kstarplus
+        """      
+        _kstar2kspi = CombineParticles()
+        _kstar2kspi.DecayDescriptor = "[K*(892)+ -> KS0 pi+]cc"
+        _kstar2kspi.CombinationCut = self.KstarCombCut
+        _kstar2kspi.MotherCut = self.KstarCut
+
+        _selKSTAR2KSPI = Selection( "Selection_"+self.name+"_Kstar2kspi",
+                                     Algorithm = _kstar2kspi,
+                                     RequiredSelections = [ Kshort, Pions ] )
+        return _selKSTAR2KSPI
+    
+
+    def __Phi__(self, Rho, conf):
+        """
+        Make a phi through substitution 
+        """      
+
+        phiSubMMZAlg = SubPIDMMFilter(self.name+"_PhiSubMMZ_Alg", Code= "DECTREE('rho(770)0 -> pi+ pi-')", MinMM=0, MaxMM=6050, PIDs = [ [ 'K+', 'K-'] ]  )
+
+        phiSubMMPAlg = SubPIDMMFilter(self.name+"_PhiSubMMP_Alg", Code= "DECTREE('rho(770)0 -> pi+ pi+')", MinMM=0, MaxMM=6050, PIDs = [ [ 'K+', 'K+'] ]  )     
+
+        phiSubMMMAlg = SubPIDMMFilter(self.name+"_PhiSubMMM_Alg", Code= "DECTREE('rho(770)0 -> pi- pi-')", MinMM=0, MaxMM=6050, PIDs = [ [ 'K-', 'K-'] ]  )   
+
+        phiSubMMZSel = Selection( self.name+"_PhiSubMMZ_Sel", Algorithm = phiSubMMZAlg, RequiredSelections = [ Rho ] )
+
+        phiSubMMPSel = Selection( self.name+"_PhiSubMMP_Sel", Algorithm = phiSubMMPAlg, RequiredSelections = [ Rho ] )
+        
+        phiSubMMMSel = Selection( self.name+"_PhiSubMMM_Sel", Algorithm = phiSubMMMAlg, RequiredSelections = [ Rho ] )
+
+        phiMerge = MergedSelection( self.name+"_PhiMerge", RequiredSelections = [ phiSubMMZSel, phiSubMMPSel, phiSubMMMSel ] ) 
+        
+        phiSubAlg = SubstitutePID( self.name+"_PhiSub_Alg", Code = "ALL",  MaxChi2PerDoF = -666 )
+
+        #(DECTREE('rho(770)0 -> K+ K-')) | (DECTREE('rho(770)0 -> K+ K+')) | (DECTREE('rho(770)0 -> K- K-'))",
+        
+        phiSubAlg.Substitutions = {
+            'rho(770)0 -> K+ K-' : 'phi(1020)' ,
+            'rho(770)0 -> K+ K+' : 'phi(1020)' ,
+            'rho(770)0 -> K- K-' : 'phi(1020)'
+            }
+        
+        phiSubSel =  Selection( self.name+"_PhiSub_Sel", Algorithm = phiSubAlg, RequiredSelections = [ phiMerge ] )
+
+        phiFilterAlg = FilterDesktop( Code = "(ABSID=='phi(1020)')" )
+
+        phiFilterSel = Selection( self.name + "_PhiFilter", Algorithm = phiFilterAlg, RequiredSelections = [ phiSubSel ] )
+        
+        return phiFilterSel
+
+    
+    def __F2__(self, Rho, conf):
+        """
+        Make a f_2(1950) -> p pbar
+        """
+        f2SubMMZAlg = SubPIDMMFilter(self.name+"_F2SubMMZ_Alg", Code= "DECTREE('rho(770)0 -> pi+ pi-')", MinMM=0, MaxMM=6050, PIDs = [ [ 'p+', 'p~-'] ]  )
+
+        f2SubMMPAlg = SubPIDMMFilter(self.name+"_F2SubMMP_Alg", Code= "DECTREE('rho(770)0 -> pi+ pi+')", MinMM=0, MaxMM=6050, PIDs = [ [ 'p+', 'p+'] ]  )     
+
+        f2SubMMMAlg = SubPIDMMFilter(self.name+"_F2SubMMM_Alg", Code= "DECTREE('rho(770)0 -> pi- pi-')", MinMM=0, MaxMM=6050, PIDs = [ [ 'p~-', 'p~-'] ]  )   
+
+        f2SubMMZSel = Selection( self.name+"_F2SubMMZ_Sel", Algorithm = f2SubMMZAlg, RequiredSelections = [ Rho ] )
+
+        f2SubMMPSel = Selection( self.name+"_F2SubMMP_Sel", Algorithm = f2SubMMPAlg, RequiredSelections = [ Rho ] )
+        
+        f2SubMMMSel = Selection( self.name+"_F2SubMMM_Sel", Algorithm = f2SubMMMAlg, RequiredSelections = [ Rho ] )
+        
+        f2Merge    = MergedSelection( self.name+"_F2Merge", RequiredSelections = [ f2SubMMZSel, f2SubMMPSel, f2SubMMMSel ] ) 
+
+        f2SubAlg = SubstitutePID( self.name+"_F2Sub_Alg", 
+                                   Code = "ALL" , #(DECTREE('rho(770)0 -> p+ p~-')) | (DECTREE('rho(770)0 -> p+ p+')) | (DECTREE('rho(770)0 -> p~- p~-'))",
+                                   MaxChi2PerDoF = -666 )
+        
+        f2SubAlg.Substitutions = {
+            'rho(770)0 -> p+ p~-' : 'f_2(1950)' ,
+            'rho(770)0 -> p+ p+'   : 'f_2(1950)' ,
+            'rho(770)0 -> p~- p~-' : 'f_2(1950)'
+            }
+
+        f2SubSel =  Selection( self.name+"_F2Sub_Sel", Algorithm = f2SubAlg, RequiredSelections = [ f2Merge ] )
+
+        f2FilterAlg = FilterDesktop( Code = "(ABSID=='f_2(1950)')" )
+        
+        f2FilterSel = Selection( self.name + "_F2Filter", Algorithm = f2FilterAlg, RequiredSelections = [ f2SubSel ] )
+        
+        return f2FilterSel
+    
+    
+    def __Rho__(self, Pions, conf):
+        """
+        Make a rho
+        """      
+        wsCombinations=conf['HadronWS']
+        _rho2pipi = CombineParticles()
+        if wsCombinations == True:
+            _rho2pipi.DecayDescriptors = [ "rho(770)0 -> pi+ pi-", "rho(770)0 -> pi+ pi+" , "rho(770)0 -> pi- pi-" ]
+        else:
+            _rho2pipi.DecayDescriptors = [ "rho(770)0 -> pi+ pi-"]
+        _rho2pipi.CombinationCut = self.KstarCombCut
+        _rho2pipi.MotherCut = self.KstarCut
+
+        _selRHO2PIPI = Selection( "Selection_"+self.name+"_Rho",
+                                     Algorithm = _rho2pipi,
+                                     RequiredSelections = [ Pions ] )
+        return _selRHO2PIPI
+
+
+    def __Kstar__(self, Rho, conf):
+        """
+        Make a kstar
+        """
+                
+        kstarSubMMZAlg = SubPIDMMFilter(self.name+"_KstarSubMMZ_Alg", Code= "DECTREE('rho(770)0 -> pi+ pi-')", MinMM=0, MaxMM=6050, PIDs = [ [ 'K+', 'pi-'], ['pi+', 'K-' ] ])
+        
+        kstarSubMMPAlg = SubPIDMMFilter(self.name+"_KstarSubMMP_Alg", Code= "DECTREE('rho(770)0 -> pi+ pi+')", MinMM=0, MaxMM=6050, PIDs = [ [ 'K+', 'pi+'], ['pi+', 'K+' ] ])     
+
+        kstarSubMMMAlg = SubPIDMMFilter(self.name+"_KstarSubMMM_Alg", Code= "DECTREE('rho(770)0 -> pi- pi-')", MinMM=0, MaxMM=6050, PIDs = [ [ 'K-', 'pi-'], ['pi-', 'K-' ] ]) 
+
+        kstarSubMMZSel = Selection( self.name+"_KstarSubMMZ_Sel", Algorithm = kstarSubMMZAlg, RequiredSelections = [ Rho ] )
+
+        kstarSubMMPSel = Selection( self.name+"_KstarSubMMP_Sel", Algorithm = kstarSubMMPAlg, RequiredSelections = [ Rho ] )
+        
+        kstarSubMMMSel = Selection( self.name+"_KstarSubMMM_Sel", Algorithm = kstarSubMMMAlg, RequiredSelections = [ Rho ] )
+        
+        kstarMerge     = MergedSelection( self.name+"_KstarMerge", RequiredSelections = [ kstarSubMMZSel, kstarSubMMPSel, kstarSubMMMSel ] )
+
+        kstarSubAlg    = SubstitutePID( self.name+"_KstarSub_Alg", Code = "ALL", MaxChi2PerDoF = -666 )
+
+        #kstarSubAlg.Code = "ALL" #(DECTREE('rho(770)0 -> K+ pi-')) | (DECTREE('rho(770)0 -> K- pi+')) | (DECTREE('rho(770)0 -> K+ pi+')) | (DECTREE('rho(770)0 -> K- pi-'))" 
+        
+        kstarSubAlg.Substitutions = {
+            'rho(770)0 -> K+ pi-' : 'K*(892)0',
+            'rho(770)0 -> K+ pi+' : 'K*(892)0',
+            'rho(770)0 -> pi+ K-' : 'K*(892)~0',
+            'rho(770)0 -> K- pi-' : 'K*(892)~0'
+            }
+        
+        
+        kstarSubSel =  Selection( self.name+"_KstarSub_Sel", Algorithm = kstarSubAlg, RequiredSelections = [ kstarMerge ] )
+
+        kstarFilterAlg = FilterDesktop( Code = "(ABSID=='K*(892)0')" )
+        
+        kstarFilterSel = Selection( self.name + "_KstarFilter", Algorithm = kstarFilterAlg, RequiredSelections = [ kstarSubSel ] )
+        
+        return kstarFilterSel
+       
+
+    def __A1__(self, Pions, conf): 
+        """
+        Make A1 objects:
+            a_1 - > pi pi pi 
+        """      
+        # First make an a_1(1260)+ selection
+        #_a12pipipi = CombineParticles()
+        _a12pipipi = DaVinci__N3BodyDecays() 
+        _a12pipipi.DecayDescriptors = [ "[a_1(1260)+ -> pi+ pi+ pi-]cc" ]
+        _a12pipipi.CombinationCut = self.__A1CombCut__(conf)
+        _a12pipipi.MotherCut = self.__A1Cut__(conf)
+        
+        _a12pipipi.Combination12Cut = "(AM < %(A1_Comb_MassHigh)s * MeV) & "\
+                                      "(ACHI2DOCA(1,2) < 8)"  % conf 
+        
+        selA1 = Selection( "Selection_"+self.name+"_a1",
+                           Algorithm=_a12pipipi,
+                           RequiredSelections=[Pions] )
+        
+        return selA1 
+
+    def __F1__(self, Pions, conf):
+        """
+        Make F1 object:
+            f_1 -> pi pi pi pi 
+        """
+        _f12pipipipi = DaVinci__N4BodyDecays() 
+        _f12pipipipi.DecayDescriptors = [ "f_1(1285) -> pi+ pi- pi+ pi-" ]
+
+        _f12pipipipi.CombinationCut = self.__A1CombCut__(conf)
+        _f12pipipipi.MotherCut = self.__A1Cut__(conf)
+
+        _f12pipipipi.Combination12Cut = "(AM < %(A1_Comb_MassHigh)s * MeV) & "\
+                                        "(ACHI2DOCA(1,2) < 8)"  % conf 
+                                        
+        _f12pipipipi.Combination123Cut = "(AM < %(A1_Comb_MassHigh)s * MeV) & "\
+                                         "(ACHI2DOCA(1,3) < 8) & "\
+                                         "(ACHI2DOCA(2,3) < 8) " % conf
+
+        selF1 = Selection( "Selection_"+self.name+"_f1",
+                           Algorithm=_f12pipipipi,
+                           RequiredSelections=[Pions] )
+        return selF1
+
+    def __K1__(self, A1, conf): 
+        """
+        SubPID:
+            K_1 -> K pi pi
+        """      
+        #replace head with K_1(1270)
+        _a1k1_SubPID = SubstitutePID(self.name+"_a1k1_SubPID", Code="(DECTREE('a_1(1260)+ -> pi+ pi+ pi-')) | (DECTREE('a_1(1260)- -> pi- pi- pi+'))",
+                                     Substitutions={'a_1(1260)+ -> pi+ pi+ pi-' : 'K_1(1270)+', 'a_1(1260)- -> pi- pi- pi+' : 'K_1(1270)-'}, MaxChi2PerDoF=-666, MaxParticles = 4000)
+        _sel_k1 =  Selection(self.name+"_a1k1_SubPIDAlg",
+                             Algorithm = _a1k1_SubPID, RequiredSelections = [A1])
+        #replace daughters for K_1(1270)+, order is important for this tool
+        _a1k1_SubPIDp = SubPIDMMFilter(self.name+"_a1k1_SubPIDp", Code="DECTREE('K_1(1270)+ -> pi+ pi+ pi-')",
+                                       MinMM=0, MaxMM=conf['A1_Comb_MassHigh'], PIDs = [['K+','pi+','pi-'], ['pi+','K+','pi-']], MaxParticles = 4000 ) 
+        _sel_k1p =  Selection(self.name+"_a1k1_SubPIDAlgp",
+                              Algorithm = _a1k1_SubPIDp, RequiredSelections = [_sel_k1])
+        #replace daughters for K_1(1270)-
+        _a1k1_SubPIDm = SubPIDMMFilter(self.name+"_a1k1_SubPIDm", Code="DECTREE('K_1(1270)- -> pi- pi- pi+')",
+                                       MinMM=0, MaxMM=conf['A1_Comb_MassHigh'], PIDs = [['K-','pi-','pi+'], ['pi-','K-','pi+']], MaxParticles = 4000 ) 
+        _sel_k1m =  Selection(self.name+"_a1k1_SubPIDAlgm",
+                              Algorithm = _a1k1_SubPIDm, RequiredSelections = [_sel_k1])
+
+        pick = Selection(self.name+"_K1_PickDecay",
+                     Algorithm = FilterDesktop( Code = "(DECTREE('K_1(1270)+ -> K+ pi+ pi-')) | (DECTREE('K_1(1270)- -> pi+ K- pi-'))" ),
+                     RequiredSelections = [_sel_k1p, _sel_k1m])
+
+        return pick
+
+    def __K2__(self, A1, conf): 
+        """
+        SubPID:
+            K_2 -> K K K
+        """      
+        #replace head with K_2(1770)
+        _a1k2_SubPID = SubstitutePID(self.name+"_a1k2_SubPID", Code="(DECTREE('a_1(1260)+ -> pi+ pi+ pi-')) | (DECTREE('a_1(1260)- -> pi- pi- pi+'))",
+                                      Substitutions={'a_1(1260)+ -> pi+ pi+ pi-' : 'K_2(1770)+', 'a_1(1260)- -> pi- pi- pi+' : 'K_2(1770)-'}, MaxChi2PerDoF=-666, MaxParticles = 4000)
+        _sel_k2 =  Selection(self.name+"_a1k2_SubPIDAlg",
+                             Algorithm = _a1k2_SubPID, RequiredSelections = [A1])
+        #replace daughters for K_2(1770)+, order is important for this tool
+        _a1k2_SubPIDp = SubPIDMMFilter(self.name+"_a1k2_SubPIDp", Code="DECTREE('K_2(1770)+ -> pi+ pi+ pi-')",
+                                       MinMM=0, MaxMM=conf['A1_Comb_MassHigh'], PIDs = [['K+','K+','K-']], MaxParticles = 4000 )        
+        _sel_k2p =  Selection(self.name+"_a1k2_SubPIDAlgp",
+                              Algorithm = _a1k2_SubPIDp, RequiredSelections = [_sel_k2])
+        #replace daughters for K_2(1770)-
+        _a1k2_SubPIDm = SubPIDMMFilter(self.name+"_a1k2_SubPIDm", Code="DECTREE('K_2(1770)- -> pi- pi- pi+')",
+                                       MinMM=0, MaxMM=conf['A1_Comb_MassHigh'], PIDs = [['K-','K-','K+']], MaxParticles = 4000 )        
+        _sel_k2m =  Selection(self.name+"_a1k2_SubPIDAlgm",
+                              Algorithm = _a1k2_SubPIDm, RequiredSelections = [_sel_k2])
+
+        pick = Selection(self.name+"_K2_PickDecay",
+                     Algorithm = FilterDesktop( Code = "(DECTREE('K_2(1770)+ -> K- K+ K+')) | (DECTREE('K_2(1770)- -> K+ K- K-'))" ),
+                     RequiredSelections = [_sel_k2p, _sel_k2m])
+
+        return pick
+
+    def __K10__(self,Kshort,Pions,conf):
+        """
+        K_1 0 -> Ks pi+ pi-
+        """
+
+        #_k102kspipi = CombineParticles()
+        _k102kspipi = DaVinci__N3BodyDecays()
+        _k102kspipi.DecayDescriptors = [ "K_1(1270)0 -> pi+ pi- KS0" ]
+        _k102kspipi.Combination12Cut = "(AM < %(A1_Comb_MassHigh)s * MeV) & "\
+                                       "(ACHI2DOCA(1,2) < 20)"  % conf 
+        _k102kspipi.CombinationCut = self.__A1CombCut__(conf)
+        _k102kspipi.MotherCut = self.__A1Cut__(conf)
+
+        _sel_k10 = Selection( "Selection_"+self.name+"_k10",
+                              Algorithm=_k102kspipi,
+                              RequiredSelections=[Kshort,Pions] )
+        
+        pick = Selection(self.name+"_K10_PickDecay",
+                     Algorithm = FilterDesktop( Code = "(DECTREE('K_1(1270)0 -> KS0 pi+ pi-'))" ),
+                     RequiredSelections = [_sel_k10])
+
+        return pick
+
+        
+
+
+    def __Lambdastar__(self, Rho, conf):
+        """
+        Make a Lambdastar
+        """
+        lambdastarSubMMZAlg = SubPIDMMFilter(self.name+"_LambdastarSubMMZ_Alg", Code= "DECTREE('rho(770)0 -> pi+ pi-')", MinMM=0, MaxMM=6050, PIDs = [ [ 'p+', 'K-'], ['K+', 'p~-' ] ])
+        
+        lambdastarSubMMPAlg = SubPIDMMFilter(self.name+"_LambdastarSubMMP_Alg", Code= "DECTREE('rho(770)0 -> pi+ pi+')", MinMM=0, MaxMM=6050, PIDs = [ [ 'p+', 'K+'], ['K+', 'p+' ] ])     
+
+        lambdastarSubMMMAlg = SubPIDMMFilter(self.name+"_LambdastarSubMMM_Alg", Code= "DECTREE('rho(770)0 -> pi- pi-')", MinMM=0, MaxMM=6050, PIDs = [ [ 'p~-', 'K-'], ['K-', 'p~-' ] ]) 
+
+        lambdastarSubMMZSel = Selection( self.name+"_LambdastarSubMMZ_Sel", Algorithm = lambdastarSubMMZAlg, RequiredSelections = [ Rho ] )
+
+        lambdastarSubMMPSel = Selection( self.name+"_LambdastarSubMMP_Sel", Algorithm = lambdastarSubMMPAlg, RequiredSelections = [ Rho ] )
+        
+        lambdastarSubMMMSel = Selection( self.name+"_LambdastarSubMMM_Sel", Algorithm = lambdastarSubMMMAlg, RequiredSelections = [ Rho ] )
+        
+        lambdastarMerge     = MergedSelection( self.name+"_LambdastarMerge", RequiredSelections = [ lambdastarSubMMZSel, lambdastarSubMMPSel, lambdastarSubMMMSel ] )
+
+        lambdastarSubAlg    = SubstitutePID( self.name+"_LambdastarSub_Alg", Code = "ALL", MaxChi2PerDoF = -666 )
+
+        #lambdastarSubAlg.Code = "ALL"
+        
+        #(DECTREE('rho(770)0 -> p+ K-')) | (DECTREE('rho(770)0 -> K+ p~-')) | (DECTREE('rho(770)0 -> p+ K+')) | (DECTREE('rho(770)0 -> p~- K-'))" 
+        
+        lambdastarSubAlg.Substitutions = {
+            'rho(770)0 -> p+ K-' : 'Lambda(1520)0',
+            'rho(770)0 -> p+ K+' : 'Lambda(1520)0',
+            'rho(770)0 -> p~- K-' : 'Lambda(1520)~0',
+            'rho(770)0 -> K+ p~-' : 'Lambda(1520)~0'
+            }
+        
+        
+        lambdastarSubSel =  Selection( self.name+"_LambdastarSub_Sel", Algorithm = lambdastarSubAlg, RequiredSelections = [ lambdastarMerge ] )
+
+        lambdastarFilterAlg = FilterDesktop( Code = "(ABSID=='Lambda(1520)0')" )
+          
+        lambdastarFilterSel = Selection( self.name + "_LambdastarFilter", Algorithm = lambdastarFilterAlg, RequiredSelections = [ lambdastarSubSel ] )
+        
+        return lambdastarFilterSel    
+    
+
+    def __Dplus__(self, conf):
+        """
+        Make a Dplus, the D->Kpipi should cover all the Ds we need (no PID requirement)
+        """
+        _dplus = AutomaticData(Location = 'Phys/StdLooseDplus2hhh/Particles')
+        return _dplus
+
+    def __Dzero__(self, conf):
+        """
+        Make a D0, the D0->Kpi should cover all the D we need (no PID requirement)
+        """
+        _dzero = AutomaticData(Location = 'Phys/StdLooseD02KPi/Particles') 
+        _filter_dzero = FilterDesktop(Code = self.KstarCut)
+        _seldzero = Selection("Selection_"+self.name+"_dzero",
+                             RequiredSelections = [ _dzero] ,
+                             Algorithm = _filter_dzero)
+        return _seldzero
+
+    def __Dstar__(self, conf):
+        """
+        Get D*+
+        """
+        _dstar = AutomaticData(Location = 'Phys/StdLooseDstarWithD02KPi/Particles')
+
+        return _dstar
+
+    
+    def __Bs__(self, Dimuon, daughters, conf):
+        """
+        Make and return a Bs selection
+        """      
+
+        _b2xmumu = CombineParticles()
+        _b2xmumu.DecayDescriptors = conf['DECAYS']
+
+
+        
+        _b2xmumu.CombinationCut = self.BdCombCut
+        _b2xmumu.MotherCut = self.BdCut
+        
+        _sel_Daughters = MergedSelection("Selection_"+self.name+"_daughters",
+                                         RequiredSelections = daughters )
+        
+        sel = Selection( "Selection_"+self.name+"_B2XMuMu",
+                         Algorithm = _b2xmumu,
+                         RequiredSelections = [ Dimuon, _sel_Daughters ])
+        return sel
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XMuTauMuonic.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XMuTauMuonic.py
new file mode 100644
index 000000000..37ea60ad6
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XMuTauMuonic.py
@@ -0,0 +1,489 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+"""
+Stripping lines for
+    Bs to phi_3(1850)/phi(1020) mu tau
+    Bd to Kstar mu tau
+    Lb to p K mu tau
+Same-sign combinations are included.
+"""
+
+__author__ = 'H. Tilquin'
+__date__ = '03/06/2021'
+__version__ = '$Revision: 0.0 $'
+
+__all__ = ('B2XMuTauMuonicConf', 'default_config')
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+default_config = {
+    'NAME': 'B2XMuTauMuonic',
+    'BUILDERTYPE': 'B2XMuTauMuonicConf',
+    'CONFIG':
+        {
+            "Bs_Comb_MassHigh": 7250.0,
+            "Bs_FlightChi2": 16,
+            "Bd_Comb_MassHigh": 6750.0,
+            "Bd_FlightChi2" : 25,
+            "Lb_Comb_MassHigh": 7750.0,
+            "Lb_FlightChi2": 16,
+            "B_DIRA": 0.999,
+            "Lb_DIRA": 0.999,
+            "Bs_VertexCHI2": 100.0,
+            "B0_VertexCHI2": 50.0,
+            "Lb_VertexCHI2": 100.0,
+            "Hadron_MinIPCHI2": 9.0,
+            "Muon_MinIPCHI2": 9.0,
+            "Phi_FlightChi2": 25.0,
+            "Phi_Comb_MassHigh": 3600.0,
+            "Phi_PT": 800,
+            "Phi_VertexCHI2": 4,
+            "Phi_DOCA": 0.15,
+            "Phi_DOCACHI2": 4,
+            "PhiMu_VertexCHI2": 9,
+            "PhiMu_Comb_MassHigh": 3600.0,
+            "PhiMu_DOCA": 0.8,
+            "PhiMu_DOCACHI2": 9,
+            "Kstar_FlightChi2": 150.0,
+            "Kstar_Comb_MassHigh": 3550.0,
+            "Kstar_Comb_MassLow": 795.0,
+            "Kstar_PT": 1100,
+            "Kstar_DOCA": 0.12,
+            "Kstar_DOCACHI2": 3,
+            "Kstar_VertexCHI2": 3,
+            "KstarMu_VertexCHI2": 6,
+            "KstarMu_Comb_MassHigh": 3550.0,
+            "KstarMu_DOCA": 0.6,
+            "KstarMu_DOCACHI2": 6,
+            "Lambdastar_FlightChi2": 25,
+            "Lambdastar_Comb_MassHigh": 5000.0,
+            "Lambdastar_Comb_MassLow": 1400.0,
+            "Lambdastar_PT": 1250,
+            "Lambdastar_DOCA": 0.15,
+            "Lambdastar_DOCACHI2": 4,
+            "Lambdastar_VertexCHI2": 4,
+            "LambdastarMu_Comb_MassHigh": 5000.0,
+            "LambdastarMu_DOCA": 0.8,
+            "LambdastarMu_DOCACHI2": 8,
+            "LambdastarMu_VertexCHI2": 8,
+            "MuonPT": 500,
+            "MuonPID": 0.0,
+            "KaonPID": 4.0,
+            "ProtonPID": 5.0,
+            "Pion_ProbNN": 0.3,
+            "Pion_ProbNN_B2Kstar": 0.8,
+            "Kaon_Pion_ProbNN_B2Kstar": 0.8,
+            "Hadron_P": 3000,
+            "SpdMult": 600,
+            "Track_GhostProb": 0.3,
+            "Track_TRCHI2": 3,
+            "UseNoPIDsHadrons": False,
+            "UseNoPIDsMuons": False,
+            "HLT1_FILTER": None,
+            "HLT2_FILTER": None,
+            "L0DU_FILTER": None,
+        },
+
+    'WGs': ['RD'],
+    'STREAMS': ['Dimuon']
+}
+
+
+class B2XMuTauMuonicConf(LineBuilder):
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+
+        self.BsCombCut = "(AM < %(Bs_Comb_MassHigh)s * MeV)" % config
+        self.BsCut = "(BPVDIRA > %(B_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(Bs_VertexCHI2)s) & (BPVVDCHI2 > %(Bs_FlightChi2)s)" % config
+ 
+        self.BdCombCut = "(AM < %(Bd_Comb_MassHigh)s * MeV)" % config
+        self.BdCut = "(BPVDIRA > %(B_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(B0_VertexCHI2)s) & (BPVVDCHI2 > %(Bd_FlightChi2)s)" % config
+
+        self.LambdaBCombCut = "(AM < %(Lb_Comb_MassHigh)s * MeV)" % config
+        self.LambdaBCut = "(BPVDIRA > %(Lb_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(Lb_VertexCHI2)s) & (BPVVDCHI2 > %(Lb_FlightChi2)s)" % config
+
+        self.PhiCombCut = "(AM < %(Phi_Comb_MassHigh)s * MeV) & (ACUTDOCA(%(Phi_DOCA)s * mm, '')) & (ACUTDOCACHI2(%(Phi_DOCACHI2)s, ''))" % config
+        self.PhiCut = "(VFASPF(VCHI2/VDOF) < %(Phi_VertexCHI2)s) & (PT > %(Phi_PT)s * MeV) & (BPVVDCHI2 > %(Phi_FlightChi2)s)" % config
+
+        self.KstarCombCut = "(AM < %(Kstar_Comb_MassHigh)s*MeV) & (AM > %(Kstar_Comb_MassLow)s * MeV) & " \
+                                                   "(ACUTDOCA(%(Kstar_DOCA)s * mm,'')) & (ACUTDOCACHI2(%(Kstar_DOCACHI2)s, ''))" % config
+        self.KstarCut = "(VFASPF(VCHI2/VDOF) < %(Kstar_VertexCHI2)s) & " \
+                                                   "(PT > %(Kstar_PT)s * MeV) & (BPVVDCHI2 > %(Kstar_FlightChi2)s)" % config
+
+        self.LambdastarCombCut = "(AM < %(Lambdastar_Comb_MassHigh)s*MeV) & (AM > %(Lambdastar_Comb_MassLow)s*MeV) & " \
+                                                   "(ACUTDOCA(%(Lambdastar_DOCA)s * mm,'')) & (ACUTDOCACHI2(%(Lambdastar_DOCACHI2)s, ''))" % config
+        self.LambdastarCut = "(PT > %(Lambdastar_PT)s*MeV) & " \
+                                                   "(VFASPF(VCHI2/VDOF) < %(Lambdastar_VertexCHI2)s) & (BPVVDCHI2 > %(Lambdastar_FlightChi2)s)" % config
+
+        self.PhiMuCut = "(VFASPF(VCHI2/VDOF) < %(PhiMu_VertexCHI2)s)" % config
+        self.PhiMuCombCut = "(AM < %(Phi_Comb_MassHigh)s * MeV) & (ACUTDOCA(%(PhiMu_DOCA)s * mm, '')) & (ACUTDOCACHI2(%(PhiMu_DOCACHI2)s, ''))" % config
+        
+        self.KstarMuCut = "(VFASPF(VCHI2/VDOF) < %(KstarMu_VertexCHI2)s)" % config
+        self.KstarMuCombCut = "(AM < %(KstarMu_Comb_MassHigh)s * MeV) & (ACUTDOCA(%(KstarMu_DOCA)s * mm, '')) & (ACUTDOCACHI2(%(KstarMu_DOCACHI2)s, ''))" % config
+
+        self.LambdastarMuCut = "(VFASPF(VCHI2/VDOF) < %(LambdastarMu_VertexCHI2)s)" % config
+        self.LambdastarMuCombCut = "(AM < %(LambdastarMu_Comb_MassHigh)s * MeV) & (ACUTDOCA(%(LambdastarMu_DOCA)s * mm, '')) & (ACUTDOCACHI2(%(LambdastarMu_DOCACHI2)s, ''))" % config
+        
+        self.TrackCuts = "(TRGHP < %(Track_GhostProb)s) & (TRCHI2DOF < %(Track_TRCHI2)s)" % config
+
+        self.HadronCuts = "(MIPCHI2DV(PRIMARY) > %(Hadron_MinIPCHI2)s)" % config
+
+        self.KaonCutBase = self.TrackCuts + " & " + self.HadronCuts + " & (P > %(Hadron_P)s*MeV)" % config
+        self.KaonCut = self.KaonCutBase + " & (PIDK > %(KaonPID)s) & (~ISMUON)" % config
+        self.KaonCutNoPID = self.KaonCutBase + " & (PIDK < %(KaonPID)s)" % config
+        self.KaonCut_B2Kstar = self.KaonCutBase + " & (PROBNNK * (1-PROBNNpi) > %(Kaon_Pion_ProbNN_B2Kstar)s) & (~ISMUON)" % config
+        self.KaonCutNoPID_B2Kstar = self.KaonCutBase + " & (PROBNNK * (1-PROBNNpi) < %(Kaon_Pion_ProbNN_B2Kstar)s)" % config
+
+        self.PionCutBase = self.TrackCuts + " & " + self.HadronCuts
+        self.PionCut_B2Kstar = self.PionCutBase + " & (PROBNNpi > %(Pion_ProbNN_B2Kstar)s) & (~ISMUON)" % config
+        self.PionCutNoPID_B2Kstar = self.PionCutBase + " & (PROBNNpi < %(Pion_ProbNN_B2Kstar)s)" % config
+
+        self.ProtonCutBase = self.TrackCuts + " & " + self.HadronCuts + " & (P > %(Hadron_P)s * MeV)" % config
+        self.ProtonCut = self.ProtonCutBase + " & (PIDp > %(ProtonPID)s)  & (~ISMUON)" % config
+        self.ProtonCutNoPID = self.ProtonCutBase + " & (PIDp < %(ProtonPID)s)" % config
+
+        self.MuonCutBase = self.TrackCuts + " & (MIPCHI2DV(PRIMARY) > %(Muon_MinIPCHI2)s)" % config
+        self.MuonCut = self.MuonCutBase + " & (PIDmu> %(MuonPID)s) & (ISMUON)" % config
+        self.MuonCutNoPID = self.MuonCutBase + " & (PIDmu < %(MuonPID)s) " % config
+
+        self.MuonFromBCutBase = self.MuonCutBase + " & (PT > %(MuonPT)s * MeV)" % config
+        self.MuonFromBCut = self.MuonCut + " & (PT > %(MuonPT)s * MeV)" % config
+        self.MuonFromBCutNoPID = self.MuonCutNoPID + " & (PT > %(MuonPT)s * MeV)" % config
+
+        self.Kaons = self.__Kaons__(config)
+        self.FakeKaons = self.__FakeKaons__()
+        
+        self.Kaons_Kstar = self.__Kaons__(config, sel_name="_B2Kstar")
+        self.FakeKaons_Kstar = self.__FakeKaons__(sel_name="_B2Kstar")
+
+        self.Pions_Kstar = self.__Pions__(config, sel_name="_B2Kstar")
+        self.FakePions_Kstar = self.__FakePions__(sel_name="_B2Kstar")
+
+        self.Protons = self.__Protons__(config)
+        self.FakeProtons = self.__FakeProtons__()
+        
+        self.MuonsFromTau = self.__Muons__(config, mother='tau')
+        self.FakeMuonsFromTau = self.__FakeMuons__(mother='tau')
+
+        self.MuonsFromB = self.__Muons__(config, mother='b_hadron')
+        self.FakeMuonsFromB = self.__FakeMuons__(mother='b_hadron')
+
+        self.Phi = self.__Phi__(self.Kaons, conf=config)
+        self.FakePhi = self.__Phi__(self.Kaons, self.FakeKaons, conf=config)
+
+        self.PhiMu = self.__PhiMu__(self.Phi, self.MuonsFromB)
+        self.PhiMu_FakeKaon = self.__PhiMu__(self.FakePhi, self.MuonsFromB, pid_selection='NoPIDK_')
+        self.PhiMu_FakeMuon = self.__PhiMu__(self.Phi,  self.FakeMuonsFromB, pid_selection='NoPIDMu_')
+
+        self.Kstar = self.__Kstar__(self.Kaons_Kstar, self.Pions_Kstar)
+        self.FakePionKstar = self.__Kstar__(self.Kaons_Kstar, self.FakePions_Kstar, pid_selection="NoPIDPi_")
+        self.FakeKaonKstar = self.__Kstar__(self.FakeKaons_Kstar, self.Pions_Kstar, pid_selection="NoPIDK_")
+
+        self.KstarMu = self.__KstarMu__(self.Kstar, self.MuonsFromB)
+        self.KstarMu_FakeKaon = self.__KstarMu__(self.FakeKaonKstar, self.MuonsFromB, pid_selection='NoPIDK_')
+        self.KstarMu_FakePion = self.__KstarMu__(self.FakePionKstar, self.MuonsFromB, pid_selection='NoPIDpi_')
+        self.KstarMu_FakeMuon = self.__KstarMu__(self.Kstar, self.FakeMuonsFromB, pid_selection='NoPIDMu_')
+
+        self.LambdaStar = self.__Lambdastar__(self.Protons, self.Kaons)
+        self.FakeProtonLambdaStar = self.__Lambdastar__(self.FakeProtons, self.Kaons, pid_selection="NoPIDp_")
+        self.FakeKaonLambdaStar = self.__Lambdastar__(self.Protons, self.FakeKaons, pid_selection="NoPIDK_")
+
+        self.LambdastarMu = self.__LambdastarMu__(self.LambdaStar, self.MuonsFromB)
+        self.LambdastarMu_FakeKaon = self.__LambdastarMu__(self.FakeKaonLambdaStar, self.MuonsFromB, pid_selection='NoPIDK_')
+        self.LambdastarMu_FakeProton = self.__LambdastarMu__(self.FakeProtonLambdaStar, self.MuonsFromB, pid_selection='NoPIDp_')
+        self.LambdastarMu_FakeMuon = self.__LambdastarMu__(self.LambdaStar, self.FakeMuonsFromB, pid_selection='NoPIDMu_')
+
+        self.DeclaredDaughters = [self.PhiMu, self.MuonsFromTau]
+        self.Bs = self.__Bs_Phi__(daughters=self.DeclaredDaughters)
+
+        self.DeclaredDaughters = [self.PhiMu, self.FakeMuonsFromTau]
+        self.Bs_NoPIDmuFromTau = self.__Bs_Phi__(daughters=self.DeclaredDaughters, pid_selection="NoPIDmuFromTau_")
+
+        self.DeclaredDaughters = [self.PhiMu_FakeMuon, self.MuonsFromTau]
+        self.Bs_NoPIDmuFromB = self.__Bs_Phi__(daughters=self.DeclaredDaughters, pid_selection="NoPIDmuFromb_")
+
+        self.Bs_NoPIDmu = Selection("Bs_NoPIDmu_sel_for" + self.name, Algorithm=FilterDesktop(Code='ALL'), 
+                                    RequiredSelections=[self.Bs_NoPIDmuFromTau, self.Bs_NoPIDmuFromB])
+
+        self.DeclaredDaughters = [self.PhiMu_FakeKaon, self.MuonsFromTau]
+        self.Bs_NoPIDK = self.__Bs_Phi__(daughters=self.DeclaredDaughters, pid_selection="NoPIDK_")
+        
+        self.DeclaredDaughters = [self.KstarMu, self.MuonsFromTau]
+        self.Bd = self.__B_Kstar__(daughters=self.DeclaredDaughters)
+
+        self.DeclaredDaughters = [self.KstarMu, self.FakeMuonsFromTau]
+        self.Bd_NoPIDmuFromTau = self.__B_Kstar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDmuFromTau_")
+        
+        self.DeclaredDaughters = [self.KstarMu_FakeMuon, self.MuonsFromTau]
+        self.Bd_NoPIDmuFromB = self.__B_Kstar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDmuFromb_")
+
+        self.Bd_NoPIDmu = Selection("Bd_NoPIDmu_sel_for" + self.name, Algorithm=FilterDesktop(Code='ALL'), 
+                          RequiredSelections=[self.Bd_NoPIDmuFromTau, self.Bd_NoPIDmuFromB])
+
+        self.DeclaredDaughters = [self.KstarMu_FakeKaon, self.MuonsFromTau]
+        self.Bd_NoPIDK = self.__B_Kstar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDK_")
+
+        self.DeclaredDaughters = [self.KstarMu_FakePion, self.MuonsFromTau]
+        self.Bd_NoPIDpi = self.__B_Kstar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDpi_")
+
+        self.DeclaredDaughters = [self.LambdastarMu, self.MuonsFromTau]
+        self.Lb = self.__Lambdab_Lambdastar__(daughters=self.DeclaredDaughters)
+
+        self.DeclaredDaughters = [self.LambdastarMu, self.FakeMuonsFromTau]
+        self.Lb_NoPIDmuFromTau = self.__Lambdab_Lambdastar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDmuFromTau_")
+        
+        self.DeclaredDaughters = [self.LambdastarMu_FakeMuon, self.MuonsFromTau]
+        self.Lb_NoPIDmuFromB = self.__Lambdab_Lambdastar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDmuFromb_")
+
+        self.Lb_NoPIDmu = Selection("Lb_NoPIDmu_sel_for" + self.name, Algorithm=FilterDesktop(Code='ALL'), 
+                          RequiredSelections=[self.Lb_NoPIDmuFromTau, self.Lb_NoPIDmuFromB])
+
+        self.DeclaredDaughters = [self.LambdastarMu_FakeKaon, self.MuonsFromTau]
+        self.Lb_NoPIDK = self.__Lambdab_Lambdastar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDK_")
+
+        self.DeclaredDaughters = [self.LambdastarMu_FakeProton, self.MuonsFromTau]
+        self.Lb_NoPIDp = self.__Lambdab_Lambdastar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDp_")
+
+
+        self.FilterSPD = {'Code': " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" % config,
+                          'Preambulo': ["from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"]}
+
+        self.Bs2phi_line = StrippingLine(
+            self.name + "_Bs2Phi_Line", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs], MDSTFlag=False, MaxCandidates=1000)
+        self.registerLine(self.Bs2phi_line)
+
+        self.Bs2phi_NoPIDmu_line = StrippingLine(
+            self.name + "_Bs2Phi_NoPIDMuLine", prescale=0.1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_NoPIDmu], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bs2phi_NoPIDmu_line)
+
+        self.Bs2phi_NoPIDK_line = StrippingLine(
+            self.name + "_Bs2Phi_NoPIDKLine", prescale=0.06,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_NoPIDK], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bs2phi_NoPIDK_line)
+
+        self.Bd2Kst_line = StrippingLine(
+            self.name + "_B2Kstar_Line", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bd], MDSTFlag=False, MaxCandidates=1000)
+        self.registerLine(self.Bd2Kst_line)
+
+        self.Bd2Kst_NoPIDmu_line = StrippingLine(
+            self.name + "_B2Kstar_NoPIDMuLine", prescale=0.1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bd_NoPIDmu], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bd2Kst_NoPIDmu_line)
+
+        self.Bd2Kst_NoPIDK_line = StrippingLine(
+            self.name + "_B2Kstar_NoPIDKLine", prescale=0.2,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bd_NoPIDK], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bd2Kst_NoPIDK_line)
+
+        self.Bd2Kst_NoPIDpi_line = StrippingLine(
+            self.name + "_B2Kstar_NoPIDpiLine", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bd_NoPIDpi], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bd2Kst_NoPIDpi_line)
+
+        self.Lb2Lst_line = StrippingLine(
+            self.name + "_Lb2Lstar_Line", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Lb], MDSTFlag=False, MaxCandidates=1000)
+
+        self.registerLine(self.Lb2Lst_line)
+
+        self.Lb2Lst_NoPIDmu_line = StrippingLine(
+            self.name + "_Lb2Lstar_NoPIDMuLine", prescale=0.1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Lb_NoPIDmu], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Lb2Lst_NoPIDmu_line)
+
+        self.Lb2Lst_NoPIDK_line = StrippingLine(
+            self.name + "_Lb2Lstar_NoPIDKLine", prescale=0.2,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Lb_NoPIDK], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Lb2Lst_NoPIDK_line)
+
+        self.Lb2Lst_NoPIDp_line = StrippingLine(
+            self.name + "_Lb2Lstar_NoPIDpLine", prescale=0.1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Lb_NoPIDp], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Lb2Lst_NoPIDp_line)
+
+
+    def __Muons__(self, conf, mother):
+        from StandardParticles import StdAllLooseMuons, StdNoPIDsMuons
+        muons = StdNoPIDsMuons if conf['UseNoPIDsMuons'] else StdAllLooseMuons
+        if mother == 'tau':
+            muon_cut = self.MuonCutBase if conf['UseNoPIDsMuons'] else self.MuonCut
+        else:
+            muon_cut = self.MuonFromBCutBase if conf['UseNoPIDsMuons'] else self.MuonFromBCut
+        _filter = FilterDesktop(Code=muon_cut)
+        _sel = Selection("Selection_" + self.name + "_StdLooseMuons" + "from" + mother, RequiredSelections=[muons],
+                         Algorithm=_filter)
+        return _sel
+
+    def __FakeMuons__(self, mother):
+        from StandardParticles import StdNoPIDsMuons
+        if mother == 'tau':
+            _filter = FilterDesktop(Code=self.MuonCutNoPID)
+        else:
+            _filter = FilterDesktop(Code=self.MuonFromBCutNoPID)
+        _sel = Selection("Selection_" + self._name + "StdAllNoPIDsMuons" + "from" + mother, Algorithm=_filter,
+                         RequiredSelections=[StdNoPIDsMuons])
+        return _sel
+
+    def __Protons__(self, conf):
+        from StandardParticles import StdAllLooseProtons, StdNoPIDsProtons
+        protons = StdNoPIDsProtons if conf['UseNoPIDsHadrons'] else StdAllLooseProtons
+        proton_cuts = self.ProtonCutBase if conf['UseNoPIDsHadrons'] else self.ProtonCut
+        _filter = FilterDesktop(Code=proton_cuts)
+        _sel = Selection("Selection_" + self.name + "_StdLooseProtons", RequiredSelections=[protons], Algorithm=_filter)
+        return _sel
+
+    def __FakeProtons__(self):
+        from StandardParticles import StdNoPIDsProtons
+        _filter = FilterDesktop(Code=self.ProtonCutNoPID)
+        _sel = Selection("Selection_" + self._name + "_StdAllNoPIDsProtons", Algorithm=_filter,
+                         RequiredSelections=[StdNoPIDsProtons])
+        return _sel
+
+    def __Kaons__(self, conf, sel_name="_"):
+        from StandardParticles import StdLooseKaons, StdNoPIDsKaons
+        kaons = StdNoPIDsKaons if conf['UseNoPIDsHadrons'] else StdLooseKaons
+        if conf['UseNoPIDsHadrons']:
+            _filter = FilterDesktop(Code=self.KaonCutBase)
+        elif "Kstar" in sel_name:
+            _filter = FilterDesktop(Code=self.KaonCut_B2Kstar)
+        else:
+            _filter = FilterDesktop(Code=self.KaonCut)
+        _sel = Selection("Selection_" + self.name + sel_name + "StdLooseKaons", RequiredSelections=[kaons],
+                         Algorithm=_filter)
+        return _sel
+
+    def __FakeKaons__(self, sel_name="_"):
+        from StandardParticles import StdNoPIDsKaons
+        if "Kstar" in sel_name:
+            _filter = FilterDesktop(Code=self.KaonCutNoPID_B2Kstar)
+        else:
+            _filter = FilterDesktop(Code=self.KaonCutNoPID)
+        _sel = Selection("Selection_" + self._name + sel_name + "StdAllNoPIDsKaons", Algorithm=_filter,
+                         RequiredSelections=[StdNoPIDsKaons])
+        return _sel
+
+    def __Pions__(self, conf, sel_name="_"):
+        from StandardParticles import StdLoosePions, StdNoPIDsPions
+        pions = StdNoPIDsPions if conf['UseNoPIDsHadrons'] else StdLoosePions
+        if conf['UseNoPIDsHadrons']:
+            _filter = FilterDesktop(Code=self.PionCutBase)
+        else:
+            _filter = FilterDesktop(Code=self.PionCut_B2Kstar)
+        _sel = Selection("Selection_" + self.name + sel_name + "StdLoosePions", RequiredSelections=[pions],
+                         Algorithm=_filter)
+        return _sel
+
+    def __FakePions__(self, sel_name="_"):
+        from StandardParticles import StdNoPIDsPions
+        _filter = FilterDesktop(Code=self.PionCutNoPID_B2Kstar)
+        _sel = Selection("Selection_" + self.name + sel_name + "StdAllNoPIDsPions", RequiredSelections=[StdNoPIDsPions],
+                         Algorithm=_filter)
+        return _sel
+
+    def __Phi__(self, Kaons, fakekaon=None, conf=None):
+        _phi2kk = CombineParticles()
+        _phi2kk.DecayDescriptors = ["phi(1020) -> K+ K-", "phi(1020) -> K+ K+", "phi(1020) -> K- K-"]
+        _phi2kk.MotherCut = self.PhiCut
+        if fakekaon is None:
+            _phi2kk.CombinationCut = self.PhiCombCut
+            _sel = Selection("Phi_selection_for" + self.name, Algorithm=_phi2kk, RequiredSelections=[Kaons])
+        else:
+            _phi2kk.CombinationCut = self.PhiCombCut + " & (AHASCHILD((PIDK < %(KaonPID)s)))" % conf
+            _sel = Selection("Phi_NoPIDK_selection_for" + self.name, Algorithm=_phi2kk,
+                             RequiredSelections=[Kaons, fakekaon])
+        return _sel
+
+    def __Kstar__(self, Kaons, Pions, pid_selection="_"):
+        _kstar2kpi = CombineParticles()
+        _kstar2kpi.DecayDescriptors = ["[K*(892)0 -> K+ pi-]cc", "K*(892)0 -> K+ pi+", "K*(892)0 -> K- pi-"]
+        _kstar2kpi.CombinationCut = self.KstarCombCut
+        _kstar2kpi.MotherCut = self.KstarCut
+        _sel = Selection("Kstar" + pid_selection + "selection_for" + self.name, Algorithm=_kstar2kpi,
+                         RequiredSelections=[Kaons, Pions])
+        return _sel
+
+    def __Lambdastar__(self, Protons, Kaons, pid_selection="_"):
+        _lstar2pk = CombineParticles()
+        _lstar2pk.DecayDescriptors = ["[Lambda(1520)0 -> p+ K-]cc", "Lambda(1520)0 -> p+ K+", "Lambda(1520)0 -> p~- K-"]
+        _lstar2pk.CombinationCut = self.LambdastarCombCut
+        _lstar2pk.MotherCut = self.LambdastarCut
+        _sel = Selection("Lambdastar" + pid_selection + "selection_for" + self.name, Algorithm=_lstar2pk,
+                         RequiredSelections=[Protons, Kaons])
+        return _sel
+
+    
+    def __PhiMu__(self, Phi, Muon, conf=None, pid_selection='_'):
+        _b2phimu = CombineParticles()
+        _b2phimu.DecayDescriptors = ["[B0 -> phi(1020) mu+]cc"]
+        _b2phimu.MotherCut = self.PhiMuCut
+        _b2phimu.CombinationCut = self.PhiMuCombCut
+        _sel = Selection("B2PhiMu" + pid_selection + self.name, Algorithm=_b2phimu, RequiredSelections=[Phi,Muon])
+        return _sel
+
+    def __KstarMu__(self, Kstar, Muon, conf=None, pid_selection='_'):
+        _b2kstmu = CombineParticles()
+        _b2kstmu.DecayDescriptors = ["[B0 -> K*(892)0 mu+]cc", "[B0 -> K*(892)0 mu-]cc"]
+        _b2kstmu.MotherCut = self.KstarMuCut
+        _b2kstmu.CombinationCut = self.KstarMuCombCut
+        _sel = Selection("B2KstarMu" + pid_selection + self.name, Algorithm=_b2kstmu, RequiredSelections=[Kstar,Muon])
+        return _sel
+     
+    def __LambdastarMu__(self, Lambdastar, Muon, conf=None, pid_selection='_'):
+        _b2lstmu = CombineParticles()
+        _b2lstmu.DecayDescriptors = ["[B0 -> Lambda(1520)0 mu+]cc", "[B0 -> Lambda(1520)0 mu-]cc"]
+        _b2lstmu.MotherCut = self.LambdastarMuCut
+        _b2lstmu.CombinationCut = self.LambdastarMuCombCut
+        _sel = Selection("B2LambdastarMu" + pid_selection + self.name, Algorithm=_b2lstmu, RequiredSelections=[Lambdastar,Muon])
+        return _sel
+
+
+    def __Bs_Phi__(self, daughters, pid_selection="_"):
+        _b2phimutau = CombineParticles(DecayDescriptors=["[B_s0 -> B0 mu+]cc", "[B_s0 -> B0 mu-]cc"],
+                                        MotherCut=self.BsCut, CombinationCut=self.BsCombCut)
+        sel = Selection("Phi" + pid_selection + "for" + self.name, Algorithm=_b2phimutau, RequiredSelections=daughters)
+        return sel
+
+    def __B_Kstar__(self, daughters, pid_selection="_"):
+        _b2kstmutau = CombineParticles(DecayDescriptors=["[B_s0 -> B0 mu+]cc", "[B_s0 -> B0 mu-]cc"],
+                                        MotherCut=self.BdCut, CombinationCut=self.BdCombCut)
+        sel = Selection("Kstar" + pid_selection + "for" + self.name, Algorithm=_b2kstmutau, RequiredSelections=daughters)
+        return sel
+
+    def __Lambdab_Lambdastar__(self, daughters, pid_selection="_"):
+        _b2lstmutau = CombineParticles(DecayDescriptors=["[Lambda_b0 -> B0 mu+]cc", "[Lambda_b0 -> B0 mu-]cc"],
+                                        MotherCut=self.BsCut, CombinationCut=self.BsCombCut)
+        sel = Selection("Lambdastar" + pid_selection + "for" + self.name, Algorithm=_b2lstmutau, RequiredSelections=daughters)
+        return sel
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTau.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTau.py
new file mode 100644
index 000000000..819ed3515
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTau.py
@@ -0,0 +1,1481 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['G. Dujany, G. Mancinelli, J. Serrano']
+__date__ = '24/05/2010,15/01/2014, 19/10/2017'
+__version__ = '$Revision: 1.3 $'
+# Stripping line by V. Gligorov for B->mu tau, B->tau tau, B->D mu and B->D D
+# Strongly modified for Stripping20 by Ch. Elsasser
+# added Dpi mode by G. Mancinelli
+# Strongly modified for S20rxp1 by G. Mancinelli and J. Serrano
+# Added new lines for DD0 by G. Dujany for S24r1p1
+# Added new selection for 3pi3pi and 3pimu final states by G. Mancinelli and J. Serrano for S28r1p1
+from GaudiKernel.SystemOfUnits import MeV
+from GaudiKernel.SystemOfUnits import mm
+
+"""
+  B->TauTau, B->TauMu
+  """
+__all__ = (
+  'B2XTauConf'
+  ,  'default_config'
+  )
+
+default_config =  {
+  'NAME'              : 'B2XTau',
+  'BUILDERTYPE'       :       'B2XTauConf',
+  'WGs'    : [ 'RD' ],
+  'CONFIG'    : {
+
+  'PT_HAD_ALL_FINAL_STATE'        : '250',  # MeV
+  'P_HAD_ALL_FINAL_STATE'         : '2000', # MeV
+  'IPCHI2_HAD_ALL_FINAL_STATE'    : '16',    # dimensionless
+  'TRACKCHI2_HAD_ALL_FINAL_STATE' : '4',    # dimensionless
+  'TRGHOPROB_HAD_ALL_FINAL_STATE' : '0.4',    # dimensionless
+  #
+  'PT_MU'                         : '1000', # MeV
+  'P_MU'                          : '6000', # MeV
+  'IPCHI2_MU'                     : '16',   # MeV
+  'TRACKCHI2_MU'                  : '4',    # dimensionless
+  'TRGHOPROB_MU'                  : '0.4', # dimensionless
+
+  #
+  'PT_B_TT'                       : '1900', # MeV
+  'PT_B_TT_HIGH'                  : '2000',# MeV
+  'PT_B_TM'                       : '1900', # MeV
+  'PT_B_TM_HIGH'                  : '5000', # MeV
+  'VCHI2_B'                       :   '90', # dimensionless
+  'FDCHI2_B'                      : '225',  # dimensionless
+  'FD_B'                          : '90',   # mm
+  'FD_B_MU'                       : '35',   # mm
+  'DIRA_B'                        : '0.99', # dimensionless
+  'MASS_LOW_B'                    : '2000', # MeV
+  'MASS_HIGH_B'                   : '7000', # MeV
+  'MCOR_LOW_B'                    :    '0', # MeV
+  'MCOR_HIGH_B'                   :'10000', # MeV
+
+
+  #
+  'PT_B_CHILD_BEST'               : '2000', # MeV
+  'IPCHI2_B_CHILD_BEST'           : '16',   # dimensionless
+  'PT_B_TAU_CHILD_BEST'           : '4000', # MeV
+  'IPCHI2_B_TAU_CHILD_BEST'       : '150',   # dimensionless
+  'IPCHI2_B_TAU_CHILD_WORSE'       : '16',   # dimensionless
+  'PT_B_PIONS_TOTAL'              :  '7000',# MeV
+  'PT_B_MU_PIONS_TOTAL'           :  '2500',# MeV
+  'IPCHI2_B_TAU_MU'               :  '50',
+  'IPCHI2_B_MU'                   :  '200',
+  'B_TAUPI_2NDMINIPS'             :  '20',  # dimensionless
+  'FDCHI2_TAU'                    :  '4000',
+  'VCHI2_B_TAU_MU'                : '12',
+  #
+  'MASS_LOW_D'                    : 1750 * MeV,
+  'MASS_HIGH_D'                   : 2080 * MeV,
+  'MASS_LOW_Ds'                   : 1938 * MeV,
+  'MASS_HIGH_Ds'                  : 1998 * MeV,
+  'MASS_LOW_Dmother'                 : 1800 * MeV,
+  'MASS_HIGH_Dmother'                : 2030 * MeV,
+  'APT_D'                         : 800 * MeV,
+  'AMAXDOCA_D'                    : 0.2 * mm,
+  'MaxPT_D'                       : 800 * MeV,
+  'PT_D'                          : 1000 * MeV,
+  'DIRA_D'                        : '0.99',
+  'VCHI2_D'                       : '16',
+  'FDCHI2_D'                      : '16',
+  'VDRHOmin_D'                    : 0.1 * mm,
+  'VDRHOmax_D'                    : 7.0 * mm,
+  'VDZ_D'                         : 5.0 * mm,
+  #
+  'MASS_LOW_TAU'                    : 400 * MeV,
+  'MASS_HIGH_TAU'                   : 2100 * MeV,
+  'MASS_LOW_TAUmother'                    : 500 * MeV,
+  'MASS_HIGH_TAUmother'                   : 2000 * MeV,
+  #
+  #
+
+  'CUTBASED_M_TAU_HIGH'             : '1592', # MeV
+  'CUTBASED_M_TAU_LOW'              : '829', # MeV
+  'CUTBASED_PROBNNPI'               : '0.122',
+  'CUTBASED_MISS_MASS'              : '876', # MeV
+  'CUTBASED_MCORR_B_HIGH'           : '8600', # MeV
+  'CUTBASED_MCORR_B_LOW'            : '3600', # MeV
+  'CUTBASED_M_B'                    : '2865', # MeV
+  #                   'CUTBASED_TAU_TAU_LOW'            : '-10.5', # ps
+  #                   'CUTBASED_TAU_TAU_HIGH'           : '-0.5', # ps
+  'CUTBASED_TAU_TAU_LOW'            : '-0.56', # ps
+  'CUTBASED_TAU_TAU_HIGH'           : '1.960', # ps
+  'CUTBASED_TAU_BPVVDRHO'           : '0.33', # mm
+  'CUTBASED_VCHI2_TAU'              :   '20.6', # dimensionless
+#
+  'B2TauTau_3pi3pi_TOSLinePrescale'  : 1,
+  'B2TauTau_3pi3pi_TOSLinePostscale' : 1,
+  'B2TauTau_3pi3pi_SameSign_TOSLinePrescale'  : 1,
+  'B2TauTau_3pi3pi_SameSign_TOSLinePostscale' : 1,
+  'B2TauMu_3pi_TOSLinePrescale'  : 1,
+  'B2TauMu_3pi_TOSLinePostscale' : 1,
+  'B2TauMu_3pi_SameSign_TOSLinePrescale'  : 1,
+  'B2TauMu_3pi_SameSign_TOSLinePostscale' : 1,
+  'B2TauTau_TOSLinePrescale'      : 1,
+  'B2TauTau_TOSLinePostscale'     : 1,
+  'B2DD_LinePrescale'             : 1,
+  'B2DD_LinePostscale'            : 1,
+  'B2DD0_LinePrescale'             : 1,
+  'B2DD0_LinePostscale'            : 1,
+  'B2TauMu_TOSLinePrescale'       : 1,
+  'B2TauMu_TOSLinePostscale'      : 1,
+  'B2DPi_LinePrescale'            : 1,
+  'B2DPi_LinePostscale'           : 1,
+  'B2TauTau_SameSign_TOSLinePrescale'      : 1,
+  'B2TauTau_SameSign_TOSLinePostscale'     : 1,
+  'B2DD_SameSign_LinePrescale'             : 0.5,
+  'B2DD_SameSign_LinePostscale'            : 1,
+  'B2TauMu_SameSign_TOSLinePrescale'       : 0.5,
+  'B2TauMu_SameSign_TOSLinePostscale'      : 1,
+  'B2DPi_SameSign_LinePrescale'            : 0.5,
+  'B2DPi_SameSign_LinePostscale'           : 1,
+  'HLT_DECISIONS_HAD'    : {'Hlt2Topo(2|3|4)Body.*Decision%TOS' : 0},
+#  'HLT_DECISIONS_HAD'    : {'Hlt2(Topo2Body|Topo3Body|Topo4Body).*Decision%TOS' : 0},
+  'HLT_DECISIONS_MUON'  : {"Hlt2(TopoMu|SingleMuon).*Decision%TOS": 0},
+  'RelatedInfoTools'      : [
+  #1
+  { "Type" : "RelInfoBstautauMuonIsolationBDT"
+    , "Variables" : ['BSTAUTAUMUONISOBDTFIRSTVALUE', 'BSTAUTAUMUONISOBDTSECONDVALUE','BSTAUTAUMUONISOBDTTHIRDVALUE']
+   , "Location"  : "MuonIsolationBDT"
+    },
+  #2
+  { "Type" : "RelInfoBstautauMuonIsolation"
+    , "Variables" : ['BSTAUTAUMUONISOFIRSTVALUE', 'BSTAUTAUMUONISOSECONDVALUE']
+     , "Location"  : "MuonIsolation"
+    },
+  #3
+  { "Type" : "RelInfoBstautauTauIsolationBDT"
+    , "Variables" : ['BSTAUTAUTAUISOBDTFIRSTVALUETAUP', 'BSTAUTAUTAUISOBDTSECONDVALUETAUP','BSTAUTAUTAUISOBDTTHIRDVALUETAUP','BSTAUTAUTAUISOBDTFIRSTVALUETAUM', 'BSTAUTAUTAUISOBDTSECONDVALUETAUM','BSTAUTAUTAUISOBDTTHIRDVALUETAUM']
+      , "Location"  : "TauIsolationBDT"
+    },
+  #4
+  { "Type" : "RelInfoBstautauTauIsolation"
+    , "Variables" : ['BSTAUTAUTAUISOFIRSTVALUETAUP', 'BSTAUTAUTAUISOSECONDVALUETAUP','BSTAUTAUTAUISOFIRSTVALUETAUM', 'BSTAUTAUTAUISOSECONDVALUETAUM']
+     , "Location"  : "TauIsolation"
+    },
+  #5
+
+ { "Type" : "RelInfoBstautauTrackIsolationBDT"
+    , "Variables" : ['BSTAUTAUTRKISOBDTFIRSTVALUETAUPPIM', 'BSTAUTAUTRKISOBDTSECONDVALUETAUPPIM','BSTAUTAUTRKISOBDTTHIRDVALUETAUPPIM','BSTAUTAUTRKISOBDTFIRSTVALUETAUPPIP1', 'BSTAUTAUTRKISOBDTSECONDVALUETAUPPIP1','BSTAUTAUTRKISOBDTTHIRDVALUETAUPPIP1','BSTAUTAUTRKISOBDTFIRSTVALUETAUPPIP2', 'BSTAUTAUTRKISOBDTSECONDVALUETAUPPIP2','BSTAUTAUTRKISOBDTTHIRDVALUETAUPPIP2','BSTAUTAUTRKISOBDTFIRSTVALUETAUMPIP','BSTAUTAUTRKISOBDTSECONDVALUETAUMPIP','BSTAUTAUTRKISOBDTTHIRDVALUETAUMPIP','BSTAUTAUTRKISOBDTFIRSTVALUETAUMPIM1','BSTAUTAUTRKISOBDTSECONDVALUETAUMPIM1','BSTAUTAUTRKISOBDTTHIRDVALUETAUMPIM1','BSTAUTAUTRKISOBDTFIRSTVALUETAUMPIM2', 'BSTAUTAUTRKISOBDTSECONDVALUETAUMPIM2','BSTAUTAUTRKISOBDTTHIRDVALUETAUMPIM2']
+     , "Location"  : "TrackIsolationBDT"
+    },
+
+  #6
+  { "Type" : "RelInfoBstautauTrackIsolation"
+    , "Variables" : ['BSTAUTAUTRKISOFIRSTVALUETAUPPIM', 'BSTAUTAUTRKISOFIRSTVALUETAUPPIP1','BSTAUTAUTRKISOFIRSTVALUETAUPPIP2', 'BSTAUTAUTRKISOFIRSTVALUETAUMPIP','BSTAUTAUTRKISOFIRSTVALUETAUMPIM1', 'BSTAUTAUTRKISOFIRSTVALUETAUMPIM2']
+     , "Location"  : "TrackIsolation"
+    },
+  #7
+  { "Type" : "RelInfoBstautauCDFIso"
+    , "Variables" : ['BSTAUTAUCDFISO']
+     , "Location"  : "CDFIso"
+    },
+  #8
+  { "Type" : "RelInfoBstautauZVisoBDT"
+    , "Variables" : ['ZVISOTAUP','ZVISOTAUM']
+      , "Location"  : "ZVisoBDT"
+    },
+  ]
+  },
+  'STREAMS'     : ['Bhadron']
+  }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, OfflineVertexFitter, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdNoPIDsKaons, StdNoPIDsPions, StdTightMuons
+from StandardParticles import StdLoosePions, StdTightPions
+from StandardParticles import StdAllLoosePions,StdAllNoPIDsPions
+from StandardParticles import StdLooseKaons
+
+
+from copy import deepcopy
+
+default_name = "B2XTau"
+HLT_DECISIONS_HAD   = "Hlt2Topo(2|3|4)Body.*Decision"
+HLT_DECISIONS_MUON  = "Hlt2(TopoMu|SingleMuon).*Decision"
+
+class B2XTauConf(LineBuilder) :
+
+  """
+    Builder for B->TauTau, B->TauMu
+    """
+
+  TauTau_TOSLine    = None
+  TauTau_SS_TOSLine = None
+  TauMu_TOSLine     = None
+  TauMu_SS_TOSLine  = None
+  DPi_Line       = None
+  DPi_SS_Line    = None
+  DD_Line        = None
+  DD_SS_Line     = None
+  TauTau_3pi3pi_TOSLine = None
+  TauTau_3pi3pi_SS_TOSLine = None
+  TauMu_3pi_TOSLine = None
+  TauMu_3pi_SS_TOSLine = None
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+    #
+
+    #
+    # Selections
+    #
+    self.selPions        = self._makePions(      name    = "PionsFor"+name,
+                                      config  = config)
+    self.selMuons        = self._makeMuons(      name    = "MuonsFor"+name,
+                                      config  = config)
+    self.selPionsForD        = self._makePionsForD(      name    = "PionsDFor"+name,
+                                      config  = config)
+    self.selKaonsForD        = self._makeKaonsForD(      name    = "KaonsDFor"+name,
+                                      config  = config)
+    self.rawTau          = DataOnDemand(Location = "Phys/StdTightDetachedTau3pi/Particles")
+
+    self.selTau          = self._filterTau(name       = name+"_TauFilter",
+                                      tauInput   = self.rawTau,
+                                      config     = config)
+
+    self.selD            = self._makeD(name       = "DFor"+name,
+                                  pionSel = self.selPionsForD,
+                                  kaonSel = self.selKaonsForD,
+                                  config     = config)
+
+    self.selD0            = self._makeD0(name       = "D0For"+name,
+                                         pionSel = self.selPionsForD,
+                                         kaonSel = self.selKaonsForD,
+                                         config     = config)
+    #
+    self.selB2TauTau,self.selB2DD     = self._makeB2XX(   name    = name,
+                                                                 tauSel  = self.selTau,
+                                                                 DSel    = self.selD,
+                                                                 config  = config)
+    self.selB2TauTauSS,self.selB2DDSS = self._makeB2XXSS( name    = name,
+                                               tauSel  = self.selTau,
+                                               DSel    = self.selD,
+                                               config  = config)
+
+    self.selB2TauMu     = self._makeB2XMu(  name    = name,
+                                              tauSel  = self.selTau,
+                                              muonSel = self.selMuons,
+                                              config  = config)
+
+    self.selB2DPi     = self._makeB2DPi(  name    = name,
+                                     DSel    = self.selD,
+                                     pionSel = self.selPions,
+                                     config  = config)
+
+    self.selB2TauMuSS = self._makeB2XMuSS(name    = name,
+                                      tauSel  = self.selTau,
+                                      muonSel = self.selMuons,
+                                      config  = config)
+
+    self.selB2DPiSS = self._makeB2DPiSS(name    = name,
+                                   DSel    = self.selD,
+                                   pionSel = self.selPions,
+                                   config  = config)
+
+    self.selB2DD0 = self._makeB2DD0(   name    = name,
+                                       D0Sel  = self.selD0,
+                                       DSel    = self.selD,
+                                       config  = config)
+    self.selPions_3pi3pi        = self._makePions_3pi3pi(      name    = "Pions_3pi3piFor"+name,
+                                      config  = config)
+    self.selTau_3pi3pi       = self._makeTau_3pi3pi( name    = "Tau_3pi3piFor"+name,
+                                       pionSel = self.selPions_3pi3pi,
+                                       config  = config)
+
+    self.selB2TauMu_3pi = self._makeB2XMu_3pi(name    = name,
+                                              tauSel  = self.selTau_3pi3pi,
+                                              muonSel = self.selMuons,
+                                              config  = config)
+
+    self.selB2TauMu_3piSS = self._makeB2XMu_3piSS(name    = name,
+                                      tauSel  = self.selTau_3pi3pi,
+                                      muonSel = self.selMuons,
+                                      config  = config)
+
+    self.selB2TauTau_3pi3pi  = self._makeB2TauTau_3pi3pi( name   = name,
+                                            tauSel = self.selTau_3pi3pi,
+                                            config = config)
+
+    self.selB2TauTau_3pi3piSS  = self._makeB2TauTau_3pi3piSS( name   = name,
+                                            tauSel = self.selTau_3pi3pi,
+                                            config = config)
+
+
+    self.selB2TauTauTOS     = self._makeTOS(name+"_TOSForTauTau",self.selB2TauTau,config)
+    self.selB2TauTauSSTOS   = self._makeTOS(name+"_TOSForTauTauSS",self.selB2TauTauSS,config)
+    self.selB2TauMuTOS      = self._makeTOS(name+"_TOSForTauMu",self.selB2TauMu,config)
+    self.selB2TauMuSSTOS    = self._makeTOS(name+"_TOSForTauMuSS",self.selB2TauMuSS,config)
+    self.selB2TauTau_3pi3piTOS     = self._makeTOS(name+"_TOSForTauTau_3pi3pi",self.selB2TauTau_3pi3pi,config)
+    self.selB2TauTau_3pi3piSSTOS     = self._makeTOS(name+"_TOSForTauTau_3pi3piSS",self.selB2TauTau_3pi3piSS,config)
+    self.selB2TauMu_3piTOS     = self._makeTOS(name+"_TOSForTauMu_3pi",self.selB2TauMu_3pi,config)
+    self.selB2TauMu_3piSSTOS     = self._makeTOS(name+"_TOSForTauMu_3piSS",self.selB2TauMu_3piSS,config)
+
+    #
+    # Define StrippingLines
+    #
+    # 1. TauTau_TOSLine
+#    relatedInfoToolsConfig4TauTau_TOSLine = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2TauTauTOS,selTau,StdAllLoosePions])
+    self.TauTau_TOSLine    = StrippingLine(name+"_TauTau_TOSLine",
+                                           #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                           prescale    = config['B2TauTau_TOSLinePrescale'],
+                                           postscale   = config['B2TauTau_TOSLinePostscale'],
+                                           MDSTFlag = False,
+                                           RelatedInfoTools = [
+                                             { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                             { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                             { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                             { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                             { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                             { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                             { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                               "DaughterLocations" : {
+                                                 "B0 -> ^tau+ tau-" : "TauVars_VertexIsoInfo_0",
+                                                 "B0 -> tau+ ^tau-" : "TauVars_VertexIsoInfo_1"
+                                               }
+                                             },
+                                             { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                               "DaughterLocations" : {
+                                                 "B0 -> ^tau+ tau-" : "TauVars_ConeIsolation_0",
+                                                 "B0 -> tau+ ^tau-" : "TauVars_ConeIsolation_1"
+                                               }
+                                              }
+                                            ],
+                                           selection   = self.selB2TauTauTOS,
+                                           MaxCandidates = 50
+                                         )
+
+    # 5. TauTau_SameSign_TOSLine
+#    relatedInfoToolsConfig4TauTau_SS_TOSLine = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2TauTauSSTOS,selTau,StdAllLoosePions])
+    self.TauTau_SS_TOSLine = StrippingLine(name+"_TauTau_SameSign_TOSLine",
+                                           #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                           prescale    = config['B2TauTau_SameSign_TOSLinePrescale'],
+                                           postscale   = config['B2TauTau_SameSign_TOSLinePostscale'],
+                                           MDSTFlag = False,
+                                           RelatedInfoTools = [
+                                             { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                             { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                             { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                             { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                             { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                             { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                             { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ tau+]CC" : "TauVars_VertexIsoInfo_0",
+                                                 "[B0 -> tau+ ^tau+]CC" : "TauVars_VertexIsoInfo_1"
+                                               }
+                                             },
+                                             { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ tau+]CC" : "TauVars_ConeIsolation_0",
+                                                 "[B0 -> tau+ ^tau+]CC" : "TauVars_ConeIsolation_1"
+                                               }
+                                              }
+                                           ],
+                                           selection   = self.selB2TauTauSSTOS,
+                                           MaxCandidates = 50
+                                         )
+
+
+    # 2. DD_Line
+    daughter_locations_DD = {
+      "B0 -> ^D+ D-" : "DVars_{0}_0",
+      "B0 -> D+ ^D-" : "DVars_{0}_1",
+      "B0 -> (D+ -> ^X+ K- pi+) (D- -> X- K+ pi-) ":"DVars_{0}_01",
+      "B0 -> (D+ -> X+ ^K- pi+) (D- -> X- K+ pi-) ":"DVars_{0}_02",
+      "B0 -> (D+ -> X+ K- ^pi+) (D- -> X- K+ pi-) ":"DVars_{0}_03",
+      "B0 -> (D+ -> X+ K- pi+) (D- -> ^X- K+ pi-) ":"DVars_{0}_11",
+      "B0 -> (D+ -> X+ K- pi+) (D- -> X- ^K+ pi-) ":"DVars_{0}_12",
+      "B0 -> (D+ -> X+ K- pi+) (D- -> X- K+ ^pi-) ":"DVars_{0}_13",
+    }
+#    relatedInfoToolsConfig4DD_Line = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2DD,selD,selPionsForD,selKaonsForD])
+    self.DD_Line        = StrippingLine(name+"_DD_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2DD_LinePrescale'],
+                                        postscale   = config['B2DD_LinePostscale'],
+                                        MDSTFlag = False,
+                                        RelatedInfoTools = [
+                                          { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                          { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                          { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                          { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                          { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                          { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                          { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                          { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                          { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                                    "DaughterLocations" : {
+                                                      "B0 -> ^D+ D-" : "DVars_VertexIsoInfo_0",
+                                                      "B0 -> D+ ^D-" : "DVars_VertexIsoInfo_1"
+                                                    }
+                                          },
+
+                                          {'Type'             : 'RelInfoVertexIsolationBDT',
+                                                     'Location'         : 'VertexIsoBDTInfo',
+                                                     'DaughterLocations'   : {
+                                                         "B0 -> ^D+ D-" : "DVars_VertexIsoBDTInfo_0",
+                                                         "B0 -> D+ ^D-" : "DVars_VertexIsoBDTInfo_1"
+                                                    }
+                                                   },
+
+                                          { "Type" : "RelInfoConeIsolation",
+                                            "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                            "DaughterLocations" : {key: val.format('ConeIsolation') for key, val in daughter_locations_DD.items()}},
+
+                                          { "Type" : "RelInfoConeVariables",
+                                            "Location"  : "BVars_ConeVarsInfo05", "ConeAngle" : 0.5,
+                                            "DaughterLocations" : {key: val.format('ConeVarsInfo') for key, val in daughter_locations_DD.items()}},
+
+                                          {'Type'             : 'RelInfoTrackIsolationBDT',
+                                                     'Variables' : 2,
+                                                     'WeightsFile'  :  'BsMuMu_TrackIsolationBDT9vars_v1r4.xml',
+                                           "DaughterLocations" : {key: val.format('TrackIsoBDTInfo') for key, val in daughter_locations_DD.items()}},
+
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 1.0,
+                                     'Location'          : 'ConeVarsInfo10'
+                                     },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                    'ConeAngle'         : 1.5,
+                                     'Location'          : 'ConeVarsInfo15'
+                                    },
+                                    {'Type'              : 'RelInfoConeVariables',
+                                     'ConeAngle'         : 2.0,
+                                     'Location'          : 'ConeVarsInfo20'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.0,
+                                     'Location'          : 'ConeIsoInfo10'
+                                    },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 1.5,
+                                     'Location'          : 'ConeIsoInfo15'
+                                            },
+                                    {'Type'              : 'RelInfoConeIsolation',
+                                     'ConeSize'         : 2.0,
+                                     'Location'          : 'ConeIsoInfo20'
+                                    },
+
+                                        ],
+                                        selection   = self.selB2DD,
+                                        MaxCandidates = 50
+                                      )
+
+    # 9. DD0_Line
+    daughter_locations_DD0 = {
+      "[B+ -> ^(X0 -> K+ pi- ) (X+ -> X+ K- pi+)]CC":"D0Vars_{0}_0",
+      "[B+ -> (X0 -> K+ pi- ) ^(X+ -> X+ K- pi+)]CC":"DVars_{0}_0",
+      "[B+ -> (X0 -> ^K+ pi- ) (X+ -> X+ K- pi+)]CC":"D0Vars_{0}_01",
+      "[B+ -> (X0 -> K+ ^pi- ) (X+ -> X+ K- pi+)]CC":"D0Vars_{0}_02",
+      "[B+ -> (X0 -> K+ pi- ) (X+ -> ^X+ K- pi+)]CC":"DVars_{0}_01",
+      "[B+ -> (X0 -> K+ pi- ) (X+ -> X+ ^K- pi+)]CC":"DVars_{0}_02",
+      "[B+ -> (X0 -> K+ pi- ) (X+ -> X+ K- ^pi+)]CC":"DVars_{0}_03",
+    }
+    #    relatedInfoToolsConfig4DD_Line = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2DD,selD,selPionsForD,selKaonsForD])
+    self.DD0_Line        = StrippingLine(name+"_DD0_Line",
+                                         #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                         prescale    = config['B2DD0_LinePrescale'],
+                                         postscale   = config['B2DD0_LinePostscale'],
+                                         MDSTFlag = False,
+                                         RelatedInfoTools = [
+                                           { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                           { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                           { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                           { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                           { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                           { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                           { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                           { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                             "DaughterLocations" : {
+                                               "[B+ -> ^D~0 D+]CC" : "DVars_VertexIsoInfo_0",
+                                               "[B+ -> D~0 ^D+]CC" : "DVars_VertexIsoInfo_1"
+                                             }
+                                           },
+
+                                           {'Type'             : 'RelInfoVertexIsolationBDT',
+                                            'Location'         : 'VertexIsoBDTInfo',
+                                            'DaughterLocations'   : {
+                                              "[B+ -> ^D~0 D+]CC" : "DVars_VertexIsoBDTInfo_0",
+                                              "[B+ -> D~0 ^D+]CC" : "DVars_VertexIsoBDTInfo_1"
+                                            }
+                                          },
+
+                                           { "Type" : "RelInfoConeIsolation",
+                                             "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                             "DaughterLocations" : {key: val.format('ConeIsolation') for key, val in daughter_locations_DD0.items()}},
+
+                                           { "Type" : "RelInfoConeVariables",
+                                             "Location"  : "BVars_ConeVarsInfo05", "ConeAngle" : 0.5,
+                                             "DaughterLocations" : {key: val.format('ConeVarsInfo') for key, val in daughter_locations_DD0.items()}},
+
+                                           {'Type'             : 'RelInfoTrackIsolationBDT',
+                                            'Variables' : 2,
+                                            'WeightsFile'  :  'BsMuMu_TrackIsolationBDT9vars_v1r4.xml',
+                                            "DaughterLocations" : {key: val.format('TrackIsoBDTInfo') for key, val in daughter_locations_DD0.items()}},
+
+                                           {'Type'              : 'RelInfoConeVariables',
+                                            'ConeAngle'         : 1.0,
+                                            'Location'          : 'ConeVarsInfo10'
+                                          },
+                                           {'Type'              : 'RelInfoConeVariables',
+                                            'ConeAngle'         : 1.5,
+                                            'Location'          : 'ConeVarsInfo15'
+                                          },
+                                           {'Type'              : 'RelInfoConeVariables',
+                                            'ConeAngle'         : 2.0,
+                                            'Location'          : 'ConeVarsInfo20'
+                                          },
+                                           {'Type'              : 'RelInfoConeIsolation',
+                                            'ConeSize'         : 1.0,
+                                            'Location'          : 'ConeIsoInfo10'
+                                          },
+                                           {'Type'              : 'RelInfoConeIsolation',
+                                            'ConeSize'         : 1.5,
+                                            'Location'          : 'ConeIsoInfo15'
+                                          },
+                                           {'Type'              : 'RelInfoConeIsolation',
+                                            'ConeSize'         : 2.0,
+                                            'Location'          : 'ConeIsoInfo20'
+                                          },
+
+                                         ],
+                                         selection   = self.selB2DD0,
+                                         MaxCandidates = 50
+                                       )
+
+
+
+    # 6. DD_SameSign_Line
+ #   relatedInfoToolsConfig4DD_SS_Line = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2DDSS,selD,selPionsForD,selKaonsForD])
+    self.DD_SS_Line     = StrippingLine(name+"_DD_SameSign_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2DD_SameSign_LinePrescale'],
+                                        postscale   = config['B2DD_SameSign_LinePostscale'],
+                                        MDSTFlag = False,
+                                        RelatedInfoTools = [
+                                          { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                          { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                          { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                          { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                          { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                          { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                          { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                          { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                          { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                                    "DaughterLocations" : {
+                                                      "[B0 -> ^D+ D+]CC" : "DVars_VertexIsoInfo_0",
+                                                      "[B0 -> D+ ^D+]CC" : "DVars_VertexIsoInfo_1"
+                                                    }
+                                          },
+                                          { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                                    "DaughterLocations" : {
+                                                      "[B0 -> ^D+ D+]CC" : "DVars_ConeIsolation_0",
+                                                      "[B0 -> D+ ^D+]CC" : "DVars_ConeIsolation_1"
+                                                    }
+                                          }
+                                        ],
+                                        selection   = self.selB2DDSS,
+                                        MaxCandidates = 50
+                                       )
+
+    # 3. TauMu_TOSLine
+ #   relatedInfoToolsConfig4TauMu_TOSLine = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2TauMuTOS,selMuons,selTau,StdAllLoosePions])
+    self.TauMu_TOSLine     = StrippingLine(name+"_TauMu_TOSLine",
+                                           #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                           prescale    = config['B2TauMu_TOSLinePrescale'],
+                                           postscale   = config['B2TauMu_TOSLinePostscale'],
+                                           MDSTFlag = False,
+                                           RelatedInfoTools = [
+                                             { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                             { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                             { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                             { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                             { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                             { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                             { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ mu-]CC" : "TauVars_VertexIsoInfo_0"
+                                               }
+                                             },
+                                             { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ mu-]CC" : "TauVars_ConeIsolation",
+                                                 "[B0 -> tau+ ^mu-]CC" : "MuVars_ConeIsolation"
+                                               }
+                                              }
+                                           ],
+                                           selection   = self.selB2TauMuTOS,
+                                           MaxCandidates = 50
+                                         )
+
+
+    # 7. TauMu_SameSign_TOSLine
+ #   relatedInfoToolsConfig4TauMu_SS_TOSLine = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2TauMuSSTOS,selMuons,selTau,StdAllLoosePions])
+    self.TauMu_SS_TOSLine  = StrippingLine(name+"_TauMu_SameSign_TOSLine",
+                                           #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                           prescale    = config['B2TauMu_SameSign_TOSLinePrescale'],
+                                           postscale   = config['B2TauMu_SameSign_TOSLinePostscale'],
+                                           MDSTFlag = False,
+                                           RelatedInfoTools = [
+                                             { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                             { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                             { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                             { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                             { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                             { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                             { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ mu+]CC" : "TauVars_VertexIsoInfo_0"
+                                               }
+                                             },
+                                             { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ mu+]CC" : "TauVars_ConeIsolation",
+                                                 "[B0 -> tau+ ^mu+]CC" : "MuVars_ConeIsolation"
+                                               }
+                                              }
+                                           ],
+                                           selection   = self.selB2TauMuSSTOS,
+                                           MaxCandidates = 50
+                                          )
+
+    # 4. DPi_Line
+ #   relatedInfoToolsConfig4DPi_Line = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2DPi,selD,selPionsForD,selKaonsForD,selPions])
+    self.DPi_Line       = StrippingLine(name+"_DPi_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2DPi_LinePrescale'],
+                                        postscale   = config['B2DPi_LinePostscale'],
+                                        MDSTFlag = False,
+                                        RelatedInfoTools = [
+                                             { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                             { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                             { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                             { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                             { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                             { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                             { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^D+ pi-]CC" : "DVars_VertexIsoInfo_0"
+                                               }
+                                            },
+                                            { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^D+ pi-]CC" : "TauVars_ConeIsolation",
+                                                 "[B0 -> D+ ^pi-]CC" : "MuVars_ConeIsolation"
+                                               }
+                                            }
+                                          ],
+                                        selection   = self.selB2DPi,
+                                        MaxCandidates = 50
+                                     )
+
+    # 8. DPi_SameSign_Line
+#    relatedInfoToolsConfig4DPi_SS_Line = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2DPiSS,selD,selPionsForD,selKaonsForD,selPions])
+    self.DPi_SS_Line    = StrippingLine(name+"_DPi_SameSign_Line",
+                                        #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                        prescale    = config['B2DPi_SameSign_LinePrescale'],
+                                        postscale   = config['B2DPi_SameSign_LinePostscale'],
+                                        MDSTFlag = False,
+                                        RelatedInfoTools = [
+                                             { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                             { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                             { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                             { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                             { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                             { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                             { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^D+ pi+]CC" : "DVars_VertexIsoInfo_0"
+                                               }
+                                            },
+                                            { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^D+ pi+]CC" : "TauVars_ConeIsolation",
+                                                 "[B0 -> D+ ^pi+]CC" : "MuVars_ConeIsolation"
+                                               }
+                                            }
+                                           ],
+                                        selection   = self.selB2DPiSS,
+                                        MaxCandidates = 50
+                                       )
+
+  # 11. TauTau_3pi3piTOSLine
+#    relatedInfoToolsConfig4TauTau_3pi3pi__TOSLine = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2TauTau_3pi3piTOS,selTau_3pi3pi,StdAllLoosePions])
+    self.TauTau_3pi3pi_TOSLine    = StrippingLine(name+"_TauTau_3pi3pi_TOSLine",
+                                           #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                           prescale    = config['B2TauTau_3pi3pi_TOSLinePrescale'],
+                                           postscale   = config['B2TauTau_3pi3pi_TOSLinePostscale'],
+                                           MDSTFlag = False,
+                                           RelatedInfoTools = [
+                                             { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                             { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                             { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                             { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                             { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                             { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                             { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                               "DaughterLocations" : {
+                                                 "B0 -> ^tau+ tau-" : "TauVars_VertexIsoInfo_0",
+                                                 "B0 -> tau+ ^tau-" : "TauVars_VertexIsoInfo_1"
+                                               }
+                                             },
+                                             { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                               "DaughterLocations" : {
+                                                 "B0 -> ^tau+ tau-" : "TauVars_ConeIsolation_0",
+                                                 "B0 -> tau+ ^tau-" : "TauVars_ConeIsolation_1"
+                                               }
+                                              }
+                                            ],
+                                           selection   = self.selB2TauTau_3pi3piTOS,
+                                           MaxCandidates = 50
+
+                                          )
+
+
+  # 12. TauTau_3pi3pi_SameSign_TOSLine
+#    relatedInfoToolsConfig4TauTau_3pi3pi_SS_TOSLine = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2TauTau_3pi3piSSTOS,selTau_3pi3pi,StdAllLoosePions])
+    self.TauTau_3pi3pi_SS_TOSLine = StrippingLine(name+"_TauTau_3pi3pi_SameSign_TOSLine",
+                                           #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                           prescale    = config['B2TauTau_3pi3pi_SameSign_TOSLinePrescale'],
+                                           postscale   = config['B2TauTau_3pi3pi_SameSign_TOSLinePostscale'],
+                                           MDSTFlag = False,
+                                           RelatedInfoTools = [
+                                             { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                             { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                             { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                             { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                             { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                             { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                             { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ tau+]CC" : "TauVars_VertexIsoInfo_0",
+                                                 "[B0 -> tau+ ^tau+]CC" : "TauVars_VertexIsoInfo_1"
+                                               }
+                                             },
+                                             { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ tau+]CC" : "TauVars_ConeIsolation_0",
+                                                 "[B0 -> tau+ ^tau+]CC" : "TauVars_ConeIsolation_1"
+                                               }
+                                              }
+                                           ],
+                                           selection   = self.selB2TauTau_3pi3piSSTOS,
+                                           MaxCandidates = 50
+                                        )
+
+     # 13. TauMu_3pi_TOSLine
+ #   relatedInfoToolsConfig4TauMu_3pi_TOSLine = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2TauMu_3piTOS,selMuons,selTau_3pi3pi,StdAllLoosePions])
+    self.TauMu_3pi_TOSLine     = StrippingLine(name+"_TauMu_3pi_TOSLine",
+                                           #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                           prescale    = config['B2TauMu_3pi_TOSLinePrescale'],
+                                           postscale   = config['B2TauMu_3pi_TOSLinePostscale'],
+                                           MDSTFlag = False,
+                                           RelatedInfoTools = [
+                                             { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                             { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                             { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                             { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                             { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                             { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                             { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ mu-]CC" : "TauVars_VertexIsoInfo_0"
+                                               }
+                                             },
+                                             { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ mu-]CC" : "TauVars_ConeIsolation",
+                                                 "[B0 -> tau+ ^mu-]CC" : "MuVars_ConeIsolation"
+                                               }
+                                              }
+                                           ],
+                                           selection   = self.selB2TauMu_3piTOS,
+                                           MaxCandidates = 50
+                                         )
+
+  # 14. TauMu_3pi_SameSign_TOSLine
+ #   relatedInfoToolsConfig4TauMu_3pi_SS_TOSLine = filter_relatedinfo_locations(config['RelatedInfoTools'],[selB2TauMu_3piSSTOS,selMuons,selTau_3pi3pi,StdAllLoosePions])
+    self.TauMu_3pi_SS_TOSLine  = StrippingLine(name+"_TauMu_3pi_SameSign_TOSLine",
+                                           #HLT         = " HLT_PASS_RE('"+HLT_DECISIONS+"') ",
+                                           prescale    = config['B2TauMu_3pi_SameSign_TOSLinePrescale'],
+                                           postscale   = config['B2TauMu_3pi_SameSign_TOSLinePostscale'],
+                                           MDSTFlag = False,
+                                           RelatedInfoTools = [
+                                             { "Type" : "RelInfoBstautauMuonIsolationBDT",  "Location"  : "MuonIsolationBDT"},
+                                             { "Type" : "RelInfoBstautauMuonIsolation" ,  "Location"  : "MuonIsolation" },
+                                             { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                             { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                             { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                             { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                             { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                             { "Type" : "RelInfoVertexIsolation", "Location" :  "BVars_VertexIsoInfo",
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ mu+]CC" : "TauVars_VertexIsoInfo_0"
+                                               }
+                                             },
+                                             { "Type" : "RelInfoConeIsolation",  "Location"  : "BVars_ConeIsolation", "ConeSize" : 0.5,
+                                               "DaughterLocations" : {
+                                                 "[B0 -> ^tau+ mu+]CC" : "TauVars_ConeIsolation",
+                                                 "[B0 -> tau+ ^mu+]CC" : "MuVars_ConeIsolation"
+                                               }
+                                              }
+                                           ],
+                                           selection   = self.selB2TauMu_3piSSTOS,
+                                           MaxCandidates = 50
+                                          )
+
+
+    #
+    # Register StrippingLines
+    #
+    self.registerLine( self.TauTau_TOSLine )        #  1
+    self.registerLine( self.DD_Line )               #  2
+    self.registerLine( self.TauMu_TOSLine )         #  3
+    self.registerLine( self.DPi_Line )              #  4
+    self.registerLine( self.TauTau_SS_TOSLine )     #  5
+    self.registerLine( self.DD_SS_Line )            #  6
+    self.registerLine( self.TauMu_SS_TOSLine )      #  7
+    self.registerLine( self.DPi_SS_Line )           #  8
+    self.registerLine( self.DD0_Line )              #  9
+    self.registerLine( self.TauTau_3pi3pi_TOSLine )        # 11
+    self.registerLine( self.TauTau_3pi3pi_SS_TOSLine )     # 12
+    self.registerLine( self.TauMu_3pi_TOSLine )        # 13
+    self.registerLine( self.TauMu_3pi_SS_TOSLine )     # 14
+
+
+  #####################################################
+  def _makeB2XX(self, name, tauSel, DSel, config):
+
+    #
+    preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR = sqrt(M**2 + PTRANS**2) + PTRANS",
+                 "allpi = ((('pi+') == ABSID) | (('K+') == ABSID)) ",
+                 "sumpt    = SUMTREE( allpi , PT )"]
+
+    _combcut = "(APT > " + config['PT_B_TT']       + "*MeV) & "\
+               "(AM  > " + config['MASS_LOW_B']    + "*MeV) & "\
+               "(AM  < " + config['MASS_HIGH_B']   + "*MeV)"
+
+    _bcut    = "(VFASPF(VCHI2PDOF)  <   "   + config['VCHI2_B']       + ") & "\
+               "(BPVDIRA            >   "   + config['DIRA_B']        + ") & "\
+               "(BPVVDCHI2          >   "   + config['FDCHI2_B']      + ") & "\
+               "(BPVVD          <   "   + config['FD_B']      + ") & "\
+               "(PT                >   "   + config['PT_B_TT_HIGH']  + "*MeV) & "\
+               "(INGENERATION((PT   >   "   + config['PT_B_TAU_CHILD_BEST']+ "*MeV),1)) & "\
+               "(INGENERATION((PT   >   "   + config['PT_B_CHILD_BEST']+ "*MeV),2)) & "\
+               "(sumpt >" + config['PT_B_PIONS_TOTAL']+ "*MeV) & "\
+               "(max(CHILD(ipsm,1),CHILD(ipsm,2)) > "   + config['B_TAUPI_2NDMINIPS']+") & "\
+               "(max(CHILD(MIPCHI2DV(PRIMARY),1),CHILD(MIPCHI2DV(PRIMARY),2)) > "   + config['IPCHI2_B_TAU_CHILD_BEST']+") &  "\
+               "(min(CHILD(MIPCHI2DV(PRIMARY),1),CHILD(MIPCHI2DV(PRIMARY),2)) > "   + config['IPCHI2_B_TAU_CHILD_WORSE']+") & "\
+               "(in_range("+config['MCOR_LOW_B']+"*MeV,MCOR,"+config['MCOR_HIGH_B']+"*MeV))"
+
+
+    _CombineTau = CombineParticles( DecayDescriptors = ["B0 -> tau+ tau-"],
+                                   CombinationCut   = _combcut,
+                                   MotherCut        = _bcut,
+                                   Preambulo        = preambulo)
+
+    _CombineD   = CombineParticles( DecayDescriptors = ["B0 -> D+ D-"],
+                                   CombinationCut   = _combcut + " & (AM > 5000)",
+                                   MotherCut        = _bcut,
+                                   Preambulo        = preambulo)
+
+    return (Selection(name+"_TauTau",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel ] ),
+            Selection(name+"_DD",
+                      Algorithm          = _CombineD,
+                      RequiredSelections = [ DSel ] ))
+
+#####################################################
+  def _makeB2DD0(self, name, D0Sel, DSel, config):
+
+    #
+    preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR = sqrt(M**2 + PTRANS**2) + PTRANS",
+                 "allpi = ((('pi+') == ABSID) | (('K+') == ABSID)) ",
+                 "sumpt    = SUMTREE( allpi , PT )"]
+
+    _combcut = "(APT > " + config['PT_B_TT']       + "*MeV) & "\
+               "(AM  > " + config['MASS_LOW_B']    + "*MeV) & "\
+               "(AM  < " + config['MASS_HIGH_B']   + "*MeV)"
+
+    _bcut    = "(VFASPF(VCHI2PDOF)  <   "   + config['VCHI2_B']       + ") & "\
+               "(BPVDIRA            >   "   + config['DIRA_B']        + ") & "\
+               "(BPVVDCHI2          >   "   + config['FDCHI2_B']      + ") & "\
+               "(BPVVD          <   "   + config['FD_B']      + ") & "\
+               "(PT                >   "   + config['PT_B_TT_HIGH']  + "*MeV) & "\
+               "(INGENERATION((PT   >   "   + config['PT_B_TAU_CHILD_BEST']+ "*MeV),1)) & "\
+               "(INGENERATION((PT   >   "   + config['PT_B_CHILD_BEST']+ "*MeV),2)) & "\
+               "(sumpt >" + config['PT_B_PIONS_TOTAL']+ "*MeV) & "\
+               "(max(CHILD(ipsm,1),CHILD(ipsm,2)) > "   + config['B_TAUPI_2NDMINIPS']+") & "\
+               "(max(CHILD(MIPCHI2DV(PRIMARY),1),CHILD(MIPCHI2DV(PRIMARY),2)) > "   + config['IPCHI2_B_TAU_CHILD_BEST']+") &  "\
+               "(min(CHILD(MIPCHI2DV(PRIMARY),1),CHILD(MIPCHI2DV(PRIMARY),2)) > "   + config['IPCHI2_B_TAU_CHILD_WORSE']+") & "\
+               "(in_range("+config['MCOR_LOW_B']+"*MeV,MCOR,"+config['MCOR_HIGH_B']+"*MeV))"
+
+
+
+    _CombineD   = CombineParticles( DecayDescriptors = ["[B+ -> D~0 D+]cc"],
+                                   CombinationCut   = _combcut + " & (AM > 5000)",
+                                   MotherCut        = _bcut,
+                                   Preambulo        = preambulo)
+
+    return Selection(name+"_DD0",
+                     Algorithm          = _CombineD,
+                     RequiredSelections = [ D0Sel, DSel ] )
+
+
+  #####################################################
+  def _makeB2XXSS(self, name, tauSel, DSel, config):
+
+    #
+    preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR = sqrt(M**2 + PTRANS**2) + PTRANS",
+                 "allpi = ((('pi+') == ABSID) | (('K+') == ABSID))",
+                 "sumpt    = SUMTREE( allpi , PT )"]
+
+    _combcut = "(APT > " + config['PT_B_TT']       + "*MeV) & "\
+               "(AM  > " + config['MASS_LOW_B']    + "*MeV) & "\
+               "(AM  < " + config['MASS_HIGH_B']   + "*MeV)"
+
+    _bcut    = "(VFASPF(VCHI2PDOF)  <   "   + config['VCHI2_B']       + ") & "\
+               "(BPVDIRA            >   "   + config['DIRA_B']        + ") & "\
+               "(BPVVDCHI2          >   "   + config['FDCHI2_B']      + ") & "\
+               "(BPVVD          <   "   + config['FD_B']      + ") & "\
+               "(PT                >   "   + config['PT_B_TT_HIGH']  + "*MeV) & "\
+               "(INGENERATION((PT   >   "   + config['PT_B_TAU_CHILD_BEST']+ "*MeV),1)) & "\
+               "(INGENERATION((PT   >   "   + config['PT_B_CHILD_BEST']+ "*MeV),2)) & "\
+               "(sumpt >" + config['PT_B_PIONS_TOTAL']+ "*MeV) & "\
+               "(max(CHILD(ipsm,1),CHILD(ipsm,2)) > "   + config['B_TAUPI_2NDMINIPS']+") & "\
+               "(max(CHILD(MIPCHI2DV(PRIMARY),1),CHILD(MIPCHI2DV(PRIMARY),2)) > "   + config['IPCHI2_B_TAU_CHILD_BEST']+") &  "\
+               "(min(CHILD(MIPCHI2DV(PRIMARY),1),CHILD(MIPCHI2DV(PRIMARY),2)) > "   + config['IPCHI2_B_TAU_CHILD_WORSE']+") & "\
+               "(in_range("+config['MCOR_LOW_B']+"*MeV,MCOR,"+config['MCOR_HIGH_B']+"*MeV))"
+
+
+    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 -> tau+ tau+]cc"],
+                                   CombinationCut   = _combcut,
+                                   MotherCut        = _bcut,
+                                   Preambulo        = preambulo)
+
+    _CombineD   = CombineParticles( DecayDescriptors = ["[B0 -> D+ D+]cc"],
+                                   CombinationCut   = _combcut + " & (AM > 5000)",
+                                   MotherCut        = _bcut,
+                                   Preambulo        = preambulo)
+
+    return (Selection(name+"_TauTauSS",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel ] ),
+            Selection(name+"_DDSS",
+                      Algorithm          = _CombineD,
+                      RequiredSelections = [ DSel ] ))
+
+  #####################################################
+  def _makeB2XMu(self, name, tauSel, muonSel,  config):
+
+    preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR = sqrt(M**2 + PTRANS**2) + PTRANS",
+                 "allpi = ((('pi+') == ABSID) | (('K+') == ABSID)) ",
+                 "sumpt    = SUMTREE( allpi , PT )"]
+
+    _combcut = "(APT > " + config['PT_B_TM']       + "*MeV) & "\
+      "(AM  > "          + config['MASS_LOW_B']    + "*MeV) & "\
+      "(AM  < "          + config['MASS_HIGH_B']   + "*MeV)"
+
+    _bcut    = "((CHILD(BPVVDCHI2,1))   <   "   + config['FDCHI2_TAU']       + ") & "\
+      "(MIPCHI2DV(PRIMARY)   <              "   + config['IPCHI2_B_MU']        + ") & "\
+      "(BPVVD          <   "   + config['FD_B_MU']      + ") & "\
+      "(PT                >   "   + config['PT_B_TM_HIGH']  + "*MeV) & "\
+      "(sumpt >" + config['PT_B_MU_PIONS_TOTAL']+ "*MeV) & "\
+      "((CHILD(VFASPF(VCHI2),1))   <   "   + config['VCHI2_B_TAU_MU']       + ") & "\
+      "(in_range("+config['MCOR_LOW_B']+"*MeV,MCOR,"+config['MCOR_HIGH_B']+"*MeV)) &"\
+      "((CHILD(MIPCHI2DV(PRIMARY),1)) > "   + config['IPCHI2_B_TAU_MU']+")   "
+
+
+    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 -> tau+ mu-]cc"],
+                                   CombinationCut   = _combcut,
+                                   MotherCut        = _bcut,
+                                   Preambulo        = preambulo)
+
+
+    return (Selection(name+"_TauMu",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel, muonSel ] ))
+
+    #####################################################
+  def _makeB2XMuSS(self, name, tauSel, muonSel, config):
+
+    preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR = sqrt(M**2 + PTRANS**2) + PTRANS",
+                 "allpi = ((('pi+') == ABSID) | (('K+') == ABSID)) ",
+                 "sumpt    = SUMTREE( allpi , PT )"]
+
+    _combcut = "(APT > " + config['PT_B_TM']       + "*MeV) & "\
+      "(AM  > "          + config['MASS_LOW_B']    + "*MeV) & "\
+      "(AM  < "          + config['MASS_HIGH_B']   + "*MeV)"
+
+    _bcut    = "((CHILD(BPVVDCHI2,1))   <   "   + config['FDCHI2_TAU']       + ") & "\
+      "(MIPCHI2DV(PRIMARY)   <              "   + config['IPCHI2_B_MU']        + ") & "\
+      "(BPVVD          <   "   + config['FD_B_MU']      + ") & "\
+      "(PT                >   "   + config['PT_B_TM_HIGH']  + "*MeV) & "\
+      "(sumpt >" + config['PT_B_MU_PIONS_TOTAL']+ "*MeV) & "\
+      "((CHILD(VFASPF(VCHI2),1))   <   "   + config['VCHI2_B_TAU_MU']       + ") & "\
+      "(in_range("+config['MCOR_LOW_B']+"*MeV,MCOR,"+config['MCOR_HIGH_B']+"*MeV)) &"\
+      "((CHILD(MIPCHI2DV(PRIMARY),1)) > "   + config['IPCHI2_B_TAU_MU']+")   "
+
+
+    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 -> tau+ mu+]cc"],
+                                   CombinationCut   = _combcut,
+                                   MotherCut        = _bcut,
+                                   Preambulo        = preambulo)
+
+
+    return (Selection(name+"_TauMuSS",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel, muonSel ] ))
+  #####################################################
+  def _makeB2DPi(self, name, DSel, pionSel, config):
+
+    preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR = sqrt(M**2 + PTRANS**2) + PTRANS",
+                 "allpi = ((('pi+') == ABSID) | (('K+') == ABSID))",
+                 "sumpt    = SUMTREE( allpi , PT )"]
+
+    _combcut = "(APT > " + config['PT_B_TM']       + "*MeV) & "\
+      "(AM  > "          + config['MASS_LOW_B']    + "*MeV) & "\
+      "(AM  < "          + config['MASS_HIGH_B']   + "*MeV)"
+
+    _bcut    = "((CHILD(BPVVDCHI2,1))   <   "   + config['FDCHI2_TAU']       + ") & "\
+      "(MIPCHI2DV(PRIMARY)   <              "   + config['IPCHI2_B_MU']        + ") & "\
+      "(BPVVD          <   "   + config['FD_B_MU']      + ") & "\
+      "(PT                >   "   + config['PT_B_TM_HIGH']  + "*MeV) & "\
+      "(sumpt >" + config['PT_B_MU_PIONS_TOTAL']+ "*MeV) & "\
+      "((CHILD(VFASPF(VCHI2),1))   <   "   + config['VCHI2_B_TAU_MU']       + ") & "\
+      "(in_range("+config['MCOR_LOW_B']+"*MeV,MCOR,"+config['MCOR_HIGH_B']+"*MeV)) &"\
+      "((CHILD(MIPCHI2DV(PRIMARY),1)) > "   + config['IPCHI2_B_TAU_MU']+")   "
+
+    _CombineD   = CombineParticles( DecayDescriptors = ["[B0 -> D+ pi-]cc"],
+                                    CombinationCut   = _combcut + " & (AM > 5000)",
+                                    MotherCut        = _bcut,
+                                    Preambulo        = preambulo)
+
+    return (
+      Selection(name+"_DPi",
+                Algorithm          = _CombineD,
+                RequiredSelections = [ DSel, pionSel ] ))
+
+
+  #####################################################
+  def _makeB2DPiSS(self, name, DSel, pionSel, config):
+
+    preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR = sqrt(M**2 + PTRANS**2) + PTRANS",
+                 "allpi = ((('pi+') == ABSID) | (('K+') == ABSID)) ",
+                 "sumpt    = SUMTREE( allpi , PT )"]
+
+    _combcut = "(APT > " + config['PT_B_TM']       + "*MeV) & "\
+      "(AM  > "          + config['MASS_LOW_B']    + "*MeV) & "\
+      "(AM  < "          + config['MASS_HIGH_B']   + "*MeV)"
+
+
+    _bcut    = "((CHILD(BPVVDCHI2,1))   <   "   + config['FDCHI2_TAU']       + ") & "\
+      "(MIPCHI2DV(PRIMARY)   <              "   + config['IPCHI2_B_MU']        + ") & "\
+      "(BPVVD          <   "   + config['FD_B_MU']      + ") & "\
+      "(PT                >   "   + config['PT_B_TM_HIGH']  + "*MeV) & "\
+      "(in_range("+config['MCOR_LOW_B']+"*MeV,MCOR,"+config['MCOR_HIGH_B']+"*MeV)) &"\
+      "((CHILD(MIPCHI2DV(PRIMARY),1)) > "   + config['IPCHI2_B_TAU_MU']+")   "
+
+
+    _CombineD   = CombineParticles( DecayDescriptors = ["[B0 -> D+ pi+]cc"],
+                                    CombinationCut   = _combcut + " & (AM > 5000)",
+                                    MotherCut        = _bcut,
+                                    Preambulo        = preambulo)
+
+    return (
+      Selection(name+"_DPiSS",
+                Algorithm          = _CombineD,
+                RequiredSelections = [ DSel, pionSel ] ))
+
+  #####################################################
+  def _filterTau(self, name, tauInput, config) :
+    """
+      Tau filter
+      """
+    _cut =       "(PT > 0*MeV) "
+
+    _preambulo = [ "c1c2c3 = ((('pi+') == ABSID) | (('K+') == ABSID))" ,
+                   "ipsm    = MINTREE( c1c2c3 , MIPCHI2DV(PRIMARY) )"]
+
+    _filter   = FilterDesktop( Code = _cut, Preambulo = _preambulo)
+#    _filter   = FilterDesktop( Code = _cut)
+
+    return Selection(name,
+                     Algorithm = _filter,
+                     RequiredSelections = [tauInput]
+                     )
+
+  #####################################################
+  def _makeD(self, name, pionSel, kaonSel, config) :
+
+     _preambulo = [ "c1c2c3 = ((('pi+') == ABSID) | (('K+') == ABSID))" ,
+                    "ipsm    = MINTREE( c1c2c3 , MIPCHI2DV(PRIMARY) )"]
+
+#     _combcut = " (((AM  > "           + config['MASS_LOW_D']    + "*MeV) & "\
+#                " (AM  < "           + config['MASS_HIGH_D']   + "*MeV))  | "\
+#                " ((AM  > "           + config['MASS_LOW_Ds']    + "*MeV) & "\
+#                " (AM  < "           + config['MASS_HIGH_Ds']   + "*MeV)))  & "\
+#                " (APT  > "          + config['APT_D']   + "*MeV)  & "\
+#                " (AMAXDOCA('')  <"  + config['AMAXDOCA_D']   + "*mm)  & "\
+#                " (ANUM(PT > "       + config['MaxPT_D']   + "*MeV) >= 1) "
+
+#     _bcut = " (PT > "             + config['PT_D']   + "*MeV) &"\
+#             " (BPVDIRA >"         + config['DIRA_D']   + ") &"\
+#             " (VFASPF(VCHI2) < "  + config['VCHI2_D']   + ")&"\
+#             " (BPVVDCHI2 > "      + config['FDCHI2_D']   + ") &"\
+#             " (BPVVDRHO >  "      + config['VDRHOmin_D']   + "*mm) &"\
+#             " (BPVVDRHO <  "      + config['VDRHOmax_D']   + "*mm) &"\
+#             " (BPVVDZ >  "        + config['VDZ_D']   + "*mm) "
+
+
+#     _CombineD   = CombineParticles( DecayDescriptors = ["[D+ -> pi+ K- pi+]cc","[D+ -> K+ K- pi+]cc"],
+#                                     CombinationCut   = _combcut,
+#                                     MotherCut        = _bcut+"& (M>1800.*MeV) & (M<2030.*MeV)" ,
+#                                     Preambulo        = _preambulo)
+
+     _CombineD   = DaVinci__N3BodyDecays(
+                   DecayDescriptors = ["[D+ -> pi+ K- pi+]cc","[D+ -> K+ K- pi+]cc"],
+                   Preambulo        = _preambulo,
+                   Combination12Cut = "AM<5000",
+                   CombinationCut = " ( ( in_range ( %(MASS_LOW_D)s, AM, %(MASS_HIGH_D)s ) ) | ( in_range ( %(MASS_LOW_Ds)s, AM, %(MASS_HIGH_Ds)s ) ) )"\
+                                    "& ( APT           > %(APT_D)s )"\
+                                    "& ( AMAXDOCA('')  < %(AMAXDOCA_D)s )"\
+                                    "& ( ANUM(PT       > %(MaxPT_D)s)>=1 )" %config,
+                   MotherCut =   "( PT            > %(PT_D)s )"\
+                                 "& ( BPVDIRA       > %(DIRA_D)s )"\
+                                 "& ( VFASPF(VCHI2) < %(VCHI2_D)s ) "\
+                                 "& ( BPVVDCHI2     > %(FDCHI2_D)s ) & ( in_range ( %(VDRHOmin_D)s, BPVVDRHO, %(VDRHOmax_D)s ) ) & ( BPVVDZ > %(VDZ_D)s )"\
+                                 "& ( in_range ( %(MASS_LOW_Dmother)s, M, %(MASS_HIGH_Dmother)s ) )" %config
+                   )
+     return Selection(name,
+                      Algorithm          = _CombineD,
+                      RequiredSelections = [pionSel, kaonSel]
+                      )
+
+
+#####################################################
+  def _makeD0(self, name, pionSel, kaonSel, config) :
+
+     _preambulo = [ "c1c2c3 = ((('pi+') == ABSID) | (('K+') == ABSID))" ,
+                    "ipsm    = MINTREE( c1c2c3 , MIPCHI2DV(PRIMARY) )"]
+
+     _CombineD   = CombineParticles(
+                   DecayDescriptors = ["[D0 -> K- pi+]cc"],
+                   Preambulo        = _preambulo,
+                   CombinationCut = " ( ( in_range ( %(MASS_LOW_D)s, AM, %(MASS_HIGH_D)s ) ) | ( in_range ( %(MASS_LOW_Ds)s, AM, %(MASS_HIGH_Ds)s ) ) )"\
+                                    "& ( APT           > %(APT_D)s )"\
+                                    "& ( AMAXDOCA('')  < %(AMAXDOCA_D)s )"\
+                                    "& ( ANUM(PT       > %(MaxPT_D)s)>=1 )" %config,
+                   MotherCut =   "( PT            > %(PT_D)s )"\
+                                 "& ( BPVDIRA       > %(DIRA_D)s )"\
+                                 "& ( VFASPF(VCHI2) < %(VCHI2_D)s ) "\
+                                 "& ( BPVVDCHI2     > %(FDCHI2_D)s ) & ( in_range ( %(VDRHOmin_D)s, BPVVDRHO, %(VDRHOmax_D)s ) ) & ( BPVVDZ > %(VDZ_D)s )"\
+                                 "& ( in_range ( %(MASS_LOW_Dmother)s, M, %(MASS_HIGH_Dmother)s ) )" %config
+                   )
+     return Selection(name,
+                      Algorithm          = _CombineD,
+                      RequiredSelections = [pionSel, kaonSel]
+                      )
+
+  #####################################################
+  def _makePions(self, name, config) :
+    """
+      Pion selection for B -> D pi
+      """
+    _code = self._muFinalStateKinematicCuts(config)
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdLoosePions ] )
+  #####################################################
+  def _makePionsForD(self, name, config) :
+    """
+      Pion selection for B -> DD
+      """
+    _code = self._hadFinalStateKinematicCuts(config) +" & (PROBNNpi > 0.55)"
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdLoosePions ] )
+  #####################################################
+  def _makeKaonsForD(self, name, config) :
+    """
+      Kaon selection for B -> DD
+      """
+    _code = self._hadFinalStateKinematicCuts(config)
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdLooseKaons ] )
+
+  #####################################################
+  def _makeMuons(self, name, config) :
+    """
+      Muon selection
+      """
+    _code = self._muFinalStateKinematicCuts(config) +" & (HASMUON) & (PIDmu > 0)"
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdTightMuons ] )
+
+  #####################################################
+  def _hadFinalStateKinematicCuts(self, config) :
+    _code = "(P  > "                    + config['P_HAD_ALL_FINAL_STATE']     + "*MeV) & "\
+      "(PT > "                    + config['PT_HAD_ALL_FINAL_STATE']          + "*MeV) & "\
+      "(MIPCHI2DV(PRIMARY) > "    + config['IPCHI2_HAD_ALL_FINAL_STATE']      + ")     & "\
+      "(TRCHI2DOF < "             + config['TRACKCHI2_HAD_ALL_FINAL_STATE']   + ")     & "\
+      "(TRGHOSTPROB < "           + config['TRGHOPROB_HAD_ALL_FINAL_STATE']   + ")     "
+
+    return _code
+
+  #####################################################
+  def _muFinalStateKinematicCuts(self, config) :
+    _code = "(P  > "                    + config['P_MU']           + "*MeV) & "\
+      "(PT > "                    + config['PT_MU']          + "*MeV) & "\
+      "(MIPCHI2DV(PRIMARY) > "    + config['IPCHI2_MU']      + ")     & "\
+      "(TRCHI2DOF < "             + config['TRACKCHI2_MU']   + ")     & "\
+      "(TRGHOSTPROB < "           + config['TRGHOPROB_MU']   + ")      "
+
+    return _code
+   #####################################################
+  def _makeB2XMu_3pi(self, name, tauSel, muonSel, config):
+
+    preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR = sqrt(M**2 + PTRANS**2) + PTRANS",
+                 "allpi = ((('pi+') == ABSID) | (('K+') == ABSID)) ",
+                 "sumpt    = SUMTREE( allpi , PT )"]
+
+    _combcut = "(AM  > 2000 *MeV) & "\
+               "(AM  < 7000 *MeV)"
+    _bcut      = "((CHILD(MIPCHI2DV(PRIMARY),1)) > "   + config['IPCHI2_B_TAU_MU']+")  &  "\
+                 "(P > 25000) & (PT > 2000) & " \
+                 "(M > " + config['CUTBASED_M_B'] + ") & "\
+                 "(MCOR < " + config['CUTBASED_MCORR_B_HIGH'] + ") & "\
+                 "(MCOR > " + config['CUTBASED_MCORR_B_LOW'] + ") & "\
+                 "(M - CHILD(M,1) - CHILD(M,2) > " + config['CUTBASED_MISS_MASS'] + ") & "\
+                 "(CHILD(M,1) * (CHILD(VFASPF(VZ),1) - VFASPF(VZ) )/(CHILD(PZ,1) * 0.299792458) < " + config['CUTBASED_TAU_TAU_HIGH'] + ") & "\
+                 "(CHILD(M,1) * (CHILD(VFASPF(VZ),1) - VFASPF(VZ) )/(CHILD(PZ,1) * 0.299792458) > " + config['CUTBASED_TAU_TAU_LOW'] + ") "
+
+    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 -> tau+ mu-]cc"],
+                                    CombinationCut   = _combcut,
+                                    MotherCut        = _bcut,
+                                    Preambulo        = preambulo)
+
+
+    return Selection(name+"_TauMu_3pi",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel, muonSel ] )
+
+
+
+
+  ##################################################
+  def _makeB2TauTau_3pi3pi(self, name, tauSel, config):
+    # Minimum mass = 6 pions (140 MeV) = 840 MeV
+    # TauDECAYTIME: c tau = m Delta/p
+    _preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR  = sqrt(M**2 + PTRANS**2) + PTRANS"]
+    #             "TauDECAYTIME = lambda i : (MASS(i) * MeV * (CHILDFUN(i, VFASPF(VZ)) - VFASPF(VZ))/(CHILDFUN(i, PZ) * 0.299792458))"] # lots of functions not defined
+    _combcut   = "(AM > 2000) & (AM < 7000)"
+    _bcut      = "(P > 25000) & (PT > 2000) & " \
+                 "(M > " + config['CUTBASED_M_B'] + ") & "\
+                 "(MCOR < " + config['CUTBASED_MCORR_B_HIGH'] + ") & "\
+                 "(MCOR > " + config['CUTBASED_MCORR_B_LOW'] + ") & "\
+                 "(M - CHILD(M,1) - CHILD(M,2) > " + config['CUTBASED_MISS_MASS'] + ") & "\
+                 "(CHILD(M,1) * (CHILD(VFASPF(VZ),1) - VFASPF(VZ) )/(CHILD(PZ,1) * 0.299792458) < " + config['CUTBASED_TAU_TAU_HIGH'] + ") & "\
+                 "(CHILD(M,2) * (CHILD(VFASPF(VZ),2) - VFASPF(VZ) )/(CHILD(PZ,2) * 0.299792458) < " + config['CUTBASED_TAU_TAU_HIGH'] + ") & "\
+                 "(CHILD(M,1) * (CHILD(VFASPF(VZ),1) - VFASPF(VZ) )/(CHILD(PZ,1) * 0.299792458) > " + config['CUTBASED_TAU_TAU_LOW'] + ") & "\
+                 "(CHILD(M,2) * (CHILD(VFASPF(VZ),2) - VFASPF(VZ) )/(CHILD(PZ,2) * 0.299792458) > " + config['CUTBASED_TAU_TAU_LOW'] + ")"
+#             "(TauDECAYTIME(1) > " + config['CUTBASED_TAU_TAU'] + "*ps) & #"\
+    #             "(TauDECAYTIME(2) > " + config['CUTBASED_TAU_TAU'] + "*ps)"
+
+
+    _CombineTau = CombineParticles( DecayDescriptors = ["B0 -> tau+ tau-"],
+                                    CombinationCut   = _combcut,
+                                    MotherCut        = _bcut,
+                                    Preambulo        = _preambulo)
+
+    return Selection( name+"_TauTau_3pi3pi",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel ]
+                      )
+
+ #####################################################
+  def _makeB2XMu_3piSS(self, name, tauSel, muonSel, config):
+
+    preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR = sqrt(M**2 + PTRANS**2) + PTRANS",
+                 "allpi = ((('pi+') == ABSID) | (('K+') == ABSID)) ",
+                 "sumpt    = SUMTREE( allpi , PT )"]
+
+    _combcut = "(AM  > 2000 *MeV) & "\
+               "(AM  < 7000 *MeV)"
+
+    _bcut      = "((CHILD(MIPCHI2DV(PRIMARY),1)) > "   + config['IPCHI2_B_TAU_MU']+")  &  "\
+                 "(P > 25000) & (PT > 2000) & " \
+                 "(M > " + config['CUTBASED_M_B'] + ") & "\
+                 "(MCOR < " + config['CUTBASED_MCORR_B_HIGH'] + ") & "\
+                 "(MCOR > " + config['CUTBASED_MCORR_B_LOW'] + ") & "\
+                 "(M - CHILD(M,1) - CHILD(M,2) > " + config['CUTBASED_MISS_MASS'] + ") & "\
+                 "(CHILD(M,1) * (CHILD(VFASPF(VZ),1) - VFASPF(VZ) )/(CHILD(PZ,1) * 0.299792458) < " + config['CUTBASED_TAU_TAU_HIGH'] + ") & "\
+                 "(CHILD(M,1) * (CHILD(VFASPF(VZ),1) - VFASPF(VZ) )/(CHILD(PZ,1) * 0.299792458) > " + config['CUTBASED_TAU_TAU_LOW'] + ") "
+
+    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 -> tau+ mu+]cc"],
+                                    CombinationCut   = _combcut,
+                                    MotherCut        = _bcut,
+                                    Preambulo        = preambulo)
+
+    return Selection(name+"_TauMu_3piSS",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel, muonSel ] )
+
+    ##################################################
+  def _makeB2TauTau_3pi3piSS(self, name, tauSel, config):
+    # Minimum mass = 6 pions (140 MeV) = 840 MeV
+    # TauDECAYTIME: c tau = m Delta/p
+    _preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR  = sqrt(M**2 + PTRANS**2) + PTRANS"]
+    #             "TauDECAYTIME = lambda i : (MASS(i) * MeV * (CHILDFUN(i, VFASPF(VZ)) - VFASPF(VZ))/(CHILDFUN(i, PZ) * 0.299792458))"] # lots of functions not defined
+    _combcut   = "(AM > 2000) & (AM < 7000)"
+    _bcut      = "(P > 25000) & (PT > 2000) & " \
+                 "(M > " + config['CUTBASED_M_B'] + ") & "\
+                 "(MCOR < " + config['CUTBASED_MCORR_B_HIGH'] + ") & "\
+                 "(MCOR > " + config['CUTBASED_MCORR_B_LOW'] + ") & "\
+                 "(M - CHILD(M,1) - CHILD(M,2) > " + config['CUTBASED_MISS_MASS'] + ") & "\
+                 "(CHILD(M,1) * (CHILD(VFASPF(VZ),1) - VFASPF(VZ) )/(CHILD(PZ,1) * 0.299792458) < " + config['CUTBASED_TAU_TAU_HIGH'] + ") & "\
+                 "(CHILD(M,2) * (CHILD(VFASPF(VZ),2) - VFASPF(VZ) )/(CHILD(PZ,2) * 0.299792458) < " + config['CUTBASED_TAU_TAU_HIGH'] + ") & "\
+                 "(CHILD(M,1) * (CHILD(VFASPF(VZ),1) - VFASPF(VZ) )/(CHILD(PZ,1) * 0.299792458) > " + config['CUTBASED_TAU_TAU_LOW'] + ") & "\
+                 "(CHILD(M,2) * (CHILD(VFASPF(VZ),2) - VFASPF(VZ) )/(CHILD(PZ,2) * 0.299792458) > " + config['CUTBASED_TAU_TAU_LOW'] + ")"
+#             "(TauDECAYTIME(1) > " + config['CUTBASED_TAU_TAU'] + "*ps) & #"\
+    #             "(TauDECAYTIME(2) > " + config['CUTBASED_TAU_TAU'] + "*ps)"
+
+
+    _CombineTau = CombineParticles( DecayDescriptors = ["[B0 -> tau+ tau+]cc"],
+                                    CombinationCut   = _combcut,
+                                    MotherCut        = _bcut,
+                                    Preambulo        = _preambulo)
+
+    return Selection( name+"_TauTau_3pi3piSS",
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ tauSel ]
+                      )
+
+
+ ##################################################
+  def _makeTau_3pi3pi(self, name, pionSel, config) :
+
+    # Minimum mass = 3 pions (140 MeV) = 420 MeV
+    _preambulo = [""]
+    _combcut   = "(AM > " + config['CUTBASED_M_TAU_LOW'] + ") & (AM < " + config['CUTBASED_M_TAU_HIGH'] + ")"
+    _bcut      = "(P > 7500) & (PT > 500) & "\
+                 "(BPVVDRHO > " + config['CUTBASED_TAU_BPVVDRHO'] + ") & "\
+                 "(VFASPF(VCHI2) < " + config['CUTBASED_VCHI2_TAU'] +")"
+
+    _CombineTau = CombineParticles( DecayDescriptors = ["[tau+ -> pi+ pi- pi+]cc"],
+                                    CombinationCut   = _combcut,
+                                    MotherCut        = _bcut,
+                                    Preambulo        = _preambulo)
+
+    return Selection( name,
+                      Algorithm          = _CombineTau,
+                      RequiredSelections = [ pionSel ]
+                      )
+   ##################################################
+  def _makePions_3pi3pi(self, name, config) :
+
+    _code = self._hadFinalStateKinematicCuts_3pi3pi(config) + "  & (PROBNNghost < 0.4) & (PROBNNpi > " + config['CUTBASED_PROBNNPI'] + ")"
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection( name,
+                      Algorithm          = _Filter,
+                      RequiredSelections = [ StdNoPIDsPions ]
+                      )
+
+  ##################################################
+
+  def _hadFinalStateKinematicCuts_3pi3pi(self, config) :
+    # Reapply generator level cuts + default track cuts
+    _code = "(P  > "                    + config['P_HAD_ALL_FINAL_STATE']     + "*MeV) & "\
+      "(PT > "                    + config['PT_HAD_ALL_FINAL_STATE']          + "*MeV) & "\
+      "(TRCHI2DOF < "             + config['TRACKCHI2_HAD_ALL_FINAL_STATE']   + ")     & "\
+      "(TRGHOSTPROB < "           + config['TRGHOPROB_HAD_ALL_FINAL_STATE']   + ")     "
+
+    return _code
+
+
+
+  #####################################################
+  # TISTOSSING
+  #####################################################
+
+  def _makeTISTOSFilter(self,name,specs):
+    from Configurables import TisTosParticleTagger
+    tisTosFilter = TisTosParticleTagger(name+'TISTOSFilter')
+    tisTosFilter.TisTosSpecs = specs
+    tisTosFilter.ProjectTracksToCalo = False
+    tisTosFilter.CaloClustForCharged = False
+    tisTosFilter.CaloClustForNeutral = False
+    tisTosFilter.TOSFrac = {4:0.0, 5:0.0}
+    # tisTosFilter = True
+    return tisTosFilter
+
+  def _makeTOS(self, name, sel, config):
+    ''' TOS filters selections'''
+    if ((name.find('TauMu') > -1) or (name.find('DMu') > -1)):
+      tisTosFilter = self._makeTISTOSFilter(name,config['HLT_DECISIONS_MUON'])
+    else :
+      tisTosFilter = self._makeTISTOSFilter(name,config['HLT_DECISIONS_HAD'])
+    return Selection(name, Algorithm=tisTosFilter, RequiredSelections=[sel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauMu.py
new file mode 100644
index 000000000..81cf8c26e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauMu.py
@@ -0,0 +1,982 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping selection for B->X tau mu:
+    - B -> K tau(mu) mu
+    - B -> K tau(3pi) mu
+    - B -> K*0 tau(mu) mu
+    - B -> phi tau(mu) mu
+    - B -> phi tau(3pi) mu
+"""
+
+__author__ = "Paula Alvarez"
+__date__ = "01/12/2015"
+__version__ = "3.0"
+
+__all__ = ('B2XTauMuConf',
+           'default_config')
+
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdAllLooseMuons, StdLooseKaons, StdTightDetachedTau3pi
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays as Combine3Particles
+
+daughter_locations = {
+    # B2Kmutau
+    "[Beauty -> (X0 -> X+ ^l-) l+]CC ":"{0}L1",
+    "[Beauty -> (X+ -> X+ ^l+) l-]CC ":"{0}L1",
+    "[Beauty -> (X0 -> X+ l-) ^l+]CC ":"{0}L2",
+    "[Beauty -> (X+ -> X+ l+) ^l-]CC ":"{0}L2",
+    "[Beauty -> (X0 -> ^X+ l-) l+]CC ":"{0}H",
+    "[Beauty -> (X+ -> ^X+ l+) l-]CC ":"{0}H",
+    
+    # B2K*mutau
+    "[Beauty -> (X+ -> X0 ^l+) l-]CC ":"{0}L1",
+    "[Beauty -> (X+ -> X0 l+) ^l-]CC ":"{0}L2",
+    "[Beauty -> (X+ -> (X0 -> ^X+ X-) l+) l-]CC ":"{0}H1",
+    "[Beauty -> (X+ -> (X0 -> X+ ^X-) l+) l-]CC ":"{0}H2",
+    "[Beauty -> ^(X+ -> (X0 -> X+ X-) l+) l-]CC ":"{0}HHH",
+    "[Beauty -> (X+ -> ^(X0 -> X+ X-) l+) l-]CC ":"{0}HH",
+    
+    # B2phimutau
+    "[Beauty -> (X0-> X+ X-) ^l+ l-]CC ":"{0}L1",
+    "[Beauty -> (X0-> X+ X-) l+ ^l-]CC ":"{0}L2",
+    "[Beauty -> (X0-> ^X+ X-) l+ l-]CC ":"{0}H1",
+    "[Beauty -> (X0-> X+ ^X-) l+ l-]CC ":"{0}H1",
+    "[Beauty -> ^(X0-> X+ X-) l+ l-]CC ":"{0}HH",
+    
+    # B2Kmutau WS
+    "[Beauty -> (X0 -> X+ ^l-) l-]CC ":"{0}L1",
+    "[Beauty -> (X+ -> X+ ^l+) l+]CC ":"{0}L1",
+    "[Beauty -> (X0 -> X+ l-) ^l-]CC ":"{0}L2",
+    "[Beauty -> (X+ -> X+ l+) ^l+]CC ":"{0}L2",
+    "[Beauty -> (X0 -> ^X+ l-) l-]CC ":"{0}H",
+    "[Beauty -> (X+ -> ^X+ l+) l+]CC ":"{0}H",
+    
+    # B2K*mutau WS
+    "[Beauty -> (X+ -> X0 ^l+) l+]CC ":"{0}L1",
+    "[Beauty -> (X+ -> X0 l+) ^l+]CC ":"{0}L2",
+    "[Beauty -> (X+ -> (X0 -> ^X+ X-) l+) l+]CC ":"{0}H1",
+    "[Beauty -> (X+ -> (X0 -> X+ ^X-) l+) l+]CC ":"{0}H2",
+    "[Beauty -> ^(X+ -> (X0 -> X+ X-) l+) l+]CC ":"{0}HHH",
+    "[Beauty -> (X+ -> ^(X0 -> X+ X-) l+) l+]CC ":"{0}HH",
+    
+    # B2phimutau WS
+    "[Beauty -> (X0-> X+ X-) ^l+ l+]CC ":"{0}L1",
+    "[Beauty -> (X0-> X+ X-) l+ ^l+]CC ":"{0}L2",
+    "[Beauty -> (X0-> ^X+ X-) l+ l+]CC ":"{0}H1",
+    "[Beauty -> (X0-> X+ ^X-) l+ l+]CC ":"{0}H1",
+    "[Beauty -> ^(X0-> X+ X-) l+ l+]CC ":"{0}HH",
+
+    # pions from tau
+    "[Beauty -> X (l ->  ^pi-  pi- pi+)]CC ":"{0}L21",
+    "[Beauty -> X (l ->  pi-  ^pi- pi+)]CC ":"{0}L22",
+    "[Beauty -> X (l ->  pi-  pi- ^pi+)]CC ":"{0}L23",
+
+    "[Beauty -> X l (l ->  ^pi-  pi- pi+)]CC ":"{0}L21",
+    "[Beauty -> X l (l ->  pi-  ^pi- pi+)]CC ":"{0}L22",
+    "[Beauty -> X l (l ->  pi-  pi- ^pi+)]CC ":"{0}L23",
+}
+
+
+
+default_config = {
+    'NAME'          : 'B2XTauMu',
+    'BUILDERTYPE'   : 'B2XTauMuConf',
+    'STREAMS' : {
+        'Dimuon' : ['StrippingB2XTauMu_KstLine',
+                    'StrippingB2XTauMu_Kst_WSLine',
+                    'StrippingB2XTauMu_K_3piLine',
+                    'StrippingB2XTauMu_K_3pi_WSLine'],
+        'Leptonic' : ['StrippingB2XTauMu_PhiLine',
+                      'StrippingB2XTauMu_KLine',
+                      'StrippingB2XTauMu_Phi_3piLine',
+                      'StrippingB2XTauMu_Phi_WSLine',
+                      'StrippingB2XTauMu_K_WSLine',
+                      'StrippingB2XTauMu_Phi_3pi_WSLine'],
+        'Bhadron' : ['StrippingB2XTauMu_K_3pi_looseLine',
+                     'StrippingB2XTauMu_K_3pi_loose_WSLine']
+    },
+    'WGs'           : ['RD'],
+    'CONFIG'        : { 
+        # Common cuts
+        "MINIPCHI2"      : 16.0    # adimensiional
+        ,"TrackCHI2"     : 3       # adimensional
+        ,"TrackGhostProb": 0.5     # adimensional
+        ,"KaonPIDK"      : 4.0     # adimensiional
+        ,"PionPIDK"      : 0.0     # adimensiional
+        ,"PIDmu"         : 2.0     # adimensiional
+        ,"B_MIN_MASS"    : 2000    # MeV
+        ,"B_MAX_MASS"    : 10000    # MeV
+        
+        ####  Bd->K*0 tau(mu) mu
+        # Daughters
+        ,"MuonPT_kst"        : 500.0   # MeV
+        ,"MuonP_kst"         : 2.0     # GeV
+        ,"KPiPT_kst"         : 500.0   # MeV
+        ,"KaonP_kst"         : 2.0     # GeV
+        ,"PionP_kst"         : 2.0     # GeV
+        
+        # K*0 cuts
+        ,"KstMassWin"    : 150.0   # MeV
+        ,"KstAMassWin"   : 180.0   # MeV
+        ,"KstVCHI2DOF"   : 15.0    # adimensiional
+        
+        # Xmu cuts
+        ,"XMuVCHI2DOF_kst" : 15.0    # adimensiional
+        
+        # B cuts
+        ,"BDIRA_kst"         : 0.95    # adimensiional
+        ,"BVCHI2DOF_kst"     : 25.0    # adimensiional
+        ,"B_FDCHI2_kst"      : 80      # adimensiional
+        
+        ####  Bd->phi tau(mu) mu
+        # Phi cuts
+        ,"PhiAMassWin"    : 30.0   # MeV
+        ,"PhiMassWin"    : 25.0   # MeV
+        ,"PhiVCHI2DOF"   : 20.0    # adimensiional
+
+        # Xmu cuts
+        ,"XMuVCHI2DOF_phi" : 20.0    # adimensiional
+
+        # B cuts for phitaumu
+        ,"BVCHI2DOF_phi"     : 1e10    # adimensiional
+
+        ####  B+->K+ tau(mu) mu
+        # Daughters
+        ,"MuonPT_K"        : 800.0   # MeV
+        ,"MuonP_K"         : 5.0     # GeV
+        ,"KPiPT_K"         : 800.0   # MeV
+        ,"KaonP_K"         : 3.0     # GeV
+        ,"MINIPCHI2_K"     : 36.0
+        ,"KaonPIDK_K"      : 5    
+
+        # Xmu cuts
+        ,"XMuVCHI2DOF_K" : 9.0    # adimensiional
+        ,"KMuSumPT_K"      : 2000.0  # MeV
+        ,"KMuPT_K"      : 1000.0  # MeV
+
+        # B cuts for Ktaumu
+        ,"BDIRA_K"         : 0.99    # adimensiional
+        ,"BVCHI2DOF_K"     : 15.0    # adimensiional
+        ,"B_FDCHI2_K"      : 400.      # MeV
+        ,"B_PT_K"          : 3000.    # MeV
+
+        ####  B+->K+ tau(3pi) mu
+        ,"BDIRA_K_3pi"         : 0.999    # adimensiional
+        ,"BVCHI2DOF_K_3pi"     : 4.0    # adimensiional
+        ,"MuonP_K_3pi"         : 6.0     # GeV
+        ,"KaonP_K_3pi"         : 6.0     # GeV
+        ,"KaonPIDK_K_3pi"      : 6    
+        ,"B_MIN_MASS_K_3pi"    : 3000    # MeV
+        ,"B_MAX_MASS_K_3pi"    : 10000    # MeV
+        
+        # Wrong sign combinations
+        ,'MuTauWS'       : True
+
+
+        ,"Prescale"      : 1
+        ,"Prescale_WS"    : 0.5
+
+
+        ,"RelatedInfoTools" : [
+            {'Type'             : 'RelInfoVertexIsolation',
+             'Location'         : 'VertexIsoInfo',
+             'IgnoreUnmatchedDescriptors': True,
+             'DaughterLocations'   : {key: val.format('VertexIsoInfo') for key, val in daughter_locations.items()}},
+            {'Type'             : 'RelInfoVertexIsolationBDT',
+             'Location'         : 'VertexIsoBDTInfo',
+             'IgnoreUnmatchedDescriptors': True,
+             'DaughterLocations'   : {key: val.format('VertexIsoBDTInfo') for key, val in daughter_locations.items()}},
+            {'Type'             : 'RelInfoConeVariables',
+             'ConeAngle'        : 1.0,
+             'Location'         : 'ConeVarsInfo'},
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'          : 0.5,
+             'IgnoreUnmatchedDescriptors': True,
+             'Location'         : 'ConeIsoInfo05',
+             'DaughterLocations' : {key: val.format('ConeIsoInfo') for key, val in daughter_locations.items()}},
+            {'Type'             : 'RelInfoConeVariables',
+             'ConeAngle'        : 0.5,
+             'IgnoreUnmatchedDescriptors': True,
+             'Location'         : 'ConeVarsInfo05',
+             'DaughterLocations'   : {key: val.format('ConeVarsInfo') for key, val in daughter_locations.items()}},
+            {'Type'             : 'RelInfoTrackIsolationBDT',
+             'IgnoreUnmatchedDescriptors': True,
+             'DaughterLocations'   : {key: val.format('TrackIsoBDTInfo') for key, val in daughter_locations.items()}},
+            {'Type'             : 'RelInfoBs2MuMuTrackIsolations',
+             'IgnoreUnmatchedDescriptors': True,
+             'DaughterLocations'   : {key: val.format('TrackIsoBsMMInfo') for key, val in daughter_locations.items()},
+             'tracktype'        : 3,
+             'angle'            : 0.27,
+             'fc'               : 0.60,
+             'doca_iso'         : 0.13,
+             'ips'              : 3.0,
+             'svdis'            : -0.15,
+             'svdis_h'          : 30.,
+             'pvdis'            : 0.5,
+             'pvdis_h'          : 40.,
+             'makeTrackCuts'    : False,
+             'IsoTwoBody'       : False},
+ 
+    {'Type'              : 'RelInfoConeVariables',
+     'ConeAngle'         : 1.0,
+     'Location'          : 'ConeVarsInfo10'
+     },
+    {'Type'              : 'RelInfoConeVariables',
+    'ConeAngle'         : 1.5,
+     'Location'          : 'ConeVarsInfo15'
+    },
+    {'Type'              : 'RelInfoConeVariables',
+     'ConeAngle'         : 2.0,
+     'Location'          : 'ConeVarsInfo20'
+    },
+    {'Type'              : 'RelInfoConeIsolation',
+     'ConeSize'         : 1.0,
+     'Location'          : 'ConeIsoInfo10'
+    },
+    {'Type'              : 'RelInfoConeIsolation',
+     'ConeSize'         : 1.5,
+     'Location'          : 'ConeIsoInfo15'
+            },
+    {'Type'              : 'RelInfoConeIsolation',
+     'ConeSize'         : 2.0,
+     'Location'          : 'ConeIsoInfo20'
+    },
+        ]
+    },    
+}
+
+
+
+
+class B2XTauMuConf(LineBuilder) :
+    """
+    Class defining B->X tau mu stripping line
+    """
+
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+
+
+        name_kst = name+"_Kst"
+        name_phi = name+"_Phi"
+        name_k = name+"_K"
+        name_k_3pi = name+"_K_3pi"
+        name_phi_3pi = name+"_Phi_3pi"
+        name_k_3pi_loose = name+"_K_3pi_loose"
+
+        name_kst_WS = name+"_Kst_WS"
+        name_phi_WS = name+"_Phi_WS"
+        name_k_WS = name+"_K_WS"
+        name_k_3pi_WS = name+"_K_3pi_WS"
+        name_k_3pi_loose_WS = name+"_K_3pi_loose_WS"
+        name_phi_3pi_WS = name+"_Phi_3pi_WS"
+
+        ############### MUON SELECTIONS ###################
+        self.selmuon = Selection( "Mufor" + name,
+                                  Algorithm = self._muonFilter(),
+                                  RequiredSelections = [StdAllLooseMuons])
+                                  
+
+        ############### KAON AND PION SELECTIONS ################
+        
+        self.selKaon = Selection( "Kfor" + name,
+                                  Algorithm = self._kaonFilter(),
+                                  RequiredSelections = [StdLooseKaons])
+        
+
+        self.selPion = Selection( "Pifor" + name,
+                                  Algorithm = self._pionFilter(),
+                                  RequiredSelections = [StdLoosePions])
+                                  
+                                                             
+
+        ################ phi -> KK SELECTION ##########################
+        
+        self.selphi2kk = Selection( "Phi2KKfor" + name,
+                                    Algorithm = self._Phi2KKFilter(),
+                                    RequiredSelections = [self.selKaon] )
+
+
+        ################ Kst0 -> Kpi SELECTION ##########################
+        
+        self.selkst02kpi = Selection( "Kst02KPifor" + name,
+                                    Algorithm = self._Kst02KPiFilter(),
+                                    RequiredSelections = [self.selKaon, self.selPion] )
+
+
+        ################ Kst(1430)0 -> K+ Mu- (OS) SELECTION ##########################
+        
+        self.selkmuOS = Selection(name = "KMuOSFor"+name,
+                                  Algorithm          = self._KMuOSFilter(),
+                                  RequiredSelections = [self.selKaon,self.selmuon])
+
+
+        self.selkmuOS_K = Selection(name = "KMuOSFor_K"+name,
+                                    Algorithm = self._KMuFilter_K(),
+                                    RequiredSelections = [self.selkmuOS])
+        
+        ################ Delta++ -> K+ Mu+  (SS) SELECTION ##########################
+        
+        self.selkmuSS = Selection(name = "KMuSSFor"+name,
+                                  Algorithm          = self._KMuSSFilter(),
+                                  RequiredSelections = [self.selKaon,self.selmuon])
+
+
+        self.selkmuSS_K = Selection(name = "KMuSSFor_K"+name,
+                                    Algorithm = self._KMuFilter_K(),
+                                    RequiredSelections = [self.selkmuSS])
+
+
+
+
+        ################ Kst(1430)+ -> phi Mu  SELECTION ##########################
+        
+        self.selkstarmu = Selection(name = "Kst0MuFor"+name,
+                                    Algorithm          = self._Kst0MuFilter(),
+                                    RequiredSelections = [self.selkst02kpi,self.selmuon])
+
+
+        ################ K_2(1770)+ -> Kst0 Mu  SELECTION ##########################
+        
+        self.selphimu = Selection(name = "PhiMuFor"+name,
+                                    Algorithm          = self._PhiMuFilter(),
+                                    RequiredSelections = [self.selphi2kk,self.selmuon])
+
+
+
+        ################ B0 -> X Tau Mu  SELECTION ##########################
+
+        # _B_dec_descriptors = config['DECAYS']
+        # if config["MuTauWS"]: _B_dec_descriptors +=  config['DECAYS_WS']
+
+
+        self.selb2Kst0TauMu = self._B2XTauMu(name_kst,
+                                             DecayDescriptors = ["[B0 ->  K*(1410)+  mu-]cc"],
+                                             MuSel = self.selmuon,
+                                             XMuSel = [self.selkstarmu],
+                                             MuonP = config['MuonP_kst'],
+                                             MuonPT = config['MuonPT_kst'],
+                                             PIDmu = config['PIDmu'],
+                                             MuonIPCHI2 = config['MINIPCHI2'],
+                                             BVCHI2DOF = config['BVCHI2DOF_kst'],
+                                             BDIRA = config['BDIRA_kst'],
+                                             B_FDCHI2 = config["B_FDCHI2_kst"],
+                                             B_MIN_MASS = config['B_MIN_MASS'], 
+                                             B_MAX_MASS = config['B_MAX_MASS'])
+
+
+        self.selb2PhiTauMu = self._B2XTauMu(name_phi,
+                                            DecayDescriptors = ["[B0 ->  K_2(1770)+  mu-]cc"],
+                                            MuSel = self.selmuon,
+                                            XMuSel =  [self.selphimu],
+                                            MuonP = 0,
+                                            MuonPT = 0,
+                                            PIDmu = config['PIDmu'],
+                                            MuonIPCHI2 = config['MINIPCHI2'],
+                                            BVCHI2DOF = config['BVCHI2DOF_phi'],
+                                            BDIRA = 0,
+                                            B_FDCHI2 = 0,
+                                            B_MIN_MASS = config['B_MIN_MASS'], B_MAX_MASS = config['B_MAX_MASS'])
+
+
+        self.selb2KTauMu = self._B2XTauMu(name_k,
+                                          DecayDescriptors = ["[B+ ->  K*(1410)0  mu+]cc",     # K*(1410)0 -> K+ mu-
+                                                              "[B+ ->  Delta(1600)++  mu-]cc"], # Delta(1600)++ -> K+ mu+,
+                                          MuSel = self.selmuon,
+                                          XMuSel = [self.selkmuOS,
+                                                    self.selkmuSS],
+                                          # XMuSel = [self.selkmuOS_K,
+                                          #           self.selkmuSS_K],
+                                          MuonP = config['MuonP_K'],
+                                          MuonPT = config['MuonPT_K'],
+                                          PIDmu = config['PIDmu'],
+                                          MuonIPCHI2 = config['MINIPCHI2_K'],
+                                          BVCHI2DOF = config['BVCHI2DOF_K'],
+                                          BDIRA = config['BDIRA_K'],
+                                          B_FDCHI2 = config["B_FDCHI2_K"],
+                                          B_MIN_MASS = config['B_MIN_MASS'], B_MAX_MASS = config['B_MAX_MASS'])
+
+
+
+        ### B -> Phi Tau(3pi) Mu
+        self.selb2PhiTauMu_3pi = self._B2XTauMu_3pi_3Body(name_phi_3pi,
+                                                    DecayDescriptors = ["[B0 ->  phi(1020) tau+ mu-]cc",  
+                                                                        "[B0 ->  phi(1020) tau- mu+]cc"], 
+                                                    
+                                                    LeptonSel = [ StdTightDetachedTau3pi, self.selmuon ],
+                                                    XSel = [self.selphi2kk],
+                                                    TauPT = 0.,
+                                                    TauP = 0.,
+                                                    TauIPCHI2 = 0.,
+                                                    Comb12_MaxMass = config['B_MAX_MASS'],
+                                                    BVCHI2DOF = config['BVCHI2DOF_phi'],
+                                                    BPT = 0,
+                                                    BDIRA = 0,
+                                                    B_FDCHI2 = 0,
+                                                    B_MIN_MASS = config['B_MIN_MASS'], B_MAX_MASS = config['B_MAX_MASS'])
+
+
+
+        ### B -> K Tau(3pi) Mu
+        self.selb2KTauMu_3pi = self._B2XTauMu_3pi(name_k_3pi,
+                                                  DecayDescriptors = ["[B+ ->  K*(1410)0  tau+]cc",     # K*(1410)0 -> K+ mu-
+                                                                      "[B+ ->  Delta(1600)++  tau-]cc"], # Delta(1600)++ -> K+ mu+,
+                                                  LeptonSel = [ StdTightDetachedTau3pi ],
+                                                  # XSel = [self.selkmuOS,
+                                                  #         self.selkmuSS],
+                                                  XSel = [self.selkmuOS_K,
+                                                          self.selkmuSS_K],
+                                                     TauPT = config["MuonPT_K"],
+                                                     TauP = config["MuonP_K"],
+                                                     TauIPCHI2 = config["MINIPCHI2_K"],
+                                                  BVCHI2DOF = config['BVCHI2DOF_K_3pi'],
+                                                  BPT = config['B_PT_K'],
+                                                  BDIRA = config['BDIRA_K_3pi'],
+                                                  B_FDCHI2 = config["B_FDCHI2_K"],
+                                                  B_MIN_MASS = config['B_MIN_MASS_K_3pi'], 
+                                                  B_MAX_MASS = config['B_MAX_MASS_K_3pi'])
+
+
+
+
+        ### B -> K Tau(3pi) Mu Loose
+        self.selb2KTauMu_3pi_loose = self._B2XTauMu_3pi(name_k_3pi_loose,
+                                                  DecayDescriptors = ["[B+ ->  K*(1410)0  tau+]cc",     # K*(1410)0 -> K+ mu-
+                                                                      "[B+ ->  Delta(1600)++  tau-]cc"], # Delta(1600)++ -> K+ mu+,
+                                                  LeptonSel = [ StdTightDetachedTau3pi ],
+                                                  XSel = [self.selkmuOS,
+                                                          self.selkmuSS],
+                                                  # XSel = [self.selkmuOS_K,
+                                                  #         self.selkmuSS_K],
+                                                     TauPT = config["MuonPT_K"],
+                                                     TauP = config["MuonP_K"],
+                                                     TauIPCHI2 = config["MINIPCHI2_K"],
+                                                  BVCHI2DOF = config['BVCHI2DOF_K'],
+                                                  BPT = config['B_PT_K'],
+                                                  BDIRA = config['BDIRA_K'],
+                                                  B_FDCHI2 = config["B_FDCHI2_K"],
+                                                  B_MIN_MASS = config['B_MIN_MASS'], 
+                                                  B_MAX_MASS = config['B_MAX_MASS'])
+
+
+
+        ################ B0 -> X Tau Mu WS  SELECTION ##########################
+
+
+
+        self.selb2Kst0TauMu_WS = self._B2XTauMu(name_kst_WS,
+                                                DecayDescriptors = ["[B0 ->  K*(1410)+  mu+]cc"],
+                                                MuSel = self.selmuon,
+                                                XMuSel = [self.selkstarmu],
+                                                MuonP = config['MuonP_kst'],
+                                                MuonPT = config['MuonPT_kst'],
+                                                PIDmu = config['PIDmu'],
+                                                MuonIPCHI2 = config['MINIPCHI2'],
+                                                BVCHI2DOF = config['BVCHI2DOF_kst'],
+                                                BDIRA = config['BDIRA_kst'],
+                                                B_FDCHI2 = config["B_FDCHI2_kst"],
+                                                B_MIN_MASS = config['B_MIN_MASS'], B_MAX_MASS = config['B_MAX_MASS'])
+
+
+        self.selb2PhiTauMu_WS = self._B2XTauMu(name_phi_WS,
+                                               DecayDescriptors = ["[B0 ->  K_2(1770)+  mu+]cc"],
+                                               MuSel = self.selmuon,
+                                               XMuSel =  [self.selphimu],
+                                               MuonP = 0,
+                                               MuonPT = 0,
+                                               PIDmu = config['PIDmu'],
+                                               MuonIPCHI2 = config['MINIPCHI2'],
+                                               BVCHI2DOF = config['BVCHI2DOF_phi'],
+                                               BDIRA = 0,
+                                               B_FDCHI2 = 0,
+                                               B_MIN_MASS = config['B_MIN_MASS'], B_MAX_MASS = config['B_MAX_MASS'])
+
+
+        self.selb2KTauMu_WS = self._B2XTauMu(name_k_WS,
+                                             DecayDescriptors = ["[B+ ->  K*(1410)0  mu-]cc",     # K*(1410)0 -> K+ mu-
+                                                                 "[B+ ->  Delta(1600)++  mu+]cc"], # Delta(1600)++ -> K+ mu+
+                                             MuSel = self.selmuon,
+                                             XMuSel = [self.selkmuOS,
+                                                       self.selkmuSS],
+                                             # XMuSel = [self.selkmuOS_K,
+                                             #           self.selkmuSS_K],
+                                             MuonP = config['MuonP_K'],
+                                             MuonPT = config['MuonPT_K'],
+                                             PIDmu = config['PIDmu'],
+                                             MuonIPCHI2 = config['MINIPCHI2_K'],
+                                             BVCHI2DOF = config['BVCHI2DOF_K'],
+                                             BDIRA = config['BDIRA_K'],
+                                             B_FDCHI2 = config["B_FDCHI2_K"],
+                                            B_MIN_MASS = config['B_MIN_MASS'], B_MAX_MASS = config['B_MAX_MASS'])
+
+
+        ### B -> Phi Tau(3pi) Mu
+        self.selb2PhiTauMu_3pi_WS = self._B2XTauMu_3pi_3Body(name_phi_3pi_WS,
+                                                       DecayDescriptors = ["[B0 ->  phi(1020)  tau+ mu+]cc"], 
+                                                       LeptonSel = [StdTightDetachedTau3pi, self.selmuon],
+                                                       XSel = [self.selphi2kk],
+                                                       TauPT = 0,
+                                                       TauP = 0,
+                                                       TauIPCHI2 = 0,
+                                                       Comb12_MaxMass = config['B_MAX_MASS'],
+                                                       BVCHI2DOF = config['BVCHI2DOF_phi'],
+                                                       BPT = 0,
+                                                       BDIRA = 0,
+                                                       B_FDCHI2 = 0,
+                                                       B_MIN_MASS = config['B_MIN_MASS'], B_MAX_MASS = config['B_MAX_MASS'])
+
+
+        ### B -> K Tau(3pi) Mu
+        self.selb2KTauMu_3pi_WS = self._B2XTauMu_3pi(name_k_3pi_WS,
+                                                     DecayDescriptors = ["[B+ ->  K*(1410)0  tau-]cc",     # K*(1410)0 -> K+ mu-
+                                                                         "[B+ ->  Delta(1600)++  tau+]cc"], # Delta(1600)++ -> K+ mu+
+                                                    
+                                                     LeptonSel = [StdTightDetachedTau3pi],
+                                                     # XSel = [self.selkmuOS,
+                                                     #           self.selkmuSS],
+                                                     XSel = [self.selkmuOS_K,
+                                                               self.selkmuSS_K],
+                                                     TauPT = config["MuonPT_K"],
+                                                     TauP = config["MuonP_K"],
+                                                     TauIPCHI2 = config["MINIPCHI2_K"],
+                                                     BVCHI2DOF = config['BVCHI2DOF_K_3pi'],
+                                                     BPT = config['B_PT_K'],
+                                                     BDIRA = config["BDIRA_K_3pi"],
+                                                     B_FDCHI2 = config["B_FDCHI2_K"],
+                                                     B_MIN_MASS = config['B_MIN_MASS_K_3pi'], B_MAX_MASS = config['B_MAX_MASS_K_3pi'])
+
+
+        ### B -> K Tau(3pi) Mu Loose
+        self.selb2KTauMu_3pi_loose_WS = self._B2XTauMu_3pi(name_k_3pi_loose_WS,
+                                                     DecayDescriptors = ["[B+ ->  K*(1410)0  tau-]cc",     # K*(1410)0 -> K+ mu-
+                                                                         "[B+ ->  Delta(1600)++  tau+]cc"], # Delta(1600)++ -> K+ mu+
+                                                    
+                                                     LeptonSel = [StdTightDetachedTau3pi],
+                                                     XSel = [self.selkmuOS,
+                                                               self.selkmuSS],
+                                                     # XSel = [self.selkmuOS_K,
+                                                     #           self.selkmuSS_K],
+                                                     TauPT = config["MuonPT_K"],
+                                                     TauP = config["MuonP_K"],
+                                                     TauIPCHI2 = config["MINIPCHI2_K"],
+                                                     BVCHI2DOF = config['BVCHI2DOF_K'],
+                                                     BPT = config['B_PT_K'],
+                                                     BDIRA = config["BDIRA_K"],
+                                                     B_FDCHI2 = config["B_FDCHI2_K"],
+                                                     B_MIN_MASS = config['B_MIN_MASS'], B_MAX_MASS = config['B_MAX_MASS'])
+
+        
+        ################# DECLARE THE STRIPPING LINES #################################
+        
+        self.B2KstTauMu = StrippingLine(name_kst+ 'Line', 
+                                        prescale = config["Prescale"], 
+                                        selection = self.selb2Kst0TauMu,
+                                        #RequiredRawEvents = ["Rich","Velo","Tracker","Trigger","Muon","Calo"],
+                                        RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False)
+
+        self.B2PhiTauMu = StrippingLine(name_phi+ 'Line', 
+                                        prescale = config["Prescale"], 
+                                        selection = self.selb2PhiTauMu,
+                                        RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False)
+
+        self.B2KTauMu = StrippingLine(name_k+ 'Line', 
+                                        prescale = config["Prescale"], 
+                                        selection = self.selb2KTauMu,
+                                        RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False)
+
+        self.B2PhiTauMu_3pi = StrippingLine(name_phi_3pi+ 'Line', 
+                                            prescale = config["Prescale"], 
+                                            selection = self.selb2PhiTauMu_3pi,
+                                        RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False)
+
+        self.B2KTauMu_3pi = StrippingLine(name_k_3pi+ 'Line', 
+                                            prescale = config["Prescale"], 
+                                            selection = self.selb2KTauMu_3pi,
+                                          #RequiredRawEvents = ["Rich","Velo","Tracker","Trigger","Muon","Calo"],
+                                        RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False)
+
+
+        self.B2KTauMu_3pi_loose = StrippingLine(name_k_3pi_loose+ 'Line', 
+                                            prescale = config["Prescale"], 
+                                            selection = self.selb2KTauMu_3pi_loose,
+                                          #RequiredRawEvents = ["Rich","Velo","Tracker","Trigger","Muon","Calo"],
+                                        RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False)
+
+
+
+        self.B2KstTauMu_WS = StrippingLine(name_kst_WS+ 'Line', 
+                                        prescale = config["Prescale_WS"], 
+                                        selection = self.selb2Kst0TauMu_WS,
+                                           #RequiredRawEvents = ["Rich","Velo","Tracker","Trigger","Muon","Calo"],
+                                        RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False)
+
+        self.B2PhiTauMu_WS = StrippingLine(name_phi_WS+ 'Line', 
+                                        prescale = config["Prescale_WS"], 
+                                        selection = self.selb2PhiTauMu_WS,
+                                        RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False)
+
+        self.B2KTauMu_WS = StrippingLine(name_k_WS+ 'Line', 
+                                        prescale = config["Prescale_WS"], 
+                                        selection = self.selb2KTauMu_WS,
+                                        RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False)
+
+        self.B2PhiTauMu_3pi_WS = StrippingLine(name_phi_3pi_WS+ 'Line', 
+                                               prescale = config["Prescale_WS"], 
+                                               selection = self.selb2PhiTauMu_3pi_WS,
+                                        RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False)
+
+        self.B2KTauMu_3pi_WS = StrippingLine(name_k_3pi_WS+ 'Line', 
+                                               prescale = config["Prescale_WS"], 
+                                               selection = self.selb2KTauMu_3pi_WS,
+                                             #RequiredRawEvents = ["Rich","Velo","Tracker","Trigger","Muon","Calo"],
+                                             RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False) 
+
+
+        self.B2KTauMu_3pi_loose_WS = StrippingLine(name_k_3pi_loose_WS+ 'Line', 
+                                               prescale = config["Prescale_WS"], 
+                                               selection = self.selb2KTauMu_3pi_loose_WS,
+                                             #RequiredRawEvents = ["Rich","Velo","Tracker","Trigger","Muon","Calo"],
+                                             RelatedInfoTools = config["RelatedInfoTools"],
+                                        MDSTFlag = False) 
+
+
+        self.registerLine(self.B2KstTauMu)        
+        self.registerLine(self.B2PhiTauMu)        
+        self.registerLine(self.B2KTauMu)        
+        self.registerLine(self.B2KTauMu_3pi)        
+        self.registerLine(self.B2KTauMu_3pi_loose)        
+        self.registerLine(self.B2PhiTauMu_3pi)        
+
+        if config["MuTauWS"]: 
+            self.registerLine(self.B2KstTauMu_WS)        
+            self.registerLine(self.B2PhiTauMu_WS)        
+            self.registerLine(self.B2KTauMu_WS)        
+            self.registerLine(self.B2PhiTauMu_3pi_WS)        
+            self.registerLine(self.B2KTauMu_3pi_WS)        
+            self.registerLine(self.B2KTauMu_3pi_loose_WS)        
+
+
+
+
+    def _muonFilter( self ):
+
+        _code = "(TRCHI2DOF< %(TrackCHI2)s)" % self.__confdict__
+        _code += " & (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)" % self.__confdict__
+        _code += " & (TRGHOSTPROB < %(TrackGhostProb)s)" % self.__confdict__ 
+        _code += " & (PIDmu > %(PIDmu)s)" % self.__confdict__ 
+        
+        _mu = FilterDesktop( Code = _code )
+        return _mu 
+        
+
+    def _pionFilter( self ):
+        
+        _code = "(TRCHI2DOF< %(TrackCHI2)s)" % self.__confdict__
+        _code += " & (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)" % self.__confdict__
+        _code += " & (TRGHOSTPROB < %(TrackGhostProb)s)" % self.__confdict__ 
+        _code += " & (PIDK < %(PionPIDK)s)" % self.__confdict__ 
+
+        _pi = FilterDesktop( Code = _code )
+        return _pi
+        
+
+    def _kaonFilter( self ):
+        
+        _code = "(TRCHI2DOF< %(TrackCHI2)s)" % self.__confdict__
+        _code += " & (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)" % self.__confdict__
+        _code += " & (TRGHOSTPROB < %(TrackGhostProb)s)" % self.__confdict__ 
+        _code += " & (PIDK > %(KaonPIDK)s)" % self.__confdict__ 
+
+        _ka = FilterDesktop( Code = _code )
+        return _ka     
+
+
+    def _KMuFilter_K( self ):
+        
+        _code = "(MINTREE(ABSID=='K+',P)> %(KaonP_K_3pi)s *GeV) & "\
+                "(MINTREE(ABSID=='K+',PT)> %(KPiPT_K)s *MeV) & "\
+                "(MINTREE(ABSID=='K+',PIDK)> %(KaonPIDK_K_3pi)s ) & "\
+                "(MINTREE(ABSID=='K+',MIPCHI2DV(PRIMARY)) > %(MINIPCHI2_K)s )" % self.__confdict__
+
+        _code += " & (MINTREE(ABSID=='mu+',MIPCHI2DV(PRIMARY)) > %(MINIPCHI2_K)s )" % self.__confdict__
+
+        _kmu = FilterDesktop( Code = _code )
+        return _kmu     
+
+
+   
+    def _Phi2KKFilter( self ):
+
+        _decayDescriptors = [ 'phi(1020) -> K+ K-' ]
+
+        _combinationCut = "(ADAMASS('phi(1020)') < %(PhiAMassWin)s *MeV)" % self.__confdict__
+
+        _motherCut = "(ADMASS('phi(1020)') < %(PhiMassWin)s *MeV)"\
+                     " & (VFASPF(VCHI2/VDOF) < %(PhiVCHI2DOF)s)" % self.__confdict__
+
+
+        _phi2kpi = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                      CombinationCut = _combinationCut,
+                                      MotherCut = _motherCut)                            
+        return _phi2kpi
+
+
+    def _Kst02KPiFilter( self ):
+
+        _decayDescriptors = [ '[K*(892)0 -> K+ pi-]cc' ]
+
+        _daughtersCuts = {  "K+"  : "(P > %(KaonP_kst)s *GeV) & (PT > %(KPiPT_kst)s *MeV)" % self.__confdict__
+                           ,"pi-" : "(P > %(PionP_kst)s *GeV) & (PT > %(KPiPT_kst)s *MeV)" % self.__confdict__ }
+
+        _combinationCut = "(ADAMASS('K*(892)0') < %(KstAMassWin)s *MeV)" % self.__confdict__
+
+        _motherCut = "(ADMASS('K*(892)0') < %(KstMassWin)s *MeV)"\
+                     " & (VFASPF(VCHI2/VDOF) < %(KstVCHI2DOF)s)" % self.__confdict__
+
+
+        _kst02kpi = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                      DaughtersCuts = _daughtersCuts,
+                                      CombinationCut = _combinationCut,
+                                      MotherCut = _motherCut)                            
+        return _kst02kpi
+
+
+
+    def _PhiMuFilter( self ):
+
+        _decayDescriptors = ["[K_2(1770)+ -> phi(1020) mu+]cc"]
+
+        _motherCut = "(VFASPF(VCHI2/VDOF)  < %(XMuVCHI2DOF_phi)s) " % self.__confdict__
+
+
+        _phiMu = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                    MotherCut = _motherCut)                            
+        return _phiMu
+
+
+    def _Kst0MuFilter( self ):
+
+        _decayDescriptors = ["[K*(1410)+ -> K*(892)0 mu+]cc","[K*(1410)- -> K*(892)0 mu-]cc"]
+
+        _daughtersCuts = {  "mu+"  : "(P > %(MuonP_kst)s *GeV) & (PT > %(MuonPT_kst)s *MeV)" % self.__confdict__
+                            ,"mu-"  : "(P > %(MuonP_kst)s *GeV) & (PT > %(MuonPT_kst)s *MeV)" % self.__confdict__ }
+
+
+        _motherCut = "(VFASPF(VCHI2/VDOF)  < %(XMuVCHI2DOF_kst)s) " % self.__confdict__
+
+
+        _kst0Mu = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                    DaughtersCuts = _daughtersCuts,
+                                    MotherCut = _motherCut)                            
+        return _kst0Mu
+
+
+    def _KMuOSFilter( self ):
+        _decayDescriptors = ["[K*(1410)0 -> K+ mu-]cc"]
+
+        _daughtersCuts = {  "K+"  : "(P > %(KaonP_K)s *GeV) & (PIDK> %(KaonPIDK_K)s) & (PT > %(KPiPT_K)s *MeV) & (MIPCHI2DV(PRIMARY) > %(MINIPCHI2_K)s )" % self.__confdict__
+                            ,"mu+" : " (MIPCHI2DV(PRIMARY) > %(MINIPCHI2_K)s )" % self.__confdict__ }
+
+        _combinationCut = "((ACHILD(PT,1)+ACHILD(PT,2)) > %(KMuSumPT_K)s)" % self.__confdict__ 
+
+        _motherCut = "(VFASPF(VCHI2/VDOF)  < %(XMuVCHI2DOF_K)s) "\
+                     "& (PT >%(KMuPT_K)s)"% self.__confdict__
+
+
+        _kMu = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                 DaughtersCuts = _daughtersCuts,
+                                 CombinationCut = _combinationCut,
+                                 MotherCut = _motherCut)                            
+        return _kMu
+
+
+    def _KMuSSFilter( self ):
+
+        _decayDescriptors = ["[Delta(1600)++ -> K+ mu+]cc"]
+
+        _daughtersCuts = {  "K+"  : "(P > %(KaonP_K)s *GeV) & (PIDK> %(KaonPIDK_K)s) & (PT > %(KPiPT_K)s *MeV) & (MIPCHI2DV(PRIMARY) > %(MINIPCHI2_K)s )" % self.__confdict__
+                            ,"mu+" : " (MIPCHI2DV(PRIMARY) > %(MINIPCHI2_K)s )" % self.__confdict__}
+
+        _combinationCut = "((ACHILD(PT,1)+ACHILD(PT,2)) > %(KMuSumPT_K)s)" % self.__confdict__ 
+
+        _motherCut = "(VFASPF(VCHI2/VDOF)  < %(XMuVCHI2DOF_K)s) "\
+                     "& (PT > %(KMuPT_K)s)"% self.__confdict__
+
+
+        _kMu = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                 DaughtersCuts = _daughtersCuts,
+                                 CombinationCut = _combinationCut,
+                                 MotherCut = _motherCut)                            
+        return _kMu
+
+
+    def _B2XTauMu(self,
+                  name,
+                  DecayDescriptors,
+                  MuSel,
+                  XMuSel,
+                  MuonP,
+                  MuonPT,
+                  PIDmu,
+                  MuonIPCHI2,
+                  BVCHI2DOF,
+                  BDIRA,
+                  B_FDCHI2,
+                  B_MIN_MASS,
+                  B_MAX_MASS):
+
+
+        _daughtersCuts = {  "mu+"  : "(P > %(MuonP)s *GeV) & (PT > %(MuonPT)s *MeV) & (PIDmu > %(PIDmu)s) & (MIPCHI2DV(PRIMARY) > %(MuonIPCHI2)s )" % locals()
+                            ,"mu-"  : "(P > %(MuonP)s *GeV) & (PT > %(MuonPT)s *MeV) & (PIDmu > %(PIDmu)s) & (MIPCHI2DV(PRIMARY) > %(MuonIPCHI2)s )" % locals() }
+
+        _combinationCut = "(AM<( %(B_MAX_MASS)s + 200) *MeV)"  % locals()
+        _motherCut = "  (MM < %(B_MAX_MASS)s *MeV)"\
+                     " & (MM> %(B_MIN_MASS)s *MeV)"\
+                     " & (VFASPF(VCHI2/VDOF) < %(BVCHI2DOF)s)"\
+                     " & (BPVDIRA > %(BDIRA)s)"\
+                     " & (BPVVDCHI2 > %(B_FDCHI2)s)"  % locals()
+        
+
+        _B = CombineParticles(DecayDescriptors = DecayDescriptors,
+                              DaughtersCuts = _daughtersCuts,
+                              CombinationCut = _combinationCut,
+                              MotherCut = _motherCut)
+                          
+        _sel_Daughters = MergedSelection(name+"_daughters",
+                                         RequiredSelections = XMuSel )
+        
+        sel = Selection( name,
+                         Algorithm = _B,
+                         RequiredSelections = [ MuSel, _sel_Daughters ])
+        return sel
+
+
+
+
+
+    def _B2XTauMu_3pi(self,
+                      name,
+                      DecayDescriptors,
+                      LeptonSel,
+                      XSel,
+                      TauPT,
+                      TauP,
+                      TauIPCHI2,
+                      BVCHI2DOF,
+                      BPT,
+                      BDIRA,
+                      B_FDCHI2,
+                      B_MIN_MASS,
+                      B_MAX_MASS):
+
+        _daughtersCuts = {  "tau+"  : "(P > %(TauP)s *GeV) & (PT > %(TauPT)s *MeV) & (MIPCHI2DV(PRIMARY) > %(TauIPCHI2)s )" % locals() }
+                          
+        _combinationCut = "(AM< ( %(B_MAX_MASS)s + 200) *MeV)" % locals()
+        _motherCut = "  (MM < %(B_MAX_MASS)s *MeV)"\
+                     " & (MM> %(B_MIN_MASS)s *MeV)"\
+                     " & (VFASPF(VCHI2/VDOF) < %(BVCHI2DOF)s)"\
+                     " & (PT> %(BPT)s)"\
+                     " & (BPVDIRA > %(BDIRA)s)"\
+                     " & (BPVVDCHI2 > %(B_FDCHI2)s)" % locals()
+
+
+            
+        _B = CombineParticles(DecayDescriptors = DecayDescriptors,
+                              DaughtersCuts = _daughtersCuts,
+                              CombinationCut = _combinationCut,
+                              MotherCut = _motherCut)
+                          
+        _sel_Daughters = MergedSelection(name+"_daughters",
+                                         RequiredSelections = XSel )
+
+        _req_selections = LeptonSel
+        _req_selections.append(_sel_Daughters)
+        
+        sel = Selection( name,
+                         Algorithm = _B,
+                         RequiredSelections = _req_selections)
+        return sel
+
+
+
+    def _B2XTauMu_3pi_3Body(self,
+                      name,
+                      DecayDescriptors,
+                      LeptonSel,
+                      XSel,
+                      TauPT,
+                      TauP,
+                      TauIPCHI2,
+                      Comb12_MaxMass,
+                      BVCHI2DOF,
+                      BPT,
+                      BDIRA,
+                      B_FDCHI2,
+                      B_MIN_MASS,
+                      B_MAX_MASS):
+
+        _daughtersCuts = {  "tau+"  : "(P > %(TauP)s *GeV) & (PT > %(TauPT)s *MeV) & (MIPCHI2DV(PRIMARY) > %(TauIPCHI2)s )" % locals() }
+                          
+        _combinationCut = "(AM< ( %(B_MAX_MASS)s + 200) *MeV)" % locals()
+        _motherCut = "  (MM < %(B_MAX_MASS)s *MeV)"\
+                     " & (MM> %(B_MIN_MASS)s *MeV)"\
+                     " & (VFASPF(VCHI2/VDOF) < %(BVCHI2DOF)s)"\
+                     " & (PT> %(BPT)s)"\
+                     " & (BPVDIRA > %(BDIRA)s)"\
+                     " & (BPVVDCHI2 > %(B_FDCHI2)s)" % locals()
+
+        _Comb12Cuts = "(AM < %(Comb12_MaxMass)s *MeV)" % locals()
+
+        _B = Combine3Particles(DecayDescriptors = DecayDescriptors, 
+                               DaughtersCuts = _daughtersCuts,
+                               Combination12Cut = _Comb12Cuts,
+                               CombinationCut = _combinationCut,
+                               MotherCut = _motherCut)
+            
+
+        _req_selections = LeptonSel
+        _req_selections += XSel
+        
+        sel = Selection( name,
+                         Algorithm = _B,
+                         RequiredSelections = _req_selections)
+        return sel
+
+
+
+
+
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauTau.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauTau.py
new file mode 100644
index 000000000..77cc059fe
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauTau.py
@@ -0,0 +1,385 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = [' L. Pescatore', 'F. Blanc']
+__date__ = '12/03/2019'
+__version__ = '$Revision: 0.1$'
+
+# Stripping line for B->Htautau
+
+from GaudiKernel.SystemOfUnits import MeV
+from GaudiKernel.SystemOfUnits import mm
+"""
+  B->KstarTauTau, B->KTauTau, B->PhiTauTau, B->Eta'TauTau
+"""
+__all__ = ('B2XTauTauConf', 'getRelInfoB2XTauTau', 'default_config')
+
+default_config = {
+    'NAME': 'B2XTauTau',
+    'BUILDERTYPE': 'B2XTauTauConf',
+    'WGs': ['RD'],
+    'CONFIG': {
+        'SpdMult': '600',
+        #
+        'UsePID': True,
+        #
+        'Photon_Res_PT_Min': 400.0 * MeV,
+        'Photon_CL_Min': 0.2,
+        #
+        'FD_B_Max': 100,
+        'PT_B': 2000 * MeV,
+        'P_B': 10000 * MeV,
+        'FDCHI2_B': 16,
+        'FDCHI2_BK': 16,
+        'MASS_LOW_B': 2000 * MeV,
+        'MASS_LOW_BK': 3000 * MeV,
+        'MASS_HIGH_B': 6000 * MeV,
+        #
+        'VCHI2_Eta': 9,
+        'VCHI2_Rho': 9,
+        'VCHI2_K1': 9,
+        'PT_Rho': 800 * MeV,
+        'PT_K1': 800 * MeV,
+        'PT_K': 800 * MeV,
+        'PT_Etap': 800 * MeV,
+        'P_K': 3000 * MeV,
+        'IPCHI2_Tr': 16,
+        'TRACKCHI2_Tr': 6,
+        'TRGHOPROB_Tr': 0.5,
+        'MASS_LOW_Rho': 280 * MeV,
+        'MASS_HIGH_Rho': 1100 * MeV,
+        'MASS_LOW_K1': 400 * MeV,
+        'MASS_HIGH_K1': 1700 * MeV,
+        'MASS_LOW_Etap': 800 * MeV,
+        'MASS_HIGH_Etap': 1100 * MeV,
+        'MASS_HIGH_Tau': 1800 * MeV,
+        #
+        'B2HTauTau_LinePrescale': 1,
+        'B2HTauTau_LinePostscale': 1,
+    },
+    'STREAMS': ['Bhadron']
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, OfflineVertexFitter, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand, SimpleSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdNoPIDsPions, StdLoosePions
+from StandardParticles import StdLooseKaons, StdNoPIDsKaons
+from StandardParticles import StdLooseAllPhotons
+
+
+class B2XTauTauConf(LineBuilder):
+    """
+      Builder for B->KstarTauTau, B->KTauTau, B->PhiTauTau, B->Eta'TauTau
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+
+        trackCuts = "(MIPCHI2DV(PRIMARY) > %(IPCHI2_Tr)s) & (TRCHI2DOF < %(TRACKCHI2_Tr)s) & (TRGHOSTPROB < %(TRGHOPROB_Tr)s)" % config
+        KCuts = trackCuts + " & (PT > %(PT_K)s) & (P > %(P_K)s)" % config
+        if config['UsePID']: KCuts += " & (PROBNNk>0.2)"
+
+        TauCuts = "(M < %(MASS_HIGH_Tau)s)" % config
+
+        self.FilterSPD = {
+            'Code':
+            " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )"
+            % config,
+            'Preambulo': [
+                "from LoKiNumbers.decorators import *",
+                "from LoKiCore.basic import LHCb"
+            ]
+        }
+
+        self.rawTau = DataOnDemand("Phys/StdTightDetachedTau3pi/Particles")
+        self.selTau = SimpleSelection(
+            "Tau" + name, FilterDesktop, [self.rawTau], Code=TauCuts)
+
+        self.selKaon = SimpleSelection(
+            "Kaon" + name, FilterDesktop, [StdLooseKaons], Code=KCuts)
+        self.selTracks = SimpleSelection(
+            "Tracks" + name, FilterDesktop, [StdNoPIDsPions], Code=trackCuts)
+
+        self.selRho = self._makeRho("Rho" + name, trackCuts, config)
+        self.selK1 = self._makeK1("K1" + name, self.selTracks, config)
+        self.selEtap = self._makeEtap("Etap" + name, trackCuts, config)
+        #      self.selKstar      = self._makeKstar("Kstar"+name, trackCuts, config)
+        #      self.selPhi        = self._makePhi( "Phi"+name, trackCuts, config )
+
+        self.selB2RhoTauTau = self._makeBd2HTauTau(name + "_Rho", self.selTau,
+                                                   self.selRho, config)
+        self.selB2KTauTau = self._makeBu2KTauTau(name + "_K", self.selTau,
+                                                 self.selKaon, config)
+        self.selB2K1TauTau = self._makeBu2K1TauTau(name + "_K1", self.selTau,
+                                                   self.selK1, config)
+        self.selB2EtapTauTau = self._makeBd2HTauTau(
+            name + "_Etap", self.selTau, self.selEtap, config)
+        #      self.selB2KstTauTau    = self._makeBd2HTauTau( name+"_Kstar", self.selTau, self.selKstar, config )
+        #      self.selB2PhiTauTau    = self._makeBd2HTauTau( name+"_Phi", self.selTau, self.selPhi, config )
+        self.selB2RhoTauTauSS = self._makeBd2HTauTau(
+            name + "_Rho", self.selTau, self.selRho, config, SS=True)
+        self.selB2KTauTauSS = self._makeBu2KTauTau(
+            name + "_K", self.selTau, self.selKaon, config, SS=True)
+        self.selB2K1TauTauSS = self._makeBu2K1TauTau(
+            name + "_K1", self.selTau, self.selK1, config, SS=True)
+        self.selB2EtapTauTauSS = self._makeBd2HTauTau(
+            name + "_Etap", self.selTau, self.selEtap, config, SS=True)
+        #      self.selB2KstTauTauSS  = self._makeBd2HTauTau( name+"_Kstar", self.selTau, self.selKstar, config, SS = True )
+        #      self.selB2PhiTauTauSS  = self._makeBd2HTauTau( name+"_Phi", self.selTau, self.selPhi, config, SS = True )
+
+        ## Finished making selections build and register lines
+
+        self.RhoTauTau_Line = self._makeLine("B2RhoTauTauLine",
+                                             self.selB2RhoTauTau, config)
+        self.KTauTau_Line = self._makeLine("B2KTauTauLine", self.selB2KTauTau,
+                                           config)
+        self.K1TauTau_Line = self._makeLine("B2K1TauTauLine",
+                                            self.selB2K1TauTau, config)
+        self.EtapTauTau_Line = self._makeLine("B2EtapTauTauLine",
+                                              self.selB2EtapTauTau, config)
+        #      self.KstarTauTau_Line   = self._makeLine("B2KstarTauTauLine", self.selB2KstTauTau, config)
+        #      self.PhiTauTau_Line     = self._makeLine("B2PhiTauTauLine", self.selB2PhiTauTau, config)
+        self.RhoTauTauSS_Line = self._makeLine("B2RhoTauTauSSLine",
+                                               self.selB2RhoTauTauSS, config)
+        self.KTauTauSS_Line = self._makeLine("B2KTauTauSSLine",
+                                             self.selB2KTauTauSS, config)
+        self.K1TauTauSS_Line = self._makeLine("B2K1TauTauSSLine",
+                                              self.selB2K1TauTauSS, config)
+        self.EtapTauTauSS_Line = self._makeLine("B2EtapTauTauSSLine",
+                                                self.selB2EtapTauTauSS, config)
+#      self.KstarTauTauSS_Line = self._makeLine("B2KstarTauTauSSLine", self.selB2KstTauTauSS, config)
+#      self.PhiTauTauSS_Line   = self._makeLine("B2PhiTauTauSSLine", self.selB2PhiTauTauSS, config)
+
+#### Make resonances ###################################################
+
+    def _makeRho(self, name, trackSel, config):
+
+        combcut = "in_range ( %(MASS_LOW_Rho)s, AM, %(MASS_HIGH_Rho)s )" % config
+        mothercut = " (PT > %(PT_Rho)s) & (VFASPF(VCHI2) < %(VCHI2_Rho)s)" % config
+
+        daucut = {'pi+': trackSel, 'pi-': trackSel}
+
+        return SimpleSelection(
+            name + "_Rho",
+            CombineParticles, [StdNoPIDsPions],
+            DecayDescriptors=["rho(770)0 -> pi+ pi-"],
+            CombinationCut=combcut,
+            MotherCut=mothercut,
+            DaughtersCuts=daucut)
+
+    def _makeK1(self, name, tracks, config):
+
+        combcut = "in_range ( %(MASS_LOW_K1)s, AM, %(MASS_HIGH_K1)s )" % config
+        mothercut = " (PT > %(PT_K1)s) & (VFASPF(VCHI2) < %(VCHI2_K1)s)" % config
+
+        Combine = DaVinci__N3BodyDecays(
+            DecayDescriptors=["[K_1(1270)+ -> pi+ pi- pi+]cc"],
+            Combination12Cut="AM < 1700",
+            CombinationCut=combcut,
+            MotherCut=mothercut)
+
+        return Selection(
+            name + "_K1", Algorithm=Combine, RequiredSelections=[tracks])
+
+    def _makeEtap(self, name, trackSel, config):
+
+        combcut = "(APT > %(PT_Etap)s) & (in_range ( %(MASS_LOW_Etap)s, AM, %(MASS_HIGH_Etap)s))" % config
+        mothercut = "(VFASPF(VCHI2/VDOF) < %(VCHI2_Eta)s)" % config
+        gammacut = "(PT > %(Photon_Res_PT_Min)s) & (CL > %(Photon_CL_Min)s)" % config
+
+        Picuts = trackSel
+        if config['UsePID']:
+            Picuts += ' & (PROBNNpi>0.2)'
+        daucut = {'pi+': Picuts, 'pi-': Picuts, 'gamma': gammacut}
+
+        return SimpleSelection(
+            name + "_Etap",
+            CombineParticles, [StdLoosePions, StdLooseAllPhotons],
+            DecayDescriptors=["eta_prime -> pi+ pi- gamma"],
+            CombinationCut=combcut,
+            MotherCut=mothercut,
+            DaughtersCuts=daucut)
+
+    def _makeKstar(self, name, trackSel, config):
+
+        combcut = "in_range ( %(MASS_LOW_Kst)s, AM, %(MASS_HIGH_Kst)s )" % config
+        mothercut = " (PT > %(PT_Kst)s) & (VFASPF(VCHI2) < %(VCHI2_Kst)s) & (BPVVD > %(FD_Kst_Mu_KMM)s) " % config
+
+        Kcuts = trackSel
+        Picuts = trackSel
+        if config['UsePID']:
+            Kcuts += ' & (PROBNNk>0.2)'
+            Picuts += ' & (PROBNNpi>0.2)'
+
+        daucut = {'K+': Kcuts, 'pi-': Picuts}
+
+        return SimpleSelection(
+            name + "_Kstar",
+            CombineParticles, [StdLoosePions, StdNoPIDsKaons],
+            DecayDescriptors=["[K*(892)0 -> K+ pi-]cc"],
+            CombinationCut=combcut,
+            MotherCut=mothercut,
+            DaughtersCuts=daucut)
+
+    def _makePhi(self, name, trackSel, config):
+
+        combcut = "in_range ( %(MASS_LOW_Phi)s, AM, %(MASS_HIGH_Phi)s )" % config
+        mothercut = " (PT > %(PT_Phi)s) & (VFASPF(VCHI2) < %(VCHI2_Phi)s)  " % config
+
+        Kcuts = trackSel
+        if config['UsePID']: Kcuts += ' & (PROBNNk>0.2)'
+
+        daucut = {'K+': Kcuts, 'K-': Kcuts}
+
+        return SimpleSelection(
+            name,
+            CombineParticles, [StdLooseKaons],
+            DecayDescriptors=["phi(1020) -> K+ K-"],
+            CombinationCut=combcut,
+            MotherCut=mothercut,
+            DaughtersCuts=daucut)
+
+#### Make B ###################################################
+
+    def _makeBd2HTauTau(self, name, tauSel, HSel, config, SS=False):
+
+        combcut = "in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" % config
+        mothercut = "( BPVVDCHI2 > %(FDCHI2_B)s ) & ( BPVVD < %(FD_B_Max)s ) " % config
+        mothercut += " & (PT > %(PT_B)s) & (P > %(P_B)s) " % config
+
+        part = "eta_prime"
+        n = name + "TauTau"
+        if "Phi" in name: part = "phi(1020)"
+        elif "Kstar" in name: part = "K*(892)0"
+        elif "Rho" in name: part = "rho(770)0"
+
+        descriptors = ["B_s0 -> %s tau+ tau-" % part]
+
+        if "Kstar" in name: descriptors = ["[B_s0 -> %s tau+ tau-]cc" % part]
+
+        if SS:
+            n += "SS"
+            descriptors = [
+                "B_s0 -> %s tau+ tau+" % part,
+                "B_s0 -> %s tau- tau-" % part
+            ]
+            if "Kstar" in name:
+                descriptors = [
+                    "[B_s0 -> %s tau+ tau+]cc" % part,
+                    "[B_s0 -> %s tau- tau-]cc" % part
+                ]
+
+        Combine = DaVinci__N3BodyDecays(
+            DecayDescriptors=descriptors,
+            Combination12Cut="AM < 6000",
+            CombinationCut=combcut,
+            MotherCut=mothercut)
+
+        return Selection(
+            n, Algorithm=Combine, RequiredSelections=[tauSel, HSel])
+
+    def _makeBu2KTauTau(self, name, tauSel, KSel, config, SS=False):
+
+        combcut = "in_range ( %(MASS_LOW_BK)s, AM, %(MASS_HIGH_B)s )" % config
+        mothercut = "( BPVVDCHI2 > %(FDCHI2_BK)s ) & ( BPVVD < %(FD_B_Max)s ) " % config
+        mothercut += " & (PT > %(PT_B)s) & (P > %(P_B)s)" % config
+
+        n = name + "TauTau"
+        descriptors = ["[B+ -> K+ tau+ tau-]cc"]
+        if SS:
+            n = name + "TauTauSS"
+            descriptors = ["[B+ -> K- tau+ tau+]cc", "[B+ -> K+ tau+ tau+]cc"]
+
+        Combine = DaVinci__N3BodyDecays(
+            DecayDescriptors=descriptors,
+            Combination12Cut="AM<6000",
+            CombinationCut=combcut,
+            MotherCut=mothercut)
+
+        return Selection(
+            n, Algorithm=Combine, RequiredSelections=[tauSel, KSel])
+
+    def _makeBu2K1TauTau(self, name, tauSel, K1Sel, config, SS=False):
+
+        combcut = "in_range ( %(MASS_LOW_B)s, AM, %(MASS_HIGH_B)s )" % config
+        mothercut = "( BPVVDCHI2 > %(FDCHI2_BK)s ) & ( BPVVD < %(FD_B_Max)s ) " % config
+        mothercut += " & (PT > %(PT_B)s) & (P > %(P_B)s)" % config
+
+        n = name + "TauTau"
+        descriptors = ["[B+ -> K_1(1270)+ tau+ tau-]cc"]
+        if SS:
+            n = name + "TauTauSS"
+            descriptors = [
+                "[B+ -> K_1(1270)- tau+ tau+]cc",
+                "[B+ -> K_1(1270)+ tau+ tau+]cc"
+            ]
+
+        Combine = DaVinci__N3BodyDecays(
+            DecayDescriptors=descriptors,
+            Combination12Cut="AM<6000",
+            CombinationCut=combcut,
+            MotherCut=mothercut)
+
+        return Selection(
+            n, Algorithm=Combine, RequiredSelections=[tauSel, K1Sel])
+
+#### Helpers to make lines
+
+    def _makeLine(self, name, sel, config):
+
+        line = StrippingLine(
+            name,
+            prescale=config['B2HTauTau_LinePrescale'],
+            postscale=config['B2HTauTau_LinePostscale'],
+            #MDSTFlag = False,
+            FILTER=self.FilterSPD,
+            RelatedInfoTools=getRelInfoB2XTauTau(),
+            selection=sel,
+            MaxCandidates=50)
+        self.registerLine(line)
+        return line
+
+
+#### Related Info
+def getRelInfoB2XTauTau():
+    relInfo = []
+    for coneAngle in [0.5, 0.8, 1.0, 1.3, 1.5]:
+        conestr = str(coneAngle).replace('.', '')
+        relInfo += [{
+            "Type":
+            "RelInfoConeVariables",
+            "IgnoreUnmatchedDescriptors":
+            True,
+            "ConeAngle":
+            coneAngle,
+            "Location":
+            "VertexConeInfo",
+            "Variables": [
+                'CONEANGLE', 'CONEMULT', 'CONEPASYM', 'CONEPTASYM',
+                'CONEDELTAETA'
+            ],
+            "DaughterLocations": {
+                "^[Beauty -> Hadron  l  l]CC": 'P2ConeVar%s_B' % conestr,
+                "[Beauty -> ^Hadron  l  l]CC": 'P2ConeVar%s_X' % conestr,
+                "[Beauty ->  Hadron ^l  l]CC": 'P2ConeVar%s_Tau1' % conestr,
+                "[Beauty ->  Hadron  l ^l]CC": 'P2ConeVar%s_Tau2' % conestr
+            }
+        }]
+        relInfo += [{
+            "Type": "RelInfoVertexIsolation",
+            "Location": "VertexIsoInfo"
+        }]
+        return relInfo
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauTauMuonic.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauTauMuonic.py
new file mode 100644
index 000000000..00bf2848f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingB2XTauTauMuonic.py
@@ -0,0 +1,481 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+"""
+Stripping lines for
+    Bs to phi_3(1850)/phi(1020) tau tau
+    Bs to K* K* tau tau
+    B0 to K* tau tau
+    Lb to p K tau tau
+Same-sign combinations are included.
+"""
+
+__author__ = 'H. Tilquin'
+__date__ = '03/06/2021'
+__version__ = '$Revision: 0.2 $'
+
+__all__ = ('B2XTauTauMuonicConf', 'default_config')
+
+from Gaudi.Configuration import *
+from LHCbKernel.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop, DaVinci__N3BodyDecays
+
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+default_config = {
+    'NAME': 'B2XTauTauMuonic',
+    'BUILDERTYPE': 'B2XTauTauMuonicConf',
+    'CONFIG':
+        {
+            "Bs_Comb_MassHigh": 7000.0,
+            "Bd_Comb_MassHigh": 6500.0,
+            "Lb_Comb_MassHigh": 7500.0,
+            "B_DIRA": 0.999,
+            "Lb_DIRA": 0.999,
+            "Bs_VertexCHI2": 150.0,
+            "B0_VertexCHI2": 100.0,
+            "Lb_VertexCHI2": 150.0,
+            "Dau_DIRA": 0.99,
+            "Dimuon_DIRA": 0.0,
+            "Hadron_MinIPCHI2": 16.0,
+            "Muon_MinIPCHI2": 9.0,
+            "DimuonUPPERMASS": 4350.0,
+            "Phi_FlightChi2": 16.0,
+            "Phi_Comb_MassHigh": 1850.0,
+            "Phi_PT": 600,
+            "Phi_VertexCHI2": 4,
+            "Kstar_for_B2Kstar_FlightChi2": 150.0,
+            "Kstar_for_B2Kstar_Comb_MassHigh": 1750.0,
+            "Kstar_for_B2Kstar_Comb_MassLow": 795.0,
+            "Kstar_for_B2Kstar_PT": 1500,
+            "Kstar_for_B2Kstar_VertexCHI2": 3,
+            "Kstar_for_B2KstarKstar_MassWindow": 100,
+            "Kstar_for_B2KstarKstar_PT": 600,
+            "Kstar_for_B2KstarKstar_VertexCHI2": 6,
+            "KstarKstar_DOCACHI2": 25,
+            "KstarKstar_Comb_MassHigh": 2250,
+            "Lambdastar_FlightChi2": 25,
+            "Lambdastar_Comb_MassHigh": 5000.0,
+            "Lambdastar_Comb_MassLow": 1400.0,
+            "Lambdastar_PT": 1500,
+            "Lambdastar_VertexCHI2": 3,
+            "Dimuon_VertexCHI2": 20,
+            "MuonPID": 0.0,
+            "KaonPID": 4.0,
+            "KaonPID_B2Kstar": 5.0,
+            "ProtonPID": 5.0,
+            "Pion_ProbNN": 0.3,
+            "Pion_ProbNN_B2Kstar": 0.8,
+            "Kaon_Pion_ProbNN_B2Kstar": 0.8,
+            "Hadron_P": 3000,
+            "SpdMult": 600,
+            "Track_GhostProb": 0.3,
+            "Track_TRCHI2": 3,
+            "UseNoPIDsHadrons": False,
+            "UseNoPIDsMuons": False,
+            "HLT1_FILTER": None,
+            "HLT2_FILTER": None,
+            "L0DU_FILTER": None,
+        },
+
+    'WGs': ['RD'],
+    'STREAMS': ['Dimuon']
+}
+
+
+class B2XTauTauMuonicConf(LineBuilder):
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+
+        self.BsCombCut = "(AM < %(Bs_Comb_MassHigh)s * MeV)" % config
+        self.Bs_for_B2KstarKstarCombCut = "(AM < %(Bs_Comb_MassHigh)s * MeV)" % config
+        self.BsCut = "(BPVDIRA > %(B_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(Bs_VertexCHI2)s)" % config
+
+        self.BdCombCut = "(AM < %(Bd_Comb_MassHigh)s * MeV)" % config
+        self.BdCut = "(BPVDIRA > %(B_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(B0_VertexCHI2)s)" % config
+
+        self.LambdaBCombCut = "(AM < %(Lb_Comb_MassHigh)s * MeV)" % config
+        self.LambdaBCut = "(BPVDIRA> %(Lb_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(Lb_VertexCHI2)s)" % config
+
+        DaughterCuts = "(BPVDIRA> %(Dau_DIRA)s)" % config
+
+        self.PhiCombCut = "(AM < %(Phi_Comb_MassHigh)s * MeV)" % config
+        self.PhiCut = DaughterCuts + " & (VFASPF(VCHI2/VDOF) < %(Phi_VertexCHI2)s) & (PT > %(Phi_PT)s * MeV) & " \
+                                     "(BPVVDCHI2 > %(Phi_FlightChi2)s)" % config
+
+        self.Kstar_for_B2KstarCombCut = "(AM < %(Kstar_for_B2Kstar_Comb_MassHigh)s*MeV) & (AM > %(Kstar_for_B2Kstar_Comb_MassLow)s*MeV)" % config
+        self.Kstar_for_B2KstarCut = DaughterCuts + " & (VFASPF(VCHI2/VDOF) < %(Kstar_for_B2Kstar_VertexCHI2)s) & " \
+                                                   "(PT > %(Kstar_for_B2Kstar_PT)s * MeV) & (BPVVDCHI2 > %(Kstar_for_B2Kstar_FlightChi2)s)" % config
+
+        self.Kstar_for_B2KstarKstarCombCut = "(ADAMASS('K*(892)0')< %(Kstar_for_B2KstarKstar_MassWindow)s * MeV )" % config
+        self.Kstar_for_B2KstarKstarCut = DaughterCuts + " &  (VFASPF(VCHI2/VDOF) < %(Kstar_for_B2KstarKstar_VertexCHI2)s) & " \
+                                                        "(PT > %(Kstar_for_B2KstarKstar_PT)s * MeV)" % config
+
+        self.LambdaStarCombCut = "(AM < %(Lambdastar_Comb_MassHigh)s * MeV) & (AM > %(Lambdastar_Comb_MassLow)s * MeV)" % config
+        self.LambdaStarCut = DaughterCuts + " & (PT > %(Lambdastar_PT)s * MeV) & (VFASPF(VCHI2/VDOF) < %(Lambdastar_VertexCHI2)s)" % config
+
+        self.DiMuonCombCut = "(AM < %(DimuonUPPERMASS)s * MeV) " % config
+        self.DiMuonCut = "(BPVDIRA> %(Dimuon_DIRA)s) & (VFASPF(VCHI2/VDOF) < %(Dimuon_VertexCHI2)s)" % config
+
+        self.TrackCuts = "(TRGHP < %(Track_GhostProb)s) & (TRCHI2DOF < %(Track_TRCHI2)s)" % config
+
+        self.HadronCuts = "(MIPCHI2DV(PRIMARY) > %(Hadron_MinIPCHI2)s)" % config
+
+        self.KaonCutBase = self.TrackCuts + " & " + self.HadronCuts + " & (P > %(Hadron_P)s * MeV)" % config
+        self.KaonCut = self.KaonCutBase + " & (PIDK > %(KaonPID)s) & (~ISMUON)" % config
+        self.KaonCut_B2Kstar = self.KaonCutBase + " & (PROBNNK * (1-PROBNNpi) > %(Kaon_Pion_ProbNN_B2Kstar)s) & (~ISMUON)" % config
+        self.KaonCutNoPID_B2Kstar = self.KaonCutBase + " & (PROBNNK * (1-PROBNNpi) < %(Kaon_Pion_ProbNN_B2Kstar)s)" % config
+        self.KaonCutNoPID = self.KaonCutBase + " & (PIDK < %(KaonPID)s)" % config
+
+        self.PionCutBase = self.TrackCuts + " & " + self.HadronCuts
+        self.PionCut_B2Kstar = self.PionCutBase + " & (PROBNNpi > %(Pion_ProbNN_B2Kstar)s) & (~ISMUON)" % config
+        self.PionCutNoPID_B2Kstar = self.PionCutBase + " & (PROBNNpi < %(Pion_ProbNN_B2Kstar)s)" % config
+
+        self.MuonCutBase = self.TrackCuts + " & (MIPCHI2DV(PRIMARY) > %(Muon_MinIPCHI2)s)" % config
+        self.MuonCut = self.MuonCutBase + " & (PIDmu> %(MuonPID)s) & (ISMUON)" % config
+        self.MuonCutNoPID = self.MuonCutBase + " & (PIDmu < %(MuonPID)s) " % config
+
+        self.ProtonCutBase = self.TrackCuts + " & " + self.HadronCuts + " & (P > %(Hadron_P)s * MeV)" % config
+        self.ProtonCut = self.ProtonCutBase + " & (PIDp > %(ProtonPID)s)  & (~ISMUON)" % config
+        self.ProtonCutNoPID = self.ProtonCutBase + " & (PIDp < %(ProtonPID)s)" % config
+
+        self.Kaons = self.__Kaons__(config)
+        self.FakeKaons = self.__FakeKaons__()
+
+        self.Kaons_Kstar = self.__Kaons__(config, sel_name="_B2Kstar")
+        self.FakeKaons_Kstar = self.__FakeKaons__(sel_name="_B2Kstar")
+
+        self.Pions_Kstar = self.__Pions__(config, sel_name="_B2Kstar")
+        self.FakePions_Kstar = self.__FakePions__(sel_name="_B2Kstar")
+
+        self.Muons = self.__Muons__(config)
+        self.FakeMuons = self.__FakeMuons__()
+
+        self.Protons = self.__Protons__(config)
+        self.FakeProtons = self.__FakeProtons__()
+
+        self.Dimuon = self.__Dimuon__(self.Muons)
+        self.FakeDimuon = self.__FakeDimuon__(self.Muons, self.FakeMuons, conf=config)
+
+        self.Phi = self.__Phi__(self.Kaons, conf=config)
+        self.FakePhi = self.__Phi__(self.Kaons, self.FakeKaons, conf=config)
+
+        self.Kstar_for_B2KstarKstar = self.__Kstar__(self.Kaons_Kstar, self.Pions_Kstar, sel_name="_B2KstarKstar")
+        self.FakePionKstar_for_B2KstarKstar = self.__Kstar__(self.Kaons_Kstar, self.FakePions_Kstar, pid_selection="NoPIDPi_",
+                                                             sel_name="_B2KstarKstar")
+        self.FakeKaonKstar_for_B2KstarKstar = self.__Kstar__(self.FakeKaons_Kstar, self.Pions_Kstar, pid_selection="NoPIDK_",
+                                                             sel_name="_B2KstarKstar")
+
+        self.Kstar_for_B2Kstar = self.__Kstar__(self.Kaons_Kstar, self.Pions_Kstar, sel_name="_B2Kstar")
+        self.FakePionKstar_for_B2Kstar = self.__Kstar__(self.Kaons_Kstar, self.FakePions_Kstar,
+                                                        pid_selection="NoPIDPi_", sel_name="_B2Kstar")
+        self.FakeKaonKstar_for_B2Kstar = self.__Kstar__(self.FakeKaons_Kstar, self.Pions_Kstar,
+                                                        pid_selection="NoPIDK_", sel_name="_B2Kstar")
+
+        self.LambdaStar = self.__Lambdastar__(self.Protons, self.Kaons)
+        self.FakeProtonLambdaStar = self.__Lambdastar__(self.FakeProtons, self.Kaons, pid_selection="NoPIDp_")
+        self.FakeKaonLambdaStar = self.__Lambdastar__(self.Protons, self.FakeKaons, pid_selection="NoPIDK_")
+
+        self.DeclaredDaughters = [self.Phi, self.Dimuon]
+        self.Bs = self.__Bs_Phi__(daughters=self.DeclaredDaughters)
+
+        self.DeclaredDaughters = [self.Phi, self.FakeDimuon]
+        self.Bs_NoPIDmu = self.__Bs_Phi__(daughters=self.DeclaredDaughters, pid_selection="NoPIDmu_")
+
+        self.DeclaredDaughters = [self.FakePhi, self.Dimuon]
+        self.Bs_NoPIDK = self.__Bs_Phi__(daughters=self.DeclaredDaughters, pid_selection="NoPIDK_")
+
+        self.DeclaredDaughters = [self.Kstar_for_B2KstarKstar, self.Dimuon]
+        self.Bs_kstarkstar = self.__Bs_KstarKstar__(daughters=self.DeclaredDaughters, conf=config)
+
+        self.DeclaredDaughters = [self.FakeKaonKstar_for_B2KstarKstar, self.Kstar_for_B2KstarKstar, self.Dimuon]
+        self.Bs_kstarkstar_nopidK = self.__Bs_KstarKstar__(daughters=self.DeclaredDaughters, conf=config, pid_selection="NoPIDK_")
+
+        self.DeclaredDaughters = [self.FakePionKstar_for_B2KstarKstar, self.Kstar_for_B2KstarKstar, self.Dimuon]
+        self.Bs_kstarkstar_nopidpi = self.__Bs_KstarKstar__(daughters=self.DeclaredDaughters, conf=config, pid_selection="NoPIDpi_")
+
+        self.DeclaredDaughters = [self.Kstar_for_B2KstarKstar, self.FakeDimuon]
+        self.Bs_kstarkstar_nopidpmu = self.__Bs_KstarKstar__(daughters=self.DeclaredDaughters, conf=config, pid_selection="NoPIDmu_")
+
+        self.DeclaredDaughters = [self.Kstar_for_B2Kstar, self.Dimuon]
+        self.Bs_kstar = self.__B0_Kstar__(daughters=self.DeclaredDaughters)
+
+        self.DeclaredDaughters = [self.FakeKaonKstar_for_B2Kstar, self.Dimuon]
+        self.Bs_kstar_nopidK = self.__B0_Kstar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDK_")
+
+        self.DeclaredDaughters = [self.FakePionKstar_for_B2Kstar, self.Dimuon]
+        self.Bs_kstar_nopidpi = self.__B0_Kstar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDpi_")
+
+        self.DeclaredDaughters = [self.Kstar_for_B2Kstar, self.FakeDimuon]
+        self.Bs_kstar_nopidpmu = self.__B0_Kstar__(daughters=self.DeclaredDaughters, pid_selection="NoPIDmu_")
+
+        self.LambdaB_pk = self.__LambdaB_pK__(daughters=[self.Dimuon, self.LambdaStar])
+        self.LambdaB_pk_noPIDK = self.__LambdaB_pK__(daughters=[self.Dimuon, self.FakeKaonLambdaStar],
+                                                     pid_selection="NoPIDK_")
+        self.LambdaB_pk_noPIDp = self.__LambdaB_pK__(daughters=[self.Dimuon, self.FakeProtonLambdaStar],
+                                                     pid_selection="NoPIDp_")
+        self.LambdaB_pk_noPIDmu = self.__LambdaB_pK__(daughters=[self.FakeDimuon, self.LambdaStar],
+                                                      pid_selection="NoPIDmu_")
+
+        self.FilterSPD = {'Code': " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" % config,
+                          'Preambulo': ["from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"]}
+
+        self.Bs2phi_line = StrippingLine(
+            self.name + "_Bs2Phi_Line", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs], MDSTFlag=False, MaxCandidates=1000)
+        self.registerLine(self.Bs2phi_line)
+
+        self.Bs2Phi_NoPIDmu_line = StrippingLine(
+            self.name + "_Bs2Phi_NoPIDMuLine", prescale=0.04,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_NoPIDmu], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bs2Phi_NoPIDmu_line)
+
+        self.Bs2Phi_NoPIDK_line = StrippingLine(
+            self.name + "_Bs2Phi_NoPIDKLine", prescale=0.1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_NoPIDK], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bs2Phi_NoPIDK_line)
+
+        self.Bs2KstarKstar_line = StrippingLine(
+            self.name + "_Bs2KstarKstar_Line", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_kstarkstar], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bs2KstarKstar_line)
+
+        self.Bs2KstarKstar_NoPIDK_line = StrippingLine(
+            self.name + "_Bs2KstarKstar_NoPIDKLine", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_kstarkstar_nopidK], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bs2KstarKstar_NoPIDK_line)
+
+        self.Bs2KstarKstar_NoPIDpi_line = StrippingLine(
+            self.name + "_Bs2KstarKstar_NoPIDPiLine", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_kstarkstar_nopidpi], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bs2KstarKstar_NoPIDpi_line)
+
+        self.Bs2KstarKstar_NoPIDmu_line = StrippingLine(
+            self.name + "_Bs2KstarKstar_NoPIDMuLine", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_kstarkstar_nopidpmu], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bs2KstarKstar_NoPIDmu_line)
+
+        self.Bd2Kstar_line = StrippingLine(
+            self.name + "_B02KstarLine", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_kstar], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bd2Kstar_line)
+
+        self.Bd2Kstar_NoPIDK_line = StrippingLine(
+            self.name + "_B02Kstar_NoPIDKLine", prescale=0.3,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_kstar_nopidK], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bd2Kstar_NoPIDK_line)
+
+        self.Bd2Kstar_NoPIDpi_line = StrippingLine(
+            self.name + "_B02Kstar_NoPIDPiLine", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_kstar_nopidpi], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bd2Kstar_NoPIDpi_line)
+
+        self.Bd2Kstar_NoPIDmu_line = StrippingLine(
+            self.name + "_B02Kstar_NoPIDMuLine", prescale=0.03,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.Bs_kstar_nopidpmu], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Bd2Kstar_NoPIDmu_line)
+
+        self.Lb2pK_line = StrippingLine(
+            self.name + "_Lb2pK_Line", prescale=1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.LambdaB_pk], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Lb2pK_line)
+
+        self.Lb2pK_NoPIDK_line = StrippingLine(
+            self.name + "_Lb2pK_NoPIDKLine", prescale=0.2,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.LambdaB_pk_noPIDK], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Lb2pK_NoPIDK_line)
+
+        self.Lb2pK_NoPIDp_line = StrippingLine(
+            self.name + "_Lb2pK_NoPIDpLine", prescale=0.1,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.LambdaB_pk_noPIDp], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Lb2pK_NoPIDp_line)
+
+        self.Lb2pK_NoPIDmu_line = StrippingLine(
+            self.name + "_Lb2pK_NoPIDmuLine", prescale=0.04,
+            HLT2=config['HLT2_FILTER'], HLT1=config['HLT1_FILTER'], L0DU=config['L0DU_FILTER'],
+            FILTER=self.FilterSPD, algos=[self.LambdaB_pk_noPIDmu], MDSTFlag=False, MaxCandidates=4000)
+        self.registerLine(self.Lb2pK_NoPIDmu_line)
+
+    def __Muons__(self, conf):
+        from StandardParticles import StdAllLooseMuons, StdNoPIDsMuons
+        muons = StdNoPIDsMuons if conf['UseNoPIDsMuons'] else StdAllLooseMuons
+        muon_cut = self.MuonCutBase if conf['UseNoPIDsMuons'] else self.MuonCut
+        _filter = FilterDesktop(Code=muon_cut)
+        _sel = Selection("Selection_" + self.name + "_StdLooseMuons", RequiredSelections=[muons],
+                         Algorithm=_filter)
+        return _sel
+
+    def __FakeMuons__(self):
+        from StandardParticles import StdNoPIDsMuons
+        _filter = FilterDesktop(Code=self.MuonCutNoPID)
+        _sel = Selection("Selection_" + self._name + "StdAllNoPIDsMuons", Algorithm=_filter,
+                         RequiredSelections=[StdNoPIDsMuons])
+        return _sel
+
+    def __Protons__(self, conf):
+        from StandardParticles import StdAllLooseProtons, StdNoPIDsProtons
+        protons = StdNoPIDsProtons if conf['UseNoPIDsHadrons'] else StdAllLooseProtons
+        proton_cuts = self.ProtonCutBase if conf['UseNoPIDsHadrons'] else self.ProtonCut
+        _filter = FilterDesktop(Code=proton_cuts)
+        _sel = Selection("Selection_" + self.name + "_StdLooseProtons", RequiredSelections=[protons], Algorithm=_filter)
+        return _sel
+
+    def __FakeProtons__(self):
+        from StandardParticles import StdNoPIDsProtons
+        _filter = FilterDesktop(Code=self.ProtonCutNoPID)
+        _sel = Selection("Selection_" + self._name + "_StdAllNoPIDsProtons", Algorithm=_filter,
+                         RequiredSelections=[StdNoPIDsProtons])
+        return _sel
+
+    def __Kaons__(self, conf, sel_name="_"):
+        from StandardParticles import StdLooseKaons, StdNoPIDsKaons
+        kaons = StdNoPIDsKaons if conf['UseNoPIDsHadrons'] else StdLooseKaons
+        if conf['UseNoPIDsHadrons']:
+            _filter = FilterDesktop(Code=self.KaonCutBase)
+        elif "Kstar" in sel_name:
+            _filter = FilterDesktop(Code=self.KaonCut_B2Kstar)
+        else:
+            _filter = FilterDesktop(Code=self.KaonCut)
+        _sel = Selection("Selection_" + self.name + sel_name + "StdLooseKaons", RequiredSelections=[kaons],
+                         Algorithm=_filter)
+        return _sel
+
+    def __FakeKaons__(self, sel_name="_"):
+        from StandardParticles import StdNoPIDsKaons
+        if "Kstar" in sel_name:
+            _filter = FilterDesktop(Code=self.KaonCutNoPID_B2Kstar)
+        else:
+            _filter = FilterDesktop(Code=self.KaonCutNoPID)
+        _sel = Selection("Selection_" + self._name + sel_name + "StdAllNoPIDsKaons", Algorithm=_filter,
+                         RequiredSelections=[StdNoPIDsKaons])
+        return _sel
+
+    def __Pions__(self, conf, sel_name="_"):
+        from StandardParticles import StdLoosePions, StdNoPIDsPions
+        pions = StdNoPIDsPions if conf['UseNoPIDsHadrons'] else StdLoosePions
+        if conf['UseNoPIDsHadrons']:
+            _filter = FilterDesktop(Code=self.PionCutBase)
+        else:
+            _filter = FilterDesktop(Code=self.PionCut_B2Kstar)
+        _sel = Selection("Selection_" + self.name + sel_name + "StdLoosePions", RequiredSelections=[pions],
+                         Algorithm=_filter)
+        return _sel
+
+    def __FakePions__(self, sel_name="_"):
+        from StandardParticles import StdNoPIDsPions
+        _filter = FilterDesktop(Code=self.PionCutNoPID_B2Kstar)
+        _sel = Selection("Selection_" + self.name + sel_name + "StdAllNoPIDsPions", RequiredSelections=[StdNoPIDsPions],
+                         Algorithm=_filter)
+        return _sel
+
+    def __Dimuon__(self, Muons):
+        CombineDiMuon = CombineParticles()
+        CombineDiMuon.DecayDescriptors = ["D0 -> mu- mu+", "D0 -> mu+ mu+", " D0 -> mu- mu-"]
+        CombineDiMuon.CombinationCut = self.DiMuonCombCut
+        CombineDiMuon.MotherCut = self.DiMuonCut
+        _sel = Selection("Selection_" + self.name + "_DiMuon", Algorithm=CombineDiMuon, RequiredSelections=[Muons])
+        return _sel
+
+    def __FakeDimuon__(self, muons, fakemuons, conf):
+        CombineDiMuon = CombineParticles()
+        CombineDiMuon.DecayDescriptors = ["D0 -> mu- mu+", "D0 -> mu+ mu+", " D0 -> mu- mu-"]
+        CombineDiMuon.CombinationCut = self.DiMuonCombCut + " & (AHASCHILD((PIDmu < %(MuonPID)s)))" % conf
+        CombineDiMuon.MotherCut = self.DiMuonCut
+        _sel = Selection("Selection_" + self.name + "_DiMuonNoPID", Algorithm=CombineDiMuon,
+                         RequiredSelections=[muons, fakemuons])
+        return _sel
+
+    def __Phi__(self, Kaons, fakekaon=None, conf=None):
+        _phi2kk = CombineParticles()
+        _phi2kk.DecayDescriptors = ["phi(1020) -> K+ K-", "phi(1020) -> K+ K+", "phi(1020) -> K- K-"]
+        _phi2kk.MotherCut = self.PhiCut
+        if fakekaon is None:
+            _phi2kk.CombinationCut = self.PhiCombCut
+            _sel = Selection("Phi_selection_for" + self.name, Algorithm=_phi2kk, RequiredSelections=[Kaons])
+        else:
+            _phi2kk.CombinationCut = self.PhiCombCut + " & (AHASCHILD((PIDK < %(KaonPID)s)))" % conf
+            _sel = Selection("Phi_NoPIDK_selection_for" + self.name, Algorithm=_phi2kk,
+                             RequiredSelections=[Kaons, fakekaon])
+        return _sel
+
+    def __Kstar__(self, Kaons, Pions, pid_selection="_", sel_name="_B2KstarKstar"):
+
+        _kstar2kpi = CombineParticles()
+        if sel_name == "_B2KstarKstar":
+            _kstar2kpi.DecayDescriptors = ["[K*(892)0 -> K+ pi-]cc"]
+            _kstar2kpi.CombinationCut = self.Kstar_for_B2KstarKstarCombCut
+            _kstar2kpi.MotherCut = self.Kstar_for_B2KstarKstarCut
+        else:
+            _kstar2kpi.DecayDescriptors = ["[K*(892)0 -> K+ pi-]cc", "K*(892)0 -> K+ pi+", "K*(892)0 -> K- pi-"]
+            _kstar2kpi.CombinationCut = self.Kstar_for_B2KstarCombCut
+            _kstar2kpi.MotherCut = self.Kstar_for_B2KstarCut
+        _sel = Selection("Kstar_for" + sel_name + pid_selection + "selection_for" + self.name, Algorithm=_kstar2kpi,
+                         RequiredSelections=[Kaons, Pions])
+        return _sel
+
+    def __Lambdastar__(self, Protons, Kaons, pid_selection="_"):
+        _lstar2pk = CombineParticles()
+        _lstar2pk.DecayDescriptors = ["[Lambda(1520)0 -> p+ K-]cc", "Lambda(1520)0 -> p+ K+", "Lambda(1520)0 -> p~- K-"]
+        _lstar2pk.CombinationCut = self.LambdaStarCombCut
+        _lstar2pk.MotherCut = self.LambdaStarCut
+        _sel = Selection("Lambdastar" + pid_selection + "selection_for" + self.name, Algorithm=_lstar2pk,
+                         RequiredSelections=[Protons, Kaons])
+        return _sel
+
+    def __Bs_Phi__(self, daughters, pid_selection="_"):
+        _b2phitautau = CombineParticles(DecayDescriptors=["B_s0 -> phi(1020) D0"],
+                                        MotherCut=self.BsCut, CombinationCut=self.BsCombCut)
+        sel = Selection("Phi" + pid_selection + "for" + self.name, Algorithm=_b2phitautau, RequiredSelections=daughters)
+        return sel
+
+    def __Bs_KstarKstar__(self, daughters, conf, pid_selection="_"):
+        _b2kstarkstartautau = DaVinci__N3BodyDecays()
+        _b2kstarkstartautau.DecayDescriptors = ["B_s0 -> K*(892)0 K*(892)~0 D0", "B_s0 -> K*(892)0 K*(892)0 D0", "B_s0 -> K*(892)~0 K*(892)~0 D0"]
+        _b2kstarkstartautau.CombinationCut = self.Bs_for_B2KstarKstarCombCut
+        _b2kstarkstartautau.MotherCut = self.BsCut
+        _b2kstarkstartautau.Combination12Cut = "(ACHI2DOCA(1,2) < %(KstarKstar_DOCACHI2)s) & (AM < %(KstarKstar_Comb_MassHigh)s * MeV)" % conf
+        sel = Selection("KstarKstar" + pid_selection + "for" + self.name + "_daughters", Algorithm=_b2kstarkstartautau,
+                        RequiredSelections=daughters)
+        return sel
+
+    def __B0_Kstar__(self, daughters, pid_selection="_"):
+        _b2kstartautau = CombineParticles(DecayDescriptors=["B0 -> K*(892)0 D0", "B~0 -> K*(892)~0 D0"],
+                                          MotherCut=self.BdCut, CombinationCut=self.BdCombCut)
+        sel = Selection("Kstar" + pid_selection + "for" + self.name, Algorithm=_b2kstartautau,
+                        RequiredSelections=daughters)
+        return sel
+
+    def __LambdaB_pK__(self, daughters, pid_selection="_"):
+        _b2lambdatautau = CombineParticles(DecayDescriptors=["Lambda_b0 -> Lambda(1520)0 D0", "Lambda_b~0 -> Lambda(1520)~0 D0"],
+                                           MotherCut=self.LambdaBCut, CombinationCut=self.LambdaBCombCut)
+        sel = Selection("Lambda" + pid_selection + "for" + self.name, Algorithm=_b2lambdatautau,
+                        RequiredSelections=daughters)
+        return sel
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBLVLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBLVLines.py
new file mode 100644
index 000000000..f1201ae46
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBLVLines.py
@@ -0,0 +1,1141 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of baryon-lepton number violating stripping selections and lines
+
+Performance (prescaling included):
+
+Full.dst
+########
+
+StrippingReport                                                INFO Event 750000, Good event 750000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |_StrippingGlobal_                                            |  0.0320|       240|       |  10.818|
+ |!StrippingBLVLa2KmuLine_TIMING                               |  0.0064|        48|  1.000|   0.115|
+ |!StrippingBLVLb2KmuLine_TIMING                               |  0.0045|        34|  1.000|   0.105|
+ |!StrippingBLVXib2KhmuLine_TIMING                             |  0.0013|        10|  1.200|   0.162|
+ |!StrippingBLVB2KhhLine_TIMING                                |  0.0052|        39|  1.205|   0.202|
+ |!StrippingBLVLb2DmuLine_TIMING                               |  0.0016|        12|  1.000|   0.030|
+ |!StrippingBLVLb2DsmuLine_TIMING                              |  0.0011|         8|  1.000|   0.026|
+ |!StrippingBLVLb2LcpiLine_TIMING                              |  0.0011|         8|  1.000|   0.017|
+ |!StrippingBLVB2LcmuLine_TIMING                               |  0.0039|        29|  1.138|   0.022|
+ |!StrippingBLVB2DpiLine_TIMING                                |  0.0012|         9|  1.000|   0.017|
+ |!StrippingBLVBs2DspiLine_TIMING                              |  0.0007|         5|  1.200|   0.016|
+ |!StrippingBLVB2LcpLine_TIMING                                |  0.0019|        14|  1.143|   0.017|
+ 
+
+MC: Lambda -> K mu (MC11a/33112001)
+###################################
+StrippingReport                                                INFO Event 19600, Good event 19600
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingBLVLa2KmuLine                                      |  0.4388|        86|  1.000|   2.853|
+
+MC: Lambda_b -> K mu (15112001)
+###############################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingBLVLb2KmuLine                                      | 29.6280|     29628|  1.002|  11.520|
+
+MC: Lambda_b -> D+ mu (15174011)
+################################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingBLVLb2DmuLine                                      |  8.1930|      8193|  1.021|   8.174|
+
+MC: Lambda_b -> Ds+ mu (15174001)
+#################################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingBLVLb2DsmuLine                                     |  8.5070|      8507|  1.117|   5.941|
+
+MC: B0 -> Lambda_c+ mu (11174001)
+#################################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingBLVB2LcmuLine                                      |  7.8240|      7824|  1.080|   6.130|
+
+MC: Bs0 -> Lambda_c+ mu (13174001)
+##################################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingBLVB2LcmuLine                                      |  8.1230|      8123|  1.080|   5.323|
+
+MC: B+ -> K*0 pi+ (12103091)
+############################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingBLVB2KhhLine                                       | 13.4310|     13431|  1.004|   6.188|
+
+MC: B+ -> Phi K+ (12103061)
+###########################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingBLVB2KhhLine                                       | 16.3140|     16314|  1.005|   7.537|
+              
+Exported symbols (use python help!):
+   - 
+"""
+
+__author__ = ["Oliver Gruenberg"]
+__date__ = "08.12.2015"
+__version__ = "$Revision: 1.0 $"
+
+###################################################################################################
+
+__all__ = ( "BLVLinesConf",
+            "default_config" )
+
+###################################################################################################
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+###################################################################################################
+
+default_config = {
+    "NAME"        : "BLV",
+    "WGs"         : [ "RD" ],
+    "STREAMS"     : [ "Bhadron" ],
+    "BUILDERTYPE" : "BLVLinesConf",
+    "CONFIG"      : { "MDSTflag"            : False, # True or False
+                      # TrackCuts
+                      "MinTrIPChi2"         : 25.0,
+                      "MaxTrChi2Dof"        : 4.0,
+                      "MaxTrGhp"            : 0.4,
+                      # CombiCuts
+                      "MaxDoca"             : 0.3,
+                      # MassCuts 
+                      "mDiffD"              : 100.0,
+                      "mDiffDs"             : 100.0,
+                      "mDiffbLoose"         : 500.0,
+                      "mDiffbStand"         : 400.0,
+                      "mDiffbTight"         : 300.0,
+                      "mDiffLa"             : 400.0,
+                      "mKst"                : 1200.0,
+                      # MotherCuts
+                      "MaxIPChi2"           : 25,
+                      "MinVDChi2Loose"      : 100,
+                      "MinVDChi2Tight"      : 225,
+                      "MaxVtxChi2Dof"       : 9,
+                      "MinDira"             : 0.0, 
+                      "MinTauLoose"         : 0.0, # (ps)
+                      "MinTauTight"         : 1.0, # (ps)
+                      "MinTauLambda"        : 10.0, # (ps)
+                      # scalings
+                      "Postscale"           : 1,
+                      ### Lambda_(b)0 -> K- mu+
+                      "La2KmuPrescale"      : 1,
+                      "Lb2KmuPrescale"      : 1,
+                      ### Xi_b- -> K*0 mu-
+                      "Xib2KhmuPrescale"    : 1, 
+                      "B2KhhPrescale"       : 1,                      
+                      ### Lb -> D(s)+ mu-
+                      "Lb2DmuPrescale"      : 1,
+                      "Lb2DsmuPrescale"     : 1,
+                      "B2LcmuPrescale"      : 1,
+                      ### B(s)0 -> Lc+ mu- 
+                      "Lb2LcpiPrescale"     : 0.1,
+                      "B2DpiPrescale"       : 0.1,
+                      "Bs2DspiPrescale"     : 0.1,
+                      "B2LcpPrescale"       : 0.2,
+                      ### RelatedInfoTools
+                      "CommonRelInfoTools"   : [ { "Type": "RelInfoVertexIsolation", "Location":"VtxIsoInfo" },
+                                                 { "Type": "RelInfoVertexIsolationBDT", "Location":"VtxIsoInfoBDT" },
+                                                 { "Type" : "RelInfoBs2MuMuBIsolations",
+                                                   "Variables" : [],
+                                                   "Location"  : "BsMuMuBIsolation",
+                                                   "tracktype" : 3,
+                                                   "makeTrackCuts" : False, },
+                                                 ] # closes CommonRelInfoTools
+                      }, # closes "CONFIG"
+    } # closes default_config
+
+###################################################################################################
+
+class BLVLinesConf(LineBuilder) :
+    """
+    Builder
+    
+    """
+
+    #######################################################
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    #######################################################
+    
+    def __init__(self, name = "BLV", config = default_config) :
+
+        LineBuilder.__init__(self, name, config)
+
+#######################################################################################################
+
+        ### TrackCuts
+        #############
+        self.TrackCuts = """
+                         ( MIPCHI2DV(PRIMARY) > %(MinTrIPChi2)s )
+                         & ( TRCHI2DOF < %(MaxTrChi2Dof)s )
+                         & ( TRGHP < %(MaxTrGhp)s )
+                         """ %config
+
+        ### DaughterCuts
+        ################
+        self.DCut  = "(ADMASS('D+') < %(mDiffD)s*MeV)" %config
+        self.DsCut = "(ADMASS('D_s+') < %(mDiffDs)s*MeV)" %config
+
+        ### CombinationCuts
+        ###################
+        self.DocaCut  = "(AMAXDOCA('') < %(MaxDoca)s*mm)" %config
+        self.bCoCutS  = "(ADAMASS(5323*MeV) < %(mDiffbStand)s*MeV)" %config
+        self.BdCoCutS = "(ADAMASS('B0') < %(mDiffbStand)s*MeV)" %config
+        self.BsCoCutS = "(ADAMASS('B_s0') < %(mDiffbStand)s*MeV)" %config
+        self.LbCoCutL = "(ADAMASS('Lambda_b0') < %(mDiffbLoose)s*MeV)" %config        
+        self.LbCoCutS = "(ADAMASS('Lambda_b0') < %(mDiffbStand)s*MeV)" %config
+        self.LbCoCutT = "(ADAMASS('Lambda_b0') < %(mDiffbTight)s*MeV)" %config
+
+        ### MotherCuts
+        ################
+        self.bCutS   = "(ADMASS(5323*MeV) < %(mDiffbStand)s*MeV)" %config
+        self.BdCutS  = "(ADMASS('B0') < %(mDiffbStand)s*MeV)" %config
+        self.BuCutT  = "(ADMASS('B+') < %(mDiffbTight)s*MeV)" %config      
+        self.BsCutS  = "(ADMASS('B_s0') < %(mDiffbStand)s*MeV)" %config
+        self.LbCutL  = "(ADMASS('Lambda_b0') < %(mDiffbLoose)s*MeV)" %config
+        self.LbCutS  = "(ADMASS('Lambda_b0') < %(mDiffbStand)s*MeV)" %config
+        self.LbCutT  = "(ADMASS('Lambda_b0') < %(mDiffbTight)s*MeV)" %config
+        self.XibCutL = "(ADMASS('Xi_b-') < %(mDiffbLoose)s*MeV )" %config
+
+        self.bMotherCutsLoose = """
+                                (BPVIPCHI2() < %(MaxIPChi2)s)
+                                & (BPVVDCHI2 > %(MinVDChi2Loose)s)
+                                & (VFASPF(VCHI2/VDOF) < %(MaxVtxChi2Dof)s)
+                                & (BPVDIRA > %(MinDira)s)
+                                & (BPVLTIME() > %(MinTauLoose)s*ps)
+                                """ %config
+        
+        self.bMotherCutsTight = """
+                                (BPVIPCHI2() < %(MaxIPChi2)s)
+                                & (BPVVDCHI2 > %(MinVDChi2Tight)s)
+                                & (VFASPF(VCHI2/VDOF) < %(MaxVtxChi2Dof)s)
+                                & (BPVDIRA > %(MinDira)s)
+                                & (BPVLTIME() > %(MinTauTight)s*ps)
+                                """ %config
+
+        ### Lambda0 -> K- mu+
+        #####################
+        self.La2KmuCombinationCut = """
+                                    (ADAMASS('Lambda0') < %(mDiffLa)s*MeV)
+                                    & (AMAXDOCA('') < %(MaxDoca)s*mm)
+                                    """ %config
+        
+        self.La2KmuMotherCut = """
+                               (ADMASS('Lambda0') < %(mDiffLa)s*MeV)
+                               & (BPVIPCHI2() < %(MaxIPChi2)s)
+                               & (BPVVDCHI2 > %(MinVDChi2Tight)s)
+                               & (VFASPF(VCHI2/VDOF) < %(MaxVtxChi2Dof)s)
+                               & (BPVDIRA > %(MinDira)s)
+                               & (BPVLTIME() > %(MinTauLambda)s*ps)
+                               """ %config
+
+        ### Lambda_b0 -> K- mu+
+        #######################
+        self.Lb2KmuCombinationCut = self.LbCoCutL + " & " + self.DocaCut
+        self.Lb2KmuMotherCut = self.LbCutL + " & " + self.bMotherCutsLoose
+
+        ### Xi_b- -> K*0 mu-
+        ####################
+
+        self.Xib2KhmuCombination12Cut = """
+                                         (AM12 < %(mKst)s*MeV)
+                                         & (ADOCA(1,2) < %(MaxDoca)s*mm)
+                                         """ %config
+
+        self.Xib2KhmuCombinationCut = """
+                                      (ADOCA(1,3) < %(MaxDoca)s*mm)
+                                      & (ADOCA(2,3) < %(MaxDoca)s*mm)
+                                      """ %config
+        
+        self.Xib2KhmuMotherCut = self.XibCutL + " & " + self.bMotherCutsLoose
+
+        ###### B+ -> K*0 pi+
+        ####################
+        self.Bu2KhhMotherCut = self.BuCutT + " & " + self.bMotherCutsLoose                
+
+        
+        ### Lb -> D(s)+ mu- and Lb -> Lc+ pi-
+        #####################################
+        self.Lb2DmuCombinationCut = self.LbCoCutS + " & " + self.DocaCut
+        self.Lb2DmuMotherCut      = self.LbCutS + " & " + self.bMotherCutsTight
+
+        ### B(s)0 -> LambdaC+ mu-
+        #########################
+        self.B2LcmuCombinationCut = self.bCoCutS + " & " + self.DocaCut
+        self.B2LcmuMotherCut      = self.bCutS + " & " + self.bMotherCutsTight
+
+        ###### B0 -> D- pi+
+        ###################
+        self.Bd2DpiCombinationCut = self.BdCoCutS + " & " + self.DocaCut
+        self.Bd2DpiMotherCut      = self.BdCutS + " & " + self.bMotherCutsTight
+
+        ###### B_s0 -> D_s- pi+
+        #######################        
+        self.Bs2DspiCombinationCut = self.BsCoCutS + " & " + self.DocaCut
+        self.Bs2DspiMotherCut      = self.BsCutS + " & " + self.bMotherCutsTight      
+
+#######################################################################################################
+
+        ### Lambda0 -> K- mu+
+        La2Kmu_name      = name+"La2Kmu"
+        self.selLa2Kmu   = self.makeLa2Kmu(La2Kmu_name)      
+
+        ### Lambda_b0 -> K- mu+
+        Lb2Kmu_name      = name+"Lb2Kmu"
+        self.selLb2Kmu   = self.makeLb2Kmu(Lb2Kmu_name)
+
+        ### Xi_b- -> K*0 mu- 
+        Xib2Khmu_name    = name+"Xib2Khmu"         
+        self.selXib2Khmu = self.makeXib2Khmu(Xib2Khmu_name)
+        B2Khh_name     = name+"B2Khh" 
+        self.selB2Khh  = self.makeB2Khh(B2Khh_name) 
+        
+        ### Lb -> D(s)+ mu-         
+        Lb2Dmu_name      = name+"Lb2Dmu"
+        self.selLb2Dmu   = self.makeLb2Dmu(Lb2Dmu_name)
+        Lb2Dsmu_name     = name+"Lb2Dsmu"
+        self.selLb2Dsmu  = self.makeLb2Dsmu(Lb2Dsmu_name)
+        Lb2Lcpi_name     = name+"Lb2Lcpi"
+        self.selLb2Lcpi  = self.makeLb2Lcpi(Lb2Lcpi_name)
+
+        ### B(s)0 -> Lc+ mu- 
+        B2Lcmu_name      = name+"B2Lcmu"
+        self.selB2Lcmu   = self.makeB2Lcmu(B2Lcmu_name)
+        B2Dpi_name       = name+"B2Dpi"
+        self.selB2Dpi    = self.makeB2Dpi(B2Dpi_name)
+        Bs2Dspi_name     = name+"Bs2Dspi"
+        self.selBs2Dspi  = self.makeBs2Dspi(Bs2Dspi_name)
+        B2Lcp_name       = name+"B2Lcp"
+        self.selB2Lcp    = self.makeB2Lcp(B2Lcp_name) 
+        
+#######################################################################################################
+
+        self.La2KmuLine = StrippingLine(La2Kmu_name+"Line",
+                                        prescale = config["La2KmuPrescale"],
+                                        postscale = config["Postscale"],
+                                        MDSTFlag = config["MDSTflag"],
+                                        selection = self.selLa2Kmu,
+                                        RelatedInfoTools = [
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [], # writes out all variables
+                                             "Location"  : 'ConeIso05La',
+                                             "DaughterLocations" : {
+                                             "[Lambda0 -> ^X  l]CC"  : "ConeIso05K",
+                                             "[Lambda0 ->  X ^l]CC"  : "ConeIso05mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10La',
+                                             "DaughterLocations" : {
+                                             "[Lambda0 -> ^X  l]CC"  : "ConeIso10K",
+                                             "[Lambda0 ->  X ^l]CC"  : "ConeIso10mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15La',
+                                             "DaughterLocations" : {
+                                             "[Lambda0 -> ^X  l]CC"  : "ConeIso15K",
+                                             "[Lambda0 ->  X ^l]CC"  : "ConeIso15mu",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda0 -> ^X  l]CC"  : "TrackIsoBDTK",
+                                             "[Lambda0 ->  X ^l]CC"  : "TrackIsoBDTmu",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda0 -> ^X  l]CC"  : "BsMuMuTrackIsoK",
+                                             "[Lambda0 ->  X ^l]CC"  : "BsMuMuTrackIsomu",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        ) # closes Strippingline
+            
+        self.Lb2KmuLine = StrippingLine(Lb2Kmu_name+"Line",
+                                        prescale = config["Lb2KmuPrescale"],
+                                        postscale = config["Postscale"],
+                                        MDSTFlag = config["MDSTflag"],
+                                        selection = self.selLb2Kmu,
+                                        RelatedInfoTools = [
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [], # writes out all variables
+                                             "Location"  : 'ConeIso05Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> ^X  l]CC"  : "ConeIso05K",
+                                             "[Lambda_b0 ->  X ^l]CC"  : "ConeIso05mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> ^X  l]CC"  : "ConeIso10K",
+                                             "[Lambda_b0 ->  X ^l]CC"  : "ConeIso10mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> ^X  l]CC"  : "ConeIso15K",
+                                             "[Lambda_b0 ->  X ^l]CC"  : "ConeIso15mu",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> ^X  l]CC"  : "TrackIsoBDTK",
+                                             "[Lambda_b0 ->  X ^l]CC"  : "TrackIsoBDTmu",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> ^X  l]CC"  : "BsMuMuTrackIsoK",
+                                             "[Lambda_b0 ->  X ^l]CC"  : "BsMuMuTrackIsomu",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        ) # closes Strippingline 
+
+####################################################################################################### 
+### Xi_b- -> K*0 mu-
+####################################################################################################### 
+
+        self.Xib2KhmuLine = StrippingLine(Xib2Khmu_name+"Line",
+                                          prescale = config["Xib2KhmuPrescale"],
+                                          postscale = config["Postscale"],
+                                          MDSTFlag = config["MDSTflag"],
+                                          selection = self.selXib2Khmu,
+                                          RelatedInfoTools = [          
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Xib',
+                                             "DaughterLocations" : {
+                                             "[Xi_b- -> ^X  X  l]CC"  : "ConeIso05K",
+                                             "[Xi_b- ->  X ^X  l]CC"  : "ConeIso05pi",
+                                             "[Xi_b- ->  X  X ^l]CC"  : "ConeIso05mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Xib',
+                                             "DaughterLocations" : {
+                                             "[Xi_b- -> ^X  X  l]CC"  : "ConeIso10K",
+                                             "[Xi_b- ->  X ^X  l]CC"  : "ConeIso10pi",
+                                             "[Xi_b- ->  X  X ^l]CC"  : "ConeIso10mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Xib',
+                                             "DaughterLocations" : {
+                                             "[Xi_b- -> ^X  X  l]CC"  : "ConeIso15K",
+                                             "[Xi_b- ->  X ^X  l]CC"  : "ConeIso15pi",
+                                             "[Xi_b- ->  X  X ^l]CC"  : "ConeIso15mu",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Xi_b- -> ^X  X  l]CC"  : "TrackIsoBDTK",
+                                             "[Xi_b- ->  X ^X  l]CC"  : "TrackIsoBDTpi",
+                                             "[Xi_b- ->  X  X ^l]CC"  : "TrackIsoBDTmu",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables"  : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Xi_b- -> ^X  X  l]CC"  : "BsMuMuTrackIsoK",
+                                             "[Xi_b- ->  X ^X  l]CC"  : "BsMuMuTrackIsopi",
+                                             "[Xi_b- ->  X  X ^l]CC"  : "BsMuMuTrackIsomu",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                          ) # closes Strippingline 
+
+        self.B2KhhLine = StrippingLine(B2Khh_name+"Line",
+                                       prescale = config["B2KhhPrescale"],
+                                       postscale = config["Postscale"],
+                                       MDSTFlag = config["MDSTflag"],
+                                       selection = self.selB2Khh,
+                                       RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^K+  pi-  pi+]CC"  : "ConeIso05K",
+                                             "[B+ ->  K+ ^pi-  pi+]CC"  : "ConeIso05pi1",
+                                             "[B+ ->  K+  pi- ^pi+]CC"  : "ConeIso05pi2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^K+  pi-  pi+]CC"  : "ConeIso10K",
+                                             "[B+ ->  K+ ^pi-  pi+]CC"  : "ConeIso10pi1",
+                                             "[B+ ->  K+  pi- ^pi+]CC"  : "ConeIso10pi2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Bp',
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^K+  pi-  pi+]CC"  : "ConeIso15K",
+                                             "[B+ ->  K+ ^pi-  pi+]CC"  : "ConeIso15pi1",
+                                             "[B+ ->  K+  pi- ^pi+]CC"  : "ConeIso15pi2",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^K+  pi-  pi+]CC"  : "TrackIsoBDTK",
+                                             "[B+ ->  K+ ^pi-  pi+]CC"  : "TrackIsoBDTpi1",
+                                             "[B+ ->  K+  pi- ^pi+]CC"  : "TrackIsoBDTpi2",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables"  : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[B+ -> ^K+  pi-  pi+]CC"  : "BsMuMuTrackIsoK",
+                                             "[B+ ->  K+ ^pi-  pi+]CC"  : "BsMuMuTrackIsopi1",
+                                             "[B+ ->  K+  pi- ^pi+]CC"  : "BsMuMuTrackIsopi2",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                         ) # closes Strippingline 
+
+####################################################################################################### 
+### Lb -> D(s)+ mu-
+####################################################################################################### 
+ 
+        self.Lb2DmuLine = StrippingLine(Lb2Dmu_name+"Line",
+                                        prescale = config["Lb2DmuPrescale"],
+                                        postscale = config["Postscale"],
+                                        MDSTFlag = config["MDSTflag"],
+                                        selection = self.selLb2Dmu,
+                                        RelatedInfoTools = [                                        
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (D+ -> ^K-  pi+  pi+)  l]CC"  : "ConeIso05K",
+                                             "[Lambda_b0 -> (D+ ->  K- ^pi+  pi+)  l]CC"  : "ConeIso05pi1",
+                                             "[Lambda_b0 -> (D+ ->  K-  pi+ ^pi+)  l]CC"  : "ConeIso05pi2",
+                                             "[Lambda_b0 -> (D+ ->  K-  pi+  pi+) ^l]CC"  : "ConeIso05mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (D+ -> ^K-  pi+  pi+)  l]CC"  : "ConeIso10K",
+                                             "[Lambda_b0 -> (D+ ->  K- ^pi+  pi+)  l]CC"  : "ConeIso10pi1",
+                                             "[Lambda_b0 -> (D+ ->  K-  pi+ ^pi+)  l]CC"  : "ConeIso10pi2",
+                                             "[Lambda_b0 -> (D+ ->  K-  pi+  pi+) ^l]CC"  : "ConeIso10mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (D+ -> ^K-  pi+  pi+)  l]CC"  : "ConeIso15K",
+                                             "[Lambda_b0 -> (D+ ->  K- ^pi+  pi+)  l]CC"  : "ConeIso15pi1",
+                                             "[Lambda_b0 -> (D+ ->  K-  pi+ ^pi+)  l]CC"  : "ConeIso15pi2",
+                                             "[Lambda_b0 -> (D+ ->  K-  pi+  pi+) ^l]CC"  : "ConeIso15mu",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (D+ -> ^K-  pi+  pi+)  l]CC"  : "TrackIsoBDTK",
+                                             "[Lambda_b0 -> (D+ ->  K- ^pi+  pi+)  l]CC"  : "TrackIsoBDTpi1",
+                                             "[Lambda_b0 -> (D+ ->  K-  pi+ ^pi+)  l]CC"  : "TrackIsoBDTpi2",
+                                             "[Lambda_b0 -> (D+ ->  K-  pi+  pi+) ^l]CC"  : "TrackIsoBDTmu",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (D+ -> ^K-  pi+  pi+)  l]CC"  : "BsMuMuTrackIsoK",
+                                             "[Lambda_b0 -> (D+ ->  K- ^pi+  pi+)  l]CC"  : "BsMuMuTrackIsopi1",
+                                             "[Lambda_b0 -> (D+ ->  K-  pi+ ^pi+)  l]CC"  : "BsMuMuTrackIsopi2",
+                                             "[Lambda_b0 -> (D+ ->  K-  pi+  pi+) ^l]CC"  : "BsMuMuTrackIsomu",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools
+                                         ) # closes Strippingline
+
+        self.Lb2DsmuLine = StrippingLine(Lb2Dsmu_name+"Line",
+                                         prescale = config["Lb2DsmuPrescale"],
+                                         postscale = config["Postscale"],
+                                         MDSTFlag = config["MDSTflag"],
+                                         selection = self.selLb2Dsmu,
+                                         RelatedInfoTools = [                                        
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (D_s+ -> ^K-  K+  pi+)  l]CC"  : "ConeIso05K1",
+                                             "[Lambda_b0 -> (D_s+ ->  K- ^K+  pi+)  l]CC"  : "ConeIso05K2",
+                                             "[Lambda_b0 -> (D_s+ ->  K-  K+ ^pi+)  l]CC"  : "ConeIso05pi",
+                                             "[Lambda_b0 -> (D_s+ ->  K-  K+  pi+) ^l]CC"  : "ConeIso05mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (D_s+ -> ^K-  K+  pi+)  l]CC"  : "ConeIso10K1",
+                                             "[Lambda_b0 -> (D_s+ ->  K- ^K+  pi+)  l]CC"  : "ConeIso10K2",
+                                             "[Lambda_b0 -> (D_s+ ->  K-  K+ ^pi+)  l]CC"  : "ConeIso10pi",
+                                             "[Lambda_b0 -> (D_s+ ->  K-  K+  pi+) ^l]CC"  : "ConeIso10mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (D_s+ -> ^K-  K+  pi+)  l]CC"  : "ConeIso15K1",
+                                             "[Lambda_b0 -> (D_s+ ->  K- ^K+  pi+)  l]CC"  : "ConeIso15K2",
+                                             "[Lambda_b0 -> (D_s+ ->  K-  K+ ^pi+)  l]CC"  : "ConeIso15pi",
+                                             "[Lambda_b0 -> (D_s+ ->  K-  K+  pi+) ^l]CC"  : "ConeIso15mu",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (D_s+ -> ^K-  K+  pi+)  l]CC"  : "TrackIsoBDTK1",
+                                             "[Lambda_b0 -> (D_s+ ->  K- ^K+  pi+)  l]CC"  : "TrackIsoBDTK2",
+                                             "[Lambda_b0 -> (D_s+ ->  K-  K+ ^pi+)  l]CC"  : "TrackIsoBDTpi",
+                                             "[Lambda_b0 -> (D_s+ ->  K-  K+  pi+) ^l]CC"  : "TrackIsoBDTmu",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (D_s+ -> ^K-  K+  pi+)  l]CC"  : "BsMuMuTrackIsoK1",
+                                             "[Lambda_b0 -> (D_s+ ->  K- ^K+  pi+)  l]CC"  : "BsMuMuTrackIsoK2",
+                                             "[Lambda_b0 -> (D_s+ ->  K-  K+ ^pi+)  l]CC"  : "BsMuMuTrackIsopi",
+                                             "[Lambda_b0 -> (D_s+ ->  K-  K+  pi+) ^l]CC"  : "BsMuMuTrackIsomu",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools
+                                         ) # closes Strippingline                                         
+
+        self.Lb2LcpiLine = StrippingLine(Lb2Lcpi_name+"Line",
+                                         prescale = config["Lb2LcpiPrescale"],
+                                         postscale = config["Postscale"],
+                                         MDSTFlag = config["MDSTflag"],
+                                         selection = self.selLb2Lcpi,
+                                         RelatedInfoTools = [                                        
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (Lambda_c+ -> ^K-  p+  pi+)  pi-]CC"  : "ConeIso05K",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K- ^p+  pi+)  pi-]CC"  : "ConeIso05p",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K-  p+ ^pi+)  pi-]CC"  : "ConeIso05pi1",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K-  p+  pi+) ^pi-]CC"  : "ConeIso05pi2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (Lambda_c+ -> ^K-  p+  pi+)  pi-]CC"  : "ConeIso10K",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K- ^p+  pi+)  pi-]CC"  : "ConeIso10p",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K-  p+ ^pi+)  pi-]CC"  : "ConeIso10pi1",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K-  p+  pi+) ^pi-]CC"  : "ConeIso10pi2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lb',
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (Lambda_c+ -> ^K-  p+  pi+)  pi-]CC"  : "ConeIso15K",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K- ^p+  pi+)  pi-]CC"  : "ConeIso15p",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K-  p+ ^pi+)  pi-]CC"  : "ConeIso15pi1",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K-  p+  pi+) ^pi-]CC"  : "ConeIso15pi2",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (Lambda_c+ -> ^K-  p+  pi+)  pi-]CC"  : "TrackIsoBDTK",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K- ^p+  pi+)  pi-]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K-  p+ ^pi+)  pi-]CC"  : "TrackIsoBDTpi1",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K-  p+  pi+) ^pi-]CC"  : "TrackIsoBDTpi2",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_b0 -> (Lambda_c+ -> ^K-  p+  pi+)  pi-]CC"  : "BsMuMuTrackIsoK",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K- ^p+  pi+)  pi-]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K-  p+ ^pi+)  pi-]CC"  : "BsMuMuTrackIsopi1",
+                                             "[Lambda_b0 -> (Lambda_c+ ->  K-  p+  pi+) ^pi-]CC"  : "BsMuMuTrackIsopi2",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                         ) # closes Strippingline 
+
+####################################################################################################### 
+### B(s)0 -> Lc+ mu-
+####################################################################################################### 
+
+        self.b2LcmuLine = StrippingLine(B2Lcmu_name+"Line",
+                                        prescale = config["B2LcmuPrescale"],
+                                        postscale = config["Postscale"],
+                                        MDSTFlag = config["MDSTflag"],
+                                        selection = self.selB2Lcmu,
+                                        RelatedInfoTools = [
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05B0',
+                                             "DaughterLocations" : {
+                                             "[B0 -> (Lambda_c+ -> ^K-  p+  pi+)  l]CC"  : "ConeIso05K",
+                                             "[B0 -> (Lambda_c+ ->  K- ^p+  pi+)  l]CC"  : "ConeIso05p",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+ ^pi+)  l]CC"  : "ConeIso05pi",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+  pi+) ^l]CC"  : "ConeIso05mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10B0',
+                                             "DaughterLocations" : {
+                                             "[B0 -> (Lambda_c+ -> ^K-  p+  pi+)  l]CC"  : "ConeIso10K",
+                                             "[B0 -> (Lambda_c+ ->  K- ^p+  pi+)  l]CC"  : "ConeIso10p",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+ ^pi+)  l]CC"  : "ConeIso10pi",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+  pi+) ^l]CC"  : "ConeIso10mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15B0',
+                                             "DaughterLocations" : {
+                                             "[B0 -> (Lambda_c+ -> ^K-  p+  pi+)  l]CC"  : "ConeIso15K",
+                                             "[B0 -> (Lambda_c+ ->  K- ^p+  pi+)  l]CC"  : "ConeIso15p",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+ ^pi+)  l]CC"  : "ConeIso15pi",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+  pi+) ^l]CC"  : "ConeIso15mu",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[B0 -> (Lambda_c+ -> ^K-  p+  pi+)  l]CC"  : "TrackIsoBDTK",
+                                             "[B0 -> (Lambda_c+ ->  K- ^p+  pi+)  l]CC"  : "TrackIsoBDTp",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+ ^pi+)  l]CC"  : "TrackIsoBDTpi",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+  pi+) ^l]CC"  : "TrackIsoBDTmu",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[B0 -> (Lambda_c+ -> ^K-  p+  pi+)  l]CC"  : "BsMuMuTrackIsoK",
+                                             "[B0 -> (Lambda_c+ ->  K- ^p+  pi+)  l]CC"  : "BsMuMuTrackIsop",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+ ^pi+)  l]CC"  : "BsMuMuTrackIsopi",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+  pi+) ^l]CC"  : "BsMuMuTrackIsomu",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                         ) # closes Strippingline 
+
+        self.B2DpiLine = StrippingLine(B2Dpi_name+"Line",
+                                       prescale = config["B2DpiPrescale"],
+                                       postscale = config["Postscale"],
+                                       MDSTFlag = config["MDSTflag"],
+                                       selection = self.selB2Dpi,
+                                       RelatedInfoTools = [                                        
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05B0',
+                                             "DaughterLocations" : {
+                                             "[B0 -> (D- -> ^K+  pi-  pi-)  pi+]CC"  : "ConeIso05K",
+                                             "[B0 -> (D- ->  K+ ^pi-  pi-)  pi+]CC"  : "ConeIso05pi1",
+                                             "[B0 -> (D- ->  K+  pi- ^pi-)  pi+]CC"  : "ConeIso05pi2",
+                                             "[B0 -> (D- ->  K+  pi-  pi-) ^pi+]CC"  : "ConeIso05pi3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10B0',
+                                             "DaughterLocations" : {
+                                             "[B0 -> (D- -> ^K+  pi-  pi-)  pi+]CC"  : "ConeIso10K",
+                                             "[B0 -> (D- ->  K+ ^pi-  pi-)  pi+]CC"  : "ConeIso10pi1",
+                                             "[B0 -> (D- ->  K+  pi- ^pi-)  pi+]CC"  : "ConeIso10pi2",
+                                             "[B0 -> (D- ->  K+  pi-  pi-) ^pi+]CC"  : "ConeIso10pi3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15B0',
+                                             "DaughterLocations" : {
+                                             "[B0 -> (D- -> ^K+  pi-  pi-)  pi+]CC"  : "ConeIso15K",
+                                             "[B0 -> (D- ->  K+ ^pi-  pi-)  pi+]CC"  : "ConeIso15pi1",
+                                             "[B0 -> (D- ->  K+  pi- ^pi-)  pi+]CC"  : "ConeIso15pi2",
+                                             "[B0 -> (D- ->  K+  pi-  pi-) ^pi+]CC"  : "ConeIso15pi3",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[B0 -> (D- -> ^K+  pi-  pi-)  pi+]CC"  : "TrackIsoBDTK",
+                                             "[B0 -> (D- ->  K+ ^pi-  pi-)  pi+]CC"  : "TrackIsoBDTpi1",
+                                             "[B0 -> (D- ->  K+  pi- ^pi-)  pi+]CC"  : "TrackIsoBDTpi2",
+                                             "[B0 -> (D- ->  K+  pi-  pi-) ^pi+]CC"  : "TrackIsoBDTpi3",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[B0 -> (D- -> ^K+  pi-  pi-)  pi+]CC"  : "BsMuMuTrackIsoK",
+                                             "[B0 -> (D- ->  K+ ^pi-  pi-)  pi+]CC"  : "BsMuMuTrackIsopi1",
+                                             "[B0 -> (D- ->  K+  pi- ^pi-)  pi+]CC"  : "BsMuMuTrackIsopi2",
+                                             "[B0 -> (D- ->  K+  pi-  pi-) ^pi+]CC"  : "BsMuMuTrackIsopi3",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools
+                                         ) # closes Strippingline 
+
+        self.Bs2DspiLine = StrippingLine(Bs2Dspi_name+"Line",
+                                         prescale = config["Bs2DspiPrescale"],
+                                         postscale = config["Postscale"],
+                                         MDSTFlag = config["MDSTflag"],
+                                         selection = self.selBs2Dspi,
+                                         RelatedInfoTools = [                                        
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Bs',
+                                             "DaughterLocations" : {
+                                             "[B_s0 -> (D_s- -> ^K+  K-  pi-)  pi+]CC"  : "ConeIso05K1",
+                                             "[B_s0 -> (D_s- ->  K+ ^K-  pi-)  pi+]CC"  : "ConeIso05K2",
+                                             "[B_s0 -> (D_s- ->  K+  K- ^pi-)  pi+]CC"  : "ConeIso05pi1",
+                                             "[B_s0 -> (D_s- ->  K+  K-  pi-) ^pi+]CC"  : "ConeIso05pi2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Bs',
+                                             "DaughterLocations" : {
+                                             "[B_s0 -> (D_s- -> ^K+  K-  pi-)  pi+]CC"  : "ConeIso10K1",
+                                             "[B_s0 -> (D_s- ->  K+ ^K-  pi-)  pi+]CC"  : "ConeIso10K2",
+                                             "[B_s0 -> (D_s- ->  K+  K- ^pi-)  pi+]CC"  : "ConeIso10pi1",
+                                             "[B_s0 -> (D_s- ->  K+  K-  pi-) ^pi+]CC"  : "ConeIso10pi2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Bs',
+                                             "DaughterLocations" : {
+                                             "[B_s0 -> (D_s- -> ^K+  K-  pi-)  pi+]CC"  : "ConeIso15K1",
+                                             "[B_s0 -> (D_s- ->  K+ ^K-  pi-)  pi+]CC"  : "ConeIso15K2",
+                                             "[B_s0 -> (D_s- ->  K+  K- ^pi-)  pi+]CC"  : "ConeIso15pi1",
+                                             "[B_s0 -> (D_s- ->  K+  K-  pi-) ^pi+]CC"  : "ConeIso15pi2",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[B_s0 -> (D_s- -> ^K+  K-  pi-)  pi+]CC"  : "TrackIsoBDTK1",
+                                             "[B_s0 -> (D_s- ->  K+ ^K-  pi-)  pi+]CC"  : "TrackIsoBDTK2",
+                                             "[B_s0 -> (D_s- ->  K+  K- ^pi-)  pi+]CC"  : "TrackIsoBDTpi1",
+                                             "[B_s0 -> (D_s- ->  K+  K-  pi-) ^pi+]CC"  : "TrackIsoBDTpi2",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[B_s0 -> (D_s- -> ^K+  K-  pi-)  pi+]CC"  : "BsMuMuTrackIsoK1",
+                                             "[B_s0 -> (D_s- ->  K+ ^K-  pi-)  pi+]CC"  : "BsMuMuTrackIsoK2",
+                                             "[B_s0 -> (D_s- ->  K+  K- ^pi-)  pi+]CC"  : "BsMuMuTrackIsopi1",
+                                             "[B_s0 -> (D_s- ->  K+  K-  pi-) ^pi+]CC"  : "BsMuMuTrackIsopi2",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools
+                                         ) # closes Strippingline                                          
+                                                                                                      
+        self.b2LcpLine = StrippingLine(B2Lcp_name+"Line",                                           
+                                       prescale = config["B2LcpPrescale"], 
+                                       postscale = config["Postscale"],
+                                       MDSTFlag = config["MDSTflag"],
+                                       selection = self.selB2Lcp,
+                                       RelatedInfoTools = [                                        
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05B0',
+                                             "DaughterLocations" : {
+                                             "[B0 -> (Lambda_c+ -> ^K-  p+  pi+)  X]CC"  : "ConeIso05K",
+                                             "[B0 -> (Lambda_c+ ->  K- ^p+  pi+)  X]CC"  : "ConeIso05p1",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+ ^pi+)  X]CC"  : "ConeIso05pi",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+  pi+) ^X]CC"  : "ConeIso05p2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10B0',
+                                             "DaughterLocations" : {
+                                             "[B0 -> (Lambda_c+ -> ^K-  p+  pi+)  X]CC"  : "ConeIso10K",
+                                             "[B0 -> (Lambda_c+ ->  K- ^p+  pi+)  X]CC"  : "ConeIso10p1",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+ ^pi+)  X]CC"  : "ConeIso10pi",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+  pi+) ^X]CC"  : "ConeIso10p2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15B0',
+                                             "DaughterLocations" : {
+                                             "[B0 -> (Lambda_c+ -> ^K-  p+  pi+)  X]CC"  : "ConeIso15K",
+                                             "[B0 -> (Lambda_c+ ->  K- ^p+  pi+)  X]CC"  : "ConeIso15p1",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+ ^pi+)  X]CC"  : "ConeIso15pi",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+  pi+) ^X]CC"  : "ConeIso15p2",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[B0 -> (Lambda_c+ -> ^K-  p+  pi+)  X]CC"  : "TrackIsoBDTK",
+                                             "[B0 -> (Lambda_c+ ->  K- ^p+  pi+)  X]CC"  : "TrackIsoBDTp1",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+ ^pi+)  X]CC"  : "TrackIsoBDTpi",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+  pi+) ^X]CC"  : "TrackIsoBDTp2",
+                                             }, },
+                                           { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[B0 -> (Lambda_c+ -> ^K-  p+  pi+)  X]CC"  : "BsMuMuTrackIsoK",
+                                             "[B0 -> (Lambda_c+ ->  K- ^p+  pi+)  X]CC"  : "BsMuMuTrackIsop1",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+ ^pi+)  X]CC"  : "BsMuMuTrackIsopi",
+                                             "[B0 -> (Lambda_c+ ->  K-  p+  pi+) ^X]CC"  : "BsMuMuTrackIsop2",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                         ) # closes Strippingline 
+        
+####################################################################################################### 
+
+        ### Lambda_(b)0 -> K- mu+ 
+        self.registerLine(self.La2KmuLine)
+        self.registerLine(self.Lb2KmuLine)
+
+        ### Xi_b- -> K*0 mu-
+        self.registerLine(self.Xib2KhmuLine) 
+        self.registerLine(self.B2KhhLine)
+
+        ### Lb -> D(s)+ mu-
+        self.registerLine(self.Lb2DmuLine)
+        self.registerLine(self.Lb2DsmuLine)
+        self.registerLine(self.Lb2LcpiLine)
+
+        ### B(s)0 -> Lc+ mu-
+        self.registerLine(self.b2LcmuLine)
+        self.registerLine(self.B2DpiLine)
+        self.registerLine(self.Bs2DspiLine)        
+        self.registerLine(self.b2LcpLine)
+
+#######################################################################################################
+
+    def makeLa2Kmu(self,name):
+    
+        La2Kmu = CombineParticles("Combine"+name)
+        La2Kmu.DecayDescriptors = [ "[Lambda0 -> K+ mu-]cc","[Lambda0 -> K+ mu+]cc" ]
+        La2Kmu.DaughtersCuts = { "K+" : self.TrackCuts + " & ((PIDK-PIDpi)>5)" + " & ((PIDK-PIDp)>0)",
+                                 "mu-" : self.TrackCuts }
+                             
+        La2Kmu.CombinationCut = self.La2KmuCombinationCut  
+        La2Kmu.MotherCut      = self.La2KmuMotherCut
+
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+        _myKaons = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")
+    
+        return Selection (name, Algorithm = La2Kmu, RequiredSelections = [ _myKaons, _myMuons ])
+
+#######################################################################################################
+
+    def makeLb2Kmu(self,name):
+    
+        Lb2Kmu = CombineParticles("Combine"+name)
+        Lb2Kmu.DecayDescriptors = [ "[Lambda_b0 -> K+ mu-]cc","[Lambda_b0 -> K+ mu+]cc" ]
+        Lb2Kmu.DaughtersCuts = { "K+" : self.TrackCuts + " & ((PIDK-PIDpi)>0)",
+                                 "mu+" : self.TrackCuts }
+
+        Lb2Kmu.CombinationCut = self.Lb2KmuCombinationCut
+        Lb2Kmu.MotherCut      = self.Lb2KmuMotherCut
+ 
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+        _myKaons = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")
+    
+        return Selection (name, Algorithm = Lb2Kmu, RequiredSelections = [ _myKaons, _myMuons ])
+
+#######################################################################################################
+### Xi_b- -> K*0 mu-
+####################################################################################################### 
+
+    def makeXib2Khmu(self,name):
+    
+        Xib2Khmu = DaVinci__N3BodyDecays("Combine"+name)
+        Xib2Khmu.DecayDescriptors = [ "[Xi_b- -> K+ pi- mu-]cc","[Xi_b- -> K- pi+ mu-]cc","[Xi_b- -> K- pi- mu+]cc" ]
+        Xib2Khmu.DaughtersCuts = { "K+"  : self.TrackCuts + " & ((PIDK-PIDpi)>0)",
+                                   "pi-" : self.TrackCuts,
+                                   "mu-" : self.TrackCuts }
+
+        Xib2Khmu.Combination12Cut = self.Xib2KhmuCombination12Cut
+        Xib2Khmu.CombinationCut   = self.Xib2KhmuCombinationCut
+        Xib2Khmu.MotherCut        = self.Xib2KhmuMotherCut
+ 
+        _myKaons = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")
+        _myPions = DataOnDemand(Location = "Phys/StdNoPIDsPions/Particles")
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")    
+    
+        return Selection (name, Algorithm = Xib2Khmu, RequiredSelections = [ _myKaons, _myPions, _myMuons ])
+
+#######################################################################################################
+
+    def makeB2Khh(self,name):
+    
+        B2Khh = DaVinci__N3BodyDecays("Combine"+name)
+        B2Khh.DecayDescriptors = [ "[B+ -> K+ pi- pi+]cc" ]
+        B2Khh.DaughtersCuts = { "K+"  : self.TrackCuts + " & ((PIDK-PIDpi)>0)",
+                                "pi-" : self.TrackCuts }
+
+        B2Khh.Combination12Cut = self.Xib2KhmuCombination12Cut
+        B2Khh.CombinationCut   = self.Xib2KhmuCombinationCut
+        B2Khh.MotherCut        = self.Bu2KhhMotherCut
+    
+        _myKaons = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")
+        _myPions = DataOnDemand(Location = "Phys/StdNoPIDsPions/Particles")    
+    
+        return Selection (name, Algorithm = B2Khh, RequiredSelections = [ _myKaons, _myPions ])
+
+####################################################################################################### 
+### Lb -> D(s)+ mu- 
+####################################################################################################### 
+
+    def makeLb2Dmu(self,name):
+    
+        Lb2Dmu = CombineParticles("Combine"+name)
+        Lb2Dmu.DecayDescriptors = [ "[Lambda_b0 -> D+ mu-]cc","[Lambda_b0 -> D+ mu+]cc" ]
+        Lb2Dmu.DaughtersCuts = { "D+" : self.DCut, "mu-" : self.TrackCuts }
+
+        Lb2Dmu.CombinationCut = self.Lb2DmuCombinationCut
+        Lb2Dmu.MotherCut      = self.Lb2DmuMotherCut
+
+        _myDplus = DataOnDemand(Location = "Phys/StdLooseDplus2KPiPi/Particles")
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+   
+        return Selection (name, Algorithm = Lb2Dmu, RequiredSelections = [ _myDplus, _myMuons ])
+ 
+#######################################################################################################
+
+    def makeLb2Dsmu(self,name):
+    
+        Lb2Dsmu = CombineParticles("Combine"+name)
+        Lb2Dsmu.DecayDescriptors = [ "[Lambda_b0 -> D_s+ mu-]cc","[Lambda_b0 -> D_s+ mu+]cc" ]
+        Lb2Dsmu.DaughtersCuts = { "D_s+" : self.DsCut, "mu-" : self.TrackCuts } 
+
+        Lb2Dsmu.CombinationCut = self.Lb2DmuCombinationCut
+        Lb2Dsmu.MotherCut      = self.Lb2DmuMotherCut
+
+        _myDsplus = DataOnDemand(Location = "Phys/StdLooseDsplus2KKPi/Particles")
+        _myMuons  = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    
+        return Selection (name, Algorithm = Lb2Dsmu, RequiredSelections = [ _myDsplus, _myMuons ])
+
+#######################################################################################################
+
+    def makeLb2Lcpi(self,name):
+    
+        Lb2Lcpi = CombineParticles("Combine"+name)
+        Lb2Lcpi.DecayDescriptors = [ "[Lambda_b0 -> Lambda_c+ pi-]cc" ]
+        Lb2Lcpi.DaughtersCuts = { "pi-" : self.TrackCuts }
+
+        Lb2Lcpi.CombinationCut = self.Lb2DmuCombinationCut
+        Lb2Lcpi.MotherCut      = self.Lb2DmuMotherCut    
+ 
+        _myLambdaC = DataOnDemand(Location = "Phys/StdLooseLambdac2PKPi/Particles")
+        _myPions   = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+    
+        return Selection (name, Algorithm = Lb2Lcpi, RequiredSelections = [ _myLambdaC, _myPions ])
+
+####################################################################################################### 
+### B(s)0 -> Lc+ mu-
+####################################################################################################### 
+
+    def makeB2Lcmu(self,name):
+    
+        B2Lcmu = CombineParticles("Combine"+name)
+        B2Lcmu.DecayDescriptors = [ "[B0 -> Lambda_c+ mu-]cc","[B0 -> Lambda_c+ mu+]cc" ]
+        B2Lcmu.DaughtersCuts = { "mu-" : self.TrackCuts }
+
+        B2Lcmu.CombinationCut = self.B2LcmuCombinationCut
+        B2Lcmu.MotherCut      = self.B2LcmuMotherCut
+
+        _myLambdaC = DataOnDemand(Location = "Phys/StdLooseLambdac2PKPi/Particles")
+        _myMuons   = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    
+        return Selection (name, Algorithm = B2Lcmu, RequiredSelections = [ _myLambdaC, _myMuons ])
+
+#######################################################################################################
+
+    def makeB2Lcp(self,name):
+
+        B2Lcp = CombineParticles("Combine"+name)
+        B2Lcp.DecayDescriptors = [ "[B0 -> Lambda_c+ p~-]cc","[B0 -> Lambda_c+ p+]cc" ]
+        B2Lcp.DaughtersCuts = { "p~-" : self.TrackCuts + "& (PIDp>5)"}
+
+        B2Lcp.CombinationCut = self.B2LcmuCombinationCut
+        B2Lcp.MotherCut      = self.B2LcmuMotherCut
+
+        _myLambdaC = DataOnDemand(Location = "Phys/StdLooseLambdac2PKPi/Particles")
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+
+        return Selection (name, Algorithm = B2Lcp, RequiredSelections = [ _myLambdaC, _myProtons ])
+
+#######################################################################################################
+
+    def makeB2Dpi(self,name):
+    
+        B2Dpi = CombineParticles("Combine"+name)
+        B2Dpi.DecayDescriptors = [ "[B0 -> D- pi+]cc" ]
+        B2Dpi.DaughtersCuts = { "pi+" : self.TrackCuts, "D-" : self.DCut }
+
+        B2Dpi.CombinationCut = self.Bd2DpiCombinationCut
+        B2Dpi.MotherCut      = self.Bd2DpiMotherCut
+
+        _myDplus = DataOnDemand(Location = "Phys/StdLooseDplus2KPiPi/Particles")
+        _myPions = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+    
+        return Selection (name, Algorithm = B2Dpi, RequiredSelections = [ _myDplus, _myPions ])
+
+#######################################################################################################
+
+    def makeBs2Dspi(self,name):
+    
+        Bs2Dspi = CombineParticles("Combine"+name)
+        Bs2Dspi.DecayDescriptors = [ "[B_s0 -> D_s- pi+]cc" ]
+        Bs2Dspi.DaughtersCuts = { "pi+" : self.TrackCuts, "D_s-" : self.DsCut }
+    
+        Bs2Dspi.CombinationCut = self.Bs2DspiCombinationCut
+        Bs2Dspi.MotherCut      = self.Bs2DspiMotherCut
+
+        _myDsplus = DataOnDemand(Location = "Phys/StdLooseDsplus2KKPi/Particles")
+        _myPions  = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+    
+        return Selection (name, Algorithm = Bs2Dspi, RequiredSelections = [ _myDsplus, _myPions ])
+
+#######################################################################################################
+#######################################################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBaryonicLFV.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBaryonicLFV.py
new file mode 100644
index 000000000..0021f4c73
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBaryonicLFV.py
@@ -0,0 +1,904 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of baryonic lepton-flavor (and baryon-number) violating stripping selections and lines
+Template partially borrowed from tau->3mu lines.
+
+Channels included (several cahrge combinations each, unless specified):
+Xi_b -> 3mu
+Xi_b -> 5mu
+Xi_b -> 2mue
+Xi_b -> 2mutau
+Xi_b -> emutau
+Xi_b -> Delta++ mu-mu-mu-
+B0 -> p+p+ mu-mu-
+B0 -> p+p+p+ mu-mu-mu-
+Xib- -> pi+pi+ mu-mu-mu- (also KK)
+Xib0 -> pi+pi+pi+ mu-mu-mu- (also KKK)
+'''
+
+__author__ = ['Vitalii Lisovskyi']
+__date__ = '28/02/2021'
+__version__ = '$Revision: 0.0 $'
+
+__all__ = ( 'BaryonicLFVConf', 'default_config' )
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays as Combine3Particles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N5BodyDecays as Combine5Particles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.PhysicalConstants import c_light
+
+default_config = {
+    'NAME'        : 'BaryonicLFV',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'BaryonicLFVConf',
+    'CONFIG'      : {
+    'BaryLFVPrescale'      :1.,
+    'BaryLFVPostscale'     :1.,
+    'ProbNNCutTight'       : 0.1,
+    'PTCut'                : 250,
+    'ProtonP'              : 5000,
+    'DiHadronMassTight'    : 2600,
+    'DiHadronMassLoose'    : 6000,
+    'DiHadronVtxCHI2'      : 25,
+    'DiHadronADOCACHI2'    : 30,
+    'HadronIPCHI2'           : 9,
+    'TrackGhostProb'           :0.4
+},
+    #'STREAMS' : [ 'Dimuon' ]
+      'STREAMS'     : { 'Leptonic' : ['StrippingBaryonicLFVXib23MuLooseLine'],
+                        'Dimuon' : ['StrippingBaryonicLFVXib22MuTauLine','StrippingBaryonicLFVXib22ETauLine','StrippingBaryonicLFVXib2EMuTauLine','StrippingBaryonicLFVXib23MuLine','StrippingBaryonicLFVXib25MuLine','StrippingBaryonicLFVXib22MuELine','StrippingBaryonicLFVppmumuSSLine','StrippingBaryonicLFV3p3muSSLine','StrippingBaryonicLFVDelta3muSSLine','StrippingBaryonicLFVpipi3muSSLine','StrippingBaryonicLFVpipipi3muSSLine']}
+     #}
+
+    }
+
+
+
+class BaryonicLFVConf(LineBuilder) :
+    """
+    Builder
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        self.name = name
+        self.__confdict__ = config
+
+
+        LineBuilder.__init__(self, name, config)
+
+        Xib3mu_name=name+'Xib23Mu'
+        Xib3mu_name_loose=name+'Xib23MuLoose'
+        Xib2mue_name=name+'Xib22MuE'
+        Xib2mutau_name=name+'Xib22MuTau'
+        Xib2emutau_name=name+'Xib2EMuTau'
+        Xib2etau_name=name+'Xib22ETau'
+        Xib5mu_name=name+'Xib25Mu'
+        B2ppmm_name=name+'ppmumuSS'
+        B23p3m_name=name+'3p3muSS'
+        B2Delta3m_name=name+'Delta3muSS'
+        B2pipi3m_name=name+'pipi3muSS'
+        B2pipipi3m_name=name+'pipipi3muSS'
+
+
+        selXib23Mu = makeXib23Mu(Xib3mu_name,config)
+        selXib23MuLoose = makeXib23MuLoose(Xib3mu_name_loose,config)
+        selXib22MuE = makeXib22MuE(Xib2mue_name,config)
+        selXib22MuTau = makeXib22MuTau(Xib2mutau_name,config)
+        selXib22ETau = makeXib22ETau(Xib2etau_name,config)
+        selXib22EMuTau = makeXib2EMuTau(Xib2emutau_name,config)
+        selXib25Mu = makeXib25Mu(Xib5mu_name,config)
+
+        selMuMuSS = _makeMuMuSS("MuMuSSFor"+name,config)
+        sel3MuSS = _make3MuSS("3MuSSFor"+name,config)
+        selppSS = _makeppSS("ppSSFor"+name,config)
+        sel3pSS = _make3pSS("3pSSFor"+name,config)
+        selDeltaSS = _makeDeltaSS("DeltaSSFor"+name,config)
+        selpipiSS = _makepipiSS("pipiSSFor"+name,config)
+        selpipipiSS = _makepipipiSS("pipipiSSFor"+name,config)
+        selKKSS = _makeKKSS("KKSSFor"+name,config)
+        selKKKSS = _makeKKKSS("KKKSSFor"+name,config)
+
+        selB2ppmm = _makeppmumu("ppmmFor"+name,selMuMuSS,selppSS,config)
+        selB23p3m = _make3p3mu("3p3mFor"+name,sel3MuSS,sel3pSS,config)
+        selB2Delta3m = _makeDeltapp3mu("Delta3mFor"+name,sel3MuSS,selDeltaSS,config)
+        selB2pipi3m = _makepipi3mu("pipi3mFor"+name,sel3MuSS,selpipiSS,selKKSS,config)
+        selB2pipipi3m = _makepipipi3mu("pipipi3mFor"+name,sel3MuSS,selpipipiSS,selKKKSS,config)
+
+
+        self.Xib23MuLine = StrippingLine(Xib3mu_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selXib23Mu,
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Xi_b- -> ^mu+ mu- mu- ]CC" : "Muon1BDT",
+                                         "[ Xi_b- -> mu+ ^mu- mu- ]CC" : "Muon2BDT",
+                                         "[ Xi_b- -> mu+ mu- ^mu- ]CC" : "Muon3BDT"}
+                                         },
+                                     ],
+                                     MDSTFlag = False )
+
+        self.Xib23MuLooseLine = StrippingLine(Xib3mu_name_loose+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selXib23MuLoose,
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> ^l l l ]CC" : "Muon1BDT",
+                                         "[ Beauty -> l ^l l ]CC" : "Muon2BDT",
+                                         "[ Beauty -> l l ^l ]CC" : "Muon3BDT",
+                                         }
+                                     },
+                                     ],
+                                     MDSTFlag = False )
+
+        self.Xib22MuELine = StrippingLine(Xib2mue_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selXib22MuE,
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> ^[mu+]cc [mu+]cc [e+]cc ]CC" : "Muon1BDT",
+                                         "[ Beauty -> [mu+]cc ^[mu+]cc [e+]cc ]CC" : "Muon2BDT",
+                                         # "[ Beauty -> X ^X X ]CC" : "Muon2BDT",
+                                         # "[ Beauty -> X X ^X ]CC" : "Muon3BDT",
+                                         }
+                                     },
+                                     ],
+                                     MDSTFlag = False )
+
+        self.Xib22MuTauLine = StrippingLine(Xib2mutau_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selXib22MuTau,
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> ^StableCharged StableCharged l ]CC" : "Muon1BDT",
+                                         "[ Beauty -> StableCharged ^StableCharged l ]CC" : "Muon2BDT",
+                                         #"[ Beauty -> StableCharged StableCharged ^l ]CC" : "Muon3BDT",
+                                         }
+                                     },
+                                     ],
+                                     MDSTFlag = False )
+
+        self.Xib22ETauLine = StrippingLine(Xib2etau_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selXib22ETau,
+                                     MDSTFlag = False )
+
+        self.Xib2EMuTauLine = StrippingLine(Xib2emutau_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selXib22EMuTau,
+                                     MDSTFlag = False )
+
+        self.Xib25MuLine = StrippingLine(Xib5mu_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selXib25Mu,
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Xi_b- -> ^X X X X X ]CC" : "Muon1BDT",
+                                         "[ Xi_b- -> X ^X X X X ]CC" : "Muon2BDT",
+                                         "[ Xi_b- -> X X ^X X X ]CC" : "Muon3BDT",
+                                         "[ Xi_b- -> X X X ^X X ]CC" : "Muon4BDT",
+                                         "[ Xi_b- -> X X X X ^X ]CC" : "Muon5BDT"}
+                                         },
+                                     ],
+                                     MDSTFlag = False )
+
+        self.B2ppmmLine = StrippingLine(B2ppmm_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selB2ppmm,
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> X (X -> ^mu- mu-) ]CC" : "Muon1BDT",
+                                         "[ Beauty -> X (X -> mu- ^mu-) ]CC" : "Muon2BDT",
+                                         }
+                                     },
+                                     ],
+                                     MDSTFlag = False )
+
+        self.B23p3mLine = StrippingLine(B23p3m_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selB23p3m,
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> X (X -> ^mu- mu- mu-) ]CC" : "Muon1BDT",
+                                         "[ Beauty -> X (X -> mu- ^mu- mu-) ]CC" : "Muon2BDT",
+                                         "[ Beauty -> X (X -> mu- mu- ^mu-) ]CC" : "Muon3BDT",
+                                         }
+                                     },
+                                     ],
+                                     MDSTFlag = False )
+
+        self.B2Delta3mLine = StrippingLine(B2Delta3m_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selB2Delta3m,
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> X (X -> ^mu- mu- mu-) ]CC" : "Muon1BDT",
+                                         "[ Beauty -> X (X -> mu- ^mu- mu-) ]CC" : "Muon2BDT",
+                                         "[ Beauty -> X (X -> mu- mu- ^mu-) ]CC" : "Muon3BDT",
+                                         }
+                                     },
+                                     ],
+                                     MDSTFlag = False )
+
+        self.B2pipi3mLine = StrippingLine(B2pipi3m_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selB2pipi3m,
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> X (X -> ^mu- mu- mu-) ]CC" : "Muon1BDT",
+                                         "[ Beauty -> X (X -> mu- ^mu- mu-) ]CC" : "Muon2BDT",
+                                         "[ Beauty -> X (X -> mu- mu- ^mu-) ]CC" : "Muon3BDT",
+                                         }
+                                     },
+                                     ],
+                                     MDSTFlag = False )
+
+        self.B2pipipi3mLine = StrippingLine(B2pipipi3m_name+"Line",
+                                     prescale = config['BaryLFVPrescale'],
+                                     postscale = config['BaryLFVPostscale'],
+                                     selection = selB2pipipi3m,
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> X (X -> ^mu- mu- mu-) ]CC" : "Muon1BDT",
+                                         "[ Beauty -> X (X -> mu- ^mu- mu-) ]CC" : "Muon2BDT",
+                                         "[ Beauty -> X (X -> mu- mu- ^mu-) ]CC" : "Muon3BDT",
+                                         }
+                                     },
+                                     ],
+                                     MDSTFlag = False )
+
+        self.registerLine(self.Xib23MuLine)
+        self.registerLine(self.Xib23MuLooseLine)
+        self.registerLine(self.Xib25MuLine)
+        self.registerLine(self.B2ppmmLine)
+        self.registerLine(self.B23p3mLine)
+        self.registerLine(self.B2Delta3mLine)
+        self.registerLine(self.B2pipi3mLine)
+        self.registerLine(self.B2pipipi3mLine)
+        self.registerLine(self.Xib22MuELine)
+        self.registerLine(self.Xib22MuTauLine)
+        self.registerLine(self.Xib22ETauLine)
+        self.registerLine(self.Xib2EMuTauLine)
+
+#builders!
+#####################################################
+def makeXib23Mu(name, config):
+    """
+    Make Xib / Omega_b -> 3 muons
+    """
+
+    Xib2MuMuMu = Combine3Particles(
+               DecayDescriptors = ["[ Xi_b- -> mu+ mu- mu- ]cc"] ,#,"[ Xi_b- -> mu- mu- mu- ]cc"],
+               DaughtersCuts = { "mu+" : " ( PT > 250 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) "\
+               "& ( BPVIPCHI2 () >  9 ) " % config},
+               Combination12Cut = "(AM < 7200*MeV)",
+               CombinationCut = "(AM < 7300*MeV) & (AM > 5300*MeV) & ( ANUM(( 'mu-' == ABSID ) & ISMUON )> 1.5 ) &  ( ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.3)) > 0.5)  & (APT>2000*MeV) & AHASCHILD(( PT > 900 * MeV ))  & AHASCHILD(( BPVIPCHI2 () >  16 ))", # requiring 2 IsMuon and 1 ProbNNmu>0.xx
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 9 ) &
+            (BPVVDCHI2 > 40) &
+            (BPVDIRA > 0.9992 )
+            """
+            )
+
+    _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Xib2MuMuMu,
+                      RequiredSelections = [ _stdNoPIDLooseMuons ])
+
+#####################################################
+def makeXib23MuLoose(name, config):
+    """
+    Make Xib / Omega_b -> 3 muons
+    """
+
+    Xib2MuMuMu = Combine3Particles(
+               DecayDescriptors = ["[ Xi_b- -> mu+ mu- mu- ]cc","[ Xi_b- -> mu- mu- mu- ]cc"],
+               DaughtersCuts = { "mu+" : " ( PT > 200 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) "\
+               "& ( BPVIPCHI2 () >  6 ) " % config},
+               Combination12Cut = "(AM < 7500*MeV)",
+               CombinationCut = "(AM < 7600*MeV) & (AM > 5000*MeV) & ( ANUM(( 'mu-' == ABSID ) & ISMUON )> 1.5 ) &  ( ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.1)) > 0.5)", # requiring 2 IsMuon and 1 ProbNNmu>0.1
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 10 ) &
+            (BPVVDCHI2 > 36) &
+            (BPVDIRA > 0.995 )
+            """
+            )
+
+    _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Xib2MuMuMu,
+                      RequiredSelections = [ _stdNoPIDLooseMuons ])
+
+
+#####################################################
+def makeXib22MuE(name, config):
+    """
+    Make Xib / Omega_b -> mu mu e
+    """
+
+    Xib2MuMuE = Combine3Particles(
+               DecayDescriptors = ["[ Xi_b- -> mu+ mu- e- ]cc", "[ Xi_b- -> mu- mu- e+ ]cc"],
+               DaughtersCuts = { "mu+" : " ( PT > 200 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) " % config,
+               "e+" : " ( PT > 200 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) " % config
+               },
+               Combination12Cut = "(AM < 7300*MeV)",
+               CombinationCut = "(AM < 7400*MeV) & (AM > 5100*MeV) &  ( ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.15)) > 0.5)", # requiring 1 ProbNNmu>0.1
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 9 ) &
+            (BPVVDCHI2 > 36) &
+            (BPVDIRA > 0.99 )
+            """
+            )
+
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = Xib2MuMuE,
+                      RequiredSelections = [ _stdLooseMuons, _stdLooseElectrons ])
+
+#####################################################
+def makeXib22MuTau(name, config):
+    """
+    Make Xib / Omega_b -> mu mu tau
+    """
+
+    Xib2MuMuE = Combine3Particles(
+               DecayDescriptors = ["[ Xi_b- -> mu+ mu- tau- ]cc","[ Xi_b- -> mu- mu- tau+ ]cc","[ Xi_b- -> mu- mu- tau- ]cc"],
+               DaughtersCuts = { "mu+" : " ( PT > 200 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) " % config,
+               "tau+" : " (PT>600*MeV) " #% config
+               },
+               Combination12Cut = "(AM < 10000*MeV)",
+               CombinationCut = "(AM < 10000*MeV) & (AM > 2000*MeV) &  ( ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.2)) > 1.5)", # requiring 1 ProbNNmu>0.1
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 9 ) &
+            (BPVVDCHI2 > 40) &
+            (BPVDIRA > 0.95 )
+            """
+            )
+
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseTaus = DataOnDemand(Location = "Phys/StdTightDetachedTau3pi/Particles")
+
+    return Selection (name,
+                      Algorithm = Xib2MuMuE,
+                      RequiredSelections = [ _stdLooseMuons, _stdLooseTaus ])
+
+#####################################################
+def makeXib2EMuTau(name, config):
+    """
+    Make Xib / Omega_b -> e mu tau
+    """
+
+    Xib2TauMuE = Combine3Particles(
+               DecayDescriptors = ["[ Xi_b- -> e+ mu- tau- ]cc","[ Xi_b- -> e- mu- tau+ ]cc","[ Xi_b- -> e- mu+ tau- ]cc"], #,"[ Xi_b- -> e- mu- tau- ]cc"],
+               DaughtersCuts = { "mu+" : " ( PT > 200 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) & (PROBNNmu>0.2) " % config,
+               "e+" : " ( PT > 200 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) & (PROBNNe>0.3) & (PIDe>3)" % config,
+               "tau+" : " (ALL) "
+               },
+               Combination12Cut = "(AM < 10000*MeV)",
+               CombinationCut = "(AM < 9500*MeV) & (AM > 2000*MeV)",
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 9 ) &
+            (BPVVDCHI2 > 49) &
+            (BPVDIRA > 0.99 )
+            """
+            )
+
+    _stdLooseElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseTaus = DataOnDemand(Location = "Phys/StdTightDetachedTau3pi/Particles")
+
+    return Selection (name,
+                      Algorithm = Xib2TauMuE,
+                      RequiredSelections = [ _stdLooseMuons, _stdLooseTaus, _stdLooseElectrons ])
+
+#####################################################
+def makeXib22ETau(name, config):
+    """
+    Make Xib / Omega_b -> e e tau
+    """
+
+    Xib22ETau = Combine3Particles(
+               DecayDescriptors = ["[ Xi_b- -> e+ e- tau- ]cc","[ Xi_b- -> e- e- tau+ ]cc"],#,"[ Xi_b- -> e- e- tau- ]cc"],
+               DaughtersCuts = {
+               "e+" : " ( PT > 200 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) & (PROBNNe>0.3) & (PIDe>3)" % config,
+               "tau+" : " ((BPVDIRA>0.992) & (PT>1200*MeV) & ( VFASPF(VCHI2PDOF) < 9 )) "
+               },
+               Combination12Cut = "(AM < 10000*MeV) & (APT>600*MeV)",
+               CombinationCut = "(AM < 9500*MeV) & (AM > 2000*MeV)",
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 9 ) &
+            (BPVVDCHI2 > 45) &
+            (BPVDIRA > 0.95 ) & (PT>3500*MeV)
+            """
+            )
+
+    _stdLooseElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+    _stdLooseTaus = DataOnDemand(Location = "Phys/StdTightDetachedTau3pi/Particles")
+
+    return Selection (name,
+                      Algorithm = Xib22ETau,
+                      RequiredSelections = [ _stdLooseTaus, _stdLooseElectrons ])
+
+#####################################################
+
+
+def makeXib25Mu(name, config):
+    """
+    Make Xi_b / Omega_b -> 5 muons
+    """
+
+    Xib2MuMuMuMuMu = Combine5Particles(
+                   DecayDescriptors = ["[Xi_b- -> mu+ mu+ mu- mu- mu-]cc","[Xi_b- -> mu- mu- mu- mu+ mu-]cc","[Xi_b- -> mu- mu- mu- mu- mu-]cc"],
+                   DaughtersCuts = { "mu+" : " ( PT > 100 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  6 ) " % config },
+                   Combination12Cut = "(AM<7000*MeV)  & ( ANUM(( 'mu-' == ABSID ) & ISMUON )> 0.5 ) & (APT>350*MeV)",   # 1778 + 400 - 3*100
+                   Combination123Cut = "(AM<7100*MeV) & ( ANUM(( 'mu-' == ABSID ) & ISMUON )> 1.5 ) & (APT>600*MeV)",   # 1778 + 400 - 2*100
+                   Combination1234Cut = "(AM<7200*MeV) & ( ANUM(( 'mu-' == ABSID ) & ISMUON )> 2.5 )",   # 1778 + 400 - 1*100
+                   CombinationCut = "(AM < 7400*MeV) & (AM > 5100*MeV) & ( ANUM(( 'mu-' == ABSID ) & ISMUON )> 3.5 ) &  ( ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.1)) > 2.5)",
+                   MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 10 ) &
+            (BPVVDCHI2 > 36) &
+            (BPVDIRA > 0.999 )
+            """
+                   )
+
+    _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Xib2MuMuMuMuMu,
+                      RequiredSelections = [ _stdNoPIDLooseMuons ])
+
+
+#####################################################
+def _makeMuMuSS(  name, params):
+        """
+        Makes MuMu same sign combinations
+        """
+        from StandardParticles import StdLooseMuons as Muons
+
+        _DecayDescriptor = "[rho(770)- -> mu- mu-]cc"
+
+        _MassCut = "(AM < 7000*MeV)"
+
+        _MotherCut = "(VFASPF(VCHI2/VDOF) < 9)"
+
+        _DaughtersCut = "(PT > %(PTCut)s) & " \
+                        "(MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _DecayDescriptor,
+                                     CombinationCut  = _MassCut,
+                                     MotherCut       = _MotherCut )
+
+        _Combine.DaughtersCuts = {
+            "mu-" : _DaughtersCut,
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ Muons ] )
+
+#####################################################
+def _make3MuSS(  name, params):
+        """
+        Makes MuMu same sign combinations
+        """
+        from StandardParticles import StdLooseMuons as Muons
+
+        _DecayDescriptor = "[rho(770)- -> mu- mu- mu-]cc"
+
+        _MassCut12 = "(AM < 6900*MeV)"
+        _MassCut = "(AM < 7000*MeV)"
+
+        _MotherCut = "(VFASPF(VCHI2/VDOF) < 9)"
+
+        _DaughtersCut = "(PT > %(PTCut)s) & " \
+                        "(MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s)" % params
+
+        _Combine = Combine3Particles( DecayDescriptor = _DecayDescriptor,
+                                     Combination12Cut  = _MassCut12,
+                                     CombinationCut  = _MassCut,
+                                     MotherCut       = _MotherCut )
+
+        _Combine.DaughtersCuts = {
+            "mu-" : _DaughtersCut,
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ Muons ] )
+
+#####################################################
+def _make2MuESS( name, params):
+        """
+        Makes MuMu same sign combinations
+        """
+        from StandardParticles import StdLooseMuons as Muons
+        from StandardParticles import StdLooseElectrons as Electrons
+
+        _DecayDescriptor = "[rho(770)- -> mu- mu- e-]cc"
+
+        _MassCut12 = "(AM < 6900*MeV)"
+        _MassCut = "(AM < 7000*MeV)"
+
+        _MotherCut = "(VFASPF(VCHI2/VDOF) < 9)"
+
+        _DaughtersCut = "(PT > %(PTCut)s) & " \
+                        "(MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s)" % params
+
+        _Combine = Combine3Particles( DecayDescriptor = _DecayDescriptor,
+                                     Combination12Cut  = _MassCut12,
+                                     CombinationCut  = _MassCut,
+                                     MotherCut       = _MotherCut )
+
+        _Combine.DaughtersCuts = {
+            "mu-" : _DaughtersCut,
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ Muons, Electrons ] )
+
+
+#####################################################
+def _makeppSS( name, params):
+    """
+    Make a same-sign f2 -> p p in entire range.
+    """
+
+    _Decays = "[Delta++ -> p+ p+]cc"
+
+    _CombinationCut = "(APT > %(PTCut)s *MeV) & " \
+                      "(AM < %(DiHadronMassLoose)s *MeV) & " \
+                      "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+    _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s)" % params
+
+    _DaughterCut = "(PT > %(PTCut)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+               "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s)) & (PROBNNp > %(ProbNNCutTight)s)" % params
+
+    _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                 CombinationCut  = _CombinationCut,
+                                 MotherCut       = _MotherCut)
+
+    _Combine.DaughtersCuts = {
+        "p+"  : _DaughterCut,
+        }
+    _stdProtons = DataOnDemand(Location = "Phys/StdAllLooseProtons/Particles")
+
+    return Selection(name, Algorithm = _Combine, RequiredSelections = [ _stdProtons ] )
+#####################################################
+def _make3pSS( name, params):
+    """
+    Make a same-sign f2 -> p p in entire range.
+    """
+
+    _Decays = "[Delta++ -> p+ p+ p+]cc"
+
+    _CombinationCut12 = "(APT > %(PTCut)s *MeV) & " \
+                      "(AM < (%(DiHadronMassLoose)s - 100) *MeV) & " \
+                      "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+    _CombinationCut = "(APT > %(PTCut)s *MeV) & " \
+                      "(AM < %(DiHadronMassLoose)s *MeV) & " \
+                      "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+    _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s)" % params
+
+    _DaughterCut = "(PT > %(PTCut)s *MeV)  & " \
+               "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s)) & (PROBNNp > %(ProbNNCutTight)s)" % params
+
+    _Combine = Combine3Particles( DecayDescriptor = _Decays,
+                                 Combination12Cut  = _CombinationCut,
+                                 CombinationCut  = _CombinationCut,
+                                 MotherCut       = _MotherCut)
+
+    _Combine.DaughtersCuts = {
+        "p+"  : _DaughterCut,
+        }
+    _stdProtons = DataOnDemand(Location = "Phys/StdAllLooseProtons/Particles")
+
+    return Selection(name, Algorithm = _Combine, RequiredSelections = [ _stdProtons ] )
+#####################################################
+def _makeDeltaSS( name, params):
+    """
+    Make a same-sign Delta++ -> p pi+ in the restricted mass range.
+    """
+
+    _Decays = "[Delta++ -> p+ pi+]cc"
+
+    _CombinationCut = "(APT > %(PTCut)s *MeV) & " \
+                      "(AM < %(DiHadronMassTight)s *MeV) & " \
+                      "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+    _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s)" % params
+
+    _DaughterCut_p = "(PT > %(PTCut)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+               "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s)) & (PROBNNp > %(ProbNNCutTight)s)" % params
+    _DaughterCut_pi = "(PT > %(PTCut)s *MeV) & " \
+               "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s))" % params # & (PROBNNpi > %(ProbNNCut)s))
+
+    _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                 CombinationCut  = _CombinationCut,
+                                 MotherCut       = _MotherCut)
+
+    _Combine.DaughtersCuts = {
+        "p+"  : _DaughterCut_p,
+        "pi+" : _DaughterCut_pi
+        }
+
+    _stdProtons = DataOnDemand(Location = "Phys/StdAllLooseProtons/Particles")
+    _stdPions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+
+    return Selection(name, Algorithm = _Combine, RequiredSelections = [ _stdProtons, _stdPions ] )
+#####################################################
+def _makepipiSS( name, params):
+    """
+    Make a same-sign Delta++ -> pi+ pi+ in the restricted mass range.
+    """
+
+    _Decays = "[Delta++ -> pi+ pi+]cc"
+
+    _CombinationCut = "(APT > %(PTCut)s *MeV) & " \
+                      "(AM < %(DiHadronMassLoose)s *MeV) & " \
+                      "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+    _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s)" % params
+
+    _DaughterCut_pi = "(PT > %(PTCut)s *MeV) & " \
+               "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s))" % params # & (PROBNNpi > %(ProbNNCut)s))
+
+    _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                 CombinationCut  = _CombinationCut,
+                                 MotherCut       = _MotherCut)
+
+    _Combine.DaughtersCuts = {
+        "pi+" : _DaughterCut_pi
+        }
+
+
+    _stdPions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+
+    return Selection(name, Algorithm = _Combine, RequiredSelections = [ _stdPions ] )
+#####################################################
+def _makepipipiSS( name, params):
+    """
+    Make a same-sign Delta++ -> pi+ pi+ pi+ in the restricted mass range.
+    """
+
+    _Decays = "[Delta++ -> pi+ pi+ pi+]cc"
+
+    _CombinationCut = "(APT > %(PTCut)s *MeV) & " \
+                      "(AM < %(DiHadronMassLoose)s *MeV) & " \
+                      "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+    _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s)" % params
+
+    _DaughterCut_pi = "(PT > %(PTCut)s *MeV) & " \
+               "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s))" % params # & (PROBNNpi > %(ProbNNCut)s))
+
+    _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                 CombinationCut  = _CombinationCut,
+                                 MotherCut       = _MotherCut)
+
+    _Combine.DaughtersCuts = {
+        "pi+" : _DaughterCut_pi
+        }
+
+
+    _stdPions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+
+    return Selection(name, Algorithm = _Combine, RequiredSelections = [ _stdPions ] )
+
+#####################################################
+def _makeKKSS( name, params):
+    """
+    Make a same-sign Delta++ -> K+K+ in the restricted mass range.
+    """
+
+    _Decays = "[Delta++ -> K+ K+]cc"
+
+    _CombinationCut = "(APT > %(PTCut)s *MeV) & " \
+                      "(AM < %(DiHadronMassLoose)s *MeV) & " \
+                      "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+    _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s)" % params
+
+    _DaughterCut_K = "(PT > %(PTCut)s *MeV) & " \
+               "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s))" % params # & (PROBNNk > %(ProbNNCut)s))
+
+    _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                 CombinationCut  = _CombinationCut,
+                                 MotherCut       = _MotherCut)
+
+    _Combine.DaughtersCuts = {
+        "K+" : _DaughterCut_K
+        }
+
+
+    _stdKaons = DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")
+
+    return Selection(name, Algorithm = _Combine, RequiredSelections = [ _stdKaons ] )
+#####################################################
+def _makeKKKSS( name, params):
+    """
+    Make a same-sign Delta++ -> K+K+K+ in the restricted mass range.
+    """
+
+    _Decays = "[Delta++ -> K+ K+ K+]cc"
+
+    _CombinationCut = "(APT > %(PTCut)s *MeV) & " \
+                      "(AM < %(DiHadronMassLoose)s *MeV) & " \
+                      "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+    _MotherCut = "(VFASPF(VCHI2PDOF) < %(DiHadronVtxCHI2)s)" % params
+
+    _DaughterCut_K = "(PT > %(PTCut)s *MeV) & " \
+               "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(HadronIPCHI2)s))" % params # & (PROBNNk > %(ProbNNCut)s))
+
+    _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                 CombinationCut  = _CombinationCut,
+                                 MotherCut       = _MotherCut)
+
+    _Combine.DaughtersCuts = {
+        "K+" : _DaughterCut_K
+        }
+
+
+    _stdKaons = DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")
+
+    return Selection(name, Algorithm = _Combine, RequiredSelections = [ _stdKaons ] )
+
+#####################################################
+def _makeppmumu(name, dimuons, pps, config):
+    """
+    Make B0 -> p+ p+ mu- mu-
+    """
+
+    ppmm = CombineParticles(
+               DecayDescriptors = [" [ Xi_b0 -> Delta++ rho(770)- ]cc",  " [ Xi_b0 -> Delta++ rho(770)+ ]cc"],
+               DaughtersCuts = { "Delta++" : " ( ALL ) " ,
+                                 "rho(770)-" : " ( ALL ) " ,
+               },
+               CombinationCut = "(AM < 7500*MeV) & (AM > 4800*MeV)",
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 16 ) &
+            (BPVVDCHI2 > 36) &
+            (BPVDIRA > 0.999 )
+            """
+            )
+
+    return Selection (name,
+                      Algorithm = ppmm,
+                      RequiredSelections = [ pps, dimuons ])
+#####################################################
+def _make3p3mu(name, trimuons, trips, config):
+    """
+    Make B0 -> p+ p+ p+ mu- mu- mu-
+    """
+
+    ppmm = CombineParticles(
+               DecayDescriptors = [" [ Xi_b0 -> Delta++ rho(770)- ]cc",  " [ Xi_b0 -> Delta++ rho(770)+ ]cc"],
+               DaughtersCuts = { "Delta++" : " ( ALL ) " ,
+                                 "rho(770)-" : " ( ALL ) " ,
+               },
+               CombinationCut = "(AM < 7500*MeV) & (AM > 4800*MeV)",
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 16 ) &
+            (BPVVDCHI2 > 36) &
+            (BPVDIRA > 0.999 )
+            """
+            )
+
+    return Selection (name,
+                      Algorithm = ppmm,
+                      RequiredSelections = [ trips, trimuons ])
+#####################################################
+def _makeDeltapp3mu(name, trimuons, deltas, config):
+    """
+    Make Xi_b- -> Delta++ mu- mu- mu-
+    """
+
+    ppmm = CombineParticles(
+               DecayDescriptors = [" [ Xi_b0 -> Delta++ rho(770)- ]cc",  " [ Xi_b0 -> Delta++ rho(770)+ ]cc"],
+               DaughtersCuts = { "Delta++" : " ( ALL ) " ,
+                                 "rho(770)-" : " ( ALL ) " ,
+               },
+               CombinationCut = "(AM < 7500*MeV) & (AM > 4800*MeV)",
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 16 ) &
+            (BPVVDCHI2 > 25) &
+            (BPVDIRA > 0.999 )
+            """
+            )
+
+    return Selection (name,
+                      Algorithm = ppmm,
+                      RequiredSelections = [ deltas, trimuons ])
+
+#####################################################
+def _makepipi3mu(name, trimuons, pipis, kks, config):
+    """
+    Make Xi_b- -> pi+ pi+ mu- mu- mu- (same with kaons) 1903 09675
+    """
+
+    ppmm = CombineParticles(
+               DecayDescriptors = [" [ Xi_b0 -> Delta++ rho(770)- ]cc",  " [ Xi_b0 -> Delta++ rho(770)+ ]cc"],
+               DaughtersCuts = { "Delta++" : " ( ALL ) " ,
+                                 "rho(770)-" : " ( NINTREE(( 'mu-' == ABSID ) & (PROBNNmu>0.))==3  ) " ,
+               },
+               CombinationCut = "(AM < 7500*MeV) & (AM > 4800*MeV)",
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 12 ) &
+            (BPVVDCHI2 > 25) &
+            (BPVDIRA > 0.999 )
+            """
+            )
+
+    return Selection (name,
+                      Algorithm = ppmm,
+                      RequiredSelections = [ pipis, kks, trimuons ])
+
+#####################################################
+def _makepipipi3mu(name, trimuons, pipipis, kkks, config):
+    """
+    Make Xi_b0 -> pi+ pi+ pi+ mu- mu- mu- (same with kaons)
+    """
+
+    ppmm = CombineParticles(
+               DecayDescriptors = [" [ Xi_b0 -> Delta++ rho(770)- ]cc",  " [ Xi_b0 -> Delta++ rho(770)+ ]cc"],
+               DaughtersCuts = { "Delta++" : " ( ALL ) " ,
+                                 "rho(770)-" : " ( NINTREE(( 'mu-' == ABSID ) & (PROBNNmu>0.))==3  ) " ,
+               },
+               CombinationCut = "(AM < 7500*MeV) & (AM > 4800*MeV)",
+               MotherCut = """
+            ( VFASPF(VCHI2PDOF) < 12 ) &
+            (BPVVDCHI2 > 25) &
+            (BPVDIRA > 0.999 )
+            """
+            )
+
+    return Selection (name,
+                      Algorithm = ppmm,
+                      RequiredSelections = [ pipipis, kkks, trimuons ])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBd2KSLLX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBd2KSLLX.py
new file mode 100644
index 000000000..8b51328f4
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBd2KSLLX.py
@@ -0,0 +1,204 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__  = 'SB'
+__date__    = '08/10/2017'
+__version__ = '$Revision: 1 $'
+
+__all__ = ( 'Bd2KSLLXConf', 'default_config' ) 
+
+"""
+  Bd --> ll KS X selections
+"""
+
+default_config = {
+    'NAME'                       : 'Bd2KSLLX',
+    'BUILDERTYPE'                : 'Bd2KSLLXConf',
+    'CONFIG'                     :
+        {                       
+        'BFlightCHI2'            : 10   
+        , 'BdIPCHI2'             : 200    
+        , 'BVertexCHI2'          : 12    
+        , 'DiLeptonPT'           : 1000.0    
+        , 'DiLeptonFDCHI2'       : 10   
+        , 'DiLeptonIPCHI2'       : 3.5   
+        , 'DiLeptonVCHI2'       : 5   
+        , 'LeptonIPCHI2'         : 4.0  
+        , 'LeptonPT'             : 300  
+        , 'KaonPT'               : 300  
+        , 'KaonIPCHI2'           : 3
+        , 'DiHadronMass'         : 2600
+        , 'KSIPCHI2'             : 4.0
+        , 'KSVCHI'               : 5
+        , 'UpperMass'            : 5500
+        , 'CorrMmin_ee'          : 3500
+        , 'CorrMmin_mm'          : 3500
+        , 'CorrMmax_ee'          : 7000
+        , 'CorrMmax_mm'          : 7000
+        , 'PIDe'                 : 0
+        , 'Trk_Chi2'             : 3.5
+        , 'Trk_GhostProb'        : 0.4
+        , 'BdTransvMom'          : 1500.0
+        },
+    'WGs'     : [ 'RD' ],
+    'STREAMS' : [ 'Leptonic' ]
+    }
+    
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class Bd2KSLLXConf(LineBuilder) :
+    # now just define keys. Default values are fixed later
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        self._name = name
+
+        mmXLine_name   = name + "_mm"
+        eeXLine_name   = name + "_ee"
+
+        from StandardParticles import StdLoosePions as Pions
+        from StandardParticles import StdLooseKaons as Kaons
+        from StandardParticles import StdLooseKstar2Kpi as Kstars
+        from StandardParticles import StdLoosePhi2KK as Phis
+        from StandardParticles import StdLooseKsLL as KshortsLL 
+        from StandardParticles import StdLooseKsDD as KshortsDD    
+        from StandardParticles import StdLooseLambdaLL as LambdasLL
+        from StandardParticles import StdLooseLambdaDD as LambdasDD  
+        from StandardParticles import StdLooseLambdastar2pK as Lambdastars  
+
+
+        SelKshortsLL = self._filterHadron( name   = "KshortsLLFor" + self._name,
+                                           sel    =  KshortsLL, 
+                                           params = config )
+        SelKshortsDD = self._filterHadron( name   = "KshortsDDFor" + self._name,
+                                           sel    =  KshortsDD,
+                                           params = config )
+ 
+        from StandardParticles import StdDiElectronFromTracks as DiElectronsFromTracks
+        from StandardParticles import StdLooseDiElectron as DiElectrons
+        from StandardParticles import StdLooseDiMuon as DiMuons 
+
+        ElecID = "(PIDe > %(PIDe)s)" % config
+        MuonID = "(HASMUON)&(ISMUON)"
+
+        DiElectronID = "(2 == NINTREE((ABSID==11)&(PIDe > %(PIDe)s)))" % config
+        DiMuonID     = "(2 == NINTREE((ABSID==13)&(HASMUON)&(ISMUON)))"
+                
+        
+        SelDiElectron = self._filterDiLepton( "SelDiElectronFor" + self._name, 
+                                              dilepton = DiElectrons,
+                                              params   = config,
+                                              idcut    = DiElectronID )
+        
+        SelDiMuon = self._filterDiLepton( "SelDiMuonsFor" + self._name, 
+                                          dilepton = DiMuons,
+                                          params   = config,
+                                          idcut    = DiMuonID )
+        
+        SelB2eeX = self._makeB2LLX(eeXLine_name,
+                                   dilepton = SelDiElectron,
+                                   hadrons  = [ SelKshortsLL, SelKshortsDD ],
+                                   params   = config,
+                                   masscut  = "in_range(%(CorrMmin_ee)s *MeV, BPVCORRM,  %(CorrMmax_ee)s *MeV)" % config )
+
+        SelB2mmX = self._makeB2LLX(mmXLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelKshortsLL, SelKshortsDD ],
+                                   params   = config,
+                                   masscut  = "in_range(%(CorrMmin_mm)s *MeV, BPVCORRM,  %(CorrMmax_mm)s *MeV)" % config )
+
+        SPDFilter = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 600 )" ,
+            'Preambulo' : [ "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb" ]
+            }
+        
+        self.B2eeXLine = StrippingLine(eeXLine_name + "Line",
+                                       prescale          = 1,
+                                       postscale         = 1,
+                                       selection         = SelB2eeX,
+                                       FILTER            = SPDFilter, 
+                                       RequiredRawEvents = ['Trigger', 'Muon', 'Calo', 'Rich', 'Velo', 'Tracker'],
+                                       MDSTFlag          = False )
+
+        self.B2mmXLine = StrippingLine(mmXLine_name + "Line",
+                                       prescale          = 1,
+                                       postscale         = 1,
+                                       selection         = SelB2mmX,
+                                       FILTER            = SPDFilter, 
+                                       RequiredRawEvents = ['Trigger', 'Muon', 'Calo', 'Rich', 'Velo', 'Tracker'],
+                                       MDSTFlag          = False )
+
+        self.registerLine( self.B2eeXLine )
+        self.registerLine( self.B2mmXLine )
+
+#####################################################
+    def _filterHadron( self, name, sel, params ):
+        """
+        Filter for all hadronic final states
+        """
+
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+        # need to add the ID here
+        _Code = "(PT > %(KaonPT)s *MeV) & " \
+                "(M < %(DiHadronMass)s*MeV) & " \
+                "(VFASPF(VCHI2) < %(KSVCHI)s) & "\
+                "(BPVIPCHI2() > %(KSIPCHI2)s) & "\
+                "((ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) | " \
+                "(NDAUGHTERS == NINTREE(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))))" % params
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
+#####################################################
+    def _filterDiLepton( self, name, dilepton, params, idcut = None ) :
+        """
+        Handy interface for dilepton filter
+        """
+
+        _Code = "(ID=='J/psi(1S)') & "\
+                "(PT > %(DiLeptonPT)s *MeV) & "\
+                "(MM < %(UpperMass)s *MeV) & "\
+                "(MINTREE(ABSID<14,PT) > %(LeptonPT)s *MeV) & "\
+                "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(LeptonIPCHI2)s) & "\
+                "(VFASPF(VCHI2) < %(DiLeptonVCHI2)s) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & "\
+                "(MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s)" % params
+
+        # add additional cut on PID if requested
+        if idcut : _Code += ( " & " + idcut ) 
+
+        _Filter = FilterDesktop( Code = _Code )
+    
+        return Selection(name, Algorithm = _Filter, RequiredSelections = [ dilepton ] )
+#####################################################
+    def _makeB2LLX( self, name, dilepton, hadrons, params, masscut):
+        """
+        CombineParticles / Selection for the B 
+        """
+
+        _Decays = [ "B0 -> J/psi(1S) KS0"]
+        
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) & (BPVIPCHI2()<%(BdIPCHI2)s)"\
+               "& (PT>%(BdTransvMom)s) & (BPVVDCHI2 > %(BFlightCHI2)s)" % params
+        _Cut += "& (%s))" % masscut
+        
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     MotherCut        = _Cut )
+        
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] ) 
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBd2eeKstarBDT.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBd2eeKstarBDT.py
new file mode 100644
index 000000000..c5c749d5f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBd2eeKstarBDT.py
@@ -0,0 +1,351 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# $Id: StrippingBd2eeKstarBDT.py,v 1.2 2010-09-06 16:30:22 jhe Exp $
+
+'''
+Module for construction of Bd->eeKstar based on BDT
+'''
+
+__author__=['Marie-Helene Schune', 'Jibo He']
+__date__ = '20/01/2012'
+__version__= '$Revision: 1.0 $'
+
+
+__all__ = (
+    'Bd2eeKstarBDTConf',
+    'makeEE',
+    'makeKstar',
+    'makeBd2eeKstar',
+    'default_config'
+    )
+
+default_config =  {
+    'NAME'              :  'Bd2eeKstarBDT',
+    'BUILDERTYPE'       :  'Bd2eeKstarBDTConf',
+    'CONFIG'    : {
+        'LinePrescale'            :    1.   ,
+        'LinePostscale'           :    1.   ,
+        #
+        'ElectronPT'              :  200.   ,  # MeV
+        'ElectronTrackCHI2pNDOF'  :    5.   ,
+        'ElectronGhostProb'       :    0.5  ,
+        'ElectronIPCHI2'          :    1.   ,
+        'ElectronPIDepi'          :   -2.   ,          
+        #
+        'eeCuts'                  : "(HASVERTEX) & (VFASPF(VCHI2)<16) & (((MM<1.5*GeV)) | ((MM>2.2*GeV) & (MM<4.2*GeV)))",
+        #
+        'KaonPT'                  :  400.   ,  # MeV 
+        'KaonP'                   : 3000.   ,  # MeV  
+        'KaonTrackCHI2pNDOF'      :    5.   ,
+        'KaonGhostProb'           :    0.35 ,
+        'KaonIPCHI2'              :    4.   , 
+        'KaonPIDKpi'              :   -5.   , 
+        #
+        'PionPT'                  :  250.   ,  # MeV
+        'PionP'                   : 2000.   ,  # MeV 
+        'PionTrackCHI2pNDOF'      :    5.   ,
+        'PionGhostProb'           :    0.35 ,
+        'PionIPCHI2'              :    4.   , 
+        'PionPIDpiK'              :   10.   ,  # PIDpi-PIDK > -5, i.e., PIDK<5 
+        #
+        'KstarVertexCHI2'         :   16.   , 
+        'KstarMassW'              :  150.   ,  # MeV
+        #
+        'BComMassW'               : 1200.   ,  # MeV
+        'BVertexCHI2'             :   16.   ,  # /ndf
+        'BMassW'                  : 1000.   ,  # MeV  
+        'BDIRA'                   :    0.999,
+        'BDTCutValue'             :   -0.95 ,
+        'BDTWeightsFile'          : '$TMVAWEIGHTSROOT/data/Bd2eeKstar_BDTG_v1r0.xml',
+        #
+        'RelatedInfoTools'       : [ { "Type" : "RelInfoBs2MuMuTrackIsolations"
+                                       , "DaughterLocations" : {
+                                           '[B0 -> ( K*(892)0 -> K+ pi-) ( J/psi(1S) -> ^e+ e-) ]CC' : 'Electron1ISO',
+                                           '[B0 -> ( K*(892)0 -> K+ pi-) ( J/psi(1S) ->  e+^e-) ]CC' : 'Electron2ISO',
+                                           '[B0 -> ( K*(892)0 ->^K+ pi-) ( J/psi(1S) ->  e+ e-) ]CC' : 'KaonISO',
+                                           '[B0 -> ( K*(892)0 -> K+^pi-) ( J/psi(1S) ->  e+ e-) ]CC' : 'PionISO'
+                                           }
+                                       , "tracktype"  : 3
+                                       , "angle"      : 0.27
+                                       , "fc"         : 0.60
+                                       , "doca_iso"   : 0.13
+                                       , "ips"        : 3.0
+                                       , "svdis"      : -0.15
+                                       , "svdis_h"    : 30.
+                                       , "pvdis"      : 0.5
+                                       , "pvdis_h"    : 40.
+                                       , "makeTrackCuts" : False
+                                       , "IsoTwoBody" : False
+                                       } ],       
+        'RelatedInfoTools2'       : [ { "Type" : "RelInfoBs2MuMuTrackIsolations"
+                                       , "DaughterLocations" : {
+                                           '[B0 -> ( K*(892)0 -> K+ pi-) ( J/psi(1S) -> ^e+ e-) ]CC' : 'Electron1ISO',
+                                           '[B0 -> ( K*(892)0 -> K+ pi-) ( J/psi(1S) ->  e+^e-) ]CC' : 'Electron2ISO',
+                                           '[B0 -> ( K*(892)0 ->^K+ pi-) ( J/psi(1S) ->  e+ e-) ]CC' : 'KaonISO',
+                                           '[B0 -> ( K*(892)0 -> K+^pi-) ( J/psi(1S) ->  e+ e-) ]CC' : 'PionISO'
+                                           } 
+                                       , "tracktype"  : 3
+                                       , "angle"      : 0.27
+                                       , "fc"         : 0.60
+                                       , "doca_iso"   : 0.13
+                                       , "ips"        : 3.0
+                                       , "svdis"      : -0.15
+                                       , "svdis_h"    : 30.
+                                       , "pvdis"      : 0.5
+                                       , "pvdis_h"    : 40.
+                                       , "makeTrackCuts" : False
+                                       , "IsoTwoBody" : False
+                                       } ],       
+        },
+    'STREAMS'           : ['Bhadron' ],
+    'WGs'               : ['RD']
+    }
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+    
+class Bd2eeKstarBDTConf(LineBuilder):
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config ):
+        
+        LineBuilder.__init__(self, name, config)
+        
+        Bd2eeKstarBDTName = name
+        Bd2eeKstarBDTLineName = Bd2eeKstarBDTName + "Line"
+        
+        self.SelEE = makeEE( 'eeFor'+Bd2eeKstarBDTName,
+                             ElectronPT = config['ElectronPT'],
+                             ElectronTrackCHI2pNDOF = config['ElectronTrackCHI2pNDOF'],
+                             ElectronGhostProb = config['ElectronGhostProb'],
+                             ElectronIPCHI2 = config['ElectronIPCHI2'],
+                             ElectronPIDepi = config['ElectronPIDepi'],
+                             #
+                             eeCuts = config['eeCuts']
+                             )
+        
+        self.SelKstar = makeKstar('KstarFor'+Bd2eeKstarBDTName,
+                                  KaonPT = config['KaonPT'],
+                                  KaonP = config['KaonP'],
+                                  KaonTrackCHI2pNDOF = config['KaonTrackCHI2pNDOF'],
+                                  KaonGhostProb = config['KaonGhostProb'],
+                                  KaonIPCHI2 = config['KaonIPCHI2'],
+                                  KaonPIDKpi = config['KaonPIDKpi'],
+                                  #
+                                  PionPT = config['PionPT'],
+                                  PionP = config['PionP'],
+                                  PionTrackCHI2pNDOF = config['PionTrackCHI2pNDOF'],
+                                  PionGhostProb = config['PionGhostProb'],
+                                  PionIPCHI2 = config['PionIPCHI2'],
+                                  PionPIDpiK = config['PionPIDpiK'],
+                                  #
+                                  KstarVertexCHI2 = config['KstarVertexCHI2'],
+                                  KstarMassW = config['KstarMassW']                   
+                                  )
+        
+        self.SelBd2eeKstar = makeBd2eeKstar( "Sel_"+Bd2eeKstarBDTName,
+                                             SelEE = self.SelEE,
+                                             SelKstar = self.SelKstar,
+                                             BComMassW = config['BComMassW'],
+                                             BVertexCHI2 = config['BVertexCHI2'],
+                                             BMassW = config['BMassW'],
+                                             BDIRA = config['BDIRA']
+                                             )
+
+        self.CutBDTBd2eeKstar  = applyBDT( "CutBDT_" + Bd2eeKstarBDTName,
+                                           LineName  = Bd2eeKstarBDTLineName,
+                                           SelBd2eeKstar = self.SelBd2eeKstar,
+                                           BDTCutValue = config['BDTCutValue'],
+                                           BDTWeightsFile = config['BDTWeightsFile']
+                                           )
+        
+        self.line = StrippingLine( Bd2eeKstarBDTLineName,
+                                   prescale = config['LinePrescale'],
+                                   postscale = config['LinePostscale'],
+                                   selection = self.CutBDTBd2eeKstar,
+                                   RelatedInfoTools = config[ 'RelatedInfoTools']
+                                   )
+        
+        #self.registerLine(self.line)
+
+        # new line with new Brem cor 
+        self.FilterEE = filterEE( 'filterEEFor'+Bd2eeKstarBDTName,
+                                  ElectronPT = config['ElectronPT'],
+                                  ElectronTrackCHI2pNDOF = config['ElectronTrackCHI2pNDOF'],
+                                  ElectronGhostProb = config['ElectronGhostProb'],
+                                  ElectronIPCHI2 = config['ElectronIPCHI2'],
+                                  ElectronPIDepi = config['ElectronPIDepi'],
+                                  #
+                                  eeCuts = config['eeCuts']
+                                  )
+        
+         
+        self.SelBd2DieeKstar = makeBd2eeKstar( "Sel2_"+Bd2eeKstarBDTName,
+                                               SelEE = self.FilterEE,
+                                               SelKstar = self.SelKstar,
+                                               BComMassW = config['BComMassW'],
+                                               BVertexCHI2 = config['BVertexCHI2'],
+                                               BMassW = config['BMassW'],
+                                               BDIRA = config['BDIRA']
+                                               )
+
+        self.CutBDTBd2eeKstar2  = applyBDT( "CutBDT2_" + Bd2eeKstarBDTName,
+                                            LineName  = Bd2eeKstarBDTLineName+"2",
+                                            SelBd2eeKstar = self.SelBd2DieeKstar,
+                                            BDTCutValue = config['BDTCutValue'],
+                                            BDTWeightsFile = config['BDTWeightsFile']
+                                            )
+        
+        self.line2 = StrippingLine( Bd2eeKstarBDTLineName+"2",
+                                    prescale = config['LinePrescale'],
+                                    postscale = config['LinePostscale'],
+                                    selection = self.CutBDTBd2eeKstar2,
+                                    RelatedInfoTools = config[ 'RelatedInfoTools2']
+                                    )
+        
+        self.registerLine(self.line2) 
+       
+
+def makeEE( name,
+            #
+            ElectronPT,
+            ElectronTrackCHI2pNDOF,
+            ElectronGhostProb,
+            ElectronIPCHI2,
+            ElectronPIDepi,
+            #
+            eeCuts
+            ):
+
+    _StdLooseDetachedDiElectron = DataOnDemand(Location = "Phys/StdLooseDetachedDiElectron/Particles" )
+    
+    ElectronPCut = "(INTREE( (ID=='e+') & (PT> %(ElectronPT)s *MeV) & (TRCHI2DOF < %(ElectronTrackCHI2pNDOF)s) & (BPVIPCHI2() > %(ElectronIPCHI2)s) & (PIDe>%(ElectronPIDepi)s) & (TRGHOSTPROB<%(ElectronGhostProb)s ) ))" % locals()
+
+    ElectronMCut = "(INTREE( (ID=='e-') & (PT> %(ElectronPT)s *MeV) & (TRCHI2DOF < %(ElectronTrackCHI2pNDOF)s) & (BPVIPCHI2() > %(ElectronIPCHI2)s) & (PIDe>%(ElectronPIDepi)s) & (TRGHOSTPROB<%(ElectronGhostProb)s ) ))" % locals()
+    
+    _EE = FilterDesktop( Code = eeCuts + " & " + ElectronPCut + " & " + ElectronMCut )
+    
+    return Selection( name,
+                      Algorithm = _EE,
+                      RequiredSelections = [ _StdLooseDetachedDiElectron ]
+                      )
+
+def filterEE( name,
+              #
+              ElectronPT,
+              ElectronTrackCHI2pNDOF,
+              ElectronGhostProb,
+              ElectronIPCHI2,
+              ElectronPIDepi,
+              #
+              eeCuts
+              ):
+    
+    _StdLooseDetachedDiElectron = DataOnDemand(Location = "Phys/StdDiElectronFromTracks/Particles" )
+    
+    ElectronPCut = "(INTREE( (ID=='e+') & (PT> %(ElectronPT)s *MeV) & (TRCHI2DOF < %(ElectronTrackCHI2pNDOF)s) & (BPVIPCHI2() > %(ElectronIPCHI2)s) & (PIDe>%(ElectronPIDepi)s) & (TRGHOSTPROB<%(ElectronGhostProb)s ) ))" % locals()
+
+    ElectronMCut = "(INTREE( (ID=='e-') & (PT> %(ElectronPT)s *MeV) & (TRCHI2DOF < %(ElectronTrackCHI2pNDOF)s) & (BPVIPCHI2() > %(ElectronIPCHI2)s) & (PIDe>%(ElectronPIDepi)s) & (TRGHOSTPROB<%(ElectronGhostProb)s ) ))" % locals()
+    
+    _EE = FilterDesktop( Code = eeCuts + " & " + ElectronPCut + " & " + ElectronMCut )
+    
+    return Selection( name,
+                      Algorithm = _EE,
+                      RequiredSelections = [ _StdLooseDetachedDiElectron ]
+                      )
+
+
+def makeKstar(name,
+              KaonPT,
+              KaonP,
+              KaonTrackCHI2pNDOF,
+              KaonGhostProb,
+              KaonIPCHI2,
+              KaonPIDKpi,
+              #
+              PionPT,
+              PionP,
+              PionTrackCHI2pNDOF,
+              PionGhostProb,
+              PionIPCHI2,
+              PionPIDpiK,
+              #
+              KstarVertexCHI2,
+              KstarMassW
+              ):
+
+    _StdVeryLooseDetachedKst2Kpi = DataOnDemand(Location = "Phys/StdVeryLooseDetachedKst2Kpi/Particles" )
+    
+    KaonCut = "(INTREE( (ABSID=='K+') & (PT> %(KaonPT)s *MeV) & (P>%(KaonP)s *MeV) & (TRCHI2DOF < %(KaonTrackCHI2pNDOF)s) & (BPVIPCHI2()> %(KaonIPCHI2)s ) & (PIDK>%(KaonPIDKpi)s) & (TRGHOSTPROB<%(KaonGhostProb)s ) ))" % locals()
+    PionCut = "(INTREE( (ABSID=='pi+') &  (PT> %(PionPT)s *MeV) & (P>%(PionP)s *MeV) & (TRCHI2DOF < %(PionTrackCHI2pNDOF)s) & (BPVIPCHI2()> %(PionIPCHI2)s ) & (PIDK<%(PionPIDpiK)s) & (TRGHOSTPROB<%(PionGhostProb)s) ))" % locals()
+    
+    KstarMomCut = "(VFASPF(VCHI2/VDOF)< %(KstarVertexCHI2)s) & (ADMASS('K*(892)0')< %(KstarMassW)s *MeV)" % locals()
+    
+    _Kstar = FilterDesktop( Code = KstarMomCut + " & " + KaonCut + " & " + PionCut )
+                                   
+    return Selection( name,
+                      Algorithm = _Kstar,
+                      RequiredSelections = [ _StdVeryLooseDetachedKst2Kpi ]
+                      )
+
+
+def makeBd2eeKstar( name,
+                    SelEE,
+                    SelKstar,
+                    #
+                    BComMassW,
+                    BVertexCHI2,
+                    BMassW,
+                    BDIRA
+                    ):
+    
+    Bd2eeKstarBDTComCut = "(ADAMASS('B0')< %(BComMassW)s *MeV)" % locals()
+    Bd2eeKstarBDTMomCut = "(ADMASS('B0')< %(BMassW)s *MeV) & (VFASPF(VCHI2/VDOF)< %(BVertexCHI2)s) & (BPVDIRA> %(BDIRA)s )" % locals()
+    
+    _Bd2eeKstar = CombineParticles( DecayDescriptor = "[ B0 -> J/psi(1S) K*(892)0 ]cc",
+                                    CombinationCut = Bd2eeKstarBDTComCut, 
+                                    MotherCut = Bd2eeKstarBDTMomCut
+                                    )
+    return Selection( name,
+                      Algorithm = _Bd2eeKstar,
+                      RequiredSelections = [ SelEE, SelKstar ]
+                      )
+
+
+def applyBDT( name,
+              LineName,
+              SelBd2eeKstar,
+              BDTCutValue,
+              BDTWeightsFile ):
+    
+    _FilterBd2eeKstar = FilterDesktop( Code = "FILTER('Bd2eeKstarBDTSelection/Bd2eeKstarBDT')" )
+    
+    BDTSel = Selection( name,
+                        Algorithm = _FilterBd2eeKstar,
+                        RequiredSelections = [ SelBd2eeKstar ]
+                        )
+
+    """
+    Name is special here, since this is the last algorithm,
+    whose name seems to be the one of the stripping line....
+    """
+    from Configurables import Bd2eeKstarBDTSelection
+
+    MyBDT = Bd2eeKstarBDTSelection( LineName + '.Bd2eeKstarBDT' )
+    MyBDT.BDTCut = BDTCutValue
+    MyBDT.WeightsFile = BDTWeightsFile
+    
+    return BDTSel 
+    
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2MajoLep.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2MajoLep.py
new file mode 100644
index 000000000..fac6a920f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2MajoLep.py
@@ -0,0 +1,1184 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Bu/Bc->Majorana(KS0) mu+ stripping Selections and StrippingLines.
+Provides functions to build KS->DD, KS->LL, Bu/Bc selections.
+"""
+
+__author__ = ['Valeriia Lukashenko']
+__date__ = '19/03/21'
+__version__ = 'V0.2'
+__all__ = ('Beauty2MajoLepConf',
+	   'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import *
+
+from StandardParticles import StdAllNoPIDsMuons as Muons
+from StandardParticles import StdAllNoPIDsPions as Pions
+from StandardParticles import StdAllNoPIDsElectrons as Electrons
+from StandardParticles import StdAllNoPIDsKaons as Kaons
+
+from StandardParticles import StdNoPIDsDownPions as DownPions
+from StandardParticles import StdNoPIDsDownElectrons as DownElectrons
+from StandardParticles import StdLooseDownMuons as DownMuons
+
+default_config = {
+    'NAME' : 'Beauty2MajoLep',
+    'WGs' : ['RD'],
+    'STREAMS' : ['BhadronCompleteEvent'],
+    'BUILDERTYPE' : 'Beauty2MajoLepConf',
+    'CONFIG'      : {
+                     'Lep_IPChi2min'             : 25.0,
+                     'Lep_PTmin'                 : 300.,
+                     'Trk_GhostProb'             : 0.5,  
+                     'Majo_AMhigh'               : 7000.0,
+                     'Majo_AMlow'                : 200.,
+                     'Majo_PTmin'                : 700.0,
+                     'Majo_Bach_PTmin'           : 500.0,
+                     'Majo_DocaChi2'             : 25.0, 
+                     'Majo_VtxChi2'              : 10.0,
+                     'AM_Mlow'                   : 0.,
+                     'AM_Mhigh'                  : 7200.0, 
+                     'B_Mlow'                    : 4800.0,
+                     'B_Mhigh'                   : 6800.0,
+                     'B_IPCHI2wrtPV'             : 16.0,
+                     'BVtxChi2'                  : 10.0, 
+                     'B_DLS'                     : 5.0,
+                     'Bach_PTmin'                : 700.0,
+                     'Jpsi_pdg'                  : 100.,
+                     'D0_pdg'                    : 100., 
+                     'Ks_pdg_DD'                 : 50.,
+                     'B_pdg_Ks_DD'               : 200.0,           
+                     'Ks_Bach_PT_DD'             : 800.0,
+                     'B_Bach_PT_DD'              : 1000.0,
+                     'Ks_pdg'                    : 100.,
+                     'B_pdg'                     : 300.0,
+                     'B_electron_pdg'            : 500.0, 
+                     'Prescale1'                 : 0.05,
+                     'Prescale2'                 : 0.1,
+                     'Prescale3'                 : 0.2, 
+                     'Postscale'                 : 1.0, 
+                     'RequiredRawEvents'         : ["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"]
+                     },
+    }
+
+
+name="Beauty2MajoLep"
+
+class Beauty2MajoLepConf(LineBuilder) :
+    """
+    Builder of Bu->KS mu+ stripping Selection and StrippingLine.
+    Constructs B+ -> KS mu+ Selections and StrippingLines from a configuration dictionary.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        dd_name = name+'DD'
+        ll_name = name+'LL'
+        
+        Beauty2MajoMuDDName = dd_name.replace("Beauty2MajoLep","Beauty2MajoMu")
+        Beauty2MajoMuLLName = ll_name.replace("Beauty2MajoLep","Beauty2MajoMu")
+
+        Beauty2MajoEDDName = dd_name.replace("Beauty2MajoLep","Beauty2MajoE")
+        Beauty2MajoELLName = ll_name.replace("Beauty2MajoLep","Beauty2MajoE")
+
+        B2KsPiPiDDName = "Bu2KsPiPiDD"
+        B2KsPiPiLLName = "Bu2KsPiPiLL"
+ 
+        B2D0PiName = "Bu2piD02Kpi"
+ 
+        B2JpsiKName = "Bu2JpsiKplus"
+
+
+        self.muons = Muons
+        self.makeMu( 'Mufor'+name, config )
+
+        self.pions = Pions
+        self.makePi( 'Pifor'+name, config )
+
+        self.electrons = Electrons
+        self.makeE( 'Efor'+name, config )
+
+        self.downpions = DownPions
+        self.makeDownPi( 'DownPifor'+name, config )
+
+        self.downelectrons = DownElectrons
+        self.makeDownE( 'DownEfor'+name, config )
+
+        self.downmuons = DownMuons
+        self.makeDownMu( 'DownMufor'+name, config )
+
+        self.kaons = Kaons
+        self.makeKaon('KaonforD0', config) 
+
+        
+
+        ####################NORMALLINES#################################################
+        self.selMajo2EPiLL = self.makeMajo2EPiLL( 'Majofor'+Beauty2MajoMuLLName, config )
+
+        self.selMajo2MuPiDD = self.makeMajo2MuPiDD( 'Majofor'+Beauty2MajoEDDName, config )
+        self.selMajo2MuPiLL = self.makeMajo2MuPiLL( 'Majofor'+Beauty2MajoELLName, config )
+
+        self.selMajo2EPiDDOS = self.makeMajo2EPiDDOS( 'Majofor'+Beauty2MajoMuDDName+"OS", config )
+        self.selMajo2EPiDDSS = self.makeMajo2EPiDDSS( 'Majofor'+Beauty2MajoMuDDName+"SS", config )
+     
+        self.Beauty2MajoMuLL = self.makeBeauty2MajoMu2LL( Beauty2MajoMuLLName, config )
+
+        self.Beauty2MajoEDD = self.makeBeauty2MajoE2DD( Beauty2MajoEDDName, config )
+        self.Beauty2MajoELL = self.makeBeauty2MajoE2LL( Beauty2MajoELLName, config )
+   
+        self.Beauty2MajoMuDDOS = self.makeBeauty2MajoMu2DDOS( Beauty2MajoMuDDName+"OS", config )
+        self.Beauty2MajoMuDDSS = self.makeBeauty2MajoMu2DDSS( Beauty2MajoMuDDName+"SS", config )
+ 
+        self.B2MajoMuDDOSLine = StrippingLine(Beauty2MajoMuDDName+"OSLine",
+                                           prescale = 1.0,
+                                           postscale = 1.0,
+                                           selection = self.Beauty2MajoMuDDOS,
+                                           RequiredRawEvents = config['RequiredRawEvents'],
+                                           checkPV = True
+                                           )
+
+        self.B2MajoMuDDSSLine = StrippingLine(Beauty2MajoMuDDName+"SSLine",
+                                           prescale = 1.0,
+                                           postscale = 1.0,
+                                           selection = self.Beauty2MajoMuDDSS,
+                                           RequiredRawEvents = config['RequiredRawEvents'],
+                                           checkPV = True
+                                           )
+
+
+        self.B2MajoEDDLine = StrippingLine(Beauty2MajoEDDName+"Line",
+                                           prescale = 1.0,
+                                           postscale = 1.0,
+                                           selection = self.Beauty2MajoEDD,
+                                           RequiredRawEvents = config['RequiredRawEvents'], 
+                                           checkPV = True
+                                           )
+
+
+        self.B2MajoMuLLLine = StrippingLine(Beauty2MajoMuLLName+"Line",
+                                           prescale = 1.0,
+                                           postscale = 1.0,
+                                           selection =  self.Beauty2MajoMuLL,
+                                           RequiredRawEvents = config['RequiredRawEvents'], 
+                                           checkPV = True
+                                           )
+
+        self.B2MajoELLLine = StrippingLine(Beauty2MajoELLName+"Line",
+                                           prescale = 1.0,
+                                           postscale = 1.0,
+                                           selection =  self.Beauty2MajoELL,
+                                           RequiredRawEvents = config['RequiredRawEvents'], 
+                                           checkPV = True
+                                           )
+
+
+        #######################PRESCALED LINES#############################################
+        
+
+        self.selMajo2EPiLLPr = self.makeMajo2EPiLL( 'Majofor'+Beauty2MajoMuLLName+'Prescale', config, True )
+
+        self.selMajo2MuPiDDPr = self.makeMajo2MuPiDD( 'Majofor'+Beauty2MajoEDDName+'Prescale', config, True )
+        self.selMajo2MuPiLLPr = self.makeMajo2MuPiLL( 'Majofor'+Beauty2MajoELLName+'Prescale', config, True )
+
+        self.selMajo2EPiDDOSPr = self.makeMajo2EPiDDOS( 'Majofor'+Beauty2MajoMuDDName+"OS"+"Prescale", config, True )
+        self.selMajo2EPiDDSSPr = self.makeMajo2EPiDDSS( 'Majofor'+Beauty2MajoMuDDName+"SS"+"Prescale", config, True )
+        
+ 
+        self.Beauty2MajoMuLLPr = self.makeBeauty2MajoMu2LL( Beauty2MajoMuLLName+'Prescale', config, True )
+
+        self.Beauty2MajoEDDPr = self.makeBeauty2MajoE2DD( Beauty2MajoEDDName+'Prescale', config, True )
+        self.Beauty2MajoELLPr = self.makeBeauty2MajoE2LL( Beauty2MajoELLName+'Prescale', config, True )
+
+        self.Beauty2MajoMuDDOSPr = self.makeBeauty2MajoMu2DDOS( Beauty2MajoMuDDName+"OS"+"Prescale", config, True )
+        self.Beauty2MajoMuDDSSPr = self.makeBeauty2MajoMu2DDSS( Beauty2MajoMuDDName+"SS"+"prescale", config, True )
+ 
+
+        self.B2MajoMuDDLineOSPr = StrippingLine(Beauty2MajoMuDDName+"OS"+"Line"+'Prescale',
+                                           prescale = config['Prescale1'],
+                                           postscale = config['Postscale'],
+                                           selection = self.Beauty2MajoMuDDOSPr,
+                                           RequiredRawEvents = config['RequiredRawEvents'], 
+                                           checkPV = True, 
+                                           )
+
+        self.B2MajoMuDDLineSSPr = StrippingLine(Beauty2MajoMuDDName+"SS"+"Line"+'Prescale',
+                                           prescale = config['Prescale1'],
+                                           postscale = config['Postscale'],
+                                           selection = self.Beauty2MajoMuDDSSPr,
+                                           RequiredRawEvents = config['RequiredRawEvents'], 
+                                           checkPV = True, 
+                                           )
+
+
+        self.B2MajoEDDLinePr = StrippingLine(Beauty2MajoEDDName+"Line"+'Prescale',
+                                           prescale = config['Prescale2'],
+                                           postscale = config['Postscale'],
+                                           selection = self.Beauty2MajoEDDPr,
+                                           RequiredRawEvents = config['RequiredRawEvents'], 
+                                           checkPV = True,
+                                           )
+
+
+        self.B2MajoMuLLLinePr = StrippingLine(Beauty2MajoMuLLName+"Line"+'Prescale',
+                                           prescale = config['Prescale3'],
+                                           postscale = config['Postscale'],
+                                           selection =  self.Beauty2MajoMuLLPr,
+                                           RequiredRawEvents = config['RequiredRawEvents'], 
+                                           checkPV = True,
+                                           )
+
+        self.B2MajoELLLinePr = StrippingLine(Beauty2MajoELLName+"Line"+'Prescale',
+                                           prescale = config['Prescale1'],
+                                           postscale = config['Postscale'],
+                                           selection =  self.Beauty2MajoELLPr,
+                                           RequiredRawEvents = config['RequiredRawEvents'], 
+                                           checkPV = True, 
+                                           )
+
+
+       #################NORMALISATION CHANNEL##########################################
+
+        self.selKs2PiPiDD = self.makeKs2PiPiDD( 'Ksfor'+B2KsPiPiDDName, config)
+        self.selKs2PiPiLL = self.makeKs2PiPiLL( 'Ksfor'+B2KsPiPiLLName, config)
+
+        self.B2KsPiDD = self.makeBeauty2KsPiDD( B2KsPiPiDDName, config)
+        self.B2KsPiLL = self.makeBeauty2KsPiLL( B2KsPiPiLLName, config)
+
+        self.B2KsPiDDLine = StrippingLine(B2KsPiPiDDName+"Line",
+                                           prescale = 1.0,
+                                           postscale = config['Postscale'],
+                                           selection = self.B2KsPiDD,
+                                           RequiredRawEvents = config['RequiredRawEvents'], 
+                                           checkPV = True, 
+                                           )
+
+        self.B2KsPiLLLine = StrippingLine(B2KsPiPiLLName+"Line",
+                                           prescale = 1.0,
+                                           postscale = config['Postscale'],
+                                           selection = self.B2KsPiLL,
+                                           RequiredRawEvents = config['RequiredRawEvents'], 
+                                           checkPV = True,
+                                           )
+
+        self.selD02PiKLL = self.makeD02PiKLL( 'D0for'+B2D0PiName, config )
+
+        self.B2D0PiLL = self.makeBeauty2D0PiLL( B2D0PiName, config )
+
+        self.B2D0PiLLLine = StrippingLine(B2D0PiName+"Line",
+                                           prescale = 1.0,
+                                           postscale = config['Postscale'],
+                                           selection = self.B2D0PiLL,
+                                           RequiredRawEvents = config['RequiredRawEvents'],
+                                           checkPV = True, 
+                                           )
+  
+        self.selJpsi2MuMu = self.makeJpsi2MuMu( 'Jpsifor'+B2JpsiKName+"mumu" , config )
+
+        self.B2JpsiKplusMuMu = self.makeBeauty2JpsiKmumu( B2JpsiKName+"mumu" , config )
+
+        self.B2JpsiKplusmumuLine = StrippingLine(B2JpsiKName +"mumu"+"Line",
+                                           prescale = 1.0,
+                                           postscale = config['Postscale'],
+                                           selection = self.B2JpsiKplusMuMu,
+                                           RequiredRawEvents = config['RequiredRawEvents'],
+                                           checkPV = True, 
+                                           )
+  
+        self.selJpsi2EE = self.makeJpsi2EE( 'Jpsifor'+B2JpsiKName+"ee" , config )
+
+        self.B2JpsiKplusEE = self.makeBeauty2JpsiKee( B2JpsiKName+"ee" , config )
+
+        self.B2JpsiKpluseeLine = StrippingLine(B2JpsiKName +"ee"+"Line",
+                                           prescale = 1.0,
+                                           postscale = config['Postscale'],
+                                           selection = self.B2JpsiKplusEE,
+                                           RequiredRawEvents = config['RequiredRawEvents'],
+                                           checkPV = True, 
+                                           )
+ 
+
+        self.registerLine(self.B2MajoMuDDLineOSPr)
+        self.registerLine(self.B2MajoMuDDLineSSPr)
+ 
+        self.registerLine(self.B2MajoMuLLLinePr)
+
+        self.registerLine(self.B2MajoEDDLinePr)
+        self.registerLine(self.B2MajoELLLinePr)
+
+        self.registerLine(self.B2MajoMuDDOSLine)
+        self.registerLine(self.B2MajoMuDDSSLine)
+ 
+
+        self.registerLine(self.B2MajoMuLLLine)
+
+        self.registerLine(self.B2MajoEDDLine)
+        self.registerLine(self.B2MajoELLLine)
+
+
+        self.registerLine(self.B2KsPiDDLine)
+        self.registerLine(self.B2KsPiLLLine)
+
+
+        self.registerLine(self.B2D0PiLLLine)
+        self.registerLine(self.B2JpsiKplusmumuLine)
+        self.registerLine(self.B2JpsiKpluseeLine)
+
+
+
+    def makeDownE( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['Lep_PTmin']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+        _allCuts = _trkGPCut + '&' + _bachPtCut 
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selDownE = Selection( name, Algorithm = _filterH, RequiredSelections = [self.downelectrons] )
+
+
+    def makeDownPi( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['Lep_PTmin']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+         
+        _allCuts = _trkGPCut + '&' + _bachPtCut 
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selDownPi = Selection( name, Algorithm = _filterH, RequiredSelections = [self.downpions] )
+
+    def makeDownMu( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['Lep_PTmin']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+
+        _allCuts = _trkGPCut + '&' + _bachPtCut 
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selDownMu = Selection( name, Algorithm = _filterH, RequiredSelections = [self.downmuons] )
+
+
+    def makeE( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['Lep_PTmin']
+        _bachIPChi2Cut  = "(MIPCHI2DV(PRIMARY) > %s)"    % config['Lep_IPChi2min']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+        
+        _allCuts = _trkGPCut + '&' + _bachPtCut + '&' + _bachIPChi2Cut 
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selE = Selection( name, Algorithm = _filterH, RequiredSelections = [self.electrons] )
+
+
+    def makePi( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['Lep_PTmin']
+        _bachIPChi2Cut  = "(MIPCHI2DV(PRIMARY) > %s)"    % config['Lep_IPChi2min']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+       
+ 
+        _allCuts = _trkGPCut + '&' + _bachPtCut + '&' + _bachIPChi2Cut 
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selPi = Selection( name, Algorithm = _filterH, RequiredSelections = [self.pions] )
+
+
+    def makeMu( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['Lep_PTmin']
+        _bachIPChi2Cut  = "(MIPCHI2DV(PRIMARY) > %s)"    % config['Lep_IPChi2min']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+        _pidMuon = '(ISMUON)' 
+
+        _allCuts = _trkGPCut + '&' + _bachPtCut + '&' + _pidMuon
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selMu = Selection( name, Algorithm = _filterH, RequiredSelections = [self.muons] )
+
+    def makeKaon( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['Lep_PTmin']
+        _bachIPChi2Cut  = "(MIPCHI2DV(PRIMARY) > %s)"    % config['Lep_IPChi2min']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+
+        _allCuts = _trkGPCut + '&' + _bachPtCut + '&' + _bachIPChi2Cut 
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selKaon = Selection( name, Algorithm = _filterH, RequiredSelections = [self.kaons] )
+
+
+################################SIGNALLINES#################################
+    #For DD
+    def makeMajo2EPiDDSS( self, name, config, prescale=False ) :
+        """
+        Create and store a Bu -> epi DD Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+            
+        _massCutHigh    = "(AM<(%s*MeV))"                     % config['Majo_AMhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           %  config['Majo_DocaChi2']
+        _massCutLow     = "(AM>(%s*MeV))" % config['Majo_AMlow']
+        
+
+ 
+        _combCuts = _massCutHigh +'&'+_massCutLow+'&'+_docaCut
+       
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"  %    config['Majo_VtxChi2']
+
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut       
+       
+        _pidCut_electron = "(PIDe>3.0)&((PIDe-PIDmu)>3.0)"
+        _pidCut_pion = "((PIDe)<0.0)" 
+ 
+              
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "[Lambda0 -> pi+ e-]cc" ]
+
+        _daughterCuts =  { "pi+": "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "e-": "(PT>%s*MeV)" % config["Majo_Bach_PTmin"]}
+ 
+        if not prescale:
+             _daughterCuts =  { "pi+" : _pidCut_pion +"&"+ "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "e-": _pidCut_electron+"&"+"(PT>%s*MeV)" % config["Majo_Bach_PTmin"]}
+             _Majo.DaughtersCuts =  _daughterCuts 
+
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+    
+        return Selection(name, Algorithm = _Majo, RequiredSelections = [ self.selDownPi, self.selDownE ])
+
+    def makeMajo2EPiDDOS( self, name, config, prescale=False ) :
+        """ 
+        Create and store a Bu -> epi DD Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+            
+        _massCutHigh    = "(AM<(%s*MeV))"                     % config['Majo_AMhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           %  config['Majo_DocaChi2']
+        _massCutLow     = "(AM>(%s*MeV))" % config['Majo_AMlow']
+        
+
+ 
+        _combCuts = _massCutHigh +'&'+_massCutLow+'&'+_docaCut
+       
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"  %    config['Majo_VtxChi2']
+
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut
+        _pidCut_electron = "(PIDe>3.0)&((PIDe-PIDmu)>3.0)"
+        _pidCut_pion = "((PIDe)<0.0)" 
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "[Lambda0 -> pi+ e-]cc" ]
+
+        _daughterCuts =  { "pi+": "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "e-": "(PT>%s*MeV)" % config["Majo_Bach_PTmin"]}
+ 
+        if not prescale:
+             _daughterCuts =  { "pi+" :  _pidCut_pion +"&"+"(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "e-": _pidCut_electron+"&"+"(PT>%s*MeV)" % config["Majo_Bach_PTmin"]}
+             _Majo.DaughtersCuts =  _daughterCuts 
+
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+    
+        return Selection(name, Algorithm = _Majo, RequiredSelections = [ self.selDownPi, self.selDownE ])
+    
+
+    def makeMajo2MuPiDD( self, name, config, prescale=False ) :
+        """
+        Create and store a HNL -> mu pi DD Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutHigh    = "(AM<(%s*MeV))"                     % config['Majo_AMhigh']
+        _massCutLow     = "(AM>(%s*MeV))" % config['Majo_AMlow']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           % config['Majo_DocaChi2']
+
+        _combCuts = _massCutHigh + '&' + _massCutLow+'&'+_docaCut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Majo_VtxChi2']
+
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut 
+
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "KS0 -> pi+ mu-", "KS0 -> pi- mu+" ]
+
+        _daughterCuts =  {  "mu-" : "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "pi+" : "(PT>%s*MeV)" % config["Majo_Bach_PTmin"]}
+        _Majo.DaughtersCuts = _daughterCuts
+ 
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+        return Selection(name, Algorithm = _Majo, RequiredSelections = [ self.selDownPi, self.selDownMu ])
+    # For LL
+
+    
+    def makeMajo2EPiLL( self, name, config, prescale=False ) :
+        """
+        Create and store a HNL -> epi LL Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutHigh    = "(AM<(%s*MeV))"                     % config['Majo_AMhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           % config['Majo_DocaChi2']
+        _massCutLow     = "(AM>(%s*MeV))" % config['Majo_AMlow']
+        _combCuts = _massCutHigh + '&' + _massCutLow+'&'+_docaCut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Majo_VtxChi2']
+
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut
+
+        _pidCut_electron = "(PIDe>0.)"
+        
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "KS0 -> pi+ e-", "KS0 -> pi- e+" ]
+ 
+        if not prescale:
+             _daughterCuts =  { "pi+": "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "e-": _pidCut_electron+"&"+"(PT>%s*MeV)" % config["Majo_Bach_PTmin"]}
+        else:
+             _daughterCuts =  { "pi+": "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "e-": "(PT>%s*MeV)" % config["Majo_Bach_PTmin"]}
+
+        _Majo.DaughtersCuts =  _daughterCuts 
+        
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _Majo, RequiredSelections = [ self.selPi, self.selE ])
+
+    def makeMajo2MuPiLL( self, name, config, prescale=False ) :
+        """
+        Create and store a HNL -> mu pi LL Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutHigh    = "(AM<(%s*MeV))"                     % config['Majo_AMhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           % config['Majo_DocaChi2']
+        _massCutLow = "(AM>(%s*MeV))" % config['Majo_AMlow']
+        _combCuts = _massCutHigh+'&'+_massCutLow+'&'+_docaCut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Majo_VtxChi2']
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut
+        
+        _pidCut_muon = "(PIDmu>0.)"
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "KS0 -> pi+ mu-", "KS0 -> pi- mu+"  ]
+
+        if not prescale:
+             _daughterCuts =  { "pi+": "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "mu-": _pidCut_muon+"&"+"(PT>%s*MeV)" % config["Majo_Bach_PTmin"]}
+        else:
+             _daughterCuts =  { "pi+": "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "mu-": "(PT>%s*MeV)" % config["Majo_Bach_PTmin"]}
+
+        _Majo.DaughtersCuts =  _daughterCuts 
+
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _Majo, RequiredSelections = [ self.selPi, self.selMu ])
+
+#for LL
+    def makeBeauty2MajoMu2LL( self, name, config, prescale=False ) :
+        """
+        Create and store a Bu -> KS(LL) mu+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(%s*MeV))" % config['AM_Mlow']
+        _massCutHigh    = "(AM<(%s*MeV))" % config['AM_Mhigh']
+      
+        _combCuts = _massCutLow+'&'+_massCutHigh
+
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['BVtxChi2']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_IPCHI2wrtPV']
+        _fdChi2Cut  = "(BPVDLS>%s)"                 % config['B_DLS']
+        _massCutLow2     = "(M>(%s*MeV))"               % config['B_Mlow']
+        _massCutHigh2    = "(M<(%s*MeV))"               % config['B_Mhigh']
+ 
+        _motherCuts = _vtxChi2Cut+'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_massCutLow2+'&'+_massCutHigh2
+ 
+        _B = CombineParticles()
+        _pidCut_muons = "(PIDmu>0.)"
+
+        _B.DecayDescriptors = [ "B+ -> mu+ KS0", "B- -> mu- KS0"]
+        if not prescale:
+            _daughterCuts =  { "mu+" : "(PT>%s)"% (config['Bach_PTmin'])+"&"+_pidCut_muons }
+        else: 
+            _daughterCuts =  { "mu+" : "(PT>%s)"% (config['Bach_PTmin']) }
+        _B.DaughtersCuts = _daughterCuts
+            
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+        if not prescale:
+            return Selection (name, Algorithm = _B, RequiredSelections = [ self.selMu, self.selMajo2EPiLL ])
+        else:
+            return Selection (name, Algorithm = _B, RequiredSelections = [ self.selMu, self.selMajo2EPiLLPr ])
+
+    def makeBeauty2MajoMu2DDOS( self, name, config, prescale=False ) :
+        """
+        Create and store a Bu -> KS(DD) mu+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+
+        _massCutLow     = "(AM>(%s*MeV))"               % config['AM_Mlow']
+        _massCutHigh    = "(AM<(%s*MeV))"               % config['AM_Mhigh']
+
+        _combCuts = _massCutLow+'&'+_massCutHigh 
+
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['BVtxChi2']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_IPCHI2wrtPV']
+        _fdChi2Cut  = "(BPVDLS>%s)"                 % config['B_DLS'] 
+        _massCutLow2     = "(M>(%s*MeV))"               % config['B_Mlow']
+        _massCutHigh2    = "(M<(%s*MeV))"               % config['B_Mhigh']
+        _pidCut_muons = "((PIDmu-PIDe)>1.0)&(PIDmu>1.0)"
+       
+
+        _motherCuts = _vtxChi2Cut+'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_massCutLow2+'&'+_massCutHigh2
+        
+        
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "[B+ -> mu+ Lambda0]cc"]
+        if not prescale:
+            _daughterCuts = { "mu+" : _pidCut_muons+"&"+"(PT>%s*MeV)" % (config['Bach_PTmin'])}
+        else:
+            _daughterCuts = { "mu+" : "(PT>%s)" % (config['Bach_PTmin'])}
+
+        _B.DaughtersCuts = _daughterCuts
+
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+        if not prescale:
+            return Selection (name, Algorithm = _B, RequiredSelections = [ self.selMu, self.selMajo2EPiDDOS ])
+        else:
+            return Selection (name, Algorithm = _B, RequiredSelections = [ self.selMu, self.selMajo2EPiDDOSPr ])
+ 
+    def makeBeauty2MajoMu2DDSS( self, name, config, prescale=False ) :
+        """
+        Create and store a Bu -> KS(DD) mu+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+
+        _massCutLow     = "(AM>(%s*MeV))"               % config['AM_Mlow']
+        _massCutHigh    = "(AM<(%s*MeV))"               % config['AM_Mhigh']
+
+        _combCuts = _massCutLow+'&'+_massCutHigh 
+
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['BVtxChi2']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_IPCHI2wrtPV']
+        _fdChi2Cut  = "(BPVDLS>%s)"                 % config['B_DLS']
+        _massCutLow2     = "(M>(%s*MeV))"               % config['B_Mlow']
+        _massCutHigh2    = "(M<(%s*MeV))"               % config['B_Mhigh']
+        _pidCut_muons = "((PIDmu-PIDe)>1.0)&(PIDmu>1.0)"
+        _motherCuts = _vtxChi2Cut+'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_massCutLow2+'&'+_massCutHigh2
+  
+              
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "[B- -> mu- Lambda0]cc"]
+        if not prescale:
+            _daughterCuts = { "mu+" : _pidCut_muons+"&"+"(PT>%s*MeV)" % (config['Bach_PTmin'])}
+        else:
+            _daughterCuts = { "mu+" : "(PT>%s)" % (config['Bach_PTmin'])}
+
+        _B.DaughtersCuts = _daughterCuts
+
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+        if not prescale:
+            return Selection (name, Algorithm = _B, RequiredSelections = [ self.selMu, self.selMajo2EPiDDSS ])
+        else:
+            return Selection (name, Algorithm = _B, RequiredSelections = [ self.selMu, self.selMajo2EPiDDSSPr ])
+ 
+
+    def makeBeauty2MajoE2LL( self, name, config, prescale=False ) :
+        """
+        Create and store a Bu -> KS(LL) e+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(%s*MeV))" % config['AM_Mlow']
+        _massCutHigh    = "(AM<(%s*MeV))" % config['AM_Mhigh']
+
+        _combCuts = _massCutLow+'&'+_massCutHigh 
+
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['BVtxChi2']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_IPCHI2wrtPV']
+        _fdChi2Cut  = "(BPVDLS>%s)"                 % config['B_DLS']
+        _massCutLow2     = "(M>(%s*MeV))"               % config['B_Mlow']
+        _massCutHigh2    = "(M<(%s*MeV))"               % config['B_Mhigh']
+
+        _pidCut_electron = '(PIDe>0.)'
+        _motherCuts = _vtxChi2Cut+'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_massCutLow2+'&'+_massCutHigh2
+
+
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "B+ -> e+ KS0", "B- -> e- KS0"]
+
+        if not prescale:
+            _daughterCuts = { "e+" : "(PT>%s) & %s"% (config['Bach_PTmin'], _pidCut_electron)} 
+        else:
+            _daughterCuts = { "e+" : "(PT>%s)"% (config['Bach_PTmin'])}
+ 
+        _B.DaughtersCuts = _daughterCuts
+
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        if not prescale: 
+            return Selection (name, Algorithm = _B, RequiredSelections = [ self.selE, self.selMajo2MuPiLL ])
+        else:
+            return Selection (name, Algorithm = _B, RequiredSelections = [ self.selE, self.selMajo2MuPiLLPr ])
+
+
+
+# For DD
+
+    def makeBeauty2MajoE2DD( self, name, config, prescale=False ) :
+        """
+        Create and store a Bu -> KS(DD) e+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+
+        _massCutLow     = "(AM>(%s*MeV))"               % config['AM_Mlow']
+        _massCutHigh    = "(AM<(%s*MeV))"               % config['AM_Mhigh']
+     
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['BVtxChi2']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_IPCHI2wrtPV']
+        _fdChi2Cut  = "(BPVDLS>%s)"                 % config['B_DLS']
+        _massCutLow2     = "(M>(%s*MeV))"               % config['B_Mlow']
+        _massCutHigh2    = "(M<(%s*MeV))"               % config['B_Mhigh']
+        _pidCut_electron = '(PIDe>0.)'
+
+        _motherCuts = _vtxChi2Cut+'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_massCutLow2+'&'+_massCutHigh2
+
+
+
+        _combCuts = _massCutLow+'&'+_massCutHigh  
+        if not prescale:
+            _daughterCuts = { "e+" : "(PT>%s)"% (config['Bach_PTmin'])+ '&' +_pidCut_electron} 
+        else:
+            _daughterCuts = { "e+" : "(PT>%s)"% (config['Bach_PTmin'])}
+
+        
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "B+ -> e+ KS0", "B- -> e- KS0" ]
+
+        _B.CombinationCut = _combCuts
+        _B.DaughtersCuts = _daughterCuts
+        _B.MotherCut = _motherCuts
+
+        if not prescale:
+            return Selection (name, Algorithm = _B, RequiredSelections = [ self.selE, self.selMajo2MuPiDD ])
+        else:
+            return Selection (name, Algorithm = _B, RequiredSelections = [ self.selE, self.selMajo2MuPiDDPr ])
+ 
+##########################NORMALISATIONLINES###############################################
+
+    def makeKs2PiPiDD( self, name, config) :
+        """
+        Create and store a KS->pi+pi- DD Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+            
+        _massCutHigh    = "(AM<(%s*MeV))"                     % config['Majo_AMhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           %  config['Majo_DocaChi2']
+        _massCutLow     = "(AM>(%s*MeV))" % config['Majo_AMlow']
+        
+        _combCuts = _massCutHigh +'&'+_docaCut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Majo_VtxChi2']
+        _massKsCut1 = "(ADMASS('KS0') < %s)" % config['Ks_pdg_DD']
+
+
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut+'&'+_massKsCut1
+
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "KS0 -> pi- pi+" ]
+
+        
+        _daughterCuts =  { "pi+" : "(PT>%s*MeV)" % config['Ks_Bach_PT_DD'], "pi-" : "(PT>%s*MeV)" % config['Ks_Bach_PT_DD']} 
+   
+        _Majo.DaughtersCuts = _daughterCuts
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+
+        return Selection(name, Algorithm = _Majo, RequiredSelections = [ self.selDownPi, self.selDownPi ])
+
+    def makeKs2PiPiLL( self, name, config ) :
+        """
+        Create and store KS->pi+pi- LL Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutHigh    = "(AM<(%s*MeV))"                     % config['Majo_AMhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           % config['Majo_DocaChi2']
+        _massCutLow     = "(AM>(%s*MeV))" % config['Majo_AMlow']
+        _combCuts = _massCutHigh + '&'+_docaCut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Majo_VtxChi2']
+        _massKsCut1 = "(ADMASS('KS0') < %s)" % config['Ks_pdg']
+
+        
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut+'&'+_massKsCut1
+
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = ["KS0 -> pi- pi+" ]
+        _daughterCuts =  { "pi+" : "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "pi-" : "(PT>%s*MeV)" % config["Majo_Bach_PTmin"]} 
+      
+        _Majo.DaughtersCuts = _daughterCuts
+        
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _Majo, RequiredSelections = [ self.selPi, self.selPi ])
+
+    def makeBeauty2KsPiDD( self, name, config) :
+        """
+        Create and store a Bu -> KS(DD) pi+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+
+        _massCutLow     = "(AM>(%s*MeV))"               % config['AM_Mlow']
+        _massCutHigh    = "(AM<(%s*MeV))"               % config['AM_Mhigh']
+
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Majo_VtxChi2']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_IPCHI2wrtPV']
+        _fdChi2Cut  = "(BPVDLS>%s)"                 % config['B_DLS']
+        _massCut = "(ADMASS('B+') < %s)" % config['B_pdg_Ks_DD']
+ 
+        _combCuts = _massCutLow +'&'+_massCutHigh       
+        _motherCuts = _vtxChi2Cut +'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_massCut 
+        
+       
+        _daughterCuts = { "pi+" : "(PT>%s)"% config['B_Bach_PT_DD']}
+      
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "B+ -> pi+ KS0", "B- -> pi- KS0" ]
+        _B.DaughtersCuts = _daughterCuts
+
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _B, RequiredSelections = [ self.selPi, self.selKs2PiPiDD ])
+
+
+    def makeBeauty2KsPiLL( self, name, config) :
+        """
+        Create and store a Bu -> KS(DD) pi+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+
+        _massCutLow     = "(AM>(%s*MeV))"               % config['AM_Mlow']
+        _massCutHigh    = "(AM<(%s*MeV))"               % config['AM_Mhigh']
+
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['BVtxChi2']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_IPCHI2wrtPV']
+        _fdChi2Cut  = "(BPVDLS>%s)"                 % config['B_DLS']
+        _massCut = "(ADMASS('B+') < %s)" % config['B_pdg']
+        
+        _combCuts = _massCutLow+'&'+_massCutHigh 
+        _motherCuts = _vtxChi2Cut +'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_massCut
+        
+        _daughterCuts = { "pi+" : "(PT>%s)"% (config['Majo_Bach_PTmin'])}
+     
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "B+ -> pi+ KS0", "B- -> pi- KS0" ]
+        _B.CombinationCut = _combCuts
+        _B.DaughtersCuts = _daughterCuts
+        _B.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _B, RequiredSelections = [ self.selPi, self.selKs2PiPiLL ])
+
+
+
+    def makeD02PiKLL( self, name, config) :
+        """
+        Create and store a Bu -> D0 pi+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+            
+        _massCutHigh    = "(AM<(%s*MeV))"                     % config['Majo_AMhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"            %  config['Majo_DocaChi2']
+        _massCutLow     = "(AM>(%s*MeV))"                     % config['Majo_AMlow']
+        
+        _combCuts = _massCutLow + '&'+ _massCutHigh +'&'+_docaCut
+
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['BVtxChi2']
+ 
+        _massCut1 = "(ADMASS('D0') < %s)" % config['D0_pdg']
+      
+
+        _motherCuts = _ptCut+'&'+_vtxChi2Cut+'&'+_massCut1
+
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "[D0 -> K- pi+]cc" ]
+
+        
+        _daughterCuts =  { "pi+" : "(PT>%s*MeV)" % config["Majo_Bach_PTmin"],  "K-" : "(PT>%s*MeV)" % config["Majo_Bach_PTmin"]} 
+ 
+        _Majo.DaughtersCuts = _daughterCuts
+ 
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+        #_Majo.Preambulo = preambulo
+
+
+        return Selection(name, Algorithm = _Majo, RequiredSelections = [ self.selPi, self.selKaon ])
+
+    def makeBeauty2D0PiLL( self, name, config) :
+        """
+        Create and store a Bu -> D0pi+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+
+        _massCutLow     = "(AM>(%s*MeV))"               % config['AM_Mlow']
+        _massCutHigh    = "(AM<(%s*MeV))"               % config['AM_Mhigh']
+
+        _combCuts = _massCutLow+'&'+_massCutHigh 
+
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['BVtxChi2']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_IPCHI2wrtPV']
+        _fdChi2Cut  = "(BPVDLS>%s)"                 % config['B_DLS']
+        _massCut = "(ADMASS('B+') < %s)" % config['B_pdg']
+        
+
+
+
+        _motherCuts = _vtxChi2Cut +'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_massCut
+        
+        
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "B+ -> pi+ D~0", "B- -> pi- D0" ]
+        _daughterCuts = { "pi+" : "(PT>%s)"% (config['Majo_Bach_PTmin'])}
+        _B.DaughtersCuts = _daughterCuts
+
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _B, RequiredSelections = [ self.selPi, self.selD02PiKLL ])
+
+
+    def makeJpsi2MuMu( self, name, config) :
+        """
+        Create and store a Jpsi ->mu+mu- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+        _massCut     = "(AM<%s*MeV)"               % config['Majo_AMhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           % config['Majo_DocaChi2']
+
+   
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _massCutJpsi = "(ADMASS('J/psi(1S)') < %s)" % config['Jpsi_pdg']
+        
+        _motherCuts = _ptCut+'&'+_massCutJpsi
+        _combCuts = _massCut + '&' + _docaCut
+
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "J/psi(1S) -> mu+ mu-" ]
+
+        
+      
+        _daughterCuts =  { "mu-" : "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "mu+" : "(PT>%s*MeV)" % config["Majo_Bach_PTmin"]} 
+ 
+        _Majo.DaughtersCuts = _daughterCuts
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+
+        return Selection(name, Algorithm = _Majo, RequiredSelections = [ self.selMu, self.selMu ])
+
+    def makeJpsi2EE( self, name, config) :
+        """
+        Create and store a Jpsi ->e+e- Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           % config['Majo_DocaChi2']
+        _massCut     = "(AM<%s*MeV)"               % config['Majo_AMhigh']
+ 
+   
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _massCutJpsi = "(ADMASS('J/psi(1S)') < %s)" % config['Jpsi_pdg']
+      
+
+        _motherCuts = _ptCut+'&'+_massCutJpsi
+        _combCuts = _massCut + '&' + _docaCut
+
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "J/psi(1S) -> e+ e-" ]
+
+             
+        _daughterCuts =  { "e-" : "(PT>%s*MeV)" % config["Majo_Bach_PTmin"], "e+" : "(PT>%s*MeV)" % config["Majo_Bach_PTmin"]} 
+ 
+        _Majo.DaughtersCuts = _daughterCuts
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+      
+        return Selection(name, Algorithm = _Majo, RequiredSelections = [ self.selE, self.selE ])
+
+ 
+    def makeBeauty2JpsiKmumu( self, name, config) :
+        """
+        Create and store a Bu -> JpsiK+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+
+        _massCutLow     = "(AM>(%s*MeV))"               % config['AM_Mlow']
+        _massCutHigh    = "(AM<(%s*MeV))"               % config['AM_Mhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           % config['Majo_DocaChi2']
+
+
+        _combCuts = _massCutLow+'&'+_massCutHigh 
+
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['BVtxChi2']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_IPCHI2wrtPV']
+        _fdChi2Cut  = "(BPVDLS>%s)"                 % config['B_DLS']       
+        _massCut = "(ADMASS('B+') < %s)" % config['B_electron_pdg']
+ 
+
+
+        _motherCuts = _vtxChi2Cut +'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_massCut
+        
+        
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "B+ -> K+ J/psi(1S)", "B- -> K- J/psi(1S)" ]
+        _daughterCuts = { "K+" : "(PT>%s)"% (config['Majo_Bach_PTmin'])}
+        _B.DaughtersCuts = _daughterCuts
+
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _B, RequiredSelections = [ self.selKaon, self.selJpsi2MuMu ])
+
+    def makeBeauty2JpsiKee( self, name, config) :
+        """
+        Create and store a Bu -> JpsiK+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+
+        _massCutLow     = "(AM>(%s*MeV))"               % config['AM_Mlow']
+        _massCutHigh    = "(AM<(%s*MeV))"               % config['AM_Mhigh']
+
+        _combCuts = _massCutLow+'&'+_massCutHigh 
+
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['BVtxChi2']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_IPCHI2wrtPV']
+        _fdChi2Cut  = "(BPVDLS>%s)"                 % config['B_DLS']       
+        _massCut = "(ADMASS('B+') < %s)" % config['B_electron_pdg']
+ 
+
+        _motherCuts = _vtxChi2Cut +'&'+_ipChi2Cut+'&'+_fdChi2Cut+'&'+_massCut
+        
+        
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "B+ -> K+ J/psi(1S)", "B- -> K- J/psi(1S)" ]
+        _daughterCuts = { "K+" : "(PT>%s)"% (config['Majo_Bach_PTmin'])}
+        _B.DaughtersCuts = _daughterCuts
+
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _B, RequiredSelections = [ self.selKaon, self.selJpsi2EE ])
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGamma.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGamma.py
new file mode 100644
index 000000000..108fb0a6a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGamma.py
@@ -0,0 +1,1983 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+B-> X Gamma selections
+'''
+
+__author__ = ['Cedric Potterat','Zhirui Xu','Pablo Ruiz Valls', 'Albert Puig', 'Violaine Bellee']
+__date__ = '11/07/2014'
+__version__ = '$Revision: 3.0 $'
+
+__all__ = ( 'Beauty2XGammaConf',
+            'makeDiTrackList',
+            'makeDiTrackLambda',
+            'makeDiTrackList_wKS0',
+            'makeTriTrackList',
+            'makeTriTrackList_wKS0',
+            'makeTriTrackList_wpi0',
+            'makeFourTrackList',
+            'makeFourTrackList_wKS0',
+            'makeFourTrackListPions',
+            'makeFourTrackList_wpi0',
+            'makeB2B2XG4piGamma',
+            'makeB2B2XG3piGamma',
+            'makeB2B2XGG3piGammaGamma',
+            'makeB2B2XG3piGammaCNV',
+            'makeB2B2XG2pipi0Gamma',
+            'makeB2B2XG2piKsGamma',
+            'makeB2B2XGpiKsGamma',
+            'makeB2B2XG2piGamma',
+            'makeB2B2XGG2piGammaGamma',
+            'makeB2B2XG2piGammaCNV',
+            'makeB2B2XG3pipi0Gamma',
+            'makeB2B2XG3piKsGamma',
+            'makeB2B2XGLambdapiGamma',
+            'makeB2B2XGLambda2piGamma',
+            'makeB2B2XGLambda3piGamma',
+            'makeB2B2XGLbLambdaGamma',
+            'default_config',
+            )
+
+default_config = {
+    'NAME' : 'Beauty2XGamma',
+    'WGs' : ['RD'],
+    'BUILDERTYPE' : 'Beauty2XGammaConf',
+    'CONFIG'      : {
+          'B2XG2piPrescale'             : 1.,
+          'B2XGG2piPrescale'             : 1.,
+          'B2XG2piCNVLLPrescale'        : 1.,
+          'B2XG2piCNVDDPrescale'        : 1.,
+          'B2XGpiKsPrescale'            : 1.,
+          'B2XG3piPrescale'             : 1.,
+          'B2XGG3piPrescale'            : 1.,
+          'B2XG3piCNVLLPrescale'        : 1.,
+          'B2XG3piCNVDDPrescale'        : 1.,
+          'B2XG2pipi0MPrescale'         : 1.,
+          'B2XG2pipi0RPrescale'         : 1.,
+          'B2XG2piKsPrescale'           : 1.,
+          'B2PhiOmega2pipipi0MPrescale' : 1.,
+          'B2PhiOmega2pipipi0RPrescale' : 1.,
+          'B2XG4piPrescale'             : 1.,
+          'B2XG3piKsPrescale'           : 1.,
+          'B2XG3pipi0MPrescale'         : 1.,
+          'B2XG3pipi0RPrescale'         : 1.,
+          'B2XG2pi2KsPrescale'          : 1.,
+          'B2XGLambdapiPrescale'        : 1.,
+          'B2XGLambda2piPrescale'       : 1.,
+          'B2XGLambda3piPrescale'       : 1.,
+          'B2XGLbLambdaPrescale'        : 1., # UNUSED
+
+          ### WARNING ###
+          ## Additional selection present in hard-coded cuts, starting somewhere below!!!
+          ### WARNING ###
+
+          # TRACK CUTS
+          'B2XGTrkChi2DOF'   : 3., # was nothing
+          'TrackGhostProb'   : 0.4, # was 0.5
+          'B2XGTrkMinIPChi2' : 20., # was 5
+          'B2XGTrkMinPT'     : 300., # was 100
+          'B2XGTrkMinP'      : 1000, # P was 2000, old stripping has 1 GeV...
+
+          # PHOTON CUTS
+          'B2XGGammaPTMin'   : 2000.,
+          'B2XGGammaCL'      : 0.,# was 0.25
+          'B2XGGammaCNVPTMin': 1000.,
+
+          # Neutral pion cuts
+          'Pi0MPMin'         : 4000.,
+          #'Pi0MPTMin': 700., # was 1200
+          'Pi0RPMin'         : 4000.,
+          'Pi0MPTMin'        : 700.,
+          'Pi0RPTMin'        : 700., # basic cut for phi/omega -> pi pi pi0 lines, recut harder for rest with below
+          'Pi0RPTReCut'      : 1200.,
+          'Pi0MPTReCut'      : 1200.,
+
+          # TRACK COMBINATION CUTS
+          'B2XGResMinPT'     : 150., #was 0
+          'B2XGResMinMass'   : 0., #was 520
+          'B2XGResMaxMass'   : 7900., # was 4940 (3500+4*(mK-mpi)). Now is maxMLambda+(mp-mpi)+(mK-mpi) to allow for Kp decays if StdLooseNoPIDPions also covers proton tracks
+          'B2XGResVtxChi2DOF'  : 9., # was 25
+          'B2XGResSumPtMin'    : 1000.,
+          'B2XGResBPVVDCHI2Min': 0., # FD avoid if possible. was 64
+          'B2XGResIPCHI2Min'   : 0.0,
+          'B2XGPhiOmegaMinMass': 700., #
+          'B2XGPhiOmegaMaxMass': 1300., # 2020
+
+          # B HADRON CUTS
+          'B2XGBMinPT'       : 1000., #0
+          'B2XGBMinM2pi'     : 2400., # was 3280
+          'B2XGBMinM3pi'     : 2400., # was 2900
+          'B2XGBMinM4pi'     : 2000., # was 2560
+          'B2XGBMinMLambda'  : 2560., # was 2900
+          'B2XGBMaxM'        : 6500., # was 8540
+          'B2XGBSumPtMin'    : 3000,  #SUMPT
+          'B2XGBMinBPVDIRA'  : 0.0,  #BPVDIRA avoid if possible
+          'B2XGBVtxChi2DOF'  : 9.,
+          'B2XGBVtxMaxIPChi2': 9., # was 25
+
+          # Trigger TOS                                                                                                                                       
+          'Hlt1TISTOSLinesDict': {'Hlt1(Two)?TrackMVA(Loose)?Decision%TOS':0,
+                                  'Hlt1(Phi)?IncPhi.*Decision%TOS':0,
+                                  'Hlt1B2GammaGamma.*Decision%TOS':0,
+                                  'Hlt1B2PhiGamma_LTUNB.*Decision%TOS':0
+                                  },
+          'Hlt2TISTOSLinesDict': {'Hlt2Topo(2|3|4)Body.*Decision%TOS':0,
+                                  'Hlt2(Phi)?IncPhi.*Decision%TOS':0,
+                                  'Hlt2Radiative.*Decision%TOS':0}
+          },
+    'STREAMS' : ['Leptonic'],
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsKaons, StdAllNoPIDsPions, StdLooseAllPhotons, StdLooseMergedPi0, StdLooseResolvedPi0, StdAllLooseGammaDD,StdAllLooseGammaLL, StdAllNoPIDsProtons
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays as Combine3Particles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays as Combine4Particles
+from Configurables import TisTosParticleTagger
+
+name = "Beauty2XGamma"
+
+def topoInputsCuts(): # Don't need IP chi2 cut b/c is in 1st filter
+    return "(HASTRACK) & (TRCHI2DOF<3) & (PT > 500*MeV) & (P > 5000*MeV)"
+
+def topoKSInputsCuts(): # Don't need IP chi2 cut b/c is in 1st filter
+    return "(PT > 500*MeV) & (P > 5000*MeV)"# & (BPVVDCHI2 > 1000)"
+
+def hasTopoChild():
+    return "AHASCHILD((ISBASIC & "+topoInputsCuts()+")|((ABSID=='KS0') & "\
+           +topoKSInputsCuts() +"))"
+
+def highTopoInputsCuts():
+    return "((HASTRACK) & (P>5000*MeV) & (PT>1000*MeV) & (TRCHI2DOF<2.5) & (MIPCHI2DV(PRIMARY)>16) & (MIPDV(PRIMARY)>0.1*mm))"
+
+def hasHighTopoChild():
+    return "INTREE(ISBASIC & "+highTopoInputsCuts()+")"
+
+def SmartPi0Cut(MinOmegaSumPtCut,MinPhiSumPtCut,MinElseSumPtCut): # not working as intended
+    PreVertexPi0Cut = "(((in_range( 752 ,AM, 812 )) && (ASUM(PT) > %(MinOmegaSumPtCut)s))" %locals()
+    PreVertexPi0Cut += "|| ((in_range( 1005 ,AM, 1030 )) && (ASUM(PT) > %(MinPhiSumPtCut)s))" %locals()
+    PreVertexPi0Cut += "|| (ASUM(PT) > %(MinElseSumPtCut)s)) " %locals()
+    return PreVertexPi0Cut
+
+
+
+
+class Beauty2XGammaConf(LineBuilder) :
+    """
+    Builder for Beauty2XGamma
+    """
+
+    __configuration_keys__ = ( 'B2XG2piPrescale',
+                               'B2XGG2piPrescale',
+                               'B2XG2piCNVLLPrescale',
+                               'B2XG2piCNVDDPrescale',
+                               'B2XGpiKsPrescale',
+                               'B2XG3piPrescale',
+                               'B2XGG3piPrescale',
+                               'B2XG3piCNVLLPrescale',
+                               'B2XG3piCNVDDPrescale',
+                               'B2XG2pipi0MPrescale',
+                               'B2XG2pipi0RPrescale',
+                               'B2XG2piKsPrescale',
+                               'B2PhiOmega2pipipi0MPrescale',
+                               'B2PhiOmega2pipipi0RPrescale',
+                               'B2XG4piPrescale',
+                               'B2XG3piKsPrescale',
+                               'B2XG3pipi0MPrescale',
+                               'B2XG3pipi0RPrescale',
+                               'B2XG2pi2KsPrescale',
+                               'B2XGLambdapiPrescale',
+                               'B2XGLambda2piPrescale',
+                               'B2XGLambda3piPrescale',
+                               'B2XGLbLambdaPrescale',
+                               'B2XGTrkChi2DOF',
+                               'TrackGhostProb',
+                               'B2XGTrkMinIPChi2',
+                               'B2XGTrkMinPT',
+                               'B2XGTrkMinP',
+                               'B2XGGammaPTMin',
+                               'B2XGGammaCL',
+                               'B2XGGammaCNVPTMin',
+                               'Pi0MPMin',
+                               'Pi0MPTMin',
+                               'Pi0RPMin',
+                               'Pi0RPTMin',
+                               'B2XGResMinPT',
+                               'B2XGResMinMass',
+                               'B2XGResMaxMass',
+                               'B2XGResVtxChi2DOF',
+                               'B2XGResSumPtMin',
+                               'B2XGResBPVVDCHI2Min',
+                               'B2XGResIPCHI2Min',
+                               'B2XGPhiOmegaMinMass',
+                               'B2XGPhiOmegaMaxMass',
+                               'Pi0MPTReCut',
+                               'Pi0RPTReCut',
+                               'B2XGBMinPT',
+                               'B2XGBMinM2pi',
+                               'B2XGBMinM3pi',
+                               'B2XGBMinM4pi',
+                               'B2XGBMinMLambda',
+                               'B2XGBMaxM',
+                               'B2XGBSumPtMin',
+                               'B2XGBMinBPVDIRA',
+                               'B2XGBVtxChi2DOF',
+                               'B2XGBVtxMaxIPChi2',
+                               'Hlt1TISTOSLinesDict',
+                               'Hlt2TISTOSLinesDict')
+
+    __confdict__={}
+
+    def __init__(self, name, config) :
+        self.name = name
+        #self.__confdict__ = default_config['CONFIG']
+        self.__confdict__ = config
+
+        LineBuilder.__init__(self, name, config)
+
+        # Prepare related info
+        rel_info = lambda top, children: [get_neutral_cone_relinfo(0.4, top, children),
+                                          get_neutral_cone_relinfo(1.0, top, children),
+                                          get_neutral_cone_relinfo(1.35, top, children),
+                                          get_neutral_cone_relinfo(1.7, top, children),
+                                          get_cone_relinfo(1.7, top, children),
+                                          get_cone_relinfo(1.35, top, children),
+                                          get_cone_relinfo(1.0, top, children),
+                                          get_vtxisol_relinfo(top),
+                                          get_vtxisol_relinfo_radiative(top)]
+
+        
+
+        # Generic track (pi) = h
+        _trkFilter = FilterDesktop(Code = "(HASTRACK) & (TRCHI2DOF < %(B2XGTrkChi2DOF)s)& (MIPCHI2DV(PRIMARY) > %(B2XGTrkMinIPChi2)s) & (TRGHOSTPROB < %(TrackGhostProb)s) & (PT > %(B2XGTrkMinPT)s) & (P > %(B2XGTrkMinP)s)" % self.__confdict__ )
+        self.TrackList = Selection( 'TrackList' + self.name,
+                                    Algorithm = _trkFilter,
+                                    RequiredSelections = [StdAllNoPIDsPions])
+
+        # Neutral Pions, both merged and resolved
+        _Pi0MSel = FilterDesktop(Code = "(P > %(Pi0MPMin)s) & (PT > %(Pi0MPTMin)s)" % self.__confdict__ )
+        _Pi0RSel = FilterDesktop(Code = "(P > %(Pi0RPMin)s) & (PT > %(Pi0RPTMin)s)" % self.__confdict__ )
+
+        self.MergedPi0 = Selection( 'MergedPi0Sel' + self.name,
+                                    Algorithm = _Pi0MSel,
+                                    RequiredSelections = [StdLooseMergedPi0])
+        self.ResolvedPi0 = Selection( 'ResolvedPi0Sel' + self.name,
+                                      Algorithm = _Pi0RSel,
+                                      RequiredSelections = [StdLooseResolvedPi0])
+        # Ks0s
+        mergedKshorts = MergedSelection('MergedKshorts',RequiredSelections = [DataOnDemand("Phys/StdLooseKsDD/Particles"), DataOnDemand("Phys/StdLooseKsLL/Particles")])
+        _KS0Sel = FilterDesktop(Code = "(PT > 1000) & (MM > 480*MeV) & (MM < 515*MeV) & (HASVERTEX) & (VFASPF(VCHI2/VDOF)<9)" % self.__confdict__ )
+        self.Kshort = Selection( 'KS0Sel' + self.name,
+                                 Algorithm = _KS0Sel,
+                                 RequiredSelections = [mergedKshorts])
+
+        # Lambdas
+        mergedLambdas = MergedSelection('MergedLambdas',RequiredSelections = [DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles"),DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")])
+        _LambdaSel = FilterDesktop(Code = "(PT > %(B2XGResMinPT)s)  & in_range( %(B2XGResMinMass)s ,ADMASS('Lambda0'), %(B2XGResMaxMass)s )" % self.__confdict__ )
+
+        self.Lambda = Selection( 'LambdaSel' + self.name,
+                                 Algorithm = _LambdaSel,
+                                 RequiredSelections = [mergedLambdas])
+        # hh
+        self.DiTrackList = makeDiTrackList( name="DiTracksForRadiativeB" + self.name,
+                                            trkList=self.TrackList,
+                                            MinPTCut = config['B2XGResMinPT'],
+                                            MinSumPTCut = config['B2XGResSumPtMin'],
+                                            MaxMassCut = config['B2XGResMaxMass'],
+                                            MinMassCut = config['B2XGResMinMass'],
+                                            IPChi2MinCut = config['B2XGResIPCHI2Min'],
+                                            VtxChi2DOFCut = config['B2XGResVtxChi2DOF'] )
+
+
+        # h + Ks0
+        self.DiTrackList_wKS0 = makeDiTrackList_wKS0( name="Track_wKs0ForRadiativeB" + self.name,
+                                                      trkList=self.TrackList,
+                                                      ksList=self.Kshort,
+                                                      MinPTCut = config['B2XGResMinPT'],
+                                                      MinSumPTCut = config['B2XGResSumPtMin'],
+                                                      MaxMassCut = config['B2XGResMaxMass'],
+                                                      MinMassCut = config['B2XGResMinMass'],
+                                                      IPChi2MinCut = config['B2XGResIPCHI2Min'],
+                                                      VtxChi2DOFCut = config['B2XGResVtxChi2DOF'] )
+
+
+        # hhh built as hh + h
+        self.TriTrackList = makeTriTrackList( name="TriTracks_NBodyDecay_ForRadiativeB" + self.name,
+                                              trkList=self.TrackList,
+                                              MinPTCut = config['B2XGResMinPT'],
+                                              MinSumPTCut = config['B2XGResSumPtMin'],
+                                              MaxMassCut = config['B2XGResMaxMass'],
+                                              MinMassCut = config['B2XGResMinMass'],
+                                              VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                              BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                              IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                              )
+
+
+        # hh + Ks0 [built as hh + Ks0]
+        self.TriTrackList_wKS0 = makeTriTrackList_wKS0( name="DiTracks_wKS0ForRadiativeB" + self.name,
+                                                        ksList=self.Kshort,
+                                                        ditrkList=self.DiTrackList,
+                                                        MinPTCut = config['B2XGResMinPT'],
+                                                        MinSumPTCut = config['B2XGResSumPtMin'],
+                                                        MaxMassCut = config['B2XGResMaxMass'],
+                                                        MinMassCut = config['B2XGResMinMass'],
+                                                        VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                        BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                        IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                        )
+
+        # hh + merged pi0
+        self.TriTrackList_wpi0M = makeTriTrackList_wpi0( name="DiTracks_wpi0_merged_ForRadiativeB" + self.name,
+                                                         pi0List=self.MergedPi0,
+                                                         ditrkList=self.DiTrackList,
+                                                         MinPTCut = config['B2XGResMinPT'],
+                                                         MinSumPTCut = config['B2XGResSumPtMin'],
+                                                         Pi0PTCut = config['Pi0MPTReCut'],
+                                                         MaxMassCut = config['B2XGResMaxMass'],
+                                                         MinMassCut = config['B2XGResMinMass'],
+                                                         VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                         BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                         IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                         )
+
+        # hh + resolved pi0
+        self.TriTrackList_wpi0R = makeTriTrackList_wpi0( name="DiTracks_wpi0_resolved_ForRadiativeB" + self.name,
+                                                         pi0List=self.ResolvedPi0,
+                                                         ditrkList=self.DiTrackList,
+                                                         MinPTCut = config['B2XGResMinPT'],
+                                                         MinSumPTCut = config['B2XGResSumPtMin'],
+                                                         Pi0PTCut = config['Pi0RPTReCut'],
+                                                         MaxMassCut = config['B2XGResMaxMass'],
+                                                         MinMassCut = config['B2XGResMinMass'],
+                                                         VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                         BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                         IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                         )
+
+        # hh + merged pi0 for omega / phi analysis
+        self.TriTrackList_wpi0M_phiomega = makeTriTrackList_wpi0( name="DiTracks_wpi0_merged_ForPhiOmega" + self.name,
+                                                                  pi0List=self.MergedPi0,
+                                                                  ditrkList=self.DiTrackList,
+                                                                  MinPTCut = config['B2XGResMinPT'],
+                                                                  MinSumPTCut = config['B2XGResSumPtMin'],
+                                                                  Pi0PTCut = config['Pi0MPTMin'],
+                                                                  MaxMassCut = config['B2XGPhiOmegaMaxMass'],
+                                                                  MinMassCut = config['B2XGPhiOmegaMinMass'],
+                                                                  VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                                  BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                                  IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                                  )
+
+        # hh + resolved pi0
+        self.TriTrackList_wpi0R_phiomega = makeTriTrackList_wpi0( name="DiTracks_wpi0_resolved_ForPhiOmega" + self.name,
+                                                                  pi0List=self.ResolvedPi0,
+                                                                  ditrkList=self.DiTrackList,
+                                                                  MinPTCut = config['B2XGResMinPT'],
+                                                                  MinSumPTCut = config['B2XGResSumPtMin'],
+                                                                  Pi0PTCut = config['Pi0RPTMin'],
+                                                                  MaxMassCut = config['B2XGPhiOmegaMaxMass'],
+                                                                  MinMassCut = config['B2XGPhiOmegaMinMass'],
+                                                                  VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                                  BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                                  IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                                  )
+
+
+        # hhhh (built as hh+hh)
+        self.FourTrackList = makeFourTrackList( name="FourTracks_NBodyDecay_ForRadiativeB" + self.name,
+                                                trkList=self.TrackList,
+                                                MinPTCut = config['B2XGResMinPT'],
+                                                MinSumPTCut = config['B2XGResSumPtMin'],
+                                                MaxMassCut = config['B2XGResMaxMass'],
+                                                MinMassCut = config['B2XGResMinMass'],
+                                                VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                )
+
+
+
+        # hhhh (built as hh+hh)
+        self.FourTrackListPions = makeFourTrackListPions( name="FourTracksPionsForRadiativeB" + self.name,
+                                                          diTrkList = self.DiTrackList,
+                                                          MinPTCut = config['B2XGResMinPT'],
+                                                          MinSumPTCut = config['B2XGResSumPtMin'],
+                                                          MaxMassCut = config['B2XGResMaxMass'],
+                                                          MinMassCut = config['B2XGResMinMass'],
+                                                          VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                          BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                          IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                          )
+
+        # hhh + Ks0 [built as hhh + Ks0]
+        self.FourTrackList_wKS0 = makeFourTrackList_wKS0( name="TriTracks_wKS0ForRadiativeB" + self.name,
+                                                          ksList=self.Kshort,
+                                                          tritrkList=self.TriTrackList,
+                                                          MinPTCut = config['B2XGResMinPT'],
+                                                          MinSumPTCut = config['B2XGResSumPtMin'],
+                                                          MaxMassCut = config['B2XGResMaxMass'],
+                                                          MinMassCut = config['B2XGResMinMass'],
+                                                          VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                          BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                          IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                          )
+
+        # hhKs0Ks0 (built as hKs0+hKs0)
+        self.FourTrackList_w2KS0 = makeFourTrackList_w2KS0( name="DiTracks_w2KS0ForRadiativeB" + self.name,
+                                                            diTrkList = self.DiTrackList_wKS0,
+                                                            MinPTCut = config['B2XGResMinPT'],
+                                                            MinSumPTCut = config['B2XGResSumPtMin'],
+                                                            MaxMassCut = config['B2XGResMaxMass'],
+                                                            MinMassCut = config['B2XGResMinMass'],
+                                                            VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                            BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                            IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                            )
+
+
+        # hhh + merged pi0
+        self.FourTrackList_wpi0M = makeFourTrackList_wpi0( name="TriTracks_wpi0_merged_ForRadiativeB" + self.name,
+                                                           pi0List=self.MergedPi0,
+                                                           tritrkList=self.TriTrackList,
+                                                           MinPTCut = config['B2XGResMinPT'],
+                                                           MinSumPTCut = config['B2XGResSumPtMin'],
+                                                           Pi0PTCut = config['Pi0MPTReCut'],
+                                                           MaxMassCut = config['B2XGResMaxMass'],
+                                                           MinMassCut = config['B2XGResMinMass'],
+                                                           VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                           BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                           IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                           )
+
+        # hhh + resolved pi0
+        self.FourTrackList_wpi0R = makeFourTrackList_wpi0( name="TriTracks_wpi0_resolved_ForRadiativeB" + self.name,
+                                                           pi0List=self.ResolvedPi0,
+                                                           tritrkList=self.TriTrackList,
+                                                           MinPTCut = config['B2XGResMinPT'],
+                                                           MinSumPTCut = config['B2XGResSumPtMin'],
+                                                           Pi0PTCut = config['Pi0RPTReCut'],
+                                                           MaxMassCut = config['B2XGResMaxMass'],
+                                                           MinMassCut = config['B2XGResMinMass'],
+                                                           VtxChi2DOFCut = config['B2XGResVtxChi2DOF'],
+                                                           BPVVDCHI2MinCut = config['B2XGResBPVVDCHI2Min'],
+                                                           IPChi2MinCut = config['B2XGResIPCHI2Min']
+                                                           )
+
+        #####################################################################################################################################
+        ################################# STRIPPING LINES BUILT BELOW #######################################################################
+        #####################################################################################################################################
+
+        # Photons to add to the track combinations defined previously for the whole decay
+        _PhotonSel = FilterDesktop(Code = "(PT > %(B2XGGammaPTMin)s) & (CL > %(B2XGGammaCL)s)" % self.__confdict__ )
+        self.Photon = Selection( 'PhotonSel' + self.name,
+                                 Algorithm = _PhotonSel,
+                                 RequiredSelections = [StdLooseAllPhotons])
+
+        # Converted Photons, for the hh[h]+g(-> e+e-) lines
+        # mergedConvPhotons = MergedSelection('MergedConvertedPhotons', RequiredSelections = [StdAllLooseGammaDD,StdAllLooseGammaLL])
+        # _ConvPhotonSel = FilterDesktop(Code = "(MM < 100*MeV) & (HASVERTEX) & (VFASPF(VCHI2/VDOF)<9) & (PT >  %(B2XGGammaCNVPTMin)s)" % self.__confdict__ )
+        # self.ConvPhoton = Selection( 'ConvPhoton' + self.name,
+        #                              Algorithm = _ConvPhotonSel,
+        #                              RequiredSelections = [mergedConvPhotons])
+
+        _LLConvSel = FilterDesktop(Code = "(MM < 100*MeV) & (HASVERTEX) & (VFASPF(VCHI2/VDOF)<9) & (PT >  %(B2XGGammaCNVPTMin)s)" % self.__confdict__ )
+        _DDConvSel = FilterDesktop(Code = "(MM < 100*MeV) & (HASVERTEX) & (VFASPF(VCHI2/VDOF)<9) & (PT >  %(B2XGGammaCNVPTMin)s)" % self.__confdict__ )
+
+        self.ConvLLPhoton = Selection( 'ConvLLPhoton' + self.name,
+                                       Algorithm = _LLConvSel,
+                                       RequiredSelections = [StdAllLooseGammaLL])
+        self.ConvDDPhoton = Selection( 'ConvDDPhoton' + self.name,
+                                       Algorithm = _DDConvSel,
+                                       RequiredSelections = [StdAllLooseGammaDD])
+
+        B2XG2piName = self.name + "2pi_"
+        self.RadiativeB2XG2pi = makeB2B2XG2piGamma( B2XG2piName,
+                                                    diTrkList=self.DiTrackList,
+                                                    photons=self.Photon,
+                                                    MinPTCut = config['B2XGBMinPT'],
+                                                    MinMassCut = config['B2XGBMinM2pi'],
+                                                    MaxMassCut = config['B2XGBMaxM'],
+                                                    VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                    MinSumPtCut = config['B2XGBSumPtMin'],
+                                                    MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                    VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                    Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                    Hlt2Dict = config['Hlt2TISTOSLinesDict']
+                                                    )
+
+        self.B2XG2piLine = StrippingLine( B2XG2piName+"Line",
+                                          prescale = config['B2XG2piPrescale'],
+                                          selection = self.RadiativeB2XG2pi,
+                                          EnableFlavourTagging = True,
+                                          MDSTFlag = False,
+                                          RelatedInfoTools = rel_info(self.RadiativeB2XG2pi,
+                                                                  {'Gamma': 'B0 -> rho(770)0 ^gamma',
+                                                                   'Res': 'B0 -> ^rho(770)0 gamma'}))
+
+        B2XGG2piName = self.name + "2pi_gammagamma_"
+        self.RadiativeB2XGG2pi = makeB2B2XGG2piGammaGamma( B2XGG2piName,
+                                                           diTrkList=self.DiTrackList,
+                                                           photons=self.Photon,
+                                                           MinPTCut = config['B2XGBMinPT'],
+                                                           MinMassCut = config['B2XGBMinM2pi'],
+                                                           MaxMassCut = config['B2XGBMaxM'],
+                                                           VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                           MinSumPtCut = config['B2XGBSumPtMin'],
+                                                           MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                           VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                           Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                           Hlt2Dict = config['Hlt2TISTOSLinesDict']
+                                                           )
+
+        self.B2XGG2piLine = StrippingLine( B2XGG2piName+"Line",
+                                          prescale = config['B2XGG2piPrescale'],
+                                          selection = self.RadiativeB2XGG2pi,
+                                          EnableFlavourTagging = True,
+                                          MDSTFlag = False,
+                                          RelatedInfoTools = rel_info(self.RadiativeB2XGG2pi,
+                                                                  {'Gamma0': 'B0 -> rho(770)0 ^gamma gamma',
+                                                                   'Gamma1': 'B0 -> rho(770)0 gamma ^gamma',
+                                                                   'Res': 'B0 -> ^rho(770)0 gamma gamma'}))
+
+        B2XG2piCNVLLName = self.name + "2pi_wCNVLL_"
+        self.RadiativeB2XG2piCNVLL = makeB2B2XG2piGammaCNV( B2XG2piCNVLLName,
+                                                            diTrkList=self.DiTrackList,
+                                                            photons=self.ConvLLPhoton,
+                                                            MinPTCut = config['B2XGBMinPT'],
+                                                            MinMassCut = config['B2XGBMinM2pi'],
+                                                            MaxMassCut = config['B2XGBMaxM'],
+                                                            VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                            MinSumPtCut = config['B2XGBSumPtMin'],
+                                                            MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                            VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                            Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                            Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG2piCNVLLLine = StrippingLine( B2XG2piCNVLLName+"Line",
+                                               prescale = config['B2XG2piCNVLLPrescale'],
+                                               selection = self.RadiativeB2XG2piCNVLL,
+                                               EnableFlavourTagging = True,
+                                               MDSTFlag = False,
+                                               RelatedInfoTools = rel_info(self.RadiativeB2XG2piCNVLL,
+                                                                           {'Gamma': 'B0 -> rho(770)0 ^gamma',
+                                                                            'Res': 'B0 -> ^rho(770)0 gamma'}))
+
+        B2XG2piCNVDDName = self.name + "2pi_wCNVDD_"
+        self.RadiativeB2XG2piCNVDD = makeB2B2XG2piGammaCNV( B2XG2piCNVDDName,
+                                                            diTrkList=self.DiTrackList,
+                                                            photons=self.ConvDDPhoton,
+                                                            MinPTCut = config['B2XGBMinPT'],
+                                                            MinMassCut = config['B2XGBMinM2pi'],
+                                                            MaxMassCut = config['B2XGBMaxM'],
+                                                            VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                            MinSumPtCut = config['B2XGBSumPtMin'],
+                                                            MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                            VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                            Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                            Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG2piCNVDDLine = StrippingLine( B2XG2piCNVDDName+"Line",
+                                               prescale = config['B2XG2piCNVDDPrescale'],
+                                               selection = self.RadiativeB2XG2piCNVDD,
+                                               EnableFlavourTagging = True,
+                                               MDSTFlag = False,
+                                               RelatedInfoTools = rel_info(self.RadiativeB2XG2piCNVDD,
+                                                                           {'Gamma': 'B0 -> rho(770)0 ^gamma',
+                                                                            'Res': 'B0 -> ^rho(770)0 gamma'}))
+
+        B2XGpiKsName = self.name + "pi_Ks0_"
+        self.RadiativeB2XGpiKs = makeB2B2XGpiKsGamma( B2XGpiKsName,
+                                                      diTrkList=self.DiTrackList_wKS0,
+                                                      photons=self.Photon,
+                                                      MinPTCut = config['B2XGBMinPT'],
+                                                      MinMassCut = config['B2XGBMinM2pi'],
+                                                      MaxMassCut = config['B2XGBMaxM'],
+                                                      VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                      MinSumPtCut = config['B2XGBSumPtMin'],
+                                                      MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                      VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                      Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                      Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XGpiKsLine = StrippingLine( B2XGpiKsName+"Line",
+                                           prescale = config['B2XGpiKsPrescale'],
+                                           selection = self.RadiativeB2XGpiKs,
+                                           EnableFlavourTagging = True,
+                                           MDSTFlag = False,
+                                           RelatedInfoTools = rel_info(self.RadiativeB2XGpiKs,
+                                                                       {'Gamma': '[B+ -> rho(770)+ ^gamma]CC',
+                                                                        'Res': '[B+ -> ^rho(770)+ gamma]CC'}))
+
+        B2XG3piName = self.name + "3pi_"
+        self.RadiativeB2XG3pi = makeB2B2XG3piGamma ( B2XG3piName,
+                                                     triTrkList=self.TriTrackList,
+                                                     photons=self.Photon,
+                                                     MinPTCut = config['B2XGBMinPT'],
+                                                     MinMassCut = config['B2XGBMinM3pi'],
+                                                     MaxMassCut = config['B2XGBMaxM'],
+                                                     VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                     MinSumPtCut = config['B2XGBSumPtMin'],
+                                                     MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                     VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                     Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                     Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG3piLine = StrippingLine( B2XG3piName+"Line",
+                                          prescale = config['B2XG3piPrescale'],
+                                          selection = self.RadiativeB2XG3pi,
+                                          EnableFlavourTagging = True,
+                                          MDSTFlag = False,
+                                          RelatedInfoTools=rel_info(self.RadiativeB2XG3pi,
+                                                                    {'Gamma': '[B+ -> K_1(1270)+ ^gamma]CC',
+                                                                     'Res': '[B+ -> ^K_1(1270)+ gamma]CC'}))
+
+        B2XGG3piName = self.name + "3pi_gammagamma_"
+        self.RadiativeB2XGG3pi = makeB2B2XGG3piGammaGamma ( B2XGG3piName,
+                                                           triTrkList=self.TriTrackList,
+                                                           photons=self.Photon,
+                                                           MinPTCut = config['B2XGBMinPT'],
+                                                           MinMassCut = config['B2XGBMinM3pi'],
+                                                           MaxMassCut = config['B2XGBMaxM'],
+                                                           VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                           MinSumPtCut = config['B2XGBSumPtMin'],
+                                                           MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                           VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                           Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                           Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XGG3piLine = StrippingLine( B2XGG3piName+"Line",
+                                           prescale = config['B2XGG3piPrescale'],
+                                           selection = self.RadiativeB2XGG3pi,
+                                           EnableFlavourTagging = True,
+                                           MDSTFlag = False,
+                                           RelatedInfoTools=rel_info(self.RadiativeB2XGG3pi,
+                                                                          {'Gamma0': '[B+ -> K_1(1270)+ ^gamma gamma]CC',
+                                                                           'Gamma1': '[B+ -> K_1(1270)+ gamma ^gamma]CC',
+                                                                           'Res': '[B+ -> ^K_1(1270)+ gamma gamma]CC'}))
+
+
+        B2XG3piCNVLLName = self.name + "3pi_wCNVLL_"
+        self.RadiativeB2XG3piCNVLL = makeB2B2XG3piGammaCNV ( B2XG3piCNVLLName,
+                                                             triTrkList=self.TriTrackList,
+                                                             photons=self.ConvLLPhoton,
+                                                             MinPTCut = config['B2XGBMinPT'],
+                                                             MinMassCut = config['B2XGBMinM3pi'],
+                                                             MaxMassCut = config['B2XGBMaxM'],
+                                                             VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                             MinSumPtCut = config['B2XGBSumPtMin'],
+                                                             MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                             VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                             Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                             Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG3piCNVLLLine = StrippingLine( B2XG3piCNVLLName+"Line",
+                                               prescale = config['B2XG3piCNVLLPrescale'],
+                                               selection = self.RadiativeB2XG3piCNVLL,
+                                               EnableFlavourTagging = True,
+                                               MDSTFlag = False,
+                                               RelatedInfoTools=rel_info(self.RadiativeB2XG3piCNVLL,
+                                                                         {'Gamma': '[B+ -> K_1(1270)+ ^gamma]CC',
+                                                                          'Res': '[B+ -> ^K_1(1270)+ gamma]CC'}))
+
+        B2XG3piCNVDDName = self.name + "3pi_wCNVDD_"
+        self.RadiativeB2XG3piCNVDD = makeB2B2XG3piGammaCNV ( B2XG3piCNVDDName,
+                                                             triTrkList=self.TriTrackList,
+                                                             photons=self.ConvDDPhoton,
+                                                             MinPTCut = config['B2XGBMinPT'],
+                                                             MinMassCut = config['B2XGBMinM3pi'],
+                                                             MaxMassCut = config['B2XGBMaxM'],
+                                                             VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                             MinSumPtCut = config['B2XGBSumPtMin'],
+                                                             MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                             VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                             Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                             Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG3piCNVDDLine = StrippingLine( B2XG3piCNVDDName+"Line",
+                                               prescale = config['B2XG3piCNVDDPrescale'],
+                                               selection = self.RadiativeB2XG3piCNVDD,
+                                               EnableFlavourTagging = True,
+                                               MDSTFlag = False,
+                                               RelatedInfoTools=rel_info(self.RadiativeB2XG3piCNVDD,
+                                                                         {'Gamma': '[B+ -> K_1(1270)+ ^gamma]CC',
+                                                                          'Res': '[B+ -> ^K_1(1270)+ gamma]CC'}))
+
+        B2XG2piKsName = self.name + "2pi_Ks0_"
+        self.RadiativeB2XG2piKs = makeB2B2XG2piKsGamma ( B2XG2piKsName,
+                                                         triTrkList=self.TriTrackList_wKS0,
+                                                         photons=self.Photon,
+                                                         MinPTCut = config['B2XGBMinPT'],
+                                                         MinMassCut = config['B2XGBMinM3pi'],
+                                                         MaxMassCut = config['B2XGBMaxM'],
+                                                         VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                         MinSumPtCut = config['B2XGBSumPtMin'],
+                                                         MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                         VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                         Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                         Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG2piKsLine = StrippingLine( B2XG2piKsName+"Line",
+                                            prescale = config['B2XG2piKsPrescale'],
+                                            selection = self.RadiativeB2XG2piKs,
+                                            EnableFlavourTagging = True,
+                                            MDSTFlag = False,
+                                            RelatedInfoTools = rel_info(self.RadiativeB2XG2piKs,
+                                                                        {'Gamma': 'B0 -> K*_2(1430)0 ^gamma',
+                                                                         'Res': 'B0 -> ^K*_2(1430)0 gamma'}))
+
+        B2XG2pipi0MName = self.name + "2pi_pi0M_"
+        self.RadiativeB2XG2pipi0M = makeB2B2XG2pipi0Gamma ( B2XG2pipi0MName,
+                                                            triTrkList=self.TriTrackList_wpi0M,
+                                                            photons=self.Photon,
+                                                            MinPTCut = config['B2XGBMinPT'],
+                                                            MinMassCut = config['B2XGBMinM3pi'],
+                                                            MaxMassCut = config['B2XGBMaxM'],
+                                                            VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                            MinSumPtCut = config['B2XGBSumPtMin'],
+                                                            MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                            VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                            Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                            Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG2pipi0MLine = StrippingLine( B2XG2pipi0MName+"Line",
+                                              prescale = config['B2XG2pipi0MPrescale'],
+                                              selection = self.RadiativeB2XG2pipi0M,
+                                              EnableFlavourTagging = True,
+                                              MDSTFlag = False,
+                                              RelatedInfoTools = rel_info(self.RadiativeB2XG2pipi0M,
+                                                                          {'Gamma': 'B0 -> eta ^gamma',
+                                                                           'Res': 'B0 -> ^eta gamma'}))
+
+        B2PhiOmega2pipipi0MName = self.name + "phiOmega_2pipi0M_"
+        self.RadiativeB2PhiOmega2pipipi0M = makeB2B2XG2pipi0Gamma ( B2PhiOmega2pipipi0MName,
+                                                                    triTrkList=self.TriTrackList_wpi0M_phiomega,
+                                                                    photons=self.Photon,
+                                                                    MinPTCut = config['B2XGBMinPT'],
+                                                                    MinMassCut = config['B2XGBMinM3pi'],
+                                                                    MaxMassCut = config['B2XGBMaxM'],
+                                                                    VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                                    MinSumPtCut = config['B2XGBSumPtMin'],
+                                                                    MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                                    VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                                    Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                                    Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2PhiOmega2pipipi0MLine = StrippingLine( B2PhiOmega2pipipi0MName+"Line",
+                                                      prescale = config['B2PhiOmega2pipipi0MPrescale'],
+                                                      selection = self.RadiativeB2PhiOmega2pipipi0M,
+                                                      EnableFlavourTagging = True,
+                                                      MDSTFlag = False,
+                                                      RelatedInfoTools = rel_info(self.RadiativeB2PhiOmega2pipipi0M,
+                                                                                  {'Gamma': 'B0 -> eta ^gamma',
+                                                                                   'Res': 'B0 -> ^eta gamma'}))
+
+
+        B2XG2pipi0RName = self.name + "2pi_pi0R_"
+        self.RadiativeB2XG2pipi0R = makeB2B2XG2pipi0Gamma ( B2XG2pipi0RName,
+                                                            triTrkList=self.TriTrackList_wpi0R,
+                                                            photons=self.Photon,
+                                                            MinPTCut = config['B2XGBMinPT'],
+                                                            MinMassCut = config['B2XGBMinM3pi'],
+                                                            MaxMassCut = config['B2XGBMaxM'],
+                                                            VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                            MinSumPtCut = config['B2XGBSumPtMin'],
+                                                            MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                            VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                            Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                            Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG2pipi0RLine = StrippingLine( B2XG2pipi0RName+"Line",
+                                              prescale = config['B2XG2pipi0RPrescale'],
+                                              selection = self.RadiativeB2XG2pipi0R,
+                                              EnableFlavourTagging=True,
+                                              MDSTFlag = False,
+                                              RelatedInfoTools = rel_info(self.RadiativeB2XG2pipi0R,
+                                                                          {'Gamma': 'B0 -> eta ^gamma',
+                                                                           'Res': 'B0 -> ^eta gamma'}))
+
+        B2PhiOmega2pipipi0RName = self.name + "phiOmega_2pipi0R_"
+        self.RadiativeB2PhiOmega2pipipi0R = makeB2B2XG2pipi0Gamma ( B2PhiOmega2pipipi0RName,
+                                                                    triTrkList=self.TriTrackList_wpi0R_phiomega,
+                                                                    photons=self.Photon,
+                                                                    MinPTCut = config['B2XGBMinPT'],
+                                                                    MinMassCut = config['B2XGBMinM3pi'],
+                                                                    MaxMassCut = config['B2XGBMaxM'],
+                                                                    VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                                    MinSumPtCut = config['B2XGBSumPtMin'],
+                                                                    MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                                    VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                                    Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                                    Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2PhiOmega2pipipi0RLine = StrippingLine( B2PhiOmega2pipipi0RName+"Line",
+                                                      prescale = config['B2PhiOmega2pipipi0RPrescale'],
+                                                      selection = self.RadiativeB2PhiOmega2pipipi0R,
+                                                      EnableFlavourTagging = True,
+                                                      MDSTFlag = False,
+                                                      RelatedInfoTools = rel_info(self.RadiativeB2PhiOmega2pipipi0R,
+                                                                                  {'Gamma': 'B0 -> eta ^gamma',
+                                                                                   'Res': 'B0 -> ^eta gamma'}))
+
+
+        B2XG4piName = self.name + "4pi_"
+        self.RadiativeB2XG4pi = makeB2B2XG4piGamma ( B2XG4piName,
+                                                     fourTrkList=self.FourTrackList,
+                                                     photons=self.Photon,
+                                                     MinPTCut = config['B2XGBMinPT'],
+                                                     MinMassCut = config['B2XGBMinM4pi'],
+                                                     MaxMassCut = config['B2XGBMaxM'],
+                                                     VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                     MinSumPtCut = config['B2XGBSumPtMin'],
+                                                     MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                     VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                     Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                     Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG4piLine = StrippingLine( B2XG4piName+"Line",
+                                          prescale = config['B2XG4piPrescale'],
+                                          selection = self.RadiativeB2XG4pi,
+                                          EnableFlavourTagging = True,
+                                          MDSTFlag = False,
+                                          RelatedInfoTools = rel_info(self.RadiativeB2XG4pi,
+                                                                      {'Gamma': 'B0 -> f_2(1270) ^gamma',
+                                                                       'Res': 'B0 -> ^f_2(1270) gamma'}))
+
+        B2XG4pi_2rhoName = self.name + "4pi_2rho_"
+        self.RadiativeB2XG4pi_2rho = makeB2B2XG4piGamma ( B2XG4pi_2rhoName,
+                                                          fourTrkList=self.FourTrackListPions,
+                                                          photons=self.Photon,
+                                                          MinPTCut = config['B2XGBMinPT'],
+                                                          MinMassCut = config['B2XGBMinM4pi'],
+                                                          MaxMassCut = config['B2XGBMaxM'],
+                                                          VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                          MinSumPtCut = config['B2XGBSumPtMin'],
+                                                          MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                          VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                          Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                          Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG4pi_2rhoLine = StrippingLine( B2XG4pi_2rhoName+"Line",
+                                               prescale = config['B2XG4piPrescale'],
+                                               selection = self.RadiativeB2XG4pi_2rho,
+                                               EnableFlavourTagging = True,
+                                               MDSTFlag = False,
+                                               RelatedInfoTools = rel_info(self.RadiativeB2XG4pi_2rho,
+                                                                           {'Gamma': 'B0 -> f_2(1270) ^gamma',
+                                                                            'Res': 'B0 -> ^f_2(1270) gamma'}))
+
+        B2XG3piKsName = self.name + "3pi_Ks0_"
+        self.RadiativeB2XG3piKs = makeB2B2XG3piKsGamma ( B2XG3piKsName,
+                                                         fourTrkList=self.FourTrackList_wKS0,
+                                                         photons=self.Photon,
+                                                         MinPTCut = config['B2XGBMinPT'],
+                                                         MinMassCut = config['B2XGBMinM3pi'],
+                                                         MaxMassCut = config['B2XGBMaxM'],
+                                                         VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                         MinSumPtCut = config['B2XGBSumPtMin'],
+                                                         MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                         VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                         Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                         Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG3piKsLine = StrippingLine( B2XG3piKsName+"Line",
+                                            prescale = config['B2XG3piKsPrescale'],
+                                            selection = self.RadiativeB2XG3piKs,
+                                            EnableFlavourTagging = True,
+                                            MDSTFlag = False,
+                                            RelatedInfoTools=rel_info(self.RadiativeB2XG3piKs,
+                                                                      {'Gamma': '[B+ -> K_2(1770)+ ^gamma]CC',
+                                                                       'Res': '[B+ -> ^K_2(1770)+ gamma]CC'}))
+
+        B2XG2pi2KsName = self.name + "2pi_2Ks_"
+        self.RadiativeB2XG2pi2Ks = makeB2B2XG4piGamma ( B2XG2pi2KsName,
+                                                        fourTrkList=self.FourTrackList_w2KS0,
+                                                        photons=self.Photon,
+                                                        MinPTCut = config['B2XGBMinPT'],
+                                                        MinMassCut = config['B2XGBMinM4pi'],
+                                                        MaxMassCut = config['B2XGBMaxM'],
+                                                        VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                        MinSumPtCut = config['B2XGBSumPtMin'],
+                                                        MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                        VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                        Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                        Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+
+        self.B2XG2pi2KsLine = StrippingLine( B2XG2pi2KsName+"Line",
+                                             prescale = config['B2XG2pi2KsPrescale'],
+                                             selection = self.RadiativeB2XG2pi2Ks,
+                                             EnableFlavourTagging = True,
+                                             MDSTFlag = False,
+                                             RelatedInfoTools = rel_info(self.RadiativeB2XG2pi2Ks,
+                                                                         {'Gamma': 'B0 -> f_2(1270) ^gamma',
+                                                                          'Res': 'B0 -> ^f_2(1270) gamma'}))
+
+        B2XG3pipi0MName = self.name + "3pi_pi0M_"
+        self.RadiativeB2XG3pipi0M = makeB2B2XG3pipi0Gamma ( B2XG3pipi0MName,
+                                                            fourTrkList=self.FourTrackList_wpi0M,
+                                                            photons=self.Photon,
+                                                            MinPTCut = config['B2XGBMinPT'],
+                                                            MinMassCut = config['B2XGBMinM3pi'],
+                                                            MaxMassCut = config['B2XGBMaxM'],
+                                                            VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                            MinSumPtCut = config['B2XGBSumPtMin'],
+                                                            MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                            VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                            Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                            Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG3pipi0MLine = StrippingLine( B2XG3pipi0MName+"Line",
+                                              prescale = config['B2XG3pipi0MPrescale'],
+                                              selection = self.RadiativeB2XG3pipi0M,
+                                              EnableFlavourTagging = True,
+                                              MDSTFlag = False,
+                                              RelatedInfoTools=rel_info(self.RadiativeB2XG3pipi0M,
+                                                                        {'Gamma': '[B+ -> K_2(1770)+ ^gamma]CC',
+                                                                         'Res': '[B+ -> ^K_2(1770)+ gamma]CC'}))
+
+        B2XG3pipi0RName = self.name + "3pi_pi0R_"
+        self.RadiativeB2XG3pipi0R = makeB2B2XG3pipi0Gamma ( B2XG3pipi0RName,
+                                                            fourTrkList=self.FourTrackList_wpi0R,
+                                                            photons=self.Photon,
+                                                            MinPTCut = config['B2XGBMinPT'],
+                                                            MinMassCut = config['B2XGBMinM3pi'],
+                                                            MaxMassCut = config['B2XGBMaxM'],
+                                                            VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                            MinSumPtCut = config['B2XGBSumPtMin'],
+                                                            MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                            VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                            Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                            Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XG3pipi0RLine = StrippingLine( B2XG3pipi0RName+"Line",
+                                              prescale = config['B2XG3pipi0RPrescale'],
+                                              selection = self.RadiativeB2XG3pipi0R,
+                                              EnableFlavourTagging=True,
+                                              MDSTFlag = False,
+                                              RelatedInfoTools=rel_info(self.RadiativeB2XG3pipi0R,
+                                                                        {'Gamma': '[B+ -> K_2(1770)+ ^gamma]CC',
+                                                                         'Res': '[B+ -> ^K_2(1770)+ gamma]CC'}))
+
+        B2XGLambdapiName = self.name + "pi_Lambda_"
+        self.RadiativeB2XGLambdapi = makeB2B2XGLambdapiGamma ( B2XGLambdapiName,
+                                                               trkList=self.TrackList,
+                                                               lambdas=self.Lambda,
+                                                               photons=self.Photon,
+                                                               MinPTCut = config['B2XGBMinPT'],
+                                                               MinMassCut = config['B2XGBMinMLambda'],
+                                                               MaxMassCut = config['B2XGBMaxM'],
+                                                               VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                               MinSumPtCut = config['B2XGBSumPtMin'],
+                                                               MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                               VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                               Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                               Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XGLambdapiLine = StrippingLine( B2XGLambdapiName+"Line",
+                                               prescale = config['B2XGLambdapiPrescale'],
+                                               selection = self.RadiativeB2XGLambdapi,
+                                               EnableFlavourTagging = True,
+                                               MDSTFlag = False,
+                                               RelatedInfoTools=rel_info(self.RadiativeB2XGLambdapi,
+                                                                         {'Gamma': '[B+ -> Lambda0 ^gamma pi+]CC',
+                                                                          'Lambda': '[B+ -> ^Lambda0 gamma pi+]CC',
+                                                                          'Pi': '[B+ -> Lambda0 gamma ^pi+]CC'}))
+
+        B2XGLambda2piName = self.name + "2pi_Lambda_"
+        self.RadiativeB2XGLambda2pi = makeB2B2XGLambda2piGamma ( B2XGLambda2piName,
+                                                                 diTrkList=self.DiTrackList,
+                                                                 lambdas=self.Lambda,
+                                                                 photons=self.Photon,
+                                                                 MinPTCut = config['B2XGBMinPT'],
+                                                                 MinMassCut = config['B2XGBMinMLambda'],
+                                                                 MaxMassCut = config['B2XGBMaxM'],
+                                                                 VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                                 MinSumPtCut = config['B2XGBSumPtMin'],
+                                                                 MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                                 VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                                 Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                                 Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XGLambda2piLine = StrippingLine( B2XGLambda2piName+"Line",
+                                                prescale = config['B2XGLambda2piPrescale'],
+                                                selection = self.RadiativeB2XGLambda2pi,
+                                                EnableFlavourTagging = True,
+                                                MDSTFlag = False,
+                                                RelatedInfoTools=rel_info(self.RadiativeB2XGLambda2pi,
+                                                                          {'Gamma': '[B0 -> Lambda0 ^gamma rho(770)0]CC',
+                                                                           'Lambda': '[B0 -> ^Lambda0 gamma rho(770)0]CC',
+                                                                           'Res': '[B0 -> Lambda0 gamma ^rho(770)0]CC'}))
+
+        B2XGLambda3piName = self.name + "3pi_Lambda_"
+        self.RadiativeB2XGLambda3pi = makeB2B2XGLambda3piGamma ( B2XGLambda3piName,
+                                                                 triTrkList=self.TriTrackList,
+                                                                 lambdas=self.Lambda,
+                                                                 photons=self.Photon,
+                                                                 MinPTCut = config['B2XGBMinPT'],
+                                                                 MinMassCut = config['B2XGBMinMLambda'],
+                                                                 MaxMassCut = config['B2XGBMaxM'],
+                                                                 VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                                 MinSumPtCut = config['B2XGBSumPtMin'],
+                                                                 MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                                 VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                                 Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                                 Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XGLambda3piLine = StrippingLine( B2XGLambda3piName+"Line",
+                                                prescale = config['B2XGLambda3piPrescale'],
+                                                selection = self.RadiativeB2XGLambda3pi,
+                                                EnableFlavourTagging = True,
+                                                MDSTFlag = False,
+                                                RelatedInfoTools=rel_info(self.RadiativeB2XGLambda3pi,
+                                                                          {'Gamma': '[B+ -> Lambda0 ^gamma K_1(1270)+]CC',
+                                                                           'Lambda': '[B+ -> ^Lambda0 gamma K_1(1270)+]CC',
+                                                                           'Res': '[B+ -> Lambda0 gamma ^K_1(1270)+]CC'}))
+
+        B2XGLbLambdaName = self.name + "LbLambda_"
+        self.RadiativeB2XGLbLambda = makeB2B2XGLbLambdaGamma ( B2XGLbLambdaName,
+                                                               lambdas=self.Lambda,
+                                                               photons=self.Photon,
+                                                               MinPTCut = config['B2XGBMinPT'],
+                                                               MinMassCut = config['B2XGBMinMLambda'],
+                                                               MaxMassCut = config['B2XGBMaxM'],
+                                                               VtxChi2DOFCut = config['B2XGBVtxChi2DOF'],
+                                                               MinSumPtCut = config['B2XGBSumPtMin'],
+                                                               MinBPVDIRACut = config['B2XGBMinBPVDIRA'],
+                                                               VtxMaxIPChi2Cut = config['B2XGBVtxMaxIPChi2'],
+                                                               Hlt1Dict = config['Hlt1TISTOSLinesDict'],
+                                                               Hlt2Dict = config['Hlt2TISTOSLinesDict'])
+
+        self.B2XGLbLambdaLine = StrippingLine( B2XGLbLambdaName+"Line",
+                                               prescale = config['B2XGLbLambdaPrescale'],
+                                               selection = self.RadiativeB2XGLbLambda,
+                                               EnableFlavourTagging = True,
+                                               MDSTFlag = False,
+                                               RelatedInfoTools=rel_info(self.RadiativeB2XGLbLambda,
+                                                                         {'Gamma': '[Lambda_b0 -> Lambda0 ^gamma]CC',
+                                                                          'Res': '[Lambda_b0 -> ^Lambda0 gamma]CC'}))
+
+        self.registerLine(self.B2XG2piLine)
+        self.registerLine(self.B2XGG2piLine)
+        self.registerLine(self.B2XG2piCNVLLLine)
+        self.registerLine(self.B2XG2piCNVDDLine)
+        self.registerLine(self.B2XGpiKsLine)
+
+        self.registerLine(self.B2XG3piLine)
+        self.registerLine(self.B2XGG3piLine)
+        self.registerLine(self.B2XG3piCNVLLLine)
+        self.registerLine(self.B2XG3piCNVDDLine)
+        self.registerLine(self.B2XG2pipi0RLine)
+        self.registerLine(self.B2XG2pipi0MLine)
+        self.registerLine(self.B2XG2piKsLine)
+        self.registerLine(self.B2PhiOmega2pipipi0RLine)
+        self.registerLine(self.B2PhiOmega2pipipi0MLine)
+
+        self.registerLine(self.B2XG4piLine)
+        self.registerLine(self.B2XG3piKsLine)
+        self.registerLine(self.B2XG3pipi0RLine)
+        self.registerLine(self.B2XG3pipi0MLine)
+        self.registerLine(self.B2XG2pi2KsLine)
+
+        self.registerLine(self.B2XGLambdapiLine)
+        self.registerLine(self.B2XGLambda2piLine)
+        self.registerLine(self.B2XGLambda3piLine)
+
+def makeDiTrackList( name,
+                     trkList,
+                     MinPTCut,
+                     MinSumPTCut,
+                     MaxMassCut,
+                     MinMassCut,
+                     IPChi2MinCut,
+                     VtxChi2DOFCut ) :
+    """
+    Di-track selection
+    """
+#     _diTrackPreVertexCuts = "(ASUM(SUMTREE(PT,ISBASIC,0.0))> %(MinSumPTCut)s)"%locals()
+    _diTrackPreVertexCuts = "(ASUM(PT) > %(MinSumPTCut)s)"%locals()
+    _diTrackPreVertexCuts += " & in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+
+    _diTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s)" %locals()
+
+    _combineDiTrack = CombineParticles( DecayDescriptor="rho(770)0 -> pi+ pi-",
+                                        CombinationCut = _diTrackPreVertexCuts,
+                                        MotherCut = _diTrackPostVertexCuts )
+
+    return Selection(name,
+                     Algorithm = _combineDiTrack,
+                     RequiredSelections = [ trkList ] )
+
+def makeDiTrackList_wKS0( name,
+                          trkList,
+                          ksList,
+                          MinPTCut,
+                          MinSumPTCut,
+                          MaxMassCut,
+                          MinMassCut,
+                          IPChi2MinCut,
+                          VtxChi2DOFCut ) :
+    """
+    Di-track selection
+    """
+#    _diTrackPreVertexCuts = "(ASUM(SUMTREE(PT,(ISBASIC | (ID=='gamma') | (ID=='KS0')),0.0))> %(MinSumPTCut)s)"%locals()
+    _diTrackPreVertexCuts = "(ASUM(PT) > %(MinSumPTCut)s)"%locals()
+    _diTrackPreVertexCuts += " & in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+
+    _diTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s)" %locals()
+    _diTrackPostVertexCuts += " & (MIPCHI2DV(PRIMARY) > %(IPChi2MinCut)s)" %locals()
+
+    _combineDiTrack = CombineParticles( DecayDescriptor="[rho(770)+ -> pi+ KS0]cc",
+                                        CombinationCut = _diTrackPreVertexCuts,
+                                        MotherCut = _diTrackPostVertexCuts )
+
+    return Selection(name,
+                     Algorithm = _combineDiTrack,
+                     RequiredSelections = [ trkList , ksList ] )
+
+
+def makeTriTrackList( name,
+                      trkList,
+                      MinPTCut,
+                      MinSumPTCut,
+                      MaxMassCut,
+                      MinMassCut,
+                      VtxChi2DOFCut,
+                      BPVVDCHI2MinCut,
+                      IPChi2MinCut) :
+    """
+    Tri-track selection
+    """
+    _TriTrackPreVertexCuts = hasTopoChild()
+#    _TriTrackPreVertexCuts += " & (ASUM(SUMTREE(PT,(ISBASIC | (ID=='gamma')),0.0))> %(MinSumPTCut)s)"%locals()
+    _TriTrackPreVertexCuts += " & (ASUM(PT) > %(MinSumPTCut)s)"%locals()
+    _TriTrackPreVertexCuts += " & in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+    _MassRangeCuts = "in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+
+    _TriTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s) & (PT > %(MinPTCut)s) & (BPVVDCHI2  > %(BPVVDCHI2MinCut)s) & (MIPCHI2DV(PRIMARY) > %(IPChi2MinCut)s)" %locals()
+
+
+    _combineTriTrack = Combine3Particles( DecayDescriptor="[K_1(1270)+ -> pi+ pi- pi+]cc",
+                                          Combination12Cut = _MassRangeCuts,
+                                          CombinationCut = _TriTrackPreVertexCuts,
+                                          MotherCut = _TriTrackPostVertexCuts )
+
+    return Selection(name,
+                     Algorithm = _combineTriTrack,
+                     RequiredSelections = [ trkList ] )
+
+def makeTriTrackList_wKS0( name,
+                           ksList,
+                           ditrkList,
+                           MinPTCut,
+                           MinSumPTCut,
+                           MaxMassCut,
+                           MinMassCut,
+                           VtxChi2DOFCut,
+                           BPVVDCHI2MinCut,
+                           IPChi2MinCut) :
+
+    """
+    Tri-track selection
+    """
+#    _TriTrackPreVertexCuts = "(ASUM(SUMTREE(PT,( (ID =='rho(770)0') | (ID=='gamma') | (ID=='KS0')),0.0))> %(MinSumPTCut)s)"%locals()
+    _TriTrackPreVertexCuts = "(ASUM(PT) > %(MinSumPTCut)s)"%locals()
+    _TriTrackPreVertexCuts += " & in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+
+    _TriTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s) & (PT > %(MinPTCut)s) & (BPVVDCHI2  > %(BPVVDCHI2MinCut)s) & (MIPCHI2DV(PRIMARY) > %(IPChi2MinCut)s)" %locals()
+
+    _combineTriTrack = CombineParticles( DecayDescriptor="K*_2(1430)0 -> rho(770)0 KS0",
+                                         CombinationCut = _TriTrackPreVertexCuts,
+                                         MotherCut = _TriTrackPostVertexCuts )
+
+    return Selection(name,
+                     Algorithm = _combineTriTrack,
+                     RequiredSelections = [ ksList,ditrkList ] )
+
+def makeTriTrackList_wpi0( name,
+                           pi0List,
+                           ditrkList,
+                           MinPTCut,
+                           MinSumPTCut,
+                           Pi0PTCut,
+                           MaxMassCut,
+                           MinMassCut,
+                           VtxChi2DOFCut,
+                           BPVVDCHI2MinCut,
+                           IPChi2MinCut) :
+    """
+    Tri-track selection
+    """
+    #    _TriTrackPreVertexCuts = hasTopoChild()
+    #    _TriTrackPreVertexCuts = "(ASUM(SUMTREE(PT,( (ID=='rho(770)0') | (ID=='gamma') | (ID=='pi0')),0.0))> %(MinSumPTCut)s)"%locals()
+    #    _TriTrackPreVertexCuts = SmartPi0Cut(Pi0PTCut,Pi0PTCut,MinSumPTCut) # MinPT cuts by mass windows: (Omega, Phi, Rest)
+    _Recut_pi0_PT = {
+        "pi0" : "PT > %(Pi0PTCut)s"%locals()
+        }
+
+    _TriTrackPreVertexCuts = "(ASUM(PT) > %(MinSumPTCut)s)"%locals()
+    _TriTrackPreVertexCuts += " & in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+
+    _TriTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s) & (PT > %(MinPTCut)s) & (BPVVDCHI2  > %(BPVVDCHI2MinCut)s) & (MIPCHI2DV(PRIMARY) > %(IPChi2MinCut)s)" %locals()
+
+    _combineTriTrack = CombineParticles( DecayDescriptor="eta -> rho(770)0 pi0",
+                                         DaughtersCuts = _Recut_pi0_PT,
+                                         CombinationCut = _TriTrackPreVertexCuts,
+                                         MotherCut = _TriTrackPostVertexCuts )
+
+    return Selection(name,
+                     Algorithm = _combineTriTrack,
+                     RequiredSelections = [ pi0List,ditrkList ] )
+
+
+def makeFourTrackList( name,
+                       trkList,
+                       MinPTCut,
+                       MinSumPTCut,
+                       MaxMassCut,
+                       MinMassCut,
+                       VtxChi2DOFCut,
+                       BPVVDCHI2MinCut,
+                       IPChi2MinCut) :
+    """
+    Four-track selection
+    """
+    _FourTrackPreVertexCuts = hasTopoChild()
+#    _FourTrackPreVertexCuts += "& (ASUM(SUMTREE(PT,ISBASIC,0.0))> %(MinSumPTCut)s)"%locals()
+    _FourTrackPreVertexCuts += "& (ASUM(PT) > %(MinSumPTCut)s)"%locals()
+    _FourTrackPreVertexCuts += " & in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+    _MassRangeCuts = "in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+
+    _FourTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s) & (PT > %(MinPTCut)s) & (BPVVDCHI2  > %(BPVVDCHI2MinCut)s) & (MIPCHI2DV(PRIMARY) > %(IPChi2MinCut)s)" %locals()
+
+    _combineFourTrack = Combine4Particles( DecayDescriptor="f_2(1270) -> pi+ pi+ pi- pi-",
+                                           Combination12Cut = _MassRangeCuts,
+                                           Combination123Cut = _MassRangeCuts,
+                                           CombinationCut = _FourTrackPreVertexCuts,
+                                           MotherCut = _FourTrackPostVertexCuts )
+
+
+    return Selection(name,
+                     Algorithm = _combineFourTrack,
+                     RequiredSelections = [ trkList  ] )
+
+def makeFourTrackListPions( name,
+                            diTrkList,
+                            MinPTCut,
+                            MinSumPTCut,
+                            MaxMassCut,
+                            MinMassCut,
+                            VtxChi2DOFCut,
+                            BPVVDCHI2MinCut,
+                            IPChi2MinCut) :
+    """
+    Four-track selection
+    """
+#    _FourTrackPreVertexCuts = "(ASUM(SUMTREE(PT,(ID=='rho(770)0'),0.0))> %(MinSumPTCut)s)"%locals()
+    _FourTrackPreVertexCuts = "(ASUM(PT) > %(MinSumPTCut)s)"%locals()
+    _FourTrackPreVertexCuts += " & in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+
+    _FourTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s) & (PT > %(MinPTCut)s) & (BPVVDCHI2  > %(BPVVDCHI2MinCut)s) & (MIPCHI2DV(PRIMARY) > %(IPChi2MinCut)s)" %locals()
+
+    _combineFourTracks = CombineParticles( DecayDescriptor="f_2(1270) -> rho(770)0 rho(770)0",
+                                           CombinationCut = _FourTrackPreVertexCuts,
+                                           MotherCut = _FourTrackPostVertexCuts )
+    return Selection(name,
+                     Algorithm = _combineFourTracks,
+                     RequiredSelections = [diTrkList])
+
+def makeFourTrackList_w2KS0( name,
+                             diTrkList,
+                             MinPTCut,
+                             MinSumPTCut,
+                             MaxMassCut,
+                             MinMassCut,
+                             VtxChi2DOFCut,
+                             BPVVDCHI2MinCut,
+                             IPChi2MinCut) :
+    """
+    Four-track selection
+    """
+#    _FourTrackPreVertexCuts = "(ASUM(SUMTREE(PT,((ID=='rho(770)+') | (ID=='rho(770)-')),0.0))> %(MinSumPTCut)s)"%locals()
+    _FourTrackPreVertexCuts = "(ASUM(PT) > %(MinSumPTCut)s)"%locals()
+    _FourTrackPreVertexCuts += " & in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+
+    _FourTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s) & (PT > %(MinPTCut)s) & (BPVVDCHI2  > %(BPVVDCHI2MinCut)s) & (MIPCHI2DV(PRIMARY) > %(IPChi2MinCut)s)" %locals()
+
+    _combineFourTracks = CombineParticles( DecayDescriptor="f_2(1270) -> rho(770)+ rho(770)-",
+                                           CombinationCut = _FourTrackPreVertexCuts,
+                                           MotherCut = _FourTrackPostVertexCuts )
+    return Selection(name,
+                     Algorithm = _combineFourTracks,
+                     RequiredSelections = [diTrkList])
+
+
+def makeFourTrackList_wKS0( name,
+                           ksList,
+                           tritrkList,
+                           MinPTCut,
+                           MinSumPTCut,
+                           MaxMassCut,
+                           MinMassCut,
+                           VtxChi2DOFCut,
+                           BPVVDCHI2MinCut,
+                           IPChi2MinCut) :
+    """
+    Tri-track selection
+    """
+#    _TriTrackPreVertexCuts = "(ASUM(SUMTREE(PT,( (ID =='K_1(1270)+') | (ID=='gamma') | (ID=='KS0')),0.0))> %(MinSumPTCut)s)"%locals()
+    _TriTrackPreVertexCuts = "(ASUM(PT) > %(MinSumPTCut)s)"%locals()
+    _TriTrackPreVertexCuts += " & in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+
+    _TriTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s) & (PT > %(MinPTCut)s) & (BPVVDCHI2  > %(BPVVDCHI2MinCut)s) & (MIPCHI2DV(PRIMARY) > %(IPChi2MinCut)s)" %locals()
+
+    _combineTriTrack = CombineParticles( DecayDescriptor="[K_2(1770)+ -> K_1(1270)+ KS0]cc",
+                                         CombinationCut = _TriTrackPreVertexCuts,
+                                         MotherCut = _TriTrackPostVertexCuts )
+
+    return Selection(name,
+                     Algorithm = _combineTriTrack,
+                     RequiredSelections = [ ksList,tritrkList ] )
+
+
+def makeFourTrackList_wpi0( name,
+                            pi0List,
+                            tritrkList,
+                            MinPTCut,
+                            MinSumPTCut,
+                            Pi0PTCut,
+                            MaxMassCut,
+                            MinMassCut,
+                            VtxChi2DOFCut,
+                            BPVVDCHI2MinCut,
+                            IPChi2MinCut) :
+    """
+    Four-track selection
+    """
+    _Recut_pi0_PT = {
+        "pi0" : "PT > %(Pi0PTCut)s"%locals()
+        }
+
+#    _FourTrackPreVertexCuts = hasTopoChild()
+#    _FourTrackPreVertexCuts = "(ASUM(SUMTREE(PT,( (ID=='K_1(1270)+') | (ID=='gamma') | (ID=='pi0')),0.0))> %(MinSumPTCut)s)"%locals()
+    _FourTrackPreVertexCuts = "(ASUM(PT) > %(MinSumPTCut)s)"%locals()
+    _FourTrackPreVertexCuts += " & in_range( %(MinMassCut)s , AM ,%(MaxMassCut)s)" %locals()
+
+    _FourTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s) & (PT > %(MinPTCut)s) & (BPVVDCHI2  > %(BPVVDCHI2MinCut)s) & (MIPCHI2DV(PRIMARY) > %(IPChi2MinCut)s)" %locals()
+
+    _combineFourTrack = CombineParticles( DecayDescriptor="[K_2(1770)+ -> K_1(1270)+ pi0]cc",
+                                          DaughtersCuts = _Recut_pi0_PT,
+                                          CombinationCut = _FourTrackPreVertexCuts,
+                                          MotherCut = _FourTrackPostVertexCuts )
+
+    return Selection(name,
+                     Algorithm = _combineFourTrack,
+                     RequiredSelections = [ pi0List,tritrkList ] )
+
+##################################################################################################################################################################################################
+##################################################################### Build B Decays Below #######################################################################################################
+##################################################################################################################################################################################################
+
+def makeB2B2XG2piGamma( name,
+                        diTrkList,
+                        photons,
+                        MinPTCut,
+                        MinMassCut,
+                        MaxMassCut,
+                        VtxChi2DOFCut,
+                        MinSumPtCut,
+                        MinBPVDIRACut,
+                        VtxMaxIPChi2Cut,
+                        Hlt1Dict,
+                        Hlt2Dict) :
+    """
+    Charmless B2XG to 2pi selection with missing mass
+    """
+    _B2B2XG2piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+#    _B2B2XG2piPreVertexCuts += " & (ASUM(SUMTREE(PT,( (ID=='rho(770)0') | (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+    _B2B2XG2piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XG2piPostVertexCuts = hasHighTopoChild()
+    _B2B2XG2piPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XG2piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XG2piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XG2pi = CombineParticles( DecayDescriptor="B0 -> rho(770)0 gamma",
+                                          MotherCut = _B2B2XG2piPostVertexCuts,
+                                          CombinationCut = _B2B2XG2piPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XG2pi,
+                     RequiredSelections = [ diTrkList,photons ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XGG2piGammaGamma( name,
+                              diTrkList,
+                              photons,
+                              MinPTCut,
+                              MinMassCut,
+                              MaxMassCut,
+                              VtxChi2DOFCut,
+                              MinSumPtCut,
+                              MinBPVDIRACut,
+                              VtxMaxIPChi2Cut,
+                              Hlt1Dict,
+                              Hlt2Dict) :
+    """
+    Charmless B2XG to 2pi selection with missing mass
+    """
+    _B2B2XGG2piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+#    _B2B2XG2piPreVertexCuts += " & (ASUM(SUMTREE(PT,( (ID=='rho(770)0') | (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+    _B2B2XGG2piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XGG2piPostVertexCuts = hasHighTopoChild()
+    _B2B2XGG2piPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XGG2piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XGG2piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XGG2pi = CombineParticles( DecayDescriptor="B0 -> rho(770)0 gamma gamma",
+                                           MotherCut = _B2B2XGG2piPostVertexCuts,
+                                           CombinationCut = _B2B2XGG2piPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XGG2pi,
+                     RequiredSelections = [ diTrkList,photons ] ), Hlt1Dict, Hlt2Dict)
+
+
+def makeB2B2XG2piGammaCNV( name,
+                           diTrkList,
+                           photons,
+                           MinPTCut,
+                           MinMassCut,
+                           MaxMassCut,
+                           VtxChi2DOFCut,
+                           MinSumPtCut,
+                           MinBPVDIRACut,
+                           VtxMaxIPChi2Cut,
+                           Hlt1Dict,
+                           Hlt2Dict) :
+    """
+    Charmless B2XG to 2pi and cobnverted photon selection with missing mass
+    """
+    _B2B2XG2piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XG2piPreVertexCuts += "& (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,( (ID=='rho(770)+') | (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+
+    _B2B2XG2piPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XG2piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XG2piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XG2pi = CombineParticles( DecayDescriptor="B0 -> rho(770)0 gamma",
+                                          MotherCut = _B2B2XG2piPostVertexCuts,
+                                          CombinationCut = _B2B2XG2piPreVertexCuts
+                                          )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XG2pi,
+                     RequiredSelections = [ diTrkList,photons ] ), Hlt1Dict, Hlt2Dict)
+
+
+def makeB2B2XGpiKsGamma( name,
+                         diTrkList,
+                         photons,
+                         MinPTCut,
+                         MinMassCut,
+                         MaxMassCut,
+                         VtxChi2DOFCut,
+                         MinSumPtCut,
+                         MinBPVDIRACut,
+                         VtxMaxIPChi2Cut,
+                         Hlt1Dict,
+                         Hlt2Dict) :
+    """
+    Charmless B2XG to pi+Ks0 selection with missing mass
+    """
+
+    _B2B2XG2piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XG2piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,( (ID=='rho(770)+') | (ID=='gamma') | (ID == 'KS0')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XG2piPostVertexCuts = hasHighTopoChild()
+    _B2B2XG2piPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XG2piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XG2piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XG2pi = CombineParticles( DecayDescriptor="[B+ -> rho(770)+ gamma]cc",
+                                          MotherCut = _B2B2XG2piPostVertexCuts,
+                                          CombinationCut = _B2B2XG2piPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XG2pi,
+                     RequiredSelections = [ diTrkList,photons ] ), Hlt1Dict, Hlt2Dict)
+
+
+def makeB2B2XG3piGamma( name,
+                        triTrkList,
+                        photons,
+                        MinPTCut,
+                        MinMassCut,
+                        MaxMassCut,
+                        VtxChi2DOFCut,
+                        MinSumPtCut,
+                        MinBPVDIRACut,
+                        VtxMaxIPChi2Cut,
+                        Hlt1Dict,
+                        Hlt2Dict) :
+    """
+    Charmless B2XG to 3pi selection with missing mass
+    """
+
+    _B2B2XG3piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XG3piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,( (ID=='K_1(1270)+') | (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XG3piPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XG3pi = CombineParticles( DecayDescriptor="[B+ -> K_1(1270)+ gamma]cc",
+                                          MotherCut = _B2B2XG3piPostVertexCuts,
+                                          CombinationCut = _B2B2XG3piPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XG3pi,
+                     RequiredSelections = [ triTrkList, photons ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XGG3piGammaGamma( name,
+                              triTrkList,
+                              photons,
+                              MinPTCut,
+                              MinMassCut,
+                              MaxMassCut,
+                              VtxChi2DOFCut,
+                              MinSumPtCut,
+                              MinBPVDIRACut,
+                              VtxMaxIPChi2Cut,
+                              Hlt1Dict,
+                              Hlt2Dict) :
+    """
+    Charmless B2XGG to 3pi selection with missing mass
+    """
+
+    _B2B2XGG3piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XGG3piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,( (ID=='K_1(1270)+') | (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XGG3piPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XGG3piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XGG3piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XGG3pi = CombineParticles( DecayDescriptor="[B+ -> K_1(1270)+ gamma gamma]cc",
+                                          MotherCut = _B2B2XGG3piPostVertexCuts,
+                                          CombinationCut = _B2B2XGG3piPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XGG3pi,
+                     RequiredSelections = [ triTrkList, photons ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XG3piGammaCNV( name,
+                           triTrkList,
+                           photons,
+                           MinPTCut,
+                           MinMassCut,
+                           MaxMassCut,
+                           VtxChi2DOFCut,
+                           MinSumPtCut,
+                           MinBPVDIRACut,
+                           VtxMaxIPChi2Cut,
+                           Hlt1Dict,
+                           Hlt2Dict) :
+    """
+    Charmless B2XG to 3pi selection with missing mass
+    """
+
+    _B2B2XG3piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XG3piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+    # ,( (ID=='K_1(1270)+') | (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XG3piPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XG3pi = CombineParticles( DecayDescriptor="[B+ -> K_1(1270)+ gamma]cc",
+                                          MotherCut = _B2B2XG3piPostVertexCuts,
+                                          CombinationCut = _B2B2XG3piPreVertexCuts
+                                          )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XG3pi,
+                     RequiredSelections = [ triTrkList, photons ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XG2piKsGamma( name,
+                          triTrkList,
+                          photons,
+                          MinPTCut,
+                          MinMassCut,
+                          MaxMassCut,
+                          VtxChi2DOFCut,
+                          MinSumPtCut,
+                          MinBPVDIRACut,
+                          VtxMaxIPChi2Cut,
+                          Hlt1Dict,
+                          Hlt2Dict) :
+    """
+    Charmless B2XG to 2pi+Ks0 selection with missing mass
+    """
+
+    _B2B2XG3piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XG3piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,( (ID=='K*_2(1430)0') | (ID=='gamma') | (ID == 'KS0')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XG3piPostVertexCuts = hasHighTopoChild()
+    _B2B2XG3piPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XG3pi = CombineParticles( DecayDescriptor="B0 -> K*_2(1430)0 gamma",
+                                          MotherCut = _B2B2XG3piPostVertexCuts,
+                                          CombinationCut = _B2B2XG3piPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XG3pi,
+                     RequiredSelections = [ triTrkList, photons ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XG2pipi0Gamma( name,
+                           triTrkList,
+                           photons,
+                           MinPTCut,
+                           MinMassCut,
+                           MaxMassCut,
+                           VtxChi2DOFCut,
+                           MinSumPtCut,
+                           MinBPVDIRACut,
+                           VtxMaxIPChi2Cut,
+                           Hlt1Dict,
+                           Hlt2Dict) :
+    """
+    Charmless B2XG to 2pi+ pi0 selection with missing mass
+    """
+
+    _B2B2XG3piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XG3piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,( (ID=='eta')| (ID=='gamma') | (ID == 'pi0')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XG3piPostVertexCuts = hasHighTopoChild()
+    _B2B2XG3piPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XG3pi = CombineParticles( DecayDescriptor="B0 -> eta gamma",
+                                          MotherCut = _B2B2XG3piPostVertexCuts,
+                                          CombinationCut = _B2B2XG3piPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XG3pi,
+                     RequiredSelections = [ triTrkList, photons ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XG4piGamma( name,
+                        fourTrkList,
+                        photons,
+                        MinPTCut,
+                        MinMassCut,
+                        MaxMassCut,
+                        VtxChi2DOFCut,
+                        MinSumPtCut,
+                        MinBPVDIRACut,
+                        VtxMaxIPChi2Cut,
+                        Hlt1Dict,
+                        Hlt2Dict) :
+    """
+    Charmless B2XG to 4pi (a group of three tracks with an additional one) selection with missing mass
+    """
+
+    _B2B2XG4piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XG4piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,(ISBASIC| (ID=='f_2(1270)') | (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XG4piPostVertexCuts = hasHighTopoChild()
+    _B2B2XG4piPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XG4piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XG4piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XG4pi = CombineParticles( DecayDescriptor="B0 -> f_2(1270) gamma",
+                                          MotherCut = _B2B2XG4piPostVertexCuts,
+                                          CombinationCut = _B2B2XG4piPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XG4pi,
+                     RequiredSelections = [ fourTrkList, photons ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XG3piKsGamma( name,
+                          fourTrkList,
+                          photons,
+                          MinPTCut,
+                          MinMassCut,
+                          MaxMassCut,
+                          VtxChi2DOFCut,
+                          MinSumPtCut,
+                          MinBPVDIRACut,
+                          VtxMaxIPChi2Cut,
+                          Hlt1Dict,
+                          Hlt2Dict) :
+    """
+    Charmless B2XG to 3pi+Ks0 selection with missing mass
+    """
+
+    _B2B2XG3piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XG3piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,( (ID=='K_2(1770)+') | (ID=='gamma') | (ID == 'KS0')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XG3piPostVertexCuts = hasHighTopoChild()
+    _B2B2XG3piPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XG3pi = CombineParticles( DecayDescriptor="[B+ -> K_2(1770)+ gamma]cc",
+                                          MotherCut = _B2B2XG3piPostVertexCuts,
+                                          CombinationCut = _B2B2XG3piPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XG3pi,
+                     RequiredSelections = [ fourTrkList, photons ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XG3pipi0Gamma( name,
+                           fourTrkList,
+                           photons,
+                           MinPTCut,
+                           MinMassCut,
+                           MaxMassCut,
+                           VtxChi2DOFCut,
+                           MinSumPtCut,
+                           MinBPVDIRACut,
+                           VtxMaxIPChi2Cut,
+                           Hlt1Dict,
+                           Hlt2Dict) :
+    """
+    Charmless B2XG to 3pi+merged pi0 selection with missing mass
+    """
+
+    _B2B2XG3piPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XG3piPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,( (ID=='K_2(1770)+')| (ID=='gamma') | (ID == 'pi0')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XG3piPostVertexCuts = hasHighTopoChild()
+    _B2B2XG3piPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XG3piPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XG3pi = CombineParticles( DecayDescriptor="[B+ -> K_2(1770)+ gamma]cc",
+                                          MotherCut = _B2B2XG3piPostVertexCuts,
+                                          CombinationCut = _B2B2XG3piPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XG3pi,
+                     RequiredSelections = [ fourTrkList, photons ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XGLambdapiGamma( name,
+                             trkList,
+                             lambdas,
+                             photons,
+                             MinPTCut,
+                             MinMassCut,
+                             MaxMassCut,
+                             VtxChi2DOFCut,
+                             MinSumPtCut,
+                             MinBPVDIRACut,
+                             VtxMaxIPChi2Cut,
+                             Hlt1Dict,
+                             Hlt2Dict) :
+    """
+    Charmless B to pi Lambda gamma selection with missing mass
+    """
+
+    _B2B2XGLambdaPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XGLambdaPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,(ISBASIC | (ID=='Lambda0')| (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XGLambdaPostVertexCuts = hasHighTopoChild()
+    _B2B2XGLambdaPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XGLambdaPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XGLambdaPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XGLambdapi = CombineParticles( DecayDescriptor="[B+ -> Lambda0 gamma pi+]cc",
+                                               MotherCut = _B2B2XGLambdaPostVertexCuts,
+                                               CombinationCut = _B2B2XGLambdaPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XGLambdapi,
+                     RequiredSelections = [ lambdas, photons, trkList ] ), Hlt1Dict, Hlt2Dict)
+
+
+def makeB2B2XGLambda2piGamma( name,
+                              diTrkList,
+                              lambdas,
+                              photons,
+                              MinPTCut,
+                              MinMassCut,
+                              MaxMassCut,
+                              VtxChi2DOFCut,
+                              MinSumPtCut,
+                              MinBPVDIRACut,
+                              VtxMaxIPChi2Cut,
+                              Hlt1Dict,
+                              Hlt2Dict) :
+    """
+    Charmless B to 2pi Lambda gamma selection with missing mass
+    """
+
+    _B2B2XGLambdaPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XGLambdaPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,( (ID=='Lambda0')| (ID=='rho(770)0')| (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XGLambdaPostVertexCuts = hasHighTopoChild()
+    _B2B2XGLambdaPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XGLambdaPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XGLambdaPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XGLambda = CombineParticles( DecayDescriptor="[B0 -> Lambda0 gamma rho(770)0]cc",
+                                             MotherCut = _B2B2XGLambdaPostVertexCuts,
+                                             CombinationCut = _B2B2XGLambdaPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XGLambda,
+                     RequiredSelections = [ lambdas, photons, diTrkList ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XGLambda3piGamma( name,
+                              triTrkList,
+                              lambdas,
+                              photons,
+                              MinPTCut,
+                              MinMassCut,
+                              MaxMassCut,
+                              VtxChi2DOFCut,
+                              MinSumPtCut,
+                              MinBPVDIRACut,
+                              VtxMaxIPChi2Cut,
+                              Hlt1Dict,
+                              Hlt2Dict) :
+    """
+    Charmless B to 3pi Lambda gamma selection with missing mass
+    """
+
+    _B2B2XGLambdaPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2B2XGLambdaPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,( (ID=='Lambda0')| (ID=='K_1(1270)+') | (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2B2XGLambdaPostVertexCuts = hasHighTopoChild()
+    _B2B2XGLambdaPostVertexCuts += " & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+    _B2B2XGLambdaPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2B2XGLambdaPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+
+    _combineB2B2XGLambda = CombineParticles( DecayDescriptor="[B+ -> Lambda0 gamma K_1(1270)+]cc",
+                                             MotherCut = _B2B2XGLambdaPostVertexCuts,
+                                             CombinationCut = _B2B2XGLambdaPreVertexCuts )
+
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2B2XGLambda,
+                     RequiredSelections = [ lambdas, photons, triTrkList ] ), Hlt1Dict, Hlt2Dict)
+
+def makeB2B2XGLbLambdaGamma( name,
+                             lambdas,
+                             photons,
+                             MinPTCut,
+                             MinMassCut,
+                             MaxMassCut,
+                             VtxChi2DOFCut,
+                             MinSumPtCut,
+                             MinBPVDIRACut,
+                             VtxMaxIPChi2Cut,
+                             Hlt1Dict,
+                             Hlt2Dict) :
+    """
+    Charmless Lambda_b0 to Lambda gamma selection with missing mass
+    """
+
+    _B2Lb2XGLambdaPreVertexCuts = "in_range( %(MinMassCut)s ,AM, %(MaxMassCut)s )" %locals()
+    _B2Lb2XGLambdaPreVertexCuts += " & (ASUM(PT) > %(MinSumPtCut)s )"%locals()
+# ,((ID=='Lambda0')| (ID=='gamma')),0.0)) > %(MinSumPtCut)s )"%locals()
+
+    _B2Lb2XGLambdaPostVertexCuts = hasHighTopoChild()
+    _B2Lb2XGLambdaPostVertexCuts += " & (HASVERTEX)"
+    _B2Lb2XGLambdaPostVertexCuts += " & (VFASPF(VCHI2/VDOF) < %(VtxChi2DOFCut)s ) " %locals()
+#    _B2Lb2XGLambdaPostVertexCuts += " & (BPVIPCHI2() < %(VtxMaxIPChi2Cut)s )" %locals()
+    _B2Lb2XGLambdaPostVertexCuts += " & (BPVDIRA > %(MinBPVDIRACut)s)"%locals()
+    _combineB2Lb2XGLambda = CombineParticles( DecayDescriptor="[Lambda_b0 -> Lambda0 gamma]cc",
+                                              MotherCut = _B2Lb2XGLambdaPostVertexCuts,
+                                              CombinationCut = _B2Lb2XGLambdaPreVertexCuts,
+                                              ParticleCombiners = {"" : "MomentumCombiner:PUBLIC" })
+    return fullTisTosSelection(Selection(name,
+                     Algorithm = _combineB2Lb2XGLambda,
+                     RequiredSelections = [ lambdas, photons ] ), Hlt1Dict, Hlt2Dict)
+
+
+
+# TISTOS
+def fullTisTosSelection(sel, DictHlt1, DictHlt2):
+    def tisTosSelection(sel, specs, taggerName):
+        """Filters Selection sel to be TOS OR TIS."""
+
+        hltTisTosFilter = TisTosParticleTagger(name+'TISTOSFilter')
+        hltTisTosFilter.TisTosSpecs = specs
+        hltSel = Selection(sel.name() + taggerName,
+                           Algorithm=hltTisTosFilter,
+                           RequiredSelections=[sel])
+        return hltSel
+    return tisTosSelection(tisTosSelection(sel,
+                                           DictHlt1,
+                                           'Hlt1TISTOS'),
+                           DictHlt2,
+                           'Hlt2TISTOS')
+
+# Related info
+def get_cone_relinfo(angle, head=None, children=None):
+    tool = {'Type'     : 'RelInfoConeVariables',
+            'ConeAngle': angle,
+            'Variables': ['CONEANGLE', 'CONEMULT', 'CONEP', 'CONEPASYM', 'CONEPT', 'CONEPTASYM']}
+    # Some shortcuts
+    base_location = 'ConeVarsInfo/%%s/%s' % angle
+    # Head                                                                                                                        
+    if head:
+        tool.update({'Location'    : base_location % 'B',
+                     'TopSelection': head})
+        if children:
+            tool.update({'DaughterLocations': dict([(sel_string, base_location % name)
+                                                    for name, sel_string in children.items()])})
+            return tool
+
+def get_neutral_cone_relinfo(size, head=None, children=None):
+    tool = {'Type'       : 'RelInfoConeIsolation',
+            'FillCharged': False,
+            'ConeSize'   : size}
+    # Some shortcuts
+    base_location = 'NeutralConeVarsInfo/%%s/%s' % size
+    # Head
+    if head:
+        tool.update({'Location'    : base_location % 'B',
+                     'TopSelection': head})
+        if children:
+            tool.update({'DaughterLocations': dict([(sel_string, base_location % name)
+                                                    for name, sel_string in children.items()])})
+            return tool
+
+def get_vtxisol_relinfo(selection):
+    return {'Type'        : 'RelInfoVertexIsolation',
+            'Variables'   : ['VTXISONUMVTX', 'VTXISODCHI2ONETRACK', 'VTXISODCHI2MASSONETRACK', 'VTXISODCHI2TWOTRACK', 'VTXISODCHI2MASSTWOTRACK'],
+            'Location'    : 'VertexIsoInfo',
+            'TopSelection': selection}
+
+def get_vtxisol_relinfo_radiative(selection):
+    return {'Type'        : 'RelInfoVertexIsolationRadiative',
+            'Variables'   : ['NEWVTXISONUMVTX', 'NEWVTXISOTRKRELD0', 'NEWVTXISOTRKDCHI2', 'NEWVTXISODCHI2MASS'],
+            'Location'    : 'VertexIsoInfoRadiative',
+            'TopSelection': selection}
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaExclTDCPV.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaExclTDCPV.py
new file mode 100755
index 000000000..a393acf6e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaExclTDCPV.py
@@ -0,0 +1,808 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Radiative Decays Stripping Selections and StrippingLines.
+Provides functions to build Bd -> [K*,Kspipi,KsPhi]Gamma, Bs->[Phi,KsKpi]Gamma, Bu->K+PhiGamma, Lb->[L*,Ksppi]Gamma selections.
+Provides class StrippingB2XGammaConf, which constructs the Selections and
+StrippingLines given a configuration dictionary.
+Exported selection makers: 'makePhoton', 'makeKs', 'makePhi2KK', 'makeKstar', 'makeL1520', 'makeKspipi', 'makeKsKpi', 'makeKsppi', 'makeKsPhi', 'makeKPhi', 'makeBs2PhiGamma', 'makeBd2KstGamma', 'makeBd2KspipiGamma', 'makeBs2KsKpiGamma', 'makeLb2pKGamma', 'makeLb2KsppiGamma', 'makeBd2KsPhiGamma', 'makeBu2KPhiGamma'
+"""
+
+__author__ = ['Biplab Dey']
+__date__ = '15/03/2021'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = ('StrippingB2XGammaExclTDCPVConf', 'makePhoton', 'makeKs', 'makePhi2KK', 'makeKstar', 'makeL1520', 'makeKspipi', 'makeKsKpi', 'makeKsppi',  'makeKsPhi', 'makeKPhi', 'makeBs2PhiGamma', 'makeBd2KstGamma', 'makeLb2pKGamma', 'makeBd2KspipiGamma', 'makeBs2KsKpiGamma', 'makeLb2KsppiGamma', 'makeBd2KsPhiGamma', 'makeBu2KPhiGamma', 'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseAllPhotons
+from Configurables import TisTosParticleTagger
+
+name = 'Beauty2XGammaExclTDCPV'
+default_config = {
+    'NAME'        : 'Beauty2XGammaExclTDCPV',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'Beauty2XGammaExclTDCPVConf',
+    'CONFIG'      : {
+           'TrIPchi2'            : 9.      # Dimensionless (was 16)
+          ,'TrIPchi2_tight'      : 11.      # Dimensionless (was 16)
+          ,'TrChi2'              : 4.       # dimensionless (was 3)
+          ,'PhiMassWin'          : 15.      # MeV
+          ,'KstMassWin'          : 100.     # MeV  was(150)
+          ,'L1520MassWin'        : 200.     
+          ,'mKspipiMax'          : 2000.    # MeV 
+          ,'mKsKpiMax'           : 2300.    # MeV 
+          ,'mKsppiMax'           : 2750.    # MeV 
+          ,'mKPhiMax'            : 4000.    # MeV 
+          ,'mKPhiMax_tight'      : 2950.    # MeV 
+          ,'PhiVCHI2'            : 25.       # dimensionless
+          ,'KstVCHI2'            : 25.       # dimensionless
+          ,'BdDIRA'		 : 0.2      # rad (was 0.06)
+          ,'ProbNNpi'		 : 0.05     # very nominal ProbNNpi cut for the pions
+          ,'ProbNNpi_tight'    	 : 0.4     
+          ,'ProbNNk'		 : 0.05     # very nominal ProbNNk cut for the kaons
+          ,'ProbNNk_tight'	 : 0.1     
+          ,'ProbNNp'		 : 0.05     # very nominal ProbNNp cut for the protons
+          ,'ProbNNp_tight'  	 : 0.25     
+          ,'KsPT'                : 300.     # MeV very loose PT cut for the KS
+          ,'photonPT'            : 2500.    # MeV
+          ,'B_PT'                : 2500.    # MeV (was 3000)  
+          ,'SumVec_PT'		 : 500.     # MeV (was 1500) hadron PT cut
+          ,'MinTrack_PT'         : 250.     # MeV (was 500)
+          ,'MinTrack_P'          : 3000.    # MeV 
+          ,'MinProton_PT'        : 300.     # MeV (was 500)
+          ,'MinProton_P'         : 4000.    # MeV 
+          ,'B_APT'		 : 3000.    # MeV (was 5000)
+          ,'BMassMin'            : 4000.    # MeV
+          ,'BMassMax'            : 7000.    # MeV
+          ,'BsPVIPchi2'          : 16.      # Dimensionless (was 9)
+          ,'B0PVIPchi2'          : 16.      # Dimensionless (was 9)
+          ,'BsVTXchi2'           : 16.      # Dimensionless (was 9)
+          ,'B0VTXchi2'           : 16.      # Dimensionless (was 9)
+          ,'GhostProb_Max'	 : 0.6	    # Dimensionless (was 0.4)
+          ,'DTF_CL'	         : 1E-10    # V. loose DTF prob cut => accept convergent DTF fits only
+          ,'DTF_CL_tighter'      : 1E-5     # V. loose DTF prob cut => accept convergent DTF fits only
+          ,'Hlt1TISTOSLinesDict': {'Hlt1(Two)?TrackMVA(Loose)?Decision%TOS':0,
+                                  }
+          ,'Hlt2TISTOSLinesDict': {'Hlt2Topo(2|3|4)Body.*Decision%TOS':0,
+                                   'Hlt2Radiative.*Decision%TOS':0
+                                  }
+          ,'Hlt1TISTOSLinesDict_Phi': {'Hlt1(Two)?TrackMVA(Loose)?Decision%TOS':0,
+                                       'Hlt1B2PhiGamma_LTUNBDecision%TOS':0,
+                                       'Hlt1(Phi)?IncPhi.*Decision%TOS' : 0
+                                      }
+          ,'Hlt2TISTOSLinesDict_Phi': {'Hlt2Topo(2|3|4)Body.*Decision%TOS':0,
+                                       'Hlt2Radiative.*Decision%TOS':0,
+                                       'Hlt2(Phi)?IncPhi.*Decision%TOS' : 0
+                                      }
+ 
+          ,'Bs2PhiGammaPreScale'               : 1.0
+          ,'Bs2PhiGammaPostScale'              : 1.0
+          ,'Bd2KstGammaPreScale'               : 1.0
+          ,'Bd2KstGammaPostScale'              : 1.0
+          ,'Lb2pKGammaPreScale'                : 1.0
+          ,'Lb2pKGammaPostScale'               : 1.0
+          ,'Bd2KspipiGammaPreScale'            : 1.0
+          ,'Bd2KspipiGammaPostScale'           : 1.0
+          ,'Bs2KsKpiGammaPreScale'             : 1.0
+          ,'Bs2KsKpiGammaPostScale'            : 1.0
+          },
+    'STREAMS' : ['BhadronCompleteEvent']
+    }
+
+class Beauty2XGammaExclTDCPVConf(LineBuilder):
+    """
+    Definition of B -> X Gamma stripping
+    
+    Constructs B0 -> [K*,Kspipi] Gamma and Bs -> [Phi,KsKpi] Gamma Selections and StrippingLines from
+    a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> gammaConf = StrippingBeauty2XGammaExclTDCPVConf('StrippingBeauty2XGammaExclTDCPVTest',config)
+    >>> gammaLines = gammaConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selPhoton                    : Photon Selection object
+    selPhi2KK                    : nominal Phi -> K+K- Selection object
+    selKst                       : nominal K*  -> K pi Selection object
+    selL1520                     : nominal L*  -> p K Selection object
+    selKspipi                    : nominal K*  -> Ks pipi Selection object
+    selKsppi                     : nominal L*  -> Ks ppi Selection object
+    selKsPhi                     : nominal X   -> Ks Kpi Selection object
+    selKPhi                      : nominal X-  -> K- Phi Selection object
+    selBs2PhiGamma               : nominal Bs  -> Phi Gamma Selection object 
+    selBd2KstGamma               : nominal B0  -> K* Gamma object Object 
+    selLb2pKGamma                : nominal Lb  -> pK Gamma object Object 
+    selBd2KspipiGamma            : nominal Bd  -> Ks pi pi Gamma object Object 
+    selBs2KsKpiGamma             : nominal Bd  -> Ks K pi Gamma object Object 
+    selLb2KsppiGamma             : nominal Lb  -> Ks ppi Gamma object Object 
+    selBd2KsPhiGamma             : nominal Bd  -> Ks Phi Gamma object Object 
+    selBu2KPhiGamma              : nominal Bu  -> K Phi Gamma object Object 
+    Bs2PhiGammaLine              : Stripping line out of selBs2PhiGamma
+    Bd2KstGammaLine              : Stripping line out of selBd2KstGamma
+    lines                        : List of lines
+
+    Exports as class data member:
+    StrippingBeauty2XGammaExclTDCPVConf.__configuration_keys__ : List of required configuration parameters.    
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        # Selection of B daughters: photon, phi and kstar
+        self.name = name
+        self.selPhoton = makePhoton('PhotonSel' + self.name,
+                                    config['photonPT'])
+
+        self.selKs = makeKs('KsSel' + self.name,
+                                    config['KsPT'],
+                                    config['ProbNNpi'],
+                                    config['GhostProb_Max'])
+
+        self.selPhi2KK = makePhi2KK('PhiSel' + self.name,
+                                    config['TrIPchi2'],
+                                    config['TrChi2'],
+                                    config['PhiMassWin'],
+                                    config['PhiVCHI2'],
+                                    config['GhostProb_Max'],
+                             	    config['SumVec_PT'],
+                                    config['MinTrack_PT'],
+                                    config['MinTrack_P'],
+                                    config['ProbNNk'])
+                         
+        self.selKst = makeKstar('KStarSel' + self.name,
+                                config['TrIPchi2'],
+                                config['TrChi2'],
+                                config['KstMassWin'],
+                                config['KstVCHI2'],
+                                config['GhostProb_Max'],
+                                config['SumVec_PT'],
+                                config['MinTrack_PT'],
+                                config['MinTrack_P'],
+                                config['ProbNNpi'],
+                                config['ProbNNk'])
+
+
+        self.selL1520 = makeL1520('L1520Sel' + self.name,
+                                config['TrIPchi2'],
+                                config['TrChi2'],
+                                config['L1520MassWin'],
+                                config['KstVCHI2'],
+                                config['GhostProb_Max'],
+                                config['SumVec_PT'],
+                                config['MinTrack_PT'],
+                                config['MinTrack_P'],
+                                config['MinProton_PT'],
+                                config['MinProton_P'],
+                                config['ProbNNp'],
+                                config['ProbNNk'])
+
+
+        self.selKspipi = makeKspipi('KspipiSel' + self.name,
+                                self.selKs,
+                                config['TrIPchi2'],
+                                config['TrChi2'],
+                                config['mKspipiMax'],
+                                config['KstVCHI2'],
+                                config['GhostProb_Max'],
+                                config['SumVec_PT'],
+                                config['MinTrack_PT'],
+                                config['MinTrack_P'],
+                                config['ProbNNpi'])
+
+        self.selKsKpi = makeKsKpi('KsKpiSel' + self.name,
+                                self.selKs,
+                                config['TrIPchi2'],
+                                config['TrChi2'],
+                                config['mKsKpiMax'],
+                                config['KstVCHI2'],
+                                config['GhostProb_Max'],
+                                config['SumVec_PT'],
+                                config['MinTrack_PT'],
+                                config['MinTrack_P'],
+                                config['ProbNNpi'],
+                                config['ProbNNk'])
+
+        self.selKsppi = makeKsppi('KsppiSel' + self.name,
+                                self.selKs,
+                                config['TrIPchi2_tight'],
+                                config['TrChi2'],
+                                config['mKsppiMax'],
+                                config['KstVCHI2'],
+                                config['GhostProb_Max'],
+                                config['SumVec_PT'],
+                                config['MinTrack_PT'],
+                                config['MinTrack_P'],
+                                config['MinProton_PT'],
+                                config['MinProton_P'],
+                                config['ProbNNp_tight'],
+                                config['ProbNNpi_tight'])
+
+        self.selKsPhi = makeKsPhi('KsPhiSel' + self.name,
+                                self.selKs,
+                                self.selPhi2KK,
+                                config['mKPhiMax'], 
+                                config['KstVCHI2'],
+                                config['GhostProb_Max'],
+                                config['SumVec_PT'])
+
+        self.selKPhi  = makeKPhi('KPhisel' + self.name,
+                                self.selPhi2KK,
+                                config['TrIPchi2'],
+                                config['TrChi2'],
+                                config['mKPhiMax_tight'],
+                                config['KstVCHI2'],
+                                config['GhostProb_Max'],
+                                config['SumVec_PT'],
+                                config['MinTrack_PT'],
+                                config['MinTrack_P'],
+                                config['ProbNNk_tight'])
+
+
+        # Bs->Phi Gamma selections
+        self.selBs2PhiGamma = makeBs2PhiGamma(self.name + 'Bs2PhiGamma',
+                                              self.selPhi2KK,
+                                              self.selPhoton,
+                                              config['BsVTXchi2'],
+                                              config['BsPVIPchi2'],
+                                              config['BMassMin'],
+                                              config['BMassMax'],
+                                              config['B_PT'],
+                                              config['B_APT'],
+                                              config['PhiMassWin'],
+                                              config['DTF_CL'],
+                                              config['Hlt1TISTOSLinesDict_Phi'],
+                                              config['Hlt2TISTOSLinesDict_Phi'],
+                                              )
+
+        # Bd->Kst Gamma selections
+        self.selBd2KstGamma = makeBd2KstGamma(self.name + 'Bd2KstGamma',
+                                              self.selKst,
+                                              self.selPhoton,
+                                              config['B0VTXchi2'],
+                                              config['B0PVIPchi2'],
+                                              config['BMassMin'],
+                                              config['BMassMax'],
+                                              config['B_PT'],
+                                              config['B_APT'],
+                                              config['KstMassWin'],
+                                              config['BdDIRA'],
+                                              config['DTF_CL'],
+                                              config['Hlt1TISTOSLinesDict'],
+                                              config['Hlt2TISTOSLinesDict'],
+                                              )
+
+        # Lb->pK Gamma selections
+        self.selLb2pKGamma = makeLb2pKGamma(self.name + 'Lb2pKGamma',
+                                              self.selL1520,
+                                              self.selPhoton,
+                                              config['B0VTXchi2'],
+                                              config['B0PVIPchi2'],
+                                              config['BMassMin'],
+                                              config['BMassMax'],
+                                              config['B_PT'],
+                                              config['B_APT'],
+                                              config['L1520MassWin'],
+                                              config['BdDIRA'],
+                                              config['DTF_CL'],
+                                              config['Hlt1TISTOSLinesDict'],
+                                              config['Hlt2TISTOSLinesDict'],
+                                              )
+
+        # Bd->Kspipig Gamma selections 
+        self.selBd2KspipiGamma = makeBd2KspipiGamma(self.name + 'Bd2KspipiGamma',
+                                              self.selKspipi,
+                                              self.selPhoton,
+                                              config['B0VTXchi2'],
+                                              config['B0PVIPchi2'],
+                                              config['BMassMin'],
+                                              config['BMassMax'],
+                                              config['B_PT'],
+                                              config['B_APT'],
+                                              config['BdDIRA'],
+                                              config['mKspipiMax'],
+                                              config['DTF_CL'],
+                                              config['Hlt1TISTOSLinesDict'],
+                                              config['Hlt2TISTOSLinesDict']
+                                              )
+
+        # Bs->KsKpig Gamma selections
+        self.selBs2KsKpiGamma = makeBs2KsKpiGamma(self.name + 'Bs2KsKpiGamma',
+                                              self.selKsKpi,
+                                              self.selPhoton,
+                                              config['B0VTXchi2'],
+                                              config['B0PVIPchi2'],
+                                              config['BMassMin'],
+                                              config['BMassMax'],
+                                              config['B_PT'],
+                                              config['B_APT'],
+                                              config['BdDIRA'],
+                                              config['mKsKpiMax'],
+                                              config['DTF_CL'],
+                                              config['Hlt1TISTOSLinesDict'],
+                                              config['Hlt2TISTOSLinesDict']
+                                              )
+
+        # Lb->Ksppig Gamma selections 
+        self.selLb2KsppiGamma = makeLb2KsppiGamma(self.name + 'Lb2KsppiGamma',
+                                              self.selKsppi,
+                                              self.selPhoton,
+                                              config['B0VTXchi2'],
+                                              config['B0PVIPchi2'],
+                                              config['BMassMin'],
+                                              config['BMassMax'],
+                                              config['B_PT'],
+                                              config['B_APT'],
+                                              config['BdDIRA'],
+                                              config['mKsppiMax'],
+                                              config['DTF_CL_tighter'],
+                                              config['Hlt1TISTOSLinesDict'],
+                                              config['Hlt2TISTOSLinesDict']
+                                              )
+
+        # Bd->KsPhiG selections 
+        self.selBd2KsPhiGamma = makeBd2KsPhiGamma(self.name + 'Bd2KsPhiGamma',
+                                              self.selKsPhi,
+                                              self.selPhoton,
+                                              config['B0VTXchi2'],
+                                              config['B0PVIPchi2'],
+                                              config['BMassMin'],
+                                              config['BMassMax'],
+                                              config['B_PT'],
+                                              config['B_APT'],
+                                              config['BdDIRA'],
+                                              config['mKPhiMax_tight'], # tightened this from 2017-2018
+                                              config['DTF_CL'],
+                                              config['Hlt1TISTOSLinesDict'],
+                                              config['Hlt2TISTOSLinesDict']
+                                              )
+
+        # B+->K+PhiG selections 
+        self.selBu2KPhiGamma = makeBu2KPhiGamma(self.name + 'Bu2KPhiGamma',
+                                              self.selKPhi,
+                                              self.selPhoton,
+                                              config['B0VTXchi2'],
+                                              config['B0PVIPchi2'],
+                                              config['BMassMin'],
+                                              config['BMassMax'],
+                                              config['B_PT'],
+                                              config['B_APT'],
+                                              config['BdDIRA'],
+                                              config['mKPhiMax_tight'],
+                                              config['DTF_CL'],
+                                              config['Hlt1TISTOSLinesDict'],
+                                              config['Hlt2TISTOSLinesDict']
+                                              )
+
+
+        # Stripping lines
+        self.Bs2PhiGammaLine = StrippingLine(self.name + 'Bs2PhiGammaLine',
+                                             prescale=config['Bs2PhiGammaPreScale'],
+                                             postscale=config['Bs2PhiGammaPostScale'],
+                                             # RequiredRawEvents = [ "Velo","Tracker","Calo", "Muon","Rich" ],
+                                             selection=self.selBs2PhiGamma
+                                            )
+        self.registerLine(self.Bs2PhiGammaLine)
+
+        self.Bd2KstGammaLine = StrippingLine(self.name + 'Bd2KstGammaLine',
+                                             prescale=config['Bd2KstGammaPreScale'],
+                                             postscale=config['Bd2KstGammaPostScale'],
+                                             # RequiredRawEvents = [ "Velo","Tracker","Calo", "Muon","Rich" ],
+                                             selection=self.selBd2KstGamma
+                                            )
+        self.registerLine(self.Bd2KstGammaLine)
+      
+
+        self.Lb2pKGammaLine = StrippingLine(self.name + 'Lb2pKGammaLine',
+                                             selection=self.selLb2pKGamma
+                                            )
+        self.registerLine(self.Lb2pKGammaLine)
+
+ 
+        self.Bd2KspipiGammaLine = StrippingLine(self.name + 'Bd2KspipiGammaLine',
+                                             prescale=config['Bd2KspipiGammaPreScale'],
+                                             postscale=config['Bd2KspipiGammaPostScale'],
+                                             # RequiredRawEvents = [ "Velo","Tracker","Calo", "Muon","Rich" ],
+                                             selection=self.selBd2KspipiGamma
+                                             )
+        self.registerLine(self.Bd2KspipiGammaLine)
+
+
+        self.Bs2KsKpiGammaLine = StrippingLine(self.name + 'Bs2KsKpiGammaLine',
+                                             prescale=config['Bs2KsKpiGammaPreScale'],
+                                             postscale=config['Bs2KsKpiGammaPostScale'],
+                                             # RequiredRawEvents = [ "Velo","Tracker","Calo", "Muon","Rich" ],
+                                             selection=self.selBs2KsKpiGamma
+                                             )
+        self.registerLine(self.Bs2KsKpiGammaLine)
+       
+        self.Lb2KsppiGammaLine = StrippingLine(self.name + 'Lb2KsppiGammaLine',
+                                             selection=self.selLb2KsppiGamma
+                                             )
+        self.registerLine(self.Lb2KsppiGammaLine)
+      
+ 
+        self.Bd2KsPhiGammaLine = StrippingLine(self.name + 'Bd2KsPhiGammaLine',
+                                             selection=self.selBd2KsPhiGamma
+                                             )
+        self.registerLine(self.Bd2KsPhiGammaLine)
+     
+        self.Bu2KPhiGammaLine = StrippingLine(self.name + 'Bu2KPhiGammaLine',
+                                             selection=self.selBu2KPhiGamma
+                                             )
+        self.registerLine(self.Bu2KPhiGammaLine)
+ 
+ 
+def makePhoton(name, photonPT):
+    """Create photon Selection object starting from DataOnDemand 'Phys/StdLooseAllPhotons'.
+    """
+    _code = "( PT> %(photonPT)s*MeV )" % locals()
+    _gammaFilter = FilterDesktop(Code=_code)
+    _stdGamma = StdLooseAllPhotons
+    return Selection(name, Algorithm=_gammaFilter, RequiredSelections=[_stdGamma])
+
+
+def makeKs(name, KsPT, ProbNNpi, GhostProb_Max) :
+    """
+    Create Ks Selection object starting from DataOnDemand 'Phys/StdLooseKsDD' and 'Phys/StdVeryLooseKsLL'.
+    """
+    # DD Ks0's
+    _KsDDFilter =  FilterDesktop(Code = "( (BPVLTIME() > 2.*ps) & (PT> %(KsPT)s*MeV) )" % locals() )
+    _sel_KsDD = Selection("sel_KsDD", Algorithm=_KsDDFilter, RequiredSelections=[DataOnDemand("Phys/StdLooseKsDD/Particles")])    
+    # LL Ks0's
+    _preambulo = ["goodPion = ( (TRGHOSTPROB < %(GhostProb_Max)s) & (PROBNNpi > %(ProbNNpi)s) )" % locals()]
+    _KsLLFilter =  FilterDesktop(Preambulo=_preambulo,Code = "( (VFASPF(VCHI2/VDOF)<25) & (PT> %(KsPT)s*MeV) & ( NINTREE( ('pi+'==ABSID) & goodPion ) == 2 ) )" % locals())
+    _sel_KsLL = Selection("sel_KsLL", Algorithm=_KsLLFilter, RequiredSelections=[DataOnDemand("Phys/StdVeryLooseKsLL/Particles")])    
+    return MergedSelection(name,RequiredSelections = [_sel_KsDD,_sel_KsLL])
+
+
+def makePhi2KK(name, TrIPchi2, TrChi2, PhiMassWin, PhiVCHI2, GhostProb_Max, SumVec_PT, MinTrack_PT, MinTrack_P, ProbNNk) :
+    """
+    Create and return a Phi->KK Selection object, starting from DataOnDemand 'Phys/StdLoosePhi2KK'.
+    """																		
+    _preambulo = ["goodKaon = ( (MIPCHI2DV(PRIMARY) > %(TrIPchi2)s) & (TRCHI2DOF < %(TrChi2)s) & (TRGHOSTPROB < %(GhostProb_Max)s) & (P > %(MinTrack_P)s) & (PT > %(MinTrack_PT)s) & (PROBNNk > %(ProbNNk)s))" % locals(),
+                  "goodPhi = ( (VFASPF(VCHI2/VDOF) < %(PhiVCHI2)s) & (ADMASS('phi(1020)') < 10.*%(PhiMassWin)s*MeV) & (SUMTREE(PT, ISBASIC, 0.0) > %(SumVec_PT)s))" % locals()]
+    _code = "goodPhi & (NINTREE( ('K+'==ABSID) & goodKaon ) == 2) "
+    _phiFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    _stdPhi2KK = DataOnDemand(Location="Phys/StdLoosePhi2KK/Particles")
+    return Selection(name, Algorithm=_phiFilter, RequiredSelections=[_stdPhi2KK])
+
+
+def makeKstar(name, TrIPchi2, TrChi2, KstMassWin, KstVCHI2, GhostProb_Max, SumVec_PT, MinTrack_PT, MinTrack_P, ProbNNpi, ProbNNk) :
+    """
+    Create and return a K*->Kpi Selection object, starting from DataOnDemand 'Phys/StdVeryLooseDetachedKst2Kpi'.
+    """
+    _preambulo = ["goodTrack = ( (MIPCHI2DV(PRIMARY) > %(TrIPchi2)s) & (TRCHI2DOF < %(TrChi2)s) & (TRGHOSTPROB < %(GhostProb_Max)s) & (P > %(MinTrack_P)s) & (PT > %(MinTrack_PT)s) )" % locals(),
+                  "goodKaon = ( goodTrack & (PROBNNk  > %(ProbNNk)s))" % locals(),
+                  "goodPion = ( goodTrack & (PROBNNpi > %(ProbNNpi)s))" % locals(),
+                  "goodKstar = ( (VFASPF(VCHI2/VDOF) < %(KstVCHI2)s) & (ADMASS('K*(892)0') < 3.*%(KstMassWin)s*MeV) & (SUMTREE(PT, ISBASIC, 0.0) > %(SumVec_PT)s) )" % locals()]
+    _code = "goodKstar & (NINTREE( ('K+'==ABSID) & goodKaon ) == 1) & ( NINTREE( ('pi+'==ABSID) & goodPion ) == 1 )"
+    _kstFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    _stdKst2Kpi = DataOnDemand(Location="Phys/StdVeryLooseDetachedKst2Kpi/Particles")
+    return Selection(name, Algorithm=_kstFilter, RequiredSelections=[_stdKst2Kpi])
+
+
+def makeL1520(name, TrIPchi2, TrChi2, L1520MassWin, KstVCHI2, GhostProb_Max, SumVec_PT, MinTrack_PT, MinTrack_P, MinProton_PT, MinProton_P, ProbNNp, ProbNNk) :
+    """
+    Create and return a L*->pK Selection object
+    """
+    _diTrackPreVertexCuts  = " (ADAMASS('Lambda(1520)0') < 3.*%(L1520MassWin)s*MeV) " %locals() 
+    _diTrackPostVertexCuts = " (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(KstVCHI2)s) " %locals()
+    _kaonCut               = "( (MIPCHI2DV(PRIMARY) > %(TrIPchi2)s) & (TRCHI2DOF < %(TrChi2)s) & (TRGHOSTPROB < %(GhostProb_Max)s) & (P > %(MinTrack_P)s)  & (PT > %(MinTrack_PT)s)  & (PROBNNk > %(ProbNNk)s) )" % locals()
+    _protonCut             = "( (MIPCHI2DV(PRIMARY) > %(TrIPchi2)s) & (TRCHI2DOF < %(TrChi2)s) & (TRGHOSTPROB < %(GhostProb_Max)s) & (P > %(MinProton_P)s) & (PT > %(MinProton_PT)s) & (PROBNNp > %(ProbNNp)s) )" % locals()
+    _combineDiTrack        = CombineParticles( DecayDescriptor="[Lambda(1520)0 -> p+ K-]cc",
+                                               CombinationCut = _diTrackPreVertexCuts,
+                                               MotherCut = _diTrackPostVertexCuts,
+                                               DaughtersCuts = {"K-":  _kaonCut, "K+":  _kaonCut, "p+": _protonCut, "p~-":_protonCut} )
+    return Selection(name, Algorithm=_combineDiTrack, RequiredSelections=[DataOnDemand(Location="Phys/StdAllNoPIDsKaons/Particles"),DataOnDemand(Location="Phys/StdAllNoPIDsProtons/Particles")])
+
+
+def makeKspipi(name, sel_Ks, TrIPchi2, TrChi2, mKspipiMax, KstVCHI2, GhostProb_Max, SumVec_PT, MinTrack_PT, MinTrack_P, ProbNNpi) :
+    """
+    Create and return a K*->Kspipi Selection object
+    """
+    _diTrackPreVertexCuts = " (AM < 2500) " %locals()
+    _diTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(KstVCHI2)s) " %locals()
+    _pionCut = "( (MIPCHI2DV(PRIMARY) > %(TrIPchi2)s) & (TRCHI2DOF < %(TrChi2)s) & (TRGHOSTPROB < %(GhostProb_Max)s) & (P > %(MinTrack_P)s) & (PT > %(MinTrack_PT)s) & (PROBNNpi > %(ProbNNpi)s) )" % locals()
+    _combineDiTrack = CombineParticles( DecayDescriptor="rho(770)0 -> pi+ pi-",
+                                        CombinationCut = _diTrackPreVertexCuts,
+                                        MotherCut = _diTrackPostVertexCuts,
+                                        DaughtersCuts = {"pi-":  _pionCut, "pi+":  _pionCut} )
+    sel_pipi = Selection("2pi_combi", Algorithm=_combineDiTrack, RequiredSelections=[DataOnDemand(Location="Phys/StdAllNoPIDsPions/Particles")])
+    _TriTrackPreVertexCuts = "(ASUM(PT) > %(SumVec_PT)s) & (AM < 1.5*%(mKspipiMax)s)"%locals()
+    _TriTrackPostVertexCuts = "( (VFASPF(VCHI2/VDOF) < 5.*%(KstVCHI2)s) & (PT > %(SumVec_PT)s) )" %locals() # for DD KS0 vertexing is not good
+    _combineTriTrack = CombineParticles( DecayDescriptor="K*_2(1430)0 -> rho(770)0 KS0",
+                                         CombinationCut = _TriTrackPreVertexCuts,
+                                         MotherCut = _TriTrackPostVertexCuts )
+    return Selection(name, Algorithm = _combineTriTrack, RequiredSelections = [ sel_pipi, sel_Ks ] )
+
+
+def makeKsKpi(name, sel_Ks, TrIPchi2, TrChi2, mKsKpiMax, KstVCHI2, GhostProb_Max, SumVec_PT, MinTrack_PT, MinTrack_P, ProbNNpi, ProbNNk) :
+    """
+    Create and return a X->KsKpi Selection object
+    @return: Selection object
+    """
+    _diTrackPreVertexCuts = " (AM < (%(mKsKpiMax)s))" %locals()
+    _diTrackPostVertexCuts = "(HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(KstVCHI2)s)" %locals()
+    _pionCut = "( (MIPCHI2DV(PRIMARY) > %(TrIPchi2)s) & (TRCHI2DOF < %(TrChi2)s) & (TRGHOSTPROB < %(GhostProb_Max)s) & (P > %(MinTrack_P)s) & (PT > %(MinTrack_PT)s) & (PROBNNpi > %(ProbNNpi)s))" % locals()
+    _kaonCut = "( (MIPCHI2DV(PRIMARY) > %(TrIPchi2)s) & (TRCHI2DOF < %(TrChi2)s) & (TRGHOSTPROB < %(GhostProb_Max)s) & (P > %(MinTrack_P)s) & (PT > %(MinTrack_PT)s) & (PROBNNk > %(ProbNNk)s))" % locals()
+    _combineDiTrack = CombineParticles( DecayDescriptor="[rho(770)0 -> K+ pi-]cc",
+                                        CombinationCut = _diTrackPreVertexCuts,
+                                        MotherCut = _diTrackPostVertexCuts,
+                                        DaughtersCuts = {"pi-":_pionCut,"pi+":_pionCut,"K+":_kaonCut,"K-":_kaonCut})
+    sel_Kpi = Selection("kpi_combi", Algorithm=_combineDiTrack, RequiredSelections=[DataOnDemand(Location="Phys/StdAllNoPIDsPions/Particles"),
+                                                                             DataOnDemand(Location="Phys/StdAllNoPIDsKaons/Particles")])
+
+    _TriTrackPreVertexCuts = "(ASUM(PT) > %(SumVec_PT)s) & (AM < 1.2*%(mKsKpiMax)s)"%locals()
+    _TriTrackPostVertexCuts = "( (VFASPF(VCHI2/VDOF) < 10.*%(KstVCHI2)s) & (PT > %(SumVec_PT)s) )" %locals() # due to DD KS0, vertexing is kept loose
+
+    _combineTriTrack = CombineParticles( DecayDescriptor="[K*_2(1430)0 -> rho(770)0 KS0]cc",
+                                         CombinationCut = _TriTrackPreVertexCuts,
+                                         MotherCut = _TriTrackPostVertexCuts )
+    return Selection(name, Algorithm = _combineTriTrack, RequiredSelections = [ sel_Ks, sel_Kpi ] )
+
+
+def makeKsppi(name, sel_Ks, TrIPchi2, TrChi2, mKsppiMax, KstVCHI2, GhostProb_Max, SumVec_PT, MinTrack_PT, MinTrack_P, MinProton_PT, MinProton_P, ProbNNp, ProbNNpi) :
+    """
+    Create and return a X->Ksppi Selection object
+    @return: Selection object
+    """
+    _diTrackPreVertexCuts  = " (AM < 2800) "
+    _diTrackPostVertexCuts = " (HASVERTEX) & (VFASPF(VCHI2/VDOF) < %(KstVCHI2)s) " %locals()
+    _pionCut   = "( (HASRICH) & (MIPCHI2DV(PRIMARY) > %(TrIPchi2)s) & (TRCHI2DOF < %(TrChi2)s) & (TRGHOSTPROB < %(GhostProb_Max)s) & (P > %(MinTrack_P)s)  & (PT > %(MinTrack_PT)s ) & (PROBNNpi > %(ProbNNpi)s))" % locals()
+    _protonCut = "( (HASRICH) & (MIPCHI2DV(PRIMARY) > %(TrIPchi2)s) & (TRCHI2DOF < %(TrChi2)s) & (TRGHOSTPROB < %(GhostProb_Max)s) & (P > %(MinProton_P)s) & (PT > %(MinProton_PT)s) & (PROBNNp  > %(ProbNNp)s) )" % locals()
+    _combineDiTrack = CombineParticles( DecayDescriptor="[N(1520)0 -> p+ pi-]cc",
+                                        CombinationCut = _diTrackPreVertexCuts,
+                                        MotherCut      = _diTrackPostVertexCuts,
+                                        DaughtersCuts  = {"pi-":_pionCut,"pi+":_pionCut,"p+":_protonCut,"p~-":_protonCut})
+    sel_ppi = Selection("pipi_combi", Algorithm=_combineDiTrack, RequiredSelections=[DataOnDemand(Location="Phys/StdAllNoPIDsPions/Particles"),
+                                                                                     DataOnDemand(Location="Phys/StdAllNoPIDsProtons/Particles")])
+
+    _TriTrackPreVertexCuts  = "( ASUM(PT) > %(SumVec_PT)s) & (AM < 1.2*%(mKsppiMax)s )"%locals()
+    _TriTrackPostVertexCuts = "( (VFASPF(VCHI2/VDOF) < %(KstVCHI2)s) & (PT > %(SumVec_PT)s) )" %locals()
+
+    _combineTriTrack = CombineParticles( DecayDescriptor ="[Lambda(1820)0 -> N(1520)0 KS0]cc",
+                                         CombinationCut  = _TriTrackPreVertexCuts,
+                                         MotherCut       = _TriTrackPostVertexCuts )
+    return Selection(name, Algorithm = _combineTriTrack, RequiredSelections = [ sel_Ks, sel_ppi ] )
+
+
+def makeKsPhi(name, sel_Ks, phi_Sel, mKsPhiMax, KstVCHI2, GhostProb_Max, SumVec_PT) :
+    """
+    Create and return a X->KsPhi Selection object
+    @return: Selection object
+    """
+    _TriTrackPreVertexCuts  = "( ASUM(PT) > %(SumVec_PT)s) & (AM < 1.5*%(mKsPhiMax)s )"%locals()
+    _TriTrackPostVertexCuts = "( (VFASPF(VCHI2/VDOF) < 10.*%(KstVCHI2)s) & (PT > %(SumVec_PT)s) )" %locals() # due to DD KS0, vertexing is kept loose
+
+    _combineTriTrack = CombineParticles( DecayDescriptor ="K*_2(1980)0 -> phi(1020) KS0",
+                                         CombinationCut  = _TriTrackPreVertexCuts,
+                                         MotherCut       = _TriTrackPostVertexCuts )
+    return Selection(name, Algorithm = _combineTriTrack, RequiredSelections = [ sel_Ks, phi_Sel ] )
+
+
+def makeKPhi(name, phi_Sel, TrIPchi2, TrChi2, mKPhiMax, KstVCHI2, GhostProb_Max, SumVec_PT, MinTrack_PT, MinTrack_P, ProbNNk) :
+    """
+    Create and return a X->KPhi Selection object
+    @return: Selection object
+    """
+    _kaonCut = " (HASRICH) & (MIPCHI2DV(PRIMARY) > %(TrIPchi2)s) & (TRCHI2DOF < %(TrChi2)s) & (TRGHOSTPROB < %(GhostProb_Max)s) & (P > %(MinTrack_P)s) & (PT > %(MinTrack_PT)s) & (PROBNNk  > %(ProbNNk)s)" % locals()
+    _TriTrackPreVertexCuts  = "( ASUM(PT) > %(SumVec_PT)s) & (AM < 1.2*%(mKPhiMax)s )"%locals()
+    _TriTrackPostVertexCuts = "( (VFASPF(VCHI2/VDOF) < %(KstVCHI2)s) & (PT > %(SumVec_PT)s) )" %locals() 
+
+    _combineTriTrack = CombineParticles( DecayDescriptor ="[K*_2(1980)- -> phi(1020) K-]cc",
+                                         CombinationCut  = _TriTrackPreVertexCuts,
+                                         DaughtersCuts   = {"K-":_kaonCut,"K+":_kaonCut,"phi(1020)":"ALL"},
+                                         MotherCut       = _TriTrackPostVertexCuts )
+    return Selection(name, Algorithm = _combineTriTrack, RequiredSelections = [ DataOnDemand(Location="Phys/StdAllNoPIDsKaons/Particles"), phi_Sel ] )
+
+def makeBs2PhiGamma(name, phiSel, gammaSel, BsVTXchi2, BsPVIPchi2, BMassMin, BMassMax, BPT, B_APT, PhiMassWin, DTF_CL, Hlt1Dict, Hlt2Dict):
+    """
+    Create and return a Bs -> Phi Gamma Selection object, starting with the daughters' selections.
+    """  
+    _combinationCut = "((AM > 0.5*%(BMassMin)s) & (AM < 2*%(BMassMax)s))"  % locals() 
+    _motherCut = "(VFASPF(VCHI2/VDOF) <%(BsVTXchi2)s) & (BPVIPCHI2() < %(BsPVIPchi2)s) & (PT > %(BPT)s) & (M > 0.5*%(BMassMin)s) & (M < 2.*%(BMassMax)s) & (SUMTREE(PT, ISBASIC, 0.0) > %(B_APT)s)" % locals()
+    _Bs = CombineParticles(DecayDescriptor="B_s0 -> phi(1020) gamma",
+                           CombinationCut=_combinationCut,
+                           MotherCut=_motherCut,
+                           ReFitPVs=False)#True)
+    sel_PhiGamma_init = Selection("Bs2PhiG_init", Algorithm=_Bs, RequiredSelections=[gammaSel, phiSel])
+    #  add the DTF version of the cuts with a very loose requirement that the fit converges
+    # PV constraint switched on, but very loose CL cut
+    _code = "( (dtf_prob > %(DTF_CL)s) & (in_range(%(BMassMin)s,mB,%(BMassMax)s)) &  (abs(mX-1020) < %(PhiMassWin)s) )"  % locals()
+    _preambulo = [ "dtf_prob = DTF_PROB(True )", 
+                   "mB       = DTF_FUN(M, True)",
+                   "mX       = DTF_FUN(CHILD(1, M), True)"
+                 ]
+    _PhiGammaFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    sel_PhiGamma = Selection(name, Algorithm=_PhiGammaFilter, RequiredSelections=[sel_PhiGamma_init])
+    return fullTisTosSelection(sel_PhiGamma, Hlt1Dict, Hlt2Dict)
+
+def makeBd2KstGamma(name, kstSel, gammaSel, B0VTXchi2, B0PVIPchi2, BMassMin, BMassMax, BPT, B_APT, KstMassWin, BdDira, DTF_CL,Hlt1Dict, Hlt2Dict):
+    """
+    Create and return a Bd -> K* Gamma Selection object, starting with the daughters' selections.
+    """  
+    _combinationCut = "((AM > 0.3*%(BMassMin)s) & (AM < 2.5*%(BMassMax)s))" % locals()
+    _motherCut = " (VFASPF(VCHI2/VDOF) <%(B0VTXchi2)s) & (BPVIPCHI2() < %(B0PVIPchi2)s) & (PT > %(BPT)s) & (M > 0.3*%(BMassMin)s) & (M < 2.*%(BMassMax)s) & (SUMTREE(PT, ISBASIC, 0.0) > %(B_APT)s) & (acos(BPVDIRA) < %(BdDira)s) " % locals()
+    _Bd = CombineParticles(DecayDescriptor="[B0 -> K*(892)0 gamma]cc",
+                           CombinationCut=_combinationCut,
+                           MotherCut=_motherCut,
+                           ReFitPVs=False)#True)
+    sel_KstGamma_init = Selection("Bd2KstG_init", Algorithm=_Bd, RequiredSelections=[gammaSel, kstSel])
+    #  add the DTF version of the cuts with a very loose requirement that the fit converges
+    # PV constraint switched on, but very loose CL cut
+    _code = "((dtf_prob > %(DTF_CL)s) & (in_range(%(BMassMin)s,mB,%(BMassMax)s)) &  (abs(mX-895) < %(KstMassWin)s) )"  % locals()
+    _preambulo = [ "dtf_prob = DTF_PROB(True )", 
+                   "mB       = DTF_FUN(M, True)",
+                   "mX       = DTF_FUN(CHILD(1, M), True)"
+                 ]
+    _KstGammaFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    sel_KstGamma = Selection(name, Algorithm=_KstGammaFilter, RequiredSelections=[sel_KstGamma_init])
+    return fullTisTosSelection(sel_KstGamma, Hlt1Dict, Hlt2Dict)
+
+def makeLb2pKGamma(name, pkSel, gammaSel, B0VTXchi2, B0PVIPchi2, BMassMin, BMassMax, BPT, B_APT, L1520MassWin, BdDira, DTF_CL,Hlt1Dict, Hlt2Dict):
+    """
+    Create and return a Lb -> pK Gamma Selection object, starting with the daughters' selections.
+    """  
+    _combinationCut = "((AM > 0.3*%(BMassMin)s) & (AM < 2.5*%(BMassMax)s))" % locals()
+    _motherCut = " (VFASPF(VCHI2/VDOF) <%(B0VTXchi2)s) & (BPVIPCHI2() < %(B0PVIPchi2)s) & (PT > %(BPT)s) & (M > 0.3*%(BMassMin)s) & (M < 2.*%(BMassMax)s) & (SUMTREE(PT, ISBASIC, 0.0) > %(B_APT)s) & (acos(BPVDIRA) < %(BdDira)s) " % locals()
+    _Lb = CombineParticles(DecayDescriptor="[Lambda_b0 -> Lambda(1520)0 gamma]cc",
+                           CombinationCut=_combinationCut,
+                           MotherCut=_motherCut,
+                           ReFitPVs=False)#True)
+    sel_pKGamma_init = Selection("Lb2pKG_init", Algorithm=_Lb, RequiredSelections=[gammaSel, pkSel])
+    #  add the DTF version of the cuts with a very loose requirement that the fit converges
+    # PV constraint switched on, but very loose CL cut
+    _code = "((dtf_prob > %(DTF_CL)s) & (in_range(%(BMassMin)s,mB,%(BMassMax)s)) &  (abs(mX-1520) < %(L1520MassWin)s) )"  % locals()
+    _preambulo = [ "dtf_prob = DTF_PROB(True )", 
+                   "mB       = DTF_FUN(M, True)",
+                   "mX       = DTF_FUN(CHILD(1, M), True)"
+                 ]
+    _pKGammaFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    sel_pKGamma = Selection(name, Algorithm=_pKGammaFilter, RequiredSelections=[sel_pKGamma_init])
+    return fullTisTosSelection(sel_pKGamma, Hlt1Dict, Hlt2Dict)
+
+def makeBd2KspipiGamma(name, KspipiSel, gammaSel, B0VTXchi2, B0PVIPchi2, BMassMin, BMassMax, BPT, B_APT, BdDira, mKspipiMax, DTF_CL, Hlt1Dict, Hlt2Dict):
+    """
+    Create and return a Bd -> Kspipi Gamma Selection object, starting with the daughters' selections.
+    @return: Selection object
+
+    """  
+    _combinationCut = "((AM > 0.5*%(BMassMin)s) & (AM < 2*%(BMassMax)s))" % locals()
+    _motherCut = "(VFASPF(VCHI2/VDOF) <%(B0VTXchi2)s) & (BPVIPCHI2() < %(B0PVIPchi2)s) & (PT > %(BPT)s) & (M > 0.5*%(BMassMin)s) & (M < 2.*%(BMassMax)s) & (SUMTREE(PT, ISBASIC, 0.0) > %(B_APT)s) & (acos(BPVDIRA) < %(BdDira)s)" % locals()
+    _Bd = CombineParticles(DecayDescriptor="B0 -> K*_2(1430)0 gamma",
+                           CombinationCut=_combinationCut,
+                           MotherCut=_motherCut,
+                           ReFitPVs=False)#True)
+    sel_KspipiGamma_init = Selection("Bd2KspipiG_init", Algorithm=_Bd, RequiredSelections=[gammaSel, KspipiSel])
+
+    _code = "((dtf_prob > %(DTF_CL)s) & (in_range(%(BMassMin)s,mB,%(BMassMax)s)) &  (mX < %(mKspipiMax)s))"  % locals()
+    _preambulo = [ "dtf_prob = DTF_PROB(True, 'KS0' )", 
+                   "mB       = DTF_FUN(M, True, 'KS0')",
+                   "mX       = DTF_FUN(CHILD(1, M), True, 'KS0')"
+                 ]
+    _KspipiGammaFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    sel_KspipiGamma = Selection(name, Algorithm=_KspipiGammaFilter, RequiredSelections=[sel_KspipiGamma_init])
+    return fullTisTosSelection(sel_KspipiGamma, Hlt1Dict, Hlt2Dict)
+
+def makeBs2KsKpiGamma(name, KsKpiSel, gammaSel, B0VTXchi2, B0PVIPchi2, BMassMin, BMassMax, BPT, B_APT, BdDira, mKsKpiMax, DTF_CL, Hlt1Dict, Hlt2Dict):
+    """
+    Create and return a Bd -> KsKpi Gamma Selection object, starting with the daughters' selections.
+    @return: Selection object
+
+    """  
+    _combinationCut = "((AM > 0.5*%(BMassMin)s) & (AM < 2*%(BMassMax)s))" % locals()
+    _motherCut = "(VFASPF(VCHI2/VDOF) <%(B0VTXchi2)s) & (BPVIPCHI2() < %(B0PVIPchi2)s) & (PT > %(BPT)s) & (M > 0.5*%(BMassMin)s) & (M < 2.*%(BMassMax)s)  & (SUMTREE(PT, ISBASIC, 0.0) > %(B_APT)s) & (acos(BPVDIRA) < %(BdDira)s) " % locals()
+    _Bs = CombineParticles(DecayDescriptor="[B_s0 -> K*_2(1430)0 gamma]cc",
+                           CombinationCut=_combinationCut,
+                           MotherCut=_motherCut,
+                           ReFitPVs=False)#True)
+    sel_KsKpiGamma_init = Selection("Bs2KsKpiG_init", Algorithm=_Bs, RequiredSelections=[gammaSel, KsKpiSel])
+
+    _code = "((dtf_prob > %(DTF_CL)s) & (in_range(%(BMassMin)s,mB,%(BMassMax)s)) &  (mX < %(mKsKpiMax)s))"  % locals()
+    _preambulo = [ "dtf_prob = DTF_PROB(True,'KS0' )", 
+                   "mB       = DTF_FUN(M, True, 'KS0')",
+                   "mX       = DTF_FUN(CHILD(1, M), True, 'KS0')"
+                 ]
+    _KsKpiGammaFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    sel_KsKpiGamma = Selection(name, Algorithm=_KsKpiGammaFilter, RequiredSelections=[sel_KsKpiGamma_init])
+    return fullTisTosSelection(sel_KsKpiGamma, Hlt1Dict, Hlt2Dict)
+
+
+def makeLb2KsppiGamma(name, KsppiSel, gammaSel, B0VTXchi2, B0PVIPchi2, BMassMin, BMassMax, BPT, B_APT, BdDira, mKsppiMax, DTF_CL, Hlt1Dict, Hlt2Dict):
+    """
+    Create and return a Lb -> Ksppi Gamma Selection object, starting with the daughters' selections.
+    @return: Selection object
+    """  
+    _combinationCut = "((AM > 0.5*%(BMassMin)s) & (AM < 2*%(BMassMax)s))" % locals()
+    _motherCut = "(VFASPF(VCHI2/VDOF) <%(B0VTXchi2)s) & (BPVIPCHI2() < %(B0PVIPchi2)s) & (PT > %(BPT)s) & (M > 0.5*%(BMassMin)s) & (M < 2.*%(BMassMax)s)  & (SUMTREE(PT, ISBASIC, 0.0) > %(B_APT)s) & (acos(BPVDIRA) < %(BdDira)s) " % locals()
+    _Lb = CombineParticles(DecayDescriptor="[Lambda_b0 -> Lambda(1820)0 gamma]cc",
+                                             CombinationCut=_combinationCut,
+                                             MotherCut=_motherCut,
+                                             ReFitPVs=False)#True)
+    sel_KsppiGamma_init = Selection("Lb2KsppiG_init", Algorithm=_Lb, RequiredSelections=[gammaSel, KsppiSel])
+
+    _code      = "((dtf_prob > %(DTF_CL)s) & (in_range(%(BMassMin)s,mB,%(BMassMax)s)) &  (mX < %(mKsppiMax)s))"  % locals()
+    _preambulo = [ "dtf_prob = DTF_PROB(True,'KS0' )", 
+                   "mB       = DTF_FUN(M, True, 'KS0')",
+                   "mX       = DTF_FUN(CHILD(1, M), True, 'KS0')"
+                 ]
+    _KsppiGammaFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    return Selection(name, Algorithm=_KsppiGammaFilter, RequiredSelections=[sel_KsppiGamma_init])
+
+
+def makeBd2KsPhiGamma(name, KsPhiSel, gammaSel, B0VTXchi2, B0PVIPchi2, BMassMin, BMassMax, BPT, B_APT, BdDira, mKPhiMax, DTF_CL, Hlt1Dict, Hlt2Dict):
+    """
+    Create and return a Bd -> KsPhi Gamma Selection object, starting with the daughters' selections.
+    @return: Selection object
+    """  
+    _combinationCut = "((AM > 0.5*%(BMassMin)s) & (AM < 2*%(BMassMax)s))" % locals()
+    _motherCut = "(VFASPF(VCHI2/VDOF) <%(B0VTXchi2)s) & (BPVIPCHI2() < %(B0PVIPchi2)s) & (PT > %(BPT)s) & (M > 0.5*%(BMassMin)s) & (M < 2.*%(BMassMax)s)  & (SUMTREE(PT, ISBASIC, 0.0) > %(B_APT)s) & (acos(BPVDIRA) < %(BdDira)s) " % locals()
+    _Bd = CombineParticles(DecayDescriptor="B0 -> K*_2(1980)0 gamma",
+                                             CombinationCut=_combinationCut,
+                                             MotherCut=_motherCut,
+                                             ReFitPVs=False)#True)
+    sel_KsPhiGamma_init = Selection("Bd2KsPhiG_init", Algorithm=_Bd, RequiredSelections=[gammaSel, KsPhiSel])
+
+    _code      = "((dtf_prob > %(DTF_CL)s) & (in_range(%(BMassMin)s,mB,%(BMassMax)s)) &  (mX < 1.05 * %(mKPhiMax)s))"  % locals()
+    _preambulo = [ "dtf_prob = DTF_PROB(True,'KS0' )", 
+                   "mB       = DTF_FUN(M, True, 'KS0')",
+                   "mX       = DTF_FUN(CHILD(1, M), True, 'KS0')"
+                 ]
+    _KsPhiGammaFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    return  Selection(name, Algorithm=_KsPhiGammaFilter, RequiredSelections=[sel_KsPhiGamma_init])
+
+def makeBu2KPhiGamma(name, KPhiSel, gammaSel, B0VTXchi2, B0PVIPchi2, BMassMin, BMassMax, BPT, B_APT, BdDira, mKPhiMax, DTF_CL, Hlt1Dict, Hlt2Dict):
+    """
+    Create and return a Bu -> KPhi Gamma Selection object, starting with the daughters' selections.
+    @return: Selection object
+    """
+    _combinationCut = "((AM > 0.5*%(BMassMin)s) & (AM < 2*%(BMassMax)s))" % locals()
+    _motherCut = "(VFASPF(VCHI2/VDOF) <%(B0VTXchi2)s) & (BPVIPCHI2() < %(B0PVIPchi2)s) & (PT > %(BPT)s) & (M > 0.5*%(BMassMin)s) & (M < 2.*%(BMassMax)s)  & (SUMTREE(PT, ISBASIC, 0.0) > %(B_APT)s) & (acos(BPVDIRA) < %(BdDira)s) " % locals()
+    _Bu = CombineParticles(DecayDescriptor="[B+ -> K*_2(1980)+ gamma]cc",
+                                             CombinationCut=_combinationCut,
+                                             MotherCut=_motherCut,
+                                             ReFitPVs=False)#True)
+    sel_KPhiGamma_init = Selection("Bu2KPhiG_init", Algorithm=_Bu, RequiredSelections=[gammaSel, KPhiSel])
+
+    _code      = "((dtf_prob > %(DTF_CL)s) & (in_range(%(BMassMin)s,mB,%(BMassMax)s)) &  (mX < %(mKPhiMax)s))"  % locals()
+    _preambulo = [ "dtf_prob = DTF_PROB(True,'KS0' )",
+                   "mB       = DTF_FUN(M, True, 'KS0')",
+                   "mX       = DTF_FUN(CHILD(1, M), True, 'KS0')"
+                 ]
+    _KPhiGammaFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    return Selection(name, Algorithm=_KPhiGammaFilter, RequiredSelections=[sel_KPhiGamma_init])
+
+
+# TISTOS
+def fullTisTosSelection(sel, DictHlt1, DictHlt2):
+    def tisTosSelection(sel, specs, taggerName):
+        """Filters Selection sel to be TOS OR TIS."""
+
+        hltTisTosFilter = TisTosParticleTagger(name+'TISTOSFilter')
+        hltTisTosFilter.TisTosSpecs = specs
+        hltSel = Selection(sel.name() + taggerName,
+                           Algorithm=hltTisTosFilter,
+                           RequiredSelections=[sel])
+        return hltSel
+    return tisTosSelection(tisTosSelection(sel,DictHlt1,'Hlt1TISTOS'),DictHlt2, 'Hlt2TISTOS')
+
+
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaExclusive.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaExclusive.py
new file mode 100644
index 000000000..7c295da76
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaExclusive.py
@@ -0,0 +1,276 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Radiative Decays Stripping Selections and StrippingLines.
+Provides functions to build Bd, Bs, K*, Phi selections.
+Provides class StrippingB2XGammaConf, which constructs the Selections and
+StrippingLines given a configuration dictionary.
+Exported selection makers: 'makePhoton', 'makePhi2KK', 'makeKstar', 'makeBs2PhiGamma',
+'makeBd2KstGamma'
+"""
+
+__author__ = ['Fatima Soomro', 'Albert Puig', 'Pablo Ruiz Valls', 'Luis Miguel Garcia Martin']
+__date__ = '09/11/2016'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = ('StrippingB2XGammaConf', 'makePhoton', 'makePhi2KK', 'makeKstar', 'makeBs2PhiGamma', 'makeBd2KstGamma', 'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseAllPhotons
+
+name = 'Beauty2XGammaExclusive'
+default_config = {
+    'NAME'        : 'Beauty2XGammaExclusive',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'Beauty2XGammaExclusiveConf',
+    'CONFIG'      : {'TrIPchi2'             : 16.       # Dimensionless (was 25)
+          ,'TrChi2'              : 3.        # dimensionless
+#          ,'TrMaxPT'             : 1200.     # MeV
+          
+          ,'PhiMassWin'          : 15.       # MeV
+          ,'KstMassWin'          : 100.      # MeV  was(150)
+          ,'PhiVCHI2'            : 9.       # dimensionless
+          ,'KstVCHI2'            : 9.       # dimensionless
+          ,'BdDIRA'			 	 : 60e-3      # rad
+
+          ,'photonPT'            : 2500.     # MeV
+
+          ,'B_PT'                : 2000.     # MeV (was 3000)  
+          ,'SumVec_PT'			 : 1500.	#MeV (was 1500)
+          ,'MinTrack_PT'         : 500.		#MeV
+          ,'MinTrack_P'          : 3000.    #MeV
+          ,'B_APT'				 : 3000.		#MeV (was 5000)
+          
+          ,'BMassMin'            : 4000.     # MeV
+          ,'BMassMax'           : 7000.     # MeV
+          ,'BsPVIPchi2'          : 9.       # Dimensionless
+          ,'B0PVIPchi2'          : 9.       # Dimensionless
+          ,'BsVTXchi2'          : 9.       # Dimensionless
+          ,'B0VTXchi2'          : 9.       # Dimensionless
+          ,'GhostProb_Max'		: 0.4		# Dimensionless
+
+          # Pre- and postscales
+          ,'Bs2PhiGammaPreScale'               : 1.0
+          ,'Bs2PhiGammaPostScale'              : 1.0
+          ,'Bd2KstGammaPreScale'               : 1.0
+          ,'Bd2KstGammaPostScale'              : 1.0
+          },
+    'STREAMS' : ['BhadronCompleteEvent']
+    }
+
+class Beauty2XGammaExclusiveConf(LineBuilder):
+    """
+    Definition of B -> X Gamma stripping
+    
+    Constructs B0 -> K* Gamma and Bs -> Phi Gamma Selections and StrippingLines from
+    a configuration dictionary.
+    Usage:
+    >>> config = { .... }
+    >>> gammaConf = Beauty2XGammaExclusiveConf('Beauty2XGammaExclusiveTest',config)
+    >>> gammaLines = gammaConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selPhoton                    : Photon Selection object
+    selPhi2KK                    : nominal Phi -> K+K- Selection object
+    selKst                       : nominal K* -> K pi Selection object
+    selBs2PhiGamma               : nominal Bs -> Phi Gamma Selection object with wide Bs mass window
+    selBd2KstGamma               : nominal B0 -> K* Gamma object Object 
+    Bs2PhiGammaLine              : Stripping line out of selBs2PhiGamma
+    Bd2KstGamma                  : Stripping line out of selBd2KstGamma
+    lines                  : List of lines
+
+    Exports as class data member:
+    Beauty2XGammaExclusiveConf.__configuration_keys__ : List of required configuration parameters.    
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+        # Selection of B daughters: photon, phi and kstar
+        self.name = name
+        self.selPhoton = makePhoton('PhotonSel' + self.name,
+                                    config['photonPT'])
+        self.selPhi2KK = makePhi2KK('PhiSel' + self.name,
+                                    config['TrIPchi2'],
+                                    config['TrChi2'],
+                                    config['PhiMassWin'],
+                                    config['PhiVCHI2'],
+                                    config['GhostProb_Max'],
+                             	    config['SumVec_PT'],
+                                    config['MinTrack_PT'],
+                                    config['MinTrack_P'])
+                                    
+        self.selKst = makeKstar('KStarSel' + self.name,
+                                config['TrIPchi2'],
+                                config['TrChi2'],
+                                config['KstMassWin'],
+                                config['KstVCHI2'],
+                                config['GhostProb_Max'],
+                                config['SumVec_PT'],
+                                config['MinTrack_PT'],
+                                config['MinTrack_P'])
+        # Bs->Phi Gamma selections
+        self.selBs2PhiGamma = makeBs2PhiGamma(self.name + 'Bs2PhiGamma',
+                                              self.selPhi2KK,
+                                              self.selPhoton,
+                                              config['BsVTXchi2'],
+                                              config['BsPVIPchi2'],
+                                              config['BMassMin'],
+                                              config['BMassMax'],
+                                              config['B_PT'],
+                                              config['B_APT'])
+        # Bd->Kst Gamma selections
+        self.selBd2KstGamma = makeBd2KstGamma(self.name + 'Bd2KstGamma',
+                                              self.selKst,
+                                              self.selPhoton,
+                                              config['B0VTXchi2'],
+                                              config['B0PVIPchi2'],
+                                              config['BMassMin'],
+                                              config['BMassMax'],
+                                              config['B_PT'],
+                                              config['B_APT'],
+                                              config['BdDIRA'])
+        # Stripping lines
+        self.Bs2PhiGammaLine = StrippingLine(self.name + 'Bs2PhiGammaLine',
+                                             prescale=config['Bs2PhiGammaPreScale'],
+                                             postscale=config['Bs2PhiGammaPostScale'],
+                                             # RequiredRawEvents = [ "Velo","Tracker","Calo", "Muon","Rich" ],
+                                             EnableFlavourTagging = True,
+                                             selection=self.selBs2PhiGamma)
+        self.registerLine(self.Bs2PhiGammaLine)
+
+        self.Bd2KstGammaLine = StrippingLine(self.name + 'Bd2KstGammaLine',
+                                             prescale=config['Bd2KstGammaPreScale'],
+                                             postscale=config['Bd2KstGammaPostScale'],
+                                             # RequiredRawEvents = [ "Velo","Tracker","Calo", "Muon","Rich" ],
+                                             EnableFlavourTagging = True,
+                                             selection=self.selBd2KstGamma)
+        self.registerLine(self.Bd2KstGammaLine)
+        
+def makePhoton(name, photonPT):
+    """Create photon Selection object starting from DataOnDemand 'Phys/StdLooseAllPhotons'.
+
+    @arg name: name of the Selection.
+    @arg photonPT: PT of the photon
+    
+    @return: Selection object
+    
+    """
+    # Configure clusterization
+    #from Configurables import CaloClusterizationTool, CellularAutomatonAlg
+    #clust = CellularAutomatonAlg("EcalClust")
+    #clust.addTool(CaloClusterizationTool,'CaloClusterizationTool')
+    #clust.CaloClusterizationTool.ETcut = 300
+    #clust.CaloClusterizationTool.withET = True
+    # Prepare selection
+    _code = "(PT> %(photonPT)s*MeV)" % locals()
+    _gammaFilter = FilterDesktop(Code=_code)
+    _stdGamma = StdLooseAllPhotons
+    return Selection(name, Algorithm=_gammaFilter, RequiredSelections=[_stdGamma])
+
+def makePhi2KK(name, TrIPchi2Phi, TrChi2, PhiMassWin, PhiVCHI2, GhostProb_Max, SumVec_PT, MinTrack_PT, MinTrack_P) :
+    """
+    Create and return a Phi->KK Selection object, starting from DataOnDemand 'Phys/StdLoosePhi2KK'.
+    
+    @arg name: name of the Selection.
+    @arg TrIPchi2Phi: minimum IP chi2 of the K+ tracks
+    @arg TrChi2: minimum chi2 of the K+ tracks
+    @arg PhiMassWin: selected Phi mass window
+    @arg PhiVCHI2: vertex chi2 of the Phi
+    
+    @return: Selection object
+    
+    """																																																																																																								
+#    _preambulo = ["goodKaon = ((MIPCHI2DV(PRIMARY) > %(TrIPchi2Phi)s) & (TRCHI2DOF < %(TrChi2)s) & (P > %(MinTrack_P)s) & (PT > %(MinTrack_PT)s))" % locals(),
+    _preambulo = ["goodKaon = ((MIPCHI2DV(PRIMARY) > %(TrIPchi2Phi)s) & (TRCHI2DOF < %(TrChi2)s) & (MAXTREE(TRGHOSTPROB, HASTRACK) < %(GhostProb_Max)s) & (P > %(MinTrack_P)s) & (PT > %(MinTrack_PT)s))" % locals(),
+                  "goodPhi = (((VFASPF(VCHI2/VDOF) < %(PhiVCHI2)s)) & (ADMASS('phi(1020)') < %(PhiMassWin)s*MeV) & (SUMTREE(PT, ISBASIC, 0.0) > %(SumVec_PT)s))" % locals()]
+    _code = 'goodPhi & CHILDCUT( goodKaon, 1 ) & CHILDCUT( goodKaon, 2 )'
+    _phiFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    _stdPhi2KK = DataOnDemand(Location="Phys/StdLoosePhi2KK/Particles")
+    return Selection(name, Algorithm=_phiFilter, RequiredSelections=[_stdPhi2KK])
+
+def makeKstar(name, TrIPchi2Kst, TrChi2, KstMassWin, KstVCHI2, GhostProb_Max, SumVec_PT, MinTrack_PT, MinTrack_P) :
+    """
+    Create and return a K*->Kpi Selection object, starting from DataOnDemand 'Phys/StdVeryLooseDetachedKst2Kpi'.
+    
+    @arg name: name of the Selection.
+    @arg TrIPchi2Kst: tracks IP chi2
+    @arg TrChi2: tracks chi2
+    @arg KstMassWin: K* mass window
+    @arg KstVCHI2: vertex chi2 of the K*
+    
+    @return: Selection object
+    
+    """
+    _preambulo = ["goodTrack = ((MIPCHI2DV(PRIMARY) > %(TrIPchi2Kst)s) & (TRCHI2DOF < %(TrChi2)s) & (MAXTREE(TRGHOSTPROB, HASTRACK) < %(GhostProb_Max)s) & (P > %(MinTrack_P)s) & (PT > %(MinTrack_PT)s))" % locals(),
+                  "goodKstar = (((VFASPF(VCHI2/VDOF) < %(KstVCHI2)s)) & (ADMASS('K*(892)0') < %(KstMassWin)s*MeV) & (SUMTREE(PT, ISBASIC, 0.0) > %(SumVec_PT)s))" % locals()]
+#                  "goodKstar = (((VFASPF(VCHI2/VDOF) < %(KstVCHI2)s)) & (ADMASS('K*(892)0') < %(KstMassWin)s*MeV))" % locals()]
+    _code = "goodKstar & CHILDCUT( goodTrack , 1 ) & CHILDCUT( goodTrack , 2 )"
+    _kstFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    _stdKst2Kpi = DataOnDemand(Location="Phys/StdVeryLooseDetachedKst2Kpi/Particles")
+    return Selection(name, Algorithm=_kstFilter, RequiredSelections=[_stdKst2Kpi])
+
+def makeBs2PhiGamma(name, phiSel, gammaSel, BsVTXchi2, BsPVIPchi2, BMassMin, BMassMax, BPT, B_APT):
+    """
+    Create and return a Bs -> Phi Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg phiSel: Phi -> K+ K+ selection
+    @arg gammaSel: photon selection
+    @arg BsVTXchi2: Vtx Chi2 of the Bs
+    @arg BsPVIPchi2: IP chi2 of the Bs wrt the PV
+    @arg BsMassWin: Bs mass window
+    
+    @return: Selection object
+    
+    """  
+    _motherCut = "(VFASPF(VCHI2/VDOF) <%(BsVTXchi2)s) & (BPVIPCHI2() < %(BsPVIPchi2)s) & (PT > %(BPT)s) & (M > %(BMassMin)s) & (M < %(BMassMax)s)  & (SUMTREE(PT, ISBASIC, 0.0) > %(B_APT)s)" % locals()
+ #   _motherCut = "(VFASPF(VCHI2/VDOF) <%(BsVTXchi2)s) & (BPVIPCHI2() < %(BsPVIPchi2)s) & (M > %(BMassMin)s) & (M < %(BMassMax)s)" % locals()
+    _combinationCut = "((AM > 0.75*%(BMassMin)s) & (AM < 1.25*%(BMassMax)s))"  % locals()
+    _Bs = CombineParticles(DecayDescriptor="B_s0 -> phi(1020) gamma",
+                           CombinationCut=_combinationCut,
+                           MotherCut=_motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=_Bs, RequiredSelections=[gammaSel, phiSel])
+
+def makeBd2KstGamma(name, kstSel, gammaSel, B0VTXchi2, B0PVIPchi2, BMassMin, BMassMax, BPT, B_APT, BdDira):
+    """
+    Create and return a Bd -> K* Gamma Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg kstSel: K* -> K pi selection
+    @arg gammaSel: photon selection
+    @arg B0VTXchi2: Vtx Chi2 of the Bs
+    @arg B0PVIPchi2: IP chi2 of the B0 wrt the PV
+    @arg B0MassWin: B0 mass window
+    
+    @return: Selection object
+
+    """  
+    _combinationCut = "((AM > 0.75*%(BMassMin)s) & (AM < 1.25*%(BMassMax)s))" % locals()
+    _motherCut = "(VFASPF(VCHI2/VDOF) <%(B0VTXchi2)s) & (BPVIPCHI2() < %(B0PVIPchi2)s) & (PT > %(BPT)s) & (M > %(BMassMin)s) & (M < %(BMassMax)s)  & (SUMTREE(PT, ISBASIC, 0.0) > %(B_APT)s) & (acos(BPVDIRA) < %(BdDira)s)" % locals()
+#    _motherCut = "(VFASPF(VCHI2/VDOF) <%(B0VTXchi2)s) & (BPVIPCHI2() < %(B0PVIPchi2)s) & (M > %(BMassMin)s) & (M < %(BMassMax)s)" % locals()
+    _Bd = CombineParticles(DecayDescriptor="[B0 -> K*(892)0 gamma]cc",
+                           CombinationCut=_combinationCut,
+                           MotherCut=_motherCut,
+                           ReFitPVs=False)#True)
+    #return Selection(name, Algorithm=_Bd, RequiredSelections=[kstSel, gammaSel])
+    return Selection(name, Algorithm=_Bd, RequiredSelections=[gammaSel, kstSel])
+        
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaNoBias.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaNoBias.py
new file mode 100644
index 000000000..07bca7331
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBeauty2XGammaNoBias.py
@@ -0,0 +1,216 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Pablo Ruiz Valls', 'Violaine Bellee']
+__date__ = '08/04/2016'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('StrippingB2XGammaNoBiasConf', 'makePhoton', 'makePhi2KK', 'makeKstar', 'makeBs2PhiGamma', 'makeBd2KstGamma', 'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseAllPhotons
+
+name = 'Beauty2XGammaNoBias'
+default_config = {
+    'NAME'        : 'Beauty2XGammaNoBias',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'Beauty2XGammaNoBiasConf',
+    'CONFIG'      : {
+           'TrChi2'              : 100.        # dimensionless, useless (default is 4)
+          
+          ,'PhiMassWin'          : 400.       # MeV was 20
+          ,'KstMassWin'          : 3000.      # MeV was 150
+
+          ,'photonPT'            : 2600.     # MeV
+
+          ,'BsMassWin'           : 3000.     # MeV was 1000
+          ,'B0MassWin'           : 3000.     # MeV was 1000
+
+          # Pre- and postscales
+          ,'Bs2PhiGammaPreScale'               : 1.0
+          ,'Bs2PhiGammaPostScale'              : 1.0
+          ,'Bd2KstGammaPreScale'               : 1.0
+          ,'Bd2KstGammaPostScale'              : 1.0
+          ,'TISTOSLinesDict' : {
+                   'Hlt2RadiativeBs2PhiGammaUnbiased.*Decision%TOS':0,
+                   'Hlt2RadiativeBd2KstGammaULUnbiased.*Decision%TOS':0,
+                   }
+          },
+    'STREAMS' : ['Leptonic'],
+    }
+
+class Beauty2XGammaNoBiasConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+        # Selection of B daughters: photon, phi and kstar
+        self.name = name
+        self.selPhoton = makePhoton('PhotonSel' + self.name,
+                                    config['photonPT'])
+        self.selPhi2KK = makePhi2KK('PhiSel' + self.name,
+                                    config['TrChi2'],
+                                    config['PhiMassWin'])
+        self.selKst = makeKstar('KStarSel' + self.name,
+                                config['TrChi2'],
+                                config['KstMassWin'])
+
+        # Bs->Phi Gamma selections
+        self.selBs2PhiGamma = makeBs2PhiGamma(self.name + 'Bs2PhiGamma',
+                                              self.selPhi2KK,
+                                              self.selPhoton,
+                                              config['BsMassWin'])
+        # Bd->Kst Gamma selections
+        self.selBd2KstGamma = makeBd2KstGamma(self.name + 'Bd2KstGamma',
+                                              self.selKst,
+                                              self.selPhoton,
+                                              config['B0MassWin'])
+        # Stripping lines
+        self.Bs2PhiGammaLine = StrippingLine(self.name + 'Bs2PhiGammaLine',
+                                             prescale=config['Bs2PhiGammaPreScale'],
+                                             postscale=config['Bs2PhiGammaPostScale'],
+                                             EnableFlavourTagging = True,
+                                             MDSTFlag = False,
+                                             RelatedInfoTools = [{'Type'        : 'RelInfoVertexIsolation',
+                                                                   'Variables'   : ['VTXISONUMVTX',
+                                                                                    'VTXISODCHI2ONETRACK', 'VTXISODCHI2MASSONETRACK',
+                                                                                    'VTXISODCHI2TWOTRACK', 'VTXISODCHI2MASSTWOTRACK'],
+                                                                   'Location'    : 'VertexIsolInfo'},
+                                                                  {'Type'        : 'RelInfoVertexIsolationRadiative',
+                                                                   'Variables'   : ['NEWVTXISONUMVTX','NEWVTXISOTRKRELD0',
+                                                                                    'NEWVTXISOTRKDCHI2','NEWVTXISODCHI2MASS'],
+                                                                   'Location'    : 'VertexIsolInfoRadiative'}],
+                                             selection=tisTosSelection(self.selBs2PhiGamma,config['TISTOSLinesDict']))
+        self.registerLine(self.Bs2PhiGammaLine)
+
+        self.Bd2KstGammaLine = StrippingLine(self.name + 'Bd2KstGammaLine',
+                                             prescale=config['Bd2KstGammaPreScale'],
+                                             postscale=config['Bd2KstGammaPostScale'],
+                                             EnableFlavourTagging = True,
+                                             MDSTFlag = False,
+                                             RelatedInfoTools = [{'Type'        : 'RelInfoVertexIsolation',
+                                                                   'Variables'   : ['VTXISONUMVTX',
+                                                                                    'VTXISODCHI2ONETRACK', 'VTXISODCHI2MASSONETRACK',
+                                                                                    'VTXISODCHI2TWOTRACK', 'VTXISODCHI2MASSTWOTRACK'],
+                                                                   'Location'    : 'VertexIsolInfo'},
+                                                                  {'Type'        : 'RelInfoVertexIsolationRadiative',
+                                                                   'Variables'   : ['NEWVTXISONUMVTX','NEWVTXISOTRKRELD0',
+                                                                                    'NEWVTXISOTRKDCHI2','NEWVTXISODCHI2MASS'],
+                                                                   'Location'    : 'VertexIsolInfoRadiative'}],
+                                             selection=tisTosSelection(self.selBd2KstGamma,config['TISTOSLinesDict']))
+        self.registerLine(self.Bd2KstGammaLine)
+                                
+        
+def makePhoton(name, photonPT):
+    """Create photon Selection object starting from DataOnDemand 'Phys/StdLooseAllPhotons'.
+
+    @arg name: name of the Selection.
+    @arg photonPT: PT of the photon
+    
+    @return: Selection object
+    
+    """
+    _code = "(PT> %(photonPT)s*MeV)" % locals()
+    _gammaFilter = FilterDesktop(Code=_code)
+    _stdGamma = StdLooseAllPhotons
+    return Selection(name, Algorithm=_gammaFilter, RequiredSelections=[_stdGamma])
+
+def makePhi2KK(name, TrChi2, PhiMassWin) :
+    """
+    Create and return a Phi->KK Selection object, starting from DataOnDemand 'Phys/StdLoosePhi2KK'.
+    
+    @arg name: name of the Selection.
+    @arg TrChi2: minimum chi2 of the K+ tracks
+    @arg PhiMassWin: selected Phi mass window
+    
+    @return: Selection object
+    
+    """
+    _preambulo = ["goodKaon = ((TRCHI2DOF < %(TrChi2)s))" % locals(),
+                  "goodPhi = ((ADMASS('phi(1020)') < %(PhiMassWin)s*MeV))" % locals()]
+    _code = 'goodPhi & CHILDCUT( goodKaon, 1 ) & CHILDCUT( goodKaon, 2 )'
+    _phiFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    _stdPhi2KK = DataOnDemand(Location="Phys/StdLoosePhi2KK/Particles")
+    return Selection(name, Algorithm=_phiFilter, RequiredSelections=[_stdPhi2KK])
+
+def makeKstar(name, TrChi2, KstMassWin) :
+    """
+    Create and return a K*->Kpi Selection object, starting from DataOnDemand 'Phys/StdVeryLooseDetachedKst2Kpi'.
+    
+    @arg name: name of the Selection.
+    @arg TrChi2: tracks chi2
+    @arg KstMassWin: K* mass window
+    
+    @return: Selection object
+    
+    """
+    _preambulo = ["goodTrack = ((TRCHI2DOF < %(TrChi2)s))" % locals(),
+                  "goodKstar = ((ADMASS('K*(892)0') < %(KstMassWin)s*MeV))" % locals()]
+    _code = "goodKstar & CHILDCUT( goodTrack , 1 ) & CHILDCUT( goodTrack , 2 )"
+    _kstFilter = FilterDesktop(Preambulo=_preambulo, Code=_code)
+    _stdKst2Kpi = DataOnDemand(Location="Phys/StdVeryLooseDetachedKst2Kpi/Particles")
+    return Selection(name, Algorithm=_kstFilter, RequiredSelections=[_stdKst2Kpi])
+
+def makeBs2PhiGamma(name, phiSel, gammaSel, BsMassWin):
+    """
+    Create and return a Bs -> Phi Gamma Selection object, starting with the daughters' selections.
+  
+    @arg name: name of the Selection.
+    @arg phiSel: Phi -> K+ K+ selection
+    @arg gammaSel: photon selection
+    @arg BsMassWin: Bs mass window
+    
+    @return: Selection object
+    
+    """  
+    _motherCut = "(ADMASS('B_s0')<%(BsMassWin)s*MeV)" % locals()
+    _Bs = CombineParticles(DecayDescriptor="B_s0 -> phi(1020) gamma",
+                           MotherCut=_motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=_Bs, RequiredSelections=[gammaSel, phiSel])
+
+def makeBd2KstGamma(name, kstSel, gammaSel, B0MassWin):
+    """
+    Create and return a Bd -> K* Gamma Selection object, starting with the daughters' selections.
+
+    @arg name: name of the Selection.
+    @arg kstSel: K* -> K pi selection
+    @arg gammaSel: photon selection
+    @arg B0MassWin: B0 mass window
+    
+    @return: Selection object
+
+    """  
+    _motherCut = "(ADMASS('B0')<%(B0MassWin)s*MeV)" % locals()
+    _Bd = CombineParticles(DecayDescriptor="[B0 -> K*(892)0 gamma]cc",
+                           MotherCut=_motherCut,
+                           ReFitPVs=False)#True)
+    return Selection(name, Algorithm=_Bd, RequiredSelections=[gammaSel, kstSel])
+        
+def makeTISTOSFilter(name,dict_TISTOS):
+    specs = dict_TISTOS
+    from Configurables import TisTosParticleTagger
+    tisTosFilter = TisTosParticleTagger(name+'TISTOSFilter')
+    tisTosFilter.TisTosSpecs = specs
+    return tisTosFilter
+
+def tisTosSelection(sel,TISTOSdict):
+    '''Filters Selection sel to be TOS OR TIS.'''
+    tisTosFilter = makeTISTOSFilter(sel.name(),TISTOSdict)
+    return Selection(sel.name()+'TISTOS', Algorithm=tisTosFilter, RequiredSelections=[sel])
+
+# EOF
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2MuMuGamma.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2MuMuGamma.py
new file mode 100644
index 000000000..ca174017e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2MuMuGamma.py
@@ -0,0 +1,193 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping options for (pre-)selecting Bs -> mu mu gamma
+
+Authors: Meril Reboud, Jean-Francois Marchand
+"""
+
+########################################################################
+__author__ = ['Meril Reboud', 'Jean-Francois Marchand']
+__date__ = '10/05/2017'
+
+
+__all__ = ('Bs2MuMuGammaConf'
+           'makeBs2MuMuGamma',
+           'default_config',
+           )
+
+default_config = {
+    'NAME'        : 'Bs2MuMuGamma',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'Bs2MuMuGammaConf',
+    'CONFIG'      : {'Prescale'			: 1,
+                     'GammaPT'			: 500,
+                     'GammaE'			: 1500,
+                     'GammaCL'			: 0.2,
+                     'TrChi2'			: 3,
+                     'TrGhostProb'		: 0.4,
+                     'TrIPChi2'			: 9,
+                     'DOCAmu'			: 0.5,
+                     'BPT'			: 350,
+                     'BIPChi2'			: 20,
+                     'MassWindow'	        : 1500,
+                     'CombMass'			: 7000,
+                     'CombPT'			: 500,
+                     'VCHI2_VDOF'		: 15,
+                     'DIRA'			: 0.995
+                     },
+    'STREAMS'     : ['Leptonic']
+    }
+
+
+#######################
+#######################
+
+from Gaudi.Configuration	import *
+
+from StandardParticles		import StdLooseMuons, StdLooseAllPhotons
+
+from PhysSelPython.Wrappers		import Combine3BodySelection
+from StrippingConf.StrippingLine	import StrippingLine
+from StrippingUtils.Utils		import LineBuilder, checkConfig
+
+
+
+class Bs2MuMuGammaConf( LineBuilder ) :
+    """Class defining the Bs -> mu mu gamma stripping line"""
+    
+
+    __configuration_keys__ = ('Prescale',
+                              'GammaPT',
+                              'GammaE',
+                              'GammaCL',
+                              'TrChi2',
+                              'TrGhostProb',
+                              'TrIPChi2',
+                              'DOCAmu',
+                              'BPT',
+                              'BIPChi2',
+                              'MassWindow',
+                              'CombMass',
+                              'CombPT',
+                              'VCHI2_VDOF',
+                              'DIRA'
+                              )
+
+    def __init__( self, name, config ):        
+        
+        LineBuilder.__init__(self, name, config)
+        
+        # make the various stripping selections
+        self.selBs2MuMuGamma = makeBs2MuMuGamma(name, config)
+        
+        self.lineBs2MuMuGamma = StrippingLine( name+"Line",
+                                               prescale  = config['Prescale'],
+                                               selection = self.selBs2MuMuGamma,
+                                               #RequiredRawEvents = ["Trigger","Muon","Calo","Rich","Velo","Tracker"]
+                                               RelatedInfoTools = [
+
+#### Photon Veto Variables:
+                {"Type": "RelInfoGammaIso",
+                 "DaughterLocations": {"B_s0 -> mu+ mu- ^gamma": "GammaIsolation"}},
+
+#### Photon Cone Iso Variables:
+                {"Type": "RelInfoConeVariables",
+                 "ConeAngle": 1.0,
+                 "IgnoreUnmatchedDescriptors": True,
+                 "DaughterLocations": {
+                        "Beauty -> l+  l- ^gamma": "GammaConeIsolation",
+                        }
+                 },
+
+#### Old Bs2MuMu isolation Variables:
+                {"Type": "RelInfoBs2MuMuBIsolations",
+                 "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID'],
+                 "Location"  : "BSMUMUVARIABLES"},
+
+#### Track Bs2MuMu2014 Isolations:
+#       the 3 variables TRKISOBDTFIRSTVALUE, TRKISOBDTSECONDVALUE, TRKISOBDTTHIRDVALUE
+#       are the highest BDT score of the tracks w.r.t the muon.
+                {"Type": "RelInfoTrackIsolationBDT",
+                 "Variables": 2, #Set A+C 2014
+                 "DaughterLocations": {
+                        "B_s0 -> ^mu+ mu- gamma": "Muon1TrackIsoBDTInfo_Old",
+                        "B_s0 -> mu+ ^mu- gamma": "Muon2TrackIsoBDTInfo_Old"
+                        },
+                 "WeightsFile":  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"},
+
+#### Long Track Bs2MuMu2017 Isolations:
+#       the 3 variables TRKISOBDTFIRSTVALUE, TRKISOBDTSECONDVALUE, TRKISOBDTTHIRDVALUE
+#       are the highest BDT score of the tracks w.r.t the muon.                
+                {"Type": "RelInfoTrackIsolationBDT",
+                 "Variables": -1, #Set A+C 2017
+                 "DaughterLocations": {
+                        "B_s0 -> ^mu+ mu- gamma": "Muon1TrackIsoBDTInfo",
+                        "B_s0 -> mu+ ^mu- gamma": "Muon2TrackIsoBDTInfo"
+                        },
+                 "WeightsFile":  "BsMuMu_TrackIsolationBDT9vars_v2.xml"},
+
+#### Velo Track Bs2MuMu2017 Isolations:
+#       the 3 variables TRKISOBDTFIRSTVALUE, TRKISOBDTSECONDVALUE, TRKISOBDTTHIRDVALUE
+#       are the highest BDT score of the tracks w.r.t the muon.                
+                {"Type": "RelInfoTrackIsolationBDT",
+                 "Variables": -2, #Set A 2017
+                 "DaughterLocations": {
+                        "B_s0 -> ^mu+ mu- gamma": "Muon1VeloTrackIsoBDTInfo",
+                        "B_s0 -> mu+ ^mu- gamma": "Muon2VeloTrackIsoBDTInfo"
+                        },
+                 "TrackType": 1,
+                 "WeightsFile":  "BsMuMu_VeloTrackIsolationBDT6vars_v2.xml"},
+                ]
+
+                                               )
+        
+        self.registerLine(self.lineBs2MuMuGamma)
+        
+def makeBs2MuMuGamma(name, config):
+
+    _Muon_cuts = "(MIPCHI2DV(PRIMARY) > %(TrIPChi2)s) "\
+        "& (TRCHI2DOF < %(TrChi2)s) "\
+        "& (TRGHOSTPROB < %(TrGhostProb)s)" % config
+    
+    _Gamma_cuts = "(PT > %(GammaPT)s*MeV) "\
+        "& (E > %(GammaE)s*MeV) "\
+        "& (CL > %(GammaCL)s)" % config
+
+    _Comb12_cuts = "((AM < 3033*MeV) | (AM > 3916*MeV)) "\
+        "& (AM < %(CombMass)s*MeV) "\
+        "& (AMAXDOCA('') < %(DOCAmu)s*mm)" % config
+
+    _Comb_cuts = "(AM < %(CombMass)s*MeV) "\
+        "& (APT > %(CombPT)s*MeV)" % config
+
+    _Mother_cuts = "(VFASPF(VCHI2/VDOF) < %(VCHI2_VDOF)s) "\
+        "& (ADMASS('B_s0') < %(MassWindow)s*MeV) "\
+        "& (BPVDIRA > %(DIRA)s) "\
+        "& (PT > %(BPT)s*MeV) "\
+        "& (BPVIPCHI2() < %(BIPChi2)s)" % config
+
+    
+    return Combine3BodySelection(name,
+                                 [StdLooseMuons, StdLooseAllPhotons],
+                                 DecayDescriptor = "B_s0 -> mu+ mu- gamma",
+                                 DaughtersCuts = {"mu-":	_Muon_cuts, 
+                                                  "mu+":	_Muon_cuts,
+                                                  "gamma":	_Gamma_cuts
+                                                  },
+                                 Combination12Cut = _Comb12_cuts,
+                                 CombinationCut = _Comb_cuts,
+                                 MotherCut = _Mother_cuts, 
+                                 )
+
+
+
+########################################################################  
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2MuMuLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2MuMuLines.py
new file mode 100644
index 000000000..c5341e69a
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2MuMuLines.py
@@ -0,0 +1,1725 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+ 
+'''
+Module for construction of Bs-->MuMu stripping selections and lines
+
+Exported symbols (use python help!):
+   - Bs2MuMuLinesConf
+   - makeDefault
+   - makeBs2mmWide
+   - makeLoose
+   - makeDetachedJPsi
+   - makeDetachedJPsiLoose
+   - makePromptJPsi
+'''
+
+__author__ = ['Marc-Olivier Bettler']
+__date__ = '07/08/2014'
+__version__ = '$Revision: 1.3 $'
+
+__all__ = ('Bs2MuMuLinesConf',
+           'default_config',
+           'makeDefault',
+           'makeBs2mmWide',
+           'makeLoose',
+           'makeBu',
+           'makeBs',
+           'makeBd',
+           'makeSS',
+           'makeBs2mmLTUB',
+           'makeBsst2mm',
+           'makeBs2KKLTUB'
+#           'makeDetachedJPsi',
+#           'makeDetachedJPsiLoose',
+#           'makePromptJPsi'
+           )
+
+default_config = {
+    'NAME' : 'Bs2MuMuLines',
+    'WGs'  : ['RD'],
+    'BUILDERTYPE' : 'Bs2MuMuLinesConf',
+    'CONFIG'   : {
+    'DefaultLinePrescale'    : 1,
+    'DefaultPostscale'       : 1,
+    'Bs2mmWideLinePrescale'  : 1,
+    'LooseLinePrescale'      : 0.,
+    'BuPrescale'             : 1,
+    'BsPrescale'             : 1,
+    'BdPrescale'             : 1,
+    'JPsiLinePrescale'       : 1,
+    'JPsiLooseLinePrescale'  : 0.1,
+    'JPsiPromptLinePrescale' : 0.005,
+    'SSPrescale'             : 1 ,
+    'Bs2mmLTUBLinePrescale'  : 1 ,
+    'Bsst2mmLinePrescale'    : 1 ,
+    'Bs2KKLTUBLinePrescale'  : 1 ,
+    'MuIPChi2_loose'         :  9,
+    'MuTrChi2_loose'         : 10,
+    'BIPChi2_loose'          : 64,
+    'BFDChi2_loose'          : 100,
+
+    'BPVVDChi2'              : 225,
+    'daughter_IPChi2'        : 25,
+
+    'TrackGhostProb'         : 0.40,
+    'TrackGhostProb_bsst'    : 0.30,
+
+    'DOCA'                   : 0.3,
+    'DOCA_loose'             : 0.5,
+    'DOCA_LTUB'              : 0.3,
+
+    'VCHI2_VDOF'             : 9,
+    'VCHI2_VDOF_LTUB'        : 9,
+    'VCHI2_VDOF_bsst'        : 6,
+    'VCHI2_VDOF_loose'       : 25,
+
+    'daughter_TrChi2'        : 4,
+    'daughter_TrChi2_LTUB'   : 4,
+    'daughter_TrChi2_bsst'   : 3,
+
+    'B_Pt'                   : 350,
+    'B_Pt_LTUB'              : 500,
+
+    'B_BPVIPChi2'            : 25,
+    'B_BPVIPChi2_LTUB'       : 25,
+    'B_BPVIPChi2_bsst'       : 16,
+
+    'B_minimum_decaytime_LTUB' : 0.6,
+    'muon_PT_LTUB'             : 40,
+
+    'B_minimum_decaytime_bsst' : 0.0,
+    'B_maximum_decaytime_bsst' : 0.2,
+    'ProbNN'                   : 0.4,
+    'SUMPT'                    : 4500
+    
+    },
+    'STREAMS' : {
+      'Dimuon' : ['StrippingBs2MuMuLinesNoMuIDFullDSTLine',
+                  'StrippingBs2MuMuLinesWideMassFullDSTLine',
+                  'StrippingBs2MuMuLinesBu2JPsiKFullDSTLine'
+                  #'StrippingBs2MuMuLinesBsstLine'
+                  ],
+     'Leptonic' : [#'StrippingBs2MuMuLinesWideMassLine',
+                   'StrippingBs2MuMuLinesBs2JPsiPhiLine',
+                   'StrippingBs2MuMuLinesBs2KKLTUBLine',
+                   'StrippingBs2MuMuLinesNoMuIDLine',
+                   'StrippingBs2MuMuLinesSSLine',
+                   'StrippingBs2MuMuLinesBd2JPsiKstLine',
+                   'StrippingBs2MuMuLinesLTUBLine',
+                   'StrippingBs2MuMuLinesBu2JPsiKLine'
+                   ]
+    },
+    
+    }
+    
+##########################################
+## define local stdjets
+from Gaudi.Configuration   import *
+from CommonParticles.Utils import *
+
+##########################################
+## standard jetID
+from JetAccessories.JetMaker_Config import JetMakerConf
+stdjets_name_noban = "StdJetsNoJetIDNoBan"
+StdJetsNoJetIDNoBan = JetMakerConf(stdjets_name_noban,
+                                   R = 0.7 ,
+                                   PtMin = 500.,
+                                   JetIDCut = False).algorithms[0]
+
+## configure Data-On-Demand service                                                        
+locations = updateDoD ( StdJetsNoJetIDNoBan )
+
+
+# the muons banning and B adding is line dependent (need to provide the location of the muons/B!)
+def create_stdjets(strob,line_location,stdjets_name_ban, stdjets_name_addb):
+    
+    myconf1 = JetMakerConf(stdjets_name_ban,
+                           R = 0.7 ,
+                           PtMin = 500.,
+                           listOfParticlesToBan = [line_location],
+                           JetIDCut = False).algorithms[0]
+    
+    if "StdJetsNoJetIDBan" in dir(strob): strob.StdJetsNoJetIDBan.append(myconf1)
+    else: strob.StdJetsNoJetIDBan= [myconf1]
+                                      
+    ## configure Data-On-Demand service                                            
+    locations = updateDoD ( myconf1 )
+
+    myconf2 = JetMakerConf(stdjets_name_addb,
+                           Inputs = ['Phys/PFParticles/Particles',line_location],
+                           R = 0.7,
+                           PtMin = 500.,
+                           JetIDCut = False).algorithms[0]
+
+    if "StdJetsNoJetIDAddB" in dir(strob):  strob.StdJetsNoJetIDAddB.append(myconf2)
+    else:  strob.StdJetsNoJetIDAddB=[myconf2]
+        
+    ## configure Data-On-Demand service                                            
+    locations = updateDoD ( myconf2 )
+
+##########################################
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+#from StrippingSelections.Utils import checkConfig
+
+class Bs2MuMuLinesConf(LineBuilder) :
+    """
+    Builder of:
+     - Bs-> mumu stripping lines: default, loose and lifetime unbiased
+     - detached JPsi lines: default, loose and prescaled prompt
+
+    Usage:
+    >>> config = { .... }
+    >>> bsConf = Bs2MuMuLinesConf('PrescaledBs2MuMuTest',config)
+    >>> bsLines = bsConf.lines
+    >>> for line in line :
+    >>>  print line.name(), line.outputLocation()
+    The lines can be used directly to build a StrippingStream object.
+
+    Exports as instance data members:
+    selDefault     : nominal Bs2mumu stripping line
+    selLoose       : loose Bs2MuMu stripping line to understand systematics
+    defaultLine    : Stripping line made from selDefault
+    looseLine      : Stripping line made from selLoose
+    lines          : lsit of lines:  [ defaultLine, looseLine ]
+    
+    Exports as class data member:
+    Bs2MuMuLinesConf.__configuration_keys__ : List of required configuration parameters.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, 
+                 name,
+                 config=default_config):#None ) :
+
+        LineBuilder.__init__(self, name, config)
+        #checkConfig(Bs2MuMuLinesConf.__configuration_keys__,config)
+
+        default_name=name+'NoMuID'
+        wide_name = name+'WideMass'
+        loose_name=name+'NoMuIDLoose'
+        bu_name=name+'Bu2JPsiK'
+        bs_name=name+'Bs2JPsiPhi'
+        bd_name=name+'Bd2JPsiKst'
+        ss_name = name+'SS'
+        ltub_name = name+'LTUB'
+        bsst_name = name+'Bsst'
+        Bs2KKltub_name = name+'Bs2KKLTUB'
+
+        self.selDefault = makeDefault(default_name,
+                                      BPVVDChi2 = config['BPVVDChi2'],
+                                      Muon_MIPChi2DV = config['daughter_IPChi2'],
+                                      TrackGhostProb = config['TrackGhostProb'],
+                                      DOCA = config['DOCA'],
+                                      VCHI2_VDOF = config['VCHI2_VDOF'],
+                                      TrChi2 = config['daughter_TrChi2'],
+                                      B_Pt = config['B_Pt'],
+                                      BPVIPChi2= config['B_BPVIPChi2']
+                                      )
+
+        self.selWide = makeBs2mmWide(wide_name,
+                                     BPVVDChi2 = config['BPVVDChi2'],
+                                     Muon_MIPChi2DV = config['daughter_IPChi2'],
+                                     DOCA = config['DOCA'],
+                                     VCHI2_VDOF = config['VCHI2_VDOF'],
+                                     TrChi2 = config['daughter_TrChi2'],
+                                     BPVIPChi2= config['B_BPVIPChi2'],
+                                     TrackGhostProb = config['TrackGhostProb']
+                                     )
+
+        self.selLoose = makeLoose(loose_name,
+                                  MuIPChi2=config['MuIPChi2_loose'],
+                                  MuTrChi2=config['MuTrChi2_loose'],
+                                  BIPChi2=config['BIPChi2_loose'],
+                                  BFDChi2=config['BFDChi2_loose'],
+                                  DOCA = config['DOCA_loose'],
+                                  VCHI2_VDOF = config['VCHI2_VDOF_loose'],
+                                  TrackGhostProb = config['TrackGhostProb']
+                                  )
+        
+        self.selBu = makeBu(bu_name,
+                            K_MIPChi2DV = config['daughter_IPChi2'],
+                            Jpsi_BPVVDChi2 = config['BPVVDChi2'],
+                            DOCA = config['DOCA'],
+                            TrChi2 = config['daughter_TrChi2'],
+                            BPVIPChi2= config['B_BPVIPChi2'],
+                            TrackGhostProb = config['TrackGhostProb']
+                            )
+
+        self.selBs = makeBs(bs_name,
+                            Phi_MIPChi2DV = config['daughter_IPChi2'],
+                            Jpsi_BPVVDChi2 = config['BPVVDChi2'] ,
+                            DOCA = config['DOCA']   ,
+                            TrChi2 = config['daughter_TrChi2'] ,
+                            BPVIPChi2= config['B_BPVIPChi2'] ,
+                            TrackGhostProb = config['TrackGhostProb']                           
+                            )
+
+        self.selBd = makeBd(bd_name,
+                            Kst_MIPChi2DV = config['daughter_IPChi2'],
+                            Jpsi_BPVVDChi2 = config['BPVVDChi2'],
+                            TrackGhostProb = config['TrackGhostProb'] ,
+                            DOCA = config['DOCA'] ,
+                            TrChi2 = config['daughter_TrChi2'],
+                            BPVIPChi2= config['B_BPVIPChi2']
+                            )
+
+        self.selSS = makeSS(ss_name,                            
+                            BPVVDChi2 = config['BPVVDChi2'],
+                            Muon_MIPChi2DV = config['daughter_IPChi2'],
+                            DOCA = config['DOCA'],
+                            VCHI2_VDOF = config['VCHI2_VDOF'],
+                            TrChi2 = config['daughter_TrChi2'],
+                            BPVIPChi2= config['B_BPVIPChi2'],
+                            TrackGhostProb = config['TrackGhostProb']
+                            )
+
+        self.selLTUB = makeBs2mmLTUB(ltub_name,
+                                     TrackGhostProb = config['TrackGhostProb'],
+                                     DOCA = config['DOCA_LTUB'],
+                                     VCHI2_VDOF = config['VCHI2_VDOF_LTUB'],
+                                     TrChi2 = config['daughter_TrChi2_LTUB'],
+                                     B_Pt = config['B_Pt_LTUB'],
+                                     BPVIPChi2= config['B_BPVIPChi2_LTUB'],
+                                     minimum_decaytime = config['B_minimum_decaytime_LTUB'],
+                                     muon_PT = config['muon_PT_LTUB']
+                                     )
+        
+        self.selbsst = makeBsst2mm(bsst_name,
+                                   TrackGhostProb = config['TrackGhostProb_bsst'],
+                                   DOCA = config['DOCA_LTUB'],
+                                   VCHI2_VDOF = config['VCHI2_VDOF_bsst'],
+                                   TrChi2 = config['daughter_TrChi2_bsst'],
+                                   PID = config['ProbNN'],
+                                   SUMPT = config['SUMPT'],
+                                   B_Pt = config['B_Pt_LTUB'],
+                                   BPVIPChi2= config['B_BPVIPChi2_bsst'],
+                                   minimum_decaytime = config['B_minimum_decaytime_bsst'],
+                                   maximum_decaytime = config['B_maximum_decaytime_bsst'],
+                                   muon_PT = config['muon_PT_LTUB']
+                                   )
+        
+        self.selBs2KKLTUB = makeBs2KKLTUB(Bs2KKltub_name,
+                                          TrackGhostProb = config['TrackGhostProb'],
+                                          DOCA = config['DOCA_LTUB'],
+                                          VCHI2_VDOF = config['VCHI2_VDOF_LTUB'],
+                                          TrChi2 = config['daughter_TrChi2_LTUB'],
+                                          B_Pt = config['B_Pt_LTUB'],
+                                          BPVIPChi2= config['B_BPVIPChi2_LTUB'],
+                                          minimum_decaytime = config['B_minimum_decaytime_LTUB'],
+                                          muon_PT = config['muon_PT_LTUB']
+                                          )
+
+        #Jet Information
+        stdjets_name_ban_default = "StdJetsNoJetIDBanMuonsDef"
+        stdjets_name_addb_default = "StdJetsNoJetIDAddBDef"
+
+        stdjets_name_ban_default_DST = "StdJetsNoJetIDBanMuonsDefDST"
+        stdjets_name_addb_default_DST = "StdJetsNoJetIDAddBDefDST"
+ 
+        stdjets_name_ban_wide = "StdJetsNoJetIDBanMuonsWide"
+        stdjets_name_addb_wide = "StdJetsNoJetIDAddBWide"
+
+        stdjets_name_ban_SS = "StdJetsNoJetIDBanMuonsSS"
+        stdjets_name_addb_SS = "StdJetsNoJetIDAddBSS"
+
+        stdjets_name_ban_LTUB = "StdJetsNoJetIDBanMuonsLTUB"
+        stdjets_name_addb_LTUB = "StdJetsNoJetIDAddBLTUB"
+
+        stdjets_name_ban_bsst = "StdJetsNoJetIDBanMuonsbsst"
+        stdjets_name_addb_bsst = "StdJetsNoJetIDAddBbsst"
+
+        stdjets_name_ban_KKLTUB = "StdJetsNoJetIDBanMuonsKKLTUB"
+        stdjets_name_addb_KKLTUB = "StdJetsNoJetIDAddBKKLTUB"
+
+        self.defaultLine = StrippingLine(default_name+"Line",
+                                         prescale = config['DefaultLinePrescale'],
+                                         postscale = config['DefaultPostscale'],
+                                         MDSTFlag = False,
+                                         #RequiredRawEvents = ["Calo"],
+                                         algos = [ self.selDefault ],
+                                         RelatedInfoTools = [
+            { 'Type' : 'RelInfoJetsVariables',
+              'Location': 'RelatedInfoJets',
+              'Variables': ["JETNOMU1PX","JETNOMU1PY", "JETNOMU1PZ", "JETNOMU1PT", "JETNOMU1JETWIDTH", "JETNOMU1NNTAG", "JETNOMU1MNF", "JETNOMU2PX", "JETNOMU2PY", "JETNOMU2PZ", "JETNOMU2PT", "JETNOMU2JETWIDTH", "JETNOMU2NNTAG", "JETNOMU2MNF", "JETNOMU3PX", "JETNOMU3PY", "JETNOMU3PZ", "JETNOMU3PT", "JETNOMU3JETWIDTH", "JETNOMU3NNTAG", "JETNOMU3MNF", "JETMU1PX", "JETMU1PY", "JETMU1PZ", "JETMU1PT", "JETMU1JETWIDTH", "JETMU1NNTAG", "JETMU1MNF", "JETMU2PX", "JETMU2PY", "JETMU2PZ", "JETMU2PT", "JETMU2JETWIDTH", "JETMU2NNTAG", "JETMU2MNF", "JETBPX", "JETBPY", "JETBPZ", "JETBPT", "JETBJETWIDTH", "JETBNNTAG", "JETBMNF"],
+              'LocationJetsNoMu' : "Phys/"+stdjets_name_ban_default+"/Particles",
+              'LocationJetsNoRemove' : "Phys/"+stdjets_name_noban+"/Particles",
+              'LocationJetsForceB' : "Phys/"+stdjets_name_addb_default+"/Particles"},
+
+            { "Type" : "RelInfoBs2MuMuBIsolations"
+              , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+              , "Location"  : "BSMUMUVARIABLES"},
+
+            { "Type" : "RelInfoMuonIDPlus",
+              "Variables" : ["MU_BDT"],
+              "DaughterLocations"  : {
+                "B_s0 -> ^mu+ mu-" : "Muon1BDT",
+                "B_s0 -> mu+ ^mu-" : "Muon2BDT" } 
+            },
+ 
+            { "Type" : "RelInfoBs2MuMuTrackIsolations"
+              , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' ,'BSMUMUTRACKID','BSMUMUTRACKTOPID','ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS' ]
+              ,"DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1iso",
+            "B_s0 -> mu+ ^mu-" : "Muon2iso" }
+              },
+
+            { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"  
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 0,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_0",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_0"},
+              "WeightsFile" : "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 1,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_1",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_1"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 2,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_2",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_2"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 3,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_3",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_3"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 4,    
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_4",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_4"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              },
+            {
+              "Type" : "RelInfoTrackIsolationBDT2",
+              "Location" : "TrackIsolationBDT2"
+            }
+            ]
+                                         )
+
+        self.defaultFullDSTLine = StrippingLine(default_name+"FullDSTLine",
+                                         prescale = config['DefaultLinePrescale'],
+                                         postscale = config['DefaultPostscale'],
+                                         MDSTFlag = False,
+                                         #RequiredRawEvents = ["Calo"],
+                                         algos = [ self.selDefault ],
+                                         RelatedInfoTools = [
+            { 'Type' : 'RelInfoJetsVariables',
+              'Location': 'RelatedInfoJets',
+              'Variables': ["JETNOMU1PX","JETNOMU1PY", "JETNOMU1PZ", "JETNOMU1PT", "JETNOMU1JETWIDTH", "JETNOMU1NNTAG", "JETNOMU1MNF", "JETNOMU2PX", "JETNOMU2PY", "JETNOMU2PZ", "JETNOMU2PT", "JETNOMU2JETWIDTH", "JETNOMU2NNTAG", "JETNOMU2MNF", "JETNOMU3PX", "JETNOMU3PY", "JETNOMU3PZ", "JETNOMU3PT", "JETNOMU3JETWIDTH", "JETNOMU3NNTAG", "JETNOMU3MNF", "JETMU1PX", "JETMU1PY", "JETMU1PZ", "JETMU1PT", "JETMU1JETWIDTH", "JETMU1NNTAG", "JETMU1MNF", "JETMU2PX", "JETMU2PY", "JETMU2PZ", "JETMU2PT", "JETMU2JETWIDTH", "JETMU2NNTAG", "JETMU2MNF", "JETBPX", "JETBPY", "JETBPZ", "JETBPT", "JETBJETWIDTH", "JETBNNTAG", "JETBMNF"],
+              'LocationJetsNoMu' : "Phys/"+stdjets_name_ban_default_DST+"/Particles",
+              'LocationJetsNoRemove' : "Phys/"+stdjets_name_noban+"/Particles",
+              'LocationJetsForceB' : "Phys/"+stdjets_name_addb_default+"/Particles"},
+
+            { "Type" : "RelInfoBs2MuMuBIsolations"
+              , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+              , "Location"  : "BSMUMUVARIABLES"},
+
+            { "Type" : "RelInfoMuonIDPlus",
+              "Variables" : ["MU_BDT"],
+              "DaughterLocations"  : {
+                "B_s0 -> ^mu+ mu-" : "Muon1BDT",
+                "B_s0 -> mu+ ^mu-" : "Muon2BDT" } 
+            },
+ 
+            { "Type" : "RelInfoBs2MuMuTrackIsolations"
+              , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' ,'BSMUMUTRACKID','BSMUMUTRACKTOPID','ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS' ]
+              ,"DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1iso",
+            "B_s0 -> mu+ ^mu-" : "Muon2iso" }
+              },
+
+            { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"  
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 0,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_0",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_0"},
+              "WeightsFile" : "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 1,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_1",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_1"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 2,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_2",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_2"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 3,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_3",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_3"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 4,    
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_4",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_4"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              },
+            {
+              "Type" : "RelInfoTrackIsolationBDT2",
+              "Location" : "TrackIsolationBDT2"
+            }
+            ]
+                                         )
+
+        self.wideLine = StrippingLine(wide_name+"FullDSTLine",
+                                      prescale = config['Bs2mmWideLinePrescale'],
+                                      postscale = config['DefaultPostscale'],
+                                      MDSTFlag = False,
+                                      #RequiredRawEvents = ["Calo"],
+                                      algos = [ self.selWide ],
+                                      RelatedInfoTools = [
+            { 'Type' : 'RelInfoJetsVariables',
+              'Location': 'RelatedInfoJets',
+              'Variables': ["JETNOMU1PX","JETNOMU1PY", "JETNOMU1PZ", "JETNOMU1PT", "JETNOMU1JETWIDTH", "JETNOMU1NNTAG", "JETNOMU1MNF", "JETNOMU2PX", "JETNOMU2PY", "JETNOMU2PZ", "JETNOMU2PT", "JETNOMU2JETWIDTH", "JETNOMU2NNTAG", "JETNOMU2MNF", "JETNOMU3PX", "JETNOMU3PY", "JETNOMU3PZ", "JETNOMU3PT", "JETNOMU3JETWIDTH", "JETNOMU3NNTAG", "JETNOMU3MNF", "JETMU1PX", "JETMU1PY", "JETMU1PZ", "JETMU1PT", "JETMU1JETWIDTH", "JETMU1NNTAG", "JETMU1MNF", "JETMU2PX", "JETMU2PY", "JETMU2PZ", "JETMU2PT", "JETMU2JETWIDTH", "JETMU2NNTAG", "JETMU2MNF", "JETBPX", "JETBPY", "JETBPZ", "JETBPT", "JETBJETWIDTH", "JETBNNTAG", "JETBMNF"],
+              'LocationJetsNoMu' : "Phys/"+stdjets_name_ban_wide+"/Particles",
+              'LocationJetsNoRemove' : "Phys/"+stdjets_name_noban+"/Particles",
+              'LocationJetsForceB' : "Phys/"+stdjets_name_addb_wide+"/Particles"},
+
+       { "Type" : "RelInfoBs2MuMuBIsolations"
+              , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+              , "Location"  : "BSMUMUVARIABLES"},
+            
+            { "Type" : "RelInfoMuonIDPlus",
+              "Variables" : ["MU_BDT"],
+              "DaughterLocations"  : {
+                "B_s0 -> ^mu+ mu-" : "Muon1BDT",
+                "B_s0 -> mu+ ^mu-" : "Muon2BDT" }
+            },
+ 
+            { "Type" : "RelInfoBs2MuMuTrackIsolations"
+                      , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' , 'ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS','BSMUMUTRACKID','BSMUMUTRACKTOPID' ]
+              ,"DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1iso",
+            "B_s0 -> mu+ ^mu-" : "Muon2iso"},                                                                                                                            
+                           },
+
+            { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"  
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 0,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_0",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_0"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 1,
+            "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_1",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_1"},              
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 2,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_2",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_2"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 3,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_3",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_3"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 4,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_4",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_4"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              },
+            {
+              "Type" : "RelInfoTrackIsolationBDT2",
+              "Location" : "TrackIsolationBDT2"
+            }
+            
+            ]
+                                      )
+        
+
+        self.looseLine = StrippingLine(loose_name+"Line",
+                                       prescale = config['LooseLinePrescale'],
+                                       postscale = config['DefaultPostscale'],
+                                       MDSTFlag = False,
+                                       #RequiredRawEvents = ["Calo"],
+                                       algos = [ self.selLoose ],
+                                       )
+
+        self.buLine = StrippingLine(bu_name+"Line",
+                                    prescale = config['BuPrescale'],
+                                    postscale = config['DefaultPostscale'],
+                                    MDSTFlag = False,
+                                    #RequiredRawEvents = ["Calo"],
+                                    algos = [ self.selBu ],
+                                    RelatedInfoTools = [
+          
+                { "Type" : "RelInfoBs2MuMuBIsolations"
+                  ,"TopSelection": self.selBu.requiredSelections()[0]
+                  , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+                  , "Location"  : "BSMUMUVARIABLES"},
+                
+                { "Type" : "RelInfoBs2MuMuTrackIsolations"
+                  ,"TopSelection": self.selBu.requiredSelections()[0]
+                      , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' , 'ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS','BSMUMUTRACKID','BSMUMUTRACKTOPID' ]
+                  ,"DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1iso",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2iso"}
+              },
+            
+#            { "Type" : "RelInfoMuonIDPlus",
+#              "Variables" : ["MU_BDT"],
+#              "DaughterLocations"  : {
+#                "B_s0 -> ^mu+ mu-" : "Muon1BDT",
+#                "B_s0 -> mu+ ^mu-" : "Muon2BDT" }
+#            },
+
+            { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : 0,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_0",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_0"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : 1,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_1",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_1"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : 2,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_2",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_2"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : 3,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_3",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_3"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : 4,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_4",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_4"}
+              ,"WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              },
+            {
+              "Type" : "RelInfoTrackIsolationBDT2",
+              "Location" : "TrackIsolationBDT2",
+              "Particles" : [1,2]
+            }
+                ]
+                                    )
+     
+        self.buFullDSTLine = StrippingLine(bu_name+"FullDSTLine",
+                                    prescale = config['BuPrescale'],
+                                    postscale = config['DefaultPostscale'],
+                                    MDSTFlag = False,
+                                    #RequiredRawEvents = ["Calo"],
+                                    algos = [ self.selBu ],
+                                    RelatedInfoTools = [
+          
+                { "Type" : "RelInfoBs2MuMuBIsolations"
+                  ,"TopSelection": self.selBu.requiredSelections()[0]
+                  , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+                  , "Location"  : "BSMUMUVARIABLES"},
+                
+                { "Type" : "RelInfoBs2MuMuTrackIsolations"
+                  ,"TopSelection": self.selBu.requiredSelections()[0]
+                      , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' , 'ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS','BSMUMUTRACKID','BSMUMUTRACKTOPID' ]
+                  ,"DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1iso",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2iso"}
+              },
+            
+#            { "Type" : "RelInfoMuonIDPlus",
+#              "Variables" : ["MU_BDT"],
+#              "DaughterLocations"  : {
+#                "B_s0 -> ^mu+ mu-" : "Muon1BDT",
+#                "B_s0 -> mu+ ^mu-" : "Muon2BDT" }
+#            },
+
+            { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : 0,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_0",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_0"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : 1,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_1",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_1"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : 2,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_2",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_2"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : 3,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_3",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_3"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBu.requiredSelections()[0],
+              "Variables" : 4,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_4",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_4"}
+              ,"WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              },
+            {
+              "Type" : "RelInfoTrackIsolationBDT2",
+              "Location" : "TrackIsolationBDT2",
+              "Particles" : [1,2]
+            }
+                ]
+                                    )
+
+        self.bsLine = StrippingLine(bs_name+"Line",
+                                    prescale = config['BsPrescale'],
+                                    postscale = config['DefaultPostscale'],
+                                    MDSTFlag = False,
+                                    #RequiredRawEvents = ["Calo"],
+                                    algos = [ self.selBs ],
+                                 RelatedInfoTools = [
+            
+                { "Type" : "RelInfoBs2MuMuBIsolations"
+                  ,"TopSelection": self.selBs.requiredSelections()[0]
+                  , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+                  , "Location"  : "BSMUMUVARIABLES"},
+                
+                { "Type" : "RelInfoBs2MuMuTrackIsolations"
+                  ,"TopSelection": self.selBs.requiredSelections()[0]
+                      , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' , 'ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS','BSMUMUTRACKID','BSMUMUTRACKTOPID' ]
+                  ,"DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1iso",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2iso"}
+              },
+            
+#            { "Type" : "RelInfoMuonIDPlus",
+#              "Variables" : ["MU_BDT"],
+#              "DaughterLocations"  : {
+#                "B_s0 -> ^mu+ mu-" : "Muon1BDT",
+#                "B_s0 -> mu+ ^mu-" : "Muon2BDT" }
+#            },
+            
+             { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "TopSelection": self.selBs.requiredSelections()[0],
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"
+              },
+
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBs.requiredSelections()[0],
+              "Variables" : 0,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_0",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_0"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+               "TopSelection": self.selBs.requiredSelections()[0],
+              "Variables" : 1,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_1",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_1"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+               "TopSelection": self.selBs.requiredSelections()[0],
+              "Variables" : 2,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_2",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_2"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+               "TopSelection": self.selBs.requiredSelections()[0],
+              "Variables" : 3,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_3",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_3"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+               "TopSelection": self.selBs.requiredSelections()[0],
+              "Variables" : 4,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_4",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_4"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              },
+            {
+              "Type" : "RelInfoTrackIsolationBDT2",
+              "Location" : "TrackIsolationBDT2",
+              "Particles" : [1,2]
+            }
+                ]
+                                    )
+
+        self.bdLine = StrippingLine(bd_name+"Line",
+                                    prescale = config['BdPrescale'],
+                                    postscale = config['DefaultPostscale'],
+                                    MDSTFlag = False,
+                                    #RequiredRawEvents = ["Calo"],
+                                    algos = [ self.selBd ], 
+                                    RelatedInfoTools = [
+  
+                { "Type" : "RelInfoBs2MuMuBIsolations"
+                  ,"TopSelection": self.selBd.requiredSelections()[0]
+                  , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+                  , "Location"  : "BSMUMUVARIABLES"},
+                
+                { "Type" : "RelInfoBs2MuMuTrackIsolations"
+                  ,"TopSelection": self.selBd.requiredSelections()[0]
+                      , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' , 'ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS','BSMUMUTRACKID','BSMUMUTRACKTOPID' ]
+                  ,"DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1iso",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2iso"}                                                                                                                                      },
+            
+#            { "Type" : "RelInfoMuonIDPlus",
+#              "Variables" : ["MU_BDT"],
+#              "DaughterLocations"  : {
+#                "B_s0 -> ^mu+ mu-" : "Muon1BDT",
+#                "B_s0 -> mu+ ^mu-" : "Muon2BDT" }
+#            },
+            
+            { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "TopSelection": self.selBd.requiredSelections()[0],
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"
+              },
+
+              { "Type" : "RelInfoTrackIsolationBDT",
+              "TopSelection": self.selBd.requiredSelections()[0],
+              "Variables" : 0,
+                "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_0",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_0"}    ,         
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+               "TopSelection": self.selBd.requiredSelections()[0],
+              "Variables" : 1,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_1",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_1"}    , 
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+               "TopSelection": self.selBd.requiredSelections()[0],
+              "Variables" : 2,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_2",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_2"}    , 
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+               "TopSelection": self.selBd.requiredSelections()[0],
+              "Variables" : 3,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_3",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_3"}    , 
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+               "TopSelection": self.selBd.requiredSelections()[0],
+              "Variables" : 4,
+              "DaughterLocations" : {
+            "J/psi(1S) -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_4",
+            "J/psi(1S) -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_4"}    , 
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              },
+            {
+              "Type" : "RelInfoTrackIsolationBDT2",
+              "Location" : "TrackIsolationBDT2",
+              "Particles" : [1,2]
+            }
+                ]
+                                    )
+
+
+
+        self.ssLine = StrippingLine(ss_name+"Line",
+                                    prescale = config['SSPrescale'],
+                                    postscale = config['DefaultPostscale'],
+                                    MDSTFlag = False,
+                                    #RequiredRawEvents = ["Calo"],
+                                    algos = [ self.selSS ],
+                                    RelatedInfoTools = [
+            { 'Type' : 'RelInfoJetsVariables',
+              'Location': 'RelatedInfoJets',
+              'Variables': ["JETNOMU1PX","JETNOMU1PY", "JETNOMU1PZ", "JETNOMU1PT", "JETNOMU1JETWIDTH", "JETNOMU1NNTAG", "JETNOMU1MNF", "JETNOMU2PX", "JETNOMU2PY", "JETNOMU2PZ", "JETNOMU2PT", "JETNOMU2JETWIDTH", "JETNOMU2NNTAG", "JETNOMU2MNF", "JETNOMU3PX", "JETNOMU3PY", "JETNOMU3PZ", "JETNOMU3PT", "JETNOMU3JETWIDTH", "JETNOMU3NNTAG", "JETNOMU3MNF", "JETMU1PX", "JETMU1PY", "JETMU1PZ", "JETMU1PT", "JETMU1JETWIDTH", "JETMU1NNTAG", "JETMU1MNF", "JETMU2PX", "JETMU2PY", "JETMU2PZ", "JETMU2PT", "JETMU2JETWIDTH", "JETMU2NNTAG", "JETMU2MNF", "JETBPX", "JETBPY", "JETBPZ", "JETBPT", "JETBJETWIDTH", "JETBNNTAG", "JETBMNF"],
+              'LocationJetsNoMu' : "Phys/"+stdjets_name_ban_SS+"/Particles",
+              'LocationJetsNoRemove' : "Phys/"+stdjets_name_noban+"/Particles",
+              'LocationJetsForceB' : "Phys/"+stdjets_name_addb_SS+"/Particles"},
+
+            { "Type" : "RelInfoBs2MuMuBIsolations"
+              , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+              , "Location"  : "BSMUMUVARIABLES"},
+
+            { "Type" : "RelInfoMuonIDPlus",
+              "Variables" : ["MU_BDT"],
+              "DaughterLocations"  : {
+                "[B_s0 -> ^mu+ mu+]CC" : "Muon1BDT",
+                "[B_s0 -> mu+ ^mu+]CC" : "Muon2BDT" }
+            }, 
+
+            { "Type" : "RelInfoBs2MuMuTrackIsolations"
+                      , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' , 'ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS','BSMUMUTRACKID','BSMUMUTRACKTOPID' ]
+              ,"DaughterLocations" : {
+            "[B_s0 -> ^mu+ mu+]CC" : "Muon1iso",
+            "[B_s0 -> mu+ ^mu+]CC" : "Muon2iso"}
+              },
+            { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"  
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 0,
+              "DaughterLocations" : {
+            "[B_s0 -> ^mu+ mu+]CC" : "Muon1TrackIsoBDTInfo_0",
+            "[B_s0 -> mu+ ^mu+]CC" : "Muon2TrackIsoBDTInfo_0"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 1,
+              "DaughterLocations" : {
+            "[B_s0 -> ^mu+ mu+]CC" : "Muon1TrackIsoBDTInfo_1",
+            "[B_s0 -> mu+ ^mu+]CC" : "Muon2TrackIsoBDTInfo_1"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 2,
+              "DaughterLocations" : {
+            "[B_s0 -> ^mu+ mu+]CC" : "Muon1TrackIsoBDTInfo_2",
+            "[B_s0 -> mu+ ^mu+]CC" : "Muon2TrackIsoBDTInfo_2"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 3,
+              "DaughterLocations" : {
+            "[B_s0 -> ^mu+ mu+]CC" : "Muon1TrackIsoBDTInfo_3",
+            "[B_s0 -> mu+ ^mu+]CC" : "Muon2TrackIsoBDTInfo_3"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 4,
+              "DaughterLocations" : {
+            "[B_s0 -> ^mu+ mu+]CC" : "Muon1TrackIsoBDTInfo_4",
+            "[B_s0 -> mu+ ^mu+]CC" : "Muon2TrackIsoBDTInfo_4"},
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              },
+            {
+              "Type" : "RelInfoTrackIsolationBDT2",
+              "Location" : "TrackIsolationBDT2"
+            }
+            ]
+                                    )
+       
+        self.ltubLine = StrippingLine(ltub_name+"Line",
+                                    prescale = config['Bs2mmLTUBLinePrescale'],
+                                    postscale = config['DefaultPostscale'],
+                                    MDSTFlag = False,
+                                    #RequiredRawEvents = ["Calo"],
+                                    algos = [ self.selLTUB ],
+                                    RelatedInfoTools = [
+            { 'Type' : 'RelInfoJetsVariables',
+              'Location': 'RelatedInfoJets',
+              'Variables': ["JETNOMU1PX","JETNOMU1PY", "JETNOMU1PZ", "JETNOMU1PT", "JETNOMU1JETWIDTH", "JETNOMU1NNTAG", "JETNOMU1MNF", "JETNOMU2PX", "JETNOMU2PY", "JETNOMU2PZ", "JETNOMU2PT", "JETNOMU2JETWIDTH", "JETNOMU2NNTAG", "JETNOMU2MNF", "JETNOMU3PX", "JETNOMU3PY", "JETNOMU3PZ", "JETNOMU3PT", "JETNOMU3JETWIDTH", "JETNOMU3NNTAG", "JETNOMU3MNF", "JETMU1PX", "JETMU1PY", "JETMU1PZ", "JETMU1PT", "JETMU1JETWIDTH", "JETMU1NNTAG", "JETMU1MNF", "JETMU2PX", "JETMU2PY", "JETMU2PZ", "JETMU2PT", "JETMU2JETWIDTH", "JETMU2NNTAG", "JETMU2MNF", "JETBPX", "JETBPY", "JETBPZ", "JETBPT", "JETBJETWIDTH", "JETBNNTAG", "JETBMNF"],
+              'LocationJetsNoMu' : "Phys/"+stdjets_name_ban_LTUB+"/Particles",
+              'LocationJetsNoRemove' : "Phys/"+stdjets_name_noban+"/Particles",
+              'LocationJetsForceB' : "Phys/"+stdjets_name_addb_LTUB+"/Particles"},
+            { "Type" : "RelInfoBs2MuMuBIsolations"
+              , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+              , "Location"  : "BSMUMUVARIABLES"},
+
+            { "Type" : "RelInfoMuonIDPlus",
+              "Variables" : ["MU_BDT"],
+              "DaughterLocations"  : {
+                "B_s0 -> ^mu+ mu-" : "Muon1BDT",
+                "B_s0 -> mu+ ^mu-" : "Muon2BDT" }
+            },
+ 
+            { "Type" : "RelInfoBs2MuMuTrackIsolations"
+                      , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' , 'ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS','BSMUMUTRACKID','BSMUMUTRACKTOPID' ]
+              ,"DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1iso",
+            "B_s0 -> mu+ ^mu-" : "Muon2iso" }
+             
+   
+              },
+            { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"  
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 0,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_0",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_0" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 1,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_1",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_1" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 2,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_2",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_2" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 3,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_3",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_3" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 4,
+              "DaughterLocations" : {
+            "B_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_4",
+            "B_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_4" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              }
+            ]
+                                    )
+
+        self.bsstLine = StrippingLine(bsst_name+"Line",
+                                    prescale = config['Bsst2mmLinePrescale'],
+                                    postscale = config['DefaultPostscale'],
+                                    MDSTFlag = False,
+                                    #RequiredRawEvents = ["Calo"],
+                                    algos = [ self.selbsst ],
+                                    RelatedInfoTools = [
+            { 'Type' : 'RelInfoJetsVariables',
+              'Location': 'RelatedInfoJets',
+              'Variables': ["JETNOMU1PX","JETNOMU1PY", "JETNOMU1PZ", "JETNOMU1PT", "JETNOMU1JETWIDTH", "JETNOMU1NNTAG", "JETNOMU1MNF", "JETNOMU2PX", "JETNOMU2PY", "JETNOMU2PZ", "JETNOMU2PT", "JETNOMU2JETWIDTH", "JETNOMU2NNTAG", "JETNOMU2MNF", "JETNOMU3PX", "JETNOMU3PY", "JETNOMU3PZ", "JETNOMU3PT", "JETNOMU3JETWIDTH", "JETNOMU3NNTAG", "JETNOMU3MNF", "JETMU1PX", "JETMU1PY", "JETMU1PZ", "JETMU1PT", "JETMU1JETWIDTH", "JETMU1NNTAG", "JETMU1MNF", "JETMU2PX", "JETMU2PY", "JETMU2PZ", "JETMU2PT", "JETMU2JETWIDTH", "JETMU2NNTAG", "JETMU2MNF", "JETBPX", "JETBPY", "JETBPZ", "JETBPT", "JETBJETWIDTH", "JETBNNTAG", "JETBMNF"],
+              'LocationJetsNoMu' : "Phys/"+stdjets_name_ban_bsst+"/Particles",
+              'LocationJetsNoRemove' : "Phys/"+stdjets_name_noban+"/Particles",
+              'LocationJetsForceB' : "Phys/"+stdjets_name_addb_bsst+"/Particles"},
+            { "Type" : "RelInfoBs2MuMuBIsolations"
+              , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+              , "Location"  : "BSMUMUVARIABLES"},
+
+            { "Type" : "RelInfoMuonIDPlus",
+              "Variables" : ["MU_BDT"],
+              "DaughterLocations"  : {
+                "B*_s0 -> ^mu+ mu-" : "Muon1BDT",
+                "B*_s0 -> mu+ ^mu-" : "Muon2BDT" }
+            }, 
+
+            { "Type" : "RelInfoBs2MuMuTrackIsolations"
+                      , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' , 'ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS','BSMUMUTRACKID','BSMUMUTRACKTOPID' ]
+              ,"DaughterLocations" : {
+            "B*_s0 -> ^mu+ mu-" : "Muon1iso",
+            "B*_s0 -> mu+ ^mu-" : "Muon2iso" }
+             
+   
+              },
+            { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"  
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 0,
+              "DaughterLocations" : {
+            "B*_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_0",
+            "B*_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_0" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 1,
+              "DaughterLocations" : {
+            "B*_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_1",
+            "B*_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_1" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 2,
+              "DaughterLocations" : {
+            "B*_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_2",
+            "B*_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_2" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 3,
+              "DaughterLocations" : {
+            "B*_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_3",
+            "B*_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_3" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 4,
+              "DaughterLocations" : {
+            "B*_s0 -> ^mu+ mu-" : "Muon1TrackIsoBDTInfo_4",
+            "B*_s0 -> mu+ ^mu-" : "Muon2TrackIsoBDTInfo_4" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              }
+            ]
+                                    )
+
+
+        self.Bs2KKltubLine = StrippingLine(Bs2KKltub_name+"Line",
+                                    prescale = config['Bs2KKLTUBLinePrescale'],
+                                    postscale = config['DefaultPostscale'],
+                                    MDSTFlag = False,
+                                    #RequiredRawEvents = ["Calo"],
+                                    algos = [ self.selBs2KKLTUB ],
+                                    RelatedInfoTools = [
+            { 'Type' : 'RelInfoJetsVariables',
+              'Location': 'RelatedInfoJets',
+              'Variables': ["JETNOMU1PX","JETNOMU1PY", "JETNOMU1PZ", "JETNOMU1PT", "JETNOMU1JETWIDTH", "JETNOMU1NNTAG", "JETNOMU1MNF", "JETNOMU2PX", "JETNOMU2PY", "JETNOMU2PZ", "JETNOMU2PT", "JETNOMU2JETWIDTH", "JETNOMU2NNTAG", "JETNOMU2MNF", "JETNOMU3PX", "JETNOMU3PY", "JETNOMU3PZ", "JETNOMU3PT", "JETNOMU3JETWIDTH", "JETNOMU3NNTAG", "JETNOMU3MNF", "JETMU1PX", "JETMU1PY", "JETMU1PZ", "JETMU1PT", "JETMU1JETWIDTH", "JETMU1NNTAG", "JETMU1MNF", "JETMU2PX", "JETMU2PY", "JETMU2PZ", "JETMU2PT", "JETMU2JETWIDTH", "JETMU2NNTAG", "JETMU2MNF", "JETBPX", "JETBPY", "JETBPZ", "JETBPT", "JETBJETWIDTH", "JETBNNTAG", "JETBMNF"],
+              'LocationJetsNoMu' : "Phys/"+stdjets_name_ban_KKLTUB+"/Particles",
+              'LocationJetsNoRemove' : "Phys/"+stdjets_name_noban+"/Particles",
+              'LocationJetsForceB' : "Phys/"+stdjets_name_addb_KKLTUB+"/Particles"},
+            
+            { "Type" : "RelInfoBs2MuMuBIsolations"
+              , "Variables" : ['BSMUMUCDFISO', 'BSMUMUOTHERBMAG', 'BSMUMUOTHERBANGLE', 'BSMUMUOTHERBBOOSTMAG', 'BSMUMUOTHERBBOOSTANGLE', 'BSMUMUOTHERBTRACKS', 'BSMUMUPARTID','BSMUMUTOPID']
+              , "Location"  : "BSMUMUVARIABLES"},
+            
+#            { "Type" : "RelInfoMuonIDPlus",
+#              "Variables" : ["MU_BDT"],
+#              "DaughterLocations"  : {
+#                "B_s0 -> ^K+ K-" : "Muon1BDT",
+#                "B_s0 -> K+ ^K-" : "Muon2BDT" }
+#            },
+
+            { "Type" : "RelInfoBs2MuMuTrackIsolations"
+              , "Variables" : [  'BSMUMUTRACKPLUSISO', 'BSMUMUTRACKPLUSISOTWO' , 'ISOTWOBODYQPLUS', 'ISOTWOBODYMASSISOPLUS', 'ISOTWOBODYCHI2ISOPLUS', 'ISOTWOBODYISO5PLUS','BSMUMUTRACKID','BSMUMUTRACKTOPID' ]
+
+              ,        "DaughterLocations" : {
+             "B_s0 -> ^K+ K-" : "Kaon1iso",
+             "B_s0 -> K+ ^K-" : "Kaon2iso" }
+              },
+            { "Type" : "RelInfoBs2MuMuZVisoBDT",
+              "Variables" : ['ZVISO'],
+              "Location"  : "RelInfoZVisoBDT"  
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 0,
+              "DaughterLocations" : {
+             "B_s0 -> ^K+ K-" : "Kaon1TrackIsoBDTInfo_0",
+             "B_s0 -> K+ ^K-" : "Kaon2TrackIsoBDTInfo_0" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsA_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 1,
+              "DaughterLocations" : {
+             "B_s0 -> ^K+ K-" : "Kaon1TrackIsoBDTInfo_1",
+             "B_s0 -> K+ ^K-" : "Kaon2TrackIsoBDTInfo_1" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 2,
+              "DaughterLocations" : {
+             "B_s0 -> ^K+ K-" : "Kaon1TrackIsoBDTInfo_2",
+             "B_s0 -> K+ ^K-" : "Kaon2TrackIsoBDTInfo_2" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 3,
+              "DaughterLocations" : {
+             "B_s0 -> ^K+ K-" : "Kaon1TrackIsoBDTInfo_3",
+             "B_s0 -> K+ ^K-" : "Kaon2TrackIsoBDTInfo_3" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT13vars_v1r4.xml"
+              },
+            { "Type" : "RelInfoTrackIsolationBDT",
+              "Variables" : 4,
+              "DaughterLocations" : {
+             "B_s0 -> ^K+ K-" : "Kaon1TrackIsoBDTInfo_4",
+             "B_s0 -> K+ ^K-" : "Kaon2TrackIsoBDTInfo_4" },
+              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT15vars_v1r4.xml"
+              }
+           ]
+                                 )
+
+        create_stdjets(self,self.defaultLine.outputLocation(),stdjets_name_ban_default, stdjets_name_addb_default)
+        create_stdjets(self,self.defaultFullDSTLine.outputLocation(),stdjets_name_ban_default_DST, stdjets_name_addb_default_DST)
+        create_stdjets(self,self.wideLine.outputLocation(),stdjets_name_ban_wide, stdjets_name_addb_wide)
+        create_stdjets(self,self.ssLine.outputLocation(),stdjets_name_ban_SS, stdjets_name_addb_SS)
+
+        create_stdjets(self,self.ltubLine.outputLocation(),stdjets_name_ban_LTUB, stdjets_name_addb_LTUB)
+        create_stdjets(self,self.bsstLine.outputLocation(),stdjets_name_ban_bsst, stdjets_name_addb_bsst)
+        create_stdjets(self,self.Bs2KKltubLine.outputLocation(),stdjets_name_ban_KKLTUB, stdjets_name_addb_KKLTUB)
+
+        self.registerLine(self.defaultLine)
+        self.registerLine(self.defaultFullDSTLine)
+        self.registerLine(self.wideLine)
+        self.registerLine(self.looseLine)
+        self.registerLine(self.buLine)
+        self.registerLine(self.buFullDSTLine)
+        self.registerLine(self.bsLine)
+        self.registerLine(self.bdLine)
+        self.registerLine(self.ssLine)
+        self.registerLine(self.ltubLine)
+        self.registerLine(self.bsstLine)
+        self.registerLine(self.Bs2KKltubLine)
+
+def makeDefault(name, BPVVDChi2, Muon_MIPChi2DV, TrackGhostProb, DOCA, VCHI2_VDOF, TrChi2 , B_Pt, BPVIPChi2) :
+    """
+    default Bs2mumu selection object (tighter selection a la roadmap)
+    starts from Phys/StdNoPIDsMuons
+
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    #from Configurables import OfflineVertexFitter
+    Bs2MuMuNoMuID = CombineParticles("Combine"+name)
+    Bs2MuMuNoMuID.DecayDescriptor = "B_s0 -> mu+ mu-"
+    # Set the OfflineVertexFitter to keep the 4 tracks and not the J/Psi Kstar:
+  
+    Bs2MuMuNoMuID.ReFitPVs = True
+    Bs2MuMuNoMuID.DaughtersCuts = { "mu+" : "(MIPCHI2DV(PRIMARY)> %(Muon_MIPChi2DV)s )&(TRCHI2DOF < %(TrChi2)s)"\
+                                    " & (0.5<PPINFO(LHCb.ProtoParticle.InAccMuon,-1))"\
+                                    " & (PT < 40*GeV)"\
+                                    " & (P < 500*GeV)"\
+                                    " & ( TRGHOSTPROB < %(TrackGhostProb)s )"% locals() }
+    
+    Bs2MuMuNoMuID.CombinationCut = "(ADAMASS('B_s0')<500*MeV)"\
+                                   "& (AMAXDOCA('')<%(DOCA)s*mm)"% locals()
+
+    Bs2MuMuNoMuID.MotherCut = "(VFASPF(VCHI2/VDOF)<%(VCHI2_VDOF)s) "\
+                              "& (ADMASS('B_s0') < 500*MeV )"\
+                              "& (BPVDIRA > 0) "\
+                              "& (BPVVDCHI2> %(BPVVDChi2)s)"\
+                              "& (BPVIPCHI2()< %(BPVIPChi2)s) "\
+                              "& (BPVLTIME()<13.248*ps)"\
+                              "& (PT > %(B_Pt)s*MeV)"% locals()
+                             
+    _stdNoPIDsMuons = DataOnDemand(Location = "Phys/StdNoPIDsMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Bs2MuMuNoMuID,
+                      RequiredSelections = [ _stdNoPIDsMuons])
+
+def makeBs2mmWide(name, BPVVDChi2, Muon_MIPChi2DV, DOCA, VCHI2_VDOF, TrChi2, BPVIPChi2, TrackGhostProb) :
+    """
+    Bs2mumu selection object (tighter selection a la roadmap)
+    with muon Id and wide mass window (1.2GeV)
+    starts from Phys/StdLooseMuons
+
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    #from Configurables import OfflineVertexFitter
+    Bs2MuMuWideMass = CombineParticles("Combine"+name)
+    Bs2MuMuWideMass.DecayDescriptor = "B_s0 -> mu+ mu-"
+  
+    Bs2MuMuWideMass.ReFitPVs = True
+    Bs2MuMuWideMass.DaughtersCuts = { "mu+" : "(MIPCHI2DV(PRIMARY)> %(Muon_MIPChi2DV)s)&(TRCHI2DOF < %(TrChi2)s)" \
+                                    " & ( TRGHOSTPROB < %(TrackGhostProb)s )"% locals() }
+    
+    Bs2MuMuWideMass.CombinationCut = "(ADAMASS('B_s0')<1200*MeV)"\
+                                     "& (AMAXDOCA('')<%(DOCA)s*mm)"% locals()
+
+    Bs2MuMuWideMass.MotherCut = "(VFASPF(VCHI2/VDOF)<%(VCHI2_VDOF)s) "\
+                                "& (ADMASS('B_s0') < 1200*MeV )"\
+                                "& (BPVDIRA > 0) "\
+                                "& (BPVVDCHI2> %(BPVVDChi2)s)"\
+                                "& (BPVIPCHI2()< %(BPVIPChi2)s) "% locals()
+    
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Bs2MuMuWideMass,
+                      RequiredSelections = [ _stdLooseMuons])
+
+def makeSS(name, BPVVDChi2, Muon_MIPChi2DV, DOCA, VCHI2_VDOF, TrChi2, BPVIPChi2, TrackGhostProb) :
+    """
+    Bs2mumu selection object (tighter selection a la roadmap)
+    with muon Id and same sign muons 
+    starts from Phys/StdLooseMuons
+
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    #from Configurables import OfflineVertexFitter
+    Bs2MuMuSS = CombineParticles("Combine"+name)
+    Bs2MuMuSS.DecayDescriptor = "[B_s0 -> mu+ mu+]cc"
+  
+    Bs2MuMuSS.ReFitPVs = True
+    Bs2MuMuSS.DaughtersCuts = { "mu+" : "(MIPCHI2DV(PRIMARY)> %(Muon_MIPChi2DV)s )&(TRCHI2DOF < %(TrChi2)s )"\
+                                    " & ( TRGHOSTPROB < %(TrackGhostProb)s )"% locals() }
+    Bs2MuMuSS.CombinationCut = "(ADAMASS('B_s0')<200*MeV)"\
+                                     "& (AMAXDOCA('')<%(DOCA)s*mm)"% locals()
+
+    Bs2MuMuSS.MotherCut = "(VFASPF(VCHI2/VDOF)<%(VCHI2_VDOF)s) "\
+                                "& (ADMASS('B_s0') < 200*MeV )"\
+                                "& (BPVDIRA > 0) "\
+                                "& (BPVVDCHI2>  %(BPVVDChi2)s)"\
+                                "& (BPVIPCHI2()< %(BPVIPChi2)s) "% locals()
+    
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Bs2MuMuSS,
+                      RequiredSelections = [ _stdLooseMuons])
+
+def makeLoose(name, MuIPChi2, MuTrChi2, BIPChi2, BFDChi2, DOCA, VCHI2_VDOF, TrackGhostProb ) :
+    """      
+    loose Bs2mumu selection object to monitor selection,
+    systematics from cuts, etc.
+    starts from Phys/StdNoPIDsMuons
+
+    prescaled
+
+    Arguments:
+    name        : name of the Selection.
+    MuIPChi2    : muon MIPCHI2DV(PRIMARY)
+    MuTrChi2    : muon TRCHI2
+    BIPChi2     : Bs MIPCHI2DV(PRIMARY)
+    BFDChi2     : Bs BPVVDCHI2> %(BFDChi2)
+    """
+    #from Configurables import OfflineVertexFitter
+    Bs2MuMuNoMuIDLoose = CombineParticles("Combine"+name)
+    Bs2MuMuNoMuIDLoose.DecayDescriptor = "B_s0 -> mu+ mu-"
+   
+    Bs2MuMuNoMuIDLoose.ReFitPVs = True
+    Bs2MuMuNoMuIDLoose.DaughtersCuts = { "mu+" : "(TRCHI2DOF < %(MuTrChi2)s ) "\
+                                         "& (MIPCHI2DV(PRIMARY)> %(MuIPChi2)s ) "\
+                                    " & ( TRGHOSTPROB < %(TrackGhostProb)s )"% locals() }
+  
+    Bs2MuMuNoMuIDLoose.CombinationCut = "(ADAMASS('B_s0')<600*MeV)"\
+                                        "& (AMAXDOCA('')<%(DOCA)s*mm)"% locals()
+
+    Bs2MuMuNoMuIDLoose.MotherCut = "(VFASPF(VCHI2/VDOF)<%(VCHI2_VDOF)s) "\
+                                   "& (ADMASS('B_s0') < 600*MeV )"\
+                                   "& (BPVDIRA > 0) "\
+                                   "& (BPVVDCHI2> %(BFDChi2)s)"\
+                                   "& (BPVIPCHI2()< %(BIPChi2)s) "% locals()
+
+    _stdNoPIDsMuons = DataOnDemand(Location = "Phys/StdNoPIDsMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Bs2MuMuNoMuIDLoose,
+                      RequiredSelections = [ _stdNoPIDsMuons])
+
+
+def makeBu(name, K_MIPChi2DV,  Jpsi_BPVVDChi2, DOCA, TrChi2, BPVIPChi2, TrackGhostProb) :
+    """
+    detached Bu-->JPsiK selection. Selection is aligned to the Bs2MuMu
+    selection.
+
+    Please contact Johannes Albrecht if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+   
+    SelDJPsi = makeDetachedJPsi(name+"SelJpsi",  Jpsi_BPVVDChi2, DOCA, TrChi2, TrackGhostProb)
+
+    PreselBu2JPsiKCommon = CombineParticles("PreselBu2JPsiKCommon")
+    PreselBu2JPsiKCommon.DecayDescriptor =  " [B+ -> J/psi(1S) K+]cc ";
+   
+    PreselBu2JPsiKCommon.ReFitPVs = True
+    PreselBu2JPsiKCommon.DaughtersCuts = { "K+" : "(ISLONG) & (TRCHI2DOF < %(TrChi2)s ) &(MIPCHI2DV(PRIMARY)>%(K_MIPChi2DV)s)& (PT>250*MeV) "\
+                                    " & ( TRGHOSTPROB < %(TrackGhostProb)s )"% locals() }
+    PreselBu2JPsiKCommon.CombinationCut = "(ADAMASS('B+') < 500*MeV)"
+    PreselBu2JPsiKCommon.MotherCut = "(BPVIPCHI2()< %(BPVIPChi2)s)& (VFASPF(VCHI2)<45) "% locals()
+
+    _kaons = DataOnDemand(Location='Phys/StdNoPIDsKaons/Particles')
+
+    return Selection( name,
+                         Algorithm = PreselBu2JPsiKCommon,
+                         RequiredSelections=[SelDJPsi,_kaons] )
+
+
+def makeBs(name, Phi_MIPChi2DV,  Jpsi_BPVVDChi2, DOCA, TrChi2, BPVIPChi2, TrackGhostProb) :
+    """
+    detached Bs-->JPsiPhi selection. Selection is aligned to the Bs2MuMu
+    selection.
+
+    Please contact Johannes Albrecht if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+   
+    SelDJPsi = makeDetachedJPsi(name+"SelJpsi",  Jpsi_BPVVDChi2, DOCA, TrChi2, TrackGhostProb)
+
+    makePhi = CombineParticles("makePhi")
+    makePhi.DecayDescriptor =  "phi(1020) -> K+ K-"
+    makePhi.DaughtersCuts = {"K+": "(ISLONG) & (TRCHI2DOF < %(TrChi2)s ) & (MIPCHI2DV(PRIMARY)> 4.) & (PT>250*MeV)"\
+                                    " & ( TRGHOSTPROB < %(TrackGhostProb)s )"% locals() }
+    
+    _kaons = DataOnDemand(Location='Phys/StdNoPIDsKaons/Particles')
+
+    makePhi.CombinationCut =  "(ADAMASS('phi(1020)')<20*MeV)"
+    makePhi.MotherCut = " (MIPCHI2DV(PRIMARY)> %(Phi_MIPChi2DV)s)"% locals()
+    SelPhi = Selection( name+"SelPhi",                       Algorithm= makePhi,
+                        RequiredSelections=[_kaons] )
+
+    PreselBs2JPsiPhiCommon = CombineParticles("PreselBs2JPsiPhiCommon")
+    PreselBs2JPsiPhiCommon.DecayDescriptor = "B_s0 -> J/psi(1S) phi(1020)"
+    PreselBs2JPsiPhiCommon.ReFitPVs = True
+    PreselBs2JPsiPhiCommon.DaughtersCuts = {}
+    PreselBs2JPsiPhiCommon.CombinationCut = "(ADAMASS('B_s0') < 500*MeV)"
+    PreselBs2JPsiPhiCommon.MotherCut = "(BPVIPCHI2()< %(BPVIPChi2)s)& (VFASPF(VCHI2)<75)"% locals()
+    
+    return  Selection( name,
+                       Algorithm = PreselBs2JPsiPhiCommon,
+                       RequiredSelections=[SelDJPsi,SelPhi] )
+
+
+
+def makeBd(name, Kst_MIPChi2DV,  Jpsi_BPVVDChi2, TrackGhostProb, DOCA, TrChi2, BPVIPChi2) :
+    """
+    detached Bd-->JPsiK* selection. Selection is aligned to the Bs2MuMu
+    selection.
+
+    Please contact Johannes Albrecht if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+   
+    SelDJPsi = makeDetachedJPsi(name+"SelJpsi",  Jpsi_BPVVDChi2, DOCA, TrChi2, TrackGhostProb)
+
+
+    ## make Kstar
+
+    makeKstar = CombineParticles("makeKstar")
+
+    makeKstar.DecayDescriptor =  "[K*(892)0 -> K+ pi-]cc"
+    makeKstar.DaughtersCuts = {"K+": "(ISLONG) & (TRCHI2DOF < %(TrChi2)s ) "\
+                               " & ( TRGHOSTPROB < %(TrackGhostProb)s )"\
+                               " & (MIPCHI2DV(PRIMARY)> 4.)& (PT>250*MeV)"% locals(),
+                               "pi-":"(ISLONG) & (TRCHI2DOF < %(TrChi2)s ) "\
+                               " & ( TRGHOSTPROB < %(TrackGhostProb)s )"\
+                               "& (MIPCHI2DV(PRIMARY)> 4.)& (PT>250*MeV)" % locals()}
+    makeKstar.CombinationCut =  "(ADAMASS('K*(892)0')<2000*MeV)"#huge, to allow to study JPsi K1 etc
+    makeKstar.MotherCut = " (MIPCHI2DV(PRIMARY)> %(Kst_MIPChi2DV)s)"% locals()
+
+    _pions = DataOnDemand(Location='Phys/StdNoPIDsPions/Particles')
+    _kaons = DataOnDemand(Location='Phys/StdNoPIDsKaons/Particles')
+
+    SelKst = Selection( name+"SelKst",
+                        Algorithm= makeKstar,
+                        RequiredSelections=[_pions,_kaons] )
+
+    ## make BtoJPsiKstar
+    PreselBd2JPsiKstCommon = CombineParticles("PreselBd2JPsiKstCommon")
+    PreselBd2JPsiKstCommon.DecayDescriptor = "[B0 -> J/psi(1S) K*(892)0]cc"
+   
+    PreselBd2JPsiKstCommon.ReFitPVs = True
+    PreselBd2JPsiKstCommon.DaughtersCuts = {}
+    PreselBd2JPsiKstCommon.CombinationCut = "(ADAMASS('B0') < 500*MeV)"
+    PreselBd2JPsiKstCommon.MotherCut = "(BPVIPCHI2()< %(BPVIPChi2)s) & (VFASPF(VCHI2)<75)"% locals()
+
+    return Selection( name,
+                      Algorithm = PreselBd2JPsiKstCommon,
+                      RequiredSelections=[SelDJPsi,SelKst] )
+
+def makeDetachedJPsi(name, Jpsi_BPVVDChi2, DOCA, TrChi2, TrackGhostProb) :
+    """
+    detached JPsi selection for B--> JPsi X calibration and
+    normalization channels. Selection is aligned to the Bs2MuMu
+    selection.
+
+    Please contact Johannes Albrecht if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+    #from Configurables import OfflineVertexFitter
+    DetachedJPsi = CombineParticles("Combine"+name)
+    DetachedJPsi.DecayDescriptor = "J/psi(1S) -> mu+ mu-"
+  
+    DetachedJPsi.ReFitPVs = True
+    DetachedJPsi.DaughtersCuts = { "mu+" : "(TRCHI2DOF <  %(TrChi2)s) "\
+                                   "& (MIPCHI2DV(PRIMARY)> 25.)"\
+                                   " & ( TRGHOSTPROB < %(TrackGhostProb)s )"% locals() }
+                                 
+    DetachedJPsi.CombinationCut = "(ADAMASS('J/psi(1S)')<100*MeV) "\
+                                  "& (AMAXDOCA('')<%(DOCA)s*mm)"% locals()
+
+    DetachedJPsi.MotherCut = "(VFASPF(VCHI2)<9) "\
+                             "& (ADMASS('J/psi(1S)') < 100*MeV )"\
+                             "& (BPVDIRA > 0) "\
+                             "& (BPVVDCHI2> %(Jpsi_BPVVDChi2)s)"% locals()
+
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = DetachedJPsi,
+                      RequiredSelections = [ _stdLooseMuons ])
+
+def makeBs2mmLTUB(name, TrackGhostProb, DOCA, VCHI2_VDOF, TrChi2, B_Pt, BPVIPChi2, minimum_decaytime, muon_PT) :
+    """
+    Lifetime unbiased Bs2mumu selection object
+    starts from Phys/StdAllLooseMuons
+
+    Please contact Harry Cliff if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    #from Configurables import OfflineVertexFitter
+    Bs2MuMuLTUB = CombineParticles("Combine"+name)
+    Bs2MuMuLTUB.DecayDescriptor = "B_s0 -> mu+ mu-"
+   
+    Bs2MuMuLTUB.ReFitPVs = True
+    Bs2MuMuLTUB.DaughtersCuts = { "mu+" : "(PT > 500*MeV) & (TRCHI2DOF < %(TrChi2)s )"\
+                                    " & (0.5<PPINFO(LHCb.ProtoParticle.InAccMuon,-1))"\
+                                    " & (PT < %(muon_PT)s*GeV)"\
+                                    " & (P < 500*GeV)"\
+                                    " & ( TRGHOSTPROB <  %(TrackGhostProb)s )" % locals()}
+    
+    Bs2MuMuLTUB.CombinationCut = "(ADAMASS('B_s0')<500*MeV)"\
+                                 "& (AMAXDOCA('')<%(DOCA)s*mm)"% locals()
+
+    Bs2MuMuLTUB.MotherCut = "(VFASPF(VCHI2/VDOF)<%(VCHI2_VDOF)s) "\
+                            "& (ADMASS('B_s0') < 500*MeV )"\
+                            "& (BPVIPCHI2()< %(BPVIPChi2)s) "\
+                            "& (BPVLTIME()>%(minimum_decaytime)s*ps)"\
+                            "& (BPVLTIME()<13.248*ps)"\
+                            "& (PT >  %(B_Pt)s*MeV)"% locals()
+                             
+    _stdAllLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Bs2MuMuLTUB,
+                      RequiredSelections = [ _stdAllLooseMuons])
+
+def makeBsst2mm(name, TrackGhostProb, DOCA, VCHI2_VDOF, TrChi2, PID, SUMPT, B_Pt, BPVIPChi2, minimum_decaytime, maximum_decaytime, muon_PT) :
+    """
+    Lifetime unbiased Bs*2mumu selection object
+    starts from Phys/StdAllLooseMuons
+
+    Arguments:
+    name        : name of the Selection.
+    """
+    #from Configurables import OfflineVertexFitter
+    Bsst2mm = CombineParticles("Combine"+name)
+    Bsst2mm.DecayDescriptor = "B*_s0 -> mu+ mu-"
+    #Bsst2mm.addTool( OfflineVertexFitter )
+    #Bsst2mm.ParticleCombiners.update( { "" : "OfflineVertexFitter"} )
+    #Bsst2mm.OfflineVertexFitter.useResonanceVertex = False
+    Bsst2mm.ParticleCombiners.update( { "" : "LoKi::VertexFitter:PUBLIC"} )
+    Bsst2mm.ReFitPVs = True
+    Bsst2mm.DaughtersCuts = { "mu+" : "(PT > 800*MeV) & (TRCHI2DOF < %(TrChi2)s )"\
+                                    " & (0.5<PPINFO(LHCb.ProtoParticle.InAccMuon,-1))"\
+                                    " & (PT < %(muon_PT)s*GeV)"\
+                                    " & (PROBNNmu > %(PID)s)" \
+                                    " & (P < 500*GeV)"\
+                                    " & ( TRGHOSTPROB <  %(TrackGhostProb)s )" % locals() }
+    
+    Bsst2mm.CombinationCut = "(ADAMASS('B_s0')<500*MeV)"\
+                             " & (ASUM(PT) > %(SUMPT)s)"\
+                             "& (AMAXDOCA('')<%(DOCA)s*mm)"% locals()
+
+    Bsst2mm.MotherCut = "(VFASPF(VCHI2/VDOF)<%(VCHI2_VDOF)s) "\
+                        "& (ADMASS('B_s0') < 500*MeV )"\
+                        "& (BPVIPCHI2()< %(BPVIPChi2)s) "\
+                        "& (BPVLTIME()>%(minimum_decaytime)s*ps)"\
+                        "& (BPVLTIME()<%(maximum_decaytime)s*ps)"\
+                        "& (PT >  %(B_Pt)s*MeV)"% locals()
+                             
+    _stdAllLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Bsst2mm,
+                      RequiredSelections = [ _stdAllLooseMuons])
+
+def makeBs2KKLTUB(name, TrackGhostProb, DOCA, VCHI2_VDOF, TrChi2, B_Pt, BPVIPChi2, minimum_decaytime, muon_PT) :
+    """
+    Lifetime unbiased Bs2KK selection object
+    starts from Phys/StdAllLooseKaons
+
+    Please contact Harry Cliff if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    #from Configurables import OfflineVertexFitter
+    Bs2KKLTUB = CombineParticles("Comine"+name)
+    Bs2KKLTUB.DecayDescriptor = "B_s0 -> K+ K-"
+    Bs2KKLTUB.ReFitPVs = True
+    Bs2KKLTUB.DaughtersCuts = { "K+" : "(PT > 500*MeV) & (TRCHI2DOF < %(TrChi2)s )"\
+                                    " & (0.5<PPINFO(LHCb.ProtoParticle.InAccMuon,-1))"\
+                                    " & (PT < %(muon_PT)s*GeV)"\
+                                    " & (P < 500*GeV)"\
+                                    " & (TRGHOSTPROB <  %(TrackGhostProb)s )"\
+                                    " & (PIDK > 5) "% locals() }
+    
+    Bs2KKLTUB.CombinationCut = "(ADAMASS('B_s0')<500*MeV)"\
+                               "& (AMAXDOCA('')<%(DOCA)s*mm)"% locals()
+
+    Bs2KKLTUB.MotherCut = "(VFASPF(VCHI2/VDOF)<%(VCHI2_VDOF)s) "\
+                              "& (ADMASS('B_s0') < 500*MeV )"\
+                              "& (BPVIPCHI2()< %(BPVIPChi2)s) "\
+                              "& (BPVLTIME()>%(minimum_decaytime)s*ps)"\
+                              "& (BPVLTIME()<13.248*ps)"\
+                              "& (PT > %(B_Pt)s*MeV)"% locals()
+                             
+    _stdAllLooseKaons = DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")
+
+    return Selection (name,
+                      Algorithm = Bs2KKLTUB,
+                      RequiredSelections = [ _stdAllLooseKaons])
+
+'''
+def makeDetachedJPsiLoose(name) :
+    """
+    loose detached JPsi selection to monitor selection,
+    systematics from cuts, etc.
+    
+    prescaled
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    from Configurables import OfflineVertexFitter
+    DetachedJPsiLoose = CombineParticles("Combine"+name)
+    DetachedJPsiLoose.DecayDescriptor = "J/psi(1S) -> mu+ mu-"
+    # Set the OfflineVertexFitter to keep the 4 tracks and not the J/Psi Kstar:
+    DetachedJPsiLoose.addTool( OfflineVertexFitter )
+    DetachedJPsiLoose.VertexFitters.update( { "" : "OfflineVertexFitter"} )
+    DetachedJPsiLoose.OfflineVertexFitter.useResonanceVertex = False
+    DetachedJPsiLoose.ReFitPVs = True
+    DetachedJPsiLoose.DaughtersCuts = { "mu+" : "(TRCHI2DOF < 10 ) "\
+                                    "& (MIPCHI2DV(PRIMARY)> 9.)"}
+                                 
+    DetachedJPsiLoose.CombinationCut = "(ADAMASS('J/psi(1S)')<120*MeV) "\
+                                   "& (AMAXDOCA('')<0.5*mm)"
+
+    DetachedJPsiLoose.MotherCut = "(VFASPF(VCHI2)<25) "\
+                                  "& (ADMASS('J/psi(1S)') < 120*MeV )"\
+                                  "& (BPVDIRA > 0) "\
+                                  "& (BPVVDCHI2>100)"
+
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = DetachedJPsiLoose,
+                      RequiredSelections = [ _stdLooseMuons ])
+
+
+def makePromptJPsi(name) :
+    """
+    Prompt variant of the detached JPsi selection for
+    B--> JPsi X calibration and normalization channels.
+    Selection is aligned to the Bs2MuMu selection.
+    heavily prescaled
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    from Configurables import OfflineVertexFitter
+    PromptJPsi = CombineParticles("Combine"+name)
+    PromptJPsi.DecayDescriptor = "J/psi(1S) -> mu+ mu-"
+    # Set the OfflineVertexFitter to keep the 4 tracks and not the J/Psi Kstar:
+    PromptJPsi.addTool( OfflineVertexFitter )
+    PromptJPsi.VertexFitters.update( { "" : "OfflineVertexFitter"} )
+    PromptJPsi.OfflineVertexFitter.useResonanceVertex = False
+    PromptJPsi.ReFitPVs = True
+    PromptJPsi.DaughtersCuts = { "mu+" : "(TRCHI2DOF < 4 ) "}
+    
+    PromptJPsi.CombinationCut = "(ADAMASS('J/psi(1S)')<100*MeV) "\
+                                "& (AMAXDOCA('')<0.3*mm)"
+    
+    PromptJPsi.MotherCut = "(VFASPF(VCHI2)<15) "\
+                           "& (ADMASS('J/psi(1S)') < 100*MeV )"
+    
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = PromptJPsi,
+                      RequiredSelections = [ _stdLooseMuons ])
+'''
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2gammagamma.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2gammagamma.py
new file mode 100644
index 000000000..e78d541a7
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2gammagamma.py
@@ -0,0 +1,266 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Bs -> gamma gamma stripping selection.
+
+Provides class StrippingBs2gammagammaConf with methods to return stripping line objects.
+
+Exports the following stripping lines as instance data members:
+- Bs2gammagamma_LLLine      : main line with one conversion (LL)
+- Bs2gammagamma_DDLine      : main line with one conversion (DD)
+- Bs2gammagamma_DoubleLine  : line with 2 conversions (DD or LL)
+- Bs2gammagamma_NoConvLine  : line with 0 conversions
+- Bs2gammagamma_NoConvWideLine  : wide line with 0 conversions
+'''
+
+__author__  = [ 'Sean Benson' ]
+__date__    = '2016/04/08'
+__version__    = '1.2'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop#, CombineParticles
+from Configurables import CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+from CommonParticles import StdAllLooseGammaConversion
+from CommonParticles import StdLooseAllPhotons
+
+from Configurables import ( DiElectronMaker, ProtoParticleCALOFilter,
+                            ParticleTransporter, BremAdder )
+
+default_config = {
+    'NAME'        : 'Bs2GammaGamma',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'StrippingBs2gammagammaConf',
+    'CONFIG'      : { 'gammaPT'             : 1000    # MeV/c
+                     ,'gammaP'              : 6000   # MeV/c
+                     ,'gammaCL'             : 0.3     # adimensional
+                     ,'gammaConvPT'         : 2000    # MeV/c
+                     ,'gammaConvMDD'        : 60     # MeV/cc
+                     ,'gammaConvIPCHI'      : 0     # adimensional
+                     ,'gammaNonePT'         : 1100    # MeV/c
+                     ,'gammaNoneP'          : 6000   # MeV/c
+                     ,'gammaNoneCL'         : 0.3    # adimensional
+                     ,'NoConvHCAL2ECAL'     : 0.1   # adimensional
+                     ,'LLProbNNe'           : 0.5    # adimensional
+                     ,'DDProbNNe'           : 0.3    # adimensional
+                     ,'ConvGhostLL'         : 0.3    # adimensional
+                     ,'ConvGhostDD'         : 0.3    # adimensional
+                     ,'BsPT'                : 2000    # MeV/c
+                     ,'BsVertexCHI2pDOF'    : 20      # adimensional
+                     ,'BsLowMass'           : 4300    # MeV/cc
+                     ,'BsLowMassDD'         : 4400    # MeV/cc
+                     ,'BsNonePT'            : 2000    # MeV/c
+                     ,'BsLowMassDouble'     : 4000    # MeV/cc
+                     ,'BsLowMassNone'       : 4800    # MeV/cc
+                     ,'BsLowMassNoneWide'   : 0       # MeV/cc
+                     ,'BsHighMass'          : 6500    # MeV/cc
+                     ,'BsHighMassDD'        : 6700    # MeV/cc
+                     ,'BsHighMassNone'      : 6300    # MeV/cc
+                     ,'BsHighMassNoneWide'  : 20000   # MeV/cc
+                     ,'BsHighMassDouble'    : 7000    # MeV/cc
+                     ,'scaleWide'           : 1.0
+                     ,'HLT2Double'          : "HLT_PASS_RE('Hlt2RadiativeB2GammaGammaDoubleDecision')"
+                     ,'HLT2LL'              : "HLT_PASS_RE('Hlt2RadiativeB2GammaGammaLLDecision')"
+                     ,'HLT2DD'              : "HLT_PASS_RE('Hlt2RadiativeB2GammaGammaDDDecision')"
+                     ,'HLT1None'            : "HLT_PASS_RE('Hlt1.*GammaGammaDecision')"
+                     ,'HLT2None'            : "HLT_PASS_RE('Hlt2.*GammaGammaDecision')"
+                    },
+    'STREAMS'     : ['BhadronCompleteEvent']
+    }
+
+
+class StrippingBs2gammagammaConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+        LineBuilder.__init__(self, name, config)
+
+        self.L0cut = "L0_CHANNEL_RE('Electron') | L0_CHANNEL_RE('Photon')"
+
+        fltrCode_LL = "(MAXTREE(ISBASIC,TRGHOSTPROB)<%(ConvGhostLL)s) & (PT>(%(gammaConvPT)s-200.0)*MeV) & (MIPCHI2DV(PRIMARY)>%(gammaConvIPCHI)s) & (MAXTREE(ISBASIC,PPINFO( LHCb.ProtoParticle.ProbNNe,-1 ))>%(LLProbNNe)s)" % config
+        self._trkFilter_LL = FilterDesktop( Code = fltrCode_LL )
+        fltrCode_DD = "(MAXTREE(ISBASIC,TRGHOSTPROB)<%(ConvGhostDD)s) & (M<%(gammaConvMDD)s*MeV) & (PT>%(gammaConvPT)s*MeV) & (MIPCHI2DV(PRIMARY)>(2.0/3.0)*%(gammaConvIPCHI)s) & (MAXTREE(ISBASIC,PPINFO( LHCb.ProtoParticle.ProbNNe,-1 ))>%(DDProbNNe)s)" % config
+        self._trkFilter_DD = FilterDesktop( Code = fltrCode_DD )
+        fltrCode_nonConv = "(PT>%(gammaPT)s*MeV) & (CL>%(gammaCL)s) & (MAXTREE(ISBASIC,PPINFO( LHCb.ProtoParticle.CaloNeutralHcal2Ecal,1000 ))<%(NoConvHCAL2ECAL)s)" % config
+        self._trkFilterNonConv = FilterDesktop( Code = fltrCode_nonConv )
+        #
+        self.convPhotons_LL = DataOnDemand(Location='Phys/StdAllLooseGammaLL/Particles')
+        self.convPhotons_DD = DataOnDemand(Location='Phys/StdAllLooseGammaDD/Particles')
+        stdPhotons     = DataOnDemand(Location='Phys/StdLooseAllPhotons/Particles')
+        #
+                # Clean up the converted photons to reduce the timing
+        self.convPhotons_LL_clean = Selection( 'PhotonConvFilterLL' + name, Algorithm = self._trkFilter_LL, RequiredSelections = [self.convPhotons_LL])
+        self.convPhotons_DD_clean = Selection( 'PhotonConvFilterDD' + name, Algorithm = self._trkFilter_DD, RequiredSelections = [self.convPhotons_DD])
+        # Clean up the non-converted photons to reduce the timing
+        self.stdPhotons_clean = Selection( 'PhotonFilter' + name, Algorithm = self._trkFilterNonConv, RequiredSelections = [stdPhotons])
+
+                # Make sure our photons and electrons are TOS at L0
+                # photon
+                #self.stdPhotons_L0 =  MergedSelection("mergedSelphotonL0", RequiredSelections = [
+                #    self.TOSFilter("SelgammaL0PhotonTOS", [self.stdPhotons_clean], "L0PhotonDecision"),
+                #    self.TOSFilter("SelgammaL0ElectronTOS", [self.stdPhotons_clean], "L0ElectronDecision")] )
+                # conv LL
+                #self.convPhotons_LL_clean_L0 = MergedSelection("mergedSelLongLongL0", RequiredSelections = [
+                #    self.TOSFilter("SelConvLLL0PhotonTOS", [self.convPhotons_LL_clean],"L0PhotonDecision"),
+                #    self.TOSFilter("SelConvLLL0ElectronTOS", [self.convPhotons_LL_clean],"L0ElectronDecision")] )
+                # conv DD
+                #self.convPhotons_DD_clean_L0 = MergedSelection("mergedSelDownDownL0", RequiredSelections = [
+                #    self.TOSFilter("SelConvDDL0PhotonTOS", [self.convPhotons_DD_clean],"L0PhotonDecision"),
+                #    self.TOSFilter("SelConvDDL0ElectronTOS", [self.convPhotons_DD_clean],"L0ElectronDecision")] )
+
+        self.Bs2gammagammaLLLine     = self._Bs2gammagammaLL_X_Line( name, config)
+        self.registerLine( self.Bs2gammagammaLLLine )
+        self.Bs2gammagammaDDLine     = self._Bs2gammagammaDD_X_Line( name, config)
+        self.registerLine( self.Bs2gammagammaDDLine )
+        self.Bs2gammagammaDoubleLine     = self._Bs2gammagammaDouble_X_Line( name, config)
+        self.registerLine( self.Bs2gammagammaDoubleLine )
+        self.Bs2gammagammaNoneLine     = self._Bs2gammagammaNone_X_Line( name, config, False)
+        self.Bs2gammagammaNoneWideLine     = self._Bs2gammagammaNone_X_Line( name+"Wide", config, True)
+        self.registerLine( self.Bs2gammagammaNoneLine )
+        self.registerLine( self.Bs2gammagammaNoneWideLine )
+
+
+    def _Bs2gammagammaLL_X_Line( self, name, config) :
+        BsGG_DC_LL = "(P>(%(gammaP)s-2000.0)*MeV)" % config
+        BsGG_CC_LL = "(in_range(%(BsLowMass)s*MeV, AM, %(BsHighMass)s*MeV))" % config
+        BsGG_MC_LL = "(PT>%(BsPT)s*MeV) & (INTREE( (ID=='gamma') & (ISBASIC) )) & (INTREE( HASTRACK & ISLONG ))" % config
+
+
+        _Bs2gammagamma_LL = CombineParticles(name = "CombineParticles_BsGG_LL",
+                DecayDescriptor = "B_s0 -> gamma gamma"
+                , DaughtersCuts  = {'gamma' : BsGG_DC_LL}
+                , CombinationCut = BsGG_CC_LL
+                , MotherCut      = BsGG_MC_LL)
+        _Bs2gammagamma_LL.ParticleCombiners.update({ '' : 'MomentumCombiner:PUBLIC'})
+
+        Bs2gammagamma_LL = Selection(
+                name+"_LL",
+                Algorithm = _Bs2gammagamma_LL,
+                RequiredSelections = [self.convPhotons_LL_clean,self.stdPhotons_clean])
+
+        return StrippingLine(name+"_LLLine"
+                     , prescale = 1
+                     , postscale = 1
+                     #, selection = self.TOSFilter(name+"_LLTOSLine",[Bs2gammagamma_LL],"L0(Photon|Electron)Decision")
+                     , selection = self.TOSFilter(name+"_LLTOSLine",[Bs2gammagamma_LL],"Hlt2RadiativeB2GammaGammaLLDecision") # HLT2 lines require L0 anyway
+                     , L0DU = self.L0cut
+                     , HLT2 = config["HLT2LL"]
+                     , MDSTFlag = False
+                     , EnableFlavourTagging = False
+                     )
+    def _Bs2gammagammaDD_X_Line( self, name, config) :
+        BsGG_DC_DD = "(P>%(gammaP)s*MeV)" % config
+        BsGG_CC_DD = "(in_range(%(BsLowMassDD)s*MeV, AM, %(BsHighMassDD)s*MeV))" % config
+        BsGG_MC_DD = "(PT>%(BsPT)s*MeV) & (INTREE( (ID=='gamma') & (ISBASIC) )) & (INTREE( HASTRACK & ISDOWN ))" % config
+
+
+        _Bs2gammagamma_DD = CombineParticles(name = "CombineParticles_BsGG_DD",
+                DecayDescriptor = "B_s0 -> gamma gamma"
+                , DaughtersCuts  = {'gamma' : BsGG_DC_DD}
+                , CombinationCut = BsGG_CC_DD
+                , MotherCut      = BsGG_MC_DD)
+        _Bs2gammagamma_DD.ParticleCombiners.update({ '' : 'MomentumCombiner:PUBLIC'})
+
+        Bs2gammagamma_DD = Selection(
+                name+"_DD",
+                Algorithm = _Bs2gammagamma_DD,
+                RequiredSelections = [self.convPhotons_DD_clean,self.stdPhotons_clean])
+
+        return StrippingLine(name+"_DDLine"
+                , prescale = 1
+                , postscale = 1
+                #, selection = self.TOSFilter(name+"_DDTOSLine",[Bs2gammagamma_DD],"L0(Photon|Electron)Decision")
+                , selection = self.TOSFilter(name+"_DDTOSLine",[Bs2gammagamma_DD],"Hlt2RadiativeB2GammaGammaDDDecision") # HLT2 lines require L0 anyway
+                , L0DU = self.L0cut
+                , HLT2 = config["HLT2DD"]
+                , MDSTFlag = False
+                , EnableFlavourTagging = False)
+    def _Bs2gammagammaDouble_X_Line( self, name, config) :
+        BsGG_DC_double = "(PT>0.5*%(gammaConvPT)s*MeV) & (P>0.5*%(gammaP)s*MeV)" % config
+        BsGG_CC_double = "(in_range(%(BsLowMassDouble)s*MeV, AM, %(BsHighMassDouble)s*MeV))" % config
+        BsGG_MC_double = "(VFASPF(VCHI2/VDOF)<%(BsVertexCHI2pDOF)s)" % config
+
+
+        _Bs2gammagamma_double = CombineParticles(name = "CombineParticles_BsGG_double",
+                DecayDescriptor = "B_s0 -> gamma gamma"
+                , DaughtersCuts  = {'gamma' : BsGG_DC_double}
+                , CombinationCut = BsGG_CC_double
+                , MotherCut      = BsGG_MC_double)
+
+        allConv = MergedSelection("MergedConversions",RequiredSelections=[self.convPhotons_LL,self.convPhotons_DD])
+        Bs2gammagamma_double = Selection(
+                name+"_double",
+                Algorithm = _Bs2gammagamma_double,
+                RequiredSelections = [allConv])
+
+        return StrippingLine(name+"_doubleLine"
+                , prescale = 1
+                , postscale = 1
+                #, selection = self.TOSFilter(name+"_doubleTOSLine",[Bs2gammagamma_double],"L0(Photon|Electron)Decision")
+                , selection = self.TOSFilter(name+"_doubleTOSLine",[Bs2gammagamma_double],"Hlt2RadiativeB2GammaGammaDoubleDecision") # HLT2 lines require L0 anyway
+                , L0DU = self.L0cut
+                , HLT2 = config["HLT2Double"]
+                , MDSTFlag = False
+                , EnableFlavourTagging = False)
+    def _Bs2gammagammaNone_X_Line( self, name, config, wide) :
+
+        BsGG_DC_none = "(PT>%(gammaNonePT)s*MeV) & (P>%(gammaNoneP)s*MeV) & (CL>%(gammaNoneCL)s)" % config
+        if wide == True:
+            BsGG_CC_none = "(in_range( ( %(BsLowMassNoneWide)s )*MeV, AM, ( %(BsHighMassNoneWide)s  )*MeV) )" % config
+            BsGG_MC_none = "(PT>%(BsNonePT)s*MeV) & (in_range( ( %(BsLowMassNoneWide)s )*MeV, M, ( %(BsHighMassNoneWide)s )*MeV) )" % config
+        else:
+            BsGG_CC_none = "(in_range(%(BsLowMassNone)s*MeV, AM, %(BsHighMassNone)s*MeV))" % config
+            BsGG_MC_none = "(PT>%(BsNonePT)s*MeV) & (in_range(%(BsLowMassNone)s*MeV, M, %(BsHighMassNone)s*MeV))" % config
+
+        if wide == True:
+            scaleWide = config['scaleWide']
+        else:
+            scaleWide = 1.0
+
+        _Bs2gammagamma_none = CombineParticles(name = "CombineParticles_BsGG_none",
+                DecayDescriptor = "B_s0 -> gamma gamma"
+                , DaughtersCuts  = {'gamma' : BsGG_DC_none}
+                , CombinationCut = BsGG_CC_none
+                , MotherCut      = BsGG_MC_none)
+        _Bs2gammagamma_none.ParticleCombiners.update({ '' : 'MomentumCombiner:PUBLIC'})
+
+        Bs2gammagamma_none = Selection(
+                name+"_none",
+                Algorithm = _Bs2gammagamma_none,
+                RequiredSelections = [self.stdPhotons_clean])
+
+        return StrippingLine(name+"_NoConvLine"
+                , prescale = scaleWide
+                , postscale = 1
+                , HLT1 = config["HLT1None"]
+                , HLT2 = config["HLT2None"]
+                #, selection = self.TOSFilter(name+"_NoConvTOSLine",[Bs2gammagamma_none],"L0(Photon|Electron)Decision")
+                , selection = self.TOSFilter(name+"_NoConvTOSLine",[Bs2gammagamma_none],"Hlt2RadiativeB2GammaGammaDecision") # HLT2 lines require L0 anyway
+                                , L0DU = self.L0cut
+                                , MDSTFlag = False
+                , EnableFlavourTagging = False)
+
+    def TOSFilter( self, name = None, sel = None, trigger = None ):
+        from Configurables import TisTosParticleTagger
+        _filter = TisTosParticleTagger(name+"_TriggerTos")
+        _filter.TisTosSpecs = { trigger+"%TOS" : 0 }
+        from PhysSelPython.Wrappers import Selection
+        _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = sel, Algorithm = _filter )
+        return _sel
+    def mergedTOS(self, name = None, sel = None, trigger1 = None, trigger2 = None):
+        return MergedSelection(name, RequiredSelections = [
+            self.TOSFilter(name+trigger1+"_subsel", [sel], trigger1),
+            self.TOSFilter(name+trigger2+"_subsel", [sel], trigger2)] )
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2st2KKMuX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2st2KKMuX.py
new file mode 100644
index 000000000..9009a30ce
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBs2st2KKMuX.py
@@ -0,0 +1,277 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+"""
+Stripping lines for B -> K mu X study.
+
+Stripping lines:
+ Bs2st2KKMuLine:      B_s2*0 -> ( B+ -> K+ mu+/- ) K-
+ Bs2st2KKMuWSLine:    B_s2*0 -> ( B+ -> K+ mu+/- ) K+
+ Bs2st2KKJpsiLine:    B_s2*0 -> ( B+ -> K+ (J/psi -> mu+ mu-) ) K-
+ Bs2st2KKJpsiWSLine:  B_s2*0 -> ( B+ -> K+ (J/psi -> mu+ mu-) ) K+
+"""
+
+__author__  = ['Jianchun Wang']
+__date__    = '03/22/2015'
+__version__ = '$Revision: 0.0 $'
+__all__ = ( 'Bs2st2KKMuXConf',
+            'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseMuons, StdLooseKaons, StdAllLooseKaons, StdMassConstrainedJpsi2MuMu
+
+default_config = {
+    'NAME'        : 'Bs2st2KKMuX',
+    'BUILDERTYPE' : 'Bs2st2KKMuXConf',
+    'WGs'         : ['RD'],
+    'STREAMS'     : ['Semileptonic'],
+    'CONFIG'      : {
+        'Bs2st2KKMuPrescale'    : 1.0,
+        'Bs2st2KKMuWSPrescale'  : 1.0,
+        'Bs2st2KKJpsiPrescale'  : 1.0,
+        'Bs2st2KKJpsiWSPrescale': 1.0,
+
+        'GEC_nLongTrk'     : 1000. ,# adimensional
+        'HLT_FILTER'       : ''    ,
+
+        # Kaon from B_s2*0 -> B K
+        'K1PT'             : 500.  ,# MeV
+        'K1PTLoose'        : 250.  ,# MeV
+        'K1MinIPChi2'      : 9.    ,# adimensional
+        'K1PIDK'           : 16.   ,# adimensional
+
+        # Kaon from B -> K mu X
+        'K2P'              : 3000. ,# MeV
+        'K2PT'             : 1000. ,# MeV
+        'K2MinIPChi2'      : 9.    ,# adimensional
+        'K2PIDK'           : 0.    ,# adimensional
+
+        # Muon from B -> K mu X
+        'MuP'              : 3000. ,# MeV
+        'MuPT'             : 1000. ,# MeV
+        'MuMinIPChi2'      : 9.    ,# adimensional
+        'MuPIDmu'          : 0.    ,# adimensional
+
+        # J/psi from B -> K J/psi
+        'JpsiMassWindow'   : 80.   ,# MeV
+
+        # B -> K mu X
+        'KMuVChi2Dof'      : 4.    ,# adimensional
+        'KMuFdChi2'        : 100.  ,# adimensional
+        'KMuMassMin'       : 1800. ,# MeV
+        'KMuMassMax'       : 5500. ,# MeV
+
+        # B -> K Jpsi
+        'KJpsiVChi2Dof'    : 4.    ,# adimensional
+        'KJpsiFdChi2'      : 25.   ,# adimensional
+        'KJpsiMassMin'     : 5050. ,# MeV
+        'KJpsiMassMax'     : 5500. ,# MeV
+
+        # B_s2*0 -> B K
+        'Bs2PT'            : 50.0   ,# MeV
+        'DMKKMu'           : 713.677,# MeV (493.677 + 220)
+        'DMKKJpsi'         : 1093.677,# MeV (493.677 + 600)
+        'DZBPV'            : 1.0    ,# mm
+
+        # Track isolation
+        'RelatedInfoTools' : [
+            {'Type' : 'RelInfoBs2MuMuTrackIsolations',
+             'Variables' : [
+                 'BSMUMUTRACKPLUSISO',
+                 'BSMUMUTRACKPLUSISOTWO',
+                 'ISOTWOBODYMASSISOPLUS',
+                 'ISOTWOBODYCHI2ISOPLUS',
+                 'ISOTWOBODYISO5PLUS',
+                 'BSMUMUTRACKID'
+                 ],
+             'DaughterLocations' : {
+                 "[B*_s20 -> (B+ -> ^K+ [mu-]cc) [K-]cc]CC": "K2ISO",
+                 "[B*_s20 -> (B+ -> K+ ^[mu-]cc) [K-]cc]CC": "MuISO",
+                 "[B*_s20 -> (B+ -> K+ [mu-]cc) ^[K-]cc]CC": "K1ISO"
+                 },
+             'tracktype'  : 3,
+             'angle'      : 0.27,
+             'fc'         : 0.60,
+             'doca_iso'   : 0.13,
+             'ips'        : 3.0,
+             'svdis'      : -0.15,
+             'svdis_h'    : 30.,
+             'pvdis'      : 0.5,
+             'pvdis_h'    : 40.,
+             'makeTrackCuts' : False,
+             'IsoTwoBody' : True
+             }
+            ]
+        }
+    }
+
+class Bs2st2KKMuXConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    __confdict__ = {}
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__ = config
+
+
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        #== selection of standard particles
+        self.Kaon1Cuts = "(TRCHI2DOF < 3) & (TRGHOSTPROB < 0.5) & (PT > %(K1PT)s *MeV) &"\
+                         "(MIPCHI2DV(PRIMARY) < %(K1MinIPChi2)s) & "\
+                         "(PIDK-PIDpi > %(K1PIDK)s) & (PIDK-PIDp > 0) & (PIDK-PIDmu > 0)" %config
+
+        self.Kaon1CutsLoose = "(TRCHI2DOF < 3) & (TRGHOSTPROB < 0.5) & (PT > %(K1PTLoose)s *MeV) &"\
+                              "(MIPCHI2DV(PRIMARY) < %(K1MinIPChi2)s) & "\
+                              "(PIDK-PIDpi > %(K1PIDK)s) & (PIDK-PIDp > 0) & (PIDK-PIDmu > 0)" %config
+
+        self.Kaon2Cuts = "(TRCHI2DOF < 3) & (TRGHOSTPROB < 0.5) & "\
+                         "(P > %(K2P)s *MeV) & (PT > %(K2PT)s *MeV) & "\
+                         "(MIPCHI2DV(PRIMARY) > %(K2MinIPChi2)s) & "\
+                         "(PIDK-PIDpi > %(K2PIDK)s) & (PIDK-PIDp > 0) & (PIDK-PIDmu > 0)" %config
+
+        self.MuonCuts  = "(TRCHI2DOF < 3) & (TRGHOSTPROB < 0.5) & "\
+                         "(P > %(MuP)s *MeV) & (PT > %(MuPT)s *MeV) & "\
+                         "(MIPCHI2DV(PRIMARY) > %(MuMinIPChi2)s) & "\
+                         "(PIDmu-PIDK > 0) & (PIDmu-PIDp > 0) & (PIDmu-PIDpi > %(MuPIDmu)s)" %config
+
+        self.JpsiCuts  = "(PFUNA(ADAMASS('J/psi(1S)')) < %(JpsiMassWindow)s * MeV)" %config
+
+        self.SelKaon1 = Selection("K1_for" + name,
+                                  Algorithm = FilterDesktop(Code=self.Kaon1Cuts),
+                                  RequiredSelections = [StdAllLooseKaons])
+
+        self.SelKaon1Loose = Selection("K1Loose_for" + name,
+                                       Algorithm = FilterDesktop(Code=self.Kaon1CutsLoose),
+                                       RequiredSelections = [StdAllLooseKaons])
+
+        self.SelKaon2 = Selection("K2_for" + name,
+                                  Algorithm = FilterDesktop(Code=self.Kaon2Cuts),
+                                  RequiredSelections = [StdLooseKaons])
+
+        self.SelMuon  = Selection("Mu_for" + name,
+                                  Algorithm = FilterDesktop(Code=self.MuonCuts),
+                                  RequiredSelections = [StdLooseMuons])
+
+        self.SelJpsi  = Selection("Jpsi_for" + name,
+                                  Algorithm = FilterDesktop(Code=self.JpsiCuts),
+                                  RequiredSelections = [StdMassConstrainedJpsi2MuMu])
+
+
+        # B -> K Mu X, both opposite & same signed K mu can be signals
+        self.Bu2KMu = CombineParticles(DecayDescriptors = ["[B+ -> K+ mu-]cc", "[B+ -> K+ mu+]cc"])
+        self.Bu2KMu.CombinationCut = "(AM > %(KMuMassMin)s*MeV) & (AM < %(KMuMassMax)s*MeV)" % config
+        self.Bu2KMu.MotherCut      = "(VFASPF(VCHI2/VDOF) < %(KMuVChi2Dof)s) & (BPVDIRA > 0.99) & "\
+                                     "(BPVVDCHI2 > %(KMuFdChi2)s)" % config
+        self.Bu2KMu.ReFitPVs       = True
+
+        self.SelBu2KMu = Selection("Bu2KMu_for" + name,
+                                   Algorithm          = self.Bu2KMu,
+                                   RequiredSelections = [self.SelKaon2, self.SelMuon])
+
+        # B -> K J/psi
+        self.Bu2KJpsi = CombineParticles(DecayDescriptors = ["[B+ -> J/psi(1S) K+]cc"])
+        self.Bu2KJpsi.CombinationCut = "(AM > %(KJpsiMassMin)s*MeV) & (AM < %(KJpsiMassMax)s*MeV)" % config
+        self.Bu2KJpsi.MotherCut      = "(VFASPF(VCHI2/VDOF) < %(KJpsiVChi2Dof)s) & (BPVDIRA > 0.99) & "\
+                                       "(BPVVDCHI2 > %(KJpsiFdChi2)s)" % config
+        self.Bu2KJpsi.ReFitPVs       = True
+
+        self.SelBu2KJpsi = Selection("Bu2KJpsi_for" + name,
+                                     Algorithm          = self.Bu2KJpsi,
+                                     RequiredSelections = [self.SelKaon2, self.SelJpsi])
+
+
+        # B_s2*0 -> (B -> K Mu X) K, signal KK have opposite signed charge.
+        self.Bs2KKMu = CombineParticles( DecayDescriptor = "[B*_s20 -> B+ K-]cc")
+        self.Bs2KKMu.CombinationCut = "(AM-AM1 < %(DMKKMu)s*MeV) & "\
+                                      "(abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),2))<%(DZBPV)s*mm)" % config
+        self.Bs2KKMu.MotherCut      = "(PT > %(Bs2PT)s*MeV)" % config
+        self.Bs2KKMu.ReFitPVs       = False
+
+        self.SelBs2KKMu = Selection("Bs2KKMu_for" + name,
+                                    Algorithm          = self.Bs2KKMu,
+                                    RequiredSelections = [self.SelBu2KMu, self.SelKaon1])
+
+        # B_s2*0 -> (B -> K Mu X) K, same signed KK for back ground
+        self.Bs2KKMuWS = CombineParticles( DecayDescriptor = "[B*_s20 -> B+ K+]cc")
+        self.Bs2KKMuWS.CombinationCut = self.Bs2KKMu.CombinationCut
+        self.Bs2KKMuWS.MotherCut      = self.Bs2KKMu.MotherCut
+        self.Bs2KKMuWS.ReFitPVs       = self.Bs2KKMu.ReFitPVs
+
+        self.SelBs2KKMuWS = Selection("Bs2KKMuWS_for" + name,
+                                      Algorithm          = self.Bs2KKMuWS,
+                                      RequiredSelections = [self.SelBu2KMu, self.SelKaon1])
+
+        # B_s2*0 -> (B -> K Jpsi) K, signal KK have opposite signed charge.
+        self.Bs2KKJpsi = CombineParticles( DecayDescriptor = "[B*_s20 -> B+ K-]cc")
+        self.Bs2KKJpsi.CombinationCut = "(AM-AM1 < %(DMKKJpsi)s*MeV) & "\
+                                        "(abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),2))<%(DZBPV)s*mm)" % config
+        self.Bs2KKJpsi.MotherCut      = "(PT > %(Bs2PT)s*MeV)" % config
+        self.Bs2KKJpsi.ReFitPVs       = False
+
+        self.SelBs2KKJpsi = Selection("Bs2KKJpsi_for" + name,
+                                      Algorithm          = self.Bs2KKJpsi,
+                                      RequiredSelections = [self.SelBu2KJpsi, self.SelKaon1Loose])
+
+        # B_s2*0 -> (B -> K Jpsi) K, same signed KK for back ground
+        self.Bs2KKJpsiWS = CombineParticles( DecayDescriptor = "[B*_s20 -> B+ K+]cc")
+        self.Bs2KKJpsiWS.CombinationCut = self.Bs2KKJpsi.CombinationCut
+        self.Bs2KKJpsiWS.MotherCut      = self.Bs2KKJpsi.MotherCut
+        self.Bs2KKJpsiWS.ReFitPVs       = self.Bs2KKJpsi.ReFitPVs
+
+        self.SelBs2KKJpsiWS = Selection("Bs2KKJpsiWS_for" + name,
+                                        Algorithm          = self.Bs2KKJpsiWS,
+                                        RequiredSelections = [self.SelBu2KJpsi, self.SelKaon1Loose])
+
+
+        # register stripping lines
+        self.Bs2st2KKMuLine = StrippingLine("Bs2st2KKMuLine",
+                                            prescale  = config['Bs2st2KKMuPrescale'],
+                                            FILTER    = self.GECs,
+                                            RelatedInfoTools = config['RelatedInfoTools'],
+                                            selection = self.SelBs2KKMu
+                                            #, MDSTFlag  = False
+                                            )
+
+        self.Bs2st2KKMuWSLine = StrippingLine("Bs2st2KKMuWSLine",
+                                              prescale  = config['Bs2st2KKMuWSPrescale'],
+                                              FILTER    = self.GECs,
+                                              RelatedInfoTools = self.Bs2st2KKMuLine.RelatedInfoTools,
+                                              selection = self.SelBs2KKMuWS
+                                              #, MDSTFlag  = False
+                                              )
+
+        self.Bs2st2KKJpsiLine = StrippingLine("Bs2st2KKJpsiLine",
+                                              prescale  = config['Bs2st2KKMuPrescale'],
+                                              FILTER    = self.GECs,
+                                              selection = self.SelBs2KKJpsi
+                                              #, MDSTFlag  = False
+                                              )
+
+        self.Bs2st2KKJpsiWSLine = StrippingLine("Bs2st2KKJpsiWSLine",
+                                                prescale  = config['Bs2st2KKJpsiWSPrescale'],
+                                                FILTER    = self.GECs,
+                                                selection = self.SelBs2KKJpsiWS
+                                                #, MDSTFlag  = False
+                                                )
+
+        # register stripping lines
+        self.registerLine(self.Bs2st2KKMuLine)
+        self.registerLine(self.Bs2st2KKMuWSLine)
+        self.registerLine(self.Bs2st2KKJpsiLine)
+        self.registerLine(self.Bs2st2KKJpsiWSLine)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2LLK.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2LLK.py
new file mode 100644
index 000000000..440c1bd14
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2LLK.py
@@ -0,0 +1,2172 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__  = 'Patrick Koppenburg, Alex Shires, Thomas Blake, Luca Pescatore, Simone Bifani, Yasmine Amhis, Paula Alvarez Cartelle, Harry Cliff, Rafael Silva Coutinho, Guido Andreassi, Mick Mulder, Maarten van Veghel, John Smeaton, Vitalii Lisovskyi, Biplab Dey'
+__date__    = '14/03/2021'
+__version__ = '$Revision: 6 $'
+
+__all__ = ( 'Bu2LLKConf', 'default_config' )
+
+"""
+  B --> ll K selections for (SS and OS leptons):
+  B --s> ee K  versus  B --> mumu K
+  B --s> ee pi  versus  B --> mumu pi
+  B --> ee K*  versus  B --> mumu K*
+  B --> ee K1  versus  B --> mumu K1
+  B --> ee K2  versus  B --> mumu K2
+  B --> ee phi  versus  B --> mumu phi
+  B --> ee Kpipipi  versus B --> mumu Kpipipi
+  Lb --> ee Lambda  versus  Lb --> mumu Lambda
+  Lb --> ee p K  versus  Lb --> mumu p K (SS, OS hadrons)
+  Lb --> ee p pi  versus  Lb --> mumu p pi (SS, OS hadrons)
+  B --> ee K pi  versus  B --> mumu K pi (SS, OS hadrons)
+  B --> ee pi pi  versus  B --> mumu pi pi (SS, OS hadrons)
+  Bs --> ee K K  versus  Bs --> mumu K K (SS, OS hadrons)
+  B --> gamma K* , B --> gamma phi  and  Lb --> gamma Lambda(*)  with converted photons
+  B --> emu K(+/0), B--> emu K*(0/+) and B--> emu Phi, Lb--> Lambda(*) emu, Lb--> Lambda(*) taumu with OS and SS leptons
+"""
+
+# Locations of neutral particles for related info (these only work with ConeIsolation?)
+daughter_neutral_locations = {
+    # Locations of pi0 in K*+ -> K+ pi0, for opposite- and same-sign leptons.
+    "[Beauty -> (K*(892)+ -> K+  ^pi0) (X0 ->  l+  l-)]CC" : "{0}pi0H2",
+    "[Beauty -> (K*(892)+ -> K+  ^pi0) (X0 ->  l+  l+)]CC" : "{0}pi0H2",
+    "[Beauty -> (K*(892)+ -> K+  ^pi0) (X0 ->  l-  l-)]CC" : "{0}pi0H2",
+}
+
+daughter_locations = {
+    # OPPOSITE SIGN
+    # 3-body
+    "[Beauty -> ^X+  (X0 ->  l+  l-)]CC" : "{0}H",
+    "[Beauty ->  X+  (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty ->  X+  (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 5-body (quasi 3-body)
+    "[Beauty -> (X+ -> ^X+  X+  X-) (X0 ->  l+  l-)]CC" : "{0}H1",
+    "[Beauty -> (X+ ->  X+ ^X+  X-) (X0 ->  l+  l-)]CC" : "{0}H2",
+    "[Beauty -> (X+ ->  X+  X+ ^X-) (X0 ->  l+  l-)]CC" : "{0}H3",
+    # 5-body
+    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X0 ->  l+  l-)]CC" : "{0}H1",
+    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X0 ->  l+  l-)]CC" : "{0}H2",
+    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X0 ->  l+  l-)]CC" : "{0}H3",
+    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X0 ->  l+  l-)]CC" : "{0}HH",
+    # 4-body with a strange particle in the final state
+    "[Beauty ->  (X0 -> ^Xs  X-)  (X0 ->  l+  l-)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  Xs ^X-)  (X0 ->  l+  l-)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  Xs  X-)  (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  Xs  X-) ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 4-body with two pions in the final state
+    "[Beauty ->  (X0 -> ^pi+  pi-)  (X0 ->  l+  l-)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X0 ->  l+  l-)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  pi+  pi-)  (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  pi+  pi-)  (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  pi+  pi-) ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 4-body with p and pi in the final state. Here the names are kept generic (H1,H2,L1,L2), for uniformity with strippingof other years. This is needed for Lb->Lll analyses.
+    "[Beauty ->  (X0 -> ^p+  pi-)  (X0 ->  l+  l-)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  p+ ^pi-)  (X0 ->  l+  l-)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  p+  pi-)  (X0 -> ^l+  l-)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  p+  pi-)  (X0 ->  l+ ^l-)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  p+  pi-)  (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  p+  pi-) ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 4-body decays involving K*(892)+, with pi0 in final state. (Note: had some trouble with generic X+ in the 3-body descriptors matching the K*(892)+, and getting junk output).
+    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l+  l-)]CC" : "{0}pi0H1",
+    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l+  l-)]CC" : "{0}pi0L1",
+    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l+  ^l-)]CC" : "{0}pi0L2",
+    # 6-body decays with at least one kaon on the final state (quasi 5-body)
+    "[Beauty -> ^K+ X- X+ X- (X0 ->  l+  l-)]CC" : "{0}H1",
+    "[Beauty -> K+ ^X- X+ X- (X0 ->  l+  l-)]CC" : "{0}H2",
+    "[Beauty -> K+ X- ^X+ X- (X0 ->  l+  l-)]CC" : "{0}H3",
+    "[Beauty -> K+ X- X+ ^X- (X0 ->  l+  l-)]CC" : "{0}H4",
+    "[Beauty -> K+ X- X+ X- (X0 ->  ^l+  l-)]CC" : "{0}L1",
+    "[Beauty -> K+ X- X+ X- (X0 ->  l+  ^l-)]CC" : "{0}L2",
+    # 7-body (quasi 4-body)
+    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- -> ^X-  X-  X+))]CC" : "{0}L21",
+    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- ->  X- ^X-  X+))]CC" : "{0}L22",
+    "[Beauty ->  (X0 ->  X+  X-)  (X0 ->  l+  (l- ->  X-  X- ^X+))]CC" : "{0}L23",
+
+    # SAME SIGN
+    # 3-body
+    "[Beauty -> ^X+  (X ->  l+  l+)]CC" : "{0}H",
+    "[Beauty ->  X+  (X -> ^l+  l+)]CC" : "{0}L1",
+    "[Beauty ->  X+  (X ->  l+ ^l+)]CC" : "{0}L2",
+    "[Beauty ->  X+ ^(X ->  l+  l+)]CC" : "{0}LL",
+    "[Beauty -> ^X+  (X ->  l-  l-)]CC" : "{0}H",
+    "[Beauty ->  X+  (X -> ^l-  l-)]CC" : "{0}L1",
+    "[Beauty ->  X+  (X ->  l- ^l-)]CC" : "{0}L2",
+    "[Beauty ->  X+ ^(X ->  l-  l-)]CC" : "{0}LL",
+    # 5-body (quasi 3-body)
+    "[Beauty -> (X+ -> ^X+  X+  X-) (X ->  l+  l+)]CC" : "{0}H1",
+    "[Beauty -> (X+ ->  X+ ^X+  X-) (X ->  l+  l+)]CC" : "{0}H2",
+    "[Beauty -> (X+ ->  X+  X+ ^X-) (X ->  l+  l+)]CC" : "{0}H3",
+    "[Beauty -> (X+ -> ^X+  X+  X-) (X ->  l-  l-)]CC" : "{0}H1",
+    "[Beauty -> (X+ ->  X+ ^X+  X-) (X ->  l-  l-)]CC" : "{0}H2",
+    "[Beauty -> (X+ ->  X+  X+ ^X-) (X ->  l-  l-)]CC" : "{0}H3",
+    # 5-body
+    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X ->  l+  l+)]CC" : "{0}H1",
+    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X ->  l+  l+)]CC" : "{0}H2",
+    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X ->  l+  l+)]CC" : "{0}H3",
+    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X -> ^l+  l+)]CC" : "{0}L1",
+    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X ->  l+ ^l+)]CC" : "{0}L2",
+    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty -> (X+ -> ^X+  (X0 ->  X+  X-)) (X ->  l-  l-)]CC" : "{0}H1",
+    "[Beauty -> (X+ ->  X+  (X0 -> ^X+  X-)) (X ->  l-  l-)]CC" : "{0}H2",
+    "[Beauty -> (X+ ->  X+  (X0 ->  X+ ^X-)) (X ->  l-  l-)]CC" : "{0}H3",
+    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X -> ^l-  l-)]CC" : "{0}L1",
+    "[Beauty -> (X+ ->  X+  (X0 ->  X+  X-)) (X ->  l- ^l-)]CC" : "{0}L2",
+    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l-  l-)]CC" : "{0}HH",
+    # 4-body with a strange particle in the final state
+    "[Beauty ->  (X0 -> ^Xs  X-)  (X ->  l+  l+)]CC" : "{0}H1",
+    "[Beauty ->  (X0 -> ^Xs  X-)  (X ->  l-  l-)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  Xs ^X-)  (X ->  l+  l+)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  Xs ^X-)  (X ->  l-  l-)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X -> ^l+  l+)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X -> ^l-  l-)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X ->  l+ ^l+)]CC" : "{0}L2",
+    "[Beauty ->  (X0 ->  Xs  X-)  (X ->  l- ^l-)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  Xs  X-)  (X ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty -> ^(X0 ->  Xs  X-)  (X ->  l-  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  Xs  X-) ^(X ->  l+  l+)]CC" : "{0}LL",
+    "[Beauty ->  (X0 ->  Xs  X-) ^(X ->  l-  l-)]CC" : "{0}LL",
+    # 4-body with two pions in the final state
+    "[Beauty ->  (X0 -> ^pi+  pi-)  (X ->  l+  l+)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  pi+ ^pi-)  (X ->  l+  l+)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  pi+  pi-)  (X -> ^l+  l+)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  pi+  pi-)  (X ->  l+ ^l+)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  pi+  pi-)  (X ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  pi+  pi-) ^(X ->  l+  l+)]CC" : "{0}LL",
+    # 4-body with p and pi in the final state. Here the names are kept generic (H1,H2,L1,L2), for uniformity with strippingof other years. This is needed for Lb->Lll analyses.
+    "[Beauty ->  (X0 -> ^p+  pi-)  (X ->  l+  l+)]CC" : "{0}H1",
+    "[Beauty ->  (X0 -> ^p+  pi-)  (X ->  l-  l-)]CC" : "{0}H1",
+    "[Beauty ->  (X0 ->  p+ ^pi-)  (X ->  l+  l+)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  p+ ^pi-)  (X ->  l-  l-)]CC" : "{0}H2",
+    "[Beauty ->  (X0 ->  p+  pi-)  (X -> ^l+  l+)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  p+  pi-)  (X -> ^l-  l-)]CC" : "{0}L1",
+    "[Beauty ->  (X0 ->  p+  pi-)  (X ->  l+ ^l+)]CC" : "{0}L2",
+    "[Beauty ->  (X0 ->  p+  pi-)  (X ->  l- ^l-)]CC" : "{0}L2",
+    "[Beauty -> ^(X0 ->  p+  pi-)  (X ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty -> ^(X0 ->  p+  pi-)  (X ->  l-  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  p+  pi-) ^(X ->  l+  l+)]CC" : "{0}LL",
+    "[Beauty ->  (X0 ->  p+  pi-) ^(X ->  l-  l-)]CC" : "{0}LL",
+    # 4-body decays involving K*(892)+, with pi0 in final state. (Note: had some trouble with generic X+ in the 3-body descriptors matching the K*(892)+, and getting junk output).
+    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l+  l+)]CC" : "{0}pi0H1",
+    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l+  l+)]CC" : "{0}pi0L1",
+    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l+  ^l+)]CC" : "{0}pi0L2",
+    "[Beauty -> (K*(892)+ -> ^K+  pi0) (X0 ->  l-  l-)]CC" : "{0}pi0H1",
+    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  ^l-  l-)]CC" : "{0}pi0L1",
+    "[Beauty -> (K*(892)+ -> K+  pi0) (X0 ->  l-  ^l-)]CC" : "{0}pi0L2",
+    # 7-body (quasi 4-body)
+    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ -> ^X+  X-  X+))]CC" : "{0}L21",
+    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ ->  X+ ^X-  X+))]CC" : "{0}L22",
+    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l+  (l+ ->  X+  X- ^X+))]CC" : "{0}L23",
+    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- -> ^X-  X-  X+))]CC" : "{0}L21",
+    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- ->  X- ^X-  X+))]CC" : "{0}L22",
+    "[Beauty ->  (X0 ->  X+  X-)  (X ->  l-  (l- ->  X-  X- ^X+))]CC" : "{0}L23"
+}
+
+daughter_vtx_locations = {
+    # OPPOSITE SIGN
+    # 3-body
+    "[Beauty ->  X+ ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 5-body (quasi 3-body)
+    "[Beauty -> ^(X+ -> X+  X+  X-) (X0 ->  l+  l-)]CC" : "{0}H",
+    # 5-body
+    "[Beauty -> ^(X+ -> X+  (X0 ->  X+  X-)) (X0 ->  l+  l-)]CC" : "{0}H",
+    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X0 ->  l+  l-)]CC" : "{0}HH",
+    # 4-body
+    "[Beauty -> ^(X0 ->  X+  X-)  (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  X+  X-) ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 4-body with neutral in final state
+    "[Beauty -> ^(X+ -> X+  X0) (X0 ->  l+  l-)]CC" : "{0}HH",
+    "[Beauty -> (X+ -> X+  X0) ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 6-body decays with at least one kaon on the final state (quasi 5-body)
+    "[Beauty -> K+ X- X+ X- ^(X0 ->  l+  l-)]CC" : "{0}LL",
+    # 7-body (quasi 4-body)
+    "[Beauty ->  X  (X0 ->  l+  ^(l- -> X-  X-  X+))]CC" : "{0}L",
+
+    # SAME SIGN
+    # 3-body
+    "[Beauty ->  X+ ^(X ->  l+  l+)]CC" : "{0}LL",
+    "[Beauty ->  X+ ^(X ->  l-  l-)]CC" : "{0}LL",
+    # 5-body (quasi 3-body)
+    "[Beauty -> ^(X+ -> X+  X+  X-) (X ->  l+  l+)]CC" : "{0}H",
+    "[Beauty -> ^(X+ -> X+  X+  X-) (X ->  l-  l-)]CC" : "{0}H",
+    # 5-body
+    "[Beauty -> ^(X+ -> X+  (X0 ->  X+  X-)) (X ->  l+  l+)]CC" : "{0}H",
+    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty -> ^(X+ -> X+  (X0 ->  X+  X-)) (X ->  l-  l-)]CC" : "{0}H",
+    "[Beauty -> (X+ ->  X+ ^(X0 ->  X+  X-)) (X ->  l-  l-)]CC" : "{0}HH",
+    # 4-body
+    "[Beauty -> ^(X0 ->  X+  X-)  (X ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  X+  X-) ^(X ->  l+  l+)]CC" : "{0}LL",
+    "[Beauty -> ^(X0 ->  X+  X-)  (X ->  l-  l-)]CC" : "{0}HH",
+    "[Beauty ->  (X0 ->  X+  X-) ^(X ->  l-  l-)]CC" : "{0}LL",
+    # 4-body with neutral in final state
+    "[Beauty -> ^(X+ -> X+  X0) (X ->  l+  l+)]CC" : "{0}HH",
+    "[Beauty -> (X+ -> X+  X0) ^(X ->  l+  l+)]CC" : "{0}LL",
+    "[Beauty -> ^(X+ -> X+  X0) (X ->  l-  l-)]CC" : "{0}HH",
+    "[Beauty -> (X+ -> X+  X0) ^(X ->  l-  l-)]CC" : "{0}LL",
+    # 7-body (quasi 4-body)
+    "[Beauty ->  X  (X ->  l+  ^(l+ -> X+  X-  X+))]CC" : "{0}L",
+    "[Beauty ->  X  (X ->  l-  ^(l- -> X-  X-  X+))]CC" : "{0}L",
+}
+
+
+default_config = {
+    'NAME'                       : 'Bu2LLK',
+    'BUILDERTYPE'                : 'Bu2LLKConf',
+    'CONFIG'                     :
+        {
+        'BFlightCHI2'            : 100
+        , 'BDIRA'                : 0.9995
+        , 'BIPCHI2'              : 25
+        , 'BVertexCHI2'          : 9
+        , 'DiLeptonPT'           : 0
+        , 'DiLeptonFDCHI2'       : 16
+        , 'DiLeptonIPCHI2'       : 0
+        , 'LeptonIPCHI2'         : 9
+        , 'LeptonPT'             : 350
+        , 'LeptonPTTight'        : 500
+        , 'TauPT'                : 0
+        , 'TauVCHI2DOF'          : 150
+        , 'KaonIPCHI2'           : 9
+        , 'KaonPT'               : 400
+        , 'KaonPTLoose'          : 250
+        , 'PionPTRho'            : 350
+        , 'ProtonP'              : 2000
+        , 'KstarPVertexCHI2'     : 25
+        , 'KstarPMassWindow'     : 300
+        , 'KstarPADOCACHI2'      : 30
+        , 'Pi0PT'                : 600
+        , 'ProbNNCut'            : 0.05
+        , 'ProbNNCutTight'       : 0.1
+        , 'DiHadronMass'         : 2600
+        , 'DiHadronVtxCHI2'      : 25
+        , 'DiHadronADOCACHI2'    : 30
+        , 'UpperMass'            : 5500
+        , 'BMassWindow'          : 1500
+        , 'UpperBMass'           : 5280
+        , 'UpperBsMass'          : 5367
+        , 'UpperLbMass'          : 5620
+        , 'BMassWindowTau'       : 5000
+        , 'PIDe'                 : 0
+        , 'RICHPIDe_Up'          : -5
+        , 'Trk_Chi2'             : 3
+        , 'Trk_GhostProb'        : 0.35 #0.4
+        , 'K1_MassWindow_Lo'     : 0
+        , 'K1_MassWindow_Hi'     : 4200
+        , 'K1_VtxChi2'           : 12
+        , 'K1_SumPTHad'          : 1200 #800
+        , 'K1_SumIPChi2Had'      : 48.0
+        , 'B2K3pill_LeptonIPCHI2': 1
+        , 'B2K3pill_LeptonIPCHI2_Max' : 7
+        , 'B2K3pill_LeptonPT'    : 150
+        , 'B2K3pill_DiLeptonPT'  : 250
+        , 'B2K3pill_DiLeptonVtxChi2': 10
+        , 'B2K3pill_DiLeptonFDChi2' : 25
+        , 'B2K3pill_HadIPCHI2'   : 4.5
+        , 'B2K3pill_PionPT'      : 150
+        , 'B2K3pill_KaonPT'      : 250
+        , 'B2K3pill_achi2doca'   : 30
+        , 'B2K3pill_BVtxChi2'    : 40
+        , 'B2K3pill_BIPDChi2'    : 15 #harder than standard cut
+        , 'B2K3pill_BFDChi2'     : 150 #harder than standard cut
+        , 'B2K3pill_BFDIRA'      : 0.9999 #harder than standard cut
+        , 'B2K3pill_MassWindow_Hi' : 6500
+        , 'Bu2eeLinePrescale'    : 1
+        , 'Bu2eeLine2Prescale'   : 1
+        , 'Bu2eeSSLine2Prescale' : 1
+        , 'Bu2eeLine3Prescale'   : 1
+        , 'Bu2eeLine4Prescale'   : 1
+        , 'Bu2mmLinePrescale'    : 1
+        , 'Bu2mmSSLinePrescale'  : 1
+        , 'Bu2meLinePrescale'    : 1
+        , 'Bu2meSSLinePrescale'  : 1
+        , 'Bu2mtLinePrescale'    : 1
+        , 'Bu2mtSSLinePrescale'  : 1
+        , 'B2KpipipieeLinePrescale' : 1
+        , 'B2KpipipimmLinePrescale' : 1
+        , 'RelatedInfoTools'     : [
+            {'Type'              : 'RelInfoVertexIsolation',
+             'Location'          : 'VertexIsoInfo',
+             'IgnoreUnmatchedDescriptors': True,
+             'DaughterLocations' : {key: val.format('VertexIsoInfo') for key, val in daughter_vtx_locations.items()}},
+            {'Type'              : 'RelInfoVertexIsolationBDT',
+             'Location'          : 'VertexIsoBDTInfo',
+             'IgnoreUnmatchedDescriptors': True,
+             'DaughterLocations' : {key: val.format('VertexIsoBDTInfo') for key, val in daughter_vtx_locations.items()}},
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 0.5,
+             'IgnoreUnmatchedDescriptors': True,
+             'Location' : 'TrackIsoInfo05',
+             'DaughterLocations' : {key: val.format('TrackIsoInfo') for key, val in daughter_locations.items() + daughter_neutral_locations.items()}},
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'          : 0.5,
+             'IgnoreUnmatchedDescriptors': True,
+             'Location' : 'ConeIsoInfo05',
+             'DaughterLocations' : {key: val.format('ConeIsoInfo') for key, val in daughter_locations.items() + daughter_neutral_locations.items()}},
+            {'Type'              : 'RelInfoTrackIsolationBDT',
+             'IgnoreUnmatchedDescriptors': True,
+             # Use the BDT with 9 input variables
+             # This requires that the "Variables" value is set to 2
+             'Variables' : 2,
+             'WeightsFile'  :  'BsMuMu_TrackIsolationBDT9vars_v1r4.xml',
+             'Location' : 'TrackIsoBDTInfo',
+             'DaughterLocations' : {key: val.format('TrackIsoBDTInfo') for key, val in daughter_locations.items()}},
+
+            {'Type'              : 'RelInfoBs2MuMuTrackIsolations',
+             'IgnoreUnmatchedDescriptors': True,
+             'Location' : 'TrackIsoBs2MMInfo',
+             'DaughterLocations' : {key: val.format('TrackIsoBs2MMInfo') for key, val in daughter_locations.items()}},
+
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 1.0,
+             'Location'          : 'TrackIsoInfo10'
+            },
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 1.5,
+             'Location'          : 'TrackIsoInfo15'
+            },
+            {'Type'              : 'RelInfoConeVariables',
+             'ConeAngle'         : 2.0,
+             'Location'          : 'TrackIsoInfo20'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 1.0,
+             'Location'          : 'ConeIsoInfo10'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 1.5,
+             'Location'          : 'ConeIsoInfo15'
+            },
+            {'Type'              : 'RelInfoConeIsolation',
+             'ConeSize'         : 2.0,
+             'Location'          : 'ConeIsoInfo20'
+            },
+        ],
+        },
+    'WGs'     : [ 'RD' ],
+    'STREAMS' : [ 'Leptonic' ]
+    }
+
+# This tool applies the BDT track isolation from the 2017 B->mumu analysis to the Jpsi daughters
+# It is separated from the other tools, since it cannot be applied to lines containing taus
+RelInfoTrackIsolationBDT2 = [
+    {'Type' : 'RelInfoTrackIsolationBDT2',
+     'Location' : 'TrackIsolationBDT2',
+     'Particles' : [1,2]
+    }
+]
+
+
+# For Lb->{pK,p pi Ks} ll. All six 2-body combinations 
+RelInfoTrackIsolationBDT2_Lb2pKll = [
+    {'Type' : 'RelInfoTrackIsolationBDT2',
+     'Location' : 'TrackIsolationBDT2_12',
+     'Particles' : [1,2]
+    },
+    {'Type' : 'RelInfoTrackIsolationBDT2',
+     'Location' : 'TrackIsolationBDT2_14',
+     'Particles' : [1,4]
+    },
+    #{'Type' : 'RelInfoTrackIsolationBDT2',
+    # 'Location' : 'TrackIsolationBDT2_15',
+    # 'Particles' : [1,5]
+    #},
+    #{'Type' : 'RelInfoTrackIsolationBDT2',
+    # 'Location' : 'TrackIsolationBDT2_24',
+    # 'Particles' : [2,4]
+    #},
+    {'Type' : 'RelInfoTrackIsolationBDT2',
+     'Location' : 'TrackIsolationBDT2_25',
+     'Particles' : [2,5]
+    },
+    {'Type' : 'RelInfoTrackIsolationBDT2',
+     'Location' : 'TrackIsolationBDT2_45',
+     'Particles' : [4,5]
+    }
+]
+
+RelInfoTrackIsolationBDT2_Lb2Ksppill = [
+    {'Type' : 'RelInfoTrackIsolationBDT2',
+     'Location' : 'TrackIsolationBDT2_12',
+     'Particles' : [1,2]
+    },
+    {'Type' : 'RelInfoTrackIsolationBDT2',
+     'Location' : 'TrackIsolationBDT2_15',
+     'Particles' : [1,5]
+    },
+    #{'Type' : 'RelInfoTrackIsolationBDT2',
+    # 'Location' : 'TrackIsolationBDT2_16',
+    # 'Particles' : [1,6]
+    #},
+    #{'Type' : 'RelInfoTrackIsolationBDT2',
+    # 'Location' : 'TrackIsolationBDT2_25',
+    # 'Particles' : [2,5]
+    #},
+    {'Type' : 'RelInfoTrackIsolationBDT2',
+     'Location' : 'TrackIsolationBDT2_26',
+     'Particles' : [2,6]
+    },
+    {'Type' : 'RelInfoTrackIsolationBDT2',
+     'Location' : 'TrackIsolationBDT2_56',
+     'Particles' : [5,6]
+    }
+]
+
+##=========
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays, DaVinci__N5BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class Bu2LLKConf(LineBuilder) :
+    """
+    Builder for R_X measurements
+    """
+
+    # now just define keys. Default values are fixed later
+    __configuration_keys__ = (
+        'BFlightCHI2'
+        , 'BDIRA'
+        , 'BIPCHI2'
+        , 'BVertexCHI2'
+        , 'DiLeptonPT'
+        , 'DiLeptonFDCHI2'
+        , 'DiLeptonIPCHI2'
+        , 'LeptonIPCHI2'
+        , 'LeptonPT'
+        , 'LeptonPTTight'
+        , 'TauPT'
+        , 'TauVCHI2DOF'
+        , 'KaonIPCHI2'
+        , 'KaonPT'
+        , 'KaonPTLoose'
+        , 'PionPTRho'
+        , 'ProtonP'
+        , 'KstarPVertexCHI2'
+        , 'KstarPMassWindow'
+        , 'KstarPADOCACHI2'
+        , 'Pi0PT'
+        , 'ProbNNCut'
+        , 'ProbNNCutTight'
+        , 'DiHadronMass'
+        , 'DiHadronVtxCHI2'
+        , 'DiHadronADOCACHI2'
+        , 'UpperMass'
+        , 'BMassWindow'
+        , 'UpperBMass'
+        , 'UpperBsMass'
+        , 'UpperLbMass'
+        , 'BMassWindowTau'
+        , 'PIDe'
+        , 'RICHPIDe_Up'
+        , 'Trk_Chi2'
+        , 'Trk_GhostProb'
+        , 'K1_MassWindow_Lo'
+        , 'K1_MassWindow_Hi'
+        , 'K1_VtxChi2'
+        , 'K1_SumPTHad'
+        , 'K1_SumIPChi2Had'
+        , 'B2K3pill_LeptonIPCHI2'
+        , 'B2K3pill_LeptonIPCHI2_Max'
+        , 'B2K3pill_LeptonPT'
+        , 'B2K3pill_DiLeptonPT'
+        , 'B2K3pill_DiLeptonVtxChi2'
+        , 'B2K3pill_DiLeptonFDChi2'
+        , 'B2K3pill_HadIPCHI2'
+        , 'B2K3pill_PionPT'
+        , 'B2K3pill_KaonPT'
+        , 'B2K3pill_achi2doca'
+        , 'B2K3pill_BVtxChi2'
+        , 'B2K3pill_BIPDChi2'
+        , 'B2K3pill_BFDChi2'
+        , 'B2K3pill_BFDIRA'
+        , 'B2K3pill_MassWindow_Hi'
+        , 'Bu2eeLinePrescale'
+        , 'Bu2eeLine2Prescale'
+        , 'Bu2eeSSLine2Prescale'
+        , 'Bu2eeLine3Prescale'
+        , 'Bu2eeLine4Prescale'
+        , 'Bu2mmLinePrescale'
+        , 'Bu2mmSSLinePrescale'
+        , 'Bu2meLinePrescale'
+        , 'Bu2meSSLinePrescale'
+        , 'Bu2mtLinePrescale'
+        , 'Bu2mtSSLinePrescale'
+        , 'B2KpipipieeLinePrescale'
+        , 'B2KpipipimmLinePrescale'
+        , 'RelatedInfoTools'
+      )
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        self._name = name
+
+        mmXLine_name   = name + "_mm"
+        mmXSSLine_name = name + "_mmSS"
+        eeXLine_name   = name + "_ee"
+        eeXSSLine_name = name + "_eeSS"
+        meXLine_name   = name + "_me"
+        meXSSLine_name = name + "_meSS"
+        mtXLine_name   = name + "_mt"
+        mtXSSLine_name = name + "_mtSS"
+        busy_name = "_extra"
+
+        from StandardParticles import StdLoosePions as Pions
+        from StandardParticles import StdLooseKaons as Kaons
+        from StandardParticles import StdLooseProtons as Protons
+        from StandardParticles import StdAllLoosePions as AllPions
+        from StandardParticles import StdAllLooseKaons as AllKaons
+        from StandardParticles import StdAllLooseProtons as AllProtons
+        from StandardParticles import StdLooseKstar2Kpi as Kstars
+        from StandardParticles import StdLoosePhi2KK as Phis
+        from StandardParticles import StdLooseLambdastar2pK as Lambdastars
+
+
+        # V0s
+        from StandardParticles import StdVeryLooseKsLL as KshortsLL
+        from StandardParticles import StdLooseKsDD as KshortsDD
+        from StandardParticles import StdVeryLooseLambdaLL as LambdasLL
+        from StandardParticles import StdLooseLambdaDD as LambdasDD
+        from StandardParticles import StdKs2PiPiLL as BrunelKshortsLL
+        from StandardParticles import StdKs2PiPiDD as BrunelKshortsDD
+        from StandardParticles import StdLambda2PPiLL as BrunelLambdasLL
+        from StandardParticles import StdLambda2PPiDD as BrunelLambdasDD
+
+        # NEUTRALS
+        from StandardParticles import StdLooseResolvedPi0 as Pi0sRes
+        from StandardParticles import StdLooseMergedPi0 as Pi0sMrg
+
+
+        # 1 : Make K, Ks, K*, K1, Phi and Lambdas
+
+        ### opposite sign hadrons
+        SelKaons  = self._filterHadron( name   = "KaonsFor" + self._name,
+                                        sel    = Kaons,
+                                        params = config )
+
+        SelPions  = self._filterHadron( name   = "PionsFor" + self._name,
+                                        sel    = Pions,
+                                        params = config )
+
+        SelKshortsLL = self._filterHadron( name   = "KshortsLLFor" + self._name,
+                                           sel    = [KshortsLL,BrunelKshortsLL],
+                                           params = config )
+
+        SelKshortsDD = self._filterHadron( name   = "KshortsDDFor" + self._name,
+                                           sel    =  [KshortsDD,BrunelKshortsDD],
+                                           params = config )
+
+        SelKstars = self._filterHadron( name   = "KstarsFor" + self._name,
+                                        sel    =  Kstars,
+                                        params = config )
+
+        SelKPis = self._makeKPi( name   = "KPisFor" + self._name,
+                                        kaons = Kaons,
+                                        pions  = Pions,
+                                        params = config )
+
+        SelPiPis = self._makePiPi( name   = "PiPisFor" + self._name,
+                                        pions  = Pions,
+                                        params = config )
+
+        SelKKs = self._makeKK( name   = "KKsFor" + self._name,
+                                        kaons = Kaons,
+                                        params = config )
+
+        SelpKs = self._makepK( name   = "pKsFor" + self._name,
+                                        protons = AllProtons,
+                                        kaons  = AllKaons,
+                                        params = config )
+
+        SelpPis = self._makepPi( name  = "pPisFor" + self._name,
+                                        protons = Protons,
+                                        pions  = Pions,
+                                        params = config )
+
+        Selpps = self._makepp( name  = "ppsFor" + self._name,
+                                        protons = Protons,
+                                        params = config )
+
+        SelKstarsPlusLL = self._makeKstarPlus( name    = "KstarsPlusLLFor" + self._name,
+                                               kshorts = [KshortsLL,BrunelKshortsLL],
+                                               pions   = Pions,
+                                               params  = config )
+
+        SelKstarsPlusDD = self._makeKstarPlus( name    = "KstarsPlusDDFor" + self._name,
+                                               kshorts = [KshortsDD,BrunelKshortsDD],
+                                               pions   = Pions,
+                                               params  = config )
+
+        SelKstarsPlusPi0Res = self._makeKstarPlusPi0( name = "KstarsPlusPi0ResFor" + self._name,
+                                                      kaons = Kaons,
+                                                      pions = Pi0sRes,
+                                                      params = config )
+
+        SelKstarsPlusPi0Mrg = self._makeKstarPlusPi0( name = "KstarsPlusPi0MrgFor" + self._name,
+                                                      kaons = Kaons,
+                                                      pions = Pi0sMrg,
+                                                      params = config )
+
+
+        SelK1s = self._makeK1( name   = "K1For" + self._name,
+                               kaons  = Kaons,
+                               pions  = Pions,
+                               params = config )
+
+        SelK2s = self._makeK2( name   = "K2For" + self._name,
+                               kaons  = Kaons,
+                               params = config )
+
+        SelPhis = self._filterHadron( name   = "PhisFor" + self._name,
+                                      sel    =  Phis,
+                                      params = config )
+
+        SelLambdasLL = self._filterHadron( name   = "LambdasLLFor" + self._name,
+                                           sel    =  [LambdasLL,BrunelLambdasLL],
+                                           params = config )
+
+        SelLambdasDD = self._filterHadron( name   = "LambdasDDFor" + self._name,
+                                           sel    =  [LambdasDD,BrunelLambdasDD],
+                                           params = config )
+
+        SelLambdastars = self._filterHadron( name   = "LambdastarsFor" + self._name,
+                                             sel    =  Lambdastars,
+                                             params = config )
+        ### same sign hadrons:
+
+        SelPiPisSS = self._makePiPiSS( name   = "PiPisSSFor" + self._name,
+                                        pions  = Pions,
+                                        params = config )
+
+        SelKPisSS = self._makeKPiSS( name   = "KPisSSFor" + self._name,
+                                        kaons = Kaons,
+                                        pions  = Pions,
+                                        params = config )
+
+        SelKKsSS = self._makeKKSS( name   = "KKsSSFor" + self._name,
+                                        kaons = Kaons,
+                                        params = config )
+
+        SelpKsSS = self._makepKSS( name   = "pKsSSFor" + self._name,
+                                        protons = Protons,
+                                        kaons  = Kaons,
+                                        params = config )
+
+        SelpPisSS = self._makepPiSS( name  = "pPisSSFor" + self._name,
+                                        protons = Protons,
+                                        pions  = Pions,
+                                        params = config )
+
+        SelppsSS = self._makeppSS( name  = "ppsSSFor" + self._name,
+                                        protons = Protons,
+                                        params = config )
+
+        # 2 : Make Dileptons
+
+        from StandardParticles import StdDiElectronFromTracks as DiElectronsFromTracks
+        from StandardParticles import StdLooseDetachedDiElectronLU as DiElectronsLU
+        from StandardParticles import StdLooseDiElectron as DiElectrons
+        from StandardParticles import StdLooseDiMuon as DiMuons
+
+        ElecID = "(PIDe > %(PIDe)s)" % config
+        MuonID = "(HASMUON)&(ISMUON)"
+        TauID  = "(PT > %(TauPT)s)" % config
+
+        MuMu_SS = self._makeMuMuSS( "MuMuSSFor" + self._name, params = config, muonid = MuonID )
+        EE_SS = self._makeEESS( "EESSFor" + self._name, params = config, electronid = ElecID )
+
+        MuE    = self._makeMuE( "MuEFor"   + self._name, params = config, electronid = ElecID, muonid = MuonID )
+        MuE_SS = self._makeMuE( "MuESSFor" + self._name, params = config, electronid = ElecID, muonid = MuonID, samesign = True )
+
+        MuTau    = self._makeMuTau( "MuTauFor"   + self._name, params = config, tauid = TauID, muonid = MuonID )
+        MuTau_SS = self._makeMuTau( "MuTauSSFor" + self._name, params = config, tauid = TauID, muonid = MuonID, samesign = True )
+
+
+        DiElectronID = "(2 == NINTREE((ABSID==11)&(PIDe > %(PIDe)s)))" % config
+
+        # DIFFERENT CUTS FOR THE LU LINE:
+        # THEY ALWAYS HAVE PID ON THE LONG TRACK (DLLe > PIDe )
+        # ONLY LU COMBINATIONS, NO UU COMBINATIONS
+        #DiElectronIDLU = "((2 == NINTREE((((TRTYPE==3) & (PIDe > %(PIDe)s)) | (TRTYPE==4)))) & (NINTREE((TRTYPE==4)) == 1))" % config # 0.47 %
+
+        # ONLY LU COMBINATIONS AND RICHPIDe>(RICHPIDe from config) OR HASBREMADDED FOR THE UPSTREAM TRACKS
+        DiElectronIDLU = "((2 == NINTREE(((TRTYPE==3) & (PIDe > %(PIDe)s)) | ((TRTYPE==4) & ((INFO(16,-1000)==1) | (PPHASRICH & (PPINFO(100,-10000,-10000) > %(RICHPIDe_Up)s)))) )) & (NINTREE((TRTYPE==4)) == 1))" % config # 0.28%
+
+        # LOOSEST CUT, INCLUDING UU AND NO PID ON UPSTREAM
+        #DiElectronIDLU = "((2 == NINTREE((((TRTYPE==3) & (PIDe > %(PIDe)s)) | (TRTYPE==4)))) & (NINTREE((TRTYPE==4)) > 0))" % config # 0.96 %
+
+        # PID ON EITHER LONG OR UPSTREAM TRACK (DLLe > PIDe)
+        #DiElectronIDLU = "((NINTREE(TRTYPE==4)>0) & (NINTREE(PIDe > %(PIDe)s)>0))" % config # 0.77%
+
+
+        DiMuonID     = "(2 == NINTREE((ABSID==13)&(HASMUON)&(ISMUON)))"
+
+
+        SelDiElectron = self._filterDiLepton( "SelDiElectronFor" + self._name,
+                                              dilepton = DiElectrons,
+                                              params   = config,
+                                              idcut    = DiElectronID )
+
+        SelDiElectronTight = self._filterDiLeptonTight( "SelDiElectronTightFor" + self._name,
+                                                                                           dilepton = DiElectrons,
+                                                                                           params   = config,
+                                                                                           idcut    = DiElectronID )
+
+        SelDiElectronFromTracks = self._filterDiLepton( "SelDiElectronFromTracksFor" + self._name,
+                                                        dilepton = DiElectronsFromTracks,
+                                                        params   = config,
+                                                        idcut    = DiElectronID )
+
+        SelDiElectronFromTracksTight = self._filterDiLeptonTight( "SelDiElectronFromTracksTightFor" + self._name,
+                                                        dilepton = DiElectronsFromTracks,
+                                                        params   = config,
+                                                        idcut    = DiElectronID )
+
+        SelDiElectronFromTracks_SS = self._filterDiLeptonTight( "SelDiElectronFromTracksSSFor" + self._name,
+                                                        dilepton = EE_SS,
+                                                        params   = config,
+                                                        idcut    = DiElectronID )
+
+        SelDiElectronLU = self._filterDiLepton( "SelDiElectronLU" + self._name,
+                                                        dilepton = DiElectronsLU,
+                                                        params   = config,
+                                                        idcut    = DiElectronIDLU )
+
+
+
+        SelDiMuon = self._filterDiLepton( "SelDiMuonsFor" + self._name,
+                                          dilepton = DiMuons,
+                                          params   = config,
+                                          idcut    = DiMuonID )
+
+        SelDiMuonTight = self._filterDiLeptonTight( "SelDiMuonsTightFor" + self._name,
+                                          dilepton = DiMuons,
+                                          params   = config,
+                                          idcut    = DiMuonID )
+
+
+        SelDiMuon_SS = self._filterDiLeptonTight( "SelMuMuSSFor" + self._name,
+                                          dilepton = MuMu_SS,
+                                          params   = config,
+                                          idcut    = DiMuonID )
+
+        SelMuE = self._filterDiLepton( "SelMuEFor" + self._name,
+                                       dilepton = MuE,
+                                       params   = config,
+                                       idcut    = None )
+
+        SelMuE_SS = self._filterDiLepton( "SelMuESSFor" + self._name,
+                                          dilepton = MuE_SS,
+                                          params   = config,
+                                          idcut    = None )
+
+        SelMuTau = self._filterMuTau( "SelMuTauFor" + self._name,
+                                      dilepton = MuTau,
+                                      params   = config,
+                                      idcut    = None )
+
+        SelMuTau_SS = self._filterMuTau( "SelMuTauSSFor" + self._name,
+                                         dilepton = MuTau_SS,
+                                         params   = config,
+                                         idcut    = None )
+
+
+        # 3 : Make Photons
+
+        from StandardParticles import StdAllLooseGammaLL as PhotonConversion
+
+        SelPhoton = self._filterPhotons( "SelPhotonFor" + self._name,
+                                         photons = PhotonConversion )
+
+
+        # 4 : Combine Particles
+
+        SelB2eeX = self._makeB2LLX_normal(eeXLine_name,
+                                   dilepton = SelDiElectron,
+                                   hadrons  = [ SelPions, SelKaons, SelKstars, SelPhis, SelKshortsLL, SelKshortsDD, SelLambdasLL, SelLambdasDD, SelKstarsPlusLL, SelKstarsPlusDD, SelKstarsPlusPi0Res, SelKstarsPlusPi0Mrg, SelpKs ],#, SelLambdastars,SelK1s, SelK2s, SelPiPis, SelKPis, SelKKs, SelpPis, Selpps
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+#separate line for busy combinations
+        SelB2eeX_busy = self._makeB2LLX_busy(eeXLine_name + busy_name,
+                                              dilepton = SelDiElectronTight,
+                                              hadrons  = [ SelK1s, SelK2s, SelPiPis, SelKPis, SelKKs, SelpPis, Selpps ],
+                                              params   = config,
+                                              masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+
+        SelB2eeXFromTracks  = self._makeB2LLX_normal(eeXLine_name + "2",
+                                              dilepton = SelDiElectronFromTracks,
+                                              hadrons  = [ SelPions, SelKaons, SelKstars, SelPhis, SelKshortsLL, SelKshortsDD, SelLambdasLL, SelLambdasDD, SelKstarsPlusLL, SelKstarsPlusDD, SelKstarsPlusPi0Res, SelKstarsPlusPi0Mrg, SelpKs, SelpKsSS],#, SelLambdastars
+                                              params   = config,
+                                              masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+
+#separate line for busy combinations
+        SelB2eeXFromTracks_busy  = self._makeB2LLX_busy(eeXLine_name + "2" + busy_name,
+                                              dilepton = SelDiElectronFromTracksTight,
+                                              hadrons  = [ SelK1s, SelK2s, SelPiPis, SelKPis, SelKKs, SelpPis, Selpps, SelPiPisSS, SelKPisSS, SelKKsSS, SelpPisSS, SelppsSS ],
+                                              params   = config,
+                                              masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+
+
+
+        SelB2eeXFromTracks_SS  = self._makeB2LLX(eeXSSLine_name + "2",
+                                              dilepton = SelDiElectronFromTracks_SS,
+                                              hadrons  = [ SelPions, SelKaons, SelKstars, SelPhis, SelKshortsLL, SelKshortsDD, SelLambdasLL, SelLambdasDD, SelKstarsPlusLL, SelKstarsPlusDD, SelKstarsPlusPi0Res, SelKstarsPlusPi0Mrg, SelK2s, SelKPis, SelKKs, SelpKs, SelpPis, Selpps, SelKKsSS, SelpKsSS ],#SelK1s,SelPiPisSS, SelpPisSS, SelppsSS, SelKPisSS, SelPiPis
+                                              params   = config,
+                                              masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+
+
+        SelB2mmX = self._makeB2LLX_normal(mmXLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelPions, SelKaons, SelKstars, SelPhis, SelKshortsLL, SelKshortsDD, SelLambdasLL, SelLambdasDD, SelKstarsPlusLL, SelKstarsPlusDD, SelKstarsPlusPi0Res, SelKstarsPlusPi0Mrg, SelpKs, SelpKsSS ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+#separate line for busy combinations
+        SelB2mmX_busy = self._makeB2LLX_busy(mmXLine_name + busy_name,
+                                   dilepton = SelDiMuonTight,
+                                   hadrons  = [ SelK1s, SelK2s, SelPiPis, SelKPis, SelKKs, SelpPis, Selpps, SelPiPisSS, SelKPisSS, SelKKsSS, SelpPisSS, SelppsSS ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+
+        SelB2mmX_SS = self._makeB2LLX(mmXSSLine_name,
+                                   dilepton = SelDiMuon_SS,
+                                   hadrons  = [ SelPions, SelKaons, SelKstars, SelPhis, SelKshortsLL, SelKshortsDD, SelLambdasLL, SelLambdasDD, SelKstarsPlusLL, SelKstarsPlusDD, SelKstarsPlusPi0Res, SelKstarsPlusPi0Mrg, SelK2s, SelKPis, SelKKs, SelpKs, SelpPis, Selpps,SelKKsSS, SelpKsSS ],#SelK1s,SelpPisSS,SelPiPisSS,SelppsSS,SelKPisSS, SelPiPis
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+
+        SelB2meX = self._makeB2LLX(meXLine_name,
+                                   dilepton = SelMuE,
+                                   hadrons  = [ SelPions, SelKaons, SelKstars, SelPhis, SelKshortsLL, SelKshortsDD, SelLambdasLL, SelLambdasDD, SelKstarsPlusLL, SelKstarsPlusDD, SelKstarsPlusPi0Res, SelKstarsPlusPi0Mrg, SelKKs, SelpKs],#, Selpps],#, SelKPisSS, SelKKsSS, SelpKsSS, SelppsSS ],#SelK1s, SelpPisSS,  SelPiPisSS,SelK2s,SelKPis,SelPiPis,SelpPis,
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+
+        SelB2meX_SS = self._makeB2LLX(meXSSLine_name,
+                                      dilepton = SelMuE_SS,
+                                      hadrons  = [ SelPions, SelKaons, SelKstars, SelPhis, SelKshortsLL, SelKshortsDD, SelLambdasLL, SelLambdasDD, SelKstarsPlusLL, SelKstarsPlusDD, SelKstarsPlusPi0Res, SelKstarsPlusPi0Mrg, SelKKs, SelpKs],#, Selpps],#, SelKPisSS, SelKKsSS, SelpKsSS ],#SelK1s, SelpPisSS, SelPiPisSS, SelppsSS, SelK2s,SelKPis,SelPiPis,SelpPis,
+                                      params   = config,
+                                      masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+
+        SelB2mtX = self._makeB2LLX(mtXLine_name,
+                                   dilepton = SelMuTau,
+                                   hadrons  = [ SelpKs,SelpKsSS ],#SelLambdastars
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindowTau)s *MeV" % config )
+
+        SelB2mtX_SS = self._makeB2LLX(mtXSSLine_name,
+                                      dilepton = SelMuTau_SS,
+                                      hadrons  = [ SelpKs,SelpKsSS ],#SelLambdastars
+                                      params   = config,
+                                      masscut  = "ADAMASS('B+') <  %(BMassWindowTau)s *MeV" % config )
+
+        SelB2gammaX = self._makeB2GammaX(eeXLine_name + "3",
+                                         photons = SelPhoton,
+                                         hadrons = [ SelKstars, SelPhis, SelLambdasLL,  SelLambdasDD,  SelK1s, SelPiPis, SelKPis, SelKKs, SelpKs, SelpPis, Selpps ],
+                                         params  = config,
+                                         masscut = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config )
+
+        SelB2eeXLU = self._makeB2LLX(eeXLine_name + "4",
+                                              dilepton = SelDiElectronLU,
+                                              hadrons  = [ SelPions, SelKaons, SelKstars, SelPhis, SelKshortsLL, SelKshortsDD, SelLambdasLL, SelLambdasDD, SelKstarsPlusLL, SelKstarsPlusDD, SelpKs], #, SelKstarsPlusPi0Res, SelKstarsPlusPi0Mrg, SelK2s, SelPiPis, SelKPis, SelKKs, SelpKs, SelpPis, Selpps ],
+                                              params   = config,
+                                              masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV" % config )
+
+        SelB2Kpipipimm = self._makeB2Kpipipill(mmXLine_name + "_K3pi",
+                                                dilepton = DiMuons,
+                                                kaons = Kaons,
+                                                pions = AllPions,
+                                                params = config )
+
+        SelB2Kpipipiee = self._makeB2Kpipipill(eeXLine_name + "_K3pi",
+                                                dilepton = DiElectronsFromTracks,
+                                                kaons = Kaons,
+                                                pions = AllPions,
+                                                params = config )
+
+
+        # selections for Loose Lb->{pK,Ksppi}ll =========================
+
+        Sel_ee_Loose       = self._make_ee_Loose("Sel_ee_Loose_For" + self._name, params = config )
+
+        Sel_mm_Loose       = self._make_mm_Loose("Sel_mm_Loose_For" + self._name, params = config )
+
+        SelL1520forpKll    = self._makeL1520forpkll("SelL1520For"  + self._name,params = config )
+
+        SelLb2pkmmLoose    = self._makeLb2pkmm(mmXLine_name + "_pkmmLoose",
+                                            l1520    = SelL1520forpKll,
+                                            dimuons  = Sel_mm_Loose, 
+                                            params   = config )
+
+        SelLb2pkeeLoose    = self._makeLb2pkee(eeXLine_name + "_pkeeLoose",
+                                            l1520    = SelL1520forpKll,
+                                            dilepton = Sel_ee_Loose,
+                                            params   = config )
+
+        SelKsppi           = self._makeKsppi("SelKsppi" + self._name,
+                                            params   = config )
+
+        SelLb2KsppimmLoose = self._makeLb2Ksppimm(mmXLine_name + "_KsppimmLoose",
+                                            l1820    = SelKsppi,
+                                            dimuons  = Sel_mm_Loose, 
+                                            params = config )
+
+        SelLb2KsppieeLoose = self._makeLb2Ksppiee(eeXLine_name + "_KsppieeLoose",
+                                            l1820    = SelKsppi,
+                                            dilepton = Sel_ee_Loose,
+                                            params   = config )
+        #=============================================================
+
+        # 5 : Declare Lines
+
+        SPDFilter = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 450 )" ,
+            'Preambulo' : [ "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb" ]
+            }
+
+        SPDFilter_loose = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 600 )" , # B2Xmm
+            'Preambulo' : [ "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb" ]
+            }
+
+
+
+        self.B2eeXLine = StrippingLine(eeXLine_name + "Line",
+                                       prescale          = config['Bu2eeLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2eeX,
+                                       RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = [],
+                                       MDSTFlag          = False)
+
+        self.B2eeXLine_busy = StrippingLine(eeXLine_name + "Line" + busy_name,
+                                       prescale          = config['Bu2eeLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2eeX_busy,
+                                       RelatedInfoTools  = config['RelatedInfoTools'], #+ RelInfoTrackIsolationBDT2,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = [],
+                                       MDSTFlag          = False,
+                                       MaxCandidates = 400)
+
+        self.B2eeXFromTracksLine = StrippingLine(eeXLine_name + "Line2",
+                                                 prescale          = config['Bu2eeLine2Prescale'],
+                                                 postscale         = 1,
+                                                 selection         = SelB2eeXFromTracks,
+                                                 RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                                 FILTER            = SPDFilter,
+                                                 RequiredRawEvents = [],
+                                                 MDSTFlag          = False)
+
+        self.B2eeXFromTracksLine_busy = StrippingLine(eeXLine_name + "Line2" + busy_name,
+                                                 prescale          = config['Bu2eeLine2Prescale'],
+                                                 postscale         = 1,
+                                                 selection         = SelB2eeXFromTracks_busy,
+                                                 RelatedInfoTools  = config['RelatedInfoTools'], #+ RelInfoTrackIsolationBDT2,
+                                                 FILTER            = SPDFilter,
+                                                 RequiredRawEvents = [],
+                                                 MDSTFlag          = False,
+                                                 MaxCandidates = 400)
+
+        self.B2eeX_SSFromTracksLine = StrippingLine(eeXSSLine_name + "Line2",
+                                                 prescale          = config['Bu2eeSSLine2Prescale'],
+                                                 postscale         = 1,
+                                                 selection         = SelB2eeXFromTracks_SS,
+                                                 RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                                 FILTER            = SPDFilter,
+                                                 RequiredRawEvents = [],
+                                                 MDSTFlag          = False,
+                                                 MaxCandidates = 300)
+
+        self.B2mmXLine = StrippingLine(mmXLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX,
+                                       RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = [],
+                                       MDSTFlag          = False)
+
+        self.B2mmXLine_busy = StrippingLine(mmXLine_name + "Line" + busy_name,
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_busy,
+                                       RelatedInfoTools  = config['RelatedInfoTools'], # + RelInfoTrackIsolationBDT2,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = [],
+                                       MDSTFlag          = False,
+                                       MaxCandidates = 400)
+
+
+        self.B2mmX_SSLine = StrippingLine(mmXSSLine_name + "Line",
+                                       prescale          = config['Bu2mmSSLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_SS,
+                                       RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = [],
+                                       MDSTFlag          = False,
+                                       MaxCandidates = 300)
+
+        self.B2meXLine = StrippingLine(meXLine_name + "Line",
+                                       prescale          = config['Bu2meLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2meX,
+                                       RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = [],
+                                       MDSTFlag          = False,
+                                       MaxCandidates = 400)
+
+
+        self.B2meX_SSLine = StrippingLine(meXSSLine_name + "Line",
+                                          prescale          = config['Bu2meSSLinePrescale'],
+                                          postscale         = 1,
+                                          selection         = SelB2meX_SS,
+                                          RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                          FILTER            = SPDFilter,
+                                          RequiredRawEvents = [],
+                                          MDSTFlag          = False,
+                                          MaxCandidates = 300)
+
+        self.B2mtXLine = StrippingLine(mtXLine_name + "Line",
+                                       prescale          = config['Bu2mtLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mtX,
+                                       RelatedInfoTools  = config['RelatedInfoTools'],
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = [],
+                                       MDSTFlag          = False,
+                                       MaxCandidates     = 30 )
+
+        self.B2mtX_SSLine = StrippingLine(mtXSSLine_name + "Line",
+                                          prescale          = config['Bu2mtSSLinePrescale'],
+                                          postscale         = 1,
+                                          selection         = SelB2mtX_SS,
+                                          RelatedInfoTools  = config['RelatedInfoTools'],
+                                          FILTER            = SPDFilter,
+                                          RequiredRawEvents = [],
+                                          MDSTFlag          = False,
+                                          MaxCandidates     = 30)
+
+        self.B2gammaXLine = StrippingLine(eeXLine_name + "Line3",
+                                          prescale          = config['Bu2eeLine3Prescale'],
+                                          postscale         = 1,
+                                          selection         = SelB2gammaX,
+                                          RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                          FILTER            = SPDFilter,
+                                          RequiredRawEvents = [],
+                                          MDSTFlag          = False,
+                                          MaxCandidates = 300)
+
+        self.B2eeXLULine  = StrippingLine(eeXLine_name + "Line4",
+                                                 prescale          = config['Bu2eeLine4Prescale'],
+                                                 postscale         = 1,
+                                                 selection         = SelB2eeXLU,
+                                                 postselalg        = self._storeInputBremPhotons(eeXLine_name + "Line4", outputlocprefix="Leptonic/Phys/"),
+                                                 RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                                 FILTER            = SPDFilter,
+                                                 RequiredRawEvents = [],
+                                                 MDSTFlag          = False,
+                                                 MaxCandidates = 300)
+
+        self.B2KpipipimmLine = StrippingLine( mmXLine_name + "_K3pi" + "Line",
+                                                prescale          = config['B2KpipipimmLinePrescale'],
+                                                postscale         = 1,
+                                                selection         = SelB2Kpipipimm,
+                                                RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                                FILTER            = SPDFilter,
+                                                RequiredRawEvents = [],
+                                                MDSTFlag          = False,
+                                                MaxCandidates = 400)
+
+        self.B2KpipipieeLine = StrippingLine( eeXLine_name + "_K3pi" + "Line",
+                                                prescale          = config['B2KpipipieeLinePrescale'],
+                                                postscale         = 1,
+                                                selection         = SelB2Kpipipiee,
+                                                RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2,
+                                                FILTER            = SPDFilter,
+                                                RequiredRawEvents = [],
+                                                MDSTFlag          = False,
+                                                MaxCandidates = 400)
+
+        # Loose lines for Lb->{pK,Ksppi}ll
+        self.Lb2pkmmLooseLine    = StrippingLine( mmXLine_name + "_Lb2pkmmLoose" + "Line",
+                                                  selection         = SelLb2pkmmLoose,
+                                                  RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2_Lb2pKll,
+                                                  FILTER            = SPDFilter_loose, # SPD < 600
+                                                  MDSTFlag          = False,
+                                                  MaxCandidates = 4000)
+
+        self.Lb2pkeeLooseLine    = StrippingLine( eeXLine_name + "_Lb2pkeeLoose" + "Line",
+                                                  selection         = SelLb2pkeeLoose,
+                                                  RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2_Lb2pKll,
+                                                  FILTER            = SPDFilter_loose, # SPD < 600
+                                                  MDSTFlag          = False,
+                                                  MaxCandidates = 4000)
+
+        self.Lb2KsppimmLooseLine = StrippingLine( mmXLine_name + "_Lb2KsppimmLoose" + "Line",
+                                                  selection         = SelLb2KsppimmLoose,
+                                                  RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2_Lb2Ksppill,
+                                                  FILTER            = SPDFilter_loose, # SPD < 600 
+                                                  MDSTFlag          = False,
+                                                  MaxCandidates = 4000)
+
+        self.Lb2KsppieeLooseLine = StrippingLine( eeXLine_name + "_Lb2KsppieeLoose" + "Line",
+                                                  selection         = SelLb2KsppieeLoose,
+                                                  RelatedInfoTools  = config['RelatedInfoTools'] + RelInfoTrackIsolationBDT2_Lb2Ksppill,
+                                                  FILTER            = SPDFilter_loose, # SPD < 600
+                                                  MDSTFlag          = False,
+                                                  MaxCandidates = 4000)
+
+        # 6 : Register Lines
+
+        self.registerLine( self.B2eeXLine )
+        self.registerLine( self.B2eeXLine_busy )
+        self.registerLine( self.B2eeXFromTracksLine )
+        self.registerLine( self.B2eeXFromTracksLine_busy )
+        self.registerLine( self.B2eeX_SSFromTracksLine)
+        self.registerLine( self.B2mmXLine )
+        self.registerLine( self.B2mmXLine_busy )
+        self.registerLine( self.B2mmX_SSLine )
+        self.registerLine( self.B2meXLine )
+        self.registerLine( self.B2meX_SSLine )
+        self.registerLine( self.B2mtXLine )
+        self.registerLine( self.B2mtX_SSLine )
+        self.registerLine( self.B2gammaXLine )
+        self.registerLine( self.B2eeXLULine )
+        self.registerLine( self.B2KpipipimmLine )
+        self.registerLine( self.B2KpipipieeLine )
+        self.registerLine( self.Lb2pkmmLooseLine )
+        self.registerLine( self.Lb2pkeeLooseLine )
+        self.registerLine( self.Lb2KsppimmLooseLine )
+        self.registerLine( self.Lb2KsppieeLooseLine )
+
+#####################################################
+    def _filterHadron( self, name, sel, params ):
+        """
+        Filter for some of hadronic final states
+        Check for list as input for V0s which use (Very)Loose and Brunel candidates
+        """
+        if isinstance(sel,list):
+            sel_list = [MergedSelection("Merged"+name,RequiredSelections= sel,Unique=True)]
+        else:
+            sel_list = [sel]
+
+
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+        # need to add the ID here
+        _Code = "(PT > %(KaonPT)s *MeV) & " \
+                "(M < %(DiHadronMass)s*MeV) & " \
+                "((ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) | " \
+                "(NDAUGHTERS == NINTREE(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))))" % params
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = sel_list )
+#####################################################
+    def _filterDiLepton( self, name, dilepton, params, idcut = None ) :
+        """
+        Handy interface for dilepton filter
+        """
+
+        _Code = "(ID=='J/psi(1S)') & "\
+                "(PT > %(DiLeptonPT)s *MeV) & "\
+                "(MM < %(UpperMass)s *MeV) & "\
+                "(MINTREE(ABSID<14,PT) > %(LeptonPT)s *MeV) & "\
+                "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(LeptonIPCHI2)s) & "\
+                "(VFASPF(VCHI2/VDOF) < 9) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & "\
+                "(MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s)" % params
+
+        # add additional cut on PID if requested
+        if idcut : _Code += ( " & " + idcut )
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection(name, Algorithm = _Filter, RequiredSelections = [ dilepton ] )
+
+#####################################################
+    def _filterDiLeptonTight( self, name, dilepton, params, idcut = None ) :
+        """
+        Handy interface for dilepton filter
+        """
+
+        _Code = "(ID=='J/psi(1S)') & "\
+            "(PT > %(DiLeptonPT)s *MeV) & "\
+            "(MM < %(UpperMass)s *MeV) & "\
+            "(MINTREE(ABSID<14,PT) > %(LeptonPTTight)s *MeV) & "\
+            "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(LeptonIPCHI2)s) & "\
+            "(VFASPF(VCHI2/VDOF) < 9) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & "\
+            "(MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s)" % params
+
+        # add additional cut on PID if requested
+        if idcut : _Code += ( " & " + idcut )
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection(name, Algorithm = _Filter, RequiredSelections = [ dilepton ] )
+
+
+#####################################################
+    def _filterMuTau( self, name, dilepton, params, idcut = None ) :
+        """
+        Handy interface for mutau filter
+        """
+
+        _Code = "(ID=='J/psi(1S)') & "\
+                "(PT > %(DiLeptonPT)s *MeV) & "\
+                "(MM < %(UpperMass)s *MeV) & "\
+                "(MINTREE(ABSID<14,PT) > %(LeptonPT)s *MeV) & "\
+                "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(LeptonIPCHI2)s) & "\
+                "(VFASPF(VCHI2/VDOF) < %(TauVCHI2DOF)s) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & "\
+                "(MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s)" % params
+
+        # add additional cut on PID if requested
+        if idcut : _Code += ( " & " + idcut )
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection(name, Algorithm = _Filter, RequiredSelections = [ dilepton ] )
+#####################################################
+    def _filterPhotons( self, name, photons ):
+        """
+        Filter photon conversions
+        """
+
+        _Code = "(PT > 1000*MeV) & (HASVERTEX) & (VFASPF(VCHI2/VDOF) < 9)"
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ photons ] )
+#####################################################
+    def _makeKstarPlus( self, name, kshorts, pions, params):
+        """
+        Make a K*(892)+ -> KS0 pi+
+        Check for list as input for KS0s which use (Very)Loose and Brunel candidates
+        """
+        if isinstance(kshorts,list):
+            sel_list = [MergedSelection("Merged"+name,RequiredSelections= kshorts,Unique=True),pions]
+        else:
+            sel_list = [kshorts,pions]
+
+        _Decays = "[K*(892)+ -> KS0 pi+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(ADAMASS('K*(892)+') < %(KstarPMassWindow)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(KstarPADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(KstarPVertexCHI2)s)" % params
+
+        _KshortCut = "(PT > %(KaonPT)s *MeV) & " \
+                     "(M < %(DiHadronMass)s*MeV) & " \
+                     "(NDAUGHTERS == NINTREE(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)))" % params
+
+        _PionCut = "(PT > %(KaonPT)s *MeV) & " \
+                   "(M < %(DiHadronMass)s*MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "KS0"  : _KshortCut,
+            "pi+"  : _PionCut
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = sel_list )
+#####################################################
+    def _makeKstarPlusPi0( self, name, kaons, pions, params):
+        """
+        Make a K*+ -> K+ pi0. Note that either merged or resolved pi0s may be used as daughter.
+        """
+
+        _Decays = "[K*(892)+ -> K+ pi0]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(ADAMASS('K*(892)+') < %(KstarPMassWindow)s *MeV)" % params
+
+        _MotherCut = "(ADMASS('K*(892)+') < %(KstarPMassWindow)s *MeV) " % params
+
+        _KaonCut = "(PT > %(KaonPT)s *MeV) & " \
+            "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _PionCut = "(PT > %(Pi0PT)s * MeV)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "K+"  : _KaonCut,
+            "pi0"  : _PionCut
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ kaons, pions ] )
+
+#####################################################
+    def _makePiPi( self, name, pions, params):
+        """
+        Make a rho -> pi+ pi- in a range below 2600 MeV.
+        """
+
+        _Decays = "rho(770)0 -> pi+ pi-"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(DiHadronMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params #UpperBMass
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut = "(PT > %(PionPTRho)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNpi > %(ProbNNCutTight)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "pi+"  : _DaughterCut,
+            "pi-" : _DaughterCut
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ pions ] )
+#####################################################
+    def _makePiPiSS( self, name, pions, params):
+        """
+        Make a same-sign rho -> pi+ pi+ in a range below 2600 MeV.
+        """
+
+        _Decays = "[rho(770)0 -> pi+ pi+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(DiHadronMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut = "(PT > %(PionPTRho)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)  & (PROBNNpi > %(ProbNNCutTight)s))" % params
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "pi+"  : _DaughterCut,
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ pions ] )
+#####################################################
+    def _makeKPi( self, name, kaons, pions, params):
+        """
+        Make a K* -> K+ pi- in entire range below 2600 MeV.
+        """
+
+        _Decays = "[K*_0(1430)0 -> K+ pi-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(DiHadronMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_k = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s))  & (PROBNNk > %(ProbNNCutTight)s)" % params
+        _DaughterCut_pi = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s))  & (PROBNNpi > %(ProbNNCutTight)s)" % params
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "K+"  : _DaughterCut_k,
+            "pi-" : _DaughterCut_pi
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ kaons, pions ] )
+#####################################################
+    def _makeKPiSS( self, name, kaons, pions, params):
+        """
+        Make a same-sign K* -> K+ pi+ in entire range below 2600 MeV.
+        """
+
+        _Decays = "[K*_0(1430)0 -> K+ pi+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(DiHadronMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_k = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s))  & (PROBNNk > %(ProbNNCutTight)s)" % params
+        _DaughterCut_pi = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s))  & (PROBNNpi > %(ProbNNCutTight)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "K+"  : _DaughterCut_k,
+            "pi+" : _DaughterCut_pi
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ kaons, pions ] )
+#####################################################
+    def _makeKK( self, name, kaons, params):
+        """
+        Make an f2(1525) -> K+ K- in entire range.
+        """
+
+        _Decays = "f'_2(1525) -> K+ K-"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(UpperBsMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s))  & (PROBNNk > %(ProbNNCutTight)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "K+"  : _DaughterCut,
+            "K-" : _DaughterCut
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ kaons ] )
+#####################################################
+    def _makeKKSS( self, name, kaons, params):
+        """
+        Make a same-sign f2(1525) -> K+ K+ in entire range.
+        """
+
+        _Decays = "[f'_2(1525) -> K+ K+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(UpperBsMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s))  & (PROBNNk > %(ProbNNCutTight)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "K+"  : _DaughterCut,
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ kaons ] )
+#####################################################
+    def _makepK( self, name, protons, kaons, params):
+        """
+        Make a Lambda* -> p K- in entire range.
+        """
+
+        _Decays = "[Lambda(1520)0 -> p+ K-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(UpperLbMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_p = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNp > %(ProbNNCut)s)" % params
+        _DaughterCut_K = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNk > %(ProbNNCut)s)" % params
+
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _DaughterCut_p,
+            "K-" : _DaughterCut_K
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protons, kaons ] )
+#####################################################
+    def _makepKSS( self, name, protons, kaons, params):
+        """
+        Make a same-sign Lambda* -> p K+ in entire range.
+        """
+
+        _Decays = "[Lambda(1520)0 -> p+ K+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(UpperLbMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_p = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNp > %(ProbNNCut)s)" % params
+        _DaughterCut_K = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNk > %(ProbNNCut)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _DaughterCut_p,
+            "K+" : _DaughterCut_K
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protons, kaons ] )
+#####################################################
+    def _makepPi( self, name, protons, pions, params):
+        """
+        Make a N* -> p pi- in entire range until 2600 MeV.
+        """
+
+        _Decays = "[N(1440)0 -> p+ pi-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(DiHadronMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_p = "(PT > %(PionPTRho)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                         "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNp > %(ProbNNCutTight)s)" % params
+        _DaughterCut_pi = "(PT > %(KaonPTLoose)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNpi > %(ProbNNCutTight)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _DaughterCut_p,
+            "pi-" : _DaughterCut_pi
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protons, pions ] )
+#####################################################
+    def _makepPiSS( self, name, protons, pions, params):
+        """
+        Make a same-sign N* -> p pi+ in entire range below 2600 MeV.
+        """
+
+        _Decays = "[N(1440)0 -> p+ pi+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(DiHadronMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_p = "(PT > %(PionPTRho)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNp > %(ProbNNCutTight)s)" % params
+        _DaughterCut_pi = "(PT > %(KaonPTLoose)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNpi > %(ProbNNCutTight)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _DaughterCut_p,
+            "pi+" : _DaughterCut_pi
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protons, pions ] )
+#####################################################
+    def _makepp( self, name, protons, params):
+        """
+        Make a f2 -> p pbar in entire range.
+        """
+
+        _Decays = "f_2(1950) -> p+ p~-"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(UpperLbMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV)  &" \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNp > %(ProbNNCutTight)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _DaughterCut,
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protons ] )
+#####################################################
+    def _makeppSS( self, name, protons, params):
+        """
+        Make a same-sign f2 -> p p in entire range.
+        """
+
+        _Decays = "[f_2(1950) -> p+ p+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(UpperLbMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNp > %(ProbNNCutTight)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _DaughterCut,
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protons ] )
+#####################################################
+    def _makeK1( self, name, kaons, pions, params ) :
+        """
+        Make a K1 -> K+pi-pi+
+        """
+
+        _Decays = "[K_1(1270)+ -> K+ pi+ pi-]cc"
+
+         # define all the cuts
+        _K1Comb12Cuts  = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV)" % params
+        _K1CombCuts    = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV) & ((APT1+APT2+APT3) > %(K1_SumPTHad)s*MeV)" % params
+
+        _K1MotherCuts  = "(VFASPF(VCHI2) < %(K1_VtxChi2)s) & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='K+') | (ABSID=='K-') | (ABSID=='pi+') | (ABSID=='pi-')),0.0) > %(K1_SumIPChi2Had)s)" % params
+        _daughtersCuts_K = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNk > %(ProbNNCut)s)" % params
+        _daughtersCuts_pi = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNpi > %(ProbNNCut)s)" % params
+
+        _Combine = DaVinci__N3BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "K+"  : _daughtersCuts_K,
+            "pi+" : _daughtersCuts_pi }
+
+        _Combine.Combination12Cut = _K1Comb12Cuts
+        _Combine.CombinationCut   = _K1CombCuts
+        _Combine.MotherCut        = _K1MotherCuts
+
+        # make and store the Selection object
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ kaons, pions ] )
+#####################################################
+    def _makeK2( self, name, kaons, params ) :
+        """
+        Make a K2 -> K+K+K-
+        """
+
+        _Decays = "[K_2(1770)+ -> K+ K+ K-]cc"
+
+         # define all the cuts
+        _K2Comb12Cuts  = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV) & (ACHI2DOCA(1,2) < 8)" % params
+        _K2CombCuts    = "(AM > %(K1_MassWindow_Lo)s*MeV) & (AM < %(K1_MassWindow_Hi)s*MeV) & ((APT1+APT2+APT3) > %(K1_SumPTHad)s*MeV)" % params
+
+        _K2MotherCuts  = "(VFASPF(VCHI2) < %(K1_VtxChi2)s) & (SUMTREE(MIPCHI2DV(PRIMARY),((ABSID=='K+') | (ABSID=='K-')),0.0) > %(K1_SumIPChi2Had)s)" % params
+        _daughtersCuts = "(P > %(ProtonP)s *MeV) & (TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNk > %(ProbNNCut)s)" % params
+
+        _Combine = DaVinci__N3BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "K+"  : _daughtersCuts,
+            "K-"  : _daughtersCuts,
+         }
+
+        _Combine.Combination12Cut = _K2Comb12Cuts
+        _Combine.CombinationCut   = _K2CombCuts
+        _Combine.MotherCut        = _K2MotherCuts
+
+        # make and store the Selection object
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ kaons ] )
+####################################################
+    def _makeMuE( self, name, params, electronid = None, muonid = None , samesign = False):
+        """
+        Makes MuE combinations
+        """
+
+        from StandardParticles import StdLooseMuons as Muons
+        from StandardParticles import StdLooseElectrons as Electrons
+
+        _DecayDescriptor = "[J/psi(1S) -> mu+ e-]cc"
+        if samesign : _DecayDescriptor = "[J/psi(1S) -> mu+ e+]cc"
+
+        _MassCut = "(AM > 100*MeV)"
+
+        _MotherCut = "(VFASPF(VCHI2/VDOF) < 9)"
+
+        _DaughtersCut = "(PT > %(LeptonPT)s) & " \
+                        "(MIPCHI2DV(PRIMARY) > %(LeptonIPCHI2)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _DecayDescriptor,
+                                     CombinationCut  = _MassCut,
+                                     MotherCut       = _MotherCut )
+
+        _MuonCut     = _DaughtersCut
+        _ElectronCut = _DaughtersCut
+
+        if muonid     : _MuonCut     += ( "&" + muonid )
+        if electronid : _ElectronCut += ( "&" + electronid )
+
+        _Combine.DaughtersCuts = {
+            "mu+" : _MuonCut,
+            "e+"  : _ElectronCut
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ Muons, Electrons ] )
+####################################################
+    def _makeMuMuSS( self, name, params, muonid = None):
+        """
+        Makes MuMu same sign combinations
+        """
+        from StandardParticles import StdLooseMuons as Muons
+
+        _DecayDescriptor = "[J/psi(1S) -> mu+ mu+]cc"
+
+        _MassCut = "(AM > 100*MeV)"
+
+        _MotherCut = "(VFASPF(VCHI2/VDOF) < 9)"
+
+        _DaughtersCut = "(PT > %(LeptonPT)s) & " \
+                        "(MIPCHI2DV(PRIMARY) > %(LeptonIPCHI2)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _DecayDescriptor,
+                                     CombinationCut  = _MassCut,
+                                     MotherCut       = _MotherCut )
+
+        _MuonCut     = _DaughtersCut
+
+        if muonid     : _MuonCut     += ( "&" + muonid )
+
+        _Combine.DaughtersCuts = {
+            "mu+" : _MuonCut,
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ Muons ] )
+####################################################
+    def _makeEESS( self, name, params, electronid = None):
+        """
+        Makes EE same-sign combinations
+        """
+        from Configurables import DiElectronMaker,ProtoParticleCALOFilter
+        from CommonParticles.Utils import trackSelector
+        from GaudiKernel.SystemOfUnits import MeV
+        ee = DiElectronMaker('DiElectronsSS' + name)
+        ee.Particle = "J/psi(1S)"
+        #ee.DecayDescriptor = "[J/psi(1S) -> e+ e+]cc"
+        selector = trackSelector(ee, trackTypes=["Long"])
+
+        ee.addTool( ProtoParticleCALOFilter('Electron'))
+        ee.Electron.Selection = ["RequiresDet='CALO'"]
+        ee.DiElectronMassMin = 0.*MeV
+        ee.DiElectronMassMax = 5000.*MeV
+        ee.DiElectronPtMin = 200.*MeV
+        ee.OppositeSign = 0
+
+        if electronid : ee.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'%(PIDe)s'" % params]
+
+        return Selection(name+'eeSelection',Algorithm=ee)
+
+#####################################################
+    def _makeMuTau( self, name, params, tauid = None, muonid = None , samesign = False):
+        """
+        Makes MuTau combinations
+        """
+
+        from StandardParticles import StdLooseMuons as Muons
+        #from CommonParticles import StdLooseDetachedTau
+        #Taus = DataOnDemand(Location = "Phys/StdLooseDetachedTau3pi/Particles")
+        from CommonParticles import StdTightDetachedTau
+        Taus = DataOnDemand(Location = "Phys/StdTightDetachedTau3pi/Particles")
+
+        _DecayDescriptor = "[J/psi(1S) -> mu+ tau-]cc"
+        if samesign : _DecayDescriptor = "[J/psi(1S) -> mu+ tau+]cc"
+
+        _MassCut = "(AM > 100*MeV)"
+
+        _MotherCut = "(VFASPF(VCHI2/VDOF) < %(TauVCHI2DOF)s)" % params
+
+        _DaughtersCut = "(PT > %(LeptonPT)s) & " \
+                        "(MIPCHI2DV(PRIMARY) > %(LeptonIPCHI2)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _DecayDescriptor,
+                                     CombinationCut  = _MassCut,
+                                     MotherCut       = _MotherCut )
+
+        _MuonCut = _DaughtersCut
+        _TauCut  = _DaughtersCut
+
+        if muonid : _MuonCut += ( "&" + muonid )
+        if tauid  : _TauCut  += ( "&" + tauid )
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _MuonCut,
+            "tau+" : _TauCut
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ Muons, Taus ] )
+#####################################################
+    def _makeB2LLX( self, name, dilepton, hadrons, params, masscut = "(ADAMASS('B+')< 1500 *MeV" ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [ "[ B+ -> J/psi(1S) K+ ]cc",
+                    "[ B+ -> J/psi(1S) pi+ ]cc",
+                    "[ B+ -> J/psi(1S) K*(892)+ ]cc",
+                    "[ B+ -> J/psi(1S) K_1(1270)+ ]cc",
+                    "[ B+ -> J/psi(1S) K_2(1770)+ ]cc",
+                    " B0 -> J/psi(1S) KS0 ",
+                    " B0 -> J/psi(1S) rho(770)0 ",
+                    "[ B0 -> J/psi(1S) K*(892)0 ]cc",
+                    "[ B0 -> J/psi(1S) K*_0(1430)0 ]cc",
+                    " B_s0 -> J/psi(1S) phi(1020) ",
+                    " B_s0 -> J/psi(1S) f'_2(1525) ",
+                    " B_s0 -> J/psi(1S) f_2(1950) ",
+                    "[ Lambda_b0 -> J/psi(1S) Lambda0 ]cc",
+                    "[ Lambda_b0 -> J/psi(1S) N(1440)0 ]cc",
+                    "[ Lambda_b0 -> J/psi(1S) Lambda(1520)0 ]cc" ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+#####################################################
+    def _makeB2LLX_normal( self, name, dilepton, hadrons, params, masscut = "(ADAMASS('B+')< 1500 *MeV" ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [ "[ B+ -> J/psi(1S) K+ ]cc",
+                    "[ B+ -> J/psi(1S) pi+ ]cc",
+                    "[ B+ -> J/psi(1S) K*(892)+ ]cc",
+                    " B0 -> J/psi(1S) KS0 ",
+                    "[ B0 -> J/psi(1S) K*(892)0 ]cc",
+                    " B_s0 -> J/psi(1S) phi(1020) ",
+                    "[ Lambda_b0 -> J/psi(1S) Lambda0 ]cc",
+                    "[ Lambda_b0 -> J/psi(1S) Lambda(1520)0 ]cc" ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+#####################################################
+    def _makeB2LLX_busy( self, name, dilepton, hadrons, params, masscut = "(ADAMASS('B+')< 1500 *MeV" ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [
+                    "[ B+ -> J/psi(1S) K_1(1270)+ ]cc",
+                    "[ B+ -> J/psi(1S) K_2(1770)+ ]cc",
+                    " B0 -> J/psi(1S) rho(770)0 ",
+                    "[ B0 -> J/psi(1S) K*_0(1430)0 ]cc",
+                    " B_s0 -> J/psi(1S) f'_2(1525) ",
+                    " B_s0 -> J/psi(1S) f_2(1950) ",
+                    "[ Lambda_b0 -> J/psi(1S) N(1440)0 ]cc", ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+#####################################################
+    def _makeB2GammaX( self, name, photons, hadrons, params, masscut = "(ADAMASS('B+')< 1500 *MeV" ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays =  [ "[ B0   -> gamma K*(892)0 ]cc",
+                     "[ B0 -> gamma K*_0(1430)0 ]cc",
+                     " B0 -> gamma rho(770)0 ",
+                     " B_s0 -> gamma phi(1020) ",
+                     " B_s0 -> gamma f'_2(1525) ",
+                     " B_s0 -> gamma f_2(1950) ",
+                     "[ Lambda_b0 -> gamma Lambda0 ]cc",
+                     "[ Lambda_b0 -> gamma N(1440)0 ]cc",
+                     "[ Lambda_b0 -> gamma Lambda(1520)0 ]cc" ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ _Merge, photons ] )
+#################################################################################################################################
+    def _makeB2Kpipipill( self, name, dilepton, kaons, pions, params ) :
+        """
+        Make a B0 -> J/psi(1S) K+pi-pi+pi+
+        """
+
+        _Decays = "[B0 -> J/psi(1S) K+ pi- pi+ pi-]cc"
+
+        # define all the cuts
+        # daughter cuts
+        _daughtersCuts_dilepton =   "(ID=='J/psi(1S)') & "\
+                                    "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(B2K3pill_LeptonIPCHI2)s) & "\
+                                    "(MAXTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(B2K3pill_LeptonIPCHI2_Max)s) & "\
+                                    "(MINTREE(ABSID<14,PT) > %(B2K3pill_LeptonPT)s *MeV) & "\
+                                    "(PT > %(B2K3pill_DiLeptonPT)s *MeV) & "\
+                                    "(MM < %(UpperMass)s *MeV) & "\
+                                    "(VFASPF(VCHI2) < %(B2K3pill_DiLeptonVtxChi2)s) & (BPVVDCHI2 > %(B2K3pill_DiLeptonFDChi2)s) & "\
+                                    "(MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s)" % params
+        _daughtersCuts_K        = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) &"\
+                                  "(MIPCHI2DV(PRIMARY) > %(B2K3pill_HadIPCHI2)s) & (PT > %(B2K3pill_KaonPT)s *MeV)" % params
+        _daughtersCuts_pi       = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & "\
+                                  "(MIPCHI2DV(PRIMARY) > %(B2K3pill_HadIPCHI2)s) & (PT > %(B2K3pill_PionPT)s *MeV)" % params
+
+
+
+        _Comb12Cuts  = "(ACHI2DOCA(1,2) < %(B2K3pill_achi2doca)s ) & (AM < %(B2K3pill_MassWindow_Hi)s*MeV)" % params
+        _Comb123Cuts = "(ACHI2DOCA(1,3) < %(B2K3pill_achi2doca)s )  & (ACHI2DOCA(2,3) < %(B2K3pill_achi2doca)s) & (AM < %(B2K3pill_MassWindow_Hi)s*MeV) & (ACHILD(PIDK,2) >ACHILD(PIDK,3))" % params
+        _Comb1234Cuts = "(ACHI2DOCA(1,4) < %(B2K3pill_achi2doca)s )  & (ACHI2DOCA(2,4) < %(B2K3pill_achi2doca)s) & (ACHI2DOCA(3,4) < %(B2K3pill_achi2doca)s) & (AM < %(B2K3pill_MassWindow_Hi)s*MeV) & (ACHILD(PIDK,2) > ACHILD(PIDK,4))" % params
+        _CombCuts = "(ACHI2DOCA(1,5) < %(B2K3pill_achi2doca)s )  & (ACHI2DOCA(2,5) < %(B2K3pill_achi2doca)s) & (ACHI2DOCA(3,5) < %(B2K3pill_achi2doca)s) & (ACHI2DOCA(4,5) < %(B2K3pill_achi2doca)s) & (ADAMASS('B+')< %(BMassWindow)s*MeV) & (ACHILD(PIDK,2) >ACHILD(PIDK,5))" % params
+
+        _MotherCuts  = "(VFASPF(VCHI2) < %(B2K3pill_BVtxChi2)s) & (BPVIPCHI2() < %(B2K3pill_BIPDChi2)s) & (BPVDIRA > %(B2K3pill_BFDIRA)s) & (BPVVDCHI2 > %(B2K3pill_BFDChi2)s) " % params
+
+        _Combine = DaVinci__N5BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "J/psi(1S)" : _daughtersCuts_dilepton,
+            "K+"        : _daughtersCuts_K,
+            "pi+"       : _daughtersCuts_pi }
+
+        _Combine.Combination12Cut   = _Comb12Cuts
+        _Combine.Combination123Cut  = _Comb123Cuts
+        _Combine.Combination1234Cut = _Comb1234Cuts
+        _Combine.CombinationCut     = _CombCuts
+        _Combine.MotherCut          = _MotherCuts
+        #_Combine.ReFitPVs = True
+
+        # make and store the Selection object
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dilepton, kaons, pions ] )
+
+#################################################################################################################################
+    def _make_ee_Loose( self, name, params ):
+        """
+        Make dielectrons for Loose Lb->{pK, Ksppi}ll
+        """
+        # same as in Bu2LLKee_Line2, w/ looser MINIPCHI2 
+        _Code = "(ID=='J/psi(1S)') & "\
+                "(MM < 5500 *MeV) & "\
+                "(MINTREE(ABSID<14,PT) > 300 *MeV) & "\
+                "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > 5) & "\
+                "(VFASPF(VCHI2/VDOF) < 9) & (BPVVDCHI2 > 16) & (2 == NINTREE((ABSID==11)&(PIDe > 0)) )"
+
+        ee_filter = FilterDesktop(Code = _Code)
+        return Selection("sel_ee_Loose", Algorithm = ee_filter, RequiredSelections = [DataOnDemand(Location="Phys/StdDiElectronFromTracks/Particles")])
+
+    def _make_mm_Loose( self, name, params ) :
+        """
+        Make dimuons for Loose Lb->{pK, Ksppi}ll
+        """
+        # Form the dimuon (B2XMuMu-like) w/ looser MINIPCHI2 
+        _dauCuts_mu     = "(MIPCHI2DV(PRIMARY) > 5) & (TRGHP < 0.6) & (PIDmu> -3.0)" 
+        _momCuts_dimu   = "(VFASPF(VCHI2/VDOF) < 12.0) & (BPVDIRA> -0.9) & (BPVVDCHI2 > 9.0)"
+        _combCut_dimu   = "(AM < 7100*MeV)"
+
+        comb_dimuon = CombineParticles(DecayDescriptor = "[J/psi(1S) -> mu+ mu-]cc",
+                                       DaughtersCuts   = {"mu+":_dauCuts_mu,"mu-":_dauCuts_mu},
+                                       CombinationCut  = _combCut_dimu,
+                                       MotherCut       = _momCuts_dimu)
+        return Selection("sel_mm_Loose", Algorithm=comb_dimuon, RequiredSelections=[DataOnDemand(Location="Phys/StdAllLooseMuons/Particles")])
+
+    def _makeL1520forpkll( self, name, params ) :
+        """
+        Make a Lambda(1520)0 -> p K
+        """
+        # Protons/Kaons are StdNoPIDs now. 
+        # IPCHI2 is >6 for B2Xmm and >9 for Bu2LLK. Loosened to > 5 
+        _kaonCut         = "(MIPCHI2DV(PRIMARY) > 5) & (TRGHOSTPROB < 0.6) & (HASRICH) & (PT > 250*MeV) & (P > 2*GeV) & (PROBNNk>0.05)"
+        _protonCut       = "(MIPCHI2DV(PRIMARY) > 5) & (TRGHOSTPROB < 0.6) & (HASRICH) & (PT > 300*MeV) "# & (P > 1*GeV) & (PROBNNp>0.05)"
+        _combCut_L1520   = "(AM < 5000*MeV) & (ADOCACHI2CUT(30, ''))" # DOCA same as Bu2LLK. <30 for B2XMM
+        _momCuts_L1520   = "(MAXTREE(ISBASIC,TRCHI2DOF) < 5) & (VFASPF(VCHI2PDOF) < 25.0) & (MM < 4200)" # same as Bu2LLK. <8 for B2XMM
+
+        comb_L1520 = CombineParticles(DecayDescriptor = "[Lambda(1520)0 -> K- p+]cc",
+                                      DaughtersCuts   = {"K-":_kaonCut,"K+":_kaonCut,"p+":_protonCut,"p~-":_protonCut},
+                                      CombinationCut  = _combCut_L1520,
+                                      MotherCut       = _momCuts_L1520)
+
+        return Selection("sel_L1520", Algorithm=comb_L1520, RequiredSelections=[DataOnDemand(Location="Phys/StdAllNoPIDsKaons/Particles"),
+                                                                                DataOnDemand(Location="Phys/StdAllNoPIDsProtons/Particles")])
+
+    def _makeKsppi( self, name, params ) :
+        """
+        Make a L** -> Ksppi
+        """
+        _diTrackPreVertexCuts  = " (AM < 2500)" # m(ppi)
+        _diTrackPostVertexCuts = " (HASVERTEX) & (VFASPF(VCHI2/VDOF) < 25) "
+        _pionCut   = " (HASRICH) & (MIPCHI2DV(PRIMARY) > 5) & (TRGHOSTPROB < 0.6) & (PT > 250)"# & (PROBNNpi>0.05)"
+        _protonCut = " (HASRICH) & (MIPCHI2DV(PRIMARY) > 5) & (TRGHOSTPROB < 0.6) & (PT > 300)"# & (PROBNNp >0.05)"
+        _combineDiTrack = CombineParticles( DecayDescriptor="[N(1520)0 -> p+ pi-]cc",
+                                            CombinationCut = _diTrackPreVertexCuts,
+                                            MotherCut      = _diTrackPostVertexCuts,
+                                            DaughtersCuts  = {"pi-":_pionCut,"pi+":_pionCut,"p+":_protonCut,"p~-":_protonCut})
+        sel_ppi = Selection("ppi_comb", Algorithm=_combineDiTrack, RequiredSelections=[DataOnDemand(Location="Phys/StdAllNoPIDsPions/Particles"),
+                                                                                       DataOnDemand(Location="Phys/StdAllNoPIDsProtons/Particles")])
+
+        _TriTrackPreVertexCuts  = "( AM < 5000 )"
+        _TriTrackPostVertexCuts = " (VFASPF(VCHI2/VDOF) < 30) & (MM < 4200)" 
+
+        _combineTriTrack = CombineParticles( DecayDescriptor ="[Lambda(1820)0 -> N(1520)0 KS0]cc",
+                                             CombinationCut  = _TriTrackPreVertexCuts,
+                                             MotherCut       = _TriTrackPostVertexCuts )
+        merged_Ks = MergedSelection(name,RequiredSelections = [ DataOnDemand(Location="Phys/StdVeryLooseKsLL/Particles"),DataOnDemand(Location="Phys/StdLooseKsDD/Particles")])
+
+        return Selection("sel_Ksppi", Algorithm = _combineTriTrack, RequiredSelections = [ merged_Ks, sel_ppi ] )
+
+    def _makeLb2pkmm( self, name, l1520, dimuons, params ) :
+        """
+        Make the Lb -> J/psi(1s) Lambda(1520)0
+        """
+        combB_Lb2pKmm  = CombineParticles(DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc",
+                                          CombinationCut  = "in_range(4000,AM,7100)",
+                                          MotherCut       = "(in_range(4000,M,7100)) &  (VFASPF(VCHI2PDOF) < 30) & (PT>200*MeV)")
+        sel_Lb2pKmm_init = Selection("selection_Lb2pKmm_init",
+                                     Algorithm=combB_Lb2pKmm,
+                                     RequiredSelections=[dimuons,l1520])
+        sel_Lb2pKmm_filter = FilterDesktop(Code = "(in_range(5000,mB,6500)) & (dtf_signif > 3.5) & (dtf_prob > 1.0E-6) & (mpK<4*GeV)")
+        sel_Lb2pKmm_filter.Preambulo = [
+                                         "dtf_prob   = DTF_PROB(True)", 
+                                         "dtf_signif = DTF_CTAUSIGNIFICANCE(0, True)",
+                                         "mB         = DTF_FUN(M, True)",
+                                         "mpK        = DTF_FUN(CHILD(2, M),  True)"
+                                       ]
+        return Selection("sel_Lb2pKmm", Algorithm = sel_Lb2pKmm_filter, RequiredSelections = [sel_Lb2pKmm_init])
+
+
+    def _makeLb2pkee( self, name, l1520, dilepton, params ) :
+        """
+        Make the Lb -> J/psi(1S) Lambda(1520)0
+        """
+        combB_Lb2pKee  = CombineParticles(DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc",
+                                          CombinationCut  = "in_range(3800,AM,7000)",
+                                          MotherCut       = "(in_range(4500,M,6700)) & ((VFASPF(VCHI2/VDOF) < 9) & (BPVIPCHI2() < 30) & (BPVDIRA > 0.9995) & (BPVVDCHI2 > 100))")
+
+        return Selection("sel_Lb2pKee", Algorithm=combB_Lb2pKee,RequiredSelections=[dilepton, l1520])
+
+
+    def _makeLb2Ksppimm( self, name, l1820, dimuons, params ) :
+        """
+        Make the Lb -> J/psi(1S) Lambda(1820)0
+        """
+        combB_LbKsppimm  = CombineParticles(DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda(1820)0]cc",
+                                              CombinationCut  = "in_range(4000,AM,7100)",
+                                              MotherCut       = "(in_range(4000,M,7100)) &  (VFASPF(VCHI2PDOF) < 30) & (PT>200*MeV)")
+        sel_LbKsppimm_init = Selection("selection_LbKsppimm_init",
+                                     Algorithm=combB_LbKsppimm,
+                                     RequiredSelections=[dimuons,l1820])
+        sel_LbKsppimm_filter = FilterDesktop(Code = "(in_range(5000,mB,6400)) & (dtf_signif > 3) & (dtf_prob > 1.0E-6) & (mKsppi<4*GeV)")
+        sel_LbKsppimm_filter.Preambulo = [
+                                         "dtf_prob   = DTF_PROB(True)", # DTF-based, with PV constraints.
+                                         "dtf_signif = DTF_CTAUSIGNIFICANCE(0, True)",
+                                         "mB         = DTF_FUN(M, True)",
+                                         "mKsppi     = DTF_FUN(CHILD(2, M),  True)"
+                                       ]
+        return Selection("sel_LbKsppimm", Algorithm = sel_LbKsppimm_filter, RequiredSelections = [sel_LbKsppimm_init])
+
+    def _makeLb2Ksppiee( self, name, l1820, dilepton, params ) :
+        """
+        Make the Lb -> J/psi(1S) Lambda(1820)0
+        """
+        combB_LbKsppiee  = CombineParticles(DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda(1820)0]cc",
+                                            CombinationCut  = "in_range(3800,AM,7000)",
+                                            MotherCut       = "(in_range(4500,M,6700)) & ((VFASPF(VCHI2/VDOF) < 9) & (BPVIPCHI2() < 25) & (BPVDIRA > 0.9995) & (BPVVDCHI2 > 100))")
+        return Selection("sel_LbKsppiee", Algorithm=combB_LbKsppiee,RequiredSelections=[dilepton, l1820])
+
+
+#################################################################################################################################
+    def _storeInputBremPhotons( self, linename, outputlocprefix = "Leptonic/Phys/", photonloc = "Phys/StdVeryLooseAllPhotons/Particles" ):
+        from PhysSelPython.Wrappers import FilterSelection, DataOnDemand, SelectionSequence
+        from Configurables import ( CopyParticles, ParticleCloner,
+                                    ProtoParticleCloner, CaloHypoCloner,
+                                    CaloClusterCloner )
+
+        cloner = CopyParticles( name = "BremPhotonClonerFor%s"%linename )
+        cloner.OutputPrefix = outputlocprefix+linename
+        cloner.InputLocation = photonloc
+
+        cloner.addTool(ParticleCloner, name="ParticleCloner")
+        cloner.ParticleCloner.ICloneProtoParticle = "ProtoParticleCloner"
+
+        cloner.addTool(ProtoParticleCloner,name="ProtoParticleCloner")
+
+        cloner.addTool(CaloHypoCloner,name="CaloHypoCloner")
+        cloner.CaloHypoCloner.CloneClustersNeuP = True
+        cloner.CaloHypoCloner.CloneDigitsNeuP   = True
+
+        cloner.addTool(CaloClusterCloner,name="CaloClusterCloner")
+        cloner.CaloClusterCloner.CloneEntriesNeuP = True
+
+        ############################################################
+        makePhotons = GaudiSequencer("For%sBremPhotonMakerAlg"%linename)
+        makePhotons.Members += [cloner]
+
+        return makePhotons
+#####################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2MajoLep.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2MajoLep.py
new file mode 100644
index 000000000..db328df3d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2MajoLep.py
@@ -0,0 +1,416 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Bu->Majorana(KS0) mu+ stripping Selections and StrippingLines.
+Provides functions to build KS->DD, KS->LL, Bu selections.
+"""
+
+__author__ = ['Mariusz Witek', 'Marcin Chrzaszcz']
+__date__ = '31/11/2016'
+__version__ = 'V0.9'
+__all__ = ('Bu2MajoLepConf',
+	   'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import *
+
+from StandardParticles import StdLooseMuons as Muons
+from StandardParticles import StdLoosePions as Pions
+from StandardParticles import StdLooseElectrons as Electrons
+
+from StandardParticles import StdNoPIDsDownPions as DownPions
+from StandardParticles import StdNoPIDsDownElectrons as DownElectrons
+
+default_config = {
+    'NAME' : 'Bu2MajoLep',
+    'WGs' : ['RD'],
+    'STREAMS' : ['Leptonic'],
+    'BUILDERTYPE' : 'Bu2MajoLepConf',
+    'CONFIG'      : {'MajoDaug_LTrk_GhostProb'   : 0.5,
+                     'MajoDaug_IPChi2min'        : 9.0,
+                     'MajoDaug_Pmin'             : 2000.0,
+                     'MajoDaug_PTmin'            : 300.0,
+                     'Trk_GhostProb'             : 0.5,
+                     'Trk_Chi2'                  : 3.0,
+                     'Majo_Mhigh'                : 5600.0,
+                     'Majo_Pmin'                 : 5000.0,
+                     'Majo_PTmin'                : 500.0,
+                     'Majo_DD_DocaChi2'          : 25.0,
+                     'Majo_LL_DocaChi2'          : 25.0,
+                     'Majo_WrongMass'            : 35.0,
+                     'Majo_DD_VtxChi2'           : 16.0,
+                     'Majo_LL_VtxChi2'           : 16.0,
+                     'Majo_DD_FDChi2'            : 25.0,
+                     'Majo_LL_FDChi2'            : 25.0,
+                     'Majo_FDwrtPV'              : 1.0,
+                     'Bach_PTmin'                : 500.0,
+                     'Bach_Pmin'                 : 3000.0,
+                     'Bach_IPChi2min'            : 16.0,
+#                     'BDaug_DD_PTsum'            : 3000.0,
+#                     'BDaug_LL_PTsum'            : 3000.0,
+                     'B_Mlow'                    : 500.0,
+                     'B_Mhigh'                   : 700.0,
+                     
+                     'B_Pmin'                    : 5000.0,
+                     'B_VtxChi2'                 : 10.0,
+                     'B_Dira'                    : 0.9999,
+                     'B_DD_IPCHI2wrtPV'          : 16.0,
+                     'B_LL_IPCHI2wrtPV'          : 16.0,
+                     'B_FDwrtPV'                 : 1.0,
+                     'B_DD_FDChi2'               : 30.0,
+                     'B_LL_FDChi2'               : 30.0,
+                     'GEC_MaxTracks'             : 800,
+                     'Prescale'                  : 1.0,
+                     'Postscale'                 : 1.0,
+    "RelatedInfoTools": [
+     {
+     "Location": "KSTARMUMUVARIABLES",
+     "Type": "RelInfoBKstarMuMuBDT",
+     "Variables": ['MU_SLL_ISO_1', 'MU_SLL_ISO_2']
+     },
+    {
+    "Location": "ConeIsoInfo", 
+    "Type": "RelInfoConeVariables", 
+    "Variables": [
+    "CONEANGLE", 
+    "CONEMULT", 
+    "CONEPTASYM", 
+    "CONEPT", 
+    "CONEP", 
+    "CONEPASYM", 
+    "CONEDELTAETA", 
+    "CONEDELTAPHI"
+    ]
+    }, 
+    {
+    "Location": "VtxIsoInfo", 
+    "Type": "RelInfoVertexIsolation", 
+    "Variables": [
+    "VTXISONUMVTX", 
+    "VTXISODCHI2ONETRACK", 
+    "VTXISODCHI2MASSONETRACK", 
+    "VTXISODCHI2TWOTRACK", 
+    "VTXISODCHI2MASSTWOTRACK"
+    ]
+    },
+    {
+    "Location": "VtxIsoBDTInfo", 
+    "Type": "RelInfoVertexIsolationBDT"
+    },
+     ], 
+                     }, 
+    }
+
+
+name="Bu2MajoLep"
+
+class Bu2MajoLepConf(LineBuilder) :
+    """
+    Builder of Bu->KS mu+ stripping Selection and StrippingLine.
+    Constructs B+ -> KS mu+ Selections and StrippingLines from a configuration dictionary.
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        dd_name = name+'DD'
+        ll_name = name+'LL'
+        Bu2MajoMuDDName = dd_name.replace("Bu2MajoLep","Bu2MajoMu")
+        Bu2MajoMuLLName = ll_name.replace("Bu2MajoLep","Bu2MajoMu")
+
+        GECCode = {'Code' : "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %s)" % config['GEC_MaxTracks'],
+                   'Preambulo' : ["from LoKiTracks.decorators import *"]}
+
+        self.muons = Muons
+        self.makeMu( 'Mufor'+name, config )
+
+        self.pions = Pions
+        self.makePi( 'Pifor'+name, config )
+
+        self.electrons = Electrons
+        self.makeE( 'Efor'+name, config )
+
+        self.downpions = DownPions
+        self.makeDownPi( 'DownPifor'+name, config )
+
+        self.downelectrons = DownElectrons
+        self.makeDownE( 'DownEfor'+name, config )
+
+        self.selMajo2DD = self.makeMajo2DD( 'DownMajofor'+dd_name, config )
+        self.selMajo2LL = self.makeMajo2LL( 'Majofor'+ll_name, config )
+
+
+        self.Bu2MajoMuDD = self.makeBu2Majo2DD( Bu2MajoMuDDName, config )
+        self.Bu2MajoMuLL = self.makeBu2Majo2LL( Bu2MajoMuLLName, config )
+
+        self.Bu2MajoMuDDLine = StrippingLine(Bu2MajoMuDDName+"Line",
+                                           prescale = config['Prescale'],
+                                           postscale = config['Postscale'],
+                                           selection = self.Bu2MajoMuDD,
+                                           RelatedInfoTools = config["RelatedInfoTools"],
+                                           FILTER = GECCode
+                                           )
+
+        self.Bu2MajoMuLLLine = StrippingLine(Bu2MajoMuLLName+"Line",
+                                           prescale = config['Prescale'],
+                                           postscale = config['Postscale'],
+                                           selection =  self.Bu2MajoMuLL,
+                                           RelatedInfoTools = config["RelatedInfoTools"],
+                                           FILTER = GECCode
+                                           )
+
+        self.registerLine(self.Bu2MajoMuDDLine)
+        self.registerLine(self.Bu2MajoMuLLLine)
+
+
+# For LL
+    def makeBu2Majo2LL( self, name, config ) :
+        """
+        Create and store a Bu -> KS(LL) mu+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutLow     = "(AM>(5100-%s)*MeV)" % config['B_Mlow']
+        _massCutHigh    = "(AM<(5300+%s)*MeV)" % config['B_Mhigh']
+
+        _combCuts = _massCutLow+'&'+_massCutHigh
+
+        _pCut       = "(P>%s*MeV)"                     % config['B_Pmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['B_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_LL_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B_LL_FDChi2']
+        _massCutLow2     = "(M>(5279-%s)*MeV)"               % config['B_Mlow']
+        _massCutHigh2    = "(M<(5279+%s)*MeV)"               % config['B_Mhigh']
+        
+
+
+        _motherCuts = _pCut+'&'+_vtxChi2Cut+'&'+_diraCut+'&'+_ipChi2Cut+'&'+_fdCut+'&'+_fdChi2Cut+'&'+_massCutLow2+'&'+_massCutHigh2
+
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "B+ -> mu+ KS0", "B- -> mu- KS0" ]
+
+        _B.DaughtersCuts = { "mu+" : "(P>%s)"% config['Bach_Pmin'] }
+
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _B, RequiredSelections = [ self.selMu, self.selMajo2LL ])
+
+
+    def makeE( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['MajoDaug_PTmin']
+        _bachIPChi2Cut  = "(MIPCHI2DV(PRIMARY) > %s)"    % config['MajoDaug_IPChi2min']
+        _trkChi2Cut     = "(TRCHI2DOF<%s)"               % config['Trk_Chi2']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+
+        _allCuts = _trkGPCut + '&' + _trkChi2Cut + '&' + _bachPtCut + '&' + _bachIPChi2Cut
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selE = Selection( name, Algorithm = _filterH, RequiredSelections = [self.electrons] )
+
+
+    def makePi( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['MajoDaug_PTmin']
+        _bachIPChi2Cut  = "(MIPCHI2DV(PRIMARY) > %s)"    % config['MajoDaug_IPChi2min']
+        _trkChi2Cut     = "(TRCHI2DOF<%s)"               % config['Trk_Chi2']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+
+        _allCuts = _trkGPCut + '&' + _trkChi2Cut + '&' + _bachPtCut + '&' + _bachIPChi2Cut
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selPi = Selection( name, Algorithm = _filterH, RequiredSelections = [self.pions] )
+
+
+    def makeMu( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['Bach_PTmin']
+        _bachIPChi2Cut  = "(MIPCHI2DV(PRIMARY) > %s)"    % config['Bach_IPChi2min']
+        _trkChi2Cut     = "(TRCHI2DOF<%s)"               % config['Trk_Chi2']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+
+        _allCuts = _trkGPCut + '&' + _trkChi2Cut + '&' + _bachPtCut + '&' + _bachIPChi2Cut
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selMu = Selection( name, Algorithm = _filterH, RequiredSelections = [self.muons] )
+
+
+    def makeMajo2LL( self, name, config ) :
+        """
+        Create and store a Bu -> KS(LL) h+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutHigh    = "(AM<(%s*MeV))"                     % config['Majo_Mhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           % config['Majo_LL_DocaChi2']
+
+        _combCuts = _massCutHigh+'&'+_docaCut
+
+        _pCut       = "(P>%s*MeV)"                     % config['Majo_Pmin']
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Majo_LL_VtxChi2']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Majo_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Majo_LL_FDChi2']
+        _vetoKsCut      = "( ADWM( 'KS0' , WM('pi+','pi-') )>%s)"    % config['Majo_WrongMass']
+        _vetoLambda1Cut = "( ADWM('Lambda0', WM('p+','pi-') )>%s)"   % config['Majo_WrongMass']
+        _vetoLambda2Cut = "( ADWM('Lambda0', WM('pi+','p~-') )>%s)"  % config['Majo_WrongMass']
+
+        _motherCuts = _pCut+'&'+_ptCut+'&'+_vtxChi2Cut+'&'+_fdCut+'&'+_fdChi2Cut+'&'+_vetoKsCut+'&'+_vetoLambda1Cut+'&'+_vetoLambda2Cut
+
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "KS0 -> pi+ e-", "KS0 -> pi- e+" ]
+
+        _MajoDaug_pCut = "(P>%s)"                         % config['MajoDaug_Pmin']
+
+        _daughtersCuts = _MajoDaug_pCut
+
+        _Majo.DaughtersCuts = { "pi+" : _daughtersCuts, "e-" : _daughtersCuts }
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _Majo, RequiredSelections = [ self.selPi, self.selE ])
+
+# For DD
+    def makeBu2Majo2DD( self, name, config ) :
+        """
+        Create and store a Bu -> KS(DD) mu+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+
+        _massCutLow     = "(AM>(5100-%s)*MeV)"               % config['B_Mlow']
+        _massCutHigh    = "(AM<(5300+%s)*MeV)"               % config['B_Mhigh']
+
+        _combCuts = _massCutLow+'&'+_massCutHigh
+
+        _pCut       = "(P>%s*MeV)"                     % config['B_Pmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B_VtxChi2']
+        _diraCut    = "(BPVDIRA>%s)"                   % config['B_Dira']
+        _ipChi2Cut  = "(MIPCHI2DV(PRIMARY)<%s)"        % config['B_DD_IPCHI2wrtPV']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B_DD_FDChi2']
+        _massCutLow2     = "(M>(5279-%s)*MeV)"               % config['B_Mlow']
+        _massCutHigh2    = "(M<(5279+%s)*MeV)"               % config['B_Mhigh']
+        
+
+
+
+        _motherCuts = _pCut+'&'+_vtxChi2Cut+'&'+_diraCut+'&'+_ipChi2Cut+'&'+_fdCut+'&'+_fdChi2Cut+'&'+_massCutLow2+'&'+_massCutHigh2
+        
+        
+        _B = CombineParticles()
+
+        _B.DecayDescriptors = [ "B+ -> mu+ KS0", "B- -> mu- KS0" ]
+
+        _B.DaughtersCuts = { "mu+" : "(P>%s)"% config['Bach_Pmin'] }
+
+        _B.CombinationCut = _combCuts
+        _B.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _B, RequiredSelections = [ self.selMu, self.selMajo2DD ])
+
+
+    def makeDownE( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['MajoDaug_PTmin']
+        _bachIPChi2Cut  = "(MIPCHI2DV(PRIMARY) > %s)"    % config['MajoDaug_IPChi2min']
+        _trkChi2Cut     = "(TRCHI2DOF<%s)"               % config['Trk_Chi2']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+
+        _allCuts = _trkGPCut + '&' + _trkChi2Cut + '&' + _bachPtCut + '&' + _bachIPChi2Cut
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selDownE = Selection( name, Algorithm = _filterH, RequiredSelections = [self.downelectrons] )
+
+
+    def makeDownPi( self, name, config ) :
+        # define all the cuts
+        _bachPtCut      = "(PT>%s*MeV)"                  % config['MajoDaug_PTmin']
+        _bachIPChi2Cut  = "(MIPCHI2DV(PRIMARY) > %s)"    % config['MajoDaug_IPChi2min']
+        _trkChi2Cut     = "(TRCHI2DOF<%s)"               % config['Trk_Chi2']
+        _trkGPCut       = "(TRGHOSTPROB<%s)"             % config['Trk_GhostProb']
+
+        _allCuts = _trkGPCut + '&' + _trkChi2Cut + '&' + _bachPtCut + '&' + _bachIPChi2Cut
+
+        # make the filter
+        _filterH = FilterDesktop( Code = _allCuts )
+
+        # make and store the selection object
+        self.selDownPi = Selection( name, Algorithm = _filterH, RequiredSelections = [self.downpions] )
+
+
+    def makeMajo2DD( self, name, config ) :
+        """
+        Create and store a Bu -> KS(LL) h+ Selection object.
+        Arguments:
+        name             : name of the Selection.
+        config           : config dictionary
+        """
+
+        _massCutHigh    = "(AM<(%s*MeV))"                     % config['Majo_Mhigh']
+        _docaCut        = "(ADOCACHI2CUT(%s, ''))"           % config['Majo_DD_DocaChi2']
+
+        _combCuts = _massCutHigh+'&'+_docaCut
+
+        _pCut       = "(P>%s*MeV)"                     % config['Majo_Pmin']
+        _ptCut      = "(PT>%s*MeV)"                    % config['Majo_PTmin']
+        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['Majo_DD_VtxChi2']
+        _fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['Majo_FDwrtPV']
+        _fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['Majo_DD_FDChi2']
+        _vetoKsCut      = "( ADWM( 'KS0' , WM('pi+','pi-') )>%s)"    % config['Majo_WrongMass']
+        _vetoLambda1Cut = "( ADWM('Lambda0', WM('p+','pi-') )>%s)"   % config['Majo_WrongMass']
+        _vetoLambda2Cut = "( ADWM('Lambda0', WM('pi+','p~-') )>%s)"  % config['Majo_WrongMass']
+
+        _motherCuts = _pCut+'&'+_ptCut+'&'+_vtxChi2Cut+'&'+_fdCut+'&'+_fdChi2Cut+'&'+_vetoKsCut+'&'+_vetoLambda1Cut+'&'+_vetoLambda2Cut
+
+        _Majo = CombineParticles()
+
+        _Majo.DecayDescriptors = [ "KS0 -> pi+ e-", "KS0 -> pi- e+" ]
+
+        _MajoDaug_pCut = "(P>%s)"                         % config['MajoDaug_Pmin']
+
+        _daughtersCuts = _MajoDaug_pCut
+
+        _Majo.DaughtersCuts = { "pi+" : _daughtersCuts, "e-" : _daughtersCuts }
+        _Majo.CombinationCut = _combCuts
+        _Majo.MotherCut = _motherCuts
+
+        return Selection (name, Algorithm = _Majo, RequiredSelections = [ self.selDownPi, self.selDownE ])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2MuNu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2MuNu.py
new file mode 100644
index 000000000..3c4959b84
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingBu2MuNu.py
@@ -0,0 +1,257 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# Stripping Line for BMuNu (tight muons with high pT and IP)
+# RD Group
+#
+# Xabier Cid Vidal
+#
+# Signal:  Isolated StdTightANNMuons in low mult events, pT > 5GeV/c, IPS>20, NTracks<150
+__author__ = ['Xabier Cid Vidal']
+__all__ = ('Bu2MuNuConf',
+           'create_stdjets',           
+           'relInfoJetsVars',
+           'relInfoConeVars',
+           'relInfoCylVars',
+           'relInfoPFVars',
+           'default_name',
+           'default_config')
+
+from Gaudi.Configuration import *
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import  StdTightMuons, StdTightANNMuons
+from CommonParticles.Utils import *
+from Configurables import FilterDesktop, CombineParticles
+from JetAccessories.JetMaker_Config import JetMakerConf
+
+default_name = 'Bu2MuNu'
+
+default_config = {
+    'NAME'  : default_name,
+    'WGs'   : ['RD'],
+    'BUILDERTYPE' : 'Bu2MuNuConf',
+    'CONFIG': {'PrescaleSignal'  : 1.0,
+               'PostscaleSignal' : 1.0,
+               'PrescaleControl'  : 0.03,
+               'PostscaleControl' : 1.0,
+               'pTminMu'     : 5.,
+               'pTmaxMu'     : 40.,
+               'pmaxMu'      : 500.,
+               'IPchi2Mu'    : 400.,
+               'TrChi2Mu'    : 3,
+               'useNN'        : True,
+               'maxNTracks'  : 150,
+               'pTminMuControl': 2.5,
+               'IPchi2MuControl': 100.
+               },
+    'STREAMS': [ 'Leptonic' ]
+    }
+
+
+
+# the muons banning is line dependent (need to provide the location of the muons!)
+def create_stdjets(strobj,line_location,stdjets_name_ban):
+    
+    myconf1 = JetMakerConf(stdjets_name_ban,
+                           R = 0.7 ,
+                           PtMin = 500.,
+                           listOfParticlesToBan = [line_location],
+                           JetIDCut = False).algorithms[0]
+    
+    if "StdJetsNoJetIDBan" in dir(strobj): strobj.StdJetsNoJetIDBan.append(myconf1)
+    else: strobj.StdJetsNoJetIDBan= [myconf1]
+    
+    ## configure Data-On-Demand service                                                                     
+    locations = updateDoD ( myconf1 )
+
+
+relInfoJetsVars = ["JETNOMU1PX","JETNOMU1PY", "JETNOMU1PZ", "JETNOMU1PT", "JETNOMU1JETWIDTH", "JETNOMU1NNTAG", "JETNOMU1MNF", "JETNOMU2PX", "JETNOMU2PY", "JETNOMU2PZ", "JETNOMU2PT", "JETNOMU2JETWIDTH", "JETNOMU2NNTAG", "JETNOMU2MNF", "JETNOMU3PX", "JETNOMU3PY", "JETNOMU3PZ", "JETNOMU3PT", "JETNOMU3JETWIDTH", "JETNOMU3NNTAG", "JETNOMU3MNF", "JETMU1PX", "JETMU1PY", "JETMU1PZ", "JETMU1PT", "JETMU1JETWIDTH", "JETMU1NNTAG", "JETMU1MNF"]
+
+relInfoConeVars = ["CONEANGLE","CONEMULT","CONEP","CONEPT","CONEPASYM","CONEPTASYM","CONEDELTAETA","CONEDELTAPHI"]
+
+relInfoCylVars = ["CYLBESTD0","CYLBESTKS","CYLTRACKSNCYL","CYLMINPT","CYLMAXPT","CYLAVPT","CYLMAXPTTRIPCHI2","CYLMAXPTTRDOCACHI2","CYLMAXPTTRBMASS","CYLMINIPCHI2","CYLMAXIPCHI2","CYLAVIPCHI2","CYLMAXIPCHI2TRPT","CYLMAXIPCHI2TRDOCACHI2","CYLMAXIPCHI2TRBMASS","CYLMINDOCACHI2","CYLMAXDOCACHI2","CYLAVDOCACHI2","CYLMINDOCATRPT","CYLMINDOCATRIPCHI2","CYLMINDOCATRBMASS","CYLBESTBMASS","CYLBESTBMASSTRPT","CYLBESTBMASSTRIPCHI2","CYLBESTBMASSTRDOCACHI2"]
+
+relInfoPFVars = ["PFCHARGEDMASS","PFALLMASS","PFCHARGEDTOTPT","PFALLTOTPT","PFCHARGEDMISSPT","PFALLMISSPT"]
+
+
+class Bu2MuNuConf( LineBuilder ) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__( self, name, config ) :
+
+        LineBuilder.__init__( self, name, config )
+
+        self._myname = name
+        self._config = config
+        self.useNN = config["useNN"]        
+        
+        #################################################################################
+        # Define the initial selection for the signal muons
+        _cutMu = "(MIPCHI2DV(PRIMARY)> %(IPchi2Mu)s)&(TRCHI2DOF < %(TrChi2Mu)s ) &"\
+                 " (PT < %(pTmaxMu)s*GeV) & (P < %(pmaxMu)s*GeV) & (PT>%(pTminMu)s*GeV)" %config
+
+        _cutMuControl = "(MIPCHI2DV(PRIMARY)> %(IPchi2MuControl)s) &"\
+                        "(PT>%(pTminMuControl)s*GeV)" %config
+        
+        if self.useNN:
+            self.selMuonsControl = FilterDesktop(self._myname + '_MuForBu2MuNuControl',
+                                                 Preambulo = [ "from LoKiTracks.decorators import *"],
+                                                 Code      = _cutMuControl,
+                                                 Inputs = ["Phys/StdTightANNMuons/Particles"]
+                                                 )
+            self.selMuons = FilterDesktop(self._myname + '_MuForBu2MuNu',
+                                          Preambulo = [ "from LoKiTracks.decorators import *"],
+                                          Code      = _cutMu,
+                                          Inputs = ["Phys/StdTightANNMuons/Particles"]
+                                          )
+
+        else:
+            self.selMuonsControl = FilterDesktop(self._myname + '_MuForBu2MuNuControl',
+                                                 Preambulo = [ "from LoKiTracks.decorators import *"],
+                                                 Code      = _cutMuControl,
+                                                 Inputs = ["Phys/StdTightANNMuons/Particles"]
+                                                 )
+
+            self.selMuons = FilterDesktop(self._myname + '_MuForBu2MuNu',
+                                          Preambulo = [ "from LoKiTracks.decorators import *"],
+                                          Code      = _cutMu,
+                                          Inputs = ["Phys/StdTightMuons/Particles"]
+                                          )
+
+            
+        self.selMuonsLocationControl = updateDoD(self.selMuonsControl)
+        self.selMuonsLocationControl = self.selMuonsLocationControl.keys()[0]
+        self.selMuonsLocation = updateDoD(self.selMuons)
+        self.selMuonsLocation = self.selMuonsLocation.keys()[0]
+        #################################################################################
+        # filter high multiplicity events        
+        self.filterTracks = " ( CONTAINS('Rec/Track/Best')< %(maxNTracks)s ) " %self._config
+
+
+        #################################################################################
+        # configure related infos!
+        stdjets_name_noban = "StdJetsNoJetIDNoBan"
+        # jet variables for control
+        stdjets_name_ban_control = "StdJetsNoJetIDBanControl"
+        RelatedInfoToolsControl = [{'Type' : 'RelInfoJetsVariables',
+                                    'Location': 'JetVariables',
+                                    'Variables': relInfoJetsVars,
+                                    'UseVarsJetsWithB' : False,
+                                    'LocationJetsNoMu' : "Phys/"+stdjets_name_ban_control+"/Particles",
+                                    'LocationJetsNoRemove' : "Phys/"+stdjets_name_noban+"/Particles"}]
+        
+        # jet variables for signal
+        stdjets_name_ban_signal = "StdJetsNoJetIDBanSignal"
+        RelatedInfoToolsSignal = [{'Type' : 'RelInfoJetsVariables',
+                                   'Location': 'JetVariables',
+                                   'Variables': relInfoJetsVars,
+                                   'UseVarsJetsWithB' : False,
+                                   'LocationJetsNoMu' : "Phys/"+stdjets_name_ban_signal+"/Particles",
+                                   'LocationJetsNoRemove' : "Phys/"+stdjets_name_noban+"/Particles"}]
+        
+        ## these are common for both lines!
+        otherRelatedInfos = [
+            # cone variables
+            {'Type' : 'RelInfoConeVariables',
+             'Variables':relInfoConeVars,
+             'Location': 'ConeVariables1',
+             'ConeAngle' : 1.0},
+            {'Type' : 'RelInfoConeVariables',
+             'Variables':relInfoConeVars,
+             'Location': 'ConeVariables2',
+             'ConeAngle' : 1.5},
+            {'Type' : 'RelInfoConeVariables',
+             'Variables':relInfoConeVars,
+             'Location': 'ConeVariables3',
+             'ConeAngle' : 2.0},
+
+            # cylinder variables
+            {'Type' : 'RelInfoCylVariables',
+             'Variables':relInfoCylVars,
+             'Location': "CylVariables1",
+             'cylSize': 7.5},
+            {'Type' : 'RelInfoCylVariables',
+             'Variables':relInfoCylVars,
+             'Location': "CylVariables2",
+             'cylSize': 15},
+            {'Type' : 'RelInfoCylVariables',
+             'Variables':relInfoCylVars,
+             'Location': "CylVariables3",
+             'trackQuality': False,
+             'samePV': False,
+             'cylSize': 15},
+            {'Type' : 'RelInfoCylVariables',
+             'Variables':relInfoCylVars,
+             'Location': "CylVariables4",
+             'trackQuality': False,
+             'samePV': True,
+             'cylSize': 15},
+            {'Type' : 'RelInfoCylVariables',
+             'Variables':relInfoCylVars,
+             'Location': "CylVariables5",
+             'cylSize': 22.5},
+
+            # PF variables
+            {'Type' : 'RelInfoPFVariables',
+             'Variables':relInfoPFVars,
+             'Location': 'PFVariables'}]
+
+        
+        RelatedInfoToolsControl.extend(otherRelatedInfos)
+        RelatedInfoToolsSignal.extend(otherRelatedInfos)
+                               
+        
+        #################################################################################
+        #control line (prescaled!)
+        self.ControlLine = StrippingLine( self._myname + 'ControlLine',
+                                          prescale  = config[ 'PrescaleControl' ],
+                                          postscale = config[ 'PostscaleControl' ],
+                                          selection = DataOnDemand( self.selMuonsLocationControl ),
+                                          RelatedInfoTools = RelatedInfoToolsControl,
+                                          #RequiredRawEvents = ["Calo"],
+                                          MDSTFlag = False                                         
+                                          )
+        
+        # signal line (no prescale)
+        self.SignalLine = StrippingLine( self._myname + 'SignalLine',
+                                         prescale  = config[ 'PrescaleSignal'],
+                                         postscale = config[ 'PostscaleSignal'],                                    
+                                         FILTER = self.filterTracks,
+                                         selection = DataOnDemand( self.selMuonsLocation ),
+                                         RelatedInfoTools = RelatedInfoToolsSignal,
+                                         #RequiredRawEvents = ["Calo"],
+                                         MDSTFlag = False
+                                         )
+        
+        
+        self.registerLine( self.ControlLine)
+        self.registerLine( self.SignalLine)
+        
+
+        #################################################################################
+        # This is for the relatedinfos based on jets
+        StdJetsNoJetIDNoBan = JetMakerConf(stdjets_name_noban,
+                                           R = 0.7 ,
+                                           PtMin = 500.,
+                                           JetIDCut = False).algorithms[0]
+        
+        ## configure Data-On-Demand service                                                               
+        locations = updateDoD ( StdJetsNoJetIDNoBan )
+        
+        ## add the jets with the specific banning
+        create_stdjets(self,self.ControlLine.outputLocation(),stdjets_name_ban_control)
+        create_stdjets(self,self.SignalLine.outputLocation(),stdjets_name_ban_signal)
+
+        
+
+ 
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingD23MuLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingD23MuLines.py
new file mode 100644
index 000000000..c14e43236
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingD23MuLines.py
@@ -0,0 +1,362 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of D+ -> mu l+ l- lines
+
+Performance
+
+Full.dst:
+######### 
+StrippingReport                                                INFO Event 1000000, Good event 1000000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |_StrippingGlobal_                                            |  0.0142|       142|       |   8.622|
+ |!StrippingD23MuD23MuLine_TIMING                              |  0.0004|         4|  1.000|   0.065|
+ |!StrippingD23MuD2MueeLine_TIMING                             |  0.0029|        29|  1.103|   0.076|
+ |!StrippingD23MuD23PiLine_TIMING                              |  0.0058|        58|  1.328|   0.024|
+
+     
+MC: D+ -> 3pi (21163012)
+########################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingD23MuD23PiLine                                     |  0.6500|       650|  1.008|   0.569| 
+
+MC: D+ -> K 2pi (21163020)
+##########################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|      
+ |!StrippingD23MuD23PiLine                                     |  0.0130|        13|  1.077|   0.266|
+ 
+Exported symbols (use python help!):
+   - 
+"""
+
+__author__ = ["Oliver Gruenberg"]
+__date__ = "08.12.2015"
+__version__ = "$Revision: 1.0 $"
+
+#############################################################################
+
+__all__ = ("D23MuLinesConf",
+           "config_default", )
+
+#############################################################################
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+#from StrippingSelections.Utils import checkConfig
+from GaudiKernel.PhysicalConstants import c_light
+
+#############################################################################
+
+default_config = {
+    "NAME"        : "D23Mu",
+    "WGs"         : [ "RD" ],
+    "STREAMS"     : [ "Leptonic" ],
+    "BUILDERTYPE" : "D23MuLinesConf",
+    "CONFIG"      : {
+    "MDSTflag"             : False, # True or False
+    # TrackCuts
+    "MinTrIPChi2"          : 25.0,
+    "MaxTrChi2Dof"         : 4.0,
+    "MaxTrGhp"             : 0.4,
+    # CombiCuts
+    "MaxDoca"              : 0.3, # (mm)
+    "mDiffDLoose"          : 150, # (MeV)
+    "mDiffDTight"          : 150, # (MeV)    
+    # MotherCuts
+    "MaxIPChi2"            : 25,
+    "MinVDChi2"            : 225,
+    "MaxVtxChi2Dof"        : 9,
+    "MinDira"              : 0.0,
+    "MinTau"               : 0.1, # (ps)
+    # scalings
+    "Postscale"            : 1, 
+    "D23MuPrescale"        : 1,
+    "D2MueePrescale"       : 1,
+    "D23PiPrescale"        : 0.01,
+    "CommonRelInfoTools"   : [ { "Type": "RelInfoVertexIsolation", "Location":"VtxIsoInfo" },
+                               { "Type": "RelInfoVertexIsolationBDT", "Location":"VtxIsoInfoBDT" },
+                               { "Type" : "RelInfoBs2MuMuBIsolations",
+                                 "Variables" : [],
+                                 "Location"  : "BsMuMuBIsolation",
+                                 "tracktype" : 3,
+                                 "makeTrackCuts" : False, },
+                               ] # closes CommonRelInfoTools
+    } # closes CONFIG
+    } # closes default_config
+
+class D23MuLinesConf(LineBuilder) :
+    """
+    Builder
+    
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()  
+    
+    def __init__(self, name = "D23Mu", config = default_config) :
+
+        LineBuilder.__init__(self, name, config)
+
+#############################################################################
+
+        self.TrackCuts = """
+                         (MIPCHI2DV(PRIMARY) > %(MinTrIPChi2)s)
+                         & (TRCHI2DOF < %(MaxTrChi2Dof)s)
+                         & (TRGHP < %(MaxTrGhp)s)
+                         """ %config
+
+        self.Combination12Cuts = "(ADOCA(1,2) < %(MaxDoca)s*mm)" %config
+
+        self.CombinationCutsLoose = """
+                                    (ADAMASS(1920*MeV) < %(mDiffDLoose)s*MeV)
+                                    & (ADOCA(1,3) < %(MaxDoca)s*mm)
+                                    & (ADOCA(2,3) < %(MaxDoca)s*mm)
+                                    """ %config
+
+        self.CombinationCutsTight = """
+                                    (ADAMASS(1920*MeV) < %(mDiffDTight)s*MeV)
+                                    & (ADOCA(1,3) < %(MaxDoca)s*mm)
+                                    & (ADOCA(2,3) < %(MaxDoca)s*mm)
+                                    """ %config
+
+        self.MotherCuts = """
+                          (BPVIPCHI2() < %(MaxIPChi2)s )
+                          & (BPVVDCHI2 > %(MinVDChi2)s )
+                          & (VFASPF(VCHI2/VDOF) < %(MaxVtxChi2Dof)s )
+                          & (BPVDIRA > %(MinDira)s )
+                          & (BPVLTIME() > %(MinTau)s*ps )
+                          """ %config
+
+#############################################################################
+        
+        D23Mu_name  = name+"D23Mu"
+        D2Muee_name = name+"D2Muee"
+        D23Pi_name  = name+"D23Pi"        
+
+        self.selD23Mu  = self.makeD23Mu(D23Mu_name)
+        self.selD2Muee = self.makeD2Muee(D2Muee_name)
+        self.selD23Pi  = self.makeD23Pi(D23Pi_name)
+        
+#############################################################################
+
+        self.D23Mu_Line = StrippingLine(D23Mu_name+"Line",
+                                        prescale = config["D23MuPrescale"],
+                                        postscale = config["Postscale"],
+                                        MDSTFlag = config["MDSTflag"],
+                                        selection = self.selD23Mu,
+                                        RelatedInfoTools = [
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Dp',
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^mu+  mu+  l]CC"  : "ConeIso05mu1",
+                                             "[D+ ->  mu+ ^mu+  l]CC"  : "ConeIso05mu2",
+                                             "[D+ ->  mu+  mu+ ^l]CC"  : "ConeIso05mu3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Dp',
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^mu+  mu+  l]CC"  : "ConeIso10mu1",
+                                             "[D+ ->  mu+ ^mu+  l]CC"  : "ConeIso10mu2",
+                                             "[D+ ->  mu+  mu+ ^l]CC"  : "ConeIso10mu3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Dp',
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^mu+  mu+  l]CC"  : "ConeIso15mu1",
+                                             "[D+ ->  mu+ ^mu+  l]CC"  : "ConeIso15mu2",
+                                             "[D+ ->  mu+  mu+ ^l]CC"  : "ConeIso15mu3",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^mu+  mu+  l]CC"  : "TrackIsoBDTmu1",
+                                             "[D+ ->  mu+ ^mu+  l]CC"  : "TrackIsoBDTmu2",
+                                             "[D+ ->  mu+  mu+ ^l]CC"  : "TrackIsoBDTmu3",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^mu+  mu+  l]CC"  : "BsMuMuTrackIsomu1",
+                                             "[D+ ->  mu+ ^mu+  l]CC"  : "BsMuMuTrackIsomu2",
+                                             "[D+ ->  mu+  mu+ ^l]CC"  : "BsMuMuTrackIsomu3",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+        self.D2Muee_Line = StrippingLine(D2Muee_name+"Line",
+                                         prescale = config["D2MueePrescale"],
+                                         postscale = config["Postscale"],
+                                         MDSTFlag = config["MDSTflag"],
+                                         selection = self.selD2Muee,
+                                         RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Dp',
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^l  l  l]CC"  : "ConeIso05mu",
+                                             "[D+ ->  l ^l  l]CC"  : "ConeIso05e1",
+                                             "[D+ ->  l  l ^l]CC"  : "ConeIso05e2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Dp',
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^l  l  l]CC"  : "ConeIso10mu",
+                                             "[D+ ->  l ^l  l]CC"  : "ConeIso10e1",
+                                             "[D+ ->  l  l ^l]CC"  : "ConeIso10e2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Dp',
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^l  l  l]CC"  : "ConeIso15mu",
+                                             "[D+ ->  l ^l  l]CC"  : "ConeIso15e1",
+                                             "[D+ ->  l  l ^l]CC"  : "ConeIso15e2",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^l  l  l]CC"  : "TrackIsoBDTmu",
+                                             "[D+ ->  l ^l  l]CC"  : "TrackIsoBDTe1",
+                                             "[D+ ->  l  l ^l]CC"  : "TrackIsoBDTe2",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^l  l  l]CC"  : "BsMuMuTrackIsomu1",
+                                             "[D+ ->  l ^l  l]CC"  : "BsMuMuTrackIsomu2",
+                                             "[D+ ->  l  l ^l]CC"  : "BsMuMuTrackIsomu3",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                         ) # closes Strippingline
+
+        self.D23Pi_Line = StrippingLine(D23Pi_name+"Line",
+                                        prescale = config["D23PiPrescale"],
+                                        postscale = config["Postscale"],
+                                        MDSTFlag = config["MDSTflag"],
+                                        selection = self.selD23Pi,
+                                        RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Dp',
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^pi+  pi+  pi-]CC"  : "ConeIso05pi1",
+                                             "[D+ ->  pi+ ^pi+  pi-]CC"  : "ConeIso05pi2",
+                                             "[D+ ->  pi+  pi+ ^pi-]CC"  : "ConeIso05pi3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Dp',
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^pi+  pi+  pi-]CC"  : "ConeIso10pi1",
+                                             "[D+ ->  pi+ ^pi+  pi-]CC"  : "ConeIso10pi2",
+                                             "[D+ ->  pi+  pi+ ^pi-]CC"  : "ConeIso10pi3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Dp',
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^pi+  pi+  pi-]CC"  : "ConeIso15pi1",
+                                             "[D+ ->  pi+ ^pi+  pi-]CC"  : "ConeIso15pi2",
+                                             "[D+ ->  pi+  pi+ ^pi-]CC"  : "ConeIso15pi3",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^pi+  pi+  pi-]CC"  : "TrackIsoBDTpi1",
+                                             "[D+ ->  pi+ ^pi+  pi-]CC"  : "TrackIsoBDTpi2",
+                                             "[D+ ->  pi+  pi+ ^pi-]CC"  : "TrackIsoBDTpi3",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[D+ -> ^pi+  pi+  pi-]CC"  : "TrackIsoBDTpi1",
+                                             "[D+ ->  pi+ ^pi+  pi-]CC"  : "TrackIsoBDTpi2",
+                                             "[D+ ->  pi+  pi+ ^pi-]CC"  : "TrackIsoBDTpi3",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        ) # closes Strippingline 
+
+#############################################################################
+
+        self.registerLine(self.D23Mu_Line)
+        self.registerLine(self.D2Muee_Line)
+        self.registerLine(self.D23Pi_Line)        
+       
+#############################################################################
+
+    def makeD23Mu(self,name):
+    
+        D23Mu = DaVinci__N3BodyDecays("Combine"+name)
+        D23Mu.DecayDescriptors = [ "[D+ -> mu+ mu+ mu-]cc","[D+ -> mu+ mu+ mu+]cc" ]
+        D23Mu.DaughtersCuts = { "mu+" : self.TrackCuts }
+        
+        D23Mu.Combination12Cut = self.Combination12Cuts
+        D23Mu.CombinationCut   = self.CombinationCutsLoose
+        D23Mu.MotherCut        = self.MotherCuts
+
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+   
+        return Selection (name, Algorithm = D23Mu, RequiredSelections = [ _myMuons ])
+
+#############################################################################
+
+    def makeD2Muee(self,name):
+    
+        D2Muee = DaVinci__N3BodyDecays("Combine"+name)
+        D2Muee.DecayDescriptors = [ "[D+ -> mu+ e+ e-]cc","[D+ -> mu- e+ e+]cc","[D+ -> mu+ e+ e+]cc" ]
+        D2Muee.DaughtersCuts = { "mu+" : self.TrackCuts, "e+" : self.TrackCuts }
+        
+        D2Muee.Combination12Cut = self.Combination12Cuts
+        D2Muee.CombinationCut   = self.CombinationCutsLoose
+        D2Muee.MotherCut        = self.MotherCuts
+
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+        _myElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+    
+        return Selection (name, Algorithm = D2Muee, RequiredSelections = [ _myMuons, _myElectrons ])
+
+#############################################################################
+
+    def makeD23Pi(self,name):
+    
+        D23Pi = DaVinci__N3BodyDecays("Combine"+name)
+        D23Pi.DecayDescriptors = [ "[D+ -> pi+ pi+ pi-]cc" ]
+        D23Pi.DaughtersCuts = { "pi+" : self.TrackCuts }
+        
+        D23Pi.Combination12Cut = self.Combination12Cuts
+        D23Pi.CombinationCut   = self.CombinationCutsTight
+        D23Pi.MotherCut        = self.MotherCuts
+
+        _myPions = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+    
+        return Selection (name, Algorithm = D23Pi, RequiredSelections = [ _myPions ])
+
+#############################################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingDarkBoson.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingDarkBoson.py
new file mode 100644
index 000000000..536db561b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingDarkBoson.py
@@ -0,0 +1,941 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+'''
+Dark Bosons (ALPs, inflatons, WTFs, etc)
+
+Author: M. Williams, D. Craik
+'''
+__author__ = ['Mike Williams', 'Dan Craik']
+
+moduleName = 'DarkBoson'
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+import re
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from PhysSelPython.Wrappers import EventSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from Configurables import LoKi__VoidFilter
+from StandardParticles import StdAllNoPIDsPions, StdAllNoPIDsKaons, \
+     StdAllNoPIDsProtons, StdNoPIDsUpPions, StdAllLooseMuons, \
+     StdLooseDownMuons
+from Beauty2Charm_LoKiCuts import LoKiCuts
+from StandardParticles import StdAllLooseGammaLL, StdAllLooseGammaDD, \
+    StdAllLooseElectrons, StdLooseAllPhotons#, StdDiElectronFromTracks
+from Configurables import SubstitutePID
+from copy import deepcopy
+from CommonParticles.Utils import *
+from Configurables import DiElectronMaker,ProtoParticleCALOFilter
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+# Default configuration dictionary
+default_config = {
+    'NAME' : 'DarkBoson',
+    'BUILDERTYPE' : 'DarkBosonConf' ,
+    'STREAMS' : {
+        'Bhadron' : [
+           'StrippingB2KX2KKPiDarkBosonLine',
+           'StrippingB2KpiX2KKPiDarkBosonLine',
+           'StrippingB2KX2KKPiMDarkBosonLine',
+           'StrippingB2KpiX2KKPiMDarkBosonLine',
+           'StrippingB2KX2PiPiPiDarkBosonLine',
+           'StrippingB2KpiX2PiPiPiDarkBosonLine',
+           'StrippingB2KX2PiPiPiMDarkBosonLine',
+           'StrippingB2KpiX2PiPiPiMDarkBosonLine',
+           'StrippingB2KX2EtaPiPi23PIDarkBosonLine',
+           'StrippingB2KpiX2EtaPiPi23PIDarkBosonLine',
+           'StrippingB2KX2EtaPiPi2GGDarkBosonLine',
+           'StrippingB2KpiX2EtaPiPi2GGDarkBosonLine',
+           'StrippingB2KX24PiDarkBosonLine',
+           'StrippingB2KpiX24PiDarkBosonLine',
+           'StrippingB2KX26PiDarkBosonLine',
+           'StrippingB2KpiX26PiDarkBosonLine',
+           'StrippingB2KX22K2PiDarkBosonLine',
+           'StrippingB2KpiX22K2PiDarkBosonLine',
+           'StrippingB2KX24KDarkBosonLine',
+           'StrippingB2KpiX24KDarkBosonLine',
+           ],
+        'Dimuon' : [
+           'StrippingB2KpiX2MuMuDDDarkBosonLine',
+           'StrippingB2KpiX2MuMuDDSSDarkBosonLine',
+           #'StrippingB2KKX2MuMuDDDarkBosonLine',
+           #'StrippingB2KKX2MuMuDDSSDarkBosonLine',
+           'StrippingB2KX2MuMuDDDarkBosonLine',
+           'StrippingB2KX2MuMuDDSSDarkBosonLine',
+           #'StrippingB2KpiX2PiPiDDDarkBosonLine',
+           #'StrippingB2KKX2PiPiDDDarkBosonLine',
+           #'StrippingB2KX2PiPiDDDarkBosonLine',
+           #'StrippingB2KX2PiPiDDSSDarkBosonLine',
+           #'StrippingB2RhoX2MuMuDDDarkBosonLine',
+           #'StrippingB2KpiX2KKDDDarkBosonLine',
+           #'StrippingB2KKX2KKDDDarkBosonLine',
+           #'StrippingB2KX2KKDDDarkBosonLine',
+           #'StrippingB2KX2KKDDSSDarkBosonLine',
+           ],
+        'Leptonic' : [
+           'StrippingB2KpiX2MuMuDarkBosonLine',
+           'StrippingB2KpiX2MuMuSSDarkBosonLine',
+           #'StrippingB2KKX2MuMuDarkBosonLine',
+           #'StrippingB2KKX2MuMuSSDarkBosonLine',
+           'StrippingB2KX2MuMuDarkBosonLine',
+           'StrippingB2KX2MuMuSSDarkBosonLine',
+           'StrippingB2KpiX2PiPiDarkBosonLine',
+           #'StrippingB2KKX2PiPiDarkBosonLine',
+           'StrippingB2KX2PiPiDarkBosonLine',
+           'StrippingB2KX2PiPiSSDarkBosonLine',
+           #'StrippingB2RhoX2MuMuDarkBosonLine',
+           'StrippingB2KpiX2KKDarkBosonLine',
+           #'StrippingB2KKX2KKDarkBosonLine',
+           'StrippingB2KX2KKDarkBosonLine',
+           'StrippingB2KX2KKSSDarkBosonLine',
+           'StrippingB2KpiX2EEDarkBosonLine',
+           'StrippingB2KpiX2EESSDarkBosonLine',
+           #'StrippingB2KKX2EEDarkBosonLine',
+           #'StrippingB2KKX2EESSDarkBosonLine',
+           'StrippingB2KX2EEDarkBosonLine',
+           'StrippingB2KX2EESSDarkBosonLine',
+           'StrippingB2JKDarkBosonLine',
+           'StrippingB2JKstDarkBosonLine',
+           'StrippingB2KstX2GammaGammaDarkBosonLine',
+           'StrippingB2KstX2PiGammaDarkBosonLine',
+           'StrippingB2KstX2PiGammaMDarkBosonLine',
+           ]
+    },
+    'WGs'     : [ 'RD' ],
+    'CONFIG'  : {
+    "KB" : { # K directly from B
+    'TRCHI2DOF_MAX' : 3,
+    'PT_MIN'        : '250*MeV',
+    'P_MIN'         : '2000*MeV',
+    'MIPCHI2DV_MIN' : 9,
+    'TRGHP_MAX'     : 0.3,
+    'PROBNNK_MIN'   : 0.1,
+    },
+    "KBhard" : { # K directly from B only for B -> KS0(pipi) K
+    'TRCHI2DOF_MAX' : 3,
+    'PT_MIN'        : '250*MeV',
+    'P_MIN'         : '3000*MeV',
+    'MIPCHI2DV_MIN' : 36,
+    'TRGHP_MAX'     : 0.3,
+    'PROBNNK_MIN'   : 0.2,
+    },
+    "PiB" : { # pi directly from B
+    'TRCHI2DOF_MAX' : 3,
+    'PT_MIN'        : '250*MeV',
+    'P_MIN'         : '2000*MeV',
+    'MIPCHI2DV_MIN' : 9,
+    'TRGHP_MAX'     : 0.3,
+    'PROBNNpi_MIN'  : 0.2
+    },
+    "KX" : { # K from X
+    'TRCHI2DOF_MAX' : 3,
+    'PT_MIN'        : '250*MeV',
+    'P_MIN'         : '3000*MeV',
+    'MIPCHI2DV_MIN' : 25,
+    'TRGHP_MAX'     : 0.3,
+    'PROBNNK_MIN'   : 0.1
+    },
+    "PiX" : { # pi from X
+    'TRCHI2DOF_MAX' : 3,
+    'PT_MIN'        : '250*MeV',
+    'P_MIN'         : '3000*MeV',
+    'MIPCHI2DV_MIN' : 36,
+    'TRGHP_MAX'     : 0.3,
+    'PROBNNpi_MIN'  : 0.2
+    },
+    "KDX" : { # K DOWN from X
+    'TRCHI2DOF_MAX' : 4,
+    'PT_MIN'        : '125*MeV',
+    'P_MIN'         : '0*MeV',
+    'MIPCHI2DV_MIN' : 25,
+    'TRGHP_MAX'     : 0.3,
+    'PROBNNK_MIN'   : 0.1
+    },
+    "PiDX" : { # pi DOWN from X
+    'TRCHI2DOF_MAX' : 4,
+    'PT_MIN'        : '125*MeV',
+    'P_MIN'         : '0*MeV',
+    'MIPCHI2DV_MIN' : 25,
+    'TRGHP_MAX'     : 0.3,
+    'PROBNNpi_MIN'  : 0.1
+    },
+    "MuX" : { # muon from X
+    'TRCHI2DOF_MAX' : 3,
+    'PT_MIN'        : '100*MeV',
+    'P_MIN'         : '0*MeV',
+    'MIPCHI2DV_MIN' : 9,
+    'TRGHP_MAX'     : 0.3,
+    'PIDmu_MIN'     : -5
+    },
+    "MuJ" : { # muon from J/psi
+    'TRCHI2DOF_MAX' : 4,
+    'PT_MIN'        : '125*MeV',
+    'P_MIN'         : '0*MeV',
+    'MIPCHI2DV_MIN' : 25,
+    'TRGHP_MAX'     : 0.3,
+    'PIDmu_MIN'     : -4
+    },
+    "E" : { # electron cuts
+    'TRCHI2DOF_MAX' : 5,
+    'MIPCHI2DV_MIN' : 9,
+    'PT_MIN'        : '100*MeV',
+    'TRGHP_MAX'     : 0.4,
+    'PIDe_MIN'      : 0
+    },
+    "gX" : { # gamma from X
+    'PT_MIN'        : '500*MeV',
+    'P_MIN'         : '1000*MeV',
+    'CL_MIN'        : '0.3',
+    },
+    "etaX" : { # eta->gg from X
+    'MM_MIN'        : '450*MeV',
+    'MM_MAX'        : '650*MeV',
+    'PT_MIN'        : '500*MeV',
+    'P_MIN'         : '2000*MeV',
+    'CL_MIN'        : '0.2',
+    },
+    "pizMX" : { # merged pi0 from X
+    'PT_MIN'        : '500*MeV',
+    'P_MIN'         : '3000*MeV',
+    'CL_MIN'        : '0.1',
+    },
+    "pizRX" : { # resolved pi0 from X
+    'PT_MIN'        : '500*MeV',
+    'CL_MIN'        : '0.1',
+    },
+    "XLL" : { # making the X for LL
+    'VCHI2DOF_MAX'  : 10,
+    'BPVVDCHI2_MIN' : 25,
+    'PT_MIN'        : '250*MeV'
+    },
+    "XLLhard" : { # making the X for LL hard vertex for the pions
+    'VCHI2DOF_MAX'  : 5,
+    'BPVVDCHI2_MIN' : 25,
+    'PT_MIN'        : '250*MeV'
+    },
+    "XDD" : { # making X for DD
+    'VCHI2DOF_MAX'  : 15,
+    'BPVVDCHI2_MIN' : 25,
+    'PT_MIN'        : '0*MeV'
+    },
+    "XGG" : { # making the X for diphoton
+    'PT_MIN'        : '2000*MeV'
+    },
+    "X3H" : { # making the X for 3H decays
+    'VCHI2DOF_MAX'  : 10,
+    'BPVVDCHI2_MIN' : 25,
+    'PT_MIN'        : '500*MeV',
+    'SUMPT_MIN'     : '0*MeV',
+    'HAD_MINIPCHI2_MIN' : 16,
+    },
+    "XETAHH" : { # making the X for eta pipi decays
+    'VCHI2DOF_MAX'  : 10,
+    'BPVVDCHI2_MIN' : 25,
+    'PT_MIN'        : '2000*MeV',
+    'SUMPT_MIN'     : '0*MeV',
+    'HAD_MINIPCHI2_MIN' : 16,
+    },
+    "J" : { # cuts on J/psi
+    'VCHI2DOF_MAX'  : 12,
+    'ADAMASS_MAX'   : '100*MeV',
+    },
+    "B2KX" : { # B -> K X
+    'SUMPT_MIN'     : '0*MeV',
+    'VCHI2DOF_MAX'  : 15,
+    'BPVIPCHI2_MAX' : 10,
+    'BPVLTIME_MIN'  : '0.2*ps',
+    'AM_MIN'        : '4800*MeV',
+    'AM_MAX'        : '5800*MeV',
+    'HAD_MINIPCHI2_MIN' : 25,
+    'PT_MIN'        : '1000*MeV'
+    },
+    "B2KXTight" : { # B -> K X
+    'SUMPT_MIN'     : '0*MeV',
+    'VCHI2DOF_MAX'  : 15,
+    'BPVIPCHI2_MAX' : 10,
+    'BPVLTIME_MIN'  : '0.2*ps',
+    'AM_MIN'        : '4800*MeV',
+    'AM_MAX'        : '5800*MeV',
+    'HAD_MINIPCHI2_MIN' : 25,
+    'PT_MIN'        : '3000*MeV'
+    },
+    "B2HHX" : { # B -> Kpi X, KK X
+    'SUMPT_MIN'     : '0*MeV',
+    'VCHI2DOF_MAX'  : 15,
+    'BPVIPCHI2_MAX' : 10,
+    'BPVLTIME_MIN'  : '0.2*ps',
+    'AM_MIN'        : '4800*MeV',
+    'AM_MAX'        : '5800*MeV',
+    'HAD_MINIPCHI2_MIN' : 9,
+    'PT_MIN'        : '1000*MeV'
+    },
+    "B2HHXTight" : { # B -> Kpi X, KK X
+    'SUMPT_MIN'     : '0*MeV',
+    'VCHI2DOF_MAX'  : 15,
+    'BPVIPCHI2_MAX' : 10,
+    'BPVLTIME_MIN'  : '0.2*ps',
+    'AM_MIN'        : '4800*MeV',
+    'AM_MAX'        : '5800*MeV',
+    'HAD_MINIPCHI2_MIN' : 9,
+    'PT_MIN'        : '3000*MeV'
+    },
+    "B2KstX_X2neutrals" : { # B -> Kpi X, X -> gg, gpi0
+    'SUMPT_MIN'     : '0*MeV',
+    'BPVIPCHI2_MAX' : 10,
+    'BPVLTIME_MIN'  : '0.2*ps',
+    #'BPVDIRA_MIN'   : 0.999,
+    'AM_MIN'        : '4800*MeV',
+    'AM_MAX'        : '5800*MeV',
+    'PT_MIN'        : '3000*MeV'
+    },
+    "Prescales" : { "SS" : 0.1, "DD" : 1.0, "KK": 0.25},
+    "GECNTrkMax" : 250,
+    "CommonRelInfoTools" : [ { "Type": "RelInfoVertexIsolation", "Location":"VtxIsoInfo" },
+                             { "Type": "RelInfoVertexIsolationBDT", "Location":"VtxIsoInfoBDT" },
+                             { "Type" : "RelInfoBs2MuMuBIsolations",
+                               "Variables" : [],
+                               "Location"  : "BsMuMuBIsolation",
+                               "tracktype" : 3,
+                               "makeTrackCuts" : False, },
+                             ]
+    }
+}
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+class DarkBosonConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, moduleName, default_config) :
+
+        LineBuilder.__init__(self, moduleName, default_config)
+        piD = DataOnDemand(Location="Phys/StdNoPIDsDownPions/Particles")
+        kD = DataOnDemand(Location="Phys/StdLooseDownKaons/Particles")
+        pizM = DataOnDemand(Location="Phys/StdLooseMergedPi0/Particles")
+        pizR = DataOnDemand(Location="Phys/StdLooseResolvedPi0/Particles")
+        eta = DataOnDemand(Location="Phys/StdLooseResolvedEta/Particles")
+        gC = MergedSelection("gC",RequiredSelections=[StdAllLooseGammaLL,StdAllLooseGammaDD])
+
+        # pre-filter inputs
+        kB = filterInputs('KB',default_config['KB'],[StdAllNoPIDsKaons])
+        kBhard = filterInputs('KBhard',default_config['KBhard'],[StdAllNoPIDsKaons])
+        piB = filterInputs('PiB',default_config['PiB'],[StdAllNoPIDsPions])
+        kX = filterInputs('KX',default_config['KX'],[StdAllNoPIDsKaons])
+        piX = filterInputs('PiX',default_config['PiX'],[StdAllNoPIDsPions])
+        kDX = filterInputs('KDX',default_config['KDX'],[kD])
+        piDX = filterInputs('PiDX',default_config['PiDX'],[piD])
+        muX = filterInputs('MuX',default_config['MuX'],[StdAllLooseMuons])
+        muDX = filterInputs('MuDX',default_config['MuX'],[StdLooseDownMuons])
+        muJ = filterInputs('MuJ',default_config['MuJ'],[StdAllLooseMuons])
+
+        gX = filterInputs('gX',default_config['gX'],[StdLooseAllPhotons])
+        pizMX = filterInputs('pizMX',default_config['pizMX'],[pizM])
+        pizRX = filterInputs('pizRX',default_config['pizRX'],[pizR])
+        etaX = filterInputs('etaX',default_config['etaX'],[eta])
+
+        eta23piX = makeEta([piX,pizRX],"ForX")
+
+        # make/filter X
+        eestd = DataOnDemand(Location='Phys/StdDiElectronFromTracks/Particles')
+        ee = filterEE('OS',default_config['E'],default_config['XLL'],[eestd])
+        #eeDD = makeEEdd(config)
+        mmX = makeX('MuMu',default_config['XLL'],'KS0 -> mu+ mu-',[muX])
+        mmDDX = makeX('MuMuDD',default_config['XDD'],'KS0 -> mu+ mu-',[muDX])
+        kkX = makeX('KK',default_config['XLL'],'KS0 -> K+ K-',[kX])
+        kkDDX = makeX('KKDD',default_config['XDD'],'KS0 -> K+ K-',[kDX])
+        pipiX = makeX('PiPi',default_config['XLLhard'],'KS0 -> pi+ pi-',[piX])
+        pipiDDX = makeX('PiPiDD',default_config['XDD'],'KS0 -> pi+ pi-',[piDX])
+        ## 4-6H modes
+        fourpiX = makeX('4Pi',  default_config['XLL'],'KS0 -> pi+ pi+ pi- pi-',[piX])
+        sixpiX  = makeX('6Pi',  default_config['XLL'],'KS0 -> pi+ pi+ pi- pi- pi0 pi0',[piX,pizRX])
+        KKpipiX = makeX('2K2Pi',default_config['XLL'],'KS0 -> K+ K- pi+ pi-',[kX,piX])
+        fourKX  = makeX('4K',   default_config['XLL'],'KS0 -> K+ K+ K- K-',[kX])
+        ## gamma modes
+        ggX   = makeX2neutrals('GammaGamma',default_config['XGG'],'pi0 -> gamma gamma',[gX])
+        pigX  = makeX2neutrals('PiGamma',   default_config['XGG'],'eta -> pi0 gamma',[gX,pizRX])
+        pigMX = makeX2neutrals('PiGammaM',  default_config['XGG'],'eta -> pi0 gamma',[gX,pizMX])
+        ##HHH modes
+        kkpiX       = makeX('KKPi',       default_config['X3H'],'KS0 -> K+ K- pi0',[kX,pizRX])
+        kkpiMX      = makeX('KKPiM',      default_config['X3H'],'KS0 -> K+ K- pi0',[kX,pizMX])
+        pipipiX     = makeX('PiPiPi',     default_config['X3H'],'KS0 -> pi+ pi- pi0',[piX,pizRX])
+        pipipiMX    = makeX('PiPiPiM',    default_config['X3H'],'KS0 -> pi+ pi- pi0',[piX,pizMX])
+        #kkpiDDX     = makeX('KKPiDD',     default_config['XDD'],'KS0 -> K+ K- pi0',[kDX,pizRX])
+        #kkpiDDMX    = makeX('KKPiDDM',    default_config['XDD'],'KS0 -> K+ K- pi0',[kDX,pizMX])
+        #pipipiDDX   = makeX('PiPiPiDD',   default_config['XDD'],'KS0 -> pi+ pi- pi0',[piDX,pizRX])
+        #pipipiDDMX  = makeX('PiPiPiDDM',  default_config['XDD'],'KS0 -> pi+ pi- pi0',[piDX,pizMX])
+        etapipiGGX  = makeX('EtaPiPi2GG', default_config['XETAHH'],'KS0 -> eta pi+ pi-',[etaX,piX])
+        etapipi3PIX = makeX('EtaPiPi23PI',default_config['XETAHH'],'KS0 -> eta pi+ pi-',[eta23piX,piX])
+
+        # SS X
+        eeSS = filterEE('SS',default_config['E'],default_config['XLL'],[makeEESS()])
+        mmSSX = makeX('MuMuSS',default_config['XLL'],'[KS0 -> mu+ mu+]cc',[muX])
+        mmSSDDX = makeX('MuMuSSDD',default_config['XDD'],'[KS0 -> mu+ mu+]cc',[muDX])
+        kkSSX = makeX('KKSS',default_config['XLL'],'[KS0 -> K+ K+]cc',[kX])
+        kkSSDDX = makeX('KKSSDD',default_config['XDD'],'[KS0 -> K+ K+]cc',[kDX])
+        pipiSSX = makeX('PiPiSS',default_config['XLL'],'[KS0 -> pi+ pi+]cc',[piX])
+        pipiSSDDX = makeX('PiPiSSDD',default_config['XDD'],'[KS0 -> pi+ pi+]cc',[piDX])
+        preSS = default_config['Prescales']['SS']
+
+        preDD = default_config['Prescales']['DD']
+        preKK = default_config['Prescales']['KK']
+
+        j = makeJ(default_config['J'],[muJ])
+        kpiB = makeKst([kB,piB])
+
+        # B -> K pi lines
+        self._makeBLine('B2KpiX2MuMu',['[B0 -> KS0 K+ pi-]cc'],
+                        [mmX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX2MuMuDD',['[B0 -> K+ pi- KS0]cc'],
+                        [mmDDX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX2EE',['[B0 -> K+ pi- KS0]cc'],
+                        [ee,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX2KK',['[B0 -> K+ pi- KS0]cc'],
+                        [kkX,kB,piB],default_config['B2HHX'],preKK)
+
+        #self._makeBLine('B2KpiX2KKDD',['[B0 -> K+ pi- KS0]cc'],
+        #                [kkDDX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX2KKPi',['[B0 -> K+ pi- KS0]cc'],
+                        [kkpiX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX2KKPiM',['[B0 -> K+ pi- KS0]cc'],
+                        [kkpiMX,kB,piB],default_config['B2HHX'])
+
+        #self._makeBLine('B2KpiX2KKPiDD',['[B0 -> K+ pi- KS0]cc'],
+        #                [kkpiDDX,kB,piB],default_config['B2HHX'])
+
+        #self._makeBLine('B2KpiX2KKPiDDM',['[B0 -> K+ pi- KS0]cc'],
+        #                [kkpiDDMX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX2PiPi',['[B0 -> K+ pi- KS0]cc'],
+                        [pipiX,kB,piB],default_config['B2HHX'],preSS)
+
+        #self._makeBLine('B2KpiX2PiPiDD',['[B0 -> K+ pi- KS0]cc'],
+        #                [pipiDDX,kB,piB],default_config['B2HHX'],preDD)
+
+        self._makeBLine('B2KpiX2PiPiPi',['[B0 -> K+ pi- KS0]cc'],
+                        [pipipiX,kB,piB],default_config['B2HHXTight'])
+
+        self._makeBLine('B2KpiX2PiPiPiM',['[B0 -> K+ pi- KS0]cc'],
+                        [pipipiMX,kB,piB],default_config['B2HHX'])
+
+        #self._makeBLine('B2KpiX2PiPiPiDD',['[B0 -> K+ pi- KS0]cc'],
+        #                [pipipiDDX,kB,piB],default_config['B2HHX'])
+
+        #self._makeBLine('B2KpiX2PiPiPiDDM',['[B0 -> K+ pi- KS0]cc'],
+        #                [pipipiDDMX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX2EtaPiPi2GG',['[B0 -> K+ pi- KS0]cc'],
+                        [etapipiGGX,kB,piB],default_config['B2HHXTight'])
+
+        self._makeBLine('B2KpiX2EtaPiPi23PI',['[B0 -> K+ pi- KS0]cc'],
+                        [etapipi3PIX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX24Pi',['[B0 -> K+ pi- KS0]cc'],
+                        [fourpiX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX26Pi',['[B0 -> K+ pi- KS0]cc'],
+                        [sixpiX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX22K2Pi',['[B0 -> K+ pi- KS0]cc'],
+                        [KKpipiX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX24K',['[B0 -> K+ pi- KS0]cc'],
+                        [fourKX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX2MuMuSS',['[B0 -> K+ pi- KS0]cc'],
+                        [mmSSX,kB,piB],default_config['B2HHX'],preSS)
+
+        self._makeBLine('B2KpiX2MuMuDDSS',['[B0 -> K+ pi- KS0]cc'],
+                        [mmSSDDX,kB,piB],default_config['B2HHX'])
+
+        self._makeBLine('B2KpiX2EESS',['[B0 -> K+ pi- KS0]cc'],
+                        [eeSS,kB,piB],default_config['B2HHX'],preSS)
+
+        self._makeBLine('B2KstX2GammaGamma',['[B0 -> K*(892)0 pi0]cc'],
+                        [ggX,kpiB],default_config['B2KstX_X2neutrals'])
+
+        self._makeBLine('B2KstX2PiGamma',['[B0 -> K*(892)0 eta]cc'],
+                        [pigX,kpiB],default_config['B2KstX_X2neutrals'])
+
+        self._makeBLine('B2KstX2PiGammaM',['[B0 -> K*(892)0 eta]cc'],
+                        [pigMX,kpiB],default_config['B2KstX_X2neutrals'])
+
+        # B -> K K lines
+        #self._makeBLine('B2KKX2MuMu',['B0 -> K+ K- KS0'],
+        #                [mmX,kB],default_config['B2HHX'])
+
+        #self._makeBLine('B2KKX2MuMuDD',['B0 -> K+ K- KS0'],
+        #                [mmDDX,kB],default_config['B2HHX'])
+
+        #self._makeBLine('B2KKX2EE',['B0 -> K+ K- KS0'],
+        #                [ee,kB],default_config['B2HHX'])
+
+        #self._makeBLine('B2KKX2MuMuSS',['B0 -> K+ K- KS0'],
+        #                [mmSSX,kB],default_config['B2HHX'],preSS)
+
+        #self._makeBLine('B2KKX2MuMuDDSS',['B0 -> K+ K- KS0'],
+        #                [mmSSDDX,kB],default_config['B2HHX'])
+
+        #self._makeBLine('B2KKX2EESS',['B0 -> K+ K- KS0'],
+        #                [eeSS,kB],default_config['B2HHX'],preSS)
+
+        #self._makeBLine('B2KKX2KK',['B0 -> K+ K- KS0'],
+        #                [kkX,kB],default_config['B2HHX'])
+
+        #self._makeBLine('B2KKX2KKDD',['B0 -> K+ K- KS0'],
+        #                [kkDDX,kB],default_config['B2HHX'])
+
+        #self._makeBLine('B2KKX2PiPi',['B0 -> K+ K- KS0'],
+        #                [pipiX,kB],default_config['B2HHX'],preDD)
+
+        #self._makeBLine('B2KKX2PiPiDD',['B0 -> K+ K- KS0'],
+        #                [pipiDDX,kB],default_config['B2HHX'])
+
+        # B -> K lines
+        self._makeBLine('B2KX2MuMu',['[B+ -> K+ KS0]cc'],
+                        [mmX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2MuMuDD',['[B+ -> K+ KS0]cc'],
+                        [mmDDX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2EE',['[B+ -> K+ KS0]cc'],
+                        [ee,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2KK',['[B+ -> K+ KS0]cc'],
+                        [kkX,kB],default_config['B2KX'])
+
+        #self._makeBLine('B2KX2KKDD',['[B+ -> K+ KS0]cc'],
+        #                [kkDDX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2KKPi',['[B+ -> K+ KS0]cc'],
+                        [kkpiX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2KKPiM',['[B+ -> K+ KS0]cc'],
+                        [kkpiMX,kB],default_config['B2KX'])
+
+        #self._makeBLine('B2KX2KKPiDD',['[B+ -> K+ KS0]cc'],
+        #                [kkpiDDX,kB],default_config['B2KX'])
+
+        #self._makeBLine('B2KX2KKPiDDM',['[B+ -> K+ KS0]cc'],
+        #                [kkpiDDMX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2PiPi',['[B+ -> K+ KS0]cc'],
+                        [pipiX,kBhard],default_config['B2KX'])
+
+        #self._makeBLine('B2KX2PiPiDD',['[B+ -> K+ KS0]cc'],
+        #                [pipiDDX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2PiPiPi',['[B+ -> K+ KS0]cc'],
+                        [pipipiX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2PiPiPiM',['[B+ -> K+ KS0]cc'],
+                        [pipipiMX,kB],default_config['B2KX'])
+
+        #self._makeBLine('B2KX2PiPiPiDD',['[B+ -> K+ KS0]cc'],
+        #                [pipipiDDX,kB],default_config['B2KX'])
+
+        #self._makeBLine('B2KX2PiPiPiDDM',['[B+ -> K+ KS0]cc'],
+        #                [pipipiDDMX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2EtaPiPi2GG',['[B+ -> K+ KS0]cc'],
+                        [etapipiGGX,kB],default_config['B2KXTight'])
+
+        self._makeBLine('B2KX2EtaPiPi23PI',['[B+ -> K+ KS0]cc'],
+                        [etapipi3PIX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX24Pi',['[B+ -> K+ KS0]cc'],
+                        [fourpiX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX26Pi',['[B+ -> K+ KS0]cc'],
+                        [sixpiX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX22K2Pi',['[B+ -> K+ KS0]cc'],
+                        [KKpipiX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX24K',['[B+ -> K+ KS0]cc'],
+                        [fourKX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2MuMuSS',['[B+ -> K+ KS0]cc'],
+                        [mmSSX,kB],default_config['B2KX'],preSS)
+
+        self._makeBLine('B2KX2MuMuDDSS',['[B+ -> K+ KS0]cc'],
+                        [mmSSDDX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2EESS',['[B+ -> K+ KS0]cc'],
+                        [eeSS,kB],default_config['B2KX'],preSS)
+
+        self._makeBLine('B2KX2KKSS',['[B+ -> K+ KS0]cc'],
+                        [kkSSX,kB],default_config['B2KX'],preSS)
+
+        #self._makeBLine('B2KX2KKDDSS',['[B+ -> K+ KS0]cc'],
+        #                [kkSSDDX,kB],default_config['B2KX'])
+
+        self._makeBLine('B2KX2PiPiSS',['[B+ -> K+ KS0]cc'],
+                        [pipiSSX,kB],default_config['B2KX'],preSS)
+
+        #self._makeBLine('B2KX2PiPiDDSS',['[B+ -> K+ KS0]cc'],
+        #                [pipiSSDDX,kB],default_config['B2KX'])
+
+        # B -> J/psi lines
+        self._makeBLine('B2JK',['[B+ -> J/psi(1S) K+]cc'],
+                        [j,kB],default_config['B2KX'])
+
+        kst = filterKst()
+        self._makeBLine('B2JKst',['[B0 -> J/psi(1S) K*(892)0]cc'],
+                        [j,kst],default_config['B2KX'])
+        rho = makeRho([piB])
+        #self._makeBLine('B2RhoX2MuMu',['B0 -> rho(770)0 KS0'],[rho,mmX],
+        #                default_config['B2HHX'])
+        #self._makeBLine('B2RhoX2MuMuDD',['B0 -> rho(770)0 KS0'],[rho,mmDDX],
+        #                default_config['B2HHX'])
+
+
+    def _makeBLine(self,tag,dec,inputs,default_config,pre=1.0):
+        sel = makeB(tag,dec,inputs,default_config)
+        self._makeLine(tag,sel,pre)
+
+    def _makeLine(self,name,sel,pre):
+        filt = {'Code' :
+                "(recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG)"\
+                " < %s )" \
+                % default_config['CONFIG']['GECNTrkMax'],
+                'Preambulo' : [ "from LoKiTracks.decorators import *",
+                                'from LoKiCore.functions    import *' ]}
+        name = name + "DarkBosonLine"
+        hlt=""
+        if name.find('KstX2PiGamma') > -1 or name.find('KstX2GammaGamma') > -1:
+            hlt = "HLT_PASS_RE('Hlt2Topo2Body.*Decision')"
+        elif name.find('MuMu'):
+            pass
+        else:
+            hlt = "HLT_PASS_RE('Hlt2Topo.*Body.*Decision')"
+        relInfoTools=self._getRelInfo(name)
+        #if not relInfoTools:
+        #    relInfoTools = default_config['CONFIG']['CommonRelInfoTools']
+
+        sline = StrippingLine(name,pre,selection=sel,HLT2=hlt,checkPV=True,FILTER=filt,
+                              EnableFlavourTagging=False,
+                              RelatedInfoTools = relInfoTools ) #default_config['CONFIG']['CommonRelInfoTools'] )
+        self.registerLine(sline)
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+    def _getRelInfo(self,name):
+        relInfoTools = []
+        if name.find('DD')>-1:
+            return relInfoTools ## DD lines go to DST so no relInfoTools
+        decStr = self._getDecStr(name)
+        if decStr=="":
+            return relInfoTools ## decay not known
+        dls = self._getDaugLocs(decStr,"ConeIso05p")
+        relInfoTools.append(
+        { "Type" : "RelInfoConeVariables",
+          "ConeAngle" : 0.5,
+          "Variables" : [],
+          "Location"  : 'ConeIso05B0',
+          "DaughterLocations" : dls, } )
+        dls = self._getDaugLocs(decStr,"ConeIso10p")
+        relInfoTools.append(
+        { "Type" : "RelInfoConeVariables",
+          "ConeAngle" : 1.0,
+          "Variables" : [],
+          "Location"  : 'ConeIso10B0',
+          "DaughterLocations" : dls, } )
+        dls = self._getDaugLocs(decStr,"ConeIso15p")
+        relInfoTools.append(
+        { "Type" : "RelInfoConeVariables",
+          "ConeAngle" : 1.5,
+          "Variables" : [],
+          "Location"  : 'ConeIso15B0',
+          "DaughterLocations" : dls, } )
+#        dls = self._getDaugLocs(name,"TrackIsoBDTp")
+#        relInfoTools.append(
+#        { "Type": "RelInfoTrackIsolationBDT",
+#          "Variables" : 0,
+#          "DaughterLocations" : dls, } )
+#        dls = self._getDaugLocs(name,"BsMuMuTrackIsop")
+#        relInfoTools.append(
+#        { "Type" : "RelInfoBs2MuMuTrackIsolations",
+#          "Variables" : [],
+#          "IsoTwoBody" : True,
+#          "DaughterLocations" : dls, } )
+        relInfoTools.extend(default_config['CONFIG']['CommonRelInfoTools'])
+        return relInfoTools
+
+    def _getDaugLocs(self,decay,locName):
+        dls = {}
+        decay = decay.split('^')
+        for i in range(1,len(decay)):
+            dec="^".join([" ".join(decay[:i])," ".join(decay[i:])])
+            loc=locName+str(i)
+            dls[dec] = loc
+        return dls
+
+    def _getDecStr(self,name):
+        decay = ""
+        if name.find('JKst')>-1:
+            decay = "[ Beauty -> ^(J/psi(1S) -> ^mu+ ^mu-) ^(K*(892)0 -> ^K+ ^pi-) ]CC"
+        elif name.find('JK')>-1:
+            decay = "[ Beauty -> ^(J/psi(1S) -> ^mu+ ^mu-) ^K+ ]CC"
+        else:
+            bpart = self._getBpart(name)
+            xpart = self._getXpart(name)
+            if bpart and xpart:
+                decay = "".join(["[ ",bpart,"^(",xpart,") ]CC"])
+        #print "getDecStr: ",name," ",decay
+        return decay
+
+    def _getXpart(self,name):
+        ret=None
+        if name.find('X26Pi')>-1:
+            ret= 'KS0 -> ^pi+ ^pi+ ^pi- ^pi- ^(pi0 -> ^gamma ^gamma) ^(pi0 -> ^gamma ^gamma) '
+        elif name.find('X24Pi')>-1:
+            ret= 'KS0 -> ^pi+ ^pi+ ^pi- ^pi-'
+        elif name.find('X22K2Pi')>-1:
+            ret= 'KS0 -> ^K+ ^pi+ ^K- ^pi-'
+        elif name.find('X24K')>-1:
+            ret= 'KS0 -> ^K+ ^K+ ^K- ^K-'
+        elif name.find('X2PiPiPi')>-1:
+            ret= 'KS0 -> ^pi+ ^pi- ^pi0'
+            if name.find('M')==-1:
+                ret = ret.replace("pi0","(pi0 -> ^gamma ^gamma) ")
+        elif name.find('X2KKPi')>-1:
+            ret= 'KS0 -> ^K+ ^K- ^pi0'
+            if name.find('M')==-1:
+                ret = ret.replace("pi0","(pi0 -> ^gamma ^gamma) ")
+        elif name.find('X2EtaPiPi')>-1:
+            ret= 'KS0 -> ^eta ^pi+ ^pi-'
+            if name.find('2GG')>-1:
+                ret = ret.replace("eta","(eta -> ^gamma ^gamma) ")
+            else:
+                ret = ret.replace("eta","(eta -> ^pi+ ^pi- ^(pi0 -> ^gamma ^gamma) ) ")
+        elif name.find('X2MuMu')>-1:
+            ret= 'KS0 -> ^mu+ ^mu-'
+            if name.find('SS')>-1:
+                ret = "[ "+ret[:-1]+"+ ]CC "
+        elif name.find('X2EE')>-1:
+            ret= 'KS0 -> ^e+ ^e-'
+            if name.find('SS')>-1:
+                ret = "[ "+ret[:-1]+"+ ]CC "
+        elif name.find('X2PiPi')>-1:
+            ret= 'KS0 -> ^pi+ ^pi-'
+            if name.find('SS')>-1:
+                ret = "[ "+ret[:-1]+"+ ]CC "
+        elif name.find('X2KK')>-1:
+            ret= 'KS0 -> ^K+ ^K-'
+            if name.find('SS')>-1:
+                ret = "[ "+ret[:-1]+"+ ]CC "
+        elif name.find('X2GammaGamma')>-1:
+            ret= 'pi0 -> ^gamma ^gamma'
+        elif name.find('X2PiGamma')>-1:
+            ret= 'eta -> ^pi0 ^gamma'
+            if name.find('M')==-1:
+                ret = ret.replace("pi0","(pi0 -> ^gamma ^gamma) ")
+        return ret
+
+    def _getBpart(self,name):
+        if name.find('B2KX')>-1:
+            return "Beauty -> ^K+ "
+        elif name.find('B2KpiX')>-1:
+            return "Beauty -> ^K+ ^pi- "
+        elif name.find('B2KstX')>-1:
+            return "Beauty -> ^(K*(892)0 ->  ^K+  ^pi-) "
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+def filterInputs(which,conf,inputs):
+    keys = [key.split('_')[0] for key in conf.keys()]
+    code = LoKiCuts(keys,conf).code()
+    #code = LoKiCuts.combine(['INMUON',code])
+    photonCut = "(NINGENERATION( (ID=='gamma') & ((PT < 500*MeV) | (CL < 0.3)),1)==0)"
+    code = LoKiCuts.combine([photonCut,code])
+    #print "filterInputs: ", which, code
+    return Selection(which+'DarkBosonFilter',Algorithm=FilterDesktop(Code=code),
+                     RequiredSelections=inputs)
+
+def filterEE(which,econf,xconf,inputs):
+    code = "(ID=='J/psi(1S)') & (PT > %s) & (MINTREE('e+'==ABSID,PIDe) > %s)" \
+           % (xconf['PT_MIN'],econf['PIDe_MIN'])
+    code += " & (MINTREE('e+'==ABSID,MIPCHI2DV(PRIMARY)) > %s)" \
+            % econf['MIPCHI2DV_MIN']
+    code += " & (MINTREE('e+'==ABSID,PT) > %s)" % econf['PT_MIN']
+    code += " & (MAXTREE('e+'==ABSID,TRGHP) < %s)" % econf['TRGHP_MAX']
+    code = LoKiCuts.combine([code,LoKiCuts(['HASVERTEX','BPVVDCHI2','VCHI2DOF'],
+                                           xconf).code()])
+    #print "filterEE: ", code
+    sel = Selection(which+'FilterEEDarkBosonFilter',
+                    Algorithm=FilterDesktop(Code=code),
+                    RequiredSelections=inputs)
+    decstr = "J/psi(1S) -> e+ e-"
+    if which=='SS':
+        decstr = "[ J/psi(1S) -> e+ e+ ]CC"
+    sub = SubstitutePID(which+'EESubPIDDarkBoson',
+                        Code="DECTREE('"+decstr+"')")
+    sub.MaxChi2PerDoF = -666
+    sub.Substitutions = {decstr  : 'KS0'}
+    return Selection(which+'EESubPIDDarkBosonSel',Algorithm=sub,
+                     RequiredSelections=[sel])
+
+def makeEEdd(default_config):
+    eedd = DiElectronMaker('EEDDForDarkBoson')
+    eedd.Particle = "KS0"
+    selector = trackSelector(eedd, trackTypes=["Downstream"])
+    eedd.addTool(ProtoParticleCALOFilter, name='Electron')
+    eedd.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'%s'" \
+                               % default_config['PID']['E']['PIDe_MIN']]
+    eedd.DiElectronMassMax = 5000
+    eedd.DiElectronMassMin = 0
+    eedd.DiElectronPtMin = 250
+    eedd.ElectronPtMin = 100
+    eedd.ElectronPIDcut = default_config['PID']['E']['PIDe_MIN']
+
+    sel = Selection('EEDDDarkBosonSel',Algorithm=eedd)
+    code = LoKiCuts(['HASVERTEX','BPVVDCHI2','VCHI2DOF'],default_config['V']).code()
+    #print 'makeEEdd', code
+    return Selection('FilterEEDDDarkBoson',Algorithm=FilterDesktop(Code=code),
+                     RequiredSelections=[sel])
+
+def makeEESS():
+    eess = DiElectronMaker('EESSForDarkBoson')
+    eess.Particle = "J/psi(1S)"
+    selector = trackSelector(eess, trackTypes=["Long"])
+    eess.addTool(ProtoParticleCALOFilter, name='Electron')
+    eess.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>-2"]
+    eess.DiElectronMassMax = 5000
+    eess.DiElectronMassMin = 0
+    eess.DiElectronPtMin = 250
+    eess.ElectronPtMin = 100
+    eess.OppositeSign = False
+    return Selection('EESSDarkBosonSel',Algorithm=eess)
+
+def filterKst():
+    kst = DataOnDemand(Location='Phys/StdLooseDetachedKst2Kpi/Particles')
+    code = '(MIPCHI2DV(PRIMARY) > 25)'
+    return Selection('KstDarkBosonFilter',Algorithm=FilterDesktop(Code=code),
+                     RequiredSelections=[kst])
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+def makeX(which,default_config,dec,inputs):
+    comboCuts = "(AM < 5000*MeV) & (APT > %s)" % default_config['PT_MIN']
+    if(which.find('DD') < 0):
+        comboCuts += " & (ACUTDOCA(0.2*mm,''))"
+    comboCuts += "& (ADOCACHI2CUT(25,''))"
+    momCuts = LoKiCuts(['HASVERTEX','BPVVDCHI2','VCHI2DOF'],default_config).code()
+    momCuts = LoKiCuts.combine(['(BPVDIRA > 0)',momCuts])
+    if default_config.has_key('HAD_MINIPCHI2_MIN'):
+        momCuts += '& (NINGENERATION(ISBASIC & HASTRACK & (MIPCHI2DV(PRIMARY) < %s),1)==0)' \
+                   % default_config['HAD_MINIPCHI2_MIN']
+    x = CombineParticles(DecayDescriptors=[dec],
+                         CombinationCut=comboCuts,MotherCut=momCuts)
+    #print 'makeX:',which,comboCuts,momCuts
+    return Selection("X2"+which+"DarkBosonSel",Algorithm=x,
+                     RequiredSelections=inputs)
+
+def makeX2neutrals(which,default_config,dec,inputs):
+    #momCuts = "(MINTREE('e+'==ABSID,PIDe)>0.0)"
+    momCuts = "(M < 5000*MeV) & (PT > %s)" % default_config['PT_MIN']
+    #if(which.find('C') > -1):
+    #    momCuts += " & (INTREE( (ID=='gamma') & (ISBASIC) )) & (INTREE( HASTRACK ))"
+    x = CombineParticles(DecayDescriptors=[dec],
+                         MotherCut=momCuts,
+                         ParticleCombiners = {"" : "MomentumCombiner:PUBLIC"},
+                         ReFitPVs=False)#True)
+    #print 'makeX2neutrals:',which,momCuts
+    return Selection("X2"+which+"DarkBosonSel",Algorithm=x,
+                     RequiredSelections=inputs)
+
+
+def makeJ(default_config,inputs):
+    comboCuts = "(ADAMASS('J/psi(1S)') < %s)" % default_config['ADAMASS_MAX']
+    comboCuts += " & (ACUTDOCA(0.2*mm,''))"
+    comboCuts += "& (ADOCACHI2CUT(25,''))"
+    momCuts = LoKiCuts(['HASVERTEX','VCHI2DOF'],default_config).code()
+    momCuts = LoKiCuts.combine(['(BPVDIRA > 0)',momCuts])
+    j = CombineParticles(DecayDescriptors=['J/psi(1S) -> mu+ mu-'],
+                         CombinationCut=comboCuts,MotherCut=momCuts)
+    #print 'makeJ:',comboCuts,momCuts
+    return Selection("J2MuMuDarkBosonSel",Algorithm=j,
+                     RequiredSelections=inputs)
+
+def makeRho(inputs,which=""):
+    comboCuts = "(AM > 550*MeV) & (AM < 1050*MeV) & ADOCACHI2CUT(25,'')"
+    momCuts = "(VFASPF(VCHI2/VDOF)<10) & (MIPCHI2DV(PRIMARY)> 16) & HASVERTEX"
+    momCuts += " & (M > 600*MeV) & (M < 1000*MeV)"
+    rho = CombineParticles(DecayDescriptors=['rho(770)0 -> pi+ pi-'],
+                           CombinationCut=comboCuts,MotherCut=momCuts)
+    #print 'makeRho:',comboCuts,momCuts
+    return Selection("Rho2PiPi"+which+"DarkBosonSel",Algorithm=rho,
+                     RequiredSelections=inputs)
+
+def makeKst(inputs,which=""):
+    comboCuts = "ADOCACHI2CUT(30,'') & (ADAMASS('K*(892)0') < 100*MeV)" #(AM < 2000*MeV)"
+    momCuts = "(VFASPF(VCHI2/VDOF)<10) & (MIPCHI2DV(PRIMARY)> 16) & HASVERTEX"
+    kst = CombineParticles(DecayDescriptors=['[K*(892)0 -> K+ pi-]cc'],
+                           CombinationCut=comboCuts,MotherCut=momCuts)
+    #print 'makeKst:',comboCuts,momCuts
+    return Selection("Kst2KPi"+which+"DarkBosonSel",Algorithm=kst,
+                     RequiredSelections=inputs)
+
+def makeEta(inputs,which=""):
+    comboCuts = "(AM < 750*MeV) & (ACHI2DOCA(1,2) < 25)"
+    momCuts = "(VFASPF(VCHI2/VDOF)<10) & (MIPCHI2DV(PRIMARY)> 16) & HASVERTEX"
+    momCuts += " & (M < 650*MeV)"
+    eta = CombineParticles(DecayDescriptors=['eta -> pi+ pi- pi0'],
+                           CombinationCut=comboCuts,MotherCut=momCuts)
+    #print 'makeOmega:',comboCuts,momCuts
+    return Selection("Eta2PiPiPi"+which+"DarkBosonSel",Algorithm=eta,
+                     RequiredSelections=inputs)
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
+def makeB(name,decays,inputs,default_config):
+    comboCuts = LoKiCuts(['AM','SUMPT'],default_config).code()
+    momCuts = LoKiCuts(['HASVERTEX','PT','VCHI2DOF','BPVLTIME','BPVIPCHI2','BPVDIRA'],default_config).code()
+    cuts = ""
+    if default_config.has_key('BPVDIRA_MIN'):
+        cuts += '(BPVDIRA > %s)' % default_config['BPVDIRA_MIN']
+    else:
+        cuts += '(BPVDIRA > 0)'
+    if default_config.has_key('HAD_MINIPCHI2_MIN'):
+        cuts += ' & (NINGENERATION(ISBASIC & HASTRACK & (MIPCHI2DV(PRIMARY) < %s),1)==0)' \
+                % default_config['HAD_MINIPCHI2_MIN']
+    momCuts = LoKiCuts.combine([momCuts,cuts])
+    momCuts += ' & (MM > %s) & (MM < %s)' % (default_config['AM_MIN'],default_config['AM_MAX'])
+    n=2
+    if name.find('B2KpiX') >= 0: n=3
+    alg = None
+    if n==2:
+        alg = CombineParticles(DecayDescriptors=decays)
+    else:
+        alg = DaVinci__N3BodyDecays(DecayDescriptors=decays)
+        alg.Combination12Cut = 'AM < %s' % default_config['AM_MAX']
+
+    alg.ReFitPVs = True
+    alg.CombinationCut=comboCuts
+    alg.MotherCut=momCuts
+    #print 'makeB:',name,comboCuts,momCuts,decays
+    return Selection(name+"DarkBosonSel",Algorithm=alg,
+                     RequiredSelections=inputs)
+
+#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingDoubleSLForRX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingDoubleSLForRX.py
new file mode 100644
index 000000000..a5dcf14b4
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingDoubleSLForRX.py
@@ -0,0 +1,316 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Stripping for double SL decays for
+control mode for R(X) analyses.
+"""
+
+__author__  = 'M. Kreps, T. Blake, D. Loh'
+__date__    = '10/11/2016'
+__version__ = '$Revision: 1.0$'
+
+__all__ = ( 'DoubleSLForRXConf', 'default_config' )
+
+#
+#  Define Cuts here
+#
+
+default_config = {
+    'NAME'        : 'DoubleSLForRX',
+    'BUILDERTYPE' : 'DoubleSLForRXConf',
+    'CONFIG'      :
+    {
+    "BMassLow"          : 1000.0, 
+    "BMassUpp"          : 5400.0,
+    "DMassLow"          : 500.0 ,
+    "DMassUpp"          : 2000.0,
+    "DstarDeltaMass"    : 300,  
+    "BDIRA"             : 0.995,
+    "DDIRA"             : 0.995,
+    "BDOCA"             : 10,
+    "BVCHI2"            : 100,
+    "BPT"               : 2000.  ,
+    "DIPChisq"          : 4. ,
+    "DFDChisq"          : 36.,
+    "LeptonPT"          : 800. ,
+    "LeptonIPChisq"     : 9,
+    "KaonPT"            : 500. ,
+    "KaonIPChisq"       : 9,
+    "PionIPChisq"       : 4,
+    "MuonProbNN"        : 0,
+    "ElectronProbNN"    : 0.10,
+    "KaonProbNN"        : 0.10,
+    "DVertexChisq"      : 10,
+    "DSeparation"       : -10, 
+    "DPT"               : 800., 
+    "TrackGhostProb"    : 0.5, 
+    "HLT1_FILTER"       : None, 
+    "HLT2_FILTER"       : None,
+    "L0DU_FILTER"       : None,
+    "SpdMult"           : 600, 
+    "UseNoPIDParticles" : False,
+    },
+    'WGs'     : [ 'RD' ],
+    'STREAMS' : ['Leptonic'] 
+    }
+
+#
+# Global imports
+#
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import  ( CombineParticles,
+                                                     FilterDesktop,
+                                                     DaVinci__N3BodyDecays )
+
+from PhysSelPython.Wrappers import ( Selection, MergedSelection )
+
+from StrippingConf.StrippingLine import StrippingLine
+
+from StrippingUtils.Utils import LineBuilder
+
+
+#
+#  LineBuiler 
+#
+
+class DoubleSLForRXConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config) :
+        
+        LineBuilder.__init__(self, name, config)
+        self.name = name
+        
+        # Selection objects for particles 
+        self.Leptons = self.__makeLeptons__( config )
+        self.Kaons   = self.__makeKaons__( config )
+        self.Pions   = self.__makePions__( config )
+        self.D       = self.__makeD__( self.Kaons, self.Leptons, config )
+        self.B       = self.__makeB__( self.D, self.Pions, self.Leptons, config )
+        
+        # GEC filter on SPD multiplicty 
+        self.Filter = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" % config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *",
+            "from LoKiCore.basic import LHCb"
+            ]
+            }
+        
+        # Define stripping line 
+        self.Line = StrippingLine(
+            self.name + "_Line",
+            prescale = 1,
+            #RelatedInfoTools = config['RelatedInfoTools'],
+            HLT2     = config['HLT2_FILTER'],
+            HLT1     = config['HLT1_FILTER'],
+            L0DU     = config['L0DU_FILTER'],
+            FILTER   = self.Filter,
+            algos    = [ self.B ],
+            MDSTFlag = False
+            )
+        
+        self.registerLine( self.Line )
+
+    def __ElectronCuts__( self, conf ):
+        cuts = "(PT > %(LeptonPT)s) & " \
+               "(MIPCHI2DV(PRIMARY) > %(LeptonIPChisq)s)" % conf
+        if conf['UseNoPIDParticles']:
+            return cuts
+        return cuts + " & (HASRICH) & (PROBNNe > %(ElectronProbNN)s)" % conf  
+        
+    def __MuonCuts__( self, conf ):
+        cuts = "(PT > %(LeptonPT)s) & " \
+               "(MIPCHI2DV(PRIMARY) > %(LeptonIPChisq)s) & " \
+               "(TRGHP < %(TrackGhostProb)s)" % conf
+        if conf['UseNoPIDParticles']:
+            return cuts
+        return cuts + " & (HASRICH) & (PROBNNmu > %(MuonProbNN)s)" % conf
+
+    def __KaonCuts__( self, conf ):
+        cuts = "(PT > %(KaonPT)s) & " \
+               "(MIPCHI2DV(PRIMARY) > %(KaonIPChisq)s) & " \
+               "(TRGHP < %(TrackGhostProb)s)" % conf
+        if conf['UseNoPIDParticles']:
+            return cuts
+        return cuts + " & (HASRICH) & (PROBNNk > %(KaonProbNN)s)" % conf 
+
+    def __PionCuts__( self, conf ):
+        return "(MIPCHI2DV(PRIMARY) > %(PionIPChisq)s) & " \
+               "(TRGHP < %(TrackGhostProb)s)" % conf 
+    
+    def __DCuts__( self, conf ):
+        return "(PT > %(DPT)s) & " \
+               "(MIPCHI2DV(PRIMARY) > %(DIPChisq)s) & " \
+               "(VFASPF(VCHI2PDOF) < %(DVertexChisq)s) & " \
+               "(BPVVDCHI2 > %(DFDChisq)s)" % conf 
+    
+    def __DCombinationCuts__( self, conf ):
+        return "(AM > %(DMassLow)s) & (AM < %(DMassUpp)s)" % conf 
+
+    def __DstarCuts__( self, conf ):
+        return "(M-MAXTREE('D0'==ABSID,M) < %(DstarDeltaMass)s) " % conf 
+    
+    def __BCuts__( self, conf ):
+        return "(PT > %(BPT)s) & " \
+               "(VFASPF(VCHI2) < %(BVCHI2)s) & " \
+               "((MINTREE(ABSID=='D0', VFASPF(VZ))-VFASPF(VZ)) > %(DSeparation)s) & " \
+               "(BPVDIRA > %(BDIRA)s)" % conf 
+
+    def __BCombinationCuts__( self, conf ):
+        return "(AM > %(BMassLow)s) & (AM < %(BMassUpp)s)" % conf 
+    
+    def __makeLeptons__( self, conf ):
+        '''
+        Create muons/electrons 
+        '''
+        from StandardParticles import ( StdAllLooseMuons,
+                                        StdAllNoPIDsMuons,
+                                        StdAllLooseElectrons,
+                                        StdAllNoPIDsElectrons )
+        muons     = None
+        electrons = None
+        
+        if conf['UseNoPIDParticles']:
+            muons     = StdAllNoPIDsMuons
+            electrons = StdAllNoPIDsElectrons
+        else:
+            muons     = StdAllLooseMuons
+            electrons = StdAllLooseElectrons
+
+        # Filter electrons/muons
+        filterElectrons = FilterDesktop( Code = self.__ElectronCuts__( conf ) )
+        filterMuons     = FilterDesktop( Code = self.__MuonCuts__( conf ) )
+                 
+        selElectrons    = Selection( self.name + "_Electrons",
+                                     Algorithm = filterElectrons,
+                                     RequiredSelections = [ electrons ] )
+        selMuons        = Selection( self.name + "_Muons" ,
+                                     Algorithm = filterMuons,
+                                     RequiredSelections = [ muons ] )
+
+        # Merge electrons/muons into a single container
+        selLeptons      = MergedSelection( self.name + "_Leptons",
+                                           RequiredSelections = [ selElectrons, selMuons ] )
+        return selLeptons
+
+
+    
+    def __makeKaons__(self, conf):
+        '''
+        Create Kaons
+        '''
+        from StandardParticles import ( StdAllLooseKaons, 
+                                        StdAllNoPIDsKaons )
+
+        # Filter kaons
+        
+        kaons = StdAllNoPIDsKaons if conf['UseNoPIDParticles'] else StdAllLooseKaons 
+        
+        filterKaons = FilterDesktop( Code = self.__KaonCuts__( conf ) )
+
+        selKaons    = Selection( self.name + "_Kaons",
+                                 RequiredSelections = [ kaons ] ,
+                                 Algorithm = filterKaons )
+        return selKaons
+
+
+    def __makePions__( self, conf = {} ):
+        """
+        Make slow pions
+        """
+        from StandardParticles import ( StdAllNoPIDsPions )
+        
+        filterPions = FilterDesktop( Code = self.__PionCuts__( conf ) )
+
+        selPions    = Selection( self.name + "_Pions",
+                                 RequiredSelections = [ StdAllNoPIDsPions ] ,
+                                 Algorithm = filterPions )
+        return selPions
+
+    def __makeD__( self, kaons = None , leptons = None , conf = {} ):
+        """
+        Make D --> K l 
+        """
+        # CombineParticles for the SL D decay
+
+        combineD = CombineParticles()
+        combineD.DecayDescriptors = [ "[D0 -> K- mu+]cc", "[D0 -> K- e+]cc" ] 
+        combineD.CombinationCut   = self.__DCombinationCuts__( conf )
+        combineD.MotherCut        = self.__DCuts__( conf )
+        
+        selD = Selection( self.name + "_D",
+                          Algorithm = combineD,
+                          RequiredSelections = [ kaons, leptons ] )
+        return selD
+
+    def __makeB__( self, dmesons = None, pions = None, leptons = None, conf  = {} ):
+        """
+        Make B --> D pi l 
+        """
+        
+        combineB = DaVinci__N3BodyDecays()
+        
+        combineB.DecayDescriptors = [ "[B0 -> D~0 pi- mu+]cc", "[B0 -> D~0 pi- e+]cc" ]
+
+        combineB.Combination12Cut = "((AM - AM1) < %(DstarDeltaMass)s)" % conf
+
+        combineB.CombinationCut   = "(AM > %(BMassLow)s) & " \
+                                    "(AM < %(BMassUpp)s) & " \
+                                    "(ACHI2DOCA(2,3) < %(BDOCA)s)" % conf 
+
+        combineB.MotherCut        = self.__BCuts__( conf )
+        
+        selB = Selection( self.name + "_B",
+                          Algorithm = combineB,
+                          RequiredSelections = [ dmesons, pions, leptons ] )
+        return selB
+
+
+
+
+#  def __makeDstar__( self, dmesons = None, pions = None,  conf = {} ):
+#        """
+#        Make D* --> D pi 
+#       """
+#     
+#       # CombineParticles for the D* decay
+#
+#       combineDstar = CombineParticles()
+#       combineDstar.DecayDescriptor = "[D*(2010)+ -> D0 pi+]cc"
+#       combineDstar.CombinationCut  = "(AM < 2100*MeV)"
+#       combineDstar.MotherCut       = self.__DstarCuts__( conf )
+#       
+#       selDstar = Selection( self.name + "_Dstar",
+#                             Algorithm = combineDstar,
+#                             RequiredSelections = [ dmesons, pions ] )
+#       
+#       return selDstar
+
+#    def __makeB__( self, dstars = None , leptons = None , conf = {} ):
+#        """
+#        Make B --> D l 
+#        """
+#
+#       # CombineParticles for the B decay
+#       
+#       combineB = CombineParticles()
+#       combineB.DecayDescriptors = [ "[B0 -> D*(2010)- mu+]cc", "[B0 -> D*(2010)- e+]cc" ] 
+#       combineB.CombinationCut   = self.__BCombinationCuts__( conf )
+#       combineB.MotherCut        = self.__BCuts__( conf )
+#       
+#       selB = Selection( self.name + "_B",
+#                         Algorithm = combineB,
+#                         RequiredSelections = [ dstars, leptons ] )
+#       return selB
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingHypb2L0HGamma.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingHypb2L0HGamma.py
new file mode 100644
index 000000000..df29a89f7
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingHypb2L0HGamma.py
@@ -0,0 +1,525 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = 'Luis Miguel Garcia Martin, luis.miguel.garcia.martin@cern.ch'
+__date__ = '08/04/2016'
+__version__ = '1.0'
+__description__ = '[Xi_b- -> (Xi- -> (Lambda0 -> p+ pi-) pi-) gamma], [Omega_b- -> (Omega- -> (Lambda0 -> p+ pi-) K-) gamma]'
+__all__ = ('Hypb2L0HGammaConf',
+     'default_config', )
+       
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles, TisTosParticleTagger
+from PhysSelPython.Wrappers      import Selection, MergedSelection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder
+from StandardParticles import StdLooseAllPhotons
+
+default_config = {
+  'NAME'      : 'Hypb2L0HGamma',
+  'WGs'     : ['RD'],
+  'BUILDERTYPE' : 'Hypb2L0HGammaConf',
+  'CONFIG'    : {'Prescale'       : 1,
+           'Photon_PT_Min'        : 2500.0,
+           'Photon_CL_Min'        : 0.15,
+           #Tracks
+           'TRCHI2DOF_MAX'        : 4.,
+           'TRACK_IPCHI2_MIN'     : 16.,            #
+           #                            'VCHI2PDOF_MAX'        :   16.0,
+           'Ghost_Prob'           : 0.4,
+           'p_PT_Min'             : 630,
+           'pi_L0_PT_Min'         : 130,
+           'pi_Xi_PT_Min'         : 120,
+           #Lambda
+           'L0_VCHI2'             : 9,
+           'L0_PT_Min'            : 850,
+           #Xi
+           'CombMassWinXi'        : 60.,
+           'MassWinXi'            : 30.,
+           'MinPTXi'              : 1120.,
+           'MinPXi'               : 10000.,
+           'Xi_VCHI2'             : 8,
+           #              'BPVLTIME_MIN'         :   2.0 ,        proper time cut
+           #                           'BPVDIRA_MIN'           :   0.93,    proper time cut
+           #                           'BPVVDCHI2_MIN'         :   0.0,   Proper time cut
+           #Xib
+           'CombMassWinXib'       : 800.,
+           'MinPTXib'             : 500.,
+           'MinPXib'              : 15000.,
+           'MTDOCACHI2_MAX'       :   15.,     #
+           #Omega
+           'CombMassWinOmega'     : 120.,
+           'MassWinOmega'         : 70.,
+           'MinPTO'               : 1000.,
+           'MinPO'                : 10000.,
+           #Omegab
+           'CombMassWinOmegab'    : 1000.,
+           'MinPTOb'              : 1000.,
+           'MinPOb'               : 15000.,
+           
+           'TISTOSLinesDict': {'L0Photon.*Decision%TOS':0,
+                   'L0Electron.*Decision%TOS':0#,
+                   #'L0Photon.*Decision%TIS':0,
+                   #'L0Electron.*Decision%TIS':0,
+                   }
+           },
+  'STREAMS'   : ['Leptonic'],
+  }
+
+#######################################################################
+    
+class Hypb2L0HGammaConf(LineBuilder):
+	
+	__configuration_keys__ = default_config['CONFIG'].keys()
+	
+	def __init__(self, name, config):
+		
+		LineBuilder.__init__(self, name, config)
+		
+		PionsL =DataOnDemand('Phys/StdLoosePions/Particles') 
+		PionsD =DataOnDemand('Phys/StdNoPIDsDownPions/Particles')
+
+##############################################################
+####################### Lambda Filter  #######################
+##############################################################
+
+		tracks_cuts = """(MAXTREE(TRCHI2DOF, HASTRACK) < %(TRCHI2DOF_MAX)s) &
+				         (MAXTREE(TRGHOSTPROB, HASTRACK) < %(Ghost_Prob)s) &
+				         (INTREE(('p+'==ABSID) & (PT > %(p_PT_Min)s))) &
+				         (INTREE(('pi+'==ABSID) & (PT > %(pi_L0_PT_Min)s)))"""
+
+		Lambda_cuts = """(PT>%(L0_PT_Min)s*MeV) &
+				             (VFASPF(VCHI2/VDOF)<%(L0_VCHI2)s)"""
+		Lambda_code = (Lambda_cuts + " & " + tracks_cuts) % config
+		Lambda_filter = FilterDesktop(name = 'Lambda_filter', 
+		                              Code = Lambda_code)
+
+#		Lambda_ll_dod = DataOnDemand('Phys/StdLooseLambdaLL/Particles')       
+		Lambda_ll_dod = DataOnDemand('Phys/StdVeryLooseLambdaLL/Particles')       
+		Lambda_ll = Selection("LooseLambda0LL_for_Hypb2L0HGamma",
+				               Algorithm=Lambda_filter,
+				               RequiredSelections=[Lambda_ll_dod]) 
+
+
+		Lambda_dd_dod = DataOnDemand('Phys/StdLooseLambdaDD/Particles')
+		Lambda_dd = Selection("LooseLambda0DD_for_Hypb2L0HGamma",
+				               Algorithm=Lambda_filter,
+				               RequiredSelections=[Lambda_dd_dod]) 
+		
+
+
+##############################################################
+####################### Photon Filter  #######################
+##############################################################
+		photons_filter = FilterDesktop(name = "Photons_filter",
+					       Code="(PT > %(Photon_PT_Min)s*MeV) & (CL > %(Photon_CL_Min)s)" % config)
+		Photons = Selection("Photons"+name,
+				    Algorithm=photons_filter,
+				    RequiredSelections=[StdLooseAllPhotons])
+		
+#############		Making all Xi		#######################		
+		self.selXi_LLL = makeXi2L0pi(name 	= "Xi2L0pi_LLL" + name,
+					     pions 	= PionsL,
+					     lambdas = Lambda_ll,
+					     params = config
+					     ) 
+							
+		self.selXi_DDD = makeXi2L0pi(name 	= "Xi2L0pi_DDD" + name,
+					     pions 	= PionsD,
+					     lambdas = Lambda_dd,
+					     params = config
+					     ) 
+							
+		self.selXi_DDL = makeXi2L0pi(name 	= "Xi2L0pi_DDL" + name,
+					     pions 	= PionsL,
+					     lambdas = Lambda_dd,
+					     params = config
+					     ) 
+							
+		#		self.mergedXi = MergedSelection("Xi_minus",
+#										RequiredSelections=[self.selXi_LLL, self.selXi_DDD, self.selXi_DDL])
+		
+#############		Making  Xi_b LLL	#######################						
+		children_Xib = {'Xi': '[Xi_b- -> ^Xi- gamma]CC',
+                       'gamma': '[Xi_b- -> Xi- ^gamma]CC'}
+                       
+		self.SelXib_LLL = makeXib2XiGamma(name	=	"Xib2XiGamma_LLL",
+						  xiSel	=	self.selXi_LLL,
+						  photons=	Photons,
+						  params = config
+						  )
+								
+		self.lineXib2XiGamma_LLL = StrippingLine("StripXib2XiGamma_LLL",
+							 prescale = config['Prescale'],
+							 algos = [tisTosSelection(self.SelXib_LLL, config['TISTOSLinesDict'])],
+							 postselalg = makevelotracks("StripXib2XiGamma_LLL"),
+							 MDSTFlag = False,
+							 RelatedInfoTools = [
+###		Track Match Xib					 
+							 {'Type' : 'RelInfoVeloTrackMatch',
+									      'InputTracks' : "Rec/Track/Velo"+"StripXib2XiGamma_LLL",
+									      'Location' : 'P2VELOTRACKMATCH',
+									      'ConeAroundMomentum' : 'True'
+									      },
+#									      
+### Photon Isolation
+							 {"Type": "RelInfoGammaIso",
+			                 "DaughterLocations": {"[Xi_b- -> Xi- ^gamma]CC": "GammaIsolation"}},
+#
+#### Photon Cone Iso Variables:
+                		get_cone_relinfo(1.7, children=children_Xib),
+                		get_cone_relinfo(1.35, children=children_Xib),
+						get_cone_relinfo(1.0, children=children_Xib),
+#
+#### Neutral Cone Iso Variables:
+                		get_neutral_cone_relinfo(1.7, children=children_Xib),
+                		get_neutral_cone_relinfo(1.35, children=children_Xib),
+						get_neutral_cone_relinfo(1.0, children=children_Xib),
+						get_neutral_cone_relinfo(0.4, children=children_Xib)
+						]
+							 )
+#		
+		self.registerLine(self.lineXib2XiGamma_LLL)
+		
+#############		Making  Xi_b DDD   #######################						
+		self.SelXib_DDD = makeXib2XiGamma(name	=	"Xib2XiGamma_DDD",
+						  xiSel	=	self.selXi_DDD,
+						  photons=	Photons,
+						  params = config
+						  )
+		
+		self.lineXib2XiGamma_DDD = StrippingLine("StripXib2XiGamma_DDD",
+							 prescale = config['Prescale'],
+                             algos = [tisTosSelection(self.SelXib_DDD, config['TISTOSLinesDict'])],
+							 postselalg = makevelotracks("StripXib2XiGamma_DDD"),
+							 MDSTFlag = False,
+							 RelatedInfoTools = [
+###		Track Match Xib					 
+							 {'Type' : 'RelInfoVeloTrackMatch',
+									      'InputTracks' : "Rec/Track/Velo"+"StripXib2XiGamma_DDD",
+									      'Location' : 'P2VELOTRACKMATCH',
+									      'ConeAroundMomentum' : 'True'
+									      },
+#									      
+### Photon Isolation
+							 {"Type": "RelInfoGammaIso",
+			                 "DaughterLocations": {"[Xi_b- -> Xi- ^gamma]CC": "GammaIsolation"}},
+#
+#### Photon Cone Iso Variables:
+                		get_cone_relinfo(1.7, children=children_Xib),
+                		get_cone_relinfo(1.35, children=children_Xib),
+						get_cone_relinfo(1.0, children=children_Xib),
+#
+#### Neutral Cone Iso Variables:
+                		get_neutral_cone_relinfo(1.7, children=children_Xib),
+                		get_neutral_cone_relinfo(1.35, children=children_Xib),
+						get_neutral_cone_relinfo(1.0, children=children_Xib),
+						get_neutral_cone_relinfo(0.4, children=children_Xib)
+						]
+							 )
+#
+		
+		self.registerLine(self.lineXib2XiGamma_DDD)
+		
+#############		Making  Xi_b DDL	#######################						
+		self.SelXib_DDL = makeXib2XiGamma(name	=	"Xib2XiGamma_DDL",
+						  xiSel	=	self.selXi_DDL,
+						  photons=	Photons,
+						  params = config
+						  )
+								
+		self.lineXib2XiGamma_DDL = StrippingLine("StripXib2XiGamma_DDL",
+							 prescale = config['Prescale'],
+                             algos = [tisTosSelection(self.SelXib_DDL, config['TISTOSLinesDict'])],
+							 postselalg = makevelotracks("StripXib2XiGamma_DDL"),
+							 MDSTFlag = False,
+							 RelatedInfoTools = [
+###		Track Match Xib					 
+							 {'Type' : 'RelInfoVeloTrackMatch',
+									      'InputTracks' : "Rec/Track/Velo"+"StripXib2XiGamma_DDL",
+									      'Location' : 'P2VELOTRACKMATCH',
+									      'ConeAroundMomentum' : 'True'
+									      },
+#									      
+### Photon Isolation
+							 {"Type": "RelInfoGammaIso",
+			                 "DaughterLocations": {"[Xi_b- -> Xi- ^gamma]CC": "GammaIsolation"}},
+#
+#### Photon Cone Iso Variables:
+                		get_cone_relinfo(1.7, children=children_Xib),
+                		get_cone_relinfo(1.35, children=children_Xib),
+						get_cone_relinfo(1.0, children=children_Xib),
+#
+#### Neutral Cone Iso Variables:
+                		get_neutral_cone_relinfo(1.7, children=children_Xib),
+                		get_neutral_cone_relinfo(1.35, children=children_Xib),
+						get_neutral_cone_relinfo(1.0, children=children_Xib),
+						get_neutral_cone_relinfo(0.4, children=children_Xib)
+						]
+							 )
+#
+		
+		self.registerLine(self.lineXib2XiGamma_DDL)
+		
+	##################################################################################
+	##############################	Omega	##########################################
+	##################################################################################
+		
+		KaonsL =DataOnDemand('Phys/StdLooseKaons/Particles') 
+		KaonsD =DataOnDemand('Phys/StdLooseDownKaons/Particles') 
+	
+	#############		Making all Omegas		#######################		
+		self.selO_LLL = makeO2L0K(name 	= "O2L0K_LLL" + name,
+					  kaons 	= KaonsL,
+					  lambdas = Lambda_ll,
+					  params = config
+					  ) 
+							
+		self.selO_DDD = makeO2L0K(name 	= "O2L0K_DDD" + name,
+					  kaons 	= KaonsD,
+					  lambdas = Lambda_dd,
+					  params = config
+					  ) 
+							
+		self.selO_DDL = makeO2L0K(name 	= "O2L0K_DDL" + name,
+					  kaons 	= KaonsL,
+					  lambdas = Lambda_dd,
+					  params = config
+					  ) 
+							
+		#		self.mergedO = MergedSelection("O_minus",
+	#										RequiredSelections=[self.selO_LLL, self.selO_DDD, self.selO_DDL])
+	
+#############		Making  Omega_b		#######################						
+		self.SelOb_LLL = makeOb2OGamma(name	=	"Ob2OGamma_LLL",
+					       oSel	=	self.selO_LLL,
+					       photons=	Photons,
+					       params = config
+					       )
+	
+	
+		self.lineOb2OGamma_LLL = StrippingLine("StripOb2OGamma_LLL",
+						       prescale = config['Prescale'],
+						       algos = [tisTosSelection(self.SelOb_LLL, config['TISTOSLinesDict'])],
+						       postselalg = makevelotracks("StripOb2OGamma_LLL"),
+						       MDSTFlag = False,
+						       RelatedInfoTools = [{'Type' : 'RelInfoVeloTrackMatch',
+									    'InputTracks' : "Rec/Track/Velo"+"StripOb2OGamma_LLL",
+									    'Location' : 'P2VELOTRACKMATCH',
+									     'ConeAroundMomentum' : 'True'
+									    }]
+						       )
+											 
+		self.registerLine(self.lineOb2OGamma_LLL)
+	
+#############		Making  Omega_b		#######################						
+		self.SelOb_DDD = makeOb2OGamma(name	=	"Ob2OGamma_DDD",
+					       oSel	=	self.selO_DDD,
+					       photons=	Photons,
+					       params = config
+					       )
+	
+		
+		self.lineOb2OGamma_DDD = StrippingLine("StripOb2OGamma_DDD",
+						       prescale = config['Prescale'],
+						       #selection = tisTosSelection(self.SelOb_DDD, config['TISTOSLinesDict']),
+						       algos = [tisTosSelection(self.SelOb_DDD, config['TISTOSLinesDict'])],
+						       postselalg = makevelotracks("StripOb2OGamma_DDD"),
+						       MDSTFlag = False,
+						       RelatedInfoTools = [{'Type' : 'RelInfoVeloTrackMatch',
+									    'InputTracks' : "Rec/Track/Velo"+"StripOb2OGamma_DDD",
+									    'Location' : 'P2VELOTRACKMATCH',
+									     'ConeAroundMomentum' : 'True'
+									    }]
+						       )
+	
+		self.registerLine(self.lineOb2OGamma_DDD)
+							
+		
+#############		Making  Omega_b		#######################						
+		self.SelOb_DDL = makeOb2OGamma(name	=	"Ob2OGamma_DDL",
+					       oSel	=	self.selO_DDL,
+					       photons=	Photons,
+					       params = config
+					       )
+	
+	
+		self.lineOb2OGamma_DDL = StrippingLine("StripOb2OGamma_DDL",
+						       prescale = config['Prescale'],
+						       algos = [tisTosSelection(self.SelOb_DDL, config['TISTOSLinesDict'])],
+						       postselalg = makevelotracks("StripOb2OGamma_DDL"),
+						       #selection = tisTosSelection(self.SelOb_DDL, config['TISTOSLinesDict']),
+						       MDSTFlag = False,
+						       RelatedInfoTools = [{'Type' : 'RelInfoVeloTrackMatch',
+									    'InputTracks' : "Rec/Track/Velo"+"StripOb2OGamma_DDL",
+									    'Location' : 'P2VELOTRACKMATCH',
+									     'ConeAroundMomentum' : 'True'
+									    }]
+						       )
+	
+		self.registerLine(self.lineOb2OGamma_DDL)
+							
+	
+
+
+
+
+
+#################################################################################################
+#################################################################################################
+#################################################################################################
+
+
+def makeXi2L0pi(name, pions, lambdas, params):
+  _name = name
+  _daughter_cut = {'Lambda0' : 'ALL' , 
+       'pi-'     : '(MIPCHI2DV(PRIMARY) > %(TRACK_IPCHI2_MIN)s) & (TRCHI2DOF < %(TRCHI2DOF_MAX)s) & (PT > %(pi_Xi_PT_Min)s * MeV)' %params } 
+  _combcut = "(ADAMASS('Xi-') < %(CombMassWinXib)s * MeV)" %params
+  
+  _mothercut = "(ADMASS('Xi-') < %(MassWinXi)s * MeV) & (PT > %(MinPTXi)s * MeV) & (P > %(MinPXi)s*MeV) & (MAXTREE(TRGHOSTPROB, HASTRACK) < %(Ghost_Prob)s) & (VFASPF(VCHI2/VDOF)<%(Xi_VCHI2)s)" %params
+  
+  _Combine = CombineParticles(name = _name,
+            DecayDescriptor = "[Xi- -> Lambda0 pi-]cc",
+            CombinationCut = _combcut,
+            MotherCut = _mothercut
+            )
+                 
+  return Selection(name + 'L0pi',
+       Algorithm = _Combine,
+       RequiredSelections = [pions, lambdas]
+       )
+           
+#################################################################################################
+def makeXib2XiGamma(name, xiSel, photons, params):
+  _name = name
+  
+  _combcut = "(ADAMASS('Xi_b-') < %(CombMassWinXib)s * MeV)" %params
+  
+  _mothercut = "(PT > %(MinPTXib)s * MeV) & (P > %(MinPXib)s*MeV) & (MTDOCACHI2(1) < %(MTDOCACHI2_MAX)s)" %params
+  
+  _Combine = CombineParticles(name = _name,
+                DecayDescriptor = "[Xi_b- -> Xi- gamma]cc",
+                CombinationCut = _combcut,
+                MotherCut = _mothercut
+                )
+  _Combine.ParticleCombiners = {'' : 'ParticleAdder'}
+#  _Combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'}
+  
+  return Selection(name + 'XiGamma',
+           Algorithm = _Combine,
+           RequiredSelections = [xiSel, photons]
+           )
+  
+
+
+#################################################################################
+#################################################################################
+def makeO2L0K(name, kaons, lambdas, params):
+  _name = name
+  _daughter_cut = {'Lambda0' : 'ALL' ,
+       'K-'     : '(MIPCHI2DV(PRIMARY) > %(TRACK_IPCHI2_MIN)s) & (TRCHI2DOF < %(TRCHI2DOF_MAX)s)' %params } 
+  _combcut = "(ADAMASS('Omega-') < %(CombMassWinOmega)s * MeV)" %params
+  _mothercut = "(ADMASS('Omega-') < %(MassWinOmega)s * MeV) & (PT > %(MinPTO)s * MeV) & (P > %(MinPO)s*MeV) & (MAXTREE(TRGHOSTPROB, HASTRACK) < %(Ghost_Prob)s)" %params
+  _Combine = CombineParticles(name = _name,
+            DecayDescriptor = "[Omega- -> Lambda0 K-]cc",
+            CombinationCut = _combcut,
+            MotherCut = _mothercut
+            )
+  return Selection(name + 'L0K',
+       Algorithm = _Combine,
+       RequiredSelections = [kaons, lambdas]
+       )
+           
+###################################################################################
+def makeOb2OGamma(name, oSel, photons, params):
+  _name = name
+  _combcut = "(ADAMASS('Omega_b-') < %(CombMassWinOmegab)s * MeV)" %params
+  _mothercut = "(PT > %(MinPTOb)s * MeV) & (P > %(MinPOb)s*MeV) & (MTDOCACHI2(1) < %(MTDOCACHI2_MAX)s)" %params
+  _Combine = CombineParticles(name = _name,
+            DecayDescriptor = "[Omega_b- -> Omega- gamma]cc",
+            CombinationCut = _combcut,
+            MotherCut = _mothercut
+            )
+  _Combine.ParticleCombiners = {'' : 'ParticleAdder'}
+  return Selection(name + 'OGamma',
+       Algorithm = _Combine,
+       RequiredSelections = [oSel, photons]
+       )
+          
+def makeTISTOSFilter(name,dict_TISTOS):
+  specs = dict_TISTOS
+  from Configurables import TisTosParticleTagger
+  tisTosFilter = TisTosParticleTagger(name+'TISTOSFilter')
+  tisTosFilter.TisTosSpecs = specs
+  return tisTosFilter
+
+def tisTosSelection(sel,TISTOSdict):
+  tisTosFilter = makeTISTOSFilter(sel.name(),TISTOSdict)
+  return Selection(sel.name()+'TISTOS', Algorithm=tisTosFilter, RequiredSelections=[sel])
+  
+
+def makevelotracks(name):
+    from Configurables import  FastVeloTracking, TrackPrepareVelo, DecodeVeloRawBuffer, TrackEventFitter, TrackStateInitAlg,  TrackContainerCopy
+    from TrackFitter.ConfiguredFitters import ConfiguredEventFitter
+    
+    MyFastVeloTracking = FastVeloTracking("For%sFastVelo"%name,OutputTracksName="Rec/Track/MyVeloFor%s"%name)
+    MyFastVeloTracking.OnlyForward = True
+    MyFastVeloTracking.ResetUsedFlags = True
+    ### prepare for fitting
+    preve = TrackStateInitAlg("For%sInitSeedFit"%name,TrackLocation = "Rec/Track/MyVeloFor%s"%name)
+    preve.StateInitTool.VeloFitterName = "FastVeloFitLHCbIDs"
+    copyVelo = TrackContainerCopy( "For%sCopyVelo"%name )
+    copyVelo.inputLocations = ["Rec/Track/MyVeloFor%s"%name]
+    copyVelo.outputLocation = "Rec/Track/Velo"+name
+    MyVeloFit = ConfiguredEventFitter(Name="For%sVeloRefitterAlg"%name,
+              TracksInContainer="Rec/Track/Velo"+name,
+#              TracksOutContainer="Rec/Track/Velo"+name,
+              SimplifiedGeometry = True)
+    maketracks = GaudiSequencer('For%sMakeVeloTracksGS'%name)
+    maketracks.Members += [ MyFastVeloTracking ] 
+    maketracks.Members += [ preve ] 
+    maketracks.Members += [ copyVelo ] 
+    maketracks.Members += [ MyVeloFit ] 
+    
+    return maketracks
+
+######################################################################################
+def get_cone_relinfo(angle, head=None, children=None):
+    tool = {'Type'     : 'RelInfoConeVariables',
+            'ConeAngle': angle,
+            'Variables': ['CONEANGLE', 'CONEMULT', 'CONEP', 'CONEPASYM', 'CONEPT', 'CONEPTASYM']}
+    # Some shortcuts
+    base_location = 'ConeVarsInfo/%%s/%s' % angle
+    # Head
+    if head:
+        tool.update({'Location'    : base_location % 'XiB',
+                     'TopSelection': head})
+    if children:
+        tool.update({'DaughterLocations': dict([(sel_string, base_location % name)
+                                                for name, sel_string in children.items()])})
+    return tool
+    
+#############################################################################################    
+def get_neutral_cone_relinfo(size, head=None, children=None):
+    tool = {'Type'       : 'RelInfoConeIsolation',
+            'FillCharged': False,
+            'ConeSize'   : size}
+# Some shortcuts
+    base_location = 'NeutralConeVarsInfo/%%s/%s' % size
+# Head
+    if head:
+        tool.update({'Location'    : base_location % 'XiB',
+                     'TopSelection': head})
+    if children:
+        tool.update({'DaughterLocations': dict([(sel_string, base_location % name)
+                                                for name, sel_string in children.items()])})
+    return tool
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingK0s2XXMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingK0s2XXMuMu.py
new file mode 100644
index 000000000..ded10aca6
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingK0s2XXMuMu.py
@@ -0,0 +1,270 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Stripping selections for KS0 -> X X mu mu
+'''
+
+__author__  = ['Miguel Ramos Pernas']
+__date__    = '10/10/2017'
+__version__ = '$Revision: 0.00 $'
+
+__all__ = ('K0s2XXMuMuConf', 'default_config')
+
+from Gaudi.Configuration import *
+
+from GaudiKernel.SystemOfUnits import MeV, m, mm, picosecond
+from GaudiKernel.PhysicalConstants import c_light
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from StandardParticles                     import StdAllLoosePions, StdAllLooseMuons
+
+from PhysSelPython.Wrappers      import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder
+from Configurables               import FilterDesktop
+
+from math import log
+
+
+default_config = {
+    'NAME'        : 'K0s2XXMuMu',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'K0s2XXMuMuConf',
+    'STREAMS'     : ['Dimuon'],
+    'CONFIG'      : {
+        # Please use the name convention following the rules in the constructor
+        # The cut on the KS0 life corresponds to: (KS0 mean life)*abs(log(N_final/N_initial)
+        'MuMaxGP'                : 0.4,
+        'MuMaxTrChi2pdof'        : 3,
+        'PiMaxGP'                : 0.1,
+        'PiMinIP'                : 0.35*mm,
+        'PiMaxTrChi2pdof'        : 2,
+        'MinLifeTime'            : (89.54*picosecond)*abs(log(0.95)),
+        'MaxMass'                : 600*MeV,
+        'MaxDOCA'                : 2*mm,
+        'MinDIRA'                : 0.9999,
+        'MaxIP'                  : 1*mm,
+        'MaxIPchi2'              : 100,
+        'MaxSVchi2pdof'          : 50,
+        'MaxSVZ'                 : 650*mm,
+        'MinVDZ'                 : 0*mm,
+        
+        'K0s2pi2mu2PreScale'     : 1,
+        'K0s2pi2mu2PostScale'    : 1,
+        
+        'K0s2pi2mu2LFVPreScale'  : 1,
+        'K0s2pi2mu2LFVPostScale' : 1,
+        
+        'K0s2pi2mu2SSPreScale'   : 0.25,
+        'K0s2pi2mu2SSPostScale'  : 1,
+        
+        'K0s2mu4PreScale'        : 1,
+        'K0s2mu4PostScale'       : 1,
+        
+        'K0s2mu4SSPreScale'      : 0.4,
+        'K0s2mu4SSPostScale'     : 1
+        }
+    }
+
+class K0s2XXMuMuConf(LineBuilder):
+    """
+    Builder for KS0 -> X X mu mu processes
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__( self, name, config ):
+        """
+        The configuration is parsed so all the cuts with "max" in it will
+        apply on the way:
+        - PT (< {MaxPT})
+        while all those with "min" will apply like
+        - PT (> {MinPT})
+        The constructor automatically changes the value in the dictionary
+        so the part between parentheses is saved.
+        
+        Example:
+        code = '(PT {MinPT}) & (MIPDV(PRIMARY) {MaxIP})'
+        """
+
+        LineBuilder.__init__(self, name, config)
+
+        self.config = {}
+        for k, c in config.iteritems():
+
+            l = k.lower()
+            
+            if 'min' in l:
+                cut = '> {}'.format(c)
+            elif 'max' in l:
+                cut = '< {}'.format(c)
+            else:
+                cut = c
+
+            self.config[k] = cut
+            
+        self.SelMuons = self._filterMuons(name = 'MuonsFor' + name, sel = StdAllLooseMuons)
+        self.SelPions = self._filterPions(name = 'PionsFor' + name, sel = StdAllLoosePions)
+        
+        #
+        # K0s2PiPiMuMu
+        #
+        K0s2PiPiMuMu = self._makeK0s2X4('K0s2PiPiMuMu', ['KS0 -> pi+ pi- mu+ mu-'])
+        self.K0s2PiPiMuMuLine = StrippingLine('K0s2PiPiMuMuLine',
+                                              prescale          = self.config['K0s2pi2mu2PreScale'],
+                                              postscale         = self.config['K0s2pi2mu2PostScale'],
+                                              algos             = [K0s2PiPiMuMu],
+                                              RequiredRawEvents = ['Muon'],
+                                              MDSTFlag          = False,
+                                              RelatedInfoTools  = [ { 'Type'              : 'RelInfoMuonIDPlus',
+                                                                      'Variables'         : ['MU_BDT'],
+                                                                      'DaughterLocations' : { 'KS0 -> ^pi+ pi- mu+ mu-' : 'Muon1BDT',
+                                                                                              'KS0 -> pi+ ^pi- mu+ mu-' : 'Muon2BDT',
+                                                                                              'KS0 -> pi+ pi- ^mu+ mu-' : 'Muon3BDT',
+                                                                                              'KS0 -> pi+ pi- mu+ ^mu-' : 'Muon4BDT' }
+                                                                      } ] )
+
+        K0s2PiPiMuMuLFV = self._makeK0s2X4('K0s2PiPiMuMuLFV', ['[KS0 -> pi+ pi+ mu- mu-]cc'])
+        self.K0s2PiPiMuMuLFVLine = StrippingLine('K0s2PiPiMuMuLFVLine',
+                                                prescale          = self.config['K0s2pi2mu2LFVPreScale'],
+                                                postscale         = self.config['K0s2pi2mu2LFVPostScale'],
+                                                algos             = [K0s2PiPiMuMuLFV],
+                                                RequiredRawEvents = ['Muon'],
+                                                MDSTFlag          = False,
+                                                RelatedInfoTools  = [ { 'Type'              : 'RelInfoMuonIDPlus',
+                                                                        'Variables'         : ['MU_BDT'],
+                                                                        'DaughterLocations' : { '[KS0 -> ^pi+ pi+ mu- mu-]CC' : 'Muon1BDT',
+                                                                                                '[KS0 -> pi+ ^pi+ mu- mu-]CC' : 'Muon2BDT',
+                                                                                                '[KS0 -> pi+ pi+ ^mu- mu-]CC' : 'Muon3BDT',
+                                                                                                '[KS0 -> pi+ pi+ mu- ^mu-]CC' : 'Muon4BDT' }
+                                                                        } ] )
+
+        K0s2PiPiMuMuSS = self._makeK0s2X4('K0s2PiPiMuMuSS', ['[KS0 -> pi+ pi- mu+ mu+]cc',
+                                                             '[KS0 -> pi+ pi+ mu+ mu-]cc',
+                                                             '[KS0 -> pi+ pi+ mu+ mu+]cc'])
+        self.K0s2PiPiMuMuSSLine = StrippingLine('K0s2PiPiMuMuSSLine',
+                                                prescale          = self.config['K0s2pi2mu2SSPreScale'],
+                                                postscale         = self.config['K0s2pi2mu2SSPostScale'],
+                                                algos             = [K0s2PiPiMuMuSS],
+                                                RequiredRawEvents = ['Muon'],
+                                                MDSTFlag          = False,
+                                                RelatedInfoTools  = [ { 'Type'              : 'RelInfoMuonIDPlus',
+                                                                        'Variables'         : ['MU_BDT'],
+                                                                        'DaughterLocations' : { '[KS0 -> ^pi+ [pi-]cc mu+ [mu-]cc]CC' : 'Muon1BDT',
+                                                                                                '[KS0 -> pi+ ^[pi-]cc mu+ [mu-]cc]CC' : 'Muon2BDT',
+                                                                                                '[KS0 -> pi+ [pi-]cc ^mu+ [mu-]cc]CC' : 'Muon3BDT',
+                                                                                                '[KS0 -> pi+ [pi-]cc mu+ ^[mu-]cc]CC' : 'Muon4BDT' }
+                                                                        } ] )
+        
+        #
+        # K0s2MuMuMuMu
+        #
+        K0s2MuMuMuMu = self._makeK0s2X4('K0s2MuMuMuMu', ['KS0 -> mu+ mu- mu+ mu-'])
+        self.K0s2MuMuMuMuLine = StrippingLine('K0s2MuMuMuMuLine',
+                                              prescale          = self.config['K0s2mu4PreScale'],
+                                              postscale         = self.config['K0s2mu4PostScale'],
+                                              algos             = [K0s2MuMuMuMu],
+                                              RequiredRawEvents = ['Muon'],
+                                              MDSTFlag          = False,
+                                              RelatedInfoTools  = [ { 'Type'              : 'RelInfoMuonIDPlus',
+                                                                      'Variables'         : ['MU_BDT'],
+                                                                      'DaughterLocations' : { 'KS0 -> ^mu+ mu- mu+ mu-' : 'Muon1BDT',
+                                                                                              'KS0 -> mu+ ^mu- mu+ mu-' : 'Muon2BDT',
+                                                                                              'KS0 -> mu+ mu- ^mu+ mu-' : 'Muon3BDT',
+                                                                                              'KS0 -> mu+ mu- mu+ ^mu-' : 'Muon4BDT' }
+                                                                      } ] )
+
+        K0s2MuMuMuMuSS = self._makeK0s2X4('K0s2MuMuMuMuSS', ['[KS0 -> mu+ mu- mu+ mu+]cc', '[KS0 -> mu+ mu+ mu+ mu+]cc'])
+        self.K0s2MuMuMuMuSSLine = StrippingLine('K0s2MuMuMuMuSSLine',
+                                                prescale          = self.config['K0s2mu4SSPreScale'],
+                                                postscale         = self.config['K0s2mu4SSPostScale'],
+                                                algos             = [K0s2MuMuMuMuSS],
+                                                RequiredRawEvents = ['Muon'],
+                                                MDSTFlag          = False,
+                                                RelatedInfoTools  = [ { 'Type'              : 'RelInfoMuonIDPlus',
+                                                                        'Variables'         : ['MU_BDT'],
+                                                                        'DaughterLocations' : { '[KS0 -> ^mu+ [mu-]cc mu+ mu+]CC' : 'Muon1BDT',
+                                                                                                '[KS0 -> mu+ ^[mu-]cc mu+ mu+]CC' : 'Muon2BDT',
+                                                                                                '[KS0 -> mu+ [mu-]cc ^mu+ mu+]CC' : 'Muon3BDT',
+                                                                                                '[KS0 -> mu+ [mu-]cc mu+ ^mu+]CC' : 'Muon4BDT' }
+                                                                        } ] )
+        
+        #
+        # Register lines
+        #
+        for line in ( self.K0s2PiPiMuMuLine,
+                      self.K0s2PiPiMuMuLFVLine,
+                      self.K0s2PiPiMuMuSSLine,
+                      self.K0s2MuMuMuMuLine,
+                      self.K0s2MuMuMuMuSSLine,
+                      ):
+            self.registerLine(line)
+            
+    def _filterMuons( self, name, sel ):
+        """
+        Make the muon filter
+        """
+        code = '(TRCHI2DOF {MuMaxTrChi2pdof}) & '\
+            '(TRGHOSTPROB {MuMaxGP})'.format(**self.config)
+
+        fltr = FilterDesktop('Filter' + name, Code = code)
+
+        return Selection(name, Algorithm = fltr, RequiredSelections = [sel])
+
+    def _filterPions( self, name, sel ):
+        """
+        Make the pion filter
+        """
+        code = '(MIPDV(PRIMARY) {PiMinIP}) & '\
+            '(TRCHI2DOF {PiMaxTrChi2pdof}) & '\
+            '(TRGHOSTPROB {PiMaxGP})'.format(**self.config)
+        
+        fltr = FilterDesktop('Filter' + name, Code = code)
+
+        return Selection(name, Algorithm = fltr, RequiredSelections = [sel])
+        
+    def _makeK0s2X4( self, name, decays ):
+        """
+        Define the decay of a KS0 to four daughters
+        """
+        
+        common_dc = "ALL".format(**self.config)
+        
+        cc = "(AMAXDOCA('') {MaxDOCA})".format(**self.config)
+        
+        mc = "(M {MaxMass}) & "\
+            "(BPVVDZ {MinVDZ}) & "\
+            "(BPVDIRA {MinDIRA}) & "\
+            "(VFASPF(VZ) {MaxSVZ}) & "\
+            "(BPVLTIME() {MinLifeTime}) & "\
+            "(MIPDV(PRIMARY) {MaxIP}) & "\
+            "(MIPCHI2DV(PRIMARY) {MaxIPchi2}) & "\
+            "(VFASPF(VCHI2PDOF) {MaxSVchi2pdof})".format(**self.config)
+        
+        inputs = []
+        dc     = {}
+        
+        if any(map(lambda s: 'mu' in s, decays)):
+            inputs.append(self.SelMuons)
+            dc['mu+'] = common_dc
+            
+        if any(map(lambda s: 'pi' in s, decays)):
+            inputs.append(self.SelPions)
+            dc['pi+'] = common_dc
+            
+        combiner = CombineParticles(DecayDescriptors = decays,
+                                    DaughtersCuts    = dc,
+                                    CombinationCut   = cc,
+                                    MotherCut        = mc
+                                    )
+        return Selection(name,
+                         Algorithm = combiner,
+                         RequiredSelections = inputs
+                         )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2Leptons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2Leptons.py
new file mode 100644
index 000000000..1a26488c2
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2Leptons.py
@@ -0,0 +1,1369 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+__author__ = ['Adrian Casais Vidal','Carla Marin', 'Xabier Cid Vidal', 'Titus Mombaecher'] 
+__date__ = '12/03/2021'
+__version__ = '$2.1 $'
+
+'''
+stripping code for Kshort ---> Leptons
+'''
+
+default_config =  {
+    'NAME'        : 'Kshort2Leptons',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'Kshort2LeptonsConf',
+    'CONFIG'      : {
+                 "e":{    
+    
+    
+                           "L":{          'PT'                : 100.          ,#MeV                        
+                                         'MINIPCHI2'         : 16            ,#adimensional
+                                         'PIDe'              : -1          ,#adimensional
+                                         'GhostProb'         : 0.35          #adimensional
+                                         },
+                  
+                           "U":{       'PT'                : 50            ,#MeV
+                                       'MINIPCHI2'         : 10            ,#adimensional
+                                       'PIDe'              : -3.5          ,#adimensional
+                                       'GhostProb'         : 0.35          #adimensional
+                                       },
+                           "D":{       'PT'                : 50            ,#MeV
+                                       'MINIPCHI2'         : 16            ,#adimensional
+                                       'PIDe'              : -3.5          ,#adimensional
+                                       'GhostProb'         : 0.35          #adimensional
+                                       },
+                           "V":{         'PT'                : 0            ,#MeV
+                                         'MINIPCHI2'         : 40            ,#adimensional
+                                         'PIDe'              : -1000          ,#adimensional
+                                         'GhostProb'         : 0.5          #adimensional
+                                         },
+                           "Di":{         'PT'           : 100.          , #MeV
+                                         'MINIPCHI2'    : 16            , #adimensional
+                                         'PIDe'         : -4            , #adimensional
+                                         'GhostProb'    : 0.5            #adimensional
+                                         },
+                           },
+                 "mu":{    
+    
+                  
+                           "L":{'PT'                : 50.          ,#MeV                        
+                                         'MINIPCHI2'         : 10            ,#adimensional
+                                         'PIDmu'              : -5,#adimensional
+                                         'GhostProb'         : 0.5          #adimensional
+                                         },
+                  
+                           "U":{'PT'                : 50            ,#MeV
+                                       'MINIPCHI2'         : 10            ,#adimensional
+                                       'PIDmu'              : -5          ,#adimensional
+                                       'GhostProb'         : 0.35          #adimensional
+                                       },
+                           "D":{'PT'                : 50            ,#MeV
+                                       'MINIPCHI2'         : 10            ,#adimensional
+                                       'PIDmu'              : -5          ,#adimensional
+                                       'GhostProb'         : 0.35          #adimensional
+                                       },
+                           "V":{'PT'                : 50            ,#MeV
+                                         'MINIPCHI2'         : 16            ,#adimensional
+                                         'PIDmu'              : -3          ,#adimensional
+                                         'GhostProb'         : 0.35          #adimensional
+                                         },
+                           },
+                 "pi":{    
+    
+                  
+                           "L":{'PT'                : 100.          ,#MeV                        
+                                         'MINIPCHI2'         : 16            ,#adimensional
+                                         'PIDK'              : 5          ,#adimensional
+                                         'GhostProb'         : 0.5          #adimensional
+                                         },
+                  
+                           "U":{'PT'                : 50            ,#MeV
+                                       'MINIPCHI2'         : 10            ,#adimensional
+                                       'PIDK'              : 5          ,#adimensional
+                                       'GhostProb'         : 0.35          #adimensional
+                                       },
+                           "D":{'PT'                : 50            ,#MeV
+                                       'MINIPCHI2'         : 16            ,#adimensional
+                                       'PIDK'              : 5          ,#adimensional
+                                       'GhostProb'         : 0.35          #adimensional
+                                       },
+                           "V":{'PT'                : 50            ,#MeV
+                                         'MINIPCHI2'         : 10            ,#adimensional
+                                         'PIDK'              : 3          ,#adimensional
+                                         'GhostProb'         : 0.35          #adimensional
+                                         },
+                           },
+                  "2pi2e" : {
+                          
+                          
+                           'LL':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsLifetime'    : 0.01*89.53    , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 800.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      : 1,
+                                'Postscale'     : 1
+                                },
+                          
+                          'UU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                               },
+
+                          'DD':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsLifetime'    : 0.01*89.53    , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                               },
+
+                          'VV':{'KsMAXDOCA'         : .8            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 900.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 30,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                },
+
+                          'LU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                               },
+
+                          'LD':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsLifetime'    : 0.01*89.53    , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                               },
+
+                          'LV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 900.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 37,             #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                },
+                          'UV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 2000          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 878.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 19,             #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                }
+
+                        },
+                  "2mu2e" : {
+                          
+                          
+                           'LL':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsLifetime'    : 0.01*89.53    , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 800.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                                },
+                          
+                          'UU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 1500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                               },
+
+                          'DD':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsLifetime'    : 0.01*89.53    , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                               },
+
+                          'VV':{'KsMAXDOCA'         : .8            ,#mm
+                                'KsDisChi2'         : 1500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 900.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 30,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                },
+
+                          'LU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 1500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                               },
+
+                          'LD':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsLifetime'    : 0.01*89.53    , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                               },
+
+                          'LV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 1500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 900.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 40,             #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                },
+                          'UV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 1000          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 878.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 25,             #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                }
+
+                        },
+              
+                 "3mue" : {
+                          
+                          
+                           'LL':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsDisChi2'    : 50    , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 800.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                                },
+                          
+                          'UU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                               },
+
+                          'DD':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsDisChi2'    : 50             , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                               },
+
+                          'VV':{'KsMAXDOCA'         : .8            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 30,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                },
+
+                          'LU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                               },
+
+                          'LD':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsDisChi2'    : 50             , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                               },
+
+                          'LV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 35,             #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                },
+                          'UV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 35,             #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                }
+
+                        },
+                 "3emu" : {
+                          
+                          
+                           'LL':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsDisChi2'    : 2500    , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 800.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                                },
+                          
+                          'UU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                               },
+
+                          'DD':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsDisChi2'    : 2500           , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                               },
+
+                          'VV':{'KsMAXDOCA'         : .8            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 30,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                },
+
+                          'LU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                               },
+
+                          'LD':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsDisChi2'    : 2500           , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                               },
+
+                          'LV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 35,             #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                },
+                          'UV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 35,             #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                }
+
+                        },
+                  "2mu2pi" : {
+                          
+                          
+                           'LL':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsDisChi2'     : 1500    , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 800.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                                },
+                          
+                          'UU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                               },
+
+                          'DD':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsDisChi2'     : 1500          , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                               },
+
+                          'VV':{'KsMAXDOCA'         : .8            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 900.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 30,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                },
+
+                          'LU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100,            #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                               },
+
+                          'LD':{
+                                'KsMAXDOCA'     : 3.            , #mm
+                                'KsDisChi2'     : 1500          , #0.01*10^-12s
+                                'KsIP'          : 5.             , #mm
+                                'MaxKsMass'     : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'     : 100,
+                                'Prescale'      :  1,
+                                'Postscale'     :  1
+                               },
+
+                          'LV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 900.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 37,             #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                },
+                          'UV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 2000          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 878.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 19,             #adimensional
+                                'Prescale'          :  1,
+                                'Postscale'         :  1
+                                }
+
+                        },
+
+                  "4mu" : {
+                          'LL':{
+                                'KsMAXDOCA'         : 3.            , #mm
+                                'KsDisChi2'        : 1500.    , #0.01*10^-12s
+                                'KsIP'              : 5.             , #mm
+                                'MaxKsMass'         : 800.          , #MeV, comb mass high limit
+                                'KsVtxChi2'         : 100            ,
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+
+                                },
+                          'UU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 1500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100            ,#adimensional
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+                               },
+
+                          'DD':{
+                                'KsMAXDOCA'         : 3.            , #mm
+                                'KsDisChi2'        : 1500.          , #0.01*10^-12s
+                                'KsIP'              : 5.             , #mm
+                                'MaxKsMass'         : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'         : 100            ,
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+                               },
+
+
+                          'VV':{'KsMAXDOCA'         : .8            ,#mm
+                                'KsDisChi2'         : 1500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 30            , #adimensional
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+
+                                },
+
+                          'LU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 1500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100            , #adimensional
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+
+                               },
+
+                          'LD':{
+                                'KsMAXDOCA'         : 3.            , #mm
+                                'KsDisChi2'        : 1500.          , #0.01*10^-12s
+                                'KsIP'              : 5.             , #mm
+                                'MaxKsMass'         : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'         : 100            ,
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+                               },
+
+                          'LV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 1500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 35            ,#adimensional
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+
+                                },
+                          'UV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 1500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 800.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 19            , #adimensional
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+
+                                },
+
+                          },
+
+                  "4e" : {
+                          'LL':{
+                                'KsMAXDOCA'         : 3.            , #mm
+                                'KsLifetime'        : 0.01*89.53    , #0.01*10^-12s
+                                'KsIP'              : 5.             , #mm
+                                'MaxKsMass'         : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'         : 100            ,
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+                                },
+                          'UU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 1000.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100            ,#adimensional
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+                               },
+                          'DD':{
+                                'KsMAXDOCA'         : 3.            , #mm
+                                'KsLifetime'        : 0.01*89.53    , #0.01*10^-12s
+                                'KsIP'              : 5.             , #mm
+                                'MaxKsMass'         : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'         : 100            ,
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+                               },
+
+                          'VV':{'KsMAXDOCA'         : .8            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 1000.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 30.            , #adimensional
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+
+                                },
+
+                          'LU':{'KsMAXDOCA'         : 3.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 5.             ,#mm
+                                'MaxKsMass'         : 1000.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 100            , #adimensional
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+
+                               },
+                          'LD':{
+                                'KsMAXDOCA'         : 3.            , #mm
+                                'KsLifetime'        : 0.01*89.53    , #0.01*10^-12s
+                                'KsIP'              : 5.             , #mm
+                                'MaxKsMass'         : 1000.          , #MeV, comb mass high limit
+                                'KsVtxChi2'         : 100            ,
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+                               },
+                          'LV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 2500          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 1000.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 37            ,#adimensional
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+
+                                },
+                          'UV':{'KsMAXDOCA'         : 1.            ,#mm
+                                'KsDisChi2'         : 2000          ,#adimensional
+                                'KsIP'              : 1.             ,#mm
+                                'MaxKsMass'         : 1000.          ,#MeV, comb mass high limit
+                                'KsVtxChi2'         : 20            , #adimensional
+                                'Prescale'          :  1            ,
+                                'Postscale'         :  1
+
+                                },
+
+                          },
+                        
+
+                  
+
+
+                  
+                                                
+                        'TISTOSDict'     : {'Hlt2RareStrangeKsLeptonsTOSDecision%TOS': 0,
+                                            },
+
+                    },
+    'STREAMS'     : ['Leptonic']
+    }
+
+
+__all__ = ('Kshort2Leptons',
+           'default_config'
+           )
+ 
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays as Combine3Particles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsMuons
+from StandardParticles import StdAllLooseMuons
+from StandardParticles import StdLooseDownMuons
+from StandardParticles import StdAllNoPIDsPions
+from StandardParticles import StdNoPIDsDownPions
+from StandardParticles import StdNoPIDsUpPions
+from StandardParticles import StdAllNoPIDsElectrons
+from StandardParticles import StdNoPIDsDownElectrons
+from StandardParticles import StdDiElectronFromTracks
+from StandardParticles import StdNoPIDsUpElectrons
+from CommonParticles.Utils import *
+from Configurables import ChargedProtoParticleMaker, NoPIDsParticleMaker, DelegatingTrackSelector, CombineParticles, LoKi__VertexFitter
+from SelPy.utils import ( UniquelyNamedObject,
+                          ClonableObject,
+                          SelectionBase )
+from itertools import product
+## VELO PARTICLES SETUP COPIED FROM StrippingTrackEffD0ToK3Pi
+class GSWrapper(UniquelyNamedObject,
+                ClonableObject,
+                SelectionBase) :
+    
+    def __init__(self, name, sequencer, output, requiredSelections) :
+        UniquelyNamedObject.__init__(self, name)
+        ClonableObject.__init__(self, locals())
+        SelectionBase.__init__(self,
+                               algorithm = sequencer,
+                               outputLocation = output,
+                               requiredSelections = requiredSelections )
+
+##############################
+
+class Kshort2LeptonsConf(LineBuilder) :
+    """
+    Builder for Kshort --> Leptons
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+                              
+    def __init__(self, name, config):
+
+        self.name = name
+        LineBuilder.__init__(self, name, config)
+
+
+        ########################
+        ## 0: make missing VELO/Upstream particles by hand
+
+        self.makeparts_velo = ChargedProtoParticleMaker(name = "MyProtoParticlesVelo"+self.name,
+                                                   Inputs = ["Rec/Track/Best"],
+                                                   Output = "Rec/ProtoP/MyProtosVelo"+self.name)
+        self.makeparts_up = ChargedProtoParticleMaker(name = "MyProtoParticlesUp"+self.name,
+                                                   Inputs = ["Rec/Track/Best"],
+                                                   Output = "Rec/ProtoP/MyProtosUp"+self.name)
+                        
+        self.makeparts_velo.addTool( DelegatingTrackSelector, name="TrackSelector" )
+        self.makeparts_velo.TrackSelector.TrackTypes = ["Velo"]
+
+
+        self.makeparts_up.addTool( DelegatingTrackSelector, name="TrackSelector" )
+        self.makeparts_up.TrackSelector.TrackTypes = ["Upstream"]
+
+        
+
+        self.myprotos_velo = GSWrapper(name = "MyProtosVelo"+self.name,
+                                      sequencer = self.makeparts_velo,
+                                      output = "Rec/ProtoP/MyProtosVelo"+self.name,
+                                      requiredSelections =  [])
+
+        self.myprotos_up = GSWrapper(name = "MyProtosUp"+self.name,
+                                      sequencer = self.makeparts_up,
+                                      output = "Rec/ProtoP/MyProtosUp"+self.name,
+                                      requiredSelections =  [])
+
+
+
+        
+        
+        #Making NoPIDs containers for the now available particles
+        self.veloElectrons =  NoPIDsParticleMaker ( name = "StdNoPIDsVeloElectronsLocal"+self.name,
+                                                    DecayDescriptor = 'Electron' ,
+                                                    Particle = 'electron',
+                                                    AddBremPhotonTo = [],
+                                                    Input = self.myprotos_velo.outputLocation())
+        self.upMuons =  NoPIDsParticleMaker ( name = "StdNoPIDsUpMuonsLocal"+self.name,
+                                                    DecayDescriptor = 'Muon' ,
+                                                    Particle = 'muon',
+                                                    AddBremPhotonTo = [],
+                                                    Input = self.myprotos_up.outputLocation())
+
+        self.veloMuons =  NoPIDsParticleMaker ( name = "StdNoPIDsVeloMuonsLocal"+self.name,
+                                              DecayDescriptor = 'Muon' ,
+                                              Particle = 'muon',
+                                              AddBremPhotonTo = [],
+                                              Input = self.myprotos_velo.outputLocation()) 
+        self.veloPions =  NoPIDsParticleMaker ( name = "StdNoPIDsVeloPionsLocal"+self.name,
+                                              DecayDescriptor = 'Pion' ,
+                                              Particle = 'pion',
+                                              AddBremPhotonTo = [],
+                                              Input = self.myprotos_velo.outputLocation()) 
+
+
+
+        updateDoD(self.veloElectrons);updateDoD(self.veloMuons);updateDoD(self.upMuons);updateDoD(self.veloPions)
+
+
+        self.StdNoPIDsVeloElectrons = Selection('StdNoPIDsVeloElectrons'+self.name,
+                                                Algorithm = self.veloElectrons, 
+                                                RequiredSelections = [self.myprotos_velo],
+                                                InputDataSetter=None)
+        
+        self.StdNoPIDsUpMuons = Selection('StdNoPIDsUpMuons'+self.name,
+                                                Algorithm = self.upMuons, 
+                                                RequiredSelections = [self.myprotos_up],
+                                                InputDataSetter=None)
+
+        self.StdNoPIDsVeloMuons = Selection('StdNoPIDsVeloMuons'+self.name,
+                                          Algorithm = self.veloMuons, 
+                                          RequiredSelections = [self.myprotos_velo],
+                                          InputDataSetter=None)
+        self.StdNoPIDsVeloPions = Selection('StdNoPIDsVeloPions'+self.name,
+                                          Algorithm = self.veloPions, 
+                                          RequiredSelections = [self.myprotos_velo],
+                                          InputDataSetter=None)
+        
+        #Handy dictionaries to access the different categories of particles.
+        
+        StandardParticles = {"mu":{"L":StdAllLooseMuons,
+                                "U":self.StdNoPIDsUpMuons,
+                                "D":StdLooseDownMuons,
+                                "V":self.StdNoPIDsVeloMuons
+                                   },
+                          "e":{"L":StdAllNoPIDsElectrons,
+                               "V":self.StdNoPIDsVeloElectrons,
+                               "U":StdNoPIDsUpElectrons,
+                               "D":StdNoPIDsDownElectrons,
+                               "Di":StdDiElectronFromTracks
+                               },
+                          
+                          "pi":{"L":StdAllNoPIDsPions,
+                                "U":StdNoPIDsUpPions,
+                                "D":StdNoPIDsDownPions,
+                                "V":self.StdNoPIDsVeloPions
+                                }
+                          }
+
+        
+
+
+        # Applying cuts to particles
+        
+        particles ={"mu":{},"pi":{},"e":{}}
+
+        for cat in ["L","U","D","V"]:
+
+            particles["mu"][cat]=self.makeMuons(self.name+"Muons"+cat,StandardParticles["mu"][cat],default_config["CONFIG"]["mu"][cat])
+            particles["pi"][cat]=self.makePions(self.name+"Pions"+cat,StandardParticles["pi"][cat],default_config["CONFIG"]["pi"][cat])
+            particles["e"][cat]= self.makeElecs(self.name+"Electrons"+cat,StandardParticles["e"][cat],default_config["CONFIG"]["e"][cat])
+            
+        particles["e"]["Di"] = self.makeElecsFromTracks(self.name+"DiElectrons"+cat, StandardParticles["e"]["Di"],default_config["CONFIG"]["e"]["Di"])
+        
+        ########################
+        ## 1: Make combinations for the different decays and different tracks combinations and building the Lines
+
+        #KS0 -> mumuee
+        diLongmumuee = particles["mu"]["L"]
+        
+        parSelsmumuee = {"LL":[diLongmumuee,particles["e"]["Di"]],
+                         "LU":[diLongmumuee,particles["e"]["L"],particles["e"]["U"]],
+                         "LV":[diLongmumuee,particles["e"]["L"],particles["e"]["V"]],
+                         "LD":[diLongmumuee,particles["e"]["L"],particles["e"]["D"]],
+                         "UU":[diLongmumuee,particles["e"]["U"]],
+                         "DD":[diLongmumuee,particles["e"]["D"]],
+                         "UV":[diLongmumuee,particles["e"]["U"],particles["e"]["V"]],
+                         "VV":[diLongmumuee,particles["e"]["V"]],}
+                         
+        KS0mumuee = self.buildCategories(["mu+","mu-","e+","e-"],True,parSelsmumuee,default_config["CONFIG"]["2mu2e"])
+        KS0mumueeLFV1 = self.buildCategories(["mu+","mu+","e-","e-"],True,parSelsmumuee,default_config["CONFIG"]["2mu2e"],cc=True)
+
+        
+        self.buildLines(self.name,"2mu2e",KS0mumuee)
+        self.buildLines(self.name,"2mu2e",KS0mumueeLFV1,LFVLabel="LFV1")
+
+
+        #KS0 -> 3mue
+        diLong3mue = particles["mu"]["L"]
+        
+        parSels3mue = {"LL":[diLong3mue,particles["e"]["L"]],
+                         "LU":[diLong3mue,particles["e"]["U"]],
+                         "LD":[diLong3mue,particles["e"]["D"]],
+                         "LV":[diLong3mue,particles["e"]["V"]],
+                         "UU":[diLong3mue,particles["mu"]["U"],particles["e"]["U"]],
+                         "DD":[diLong3mue,particles["mu"]["D"],particles["e"]["D"]],
+                         "UV":[diLong3mue,particles["mu"]["U"],particles["e"]["V"]],
+                         "VV":[diLong3mue,particles["e"]["V"],particles["mu"]["V"]]}
+                         
+        KS03mue = self.buildCategories(["mu+","mu-","mu+","e-"],False,parSels3mue,default_config["CONFIG"]["3mue"],cc=True)
+        
+        
+        self.buildLines(self.name,"3mue",KS03mue)
+
+       
+        #KS0 -> 3emu
+        diLong3emu = particles["e"]["L"]
+        
+        parSels3emu = {"LL":[diLong3emu,particles["mu"]["L"]],
+                         "LU":[diLong3emu,particles["mu"]["U"]],
+                         "LD":[diLong3emu,particles["mu"]["D"]],
+                         "LV":[diLong3emu,particles["mu"]["L"],particles["e"]["V"]],
+                         "UU":[diLong3emu,particles["mu"]["U"],particles["e"]["U"]],
+                         "DD":[diLong3emu,particles["mu"]["D"],particles["e"]["D"]],
+                         "UV":[diLong3emu,particles["mu"]["U"],particles["e"]["V"]],
+                         "VV":[diLong3emu,particles["e"]["V"],particles["mu"]["V"]]}
+                         
+        KS03emu = self.buildCategories(["e+","e-","mu+","e-"],False,parSels3emu,default_config["CONFIG"]["3emu"],cc=True)
+        
+        
+        self.buildLines(self.name,"3emu",KS03emu)
+
+        
+
+
+
+        #KS0 -> pipiee
+        diLongpipiee = particles["pi"]["L"]
+        
+        parSelspipiee = {"LL":[diLongpipiee,particles["e"]["Di"]],
+                         "LU":[diLongpipiee,particles["e"]["L"],particles["e"]["U"]],
+                         "LD":[diLongpipiee,particles["e"]["L"],particles["e"]["D"]],
+                         "LV":[diLongpipiee,particles["e"]["L"],particles["e"]["V"]],
+                         "UU":[diLongpipiee,particles["e"]["U"]],
+                         "DD":[diLongpipiee,particles["e"]["D"]],
+                         "UV":[diLongpipiee,particles["e"]["U"],particles["e"]["V"]],
+                         "VV":[diLongpipiee,particles["e"]["V"]],}
+                         
+        KS0pipiee = self.buildCategories(["pi+","pi-","e+","e-"],True,parSelspipiee,default_config["CONFIG"]["2pi2e"])
+
+        self.buildLines(self.name,"2pi2e",KS0pipiee)
+
+        #KS0 -> mumupipi
+        diLongmumupipi = particles["mu"]["L"]
+        
+        parSelsmumupipi = {"LL":[diLongmumupipi,particles["pi"]["L"]],
+                           "LU":[diLongmumupipi,particles["pi"]["L"],particles["pi"]["U"]],
+                           "LD":[diLongmumupipi,particles["pi"]["L"],particles["pi"]["D"]],
+                           "LV":[diLongmumupipi,particles["pi"]["L"],particles["pi"]["V"]],
+                           "UU":[diLongmumupipi,particles["pi"]["U"]],
+                           "DD":[diLongmumupipi,particles["pi"]["D"]],
+                           "UV":[diLongmumupipi,particles["pi"]["U"],particles["pi"]["V"]],
+                           "VV":[diLongmumupipi,particles["pi"]["V"]],}
+
+                              
+                         
+
+        KS0mumupipi = self.buildCategories(["mu+","mu-","pi+","pi-"],False,parSelsmumupipi,default_config["CONFIG"]["2mu2pi"])
+        KS0mumupipiLFV1 = self.buildCategories(["mu+","mu+","pi-","pi-"],False,parSelsmumupipi,default_config["CONFIG"]["2mu2pi"],cc=True)
+
+        
+        self.buildLines(self.name,"2mu2pi",KS0mumupipi)
+        self.buildLines(self.name,"2mu2pi",KS0mumupipiLFV1,LFVLabel="LFV1")
+        #KS0 -> 4mu
+        diLong4mu = particles["mu"]["L"]
+        
+        parSels4mu = {"LL":[diLong4mu],
+                         "LU":[diLong4mu,particles["mu"]["U"]],
+                         "LD":[diLong4mu,particles["mu"]["D"]],
+                         "LV":[diLong4mu,particles["mu"]["V"]],
+                         "UU":[diLong4mu,particles["mu"]["U"]],
+                         "DD":[diLong4mu,particles["mu"]["D"]],
+                         "UV":[diLong4mu,particles["mu"]["U"],particles["mu"]["V"]],
+                         "VV":[diLong4mu,particles["mu"]["V"]],}
+                         
+        KS04mu = self.buildCategories(["mu+","mu-","mu+","mu-"],False,parSels4mu,default_config["CONFIG"]["4mu"])
+
+                
+        self.buildLines(self.name,"4mu",KS04mu)
+
+        #KS0 -> 4e
+        diLong4e = particles["e"]["Di"]
+        
+        parSels4e = {"LL":[diLong4e],
+                         "LU":[diLong4e,particles["e"]["U"],particles["e"]["L"]],
+                         "LD":[diLong4e,particles["e"]["D"],particles["e"]["L"]],
+                         "LV":[diLong4e,particles["e"]["V"],particles["e"]["L"]],
+                         "UU":[diLong4e,particles["e"]["U"]],
+                         "DD":[diLong4e,particles["e"]["D"]],
+                         "UV":[diLong4e,particles["e"]["U"],particles["e"]["V"]],
+                         "VV":[diLong4e,particles["e"]["V"]],}
+                         
+
+        KS04e = self.buildCategories(["e+","e-","e+","e-"],True,parSels4e,default_config["CONFIG"]["4e"],onlyLL=False,is4e=True)
+
+                
+        self.buildLines(self.name,"4e",KS04e)
+
+        
+
+
+    def buildLines(self,name,dec,categories,LFVLabel=""):
+        '''
+        Handy function to build and register the lines.
+        '''
+
+        lines = {}
+        for cat in categories:
+            RelInfo = [
+              { "Type" : "RelInfoMuonIDPlus",
+                "Variables" : ["MU_BDT"],
+                "DaughterLocations"  : {
+                "KS0 -> [J/psi(1S) -> ^X+ [X-]CC ]CC [J/psi(1S) -> X+ [X-]CC ]CC" : "Muon1BDT",
+                "KS0 -> [J/psi(1S) -> X+ ^[X-]CC ]CC [J/psi(1S) -> X+ [X-]CC ]CC" : "Muon2BDT",
+                "KS0 -> [J/psi(1S) -> X+ [X-]CC ]CC [J/psi(1S) -> ^X+ [X-]CC ]CC" : "Muon3BDT",
+                "KS0 -> [J/psi(1S) -> X+ [X-]CC ]CC [J/psi(1S) -> X+ ^[X-]CC ]CC" : "Muon4BDT",
+                }
+              },
+              {'Type'              : 'RelInfoVertexIsolation',
+                                     'Location'          : 'RelInfoVertexIsolation'
+              },
+              {
+              'Type'              : 'RelInfoVertexIsolationBDT',
+              'Location'          : 'RelInfoVertexIsolationBDT'
+              },
+              {
+              'Type'              : 'RelInfoConeVariables',
+              'ConeAngle'         : 1.0,
+              'Location'          : 'RelInfoConeVariables_1.0',
+              },
+              {
+              'Type'              : 'RelInfoConeVariables',
+              'ConeAngle'         : 1.5,
+              'Location'          : 'RelInfoConeVariables_1.5',
+              },
+              {
+              'Type'              : 'RelInfoConeVariables',
+              'ConeAngle'         : 2.0,
+              'Location'          : 'RelInfoConeVariables_2.0',
+              }
+            ]
+            if not ("V" in cat):  # using the track isolation for decays with V tracks throws a lot of errors
+                RelInfo = RelInfo+[
+                        {'Type' : 'RelInfoTrackIsolationBDT2',
+                        'Location' : 'TrackIsolationBDT2_first',
+                        'Particles' : [1,2]
+                        },
+                        {'Type' : 'RelInfoTrackIsolationBDT2',
+                        'Location' : 'TrackIsolationBDT2_second',
+                        'Particles' : [4,5]
+                        }
+                    ]
+
+            if ( ( dec == "4e","3mue","3emu") and cat in ["VV","LV","UV","UU"]):
+                lines[cat]=StrippingLine(name+dec+cat+LFVLabel+"Line",
+                                         prescale=default_config["CONFIG"][dec][cat]["Prescale"],
+                                         postscale=default_config["CONFIG"][dec][cat]["Postscale"],
+                                         selection=categories[cat],
+                                         RelatedInfoTools = RelInfo,
+                                         MaxCombinations = 200000,
+                                         MDSTFlag=False)
+            else:
+                lines[cat]=StrippingLine(name+dec+cat+LFVLabel+"Line",
+                                         prescale=default_config["CONFIG"][dec][cat]["Prescale"],
+                                         postscale=default_config["CONFIG"][dec][cat]["Postscale"],
+                                         selection=categories[cat],
+                                         RelatedInfoTools = RelInfo,
+                                         MDSTFlag=False)
+                
+        for line in lines:
+            self.registerLine(lines[line])
+            
+    def makePions(self,name,inputPions,pionCuts):
+        """
+        Pion selection.
+        """
+        #adding variables to function scope
+
+        _code = "(PT > %(PT)s) &"\
+                "(MIPCHI2DV(PRIMARY) > %(MINIPCHI2)s) &"\
+                "(TRGHOSTPROB < %(GhostProb)s) &"\
+                "(PIDK < %(PIDK)s)" % pionCuts
+        
+        _Filter = FilterDesktop(Code = _code)
+        
+        return Selection(name,
+                         Algorithm = _Filter,
+                         RequiredSelections = [ inputPions ]
+                         )
+
+    def makeMuons(self,name,inputMuons,muonCuts):
+        """
+        Muon selection.
+        """
+
+        _code = "(PT > %(PT)s) &"\
+                "(MIPCHI2DV(PRIMARY) > %(MINIPCHI2)s) &"\
+                "(TRGHOSTPROB < %(GhostProb)s) &"\
+                "(PIDmu > %(PIDmu)s)" % muonCuts
+    
+        _Filter = FilterDesktop(Code = _code)
+        
+        return Selection(name,
+                         Algorithm = _Filter,
+                         RequiredSelections = [inputMuons] 
+                         )
+
+
+
+
+    def makeElecs(self,name, inputElecs,electronCuts):
+        """
+        Electron.
+        """
+
+
+
+        _code = "( MIPCHI2DV(PRIMARY) > %(MINIPCHI2)s ) &"\
+                "( PT > %(PT)s ) &"\
+                "( TRGHOSTPROB < %(GhostProb)s ) & "\
+                "( PIDe > %(PIDe)s )"  % electronCuts
+            
+            
+        _Filter = FilterDesktop(Code = _code)
+        
+        return Selection(name,
+                         Algorithm = _Filter,
+                         RequiredSelections = [inputElecs]
+                         )
+
+
+    
+    def makeElecsFromTracks(self,name, inputElecs,electronCuts):
+        """
+        Electron selection from StdDiElectronFromTracks
+        """
+
+
+
+        _code = "(MINTREE(ABSID<14,PT) > %(PT)s) &"\
+                "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(MINIPCHI2)s) &"\
+                "(MAXTREE(ABSID<14,TRGHOSTPROB) < %(GhostProb)s) &"\
+                "(MINTREE(ABSID<14,PIDe) > %(PIDe)s)"  % electronCuts
+            
+        _Filter = FilterDesktop(Code = _code)
+        
+        return Selection(name,
+                         Algorithm = _Filter,
+                         RequiredSelections = [inputElecs]
+                         )
+
+
+
+
+    def buildCategories(self,pars,hasDielectron,parSels,motherCuts,cc=False,onlyLL=False,is4e=False):
+        '''
+        Builds the different cobinations of tracks using the class KshortTo4bodies. 
+        '''
+        combCuts = self.makeCombCuts(pars)
+        
+        dec = "".join(pars)
+        
+        
+        LL = KshortTo4Bodies(self.name+dec+"LL",pars,parSels["LL"],motherCuts["LL"],combCuts["LL"],hasDielectronLong=hasDielectron,hasVELO=False,CC=cc,is4e=is4e) #0: LL
+        if not onlyLL:
+            LV = KshortTo4Bodies(self.name+dec+"LV",pars,parSels["LV"],motherCuts["LV"],combCuts["LV"],hasDielectronLong=False,hasVELO=True,CC=cc,is4e=is4e)          #1: LV
+            LU = KshortTo4Bodies(self.name+dec+"LU",pars,parSels["LU"],motherCuts["LU"],combCuts["LU"],hasDielectronLong=False,hasVELO=False,CC=cc,is4e=is4e)         #2: LU
+            UU = KshortTo4Bodies(self.name+dec+"UU",pars,parSels["UU"],motherCuts["UU"],combCuts["UU"],hasDielectronLong=False,hasVELO=False,CC=cc,is4e=is4e)         #4: UU
+            UV = KshortTo4Bodies(self.name+dec+"UV",pars,parSels["UV"],motherCuts["UV"],combCuts["UV"],hasDielectronLong=False,hasVELO=True,CC=cc,is4e=is4e)          #6: UV
+            VV = KshortTo4Bodies(self.name+dec+"VV",pars,parSels["VV"],motherCuts["VV"],combCuts["VV"],hasDielectronLong=False,hasVELO=True,CC=cc,is4e=is4e)          #7: VV
+            if dec=="pi+pi-e+e-" or dec=="mu+mu-e+e-" or dec=="mu+mu+e-e-" or dec=="e+e-e+e-":
+                LD = KshortTo4Bodies(self.name+dec+"LD",pars,parSels["LD"],motherCuts["LD"],combCuts["LD"],hasDielectronLong=False,hasVELO=False,CC=cc,is4e=is4e, first_set=True)         #3: LD
+                DD = KshortTo4Bodies(self.name+dec+"DD",pars,parSels["DD"],motherCuts["DD"],combCuts["DD"],hasDielectronLong=False,hasVELO=False,CC=cc,is4e=is4e, first_set=True)         #5: DD
+            else:
+                LD = KshortTo4Bodies(self.name+dec+"LD",pars,parSels["LD"],motherCuts["LD"],combCuts["LD"],hasDielectronLong=False,hasVELO=False,CC=cc,is4e=is4e)         #3: LD
+                DD = KshortTo4Bodies(self.name+dec+"DD",pars,parSels["DD"],motherCuts["DD"],combCuts["DD"],hasDielectronLong=False,hasVELO=False,CC=cc,is4e=is4e)         #5: DD
+        
+            return {"LL": LL.KS0, "LV":LV.KS0, "LU":LU.KS0, "LD":LD.KS0, "UU":UU.KS0, "DD":DD.KS0, "UV":UV.KS0, "VV":VV.KS0}
+        else:
+            return {"LL":LL.KS0}
+        
+    def makeCombCuts(self,pars):
+        '''
+        Make combination cuts for the second pair of particles to reduce the custom track containers to the relevant particles
+        '''
+        cuts = {}
+        pars_ = [par.replace('+','').replace('-','') for par in pars]
+        
+        cuts["LV"] =  " ( ( ANUM( ( TRTYPE == 3 ) &  ( ABSID == '{2}' ) ) == 1 ) )  & ( ( ANUM( ( TRTYPE == 1 ) &  ( ABSID == '{3}' ) ) == 1 ) )".format(*pars)
+        cuts["LU"] =  " ( ( ANUM( ( TRTYPE == 3 ) &  ( ABSID == '{2}' ) ) == 1 ) )  & ( ( ANUM( ( TRTYPE == 4 ) &  ( ABSID == '{3}' ) ) == 1 ) )".format(*pars)
+        cuts["LD"] =  " ( ( ANUM( ( TRTYPE == 3 ) &  ( ABSID == '{2}' ) ) == 1 ) )  & ( ( ANUM( ( TRTYPE == 5 ) &  ( ABSID == '{3}' ) ) == 1 ) )".format(*pars)
+        cuts["UV"] =  " ( ( ANUM( ( TRTYPE == 4 ) &  ( ABSID == '{2}' ) ) == 1 ) )  & ( ( ANUM( ( TRTYPE == 1 ) &  ( ABSID == '{3}' ) ) == 1 ) )".format(*pars)
+        
+        if pars_[2]==pars_[3]:
+            cuts["UU"] = " ( ( ANUM( ( TRTYPE == 4 ) &  ( ABSID == '{2}' ) ) == 2 ) )".format(*pars)
+            cuts["DD"] = " ( ( ANUM( ( TRTYPE == 5 ) &  ( ABSID == '{2}' ) ) == 2 ) )".format(*pars)
+            cuts["VV"] = " ( ( ANUM( ( TRTYPE == 1 ) &  ( ABSID == '{2}' ) ) == 2 ) )".format(*pars)
+            cuts["LL"] = " ( ( ANUM( ( TRTYPE == 3 ) &  ( ABSID == '{2}' ) ) == 2 ) )".format(*pars)
+        else:
+            cuts["UU"] = " ( ( ANUM( ( TRTYPE == 4 ) &  ( ABSID == '{2}' ) ) == 1 ) )  & ( ( ANUM( ( TRTYPE == 4 ) &  ( ABSID == '{3}' ) ) == 1 ) )".format(*pars)
+            cuts["DD"] = " ( ( ANUM( ( TRTYPE == 5 ) &  ( ABSID == '{2}' ) ) == 1 ) )  & ( ( ANUM( ( TRTYPE == 5 ) &  ( ABSID == '{3}' ) ) == 1 ) )".format(*pars)
+            cuts["VV"] = " ( ( ANUM( ( TRTYPE == 1 ) &  ( ABSID == '{2}' ) ) == 1 ) )  & ( ( ANUM( ( TRTYPE == 1 ) &  ( ABSID == '{3}' ) ) == 1 ) )".format(*pars)
+            cuts["LL"] = " ( ( ANUM( ( TRTYPE == 4 ) &  ( ABSID == '{2}' ) ) == 3 ) )  & ( ( ANUM( ( TRTYPE == 3 ) &  ( ABSID == '{3}' ) ) == 1 ) )".format(*pars)
+
+        return cuts
+
+#####################################################
+
+
+class KshortTo4Bodies():
+    '''
+    Class to aimed to output the selection using the different track combinations for Kshort -> 4 bodies (as the name suggests).
+    '''
+    
+    def __init__(self,name,pars,parSels,motherCuts,combCuts,hasDielectronLong,hasVELO,CC=False,is4e=False, first_set=False): 
+
+        # decay is KS->Jpsi Jpsi
+        # there will be several possibilities for a Jpsi: Standard, Dielectron, with VELO
+        # then we have different cuts: cuts with lifetime on LL and DD samples of pipiee, mumuee, 4e and a different set of cuts for the rest
+
+        decay = "KS0 -> J/psi(1S) J/psi(1S)"
+      
+        # combine 12 (no VELO, but potentially Dielectron)
+        # print(name, "making first jpsi")
+        jpsi_first = self.combine_Jpsi_first(name, pars,parSels, CC, is4e)
+
+        # combine 34 (potentially VELO or Dielectron)
+        # print(name, "making second jpsi")
+        jpsi_second = self.combine_Jpsi_second(name, pars,parSels, CC, hasDielectronLong, hasVELO, combCuts=combCuts, motherCuts=motherCuts)    
+
+        jpsilist = [jpsi_first,jpsi_second]
+        # if two jpsis in, remove double counting by providing the Dielectron container only once
+        if is4e and hasDielectronLong:
+            jpsilist=[jpsi_first]
+        # combine Jpsis (two different sets of variables)
+        # We apply different cuts deppending on the configuration of tracks.
+        if hasDielectronLong or first_set :
+            # print(name, "making KS with first set")
+            self.KS0 = self.combine_first_set(name, decay, jpsilist ,motherCuts=motherCuts, combCuts=combCuts)
+        else:
+            # print(name, "making KS with second set")
+            self.KS0=self.combine(name, decay, jpsilist,motherCuts=motherCuts,combCuts=combCuts)
+
+
+    def makeDecayDescriptorVELO(self,pars,CC):
+        '''
+        VELO tracks cannot distinguish the charge of particles so we neeed to take into account all combinations
+        of charges. This concerns only track 3 or 4 , since the first two are required to be long tracks
+        '''
+        par3 = pars[-2].replace("+","");par3=par3.replace("-","")
+        par4 = pars[-1].replace("+","");par4=par4.replace("-","")
+
+        descriptor = ["J/psi(1S) -> {0}+ {1}-".format(par3,par4),"[J/psi(1S) -> {0}+ {1}+]cc".format(par3,par4)]
+        if par3 != par4:
+            descriptor = ["[J/psi(1S) -> {0}+ {1}-]cc".format(par3,par4),"[J/psi(1S) -> {0}+ {1}+]cc".format(par3,par4)]
+
+        # print("VELO descriptor:", descriptor)            
+        return descriptor
+
+
+    def combine_Jpsi_first(self,name, pars,parSels, CC, is4e):
+        '''
+        Combine the first two tracks to a common Jpsi. The first two tracks are always long tracks.
+        If the decay is 4e, the first two tracks are already combined as Dielectron.
+        '''
+        # print("combine_Jpsi_first: ", name, pars, parSels, CC, is4e)
+        descriptor = "J/psi(1S) -> {0} {1}".format(*pars)
+        if CC:
+          descriptor = "[J/psi(1S) -> {0} {1}]cc".format(*pars)
+        if is4e :
+            return parSels[0]
+        else :
+            _Combine = CombineParticles(name = "Combine_Jpsi_first_"+name,
+                                        DecayDescriptor = descriptor,
+                                        MotherCut= "ALL")
+            pars_ = [par.replace('+','').replace('-','') for par in pars]
+            if(pars_[0]==pars_[1]):
+                # print("using same container for particles")
+                return Selection("Sel_" + name + "_Jpsi_first", Algorithm = _Combine, RequiredSelections = [parSels[0]])
+            else:
+                # print("using different container for particles")
+                return Selection("Sel_" + name + "_Jpsi_first", Algorithm = _Combine, RequiredSelections = [parSels[0],parSels[1]])
+
+    def combine_Jpsi_second(self,name, pars,parSels, CC, hasDielectronLong, hasVELO, combCuts, motherCuts):
+        '''
+        Combine the second two tracks to a common Jpsi. If there is a Dielectron, the two electrons are already combined as Jpsi.
+        If the decay contains a VELO track, apply the VELO vertex fitter.
+        '''
+        # print("combine_Jpsi_second: ", name, pars, parSels, CC, hasDielectronLong, hasVELO)
+
+        _combcut = "(AM < %(MaxKsMass)s *MeV) & "\
+                   "(AMAXDOCA('') < %(KsMAXDOCA)s *mm) & " % motherCuts
+        _combcut += combCuts
+
+
+        descriptor = "J/psi(1S) -> {0} {1}".format(pars[-2], pars[-1])
+
+        par3 = pars[-2].replace("+","");par3=par3.replace("-","")
+        par4 = pars[-1].replace("+","");par4=par4.replace("-","")
+
+        if par3 !=par4:
+            descriptor = "[J/psi(1S) -> {0} {1}]cc".format(pars[-2], pars[-1])
+
+        if hasDielectronLong :
+            # print("returning dielectron")
+            return parSels[-1]
+        else :
+
+            _Combine = CombineParticles(name = "Combine_Jpsi_second_"+name,
+                                        DecayDescriptor = descriptor,
+                                        CombinationCut = _combcut,
+                                        MotherCut= "ALL")
+            if hasVELO:
+                descriptor = self.makeDecayDescriptorVELO(pars,CC)
+
+                _Combine = CombineParticles(name = "Combine_Jpsi_second_"+name,
+                                        DecayDescriptors = descriptor,
+                                        CombinationCut = combCuts,
+                                        MotherCut= "( VFASPF(VCHI2/VDOF) < %(KsVtxChi2)s) " % motherCuts) # need to reduce multiplicity with Velo tracks
+                _Combine.ParticleCombiners = {"" : "LoKi::VertexFitter"}
+                _Combine.addTool( LoKi__VertexFitter, name="LoKi::VertexFitter" )
+
+            # print(descriptor)
+            samecontainer = False
+            pars_ = [par.replace('+','').replace('-','') for par in pars]
+
+
+            if (("LL" in name) or ("DD" in name) or ("UU" in name) or ("VV" in name)) and (pars_[-2]==pars_[-1]): samecontainer=True
+            if samecontainer:
+                # print("using same container for particles")
+                return Selection("Sel_" + name + "_Jpsi_second", Algorithm = _Combine, RequiredSelections = [parSels[-1]])
+            else:
+                # print("using different container for particles")
+                return Selection("Sel_" + name + "_Jpsi_second", Algorithm = _Combine, RequiredSelections = [parSels[-2],parSels[-1]])
+
+    def combine_first_set(self, name, decay, jpsilist ,motherCuts, combCuts):
+        '''
+        Combine the two jpsis into the KS candidate using the first set of variables (containing KS lifetime).
+        '''
+
+        _combcut =      "(AM < %(MaxKsMass)s *MeV) & "\
+                        "(AMAXDOCA('') < %(KsMAXDOCA)s *mm)" % motherCuts
+
+        # _combcut+= combCuts
+        
+        _mothercut =    "(M < %(MaxKsMass)s *MeV) &"\
+                        "(MIPDV(PRIMARY) < %(KsIP)s *mm) & "\
+                        "((BPVVDSIGN*M/P) > %(KsLifetime)s*2.9979e-01) & "\
+                        "(VFASPF(VCHI2/VDOF) < %(KsVtxChi2)s) " % motherCuts
+
+        _Combine = CombineParticles(name="Combine"+name,
+                                        DecayDescriptor = decay,
+                                        CombinationCut=_combcut,
+                                        MotherCut=_mothercut
+                                        )
+            #print name,is4e
+
+    
+        return Selection(name+decay,
+                         Algorithm=_Combine,
+                         RequiredSelections=jpsilist)
+
+    
+    def combine(self,name, decay, jpsilist,motherCuts,combCuts):
+        '''
+        Combine the two jpsis into the KS candidate using the second set of variables (not containing KS lifetime). 
+        '''
+                
+        _combcut =      "(AM < %(MaxKsMass)s *MeV) & "\
+                        "(AMAXDOCA('') < %(KsMAXDOCA)s *mm)" % motherCuts
+        # _combcut += combCuts
+    
+        _mothercut =    "( M < %(MaxKsMass)s *MeV) &"\
+                        "( MIPDV(PRIMARY) < %(KsIP)s *mm) & "\
+                        "( BPVVDCHI2 > %(KsDisChi2)s) & "\
+                        "( VFASPF(VCHI2/VDOF) < %(KsVtxChi2)s) " % motherCuts
+
+        _Combine = CombineParticles(name = "Combine"+name,
+                                    DecayDescriptor=decay,
+                                    CombinationCut=_combcut,
+                                    MotherCut=_mothercut
+                                    )
+    
+    
+        return Selection(name,
+                        Algorithm=_Combine,
+                        RequiredSelections=jpsilist
+                        )
+        
+        
+
+    def getKS0(self):
+        return self.KS0
+
+# EOF
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2MuMuMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2MuMuMuMu.py
new file mode 100644
index 000000000..803102e43
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2MuMuMuMu.py
@@ -0,0 +1,233 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+stripping code for  Kshort-->MuMuMuMu
+derived, in large measure, from StrippingKshort2PiPiMuMu.py
+
+'''
+
+__author__ = ['Mike Sokoloff']
+__date__ = '07 January 2014'
+__version__ = '$Revision: 0.1 $'
+
+
+default_config =  {
+    'NAME' : 'Kshort2MuMuMuMu',
+    'WGs' : ['RD'],
+    'BUILDERTYPE' : 'Kshort2MuMuMuMuConf',
+    'CONFIG' : {'MuonP'         : 3000. ,    #MeV
+                'MuonPT'        : 500.  ,    #MeV
+                'MuonMINIPCHI2' : 2     ,    #adminensional
+                'MuonTRCHI2'    : 5     ,    #adminensional
+
+
+                                                  #4body
+                'MINIPCHI2_mumumumu' : 4. ,  #adminensional --  for the individual pions
+                'PT_mumumumu'        : 300 , #MeV
+                'MuonPIDmu_mumumumu' : -1,   #adimensional
+                'DPT_mumumumu'           : 2500.,     #MeV
+                'DVCHI2DOF_mumumumu'     : 8     ,    #adminensional
+                'DMAXDOCA_mumumumu'      : 0.2  ,    #mm
+                'KsDauMAXIPCHI2_mumumumu' : 15    ,    #adimensinal
+                'DFDCHI2_mumumumu'       : 9     ,   #adimensional
+                'DIPCHI2_mumumumu'       : 20    ,    #adimensional
+
+
+                'DDIRA' 	              : 0.9999,    #adimensional
+                'MaxDimuonMass'                : 260.  ,    #MeV
+                'MaxKsMass'                   : 550.  ,    #MeV, comb mass window
+                'KsMotherMassCut'             : 540.  ,    # MeV, mother mass cut
+
+                'Kshort2MuMuMuMuLinePrescale'    : 1,
+                'Kshort2MuMuMuMuLinePostscale'   : 1
+                                },
+    'STREAMS' : ['Leptonic']
+        }
+
+
+__all__ = ('Kshort2MuMuMuMuConf',
+           'default_config'
+           )
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import  StdLoosePions, StdLooseMuons, StdNoPIDsPions
+from StandardParticles import  StdAllLoosePions, StdAllLooseMuons, StdAllNoPIDsPions
+from StandardParticles import  StdNoPIDsDownPions, StdLooseDownMuons
+from GaudiKernel.SystemOfUnits import MeV
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+
+class Kshort2MuMuMuMuConf(LineBuilder) :
+    """
+    Builder for Kshort --> mu,mu,mu,mu
+    """
+    #### This is the dictionary of all tunable cuts ########
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        LongLine_name = name+"_Long"
+        DownstreamLine_name = name+"_Down"
+
+        # 5 : Make Muons for Kshort2MuMuMuMu
+        selLongMuonsForMuMuMuMu = makeLongMuonsForMuMuMuMu(name="LongMuonsFor"+name
+                                               , MuonP = config['MuonP']
+                                               , MuonPT = config['PT_mumumumu']
+                                               , MuonMINIPCHI2 = config['MINIPCHI2_mumumumu']
+                                               , MuonTRCHI2 = config['MuonTRCHI2']
+                                               , MuonPIDmu_mumumumu = config['MuonPIDmu_mumumumu'])
+
+        selDownstreamMuonsForMuMuMuMu = makeDownstreamMuonsForMuMuMuMu(name="DownMuonsFor"+name
+                                               , MuonP = config['MuonP']
+                                               , MuonPT = config['PT_mumumumu']
+                                               , MuonMINIPCHI2 = config['MINIPCHI2_mumumumu']
+                                               , MuonTRCHI2 = config['MuonTRCHI2']
+                                               , MuonPIDmu_mumumumu = config['MuonPIDmu_mumumumu'])
+
+        # 7 : Combine
+
+        selLongKshort2MuMuMuMu = self._makeKshort2MuMuMuMu(name=LongLine_name,
+                                           muonSel = selLongMuonsForMuMuMuMu,
+                                           config = config)
+
+        selDownstreamKshort2MuMuMuMu = self._makeKshort2MuMuMuMu(name=DownstreamLine_name,
+                                           muonSel = selDownstreamMuonsForMuMuMuMu,
+                                           config = config)
+
+        # 8 : Declare Lines
+
+        self.LongLine = StrippingLine(LongLine_name+"Line",
+                                    prescale = config['Kshort2MuMuMuMuLinePrescale'],
+                                    postscale = config['Kshort2MuMuMuMuLinePostscale'],
+                                    selection = selLongKshort2MuMuMuMu
+                                    )
+
+        self.DownstreamLine = StrippingLine(DownstreamLine_name+"Line",
+                                    prescale = config['Kshort2MuMuMuMuLinePrescale'],
+                                    postscale = config['Kshort2MuMuMuMuLinePostscale'],
+                                    selection = selDownstreamKshort2MuMuMuMu
+                                    )
+
+
+
+
+
+        # 9 : register Line
+
+        self.registerLine( self.LongLine )
+        self.registerLine( self.DownstreamLine )
+
+
+#####################################################
+    def _makeKshort2MuMuMuMu(self, name,  muonSel, config):
+        """
+        Handy interface for Kshort2MuMuMuMu
+        """
+        return makeKshort2MuMuMuMu(name
+                               , muonSel
+                               , DMAXDOCA = config['DMAXDOCA_mumumumu']
+                               , DPT = config['DPT_mumumumu']
+                               , KsDauMAXIPCHI2= config['KsDauMAXIPCHI2_mumumumu']
+                               , DFDCHI2= config['DFDCHI2_mumumumu']
+                               , DVCHI2DOF = config['DVCHI2DOF_mumumumu']
+                               , DDIRA = config['DDIRA']
+                               , DIPCHI2 = config['DIPCHI2_mumumumu']
+                               , MaxKsMass = config['MaxKsMass']
+                               , KsMotherMassCut = config['KsMotherMassCut']
+                               , MaxDimuonMass = config['MaxDimuonMass'])
+
+
+
+#####################################################
+def makeKshort2MuMuMuMu(name, muonSel, DMAXDOCA, DPT,  KsDauMAXIPCHI2, DFDCHI2, DVCHI2DOF, DDIRA, DIPCHI2, MaxKsMass, KsMotherMassCut, MaxDimuonMass):
+
+    """
+    Makes the KS0 -> mu+ mu+ mu- mu-
+    """
+
+    _combcut = "(AMAXDOCA('')<%(DMAXDOCA)s) & "\
+               "(AM13 < %(MaxDimuonMass)s *MeV) &"\
+               "(AM24 < %(MaxDimuonMass)s *MeV) &"\
+               "(AM34 < %(MaxDimuonMass)s *MeV) &"\
+               "(AM < %(MaxKsMass)s *MeV) & "\
+               "(AHASCHILD( (MIPCHI2DV(PRIMARY)>%(KsDauMAXIPCHI2)s)  )   )" %locals()
+
+
+
+    _mothercut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+                   "(PT > %(DPT)s *MeV) &"\
+                   "(M < %(KsMotherMassCut)s *MeV) &"\
+                   "(BPVVDCHI2>%(DFDCHI2)s) & (BPVIPCHI2()< %(DIPCHI2)s) & "\
+                   "(BPVDIRA > %(DDIRA)s)" % locals()
+
+##      muonMass = 105.658*MeV
+     
+    c12          =  "( AM < (%(MaxKsMass)s *MeV - 211.316 *MeV) )" %locals()  
+    c123         =  "( AM < (%(MaxKsMass)s *MeV - 105.658 *MeV) )" %locals()  
+    
+    _Combine = DaVinci__N4BodyDecays(
+                                DecayDescriptor = "KS0 -> mu+ mu+  mu- mu-",
+                                CombinationCut = _combcut,
+                                MotherCut = _mothercut,
+                                Combination12Cut = c12,
+                                Combination123Cut = c123)
+
+## original definition of _Combine
+## try restoring it as a test
+## mds    _Combine = CombineParticles(DecayDescriptor = "KS0 -> mu+ mu+  mu- mu-",
+## mds                                CombinationCut = _combcut,
+## mds                                MotherCut = _mothercut)
+
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ muonSel] )
+
+#####################################################
+def makeLongMuonsForMuMuMuMu(name, MuonP, MuonPT, MuonMINIPCHI2, MuonTRCHI2, MuonPIDmu_mumumumu):
+    """
+    Muon selection
+    """
+    _code = "(TRCHI2DOF < %(MuonTRCHI2)s) & "\
+            "(P > %(MuonP)s *MeV) & "\
+            "(PT > %(MuonPT)s* MeV) & "\
+            "(PIDmu-PIDpi > %(MuonPIDmu_mumumumu)s) & "\
+            "(MIPCHI2DV(PRIMARY) > %(MuonMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllLooseMuons ] )
+
+def makeDownstreamMuonsForMuMuMuMu(name, MuonP, MuonPT, MuonMINIPCHI2, MuonTRCHI2, MuonPIDmu_mumumumu):
+    """
+    Muon selection
+    """
+    _code = "(TRCHI2DOF < %(MuonTRCHI2)s) & "\
+            "(P > %(MuonP)s *MeV) & "\
+            "(PT > %(MuonPT)s* MeV) & "\
+            "(PIDmu-PIDpi > %(MuonPIDmu_mumumumu)s) & "\
+            "(MIPCHI2DV(PRIMARY) > %(MuonMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdLooseDownMuons ] )
+
+#####################################################
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2PiPiMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2PiPiMuMu.py
new file mode 100644
index 000000000..26d345bd9
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2PiPiMuMu.py
@@ -0,0 +1,295 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = ['Mike Sokoloff']
+__date__ = '25/10/2012'
+__version__ = '$Revision: 0.1 $'
+
+'''
+stripping code for Kshort --> PiPiMuMu
+derived from StrippingD2XMuMuSS.py by Malcolm John, B. Viaud, and O. Kochebina
+D->Xu(Xu) mu mu , Xu=pi/K channels and control samples.
+'''
+
+default_config =  {
+    'NAME' : 'Kshort2PiPiMuMu',
+    'WGs' : ['RD'],
+    'BUILDERTYPE' : 'Kshort2PiPiMuMuConf',
+    'CONFIG' : {
+          'MuonP'         : 3000. ,    #MeV
+          'MuonPT'        : 500.  ,    #MeV
+          'MuonMINIPCHI2' : 2     ,    #adminensional
+          'MuonTRCHI2'    : 5     ,    #adminensional
+          
+          'PionP'         : 2000. ,    #MeV
+          'PionPT'        : 300.  ,    #MeV
+          'PionMINIPCHI2' : 2     ,    #adminensional
+          'PionTRCHI2'    : 5     ,    #adminensional
+          
+          
+          #4body
+          'MINIPCHI2_hhmumu' : 4. ,  #adminensional --  for the individual pions
+          'PT_hhmumu'        : 300 , #MeV
+          'MuonPIDmu_hhmumu' : -1,   #adimensional
+          'DPT_hhmumu'           : 300., # was 2500    #MeV
+          'DVCHI2DOF_hhmumu'     : 8     ,    #adminensional         
+          'DMAXDOCA_hhmumu'      : 0.2  ,    #mm
+          'KsDauMAXIPCHI2_hhmumu' : 15    ,    #adimensinal
+          'DFDCHI2_hhmumu'       : 9     ,   #adimensional
+          'DIPCHI2_hhmumu'       : 20    ,    #adimensional
+          
+          
+          'DDIRA'         : 0.9999,    #adimensional
+          'MaxDimuonMass'    : 260.  ,    #MeV
+          'MaxKsMass'                   : 550.  ,    #MeV, comb mass window
+          'KsMotherMassCut'             : 540.  ,    # MeV, mother mass cut
+          
+          'Kshort2PiPiMuMuLinePrescale'    : 1 ,
+          'Kshort2PiPiMuMuLinePostscale'   : 1
+          },
+    'STREAMS' : ['Leptonic']
+    }
+
+
+__all__ = ('Kshort2PiPiMuMuConf',
+           'default_config')
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import  StdLoosePions, StdLooseMuons, StdNoPIDsPions
+from StandardParticles import  StdAllLoosePions, StdAllLooseMuons, StdAllNoPIDsPions
+from StandardParticles import  StdNoPIDsDownPions, StdLooseDownMuons
+from GaudiKernel.SystemOfUnits import MeV
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays
+
+default_name = "Ks2PiPiMuMu"
+
+class Kshort2PiPiMuMuConf(LineBuilder) :
+    """
+    Builder for Kshort --> pi,pi,mu,mu 
+    """
+    
+    LongLine = None
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+        
+
+        LongLine_name = name+"_Long"
+        DownstreamLine_name = name+"_Down"
+        
+        
+        
+        # 5 : Make Muons for Kshort2PiPiMuMu 
+        selLongMuonsForPiPiMuMu = makeLongMuonsForPiPiMuMu(name="LongMuonsFor"+name
+                                               , MuonP = config['MuonP']
+                                               , MuonPT = config['PT_hhmumu']
+                                               , MuonMINIPCHI2 = config['MINIPCHI2_hhmumu']
+                                               , MuonTRCHI2 = config['MuonTRCHI2']
+                                               , MuonPIDmu_CS_hhmumu = config['MuonPIDmu_hhmumu'])
+
+        selDownstreamMuonsForPiPiMuMu = makeDownstreamMuonsForPiPiMuMu(name="DownMuonsFor"+name
+                                               , MuonP = config['MuonP']
+                                               , MuonPT = config['PT_hhmumu']
+                                               , MuonMINIPCHI2 = config['MINIPCHI2_hhmumu']
+                                               , MuonTRCHI2 = config['MuonTRCHI2']
+                                               , MuonPIDmu_CS_hhmumu = config['MuonPIDmu_hhmumu'])
+
+        # 7 : Make Pions for Kshort2PiPiMuMu 
+        selLongPionsForPiPiMuMu = makeLongPionsForPiPiMuMu(name="LongPionsFor"+name
+                             , PionP = config['PionP']
+                             , PionPT = config['PT_hhmumu']
+                             , PionMINIPCHI2 = config['MINIPCHI2_hhmumu']
+                             , PionTRCHI2 = config['PionTRCHI2'])
+
+        selDownstreamPionsForPiPiMuMu = makeDownstreamPionsForPiPiMuMu(name="DownPionsFor"+name
+                             , PionP = config['PionP']
+                             , PionPT = config['PT_hhmumu']
+                             , PionMINIPCHI2 = config['MINIPCHI2_hhmumu']
+                             , PionTRCHI2 = config['PionTRCHI2'])
+
+
+
+
+                                        
+        # 7 : Combine
+        
+        selLongKshort2PiPiMuMu = self._makeKshort2PiPiMuMu(name=LongLine_name,
+                                           pionSel = selLongPionsForPiPiMuMu,
+                                           muonSel = selLongMuonsForPiPiMuMu,
+                                           config = config)
+        
+        selDownstreamKshort2PiPiMuMu = self._makeKshort2PiPiMuMu(name=DownstreamLine_name,
+                                           pionSel = selDownstreamPionsForPiPiMuMu,
+                                           muonSel = selDownstreamMuonsForPiPiMuMu,
+                                           config = config)
+        
+        # 8 : Declare Lines
+        
+        self.LongLine = StrippingLine(LongLine_name+"Line",
+                                    prescale = config['Kshort2PiPiMuMuLinePrescale'],
+                                    postscale = config['Kshort2PiPiMuMuLinePostscale'],
+                                    selection = selLongKshort2PiPiMuMu
+                                    )
+        
+        self.DownstreamLine = StrippingLine(DownstreamLine_name+"Line",
+                                    prescale = config['Kshort2PiPiMuMuLinePrescale'],
+                                    postscale = config['Kshort2PiPiMuMuLinePostscale'],
+                                    selection = selDownstreamKshort2PiPiMuMu
+                                    )
+        
+        
+        
+
+        # 9 : register Line
+
+        self.registerLine( self.LongLine )
+        self.registerLine( self.DownstreamLine )
+
+
+#####################################################
+    def _makeKshort2PiPiMuMu(self, name, pionSel, muonSel, config):
+        """
+        Handy interface for Kshort2PiPiMuMu
+        """
+        return makeKshort2PiPiMuMu(name
+                               , pionSel
+                               , muonSel
+                               , DMAXDOCA = config['DMAXDOCA_hhmumu']
+                               , DPT = config['DPT_hhmumu']
+                               , KsDauMAXIPCHI2= config['KsDauMAXIPCHI2_hhmumu']
+                               , DFDCHI2= config['DFDCHI2_hhmumu']
+                               , DVCHI2DOF = config['DVCHI2DOF_hhmumu']
+                               , DDIRA = config['DDIRA']
+                               , DIPCHI2 = config['DIPCHI2_hhmumu']
+                               , MaxKsMass = config['MaxKsMass']
+                               , KsMotherMassCut = config['KsMotherMassCut']
+                               , MaxDimuonMass = config['MaxDimuonMass'])
+
+
+
+
+#####################################################
+def makeKshort2PiPiMuMu(name, pionSel, muonSel, DMAXDOCA, DPT,  KsDauMAXIPCHI2, DFDCHI2, DVCHI2DOF, DDIRA, DIPCHI2, MaxKsMass, KsMotherMassCut, MaxDimuonMass):
+
+    """
+    Makes the KS0 -> pi+ pi- mu+ mu-
+    """
+
+    _combcut = "(AM < %(MaxKsMass)s *MeV) & "\
+               "(AMAXDOCA('')<%(DMAXDOCA)s) & " \
+               "(AM34 < %(MaxDimuonMass)s *MeV) &"\
+               "(AHASCHILD( (MIPCHI2DV(PRIMARY)>%(KsDauMAXIPCHI2)s)  )   )" %locals()
+
+
+
+    _mothercut   = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\
+                   "(PT > %(DPT)s *MeV) &"\
+                   "(M < %(KsMotherMassCut)s *MeV) &"\
+                   "(BPVVDCHI2>%(DFDCHI2)s) & (BPVIPCHI2()< %(DIPCHI2)s) & "\
+                   "(BPVDIRA > %(DDIRA)s)" % locals()
+##      muonMass = 105.658*MeV
+##      pi+ mass = 139.570*MeV
+
+    c12          =  "( AM < (%(MaxKsMass)s *MeV - 279.140 *MeV) )" %locals()
+    c123         =  "( AM < (%(MaxKsMass)s *MeV - 139.570 *MeV) )" %locals()
+
+    _Combine = DaVinci__N4BodyDecays(
+                                DecayDescriptor = "KS0 -> mu+ mu-  pi+ pi-",
+                                CombinationCut = _combcut,
+                                MotherCut = _mothercut,
+                                Combination12Cut = c12,
+                                Combination123Cut = c123)
+
+## original definition of _Combine
+## try restoring it as a test
+## mds    _Combine = CombineParticles(DecayDescriptor = "KS0 -> pi+ pi- mu+ mu-",
+## mds                                CombinationCut = _combcut,
+## mds                                MotherCut = _mothercut)
+    _Combine.ReFitPVs = True
+    return Selection(name,
+                     Algorithm = _Combine,
+                     RequiredSelections = [ muonSel, pionSel] )                    
+                    
+#####################################################
+def makeLongMuonsForPiPiMuMu(name, MuonP, MuonPT, MuonMINIPCHI2, MuonTRCHI2, MuonPIDmu_CS_hhmumu):
+    """
+    Muon selection
+    """
+    _code = "(TRCHI2DOF < %(MuonTRCHI2)s) & "\
+            "(P > %(MuonP)s *MeV) & "\
+            "(PT > %(MuonPT)s* MeV) & "\
+            "(PIDmu-PIDpi > %(MuonPIDmu_CS_hhmumu)s) & "\
+            "(MIPCHI2DV(PRIMARY) > %(MuonMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllLooseMuons ] )
+
+def makeDownstreamMuonsForPiPiMuMu(name, MuonP, MuonPT, MuonMINIPCHI2, MuonTRCHI2, MuonPIDmu_CS_hhmumu):
+    """
+    Muon selection
+    """
+    _code = "(TRCHI2DOF < %(MuonTRCHI2)s) & "\
+            "(P > %(MuonP)s *MeV) & "\
+            "(PT > %(MuonPT)s* MeV) & "\
+            "(PIDmu-PIDpi > %(MuonPIDmu_CS_hhmumu)s) & "\
+            "(MIPCHI2DV(PRIMARY) > %(MuonMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdLooseDownMuons ] )
+
+#####################################################
+def makeLongPionsForPiPiMuMu(name, PionP, PionPT, PionMINIPCHI2, PionTRCHI2):
+    """
+    Pion selection
+    """
+    _code = "(TRCHI2DOF < %(PionTRCHI2)s) & "\
+						"(P > %(PionP)s *MeV) & "\
+            "(PT > %(PionPT)s* MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(PionMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdAllLoosePions ] )
+
+
+def makeDownstreamPionsForPiPiMuMu(name, PionP, PionPT, PionMINIPCHI2, PionTRCHI2):
+    """
+    Pion selection
+    """
+    _code = "(TRCHI2DOF < %(PionTRCHI2)s) & "\
+						"(P > %(PionP)s *MeV) & "\
+            "(PT > %(PionPT)s* MeV) & "\
+            "(MIPCHI2DV(PRIMARY) > %(PionMINIPCHI2)s)" % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ StdNoPIDsDownPions ] )
+
+
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2eePiPi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2eePiPi.py
new file mode 100644
index 000000000..34a43ee8f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingKshort2eePiPi.py
@@ -0,0 +1,260 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = ['Carla Marin']
+__date__ = '23/11/2016'
+__version__ = '$1.1 $'
+
+'''
+    stripping code for Kshort --> eePiPi
+'''
+
+default_config =  {
+    'NAME'        : 'Kshort2eePiPi',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'Kshort2eePiPiConf',
+    'CONFIG'      : {   'Kshort2eePiPi_eeFromTracksLinePrescale'        : 1 ,
+                        'Kshort2eePiPi_eeFromTracksLinePostscale'       : 1 ,
+                        'Kshort2eePiPi_eeFromTracks_TOSLinePrescale'    : 1 ,
+                        'Kshort2eePiPi_eeFromTracks_TOSLinePostscale'   : 1 ,
+                        
+                        'ePT'           : 100.          , #MeV
+                        'eMINIPCHI2'    : 16            , #adimensional
+                        'ePIDe'         : -4            , #adimensional
+                        'eGhostProb'    : 0.5           , #adimensional
+                        'PionPT'        : 100           , #MeV
+                        'PionMINIPCHI2' : 16            , #adimensional
+                        'PionPIDK'      : 5             , #adimensional
+                        'PionGhostProb' : 0.5           , #adimensional    
+                        'KsMAXDOCA'     : 1.            , #mm
+                        'KsLifetime'    : 0.01*89.53    , #0.01*10^-12s
+                        'KsIP'          : 1             , #mm
+                        'MaxKsMass'     : 800.          , #MeV, comb mass high limit
+                        'KsVtxChi2'     : 50            ,
+
+                        # TOS line
+                        'ePT_soft'             : 50.           , #MeV # 80 at Hlt2
+                        'eMINIPCHI2_soft'      : 0.            , #adimensional # no cut at Hlt2
+                        'ePIDe_soft'           : -100          , #adimensional # -2 at Hlt2
+                        'eGhostProb_soft'      : 0.5           , #adimensional
+                        'PionPT_soft'          : 400.          , #MeV # 500 at Hlt2
+                        'PionMINIPCHI2_soft'   : 4.            , #adimensional # 9 at Hlt2
+                        'PionPIDK_soft'        : 100.          , #adimensional # no cut at Hlt2
+                        'PionGhostProb_soft'   : 0.5           , #adimensional
+                        'KsMAXDOCA_soft'       : 1.            , #mm # 0.5 at Hlt2
+                        'KsLifetime_soft'      : 0.            , #s # no cut at Hlt2
+                        'KsIP_soft'            : 1.            , #mm # 0.5 at Hlt2
+                        'MaxKsMass_soft'       : 650.          , #MeV # 550 at Hlt2
+                        'KsVtxChi2_soft'       : 25.           , # 16 at Hlt2
+                        
+                        'TISTOSDict'     : {'Hlt2RareStrangeKsPiPiEETOSDecision%TOS': 0,
+                                            },
+
+                    },
+    'STREAMS'     : ['Leptonic']
+    }
+
+__all__ = ('Kshort2eePiPiConf',
+           'default_config'
+           )
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays as Combine3Particles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllNoPIDsPions
+from StandardParticles import StdDiElectronFromTracks
+
+class Kshort2eePiPiConf(LineBuilder) :
+    """
+    Builder for Kshort --> pi,pi,e,e
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+                              
+    def __init__(self, name, config):
+
+        self.name = name
+        LineBuilder.__init__(self, name, config)
+        
+        # 1 : Make e's for Kshort2eePiPi
+        selElecsFromTracksForeePiPi = makeElecsFromTracksForeePiPi("ElecsFromTracksFor"+self.name,
+                                                                   StdDiElectronFromTracks,
+                                                                   config["ePT"],
+                                                                   config["eMINIPCHI2"],
+                                                                   config["eGhostProb"],
+                                                                   config["ePIDe"]
+                                                                   )
+
+        selElecsFromTracksForeePiPiSoft = makeElecsFromTracksForeePiPi("ElecsFromTracksFor"+self.name+"_soft",
+                                                                       StdDiElectronFromTracks,
+                                                                       config["ePT_soft"],
+                                                                       config["eMINIPCHI2_soft"],
+                                                                       config["eGhostProb_soft"],
+                                                                       config["ePIDe_soft"]
+                                                                      )
+
+        # 2 : Make Pions for Kshort2eePiPi
+        selPionsForeePiPi = makePionsForeePiPi("PionsFor"+self.name,
+                                               StdAllNoPIDsPions,
+                                               config["PionPT"],
+                                               config["PionMINIPCHI2"],
+                                               config["PionGhostProb"],
+                                               config["PionPIDK"]
+                                               )
+
+        selPionsForeePiPiSoft = makePionsForeePiPi("PionsFor"+self.name+"_soft",
+                                                   StdAllNoPIDsPions,
+                                                   config["PionPT_soft"],
+                                                   config["PionMINIPCHI2_soft"],
+                                                   config["PionGhostProb_soft"],
+                                                   config["PionPIDK_soft"]
+                                               )
+        
+        # 3 : Combine
+        selKshort2eePiPiFromTracks = self._makeKshort2eePiPi(self.name+"_eeFromTracks",
+                                                             "KS0 -> pi+ pi- J/psi(1S)",
+                                                             selPionsForeePiPi,
+                                                             selElecsFromTracksForeePiPi,
+                                                             config["MaxKsMass"],
+                                                             config["KsMAXDOCA"],
+                                                             config["KsIP"],
+                                                             config["KsLifetime"],
+                                                             config["KsVtxChi2"]
+                                                             )
+ 
+        selKshort2eePiPiFromTracks_forTOS = self._makeKshort2eePiPi(self.name+"_eeFromTracks"+"_forTOS",
+                                                                    "KS0 -> pi+ pi- J/psi(1S)",
+                                                                    selPionsForeePiPiSoft,
+                                                                    selElecsFromTracksForeePiPiSoft,
+                                                                    config["MaxKsMass_soft"],
+                                                                    config["KsMAXDOCA_soft"],
+                                                                    config["KsIP_soft"],
+                                                                    config["KsLifetime_soft"],
+                                                                    config["KsVtxChi2_soft"]
+                                                                    )
+
+        # 3b : trigger filter
+        selKshort2eePiPiFromTracks_TOS = tisTosSelection(self.name+"_eeFromTracks"+"_TOS",
+                                                         selKshort2eePiPiFromTracks_forTOS,
+                                                         config['TISTOSDict'])
+        # 4 : Declare Lines
+        self.eePiPiFromTracksLine = StrippingLine(self.name+"_eeFromTracks"+"Line",
+                                                  prescale  = config['Kshort2eePiPi_eeFromTracksLinePrescale'],
+                                                  postscale = config['Kshort2eePiPi_eeFromTracksLinePostscale'],
+                                                  selection = selKshort2eePiPiFromTracks,
+                                                  MDSTFlag  = False
+                                                  )
+
+        self.eePiPiFromTracksTOSLine = StrippingLine(self.name+"_eeFromTracks"+"_TOSLine",
+                                                     prescale  = config['Kshort2eePiPi_eeFromTracks_TOSLinePrescale'],
+                                                     postscale = config['Kshort2eePiPi_eeFromTracks_TOSLinePostscale'],
+                                                     selection = selKshort2eePiPiFromTracks_TOS,
+                                                     MDSTFlag  = False
+                                                     )
+
+        # 5 : register Line
+        self.registerLine( self.eePiPiFromTracksLine )
+        self.registerLine( self.eePiPiFromTracksTOSLine )
+    
+#####################################################
+    def _makeKshort2eePiPi(self, name, decay, pionSel, elecSel, MaxKsMass, KsMAXDOCA, KsIP, KsLifetime, KsVtxChi2):
+        """
+        Handy interface for Kshort2eePiPi
+        """
+        return makeKshort2eePiPi(name,
+                                 decay,
+                                 pionSel,
+                                 elecSel,
+                                 MaxKsMass,
+                                 KsMAXDOCA,
+                                 KsIP,
+                                 KsLifetime,
+                                 KsVtxChi2
+                                 )
+
+#####################################################
+def makeKshort2eePiPi(name, decay, pionSel, elecSel, MaxKsMass, KsMAXDOCA, KsIP, KsLifetime, KsVtxChi2):
+    """
+    Makes the KS0 -> pi+ pi- (J/psi(1S) -> e+ e-)
+    """
+
+    _comb12cut =    "(AMAXDOCA('') < %(KsMAXDOCA)s *mm)" % locals()
+    
+    _combcut =      "(AM < %(MaxKsMass)s *MeV) & "\
+                    "(AMAXDOCA('') < %(KsMAXDOCA)s *mm)" % locals()
+    
+    
+    _mothercut =    "(M < %(MaxKsMass)s *MeV) &"\
+                    "(MIPDV(PRIMARY) < %(KsIP)s *mm) & "\
+                    "((BPVVDSIGN*M/P) > %(KsLifetime)s*2.9979e-01) & "\
+                    "(VFASPF(VCHI2/VDOF) < %(KsVtxChi2)s) " % locals()
+
+    _Combine = Combine3Particles(DecayDescriptor=decay,
+                                 Combination12Cut=_comb12cut,
+                                 CombinationCut=_combcut,
+                                 MotherCut=_mothercut
+                                 )
+
+    return Selection(name,
+                     Algorithm=_Combine,
+                     RequiredSelections=[elecSel,pionSel]
+                     )
+
+#####################################################
+def makeElecsFromTracksForeePiPi(name, elecs, ePT, eMINIPCHI2, eGhostProb, ePIDe):
+    """
+    Electron selection from StdDiElectronFromTracks
+    """
+
+    _code = "(MINTREE(ABSID<14,PT) > %(ePT)s) &"\
+            "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(eMINIPCHI2)s) &"\
+            "(MAXTREE(ABSID<14,TRGHOSTPROB) < %(eGhostProb)s) &"\
+            "(MINTREE(ABSID<14,PIDe) > %(ePIDe)s)"  % locals()
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ elecs ]
+                     )
+
+#####################################################
+def makePionsForeePiPi(name, pions, PionPT, PionMINIPCHI2, PionGhostProb, PionPIDK):
+    """
+    Pion selection from StdNoPIDsPions
+    """
+    _code = "(PT > %(PionPT)s) &"\
+            "(MIPCHI2DV(PRIMARY) > %(PionMINIPCHI2)s) &"\
+            "(TRGHOSTPROB < %(PionGhostProb)s) &"\
+            "(PIDK < %(PionPIDK)s)" % locals()
+    
+    _Filter = FilterDesktop(Code = _code)
+    
+    return Selection(name,
+                     Algorithm = _Filter,
+                     RequiredSelections = [ pions ]
+                     )
+
+#####################################################
+def tisTosSelection(name, sel, dict_TISTOS):
+    '''Filters Selection sel to be TOS OR TIS.'''
+    from Configurables import TisTosParticleTagger
+    tisTosFilter = TisTosParticleTagger(name+'Algo')
+    tisTosFilter.TisTosSpecs = dict_TISTOS
+
+    return Selection(name+'Sel',
+                     Algorithm=tisTosFilter,
+                     RequiredSelections=[sel])
+
+# EOF
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLFVLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLFVLines.py
new file mode 100644
index 000000000..0dbedf876
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLFVLines.py
@@ -0,0 +1,2704 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of lepton flavor violation stripping selections and lines
+
+Exported symbols (use python help!):
+    
+'''
+
+__author__ = ['Johannes Albrecht']
+__date__ = '20/08/2012'
+__version__ = '$Revision: 1.1 $'
+
+__all__ = ('LFVLinesConf',
+           'default_config',
+           )
+
+from Gaudi.Configuration import *
+#from Configurables import FilterDesktop, CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.PhysicalConstants import c_light
+from GaudiKernel.SystemOfUnits import GeV, MeV, mm
+from copy import deepcopy
+#
+# Configure related info tools
+# some of these tools are used several times:
+# eg the related_info_Jpsi2eMu tool can be used for both 
+# the prompt and the detached Jpsi line.
+#
+
+related_info_tools_B2eMu = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                            'Variables' : ['BSMUMUCDFISO',
+                                           'BSMUMUOTHERBMAG',
+                                           'BSMUMUOTHERBANGLE',
+                                           'BSMUMUOTHERBBOOSTMAG',
+                                           'BSMUMUOTHERBBOOSTANGLE',
+                                           'BSMUMUOTHERBTRACKS'],
+                            'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                            'tracktype' : 3,
+                            'makeTrackCuts' : False
+                            },
+                            {'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                            'Variables' : ['BSMUMUTRACKPLUSISO',
+                                           'BSMUMUTRACKPLUSISOTWO',
+                                           'ISOTWOBODYQPLUS',
+                                           'ISOTWOBODYMASSISOPLUS',
+                                           'ISOTWOBODYCHI2ISOPLUS',
+                                           'ISOTWOBODYISO5PLUS'],
+                            'DaughterLocations' : {
+                            '[B_s0 -> e+ ^[mu-]cc]CC' :  'Muon_ISO',
+                            '[B_s0 -> ^e+ [mu-]cc]CC' :  'Electron_ISO',
+                            },
+    
+                            'tracktype'  : 3,
+                            'angle'      : 0.27,
+                            'fc'         : 0.60,
+                            'doca_iso'   : 0.13,
+                            'ips'        : 3.0,
+                            'svdis'      : -0.15,
+                            'svdis_h'    : 30.,
+                            'pvdis'      : 0.5,
+                            'pvdis_h'    : 40.,
+                            'makeTrackCuts' : False,
+                            'IsoTwoBody' : True
+                            },
+                            
+                            {'Type': 'RelInfoVertexIsolation',
+                            'Location':'VtxIsoInfo',
+                            },
+                            
+                            {'Type': 'RelInfoConeVariables',
+                             'Location':'ConeIsoInfo',
+                            },
+                            
+                            {'Type': 'RelInfoVertexIsolationBDT',
+                             'Location':'VtxIsoInfoBDT',
+                            },
+                            
+                            {'Type': 'RelInfoTrackIsolationBDT',
+                             'Variables' : 0,
+                             'DaughterLocations': {
+                             '[B_s0 -> e+ ^[mu-]cc]CC' :  'Muon_TrackIsoBDT',
+                             '[B_s0 -> ^e+ [mu-]cc]CC' :  'Electron_TrackIsoBDT',
+                            }},
+                            {
+                              "Type" : "RelInfoTrackIsolationBDT2",
+                              "Location" : "TrackIsolationBDT2",
+                            }
+                            ] ## matches 'RelatedInfoTools'
+
+related_info_tools_JPsi2eMu = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                            'Variables' : [
+                                            'BSMUMUCDFISO', 
+                                            'BSMUMUOTHERBMAG',
+                                            'BSMUMUOTHERBANGLE', 
+                                            'BSMUMUOTHERBBOOSTMAG',
+                                            'BSMUMUOTHERBBOOSTANGLE',
+                                            'BSMUMUOTHERBTRACKS'
+                                          ],
+                            'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                            'tracktype' : 3,
+                            'makeTrackCuts' : False
+                            },
+                            {
+                              'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                              'Variables' : [
+                                              'BSMUMUTRACKPLUSISO', 
+                                              'BSMUMUTRACKPLUSISOTWO',
+                                              'ISOTWOBODYQPLUS', 
+                                              'ISOTWOBODYMASSISOPLUS',
+                                              'ISOTWOBODYCHI2ISOPLUS', 
+                                              'ISOTWOBODYISO5PLUS'
+                                            ],
+                              'DaughterLocations' : {
+                                '[J/psi(1S) -> e+ ^[mu-]cc]CC' :  'Muon_ISO',
+                                '[J/psi(1S) -> ^e+ [mu-]cc]CC' :  'Electron_ISO',
+                              },
+    
+                              'tracktype'  : 3,
+                              'angle'      : 0.27,
+                              'fc'         : 0.60,
+                              'doca_iso'   : 0.13,
+                              'ips'        : 3.0,
+                              'svdis'      : -0.15,
+                              'svdis_h'    : 30.,
+                              'pvdis'      : 0.5,
+                              'pvdis_h'    : 40.,
+                              'makeTrackCuts' : False,
+                              'IsoTwoBody' : True
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 1,
+                              "DaughterLocations" : {
+                                "[J/psi(1S) -> e+ ^[mu-]cc]CC" :  'Muon_TrackIso_BDT6vars',
+                                "[J/psi(1S) -> ^e+ [mu-]cc]CC" :  'Electron_TrackIso_BDT6vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 2,
+                              "DaughterLocations" : {
+                                "[J/psi(1S) -> e+ ^[mu-]cc]CC" :  'Muon_TrackIso_BDT9vars',
+                                "[J/psi(1S) -> ^e+ [mu-]cc]CC" :  'Electron_TrackIso_BDT9vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+                            },
+                            { 
+                              'Type' : 'RelInfoConeVariables',
+                              'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                              'Location'  : 'coneInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolation',
+                              'Location':'VtxIsoInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolationBDT',
+                              'Location':'VtxIsoInfoBDT'
+                            },
+                            {
+                                "Type" : "RelInfoTrackIsolationBDT2",
+                                "Location" : "TrackIsolationBDT2",
+                            }
+                            ] ## matches 'RelatedInfoTools'
+
+related_info_tools_JPsi2MuMuControl = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                            'Variables' : [
+                                            'BSMUMUCDFISO', 
+                                            'BSMUMUOTHERBMAG',
+                                            'BSMUMUOTHERBANGLE', 
+                                            'BSMUMUOTHERBBOOSTMAG',
+                                            'BSMUMUOTHERBBOOSTANGLE',
+                                            'BSMUMUOTHERBTRACKS'
+                                          ],
+                            'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                            'tracktype' : 3,
+                            'makeTrackCuts' : False
+                            },
+                            {
+                              'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                              'Variables' : [
+                                              'BSMUMUTRACKPLUSISO', 
+                                              'BSMUMUTRACKPLUSISOTWO',
+                                              'ISOTWOBODYQPLUS', 
+                                              'ISOTWOBODYMASSISOPLUS',
+                                              'ISOTWOBODYCHI2ISOPLUS', 
+                                              'ISOTWOBODYISO5PLUS'
+                                            ],
+                              'DaughterLocations' : {
+                                '[J/psi(1S) -> mu+ ^[mu-]cc]CC' :  'Muon_ISO',
+                                '[J/psi(1S) -> ^mu+ [mu-]cc]CC' :  'Electron_ISO',
+                              },
+    
+                              'tracktype'  : 3,
+                              'angle'      : 0.27,
+                              'fc'         : 0.60,
+                              'doca_iso'   : 0.13,
+                              'ips'        : 3.0,
+                              'svdis'      : -0.15,
+                              'svdis_h'    : 30.,
+                              'pvdis'      : 0.5,
+                              'pvdis_h'    : 40.,
+                              'makeTrackCuts' : False,
+                              'IsoTwoBody' : True
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 1,
+                              "DaughterLocations" : {
+                                "[J/psi(1S) -> mu+ ^[mu-]cc]CC" :  'Muon_TrackIso_BDT6vars',
+                                "[J/psi(1S) -> ^mu+ [mu-]cc]CC" :  'Electron_TrackIso_BDT6vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 2,
+                              "DaughterLocations" : {
+                                "[J/psi(1S) -> mu+ ^[mu-]cc]CC" :  'Muon_TrackIso_BDT9vars',
+                                "[J/psi(1S) -> ^mu+ [mu-]cc]CC" :  'Electron_TrackIso_BDT9vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+                            },
+                            { 
+                              'Type' : 'RelInfoConeVariables',
+                              'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                              'Location'  : 'coneInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolation',
+                              'Location':'VtxIsoInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolationBDT',
+                              'Location':'VtxIsoInfoBDT'
+                            },
+                            {
+                                "Type" : "RelInfoTrackIsolationBDT2",
+                                "Location" : "TrackIsolationBDT2",
+                            }
+                            ] ## matches 'RelatedInfoTools'
+
+related_info_tools_JPsi2eeControl = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                            'Variables' : [
+                                            'BSMUMUCDFISO', 
+                                            'BSMUMUOTHERBMAG',
+                                            'BSMUMUOTHERBANGLE', 
+                                            'BSMUMUOTHERBBOOSTMAG',
+                                            'BSMUMUOTHERBBOOSTANGLE',
+                                            'BSMUMUOTHERBTRACKS'
+                                          ],
+                            'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                            'tracktype' : 3,
+                            'makeTrackCuts' : False
+                            },
+                            {
+                              'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                              'Variables' : [
+                                              'BSMUMUTRACKPLUSISO', 
+                                              'BSMUMUTRACKPLUSISOTWO',
+                                              'ISOTWOBODYQPLUS', 
+                                              'ISOTWOBODYMASSISOPLUS',
+                                              'ISOTWOBODYCHI2ISOPLUS', 
+                                              'ISOTWOBODYISO5PLUS'
+                                            ],
+                              'DaughterLocations' : {
+                                '[J/psi(1S) -> e+ ^[e-]cc]CC' :  'Muon_ISO',
+                                '[J/psi(1S) -> ^e+ [e-]cc]CC' :  'Electron_ISO',
+                              },
+    
+                              'tracktype'  : 3,
+                              'angle'      : 0.27,
+                              'fc'         : 0.60,
+                              'doca_iso'   : 0.13,
+                              'ips'        : 3.0,
+                              'svdis'      : -0.15,
+                              'svdis_h'    : 30.,
+                              'pvdis'      : 0.5,
+                              'pvdis_h'    : 40.,
+                              'makeTrackCuts' : False,
+                              'IsoTwoBody' : True
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 1,
+                              "DaughterLocations" : {
+                                "[J/psi(1S) -> e+ ^[e-]cc]CC" :  'Muon_TrackIso_BDT6vars',
+                                "[J/psi(1S) -> ^e+ [e-]cc]CC" :  'Electron_TrackIso_BDT6vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 2,
+                              "DaughterLocations" : {
+                                "[J/psi(1S) -> e+ ^[e-]cc]CC" :  'Muon_TrackIso_BDT9vars',
+                                "[J/psi(1S) -> ^e+ [e-]cc]CC" :  'Electron_TrackIso_BDT9vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+                            },
+                            { 
+                              'Type' : 'RelInfoConeVariables',
+                              'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                              'Location'  : 'coneInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolation',
+                              'Location':'VtxIsoInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolationBDT',
+                              'Location':'VtxIsoInfoBDT'
+                            },
+                            {
+                                "Type" : "RelInfoTrackIsolationBDT2",
+                                "Location" : "TrackIsolationBDT2",
+                            }
+                            ] ## matches 'RelatedInfoTools' 
+
+related_info_tools_B2hemu = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                            'Variables' : [
+                                            'BSMUMUCDFISO', 
+                                            'BSMUMUOTHERBMAG',
+                                            'BSMUMUOTHERBANGLE', 
+                                            'BSMUMUOTHERBBOOSTMAG',
+                                            'BSMUMUOTHERBBOOSTANGLE',
+                                            'BSMUMUOTHERBTRACKS'
+                                          ],
+                            'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                            'tracktype' : 3,
+                            'makeTrackCuts' : False
+                            },
+                            {
+                              'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                              'Variables' : [
+                                              'BSMUMUTRACKPLUSISO', 
+                                              'BSMUMUTRACKPLUSISOTWO',
+                                              'ISOTWOBODYQPLUS', 
+                                              'ISOTWOBODYMASSISOPLUS',
+                                              'ISOTWOBODYCHI2ISOPLUS', 
+                                              'ISOTWOBODYISO5PLUS'
+                                            ],
+                              'DaughterLocations' : {
+                                '[[B+]cc -> ^X [e+]cc [mu-]cc]CC' :  'Hadron_ISO',
+                                '[[B+]cc -> X [e+]cc ^[mu-]cc]CC' :  'Muon_ISO',
+                                '[[B+]cc -> X ^[e+]cc [mu-]cc]CC' :  'Electron_ISO'
+                              },
+    
+                              'tracktype'  : 3,
+                              'angle'      : 0.27,
+                              'fc'         : 0.60,
+                              'doca_iso'   : 0.13,
+                              'ips'        : 3.0,
+                              'svdis'      : -0.15,
+                              'svdis_h'    : 30.,
+                              'pvdis'      : 0.5,
+                              'pvdis_h'    : 40.,
+                              'makeTrackCuts' : False,
+                              'IsoTwoBody' : True
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 1,
+                              "DaughterLocations" : {
+                                '[[B+]cc -> ^X [e+]cc [mu-]cc]CC' :  'Hadron_TrackIso_BDT6vars',
+                                '[[B+]cc -> X [e+]cc ^[mu-]cc]CC' :  'Muon_TrackIso_BDT6vars',
+                                '[[B+]cc -> X ^[e+]cc [mu-]cc]CC' :  'Electron_TrackIso_BDT6vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 2,
+                              "DaughterLocations" : {
+                                '[[B+]cc -> ^X [e+]cc [mu-]cc]CC' :  'Hadron_TrackIso_BDT9vars',
+                                '[[B+]cc -> X [e+]cc ^[mu-]cc]CC' :  'Muon_TrackIso_BDT9vars',
+                                '[[B+]cc -> X ^[e+]cc [mu-]cc]CC' :  'Electron_TrackIso_BDT9vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+                            },
+                            { 
+                              'Type' : 'RelInfoConeVariables',
+                              'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                              'Location'  : 'coneInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolation',
+                              'Location':'VtxIsoInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolationBDT',
+                              'Location':'VtxIsoInfoBDT'
+                            },
+                            {
+                              "Type" : "RelInfoTrackIsolationBDT2",
+                              "Location" : "TrackIsolationBDT2",
+                              "Particles" : [1,2]
+                            }
+                            ] ## matches 'RelatedInfoTools'                           
+
+related_info_tools_B2pmu = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                            'Variables' : ['BSMUMUCDFISO',
+                                           'BSMUMUOTHERBMAG',
+                                           'BSMUMUOTHERBANGLE',
+                                           'BSMUMUOTHERBBOOSTMAG',
+                                           'BSMUMUOTHERBBOOSTANGLE',
+                                           'BSMUMUOTHERBTRACKS'],
+                            'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                            'tracktype' : 3,
+                            'makeTrackCuts' : False
+                            },
+                            {'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                            'Variables' : ['BSMUMUTRACKPLUSISO',
+                                           'BSMUMUTRACKPLUSISOTWO',
+                                           'ISOTWOBODYQPLUS',
+                                           'ISOTWOBODYMASSISOPLUS',
+                                           'ISOTWOBODYCHI2ISOPLUS',
+                                           'ISOTWOBODYISO5PLUS'],
+                            'DaughterLocations' : {
+                            '[B_s0 -> X ^[mu-]cc]CC' :  'Muon_ISO',
+                            '[B_s0 -> ^X [mu-]cc]CC' :  'Hadron_ISO',
+                            },
+    
+                            'tracktype'  : 3,
+                            'angle'      : 0.27,
+                            'fc'         : 0.60,
+                            'doca_iso'   : 0.13,
+                            'ips'        : 3.0,
+                            'svdis'      : -0.15,
+                            'svdis_h'    : 30.,
+                            'pvdis'      : 0.5,
+                            'pvdis_h'    : 40.,
+                            'makeTrackCuts' : False,
+                            'IsoTwoBody' : True
+                            },
+                            
+                            {'Type': 'RelInfoVertexIsolation',
+                            'Location':'VtxIsoInfo',
+                            },
+                            
+                            {'Type': 'RelInfoConeVariables',
+                             'Location':'ConeIsoInfo',
+                            },
+                            
+                            {'Type': 'RelInfoVertexIsolationBDT',
+                             'Location':'VtxIsoInfoBDT',
+                            },
+                            
+                            {'Type': 'RelInfoTrackIsolationBDT',
+                             'Variables' : 0,
+                             'DaughterLocations': {
+                             '[B_s0 -> X ^[mu-]cc]CC' :  'Muon_TrackIsoBDT',
+                             '[B_s0 -> ^X [mu-]cc]CC' :  'Hadron_TrackIsoBDT',
+                            }},
+                            {
+                              "Type" : "RelInfoTrackIsolationBDT2",
+                              "Location" : "TrackIsolationBDT2",
+                            }
+                            ] ## matches 'RelatedInfoTools'
+
+related_info_tools_Phi2eMu = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                            'Variables' : [
+                                           'BSMUMUCDFISO',
+                                           'BSMUMUOTHERBMAG',
+                                           'BSMUMUOTHERBANGLE', 
+                                           'BSMUMUOTHERBBOOSTMAG',
+                                           'BSMUMUOTHERBBOOSTANGLE', 
+                                           'BSMUMUOTHERBTRACKS'
+                                          ],
+                            'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                            'tracktype' : 3,
+                            'makeTrackCuts' : False
+                            },
+                            {
+                            'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                            'Variables' : [
+                                           'BSMUMUTRACKPLUSISO', 
+                                           'BSMUMUTRACKPLUSISOTWO',
+                                           'ISOTWOBODYQPLUS', 
+                                           'ISOTWOBODYMASSISOPLUS',
+                                           'ISOTWOBODYCHI2ISOPLUS', 
+                                           'ISOTWOBODYISO5PLUS'
+                                          ],
+                            'DaughterLocations' : {
+                            '[phi(1020) -> e+ ^[mu-]cc]CC' :  'Muon_ISO',
+                            '[phi(1020) -> ^e+ [mu-]cc]CC' :  'Electron_ISO',
+                            },
+    
+                            'tracktype'  : 3,
+                            'angle'      : 0.27,
+                            'fc'         : 0.60,
+                            'doca_iso'   : 0.13,
+                            'ips'        : 3.0,
+                            'svdis'      : -0.15,
+                            'svdis_h'    : 30.,
+                            'pvdis'      : 0.5,
+                            'pvdis_h'    : 40.,
+                            'makeTrackCuts' : False,
+                            'IsoTwoBody' : True
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 1,
+                              "DaughterLocations" : {
+                                "[phi(1020) -> e+ ^[mu-]cc]CC" :  'Muon_TrackIso_BDT6vars',
+                                "[phi(1020) -> ^e+ [mu-]cc]CC" :  'Electron_TrackIso_BDT6vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 2,
+                              "DaughterLocations" : {
+                                "[phi(1020) -> e+ ^[mu-]cc]CC" :  'Muon_TrackIso_BDT9vars',
+                                "[phi(1020) -> ^e+ [mu-]cc]CC" :  'Electron_TrackIso_BDT9vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+                            },
+                            { 
+                              'Type' : 'RelInfoConeVariables',
+                              'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                              'Location'  : 'coneInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolation',
+                              'Location':'VtxIsoInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolationBDT',
+                              'Location':'VtxIsoInfoBDT',
+                            },
+                            {
+                              "Type" : "RelInfoTrackIsolationBDT2",
+                              "Location" : "TrackIsolationBDT2",
+                            }
+                            ] ## matches 'RelatedInfoTools'
+
+related_info_tools_Phi2MuMuControl = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                            'Variables' : [
+                                           'BSMUMUCDFISO',
+                                           'BSMUMUOTHERBMAG',
+                                           'BSMUMUOTHERBANGLE', 
+                                           'BSMUMUOTHERBBOOSTMAG',
+                                           'BSMUMUOTHERBBOOSTANGLE', 
+                                           'BSMUMUOTHERBTRACKS'
+                                          ],
+                            'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                            'tracktype' : 3,
+                            'makeTrackCuts' : False
+                            },
+                            {
+                            'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                            'Variables' : [
+                                           'BSMUMUTRACKPLUSISO', 
+                                           'BSMUMUTRACKPLUSISOTWO',
+                                           'ISOTWOBODYQPLUS', 
+                                           'ISOTWOBODYMASSISOPLUS',
+                                           'ISOTWOBODYCHI2ISOPLUS', 
+                                           'ISOTWOBODYISO5PLUS'
+                                          ],
+                            'DaughterLocations' : {
+                            '[phi(1020) -> mu+ ^[mu-]cc]CC' :  'Muon_ISO',
+                            '[phi(1020) -> ^mu+ [mu-]cc]CC' :  'Electron_ISO',
+                            },
+    
+                            'tracktype'  : 3,
+                            'angle'      : 0.27,
+                            'fc'         : 0.60,
+                            'doca_iso'   : 0.13,
+                            'ips'        : 3.0,
+                            'svdis'      : -0.15,
+                            'svdis_h'    : 30.,
+                            'pvdis'      : 0.5,
+                            'pvdis_h'    : 40.,
+                            'makeTrackCuts' : False,
+                            'IsoTwoBody' : True
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 1,
+                              "DaughterLocations" : {
+                                "[phi(1020) -> mu+ ^[mu-]cc]CC" :  'Muon_TrackIso_BDT6vars',
+                                "[phi(1020) -> ^mu+ [mu-]cc]CC" :  'Electron_TrackIso_BDT6vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 2,
+                              "DaughterLocations" : {
+                                "[phi(1020) -> mu+ ^[mu-]cc]CC" :  'Muon_TrackIso_BDT9vars',
+                                "[phi(1020) -> ^mu+ [mu-]cc]CC" :  'Electron_TrackIso_BDT9vars'
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+                            },
+                            { 
+                              'Type' : 'RelInfoConeVariables',
+                              'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                              'Location'  : 'coneInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolation',
+                              'Location':'VtxIsoInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolationBDT',
+                              'Location':'VtxIsoInfoBDT',
+                            },
+                            {
+                              "Type" : "RelInfoTrackIsolationBDT2",
+                              "Location" : "TrackIsolationBDT2",
+                            }
+                            ] ## matches 'RelatedInfoTools'
+
+related_info_tools_Phi2eeControl = deepcopy(related_info_tools_Phi2MuMuControl) # copy phi2mm configuration
+related_info_tools_Phi2eeControl[1]['DaughterLocations'] = {
+                            '[phi(1020) -> e+ ^[e-]cc]CC' :  'Muon_ISO',
+                            '[phi(1020) -> ^e+ [e-]cc]CC' :  'Electron_ISO',
+                            }
+related_info_tools_Phi2eeControl[2]['DaughterLocations'] = {
+                                "[phi(1020) -> e+ ^[e-]cc]CC" :  'Muon_TrackIso_BDT6vars',
+                                "[phi(1020) -> ^e+ [e-]cc]CC" :  'Electron_TrackIso_BDT6vars'
+                              }
+related_info_tools_Phi2eeControl[3]['DaughterLocations'] = {
+                                "[phi(1020) -> e+ ^[e-]cc]CC" :  'Muon_TrackIso_BDT9vars',
+                                "[phi(1020) -> ^e+ [e-]cc]CC" :  'Electron_TrackIso_BDT9vars'
+                              }
+
+
+related_info_tools_B2ee = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                           'Variables' : ['BSMUMUCDFISO',
+                                          'BSMUMUOTHERBMAG',
+                                          'BSMUMUOTHERBANGLE',
+                                          'BSMUMUOTHERBBOOSTMAG',
+                                          'BSMUMUOTHERBBOOSTANGLE',
+                                          'BSMUMUOTHERBTRACKS'],
+                           'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                           'tracktype' : 3,
+                           'makeTrackCuts' : False
+                           },
+                           {'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                           'Variables' : ['BSMUMUTRACKPLUSISO',
+                                          'BSMUMUTRACKPLUSISOTWO',
+                                          'ISOTWOBODYQPLUS',
+                                          'ISOTWOBODYMASSISOPLUS',
+                                          'ISOTWOBODYCHI2ISOPLUS',
+                                          'ISOTWOBODYISO5PLUS'],
+                           'DaughterLocations' : {
+                           '[B_s0 -> ^e+ [e-]cc]CC' :  'Electron1_ISO',
+                           '[B_s0 -> e+ ^[e-]cc]CC' :  'Electron2_ISO',
+                           },
+                           
+                           'tracktype' : 3,
+                           'angle'      : 0.27,
+                           'fc'         : 0.60,
+                           'doca_iso'   : 0.13,
+                           'ips'        : 3.0,
+                           'svdis'      : -0.15,
+                           'svdis_h'    : 30.,
+                           'pvdis'      : 0.5,
+                           'pvdis_h'    : 40.,
+                           'makeTrackCuts' : False,
+                           'IsoTwoBody' : True
+                           },
+                           
+                           {'Type': 'RelInfoVertexIsolation',
+                           'Location':'VtxIsoInfo',
+                           },
+                           
+                           {'Type': 'RelInfoConeVariables',
+                           'Location':'ConeIsoInfo',
+                           },
+                           
+                           {'Type': 'RelInfoVertexIsolationBDT',
+                           'Location':'VtxIsoInfoBDT',
+                           },
+                           {'Type': 'RelInfoTrackIsolationBDT',
+                            'Variables' : 0,
+                            'DaughterLocations': {
+                            '[B_s0 -> e+ ^[e-]cc]CC' :  'Electron1_TrackIsoBDT',
+                            '[B_s0 -> ^e+ [e-]cc]CC' :  'Electron2_TrackIsoBDT',
+                            }},
+                            {
+                              "Type" : "RelInfoTrackIsolationBDT2",
+                              "Location" : "TrackIsolationBDT2",
+                            }
+                           ] ## matches 'RelatedInfoTools'
+
+related_info_tools_Tau2MuEtaPrime = [{'Type': 'RelInfoVertexIsolation',
+                           'Location':'VtxIsoInfo',
+                           },
+                           
+                           {'Type': 'RelInfoVertexIsolationBDT',
+                           'Location':'VtxIsoInfoBDT',
+                           },
+                           ] ## matches 'RelatedInfoTools'
+
+related_info_tools_Tau2PhiMu = [{ 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.5,
+                                'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                                'Location'  : 'coneInfoTau05',  ## For the tau
+                                'DaughterLocations' : {
+                                '[tau+ -> ^(phi(1020)->K+ K-) mu+]CC': 'coneInfoPhi05',
+                                '[tau+ -> (phi(1020)->K+ K-) ^mu+]CC' : 'coneInfoMu05',
+                                '[tau+ -> (phi(1020)->^K+ K-) mu+]CC' : 'coneInfoKplus05',
+                                '[tau+ -> (phi(1020)->K+ ^K-) mu+]CC': 'coneInfoKminus05'
+                                }},
+                                
+                                { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.8,
+                                'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                                'Location'  : 'coneInfoTau08',  ## For the tau
+                                'DaughterLocations' : {
+                                '[tau+ -> ^(phi(1020)->K+ K-) mu+]CC' : 'coneInfoPhi08',
+                                '[tau+ -> (phi(1020)->K+ K-) ^mu+]CC' : 'coneInfoMu08',
+                                '[tau+ -> (phi(1020)->^K+ K-) mu+]CC' : 'coneInfoKplus08',
+                                '[tau+ -> (phi(1020)->K+ ^K-) mu+]CC' : 'coneInfoKminus08'
+                                }},
+                                { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0,
+                                'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                                'Location'  : 'coneInfoTau10',  ## For the tau
+                                'DaughterLocations' : {
+                                '[tau+ -> ^(phi(1020)->K+ K-) mu+]CC' : 'coneInfoPhi10',
+                                '[tau+ -> (phi(1020)->K+ K-) ^mu+]CC' : 'coneInfoMu10',
+                                '[tau+ -> (phi(1020)->^K+ K-) mu+]CC' : 'coneInfoKplus10',
+                                '[tau+ -> (phi(1020)->K+ ^K-) mu+]CC' : 'coneInfoKminus10'
+                                }},
+                                
+                                { 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.2,
+                                'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                                'Location'  : 'coneInfoTau12',  ## For the tau
+                                'DaughterLocations' : {
+                                '[tau+ -> ^(phi(1020)->K+ K-) mu+]CC' : 'coneInfoPhi12',
+                                '[tau+ -> (phi(1020)->K+ K-) ^mu+]CC' : 'coneInfoMu12',
+                                '[tau+ -> (phi(1020)->^K+ K-) mu+]CC' : 'coneInfoKplus12',
+                                '[tau+ -> (phi(1020)->K+ ^K-) mu+]CC' : 'coneInfoKminus12'
+                                }},
+                                
+                                {'Type': 'RelInfoVertexIsolation',
+                                'Location':'VtxIsoInfo',
+                                'Variables'  : [ 'VTXISONUMVTX',
+                                                'VTXISODCHI2ONETRACK', 'VTXISODCHI2MASSONETRACK',
+                                                'VTXISODCHI2TWOTRACK', 'VTXISODCHI2MASSTWOTRACK' ],},
+                                { 'Type': 'RelInfoTrackIsolationBDT',
+                                'DaughterLocations' : {
+                                '[tau+ -> (phi(1020)->K+ K-) ^mu+]CC' : 'MuonTrackIsoBDTInfo',
+                                '[tau+ -> (phi(1020)->^K+ K-) mu+]CC' : 'KplusTrackIsoBDTInfo',
+                                '[tau+ -> (phi(1020)->K+ ^K-) mu+]CC' : 'KminusTrackIsoBDTInfo'
+                                }}
+                                ]
+
+related_info_tools_Bu2KJPsiee = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                           'Variables' : ['BSMUMUCDFISO',
+                                          'BSMUMUOTHERBMAG',
+                                          'BSMUMUOTHERBANGLE',
+                                          'BSMUMUOTHERBBOOSTMAG',
+                                          'BSMUMUOTHERBBOOSTANGLE',
+                                          'BSMUMUOTHERBTRACKS'],
+                           'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                             'DaughterLocations' : {
+                           '[B+ -> ^(J/psi(1S) -> e+ e-) K+]CC' :  'Jpsi_ISO',
+                           },
+                           'tracktype' : 3,
+                           'makeTrackCuts' : False
+                           },
+                           {'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                           'Variables' : ['BSMUMUTRACKPLUSISO',
+                                          'BSMUMUTRACKPLUSISOTWO',
+                                          'ISOTWOBODYQPLUS',
+                                          'ISOTWOBODYMASSISOPLUS',
+                                          'ISOTWOBODYCHI2ISOPLUS',
+                                          'ISOTWOBODYISO5PLUS'],
+                           'DaughterLocations' : {
+                           '[B+ -> (J/psi(1S) -> ^e+ e-) K+]CC' :  'Electron1_ISO',
+                           '[B+ -> (J/psi(1S) -> e+ ^e-) K+]CC' :  'Electron2_ISO',
+                           '[B+ -> (J/psi(1S) -> e+ e-) ^K+]CC' :  'Kplus_ISO',
+                           },
+                           
+                           'tracktype' : 3,
+                           'angle'      : 0.27,
+                           'fc'         : 0.60,
+                           'doca_iso'   : 0.13,
+                           'ips'        : 3.0,
+                           'svdis'      : -0.15,
+                           'svdis_h'    : 30.,
+                           'pvdis'      : 0.5,
+                           'pvdis_h'    : 40.,
+                           'makeTrackCuts' : False,
+                           'IsoTwoBody' : True
+                           },
+                           
+                           {'Type': 'RelInfoVertexIsolation',
+                           'Location':'VtxIsoInfo',
+                           },
+                           
+                           {'Type': 'RelInfoConeVariables',
+                           'Location':'ConeIsoInfo',
+                           },
+                                 
+                            {'Type': 'RelInfoVertexIsolationBDT',
+                            'Location':'VtxIsoInfoBDT',
+                            },
+                            {'Type': 'RelInfoTrackIsolationBDT',
+                             'Variables' : 0,
+                             'DaughterLocations': {
+                             '[B+ -> (J/psi(1S) -> ^e+ e-) K+]CC' :  'Electron1_TrackIsoBDT',
+                             '[B+ -> (J/psi(1S) -> e+ ^e-) K+]CC' :  'Electron2_TrackIsoBDT',
+                            }},
+                            {
+                              "Type" : "RelInfoTrackIsolationBDT2",
+                              "Location" : "TrackIsolationBDT2",
+                              "Particles" : [1,2]
+                            }
+                            ] ## matches 'RelatedInfoTools'
+
+
+related_info_tools_Upsilon2eMu = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                                  'Variables' : ['BSMUMUCDFISO',
+                                                 'BSMUMUOTHERBMAG',
+                                                 'BSMUMUOTHERBANGLE',
+                                                 'BSMUMUOTHERBBOOSTMAG',
+                                                 'BSMUMUOTHERBBOOSTANGLE',
+                                                 'BSMUMUOTHERBTRACKS'],
+                                  'Location'  : 'BSMUMUVARIABLES',  ## For the Upsilon
+                                  'tracktype' : 3,
+                                  'makeTrackCuts' : False
+                                  },
+                                  {'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                                  'Variables' : ['BSMUMUTRACKPLUSISO',
+                                                 'BSMUMUTRACKPLUSISOTWO',
+                                                 'ISOTWOBODYQPLUS',
+                                                 'ISOTWOBODYMASSISOPLUS',
+                                                 'ISOTWOBODYCHI2ISOPLUS',
+                                                 'ISOTWOBODYISO5PLUS'],
+                                  'DaughterLocations' : {
+                                  '[Upsilon(1S) -> e+ ^[mu-]cc]CC' :  'Muon_ISO',
+                                  '[Upsilon(1S) -> ^e+ [mu-]cc]CC' :  'Electron_ISO',
+                                  },
+                                  
+                                  'tracktype'  : 3,
+                                  'angle'      : 0.27,
+                                  'fc'         : 0.60,
+                                  'doca_iso'   : 0.13,
+                                  'ips'        : 3.0,
+                                  'svdis'      : -0.15,
+                                  'svdis_h'    : 30.,
+                                  'pvdis'      : 0.5,
+                                  'pvdis_h'    : 40.,
+                                  'makeTrackCuts' : False,
+                                  'IsoTwoBody' : True
+                                  },
+                                  
+                                  {'Type': 'RelInfoVertexIsolation',
+                                  'Location':'VtxIsoInfo',
+                                  },
+                                  
+                                  {'Type': 'RelInfoConeVariables',
+                                  'Location':'ConeIsoInfo',
+                                  },
+                                  
+                                  {'Type': 'RelInfoVertexIsolationBDT',
+                                  'Location':'VtxIsoInfoBDT',
+                                  },
+                                  
+                                  {'Type': 'RelInfoTrackIsolationBDT',
+                                  'Variables' : 0,
+                                  'DaughterLocations': {
+                                  '[Upsilon(1S) -> e+ ^[mu-]cc]CC' :  'Muon_TrackIsoBDT',
+                                  '[Upsilon(1S) -> ^e+ [mu-]cc]CC' :  'Electron_TrackIsoBDT',
+                                  }},
+                                  {
+                                    "Type" : "RelInfoTrackIsolationBDT2",
+                                    "Location" : "TrackIsolationBDT2"
+                                  }
+                                  ] ## matches 'RelatedInfoTools'
+
+
+related_info_tools_Upsilon2ee = [{'Type' : 'RelInfoBs2MuMuBIsolations',
+                                 'Variables' : ['BSMUMUCDFISO',
+                                                'BSMUMUOTHERBMAG',
+                                                'BSMUMUOTHERBANGLE',
+                                                'BSMUMUOTHERBBOOSTMAG',
+                                                'BSMUMUOTHERBBOOSTANGLE',
+                                                'BSMUMUOTHERBTRACKS'],
+                                 'Location'  : 'BSMUMUVARIABLES',  ## For the Upsilon
+                                 'tracktype' : 3,
+                                 'makeTrackCuts' : False
+                                 },
+                                 {'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                                 'Variables' : ['BSMUMUTRACKPLUSISO',
+                                                'BSMUMUTRACKPLUSISOTWO',
+                                                'ISOTWOBODYQPLUS',
+                                                'ISOTWOBODYMASSISOPLUS',
+                                                'ISOTWOBODYCHI2ISOPLUS',
+                                                'ISOTWOBODYISO5PLUS'],
+                                 'DaughterLocations' : {
+                                 '[Upsilon(1S) -> e+ ^[e-]cc]CC' :  'Electron2_ISO',
+                                 '[Upsilon(1S) -> ^e+ [e-]cc]CC' :  'Electron1_ISO',
+                                 },
+                                 
+                                 'tracktype'  : 3,
+                                 'angle'      : 0.27,
+                                 'fc'         : 0.60,
+                                 'doca_iso'   : 0.13,
+                                 'ips'        : 3.0,
+                                 'svdis'      : -0.15,
+                                 'svdis_h'    : 30.,
+                                 'pvdis'      : 0.5,
+                                 'pvdis_h'    : 40.,
+                                 'makeTrackCuts' : False,
+                                 'IsoTwoBody' : True
+                                 },
+                                 
+                                 {'Type': 'RelInfoVertexIsolation',
+                                 'Location':'VtxIsoInfo',
+                                 },
+                                 
+                                 {'Type': 'RelInfoConeVariables',
+                                 'Location':'ConeIsoInfo',
+                                 },
+                                 
+                                 {'Type': 'RelInfoVertexIsolationBDT',
+                                 'Location':'VtxIsoInfoBDT',
+                                 },
+                                 
+                                 {'Type': 'RelInfoTrackIsolationBDT',
+                                 'Variables' : 0,
+                                 'DaughterLocations': {
+                                 '[Upsilon(1S) -> e+ ^[e-]cc]CC' :  'Electron2_TrackIsoBDT',
+                                 '[Upsilon(1S) -> ^e+ [e-]cc]CC' :  'Electron1_TrackIsoBDT',
+                                 }},
+                                 {
+                                   "Type" : "RelInfoTrackIsolationBDT2",
+                                   "Location" : "TrackIsolationBDT2"
+                                 }
+                                 ] ## matches 'RelatedInfoTools'
+
+
+related_info_tools_D2piphi = [{'Type' : 'RelInfoBs2MuMuBIsolations', 
+                            'Variables' : [
+                                           'BSMUMUCDFISO',
+                                           'BSMUMUOTHERBMAG',
+                                           'BSMUMUOTHERBANGLE', 
+                                           'BSMUMUOTHERBBOOSTMAG',
+                                           'BSMUMUOTHERBBOOSTANGLE', 
+                                           'BSMUMUOTHERBTRACKS'
+                                          ],
+                            'Location'  : 'BSMUMUVARIABLES',  ## For the B
+                            'tracktype' : 3,
+                            'makeTrackCuts' : False
+                            },
+                            {
+                            'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                            'Variables' : [
+                                           'BSMUMUTRACKPLUSISO', 
+                                           'BSMUMUTRACKPLUSISOTWO',
+                                           'ISOTWOBODYQPLUS', 
+                                           'ISOTWOBODYMASSISOPLUS',
+                                           'ISOTWOBODYCHI2ISOPLUS', 
+                                           'ISOTWOBODYISO5PLUS'
+                                          ],
+                            'IgnoreUnmatchedDescriptors': True, 
+                            'DaughterLocations' : {
+                            '[Charm -> [^(phi(1020) -> l+ [l-]CC)]CC pi+ ]CC' :  'phi_ISO',
+                            '[Charm -> [(phi(1020) -> l+ [l-]CC)]CC ^pi+ ]CC' :  'pi_ISO',
+                            '[Charm -> [(phi(1020) -> ^l+ [l-]CC)]CC pi+ ]CC' :  'lplus_ISO',
+                            '[Charm -> [(phi(1020) -> l+ [^l-]CC)]CC pi+ ]CC' :  'lminus_ISO',
+                            },
+    
+                            'tracktype'  : 3,
+                            'angle'      : 0.27,
+                            'fc'         : 0.60,
+                            'doca_iso'   : 0.13,
+                            'ips'        : 3.0,
+                            'svdis'      : -0.15,
+                            'svdis_h'    : 30.,
+                            'pvdis'      : 0.5,
+                            'pvdis_h'    : 40.,
+                            'makeTrackCuts' : False,
+                            'IsoTwoBody' : True
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 1,
+                              'IgnoreUnmatchedDescriptors': True, 
+                              "DaughterLocations" : {
+                                '[Charm -> [^(phi(1020) -> l+ [l-]CC)]CC pi+ ]CC' :  'phi_TrackIso_BDT6vars',
+                                '[Charm -> [(phi(1020) -> l+ [l-]CC)]CC ^pi+ ]CC' :  'pi_TrackIso_BDT6vars',
+                                '[Charm -> [(phi(1020) -> ^l+ [l-]CC)]CC pi+ ]CC' : 'lplus_TrackIso_BDT6vars',
+                                '[Charm -> [(phi(1020) -> l+ [^l-]CC)]CC pi+ ]CC' : 'lminus_TrackIso_BDT6vars',
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT6varsB_v1r4.xml"
+                            },
+                            { 
+                              "Type" : "RelInfoTrackIsolationBDT",
+                              "Variables" : 2,
+                              'IgnoreUnmatchedDescriptors': True, 
+                              "DaughterLocations" : {
+                                '[Charm -> [^(phi(1020) -> l+ [l-]CC)]CC pi+ ]CC' :  'phi_TrackIso_BDT9vars',
+                                '[Charm -> [(phi(1020) -> l+ [l-]CC)]CC ^pi+ ]CC' :  'pi_TrackIso_BDT9vars',
+                                '[Charm -> [(phi(1020) -> ^l+ [l-]CC)]CC pi+ ]CC' : 'lplus_TrackIso_BDT9vars',
+                                '[Charm -> [(phi(1020) -> l+ [^l-]CC)]CC pi+ ]CC' : 'lminus_TrackIso_BDT9vars',
+                              },
+                              "WeightsFile"  :  "BsMuMu_TrackIsolationBDT9vars_v1r4.xml"
+                            },
+                            { 
+                              'Type' : 'RelInfoConeVariables',
+                              'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                              'Location'  : 'coneInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolation',
+                              'Location':'VtxIsoInfo'
+                            },
+                            {
+                              'Type': 'RelInfoVertexIsolationBDT',
+                              'Location':'VtxIsoInfoBDT',
+                            }
+                            ] ## matches 'RelatedInfoTools'
+
+
+
+
+
+default_config = {
+    'NAME' : 'LFV',
+    'BUILDERTYPE' : 'LFVLinesConf' ,
+    'STREAMS' : {    
+        'Leptonic' : [
+          'StrippingLFVTau2PhiMuLine',
+          'StrippingLFVTau2eMuMuLine',
+          'StrippingLFVB2eMuLine',
+          'StrippingLFVJPsi2eMuLine',
+          'StrippingLFVPromptJPsi2eMuLine',
+          'StrippingLFVJPsi2MuMuControlLine',
+          'StrippingLFVJPsi2eeControlLine',
+          'StrippingLFVPromptJPsi2MuMuControlLine',
+          'StrippingLFVPromptJPsi2eeControlLine',
+          'StrippingLFVPhi2eMuLine',
+          'StrippingLFVPromptPhi2eMuLine',
+          'StrippingLFVPhi2MuMuControlLine',
+          'StrippingLFVPhi2eeControlLine',
+          'StrippingLFVPromptPhi2MuMuControlLine',
+          'StrippingLFVPromptPhi2eeControlLine',
+          'StrippingLFVB2eeLine',
+          'StrippingLFVB2heMuLine',
+          'StrippingLFVB2hMuLine',
+          'StrippingLFVBu2KJPsieeLine',
+          'StrippingLFVB2hTauMuLine',
+          'StrippingLFVTau2MuEtaP2pipigLine',
+          'StrippingLFVTau2MuEtaP2pipipiLine',
+          'StrippingLFVupsilon2eMuLine',
+          'StrippingLFVupsilon2eeLine',
+          'StrippingLFVD2piphi2eeLine', 
+          'StrippingLFVD2piphi2eMuLine', 
+          'StrippingLFVD2piphi2MuMuLine', 
+          'StrippingLFVD2piphi2eePromptLine', 
+          'StrippingLFVD2piphi2eMuPromptLine', 
+          'StrippingLFVD2piphi2MuMuPromptLine', 
+        ]
+    },
+    'WGs'     : [ 'RD' ],
+    'CONFIG'  : {
+    'Postscale'                         :1,
+    'TauPrescale'                       :1,
+    'Tau2MuMuePrescale'                 :1,
+    'B2eMuPrescale'                     :1,
+    'JPsi2eMuPrescale'                  :1,
+    'JPsi2MuMuControlPrescale'          :0.05,
+    'JPsi2eeControlPrescale'            :0.05,
+    'PromptJPsi2eMuPrescale'            :1,
+    'PromptJPsi2MuMuControlPrescale'    :0.05,
+    'PromptJPsi2eeControlPrescale'      :0.05,
+    'Phi2eMuPrescale'                   :1,
+    'Phi2MuMuControlPrescale'           :1, #changed from 0.05
+    'Phi2eeControlPrescale'             :1, #changed from 0.05
+    'PromptPhi2eMuPrescale'             :1,
+    'PromptPhi2MuMuControlPrescale'     :1, #changed from 0.01
+    'PromptPhi2eeControlPrescale'       :0.6, #changed from 0.01
+    'B2eePrescale'                      :1,
+    'B2heMuPrescale'                    :1,
+    'B2pMuPrescale'                     :1,
+    'Bu2KJPsieePrescale'                :1,
+    'B2TauMuPrescale'                   :1,
+    'B2hTauMuPrescale'                  :1,
+    'Tau2MuEtaPrimePrescale'            :1,
+    'Upsilon2eMuPrescale'   :1,
+    'Upsilon2eePrescale'    :0.6,
+    'D2piphi2eePrescale'                 :1,
+    'D2piphi2eMuPrescale'                :1,
+    'D2piphi2MuMuPrescale'               :1,
+    'D2piphi2eePromptPrescale'           :.2,
+    'D2piphi2eMuPromptPrescale'          :.25,
+    'D2piphi2MuMuPromptPrescale'         :1,
+    'RelatedInfoTools_B2eMu'            : related_info_tools_B2eMu,
+    'RelatedInfoTools_JPsi2eMu'         : related_info_tools_JPsi2eMu,
+    'RelatedInfoTools_JPsi2MuMuControl' : related_info_tools_JPsi2MuMuControl,
+    'RelatedInfoTools_JPsi2eeControl'   : related_info_tools_JPsi2eeControl,
+    'RelatedInfoTools_Phi2eMu'          : related_info_tools_Phi2eMu,
+    'RelatedInfoTools_Phi2MuMuControl'  : related_info_tools_Phi2MuMuControl,
+    'RelatedInfoTools_Phi2eeControl'    : related_info_tools_Phi2eeControl,
+    'RelatedInfoTools_B2ee'             : related_info_tools_B2ee,
+    'RelatedInfoTools_B2hemu'           : related_info_tools_B2hemu,
+    'RelatedInfoTools_B2pmu'           : related_info_tools_B2pmu,
+    'RelatedInfoTools_Tau2PhiMu'        : related_info_tools_Tau2PhiMu,
+    'RelatedInfoTools_Bu2KJPsiee'       : related_info_tools_Bu2KJPsiee,
+    'RelatedInfoTools_Tau2MuEtaPrime'   : related_info_tools_Tau2MuEtaPrime,
+    'RelatedInfoTools_Upsilon2eMu'      : related_info_tools_Upsilon2eMu,
+    'RelatedInfoTools_Upsilon2ee'      : related_info_tools_Upsilon2ee,
+    'RelatedInfoTools_D2piphi'           : related_info_tools_D2piphi,
+    'config_B2eMu'          : {
+      'min_MIPCHI2DV': 25.,
+      'max_ADAMASS'  : 1200*MeV,
+      'max_TRCHI2DV' : 3.,
+      'max_TRGHOSTPROB'  : 0.3,
+      'max_AMAXDOCA' : 0.3*mm,
+      'min_BPVDIRA'  : 0.,
+      'min_BPVVDCHI2': 225.,
+      'max_BPVIPCHI2': 25.
+    },
+    'config_JPsi2eMu'          : {
+      'min_MIPCHI2DV'     : 36.,
+      'min_MIPCHI2DV_phi' : 25.,  #new
+      'max_ADAMASS'       : 1000*MeV,
+      'max_TRCHI2DV'      : 3,
+      'max_TRGHOSTPROB'   : 0.3,
+      'max_AMAXDOCA'      : 0.3*mm,
+      'min_BPVDIRA'       : 0,
+      'min_BPVVDCHI2'     : 324.,
+      'min_BPVVDCHI2_phi' : 144.,  #new
+      'max_VtxChi2DoF'    : 2.5,
+      'max_VtxChi2DoF_phi': 3.,  #new
+      'min_ProbNN'        : 0.3,
+      'min_ProbNN_phi_e'  : 0.3, #new for phi2emu electron
+      'min_ProbNN_phi_mu' : 0.4, #new for all phi muons
+      'min_ProbNN_phi2ee' : 0.05, #new for phi2ee electrons
+      'max_JpsiMass'      : 4096*MeV,
+      'min_JpsiMass'      : 2200*MeV,
+      'max_PhiMass'       : 2020*MeV,
+      'min_PhiMass'       : 300*MeV,
+      'min_Phi2mumuMass'  : 820*MeV, #new
+      'max_Phi2mumuMass'  : 1220*MeV, #new
+      'min_Pt'            : 300*MeV
+    },
+    'config_PromptJPsi2eMu'     : {
+      'max_MIPCHI2DV'            : 9.,
+      'max_BPVVDCHI2'            : 9.,
+      'max_BPVIPCHI2'            : 9.,
+      'max_TRCHI2DV'             : 3,
+      'max_TRGHOSTPROB'          : 0.2,
+      'max_AMAXDOCA'             : 0.3*mm,
+      'max_SPD'                  : 350,
+      'max_JpsiMass'             : 4096*MeV,
+      'min_JpsiMass'             : 2200*MeV,
+      'min_ProbNN'               : 0.8,
+      'min_ProbNN_phi'           : 0.8,
+      'max_VtxChi2DoF'           : 2.5,
+      'max_VtxChi2DoF_phi'       : 3., #new
+      'min_Pt'                   : 300*MeV,
+      'max_PhiMass'              : 2020*MeV,
+      'min_PhiMass'              : 300*MeV,
+      'min_Phi2mumuMass'         : 820*MeV, #new for phi2mumu
+      'max_Phi2mumuMass'         : 1220*MeV, #new for phi2mumu
+      'min_ProbNN_Control'       : 0.65,
+      'min_ProbNN_phi2mumu'      : 0.4 #new for phi2mumu muons
+    },
+
+    'config_Tau2MuEtaPrime' : {
+        'muplus_cuts'       : '(ISLONG) & (TRCHI2DOF < 3 )  & (MIPCHI2DV(PRIMARY) >  9.) & (PT > 300*MeV) & (TRGHOSTPROB < 0.3)',
+        'tau_mass_window'   : "(ADAMASS('tau+')<150*MeV)",
+        'tau_cuts'          : "(BPVIPCHI2()< 100) & (VFASPF(VCHI2/VDOF)<6.) & (BPVLTIME()*c_light > 50.*micrometer) & (BPVLTIME()*c_light < 400.*micrometer) & (PT>500*MeV)"\
+        " & (D2DVVD(2) < 80*micrometer)", #maybe PT 1000
+        
+        'config_EtaPrime2pipigamma'   : {
+            'gamma_cuts'        :   '(PT > 300*MeV) & (CL > 0.1)',  #CL might exclude pi0?
+            'piplus_cuts'       :   "(PROBNNpi > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB < 0.3) & (TRCHI2DOF < 3.0) & (MIPCHI2DV(PRIMARY) > 9.)",
+            'piminus_cuts'      :   "(PROBNNpi > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB < 0.3) & (TRCHI2DOF < 3.0) & (MIPCHI2DV(PRIMARY) > 9.)",
+            'etap_mass_window'   :  "(ADAMASS('eta') < 80*MeV) | (ADAMASS('eta_prime') < 80*MeV)",
+            'etap_cuts'          :  '(PT > 500*MeV) & (VFASPF(VCHI2/VDOF) < 6.0)',# & (MIPCHI2DV(PRIMARY)> 9)',
+            'pipi_cuts'          :  '(ACHI2DOCA(1,2)<16)',
+        }, #matches config_EtaPrime2pipigamma
+    
+        'config_EtaPrime2pipipi'   : {
+            'pi0_cuts'        :     "(PT > 250*MeV)",
+            'piplus_cuts'       :   "(PROBNNpi > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB < 0.3) & (TRCHI2DOF < 3.0) & (MIPCHI2DV(PRIMARY) > 9.)",
+            'piminus_cuts'      :   "(PROBNNpi > 0.1) & (PT > 250*MeV) & (TRGHOSTPROB < 0.3) & (TRCHI2DOF < 3.0) & (MIPCHI2DV(PRIMARY) > 9.)",
+            'etap_mass_window'   :  "(ADAMASS('eta') < 80*MeV) | (ADAMASS('eta_prime') < 80*MeV)", #"(in_range(450, AM, 1050))",
+            'etap_cuts'          :  '(PT > 500*MeV) & (VFASPF(VCHI2/VDOF) < 6.0)',# & (MIPCHI2DV(PRIMARY)> 9)',
+            'pipi_cuts'          :  'ACHI2DOCA(1,2)<16',
+        }, #matches config_EtaPrime2pipipi
+    }, #matches config_Tau2MuEtaPrime
+
+
+        'config_Upsilon2eMu' : {
+            'mu_cuts'           :   "(PT > 1000.*MeV) & (P > 8000.*MeV) & (TRCHI2DOF < 3.) & (PIDmu > 0)",
+            'e_cuts'            :   "(PT > 1000.*MeV) & (P > 8000.*MeV) & (TRCHI2DOF < 3.) & (PIDe > 1)",
+            'comb_cuts'         :   "in_range(7250, AM, 11000) & ACUTDOCA(0.3*mm,'')",
+            'upsilon_cuts'      :   "(VFASPF(VCHI2) < 25) & (BPVIPCHI2() < 9) & (BPVVDCHI2 < 25)"
+    }, #matches config_Upsilon2eMu
+
+        'config_Upsilon2ee' : {
+            'e_cuts'            :   "(PT > 1000.*MeV) & (P > 8000.*MeV) & (TRCHI2DOF < 3.) & (PIDe > 1)",
+            'comb_cuts'         :   "in_range(6000, AM, 11000) & ACUTDOCA(0.3*mm,'')",
+            'upsilon_cuts'      :   "(VFASPF(VCHI2) < 25) & (BPVIPCHI2() < 9) & (BPVVDCHI2 < 25)"
+    },#matches config_Upsilon2ee
+        'config_D2piphi' : {
+
+            'comb_cuts' : "in_range(1300, AM, 2400) & (AMAXDOCA('') < .3*mm)",
+            'comb_cuts_prompt' : "in_range(1300, AM, 2400) & (AMAXDOCA('') < .3*mm)",
+            
+            'mother_cuts_prompt' :  "(VFASPF(VCHI2/VDOF) < 2.5) "\
+                             "& (MM > 1300) & (MM < 2400)"\
+                             "& (BPVDIRA > 0) & (BPVVD > 0.3)",
+            'mother_cuts' :  "(VFASPF(VCHI2/VDOF) < 3) "\
+                             "& (MM > 1300) & (MM < 2400)"\
+                             "& (BPVDIRA > 0)",
+            
+            'pi_cuts' : "(PT>250*MeV) & (TRCHI2DOF < 3.) & (TRGHOSTPROB<.3)",
+            'pi_cuts_prompt' : "(PT>250*MeV) & (TRCHI2DOF < 2.5) & (TRGHOSTPROB<.2) & (MIPDV(PRIMARY)>0.025) & (MIPCHI2DV(PRIMARY) < 9)",
+    },
+
+    'config_Phi2ll_forD'        : {
+      'min_MIPCHI2DV_phi' : 9.,  #new
+      'max_ADAMASS'       : 1000*MeV,
+      'max_TRCHI2DV'      : 3,
+      'max_TRGHOSTPROB'   : 0.3,
+      'max_AMAXDOCA'      : 0.3*mm,
+      'min_BPVDIRA'       : 0,
+      'min_BPVVDCHI2_phi' : 9.,  #new
+      'max_VtxChi2DoF_phi': 3.,  #new
+      'min_ProbNN'        : 0.3,
+      'min_ProbNN_phi_e'  : 0.3, #new for phi2emu electron
+      'min_ProbNN_phi_mu' : 0.4, #new for all phi muons
+      'min_ProbNN_phi2ee' : 0.05, #new for phi2ee electrons
+      'max_PhiMass'       : 2020*MeV,
+      'min_PhiMass'       : 150*MeV, #changed from 300*MeV
+      'min_Phi2mumuMass'  : 820*MeV, #new
+      'max_Phi2mumuMass'  : 1220*MeV, #new
+      'min_Pt'            : 300*MeV
+    },
+} #matches 'CONFIG'
+}
+
+class LFVLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+        
+    def __init__(self,
+                 name = 'LFV',
+                 config = None) :
+            
+            LineBuilder.__init__(self, name, config)
+
+            tau_name = name+'Tau2PhiMu'
+            mme_name = name+'Tau2eMuMu'
+            emu_name=name+'B2eMu'
+            JPsiemu_name=name+'JPsi2eMu'
+            JPsimumuControl_name=name+'JPsi2MuMuControl'
+            JPsieeControl_name=name+'JPsi2eeControl'
+            PromptJPsiemu_name=name+'PromptJPsi2eMu'
+            PromptJPsimumuControl_name=name+'PromptJPsi2MuMuControl'
+            PromptJPsieeControl_name=name+'PromptJPsi2eeControl'
+            Phiemu_name=name+'Phi2eMu'
+            PhimumuControl_name=name+'Phi2MuMuControl'
+            PhieeControl_name=name+'Phi2eeControl'
+            PromptPhiemu_name=name+'PromptPhi2eMu'
+            PromptPhimumuControl_name=name+'PromptPhi2MuMuControl'
+            PromptPhieeControl_name=name+'PromptPhi2eeControl'
+            ee_name=name+'B2ee'
+            hemu_name=name+'B2heMu'
+            pmu_name=name+'B2hMu'
+            bu_name=name+'Bu2KJPsiee'
+            taumu_name=name+'B2TauMu'
+            htaumu_name=name+'B2hTauMu'
+            muetap_gamma_name = name+'Tau2MuEtaP2pipig'
+            muetap_pi_name = name+'Tau2MuEtaP2pipipi'
+            upsilon2eMu_name = name+'upsilon2eMu'
+            upsilon2ee_name = name+'upsilon2ee'
+            D2piphi2ee_name = name+'D2piphi2ee'
+            D2piphi2eMu_name = name+'D2piphi2eMu'
+            D2piphi2MuMu_name = name+'D2piphi2MuMu'
+            D2piphi2eePrompt_name = name+'D2piphi2eePrompt'
+            D2piphi2eMuPrompt_name = name+'D2piphi2eMuPrompt'
+            D2piphi2MuMuPrompt_name = name+'D2piphi2MuMuPrompt'
+
+
+            self.selTau2PhiMu       = makeTau2PhiMu(tau_name)
+            self.selTau2eMuMu       = makeTau2eMuMu(mme_name)
+            self.selB2eMu           = makeB2eMu(emu_name, config['config_B2eMu'])
+            #JPsi LFV lines with Jpsi2ee/mumu control modes
+            self.selJPsi2eMu         = makeJPsi2eMu(JPsiemu_name, config['config_JPsi2eMu'])
+            self.selJPsi2MuMuControl = makeJPsi2MuMuControl(JPsimumuControl_name, config['config_JPsi2eMu'])
+            self.selJPsi2eeControl   = makeJPsi2eeControl(JPsieeControl_name, config['config_JPsi2eMu'])
+            # prompt Jpsi LFV with control channels
+            self.selPromptJPsi2eMu          = makePromptJPsi2eMu(PromptJPsiemu_name, config['config_PromptJPsi2eMu'])
+            self.selPromptJPsi2MuMuControl  = makePromptJPsi2MuMuControl(PromptJPsimumuControl_name, config['config_PromptJPsi2eMu'])
+            self.selPromptJPsi2eeControl    = makePromptJPsi2eeControl(PromptJPsieeControl_name, config['config_PromptJPsi2eMu'])
+            # detached Phi line can use jpsi config only mass cut in prompt line differs
+            self.selPhi2eMu                 = makePhi2eMu(Phiemu_name, config['config_JPsi2eMu'])
+            self.selPhi2MuMuControl         = makePhi2MuMuControl(PhimumuControl_name, config['config_JPsi2eMu'])
+            self.selPhi2eeControl           = makePhi2eeControl(PhieeControl_name, config['config_JPsi2eMu'])
+            # promtp phi LFV lines
+            self.selPromptPhi2eMu           = makePromptPhi2eMu(PromptPhiemu_name, config['config_PromptJPsi2eMu'])
+            self.selPromptPhi2MuMuControl   = makePromptPhi2MuMuControl(PromptPhimumuControl_name, config['config_PromptJPsi2eMu'])
+            self.selPromptPhi2eeControl   = makePromptPhi2eeControl(PromptPhieeControl_name, config['config_PromptJPsi2eMu'])
+            # ===============================================
+            self.selB2ee            = makeB2ee(ee_name)
+            self.selB2heMu          = makeB2heMu(hemu_name)
+            self.selB2pMu           = makeB2pMu(pmu_name)
+            self.selBu              = makeBu(bu_name)
+            #self.selB2TauMu        = makeB2TauMu(taumu_name)
+            self.selB2hTauMu        = makeB2hTauMu(htaumu_name)
+            self.selTau2MuEtaPrime_gamma  = makeTau2MuEtaPrime(self, muetap_gamma_name, config['config_Tau2MuEtaPrime'], 'gamma')
+            self.selTau2MuEtaPrime_pi     = makeTau2MuEtaPrime(self, muetap_pi_name, config['config_Tau2MuEtaPrime'], 'pi0')
+            self.selUpsilon2eMu = makeUpsilon2eMu(self, upsilon2eMu_name, config['config_Upsilon2eMu'])
+            self.selUpsilon2ee = makeUpsilon2ee(self, upsilon2ee_name, config['config_Upsilon2ee'])
+            #prompt and detached D2piphi lines
+
+            phi2ee_forD = makePhi2eeControl(PhieeControl_name + "forD", config['config_Phi2ll_forD'])
+            phi2eMu_forD = makePhi2eMu(Phiemu_name + "forD", config['config_Phi2ll_forD'])
+            phi2MuMu_forD = makePhi2MuMuControl(PhimumuControl_name + "forD", config['config_Phi2ll_forD'])
+
+            self.selD2piphi2ee = makeD2piphi(self, D2piphi2ee_name, phi2ee_forD, 1, config['config_D2piphi'])
+            self.selD2piphi2eMu = makeD2piphi(self, D2piphi2eMu_name, phi2eMu_forD, 1, config['config_D2piphi'])
+            self.selD2piphi2MuMu = makeD2piphi(self, D2piphi2MuMu_name, phi2MuMu_forD, 1, config['config_D2piphi'])
+            self.selD2piphi2eePrompt = makeD2piphi(self, D2piphi2eePrompt_name, self.selPromptPhi2eeControl, 0, config['config_D2piphi'])
+            self.selD2piphi2eMuPrompt = makeD2piphi(self, D2piphi2eMuPrompt_name, self.selPromptPhi2eMu, 0, config['config_D2piphi'])
+            self.selD2piphi2MuMuPrompt = makeD2piphi(self, D2piphi2MuMuPrompt_name, self.selPromptPhi2MuMuControl, 0, config['config_D2piphi'])
+
+
+
+            self.tau2PhiMuLine = StrippingLine(tau_name+'Line',
+                                               prescale = config['TauPrescale'],
+                                               postscale = config['Postscale'],
+                                               MDSTFlag = False,
+                                               selection=self.selTau2PhiMu,
+                                               RelatedInfoTools = config['RelatedInfoTools_Tau2PhiMu'],
+                                               )
+                                               
+            self.tau2eMuMuLine = StrippingLine(mme_name+'Line',
+                                               prescale = config['Tau2MuMuePrescale'],
+                                               postscale = config['Postscale'],
+                                               algos = [ self.selTau2eMuMu ]
+                                               )
+                                               
+            self.b2eMuLine = StrippingLine(emu_name+'Line',
+                                           prescale = config['B2eMuPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_B2eMu'],
+                                           #MDSTFlag = False,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           algos = [ self.selB2eMu ]
+                                           )
+            #================ JPsi LFV lines
+            self.jpsi2eMuLine = StrippingLine(JPsiemu_name+'Line',
+                                           prescale = config['JPsi2eMuPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_JPsi2eMu'],
+                                           MDSTFlag = False,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           #RequiredRawEvents = ['Calo'],
+                                           algos = [ self.selJPsi2eMu ]
+                                           )
+            self.promptjpsi2eMuLine = StrippingLine(PromptJPsiemu_name+'Line',
+                                           prescale = config['PromptJPsi2eMuPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_JPsi2eMu'],
+                                           MDSTFlag = False,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           #RequiredRawEvents = ['Calo'],
+                                           algos = [ self.selPromptJPsi2eMu ],
+                                           L0DU="(L0_DATA('Spd(Mult)') < {})".format(config['config_PromptJPsi2eMu']['max_SPD'])
+                                           )
+            #================ JPsi LFV control lines
+            self.jpsi2MuMuControlLine   = StrippingLine(JPsimumuControl_name+'Line',
+                                           prescale = config['JPsi2MuMuControlPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_JPsi2MuMuControl'],
+                                           #MDSTFlag = True,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           algos = [ self.selJPsi2MuMuControl ]
+                                           )
+            self.jpsi2eeControlLine   = StrippingLine(JPsieeControl_name+'Line',
+                                           prescale = config['JPsi2eeControlPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_JPsi2eeControl'],
+                                           #MDSTFlag = True,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           #RequiredRawEvents = ['Calo'],
+                                           algos = [ self.selJPsi2eeControl ]
+                                           )
+            self.promptjpsi2MuMuControlLine = StrippingLine(PromptJPsimumuControl_name+'Line',
+                                                  prescale = config['PromptJPsi2MuMuControlPrescale'],
+                                                  postscale = config['Postscale'],
+                                                  RelatedInfoTools = config['RelatedInfoTools_JPsi2MuMuControl'],
+                                                  #MDSTFlag = True,
+                                                  #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                                  algos = [ self.selPromptJPsi2MuMuControl ],
+                                                  L0DU="(L0_DATA('Spd(Mult)') < {})".format(config['config_PromptJPsi2eMu']['max_SPD'])
+                                                  )
+            self.promptjpsi2eeControlLine = StrippingLine(PromptJPsieeControl_name+'Line',
+                                                  prescale = config['PromptJPsi2eeControlPrescale'],
+                                                  postscale = config['Postscale'],
+                                                  RelatedInfoTools = config['RelatedInfoTools_JPsi2eeControl'],
+                                                  #MDSTFlag = True,
+                                                  #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                                  #RequiredRawEvents = ['Calo'],
+                                                  algos = [ self.selPromptJPsi2eeControl ],
+                                                  L0DU="(L0_DATA('Spd(Mult)') < {})".format(config['config_PromptJPsi2eMu']['max_SPD'])
+                                                  )            
+            #================ Phi LFV lines
+            self.phi2eMuLine = StrippingLine(Phiemu_name+'Line',
+                                           prescale = config['Phi2eMuPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_Phi2eMu'],
+                                           MDSTFlag = False,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           algos = [ self.selPhi2eMu ]
+                                           )
+
+            self.promptphi2eMuLine = StrippingLine(PromptPhiemu_name+'Line',
+                                           prescale = config['PromptPhi2eMuPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_Phi2eMu'],
+                                           MDSTFlag = False,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           algos = [ self.selPromptPhi2eMu ],
+                                           L0DU = "(L0_DATA('Spd(Mult)') < {})".format(config['config_PromptJPsi2eMu']['max_SPD'])
+                                           )                      
+            #================ Phi LFV control lines
+            self.phi2MuMuControlLine = StrippingLine(PhimumuControl_name+'Line',
+                                           prescale = config['Phi2MuMuControlPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_Phi2MuMuControl'],
+                                           MDSTFlag = False,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           algos = [ self.selPhi2MuMuControl ]
+                                           )
+
+            self.phi2eeControlLine  = StrippingLine(PhieeControl_name+'Line',
+                                           prescale = config['Phi2eeControlPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_Phi2eeControl'],
+                                           MDSTFlag = False,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           algos = [ self.selPhi2eeControl ]
+                                           )
+
+            self.promptphi2MuMuControlLine = StrippingLine(PromptPhimumuControl_name+'Line',
+                                           prescale = config['PromptPhi2MuMuControlPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_Phi2MuMuControl'],
+                                           MDSTFlag = False,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           algos = [ self.selPromptPhi2MuMuControl ],
+                                           L0DU = "(L0_DATA('Spd(Mult)') < {})".format(config['config_PromptJPsi2eMu']['max_SPD'])
+                                           )  
+
+            self.promptphi2eeControlLine = StrippingLine(PromptPhieeControl_name+'Line',
+                                           prescale = config['PromptPhi2eeControlPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_Phi2eeControl'],
+                                           MDSTFlag = False,
+                                           #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                           algos = [ self.selPromptPhi2eeControl ],
+                                           L0DU = "(L0_DATA('Spd(Mult)') < {})".format(config['config_PromptJPsi2eMu']['max_SPD'])
+                                           )    
+            '''
+            self.b2TauMuLine = StrippingLine(taumu_name+'Line',
+                                            prescale = config['B2TauMuPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selB2TauMu ]
+                                            )
+            '''
+
+                                           
+            self.b2eeLine = StrippingLine(ee_name+'Line',
+                                          prescale = config['B2eePrescale'],
+                                          postscale = config['Postscale'],
+                                          RelatedInfoTools = config['RelatedInfoTools_B2ee'],
+                                          algos = [ self.selB2ee ]
+                                          )
+                                       
+            self.b2hTauMuLine = StrippingLine(htaumu_name+'Line',
+                                              prescale = config['B2hTauMuPrescale'],
+                                              postscale = config['Postscale'],
+                                              algos = [ self.selB2hTauMu ]
+                                              )
+                                       
+            self.b2heMuLine = StrippingLine(hemu_name+'Line',
+                                            prescale = config['B2heMuPrescale'],
+                                            postscale = config['Postscale'],
+                                            RelatedInfoTools = config['RelatedInfoTools_B2hemu'],
+                                            algos = [ self.selB2heMu ]
+                                            )
+                
+                                       
+            self.b2pMuLine = StrippingLine(pmu_name+'Line',
+                                           prescale = config['B2pMuPrescale'],
+                                           postscale = config['Postscale'],
+                                           RelatedInfoTools = config['RelatedInfoTools_B2pmu'],
+                                           algos = [ self.selB2pMu ]
+                                           )
+                
+            self.buLine = StrippingLine(bu_name+'Line',
+                                        prescale = config['Bu2KJPsieePrescale'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.selBu ],
+                                        RelatedInfoTools = config['RelatedInfoTools_Bu2KJPsiee']
+                                        )
+                                        
+            self.Tau2MuEtaPrime_gamma = StrippingLine(muetap_gamma_name+'Line',
+                                        prescale = config['Tau2MuEtaPrimePrescale'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.selTau2MuEtaPrime_gamma ],
+                                        #MDSTFlag = False,
+                                        RelatedInfoTools = config['RelatedInfoTools_Tau2MuEtaPrime'],
+                                        #RequiredRawEvents = ['Calo'],
+                                        )
+                                        
+            self.Tau2MuEtaPrime_pi = StrippingLine(muetap_pi_name+'Line',
+                                                prescale = config['Tau2MuEtaPrimePrescale'],
+                                                postscale = config['Postscale'],
+                                                algos = [ self.selTau2MuEtaPrime_pi ],
+                                                #MDSTFlag = False,
+                                                RelatedInfoTools = config['RelatedInfoTools_Tau2MuEtaPrime'],
+                                                #RequiredRawEvents = ['Calo'],
+                                                )
+                                                
+                                                
+            self.Upsilon2eMuLine = StrippingLine(upsilon2eMu_name+'Line',
+                                                 prescale = config['Upsilon2eMuPrescale'],
+                                                 postscale = config['Postscale'],
+                                                 algos = [ self.selUpsilon2eMu ],
+                                                 RelatedInfoTools = config['RelatedInfoTools_Upsilon2eMu'],
+                                                 #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                                 )
+                                                
+            self.Upsilon2eeLine = StrippingLine(upsilon2ee_name+'Line',
+                                                prescale = config['Upsilon2eePrescale'],
+                                                postscale = config['Postscale'],
+                                                algos = [ self.selUpsilon2ee ],
+                                                RelatedInfoTools = config['RelatedInfoTools_Upsilon2ee'],
+                                                #RequiredRawEvents = ['Velo', 'Muon', 'Calo'],
+                                                )
+                                        
+            self.D2piphi2eeLine = StrippingLine(    D2piphi2ee_name+'Line',
+                                                prescale = config['D2piphi2eePrescale'],
+                                                postscale = config['Postscale'],
+                                                algos = [self.selD2piphi2ee],
+                                                RelatedInfoTools = config['RelatedInfoTools_D2piphi'],
+                                                )
+
+            self.D2piphi2eMuLine = StrippingLine(    D2piphi2eMu_name+'Line',
+                                                prescale = config['D2piphi2eMuPrescale'],
+                                                postscale = config['Postscale'],
+                                                algos = [self.selD2piphi2eMu],
+                                                RelatedInfoTools = config['RelatedInfoTools_D2piphi'],
+                                                )
+
+            self.D2piphi2MuMuLine = StrippingLine(    D2piphi2MuMu_name+'Line',
+                                                prescale = config['D2piphi2MuMuPrescale'],
+                                                postscale = config['Postscale'],
+                                                algos = [self.selD2piphi2MuMu],
+                                                RelatedInfoTools = config['RelatedInfoTools_D2piphi'],
+                                                )
+
+            self.D2piphi2eePromptLine = StrippingLine(    D2piphi2eePrompt_name+'Line',
+                                                prescale = config['D2piphi2eePromptPrescale'],
+                                                postscale = config['Postscale'],
+                                                algos = [self.selD2piphi2eePrompt],
+                                                RelatedInfoTools = config['RelatedInfoTools_D2piphi'],
+                                                )
+
+            self.D2piphi2eMuPromptLine = StrippingLine(    D2piphi2eMuPrompt_name+'Line',
+                                                prescale = config['D2piphi2eMuPromptPrescale'],
+                                                postscale = config['Postscale'],
+                                                algos = [self.selD2piphi2eMuPrompt],
+                                                RelatedInfoTools = config['RelatedInfoTools_D2piphi'],
+                                                )
+
+            self.D2piphi2MuMuPromptLine = StrippingLine(    D2piphi2MuMuPrompt_name+'Line',
+                                                prescale = config['D2piphi2MuMuPromptPrescale'],
+                                                postscale = config['Postscale'],
+                                                algos = [self.selD2piphi2MuMuPrompt],
+                                                RelatedInfoTools = config['RelatedInfoTools_D2piphi'],
+                                                )
+
+
+            self.registerLine(self.tau2PhiMuLine)
+            self.registerLine(self.tau2eMuMuLine)
+            self.registerLine(self.b2eMuLine)
+            # JPsi LFV
+            self.registerLine(self.jpsi2eMuLine)
+            self.registerLine(self.promptjpsi2eMuLine)
+            # JPsi LFV control
+            self.registerLine(self.jpsi2MuMuControlLine)
+            self.registerLine(self.jpsi2eeControlLine)
+            self.registerLine(self.promptjpsi2MuMuControlLine)
+            self.registerLine(self.promptjpsi2eeControlLine)
+            # Phi LFV
+            self.registerLine(self.phi2eMuLine)
+            self.registerLine(self.promptphi2eMuLine)
+            # Phi LFV control
+            self.registerLine(self.phi2MuMuControlLine)
+            self.registerLine(self.phi2eeControlLine)
+            self.registerLine(self.promptphi2MuMuControlLine)
+            self.registerLine(self.promptphi2eeControlLine)
+            ####
+            self.registerLine(self.b2eeLine)
+            self.registerLine(self.b2heMuLine)
+            self.registerLine(self.b2pMuLine)
+            self.registerLine(self.buLine)
+            ##self.registerLine(self.b2TauMuLine)
+            self.registerLine(self.b2hTauMuLine)
+            self.registerLine(self.Tau2MuEtaPrime_gamma)
+            self.registerLine(self.Tau2MuEtaPrime_pi)
+            self.registerLine(self.Upsilon2eMuLine)
+            self.registerLine(self.Upsilon2eeLine)
+            #D2phiX 
+            self.registerLine(self.D2piphi2eeLine)
+            self.registerLine(self.D2piphi2eMuLine)
+            self.registerLine(self.D2piphi2MuMuLine)
+            self.registerLine(self.D2piphi2eePromptLine)
+            self.registerLine(self.D2piphi2eMuPromptLine)
+            self.registerLine(self.D2piphi2MuMuPromptLine)
+
+
+
+
+def makeTau2PhiMu(name):
+    """
+    Please contact Giulio Dujany if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    #from Configurables import OfflineVertexFitter
+    Tau2PhiMu = CombineParticles()
+    Tau2PhiMu.DecayDescriptor = " [ tau+ -> phi(1020) mu+ ]cc"
+
+    makePhi = CombineParticles()
+    makePhi.DecayDescriptor =  "phi(1020) -> K+ K-"
+    makePhi.DaughtersCuts = {"K+": "(ISLONG) & (TRCHI2DOF < 3 ) & (TRGHOSTPROB<0.3) & (PT>300*MeV) & (PIDK > 0) & ( BPVIPCHI2 () >  9 )",
+                             "K-": "(ISLONG) & (TRCHI2DOF < 3 ) & (TRGHOSTPROB<0.3) & (PT>300*MeV) & (PIDK > 0) & ( BPVIPCHI2 () >  9 )"}
+    
+    _kaons = DataOnDemand(Location='Phys/StdLooseKaons/Particles')
+    
+    makePhi.CombinationCut =  "(ADAMASS('phi(1020)')<30*MeV)"
+    makePhi.MotherCut = " ( VFASPF(VCHI2) < 25 ) & (MIPCHI2DV(PRIMARY)> 9)"
+
+    SelPhi = Selection( name+"SelPhi",
+                        Algorithm= makePhi,
+                        RequiredSelections=[_kaons] )
+
+
+    Tau2PhiMu.DaughtersCuts = { "mu-" : " ( PT > 300 * MeV ) & ( TRCHI2DOF < 3 ) & (TRGHOSTPROB<0.3) & ( BPVIPCHI2 () >  9 )" }
+    Tau2PhiMu.CombinationCut = "(ADAMASS('tau-')<150*MeV)"
+
+    Tau2PhiMu.MotherCut = "( VFASPF(VCHI2) < 25 ) &  ( (BPVLTIME () * c_light)   > 50 * micrometer ) &  ( BPVIPCHI2() < 100 ) "
+    
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+
+    SelTau = Selection (name+"makeTau",
+                        Algorithm = Tau2PhiMu,
+                        RequiredSelections = [ SelPhi, _stdLooseMuons ])
+    
+    
+    return SelTau
+
+    
+def makeTau2eMuMu(name):
+    """
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    #from Configurables import OfflineVertexFitter
+    #Tau2eMuMu = CombineParticles()
+    Tau2eMuMu = DaVinci__N3BodyDecays()
+    Tau2eMuMu.DecayDescriptors = [" [ tau+ -> e+ mu+ mu- ]cc"," [ tau+ -> mu+ mu+ e- ]cc"]
+    Tau2eMuMu.DaughtersCuts = { "mu+" : " ( PT > 300 * MeV ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) & (TRGHOSTPROB<0.3) " ,
+                                "e+" : " ( PT > 300 * MeV ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) "\
+                                "& (PIDe > 2) " }
+    Tau2eMuMu.CombinationCut = "(ADAMASS('tau+')<200*MeV)"
+
+    # cut added along with the switch to DaVinci__N3BodyDecays instead of CombineParticles
+    Tau2eMuMu.Combination12Cut = "(AM < 200*MeV)"
+
+    Tau2eMuMu.MotherCut = """
+            ( VFASPF(VCHI2) < 15 ) &
+            ( (BPVLTIME () * c_light)   > 100 * micrometer ) &
+            ( BPVIPCHI2() < 100 )
+            """ 
+                             
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseElectrons= DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = Tau2eMuMu,
+                      RequiredSelections = [ _stdLooseMuons,_stdLooseElectrons]) 
+
+
+def makeB2TauMu(name):
+    """
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    Bs2TauMu = CombineParticles()
+    Bs2TauMu.DecayDescriptors = ["[B_s0 -> tau+ mu-]cc","[B_s0 -> tau+ mu+]cc"]
+    # Set the OfflineVertexFitter to keep the 4 tracks and not the J/Psi Kstar:
+    #Bs2TauMu.addTool( OfflineVertexFitter )
+    #Bs2TauMu.ParticleCombiners.update( { "" : "OfflineVertexFitter"} )
+    #Bs2TauMu.OfflineVertexFitter.useResonanceVertex = False
+    #Bs2TauMu.ReFitPVs = True
+    Bs2TauMu.DaughtersCuts = { "mu+" : "(MIPCHI2DV(PRIMARY)> 25.)&(TRCHI2DOF < 3 ) & (TRGHOSTPROB<0.3)"}
+
+    Bs2TauMu.CombinationCut = "(ADAMASS('B_s0')<1200*MeV)"\
+                            "& (AMAXDOCA('')<0.3*mm)"
+
+    Bs2TauMu.MotherCut = "(VFASPF(VCHI2/VDOF)<9) "\
+                              "& (ADMASS('B_s0') < 1200*MeV )"\
+                              "& (BPVDIRA > 0) "\
+                              "& (BPVVDCHI2> 225)"\
+                              "& (BPVIPCHI2()< 25) "
+    
+    from CommonParticles import StdLooseDetachedTau, StdLooseDipion
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseDetachedTaus= DataOnDemand(Location = "Phys/StdLooseDetachedTau3pi/Particles")
+
+    return Selection (name,
+                      Algorithm = Bs2TauMu,
+                      RequiredSelections = [ _stdLooseMuons,_stdLooseDetachedTaus])
+
+
+def makeB2eMu(name, myconfig):
+    """
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    Bs2eMu = CombineParticles(
+    
+        DecayDescriptors = ["[B_s0 -> e+ mu-]cc","[B_s0 -> e+ mu+]cc"],
+        DaughtersCuts = {
+          "mu+" : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV}) & (TRCHI2DOF < {max_TRCHI2DV}) & (TRGHOSTPROB< {max_TRGHOSTPROB})".format(**myconfig) ,
+          "e+"  : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV})&(TRCHI2DOF < {max_TRCHI2DV})".format(**myconfig),
+        },
+
+        CombinationCut = "(ADAMASS('B_s0') < {max_ADAMASS})"\
+                            "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF)<9) "\
+                              "& (ADMASS('B_s0') < {max_ADAMASS} )"\
+                              "& (BPVDIRA > {min_BPVDIRA}) "\
+                              "& (BPVVDCHI2 > {min_BPVVDCHI2})"\
+                              "& (BPVIPCHI2() < {max_BPVIPCHI2}) ".format(**myconfig),
+    )
+    
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseElectrons= DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = Bs2eMu,
+                      RequiredSelections = [ _stdLooseMuons,_stdLooseElectrons])
+
+
+def makeJPsi2eMu(name, myconfig):
+    """
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    JPsi2eMu = CombineParticles(
+    
+        DecayDescriptors = ["[J/psi(1S) -> e+ mu-]cc","[J/psi(1S) -> e+ mu+]cc"],
+        DaughtersCuts = {
+          "mu+" : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV})"\
+                  " & (TRCHI2DOF < {max_TRCHI2DV}) & (PROBNNmu > {min_ProbNN}) &"\
+                  "(TRGHOSTPROB< {max_TRGHOSTPROB}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "e+"  : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV}) & (TRGHOSTPROB< {max_TRGHOSTPROB}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & (PROBNNe > {min_ProbNN}) & "\
+                  "(PT > {min_Pt})".format(**myconfig),
+        },
+
+        CombinationCut = "in_range( {min_JpsiMass}, AM, {max_JpsiMass} )"\
+                          "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF}) &"\
+                     "in_range( {min_JpsiMass}, MM, {max_JpsiMass} )"\
+                     "& (BPVDIRA > {min_BPVDIRA}) "\
+                     "& (BPVVDCHI2 > {min_BPVVDCHI2})".format(**myconfig)
+    )
+    
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseElectrons= DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = JPsi2eMu,
+                      RequiredSelections = [ _stdLooseMuons,_stdLooseElectrons])
+
+
+def makeJPsi2MuMuControl(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if any issues 
+    occur with this line. 
+    Cloned from JPsi2eMu Line except for the PID criteria
+
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    JPsi2MuMuControl = CombineParticles(
+    
+        DecayDescriptors = ["J/psi(1S) -> mu+ mu-","[J/psi(1S) -> mu+ mu+]cc"],
+        DaughtersCuts = {
+          "mu+" : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & "\
+                  "(TRGHOSTPROB< {max_TRGHOSTPROB}) & (PROBNNmu > {min_ProbNN}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "mu-"  : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV}) & (TRGHOSTPROB< {max_TRGHOSTPROB}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & (PROBNNmu > {min_ProbNN}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) # remove PIDe>-2 for muon!
+        },
+
+        CombinationCut = "(ADAMASS('J/psi(1S)') < {max_ADAMASS})"\
+                            "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF)<{max_VtxChi2DoF}) "\
+                    " & in_range( {min_JpsiMass}, MM, {max_JpsiMass} )"\
+                    " & (BPVDIRA > {min_BPVDIRA}) "\
+                    " & (BPVVDCHI2 > {min_BPVVDCHI2})".format(**myconfig)
+    )
+    
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    
+    return Selection (name,
+                      Algorithm = JPsi2MuMuControl,
+                      RequiredSelections = [ _stdLooseMuons])
+
+
+def makeJPsi2eeControl(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if any issues 
+    occur with this line. 
+    Cloned from JPsi2eMu Line except for the PID criteria
+
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    JPsi2eeControl = CombineParticles(
+    
+        DecayDescriptors = ["J/psi(1S) -> e+ e-","[J/psi(1S) -> e+ e+]cc"],
+        DaughtersCuts = {
+          "e+" : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV}) & (TRCHI2DOF < {max_TRCHI2DV}) & "\
+                 "(TRGHOSTPROB< {max_TRGHOSTPROB}) & (PROBNNe > {min_ProbNN}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "e-" : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV}) & (TRCHI2DOF < {max_TRCHI2DV}) &"\
+                 "(TRGHOSTPROB< {max_TRGHOSTPROB}) & (PROBNNe > {min_ProbNN}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) # remove PIDe>-2 for muon! IS implicitly made in stdLooseElectrons
+        },
+
+        CombinationCut = "in_range( {min_JpsiMass}, AM, {max_JpsiMass} )"\
+                         "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF}) "\
+                    "& in_range( {min_JpsiMass}, MM, {max_JpsiMass} )"\
+                    "& (BPVDIRA > {min_BPVDIRA}) "\
+                    "& (BPVVDCHI2 > {min_BPVVDCHI2})".format(**myconfig)
+    )
+    
+    _stdLooseElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+    
+    return Selection (name,
+                      Algorithm = JPsi2eeControl,
+                      RequiredSelections = [ _stdLooseElectrons])
+
+
+def makePromptJPsi2eMu(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    #from Configurables import OfflineVertexFitter
+    PromptJPsi2eMu = CombineParticles(
+    
+        DecayDescriptors = ["[J/psi(1S) -> e+ mu-]cc","[J/psi(1S) -> e+ mu+]cc"],
+        DaughtersCuts = {
+          "mu+" : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & (TRGHOSTPROB< {max_TRGHOSTPROB})"\
+                  " & (PROBNNmu > {min_ProbNN}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "e+"  : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) & "\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & (TRGHOSTPROB< {max_TRGHOSTPROB})"\
+                  " & ( PROBNNe > {min_ProbNN}) & "\
+                  "(PT > {min_Pt})".format(**myconfig),
+        },
+
+        CombinationCut = "in_range( {min_JpsiMass}, AM, {max_JpsiMass} )"\
+                         "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF}) "\
+                    "& in_range( {min_JpsiMass}, MM, {max_JpsiMass} )"\
+                    "& (BPVVDCHI2 < {max_BPVVDCHI2})"\
+                    "& (BPVIPCHI2() < {max_BPVIPCHI2})".format(**myconfig),
+    )
+    
+    _stdAllLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+    _stdAllLooseElectrons= DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = PromptJPsi2eMu,
+                      RequiredSelections = [ _stdAllLooseMuons,_stdAllLooseElectrons])
+
+
+def makePromptJPsi2MuMuControl(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if 
+    this line has issues. 
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    #from Configurables import OfflineVertexFitter
+    PromptJPsi2MuMuControl = CombineParticles(
+    
+        DecayDescriptors = ["J/psi(1S) -> mu+ mu-","[J/psi(1S) -> mu+ mu+]cc"],
+        DaughtersCuts = {
+          "mu+" : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & (TRGHOSTPROB< {max_TRGHOSTPROB})"\
+                  " & (PROBNNmu > {min_ProbNN_Control}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "mu-" : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & (TRGHOSTPROB< {max_TRGHOSTPROB})"\
+                  " & ( PROBNNmu > {min_ProbNN_Control}) & "\
+                  "(PT > {min_Pt})".format(**myconfig),
+        },
+
+        CombinationCut = "in_range( {min_JpsiMass}, AM, {max_JpsiMass} )"\
+                         "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF}) "\
+                    "& in_range( {min_JpsiMass}, MM, {max_JpsiMass} )"\
+                    "& (BPVVDCHI2 < {max_BPVVDCHI2})"\
+                    "& (BPVIPCHI2() < {max_BPVIPCHI2})".format(**myconfig),
+    )
+    
+    _stdAllLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = PromptJPsi2MuMuControl,
+                      RequiredSelections = [ _stdAllLooseMuons])
+
+
+def makePromptJPsi2eeControl(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if 
+    this line has issues. 
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    #from Configurables import OfflineVertexFitter
+    PromptJPsi2eeControl = CombineParticles(
+    
+        DecayDescriptors = ["J/psi(1S) -> e+ e-","[J/psi(1S) -> e+ e+]cc"],
+        DaughtersCuts = {
+          "e+" : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & (TRGHOSTPROB< {max_TRGHOSTPROB})"\
+                  " & (PROBNNe > {min_ProbNN_Control}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "e-" : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & (TRGHOSTPROB< {max_TRGHOSTPROB})"\
+                  " & ( PROBNNe > {min_ProbNN_Control}) & "\
+                  "(PT > {min_Pt})".format(**myconfig),
+        },
+
+        CombinationCut = "in_range( {min_JpsiMass}, AM, {max_JpsiMass} )"\
+                         "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF}) "\
+                    "& in_range( {min_JpsiMass}, MM, {max_JpsiMass} )"\
+                    "& (BPVVDCHI2 < {max_BPVVDCHI2})"\
+                    "& (BPVIPCHI2() < {max_BPVIPCHI2})".format(**myconfig),
+    )
+    
+    _stdAllLooseElectrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = PromptJPsi2eeControl,
+                      RequiredSelections = [ _stdAllLooseElectrons])
+
+
+def makePhi2eMu(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    Phi2eMu = CombineParticles(
+    
+        DecayDescriptors = ["[phi(1020) -> e+ mu-]cc","[phi(1020) -> e+ mu+]cc"],
+        DaughtersCuts = {
+          "mu+" : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV_phi}) & "\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) &"\
+                  "(TRGHOSTPROB< {max_TRGHOSTPROB}) & "\
+                  "(PROBNNmu > {min_ProbNN_phi_mu}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "e+"  : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV_phi}) & "\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & "\
+                  "(TRGHOSTPROB< {max_TRGHOSTPROB}) & "\
+                  "(PROBNNe > {min_ProbNN_phi_e}) & "\
+                  "(PT > {min_Pt})".format(**myconfig),
+        },
+
+        CombinationCut = "(ADAMASS('phi(1020)') < {max_ADAMASS})"\
+                            "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF_phi}) "\
+                              "& (MM > {min_PhiMass}) & (MM < {max_PhiMass})"\
+                              "& (BPVDIRA > {min_BPVDIRA}) "\
+                              "& (BPVVDCHI2 > {min_BPVVDCHI2_phi})".format(**myconfig)
+    )
+    
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseElectrons= DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = Phi2eMu,
+                      RequiredSelections = [ _stdLooseMuons,_stdLooseElectrons])
+
+
+def makePhi2MuMuControl(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if experience 
+    issues with this line
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    Phi2MuMuControl = CombineParticles(
+    
+        DecayDescriptors = ["phi(1020) -> mu+ mu-","[phi(1020) -> mu+ mu+]cc"],
+        DaughtersCuts = {
+          "mu+" : "(MIPCHI2DV(PRIMARY) > {min_MIPCHI2DV_phi}) & "\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) &"\
+                  "(TRGHOSTPROB < {max_TRGHOSTPROB}) &"\
+                  "(PROBNNmu > {min_ProbNN_phi_mu}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "mu-" : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV_phi}) & "\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) &"\
+                  "(TRGHOSTPROB < {max_TRGHOSTPROB}) &"\
+                  "(PROBNNmu > {min_ProbNN_phi_mu}) & "\
+                  "(PT > {min_Pt})".format(**myconfig),
+        },
+
+        CombinationCut = "in_range( {min_Phi2mumuMass}, AM, {max_Phi2mumuMass} )"\
+                            "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF_phi} ) "\
+                              "& (MM > {min_Phi2mumuMass}) & (MM < {max_Phi2mumuMass})"\
+                              "& (BPVDIRA > {min_BPVDIRA}) "\
+                              "& (BPVVDCHI2 > {min_BPVVDCHI2_phi})".format(**myconfig)
+    )
+    
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Phi2MuMuControl,
+                      RequiredSelections = [ _stdLooseMuons])
+
+
+def makePhi2eeControl(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if experience 
+    issues with this line
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    Phi2eeControl = CombineParticles(
+    
+        DecayDescriptors = ["phi(1020) -> e+ e-","[phi(1020) -> e+ e+]cc"],
+        DaughtersCuts = {
+          "e+" : "(MIPCHI2DV(PRIMARY) > {min_MIPCHI2DV_phi}) & "\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) &"\
+                  "(TRGHOSTPROB < {max_TRGHOSTPROB}) &"\
+                  "(PROBNNe > {min_ProbNN_phi2ee}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "e-" : "(MIPCHI2DV(PRIMARY)> {min_MIPCHI2DV_phi}) & "\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) &"\
+                  "(TRGHOSTPROB < {max_TRGHOSTPROB}) &"\
+                  "(PROBNNe > {min_ProbNN_phi2ee}) & "\
+                  "(PT > {min_Pt})".format(**myconfig),
+        },
+
+        CombinationCut = "in_range( {min_PhiMass}, AM, {max_PhiMass} )"\
+                            "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF_phi} ) "\
+                              "& (MM > {min_PhiMass}) & (MM < {max_PhiMass})"\
+                              "& (BPVDIRA > {min_BPVDIRA}) "\
+                              "& (BPVVDCHI2 > {min_BPVVDCHI2_phi})".format(**myconfig)
+    )
+    
+    _stdLooseElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = Phi2eeControl,
+                      RequiredSelections = [ _stdLooseElectrons])
+
+
+def makePromptPhi2eMu(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    #from Configurables import OfflineVertexFitter
+    PromptPhi2eMu = CombineParticles(
+    
+        DecayDescriptors = ["[phi(1020) -> e+ mu-]cc","[phi(1020) -> e+ mu+]cc"],
+        DaughtersCuts = {
+          "mu+" : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & "\
+                  "(TRGHOSTPROB < {max_TRGHOSTPROB}) &"\
+                  "(PROBNNmu > {min_ProbNN_phi}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "e+"  : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & "\
+                  "(TRGHOSTPROB < {max_TRGHOSTPROB}) & "\
+                  "( PROBNNe > {min_ProbNN_phi}) & "\
+                  "(PT > {min_Pt})".format(**myconfig),
+        },
+
+        CombinationCut = "in_range( {min_PhiMass}, AM, {max_PhiMass} )"\
+                         "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF_phi}) "\
+                    "& (MM < {max_PhiMass})"\
+                    "& (MM > {min_PhiMass} )"\
+                    "& (BPVVDCHI2 < {max_BPVVDCHI2})"\
+                    "& (BPVIPCHI2() < {max_BPVIPCHI2})".format(**myconfig),
+    )
+    
+    _stdAllLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+    _stdAllLooseElectrons= DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = PromptPhi2eMu,
+                      RequiredSelections = [ _stdAllLooseMuons,_stdAllLooseElectrons])
+
+
+def makePromptPhi2MuMuControl(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if you see 
+    issues with this line.
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    #from Configurables import OfflineVertexFitter
+    PromptPhi2MuMuControl = CombineParticles(
+    
+        DecayDescriptors = ["phi(1020) -> mu+ mu-","[phi(1020) -> mu+ mu+]cc"],
+        DaughtersCuts = {
+          "mu+" : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & "\
+                  "(TRGHOSTPROB < {max_TRGHOSTPROB}) & "\
+                  "(PROBNNmu > {min_ProbNN_phi2mumu}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "mu-" : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & "\
+                  "(TRGHOSTPROB < {max_TRGHOSTPROB}) & "\
+                  "(PROBNNmu > {min_ProbNN_phi2mumu}) & "\
+                  "(PT > {min_Pt})".format(**myconfig),
+        },
+
+        CombinationCut = "in_range( {min_Phi2mumuMass}, AM, {max_Phi2mumuMass} )"\
+                         "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF_phi}) "\
+                    "& (MM < {max_Phi2mumuMass})"\
+                    "& (MM > {min_Phi2mumuMass} )"\
+                    "& (BPVVDCHI2 < {max_BPVVDCHI2})"\
+                    "& (BPVIPCHI2() < {max_BPVIPCHI2})".format(**myconfig),
+    )
+    
+    _stdAllLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = PromptPhi2MuMuControl,
+                      RequiredSelections = [ _stdAllLooseMuons])
+
+def makePromptPhi2eeControl(name, myconfig):
+    """
+    Please contact Maximilian Schlupp or Johannes Albrecht if you see 
+    issues with this line.
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    #from Configurables import OfflineVertexFitter
+    PromptPhi2eeControl = CombineParticles(
+    
+        DecayDescriptors = ["phi(1020) -> e+ e-","[phi(1020) -> e+ e+]cc"],
+        DaughtersCuts = {
+          "e+" : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & "\
+                  "(TRGHOSTPROB < {max_TRGHOSTPROB}) & "\
+                  "(PROBNNe > {min_ProbNN_phi}) & "\
+                  "(PT > {min_Pt})".format(**myconfig) ,
+          "e-" : "(MIPCHI2DV(PRIMARY) < {max_MIPCHI2DV}) &"\
+                  "(TRCHI2DOF < {max_TRCHI2DV}) & "\
+                  "(TRGHOSTPROB < {max_TRGHOSTPROB}) & "\
+                  "(PROBNNe > {min_ProbNN_phi}) & "\
+                  "(PT > {min_Pt})".format(**myconfig),
+        },
+
+        CombinationCut = "in_range( {min_PhiMass}, AM, {max_PhiMass} )"\
+                         "& (AMAXDOCA('') < {max_AMAXDOCA})".format(**myconfig),
+
+        MotherCut = "(VFASPF(VCHI2/VDOF) < {max_VtxChi2DoF_phi}) "\
+                    "& (MM < {max_PhiMass})"\
+                    "& (MM > {min_PhiMass} )"\
+                    "& (BPVVDCHI2 < {max_BPVVDCHI2})"\
+                    "& (BPVIPCHI2() < {max_BPVIPCHI2})".format(**myconfig),
+    )
+    
+    _stdAllLooseElectrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = PromptPhi2eeControl,
+                      RequiredSelections = [ _stdAllLooseElectrons])
+
+
+def makeB2ee(name):
+    """
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    Bs2ee = CombineParticles()
+    Bs2ee.DecayDescriptors = ["B_s0 -> e+ e-","[B_s0 -> e+ e+]cc"]
+
+    #Bs2ee.addTool( OfflineVertexFitter )
+    #Bs2ee.ParticleCombiners.update( { "" : "OfflineVertexFitter"} )
+    #Bs2ee.OfflineVertexFitter.useResonanceVertex = False
+    Bs2ee.ReFitPVs = False
+    Bs2ee.DaughtersCuts = { "e+" : "(MIPCHI2DV(PRIMARY)> 25.)&(TRCHI2DOF < 3 )"}
+
+    Bs2ee.CombinationCut = "(ADAMASS('B_s0')<1200*MeV)"\
+                            "& (AMAXDOCA('')<0.3*mm)"
+
+    Bs2ee.MotherCut = "(VFASPF(VCHI2/VDOF)<9) "\
+                              "& (ADMASS('B_s0') < 1200*MeV )"\
+                              "& (BPVDIRA > 0) "\
+                              "& (BPVVDCHI2> 225)"\
+                              "& (BPVIPCHI2()< 25) "
+                             
+    _stdLooseElectrons= DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = Bs2ee,
+                      RequiredSelections = [ _stdLooseElectrons])
+
+
+def makeB2hTauMu(name):
+    """
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    #Bs2hTauMu = CombineParticles()
+    Bs2hTauMu = DaVinci__N3BodyDecays()
+    Bs2hTauMu.DecayDescriptors = ["[B+ -> K+ tau+ mu-]cc","[B+ -> K- tau+ mu+]cc", "[B+ -> K+ tau- mu+]cc",
+                                  "[B+ -> pi+ tau+ mu-]cc","[B+ -> pi- tau+ mu+]cc", "[B+ -> pi+ tau- mu+]cc",
+                                  "[B+ -> p+ tau+ mu-]cc","[B- -> p+ tau- mu-]cc", "[B+ -> p+ tau- mu+]cc"]
+    #Bs2hTauMu.addTool( OfflineVertexFitter )
+    #Bs2hTauMu.ParticleCombiners.update( { "" : "OfflineVertexFitter"} )
+    #Bs2hTauMu.OfflineVertexFitter.useResonanceVertex = False
+    #Bs2hTauMu.ReFitPVs = True
+    Bs2hTauMu.DaughtersCuts = { "mu+" : "(MIPCHI2DV(PRIMARY)>36.)&(TRCHI2DOF<3)& (TRGHOSTPROB<0.3)",
+                              "pi+" : "(MIPCHI2DV(PRIMARY)>36.)&(TRCHI2DOF<3) & (TRGHOSTPROB<0.3)",
+                              "K+" : "(MIPCHI2DV(PRIMARY)>36.)&(TRCHI2DOF<3)&(PIDK>5)& (TRGHOSTPROB<0.3)",
+                              "p+" : "(MIPCHI2DV(PRIMARY)>36.)&(TRCHI2DOF<3)&(PIDp>5)& (TRGHOSTPROB<0.3)"}
+
+    Bs2hTauMu.CombinationCut = "(ADAMASS('B+')<400*MeV)"\
+                            "& (AMAXDOCA('')<0.15*mm)"
+
+    # cut added along with the switch to DaVinci__N3BodyDecays instead of CombineParticles
+    Bs2hTauMu.Combination12Cut = "(AM < 6100*MeV)"\
+                                 "& (AMAXDOCA('')<0.15*mm)"
+
+    Bs2hTauMu.MotherCut = "(VFASPF(VCHI2/VDOF)<9) "\
+                          "& (BPVDIRA>0.999)"\
+                          "& (ADMASS('B_s0') < 400*MeV )"\
+                          "& (BPVDIRA > 0) "\
+                          "& (BPVVDCHI2> 225)"\
+                          "& (BPVIPCHI2()< 16) "#maybe 16
+    
+    from CommonParticles import StdLooseDetachedTau, StdLooseDipion
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseDetachedTaus= DataOnDemand(Location = "Phys/StdLooseDetachedTau3pi/Particles")
+    _stdNoPIDsPions= DataOnDemand(Location = "Phys/StdNoPIDsPions/Particles")
+    _stdNoPIDsKaons= DataOnDemand(Location = "Phys/StdNoPIDsKaons/Particles")
+    _stdNoPIDsProtons= DataOnDemand(Location = "Phys/StdNoPIDsProtons/Particles")
+    
+
+    return Selection (name,
+                      Algorithm = Bs2hTauMu,
+                      RequiredSelections = [ _stdLooseMuons,_stdLooseDetachedTaus,
+                                             _stdNoPIDsPions, _stdNoPIDsKaons,
+                                             _stdNoPIDsProtons ])
+                      
+
+def makeB2heMu(name):
+    """
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    #Bs2heMu = CombineParticles()
+    Bs2heMu = DaVinci__N3BodyDecays()
+    Bs2heMu.DecayDescriptors = ["[B+ -> K+ e+ mu-]cc","[B+ -> K- e+ mu+]cc", "[B+ -> K+ e- mu+]cc",
+                                "[B+ -> pi+ e+ mu-]cc","[B+ -> pi- e+ mu+]cc" , "[B+ -> pi+ e- mu+]cc",
+                                "[B+ -> p+ e+ mu-]cc","[B- -> p+ e- mu-]cc", "[B+ -> p+ e- mu+]cc"]
+    #Bs2heMu.addTool( OfflineVertexFitter )
+    #Bs2heMu.ParticleCombiners.update( { "" : "OfflineVertexFitter"} )
+    #Bs2heMu.OfflineVertexFitter.useResonanceVertex = False
+    #Bs2heMu.ReFitPVs = True
+    Bs2heMu.DaughtersCuts = { "mu+" : "(MIPCHI2DV(PRIMARY)>25.)&(TRCHI2DOF<3) & (TRGHOSTPROB<0.3)",
+                              "e+" : "(MIPCHI2DV(PRIMARY)>25.)&(TRCHI2DOF<3) & (PIDe > 2)",
+                              "pi+" : "(MIPCHI2DV(PRIMARY)>25.)&( TRCHI2DOF < 3 )& (TRGHOSTPROB<0.3)",
+                              "p+" : "(MIPCHI2DV(PRIMARY)>25.)&(TRCHI2DOF<3)&(PIDp>5) & (TRGHOSTPROB<0.3)",
+                              "K+" : "(MIPCHI2DV(PRIMARY)>25.)&(TRCHI2DOF<3)&(PIDK>5) & (TRGHOSTPROB<0.3)"}
+
+    Bs2heMu.CombinationCut = "(ADAMASS('B+')<600*MeV)"\
+                            "& (AMAXDOCA('')<0.3*mm)"
+    # cut added along with the switch to DaVinci__N3BodyDecays instead of CombineParticles
+    Bs2heMu.Combination12Cut = "(AM < 6300*MeV)"\
+                               "& (AMAXDOCA('')<0.3*mm)"
+
+
+    Bs2heMu.MotherCut = "(VFASPF(VCHI2/VDOF)<9) "\
+                              "& (ADMASS('B_s0') < 600*MeV )"\
+                              "& (BPVDIRA > 0) "\
+                              "& (BPVVDCHI2> 225)"\
+                              "& (BPVIPCHI2()< 25) "
+
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseElectrons= DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+    _stdNoPIDsPions= DataOnDemand(Location = "Phys/StdNoPIDsPions/Particles")
+    _stdNoPIDsKaons= DataOnDemand(Location = "Phys/StdNoPIDsKaons/Particles")
+    _stdNoPIDsProtons= DataOnDemand(Location = "Phys/StdNoPIDsProtons/Particles")
+    
+    return Selection (name,
+                      Algorithm = Bs2heMu,
+                      RequiredSelections = [ _stdLooseMuons,_stdLooseElectrons,
+                                             _stdNoPIDsPions, _stdNoPIDsKaons,
+                                             _stdNoPIDsProtons ])
+
+
+def makeB2pMu(name):
+    """
+    Please contact Johannes Albrecht if you think of prescaling this line!
+    
+    Arguments:
+    name        : name of the Selection.
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    Bs2pMu = CombineParticles()
+    Bs2pMu.DecayDescriptors = [ "[B_s0 -> p+ mu-]cc","[B_s0 -> p+ mu+]cc",
+                                "[B_s0 -> pi+ mu-]cc","[B_s0 -> pi+ mu+]cc",
+                                "[B_s0 -> K+ mu-]cc","[B_s0 -> K+ mu+]cc"]
+    #Bs2pMu.addTool( OfflineVertexFitter )
+    #Bs2pMu.VertexFitters.update( { "" : "OfflineVertexFitter"} )
+    #Bs2pMu.OfflineVertexFitter.useResonanceVertex = False
+    #Bs2pMu.ReFitPVs = True
+    Bs2pMu.DaughtersCuts = { "mu+" : "(MIPCHI2DV(PRIMARY)> 25.)&(TRCHI2DOF < 3 ) & (TRGHOSTPROB<0.3)",
+                             "pi+" : "(MIPCHI2DV(PRIMARY)>36.)&(TRCHI2DOF<3)&(TRGHOSTPROB<0.3)",
+                             "K+" : "(MIPCHI2DV(PRIMARY)>25.)&(TRCHI2DOF<3) & (PIDK>5) & (TRGHOSTPROB<0.3)",
+                             "p+" : "(MIPCHI2DV(PRIMARY)> 25.)&(TRCHI2DOF < 3 )& (PIDp>5) & (TRGHOSTPROB<0.3)"}
+
+    Bs2pMu.CombinationCut = "(ADAMASS('B_s0')<500*MeV)"\
+                            "& (AMAXDOCA('')<0.1*mm)"
+    
+    Bs2pMu.MotherCut = "(VFASPF(VCHI2/VDOF)<9) "\
+                       "& (ADMASS('B_s0') < 600*MeV )"\
+                       "& (BPVDIRA > 0) "\
+                       "& (BPVVDCHI2> 225)"\
+                       "& (BPVIPCHI2()< 25) "
+
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdNoPIDsPions= DataOnDemand(Location = "Phys/StdNoPIDsPions/Particles")
+    _stdNoPIDsKaons= DataOnDemand(Location = "Phys/StdNoPIDsKaons/Particles")
+    _stdNoPIDsProtons= DataOnDemand(Location = "Phys/StdNoPIDsProtons/Particles")
+    
+
+
+    return Selection (name,
+                      Algorithm = Bs2pMu,
+                      RequiredSelections = [ _stdLooseMuons,_stdNoPIDsPions,
+                                             _stdNoPIDsKaons,_stdNoPIDsProtons ])
+
+
+def makeBu(name) :
+    """
+    detached Bu-->JPsiK selection.
+
+    Please contact Flavio Archilli if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    
+    #from Configurables import OfflineVertexFitter
+   
+    SelDJPsi = makeDetachedJPsi(name)
+
+    PreselBu2JPsiKCommon = CombineParticles()
+    PreselBu2JPsiKCommon.DecayDescriptor =  " [B+ -> J/psi(1S) K+]cc ";
+    #PreselBu2JPsiKCommon.addTool( OfflineVertexFitter )
+    #PreselBu2JPsiKCommon.ParticleCombiners.update( { "" : "OfflineVertexFitter"} )
+    #PreselBu2JPsiKCommon.OfflineVertexFitter.useResonanceVertex = False
+    PreselBu2JPsiKCommon.ReFitPVs = True
+    PreselBu2JPsiKCommon.DaughtersCuts = { "K+" : "(ISLONG) & (TRCHI2DOF < 3 ) &(MIPCHI2DV(PRIMARY)>25)& (PT>250*MeV) & (TRGHOSTPROB<0.3) "}
+    PreselBu2JPsiKCommon.CombinationCut = "(ADAMASS('B+') < 600*MeV)"
+    PreselBu2JPsiKCommon.MotherCut = "(BPVIPCHI2()< 25)& (VFASPF(VCHI2)<45) "
+
+    _kaons = DataOnDemand(Location='Phys/StdNoPIDsKaons/Particles')
+
+    return Selection( "SelBu2KJPsiee",
+                         Algorithm = PreselBu2JPsiKCommon,
+                         RequiredSelections=[SelDJPsi,_kaons] )
+
+
+def makeDetachedJPsi(name) :
+    """
+    detached JPsi selection for B--> JPsi X calibration and
+    normalization channels. 
+
+    Please contact Flavio Archilli if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+    #from Configurables import OfflineVertexFitter
+    DetachedJPsi = CombineParticles()
+    DetachedJPsi.DecayDescriptor = "J/psi(1S) -> e+ e-"
+    #DetachedJPsi.addTool( OfflineVertexFitter )
+    #DetachedJPsi.ParticleCombiners.update( { "" : "OfflineVertexFitter"} )
+    #DetachedJPsi.OfflineVertexFitter.useResonanceVertex = False
+    DetachedJPsi.ReFitPVs = True
+    DetachedJPsi.DaughtersCuts = { "e+" : "(TRCHI2DOF < 3 ) "\
+                                   "& (MIPCHI2DV(PRIMARY)> 25.) "\
+                                   "& (PIDe > 2) "}
+                                 
+    DetachedJPsi.CombinationCut = "(ADAMASS('J/psi(1S)')<1000*MeV) "\
+                                   "& (AMAXDOCA('')<0.3*mm)"
+
+    DetachedJPsi.MotherCut = "(VFASPF(VCHI2)<9) "\
+                             "& (ADMASS('J/psi(1S)') < 1000*MeV )"\
+                             "& (BPVDIRA > 0) "\
+                             "& (BPVVDCHI2>169)"
+
+    _stdLooseElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+
+    return Selection (name,
+                      Algorithm = DetachedJPsi,
+                      RequiredSelections = [ _stdLooseElectrons ])
+
+
+def makeTau2MuEtaPrime(self, name, config, setEtaPrime) :
+    
+    """
+    tau -> mu eta' selection
+        
+    Please contact Guido Andreassi if you think of prescaling this line!
+        
+    Arguments:
+    name        : name of the Selection, configuration dictionary.
+    """
+            
+    if setEtaPrime == 'gamma':
+        self.SelEtaPrime = makeEtaPrime2pipigamma("selEtap_gamma", config['config_EtaPrime2pipigamma'])
+    
+    if setEtaPrime == 'pi0':
+        self.SelEtaPrime = makeEtaPrime2pipipi("selEtap_pi0", config['config_EtaPrime2pipipi'])
+
+
+    Tau2MuEtaPrime = CombineParticles()
+    Tau2MuEtaPrime.DecayDescriptor =  "[tau+ -> mu+ eta_prime]cc ";
+    Tau2MuEtaPrime.ReFitPVs = True
+    Tau2MuEtaPrime.DaughtersCuts = { "mu+" : "{muplus_cuts}".format(**config)}
+    Tau2MuEtaPrime.CombinationCut = "{tau_mass_window}".format(**config)
+    Tau2MuEtaPrime.MotherCut = "{tau_cuts}".format(**config)
+                
+    _muons = DataOnDemand(Location="Phys/StdLooseMuons/Particles")
+                    
+    return Selection( name,
+                        Algorithm = Tau2MuEtaPrime,
+                        RequiredSelections=[self.SelEtaPrime,_muons] )
+
+
+def makeEtaPrime2pipigamma(name, config) :
+    """
+        eta' selection for tau -> mu eta'
+        Please contact Guido Andreassi if you think of prescaling this line!
+        
+        Arguments:
+        name        : name of the Selection , config:  configuration dictionary.
+        """
+    EtaPrime2pipigamma = DaVinci__N3BodyDecays()
+    EtaPrime2pipigamma.DecayDescriptor = "eta_prime -> pi+ pi- gamma"
+    EtaPrime2pipigamma.ReFitPVs = True
+    EtaPrime2pipigamma.Combination12Cut  = "{pipi_cuts}".format(**config)
+    EtaPrime2pipigamma.DaughtersCuts = {"pi+"     : "{piplus_cuts}".format(**config),
+                              "pi-"     : "{piminus_cuts}".format(**config),
+                              "gamma"   : "{gamma_cuts}".format(**config)}
+                                    
+    EtaPrime2pipigamma.CombinationCut = "{etap_mass_window}".format(**config)
+    EtaPrime2pipigamma.MotherCut = "{etap_cuts}".format(**config)
+                                            
+    _stdLoosePions = DataOnDemand (Location = "Phys/StdLoosePions/Particles")
+    _stdLooseAllPhotons = DataOnDemand (Location = "Phys/StdLooseAllPhotons/Particles")
+    
+    return Selection (name,
+                        Algorithm = EtaPrime2pipigamma,
+                        RequiredSelections = [ _stdLoosePions, _stdLooseAllPhotons ])
+
+
+def makeEtaPrime2pipipi(name, config) :
+    """
+        eta' selection for tau -> mu eta'
+        Please contact Guido Andreassi if you think of prescaling this line!
+        
+        Arguments:
+        name        : name of the Selection , config:  configuration dictionary.
+        """
+    EtaPrime2pipipi = DaVinci__N3BodyDecays()
+    EtaPrime2pipipi.DecayDescriptor = "eta_prime -> pi+ pi- pi0"
+    EtaPrime2pipipi.ReFitPVs = True
+    EtaPrime2pipipi.Combination12Cut  = "{pipi_cuts}".format(**config)
+    EtaPrime2pipipi.DaughtersCuts = {"pi+"     : "{piplus_cuts}".format(**config),
+                                     "pi-"     : "{piminus_cuts}".format(**config),
+                                     "pi0"     : "{pi0_cuts}".format(**config)}
+
+    EtaPrime2pipipi.CombinationCut = "{etap_mass_window}".format(**config)
+    EtaPrime2pipipi.MotherCut = "{etap_cuts}".format(**config)
+    
+    _stdLoosePions = DataOnDemand (Location = "Phys/StdLoosePions/Particles")
+    _stdLooseResolvedPi0 = DataOnDemand (Location = "Phys/StdLooseResolvedPi0/Particles")
+    _stdLooseMergedPi0 = DataOnDemand (Location = "Phys/StdLooseMergedPi0/Particles")
+    _stdPi0 = MergedSelection("Pi0For" + name, RequiredSelections = [ _stdLooseResolvedPi0, _stdLooseMergedPi0 ])
+
+    return Selection (name,
+                      Algorithm = EtaPrime2pipipi,
+                      RequiredSelections = [ _stdLoosePions, _stdPi0])
+
+
+
+
+
+def makeUpsilon2eMu(self, name, config):
+    """
+        eta' selection for upsilon -> e mu
+        Please contact Guido Andreassi if you think of modifying this line!
+        
+        Arguments:
+        name        : name of the Selection , config:  configuration dictionary.
+        """
+    
+    Upsilon2eMu = CombineParticles(
+                                   DecayDescriptors = ["[Upsilon(1S) -> e+ mu-]cc","[Upsilon(1S) -> e+ mu+]cc"],
+                                   DaughtersCuts = {
+                                   "mu+" : "{mu_cuts}".format(**config) ,
+                                   "e+"  : "{e_cuts}".format(**config),
+                                   },
+                                   CombinationCut = "{comb_cuts}".format(**config),
+                                   MotherCut = "{upsilon_cuts}".format(**config)
+                                   )
+        
+    _stdTightMuons = DataOnDemand(Location = "Phys/StdTightMuons/Particles")
+    _stdTightElectrons = DataOnDemand(Location = "Phys/StdTightElectrons/Particles")
+                                   
+    return Selection(name,
+                     Algorithm = Upsilon2eMu,
+                     RequiredSelections = [ _stdTightMuons, _stdTightElectrons])
+
+
+def makeUpsilon2ee(self, name, config):
+    """
+        eta' selection for upsilon -> e e
+        Please contact Guido Andreassi if you think of modifying this line!
+        
+        Arguments:
+        name        : name of the Selection , config:  configuration dictionary.
+        """
+    
+    Upsilon2ee = CombineParticles(
+                                  DecayDescriptors = ["Upsilon(1S) -> e+ e-","[Upsilon(1S) -> e+ e+]cc"],
+                                  DaughtersCuts = {"e+"  : "{e_cuts}".format(**config)},
+                                  CombinationCut = "{comb_cuts}".format(**config),
+                                  MotherCut = "{upsilon_cuts}".format(**config)
+                                  )
+        
+    _stdTightElectrons = DataOnDemand(Location = "Phys/StdTightElectrons/Particles")
+                                  
+    return Selection(name,
+                     Algorithm = Upsilon2ee,
+                     RequiredSelections = [_stdTightElectrons])
+
+
+
+def makeD2piphi(self, name, phis, detachedflag, myconfig):
+    """
+    D(s) -> (phi-> l+ l-) pi+ selection
+    Please contact Niklas Nolte or Stefanie Reichert if you think of modifying this line.
+    """
+    
+    if detachedflag == 1:
+        D2piphiGrimReaper = CombineParticles(
+            
+            DecayDescriptors = [ "[D_s+ -> phi(1020) pi+]cc"
+                                ,"[D+ -> phi(1020) pi+]cc"
+                                ],
+            DaughtersCuts = {"pi+"  : "{pi_cuts}".format(**myconfig)},
+            CombinationCut = "{comb_cuts}".format(**myconfig),
+            MotherCut = "{mother_cuts}".format(**myconfig),
+            )
+    elif detachedflag == 0:
+        D2piphiGrimReaper = CombineParticles(
+            
+            DecayDescriptors = [ "[D_s+ -> phi(1020) pi+]cc"
+                                ,"[D+ -> phi(1020) pi+]cc"
+                                ],
+            DaughtersCuts = {"pi+"  : "{pi_cuts_prompt}".format(**myconfig)},
+            CombinationCut = "{comb_cuts_prompt}".format(**myconfig),
+            MotherCut = "{mother_cuts_prompt}".format(**myconfig),
+            )
+
+    if detachedflag == 1:
+        _pis = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+    elif detachedflag == 0:
+        _pis = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+
+    return Selection (name,
+                      Algorithm = D2piphiGrimReaper,
+                      RequiredSelections = [phis, _pis]
+                     )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLb2L0Gamma.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLb2L0Gamma.py
new file mode 100644
index 000000000..5934c7720
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLb2L0Gamma.py
@@ -0,0 +1,407 @@
+#!/usr/bin/env python
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# =============================================================================
+# @file   StrippingLb2L0Gamma.py
+# @author Albert Puig (albert.puig@epfl.ch)
+# @date   20.08.2014
+# =============================================================================
+"""Stripping lines for Lambda_b -> Lambda0(->p pi) gamma.
+
+These lines cover (a) calorimetric and (b) converted photons.
+
+"""
+
+__author__ = ["Albert Puig Navarro", "Carla Marin Benito"]
+__date__ = "14.11.2016"
+__version__ = "2.0"
+__all__ = ("default_config", "StrippingLb2L0GammaConf")
+
+import os
+
+from Gaudi.Configuration import *
+
+from Configurables import CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+
+from PhysSelPython.Wrappers      import Selection, MergedSelection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils        import LineBuilder
+
+from StandardParticles import StdAllNoPIDsPions, StdAllNoPIDsProtons
+from StandardParticles import StdLooseAllPhotons, StdAllLooseGammaDD, StdAllLooseGammaLL
+from StandardParticles import StdVeryLooseDetachedKst2Kpi
+from StandardParticles import StdLooseJpsi2MuMu
+
+default_config = {'NAME'        : 'Lb2L0Gamma',
+                  'WGs'         : ['RD'],
+                  'BUILDERTYPE' : 'StrippingLb2L0GammaConf',
+                  'CONFIG'      : {# Prescales
+                                   'Lb2L0GammaPrescale'          : 1.0,
+                                   'Bd2KstGammaPrescale'         : 1.0,
+                                   'Lb2L0JpsiPrescale'           : 1.0,
+                                   'Bd2KstJpsiPrescale'          : 1.0,
+                                   'Lb2L0GammaConvertedPrescale' : 1.0,
+                                   # Trigger cuts
+                                   'L0'                          : ['Photon', 'Electron', 'Hadron'],
+                                   'L0_Jpsi'                     : [],
+                                   'L0_Conv'                     : [],
+                                   'HLT1'                        : [],
+                                   'HLT2'                        : [],
+                                   # Track cuts
+                                   'Track_Chi2ndf_Max'           : 3.0,
+                                   'Track_MinChi2ndf_Max'        : 2.0,
+                                   'Track_GhostProb_Max'         : 0.4,
+                                   'TrackLL_IPChi2_Min'          : 16.0,
+                                   'Pion_P_Min'                  : 2000.0,
+                                   'Proton_P_Min'                : 7000.0, # Can increase
+                                   'Pion_Pt_Min'                 : 300.0,
+                                   'Proton_Pt_Min'               : 800.0, # Can increase
+                                   # Lambda0 cuts
+                                   'Lambda0_VtxChi2_Max'         : 9.0,
+                                   'Lambda0LL_IP_Min'            : 0.05,
+                                   'Lambda0LL_MassWindow'        : 20.0,
+                                   'Lambda0DD_MassWindow'        : 30.0,
+                                   'Lambda0_Pt_Min'              : 1000.0,
+                                   # Kst ctus
+                                   'Kst_MassWindow'              : 100.0,
+                                   # Photon cuts
+                                   'Photon_PT_Min'               : 2500.0,
+                                   'Photon_CL_Min'               : 0.2,
+                                   'PhotonCnv_PT_Min'            : 1000.0,
+                                   'PhotonCnv_MM_Max'            : 100.0,
+                                   'PhotonCnv_VtxChi2_Max'       : 9.0,
+                                   # Lambda_b cuts
+                                   'Lambdab_VtxChi2_Max'         : 9.0,
+                                   'Lambdab_Pt_Min'              : 1000.0,
+                                   'Lambdab_SumPt_Min'           : 5000.0,
+                                   'Lambdab_IPChi2_Max'          : 25.0,
+                                   'Lambdab_MTDOCAChi2_Max'      : 7.0,
+                                   'Lambdab_MassWindow'          : 1100.0,
+                                  },
+                  'STREAMS' : ['Leptonic'],
+                 }
+
+class StrippingLb2L0GammaConf(LineBuilder):
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        self.name = name
+        LineBuilder.__init__(self, name, config)
+        #################################################################################
+        # Configure trigger
+        #################################################################################
+        l0 = None
+        if config['L0']:
+            l0 = "L0_CHANNEL_RE('%s')" % ('|'.join(config['L0']))
+        l0_jpsi = None
+        if config['L0_Jpsi']:
+            l0_jpsi = "L0_CHANNEL_RE('%s')" % ('|'.join(config['L0_Jpsi']))
+        l0_conv = None
+        if config['L0_Conv']:
+            l0_conv = "L0_CHANNEL_RE('%s')" % ('|'.join(config['L0_Conv']))
+        hlt1 = None
+        if config['HLT1']:
+            hlt1 = "HLT_PASS_RE('%s')" % ('|'.join(config['HLT1']))
+        hlt2 = None
+        if config['HLT2']:
+            hlt2 = "HLT_PASS_RE('%s')" % ('|'.join(config['HLT2']))
+
+        #################################################################################
+        # Build Lambda_0
+        #################################################################################
+        tracks_cuts = """(MAXTREE(TRCHI2DOF, HASTRACK) < %(Track_Chi2ndf_Max)s) &
+                         (MINTREE(TRCHI2DOF, HASTRACK) < %(Track_MinChi2ndf_Max)s) &
+                         (MAXTREE(TRGHOSTPROB, HASTRACK) < %(Track_GhostProb_Max)s) &
+                         (INTREE(('p+'==ABSID) & (PT > %(Proton_Pt_Min)s))) &
+                         (INTREE(('pi+'==ABSID) & (PT > %(Pion_Pt_Min)s))) &
+                         (INTREE(('p+'==ABSID) & (P > %(Proton_P_Min)s))) &
+                         (INTREE(('pi+'==ABSID) & (P > %(Pion_P_Min)s)))"""
+        lambda0_ll_dod = DataOnDemand(Location='Phys/StdLooseLambdaLL/Particles')
+        lambda0_ll_cuts = """(PT>%(Lambda0_Pt_Min)s*MeV) &
+                             (VFASPF(VCHI2/VDOF)<%(Lambda0_VtxChi2_Max)s) &
+                             (MINTREE(MIPCHI2DV(PRIMARY), ISLONG) > %(TrackLL_IPChi2_Min)s) &
+                             (MIPDV(PRIMARY) > %(Lambda0LL_IP_Min)s*mm) &
+                             (ADMASS('Lambda0') < %(Lambda0LL_MassWindow)s*MeV)"""
+        lambda0_ll_code = (lambda0_ll_cuts + " & " + tracks_cuts) % config
+        lambda0_ll_filter = FilterDesktop(Code=lambda0_ll_code)
+        lambda0_ll = Selection("LooseLambda0LL",
+                               Algorithm=lambda0_ll_filter,
+                               RequiredSelections=[lambda0_ll_dod])
+        lambda0_dd_dod = DataOnDemand(Location='Phys/StdLooseLambdaDD/Particles')
+        lambda0_dd_cuts = """(PT>%(Lambda0_Pt_Min)s*MeV) &
+                             (VFASPF(VCHI2/VDOF)<%(Lambda0_VtxChi2_Max)s) &
+                             (ADMASS('Lambda0') < %(Lambda0DD_MassWindow)s*MeV)"""
+        lambda0_dd_code = (lambda0_dd_cuts + " & " + tracks_cuts) % config
+        lambda0_dd_filter = FilterDesktop(Code=lambda0_dd_code)
+        lambda0_dd = Selection("LooseLambda0DD",
+                               Algorithm=lambda0_dd_filter,
+                               RequiredSelections=[lambda0_dd_dod])
+        lambda0 = MergedSelection("LooseLambda0",
+                                  RequiredSelections=[lambda0_ll, lambda0_dd])
+
+        #################################################################################
+        # Build Kst (LL only)
+        #################################################################################
+        tracks_cuts_Kst = tracks_cuts.replace("p+", "K+")
+        Kst_ll_dod = DataOnDemand(Location='Phys/StdVeryLooseDetachedKst2Kpi/Particles')
+        Kst_ll_cuts = lambda0_ll_cuts.replace("(ADMASS('Lambda0') < %(Lambda0LL_MassWindow)s*MeV)",
+                                              "(ADMASS('K*(892)0') < %(Kst_MassWindow)s*MeV)")
+        Kst_ll_code = (Kst_ll_cuts + " & " + tracks_cuts_Kst) % config
+        Kst_ll_filter = FilterDesktop(Code=Kst_ll_code)
+        Kst_ll = Selection("LooseKstLL",
+                           Algorithm=Kst_ll_filter,
+                           RequiredSelections=[Kst_ll_dod])
+        
+        #################################################################################
+        # Filter photons
+        #################################################################################
+        photons_noncnv_filter = FilterDesktop(Code="(PT > %(Photon_PT_Min)s*MeV) & (CL > %(Photon_CL_Min)s)" % config)
+        photons_noncnv = Selection("Photons_NonCnv",
+                                   Algorithm=photons_noncnv_filter,
+                                   RequiredSelections=[StdLooseAllPhotons])
+        photons_cnv_merged = MergedSelection("Photons_Cnv_Merge",
+                                             RequiredSelections=[StdAllLooseGammaDD,StdAllLooseGammaLL])
+        photons_cnv_code = """(HASVERTEX) &
+                              (MM < %(PhotonCnv_MM_Max)s*MeV) &
+                              (PT > %(PhotonCnv_PT_Min)s*MeV) &
+                              (VFASPF(VCHI2/VDOF)<%(PhotonCnv_VtxChi2_Max)s)""" % config
+        photons_cnv_filter = FilterDesktop(Code=photons_cnv_code % config)
+        photons_cnv = Selection("Photons_Cnv",
+                                Algorithm=photons_cnv_filter,
+                                RequiredSelections=[photons_cnv_merged])
+
+        #################################################################################
+        # Build Lambda_b
+        #################################################################################
+        ### With non-converted photons
+        # Lb2L0Gamma
+        lambda_b_combine = CombineParticles("Lambdab_NonConv_Combine")
+        lambda_b_combine.DecayDescriptor = "[Lambda_b0 -> Lambda0 gamma]cc"
+        lambda_b_combine.DaughtersCuts = {'Lambda0': 'ALL', 'gamma': 'ALL'}
+        lambda_b_combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'}
+        lambda_b_combCut = """(ADAMASS('Lambda_b0') < %(Lambdab_MassWindow)s*MeV) &
+                              (ASUM(PT) > %(Lambdab_SumPt_Min)s )"""  % config
+        lambda_b_mothCut = """(PT > %(Lambdab_Pt_Min)s*MeV) &
+                              (MTDOCACHI2(1) < %(Lambdab_MTDOCAChi2_Max)s)""" % config
+        lambda_b_combine.CombinationCut = lambda_b_combCut
+        lambda_b_combine.MotherCut = lambda_b_mothCut
+        lambda_b = Selection("Lambdab_NonConv_Sel",
+                             Algorithm=lambda_b_combine,
+                             RequiredSelections=[photons_noncnv, lambda0])
+
+        # B02KstGamma
+        b0_combine = CombineParticles("B0_Combine")
+        b0_combine.DecayDescriptor = "[B0 -> K*(892)0 gamma]cc"
+        b0_combine.DaughtersCuts = {'K*(892)0': 'ALL', 'gamma': 'ALL'}
+        b0_combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'}
+        b0_combine.CombinationCut = lambda_b_combCut.replace('Lambda_b0', 'B0')
+        b0_combine.MotherCut = lambda_b_mothCut
+        b0 = Selection("B0_Sel",
+                       Algorithm=b0_combine,
+                       RequiredSelections=[photons_noncnv, Kst_ll])
+
+        # Lb2L0Jpsi
+        lambda_b_jpsi_combine = CombineParticles("Lambdab_JPsi_Combine")
+        lambda_b_jpsi_combine.DecayDescriptor = "[Lambda_b0 -> Lambda0 J/psi(1S)]cc"
+        lambda_b_jpsi_combine.DaughtersCuts = {'Lambda0': 'ALL', 'J/psi(1S)': 'ALL'}
+        lambda_b_jpsi_combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'}
+        lambda_b_jpsi_combine.CombinationCut = lambda_b_combCut
+        lambda_b_jpsi_combine.MotherCut = lambda_b_mothCut
+        lambda_b_jpsi = Selection("Lambdab_Jpsi_Sel",
+                                  Algorithm=lambda_b_jpsi_combine,
+                                  RequiredSelections=[StdLooseJpsi2MuMu, lambda0])
+
+        # B02KstJpsi
+        b0_jpsi_combine = CombineParticles("B0_Jpsi_Combine")
+        b0_jpsi_combine.DecayDescriptor = "[B0 -> K*(892)0 J/psi(1S)]cc"
+        b0_jpsi_combine.DaughtersCuts = {'K*(892)0': 'ALL', 'J/psi(1S)': 'ALL'}
+        b0_jpsi_combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'}
+        b0_jpsi_combine.CombinationCut = lambda_b_combCut.replace('Lambda_b0', 'B0')
+        b0_jpsi_combine.MotherCut = lambda_b_mothCut
+        b0_jpsi = Selection("B0_Jpsi_Sel",
+                            Algorithm=b0_jpsi_combine,
+                            RequiredSelections=[StdLooseJpsi2MuMu, Kst_ll])
+
+        ### With converted photons
+        # Lb2L0Gamma
+        lambda_b_cnv_combine = CombineParticles("Lambdab_Conv_Combine")
+        lambda_b_cnv_combine.DecayDescriptor = "[Lambda_b0 -> Lambda0 gamma]cc"
+        lambda_b_cnv_combine.DaughtersCuts = {'Lambda0': 'ALL', 'gamma': 'ALL'}
+        lambda_b_cnv_combine.CombinationCut = "(ADAMASS('Lambda_b0') < 1.5*%(Lambdab_MassWindow)s*MeV)" % config
+        lambda_b_cnv_combine.MotherCut = """(HASVERTEX) & (VFASPF(VCHI2/VDOF)<%(Lambdab_VtxChi2_Max)s) &
+                                            (PT > %(Lambdab_Pt_Min)s*MeV) &
+                                            (BPVIPCHI2() < %(Lambdab_IPChi2_Max)s) &
+                                            (ADMASS('Lambda_b0') < %(Lambdab_MassWindow)s*MeV)""" % config
+                                            #(MTDOCACHI2(1) < %(Lambdab_MTDOCAChi2_Max)s) &
+        lambda_b_cnv = Selection("Lambdab_Conv_Sel",
+                                 Algorithm=lambda_b_cnv_combine,
+                                 RequiredSelections=[photons_cnv, lambda0])
+
+        #################################################################################
+        # Build lines
+        #################################################################################
+        children_Lb = {'L0': '[Lambda_b0 -> ^Lambda0 gamma]CC',
+                       'gamma': '[Lambda_b0 -> Lambda0 ^gamma]CC'}
+        self.line = StrippingLine("Lb2L0Gamma",
+                                  prescale=config["Lb2L0GammaPrescale"],
+                                  L0DU=l0,
+                                  HLT1=hlt1,
+                                  HLT2=hlt2,
+                                  checkPV=True,
+                                  RelatedInfoTools=[self.get_cone_relinfo(1.7, children=children_Lb),
+                                                    self.get_cone_relinfo(1.35, children=children_Lb),
+                                                    self.get_cone_relinfo(1.0, children=children_Lb),
+                                                    self.get_neutral_cone_relinfo(1.7, children=children_Lb),
+                                                    self.get_neutral_cone_relinfo(1.35, children=children_Lb),
+                                                    self.get_neutral_cone_relinfo(1.0, children=children_Lb),
+                                                    self.get_neutral_cone_relinfo(0.4, children=children_Lb),
+                                                   ],
+                                  MDSTFlag = False,
+                                  selection=lambda_b)
+        self.registerLine(self.line)
+
+        children_Bd = {'Kst': '[B0 -> ^K*(892)0 gamma]CC',
+                       'gamma': '[B0 -> K*(892)0 ^gamma]CC'}
+        self.line_b0 = StrippingLine("Lb2L0Gamma_Bd2KstGamma",
+                                     prescale=config["Bd2KstGammaPrescale"],
+                                     L0DU=l0,
+                                     HLT1=hlt1,
+                                     HLT2=hlt2,
+                                     checkPV=True,
+                                     RelatedInfoTools=[self.get_cone_relinfo(1.7, children=children_Bd),
+                                                       self.get_cone_relinfo(1.35, children=children_Bd),
+                                                       self.get_cone_relinfo(1.0, children=children_Bd),
+                                                       self.get_neutral_cone_relinfo(1.7, children=children_Bd),
+                                                       self.get_neutral_cone_relinfo(1.35, children=children_Bd),
+                                                       self.get_neutral_cone_relinfo(1.0, children=children_Bd),
+                                                       self.get_neutral_cone_relinfo(0.4, children=children_Bd),
+                                                       ],
+                                     MDSTFlag = False,
+                                     selection=b0)
+        self.registerLine(self.line_b0)
+
+        children_Lb_Jpsi = {'L0': '[Lambda_b0 -> ^Lambda0 J/psi(1S)]CC',
+                            'Jpsi': '[Lambda_b0 -> Lambda0 ^J/psi(1S)]CC'}
+        self.line_jpsi = StrippingLine("Lb2L0Gamma_Lb2L0Jpsi",
+                                       prescale=config["Lb2L0JpsiPrescale"],
+                                       L0DU=l0_jpsi,
+                                       HLT1=hlt1,
+                                       HLT2=hlt2,
+                                       checkPV=True,
+                                       RelatedInfoTools=[self.get_cone_relinfo(1.7, children=children_Lb_Jpsi),
+                                                         self.get_cone_relinfo(1.35, children=children_Lb_Jpsi),
+                                                         self.get_cone_relinfo(1.0, children=children_Lb_Jpsi),
+                                                         self.get_neutral_cone_relinfo(1.7, children=children_Lb_Jpsi),
+                                                         self.get_neutral_cone_relinfo(1.35, children=children_Lb_Jpsi),
+                                                         self.get_neutral_cone_relinfo(1.0, children=children_Lb_Jpsi),
+                                                         self.get_neutral_cone_relinfo(0.4, children=children_Lb_Jpsi),
+                                                         ],
+                                       RequiredRawEvents=[],
+                                       MDSTFlag = False,
+                                       selection=lambda_b_jpsi)
+        self.registerLine(self.line_jpsi)
+
+        children_B0_Jpsi = {'Kst': '[B0 -> ^K*(892)0 J/psi(1S)]CC',
+                           'Jpsi': '[B0 -> K*(892)0 ^J/psi(1S)]CC'}
+        self.line_b0_jpsi = StrippingLine("Lb2L0Gamma_Bd2KstJpsi",
+                                         prescale=config["Bd2KstJpsiPrescale"],
+                                         L0DU=l0_jpsi,
+                                         HLT1=hlt1,
+                                         HLT2=hlt2,
+                                         checkPV=True,
+                                         RelatedInfoTools=[self.get_cone_relinfo(1.7, children=children_B0_Jpsi),
+                                                           self.get_cone_relinfo(1.35, children=children_B0_Jpsi),
+                                                           self.get_cone_relinfo(1.0, children=children_B0_Jpsi),
+                                                           self.get_neutral_cone_relinfo(1.7, children=children_B0_Jpsi),
+                                                           self.get_neutral_cone_relinfo(1.35, children=children_B0_Jpsi),
+                                                           self.get_neutral_cone_relinfo(1.0, children=children_B0_Jpsi),
+                                                           self.get_neutral_cone_relinfo(0.4, children=children_B0_Jpsi),
+                                                           ],
+                                         RequiredRawEvents=[], 
+                                         MDSTFlag = False,
+                                         selection=b0_jpsi)
+        self.registerLine(self.line_b0_jpsi)
+
+        self.line_cnv = StrippingLine("Lb2L0GammaConverted",
+                                      prescale=config["Lb2L0GammaPrescale"],
+                                      L0DU=l0_conv,
+                                      HLT1=hlt1,
+                                      HLT2=hlt2,
+                                      checkPV=True,
+                                      RelatedInfoTools=[self.get_cone_relinfo(1.7, lambda_b_cnv, children_Lb),
+                                                        self.get_cone_relinfo(1.35, lambda_b_cnv, children_Lb),
+                                                        self.get_cone_relinfo(1.0, lambda_b_cnv, children_Lb),
+                                                        self.get_neutral_cone_relinfo(1.7, children=children_Lb),
+                                                        self.get_neutral_cone_relinfo(1.35, children=children_Lb),
+                                                        self.get_neutral_cone_relinfo(1.0, children=children_Lb),
+                                                        self.get_neutral_cone_relinfo(0.4, children=children_Lb),
+                                                        self.get_vtxisol_relinfo(lambda_b_cnv),
+                                                        self.get_vtxisol_radiative_relinfo(lambda_b_cnv)
+                                                        ],
+                                      MDSTFlag = False,
+                                      selection=lambda_b_cnv)
+        self.registerLine(self.line_cnv)
+
+
+    @staticmethod
+    def get_cone_relinfo(angle, head=None, children=None):
+        tool = {'Type'     : 'RelInfoConeVariables',
+                'ConeAngle': angle,
+                'Variables': ['CONEANGLE', 'CONEMULT', 'CONEP', 'CONEPASYM', 'CONEPT', 'CONEPTASYM']}
+        # Some shortcuts
+        base_location = 'ConeVarsInfo/%%s/%s' % angle
+        # Head
+        if head:
+            tool.update({'Location'    : base_location % 'Lb',
+                         'TopSelection': head})
+        if children:
+            tool.update({'DaughterLocations': dict([(sel_string, base_location % name)
+                                                    for name, sel_string in children.items()])})
+        return tool
+
+    @staticmethod
+    def get_neutral_cone_relinfo(size, head=None, children=None):
+        tool = {'Type'       : 'RelInfoConeIsolation',
+                'FillCharged': False,
+                'ConeSize'   : size}
+    # Some shortcuts
+        base_location = 'NeutralConeVarsInfo/%%s/%s' % size
+    # Head
+        if head:
+            tool.update({'Location'    : base_location % 'Lb',
+                         'TopSelection': head})
+        if children:
+            tool.update({'DaughterLocations': dict([(sel_string, base_location % name)
+                                                    for name, sel_string in children.items()])})
+        return tool
+
+
+    @staticmethod
+    def get_vtxisol_relinfo(selection):
+        return {'Type'        : 'RelInfoVertexIsolation',
+                'Variables'   : ['VTXISONUMVTX',
+                                 'VTXISODCHI2ONETRACK', 'VTXISODCHI2MASSONETRACK',
+                                 'VTXISODCHI2TWOTRACK', 'VTXISODCHI2MASSTWOTRACK'],
+                'Location'    : 'VertexIsolInfo',
+                'TopSelection': selection}
+
+    @staticmethod
+    def get_vtxisol_radiative_relinfo(selection):
+        return {'Type'        : 'RelInfoVertexIsolationRadiative',
+                'Variables'   : ['NEWVTXISONUMVTX','NEWVTXISOTRKRELD0',
+                                 'NEWVTXISOTRKDCHI2','NEWVTXISODCHI2MASS'],
+                'Location'    : 'VertexIsolInfoRadiative',
+                'TopSelection': selection}
+    
+# EOF
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLc23MuLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLc23MuLines.py
new file mode 100644
index 000000000..423647f9e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingLc23MuLines.py
@@ -0,0 +1,1708 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Module for construction of Lambda_c -> mu ll lines
+Lc-> pemu and Lc->p pi0 ll lines added by Jolanta Brodzicka in Jan-2019
+Sigma_c tagged lines added by Jolanta Brodzicka in Jan-2019
+
+Performance (with prescaling);
+
+Full.dst:
+#########
+
+StrippingReport                                                INFO Event 1000000, Good event 1000000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |_StrippingGlobal_                                            |  0.0242|       242|       |   9.439|
+ |!StrippingLc23MuLc23muLine_TIMING                            |  0.0056|        56|  1.071|   0.056|
+ |!StrippingLc23MuLc2mueeLine_TIMING                           |  0.0041|        41|  1.073|   0.067|
+ |!StrippingLc23MuLc2pmumuLine_TIMING                          |  0.0036|        36|  1.028|   0.102|
+ |!StrippingLc23MuLc2peeLine_TIMING                            |  0.0075|        75|  1.027|   0.109|
+ |!StrippingLc23MuLc2pKpiLine_TIMING                           |  0.0019|        19|  1.158|   0.025|
+              
+MC: Lc -> 3mu (25113002)
+########################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingLc23MuLc23muLine                                   |  2.0770|      2077|  1.025|   5.726|                 
+
+MC: Lc -> p+ mu+ mu- (25113000)
+###############################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingLc23MuLc2pmumuLine                                 |  1.0300|      1030|  1.042|   1.736|
+     
+
+MC: Lc -> p~- mu+ mu+ (25113001)
+################################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingLc23MuLc2pmumuLine                                 |  0.9420|       942|  1.041|   1.720| 
+
+MC: Lc -> p+ K- pi+ (25103000)
+##############################
+StrippingReport                                                INFO Event 100000, Good event 100000
+ |                                              *Decision name*|*Rate,%*|*Accepted*| *Mult*|*ms/evt*|
+ |!StrippingLc23MuLc2pKpiLine                                  |  0.0080|         8|  1.000|   0.061|              
+
+Exported symbols (use python help!):
+   - 
+"""
+
+__author__ = ["Oliver Gruenberg, Jolanta Brodzicka"]
+__date__ = "15.01.2019"
+__version__ = "$Revision: 2.0 $"
+
+###################################################################################################
+
+__all__ = ( "Lc23MuLinesConf",
+            "config_default", )
+
+###################################################################################################
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays, DaVinci__N4BodyDecays 
+#from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays 
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.PhysicalConstants import c_light
+
+###################################################################################################
+
+default_config = {
+    "NAME"        : "Lc23Mu",
+    "WGs"         : [ "RD" ],
+    "STREAMS"     : [ "Leptonic" ],
+    "BUILDERTYPE" : "Lc23MuLinesConf",
+    "CONFIG"      : {
+    "MDSTflag"            : False, # True or False
+    # TrackCuts
+    "MinTrPT"             : 300, # (MeV)
+    "MinTrIPChi2"         : 9,
+    "MaxTrChi2Dof"        : 4.0,
+    "MaxTrGhp"            : 0.4,
+    # Pi0Cuts
+    "MinPi0R_PT"          : 300, #200, # (MeV) #StdLooseResolvedPi0 PT>200MeV
+    "MinPi0M_PT"          : 500, # (MeV) #StdLooseMergedPi0 (start at PT>2GeV really)
+    "Pi0R_DMASS"          : 25,  #30,  # (MeV) #StdLooseResolvedPi0 30MeV
+    "Pi0M_DMASS"          : 60,  # (MeV) #StdLooseMergedPi0 60MeV
+    "MinPhotonCL"         : 0.2, #0.1, 
+    # CombinationCuts
+    "MaxDoca"             : 0.3, # (mm)
+    "MaxDocaChi2"         : 10., # for Pi0-track distance
+    "mDiffLcVeryLoose"    : 500, # (MeV) #for 4-body [expected 5(8)times worse resol wrt 3-body w/ added Pi0R(M)]
+    "mDiffLcLoose"        : 350, # (MeV) #200->350 #min needed:(-100,+100) pmumu, (-300,+200) pemu, (-350,+250) pee
+    "mDiffLcTight"        : 150, # (MeV) #for pKpi
+    # MotherCuts
+    "MaxVtxChi2"          : 15,
+    "MinVD"               : 70, # (micrometer)
+    "MaxIPChi2"           : 100,
+    "MinBPVDira"          : 0.999, #0.9, #for 4-body
+    #Sigmac MotherCuts
+    "Sigmac_AMDiff_MAX"   : 400,#(MeV) #PDG 167 for Sc(2455); 232 for Sc(2520) full-width~15MeV min cut:232+5*8+50~330
+    "Sigmac_VCHI2VDOF_MAX": 30.,
+    # scalings
+    "Postscale"           : 1,
+    "Lc23muPrescale"      : 1,
+    "Lc2mueePrescale"     : 1,
+    "Lc2pmumuPrescale"    : 1,
+    "Lc2peePrescale"      : 1,        
+    "Lc2pemuPrescale"     : 1,        
+    "Lc2pKpiPrescale"     : 0.01,
+#
+    "Lc2pmumupi0RPrescale": 1,
+    "Lc2pmumupi0MPrescale": 1,
+    "Lc2peepi0RPrescale"  : 1,
+    "Lc2peepi0MPrescale"  : 1,
+    "Lc2pemupi0RPrescale" : 1,
+    "Lc2pemupi0MPrescale" : 1,
+    "Lc2pKpipi0RPrescale" : 0.01,
+    "Lc2pKpipi0MPrescale" : 0.1,
+#
+    "SigmaczSignalPrescale"  : 1,
+    "SigmacppSignalPrescale" : 1,
+    "SigmaczRefPrescale"     : 0.01,
+    "SigmacppRefPrescale"    : 0.01,
+    "SigmaczRefPi0MPrescale" : 0.1,
+    "SigmacppRefPi0MPrescale": 0.1,
+    "CommonRelInfoTools"  : [ { "Type": "RelInfoVertexIsolation", "Location":"VtxIsoInfo" },
+                              { "Type": "RelInfoVertexIsolationBDT", "Location":"VtxIsoInfoBDT" },
+                              { "Type" : "RelInfoBs2MuMuBIsolations",
+                                "Variables" : [],
+                                "Location"  : "BsMuMuBIsolation",
+                                "tracktype" : 3,
+                                "makeTrackCuts" : False, },
+                              ] # closes CommonRelInfoTools    
+    } # closes CONFIG
+    } # closes default_config
+
+class Lc23MuLinesConf(LineBuilder) :
+    """
+    Builder
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name = "Lc23mu", config = default_config) :
+
+        LineBuilder.__init__(self, name, config)
+
+
+#######################################################################################################        
+
+        self.TrackCuts = """
+                         (PT > %(MinTrPT)s*MeV)
+                         & (BPVIPCHI2() > %(MinTrIPChi2)s)
+                         & (TRCHI2DOF < %(MaxTrChi2Dof)s)
+                         & (TRGHP < %(MaxTrGhp)s)
+                         """ %config
+
+        self.Pi0RCuts = """
+                        (PT > %(MinPi0R_PT)s*MeV) 
+                        & (M > 135 - %(Pi0R_DMASS)s *MeV) & (M < 135 + %(Pi0R_DMASS)s *MeV)
+                        & ( CHILDCUT( (CL > %(MinPhotonCL)s) ,1) )
+                        & ( CHILDCUT( (CL > %(MinPhotonCL)s) ,2) )
+                        """ %config 
+
+        self.Pi0MCuts = """
+                        ( PT > %(MinPi0M_PT)s*MeV )
+                        & (M > 135 - %(Pi0M_DMASS)s *MeV) & (M < 135 + %(Pi0M_DMASS)s *MeV)
+                        """ %config 
+
+        self.Combination12Cuts = "(ADOCA(1,2) < %(MaxDoca)s*mm)" %config
+
+        self.CombinationCutsLoose = """
+                                 (ADAMASS('Lambda_c+') < %(mDiffLcLoose)s*MeV)
+                                 & (ADOCA(1,3) < %(MaxDoca)s*mm)
+                                 & (ADOCA(2,3) < %(MaxDoca)s*mm)
+                                 """ %config
+        
+
+        self.CombinationCutsTight = """
+                                 (ADAMASS('Lambda_c+') < %(mDiffLcTight)s*MeV)
+                                 & (ADOCA(1,3) < %(MaxDoca)s*mm)
+                                 & (ADOCA(2,3) < %(MaxDoca)s*mm)
+                                 """ %config
+
+        self.MotherCuts = """
+                          ( VFASPF(VCHI2) < %(MaxVtxChi2)s )
+                          & ( (BPVLTIME()*c_light) > %(MinVD)s*micrometer )                         
+                          & ( BPVIPCHI2() < %(MaxIPChi2)s )
+                          """ %config
+
+#
+        self.Combination123Cuts = """
+                                 (ADOCA(1,3) < %(MaxDoca)s*mm)
+                                 & (ADOCA(2,3) < %(MaxDoca)s*mm)
+                                  """ %config
+
+        self.Combination4BodyCutsLoose = """
+                                 (ADAMASS('Lambda_c+') < %(mDiffLcVeryLoose)s*MeV)
+                                 & (ACHI2DOCA(1,4) < %(MaxDocaChi2)s)
+                                 & (ACHI2DOCA(2,4) < %(MaxDocaChi2)s)
+                                 & (ACHI2DOCA(3,4) < %(MaxDocaChi2)s)
+                                 """ %config
+
+        self.Mother4BodyCuts = """
+                          ( VFASPF(VCHI2) < %(MaxVtxChi2)s )
+                          & ( (BPVLTIME()*c_light) > %(MinVD)s*micrometer )                         
+                          & ( BPVIPCHI2() < %(MaxIPChi2)s )
+                          & ( BPVDIRA > %(MinBPVDira)s )
+                          """ %config 
+      
+#tagged
+        self.SigmacCombinationCuts = """
+                          ( (AM - AM1) < %(Sigmac_AMDiff_MAX)s*MeV )
+                          """ %config 
+
+        self.SigmacMotherCuts = """
+                          ( VFASPF(VCHI2/VDOF) < %(Sigmac_VCHI2VDOF_MAX)s )
+                          """ %config 
+                   
+#######################################################################################################
+        # Decay descriptors for tagged lines
+        Sigmacz2LambdacPi  = ['[Sigma_c0 -> Lambda_c+ pi-]cc']
+        Sigmacpp2LambdacPi = ['[Sigma_c++ -> Lambda_c+ pi+]cc']
+
+        # Names       
+        Lc23mu_name   = name+"Lc23mu"
+        Lc2muee_name  = name+"Lc2muee"
+        Lc2pmumu_name = name+"Lc2pmumu"
+        Lc2pee_name   = name+"Lc2pee"
+        Lc2pemu_name  = name+"Lc2pemu"
+        Lc2pKpi_name  = name+"Lc2pKpi"
+#
+        Lc2pmumupi0R_name = name+"Lc2pmumupi0R"
+        Lc2pmumupi0M_name = name+"Lc2pmumupi0M"
+        Lc2peepi0R_name = name+"Lc2peepi0R"
+        Lc2peepi0M_name = name+"Lc2peepi0M"
+        Lc2pemupi0R_name = name+"Lc2pemupi0R"
+        Lc2pemupi0M_name = name+"Lc2pemupi0M"
+        Lc2pKpipi0R_name  = name+"Lc2pKpipi0R"
+        Lc2pKpipi0M_name  = name+"Lc2pKpipi0M"
+#
+        SigmaczLc2pmumu_name = name+"SigmaczLc2pmumu"
+        SigmacppLc2pmumu_name = name+"SigmacppLc2pmumu"
+        SigmaczLc2pee_name = name+"SigmaczLc2pee"
+        SigmacppLc2pee_name = name+"SigmacppLc2pee"
+        SigmaczLc2pemu_name = name+"SigmaczLc2pemu"
+        SigmacppLc2pemu_name = name+"SigmacppLc2pemu"
+        SigmaczLc2pKpi_name = name+"SigmaczLc2pKpi"
+        SigmacppLc2pKpi_name = name+"SigmacppLc2pKpi"
+# 
+        SigmaczLc2pmumupi0R_name = name+"SigmaczLc2pmumupi0R"
+        SigmacppLc2pmumupi0R_name = name+"SigmacppLc2pmumupi0R"
+        SigmaczLc2pmumupi0M_name = name+"SigmaczLc2pmumupi0M"
+        SigmacppLc2pmumupi0M_name = name+"SigmacppLc2pmumupi0M"
+
+        SigmaczLc2peepi0R_name = name+"SigmaczLc2peepi0R"
+        SigmacppLc2peepi0R_name = name+"SigmacppLc2peepi0R"
+        SigmaczLc2peepi0M_name = name+"SigmaczLc2peepi0M"
+        SigmacppLc2peepi0M_name = name+"SigmacppLc2peepi0M"
+
+        SigmaczLc2pemupi0R_name = name+"SigmaczLc2pemupi0R"
+        SigmacppLc2pemupi0R_name = name+"SigmacppLc2pemupi0R"
+        SigmaczLc2pemupi0M_name = name+"SigmaczLc2pemupi0M"
+        SigmacppLc2pemupi0M_name = name+"SigmacppLc2pemupi0M"
+
+        SigmaczLc2pKpipi0R_name = name+"SigmaczLc2pKpipi0R"
+        SigmacppLc2pKpipi0R_name = name+"SigmacppLc2pKpipi0R"
+        SigmaczLc2pKpipi0M_name = name+"SigmaczLc2pKpipi0M"
+        SigmacppLc2pKpipi0M_name = name+"SigmacppLc2pKpipi0M"
+
+
+
+        self.selLc23mu    = self.makeLc23mu(Lc23mu_name)
+        self.selLc2muee   = self.makeLc2muee(Lc2muee_name)
+        self.selLc2pmumu  = self.makeLc2pmumu(Lc2pmumu_name)
+        self.selLc2pee    = self.makeLc2pee(Lc2pee_name)
+        self.selLc2pemu   = self.makeLc2pemu(Lc2pemu_name)
+        self.selLc2pKpi   = self.makeLc2pKpi(Lc2pKpi_name)        
+#4-body
+        self.selLc2pmumupi0R  = self.makeLc2pmumupi0R(Lc2pmumupi0R_name)
+        self.selLc2pmumupi0M  = self.makeLc2pmumupi0M(Lc2pmumupi0M_name)
+        self.selLc2peepi0R    = self.makeLc2peepi0R(Lc2peepi0R_name)
+        self.selLc2peepi0M    = self.makeLc2peepi0M(Lc2peepi0M_name)
+        self.selLc2pemupi0R   = self.makeLc2pemupi0R(Lc2pemupi0R_name)
+        self.selLc2pemupi0M   = self.makeLc2pemupi0M(Lc2pemupi0M_name)
+        self.selLc2pKpipi0R   = self.makeLc2pKpipi0R(Lc2pKpipi0R_name)        
+        self.selLc2pKpipi0M   = self.makeLc2pKpipi0M(Lc2pKpipi0M_name)        
+
+#tagged
+        self.selSigmaczLc2pmumu = self.makeSigmac2Lcpi(SigmaczLc2pmumu_name,
+             inputSel=self.selLc2pmumu,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2pmumu = self.makeSigmac2Lcpi(SigmacppLc2pmumu_name,
+             inputSel=self.selLc2pmumu,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+        self.selSigmaczLc2pee = self.makeSigmac2Lcpi(SigmaczLc2pee_name,
+             inputSel=self.selLc2pee,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2pee = self.makeSigmac2Lcpi(SigmacppLc2pee_name,
+             inputSel=self.selLc2pee,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+        self.selSigmaczLc2pemu = self.makeSigmac2Lcpi(SigmaczLc2pemu_name,
+             inputSel=self.selLc2pemu,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2pemu = self.makeSigmac2Lcpi(SigmacppLc2pemu_name,
+             inputSel=self.selLc2pemu,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+        self.selSigmaczLc2pKpi = self.makeSigmac2Lcpi(SigmaczLc2pKpi_name,
+             inputSel=self.selLc2pKpi,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2pKpi = self.makeSigmac2Lcpi(SigmacppLc2pKpi_name,
+             inputSel=self.selLc2pKpi,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+#tagged 4-body
+        self.selSigmaczLc2pmumupi0R = self.makeSigmac2Lcpi(SigmaczLc2pmumupi0R_name,
+             inputSel=self.selLc2pmumupi0R,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2pmumupi0R = self.makeSigmac2Lcpi(SigmacppLc2pmumupi0R_name,
+             inputSel=self.selLc2pmumupi0R,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+        self.selSigmaczLc2pmumupi0M = self.makeSigmac2Lcpi(SigmaczLc2pmumupi0M_name,
+             inputSel=self.selLc2pmumupi0M,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2pmumupi0M = self.makeSigmac2Lcpi(SigmacppLc2pmumupi0M_name,
+             inputSel=self.selLc2pmumupi0M,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+#
+        self.selSigmaczLc2peepi0R = self.makeSigmac2Lcpi(SigmaczLc2peepi0R_name,
+             inputSel=self.selLc2peepi0R,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2peepi0R = self.makeSigmac2Lcpi(SigmacppLc2peepi0R_name,
+             inputSel=self.selLc2peepi0R,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+        self.selSigmaczLc2peepi0M = self.makeSigmac2Lcpi(SigmaczLc2peepi0M_name,
+             inputSel=self.selLc2peepi0M,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2peepi0M = self.makeSigmac2Lcpi(SigmacppLc2peepi0M_name,
+             inputSel=self.selLc2peepi0M,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+#
+        self.selSigmaczLc2pemupi0R = self.makeSigmac2Lcpi(SigmaczLc2pemupi0R_name,
+             inputSel=self.selLc2pemupi0R,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2pemupi0R = self.makeSigmac2Lcpi(SigmacppLc2pemupi0R_name,
+             inputSel=self.selLc2pemupi0R,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+        self.selSigmaczLc2pemupi0M = self.makeSigmac2Lcpi(SigmaczLc2pemupi0M_name,
+             inputSel=self.selLc2pemupi0M,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2pemupi0M = self.makeSigmac2Lcpi(SigmacppLc2pemupi0M_name,
+             inputSel=self.selLc2pemupi0M,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+#
+        self.selSigmaczLc2pKpipi0R = self.makeSigmac2Lcpi(SigmaczLc2pKpipi0R_name,
+             inputSel=self.selLc2pKpipi0R,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2pKpipi0R = self.makeSigmac2Lcpi(SigmacppLc2pKpipi0R_name,
+             inputSel=self.selLc2pKpipi0R,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+        self.selSigmaczLc2pKpipi0M = self.makeSigmac2Lcpi(SigmaczLc2pKpipi0M_name,
+             inputSel=self.selLc2pKpipi0M,
+             decDescriptors=Sigmacz2LambdacPi
+        )
+        self.selSigmacppLc2pKpipi0M = self.makeSigmac2Lcpi(SigmacppLc2pKpipi0M_name,
+             inputSel=self.selLc2pKpipi0M,
+             decDescriptors=Sigmacpp2LambdacPi
+        )
+
+
+#######################################################################################################        
+
+        self.Lc23mu_Line = StrippingLine(Lc23mu_name+"Line",
+                                         prescale = config["Lc23muPrescale"],
+                                         postscale = config["Postscale"],
+                                         MDSTFlag = config["MDSTflag"],
+                                         selection = self.selLc23mu,
+                                         RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^mu+  mu+  l]CC"  : "ConeIso05mu1",
+                                             "[Lambda_c+ ->  mu+ ^mu+  l]CC"  : "ConeIso05mu2",
+                                             "[Lambda_c+ ->  mu+  mu+ ^l]CC"  : "ConeIso05mu3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^mu+  mu+  l]CC"  : "ConeIso10mu1",
+                                             "[Lambda_c+ ->  mu+ ^mu+  l]CC"  : "ConeIso10mu2",
+                                             "[Lambda_c+ ->  mu+  mu+ ^l]CC"  : "ConeIso10mu3",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^mu+  mu+  l]CC"  : "ConeIso15mu1",
+                                             "[Lambda_c+ ->  mu+ ^mu+  l]CC"  : "ConeIso15mu2",
+                                             "[Lambda_c+ ->  mu+  mu+ ^l]CC"  : "ConeIso15mu3",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^mu+  mu+  l]CC"  : "TrackIsoBDTmu1",
+                                             "[Lambda_c+ ->  mu+ ^mu+  l]CC"  : "TrackIsoBDTmu2",
+                                             "[Lambda_c+ ->  mu+  mu+ ^l]CC"  : "TrackIsoBDTmu3",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^mu+  mu+  l]CC"  : "BsMuMuTrackIsomu1",
+                                             "[Lambda_c+ ->  mu+ ^mu+  l]CC"  : "BsMuMuTrackIsomu2",
+                                             "[Lambda_c+ ->  mu+  mu+ ^l]CC"  : "BsMuMuTrackIsomu3",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+                                         
+
+
+        self.Lc2muee_Line = StrippingLine(Lc2muee_name+"Line",
+                                          prescale = config["Lc2mueePrescale"],
+                                          postscale = config["Postscale"],
+                                          MDSTFlag = config["MDSTflag"],
+                                          selection = self.selLc2muee,
+                                          RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^l  l  l]CC"  : "ConeIso05mu",
+                                             "[Lambda_c+ ->  l ^l  l]CC"  : "ConeIso05e1",
+                                             "[Lambda_c+ ->  l  l ^l]CC"  : "ConeIso05e2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^l  l  l]CC"  : "ConeIso10mu",
+                                             "[Lambda_c+ ->  l ^l  l]CC"  : "ConeIso10e1",
+                                             "[Lambda_c+ ->  l  l ^l]CC"  : "ConeIso10e2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^l  l  l]CC"  : "ConeIso15mu",
+                                             "[Lambda_c+ ->  l ^l  l]CC"  : "ConeIso15e1",
+                                             "[Lambda_c+ ->  l  l ^l]CC"  : "ConeIso15e2",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^l  l  l]CC"  : "TrackIsoBDTmu",
+                                             "[Lambda_c+ ->  l ^l  l]CC"  : "TrackIsoBDTe1",
+                                             "[Lambda_c+ ->  l  l ^l]CC"  : "TrackIsoBDTe2",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^l  l  l]CC"  : "BsMuMuTrackIsomu",
+                                             "[Lambda_c+ ->  l ^l  l]CC"  : "BsMuMuTrackIsoe1",
+                                             "[Lambda_c+ ->  l  l ^l]CC"  : "BsMuMuTrackIsoe2",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                         ) # closes Strippingline
+
+
+        self.Lc2pmumu_Line = StrippingLine(Lc2pmumu_name+"Line",
+                                           prescale = config["Lc2pmumuPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selLc2pmumu,
+                                           RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "ConeIso05mu1",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "ConeIso05mu2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "ConeIso10mu1",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "ConeIso10mu2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "ConeIso15mu1",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "ConeIso15mu2",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "TrackIsoBDTmu1",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "TrackIsoBDTmu2",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "BsMuMuTrackIsomu1",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "BsMuMuTrackIsomu2",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+        self.Lc2pee_Line = StrippingLine(Lc2pee_name+"Line",
+                                         prescale = config["Lc2peePrescale"],
+                                         postscale = config["Postscale"],
+                                         MDSTFlag = config["MDSTflag"],
+                                         selection = self.selLc2pee,
+                                         RelatedInfoTools = [
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "ConeIso05e1",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "ConeIso05e2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "ConeIso10e1",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "ConeIso10e2",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "ConeIso15e1",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "ConeIso15e2",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "TrackIsoBDTe1",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "TrackIsoBDTe2",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "BsMuMuTrackIsoe1",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "BsMuMuTrackIsoe2",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline                                          
+
+        self.Lc2pKpi_Line = StrippingLine(Lc2pKpi_name+"Line",
+                                          prescale = config["Lc2pKpiPrescale"],
+                                          postscale = config["Postscale"],
+                                          MDSTFlag = config["MDSTflag"],
+                                          selection = self.selLc2pKpi,
+                                          RelatedInfoTools = [
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+]CC"  : "ConeIso05K",
+                                             "[Lambda_c+ ->  p+  K- ^pi+]CC"  : "ConeIso05pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+]CC"  : "ConeIso10K",
+                                             "[Lambda_c+ ->  p+  K- ^pi+]CC"  : "ConeIso10pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+]CC"  : "ConeIso15K",
+                                             "[Lambda_c+ ->  p+  K- ^pi+]CC"  : "ConeIso15pi",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+]CC"  : "TrackIsoBDTK",
+                                             "[Lambda_c+ ->  p+  K- ^pi+]CC"  : "TrackIsoBDTpi",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+]CC"  : "BsMuMuTrackIsoK",
+                                             "[Lambda_c+ ->  p+  K- ^pi+]CC"  : "BsMuMuTrackIsopi",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+        self.Lc2pemu_Line = StrippingLine(Lc2pemu_name+"Line",
+                                         prescale = config["Lc2pemuPrescale"],
+                                         postscale = config["Postscale"],
+                                         MDSTFlag = config["MDSTflag"],
+                                         selection = self.selLc2pemu,
+                                         RelatedInfoTools = [
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "ConeIso05e",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "ConeIso05mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "ConeIso10e",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "ConeIso10mu",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "ConeIso15e",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "ConeIso15mu",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "TrackIsoBDTe",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "TrackIsoBDTmu",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  X ^l  l]CC"  : "BsMuMuTrackIsoe",
+                                             "[Lambda_c+ ->  X  l ^l]CC"  : "BsMuMuTrackIsomu",
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline                                          
+
+##4-bodies##
+        self.Lc2pmumupi0R_Line = StrippingLine(Lc2pmumupi0R_name+"Line",
+                                           prescale = config["Lc2pmumupi0RPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selLc2pmumupi0R,
+                                           RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  mu+  mu-  pi0]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  p+ ^mu+  mu-  pi0]CC"  : "ConeIso05mu1",
+                                             "[Lambda_c+ ->  p+  mu+ ^mu-  pi0]CC"  : "ConeIso05mu2",
+                                             "[Lambda_c+ ->  p+  mu+  mu- ^pi0]CC"  : "ConeIso05pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  mu+  mu-  pi0]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  p+ ^mu+  mu-  pi0]CC"  : "ConeIso10mu1",
+                                             "[Lambda_c+ ->  p+  mu+ ^mu-  pi0]CC"  : "ConeIso10mu2",
+                                             "[Lambda_c+ ->  p+  mu+  mu- ^pi0]CC"  : "ConeIso10pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  mu+  mu-  pi0]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  p+ ^mu+  mu-  pi0]CC"  : "ConeIso15mu1",
+                                             "[Lambda_c+ ->  p+  mu+ ^mu-  pi0]CC"  : "ConeIso15mu2",
+                                             "[Lambda_c+ ->  p+  mu+  mu- ^pi0]CC"  : "ConeIso15pi",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  mu+  mu-  pi0]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  p+ ^mu+  mu-  pi0]CC"  : "TrackIsoBDTmu1",
+                                             "[Lambda_c+ ->  p+  mu+ ^mu-  pi0]CC"  : "TrackIsoBDTmu2",
+                                             #"[Lambda_c+ ->  p+  mu+  mu- ^pi0]CC"  : "TrackIsoBDTpi", #?
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  mu+  mu-  pi0]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  p+ ^mu+  mu-  pi0]CC"  : "BsMuMuTrackIsomu1",
+                                             "[Lambda_c+ ->  p+  mu+ ^mu-  pi0]CC"  : "BsMuMuTrackIsomu2",
+                                             #"[Lambda_c+ ->  p+  mu+  mu- ^pi0]CC"  : "BsMuMuTrackIsopi", #?
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+
+        self.Lc2pmumupi0M_Line = StrippingLine(Lc2pmumupi0M_name+"Line",
+                                           prescale = config["Lc2pmumupi0MPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selLc2pmumupi0M,
+                                           RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  mu+  mu-  pi0]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  p+ ^mu+  mu-  pi0]CC"  : "ConeIso05mu1",
+                                             "[Lambda_c+ ->  p+  mu+ ^mu-  pi0]CC"  : "ConeIso05mu2",
+                                             "[Lambda_c+ ->  p+  mu+  mu- ^pi0]CC"  : "ConeIso05pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  mu+  mu-  pi0]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  p+ ^mu+  mu-  pi0]CC"  : "ConeIso10mu1",
+                                             "[Lambda_c+ ->  p+  mu+ ^mu-  pi0]CC"  : "ConeIso10mu2",
+                                             "[Lambda_c+ ->  p+  mu+  mu- ^pi0]CC"  : "ConeIso10pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  mu+  mu-  pi0]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  p+ ^mu+  mu-  pi0]CC"  : "ConeIso15mu1",
+                                             "[Lambda_c+ ->  p+  mu+ ^mu-  pi0]CC"  : "ConeIso15mu2",
+                                             "[Lambda_c+ ->  p+  mu+  mu- ^pi0]CC"  : "ConeIso15pi",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  mu+  mu-  pi0]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  p+ ^mu+  mu-  pi0]CC"  : "TrackIsoBDTmu1",
+                                             "[Lambda_c+ ->  p+  mu+ ^mu-  pi0]CC"  : "TrackIsoBDTmu2",
+                                             #"[Lambda_c+ ->  p+  mu+  mu- ^pi0]CC"  : "TrackIsoBDTpi", #?
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  mu+  mu-  pi0]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  p+ ^mu+  mu-  pi0]CC"  : "BsMuMuTrackIsomu1",
+                                             "[Lambda_c+ ->  p+  mu+ ^mu-  pi0]CC"  : "BsMuMuTrackIsomu2",
+                                             #"[Lambda_c+ ->  p+  mu+  mu- ^pi0]CC"  : "BsMuMuTrackIsopi", #?
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+        self.Lc2peepi0R_Line = StrippingLine(Lc2peepi0R_name+"Line",
+                                           prescale = config["Lc2peepi0RPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selLc2peepi0R,
+                                           RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  e+  e-  pi0]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  p+ ^e+  e-  pi0]CC"  : "ConeIso05e1",
+                                             "[Lambda_c+ ->  p+  e+ ^e-  pi0]CC"  : "ConeIso05e2",
+                                             "[Lambda_c+ ->  p+  e+  e- ^pi0]CC"  : "ConeIso05pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  e+  e-  pi0]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  p+ ^e+  e-  pi0]CC"  : "ConeIso10e1",
+                                             "[Lambda_c+ ->  p+  e+ ^e-  pi0]CC"  : "ConeIso10e2",
+                                             "[Lambda_c+ ->  p+  e+  e- ^pi0]CC"  : "ConeIso10pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  e+  e-  pi0]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  p+ ^e+  e-  pi0]CC"  : "ConeIso15e1",
+                                             "[Lambda_c+ ->  p+  e+ ^e-  pi0]CC"  : "ConeIso15e2",
+                                             "[Lambda_c+ ->  p+  e+  e- ^pi0]CC"  : "ConeIso15pi",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  e+  e-  pi0]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  p+ ^e+  e-  pi0]CC"  : "TrackIsoBDTe1",
+                                             "[Lambda_c+ ->  p+  e+ ^e-  pi0]CC"  : "TrackIsoBDTe2",
+                                             #"[Lambda_c+ ->  p+  e+  e- ^pi0]CC"  : "TrackIsoBDTpi", #?
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  e+  e-  pi0]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  p+ ^e+  e-  pi0]CC"  : "BsMuMuTrackIsoe1",
+                                             "[Lambda_c+ ->  p+  e+ ^e-  pi0]CC"  : "BsMuMuTrackIsoe2",
+                                             #"[Lambda_c+ ->  p+  e+  e- ^pi0]CC"  : "BsMuMuTrackIsopi", #?
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+
+        self.Lc2peepi0M_Line = StrippingLine(Lc2peepi0M_name+"Line",
+                                           prescale = config["Lc2peepi0MPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selLc2peepi0M,
+                                           RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  e+  e-  pi0]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  p+ ^e+  e-  pi0]CC"  : "ConeIso05e1",
+                                             "[Lambda_c+ ->  p+  e+ ^e-  pi0]CC"  : "ConeIso05e2",
+                                             "[Lambda_c+ ->  p+  e+  e- ^pi0]CC"  : "ConeIso05pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  e+  e-  pi0]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  p+ ^e+  e-  pi0]CC"  : "ConeIso10e1",
+                                             "[Lambda_c+ ->  p+  e+ ^e-  pi0]CC"  : "ConeIso10e2",
+                                             "[Lambda_c+ ->  p+  e+  e- ^pi0]CC"  : "ConeIso10pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  e+  e-  pi0]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  p+ ^e+  e-  pi0]CC"  : "ConeIso15e1",
+                                             "[Lambda_c+ ->  p+  e+ ^e-  pi0]CC"  : "ConeIso15e2",
+                                             "[Lambda_c+ ->  p+  e+  e- ^pi0]CC"  : "ConeIso15pi",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  e+  e-  pi0]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  p+ ^e+  e-  pi0]CC"  : "TrackIsoBDTe1",
+                                             "[Lambda_c+ ->  p+  e+ ^e-  pi0]CC"  : "TrackIsoBDTe2",
+                                             #"[Lambda_c+ ->  p+  e+  e- ^pi0]CC"  : "TrackIsoBDTpi", #?
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  e+  e-  pi0]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  p+ ^e+  e-  pi0]CC"  : "BsMuMuTrackIsoe1",
+                                             "[Lambda_c+ ->  p+  e+ ^e-  pi0]CC"  : "BsMuMuTrackIsoe2",
+                                             #"[Lambda_c+ ->  p+  e+  e- ^pi0]CC"  : "BsMuMuTrackIsopi", #?
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+        self.Lc2pemupi0R_Line = StrippingLine(Lc2pemupi0R_name+"Line",
+                                           prescale = config["Lc2pemupi0RPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selLc2pemupi0R,
+                                           RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l  pi0]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  X ^l  l  pi0]CC"  : "ConeIso05e",
+                                             "[Lambda_c+ ->  X  l ^l  pi0]CC"  : "ConeIso05mu",
+                                             "[Lambda_c+ ->  X  l  l ^pi0]CC"  : "ConeIso05pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l  pi0]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  X ^l  l  pi0]CC"  : "ConeIso10e",
+                                             "[Lambda_c+ ->  X  l ^l  pi0]CC"  : "ConeIso10mu",
+                                             "[Lambda_c+ ->  X  l  l ^pi0]CC"  : "ConeIso10pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l  pi0]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  X ^l  l  pi0]CC"  : "ConeIso15e",
+                                             "[Lambda_c+ ->  X  l ^l  pi0]CC"  : "ConeIso15mu",
+                                             "[Lambda_c+ ->  X  l  l ^pi0]CC"  : "ConeIso15pi",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l  pi0]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  X ^l  l  pi0]CC"  : "TrackIsoBDTe",
+                                             "[Lambda_c+ ->  X  l ^l  pi0]CC"  : "TrackIsoBDTmu",
+                                             #"[Lambda_c+ ->  X  l  l ^pi0]CC"  : "TrackIsoBDTpi", #?
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l  pi0]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  X ^l  l  pi0]CC"  : "BsMuMuTrackIsoe",
+                                             "[Lambda_c+ ->  X  l ^l  pi0]CC"  : "BsMuMuTrackIsomu",
+                                             #[Lambda_c+ ->  X  l  l ^pi0]CC"  : "BsMuMuTrackIsopi", #?
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+        self.Lc2pemupi0M_Line = StrippingLine(Lc2pemupi0M_name+"Line",
+                                           prescale = config["Lc2pemupi0MPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selLc2pemupi0M,
+                                           RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l  pi0]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  X ^l  l  pi0]CC"  : "ConeIso05e",
+                                             "[Lambda_c+ ->  X  l ^l  pi0]CC"  : "ConeIso05mu",
+                                             "[Lambda_c+ ->  X  l  l ^pi0]CC"  : "ConeIso05pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l  pi0]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  X ^l  l  pi0]CC"  : "ConeIso10e",
+                                             "[Lambda_c+ ->  X  l ^l  pi0]CC"  : "ConeIso10mu",
+                                             "[Lambda_c+ ->  X  l  l ^pi0]CC"  : "ConeIso10pi",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l  pi0]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  X ^l  l  pi0]CC"  : "ConeIso15e",
+                                             "[Lambda_c+ ->  X  l ^l  pi0]CC"  : "ConeIso15mu",
+                                             "[Lambda_c+ ->  X  l  l ^pi0]CC"  : "ConeIso15pi",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l  pi0]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  X ^l  l  pi0]CC"  : "TrackIsoBDTe",
+                                             "[Lambda_c+ ->  X  l ^l  pi0]CC"  : "TrackIsoBDTmu",
+                                             #"[Lambda_c+ ->  X  l  l ^pi0]CC"  : "TrackIsoBDTpi", #?
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^X  l  l  pi0]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  X ^l  l  pi0]CC"  : "BsMuMuTrackIsoe",
+                                             "[Lambda_c+ ->  X  l ^l  pi0]CC"  : "BsMuMuTrackIsomu",
+                                             #"[Lambda_c+ ->  X  l  l ^pi0]CC"  : "BsMuMuTrackIsopi", #?
+                                             }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+        self.Lc2pKpipi0R_Line = StrippingLine(Lc2pKpipi0R_name+"Line",
+                                          prescale = config["Lc2pKpipi0RPrescale"],
+                                          postscale = config["Postscale"],
+                                          MDSTFlag = config["MDSTflag"],
+                                          selection = self.selLc2pKpipi0R,
+                                          RelatedInfoTools = [
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+  pi0]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+  pi0]CC"  : "ConeIso05K",
+                                             "[Lambda_c+ ->  p+  K- ^pi+  pi0]CC"  : "ConeIso05pi",
+                                             "[Lambda_c+ ->  p+  K- ^pi+ ^pi0]CC"  : "ConeIso05pi0",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+  pi0]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+  pi0]CC"  : "ConeIso10K",
+                                             "[Lambda_c+ ->  p+  K- ^pi+  pi0]CC"  : "ConeIso10pi",
+                                             "[Lambda_c+ ->  p+  K- ^pi+ ^pi0]CC"  : "ConeIso10pi0",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+  pi0]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+  pi0]CC"  : "ConeIso15K",
+                                             "[Lambda_c+ ->  p+  K- ^pi+  pi0]CC"  : "ConeIso15pi",
+                                             "[Lambda_c+ ->  p+  K- ^pi+ ^pi0]CC"  : "ConeIso15pi0",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+  pi0]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+  pi0]CC"  : "TrackIsoBDTK",
+                                             "[Lambda_c+ ->  p+  K- ^pi+  pi0]CC"  : "TrackIsoBDTpi",
+                                             #"[Lambda_c+ ->  p+  K- ^pi+ ^pi0]CC"  : "TrackIsoBDTpi0",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+  pi0]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+  pi0]CC"  : "BsMuMuTrackIsoK",
+                                             "[Lambda_c+ ->  p+  K- ^pi+  pi0]CC"  : "BsMuMuTrackIsopi",
+                                             #"[Lambda_c+ ->  p+  K- ^pi+ ^pi0]CC"  : "BsMuMuTrackIsopi0",
+                                            }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+        self.Lc2pKpipi0M_Line = StrippingLine(Lc2pKpipi0M_name+"Line",
+                                          prescale = config["Lc2pKpipi0MPrescale"],
+                                          postscale = config["Postscale"],
+                                          MDSTFlag = config["MDSTflag"],
+                                          selection = self.selLc2pKpipi0M,
+                                          RelatedInfoTools = [
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 0.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso05Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+  pi0]CC"  : "ConeIso05p",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+  pi0]CC"  : "ConeIso05K",
+                                             "[Lambda_c+ ->  p+  K- ^pi+  pi0]CC"  : "ConeIso05pi",
+                                             "[Lambda_c+ ->  p+  K- ^pi+ ^pi0]CC"  : "ConeIso05pi0",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.0,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso10Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+  pi0]CC"  : "ConeIso10p",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+  pi0]CC"  : "ConeIso10K",
+                                             "[Lambda_c+ ->  p+  K- ^pi+  pi0]CC"  : "ConeIso10pi",
+                                             "[Lambda_c+ ->  p+  K- ^pi+ ^pi0]CC"  : "ConeIso10pi0",
+                                             }, },
+                                           { "Type" : "RelInfoConeVariables",
+                                             "ConeAngle" : 1.5,
+                                             "Variables" : [],
+                                             "Location"  : 'ConeIso15Lc',
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+  pi0]CC"  : "ConeIso15p",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+  pi0]CC"  : "ConeIso15K",
+                                             "[Lambda_c+ ->  p+  K- ^pi+  pi0]CC"  : "ConeIso15pi",
+                                             "[Lambda_c+ ->  p+  K- ^pi+ ^pi0]CC"  : "ConeIso15pi0",
+                                             }, },
+                                           { "Type": "RelInfoTrackIsolationBDT",
+                                             "Variables" : 0,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+  pi0]CC"  : "TrackIsoBDTp",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+  pi0]CC"  : "TrackIsoBDTK",
+                                             "[Lambda_c+ ->  p+  K- ^pi+  pi0]CC"  : "TrackIsoBDTpi",
+                                             #"[Lambda_c+ ->  p+  K- ^pi+ ^pi0]CC"  : "TrackIsoBDTpi0",
+                                             }, },
+                                          { "Type" : "RelInfoBs2MuMuTrackIsolations",
+                                             "Variables" : [],
+                                             "IsoTwoBody" : True,
+                                             "DaughterLocations" : {
+                                             "[Lambda_c+ -> ^p+  K-  pi+  pi0]CC"  : "BsMuMuTrackIsop",
+                                             "[Lambda_c+ ->  p+ ^K-  pi+  pi0]CC"  : "BsMuMuTrackIsoK",
+                                             "[Lambda_c+ ->  p+  K- ^pi+  pi0]CC"  : "BsMuMuTrackIsopi",
+                                             #"[Lambda_c+ ->  p+  K- ^pi+ ^pi0]CC"  : "BsMuMuTrackIsopi0",
+                                            }, },
+                                           ] + config["CommonRelInfoTools"] # end of RelatedInfoTools 
+                                        )# closes Strippingline 
+
+#Tagged
+        self.SigmaczLc2pmumu_Line = StrippingLine(SigmaczLc2pmumu_name+"Line",
+                                           prescale = config["SigmaczSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2pmumu
+                                        )# closes Strippingline 
+
+        self.SigmacppLc2pmumu_Line = StrippingLine(SigmacppLc2pmumu_name+"Line",
+                                           prescale = config["SigmacppSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2pmumu
+                                        )# closes Strippingline 
+
+        self.SigmaczLc2pee_Line = StrippingLine(SigmaczLc2pee_name+"Line",
+                                           prescale = config["SigmaczSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2pee
+                                        )# closes Strippingline 
+
+        self.SigmacppLc2pee_Line = StrippingLine(SigmacppLc2pee_name+"Line",
+                                           prescale = config["SigmacppSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2pee
+                                        )# closes Strippingline 
+
+        self.SigmaczLc2pemu_Line = StrippingLine(SigmaczLc2pemu_name+"Line",
+                                           prescale = config["SigmaczSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2pemu
+                                        )# closes Strippingline 
+
+        self.SigmacppLc2pemu_Line = StrippingLine(SigmacppLc2pemu_name+"Line",
+                                           prescale = config["SigmacppSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2pemu
+                                        )# closes Strippingline 
+
+        self.SigmaczLc2pKpi_Line = StrippingLine(SigmaczLc2pKpi_name+"Line",
+                                           prescale = config["SigmaczRefPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2pKpi
+                                        )# closes Strippingline 
+
+        self.SigmacppLc2pKpi_Line = StrippingLine(SigmacppLc2pKpi_name+"Line",
+                                           prescale = config["SigmacppRefPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2pKpi
+                                        )# closes Strippingline 
+#4-body tagged
+        self.SigmaczLc2pmumupi0R_Line = StrippingLine(SigmaczLc2pmumupi0R_name+"Line",
+                                           prescale = config["SigmaczSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2pmumupi0R
+                                        )# closes Strippingline 
+        self.SigmacppLc2pmumupi0R_Line = StrippingLine(SigmacppLc2pmumupi0R_name+"Line",
+                                           prescale = config["SigmacppSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2pmumupi0R
+                                        )# closes Strippingline 
+        self.SigmaczLc2pmumupi0M_Line = StrippingLine(SigmaczLc2pmumupi0M_name+"Line",
+                                           prescale = config["SigmaczSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2pmumupi0M
+                                        )# closes Strippingline 
+        self.SigmacppLc2pmumupi0M_Line = StrippingLine(SigmacppLc2pmumupi0M_name+"Line",
+                                           prescale = config["SigmacppSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2pmumupi0M
+                                        )# closes Strippingline 
+
+        self.SigmaczLc2peepi0R_Line = StrippingLine(SigmaczLc2peepi0R_name+"Line",
+                                           prescale = config["SigmaczSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2peepi0R
+                                        )# closes Strippingline 
+        self.SigmacppLc2peepi0R_Line = StrippingLine(SigmacppLc2peepi0R_name+"Line",
+                                           prescale = config["SigmacppSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2peepi0R
+                                        )# closes Strippingline 
+        self.SigmaczLc2peepi0M_Line = StrippingLine(SigmaczLc2peepi0M_name+"Line",
+                                           prescale = config["SigmaczSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2peepi0M
+                                        )# closes Strippingline 
+        self.SigmacppLc2peepi0M_Line = StrippingLine(SigmacppLc2peepi0M_name+"Line",
+                                           prescale = config["SigmacppSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2peepi0M
+                                        )# closes Strippingline 
+
+        self.SigmaczLc2pemupi0R_Line = StrippingLine(SigmaczLc2pemupi0R_name+"Line",
+                                           prescale = config["SigmaczSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2pemupi0R
+                                        )# closes Strippingline 
+        self.SigmacppLc2pemupi0R_Line = StrippingLine(SigmacppLc2pemupi0R_name+"Line",
+                                           prescale = config["SigmacppSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2pemupi0R
+                                        )# closes Strippingline 
+        self.SigmaczLc2pemupi0M_Line = StrippingLine(SigmaczLc2pemupi0M_name+"Line",
+                                           prescale = config["SigmaczSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2pemupi0M
+                                        )# closes Strippingline 
+        self.SigmacppLc2pemupi0M_Line = StrippingLine(SigmacppLc2pemupi0M_name+"Line",
+                                           prescale = config["SigmacppSignalPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2pemupi0M
+                                        )# closes Strippingline 
+
+        self.SigmaczLc2pKpipi0R_Line = StrippingLine(SigmaczLc2pKpipi0R_name+"Line",
+                                           prescale = config["SigmaczRefPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2pKpipi0R
+                                        )# closes Strippingline 
+        self.SigmacppLc2pKpipi0R_Line = StrippingLine(SigmacppLc2pKpipi0R_name+"Line",
+                                           prescale = config["SigmacppRefPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2pKpipi0R
+                                        )# closes Strippingline 
+        self.SigmaczLc2pKpipi0M_Line = StrippingLine(SigmaczLc2pKpipi0M_name+"Line",
+                                           prescale = config["SigmaczRefPi0MPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmaczLc2pKpipi0M
+                                        )# closes Strippingline 
+        self.SigmacppLc2pKpipi0M_Line = StrippingLine(SigmacppLc2pKpipi0M_name+"Line",
+                                           prescale = config["SigmacppRefPi0MPrescale"],
+                                           postscale = config["Postscale"],
+                                           MDSTFlag = config["MDSTflag"],
+                                           selection = self.selSigmacppLc2pKpipi0M
+                                        )# closes Strippingline 
+
+#######################################################################################################        
+
+        ### Signal ch.
+        self.registerLine(self.Lc23mu_Line)
+        self.registerLine(self.Lc2muee_Line)
+        self.registerLine(self.Lc2pmumu_Line)        
+        self.registerLine(self.Lc2pee_Line)
+        self.registerLine(self.Lc2pemu_Line)
+#
+        self.registerLine(self.Lc2pmumupi0R_Line)
+        self.registerLine(self.Lc2pmumupi0M_Line)
+        self.registerLine(self.Lc2peepi0R_Line)
+        self.registerLine(self.Lc2peepi0M_Line)
+        self.registerLine(self.Lc2pemupi0R_Line)
+        self.registerLine(self.Lc2pemupi0M_Line)
+
+        ### Control ch.
+        self.registerLine(self.Lc2pKpi_Line)        
+        self.registerLine(self.Lc2pKpipi0R_Line)        
+        self.registerLine(self.Lc2pKpipi0M_Line)        
+
+        ### Tagged signal ch.
+        self.registerLine(self.SigmaczLc2pmumu_Line)
+        self.registerLine(self.SigmacppLc2pmumu_Line)
+        self.registerLine(self.SigmaczLc2pee_Line)
+        self.registerLine(self.SigmacppLc2pee_Line)
+        self.registerLine(self.SigmaczLc2pemu_Line)
+        self.registerLine(self.SigmacppLc2pemu_Line)
+#
+        self.registerLine(self.SigmaczLc2pmumupi0R_Line)
+        self.registerLine(self.SigmacppLc2pmumupi0R_Line)
+        self.registerLine(self.SigmaczLc2pmumupi0M_Line)
+        self.registerLine(self.SigmacppLc2pmumupi0M_Line)
+
+        self.registerLine(self.SigmaczLc2peepi0R_Line)
+        self.registerLine(self.SigmacppLc2peepi0R_Line)
+        self.registerLine(self.SigmaczLc2peepi0M_Line)
+        self.registerLine(self.SigmacppLc2peepi0M_Line)
+
+        self.registerLine(self.SigmaczLc2pemupi0R_Line)
+        self.registerLine(self.SigmacppLc2pemupi0R_Line)
+        self.registerLine(self.SigmaczLc2pemupi0M_Line)
+        self.registerLine(self.SigmacppLc2pemupi0M_Line)
+
+
+        ### Tagged control ch.
+        self.registerLine(self.SigmaczLc2pKpi_Line)
+        self.registerLine(self.SigmacppLc2pKpi_Line)
+#
+        self.registerLine(self.SigmaczLc2pKpipi0R_Line)
+        self.registerLine(self.SigmacppLc2pKpipi0R_Line)
+
+        self.registerLine(self.SigmaczLc2pKpipi0M_Line)
+        self.registerLine(self.SigmacppLc2pKpipi0M_Line)
+
+
+
+#######################################################################################################
+
+    def makeLc23mu(self,name):
+    
+        Lc23mu = DaVinci__N3BodyDecays("Combine"+name)
+        Lc23mu.DecayDescriptors = [ "[Lambda_c+ -> mu+ mu+ mu-]cc","[Lambda_c+ -> mu+ mu+ mu+]cc" ]
+
+        Lc23mu.DaughtersCuts = { "mu+" : self.TrackCuts }
+    
+        Lc23mu.Combination12Cut = self.Combination12Cuts
+        Lc23mu.CombinationCut   = self.CombinationCutsLoose
+     
+        Lc23mu.MotherCut = self.MotherCuts
+
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    
+        return Selection (name, Algorithm = Lc23mu, RequiredSelections = [ _myMuons ])
+
+#######################################################################################################
+
+    def makeLc2muee(self,name):
+    
+        Lc2muee = DaVinci__N3BodyDecays("Combine"+name)
+        Lc2muee.DecayDescriptors = [ "[Lambda_c+ -> mu+ e+ e-]cc",
+                                     "[Lambda_c+ -> mu- e+ e+]cc",
+                                     "[Lambda_c+ -> mu+ e+ e+]cc"]
+    
+        Lc2muee.DaughtersCuts = { "mu+" : self.TrackCuts,
+                                  "e+"  : self.TrackCuts + " & ((PIDe-PIDpi)>2)" }
+    
+        Lc2muee.Combination12Cut = self.Combination12Cuts
+        Lc2muee.CombinationCut   = self.CombinationCutsLoose     
+        Lc2muee.MotherCut        = self.MotherCuts
+
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+        _myElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")    
+    
+        return Selection (name, Algorithm = Lc2muee, RequiredSelections = [ _myMuons, _myElectrons ])
+
+
+#######################################################################################################
+
+    def makeLc2pmumu(self,name):
+    
+        Lc2pmumu = DaVinci__N3BodyDecays("Combine"+name)
+        Lc2pmumu.DecayDescriptors = [ "[Lambda_c+ -> p+ mu+ mu-]cc",
+                                      "[Lambda_c+ -> p~- mu+ mu+]cc",
+                                      "[Lambda_c+ -> p+ mu+ mu+]cc"]
+    
+        Lc2pmumu.DaughtersCuts = { "p+"  : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                   "mu+" : self.TrackCuts + " & ((PIDmu-PIDpi)>-5)" + " & ((PIDmu-PIDK)>-5)" }
+    
+        Lc2pmumu.Combination12Cut = self.Combination12Cuts
+        Lc2pmumu.CombinationCut   = self.CombinationCutsLoose     
+        Lc2pmumu.MotherCut        = self.MotherCuts
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    
+        return Selection (name, Algorithm = Lc2pmumu, RequiredSelections = [ _myProtons, _myMuons ])
+
+#######################################################################################################
+
+    def makeLc2pee(self,name):
+    
+        Lc2pee = DaVinci__N3BodyDecays("Combine"+name)
+        Lc2pee.DecayDescriptors = [ "[Lambda_c+ -> p+ e+ e-]cc",
+                                "[Lambda_c+ -> p~- e+ e+]cc",
+                                "[Lambda_c+ -> p+ e+ e+]cc"]
+    
+        Lc2pee.DaughtersCuts = { "p+" : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                 "e+" : self.TrackCuts + " & ((PIDe-PIDpi)>2)" }
+    
+        Lc2pee.Combination12Cut = self.Combination12Cuts
+        Lc2pee.CombinationCut   = self.CombinationCutsLoose
+        Lc2pee.MotherCut        = self.MotherCuts
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")    
+    
+        return Selection (name, Algorithm = Lc2pee, RequiredSelections = [ _myProtons, _myElectrons ])
+
+#######################################################################################################
+
+    def makeLc2pKpi(self,name):
+    
+        Lc2pKpi = DaVinci__N3BodyDecays("Combine"+name)
+        Lc2pKpi.DecayDescriptors = [ "[Lambda_c+ -> p+ K- pi+]cc" ]
+    
+        Lc2pKpi.DaughtersCuts = { "p+"  : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                  "K-"  : self.TrackCuts + " & ((PIDK-PIDpi)>5)" + " & ((PIDK-PIDp)>0)",
+                                  "pi+" : self.TrackCuts }
+    
+        Lc2pKpi.Combination12Cut = self.Combination12Cuts
+        Lc2pKpi.CombinationCut   = self.CombinationCutsTight
+        Lc2pKpi.MotherCut        = self.MotherCuts
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myKaons = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")
+        _myPions = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+    
+        return Selection (name, Algorithm = Lc2pKpi, RequiredSelections = [ _myProtons, _myKaons, _myPions ])
+
+#######################################################################################################
+
+    def makeLc2pemu(self,name):
+    
+        Lc2pemu = DaVinci__N3BodyDecays("Combine"+name)
+        Lc2pemu.DecayDescriptors = [ "[Lambda_c+ -> p+ e+ mu-]cc", "[Lambda_c+ -> p+ e- mu+]cc",
+                                "[Lambda_c+ -> p~- e+ mu+]cc",
+                                "[Lambda_c+ -> p+ e+ mu+]cc"]
+    
+        Lc2pemu.DaughtersCuts = { "p+" : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                  "e+" : self.TrackCuts + " & ((PIDe-PIDpi)>2)",
+                                  "mu-" : self.TrackCuts + " & ((PIDmu-PIDpi)>-5)" + " & ((PIDmu-PIDK)>-5)" }
+
+        Lc2pemu.Combination12Cut = self.Combination12Cuts
+        Lc2pemu.CombinationCut   = self.CombinationCutsLoose
+        Lc2pemu.MotherCut        = self.MotherCuts
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")    
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    
+        return Selection (name, Algorithm = Lc2pemu, RequiredSelections = [ _myProtons, _myElectrons, _myMuons ])
+
+###4-body###
+#######################################################################################################
+
+    def makeLc2pmumupi0R(self,name):
+    
+        Lc2pmumupi0R = DaVinci__N4BodyDecays("Combine"+name)
+        Lc2pmumupi0R.DecayDescriptors = [ "[Lambda_c+ -> p+ mu+ mu- pi0]cc" ]
+    
+        Lc2pmumupi0R.DaughtersCuts = { "p+"  : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                    "mu+" : self.TrackCuts + " & ((PIDmu-PIDpi)>-5)" + " & ((PIDmu-PIDK)>-5)",
+                                    "pi0" : self.Pi0RCuts }
+    
+        Lc2pmumupi0R.Combination12Cut  = self.Combination12Cuts
+        Lc2pmumupi0R.Combination123Cut = self.Combination123Cuts
+        Lc2pmumupi0R.CombinationCut    = self.Combination4BodyCutsLoose     
+        Lc2pmumupi0R.MotherCut         = self.Mother4BodyCuts #or MotherCuts enough?
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+        _myPi0R = DataOnDemand(Location = "Phys/StdLooseResolvedPi0/Particles")   
+
+        return Selection (name, Algorithm = Lc2pmumupi0R, RequiredSelections = [ _myProtons, _myMuons, _myPi0R ])
+
+#######################################################################################################
+
+    def makeLc2pmumupi0M(self,name):
+    
+        Lc2pmumupi0M = DaVinci__N4BodyDecays("Combine"+name)
+        Lc2pmumupi0M.DecayDescriptors = [ "[Lambda_c+ -> p+ mu+ mu- pi0]cc"]
+    
+        Lc2pmumupi0M.DaughtersCuts = { "p+"  : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                    "mu+" : self.TrackCuts + " & ((PIDmu-PIDpi)>-5)" + " & ((PIDmu-PIDK)>-5)",
+                                    "pi0" : self.Pi0MCuts }
+    
+        Lc2pmumupi0M.Combination12Cut = self.Combination12Cuts
+        Lc2pmumupi0M.Combination123Cut = self.Combination123Cuts
+        Lc2pmumupi0M.CombinationCut   = self.Combination4BodyCutsLoose     
+        Lc2pmumupi0M.MotherCut        = self.Mother4BodyCuts #or MotherCuts enough?
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+        _myPi0M = DataOnDemand(Location = "Phys/StdLooseMergedPi0/Particles")   
+
+        return Selection (name, Algorithm = Lc2pmumupi0M, RequiredSelections = [ _myProtons, _myMuons, _myPi0M ])
+
+#######################################################################################################
+
+    def makeLc2peepi0R(self,name):
+    
+        Lc2peepi0R = DaVinci__N4BodyDecays("Combine"+name)
+        Lc2peepi0R.DecayDescriptors = [ "[Lambda_c+ -> p+ e+ e- pi0]cc" ]
+    
+        Lc2peepi0R.DaughtersCuts = { "p+"  : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                    "e+" : self.TrackCuts + " & ((PIDe-PIDpi)>2)",
+                                    "pi0" : self.Pi0RCuts }
+    
+        Lc2peepi0R.Combination12Cut  = self.Combination12Cuts
+        Lc2peepi0R.Combination123Cut = self.Combination123Cuts
+        Lc2peepi0R.CombinationCut    = self.Combination4BodyCutsLoose     
+        Lc2peepi0R.MotherCut         = self.Mother4BodyCuts #or MotherCuts enough?
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+        _myPi0R = DataOnDemand(Location = "Phys/StdLooseResolvedPi0/Particles")   
+
+        return Selection (name, Algorithm = Lc2peepi0R, RequiredSelections = [ _myProtons, _myElectrons, _myPi0R ])
+
+#######################################################################################################
+
+    def makeLc2peepi0M(self,name):
+    
+        Lc2peepi0M = DaVinci__N4BodyDecays("Combine"+name)
+        Lc2peepi0M.DecayDescriptors = [ "[Lambda_c+ -> p+ e+ e- pi0]cc" ]
+    
+        Lc2peepi0M.DaughtersCuts = { "p+"  : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                    "e+" : self.TrackCuts + " & ((PIDe-PIDpi)>2)",
+                                    "pi0" : self.Pi0MCuts }
+    
+        Lc2peepi0M.Combination12Cut  = self.Combination12Cuts
+        Lc2peepi0M.Combination123Cut = self.Combination123Cuts
+        Lc2peepi0M.CombinationCut    = self.Combination4BodyCutsLoose     
+        Lc2peepi0M.MotherCut         = self.Mother4BodyCuts #or MotherCuts enough?
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+        _myPi0M = DataOnDemand(Location = "Phys/StdLooseMergedPi0/Particles")   
+
+        return Selection (name, Algorithm = Lc2peepi0M, RequiredSelections = [ _myProtons, _myElectrons, _myPi0M ])
+
+#######################################################################################################
+
+    def makeLc2pemupi0R(self,name):
+    
+        Lc2pemupi0R = DaVinci__N4BodyDecays("Combine"+name)
+        Lc2pemupi0R.DecayDescriptors = [ "[Lambda_c+ -> p+ e+ mu- pi0]cc", "[Lambda_c+ -> p+ e- mu+ pi0]cc" ]
+    
+        Lc2pemupi0R.DaughtersCuts = { "p+"  : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                    "e+" : self.TrackCuts + " & ((PIDe-PIDpi)>2)",
+                                    "mu-" : self.TrackCuts + " & ((PIDmu-PIDpi)>-5)" + " & ((PIDmu-PIDK)>-5)",
+                                    "pi0" : self.Pi0RCuts }
+    
+        Lc2pemupi0R.Combination12Cut  = self.Combination12Cuts
+        Lc2pemupi0R.Combination123Cut = self.Combination123Cuts
+        Lc2pemupi0R.CombinationCut    = self.Combination4BodyCutsLoose     
+        Lc2pemupi0R.MotherCut         = self.Mother4BodyCuts #or MotherCuts enough?
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+        _myPi0R = DataOnDemand(Location = "Phys/StdLooseResolvedPi0/Particles")   
+
+        return Selection (name, Algorithm = Lc2pemupi0R, RequiredSelections = [ _myProtons, _myElectrons, _myMuons, _myPi0R ])
+
+#######################################################################################################
+
+    def makeLc2pemupi0M(self,name):
+    
+        Lc2pemupi0M = DaVinci__N4BodyDecays("Combine"+name)
+        Lc2pemupi0M.DecayDescriptors = [ "[Lambda_c+ -> p+ e+ mu- pi0]cc", "[Lambda_c+ -> p+ e- mu+ pi0]cc" ]
+    
+        Lc2pemupi0M.DaughtersCuts = { "p+"  : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                    "e+" : self.TrackCuts + " & ((PIDe-PIDpi)>2)",
+                                    "mu-" : self.TrackCuts + " & ((PIDmu-PIDpi)>-5)" + " & ((PIDmu-PIDK)>-5)",
+                                    "pi0" : self.Pi0MCuts }
+    
+        Lc2pemupi0M.Combination12Cut  = self.Combination12Cuts
+        Lc2pemupi0M.Combination123Cut = self.Combination123Cuts
+        Lc2pemupi0M.CombinationCut    = self.Combination4BodyCutsLoose     
+        Lc2pemupi0M.MotherCut         = self.Mother4BodyCuts #or MotherCuts enough?
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myElectrons = DataOnDemand(Location = "Phys/StdLooseElectrons/Particles")
+        _myMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+        _myPi0M = DataOnDemand(Location = "Phys/StdLooseMergedPi0/Particles")   
+
+        return Selection (name, Algorithm = Lc2pemupi0M, RequiredSelections = [ _myProtons, _myElectrons, _myMuons, _myPi0M ])
+
+#######################################################################################################
+
+    def makeLc2pKpipi0R(self,name):
+    
+        Lc2pKpipi0R = DaVinci__N4BodyDecays("Combine"+name)
+        Lc2pKpipi0R.DecayDescriptors = [ "[Lambda_c+ -> p+ K- pi+ pi0]cc" ]
+    
+        Lc2pKpipi0R.DaughtersCuts = { "p+"  : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                    "K-"  : self.TrackCuts + " & ((PIDK-PIDpi)>5)" + " & ((PIDK-PIDp)>0)",
+                                    "pi+" : self.TrackCuts,
+                                    "pi0" : self.Pi0RCuts }
+    
+        Lc2pKpipi0R.Combination12Cut  = self.Combination12Cuts
+        Lc2pKpipi0R.Combination123Cut = self.Combination123Cuts
+        Lc2pKpipi0R.CombinationCut    = self.Combination4BodyCutsLoose     
+        Lc2pKpipi0R.MotherCut         = self.Mother4BodyCuts #or MotherCuts enough?
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myKaons = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")
+        _myPions = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+        _myPi0R = DataOnDemand(Location = "Phys/StdLooseResolvedPi0/Particles")   
+
+        return Selection (name, Algorithm = Lc2pKpipi0R, RequiredSelections = [ _myProtons, _myKaons, _myPions, _myPi0R ])
+
+#######################################################################################################
+
+    def makeLc2pKpipi0M(self,name):
+    
+        Lc2pKpipi0M = DaVinci__N4BodyDecays("Combine"+name)
+        Lc2pKpipi0M.DecayDescriptors = [ "[Lambda_c+ -> p+ K- pi+ pi0]cc" ]
+    
+        Lc2pKpipi0M.DaughtersCuts = { "p+"  : self.TrackCuts + " & ((PIDp-PIDpi)>5)" + " & ((PIDp-PIDK)>0)",
+                                    "K-"  : self.TrackCuts + " & ((PIDK-PIDpi)>5)" + " & ((PIDK-PIDp)>0)",
+                                    "pi+" : self.TrackCuts,
+                                    "pi0" : self.Pi0MCuts }
+    
+        Lc2pKpipi0M.Combination12Cut  = self.Combination12Cuts
+        Lc2pKpipi0M.Combination123Cut = self.Combination123Cuts
+        Lc2pKpipi0M.CombinationCut    = self.Combination4BodyCutsLoose     
+        Lc2pKpipi0M.MotherCut         = self.Mother4BodyCuts #or MotherCuts enough?
+
+        _myProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        _myKaons = DataOnDemand(Location = "Phys/StdLooseKaons/Particles")
+        _myPions = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+        _myPi0M = DataOnDemand(Location = "Phys/StdLooseMergedPi0/Particles")   
+
+        return Selection (name, Algorithm = Lc2pKpipi0M, RequiredSelections = [ _myProtons, _myKaons, _myPions, _myPi0M ])
+
+###tagged###
+#######################################################################################################
+
+    def makeSigmac2Lcpi(self, name, inputSel, decDescriptors):
+
+        #SigmacCombinationCuts = '((AM - AM1) < {0[Sigmac_AMDiff_MAX]})'.format(self.config)
+        #SigmacMotherCuts = '(VFASPF(VCHI2/VDOF) < {0[Sigmac_VCHI2VDOF_MAX]})'.format(self.config)
+
+        Sigmac2Lcpi = CombineParticles(
+            name = "Combine"+name, # name='Combine{0}'.format(name),
+            DecayDescriptors = decDescriptors,
+            CombinationCut = self.SigmacCombinationCuts,
+            MotherCut = self.SigmacMotherCuts
+        )
+        _mySoftPions = DataOnDemand(Location = "Phys/StdAllNoPIDsPions/Particles")
+
+        return Selection(name, Algorithm = Sigmac2Lcpi, RequiredSelections = [inputSel, _mySoftPions])
+
+#######################################################################################################
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingMultiLepton.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingMultiLepton.py
new file mode 100644
index 000000000..44a9e6a7b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingMultiLepton.py
@@ -0,0 +1,2314 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+__author__  = 'Vitalii Lisovskyi'
+__date__    = '05/03/2021'
+__version__ = '$Revision: 0 $'
+
+__all__ = ( 'MultiLeptonConf', 'default_config' )
+
+"""
+Selections for channels with >3 leptons
+
++ B -> 4mu K
++ Bs -> 4mu phi
++ B0 -> 4mu KS
++ B0 -> 4mu K*
++ Lb -> 4mu L
++ Lb -> 4mu pK
+
+Various inclusive lines for 4, 5, 6, 8 muons in the final state;
+also combinations of X muons and (4-X) electrons where X=0,1,2,3.
+
+"""
+
+default_config = {
+    'NAME'                       : 'MultiLepton',
+    'BUILDERTYPE'                : 'MultiLeptonConf',
+    'CONFIG'                     :
+        {
+        'BFlightCHI2'            : 36 #100
+        , 'BDIRA'                : 0.999
+        , 'BIPCHI2'              : 25
+        , 'BVertexCHI2'          : 16
+        , 'DiLeptonPT'           : 0
+        , 'DiLeptonFDCHI2'       : 10
+        , 'DiLeptonIPCHI2'       : 0
+        , 'LeptonIPCHI2'         : 9
+        , 'LeptonPT'             : 300
+        , 'KaonIPCHI2'           : 9
+        , 'KaonPT'               : 250
+        , 'KaonPTTight'          : 400
+        , 'UpperMass'            : 5500
+        , 'BMassWindow'          : 1500
+        , 'Trk_Chi2'             : 3
+        , 'Trk_GhostProb'        : 0.3
+        , 'K1_MassWindow_Lo'     : 0
+        , 'K1_MassWindow_Hi'     : 6300
+        , 'K1_VtxChi2'           : 25
+        , 'K1_SumPTHad'          : 800
+        , 'Mu_SumIPChi2Had'      : 12.0
+        , 'LamLam_VtxChi2'       : 36
+        , 'V0TAU'                : 0.0005
+        , 'DiHadronADOCA'        : 0.75
+        , 'Bu2mmLinePrescale'    : 1
+        },
+    'WGs'     : [ 'RD' ],
+    'STREAMS'     : { 'Leptonic' :
+                       [
+                      'StrippingMultiLepton_B24muXLine','StrippingMultiLepton_B24muXUpLine','StrippingMultiLepton_Jpsi22Mu2EPromptLine','StrippingMultiLepton_Jpsi23MuEDetachedLine','StrippingMultiLepton_Jpsi23MuEPromptLine','StrippingMultiLepton_Jpsi2Mu3EDetachedLine','StrippingMultiLepton_Jpsi2Mu3EPromptLine','StrippingMultiLepton_InclDet4muLowMassLine','StrippingMultiLepton_InclDet4muLowMassUpLine','StrippingMultiLepton_Jpsi24MuPromptLine',
+                      'StrippingMultiLepton_B24muXLongLivedLine','StrippingMultiLepton_B26muXLongLivedLine'],
+                       'Dimuon' : ['StrippingMultiLepton_B24muXTightLine','StrippingMultiLepton_B22mu2eXTightLine','StrippingMultiLepton_InclDet4muLine','StrippingMultiLepton_InclDet2mu2muLine','StrippingMultiLepton_InclDet6muLine','StrippingMultiLepton_InclDet5muLine','StrippingMultiLepton_InclPrompt6muLine','StrippingMultiLepton_Incl8muLine','StrippingMultiLepton_Incl8mu4bodyLine','StrippingMultiLepton_InclDet6mu3bodyLine','StrippingMultiLepton_Jpsi24MuPromptTightLine','StrippingMultiLepton_Jpsi22Mu2EDetachedLine','StrippingMultiLepton_Jpsi22E2EDetachedLine','StrippingMultiLepton_Jpsi22Mu2ESSDetachedLine',
+                       'StrippingMultiLepton_Incl8mu4bodyLongLivedLine','StrippingMultiLepton_InclDet6mu3bodyLongLivedLine']
+                      }
+    }
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, DaVinci__N3BodyDecays, DaVinci__N4BodyDecays, DaVinci__N5BodyDecays, DaVinci__N6BodyDecays
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import *
+from CommonParticles.Utils import *
+
+
+class MultiLeptonConf(LineBuilder) :
+    """
+    Builder
+    """
+
+    # now just define keys. Default values are fixed later
+    __configuration_keys__ = (
+        'BFlightCHI2'
+        , 'BDIRA'
+        , 'BIPCHI2'
+        , 'BVertexCHI2'
+        , 'DiLeptonPT'
+        , 'DiLeptonFDCHI2'
+        , 'DiLeptonIPCHI2'
+        , 'LeptonIPCHI2'
+        , 'LeptonPT'
+        , 'KaonIPCHI2'
+        , 'KaonPT'
+        , 'KaonPTTight'
+        , 'UpperMass'
+        , 'BMassWindow'
+        , 'Trk_Chi2'
+        , 'Trk_GhostProb'
+        , 'K1_MassWindow_Lo'
+        , 'K1_MassWindow_Hi'
+        , 'K1_VtxChi2'
+        , 'K1_SumPTHad'
+        , 'Mu_SumIPChi2Had'
+        , 'LamLam_VtxChi2'
+        , 'V0TAU'
+        , 'DiHadronADOCA'
+        , 'Bu2mmLinePrescale'
+      )
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        self._name = name
+        fourmXLine_name   = name+'_B24muX'
+        fourmX_longlived_Line_name   = name+'_B24muXLongLived'
+        sixmX_longlived_Line_name   = name+'_B26muXLongLived'
+        fourmXUpLine_name   = name+'_B24muXUp'
+        fourmXLineTight_name   = name+'_B24muXTight'
+        twomutwoeXLineTight_name  = name+'_B22mu2eXTight'
+        Incl4mLine_name = name+'_InclDet4mu'
+        Incl4mLowLine_name = name+'_InclDet4muLowMass'
+        Incl4mLowUpLine_name = name+'_InclDet4muLowMassUp'
+        Incl2m2mLine_name = name+'_InclDet2mu2mu'
+        Incl6mLine_name = name+'_InclDet6mu'
+        Incl6m3xLine_name = name+'_InclDet6mu3body'
+        Incl6m_longlived_Line_name = name+'_InclDet6mu3bodyLongLived'
+        InclPrompt6mLine_name = name+'_InclPrompt6mu'
+        Incl8mLine_name = name+'_Incl8mu'
+        Incl8m4xLine_name = name+'_Incl8mu4body'
+        Incl8m4x_longlived_Line_name = name+'_Incl8mu4bodyLongLived'
+        Incl5mLine_name = name+'_InclDet5mu'
+        Jpsi24MuPromptLine_name   = name+'_Jpsi24MuPrompt'
+        Jpsi24MuPromptTightLine_name   = name+'_Jpsi24MuPromptTight'
+        #Ups24MuPromptLine_name   = name+'_Ups24MuPrompt'
+        #Phi24MuPromptLine_name   = name+'_Phi24MuPrompt'
+        Jpsi22E2EDetLine_name = name+'_Jpsi22E2EDetached'
+        Jpsi22Mu2EPromptLine_name   = name+'_Jpsi22Mu2EPrompt'
+        Jpsi22Mu2EDetLine_name   = name+'_Jpsi22Mu2EDetached'
+        Jpsi22Mu2ESSDetLine_name   = name+'_Jpsi22Mu2ESSDetached'
+        Jpsi23MuEDetLine_name   = name+'_Jpsi23MuEDetached'
+        Jpsi23MuEPromptLine_name   = name+'_Jpsi23MuEPrompt'
+        Jpsi2Mu3EDetLine_name   = name+'_Jpsi2Mu3EDetached'
+        Jpsi2Mu3EPromptLine_name   = name+'_Jpsi2Mu3EPrompt'
+
+        from StandardParticles import StdLoosePions as Pions
+        from StandardParticles import StdLooseKaons as Kaons
+        from StandardParticles import StdLooseProtons as Protons
+        from StandardParticles import StdVeryLooseKsLL as KshortsLL
+        from StandardParticles import StdLooseKsDD as KshortsDD
+        from StandardParticles import StdVeryLooseLambdaLL as LambdasLL
+        from StandardParticles import StdLooseLambdaDD as LambdasDD
+        from StandardParticles import StdLooseLambdaLD as LambdasLD
+        from StandardParticles import StdLoosePhi2KK as Phi2KK
+        from StandardParticles import StdLooseKstar2Kpi as KstartoKpi
+        from StandardParticles import StdLooseLambdastar2pK as Lstar
+
+        # 1 : Make particles
+
+
+
+        #hadrons for B-> H+4mu lines
+
+        SelKaons  = self._filterKaon( name   = "KaonsFor" + self._name,
+                                        sel    = Kaons,
+                                        params = config )
+
+        SelPhis  = self._filterPhi( name   = "PhisFor" + self._name,
+                                        sel    = Phi2KK,
+                                        params = config )
+
+        SelKstars  = self._filterKst( name   = "KstarsFor" + self._name,
+                                        sel    = KstartoKpi,
+                                        params = config )
+
+        SelLstars  = self._filterLst( name   = "LstarsFor" + self._name,
+                                        sel    = Lstar,
+                                        params = config )
+
+        SelKshortsLL = self._filterHadron( name   = "KshortsLLFor" + self._name,
+                                           sel    = KshortsLL,
+                                           params = config )
+
+        SelKshortsDD = self._filterHadron( name   = "KshortsDDFor" + self._name,
+                                           sel    =  KshortsDD,
+                                           params = config )
+
+        SelLambdasLL = self._filterHadron( name   = "LambdasLLFor" + self._name,
+                                           sel    =  LambdasLL,
+                                           params = config )
+
+        SelLambdasDD = self._filterHadron( name   = "LambdasDDFor" + self._name,
+                                           sel    =  LambdasDD,
+                                           params = config )
+
+        #handy leptons
+
+        SelDiMuonDetached = self._makeDiMuonDetached( name   = "2muDetFor" + self._name,
+                               params = config )
+
+        SelDiMuonPrompt = self._makeDiMuonPrompt( name   = "2muPromptFor" + self._name,
+                               params = config )
+
+        SelDiMuonLongLived = self._makeDiMuonLongLived( name   = "2muLongLivedFor" + self._name,
+                               params = config )
+
+        SelFourMuonDetached = self._makeFourMuonDetached( name   = "4muDetFor" + self._name,
+                               #dimuons=SelDiMuonDetached,
+                               params = config )
+
+        SelFourMuonDetachedUp = self._makeFourMuonDetachedUp( name   = "4muDetUpFor" + self._name,
+                               #dimuons=SelDiMuonDetached,
+                               params = config )
+
+        SelDiElectron = self._makeDiElectron( name   = "2eFor" + self._name,
+                               params = config )
+
+        SelMuE = self._makeMuEDetached( name   = "mueFor" + self._name,
+                               params = config )
+
+        Sel2Mu2EforExclLine = self._make2Mu2EInclDetLoose(name = "2Mu2EFor" + self._name,
+                                   dimuon = SelDiMuonDetached,
+                                   dielectron = SelDiElectron,
+                                   params   = config)
+
+
+        #  Combine Particles: final combiners for stripping lines
+
+
+        SelB24mX = self._makeB24muX(fourmXLine_name,
+                                   fourlepton = SelFourMuonDetached,
+                                   hadrons  = [ SelKaons, SelPhis, SelKstars, SelLstars, SelKshortsLL, SelKshortsDD, SelLambdasDD, SelLambdasLL ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+        SelB24mX_LongLived = self._makeB24muX_LongLived(fourmX_longlived_Line_name,
+                                   dilepton = SelDiMuonLongLived,
+                                   hadrons  = [ SelKaons, SelPhis, SelKstars, SelLstars, SelLambdasDD, SelLambdasLL ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+        SelB26mX_LongLived = self._makeB26muX_LongLived(sixmX_longlived_Line_name,
+                                   dilepton = SelDiMuonLongLived,
+                                   hadrons  = [ SelKaons, SelPhis, SelKstars, SelLstars, SelLambdasDD, SelLambdasLL ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+        SelB24mXUp = self._makeB24muX(fourmXUpLine_name,
+                                   fourlepton = SelFourMuonDetachedUp,
+                                   hadrons  = [ SelKaons, SelPhis, SelKstars, SelLstars, SelKshortsLL, SelKshortsDD, SelLambdasDD, SelLambdasLL ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+        SelB24mXTight = self._makeB24muXTight(fourmXLineTight_name,
+                                   fourlepton = SelFourMuonDetached,
+                                   hadrons  = [ SelKaons, SelPhis, SelKstars, SelLstars, SelKshortsLL, SelKshortsDD, SelLambdasDD, SelLambdasLL  ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+        SelB22m2eXTight = self._makeB22mu2EXTight(twomutwoeXLineTight_name,
+                                   fourlepton = Sel2Mu2EforExclLine,
+                                   hadrons  = [ SelKaons, SelPhis, SelKstars, SelLstars, SelKshortsLL, SelKshortsDD, SelLambdasDD, SelLambdasLL  ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('B+') <  %(BMassWindow)s *MeV"% config)
+
+        Sel2mu2muDetachedIncl = self._make2mu2muInclDet(Incl2m2mLine_name,
+                                   dilepton = SelDiMuonDetached,
+                                   params   = config)
+
+        SelFourMuonDetachedIncl = self._make4muInclDet(Incl4mLine_name,
+                                   #dilepton = SelDiMuonDetached,
+                                   params   = config)
+
+        SelFourMuonDetachedInclLow = self._make4muInclDetLowMass(Incl4mLowLine_name,
+                                   #dilepton = SelDiMuonDetached,
+                                   params   = config)
+
+        SelFourMuonDetachedInclLowUp = self._make4muInclDetLowMassUp(Incl4mLowUpLine_name,
+                                   params   = config)
+
+        SelSixMuonDetachedIncl = self._make6muInclDet(Incl6mLine_name,
+#                                   dilepton = SelDiMuonDetached,
+                                   params   = config)
+
+        SelSixMuonLongLivedIncl = self._make6mu3bodyInclLongLived(Incl6m_longlived_Line_name,
+                                   dilepton = SelDiMuonLongLived,
+                                   params   = config)
+
+        SelSixMuon3xDetachedIncl = self._make6mu3bodyInclDet(Incl6m3xLine_name,
+                                   dilepton = SelDiMuonDetached,
+                                   params   = config)
+
+        SelSixMuonPromptIncl = self._make6muInclPrompt(InclPrompt6mLine_name,
+#                                   dilepton = SelDiMuonDetached,
+                                   params   = config)
+
+        SelOttoMuonPromptIncl = self._make8muIncl(Incl8mLine_name,
+#                                   dilepton = SelDiMuonDetached,
+                                   params   = config)
+
+        SelOttoMuon4xPromptIncl = self._make8mu4bodyIncl(Incl8m4xLine_name,
+#                                   dilepton = SelDiMuonPrompt,
+                                   params   = config)
+
+        SelOttoMuon4xLongLivedIncl = self._make8mu4bodyLongLived(Incl8m4x_longlived_Line_name,
+                                   dilepton = SelDiMuonLongLived,
+                                   params   = config)
+
+        SelFiveMuonDetachedIncl = self._make5Mu(Incl5mLine_name,
+                                   params   = config)
+
+        SelJpsi24MuPrompt = self._makeFourMuonPromptJpsi(Jpsi24MuPromptLine_name,
+                                   dilepton = SelDiMuonPrompt,
+                                   params   = config)
+
+        SelJpsi24MuPromptTight = self._makeFourMuonPromptJpsiTight(Jpsi24MuPromptTightLine_name,
+                                   dilepton = SelDiMuonPrompt,
+                                   params   = config)
+
+        SelJpsi22Mu2EPrompt = self._make2Mu2EPrompt(Jpsi22Mu2EPromptLine_name,
+                                   dimuon = SelDiMuonPrompt,
+                                   dielectron = SelDiElectron,
+                                   params   = config)
+
+        SelJpsi22Mu2EDetachedIncl = self._make2Mu2EInclDet(Jpsi22Mu2EDetLine_name,
+                                   dimuon = SelDiMuonDetached,
+                                   dielectron = SelDiElectron,
+                                   params   = config)
+
+        SelJpsi22E2EDetachedIncl = self._make2E2EInclDet(Jpsi22E2EDetLine_name,
+                                   dielectron = SelDiElectron,
+                                   params   = config)
+
+        SelJpsi22Mu2ESSDetachedIncl = self._make2Mu2ESSInclDet(Jpsi22Mu2ESSDetLine_name,
+                                   dilepton = SelMuE,
+                                   params   = config)
+
+        SelJpsi23MuEDetachedIncl = self._make3MuEInclDet(Jpsi23MuEDetLine_name,
+#                                   dimuon = SelDiMuonDetached,
+#                                   mue = SelMuE,
+                                   params   = config)
+
+        SelJpsi23MuEPromptIncl = self._make3MuEInclPrompt(Jpsi23MuEPromptLine_name,
+                                   params   = config)
+
+        SelJpsi2Mu3EDetachedIncl = self._makeMu3EInclDet(Jpsi2Mu3EDetLine_name,
+                                   dielectron = SelDiElectron,
+                                   mue = SelMuE,
+                                   params   = config)
+
+        SelJpsi2Mu3EPromptIncl = self._makeMu3EInclPrompt(Jpsi2Mu3EPromptLine_name,
+                                   dielectron = SelDiElectron,
+                                   # mue = SelMuE,
+                                   params   = config)
+        #  Declare Lines
+
+        SPDFilter = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 900 )" ,
+            'Preambulo' : [ "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb" ]
+            }
+
+
+        self.B24mXLine = StrippingLine(fourmXLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB24mX,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> (X -> ^mu+ mu+ mu- mu-) X ]CC" : "Muon1BDT",
+                                         "[ Beauty -> (X -> mu+ ^mu+ mu- mu-) X ]CC" : "Muon2BDT",
+                                         "[ Beauty -> (X -> mu+ mu+ ^mu- mu-) X ]CC" : "Muon3BDT",
+                                         "[ Beauty -> (X -> mu+ mu+ mu- ^mu-) X ]CC" : "Muon4BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B24mXLine_LongLived = StrippingLine(fourmX_longlived_Line_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB24mX_LongLived,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> (X -> ^mu+ mu-) (X -> mu+ mu-) X ]CC" : "Muon1BDT",
+                                         "[ Beauty -> (X -> mu+ ^mu-) (X -> mu+ mu-) X ]CC" : "Muon2BDT",
+                                         "[ Beauty -> (X -> mu+ mu-) (X -> ^mu+ mu-) X ]CC" : "Muon3BDT",
+                                         "[ Beauty -> (X -> mu+ mu-) (X -> mu+ ^mu-) X ]CC" : "Muon4BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B26mXLine_LongLived = StrippingLine(sixmX_longlived_Line_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB26mX_LongLived,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> (X -> ^mu+ mu-) (X -> mu+ mu-) (X -> mu+ mu-) X ]CC" : "Muon1BDT",
+                                         "[ Beauty -> (X -> mu+ ^mu-) (X -> mu+ mu-) (X -> mu+ mu-) X ]CC" : "Muon2BDT",
+                                         "[ Beauty -> (X -> mu+ mu-) (X -> ^mu+ mu-) (X -> mu+ mu-) X ]CC" : "Muon3BDT",
+                                         "[ Beauty -> (X -> mu+ mu-) (X -> mu+ ^mu-) (X -> mu+ mu-) X ]CC" : "Muon4BDT",
+                                         "[ Beauty -> (X -> mu+ mu-) (X -> mu+ mu-) (X -> ^mu+ mu-) X ]CC" : "Muon5BDT",
+                                         "[ Beauty -> (X -> mu+ mu-) (X -> mu+ mu-) (X -> mu+ ^mu-) X ]CC" : "Muon6BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B24mXUpLine = StrippingLine(fourmXUpLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB24mXUp,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> (X -> ^mu+ mu+ mu- mu-) X ]CC" : "Muon1BDT",
+                                         "[ Beauty -> (X -> mu+ ^mu+ mu- mu-) X ]CC" : "Muon2BDT",
+                                         "[ Beauty -> (X -> mu+ mu+ ^mu- mu-) X ]CC" : "Muon3BDT",
+                                         "[ Beauty -> (X -> mu+ mu+ mu- ^mu-) X ]CC" : "Muon4BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B24mXTightLine = StrippingLine(fourmXLineTight_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB24mXTight,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> (X -> ^mu+ mu+ mu- mu-) X ]CC" : "Muon1BDT",
+                                         "[ Beauty -> (X -> mu+ ^mu+ mu- mu-) X ]CC" : "Muon2BDT",
+                                         "[ Beauty -> (X -> mu+ mu+ ^mu- mu-) X ]CC" : "Muon3BDT",
+                                         "[ Beauty -> (X -> mu+ mu+ mu- ^mu-) X ]CC" : "Muon4BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B22m2eXTightLine = StrippingLine(twomutwoeXLineTight_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB22m2eXTight,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> (X -> ( X0 -> ^mu+ mu-) X0) X ]CC" : "Muon1BDT",
+                                         "[ Beauty -> (X -> ( X0 -> mu+ ^mu-) X0) X ]CC" : "Muon2BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B24mInclLowLine = StrippingLine(Incl4mLowLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelFourMuonDetachedInclLow,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> ^mu+ mu+ mu- mu- " : "Muon1BDT",
+                                         " X -> mu+ ^mu+ mu- mu- " : "Muon2BDT",
+                                         " X -> mu+ mu+ ^mu- mu- " : "Muon3BDT",
+                                         " X -> mu+ mu+ mu- ^mu- " : "Muon4BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B24mInclLowUpLine = StrippingLine(Incl4mLowUpLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelFourMuonDetachedInclLowUp,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> ^mu+ mu+ mu- mu- " : "Muon1BDT",
+                                         " X -> mu+ ^mu+ mu- mu- " : "Muon2BDT",
+                                         " X -> mu+ mu+ ^mu- mu- " : "Muon3BDT",
+                                         " X -> mu+ mu+ mu- ^mu- " : "Muon4BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B24mInclLine = StrippingLine(Incl4mLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelFourMuonDetachedIncl,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> ^mu+ mu+ mu- mu- " : "Muon1BDT",
+                                         " X -> mu+ ^mu+ mu- mu- " : "Muon2BDT",
+                                         " X -> mu+ mu+ ^mu- mu- " : "Muon3BDT",
+                                         " X -> mu+ mu+ mu- ^mu- " : "Muon4BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B22m2mInclLine = StrippingLine(Incl2m2mLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = Sel2mu2muDetachedIncl,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu+ mu-) (X -> mu+ mu-) " : "Muon1BDT",
+                                         " X -> (X -> mu+ ^mu-) (X -> mu+ mu-) " : "Muon2BDT",
+                                         " X -> (X -> mu+ mu-) (X -> ^mu+ mu-) " : "Muon3BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ ^mu-) " : "Muon4BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B26mInclLine = StrippingLine(Incl6mLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelSixMuonDetachedIncl,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu- mu- mu-) (X -> mu+ mu+ mu+) " : "Muon1BDT",
+                                         " X -> (X -> mu- ^mu- mu-) (X -> mu+ mu+ mu+) " : "Muon2BDT",
+                                         " X -> (X -> mu- mu- ^mu-) (X -> mu+ mu+ mu+) " : "Muon3BDT",
+                                         " X -> (X -> mu- mu- mu-) (X -> ^mu+ mu+ mu+) " : "Muon4BDT",
+                                         " X -> (X -> mu- mu- mu-) (X -> mu+ ^mu+ mu+) " : "Muon5BDT",
+                                         " X -> (X -> mu- mu- mu-) (X -> mu+ mu+ ^mu+) " : "Muon6BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.B26m3xInclLine = StrippingLine(Incl6m3xLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelSixMuon3xDetachedIncl,
+                                       FILTER            = SPDFilter,
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu+ mu-) (X -> mu+ mu-) (X -> mu+ mu-)" : "Muon1BDT",
+                                         " X -> (X -> mu+ ^mu-) (X -> mu+ mu-) (X -> mu+ mu-)" : "Muon2BDT",
+                                         " X -> (X -> mu+ mu-) (X -> ^mu+ mu-) (X -> mu+ mu-)" : "Muon3BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ ^mu-) (X -> mu+ mu-)" : "Muon4BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ mu-) (X -> ^mu+ mu-)" : "Muon5BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ mu-) (X -> mu+ ^mu-)" : "Muon6BDT",
+                                         }
+                                         },
+                                       ],
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       MDSTFlag          = False )
+
+        self.B26m3xInclLongLivedLine = StrippingLine(Incl6m_longlived_Line_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelSixMuonLongLivedIncl,
+                                       FILTER            = SPDFilter,
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu+ mu-) (X -> mu+ mu-) (X -> mu+ mu-)" : "Muon1BDT",
+                                         " X -> (X -> mu+ ^mu-) (X -> mu+ mu-) (X -> mu+ mu-)" : "Muon2BDT",
+                                         " X -> (X -> mu+ mu-) (X -> ^mu+ mu-) (X -> mu+ mu-)" : "Muon3BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ ^mu-) (X -> mu+ mu-)" : "Muon4BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ mu-) (X -> ^mu+ mu-)" : "Muon5BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ mu-) (X -> mu+ ^mu-)" : "Muon6BDT",
+                                         }
+                                         },
+                                       ],
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       MDSTFlag          = False )
+
+        self.B28m4xInclLongLivedLine = StrippingLine(Incl8m4x_longlived_Line_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelOttoMuon4xLongLivedIncl,
+                                       FILTER            = SPDFilter,
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu+ mu-) (X -> mu+ mu-) (X -> mu+ mu-) (X -> mu+ mu-)" : "Muon1BDT",
+                                         " X -> (X -> mu+ ^mu-) (X -> mu+ mu-) (X -> mu+ mu-) (X -> mu+ mu-)" : "Muon2BDT",
+                                         " X -> (X -> mu+ mu-) (X -> ^mu+ mu-) (X -> mu+ mu-) (X -> mu+ mu-)" : "Muon3BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ ^mu-) (X -> mu+ mu-) (X -> mu+ mu-)" : "Muon4BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ mu-) (X -> ^mu+ mu-) (X -> mu+ mu-)" : "Muon5BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ mu-) (X -> mu+ ^mu-) (X -> mu+ mu-)" : "Muon6BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ mu-) (X -> mu+ mu-) (X -> ^mu+ mu-)" : "Muon7BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ mu-) (X -> mu+ mu-) (X -> mu+ ^mu-)" : "Muon8BDT",
+                                         }
+                                         },
+                                       ],
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       MDSTFlag          = False )
+
+        self.B25mInclLine = StrippingLine(Incl5mLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelFiveMuonDetachedIncl,
+                                       FILTER            = SPDFilter,
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ X -> ^mu+ mu+ mu- mu- mu-]CC" : "Muon1BDT",
+                                         "[ X -> mu+ ^mu+ mu- mu- mu-]CC" : "Muon2BDT",
+                                         "[ X -> mu+ mu+ ^mu- mu- mu-]CC" : "Muon3BDT",
+                                         "[ X -> mu+ mu+ mu- ^mu- mu-]CC" : "Muon4BDT",
+                                         "[ X -> mu+ mu+ mu- mu- ^mu-]CC" : "Muon5BDT",
+                                         }
+                                         },
+                                       ],
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       MDSTFlag          = False )
+
+        self.B26mInclPromptLine = StrippingLine(InclPrompt6mLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelSixMuonPromptIncl,
+                                       FILTER            = SPDFilter,
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu- mu- mu-) (X -> mu+ mu+ mu+) " : "Muon1BDT",
+                                         " X -> (X -> mu- ^mu- mu-) (X -> mu+ mu+ mu+) " : "Muon2BDT",
+                                         " X -> (X -> mu- mu- ^mu-) (X -> mu+ mu+ mu+) " : "Muon3BDT",
+                                         " X -> (X -> mu- mu- mu-) (X -> ^mu+ mu+ mu+) " : "Muon4BDT",
+                                         " X -> (X -> mu- mu- mu-) (X -> mu+ ^mu+ mu+) " : "Muon5BDT",
+                                         " X -> (X -> mu- mu- mu-) (X -> mu+ mu+ ^mu+) " : "Muon6BDT",
+                                         }
+                                         },
+                                       ],
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       MDSTFlag          = False )
+
+        self.B28mInclPromptLine = StrippingLine(Incl8mLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelOttoMuonPromptIncl,
+                                       FILTER            = SPDFilter,
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu- mu- mu- mu-) (X -> mu+ mu+ mu+ mu+) " : "Muon1BDT",
+                                         " X -> (X -> mu- ^mu- mu- mu-) (X -> mu+ mu+ mu+ mu+) " : "Muon2BDT",
+                                         " X -> (X -> mu- mu- ^mu- mu-) (X -> mu+ mu+ mu+ mu+) " : "Muon3BDT",
+                                         " X -> (X -> mu- mu- mu- ^mu-) (X -> mu+ mu+ mu+ mu+) " : "Muon4BDT",
+                                         " X -> (X -> mu- mu- mu- mu-) (X -> ^mu+ mu+ mu+ mu+) " : "Muon5BDT",
+                                         " X -> (X -> mu- mu- mu- mu-) (X -> mu+ ^mu+ mu+ mu+) " : "Muon6BDT",
+                                         " X -> (X -> mu- mu- mu- mu-) (X -> mu+ mu+ ^mu+ mu+) " : "Muon7BDT",
+                                         " X -> (X -> mu- mu- mu- mu-) (X -> mu+ mu+ mu+ ^mu+) " : "Muon8BDT",
+                                         }
+                                         },
+                                       ],
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       MDSTFlag          = False )
+
+        self.B28m4xInclPromptLine = StrippingLine(Incl8m4xLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelOttoMuon4xPromptIncl,
+                                       FILTER            = SPDFilter,
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu- mu- mu- mu-) (X -> mu+ mu+ mu+ mu+) " : "Muon1BDT",
+                                         " X -> (X -> mu- ^mu- mu- mu-) (X -> mu+ mu+ mu+ mu+) " : "Muon2BDT",
+                                         " X -> (X -> mu- mu- ^mu- mu-) (X -> mu+ mu+ mu+ mu+) " : "Muon3BDT",
+                                         " X -> (X -> mu- mu- mu- ^mu-) (X -> mu+ mu+ mu+ mu+) " : "Muon4BDT",
+                                         " X -> (X -> mu- mu- mu- mu-) (X -> ^mu+ mu+ mu+ mu+) " : "Muon5BDT",
+                                         " X -> (X -> mu- mu- mu- mu-) (X -> mu+ ^mu+ mu+ mu+) " : "Muon6BDT",
+                                         " X -> (X -> mu- mu- mu- mu-) (X -> mu+ mu+ ^mu+ mu+) " : "Muon7BDT",
+                                         " X -> (X -> mu- mu- mu- mu-) (X -> mu+ mu+ mu+ ^mu+) " : "Muon8BDT",
+                                         }
+                                         },
+                                       ],
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       MDSTFlag          = False )
+
+        self.Jpsi24MuPromptLine = StrippingLine(Jpsi24MuPromptLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelJpsi24MuPrompt,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu+ mu-) (X -> mu+ mu-) " : "Muon1BDT",
+                                         " X -> (X -> mu+ ^mu-) (X -> mu+ mu-) " : "Muon2BDT",
+                                         " X -> (X -> mu+ mu-) (X -> ^mu+ mu-) " : "Muon3BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ ^mu-) " : "Muon4BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.Jpsi24MuPromptTightLine = StrippingLine(Jpsi24MuPromptTightLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelJpsi24MuPromptTight,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu+ mu-) (X -> mu+ mu-) " : "Muon1BDT",
+                                         " X -> (X -> mu+ ^mu-) (X -> mu+ mu-) " : "Muon2BDT",
+                                         " X -> (X -> mu+ mu-) (X -> ^mu+ mu-) " : "Muon3BDT",
+                                         " X -> (X -> mu+ mu-) (X -> mu+ ^mu-) " : "Muon4BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.Jpsi22Mu2EPromptLine = StrippingLine(Jpsi22Mu2EPromptLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelJpsi22Mu2EPrompt,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu+ mu-) X " : "Muon1BDT",
+                                         " X -> (X -> mu+ ^mu-) X " : "Muon2BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.Jpsi22Mu2EDetachedLine = StrippingLine(Jpsi22Mu2EDetLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelJpsi22Mu2EDetachedIncl,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         " X -> (X -> ^mu+ mu-) X " : "Muon1BDT",
+                                         " X -> (X -> mu+ ^mu-) X " : "Muon2BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.Jpsi22E2EDetachedLine = StrippingLine(Jpsi22E2EDetLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelJpsi22E2EDetachedIncl,
+                                       FILTER            = SPDFilter,
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       MDSTFlag          = False )
+
+        self.Jpsi22Mu2ESSDetachedLine = StrippingLine(Jpsi22Mu2ESSDetLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelJpsi22Mu2ESSDetachedIncl,
+                                       FILTER            = SPDFilter,
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ X -> (X -> ^mu+ X) (X -> mu+ X) ]CC" : "Muon1BDT",
+                                         "[ X -> (X -> mu+ X) (X -> ^mu+ X) ]CC" : "Muon2BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.Jpsi23MuEDetachedLine = StrippingLine(Jpsi23MuEDetLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelJpsi23MuEDetachedIncl,
+                                       FILTER            = SPDFilter,
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ X ->  ^mu+ mu+ mu- X ]CC" : "Muon1BDT",
+                                         "[ X ->  mu+ ^mu+ mu- X ]CC" : "Muon2BDT",
+                                         "[ X ->  mu+ mu+ ^mu- X ]CC" : "Muon3BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.Jpsi23MuEPromptLine = StrippingLine(Jpsi23MuEPromptLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelJpsi23MuEPromptIncl,
+                                       FILTER            = SPDFilter,
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ X ->  ^mu+ mu+ mu- X ]CC" : "Muon1BDT",
+                                         "[ X ->  mu+ ^mu+ mu- X ]CC" : "Muon2BDT",
+                                         "[ X ->  mu+ mu+ ^mu- X ]CC" : "Muon3BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.Jpsi2Mu3EDetachedLine = StrippingLine(Jpsi2Mu3EDetLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelJpsi2Mu3EDetachedIncl,
+                                       FILTER            = SPDFilter,
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ X ->  (X -> ^mu+ X) X ]CC" : "Muon1BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+
+        self.Jpsi2Mu3EPromptLine = StrippingLine(Jpsi2Mu3EPromptLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelJpsi2Mu3EPromptIncl,
+                                       FILTER            = SPDFilter,
+                                       #RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                       RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ X ->  ^mu+ X X ]CC" : "Muon1BDT",
+                                         }
+                                         },
+                                       ],
+                                       MDSTFlag          = False )
+        # 6 : Register Lines
+
+
+        self.registerLine( self.B24mXLine )
+        self.registerLine( self.B24mXTightLine )
+        self.registerLine( self.B22m2eXTightLine )
+        self.registerLine( self.B24mXUpLine )
+
+        self.registerLine( self.B24mInclLine )
+        self.registerLine( self.B24mInclLowLine )
+        self.registerLine( self.B24mInclLowUpLine )
+        self.registerLine( self.B22m2mInclLine )
+        self.registerLine( self.B25mInclLine )
+        self.registerLine( self.B26mInclLine )
+        self.registerLine( self.B26m3xInclLine )
+        self.registerLine( self.B26mInclPromptLine )
+        self.registerLine( self.B28mInclPromptLine )
+        self.registerLine( self.B28m4xInclPromptLine )
+
+        self.registerLine( self.Jpsi24MuPromptLine )
+        self.registerLine( self.Jpsi24MuPromptTightLine )
+        self.registerLine( self.Jpsi22Mu2EPromptLine )
+        self.registerLine( self.Jpsi22Mu2EDetachedLine )
+        self.registerLine( self.Jpsi22E2EDetachedLine )
+        self.registerLine( self.Jpsi22Mu2ESSDetachedLine )
+        self.registerLine( self.Jpsi23MuEDetachedLine )
+        self.registerLine( self.Jpsi23MuEPromptLine )
+        self.registerLine( self.Jpsi2Mu3EDetachedLine )
+        self.registerLine( self.Jpsi2Mu3EPromptLine )
+
+#added for the 2018 restripping
+
+        self.registerLine( self.B24mXLine_LongLived )
+        self.registerLine( self.B26mXLine_LongLived )
+        self.registerLine( self.B26m3xInclLongLivedLine )
+        self.registerLine( self.B28m4xInclLongLivedLine )
+
+#####################################################
+    def _filterKaon( self, name, sel, params ):
+        """
+        Filter for all hadronic final states
+        """
+
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+        # need to add the ID here
+        _Code = "(PT > %(KaonPTTight)s *MeV) & (P > 2000 *MeV) & " \
+                "((ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))) & " \
+                "(PROBNNk > 0.15)" % params
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
+#####################################################
+    def _filterHadron( self, name, sel, params ):
+        """
+        Filter for all hadronic final states
+        """
+
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+        # need to add the ID here
+        _Code = "(PT > %(KaonPT)s *MeV) & " \
+                "((ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) | " \
+                "(NDAUGHTERS == NINTREE(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))))" % params
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
+#####################################################
+    def _filterPhi( self, name, sel, params ):
+        """
+        Filter for Std Phi
+        """
+
+        _Code = "(PT > %(KaonPT)s *MeV) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)  & (0.5 < NINTREE((ABSID==321) & (PROBNNk>0.1)))"% params # \
+                #"((2 == NINTREE((ABSID==321) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))))" % params
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
+#####################################################
+    def _filterKst( self, name, sel, params ):
+        """
+        Filter for Std Kstar
+        """
+
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+        # need to add the ID here
+        _Code = "(PT > 500 *MeV) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (1 == NINTREE((ABSID==321) & (PROBNNk>0.2)))"% params # \
+                #"((2 == NINTREE((ABSID==321) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))))" % params
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
+#####################################################
+    def _filterLst( self, name, sel, params ):
+        """
+        Filter for Std Lambdastar
+        """
+
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+        # need to add the ID here
+        _Code = "(PT > 500 *MeV) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (1 == NINTREE((ABSID==321) & (PROBNNk>0.2)))  & (1 == NINTREE((ABSID==2212) & (PROBNNp>0.2) & (P>7000)))"% params # \
+                #"((2 == NINTREE((ABSID==321) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))))" % params
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
+
+#####################################################
+    def _filterLongLivedHadron( self, name, sel, params ):
+        """
+        Filter for all hadronic final states
+        """
+
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+        _Code = "(PT > %(KaonPT)s *MeV) & (BPVLTIME() > %(V0TAU)s * ns)" % params
+
+        _Filter = FilterDesktop( Code = _Code )
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
+
+#####################################################
+#leptons
+#####################################################
+    def _makeDiMuonDetached( self, name, params ) :
+        """
+        Make a dimuon
+        rho(770)0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "rho(770)0 -> mu+ mu-"
+
+         # define all the cuts
+        _CombCuts    = "(AM > 0*MeV) & (ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 9) & (MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s)" % params
+        _daughtersCutsmu = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdNoPIDLooseMuons ] )
+
+#####################################################
+    def _makeMuEDetached( self, name, params ) :
+        """
+        Make a mu+e-
+        rho(1700) is just a proxy to get the two-body combination.
+        It is made charged so that particle != antiparticle.
+        """
+
+        _Decays = "[rho(1700)+ -> e+ mu-]cc"
+
+         # define all the cuts
+        _CombCuts    = "(AM > 0*MeV) & (ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 9) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s)" % params
+        _daughtersCutsmu = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params
+        _daughtersCutse = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PIDe>-1)" % params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu,
+            "e-"  : _daughtersCutse }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+        _stdAllLooseElectrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdNoPIDLooseMuons, _stdAllLooseElectrons ] )
+
+#####################################################
+    def _makeDiElectron( self, name, params ) :
+        """
+        Make a dielectron
+        omega(782) is just a proxy to get the two-body combination
+        """
+
+        from Configurables import DiElectronMaker, ProtoParticleCALOFilter
+
+        dieLL = DiElectronMaker('MyDiElectronFromTracks')
+        dieLL.Particle = "omega(782)"
+        selector = trackSelector ( dieLL , trackTypes = ["Long"] )
+        dieLL.addTool( ProtoParticleCALOFilter, name='Electron' )
+        dieLL.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'-2.0'"]
+        dieLL.DiElectronMassMax = 500000.*MeV
+        dieLL.DiElectronMassMin = 0.*MeV
+        dieLL.DiElectronPtMin = 200.*MeV
+
+
+        return Selection( name, Algorithm = dieLL )
+
+#####################################################
+    def _makeDiMuonPrompt( self, name, params ) :
+        """
+        Make a dimuon
+        rho(770)0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "rho(770)0 -> mu+ mu-"
+
+         # define all the cuts
+        _CombCuts    = "(AM > 0*MeV) & (ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 9) " % params
+        _daughtersCutsmu = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (ISMUON) & (PROBNNmu>0.2) " % params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+        _stdLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdLooseMuons ] )
+# added for the 2018 restripping: dileptons from the KS intermediate particle, to allow for lifetime in the vertex fit
+#####################################################
+    # def _makeDiElectronLongLived( self, name, params ) :
+    #     """
+    #     Make a dielectron
+    #     KS0 is just a proxy to get the two-body combination
+    #     """
+    #
+    #     from Configurables import DiElectronMaker, ProtoParticleCALOFilter
+    #
+    #     dieLL = DiElectronMaker('MyDiElectronFromTracks')
+    #     dieLL.Particle = "KS0"
+    #     selector = trackSelector ( dieLL , trackTypes = ["Long"] )
+    #     dieLL.addTool( ProtoParticleCALOFilter, name='Electron' )
+    #     dieLL.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'-1.0'"]
+    #     dieLL.DiElectronMassMax = 500000.*MeV
+    #     dieLL.DiElectronMassMin = 0.*MeV
+    #     dieLL.DiElectronPtMin = 200.*MeV
+    #
+    #
+    #     return Selection( name, Algorithm = dieLL )
+
+#####################################################
+    def _makeDiMuonLongLived( self, name, params ) :
+        """
+        Make a dimuon
+        KS0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "KS0 -> mu+ mu-"
+
+         # define all the cuts
+        _CombCuts    = "(AM > 0*MeV) & (ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 9) & (BPVVDCHI2>16)"
+
+        _daughtersCutsmu = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)" % params# & (ISMUON) & (PROBNNmu>0.1) " % params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+        _stdLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdLooseMuons ] )
+
+#####################################################
+    def _makeFourMuonDetached( self, name, params ) :
+        """
+        Make a 4-muon
+        Jpsi is just a proxy to get the 4-body combination
+        """
+        _Decays = "J/psi(1S) -> mu+ mu+ mu- mu-"
+        #_Decays = "J/psi(1S) -> rho(770)0 rho(770)0"
+
+         # define all the cuts
+        _CombCuts12    = "(ACUTDOCACHI2(9,'')) & (AM<6700*MeV) & ( ANUM (( 'mu-' == ABSID ) & ISMUON )> 0.5)" % params
+        _CombCuts123    = "(ACUTDOCACHI2(9,'')) & (APT > 500*MeV) & (AM<6800*MeV)" % params
+
+        _CombCuts    = "(ACUTDOCACHI2(10,'')) & (AM<6900*MeV) & ( ANUM (( 'mu-' == ABSID ) & ISMUON )> 2.5) & (1.5<ANUM( ('mu+'==ABSID) & (MIPCHI2DV(PRIMARY)>6)))" % params
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 9) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s)  & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.2) )> 1.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 1.5  )" % params
+        _daughtersCuts = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params
+
+        _Combine = DaVinci__N4BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCuts }
+
+        _Combine.Combination12Cut   = _CombCuts12
+        _Combine.Combination123Cut   = _CombCuts123
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdNoPIDLooseMuons ] )
+
+#####################################################
+    def _makeFourMuonDetachedUp( self, name, params ) :
+        """
+        Make a 4-muon with 1 upstream and 3 long tracks.
+        Jpsi is just a proxy to get the 4-body combination
+        """
+        _Decays = "J/psi(1S) -> mu+ mu+ mu- mu-"
+        #_Decays = "J/psi(1S) -> rho(770)0 rho(770)0"
+
+         # define all the cuts
+        _CombCuts12    = "(ACUTDOCACHI2(9,'')) & (AM<6700*MeV) & ( ANUM (( 'mu-' == ABSID ) & ISMUON )> 0.5) & ( ANUM (( 'mu-' == ABSID ) & ISLONG )> 0.5)" % params
+        _CombCuts123    = "(ACUTDOCACHI2(9,'')) & (APT > 500*MeV) & (AM<6800*MeV) & ( ANUM (( 'mu-' == ABSID ) & ISLONG )> 1.5)" % params
+
+        _CombCuts    = "(ACUTDOCACHI2(10,'')) & (AM<6900*MeV) & ( ANUM (( 'mu-' == ABSID ) & ISMUON )> 2.5) & (1.5<ANUM( ('mu+'==ABSID) & (MIPCHI2DV(PRIMARY)>6)))  & ( ANUM (( 'mu-' == ABSID ) & ISLONG )==3)  & ( ANUM (( 'mu-' == ABSID ) & ISUP )==1)" % params
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 9) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s)  & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.2) )> 1.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 1.5  )" % params
+        _daughtersCuts = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & ((ISLONG & ISMUON) | (ISUP & (PPINFO(LHCb.ProtoParticle.RichDLLmu,-1000)>-2)))" % params
+
+        _Combine = DaVinci__N4BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCuts }
+
+        _Combine.Combination12Cut   = _CombCuts12
+        _Combine.Combination123Cut   = _CombCuts123
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+        _stdNoPIDUpMuons = DataOnDemand(Location = "Phys/StdNoPIDsUpMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdNoPIDLooseMuons, _stdNoPIDUpMuons ] )
+
+
+#####################################################
+    def _makeFourMuonPromptJpsi( self, name, dilepton, params ) :
+        """
+        Make a 4-muon in charmonium window
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+        _Decays = "J/psi(1S) -> rho(770)0 rho(770)0"
+
+         # define all the cuts
+        _CombCuts    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 10) & (MAXTREE('mu+'==ABSID,PT) > 400.0 *MeV)  & (MAXTREE('mu+'==ABSID,PROBNNmu) > 0.4)  & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>300) )> 2.5  )" % params #(M > 2500*MeV) & (M < 4400*MeV) &
+        _daughtersCuts = "(PT > 400*MeV) & ( NINTREE (( 'mu-' == ABSID ) & (PROBNNmu>0.1))> 1.5)" #% params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)0"  : _daughtersCuts }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dilepton ] )
+
+#####################################################
+    def _makeFourMuonPromptJpsiTight( self, name, dilepton, params ) :
+        """
+        Make a 4-muon in charmonium window
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+        _Decays = "J/psi(1S) -> rho(770)0 rho(770)0"
+
+         # define all the cuts
+        _CombCuts    = "(ACUTDOCACHI2(10,''))" #% params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 9) & (MAXTREE('mu+'==ABSID,PT) > 500.0 *MeV)  & (MAXTREE('mu+'==ABSID,PROBNNmu) > 0.5)  & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 2.5  )" % params #(M > 2500*MeV) & (M < 4400*MeV) &
+        _daughtersCuts = "(PT > 550*MeV) & ( NINTREE (( 'mu-' == ABSID ) & (PROBNNmu>0.3))> 1.5)" #% params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)0"  : _daughtersCuts }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dilepton ] )
+
+#####################################################
+    def _make2Mu2EPrompt( self, name, dimuon, dielectron, params ) :
+        """
+        Make a mu+mu-e+e- in charmonium window
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+        _Decays = "J/psi(1S) -> rho(770)0 omega(782)"
+
+         # define all the cuts
+        _CombCuts    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 10) & (MAXTREE(14>ABSID,PT) > 400.0 *MeV) & ( NINTREE ( ( 14>ABSID ) & (PT>300) )> 2.5  )" % params #(M > 2500*MeV) & (M < 4400*MeV) &
+        _daughtersCutsMuMu = "(PT > 400*MeV) & (MAXTREE('mu+'==ABSID,PROBNNmu) > 0.3)" #% params
+        _daughtersCutsEE = "(PT > 400*MeV) & (MINTREE('e+'==ABSID,PROBNNe) > 0.1)  & (MINTREE('e+'==ABSID,PIDe) > 1)"
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)0"  : _daughtersCutsMuMu,
+            "omega(782)"  : _daughtersCutsEE, }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dimuon, dielectron ] )
+
+
+#####################################################
+    # def _make2Mu2EDetached( self, name, dimuon, dielectron, params ) :
+    #     """
+    #     Make a mu+mu-e+e- in charmonium window
+    #     Jpsi is a proxy to get the 4-body combination
+    #     """
+    #
+    #     _Decays = "J/psi(1S) -> rho(770)0 omega(782)"
+    #
+    #      # define all the cuts
+    #     _CombCuts    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+    #
+    #     _MotherCuts  = "(VFASPF(VCHI2PDOF) < %(K1_VtxChi2)s) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & ( NINTREE ( ( 14>ABSID ) & (PT>400) )> 1.5  )" % params
+    #     #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 10) & (MAXTREE(14>ABSID,PT) > 400.0 *MeV) & ( NINTREE ( ( 14>ABSID ) & (PT>300) )> 2.5  )" % params #(M > 2500*MeV) & (M < 4400*MeV) &
+    #     _daughtersCutsMuMu = "(PT > 400*MeV) & (MAXTREE('mu+'==ABSID,PROBNNmu) > 0.1)" #% params
+    #     _daughtersCutsEE = "(PT > 400*MeV) & (MINTREE('e+'==ABSID,PROBNNe) > 0.1)  & (MINTREE('e+'==ABSID,PIDe) > 0)"
+    #
+    #     _Combine = CombineParticles()
+    #
+    #     _Combine.DecayDescriptor = _Decays
+    #
+    #     _Combine.DaughtersCuts = {
+    #         "rho(770)0"  : _daughtersCutsMuMu,
+    #         "omega(782)"  : _daughtersCutsEE, }
+    #
+    #     _Combine.CombinationCut   = _CombCuts
+    #     _Combine.MotherCut        = _MotherCuts
+    #
+    #
+    #     return Selection( name, Algorithm = _Combine, RequiredSelections = [ dimuon, dielectron ] )
+#####################################################
+
+
+#####################################################
+    def _makeB24muX( self, name, fourlepton, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [
+                    "[ B+ -> J/psi(1S) K+ ]cc",
+                    "B_s0 -> J/psi(1S) phi(1020)",
+                    " B0 -> J/psi(1S) KS0 ",
+                    "[ B0 -> J/psi(1S) K*(892)0 ]cc",
+                    "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc ",
+                    "[Lambda_b0 -> J/psi(1S) Lambda0]cc ",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Combine.DaughtersCuts = {
+            "J/psi(1S)"  : "(M < 6100)  & (NINTREE ( ( 'mu-' == ABSID ) & (ISLONG) & ((PROBNNmu>0.15)) )>2.5)" }
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ fourlepton, _Merge ] )
+
+#####################################################
+    def _makeB24muXTight( self, name, fourlepton, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [
+                    "[ B+ -> J/psi(1S) K+ ]cc",
+                    "B_s0 -> J/psi(1S) phi(1020)",
+                    " B0 -> J/psi(1S) KS0 ",
+                    "[ B0 -> J/psi(1S) K*(892)0 ]cc",
+                    "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc ",
+                    "[Lambda_b0 -> J/psi(1S) Lambda0]cc ",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > 55))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Combine.DaughtersCuts = {
+            "J/psi(1S)"  : "(M < 6100) & (NINTREE ( ( 'mu-' == ABSID ) & (ISMUON & (PROBNNmu>0.15)) )==4)" }
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ fourlepton, _Merge ] )
+
+#####################################################
+    def _makeB24muX_LongLived( self, name, dilepton, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [
+                    "[ B+ -> KS0 KS0 K+ ]cc",
+                    "B_s0 -> KS0 KS0 phi(1020)",
+                    #" B0 -> J/psi(1S) KS0 ",
+                    "[ B0 -> KS0 KS0 K*(892)0 ]cc",
+                    "[Lambda_b0 -> KS0 KS0 Lambda(1520)0]cc ",
+                    "[Lambda_b0 -> KS0 KS0 Lambda0]cc ",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 2.5)"\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Combine.DaughtersCuts = {
+            "KS0"  : "(M < 6100)  & (NINTREE ( ( 'mu-' == ABSID ) & (ISLONG) & ((PROBNNmu>0.1)) )>0.5)" }
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+
+#####################################################
+    def _makeB26muX_LongLived( self, name, dilepton, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [
+                    "[ B+ -> KS0 KS0 KS0 K+ ]cc",
+                    "B_s0 -> KS0 KS0 KS0 phi(1020)",
+                    #" B0 -> J/psi(1S) KS0 ",
+                    "[ B0 -> KS0 KS0 KS0 K*(892)0 ]cc",
+                    "[Lambda_b0 -> KS0 KS0 KS0 Lambda(1520)0]cc ",
+                    "[Lambda_b0 -> KS0 KS0 KS0 Lambda0]cc ",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 4.5)"\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Combine.DaughtersCuts = {
+            "KS0"  : "(M < 6100)  & (NINTREE ( ( 'mu-' == ABSID ) & (ISLONG) & ((PROBNNmu>0.1)) )>0.5)" }
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+
+#####################################################
+    def _makeB22mu2EXTight( self, name, fourlepton, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the B
+        """
+
+        _Decays = [
+                    "[ B+ -> J/psi(1S) K+ ]cc",
+                    "B_s0 -> J/psi(1S) phi(1020)",
+                    " B0 -> J/psi(1S) KS0 ",
+                    "[ B0 -> J/psi(1S) K*(892)0 ]cc",
+                    "[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc ",
+                    "[Lambda_b0 -> J/psi(1S) Lambda0]cc ",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > 50))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Combine.DaughtersCuts = {
+            "J/psi(1S)"  : "(M < 6300)" } #" & (NINTREE ( ( 'mu-' == ABSID ) & ISMUON )==2) & (NINTREE ( ( 'e-' == ABSID ) & PIDe>0 )==2)" }
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ fourlepton, _Merge ] )
+
+# #####################################################
+
+#####################################################
+    def _make2mu2muInclDet( self, name, dilepton, params ) :
+        """
+        Make a 4-muon consisting of 2 dimuons
+        This makes some freedom for dimuon pairs to fly, but can lead to duplicates.
+        Jpsi is just a proxy to get the 4-body combination
+        """
+
+        _Decays = "J/psi(1S) -> rho(770)0 rho(770)0"
+
+         # define all the cuts
+        _CombCuts    = "(AM < 7700*MeV) " #(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params # (AM <6000*MeV) &
+
+        #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 16) & (MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.2) )> 2.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 1.5  ) & (BPVDIRA > 0.99) " % params
+        _MotherCuts  = "(BPVDLS>3) & (VFASPF(VCHI2PDOF) < 12) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.2) )> 2.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>300) )> 1.5) & (MAXTREE('mu+'==ABSID,PT) > 550.0 *MeV)  & (BPVDIRA > 0.999) & (M<7500*MeV)" % params
+        _daughtersCuts = "(NINTREE ( ( 'mu-' == ABSID ) & (ISMUON) & (PROBNNmu>0.15) )>1.5) " #% params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)0"  : _daughtersCuts }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dilepton ] )
+
+#####################################################
+    def _make4muInclDet( self, name, params ) :
+        """
+        Make a 4-muon
+        Jpsi is just a proxy to get the 4-body combination
+        """
+
+        _Decays = "J/psi(1S) -> mu+ mu+ mu- mu-"
+
+         # define all the cuts
+        _CombCuts12    = "(ACUTDOCACHI2(10,''))" #(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params # (AM <6000*MeV) &
+        _CombCuts123    = "(ACUTDOCACHI2(16,'')) & (APT > 500*MeV)"
+        _CombCuts    = "(ACUTDOCACHI2(16,'')) & ( AMAXCHILD('mu+'==ABSID,PT) > 500.0 *MeV) & ( ANUM ( ( 'mu-' == ABSID ) & (PT>300) )> 1.5)"
+
+        #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 16) & (MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.2) )> 2.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 1.5  ) & (BPVDIRA > 0.99) " % params
+        _MotherCuts  = "(((BPVDLS>3))) & (VFASPF(VCHI2PDOF) < 9) & (BPVDIRA > 0.995)" % params
+        _daughtersCuts = "ISMUON & (PROBNNmu>0.2)" #% params
+
+        _Combine = DaVinci__N4BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCuts }
+
+        _Combine.Combination12Cut   = _CombCuts12
+        _Combine.Combination123Cut   = _CombCuts123
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdNoPIDLooseMuons ] )
+
+#####################################################
+    def _make4muInclDetLowMass( self, name, params ) :
+        """
+        Make a 4-muon below 2 GeV
+        phi is just a proxy to get the 4-body combination
+        """
+
+        _Decays = "phi(1020) -> mu+ mu+ mu- mu-"
+
+         # define all the cuts
+        _CombCuts12    = "(AM<1800*MeV) & (ACUTDOCACHI2(9,'')) & (ANUM(('mu-' == ABSID) & (ISMUON))> 0.5)" #(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params # (AM <6000*MeV) &
+        _CombCuts123    = "(APT > 300*MeV) & (AM<1900*MeV) & (ACUTDOCACHI2(9,''))  & (ANUM(('mu-' == ABSID) & (ISMUON))> 1.5)"
+        _CombCuts    = "(AM<2000*MeV) & (ACUTDOCACHI2(9,'')) & ( AMAXCHILD('mu+'==ABSID,PT) > 500.0 *MeV) & ( AMAXCHILD('mu+'==ABSID,PROBNNmu) > 0.35) & ( AMAXCHILD('mu+'==ABSID,PT) > 500) & (ANUM(('mu-' == ABSID) & (ISMUON) & (PROBNNmu>0.1))> 2.5) "
+
+        #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 16) & (MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.2) )> 2.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 1.5  ) & (BPVDIRA > 0.99) " % params
+        _MotherCuts  = "(BPVDLS>3) & (VFASPF(VCHI2PDOF) < 9) & (BPVDIRA > 0.995)" % params
+        _daughtersCuts = "(ISMUON) | (PIDmu>0)" #% params
+
+        _Combine = DaVinci__N4BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCuts }
+
+        _Combine.Combination12Cut   = _CombCuts12
+        _Combine.Combination123Cut   = _CombCuts123
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdNoPIDLooseMuons ] )
+
+#####################################################
+    def _make4muInclDetLowMassUp( self, name, params ) :
+        """
+        Make a 4-muon below 2 GeV, allowing for 1 upstream track.
+        phi is just a proxy to get the 4-body combination
+        """
+
+        _Decays = "phi(1020) -> mu+ mu+ mu- mu-"
+
+         # define all the cuts
+        _CombCuts12    = "(AM<1800*MeV) & (ACUTDOCACHI2(9,'')) & (ANUM(('mu-' == ABSID) & (ISMUON))> 0.5) & ( ANUM (( 'mu-' == ABSID ) & ISLONG )> 0.5)" #(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params # (AM <6000*MeV) &
+        _CombCuts123    = "(APT > 300*MeV) & (AM<1900*MeV) & (ACUTDOCACHI2(9,''))  & (ANUM(('mu-' == ABSID) & (ISMUON))> 1.5)"
+        _CombCuts    = "(AM<2000*MeV) & (ACUTDOCACHI2(9,'')) & ( AMAXCHILD('mu+'==ABSID,PT) > 500.0 *MeV) & ( AMAXCHILD('mu+'==ABSID,PROBNNmu) > 0.35) & ( AMAXCHILD('mu+'==ABSID,PT) > 500) & (ANUM(('mu-' == ABSID) & (ISMUON) & (PROBNNmu>0.2))> 1.5) & ( ANUM (( 'mu-' == ABSID ) & ISLONG )==3)  & ( ANUM (( 'mu-' == ABSID ) & ISUP )==1)"
+
+        #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 16) & (MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.2) )> 2.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 1.5  ) & (BPVDIRA > 0.99) " % params
+        _MotherCuts  = "(BPVDLS>3) & (VFASPF(VCHI2PDOF) < 9) & (BPVDIRA > 0.999)" % params
+        #_daughtersCuts = "(ISMUON) | (PIDmu>0)" #% params
+        _daughtersCuts = "((ISLONG & ((ISMUON) | (PIDmu>2))) | (ISUP & (PPINFO(LHCb.ProtoParticle.RichDLLmu,-1000)>2)))" % params
+
+
+        _Combine = DaVinci__N4BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "mu+"  : _daughtersCuts }
+
+        _Combine.Combination12Cut   = _CombCuts12
+        _Combine.Combination123Cut   = _CombCuts123
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+        _stdNoPIDUpMuons = DataOnDemand(Location = "Phys/StdNoPIDsUpMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdNoPIDLooseMuons, _stdNoPIDUpMuons ] )
+
+
+#####################################################
+    def _make6muInclDet( self, name, params ) :
+        """
+        First, make a mu-mu-mu-
+        rho(770)+ is just a proxy to get the two-body combination
+        """
+
+        _Decays3 = "[rho(770)+ -> mu+ mu+ mu+]cc"
+
+         # define all the cuts
+        _CombCuts3    = "(ACUTDOCACHI2(10,'')) & (ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.075) )>1.5) & ( ANUM ( ( 'mu-' == ABSID ) & (PT>300*MeV) )> 1.5) & (APT > 700*MeV)" % params
+
+        _MotherCuts3  = "(VFASPF(VCHI2PDOF) < 9) & (MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s)" % params
+        _daughtersCutsmu3 = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params
+
+        _Combine3m = CombineParticles()
+
+        _Combine3m.DecayDescriptor = _Decays3
+
+        _Combine3m.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu3 }
+
+        _Combine3m.CombinationCut   = _CombCuts3
+        _Combine3m.MotherCut        = _MotherCuts3
+
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        trimuon = Selection( "3MuFor6MuDet", Algorithm = _Combine3m, RequiredSelections = [ _stdNoPIDLooseMuons ] )
+
+        """
+        Make a 6-muon
+        Jpsi is just a proxy to get the 6-body combination
+        """
+#        _Decays = "J/psi(1S) -> mu+ mu+ mu+ mu- mu- mu-"
+        _Decays = "J/psi(1S) -> rho(770)+ rho(770)- "
+
+         # define all the cuts
+        # _CombCuts12  = "(ADOCA(1,2)<0.7*mm) & (APT>300)"
+        # _CombCuts123  = "ACUTDOCACHI2(20,'') & (ANUM (( 'mu-' == ABSID ) & ISMUON )>0.5)  & (ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.05) )>0.5)"
+        # _CombCuts1234  = "ACUTDOCACHI2(20,'')"
+        _CombCuts    = "ACUTDOCACHI2(16,'')" #(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params # (AM <6000*MeV) &
+# & (BPVVDCHI2 > %(DiLeptonFDCHI2)s)
+        _MotherCuts  = "(BPVDLS>3) & (VFASPF(VCHI2PDOF) < 12) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 3.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 3.5  ) & (BPVDIRA > 0.995) & ( NINTREE ( ( 'mu-' == ABSID ) & (ISMUON) )> 4.5)" % params
+        #_MotherCuts  = "(((BPVDLS>3))) & (VFASPF(VCHI2PDOF) < 16) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 3.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>250) )> 3.5) & (MAXTREE('mu+'==ABSID,PT) > 350.0 *MeV)  & (BPVDIRA > 0.999)" % params
+        _daughtersCuts = "(PT>700*MeV)" #(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params #"(NINTREE ( ( 'mu-' == ABSID ) & ISMUON )>0.5) & (PT>300)" #% params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)+"  : _daughtersCuts }
+
+        # _Combine.Combination12Cut   = _CombCuts12
+        # _Combine.Combination123Cut   = _CombCuts123
+        # _Combine.Combination1234Cut   = _CombCuts1234
+        # _Combine.Combination12345Cut   = _CombCuts1234
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+        #_stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ trimuon ] )
+
+#####################################################
+    def _make6muInclPrompt( self, name, params ) :
+        """
+        First, make a mu-mu-mu-
+        rho(770)+ is just a proxy to get the 3-body combination
+        """
+
+        _Decays3 = "[rho(770)+ -> mu+ mu+ mu+]cc"
+
+         # define all the cuts
+        _CombCuts3    = "(ACUTDOCACHI2(10,'')) & (ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.1) )>2.5) & ( ANUM ( ( 'mu-' == ABSID ) & (PT>250*MeV) )> 1.5) & (APT > 600*MeV)" % params
+
+        _MotherCuts3  = "(VFASPF(VCHI2PDOF) < 10)" % params
+        _daughtersCutsmu3 = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params
+
+        _Combine3m = CombineParticles()
+
+        _Combine3m.DecayDescriptor = _Decays3
+
+        _Combine3m.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu3 }
+
+        _Combine3m.CombinationCut   = _CombCuts3
+        _Combine3m.MotherCut        = _MotherCuts3
+
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+
+        trimuon = Selection( "3MuFor6MuPrompt", Algorithm = _Combine3m, RequiredSelections = [ _stdNoPIDLooseMuons ] )
+
+        """
+        Make a 6-muon
+        Jpsi is just a proxy to get the 6-body combination
+        """
+#        _Decays = "J/psi(1S) -> mu+ mu+ mu+ mu- mu- mu-"
+        _Decays = "J/psi(1S) -> rho(770)+ rho(770)- "
+
+         # define all the cuts
+        # _CombCuts12  = "(ADOCA(1,2)<0.7*mm) & (APT>300)"
+        # _CombCuts123  = "ACUTDOCACHI2(20,'') & (ANUM (( 'mu-' == ABSID ) & ISMUON )>0.5)  & (ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.05) )>0.5)"
+        # _CombCuts1234  = "ACUTDOCACHI2(20,'')"
+        _CombCuts    = "ACUTDOCACHI2(16,'')" #(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params # (AM <6000*MeV) &
+# & (BPVVDCHI2 > %(DiLeptonFDCHI2)s)
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 16) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 5.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 3.5  ) & ( NINTREE ( ( 'mu-' == ABSID ) & (ISMUON) )> 5.5)" % params
+        #_MotherCuts  = "(((BPVDLS>3))) & (VFASPF(VCHI2PDOF) < 16) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 3.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>250) )> 3.5) & (MAXTREE('mu+'==ABSID,PT) > 350.0 *MeV)  & (BPVDIRA > 0.999)" % params
+        _daughtersCuts = "(PT>800*MeV)" #(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params #"(NINTREE ( ( 'mu-' == ABSID ) & ISMUON )>0.5) & (PT>300)" #% params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)+"  : _daughtersCuts }
+
+        # _Combine.Combination12Cut   = _CombCuts12
+        # _Combine.Combination123Cut   = _CombCuts123
+        # _Combine.Combination1234Cut   = _CombCuts1234
+        # _Combine.Combination12345Cut   = _CombCuts1234
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+        #_stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ trimuon ] )
+
+#####################################################
+    def _make6mu3bodyInclDet( self, name, dilepton, params ) :
+        """
+        Make a 6-muon
+        Jpsi is just a proxy to get the 6-body combination
+        """
+#        _Decays = "J/psi(1S) -> mu+ mu+ mu+ mu- mu- mu-"
+        _Decays = "J/psi(1S) -> rho(770)0 rho(770)0 rho(770)0"
+
+         # define all the cuts
+        _CombCuts12  = "(ADOCA(1,2)<0.7*mm) & (APT>500)  & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) )> 2.5)"
+        # _CombCuts123  = "ACUTDOCACHI2(20,'') & (ANUM (( 'mu-' == ABSID ) & ISMUON )>0.5)  & (ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.05) )>0.5)"
+        # _CombCuts1234  = "ACUTDOCACHI2(20,'')"
+        _CombCuts    = "ACUTDOCACHI2(16,'')  & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) )> 4.5)" #(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params # (AM <6000*MeV) &
+# & (BPVVDCHI2 > %(DiLeptonFDCHI2)s)
+        _MotherCuts  = "(BPVDLS>3) & (VFASPF(VCHI2PDOF) < 16) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 3.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 3.5  ) & (BPVDIRA > 0.995)" % params
+        #_MotherCuts  = "(((BPVDLS>3))) & (VFASPF(VCHI2PDOF) < 16) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 3.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>250) )> 3.5) & (MAXTREE('mu+'==ABSID,PT) > 350.0 *MeV)  & (BPVDIRA > 0.999)" % params
+        _daughtersCuts = "(PT>400*MeV)  & ( NINTREE ( ( 'mu-' == ABSID ) & (ISMUON) )> 0.5)" #(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params #"(NINTREE ( ( 'mu-' == ABSID ) & ISMUON )>0.5) & (PT>300)" #% params
+
+        _Combine = DaVinci__N3BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)0"  : _daughtersCuts }
+
+        _Combine.Combination12Cut   = _CombCuts12
+        # _Combine.Combination123Cut   = _CombCuts123
+        # _Combine.Combination1234Cut   = _CombCuts1234
+        # _Combine.Combination12345Cut   = _CombCuts1234
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+        #_stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dilepton ] )
+
+#####################################################
+    def _make6mu3bodyInclLongLived( self, name, dilepton, params ) :
+        """
+        Make a 6-muon
+        Jpsi is just a proxy to get the 6-body combination
+        """
+        _Decays = "J/psi(1S) -> KS0 KS0 KS0"
+
+         # define all the cuts
+        _CombCuts12  = "(ADOCA(1,2)<0.7*mm) & (APT>500)"#"  & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) )> -0.5)" #2.5
+        _CombCuts    = "ACUTDOCACHI2(16,'')"#"  & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) )> 0.5)" #4.5
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 16) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 4.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 3.5  )" % params
+
+        _daughtersCuts = "(PT>400*MeV)  & ( NINTREE ( ( 'mu-' == ABSID ) & (ISMUON) )> 0.5)"
+
+        _Combine = DaVinci__N3BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "KS0"  : _daughtersCuts }
+
+        _Combine.Combination12Cut   = _CombCuts12
+        # _Combine.Combination123Cut   = _CombCuts123
+        # _Combine.Combination1234Cut   = _CombCuts1234
+        # _Combine.Combination12345Cut   = _CombCuts1234
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+        #_stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dilepton ] )
+
+#####################################################
+    def _make8muIncl( self, name, params ) :
+        """
+        First, make a mu-mu-mu-mu-
+        rho(770)+ is just a proxy to get the combination
+        """
+
+        _Decays4 = "[rho(770)+ -> mu+ mu+ mu+ mu+]cc"
+        _CombCuts4_12  = "(ACUTDOCACHI2(10,'')) & (APT>400)  & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) & (PROBNNmu>0.1) )> 0.5)"
+        _CombCuts4_123  = "(ACUTDOCACHI2(10,'')) & (APT>500)  & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) & (PROBNNmu>0.1)  )> 1.5)"
+         # define all the cuts
+        _CombCuts4    = "(ACUTDOCACHI2(10,'')) & (ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.1) )>2.5) & ( ANUM ( ( 'mu-' == ABSID ) & (PT>250*MeV) )> 1.5) & (APT > 600*MeV)" % params
+
+        _MotherCuts4  = "(VFASPF(VCHI2PDOF) < 10)" % params
+        _daughtersCutsmu4 = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (ISMUON | (PIDmu>-5.))" % params
+
+        _Combine4m = DaVinci__N4BodyDecays()
+
+        _Combine4m.DecayDescriptor = _Decays4
+
+        _Combine4m.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu4 }
+
+        _Combine4m.Combination12Cut   = _CombCuts4_12
+        _Combine4m.Combination123Cut   = _CombCuts4_123
+        _Combine4m.CombinationCut   = _CombCuts4
+        _Combine4m.MotherCut        = _MotherCuts4
+
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        quadmuon = Selection( "4MuFor8MuPrompt", Algorithm = _Combine4m, RequiredSelections = [ _stdNoPIDLooseMuons ] )
+
+        """
+        Make a 8-muon
+        Jpsi is just a proxy to get the 6-body combination
+        """
+#        _Decays = "J/psi(1S) -> mu+ mu+ mu+ mu- mu- mu-"
+        _Decays = "J/psi(1S) -> rho(770)+ rho(770)- "
+
+         # define all the cuts
+        # _CombCuts12  = "(ADOCA(1,2)<0.7*mm) & (APT>300)"
+        # _CombCuts123  = "ACUTDOCACHI2(20,'') & (ANUM (( 'mu-' == ABSID ) & ISMUON )>0.5)  & (ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.05) )>0.5)"
+        # _CombCuts1234  = "ACUTDOCACHI2(20,'')"
+        _CombCuts    = "ACUTDOCACHI2(16,'')" #(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params # (AM <6000*MeV) &
+# & (BPVVDCHI2 > %(DiLeptonFDCHI2)s)
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 16) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 6.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 4.5  ) & ( NINTREE ( ( 'mu-' == ABSID ) & (ISMUON) )> 6.5)" % params
+        #_MotherCuts  = "(((BPVDLS>3))) & (VFASPF(VCHI2PDOF) < 16) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 3.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>250) )> 3.5) & (MAXTREE('mu+'==ABSID,PT) > 350.0 *MeV)  & (BPVDIRA > 0.999)" % params
+        _daughtersCuts = "(PT>800*MeV)" #(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params #"(NINTREE ( ( 'mu-' == ABSID ) & ISMUON )>0.5) & (PT>300)" #% params
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)+"  : _daughtersCuts }
+
+        # _Combine.Combination12Cut   = _CombCuts12
+        # _Combine.Combination123Cut   = _CombCuts123
+        # _Combine.Combination1234Cut   = _CombCuts1234
+        # _Combine.Combination12345Cut   = _CombCuts1234
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+        #_stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ quadmuon ] )
+
+#####################################################
+    def  _make8mu4bodyIncl( self, name, params ) :
+        """
+        Make a 8-muon
+        Jpsi is just a proxy to get the 8-body combination
+        Start with a dimuon
+        """
+        _DecaysD = "rho(770)0 -> mu+ mu-"
+
+        _CombCutsD    = "(AM > 0*MeV) & (ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params
+        _MotherCutsD  = "(VFASPF(VCHI2PDOF) < 9) " % params
+        _daughtersCutsmu = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) " % params
+
+        _CombineD = CombineParticles()
+
+        _CombineD.DecayDescriptor = _DecaysD
+
+        _CombineD.DaughtersCuts = {
+            "mu+"  : _daughtersCutsmu }
+
+        _CombineD.CombinationCut   = _CombCutsD
+        _CombineD.MotherCut        = _MotherCutsD
+
+        _stdLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+
+        seldimu = Selection( "DiMuonsFor8Muons", Algorithm = _CombineD, RequiredSelections = [ _stdLooseMuons ] )
+
+        #now, build the Jpsi
+        _Decays = "J/psi(1S) -> rho(770)0 rho(770)0 rho(770)0 rho(770)0"
+
+         # define all the cuts
+        _CombCuts12  = "(ADOCA(1,2)<0.7*mm) & (APT>500)  & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) )> 2.5)"
+        _CombCuts123  = "ACUTDOCACHI2(16,'') & (ANUM (( 'mu-' == ABSID ) & ISMUON )>4.5)" #  & (ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.05) )>0.5)"
+        # _CombCuts1234  = "ACUTDOCACHI2(20,'')"
+        _CombCuts    = "ACUTDOCACHI2(16,'')  & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) )> 6.5)"
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 16) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.05) )> 5.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 4.5  ) & ( NINTREE ( ( 'mu-' == ABSID ) & (ISMUON) )> 6.5)" % params
+
+        _daughtersCuts = "(PT>400*MeV)  & ( NINTREE ( ( 'mu-' == ABSID ) & (ISMUON) )> 0.5)"
+
+        _Combine = DaVinci__N4BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)0"  : _daughtersCuts }
+
+        _Combine.Combination12Cut   = _CombCuts12
+        _Combine.Combination123Cut   = _CombCuts123
+        # _Combine.Combination1234Cut   = _CombCuts1234
+        # _Combine.Combination12345Cut   = _CombCuts1234
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ seldimu ] )
+
+#####################################################
+    def  _make8mu4bodyLongLived( self, name, dilepton, params ) :
+        """
+        Make a 8-muon
+        Jpsi is just a proxy to get the 8-body combination
+        Start with a dimuon
+        """
+
+        #now, build the Jpsi
+        _Decays = "J/psi(1S) -> KS0 KS0 KS0 KS0"
+
+         # define all the cuts
+        _CombCuts12  = "(ADOCA(1,2)<0.7*mm) & (APT>500)"#"  & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) )> 0.5)" #2.5
+        _CombCuts123  = "ACUTDOCACHI2(16,'')"#" & (ANUM (( 'mu-' == ABSID ) & ISMUON )>0.5)" #  & (ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.05) )>0.5)" #4.5
+        # _CombCuts1234  = "ACUTDOCACHI2(20,'')"
+        _CombCuts    = "ACUTDOCACHI2(16,'')"#"  & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) )> 0.5)" #6.5
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 16) & ( NINTREE ( ( 'mu-' == ABSID ) & (PROBNNmu>0.05) )> 4.5) & ( NINTREE ( ( 'mu-' == ABSID ) & (PT>400) )> 4.5  ) & ( NINTREE ( ( 'mu-' == ABSID ) & (ISMUON) )> 4.5)" % params #5.5 , 6.5
+
+        _daughtersCuts = "(PT>400*MeV)  & ( NINTREE ( ( 'mu-' == ABSID ) & (ISMUON) )> 0.5)"
+
+        _Combine = DaVinci__N4BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "KS0"  : _daughtersCuts }
+
+        _Combine.Combination12Cut   = _CombCuts12
+        _Combine.Combination123Cut   = _CombCuts123
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dilepton ] )
+
+#####################################################
+    def _make2Mu2EInclDetLoose( self, name, dimuon, dielectron, params ) :
+        """
+        Make a mu+mu-e+e-
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+        _Decays = "J/psi(1S) -> rho(770)0 omega(782)"
+
+         # define all the cuts
+        _CombCuts    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 25) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & ( NINTREE ( ( 14>ABSID ) & (PT>400*MeV) )> 1.5  )" % params
+        #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 10) & (MAXTREE(14>ABSID,PT) > 400.0 *MeV) & ( NINTREE ( ( 14>ABSID ) & (PT>300) )> 2.5  )" % params #(M > 2500*MeV) & (M < 4400*MeV) &
+        _daughtersCutsMuMu = "(PT > 400*MeV) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.2) & (MAXTREE('mu+'==ABSID,MIPCHI2DV(PRIMARY)) > 9) " #% params
+        _daughtersCutsEE = "(PT > 400*MeV) & (MINTREE('e+'==ABSID,PROBNNe) > 0.2)  & (MINTREE('e+'==ABSID,PIDe) > 2.)"
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)0"  : _daughtersCutsMuMu,
+            "omega(782)"  : _daughtersCutsEE, }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dimuon, dielectron ] )
+#####################################################
+    def _make2Mu2EInclDet( self, name, dimuon, dielectron, params ) :
+        """
+        Make a mu+mu-e+e-
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+        _Decays = "J/psi(1S) -> rho(770)0 omega(782)"
+
+         # define all the cuts
+        _CombCuts    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+#& (BPVVDCHI2 > %(DiLeptonFDCHI2)s)
+        _MotherCuts  = "(BPVDLS>3) & (BPVDIRA > 0.995) & (VFASPF(VCHI2PDOF) < 9)  & ( NINTREE ( ( 14>ABSID ) & (PT>400*MeV) )> 1.5  )" % params
+        #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 10) & (MAXTREE(14>ABSID,PT) > 400.0 *MeV) & ( NINTREE ( ( 14>ABSID ) & (PT>300) )> 2.5  )" % params #(M > 2500*MeV) & (M < 4400*MeV) &
+        _daughtersCutsMuMu = "(PT > 400*MeV) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.15) & (MAXTREE('mu+'==ABSID,MIPCHI2DV(PRIMARY)) > 9) " #% params
+        _daughtersCutsEE = "(PT > 400*MeV) & (MINTREE('e+'==ABSID,PROBNNe) > 0.2)  & (MINTREE('e+'==ABSID,PIDe) > 2.)  & (MAXTREE(14>ABSID,MIPCHI2DV(PRIMARY)) > 6)"
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(770)0"  : _daughtersCutsMuMu,
+            "omega(782)"  : _daughtersCutsEE, }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dimuon, dielectron ] )
+
+#####################################################
+    def _make2E2EInclDet( self, name, dielectron, params ) :
+        """
+        Make a e+e-e+e-
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+        _Decays = "J/psi(1S) -> omega(782) omega(782)"
+
+         # define all the cuts
+        _CombCuts    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+#& (BPVVDCHI2 > %(DiLeptonFDCHI2)s)
+        _MotherCuts  = "(BPVDLS>3) & (BPVDIRA > 0.995) & (VFASPF(VCHI2PDOF) < 9)  & ( NINTREE ( ( 14>ABSID ) & (PT>400*MeV) )> 1.5  )" % params
+
+        _daughtersCutsEE = "(PT > 400*MeV) & (MINTREE('e+'==ABSID,PROBNNe) > 0.2)  & (MINTREE('e+'==ABSID,PIDe) > 2.)  & (MAXTREE(14>ABSID,MIPCHI2DV(PRIMARY)) > 6)"
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "omega(782)"  : _daughtersCutsEE, }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [  dielectron ] )
+#####################################################
+    def _make2Mu2ESSInclDet( self, name, dilepton, params ) :
+        """
+        Make a mu+mu+e-e-
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+        _Decays = "[B0 -> rho(1700)+ rho(1700)+]cc"
+
+         # define all the cuts
+        _CombCuts    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)" % params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+
+        _MotherCuts  = "(VFASPF(VCHI2PDOF) < 16) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & ( NINTREE ( ( 14>ABSID ) & (PT>300*MeV) )> 1.5  )" % params
+        #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 10) & (MAXTREE(14>ABSID,PT) > 400.0 *MeV) & ( NINTREE ( ( 14>ABSID ) & (PT>300) )> 2.5  )" % params #(M > 2500*MeV) & (M < 4400*MeV) &
+        _daughtersCutsEMu = "(PT > 400*MeV) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.2) & (MINTREE('e+'==ABSID,PROBNNe) > 0.2)  & (MINTREE('e+'==ABSID,PIDe) > 2.)"
+
+        _Combine = CombineParticles()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(1700)+"  : _daughtersCutsEMu }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.MotherCut        = _MotherCuts
+
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dilepton ] )
+#####################################################
+    def _make3MuEInclDet( self, name, params ) :
+        """
+        Make a mu+mu-mu+e-
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+#        _Decays = "[J/psi(1S) -> rho(770)0 rho(1700)+]cc"
+        _Decays = "[J/psi(1S) -> mu+ mu- mu+ e-]cc"
+
+         # define all the cuts
+        _CombCuts12    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm) & (APT > 400*MeV)" % params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+        _CombCuts123    = "(ACUTDOCACHI2(12,'')) & (APT > 500*MeV) " % params
+        _CombCuts    = "(ACUTDOCACHI2(12,'')) & (APT > 600*MeV)" % params
+
+        _MotherCuts  = "(BPVDLS>3) & (VFASPF(VCHI2PDOF) < 9)  & ( NINTREE ( ( 14>ABSID ) & (PT>500*MeV) )> 1.5  ) & (MINTREE('e+'==ABSID,PROBNNe) > 0.2)  & (MINTREE('e+'==ABSID,PIDe) > 2.5) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.2)" % params
+        #& (BPVVDCHI2 > 2*%(DiLeptonFDCHI2)s)
+        #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 10) & (MAXTREE(14>ABSID,PT) > 400.0 *MeV) & ( NINTREE ( ( 14>ABSID ) & (PT>300) )> 2.5  )" % params #(M > 2500*MeV) & (M < 4400*MeV) &
+        #_daughtersCutsMuMu = "(PT > 400*MeV) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.1) "#"& (MAXTREE('mu+'==ABSID,MIPCHI2DV(PRIMARY)) > 9) " #% params
+        #_daughtersCutsMuE = "(PT > 400*MeV) & (MINTREE('e+'==ABSID,PROBNNe) > 0.1)  & (MINTREE('e+'==ABSID,PIDe) > 1.) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.1)"
+
+#        _Combine = CombineParticles()
+        _Combine = DaVinci__N4BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "e+"   : "(PROBNNe > 0.1) & (PIDe > 0.)",
+            "mu+"  : "ISMUON & (PROBNNmu > 0.1)", }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.Combination12Cut   = _CombCuts12
+        _Combine.Combination123Cut   = _CombCuts123
+        _Combine.MotherCut        = _MotherCuts
+
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+        _stdAllLooseElectrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdNoPIDLooseMuons, _stdAllLooseElectrons ] )
+
+#####################################################
+    def _make3MuEInclPrompt( self, name, params ) :
+        """
+        Make a mu+mu-mu+e-
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+#        _Decays = "[J/psi(1S) -> rho(770)0 rho(1700)+]cc"
+        _Decays = "[J/psi(1S) -> mu+ mu- mu+ e-]cc"
+
+         # define all the cuts
+        _CombCuts12    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm) & (APT > 500*MeV)" % params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+        _CombCuts123    = "(ACUTDOCACHI2(10,'')) & (APT > 1000*MeV) " % params
+        _CombCuts    = "(ACUTDOCACHI2(10,'')) & (APT > 1200*MeV)" % params
+
+        _MotherCuts  = "(PT>1500*MeV) & (VFASPF(VCHI2PDOF) < 9)  & ( NINTREE ( ( 14>ABSID ) & (PT>500*MeV) )> 1.5  ) & (MINTREE('e+'==ABSID,PROBNNe) > 0.3)  & (MINTREE('e+'==ABSID,PIDe) > 3) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.4)" % params
+        #& (BPVVDCHI2 > 2*%(DiLeptonFDCHI2)s)
+        #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 10) & (MAXTREE(14>ABSID,PT) > 400.0 *MeV) & ( NINTREE ( ( 14>ABSID ) & (PT>300) )> 2.5  )" % params #(M > 2500*MeV) & (M < 4400*MeV) &
+        #_daughtersCutsMuMu = "(PT > 400*MeV) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.1) "#"& (MAXTREE('mu+'==ABSID,MIPCHI2DV(PRIMARY)) > 9) " #% params
+        #_daughtersCutsMuE = "(PT > 400*MeV) & (MINTREE('e+'==ABSID,PROBNNe) > 0.1)  & (MINTREE('e+'==ABSID,PIDe) > 1.) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.1)"
+
+#        _Combine = CombineParticles()
+        _Combine = DaVinci__N4BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "e+"   : "(PROBNNe > 0.3) & (PIDe > 3.)",
+            "mu+"  : "ISMUON & (PROBNNmu > 0.3)", }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.Combination12Cut   = _CombCuts12
+        _Combine.Combination123Cut   = _CombCuts123
+        _Combine.MotherCut        = _MotherCuts
+
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+        _stdAllLooseElectrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdNoPIDLooseMuons, _stdAllLooseElectrons ] )
+
+#####################################################
+    def _makeMu3EInclDet( self, name, mue, dielectron, params ) :
+        """
+        Make a mu+mu-mu+e-
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+        _Decays = "[J/psi(1S) -> rho(1700)+ omega(782)]cc"
+
+         # define all the cuts
+        #_CombCuts12    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm) & (APT > 400*MeV)" % params #(AM > 2000*MeV) & (AM < 4600*MeV) &
+        #_CombCuts123    = "(ACUTDOCACHI2(12,'')) & (APT > 500*MeV) " % params
+        _CombCuts    = "(ACUTDOCACHI2(9,'')) & (APT > 600*MeV)" % params
+
+        _MotherCuts  = "(BPVDLS>3) & (VFASPF(VCHI2PDOF) < 9)  & ( NINTREE ( ( 14>ABSID ) & (PT>500*MeV) )> 1.5  ) & (MINTREE('e+'==ABSID,PROBNNe) > 0.3)  & (MINTREE('e+'==ABSID,PIDe) > 3) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.3)" % params
+        #& (BPVVDCHI2 > 2*%(DiLeptonFDCHI2)s)
+        #_MotherCuts  = "(VFASPF(VCHI2PDOF) < 10) & (MAXTREE(14>ABSID,PT) > 400.0 *MeV) & ( NINTREE ( ( 14>ABSID ) & (PT>300) )> 2.5  )" % params #(M > 2500*MeV) & (M < 4400*MeV) &
+        #_daughtersCutsMuMu = "(PT > 400*MeV) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.1) "#"& (MAXTREE('mu+'==ABSID,MIPCHI2DV(PRIMARY)) > 9) " #% params
+        #_daughtersCutsMuE = "(PT > 400*MeV) & (MINTREE('e+'==ABSID,PROBNNe) > 0.1)  & (MINTREE('e+'==ABSID,PIDe) > 1.) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.1)"
+
+        _Combine = CombineParticles()
+        #_Combine = DaVinci__N3BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "rho(1700)+"  : "(MINTREE('e+'==ABSID,PIDe) > 1) & (MINTREE('mu+'==ABSID,PROBNNmu) > 0.1)",
+            "omega(782)"  : "(MINTREE('e+'==ABSID,PIDe) > 1)",
+            }
+
+        _Combine.CombinationCut   = _CombCuts
+        #_Combine.Combination12Cut   = _CombCuts12
+        #_Combine.Combination123Cut   = _CombCuts123
+        _Combine.MotherCut        = _MotherCuts
+
+        #_stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+        #_stdAllLooseElectrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ mue, dielectron ] )
+
+#####################################################
+    def _makeMu3EInclPrompt( self, name, dielectron, params ) :
+        """
+        Make a mu+e-e+e-
+        Jpsi is a proxy to get the 4-body combination
+        """
+
+        _Decays = "[J/psi(1S) -> mu+ e- omega(782)]cc"
+
+         # define all the cuts
+        _CombCuts12    = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm) & (APT > 900*MeV)" % params
+        #_CombCuts123    = "(ACUTDOCACHI2(10,'')) & (APT > 1000*MeV) " % params
+        _CombCuts    = "(ACUTDOCACHI2(10,'')) & (APT > 1200*MeV) & (AM<20000*MeV)" % params
+
+        _MotherCuts  = "(M<15000*MeV) & (PT>2000*MeV) & (VFASPF(VCHI2PDOF) < 9)  & ( NINTREE ( ( 14>ABSID ) & (PT>500*MeV) )> 1.5  ) & (MINTREE('e+'==ABSID,PROBNNe) > 0.3)  & (MINTREE('e+'==ABSID,PIDe) > 3)" % params
+
+        _Combine = DaVinci__N3BodyDecays()
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "omega(782)"  : "(MINTREE('e+'==ABSID,PIDe) > 3) & (PT>900*MeV)",
+            "e+"   : "(PROBNNe > 0.3) & (PIDe > 3.) & (PT>350*MeV)",
+            "mu+"  : "ISMUON & (PROBNNmu*(1-PROBNNpi)*(1-PROBNNk) > 0.2) & (PT>500*MeV)", }
+
+        _Combine.CombinationCut   = _CombCuts
+        _Combine.Combination12Cut   = _CombCuts12
+        #_Combine.Combination123Cut   = _CombCuts123
+        _Combine.MotherCut        = _MotherCuts
+
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+        _stdAllLooseElectrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+
+        return Selection( name, Algorithm = _Combine, RequiredSelections = [ dielectron, _stdNoPIDLooseMuons, _stdAllLooseElectrons ] )
+
+#####################################################
+
+    def _make5Mu(self, name, params):
+        """
+        Make inclusive detached -> 5 muons
+        """
+
+        X2MuMuMuMuMu = CombineParticles(
+                       DecayDescriptor = " [ Xi_b- -> mu+ mu+ mu- mu- mu-]cc",
+                       DaughtersCuts = { "mu+" : "( PT > 100 * MeV ) & ( TRGHOSTPROB < %(Trk_GhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  4 ) " % params },
+                       #Combination12Cut = "AM<7000*MeV",   # 1778 + 400 - 3*100
+                       #Combination123Cut = "AM<7100*MeV",   # 1778 + 400 - 2*100
+                       #Combination1234Cut = "AM<7200*MeV",   # 1778 + 400 - 1*100
+                       CombinationCut = " ( ANUM (( 'mu-' == ABSID ) & (PROBNNmu>0.05)) > 3.5)",
+                       MotherCut = """
+                ( VFASPF(VCHI2PDOF) < 25 ) &
+                (BPVVDCHI2 > 25) &
+                (BPVDIRA > 0.995 )
+                """
+                       )
+
+        _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+
+        return Selection (name,
+                          Algorithm = X2MuMuMuMuMu,
+                          RequiredSelections = [ _stdNoPIDLooseMuons ])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingPhiToKSKS.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingPhiToKSKS.py
new file mode 100644
index 000000000..7c8a5a69f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingPhiToKSKS.py
@@ -0,0 +1,260 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Study K0 regeneration with phi->KsKs and J/psi ->KsKs.
+Idea from Thomas Ruf and originally implemented by Mika Vesterinen.
+Updated by Jon Harrison to include D0->KsKs.
+"""
+__author__ = ['Jon Harrison']
+__date__ = '14/05/2015'
+__version__ = '$Revision: 0.2 $'
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLooseKaons, StdAllLooseMuons
+from Configurables import FitDecayTrees
+from PhysSelPython.Wrappers import AutomaticData, MergedSelection
+
+__all__ = ('PhiToKSKSAllLinesConf',
+           'TOSFilter',
+           'confdict')
+
+confdict = {
+    "prescale_PhiToKK" : 0.001,
+    "prescale_PhiToKsKs" : 1.0,
+    "prescale_PhiToMuMu" : 0.01,
+    "prescale_JPsiToKK" : 0.002,
+    "prescale_JPsiToKsKs" : 1.0,
+    "prescale_D0ToKsKs" : 0.25,
+    "prescale_EtaCToLL" : 1.0,
+    
+    "GEC_nLongTrk" : 250,
+    "DoDTF" : True,
+    "GHOSTPROB_MAX" : 0.35, #adimensional
+    
+    "K_PTMIN" : 200, #MeV
+    "K_PIDK_MIN" : 7, #adimensional
+    "K_IPCHI2_MAX" : 9, #adimensional
+    
+    "Mu_PTMIN" : 200, #MeV
+    "Mu_PIDmu_MIN" : 0, #adimensional
+    "Mu_IPCHI2_MAX" : 9, #adimensional
+    
+    "KS_LL_PTMIN" : 400, #MeV
+    "KS_LL_MASS_WINDOW" : 20, #MeV
+    "KS_LL_FD_MIN" : 10.0, #mm
+    "KS_LL_FDCHI2_MIN" : 100, #adimensional
+    "KS_LL_VCHI2NDOF_MAX" : 4,#adimensional
+    "KS_LL_DIRA_MIN" : 0.9999, #adimensional
+    
+    "KS_DD_PTMIN" : 400, #MeV
+    "KS_DD_MASS_WINDOW" : 20, #MeV
+    "KS_DD_FD_MIN" : 10.0, #mm
+    "KS_DD_FDCHI2_MIN" : 100, #adimensional
+    "KS_DD_VCHI2NDOF_MAX" : 4,#adimensional
+    "KS_DD_DIRA_MIN" : 0.999, #adimensional
+    
+    "Lambda_PTMIN" : 400, #MeV
+    "Lambda_MASS_WINDOW" : 50, #MeV
+    "Lambda_FD_MIN" : 10.0, #mm
+    "Lambda_FDCHI2_MIN" : 100, #adimensional
+    "Lambda_VCHI2NDOF_MAX" : 4,#adimensional
+    "Lambda_DIRA_MIN" : 0.999, #adimensional
+    
+    "Phi_MASS_MAX" : 1100, # MeV
+    "Phi_PT_MIN" : 800, # MeV
+    "Phi_DOCACHI2_MAX" : 20, #adimensional
+    "Phi_VCHI2NDOF_MAX" : 6, #adimensional
+    "Phi_IPCHI2_MAX" : 9, #adimensional
+
+    "D0_MASS_WIN" : 40, # MeV
+    "D0_PT_MIN" : 800, # MeV
+    "D0_DOCACHI2_MAX" : 20, #adimensional
+    "D0_VCHI2NDOF_MAX" : 6, #adimensional
+    "D0_IPCHI2_MAX" : 9, #adimensional
+
+    "JPsi_MASS_WIN" : 120, # MeV
+    "JPsi_PT_MIN" : 500, # MeV
+    "JPsi_DOCACHI2_MAX" : 20, #adimensional
+    "JPsi_VCHI2NDOF_MAX" : 6, #adimensional
+    "JPsi_IPCHI2_MAX" : 9, #adimensional
+    
+    "etaC_MASS_WIN" : 200, # MeV
+    "etaC_PT_MIN" : 400, # MeV
+    "etaC_DOCACHI2_MAX" : 20, #adimensional
+    "etaC_VCHI2NDOF_MAX" : 6, #adimensional
+    "etaC_IPCHI2_MAX" : 9 #adimensional
+    }   
+
+default_config = {
+    'NAME'              : 'PhiToKSKS',
+    'WGs'               : ['RD'],
+    'BUILDERTYPE'       : 'PhiToKSKSAllLinesConf',
+    'CONFIG'    : confdict,
+    'STREAMS' : ['Charm'] }
+
+class PhiToKSKSAllLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+    
+    def __init__(self, _name, config) :
+
+        LineBuilder.__init__(self, _name, config)
+        
+        GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" %config ,
+                 "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        self.KsLLCuts = " (PT> %(KS_LL_PTMIN)s *MeV)" \
+            " & (ADMASS('KS0') < %(KS_LL_MASS_WINDOW)s *MeV)"\
+            " & (BPVVD > %(KS_LL_FD_MIN)s *mm)" \
+            " & (BPVVDCHI2 > %(KS_LL_FDCHI2_MIN)s)" \
+            " & CHILDCUT((TRGHOSTPROB < %(GHOSTPROB_MAX)s),1)" \
+            " & CHILDCUT((TRGHOSTPROB < %(GHOSTPROB_MAX)s),2)" \
+            " & (VFASPF(VCHI2PDOF) < %(KS_LL_VCHI2NDOF_MAX)s)" \
+            " & (BPVDIRA > %(KS_LL_DIRA_MIN)s)" %config
+        
+        self.KsDDCuts = " (PT> %(KS_DD_PTMIN)s *MeV)" \
+            " & (ADMASS('KS0') < %(KS_DD_MASS_WINDOW)s *MeV)"\
+            " & (BPVVD > %(KS_DD_FD_MIN)s *mm)" \
+            " & (BPVVDCHI2 > %(KS_DD_FDCHI2_MIN)s)" \
+            " & (VFASPF(VCHI2PDOF) < %(KS_DD_VCHI2NDOF_MAX)s)" \
+            " & (BPVDIRA > %(KS_DD_DIRA_MIN)s)" %config
+
+        self.KaonCuts = " (PT> %(K_PTMIN)s *MeV)" \
+            " & (PIDK > %(K_PIDK_MIN)s)"\
+            " & (MIPCHI2DV(PRIMARY) < %(K_IPCHI2_MAX)s)"\
+            " & (TRGHOSTPROB < %(GHOSTPROB_MAX)s)" %config
+        
+        self.MuonCuts = " (PT> %(Mu_PTMIN)s *MeV)" \
+            " & (PIDmu > %(Mu_PIDmu_MIN)s)"\
+            " & (MIPCHI2DV(PRIMARY) < %(Mu_IPCHI2_MAX)s)"\
+            " & (TRGHOSTPROB < %(GHOSTPROB_MAX)s)" %config
+        
+        self.LambdaCuts = " (PT> %(Lambda_PTMIN)s *MeV)" \
+            " & (ADMASS('Lambda0') < %(Lambda_MASS_WINDOW)s *MeV)"\
+            " & (BPVVD > %(Lambda_FD_MIN)s *mm)" \
+            " & (BPVVDCHI2 > %(Lambda_FDCHI2_MIN)s)" \
+            " & CHILDCUT((TRGHOSTPROB < %(GHOSTPROB_MAX)s),1)" \
+            " & CHILDCUT((TRGHOSTPROB < %(GHOSTPROB_MAX)s),2)" \
+            " & (VFASPF(VCHI2PDOF) < %(Lambda_VCHI2NDOF_MAX)s)" \
+            " & (BPVDIRA > %(Lambda_DIRA_MIN)s)" %config
+        
+        self.KsLL = Selection( "KsLLFor" + _name,
+                               Algorithm = FilterDesktop(name = "KsLLFilterFor"+_name, Code = self.KsLLCuts ),
+                               RequiredSelections = [DataOnDemand(Location = 'Phys/StdLooseKsLL/Particles')])
+        
+        self.KsDD = Selection( "KsDDFor" + _name,
+                               Algorithm = FilterDesktop(name = "KsDDFilterFor"+_name, Code = self.KsDDCuts ),
+                               RequiredSelections = [DataOnDemand(Location = 'Phys/StdLooseKsDD/Particles')])
+        
+        self.Ks = MergedSelection("KsFor"+_name, RequiredSelections = [ self.KsLL, self.KsDD] )
+        
+        self.Kaons = Selection( "KaonsFor" + _name,
+                                Algorithm = FilterDesktop(name = "KaonFilterFor"+_name, Code = self.KaonCuts ),
+                                RequiredSelections = [StdAllLooseKaons])
+        
+        self.Muons = Selection( "MuonsFor" + _name,
+                                Algorithm = FilterDesktop(name = "MuonFilterFor"+_name, Code = self.MuonCuts ),
+                                RequiredSelections = [StdAllLooseMuons])
+        
+        self.LambdaDD = Selection( "LambdaDDFor" + _name,
+                                Algorithm = FilterDesktop(name = "LambdaDDFilterFor"+_name, Code = self.LambdaCuts ),
+                                RequiredSelections = [DataOnDemand(Location = 'Phys/StdLooseLambdaDD/Particles')])
+	
+        self.LambdaLL = Selection( "LambdaLLFor" + _name,
+                                Algorithm = FilterDesktop(name = "LambdaLLFilterFor"+_name, Code = self.LambdaCuts ),
+                                RequiredSelections = [DataOnDemand(Location = 'Phys/StdLooseLambdaLL/Particles')])
+        
+        self.Lambdas = MergedSelection("LambdasFor"+_name, RequiredSelections = [ self.LambdaLL, self.LambdaDD] )
+        
+        ####### phi(1020) #############
+
+        self.PhiToKK_Line = VMaker(_name+"_PhiToKK",[self.Kaons],"phi(1020) -> K+ K-",GECs,config,config["prescale_PhiToKK"])
+        self.registerLine(self.PhiToKK_Line)        
+        
+        self.PhiToMuMu_Line = VMaker(_name+"_PhiToMuMu",[self.Muons],"phi(1020) -> mu+ mu-",GECs,config,config["prescale_PhiToMuMu"])
+        self.registerLine(self.PhiToMuMu_Line)        
+        
+        self.PhiToKsKs_Line = VMaker(_name+"_PhiToKsKs",[self.Ks],"phi(1020) -> KS0 KS0",GECs,config,config["prescale_PhiToKsKs"])
+        #self.registerLine(self.PhiToKsKs_Line)        
+        
+        ########### J/psi(1S)  ################
+        
+        self.JPsiToKK_Line = VMaker(_name+"_JPsiToKK",[self.Kaons],"J/psi(1S) -> K+ K-",GECs,config,config["prescale_JPsiToKK"])
+        self.registerLine(self.JPsiToKK_Line)        
+        
+        self.JPsiToKsKs_Line = VMaker(_name+"_JPsiToKsKs",[self.Ks],"J/psi(1S) -> KS0 KS0",GECs,config,config["prescale_JPsiToKsKs"])
+        self.registerLine(self.JPsiToKsKs_Line)        
+        
+	########### D0  ################
+        
+        self.D0ToKsKs_Line = VMaker(_name+"_D0ToKsKs",[self.Ks],"D0 -> KS0 KS0",GECs,config,config["prescale_D0ToKsKs"])
+        self.registerLine(self.D0ToKsKs_Line)        
+        
+	########### eta_c  ################
+        
+        self.EtaCToLL_Line = VMaker(_name+"_EtaCToLL",[self.Lambdas],"eta_c(1S) -> Lambda0 Lambda~0",GECs,config,config["prescale_EtaCToLL"])
+        self.registerLine(self.EtaCToLL_Line)        
+
+def VMaker(_name,_RequiredSelections,_DecayDescriptor,_Filter,conf,_prescale):
+    
+    _CombiCut = ""
+    if 'KS0' in _DecayDescriptor:
+        _CombiCut = "( (ACHILDCUT(CHILDCUT(ISLONG,1),1)) | (ACHILDCUT(CHILDCUT(ISLONG,1),2)) ) & "
+    if 'phi(1020)' in _DecayDescriptor:
+        _CombiCut += " (APT > %(Phi_PT_MIN)s *MeV) & (AM < %(Phi_MASS_MAX)s + 30*MeV) & (ACUTDOCACHI2(%(Phi_DOCACHI2_MAX)s,''))" %conf
+        _MotherCut = "(M < %(Phi_MASS_MAX)s +20*MeV) & (VFASPF(VCHI2/VDOF) < %(Phi_VCHI2NDOF_MAX)s) & (MIPCHI2DV(PRIMARY) < %(Phi_IPCHI2_MAX)s)" %conf
+        _MassFilter = FilterDesktop(name = "MassFilter_"+_name,Code = "(M < %(Phi_MASS_MAX)s *MeV)" %conf)
+        _MassFilterDTF = FilterDesktop(name = "MassFilterDTF_"+_name,Code = "(DTF_FUN(M,True,'phi(1020)') < %(Phi_MASS_MAX)s *MeV)" %conf)
+    elif 'J/psi(1S)' in _DecayDescriptor:
+        _CombiCut += " (ADAMASS('J/psi(1S)') < %(JPsi_MASS_WIN)s +30*MeV) & (APT > %(JPsi_PT_MIN)s*MeV)"\
+            "& (ACUTDOCACHI2(%(JPsi_DOCACHI2_MAX)s,''))" %conf
+        _MotherCut = "(DMASS('J/psi(1S)') < %(JPsi_MASS_WIN)s +20*MeV)"\
+            "& (VFASPF(VCHI2/VDOF) < %(JPsi_VCHI2NDOF_MAX)s) & (MIPCHI2DV(PRIMARY) < %(JPsi_IPCHI2_MAX)s)" %conf
+        _MassFilter = FilterDesktop(name = "MassFilter_"+_name,Code = "(DMASS('J/psi(1S)') < %(JPsi_MASS_WIN)s *MeV)" %conf)
+        _MassFilterDTF = FilterDesktop(name = "MassFilterDTF_"+_name,Code = "(abs(DTF_FUN(M,True,'J/psi(1S)') - 3097) < %(JPsi_MASS_WIN)s *MeV)" %conf)
+    elif 'D0' in _DecayDescriptor:
+        _CombiCut += " (APT > %(D0_PT_MIN)s *MeV) & (ADAMASS('D0') < %(D0_MASS_WIN)s + 30*MeV) & (ACUTDOCACHI2(%(D0_DOCACHI2_MAX)s,''))" %conf
+        _MotherCut = "(DMASS('D0') < %(D0_MASS_WIN)s + 20*MeV) & (VFASPF(VCHI2/VDOF) < %(D0_VCHI2NDOF_MAX)s) & (MIPCHI2DV(PRIMARY) < %(D0_IPCHI2_MAX)s)" %conf
+        _MassFilter = FilterDesktop(name = "MassFilter_"+_name,Code = "(DMASS('D0') < %(D0_MASS_WIN)s *MeV)" %conf)
+        _MassFilterDTF = FilterDesktop(name = "MassFilterDTF_"+_name,Code = "(abs(DTF_FUN(M,True,'D0') - 1865) < %(D0_MASS_WIN)s *MeV)" %conf)
+    elif 'eta_c(1S)' in _DecayDescriptor:
+        _CombiCut += " (APT > %(etaC_PT_MIN)s *MeV) & (ADAMASS('eta_c(1S)') < %(etaC_MASS_WIN)s + 30*MeV) & (ACUTDOCACHI2(%(etaC_DOCACHI2_MAX)s,''))" %conf
+        _MotherCut = "(DMASS('eta_c(1S)') < %(etaC_MASS_WIN)s + 20*MeV) & (VFASPF(VCHI2/VDOF) < %(etaC_VCHI2NDOF_MAX)s) & (MIPCHI2DV(PRIMARY) < %(etaC_IPCHI2_MAX)s)" %conf
+        _MassFilter = FilterDesktop(name = "MassFilter_"+_name,Code = "(DMASS('eta_c(1S)') < %(etaC_MASS_WIN)s *MeV)" %conf)
+        _MassFilterDTF = FilterDesktop(name = "MassFilterDTF_"+_name,Code = "(abs(DTF_FUN(M,True,'eta_c(1S)') - 2978) < %(etaC_MASS_WIN)s *MeV)" %conf)
+    
+        
+    Comb = CombineParticles( name = "Comb_"+_name,
+                             DecayDescriptor = _DecayDescriptor,
+                             CombinationCut = _CombiCut,
+                             MotherCut = _MotherCut)
+
+    Sel = Selection(name = "Sel_"+_name,
+                    Algorithm = Comb,
+                    RequiredSelections = _RequiredSelections)
+        
+    if conf['DoDTF'] == True:
+        MASS_FILTER = Selection("MASS_FILTER_"+_name,Algorithm = _MassFilterDTF,RequiredSelections = [Sel])
+    else:
+        MASS_FILTER = Selection("MASS_FILTER_"+_name,Algorithm = _MassFilter,RequiredSelections = [Sel])
+        
+    Line = StrippingLine(_name+'Line',
+                         prescale = _prescale,
+                         FILTER=_Filter,
+                         selection = MASS_FILTER)
+        
+    return Line
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareBaryonicMuMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareBaryonicMuMu.py
new file mode 100644
index 000000000..b1ab88c9f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareBaryonicMuMu.py
@@ -0,0 +1,2407 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+__author__  = 'Vitalii Lisovskyi'
+__date__    = '26/02/2021'
+__version__ = '$Revision: 0 $'
+
+__all__ = ( 'RareBaryonicMuMuConf', 'default_config' )
+
+"""
+Selections for b-baryons -> strange/charm baryons and dilepton
+(omitting the simple channels already present in the B2XMuMu line).
+29 channels in total.
+Use it wisely.
+
+Contents:
+There are 5 separate stripping lines in this module.
+
+---strange (without pi0)--- 15 channels ---StrippingRareBaryonicMuMuLine
++ Xib- -> Lambda K- mumu # Xi(1690)- used as a proxy for hadronic combination
++ Xib0 -> Lambda KS mumu # Xi(1690)0 <...>
+
++ Lambdab0 -> pK pi+ pi- mumu # Lambda(1830)0 -> Lambda(1520)0 pipi
++ Lambdab0 -> p KS pi- mumu # Lambda(1800)0 -> p K*-
++ Xib0 -> Xi- pi+ mumu # Xi*0
++ Xib- -> p K- K- mumu # Xi(1950)-
+
++ Lambdab0 -> Lambda0 pi+ pi- mumu # Lambda(1600)0
++ Xib- -> Xi- pi+ pi- mumu # Xi(1820)-
++ Omegab- -> Omega- pi+ pi- mumu # Omega(2250)-
+
++ Omegab- -> Xi- KS mumu # Xi(2030)- as Omega(2012) is not in particle table
++ Lambdab -> Xi- K+ mumu # Sigma(1915)0
++ Xib0 -> Omega- K+ mumu # Xi(1950)0
+
++ Lambdab -> Lambda phi mumu #  Lambda(2100)0
++ Xib- -> Xi- phi mumu #Sigma(1940)-
++ Omegab- -> Omega- phi mumu # Sigma(2030)-
+
+---strange (with pi0 = neutral)--- 5 channels ---StrippingRareBaryonicMuMuNeutralLine
+
++ Xib0 -> Xi0 mumu
++ Lambdab0 -> Sigma+ pi- mumu # Sigma(1750)0
++ Xib0 -> Sigma+ K- mumu # Xi(2030)0
++ Omegab -> Xi0 K- mumu # Sigma(2250)-
++ Xi_bc+ -> Sigma+ mumu
+
+---charm--- 5 channels ---StrippingRareBaryonicMuMuB2CharmLine
++ Lambdab -> Sigmac0 (Lc pi-) mumu
++ Xib0 -> Xic0 mumu
++ Xib0 -> Lc K- mumu # Xi_c(2790)0
++ Xi_bc+ -> Lc mumu
++ Xi_bc+ -> Xic+ mumu
+
+---ground states Xi-, Omega- (extra track type combinations w.r.t. B2XMuMu) --- 2 lines each 2 channels ---
+---StrippingRareBaryonicMuMuXiOmMuMuLine, StrippingRareBaryonicMuMuXiOmEELine---
++ Xib- -> Xi- mumu
++ Omegab- -> Omega- mumu
++ Xib- -> Xi- ee
++ Omegab- -> Omega- ee
+
+---added in 2018 restripping (S34r0p2): lines with partial recosntruction (without the soft pion) ---
+---StrippingRareBaryonicMuMuXiOmMuMuPRLine, StrippingRareBaryonicMuMuXiOmEEPRLine---
++ Xib- -> Xi- mumu
++ Omegab- -> Omega- mumu
++ Xib- -> Xi- ee
++ Omegab- -> Omega- ee
+
+"""
+
+
+default_config = {
+    'NAME'                       : 'RareBaryonicMuMu',
+    'BUILDERTYPE'                : 'RareBaryonicMuMuConf',
+    'CONFIG'                     :
+        {
+        'BFlightCHI2'            : 50 #100
+        ,'BFlightCHI2Ch'         : 36
+        , 'BDIRA'                : 0.999
+        , 'BIPCHI2'              : 25
+        , 'BVertexCHI2'          : 12
+        , 'BVertexCHI2Loose'     : 20
+        , 'DiLeptonPT'           : 0
+        , 'DiLeptonFDCHI2'       : 10 #16
+        , 'DiLeptonIPCHI2'       : 0
+        , 'LeptonIPCHI2'         : 9
+        , 'LeptonPT'             : 250
+        , 'KaonIPCHI2'           : 9
+        , 'KaonPT'               : 250
+        , 'UpperMass'            : 6500
+        , 'BMassWindow'          : 1600
+        , 'Trk_Chi2'             : 3
+        , 'Trk_GhostProb'        : 0.5
+        , 'KstarPMassWindow'     : 300 #not used
+        , 'Hadron_MassWindow_Lo' : 0
+        , 'Hadron_MassWindow_Hi' : 6300
+        , 'Hadron_VtxChi2'       : 25
+        , 'DiHadronVtxCHI2'      : 25
+        , 'MinProbNN'            : 0.02
+        , 'MinProbNNTight'       : 0.1
+        , 'V0PT'                 : 0
+        , 'V0TAU'                : 0.0005
+        , 'HyperonWindow'        : 60.0
+        , 'HyperonCombWindow'    : 75.0
+        , 'HyperonMaxDocaChi2'   : 25.0
+        , "Lambda_MassWindow_Lo" : 1105
+        , "Lambda_MassWindow_Hi" : 1130
+        , "Hadron_MinIPCHI2"     : 4.0
+        , 'DiHadronMass'         : 3000
+        , 'DiHadronADOCACHI2'    : 30
+        , 'DiHadronADOCA'        : 0.75 #0.5
+        , 'ProtonP'              : 5000
+        , 'KstarPVertexCHI2'     : 36
+        , 'OmegaPR_M_Lo_comb'    : 1370
+        , 'OmegaPR_M_Hi_comb'    : 1700
+        , 'XiPR_M_Lo_comb'       : 1000
+        , 'XiPR_M_Hi_comb'       : 1350
+        , 'DiHadronADOCACHI2_PR' : 225
+        , 'DiHadronVtxCHI2_PR'   : 200
+        , 'BDIRA_PR'             : 0.999
+        , 'OmDIRA_PR'            : 0.999
+        , 'MinDLLp'              : -0.5
+        , 'MinDLLK'              : -0.5
+        , 'BVtxCHI2_PR'          : 225
+        , 'BIPCHI2_PR'           : 36
+        , 'Bu2mmLinePrescale'    : 1
+        },
+    'WGs'     : [ 'RD' ],
+    'STREAMS' : [ 'Leptonic' ]
+    }
+
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop as FilterDesktop_GC
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles, DaVinci__N3BodyDecays, DaVinci__N4BodyDecays
+from Configurables import (ResolvedPi0Maker, PhotonMaker)
+#from Configurables import FilterDesktop as FilterDesktop_C
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from CommonParticles.Utils import updateDoD
+from GaudiKernel.SystemOfUnits import MeV
+
+class RareBaryonicMuMuConf(LineBuilder) :
+    """
+    Builder for rare baryonic mumu measurements
+    """
+
+    # now just define keys. Default values are fixed later
+    __configuration_keys__ = (
+        'BFlightCHI2'
+        ,'BFlightCHI2Ch'
+        , 'BDIRA'
+        , 'BIPCHI2'
+        , 'BVertexCHI2'
+        , 'BVertexCHI2Loose'
+        , 'DiLeptonPT'
+        , 'DiLeptonFDCHI2'
+        , 'DiLeptonIPCHI2'
+        , 'LeptonIPCHI2'
+        , 'LeptonPT'
+        , 'KaonIPCHI2'
+        , 'KaonPT'
+        , 'UpperMass'
+        , 'BMassWindow'
+        , 'Trk_Chi2'
+        , 'Trk_GhostProb'
+        , 'KstarPMassWindow'
+        , 'Hadron_MassWindow_Lo'
+        , 'Hadron_MassWindow_Hi'
+        , 'Hadron_VtxChi2'
+        , 'DiHadronVtxCHI2'
+        , 'MinProbNN'
+        , 'MinProbNNTight'
+        , 'V0PT'
+        , 'V0TAU'
+        , 'HyperonWindow'
+        , 'HyperonCombWindow'
+        , 'HyperonMaxDocaChi2'
+        , "Lambda_MassWindow_Lo"
+        , "Lambda_MassWindow_Hi"
+        , "Hadron_MinIPCHI2"
+        , 'DiHadronMass'
+        , 'DiHadronADOCACHI2'
+        , 'DiHadronADOCA'
+        , 'ProtonP'
+        , 'KstarPVertexCHI2'
+        , 'OmegaPR_M_Lo_comb'
+        , 'OmegaPR_M_Hi_comb'
+        , 'XiPR_M_Lo_comb'
+        , 'XiPR_M_Hi_comb'
+        , 'DiHadronADOCACHI2_PR'
+        , 'DiHadronVtxCHI2_PR'
+        , 'BDIRA_PR'
+        , 'OmDIRA_PR'
+        , 'MinDLLp'
+        , 'MinDLLK'
+        , 'BVtxCHI2_PR'
+        , 'BIPCHI2_PR'
+        , 'Bu2mmLinePrescale'
+      )
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        self._name = name
+        mmXLine_name   = name
+        mmCharmLine_name   = name+'B2Charm'
+        mmNeutralLine_name   = name+'Neutral'
+        mmNeutralDTFLine_name = name+'NeutralDTF'
+        mmGroundLine_name   = name+'XiOmMuMu'
+        eeGroundLine_name   = name+'XiOmEE'
+        mmGroundPRLine_name   = name+'XiOmMuMuPR'
+        eeGroundPRLine_name   = name+'XiOmEEPR'
+
+        from StandardParticles import StdLoosePions as Pions
+        from StandardParticles import StdLooseKaons as Kaons
+        from StandardParticles import StdLooseProtons as Protons
+        from StandardParticles import StdAllNoPIDsPions as AllPions
+        from StandardParticles import StdAllNoPIDsKaons as AllKaons
+        from StandardParticles import StdAllNoPIDsProtons as AllProtons
+        from StandardParticles import StdVeryLooseLambdaLL as LambdasLL
+        from StandardParticles import StdLooseLambdaDD as LambdasDD
+        from StandardParticles import StdLooseLambdaLD as LambdasLD
+        from StandardParticles import StdVeryLooseKsLL as KsLL
+        from StandardParticles import StdLooseKsDD as KsDD
+        from StandardParticles import StdLooseKsLD as KsLD
+        from StandardParticles import StdLoosePhi2KK as Phis
+        from StandardParticles import StdNoPIDsDownPions as DownPions
+        from StandardParticles import StdNoPIDsDownKaons as DownKaons
+        from StandardParticles import StdNoPIDsDownProtons as DownProtons
+
+        # 1 : Make K, Ks, K*, K1, Phi and Lambdas
+
+        # SelKaons  = self._filterHadron( name   = "KaonsFor" + self._name,
+        #                                 sel    = Kaons,
+        #                                 params = config )
+        #
+        # SelPions  = self._filterHadron( name   = "PionsFor" + self._name,
+        #                                 sel    = Pions,
+        #                                 params = config )
+        #
+        # SelLambdasLL = self._filterLongLivedHadron( name   = "LambdasLLFor" + self._name,
+        #                                    sel    =  LambdasLL,
+        #                                    params = config )
+        #
+        # SelLambdasDD = self._filterLongLivedHadron( name   = "LambdasDDFor" + self._name,
+        #                                    sel    =  LambdasDD,
+        #                                    params = config )
+        #
+        # SelLambdasLD = self._filterLongLivedHadron( name   = "LambdasLDFor" + self._name,
+        #                                    sel    =  LambdasLD,
+        #                                    params = config )
+        #
+        # SelKsLL = self._filterLongLivedHadron( name   = "KsLLFor" + self._name,
+        #                                    sel    =  KsLL,
+        #                                    params = config )
+        #
+        # SelKsDD = self._filterLongLivedHadron( name   = "KsDDFor" + self._name,
+        #                                    sel    =  KsDD,
+        #                                    params = config )
+        #
+        # SelKsLD = self._filterLongLivedHadron( name   = "KsLDFor" + self._name,
+        #                                    sel    =  KsLD,
+        #                                    params = config )
+
+        #SelXi = self._makeXi( name   = "XisFor" + self._name, lambdasLL=LambdaLL, lambdasDD=LambdaDD, config)
+        #SelOmega = self._makeOmega(self.LambdaLL, self.LambdaDD, config)
+
+        SelXim =  self.__Xi__( name   = "XimFor" + self._name,
+                              LambdaLL  = LambdasLL,
+                              LambdaDD  = LambdasDD,
+                              LambdaLD  = LambdasLD,
+                              params = config )
+
+        SelOmega =  self.__Omega__( name   = "OmegaFor" + self._name,
+                              LambdaLL  = LambdasLL,
+                              LambdaDD  = LambdasDD,
+                              LambdaLD  = LambdasLD,
+                              params = config )
+
+        SelKstarsplus = self._makeKstarPlus( name   = "KstarplusFor" + self._name,
+                               ksLL = KsLL,
+                               ksDD = KsDD,
+                               pions  = Pions,
+                               params = config )
+
+        SelPiPi = self._makePiPi( name   = "PiPiFor" + self._name,
+                               pions  = Pions,
+                               params = config )
+
+        SelpKs = self._makepK( name   = "pKsFor" + self._name,
+                                        protons = Protons,
+                                        kaons  = Kaons,
+                                        params = config )
+
+        SelpKpipis = self._makepKpipi( name   = "pKpipisFor" + self._name,
+                                        lambdas = SelpKs,
+                                        rhos  = SelPiPi,
+                                        params = config )
+
+        SelLamK = self._makeLamK( name   = "LamKFor" + self._name,
+                               lambdasLL  = LambdasLL,
+                               lambdasDD  = LambdasDD,
+                               lambdasLD  = LambdasLD,
+                               kaons  = Kaons,
+                               params = config )
+
+        SelLamKS = self._makeLamKS( name   = "LamKSFor" + self._name,
+                               lambdasLL  = LambdasLL,
+                               lambdasDD  = LambdasDD,
+                               lambdasLD  = LambdasLD,
+                               ksLL  = KsLL,
+                               ksDD  = KsDD,
+                               ksLD  = KsLD,
+                               params = config )
+
+        SelLamPiPi = self._makeLamPiPi( name   = "LamPiPiFor" + self._name,
+                               lambdasLL  = LambdasLL,
+                               lambdasDD  = LambdasDD,
+                               lambdasLD  = LambdasLD,
+                               pipis = SelPiPi,
+                               params = config )
+
+        SelXiPiPi = self._makeXiPiPi( name   = "XiPiPiFor" + self._name,
+                               xis  = SelXim,
+                               pipis = SelPiPi,
+                               params = config )
+
+        SelOmegaPiPi = self._makeOmegaPiPi( name   = "OmegaPiPiFor" + self._name,
+                               omegas  = SelOmega,
+                               pipis = SelPiPi,
+                               params = config )
+
+        SelLamPhi = self._makeLamPhi( name   = "LamPhiFor" + self._name,
+                               lambdasLL  = LambdasLL,
+                               lambdasDD  = LambdasDD,
+                               lambdasLD  = LambdasLD,
+                               phis = Phis,
+                               params = config )
+
+        SelXiPhi = self._makeXiPhi( name   = "XiPhiFor" + self._name,
+                               xis = SelXim,
+                               phis = Phis,
+                               params = config )
+
+        SelOmPhi = self._makeOmegaPhi( name   = "OmPhiFor" + self._name,
+                               omegas = SelOmega,
+                               phis = Phis,
+                               params = config )
+
+        SelpKst = self._makepKst( name   = "pKstFor" + self._name,
+                              protons  = Protons,
+                              kstars  = SelKstarsplus,
+                              params = config )
+
+        SelpKK = self._makepKK( name   = "pKKFor" + self._name,
+                              protons  = Protons,
+                              kaons  = Kaons,
+                              params = config )
+
+        SelXistarz = self._makeXistarz( name   = "XistarzFor" + self._name,
+                              xis  = SelXim,
+                              pions  = Pions,
+                              params = config )
+
+        SelXiK = self._makeXiK( name   = "XiKFor" + self._name,
+                              xis  = SelXim,
+                              kaons  = Kaons,
+                              params = config )
+
+        SelXiKS = self._makeXiKS( name   = "XiKSFor" + self._name,
+                              xis  = SelXim,
+                              ksLL  = KsLL,
+                              ksDD  = KsDD,
+                              ksLD  = KsLD,
+                              params = config )
+
+        SelOmegaK = self._makeOmegaK( name   = "OmegaKFor" + self._name,
+                              omegas  = SelOmega,
+                              kaons  = Kaons,
+                              params = config )
+
+        # charm configs
+
+        SelXic0 = self._makeXic02pKKpi( name   = "Xic0For" + self._name,
+                              pions  = AllPions,
+                              kaons  = AllKaons,
+                              protons = AllProtons,
+                              params = config )
+
+        SelLc = self._makeLc2pKpi( name   = "LcFor" + self._name,
+                              pions  = AllPions,
+                              kaons  = AllKaons,
+                              protons = AllProtons,
+                              params = config )
+
+        SelXicp = self._makeXic2pKpi( name   = "XicpFor" + self._name,
+                              pions  = AllPions,
+                              kaons  = AllKaons,
+                              protons = AllProtons,
+                              params = config )
+
+        SelSigmac = self._makeSigmac( name   = "SigmacFor" + self._name,
+                              lambdacs = SelLc,
+                              pions  = AllPions,
+                              params = config )
+
+        SelLcK = self._makeLcK( name   = "LcKFor" + self._name,
+                              lambdacs = SelLc,
+                              kaons  = AllKaons,
+                              params = config )
+
+        #added for 2018 restripping: partial recosntruction
+        SelXimPR =  self.__XiPR__( name   = "XimPRFor" + self._name,
+                              protonsL = AllProtons,
+                              protonsD = DownProtons,
+                              pionsL = AllPions,
+                              pionsD = DownPions,
+                              params = config )
+
+        SelOmegaPR =  self.__OmegaPR__( name   = "OmegaPRFor" + self._name,
+                              protonsL = AllProtons,
+                              protonsD = DownProtons,
+                              kaonsL = AllKaons,
+                              kaonsD = DownKaons,
+                              params = config )
+
+
+        # 2 : Make Dileptons
+
+        from StandardParticles import StdLooseDiMuon as DiMuons
+        MuonID = "(HASMUON)&(ISMUON)"
+        DiMuonID     = "(2 == NINTREE((ABSID==13)&(HASMUON)&(ISMUON)))"
+        DiElectronID     = "(2 == NINTREE((ABSID==11)&(PIDe>0)))"
+
+        SelDiMuon = self._filterDiLepton( "SelDiMuonsFor" + self._name,
+                                          dilepton = DiMuons,
+                                          params   = config,
+                                          idcut    = DiMuonID )
+
+        SelDiElectronRaw = self._makeDiElectron( "SelDiElectronsRawFor" + self._name,
+                                          params   = config )
+
+        SelDiElectron = self._filterDiLepton( "SelDiElectronsFor" + self._name,
+                                          dilepton = SelDiElectronRaw,
+                                          params   = config,
+                                          idcut    = DiElectronID )
+
+        # make pi0s for hyperons
+        """
+        Make pi0 for hyperon (Xi0, Sigma+) decays.
+        Xi0 is very long-lived, therefore pi0 is very displaced. Standard pi0 definitions do not suit us as they assume pi0 poiting to the PV. We use a custom very loose pi0 with extremely loose photon cut and very broad mass window.
+        """
+        piz_wide = ResolvedPi0Maker('MyVeryLoosePi02gg',
+                                   DecayDescriptor = 'Pi0',
+                                   MassWindow = 160.* MeV)
+
+        make_loose_photons = PhotonMaker(
+            #"LoosePhotonsForPiz",
+            PtCut=70.*MeV,
+            ConfLevelCut=0.2)
+        piz_wide.addTool(make_loose_photons)
+        updateDoD(piz_wide)
+
+        # wide.addTool(PhotonMaker)
+        # wide.PhotonMaker.PtCut = 70.*MeV
+        # wide.PhotonMaker.ConfLevelCut = 0.15
+
+        #updateDoD(piz_wide)
+        #MyVeryLoosePi02gg = wide
+
+        # fltr =  FilterDesktop_C (
+        #     'MyVeryLooseResolvedPi0',
+        #     Code = "ADMASS('pi0') < 130 * MeV ",
+        #     Inputs =  ['Phys/%s/Particles'  % wide.name()]
+        #     )
+        # locations.update ( updateDoD ( fltr ) )
+        # MyVeryLooseResolvedPi0 = fltr
+
+
+        #neutral configs (Xi0, Sigma+)
+
+
+        SelXi0 = self._makeXi0( name   = "Xi0For" + self._name,
+                               lambdasLL  = LambdasLL,
+                               lambdasDD  = LambdasDD,
+                               lambdasLD  = LambdasLD,
+                               pi0s  = AutomaticData("Phys/MyVeryLoosePi02gg/Particles"),
+                               params = config )
+
+        SelSigmap = self._makeSigmap( name   = "SigmapFor" + self._name,
+                               protonsL  = Protons,
+                               protonsD  = DownProtons,
+                               pi0s  = AutomaticData("Phys/MyVeryLoosePi02gg/Particles"),
+                               params = config )
+
+        SelSigmapTight = self._makeSigmapTight( name   = "SigmapTightFor" + self._name,
+                               protonsL  = Protons,
+                               protonsD  = DownProtons,
+                               pi0s  = AutomaticData("Phys/MyVeryLoosePi02gg/Particles"),
+                               params = config )
+
+        SelXi0K = self._makeXi0K( name   = "Xi0KFor" + self._name,
+                               xis  = SelXi0,
+                               kaons  = Kaons,
+                               params = config )
+
+        SelSigmaK = self._makeSigmaK( name   = "SigmaKFor" + self._name,
+                               sigmas  = SelSigmap,
+                               kaons  = Kaons,
+                               params = config )
+
+        SelSigmaPi = self._makeSigmaPi( name   = "SigmaPiFor" + self._name,
+                               sigmas  = SelSigmap,
+                               pions  = Pions,
+                               params = config )
+
+        #neutral configs (Xi0, Sigma+) with the DTF
+
+
+        SelXi0_DTF = self._makeXi0_DTF( name   = "Xi0DTFFor" + self._name,
+                               lambdasLL  = LambdasLL,
+                               lambdasDD  = LambdasDD,
+                               lambdasLD  = LambdasLD,
+                               pi0s  = AutomaticData("Phys/MyVeryLoosePi02gg/Particles"),
+                               params = config )
+
+        SelSigmap_DTF = self._makeSigmap_DTF( name   = "SigmapDTFFor" + self._name,
+                               protonsL  = Protons,
+                               protonsD  = DownProtons,
+                               pi0s  = AutomaticData("Phys/MyVeryLoosePi02gg/Particles"),
+                               params = config )
+
+
+        SelXi0K_DTF = self._makeXi0K_DTF( name   = "Xi0KDTFFor" + self._name,
+                               xis  = SelXi0_DTF,
+                               kaons  = Kaons,
+                               params = config )
+
+        SelSigmaK_DTF = self._makeSigmaK_DTF( name   = "SigmaKDTFFor" + self._name,
+                               sigmas  = SelSigmap_DTF,
+                               kaons  = Kaons,
+                               params = config )
+
+        SelSigmaPi_DTF = self._makeSigmaPi_DTF( name   = "SigmaPiDTFFor" + self._name,
+                               sigmas  = SelSigmap_DTF,
+                               pions  = Pions,
+                               params = config )
+        # 4 : Combine Particles
+
+
+        SelB2mmX = self._makeB2LLX(mmXLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelLamK, SelLamKS, SelLamPiPi, SelXiPiPi, SelOmegaPiPi, SelpKst, SelpKK, SelpKpipis, SelXistarz, SelXiK, SelXiKS, SelOmegaK, SelLamPhi, SelXiPhi, SelOmPhi ],
+                                   #hadrons  = [ SelPions, SelKaons, SelLambdasLL , SelLambdasDD, SelLambdasLD, SelPiPi, SelLamK, SelLamKS, SelLamPiPi ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('Xi_b0') <  %(BMassWindow)s *MeV"% config)
+
+        SelB2mmX_charm = self._makeB2LLX_charm(mmCharmLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelXic0, SelSigmac, SelLc, SelXicp, SelLcK ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('Xi_b0') <  1700 *MeV"% config)
+
+        SelB2mmX_neutral = self._makeB2LLX_neutral(mmNeutralLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelXi0, SelXi0K, SelSigmaK, SelSigmaPi, SelSigmapTight ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('Xi_b0') <  %(BMassWindow)s *MeV"% config)
+
+        SelB2mmX_neutral_DTF = self._makeB2LLX_neutral_DTF(mmNeutralDTFLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelXi0_DTF, SelXi0K_DTF, SelSigmaK_DTF, SelSigmaPi_DTF], #, SelSigmap_DTF ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('Xi_b0') <  %(BMassWindow)s *MeV"% config)
+
+        SelB2mmX_ground = self._makeB2LLX_ground(mmGroundLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelXim, SelOmega ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('Xi_b-') <  %(BMassWindow)s *MeV"% config)
+
+        SelB2eeX_ground = self._makeB2LLX_ground(eeGroundLine_name,
+                                   dilepton = SelDiElectron,
+                                   hadrons  = [ SelXim, SelOmega ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('Xi_b-') <  %(BMassWindow)s *MeV"% config)
+
+        SelB2mmX_ground_PR = self._makeB2LLX_ground_PR(mmGroundPRLine_name,
+                                   dilepton = SelDiMuon,
+                                   hadrons  = [ SelXimPR, SelOmegaPR ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('Xi_b-') <  %(BMassWindow)s *MeV"% config)
+
+        SelB2eeX_ground_PR = self._makeB2LLX_ground_PR(eeGroundPRLine_name,
+                                   dilepton = SelDiElectron,
+                                   hadrons  = [ SelXimPR, SelOmegaPR ],
+                                   params   = config,
+                                   masscut  = "ADAMASS('Xi_b-') <  %(BMassWindow)s *MeV"% config)
+
+        # 5 : Declare Lines
+
+        SPDFilter = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 600 )" ,
+            'Preambulo' : [ "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb" ]
+            }
+
+
+        self.B2mmXLine = StrippingLine(mmXLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = ["Velo"],
+                                       MDSTFlag          = False )
+
+        self.B2mmCharmLine = StrippingLine(mmCharmLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_charm,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = ["Velo"],
+                                       MDSTFlag          = False )
+
+        self.B2mmNeutralLine = StrippingLine(mmNeutralLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_neutral,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = ["Velo"],
+                                       MDSTFlag          = False )
+
+        self.B2mmNeutralDTFLine = StrippingLine(mmNeutralDTFLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_neutral_DTF,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = ["Velo"],
+                                       MDSTFlag          = False )
+
+        self.B2mmGroundLine = StrippingLine(mmGroundLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_ground,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = ["Velo"],
+                                       MDSTFlag          = False )
+
+        self.B2eeGroundLine = StrippingLine(eeGroundLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2eeX_ground,
+                                       FILTER            = SPDFilter,
+                                       RequiredRawEvents = ["Velo"],
+                                       MDSTFlag          = False )
+
+        self.B2mmGroundPRLine = StrippingLine(mmGroundPRLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2mmX_ground_PR,
+                                       #FILTER            = SPDFilter,
+                                       RequiredRawEvents = ["Velo"],
+                                       MDSTFlag          = False )
+
+        self.B2eeGroundPRLine = StrippingLine(eeGroundPRLine_name + "Line",
+                                       prescale          = config['Bu2mmLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = SelB2eeX_ground_PR,
+                                       #FILTER            = SPDFilter,
+                                       RequiredRawEvents = ["Velo"],
+                                       MDSTFlag          = False )
+
+        # 6 : Register Lines
+
+
+        self.registerLine( self.B2mmXLine )
+        self.registerLine( self.B2mmCharmLine )
+        self.registerLine( self.B2mmNeutralLine )
+        #self.registerLine( self.B2mmNeutralDTFLine )
+        self.registerLine( self.B2mmGroundLine )
+        self.registerLine( self.B2eeGroundLine )
+        self.registerLine( self.B2mmGroundPRLine )
+        self.registerLine( self.B2eeGroundPRLine )
+
+
+# #####################################################
+# Define various combinations of hadrons
+# #####################################################
+# hyperon selections adapted from B2XMuMu, with addition of extra track types
+    def __Hyperon__(self, name, LambdaLL, LambdaDD, LambdaLD, LongTracks, DownTracks, UpTracks, hyperon, descriptor, params):
+        """
+        Copied from B2XMumu lines, but with loosened cuts.
+        Assemble Xi- (Omega-) -> Lambda0 pi- (K-) using:
+         - The Lambda0. Handle LL, LD, DD Lambda0
+           separately because not all the track type combinations make sense (e.g. LL
+           Lambda0 combined with a downstream pi- (K-) to make Xi- (Omega-))
+         - pi- (K-) can be long or downstream or upstream, depending on what type of Lambda0 is used.
+
+        Variable names mostly correspond to Xi- -> Lambda0 pi- but the code can be reused
+        for Omega- -> Lambda0 K-
+        """
+        _xicuts = "(PT > %(V0PT)s * MeV)" \
+            + " & (ADMASS('" + hyperon + "-') < %(HyperonWindow)s * MeV)" \
+            + " & (VFASPF(VCHI2) < %(HyperonMaxDocaChi2)s)" \
+            + " & (BPVLTIME() > %(V0TAU)s * ps)"
+        _xicombcuts = "(ADAMASS('" + hyperon + "-') < %(HyperonCombWindow)s * MeV)" \
+            + " & (ADOCACHI2CUT(%(HyperonMaxDocaChi2)s, ''))"
+
+        _xi2lambda0pi = CombineParticles(
+            DecayDescriptor = descriptor,
+            CombinationCut = _xicombcuts%(params),
+            MotherCut = _xicuts%(params)
+            )
+
+        _sel_xi2lambda0pi_lll = Selection("Selection_"+name+"_"+hyperon+"LLL",
+            RequiredSelections = [ LambdaLL, LongTracks ],
+            Algorithm = _xi2lambda0pi)
+
+        _sel_xi2lambda0pi_ddl = Selection("Selection_"+name+"_"+hyperon+"DDL",
+            RequiredSelections = [ LambdaDD, LongTracks ],
+            Algorithm = _xi2lambda0pi)
+
+        _sel_xi2lambda0pi_dll = Selection("Selection_"+name+"_"+hyperon+"DLL",
+            RequiredSelections = [ LambdaLD, LongTracks ],
+            Algorithm = _xi2lambda0pi)
+
+        _sel_xi2lambda0pi_ddd = Selection("Selection_"+name+"_"+hyperon+"DDD",
+            RequiredSelections = [ LambdaDD, DownTracks ],
+            Algorithm = _xi2lambda0pi)
+
+        _sel_xi2lambda0pi_llu = Selection("Selection_"+name+"_"+hyperon+"LLU",
+            RequiredSelections = [ LambdaLL, UpTracks ],
+            Algorithm = _xi2lambda0pi)
+
+        _sel_xi2lambda0pi_ddu = Selection("Selection_"+name+"_"+hyperon+"DDU",
+            RequiredSelections = [ LambdaDD, UpTracks ],
+            Algorithm = _xi2lambda0pi)
+
+        _sel = MergedSelection("Selection_"+name+"_"+hyperon,
+            RequiredSelections = [ _sel_xi2lambda0pi_lll, _sel_xi2lambda0pi_ddl, _sel_xi2lambda0pi_dll, _sel_xi2lambda0pi_ddd, _sel_xi2lambda0pi_llu, _sel_xi2lambda0pi_ddu ])
+
+        return _sel
+
+    # def __LambdaSeparate__(self, conf):
+    #     """
+    #     Filter Lambda from MyVeryLooseLambdaLL and StdLooseLambdaDD
+    #     """
+    #     _lambdadd = AutomaticData(Location = 'Phys/StdLooseLambdaDD/Particles')
+    #     _lambdall = AutomaticData(Location = 'Phys/MyVeryLooseLambdaLL/Particles')
+    #     _filter_lambdadd = FilterDesktop(Code = self.__LambdaCuts__(conf))
+    #     _filter_lambdall = FilterDesktop(Code = self.__LambdaCuts__(conf))
+    #     _sellambdadd = Selection("Selection_"+self.name+"_Lambdadd",
+    #                          RequiredSelections = [ _lambdadd ] ,
+    #                          Algorithm = _filter_lambdadd)
+    #     _sellambdall = Selection("Selection_"+self.name+"_Lambdall",
+    #                          RequiredSelections = [ _lambdall ] ,
+    #                          Algorithm = _filter_lambdall)
+    #     return _sellambdall, _sellambdadd
+
+    def __Xi__(self, name, LambdaLL, LambdaDD, LambdaLD, params):
+        """
+        Use __Hyperon__() to create Xi- candidates.
+        """
+        _longpions = AutomaticData(Location = 'Phys/StdAllNoPIDsPions/Particles')
+        _downpions = AutomaticData(Location = 'Phys/StdNoPIDsDownPions/Particles')
+        _uppions = AutomaticData(Location = 'Phys/StdNoPIDsUpPions/Particles')
+
+        #TrackCuts = "(TRGHP < %(Track_GhostProb)s)" %config
+        HypBachCuts = "(MIPCHI2DV(PRIMARY) > %(Hadron_MinIPCHI2)s)" %params
+
+        _filter_longpions = FilterDesktop_GC(Code = HypBachCuts)
+        _filter_downpions = FilterDesktop_GC(Code = HypBachCuts)
+        _filter_uppions = FilterDesktop_GC(Code = HypBachCuts)
+
+        _sel_longpions = Selection("Selection_"+name+"_LongXiPions",
+            RequiredSelections = [ _longpions ],
+            Algorithm = _filter_longpions)
+        _sel_downpions = Selection("Selection_"+name+"_DownXiPions",
+            RequiredSelections = [ _downpions ],
+            Algorithm = _filter_downpions)
+        _sel_uppions = Selection("Selection_"+name+"_UpXiPions",
+            RequiredSelections = [ _uppions ],
+            Algorithm = _filter_uppions)
+
+        return self.__Hyperon__(name, LambdaLL, LambdaDD, LambdaLD, _sel_longpions, _sel_downpions, _sel_uppions,
+            "Xi", "[Xi- -> Lambda0 pi-]cc", params)
+
+    def __Omega__(self, name, LambdaLL, LambdaDD, LambdaLD, params):
+        """
+        Use __Hyperon__() to create Omega- candidates.
+        """
+
+        _longkaons = AutomaticData(Location = 'Phys/StdAllNoPIDsKaons/Particles')
+        _downkaons = AutomaticData(Location = 'Phys/StdNoPIDsDownKaons/Particles')
+        _upkaons = AutomaticData(Location = 'Phys/StdNoPIDsUpKaons/Particles')
+
+        HypBachCuts = "(MIPCHI2DV(PRIMARY) > %(Hadron_MinIPCHI2)s)" %params
+
+        _filter_longkaons = FilterDesktop_GC(Code = HypBachCuts)
+        _filter_downkaons = FilterDesktop_GC(Code = HypBachCuts)
+        _filter_upkaons = FilterDesktop_GC(Code = HypBachCuts)
+
+        _sel_longkaons = Selection("Selection_"+name+"_LongOmegaKaons",
+            RequiredSelections = [ _longkaons ],
+            Algorithm = _filter_longkaons)
+        _sel_downkaons = Selection("Selection_"+name+"_DownOmegaKaons",
+            RequiredSelections = [ _downkaons ],
+            Algorithm = _filter_downkaons)
+        _sel_upkaons = Selection("Selection_"+name+"_UpOmegaKaons",
+            RequiredSelections = [ _upkaons ],
+            Algorithm = _filter_upkaons)
+
+
+        return self.__Hyperon__(name, LambdaLL, LambdaDD, LambdaLD, _sel_longkaons, _sel_downkaons, _sel_upkaons,
+            "Omega", "[Omega- -> Lambda0 K-]cc", params)
+
+
+#####################################################
+    def _filterDiLepton( self, name, dilepton, params, idcut = None ) :
+        """
+        Handy interface for dilepton filter
+        """
+
+        _Code = "(ID=='J/psi(1S)') & "\
+                "(PT > %(DiLeptonPT)s *MeV) & "\
+                "(MM < %(UpperMass)s *MeV) & "\
+                "(MINTREE(ABSID<14,PT) > %(LeptonPT)s *MeV) & "\
+                "(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(LeptonIPCHI2)s) & "\
+                "(VFASPF(VCHI2/VDOF) < 10) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & "\
+                "(MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s)" % params
+
+        # add additional cut on PID if requested
+        if idcut : _Code += ( " & " + idcut )
+
+        _Filter = FilterDesktop_GC( Code = _Code )
+
+        return Selection(name, Algorithm = _Filter, RequiredSelections = [ dilepton ] )
+
+#####################################################
+    def _makeDiElectron( self, name, params ) :
+        """
+        Make a dielectron
+        J/psi(1S) is just a proxy to get the two-body combination
+        """
+
+        from Configurables import DiElectronMaker, ProtoParticleCALOFilter
+        from CommonParticles.Utils import trackSelector
+        dieLL = DiElectronMaker('MyDiElectronFromTracks')
+        dieLL.Particle = "J/psi(1S)"
+        selector = trackSelector ( dieLL , trackTypes = ["Long"] )
+        dieLL.addTool( ProtoParticleCALOFilter, name='Electron' )
+        dieLL.Electron.Selection = ["CombDLL(e-pi)>'-2.0'"] # ["RequiresDet='CALO' CombDLL(e-pi)>'1.0'"]
+        dieLL.DiElectronMassMax = 6000.*MeV
+        dieLL.DiElectronMassMin = 0.*MeV
+        dieLL.DiElectronPtMin = 250.*MeV
+        #locations.update( updateDoD(dieLL) )
+        #MyDiElectronFromTracks = dieLL
+
+        return Selection( name, Algorithm = dieLL )
+
+#####################################################
+    def _makePiPi( self, name, pions, params):
+        """
+        Make a rho -> pi+ pi- in a range below 3000 MeV.
+        Should probably also work to do K+K- via misidentifications.
+        """
+
+        _Decays = "rho(770)0 -> pi+ pi-"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(DiHadronMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params #UpperBMass
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut = "(ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "pi+"  : _DaughterCut,
+            "pi-" : _DaughterCut
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ pions ] )
+
+
+#####################################################
+    def _makepK( self, name, protons, kaons, params):
+        """
+        Make a Lambda* -> p K- in entire range.
+        """
+
+        _Decays = "[Lambda(1520)0 -> p+ K-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Hadron_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_p = "(PT > %(KaonPT)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNp > %(MinProbNNTight)s)" % params
+        _DaughterCut_K = "(PT > %(KaonPT)s *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNk > %(MinProbNNTight)s)" % params
+
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _DaughterCut_p,
+            "K-" : _DaughterCut_K
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protons, kaons ] )
+
+#####################################################
+    def _makepKpipi( self, name, lambdas, rhos, params):
+        """
+        Make a Lambda* -> p K- pi+ pi- in entire range.
+        """
+
+        _Decays = "[Lambda(1830)0 -> Lambda(1520)0 rho(770)0]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Hadron_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_Lam = "(ALL)"
+        _DaughterCut_Rho = "(ALL)"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Lambda(1520)0"  : _DaughterCut_Lam,
+            "rho(770)0" : _DaughterCut_Rho
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ lambdas, rhos ] )
+
+#####################################################
+    def _makeKstarPlus( self, name, ksLL, ksDD, pions, params):
+        """
+        Make a K*(892)+ -> KS0 pi+
+        ##Check for list as input for KS0s which use (Very)Loose and Brunel candidates
+        """
+        # if isinstance(kshorts,list):
+        #     sel_list = [MergedSelection("Merged"+name,RequiredSelections= kshorts,Unique=True),pions]
+        # else:
+        #     sel_list = [kshorts,pions]
+
+        _Decays = "[K*(892)+ -> KS0 pi+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Hadron_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(KstarPVertexCHI2)s)" % params
+
+        _KshortCut = "(PT > %(KaonPT)s *MeV)" % params
+
+        _PionCut = "(PT > %(KaonPT)s *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "KS0"  : _KshortCut,
+            "pi+"  : _PionCut
+            }
+
+        _sel_KstarplusLL = Selection(name+"_LL",
+            RequiredSelections = [ ksLL, pions ],
+            Algorithm = _Combine)
+
+        _sel_KstarplusDD = Selection(name+"_DD",
+            RequiredSelections = [ ksDD, pions ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_KstarplusLL, _sel_KstarplusDD ])
+
+        return _sel
+
+#####################################################
+    def _makepKK( self, name, protons, kaons, params):
+        """
+        Make a Xi(1950)- -> p+ K- K- in entire range.
+        """
+
+        _Decays = "[Xi(1950)- -> p+ K- K-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Hadron_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_k = "(PT > %(KaonPT)s *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s))  & (PROBNNk > %(MinProbNNTight)s)" % params
+        _DaughterCut_p = "(PT > %(KaonPT)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s))  & (PROBNNp > %(MinProbNNTight)s)" % params
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _DaughterCut_p,
+            "K-" : _DaughterCut_k
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protons, kaons ] )
+
+#####################################################
+    def _makeXistarz( self, name, xis, pions, params):
+        """
+        Make a Xi*0 -> Xi- pi+
+        """
+
+        _Decays = "[Xi*0 -> Xi- pi+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Hadron_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(KstarPVertexCHI2)s)" % params
+
+        _XiCut = "(PT > %(KaonPT)s *MeV)" % params
+
+        _PionCut = "(PT > %(KaonPT)s *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Xi-"  : _XiCut,
+            "pi+"  : _PionCut
+            }
+
+
+        _sel_Xistarz = Selection(name+"_all",
+            RequiredSelections = [ xis, pions ],
+            Algorithm = _Combine)
+
+        #_sel = MergedSelection(name+"_all",
+    #        RequiredSelections = [ _sel_KstarplusLL, _sel_KstarplusDD ])
+
+        return _sel_Xistarz
+
+#####################################################
+    def _makeXiK( self, name, xis, kaons, params):
+        """
+        Make a Sigma(1915)0 -> Xi- K+
+        arxiv 1507.04640
+        """
+
+        _Decays = "[Sigma(1915)0 -> Xi- K+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Hadron_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(KstarPVertexCHI2)s)" % params
+
+        _XiCut = "(PT > %(KaonPT)s *MeV)" % params
+
+        _KaonCut = "(PT > %(KaonPT)s *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) & (PROBNNk > %(MinProbNNTight)s) & (HASRICH)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Xi-"  : _XiCut,
+            "K+"  : _KaonCut
+            }
+
+        _sel_XiK = Selection(name+"_all",
+            RequiredSelections = [ xis, kaons ],
+            Algorithm = _Combine)
+
+        return _sel_XiK
+
+#####################################################
+    def _makeOmegaK( self, name, omegas, kaons, params):
+        """
+        Make a Xi(1950)0 -> Omega- K+
+        """
+
+        _Decays = "[Xi(1950)0 -> Omega- K+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(Hadron_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(KstarPVertexCHI2)s)" % params
+
+        _OmCut = "(PT > %(KaonPT)s *MeV)" % params
+
+        _KaonCut = "(PT > %(KaonPT)s *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s)) & (PROBNNk > %(MinProbNNTight)s) & (HASRICH)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Omega-"  : _OmCut,
+            "K+"  : _KaonCut
+            }
+
+        _sel_OmK = Selection(name+"_all",
+            RequiredSelections = [ omegas, kaons ],
+            Algorithm = _Combine)
+
+        return _sel_OmK
+
+
+#####################################################
+    def _makeXiKS( self, name, xis, ksLL, ksDD, ksLD, params ) :
+        """
+        Make an Xi(2030)- -> Xi KS0
+        Xi(2030)- is just a proxy to get the two-body combination (should in fact be Omega resonance, but they are not in the particle list)
+        """
+
+        _Decays = "[Xi(2030)- -> Xi- KS0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM < %(Hadron_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsKS = "(ALL)"
+        _daughtersCutsXi = "(ALL)"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Xi-"  : _daughtersCutsXi,
+            "KS0" : _daughtersCutsKS }
+
+        _sel_KLLXi = Selection(name+"_LL",
+            RequiredSelections = [ xis, ksLL ],
+            Algorithm = _Combine)
+
+        _sel_KDDXi = Selection(name+"_DD",
+            RequiredSelections = [ xis, ksDD ],
+            Algorithm = _Combine)
+
+        _sel_KLDXi = Selection(name+"_LD",
+            RequiredSelections = [ xis, ksLD ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_KLLXi, _sel_KDDXi, _sel_KLDXi ])
+
+        return _sel
+
+
+#####################################################
+    def _makeLamK( self, name, lambdasLL, lambdasDD, lambdasLD, kaons, params ) :
+        """
+        Make an Xi(1690)- -> Lambda0 K-
+        Xi(1690)- is just a proxy to get the two-body combination
+        """
+
+        _Decays = "[Xi(1690)- -> Lambda0 K-]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM > %(Hadron_MassWindow_Lo)s*MeV) & (AM < %(Hadron_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsK = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNk > %(MinProbNN)s) & (HASRICH)" % params
+        _daughtersCutsL = "(M > %(Lambda_MassWindow_Lo)s*MeV) & (M<%(Lambda_MassWindow_Hi)s*MeV)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Lambda0"  : _daughtersCutsL,
+            "K-" : _daughtersCutsK }
+
+        _sel_KLambdaLL = Selection(name+"_LL",
+            RequiredSelections = [ lambdasLL, kaons ],
+            Algorithm = _Combine)
+
+        _sel_KLambdaDD = Selection(name+"_DD",
+            RequiredSelections = [ lambdasDD, kaons ],
+            Algorithm = _Combine)
+
+        _sel_KLambdaLD = Selection(name+"_LD",
+            RequiredSelections = [ lambdasLD, kaons ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_KLambdaLL, _sel_KLambdaDD, _sel_KLambdaLD ])
+
+        return _sel
+
+#####################################################
+    def _makeLamKS( self, name, lambdasLL, lambdasDD, lambdasLD, ksLL, ksDD, ksLD, params ) :
+        """
+        Make an Xi(1690)0 -> Lambda0 KS0
+        Xi(1690)- is just a proxy to get the two-body combination
+        """
+
+        _Decays = "[Xi(1690)0 -> Lambda0 KS0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM > %(Hadron_MassWindow_Lo)s*MeV) & (AM < %(Hadron_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsKS = "(ALL)"
+        _daughtersCutsL = "(M > %(Lambda_MassWindow_Lo)s*MeV) & (M<%(Lambda_MassWindow_Hi)s*MeV)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Lambda0"  : _daughtersCutsL,
+            "KS0" : _daughtersCutsKS }
+
+        #_Combine.CombinationCut   = _CombinationCut
+        #_Combine.MotherCut        = _MotherCut
+
+        #return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+
+        _sel_KLLLambdaLL = Selection(name+"_LLLL",
+            RequiredSelections = [ lambdasLL, ksLL ],
+            Algorithm = _Combine)
+
+        _sel_KLLLambdaDD = Selection(name+"_DDLL",
+            RequiredSelections = [ lambdasDD, ksLL ],
+            Algorithm = _Combine)
+
+        _sel_KLLLambdaLD = Selection(name+"_LDLL",
+            RequiredSelections = [ lambdasLD, ksLL ],
+            Algorithm = _Combine)
+
+        _sel_KLDLambdaLL = Selection(name+"_LLLD",
+            RequiredSelections = [ lambdasLL, ksLD ],
+            Algorithm = _Combine)
+
+        _sel_KLDLambdaDD = Selection(name+"_DDLD",
+            RequiredSelections = [ lambdasDD, ksLD ],
+            Algorithm = _Combine)
+
+        _sel_KLDLambdaLD = Selection(name+"_LDLD",
+            RequiredSelections = [ lambdasLD, ksLD ],
+            Algorithm = _Combine)
+
+        _sel_KDDLambdaLL = Selection(name+"_LLDD",
+            RequiredSelections = [ lambdasLL, ksDD ],
+            Algorithm = _Combine)
+
+        _sel_KDDLambdaDD = Selection(name+"_DDDD",
+            RequiredSelections = [ lambdasDD, ksDD ],
+            Algorithm = _Combine)
+
+        _sel_KDDLambdaLD = Selection(name+"_LDDD",
+            RequiredSelections = [ lambdasLD, ksDD ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_KLLLambdaLL, _sel_KLLLambdaDD, _sel_KLLLambdaLD, _sel_KLDLambdaLL, _sel_KLDLambdaDD, _sel_KLDLambdaLD, _sel_KDDLambdaLL, _sel_KDDLambdaDD, _sel_KDDLambdaLD ])
+
+        return _sel
+
+#####################################################
+    def _makeLamPiPi( self, name, lambdasLL, lambdasDD, lambdasLD, pipis, params ) :
+        """
+        Make an Lambda(1600)0 -> Lambda0 pi+ pi-
+        Lambda(1600)0 is just a proxy to get the 3-body combination
+        """
+
+        _Decays = "[Lambda(1600)0 -> Lambda0 rho(770)0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM > %(Hadron_MassWindow_Lo)s*MeV) & (AM < %(Hadron_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsRho = "(ALL)" #"(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNpi > %(MinProbNN)s) & (HASRICH)" % params""
+        _daughtersCutsL = "(M > %(Lambda_MassWindow_Lo)s*MeV) & (M<%(Lambda_MassWindow_Hi)s*MeV)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Lambda0"  : _daughtersCutsL,
+            "rho(770)0" : _daughtersCutsRho }
+
+        #_Combine.CombinationCut   = _CombinationCut
+        #_Combine.MotherCut        = _MotherCut
+
+        #return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+
+        _sel_PiPiLambdaLL = Selection(name+"_LL",
+            RequiredSelections = [ lambdasLL, pipis ],
+            Algorithm = _Combine)
+
+        _sel_PiPiLambdaDD = Selection(name+"_DD",
+            RequiredSelections = [ lambdasDD, pipis ],
+            Algorithm = _Combine)
+
+        _sel_PiPiLambdaLD = Selection(name+"_LD",
+            RequiredSelections = [ lambdasLD, pipis ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_PiPiLambdaLL, _sel_PiPiLambdaDD, _sel_PiPiLambdaLD ])
+
+        return _sel
+
+#####################################################
+    def _makeLamPhi( self, name, lambdasLL, lambdasDD, lambdasLD, phis, params ) :
+        """
+        Make an Lambda(2100)0 -> Lambda0 phi
+        Lambda(2100)0 is just a proxy to get the 2-body combination
+        """
+
+        _Decays = "[Lambda(2100)0 -> Lambda0 phi(1020)]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM < %(Hadron_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsPhi = "(2 == NINTREE((ABSID==321)&(PROBNNk > %(MinProbNNTight)s)))" % params #"(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNpi > %(MinProbNN)s) & (HASRICH)" % params""
+        _daughtersCutsL = "(M > %(Lambda_MassWindow_Lo)s*MeV) & (M<%(Lambda_MassWindow_Hi)s*MeV)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Lambda0"  : _daughtersCutsL,
+            "phi(1020)" : _daughtersCutsPhi }
+
+        #_Combine.CombinationCut   = _CombinationCut
+        #_Combine.MotherCut        = _MotherCut
+
+        #return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+
+        _sel_PhiLambdaLL = Selection(name+"_LL",
+            RequiredSelections = [ lambdasLL, phis ],
+            Algorithm = _Combine)
+
+        _sel_PhiLambdaDD = Selection(name+"_DD",
+            RequiredSelections = [ lambdasDD, phis ],
+            Algorithm = _Combine)
+
+        _sel_PhiLambdaLD = Selection(name+"_LD",
+            RequiredSelections = [ lambdasLD, phis ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_PhiLambdaLL, _sel_PhiLambdaDD, _sel_PhiLambdaLD ])
+
+        return _sel
+
+#####################################################
+    def _makeXiPhi( self, name, xis, phis, params ) :
+        """
+        Make an Sigma(1940)- -> Xi- phi
+        Sigma(1940)- is just a proxy to get the 2-body combination (must be an excited Xi, but they are not enough in ParticleTable)
+        """
+
+        _Decays = "[Sigma(1940)- -> Xi- phi(1020)]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM < %(Hadron_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsPhi = "(2 == NINTREE((ABSID==321)&(PROBNNk > %(MinProbNNTight)s)))" % params #"(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNpi > %(MinProbNN)s) & (HASRICH)" % params""
+        _daughtersCutsX = "(ALL)"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Xi-"  : _daughtersCutsX,
+            "phi(1020)" : _daughtersCutsPhi }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ xis, phis ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+    def _makeOmegaPhi( self, name, omegas, phis, params ) :
+        """
+        Make an Sigma(2030)- -> Omega- phi
+        Sigma(2030)- is just a proxy to get the 2-body combination (must be an excited Xi, but they are not enough in ParticleTable)
+        """
+
+        _Decays = "[Sigma(2030)- -> Omega- phi(1020)]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM < %(Hadron_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsPhi = "(2 == NINTREE((ABSID==321)&(PROBNNk > %(MinProbNNTight)s)))" % params #"(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNpi > %(MinProbNN)s) & (HASRICH)" % params""
+        _daughtersCutsO = "(1 == NINTREE((ABSID==321)&(PIDK > 0)))"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Omega-"  : _daughtersCutsO,
+            "phi(1020)" : _daughtersCutsPhi }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ omegas, phis ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+    def _makeXiPiPi( self, name, xis, pipis, params ) :
+        """
+        Make an Xi(1820)- -> Xi- pi+ pi-
+        Xi(1820)- is just a proxy to get the 3-body combination
+        """
+
+        _Decays = "[Xi(1820)- -> Xi- rho(770)0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM > %(Hadron_MassWindow_Lo)s*MeV) & (AM < %(Hadron_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsRho = "(ALL)"
+        _daughtersCutsX = "(ALL)"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Xi-"  : _daughtersCutsX,
+            "rho(770)0" : _daughtersCutsRho }
+
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ xis, pipis ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+    def _makeOmegaPiPi( self, name, omegas, pipis, params ) :
+        """
+        Make an Omega(2250)- -> Omega- pi+ pi-
+        Omega(2250)- is just a proxy to get the 3-body combination
+        """
+
+        _Decays = "[Omega(2250)- -> Omega- rho(770)0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM > %(Hadron_MassWindow_Lo)s*MeV) & (AM < %(Hadron_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsRho = "(ALL)"
+        _daughtersCutsO = "(1 == NINTREE((ABSID==321)&(PIDK > 0)))"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Omega-"  : _daughtersCutsO,
+            "rho(770)0" : _daughtersCutsRho }
+
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ omegas, pipis ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+    def _makepKst( self, name, protons, kstars, params ) :
+        """
+        Make an Lambda(1800)0 -> p K*-
+        Lambda(1800)0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "[Lambda(1800)0 -> p+ K*(892)-]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM > %(Hadron_MassWindow_Lo)s*MeV) & (AM < %(Hadron_MassWindow_Hi)s*MeV)" % params
+        _MotherCut  = "(VFASPF(VCHI2) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsKst = "(ALL)"
+        _daughtersCutsP = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNp > %(MinProbNNTight)s) & (P > 3500*MeV) & (HASRICH)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _daughtersCutsP,
+            "K*(892)-" : _daughtersCutsKst }
+
+        #_Combine.CombinationCut   = _CombinationCut
+        #_Combine.MotherCut        = _MotherCut
+
+        #return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+
+        _sel_pKst = Selection(name+"_pKst",
+            RequiredSelections = [ protons, kstars ],
+            Algorithm = _Combine)
+
+        # _sel = MergedSelection(name+"_all",
+        #     RequiredSelections = [ _sel_KLLLambdaLL, _sel_KLLLambdaDD, _sel_KLLLambdaLD, _sel_KLDLambdaLL, _sel_KLDLambdaDD, _sel_KLDLambdaLD, _sel_KDDLambdaLL, _sel_KDDLambdaDD, _sel_KDDLambdaLD ])
+
+        return _sel_pKst
+
+#####################################################
+# builders for b->charm mumu
+#####################################################
+
+    def _makeXic02pKKpi(self, name, pions, kaons, protons, params):
+        '''Makes Xic0 -> p K- K- pi+
+           borrowed from Xib2Xic0PiXic02PKKPiBeauty2CharmLine, adapted a bit
+        '''
+        comboCuts12 = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)"% params
+        comboCuts123 = "(ADOCA(1,3)<%(DiHadronADOCA)s*mm) & (ADOCA(2,3)<%(DiHadronADOCA)s*mm)"% params
+        comboCuts = "(ASUM(PT)>1500*MeV) & (ADAMASS('Xi_c0') < 115*MeV) & (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 500*MeV) & (P > %(ProtonP)s *MeV)))) & (ADOCA(1,4)<%(DiHadronADOCA)s*mm) & (ADOCA(2,4)<%(DiHadronADOCA)s*mm) & (ADOCA(3,4)<%(DiHadronADOCA)s*mm)" % params
+        momCuts = "(ADMASS('Xi_c0') < 100*MeV) & (VFASPF(VCHI2/VDOF)<%(Hadron_VtxChi2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.99) & (2 == NINTREE((ABSID==321) & (PROBNNk > %(MinProbNN)s))) & (1 == NINTREE((ABSID==2212)&(PROBNNp > %(MinProbNN)s)))" % params
+        cp = DaVinci__N4BodyDecays(
+            Combination12Cut=comboCuts12,
+            Combination123Cut=comboCuts123,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_c0 -> p+ K- K- pi+]cc"])
+        cp.DaughtersCuts = {
+            "p+"  : "(P > 2*GeV)",
+            "K-"  : "(P > 2*GeV)",
+            "pi+"  : "(P > 1*GeV)",
+            }
+        return Selection(
+            name+'_Xic02PKKPi',
+            Algorithm=cp,
+            RequiredSelections=[pions, kaons, protons])
+#####################################################
+    def _makeLc2pKpi(self, name, pions, kaons, protons, params):
+        '''Makes Lc -> p K pi '''
+        comboCuts12 = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)"% params
+        comboCuts = "(ASUM(PT)>1800*MeV) & (ADAMASS('Lambda_c+') < 115*MeV) & (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 400*MeV) & (P > 4000*MeV)))) & (ADOCA(1,3)<%(DiHadronADOCA)s*mm) & (ADOCA(2,3)<%(DiHadronADOCA)s*mm)" % params
+        momCuts = "(ADMASS('Lambda_c+') < 100*MeV) & (VFASPF(VCHI2/VDOF)<%(Hadron_VtxChi2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.99) & (1 == NINTREE((ABSID==321) & (PROBNNk > %(MinProbNNTight)s))) & (1 == NINTREE((ABSID==2212)&(PROBNNp > %(MinProbNNTight)s)))" % params
+        cp = DaVinci__N3BodyDecays(
+            Combination12Cut=comboCuts12,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Lambda_c+ -> p+ K- pi+]cc"])
+        cp.DaughtersCuts = {
+            "p+"  : "(P > 2*GeV)",
+            "K-"  : "(P > 2*GeV)",
+            "pi+"  : "(P > 1*GeV)",
+            }
+        return Selection(
+            name+'_Lc2PKPi',
+            Algorithm=cp,
+            RequiredSelections=[pions, kaons, protons])
+#####################################################
+    def _makeXic2pKpi(self, name, pions, kaons, protons, params):
+        '''Makes Xic+ -> p K pi '''
+        comboCuts12 = "(ADOCA(1,2)<%(DiHadronADOCA)s*mm)"% params
+        comboCuts = "(ASUM(PT)>1800*MeV) & (ADAMASS('Xi_c+') < 115*MeV) & (AHASCHILD((ISBASIC & HASTRACK & (TRCHI2DOF<4.) & (PT > 400*MeV) & (P > 4000*MeV)))) & (ADOCA(1,3)<%(DiHadronADOCA)s*mm) & (ADOCA(2,3)<%(DiHadronADOCA)s*mm)" % params
+        momCuts = "(ADMASS('Xi_c+') < 100*MeV) & (VFASPF(VCHI2/VDOF)<%(Hadron_VtxChi2)s) & (BPVVDCHI2>25) & (BPVDIRA>0.99) & (1 == NINTREE((ABSID==321) & (PROBNNk > %(MinProbNNTight)s))) & (1 == NINTREE((ABSID==2212)&(PROBNNp > %(MinProbNNTight)s)))" % params
+        cp = DaVinci__N3BodyDecays(
+            Combination12Cut=comboCuts12,
+            CombinationCut=comboCuts,
+            MotherCut=momCuts,
+            DecayDescriptors=["[Xi_c+ -> p+ K- pi+]cc"])
+        cp.DaughtersCuts = {
+            "p+"  : "(P > 2*GeV)",
+            "K-"  : "(P > 2*GeV)",
+            "pi+"  : "(P > 1*GeV)",
+            }
+        return Selection(
+            name+'_Xicp2PKPi',
+            Algorithm=cp,
+            RequiredSelections=[pions, kaons, protons])
+#####################################################
+    def _makeSigmac( self, name, lambdacs, pions, params):
+        """
+        Make a Sigmac0 -> Lc+ pi-
+        """
+
+        _Decays = "[Sigma_c0 -> Lambda_c+ pi-]cc"
+
+        _CombinationCut = "(APT > 2*%(KaonPT)s *MeV) & " \
+                          "(AM < %(Hadron_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < 10) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" #% params
+
+        _LcCut = "(ALL)"
+        _PionCut = "(PT > 100 *MeV) & " \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Lambda_c+"  : _LcCut,
+            "pi-"  : _PionCut
+            }
+
+        _sel_Sigmac = Selection(name+"_all",
+            RequiredSelections = [ lambdacs, pions ],
+            Algorithm = _Combine)
+
+        #_sel = MergedSelection(name+"_all",
+    #        RequiredSelections = [ _sel_KstarplusLL, _sel_KstarplusDD ])
+
+        return _sel_Sigmac
+#####################################################
+    def _makeLcK( self, name, lambdacs, kaons, params):
+        """
+        Make a Xi_c(2790)0 -> Lc+ K-
+        """
+
+        _Decays = "[Xi_c(2790)0 -> Lambda_c+ K-]cc"
+
+        _CombinationCut = "(APT > 2*%(KaonPT)s *MeV) & " \
+                          "(AM < %(Hadron_MassWindow_Hi)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2PDOF) < 9) & (BPVVDCHI2>25) & (BPVDIRA>0.9)" #% params
+
+        _LcCut = "(ALL)"
+        _KaonCut = "(PT > 150 *MeV) & (PROBNNk > %(MinProbNNTight)s) &" \
+                   "((ISBASIC) & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "Lambda_c+"  : _LcCut,
+            "K-"  : _KaonCut
+            }
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ lambdacs, kaons ],
+            Algorithm = _Combine)
+
+        #_sel = MergedSelection(name+"_all",
+    #        RequiredSelections = [ _sel_KstarplusLL, _sel_KstarplusDD ])
+
+        return _sel
+
+
+#####################################################
+#neutrals
+#####################################################
+    def _makeXi0( self, name, lambdasLL, lambdasDD, lambdasLD, pi0s, params ) :
+        """
+        Make an Xi0 -> Lambda0 pi0
+        Xi0 is very long-lived, therefore pi0 is very displaced. Standard pi0 definitions do not suit us as they assume pi0 poiting to the PV. We use a cutsom very loose pi0 with extremely loose photon cut and very broad mass window.
+        """
+
+        _Decays = "[Xi0 -> Lambda0 pi0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(ADAMASS('Xi0') < 260.0*MeV)" #" & (AMAXDOCA('')< 2 *mm)" #% params
+        _MotherCut  = "(ADMASS('Xi0') < 250.0*MeV) & (PT>200.0) & (MTDOCACHI2(1) < 16.0)" #% params #& (BPVLTIME()> 2.0 * ps)
+        _daughtersCutsPi0 = "(PT>100 * MeV)" #"  & (2 == NINTREE((ABSID==22)&(CL>0.1)))" #% params
+        _daughtersCutsL = "(M > %(Lambda_MassWindow_Lo)s*MeV) & (M<%(Lambda_MassWindow_Hi)s*MeV)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Lambda0"  : _daughtersCutsL,
+            "pi0" : _daughtersCutsPi0 }
+
+
+        _sel_PiLambdaLL = Selection(name+"_LL",
+            RequiredSelections = [ lambdasLL, pi0s ],
+            Algorithm = _Combine)
+
+        _sel_PiLambdaDD = Selection(name+"_DD",
+            RequiredSelections = [ lambdasDD, pi0s ],
+            Algorithm = _Combine)
+
+        _sel_PiLambdaLD = Selection(name+"_LD",
+            RequiredSelections = [ lambdasLD, pi0s ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_PiLambdaLL, _sel_PiLambdaDD, _sel_PiLambdaLD ])
+
+        return _sel
+
+
+    def _makeXi0_DTF( self, name, lambdasLL, lambdasDD, lambdasLD, pi0s, params ) :
+        """
+        Make an Xi0 -> Lambda0 pi0 without vertex fit but with the DTF fit
+        Xi0 is very long-lived, therefore pi0 is very displaced. Standard pi0 definitions do not suit us as they assume pi0 poiting to the PV. We use a cutsom very loose pi0 with extremely loose photon cut and very broad mass window.
+        """
+
+        _Decays = "[Xi0 -> Lambda0 pi0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(ADAMASS('Xi0') < 260.0*MeV)" #" & (AMAXDOCA('')< 2 *mm)" #% params
+        _MotherCut  = "(DTF_FUN(M, True, strings(['pi0', 'Lambda0']) )>1200*MeV) & (DTF_FUN(M, True, strings(['pi0', 'Lambda0']) )<1450*MeV) & (PT>200.0) & (MTDOCACHI2(1) < 16.0) & (DTF_CHI2NDOF(True,strings(['pi0', 'Lambda0']))<9)" #% params
+        #ok really the "True" is wrong here, but the DTF does not work oterhwise complaining it needs more geometrical constraints
+        _daughtersCutsPi0 = "(PT>100 * MeV)" #"  & (2 == NINTREE((ABSID==22)&(CL>0.1)))" #% params
+        _daughtersCutsL = "(M > %(Lambda_MassWindow_Lo)s*MeV) & (M<%(Lambda_MassWindow_Hi)s*MeV)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+        _Combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'} #do not run the default vertex fit
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Lambda0"  : _daughtersCutsL,
+            "pi0" : _daughtersCutsPi0 }
+
+
+        _sel_PiLambdaLL = Selection(name+"_LL",
+            RequiredSelections = [ lambdasLL, pi0s ],
+            Algorithm = _Combine)
+
+        _sel_PiLambdaDD = Selection(name+"_DD",
+            RequiredSelections = [ lambdasDD, pi0s ],
+            Algorithm = _Combine)
+
+        _sel_PiLambdaLD = Selection(name+"_LD",
+            RequiredSelections = [ lambdasLD, pi0s ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_PiLambdaLL, _sel_PiLambdaDD, _sel_PiLambdaLD ])
+
+        return _sel
+
+
+    # def _makeXi0_MTDOCA( self, name, lambdasLL, lambdasDD, lambdasLD, pi0s, params ) :
+    #     """
+    #     Make an Xi0 -> Lambda0 pi0
+    #     Xi0 is very long-lived, therefore pi0 is very displaced. Standard pi0 definitions do not suit us as they assume pi0 poiting to the PV. We use a cutsom very loose pi0 with extremely loose photon cut and very broad mass window.
+    #     """
+    #
+    #     _Decays = "[Xi0 -> Lambda0 pi0]cc"
+    #
+    #      # define all the cuts
+    #
+    #     _CombinationCut    = "(ADAMASS('Xi0') < 260.0*MeV)" #" & (AMAXDOCA('')< 2 *mm)" #% params
+    #     _MotherCut  = "(ADMASS('Xi0') < 250.0*MeV) & (PT>200.0) & (MTDOCACHI2(1) < 16.0)" #% params #& (BPVLTIME()> 2.0 * ps)
+    #     _daughtersCutsPi0 = "(PT>100 * MeV)" #"  & (2 == NINTREE((ABSID==22)&(CL>0.1)))" #% params
+    #     _daughtersCutsL = "(M > %(Lambda_MassWindow_Lo)s*MeV) & (M<%(Lambda_MassWindow_Hi)s*MeV)" % params
+    #
+    #     _Combine = CombineParticles( DecayDescriptor = _Decays,
+    #                                  CombinationCut  = _CombinationCut,
+    #                                  MotherCut       = _MotherCut)
+    #
+    #     _Combine.DecayDescriptor = _Decays
+    #
+    #     _Combine.DaughtersCuts = {
+    #         "Lambda0"  : _daughtersCutsL,
+    #         "pi0" : _daughtersCutsPi0 }
+    #
+    #     #_Combine.CombinationCut   = _CombinationCut
+    #     #_Combine.MotherCut        = _MotherCut
+    #
+    #     #return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+    #
+    #     _sel_PiLambdaLL = Selection(name+"_LL",
+    #         RequiredSelections = [ lambdasLL, pi0s ],
+    #         Algorithm = _Combine)
+    #
+    #     _sel_PiLambdaDD = Selection(name+"_DD",
+    #         RequiredSelections = [ lambdasDD, pi0s ],
+    #         Algorithm = _Combine)
+    #
+    #     _sel_PiLambdaLD = Selection(name+"_LD",
+    #         RequiredSelections = [ lambdasLD, pi0s ],
+    #         Algorithm = _Combine)
+    #
+    #     _sel = MergedSelection(name+"_all",
+    #         RequiredSelections = [ _sel_PiLambdaLL, _sel_PiLambdaDD, _sel_PiLambdaLD ])
+    #
+    #     return _sel
+
+
+#####################################################
+    def _makeSigmap( self, name, protonsL, protonsD, pi0s, params ) :
+        """
+        Make an Sigma+ -> p pi0
+        Sigma+ is fairly long-lived, therefore pi0 is fairly displaced. It is also very soft. Standard pi0 definitions do not suit us as they assume pi0 poiting to the PV. We use a cutsom very loose pi0 with extremely loose photon cut and very broad mass window.
+        """
+
+        _Decays = "[Sigma+ -> p+ pi0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(ADAMASS('Sigma+') < 250.0*MeV)" #" & (AMAXDOCA('')< 1 *mm)" #% params
+        _MotherCut  = "(ADMASS('Sigma+') < 240.0*MeV) & (PT>%(KaonPT)s*MeV) & (MTDOCACHI2(1) < 15.0)" % params #& (BPVLTIME()> 2.0 * ps)
+        _daughtersCutsPi0 = "(PT>100 * MeV)" #"  & (2 == NINTREE((ABSID==22)&(CL>0.1)))" #% params
+        _daughtersCutsP = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNp > 2*%(MinProbNNTight)s) & (P > 3000*MeV) & (PT>250*MeV) & (HASRICH) & (MIPCHI2DV(PRIMARY)>9)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _daughtersCutsP,
+            "pi0" : _daughtersCutsPi0 }
+
+        #_Combine.CombinationCut   = _CombinationCut
+        #_Combine.MotherCut        = _MotherCut
+
+        #return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+
+        _sel_PiPL = Selection(name+"_L",
+            RequiredSelections = [ protonsL, pi0s ],
+            Algorithm = _Combine)
+
+        _sel_PiPD = Selection(name+"_D",
+            RequiredSelections = [ protonsD, pi0s ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_PiPL, _sel_PiPD ])
+
+        return _sel
+
+#####################################################
+    def _makeSigmap_DTF( self, name, protonsL, protonsD, pi0s, params ) :
+        """
+        Make an Sigma+ -> p pi0
+        Sigma+ is fairly long-lived, therefore pi0 is fairly displaced. It is also very soft. Standard pi0 definitions do not suit us as they assume pi0 poiting to the PV. We use a cutsom very loose pi0 with extremely loose photon cut and very broad mass window.
+        """
+
+        _Decays = "[Sigma+ -> p+ pi0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(ADAMASS('Sigma+') < 350.0*MeV)" #" & (AMAXDOCA('')< 1 *mm)" #% params
+        _MotherCut  = "(DTF_FUN(M, True, strings(['pi0']) )>1000*MeV) & (DTF_FUN(M, True, strings(['pi0']) )<1300*MeV) & (PT>200.0) & (MTDOCACHI2(1) < 16.0) & (DTF_CHI2NDOF(True,strings(['pi0']))<9)"
+        #ok really the "True" is wrong here, but the DTF does not work oterhwise complaining it needs more geometrical constraints
+        #_MotherCut  = "(ADMASS('Sigma+') < 240.0*MeV) & (PT>%(KaonPT)s*MeV) & (MTDOCACHI2(1) < 15.0)" % params #& (BPVLTIME()> 2.0 * ps)
+        _daughtersCutsPi0 = "(PT>100 * MeV)" #"  & (2 == NINTREE((ABSID==22)&(CL>0.1)))" #% params
+        _daughtersCutsP = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNp > 2*%(MinProbNNTight)s) & (P > 2000*MeV) & (PT>250*MeV) & (HASRICH) & (MIPCHI2DV(PRIMARY)>9)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+        _Combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'} #do not run the default vertex fit
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _daughtersCutsP,
+            "pi0" : _daughtersCutsPi0 }
+
+        #_Combine.CombinationCut   = _CombinationCut
+        #_Combine.MotherCut        = _MotherCut
+
+        #return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+
+        _sel_PiPL = Selection(name+"_L",
+            RequiredSelections = [ protonsL, pi0s ],
+            Algorithm = _Combine)
+
+        _sel_PiPD = Selection(name+"_D",
+            RequiredSelections = [ protonsD, pi0s ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_PiPL, _sel_PiPD ])
+
+        return _sel
+
+
+#####################################################
+    def _makeSigmapTight( self, name, protonsL, protonsD, pi0s, params ) :
+        """
+        Make an Sigma+ -> p pi0
+        Sigma+ is fairly long-lived, therefore pi0 is fairly displaced. It is also very soft. Standard pi0 definitions do not suit us as they assume pi0 poiting to the PV. We use a cutsom very loose pi0 with extremely loose photon cut and very broad mass window.
+        """
+
+        _Decays = "[Sigma+ -> p+ pi0]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(ADAMASS('Sigma+') < 210.0*MeV)" #" & (AMAXDOCA('')< 1 *mm)" #% params
+        _MotherCut  = "(ADMASS('Sigma+') < 160.0*MeV) & (PT>500.0) & (MTDOCACHI2(1) < 9.0)" #% params #& (BPVLTIME()> 2.0 * ps)
+        _daughtersCutsPi0 = "(PT>200 * MeV) & (2 == NINTREE((ABSID==22)&(CL>0.4)))" #% params
+        _daughtersCutsP = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNp > 3*%(MinProbNNTight)s) & (P > 5000*MeV) & (PT>500*MeV) & (HASRICH) & (MIPCHI2DV(PRIMARY)>16)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _daughtersCutsP,
+            "pi0" : _daughtersCutsPi0 }
+
+        #_Combine.CombinationCut   = _CombinationCut
+        #_Combine.MotherCut        = _MotherCut
+
+        #return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
+
+        _sel_PiPL = Selection(name+"_L",
+            RequiredSelections = [ protonsL, pi0s ],
+            Algorithm = _Combine)
+
+        _sel_PiPD = Selection(name+"_D",
+            RequiredSelections = [ protonsD, pi0s ],
+            Algorithm = _Combine)
+
+        _sel = MergedSelection(name+"_all",
+            RequiredSelections = [ _sel_PiPL, _sel_PiPD ])
+
+        return _sel
+
+#####################################################
+    def _makeXi0K( self, name, xis, kaons, params ) :
+        """
+        Make an Sigma(2250)- -> Xi0 K-
+        Sigma(2250)- is just a proxy to get the two-body combination
+        It should be Omega but we don't have enough Omegas in ParticleTable.
+        """
+
+        _Decays = "[Sigma(2250)- -> Xi0 K-]cc"
+
+         # define all the cuts
+#
+        _CombinationCut    = "(AM < 3500*MeV) & (AMAXDOCA('')< 1 *mm)" % params
+        _MotherCut  = "(VFASPF(VCHI2PDOF) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsK = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNk > 2*%(MinProbNNTight)s) & (HASRICH) & (PT > 250*MeV)" % params
+        _daughtersCutsXi = "(PT > 300*MeV) & (2 == NINTREE((ABSID==22)&(CL>0.4)))"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Xi0"  : _daughtersCutsXi,
+            "K-" : _daughtersCutsK }
+
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ xis, kaons ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+    def _makeSigmaK( self, name, sigmas, kaons, params ) :
+        """
+        Make an Xi(2030)0 -> Sigma+ K-
+        Xi(2030)0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "[Xi(2030)0 -> Sigma+ K-]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM < 3000*MeV) & (AMAXDOCA('')< 1 *mm)" % params
+        _MotherCut  = "(VFASPF(VCHI2PDOF) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsK = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNk > 2*%(MinProbNNTight)s) & (HASRICH) & (PT > 250*MeV)" % params
+        _daughtersCutsSi = "(PT > 450*MeV) & (2 == NINTREE((ABSID==22)&(CL>0.4)))"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Sigma+"  : _daughtersCutsSi,
+            "K-" : _daughtersCutsK }
+
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ sigmas, kaons ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+    def _makeSigmaPi( self, name, sigmas, pions, params ) :
+        """
+        Make an Sigma(1750)0 -> Sigma+ pi-
+        Sigma(1750)0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "[Sigma(1750)0 -> Sigma+ pi-]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM < 2900*MeV) & (AMAXDOCA('')< 1 *mm)" % params
+        _MotherCut  = "(VFASPF(VCHI2PDOF) < %(Hadron_VtxChi2)s)" % params
+        _daughtersCutsPi = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNpi > %(MinProbNNTight)s) & (HASRICH) & (PT > 250*MeV)" % params
+        _daughtersCutsSi = "(PT > 500*MeV) & (2 == NINTREE((ABSID==22)&(CL>0.4))) & (1 == NINTREE((ABSID==2212)&(PROBNNp>0.2)&(P>3000)))"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Sigma+"  : _daughtersCutsSi,
+            "pi-" : _daughtersCutsPi }
+
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ sigmas, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+    def _makeXi0K_DTF( self, name, xis, kaons, params ) :
+        """
+        Make an Sigma(2250)- -> Xi0 K-
+        Sigma(2250)- is just a proxy to get the two-body combination
+        It should be Omega but we don't have enough Omegas in ParticleTable.
+        """
+
+        _Decays = "[Sigma(2250)- -> Xi0 K-]cc"
+
+         # define all the cuts
+        #_MotherCut  = "(DTF_FUN(M, False, strings(['pi0']) )>1000*MeV) & (DTF_FUN(M, False, strings(['pi0']) )<1300*MeV) & (PT>200.0) & (MTDOCACHI2(1) < 16.0) & (DTF_CHI2NDOF(False,strings(['pi0']))<9)"
+        _CombinationCut    = "(AM < 3500*MeV)"#" & (AMAXDOCA('')< 1 *mm)" % params
+        _MotherCut  = "(DTF_FUN(VFASPF(VCHI2PDOF), True, strings(['pi0']) ) < 16) & (DTF_FUN(M, True, strings(['pi0']) ) < 3200*MeV)" % params
+        _daughtersCutsK = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNk > 2*%(MinProbNNTight)s) & (HASRICH) & (PT > 250*MeV)" % params
+        _daughtersCutsXi = "(DTF_FUN(PT, True, strings(['pi0']) ) > 300*MeV) & (2 == NINTREE((ABSID==22)&(CL>0.4)))"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+        _Combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'} #do not run the default vertex fit
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Xi0"  : _daughtersCutsXi,
+            "K-" : _daughtersCutsK }
+
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ xis, kaons ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+    def _makeSigmaK_DTF( self, name, sigmas, kaons, params ) :
+        """
+        Make an Xi(2030)0 -> Sigma+ K-
+        Xi(2030)0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "[Xi(2030)0 -> Sigma+ K-]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM < 3500*MeV)"# & (AMAXDOCA('')< 1 *mm)" % params
+        _MotherCut  = "(DTF_FUN(VFASPF(VCHI2PDOF), True, strings(['pi0']) ) < 16) & (DTF_FUN(M, True, strings(['pi0']) ) < 3000*MeV)" % params
+        _daughtersCutsK = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNk > 2*%(MinProbNNTight)s) & (HASRICH) & (PT > 250*MeV)" % params
+        _daughtersCutsSi = "(DTF_FUN(PT, True, strings(['pi0']) ) > 500*MeV) & (2 == NINTREE((ABSID==22)&(CL>0.4))) & (DTF_FUN(MTDOCACHI2(1), True, strings(['pi0']) ) < 10.0)"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+        _Combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'} #do not run the default vertex fit
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Sigma+"  : _daughtersCutsSi,
+            "K-" : _daughtersCutsK }
+
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ sigmas, kaons ],
+            Algorithm = _Combine)
+
+        return _sel
+
+#####################################################
+    def _makeSigmaPi_DTF( self, name, sigmas, pions, params ) :
+        """
+        Make an Sigma(1750)0 -> Sigma+ pi-
+        Sigma(1750)0 is just a proxy to get the two-body combination
+        """
+
+        _Decays = "[Sigma(1750)0 -> Sigma+ pi-]cc"
+
+         # define all the cuts
+
+        _CombinationCut    = "(AM < 3000*MeV)"# & (AMAXDOCA('')< 1 *mm)" % params
+        _MotherCut  = "(DTF_FUN(VFASPF(VCHI2PDOF), True, strings(['pi0']) ) < 12) & (DTF_FUN(M, True, strings(['pi0']) ) < 2300*MeV)" % params
+        _daughtersCutsPi = "(TRCHI2DOF < %(Trk_Chi2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s) & (PROBNNpi > %(MinProbNNTight)s) & (HASRICH) & (PT > 250*MeV)" % params
+        _daughtersCutsSi = "(DTF_FUN(PT, True, strings(['pi0']) ) > 500*MeV) & (2 == NINTREE((ABSID==22)&(CL>0.4))) & (1 == NINTREE((ABSID==2212)&(PROBNNp>0.3)&(P>3500))) & (DTF_FUN(MTDOCACHI2(1), True, strings(['pi0']) ) < 10.0)"
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+        _Combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'} #do not run the default vertex fit
+        _Combine.DecayDescriptor = _Decays
+
+        _Combine.DaughtersCuts = {
+            "Sigma+"  : _daughtersCutsSi,
+            "pi-" : _daughtersCutsPi }
+
+
+        _sel = Selection(name+"_all",
+            RequiredSelections = [ sigmas, pions ],
+            Algorithm = _Combine)
+
+        return _sel
+
+# added for 2018 restripping: partially reconstructed Xi or Omega
+#####################################################
+    def __XiPR__( self, name, protonsL, protonsD, pionsL, pionsD, params):
+        """
+        Make a Xi- -> p pi- (no soft pion from the Lambda).
+        """
+
+        _Decays = "[Xi- -> p+ pi-]cc"
+
+        _CombinationCut = "(AM > %(XiPR_M_Lo_comb)s *MeV) & (AM < %(XiPR_M_Hi_comb)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2_PR)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2_PR)s) & (BPVDIRA > %(OmDIRA_PR)s) & (BPVLTIME() > 1.8*%(V0TAU)s * ps)" % params
+
+        _DaughterCut_p = "(PT > 2*%(KaonPT)s *MeV) & (P > 1.4*%(ProtonP)s *MeV) & (MIPCHI2DV(PRIMARY) > 1.4*%(Hadron_MinIPCHI2)s) & " \
+                   "((ISBASIC) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PIDp > %(MinDLLp)s)" % params
+        _DaughterCut_pi = " (MIPCHI2DV(PRIMARY) > 1.6*%(Hadron_MinIPCHI2)s) & " \
+                   "((ISBASIC) & (TRGHOSTPROB < %(Trk_GhostProb)s)) " % params
+
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+" : _DaughterCut_p,
+            "pi-" : _DaughterCut_pi
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protonsL, protonsD, pionsL, pionsD ] )
+#####################################################
+    def __OmegaPR__( self, name, protonsL, protonsD, kaonsL, kaonsD, params):
+        """
+        Make a Omega- -> p K- (no soft pion from the Lambda).
+        """
+
+        _Decays = "[Omega- -> p+ K-]cc"
+
+        _CombinationCut = "(AM > %(OmegaPR_M_Lo_comb)s *MeV) & (AM < %(OmegaPR_M_Hi_comb)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2_PR)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2_PR)s) & (BPVDIRA > %(OmDIRA_PR)s) & (BPVLTIME() > 1.6*%(V0TAU)s * ps)" % params
+
+        _DaughterCut_p = "(PT > 1.6*%(KaonPT)s *MeV) & (P > 1.2*%(ProtonP)s *MeV) & (MIPCHI2DV(PRIMARY) > 1.2*%(Hadron_MinIPCHI2)s) & " \
+                   "((ISBASIC) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PIDp > %(MinDLLp)s)" % params
+        _DaughterCut_K = " (MIPCHI2DV(PRIMARY) > 1.2*%(Hadron_MinIPCHI2)s) & " \
+                   "((ISBASIC) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PIDK > %(MinDLLK)s)" % params
+
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+" : _DaughterCut_p,
+            "K-" : _DaughterCut_K
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protonsL, protonsD, kaonsL, kaonsD ] )
+
+
+
+#####################################################
+# final builder
+#####################################################
+    def _makeB2LLX( self, name, dilepton, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the B baryons
+        """
+
+        _Decays = [
+                    "[ Xi_b- -> J/psi(1S) Xi(1690)- ]cc",
+                    "[ Xi_b0 -> J/psi(1S) Xi(1690)0 ]cc",
+                    "[ Xi_b- -> J/psi(1S) Xi(1950)- ]cc",
+                    "[ Xi_b0 -> J/psi(1S) Xi(1950)0 ]cc",
+                    "[ Xi_b- -> J/psi(1S) Xi(1820)- ]cc",
+                    "[ Xi_b0 -> J/psi(1S) Xi*0 ]cc",
+                    "[ Omega_b- -> J/psi(1S) Omega(2250)- ]cc",
+                    "[ Omega_b- -> J/psi(1S) Xi(2030)- ]cc",
+                    "[ Lambda_b0 -> J/psi(1S) Lambda(1600)0 ]cc",
+                    "[ Lambda_b0 -> J/psi(1S) Lambda(1800)0 ]cc",
+                    "[ Lambda_b0 -> J/psi(1S) Lambda(1830)0 ]cc",
+                    "[ Lambda_b0 -> J/psi(1S) Lambda(2100)0 ]cc", # Lb -> L phi mumu
+                    "[ Lambda_b0 -> J/psi(1S) Sigma(1915)0 ]cc",
+                    "[ Xi_b- -> J/psi(1S) Sigma(1940)- ]cc", # Xib -> Xi phi mumu
+                    "[ Omega_b- -> J/psi(1S) Sigma(2030)- ]cc", # Omegab -> Omega phi mumu
+                  ]
+
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+#####################################################
+    def _makeB2LLX_charm( self, name, dilepton, hadrons, params, masscut ):
+        """
+        CombineParticles / Selection for the B baryons
+        """
+
+        _Decays = [
+                    "[ Xi_b0 -> J/psi(1S) Xi_c0 ]cc",
+                    "[ Lambda_b0 -> J/psi(1S) Sigma_c0 ]cc",
+                    "[ Xi_bc+ -> J/psi(1S) Lambda_c+ ]cc",
+                    "[ Xi_bc+ -> J/psi(1S) Xi_c+ ]cc",
+                    "[ Xi_b0 -> J/psi(1S) Xi_c(2790)0 ]cc",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2Ch)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+####################################################
+    def _makeB2LLX_neutral( self, name, dilepton, hadrons, params, masscut  ):
+        """
+        CombineParticles / Selection for the B baryons
+        """
+
+        _Decays = [
+                    "[ Xi_b0 -> J/psi(1S) Xi0 ]cc",
+                    "[ Xi_b0 -> J/psi(1S) Xi(2030)0 ]cc",
+                    "[Omega_b- -> J/psi(1S) Sigma(2250)-]cc",
+                    "[Lambda_b0 -> J/psi(1S) Sigma(1750)0]cc",
+                    "[Xi_bc+ -> J/psi(1S) Sigma+]cc",
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2Loose)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+####################################################
+    def _makeB2LLX_neutral_DTF( self, name, dilepton, hadrons, params, masscut  ):
+        """
+        CombineParticles / Selection for the B baryons
+        """
+
+        _Decays = [
+                    "[ Xi_b0 -> J/psi(1S) Xi0 ]cc",
+                    "[ Xi_b0 -> J/psi(1S) Xi(2030)0 ]cc",
+                    "[Omega_b- -> J/psi(1S) Sigma(2250)-]cc",
+                    "[Lambda_b0 -> J/psi(1S) Sigma(1750)0]cc",
+                    #"[Xi_bc+ -> J/psi(1S) Sigma+]cc",
+                  ]
+
+        _Cut = "((DTF_FUN(VFASPF(VCHI2/VDOF), True, strings(['pi0']) ) < %(BVertexCHI2)s) "\
+               "& (DTF_FUN(BPVIPCHI2(), True, strings(['pi0']) ) < %(BIPCHI2)s) "\
+               "& (DTF_FUN(BPVDIRA, True, strings(['pi0']) ) > %(BDIRA)s) "\
+               "& (DTF_FUN(BPVVDCHI2, True, strings(['pi0']) ) > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+        _Combine.ParticleCombiners = {'' : 'MomentumCombiner:PUBLIC'} #do not run the default vertex fit
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+#####################################################
+    def _makeB2LLX_ground( self, name, dilepton, hadrons, params, masscut  ):
+        """
+        CombineParticles / Selection for the B baryons
+        """
+
+        _Decays = [
+                    "[ Xi_b- -> J/psi(1S) Xi- ]cc",
+                    "[Omega_b- -> J/psi(1S) Omega-]cc"
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVertexCHI2Loose)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2)s) "\
+               "& (BPVDIRA > %(BDIRA)s) "\
+               "& (BPVVDCHI2 > %(BFlightCHI2Ch)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+#####################################################
+# added for the 2018 restripping
+    def _makeB2LLX_ground_PR( self, name, dilepton, hadrons, params, masscut  ):
+        """
+        CombineParticles / Selection for the B baryons
+        """
+
+        _Decays = [
+                    "[ Xi_b- -> J/psi(1S) Xi- ]cc",
+                    "[Omega_b- -> J/psi(1S) Omega-]cc"
+                  ]
+
+        _Cut = "((VFASPF(VCHI2/VDOF) < %(BVtxCHI2_PR)s) "\
+               "& (BPVIPCHI2() < %(BIPCHI2_PR)s) "\
+               "& (BPVDIRA > %(BDIRA_PR)s) "\
+               "& (2 == NINTREE((ABSID<14)&((ISMUON) | (PIDe>2))))"\
+               "& (BPVVDCHI2 > %(BFlightCHI2)s))" % params
+
+        _Combine = CombineParticles( DecayDescriptors = _Decays,
+                                     CombinationCut   = masscut,
+                                     MotherCut        = _Cut )
+
+        _Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
+#####################################################
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareNStrange.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareNStrange.py
new file mode 100644
index 000000000..461c40f0b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareNStrange.py
@@ -0,0 +1,636 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__  = 'Diego Martinez Santos, Carlos Vazquez, Xabier Cid, Jessica Prisciandaro'
+__date__    = '08/05/2015'
+__version__ = '$Revision: Not sure $'
+
+__all__ = ( 'RnSConf', 'default_config' ) 
+
+"""
+Selections for Rare&strange decays (other than those already existing), eg:
+'ksmumu' : 'KS0 ==> mu+ mu-',
+'kspi0mumu' : 'KS0 ==> pi0 mu+ mu-',
+#'ks4mu' : 'KS0 ==> mu+ mu- mu- mu+',
+#'ksemu' : '[KS0 ==> e- mu+]CC',
+'kseemumuLFV' : '[KS0 ==> e+ e+ mu- mu-]cc',
+'ks4e' : 'KS0 ==> e- e+ e+ e-',
+'ks3emu' : '[KS0 ==> e- e+ e+ mu-]CC',
+'ks3mue' : '[KS0 ==> e- mu+ mu+ mu-]CC',
+'kseepipi' : 'KS0 ==> e- e+ pi+ pi-',
+'lpimu': '[Lambda0 ==> pi+ mu-]CC',
+'lpie': '[Lambda0 ==> pi+ e-]CC',
+'lpi3mu': '[Lambda0 ==> pi+ mu- mu+ mu-]CC',
+'lpimuee': '[Lambda0 ==> pi+ mu- e+ e-]CC',
+'lpi3e': '[Lambda0 ==> pi+ e- e+ e-]CC',
+
+           
+"""
+
+default_config = {
+    'NAME'                      : 'RnS',
+    'BUILDERTYPE'               : 'RnSConf',
+    'CONFIG'                    :
+    {'SignalLinePrescale'    : 1,
+     'SignalLinePostscale'   : 1,
+     'SidebandLinePrescale'  : 0.2,
+     'SidebandLinePostscale' : 1,
+     "muIpChi2"              : 36,
+     "eIpChi2"              : 49,
+     "piIpChi2"              : 100,
+     "protonIpChi2"              : 16,
+     "muTrChi2Dof"           : 5,
+     "KSsignalminMass"       : 300,
+     "KSsignalmaxMass"       : 600,
+     "KSsidebminMass"        : 600,
+     "KSsidebmaxMass"        : 1000,
+     "DiDOCA"                : 0.1,
+     "KSdira"                : 0,
+     "KSlife"                : 0.06*89.53*2.9979e-01,
+     "L0life"                : 0.06*263.2*2.9979e-01,
+     "KSip"                  : 0.9,
+     "MultibodyIP": 1,
+     "MultibodyIPChi2": 25,#25,
+     "MultibodyChi2dof": 50, #9,
+     'NoMuIDLinePrescale'    : 1e-03, ## Ks2MuMu specific
+     'NoMuIDLinePostscale'   : 1,
+     'K0s2mmLinePrescale'  : 1,
+     'K0s2mmLinePostscale'  : 1,
+     'K0s2mmSBLinePrescale'  : 0.1,
+     'K0s2mmSBLinePostscale'  : 1,
+     'K0s2mmSBCut'  : 465,
+     'IP'         :   0.5 ,
+     'IPChi2Min'  :   60.,
+     'IPChi2Max'  :   1000000,
+     'TTHits'     :      1,
+     'TRACK_TRGHOSTPROB_MAX': 0.1,
+     'MaxMass'    :   800, #450 ,
+     'VertexChi2' :    9,
+     'Rho'        :     4,
+     'SVZ'        :   650,
+     'MinVDZ'     :     0,
+     'MinBPVDira' :     0,
+     'MaxIpDistRatio':  1./60,
+     'cosAngle'   :0.999998
+
+              },
+   
+    'WGs'                       : [ 'RD' ],
+    'STREAMS'                   : [ 'Dimuon' ]
+    }
+    
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+
+class RnSConf(LineBuilder) :
+    """
+    Builder for some Rare & strange measurements 
+    """
+        
+    # now just define keys. Default values are fixed later
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config):
+       
+        LineBuilder.__init__(self, name, config)
+        
+        from StandardParticles import StdAllLooseMuons as Muons
+        from StandardParticles import StdLooseElectrons as Electrons
+        
+        from StandardParticles import StdLooseProtons as Protons
+        from StandardParticles import StdLoosePions as Pions
+        self._name = name
+        self.config = config
+        self.name = name
+       
+        self.SelMuons  = self._filterMuons( name   = "MuonsFor" + self._name,
+                                        sel    = Muons 
+                                        )
+        self.SelElectrons  = self._filterElectrons( name   = "ElectronsFor" + self._name,
+                                        sel    = Electrons
+                                        )
+        self.SelPions  = self._filterPions( name   = "PionsFor" + self._name,
+                                        sel    = Pions 
+                                        )
+        self.SelProtons  = self._filterProtons( name   = "ProtonsFor" + self._name,
+                                        sel    = Protons 
+                                        )
+        
+        self.SelDiMuons = self._makePseudoJPsi("SelDiMuonsFor" + self._name)
+        self.SelTrigLikeDiMuons = self._makeTrigLikeDiMuons("SelTrigLikeDiMuonsFor" + self._name)
+        
+        self.SelDiElectrons = self._makePseudoPhi("SelDiElectronsFor" + self._name) 
+        self.SelEMu = self._makePseudoKstar("SelEMuFor" + self._name) 
+       
+        self.Ks2Pi0MuMuSignal = self._makePi0MuMu_Signal("Ks2Pi0MuMuSignal")
+        self.Ks2Pi0MuMuSB = self._makePi0MuMu_SB("Ks2Pi0MuMuSB")
+
+        self.K0s2PiPi = self._makeK0s2TwoProngs("Ks2PiPiForRnS","KS0 -> pi+ pi-", "(ADAMASS('KS0')<100*MeV)", "(M>400) & (M<600)")
+        self.K0s2MuMu = self._makeK0s2TwoProngs("Ks2MuMu","KS0 -> mu+ mu-", "(ADAMASS('KS0')<100*MeV)", '(M>%(K0s2mmSBCut)s)'% self.config)
+        self.K0s2MuMuLeftSB = self._makeK0s2TwoProngs("Ks2MuMuLeftSB","KS0 -> mu+ mu-", "(ADAMASS('KS0')<100*MeV)", '(M<%(K0s2mmSBCut)s)'% self.config)
+        self.L02pPi = self._makeLambda2TwoProngs("LambdapPiForRnS","[Lambda0 -> p+ pi-]cc", "(ADAMASS('Lambda0')<100*MeV)", "(M>1000) & (M<1200)")
+        self.L02PiMu = self._makeLambda2TwoProngs("LambdaPiMu","[Lambda0 -> mu+ pi-]cc", "(ADAMASS('Lambda0')<1000*MeV)", "(M>600) & (M<1500)")
+
+        ## Multibody Lambda Algorithms (actually one is 2 body , as a test)
+        self.L02PiE = self._makeMultibody("LambdaPiE","[Lambda0 -> e+ pi-]cc", "(ADAMASS('Lambda0')<1000*MeV)", "(M>600) & (M<1500)")
+        self.L02Pi3Mu = self._makeMultibody("LambdaPi3Mu","[Lambda0 -> J/psi(1S) mu+  pi-]cc", "(ADAMASS('Lambda0')<1000*MeV)", "(M>600) & (M<1500)")
+        self.L02PiMuMuE = self._makeMultibody("LambdaPiMuMuE","[Lambda0 -> J/psi(1S) e+  pi-]cc", "(ADAMASS('Lambda0')<1000*MeV)", "(M>600) & (M<1500)")
+
+        ## Multibody Ks algorithms (actually one is 2 body , as a test)
+        self.K0s2eMu = self._makeMultibody("Ks2eMu","[KS0 -> e+ mu-]cc", "(ADAMASS('KS0')<100*MeV) & (AMAXDOCA('')<%(DiDOCA)s*mm)"%self.config,"(M>465) & (M<1000) &((BPVVDSIGN*M/P) > %(KSlife)s) & (MIPDV(PRIMARY)<0.4*mm)"%self.config )
+        self.K0s24ProngLFV = self._makeMultibody("Ks024prongLFV","[KS0 -> K*(892)0 K*(892)0]cc", "(ADAMASS('KS0')<300*MeV)", "(M>200) & (M<800)")
+        self.K0s2e3Mu = self._makeMultibody("Ks02e3Mu","[KS0 -> J/psi(1S) K*(892)0]cc", "(ADAMASS('KS0')<300*MeV)", "(M>100) & (M<800)")
+        self.K0s2Mu3e = self._makeMultibody("Ks02M3eu","[KS0 -> phi(1020) K*(892)0]cc", "(ADAMASS('KS0')<300*MeV)", "(M>200) & (M<800)")
+        self.K0s24e = self._makeMultibody("Ks024e","KS0 -> phi(1020) phi(1020)", "(ADAMASS('KS0')<300*MeV)", "(M>200) & (M<800)")
+
+        self.Pi0MMsignalLine = StrippingLine("Ks2Pi0MuMuSignalLine",
+                                        prescale = self.config[ 'SignalLinePrescale'],
+                                        postscale = self.config['SignalLinePostscale'],
+                                        algos = [ self.Ks2Pi0MuMuSignal ],
+                                        RequiredRawEvents = ["Muon","Calo"],
+                                        MDSTFlag = False
+                                        )
+
+        self.Pi0MMsidebandLine = StrippingLine("Ks2Pi0MuMuSBLine",
+                                          prescale = self.config[ 'SidebandLinePrescale'],
+                                          postscale = self.config['SidebandLinePostscale'],
+                                          algos = [ self.Ks2Pi0MuMuSB ],
+                                          RequiredRawEvents = ["Muon","Calo"],
+                                          MDSTFlag = False
+                                               )
+       
+        self.K0s2PiPiLine = StrippingLine("Ks2PiPiForRnSLine",
+                                        prescale = self.config['NoMuIDLinePrescale'],
+                                        postscale = self.config['NoMuIDLinePostscale'],
+                                        algos = [ self.K0s2PiPi ],
+                                        #RequiredRawEvents = ["Muon"],
+                                        MDSTFlag = False
+                                        )
+   ##      self._K0s2PiPiLine = StrippingLine("_Ks2PiPiForRnSLine",
+##                                         prescale = self.config['NoMuIDLinePrescale'],
+##                                         postscale = self.config['NoMuIDLinePostscale'],
+##                                         algos = [ self.K0s2PiPi ],
+##                                         RequiredRawEvents = ["Muon"],
+##                                         MDSTFlag = False
+##                                         )
+
+        self.K0s2MuMuSBLine = StrippingLine("K0s2MuMuSBLine",
+                                        prescale = config['K0s2mmSBLinePrescale'],
+                                        postscale = config['K0s2mmSBLinePostscale'],
+                                        algos = [ self.K0s2MuMuLeftSB ],
+                                        #RequiredRawEvents = ["Muon"],
+                                        MDSTFlag = False,
+                                        RelatedInfoTools = [
+                                                   { "Type" : "RelInfoMuonIDPlus",
+                                             "Variables" : ["MU_BDT"],
+                                             "DaughterLocations"  : {
+                                                     "KS0 -> ^mu+ mu-" : "Muon1BDT",
+                                                     "KS0 -> mu+ ^mu-" : "Muon2BDT" }
+                                             },
+                                           ]
+                                        )
+        self.K0s2MuMuLine = StrippingLine("K0s2MuMuLine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.K0s2MuMu ],
+                                      #RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False,
+                                      RelatedInfoTools = [
+                                           { "Type" : "RelInfoMuonIDPlus",
+                                             "Variables" : ["MU_BDT"],
+                                             "DaughterLocations"  : {
+                                                     "KS0 -> ^mu+ mu-" : "Muon1BDT",
+                                                     "KS0 -> mu+ ^mu-" : "Muon2BDT" }
+                                             },
+                                           ]
+                                      )
+        self.Lambda02pPiLine = StrippingLine("Lambda2pPiForRnSLine",
+                                        prescale = self.config['NoMuIDLinePrescale'],
+                                        postscale = self.config['NoMuIDLinePostscale'],
+                                        algos = [ self.L02pPi ],
+                                        #RequiredRawEvents = ["Muon"],
+                                        MDSTFlag = False
+                                        )
+        self.Lambda02PiMuLine = StrippingLine("Lambda02PiMuLine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.L02PiMu ],
+                                      #RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False
+                                            )
+        self.Lambda02Pi3MuLine = StrippingLine("Lambda02Pi3MuLine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.L02Pi3Mu ],
+                                      #RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False
+                                            )
+       
+       
+        self.K0s24ProngLFVLine = StrippingLine("K0s24ProngLFVLine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.K0s24ProngLFV ],
+                                      #RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False
+                                      )
+        self.K0s2e3MuLine = StrippingLine("K0s2e3MuLine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.K0s2e3Mu ],
+                                      #RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False
+                                      )
+        self.K0s2Mu3eLine = StrippingLine("K0s2Mu3eLine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.K0s2Mu3e ],
+                                      #RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False,
+                                          RelatedInfoTools = [
+                                           { "Type" : "RelInfoMuonIDPlus",
+                                             "Variables" : ["MU_BDT"],
+                                             "DaughterLocations"  : {
+                                                     "(KS0 -> (phi(1020)->e+ e-) ([K*(892)0  -> ^mu+ e-]CC))" : "Muon1BDT"}
+                                             },
+                                           ]
+                                      )
+        
+        self.K0s24eLine = StrippingLine("K0s24eLine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.K0s24e ],
+                                      #RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False
+                                      )
+
+        self.Lambda02PiMuMuELine = StrippingLine("Lambda02PiMuMuELine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.L02PiMuMuE ],
+                                      #RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False
+                                            )       
+
+        self.K0s2eMuLine = StrippingLine("K0s2eMuLine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.K0s2eMu ],
+                                      #RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False,
+                                       RelatedInfoTools = [
+                                           { "Type" : "RelInfoMuonIDPlus",
+                                             "Variables" : ["MU_BDT"],
+                                             "DaughterLocations"  : {
+                                                     "[KS0 -> e+ ^mu-]CC" : "Muon1BDT"}
+                                             },
+                                           ]
+                                         )
+
+        self.Lambda02PiELine = StrippingLine("Lambda02PiELine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.L02PiE ],
+                                      #RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False
+                                                 )
+        self.TriggerTestLine = StrippingLine("TriggerTestLine",
+                                      prescale = config['K0s2mmLinePrescale'],
+                                      postscale = config['K0s2mmLinePostscale'],
+                                      algos = [ self.SelTrigLikeDiMuons ],
+                                      RequiredRawEvents = ["Muon"],
+                                      MDSTFlag = False,
+                                      RelatedInfoTools = [ 
+                                           { "Type" : "RelInfoMuonIDPlus",
+                                             "Variables" : ["MU_BDT"],
+                                             "DaughterLocations"  : {
+                                                     "[J/psi(1S) -> ^mu+ [mu-]cc]CC" : "Muon1BDT",
+                                                     "[J/psi(1S) -> mu+ ^[mu-]cc]CC" : "Muon2BDT" } 
+                                             },
+                                           ]
+                                             )
+  ##       self._TriggerTestLine = StrippingLine("_TriggerTestLine",
+##                                       prescale = config['K0s2mmLinePrescale'],
+##                                       postscale = config['K0s2mmLinePostscale'],
+##                                       algos = [ self.SelTrigLikeDiMuons ],
+##                                       #RequiredRawEvents = ["Muon"],
+##                                       MDSTFlag = False
+##                                                  )
+        
+        
+          # 5 : register Line
+
+    ## Add some fake lines to eat the timing of particle containers
+        #self.registerLine(self._Pi0MMsignalLine)
+        #self.registerLine(self._K0s24ProngLFVLine)
+        #self.registerLine(self._Lambda02PiMuLine)
+        
+
+        #self.registerLine(self.Pi0MMsignalLine)
+        #self.registerLine(self.Pi0MMsidebandLine)
+        self.registerLine(self.K0s2PiPiLine)
+        self.registerLine(self.K0s2MuMuLine)
+        self.registerLine(self.K0s2MuMuSBLine)
+        #self.registerLine(self.K0s24ProngLFVLine)
+        #self.registerLine(self.K0s2e3MuLine)
+        self.registerLine(self.K0s2Mu3eLine)
+        self.registerLine(self.K0s2eMuLine)
+        self.registerLine(self.K0s24eLine)
+        #self.registerLine(self.Lambda02PiMuLine)
+        #self.registerLine(self.Lambda02Pi3MuLine)
+        #self.registerLine(self.Lambda02PiMuMuELine)
+        #self.registerLine(self.Lambda02pPiLine)
+        #self.registerLine(self.Lambda02PiELine)
+        self.registerLine(self.TriggerTestLine)
+        
+#####################################################
+    def _filterMuons( self, name, sel):
+        """
+        Filter for all hadronic final states
+        """
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+
+        _Code = "(MIPCHI2DV(PRIMARY) > %(muIpChi2)s)" \
+                % self.config
+
+        _Filter = FilterDesktop(Code = _Code)
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [  sel ] )
+    def _filterPions( self, name, sel):
+        """
+        Filter for all hadronic final states
+        """
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+
+        _Code = "(MIPCHI2DV(PRIMARY) > %(piIpChi2)s)" \
+                % self.config
+
+        _Filter = FilterDesktop(Code = _Code)
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [  sel ] )
+    def _filterElectrons( self, name, sel):
+        """
+        Filter for all hadronic final states
+        """
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+
+        _Code = "(MIPCHI2DV(PRIMARY) > %(eIpChi2)s)" \
+                % self.config
+
+        _Filter = FilterDesktop(Code = _Code)
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [  sel ] )
+    
+##################################################
+    def _filterProtons( self, name, sel):
+        """
+        Filter for all hadronic final states
+        """
+        # requires all basic particles to have IPCHI2 > KaonIPCHI2
+        # and hadron PT > KaonPT
+
+        _Code = "(MIPCHI2DV(PRIMARY) > %(protonIpChi2)s)" \
+                % self.config
+
+        _Filter = FilterDesktop(Code = _Code)
+
+        return Selection( name, Algorithm = _Filter, RequiredSelections = [  sel ] )
+
+    def _makePseudoJPsi(self,name) :
+        """
+        Make PseudoJpsi (combination of two detached muons)
+        Arguments:
+        name : name of the selection
+        """
+        
+        PseudoJPsi = CombineParticles(DecayDescriptor = "J/psi(1S) -> mu+ mu-")
+        PseudoJPsi.DecayDescriptor = "J/psi(1S) -> mu+ mu-"
+        PseudoJPsi.CombinationCut = "(AMAXDOCA('')<%(DiDOCA)s*mm)" %self.config
+        PseudoJPsi.MotherCut = "ALL"
+       
+        return Selection (name,
+                          Algorithm = PseudoJPsi,
+                          RequiredSelections = [self.SelMuons])
+
+
+    def _makeTrigLikeDiMuons(self,name) :
+        """
+        Make PseudoJpsi (combination of two detached muons, inspired in Hlt2Soft)
+        Arguments:
+        name : name of the selection
+        """
+        
+        PseudoJPsi = CombineParticles(DecayDescriptors = ["J/psi(1S) -> mu+ mu-","[J/psi(1S) -> mu+ mu+]cc"]) 
+        PseudoJPsi.CombinationCut = "(AMAXDOCA('')<%(DiDOCA)s*mm)" %self.config
+        PseudoJPsi.MotherCut = ("(MINTREE('mu-' == ABSID, MIPDV(PRIMARY)) > %(IP)s)"
+        + " & (CHILDCUT((TRGHOSTPROB < %(TRACK_TRGHOSTPROB_MAX)s),1))"
+        + " & (CHILDCUT((TRGHOSTPROB < %(TRACK_TRGHOSTPROB_MAX)s),2))"
+        + " & (MINTREE('mu-' == ABSID, MIPCHI2DV(PRIMARY)) > %(IPChi2Min)s)"
+        + " & (MINTREE('mu-' == ABSID, PIDmu) > 0)"
+        + " & ( VFASPF (sqrt(VX*VX+VY*VY)) > %(Rho)s) "
+        + " & ( VFASPF ( VZ ) < %(SVZ)s) "
+        + " & ((MIPDV(PRIMARY)/BPVVDZ)< %(MaxIpDistRatio)s)"
+        + " & (MM < %(MaxMass)s)"
+        + " & (VFASPF(VCHI2PDOF)<%(VertexChi2)s )"
+        + " & (DOCAMAX < %(DiDOCA)s)"
+        + " & (BPVVDZ > %(MinVDZ)s) "
+        + " &  (BPVDIRA > %(MinBPVDira)s) " 
+        #+ " & (PCUTA (ALV (1,2) < %(cosAngle)s))"
+                                ) % self.config
+        return Selection (name,
+                          Algorithm = PseudoJPsi,
+                          RequiredSelections = [self.SelMuons])
+    
+                
+    
+    def _makePseudoPhi(self,name) :
+        """
+        Make PseudoPhi (combination of two detached electrons)
+        Arguments:
+        name : name of the selection
+        """
+        PseudoPhi = CombineParticles(DecayDescriptor = "phi(1020) -> e+ e-")
+        PseudoPhi.CombinationCut = "(AMAXDOCA('')<1000*mm) "#%(DiDOCA)s*mm)" %self.config
+        PseudoPhi.MotherCut = "ALL"
+        
+        return Selection (name,
+                          Algorithm = PseudoPhi,
+                          RequiredSelections = [self.SelElectrons])
+    
+    def _makePseudoKstar(self,name) :
+        """
+        Make PseudoKst (combination of a detached e-mu pair)
+        Arguments:
+        name : name of the selection
+        """
+        PseudoKst = CombineParticles(DecayDescriptor = "[K*(892)0  -> mu+ e-]cc")
+        PseudoKst.CombinationCut = "(AMAXDOCA('')< 1000*mm)"#%(DiDOCA)s*mm)" %self.config
+        PseudoKst.MotherCut = "ALL"
+        
+        return Selection (name,
+                          Algorithm = PseudoKst,
+                          RequiredSelections = [self.SelElectrons, self.SelMuons])
+
+    def _makePi0MuMu(self,name, combcut) :
+        """
+        K0s2pi0mumu selection object in signal region.
+        Arguments:
+        name        : name of the Selection
+        combcut : cut at combination level
+        """
+        from StandardParticles import StdLooseResolvedPi0 as Pi0s
+        #from Configurables import OfflineVertexFitter
+        K0s2Pi0MuMu1 = CombineParticles(DecayDescriptor = "KS0 -> pi0 J/psi(1S)")
+        
+        #K0s2Pi0MuMu1.addTool( OfflineVertexFitter )
+        #K0s2Pi0MuMu1.ParticleCombiners.update( { "" : "OfflineVertexFitter"} )
+        #K0s2Pi0MuMu1.OfflineVertexFitter.useResonanceVertex = False
+        #K0s2Pi0MuMu1.ReFitPVs = True
+        K0s2Pi0MuMu1.CombinationCut = combcut
+
+        K0s2Pi0MuMu1.MotherCut = "((BPVDIRA> %(KSdira)s ) "\
+                                 "& ((BPVVDSIGN*M/P) > %(KSlife)s) "\
+                                 "& (MIPDV(PRIMARY)<%(KSip)s*mm) "\
+                                 "& (M> %(KSsignalminMass)s * MeV) "\
+                                 "& ( (M< %(KSsignalmaxMass)s * MeV) ))" %self.config
+
+        return Selection (name,
+                          Algorithm = K0s2Pi0MuMu1,
+                          RequiredSelections = [ self.SelDiMuons,
+                                                 Pi0s])
+
+    def _makePi0MuMu_Signal(self,name) :
+        """
+        K0s2pi0mumu selection object in signal region.
+        Arguments:
+        name        : name of the Selection
+        """
+        
+
+        return self._makePi0MuMu( name, combcut ="  (AM > %(KSsignalminMass)s * MeV)"\
+                                      "& (AM < %(KSsignalmaxMass)s * MeV)" %self.config )
+
+
+    def _makePi0MuMu_SB(self,name) :
+        """
+        K0s2pi0mumu selection object in sideband region.
+        Arguments:
+        name        : name of the Selection
+        """
+        
+
+        return self._makePi0MuMu( name, combcut = "  (AM > %(KSsidebminMass)s * MeV)"\
+                                      "& (AM < %(KSsidebmaxMass)s * MeV)" %self.config)
+
+
+
+    def _makeK0s2TwoProngs(self, name,decay_descriptor, combcut, masscut) :
+        """
+        K0s2mumu selection object
+        with muon Id and wide mass window
+        starts from Phys/StdLooseMuons
+
+        Please contact Diego Martinez Santos if you think of prescaling this line!
+    
+        Arguments:
+        name        : name of the Selection.
+        """
+        if "mu+" in decay_descriptor:
+            dname = "mu+"
+            daughters = self.SelMuons
+        else:
+            dname = "pi+"
+            daughters = self.SelPions 
+        K0s2MuMu = CombineParticles(DecayDescriptor = decay_descriptor)
+    
+        K0s2MuMu.DaughtersCuts = { dname : "(MIPCHI2DV(PRIMARY)> 100.)"}
+        K0s2MuMu.CombinationCut = combcut + "& (AMAXDOCA('')<%(DiDOCA)s*mm)"% self.config
+
+        K0s2MuMu.MotherCut = "("+ masscut + "& (BPVDIRA>0) & ((BPVVDSIGN*M/P) > %(KSlife)s) & (MIPDV(PRIMARY)<0.4*mm))" %self.config
+    
+        return Selection (name,
+                          Algorithm = K0s2MuMu,
+                          RequiredSelections = [ daughters])
+
+
+    def _makeLambda2TwoProngs(self, name,decay_descriptor, combcut, masscut) :
+        """
+        K0s2mumu selection object
+        with muon Id and wide mass window
+        starts from Phys/StdLooseMuons
+
+        Please contact Diego Martinez Santos if you think of prescaling this line!
+    
+        Arguments:
+        name        : name of the Selection.
+        """
+        if "mu+" in decay_descriptor: daughter1 = self.SelMuons
+        else: daughter1 = self.SelProtons 
+        Lambda2TwoProngs = CombineParticles(DecayDescriptor = decay_descriptor)
+    
+        Lambda2TwoProngs.CombinationCut = combcut + "& (AMAXDOCA('')<%(DiDOCA)s*mm)"% self.config
+
+        Lambda2TwoProngs.MotherCut = "("+ masscut + "& (BPVDIRA>0) & ((BPVVDSIGN*M/P) > %(L0life)s) & (MIPDV(PRIMARY)<0.4*mm))" %self.config
+    
+        return Selection (name,
+                          Algorithm = Lambda2TwoProngs,
+                          RequiredSelections = [ daughter1, self.SelPions])
+
+    
+    def _makeMultibody(self, name,decay_descriptor, combcut, masscut) :
+        """
+        K0s2mumu selection object
+        with muon Id and wide mass window
+        starts from Phys/StdLooseMuons
+
+        Please contact Diego Martinez Santos if you think of prescaling this line!
+    
+        Arguments:
+        name        : name of the Selection.
+        """
+        daughters = []
+        if "mu" in decay_descriptor: daughters += [self.SelMuons]
+        if "pi" in decay_descriptor: daughters += [self.SelPions]
+        if "e+" or "e-" in decay_descriptor: daughters += [self.SelElectrons]
+        if "K*(892)0" in decay_descriptor:
+            if not "SelEMu" in dir(self): self.SelEMu = self._makePseudoKstar("SelEMuFor" + self._name)
+            daughters += [self.SelEMu]
+        if "phi(1020)" in decay_descriptor:
+            if not "SelDiElectrons" in dir(self): self.SelDiElectrons = self._makePseudoPhi("SelDiElectronsFor" + self._name)
+            daughters += [self.SelDiElectrons]
+                
+        if "J/psi(1S)" in decay_descriptor:
+            if not "SelDiMuons" in dir(self): self.SelDiMuons = self._makePseudoJpsi("SelDiMuonsFor" + self._name)
+            daughters += [self.SelDiMuons]
+            
+        if "KS0" in decay_descriptor : lifecut = "%(KSlife)s" %self.config
+        elif "Lambda0" in decay_descriptor: lifecut= "%(L0life)s" %self.config
+        
+        Multibody = CombineParticles(DecayDescriptor = decay_descriptor)
+    
+       
+        Multibody.CombinationCut = combcut #+ "& (AMAXDOCA('')<%(DiDOCA)s*mm)"% self.config
+
+        Multibody.MotherCut = "("+ masscut + "& (BPVDIRA>0) & ((BPVVDSIGN*M/P) >"+ lifecut +") & (MIPDV(PRIMARY)< %(MultibodyIP)s *mm) & (VFASPF(VCHI2/VDOF)<%(MultibodyChi2dof)s))" %self.config
+    
+        return Selection (name,
+                          Algorithm = Multibody,
+                          RequiredSelections = daughters)
+
+#####################################################
+#a = RnSConf("shittyname", default_config['CONFIG']) ## Test if the class works before runnung the test script!
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareStrange.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareStrange.py
new file mode 100644
index 000000000..fb99c1eeb
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingRareStrange.py
@@ -0,0 +1,2751 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of stripping selections for some rare strange decays
+Exported symbols (use python help!):
+'''
+
+__author__ = ['Francesco Dettori','Andrea Contu', 'Kristian Zarebski']
+__date__ = '23/05/2017'
+__version__ = '$Revision: 3.1 $'
+
+__all__ = ('RareStrangeLinesConf',
+           'config_default',
+           'makeSigmaPMuMu',
+           'makeSigmaPMuMuDet',
+           'myDiMuonDetached',
+           'myDiElectronDetached',
+           'makeDiElectronDetached',
+           'makeSigmaPEMu',
+           'makeSigmaPEE',
+           'makeSigmaPEEDet',
+           'makeSigmaPPi0',
+           'makeSigmaPPi0Cal',
+           'makeSigmaPMuMuLFV',
+           'makeSigmaPMuMuDown',
+           'makeSigmaPEEDown',
+           'makeSigmaPMuMuLFVDown',
+           'makeSigmaMuMuMu',
+           'makeSigmaMuMuMuDown',           
+           'makeKPiMuMu',
+           'makeKPiMuMuLFV',
+           'makeKPiPiPi',
+           'makeKPiPiPiMassMeas',
+           'makeKPiMuMuDown',
+           'makeKPiMuMuLFVDown',
+           'makeKPiEEDown',
+           'makeKPiEELFVDown',
+           'makeKPiEMuLFVSSDown',
+           'makeKPiEMuLFVDown',
+           'makeKPiPiPiDown',
+           'makeKPiPiPiMassMeasDown',
+           'makeKPiEE',
+           'makeKPiEELFV',
+           'makeKPiEMuLFV',
+           'makeKPiEMuLFVSS',
+           'makePhiKMu',
+           'makeLambdaPPi',
+           'makeLambdaPPiEE',
+           )
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays as Combine3Particles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays as Combine4Particles
+from CommonParticles import StdNoPIDsDownElectrons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.PhysicalConstants import c_light
+from StandardParticles import ( StdAllNoPIDsPions, StdNoPIDsDownPions,
+                                StdLoosePions, StdLooseDownMuons,
+                                StdLooseMergedPi0, StdLooseResolvedPi0, StdLooseDalitzPi0)
+                                
+#from CommonParticles.StdLooseDalitzPi0 import (StdLoosePi02gee, StdLoosePi024e)
+                                
+_monitor = False
+
+default_config = {
+  'NAME': 'RareStrange',
+  'WGs' : ['RD'],
+  'BUILDERTYPE' : 'RareStrangeLinesConf',
+  'STREAMS' : [ 'Leptonic' ],
+  'CONFIG' : {
+        'Postscale'           :1,
+        'SigmaPMuMuPrescale' : 1,
+        'SigmaPMuMuDownPrescale' :1,
+        'SigmaPMuMuDetPrescale' : 1,
+        'SigmaPEMuPrescale' : 1,
+        'SigmaPEEPrescale' : 1,
+        'SigmaPEEDetPrescale' : 1,
+        'SigmaPPi0Prescale' : 1,
+        'SigmaPPi0CalPrescale' : 1.,
+        'SigmaPEEDownPrescale' : 1.0,
+        'SigmaPMuMuLFVPrescale' :1,
+        'SigmaPMuMuLFVDownPrescale' :0.1,
+        'SigmaMuMuMuPrescale' : 1,
+        'SigmaMuMuMuDownPrescale' :1,   
+        'KPiPiPiPrescale' : 0.01,
+        'KPiPiPiMassMeasPrescale' :1,
+        'KPiMuMuPrescale' :1,
+        'KPiMuMuLFVPrescale' :1,
+        'KPiMuMuDownPrescale' :1,
+        'KPiEEPrescale' :1,
+        'KPiEEDownPrescale' :1,
+        'KPiEELFVDownPrescale' :1,
+        'KPiEELFVPrescale' :1,
+        'KPiEMuLFVPrescale' :1,
+        'KPiEMuLFVDownPrescale' :1,
+        'KPiEMuLFVSSPrescale' :1,
+        'KPiEMuLFVSSDownPrescale' :1,
+        'KPiPiPiDownPrescale' : 0.1,
+        'KPiPiPiMassMeasDownPrescale' :1,
+        'KPiMuMuLFVDownPrescale' :1,
+        'PhiKMuPrescale' : 0.01,
+        'LambdaPPiPrescale' : 0.01 ,
+        'LambdaPPiEEPrescale' : 1. ,
+        'SigmaMinTauPs' : 6.,
+        'SigmaMinPt' : 500.,
+        'SigmaMaxDOCA' : 2.,
+        'SigmaMassWin' : 500.,
+        'SigmaMinDIRA' : 0.9,
+        'SigmaMaxIpChi2' : 36.,
+        'SigmaVtxChi2' : 36.,
+        'SigmaMinTauPsDown' : 7.,
+        'SigmaMinPtDown' : 0.,
+        'SigmaMaxDOCADown' : 10.,
+        'SigmaMassWinDown' : 500.,
+        'SigmaPEEMassWinDown' : 100.,
+        'SigmaMinDIRADown' : 0.9,
+        'SigmaMaxIpChi2Down' : 25.,
+        'SigmaVtxChi2Down' : 25.,
+        'SigmaDauTrChi2Down': 9.,
+        'SigmaPPi0MassWin' : 120.,
+        'muonMinIpChi2' : 9.,
+        'protonProbNNp': 0.05,
+        'protonProbNNpTight': 0.6,
+        'pMinPt': 1000.,
+        'electronPIDe':2.,
+        'electronMinIpChi2': 9.,
+        'pi0MinPt': 700.,
+        'pi0CL': 0.1,
+        'muonMinIpChi2Down' : 9.,
+        'electronMinIpChi2Down': 4.,
+        'DiMuonMaxMass' : 700,
+        'DiMuonMaxDOCA' : 2,
+        'DiMuonMinPt'   : 0,
+        'DiMuonVtxChi2'  : 36,
+        'DiMuonMinIpChi2'   : 9,
+        'DiElectronMaxMass' : 1000,
+        'DiElectronVtxChi2'  : 36,
+        'DiElectronMinIpChi2'   : 9,
+        'DiElectronPIDe' : 2, 
+        'SigmaDetVtxChi2'   : 25,
+        'Sigma3MinTauPs' : 3,
+        'Sigma3MinPt' : 0.,
+        'Sigma3MaxDOCA' : 2.,
+        'Sigma3MassWin' : 500.,
+        'Sigma3MinDIRA' : 0.9,
+        'Sigma3MaxIpChi2' : 36.,
+        'Sigma3VtxChi2' : 36.,
+        'Sigma3MinTauPsDown' : 2,
+        'Sigma3MinPtDown' : 0.,
+        'Sigma3MaxDOCADown' : 2.,
+        'Sigma3MassWinDown' : 500.,
+        'Sigma3MinDIRADown' : 0.1,
+        'Sigma3MaxIpChi2Down' : 100.,
+        'Sigma3VtxChi2Down' : 100.,
+        'Sigma3DauTrChi2Down': 9.,
+        'muon3MinIpChi2' : 5.,
+        'muon3MinIpChi2Down' : 5.,
+        # Kaons 
+        'KMaxDOCA' : 3.,
+        'KMinPT' : 100. ,
+        'KMassWin' : 100.,
+        'KMinDIRA' : 0.98,
+        'KMaxIpChi2' : 25.,
+        'KVtxChi2': 25.,
+        'KMinVDChi2' : 36.,
+        'KDauMinIpChi2' : 9.,
+        'KDauTrChi2' : 3.,
+        'KMaxDOCADown' : 10.,
+        'KMinPTDown' : 0. ,
+        'KMassWinDown' : 100.,
+        'KMinDIRADown' : 0.98,
+        'KVtxChi2Down': 25.,
+        'KMinVDChi2Down' : 49.,
+        'KDauMinIpChi2Down' : 5.,
+        'KVDPVMinDown' : 500.,
+        'KVDPVMaxDown' : 2500.,
+        #Kaons stuff
+        'KMaxDOCAMassMeas' : 2.,
+        'KMinPTMassMeas' : 300. ,
+        'KMassWinMassMeas' : 50.,
+        'KMinDIRAMassMeas' : 0.9998,
+        'KMaxIpChi2MassMeas' : 25.,
+        'KVtxChi2MassMeas': 10.,
+        'KMinVDChi2MassMeas' : 100.,
+        'KDauMinIpChi2MassMeas' : 8., 
+        #Kaons stuff downstream
+        'KMaxDOCAMassMeasDown' : 2.,
+        'KMinPTMassMeasDown' : 250. ,
+        'KMassWinMassMeasDown' : 100.,
+        'KMinDIRAMassMeasDown' : 0.999,
+        'KVtxChi2MassMeasDown': 20.,
+        'KMinVDChi2MassMeasDown' : 64.,
+        'KDauMinIpChi2MassMeasDown' : 4., 
+        'KVDPVMinMassMeasDown' : 900.,
+        'KVDPVMaxMassMeasDown' : 2200.,
+        # Phi lines
+        'PhiDauMinPT' :  400.,
+        'PhiMassMin' : 800,
+        'PhiMassMax' : 1200,
+        'PhiMaxDOCA' : 0.1,
+        'PhiMinDIRA' : 0.5,
+        'PhiMinPT'   : 700,
+        'PhiVtxChi2' : 9 ,
+        'PhiProbNNk' : 0.3,
+        #Lambda lines 
+        'LambdaMinTauPs' : 6.,
+        'LambdaMinPt' : 500.,
+        'LambdaMaxDOCA' : 2.,
+        'LambdaMassWin' : 500.,
+        'LambdaMassWinTight' : 50.,
+        'LambdaMinDIRA' : 0.9,
+        'LambdaMaxIpChi2' : 36.,
+        'LambdaVtxChi2' : 25.,
+        'pionMinIpChi2' : 9.,
+        'protonMinIpChi2' : 9.,
+        
+        }
+  }
+  
+
+
+
+#============================================================
+# Line builder 
+class RareStrangeLinesConf(LineBuilder) :
+    """
+    Builder 
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, 
+                 name = 'RareStrange',
+                 config = None) :
+
+        LineBuilder.__init__(self, name, config)
+        
+
+        spmumu_name=name+'SigmaPMuMu'
+        spmumudown_name=name+'SigmaPMuMuDown'
+        dimudet_name=name+'DiMuonDetached'
+        dielectrondet_name=name+'DiElectronDetached'
+        spmumudet_name=name+'SigmaPMuMuDet'
+        spemu_name=name+'SigmaPEMu'
+        spee_name=name+'SigmaPEE'
+        speedet_name=name+'SigmaPEEDet'
+        sppi0_name=name+'SigmaPPi0'
+        sppi0cal_name=name+'SigmaPPi0Cal'
+        speedown_name=name+'SigmaPEEDown'
+        spmumulfv_name=name+'SigmaPMuMuLFV'
+        spmumulfvdown_name=name+'SigmaPMuMuLFVDown'
+        smumumu_name=name+'SigmaMuMuMu'
+        smumumudown_name=name+'SigmaMuMuMuDown'                        
+        kpimumu_name=name+'KPiMuMu'
+        kpimumulfv_name=name+'KPiMuMuLFV'
+        kpiee_name=name+'KPiEE'
+        kpieelfv_name=name+'KPiEELFV'
+        kpieedown_name=name+'KPiEEDown'
+        kpieelfvdown_name=name+'KPiEELFVDown'
+        kpiemulfv_name=name+'KPiEMuLFV'
+        kpiemulfvdown_name=name+'KPiEMuLFVDown'
+        kpiemulfvss_name=name+'KPiEMuLFVSS'
+        kpiemulfvssdown_name=name+'KPiEMuLFVSSDown'
+        kpipipi_name=name+'KPiPiPi'
+        kpipipimassmeas_name=name+'KPiPiPiMassMeas'
+        kpimumudown_name=name+'KPiMuMuDown'
+        kpimumulfvdown_name=name+'KPiMuMuLFVDown'
+        kpipipidown_name=name+'KPiPiPiDown'
+        kpipipimassmeasdown_name=name+'KPiPiPiMassMeasDown'
+        phikmu_name = name +"PhiKMu"
+        lambdappi_name=name+'LambdaPPi'
+        lambdappiee_name=name+'LambdaPPiEE'
+
+
+        self._myDiMuons = makeDiMuonDetached(dimudet_name, config)
+        self._myDiElectrons = makeDiElectronDetached(dielectrondet_name, config)
+        self._stdLooseProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+        self._stdAllLoosePions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+        
+        self.selSigmaPMuMu = makeSigmaPMuMu(spmumu_name, config)
+        self.selSigmaPMuMuDown = makeSigmaPMuMuDown(spmumudown_name, config)
+        self.selSigmaPMuMuDet = makeSigmaPMuMuDet(spmumudet_name, config, [self._myDiMuons, self._stdLooseProtons])
+        self.selSigmaPEMu = makeSigmaPEMu(spemu_name, config)
+        self.selSigmaPEE   = makeSigmaPEE(spee_name, config)
+        self.selSigmaPEEDet   = makeSigmaPEEDetached(speedet_name, config, [self._myDiElectrons, self._stdLooseProtons])
+        self.selSigmaPPi0   = makeSigmaPPi0(sppi0_name, config)
+        self.selSigmaPPi0Cal   = makeSigmaPPi0Cal(sppi0cal_name, config)
+        self.selSigmaPEEDown   = makeSigmaPEEDown(speedown_name, config)
+        self.selSigmaPMuMuLFV = makeSigmaPMuMuLFV(spmumulfv_name, config)
+        self.selSigmaPMuMuLFVDown = makeSigmaPMuMuLFVDown(spmumulfvdown_name, config)
+        self.selSigmaMuMuMu = makeSigmaMuMuMu(smumumu_name, config)
+        self.selSigmaMuMuMuDown = makeSigmaMuMuMuDown(smumumudown_name, config)
+        self.selKPiMuMu = makeKPiMuMu(kpimumu_name, config)
+        self.selKPiMuMuLFV = makeKPiMuMuLFV(kpimumulfv_name, config)
+        self.selKPiEE = makeKPiEE(kpiee_name, config)
+        self.selKPiEELFV = makeKPiEELFV(kpieelfv_name, config)
+        self.selKPiEMuLFV = makeKPiEMuLFV(kpiemulfv_name, config)
+        self.selKPiEMuLFVDown = makeKPiEMuLFVDown(kpiemulfvdown_name, config)
+        self.selKPiEMuLFVSS = makeKPiEMuLFVSS(kpiemulfvss_name, config)
+        self.selKPiEMuLFVSSDown = makeKPiEMuLFVSSDown(kpiemulfvssdown_name, config)
+        self.selKPiEEDown = makeKPiEEDown(kpieedown_name, config)
+        self.selKPiEELFVDown = makeKPiEELFVDown(kpieelfvdown_name, config)
+        self.selKPiPiPi = makeKPiPiPi(kpipipi_name, config)
+        self.selKPiPiPiMassMeas = makeKPiPiPiMassMeas(kpipipimassmeas_name, config)
+        self.selKPiMuMuDown = makeKPiMuMuDown(kpimumudown_name, config)
+        self.selKPiMuMuLFVDown = makeKPiMuMuLFVDown(kpimumulfvdown_name, config)
+        self.selKPiPiPiDown = makeKPiPiPiDown(kpipipidown_name, config)
+        self.selKPiPiPiMassMeasDown = makeKPiPiPiMassMeasDown(kpipipimassmeasdown_name, config)
+        self.selPhiKMu = makePhiKMu(phikmu_name, config)
+        self.selLambdaPPi = makeLambdaPPi(lambdappi_name, config)
+        self.selLambdaPPiEE = makeLambdaPPiEE(lambdappiee_name, config, [self._myDiElectrons, self._stdLooseProtons, self._stdAllLoosePions])
+
+               
+        self.SigmaPMuMuLine = StrippingLine(spmumu_name+"Line",
+                                            prescale = config['SigmaPMuMuPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selSigmaPMuMu ],
+                                            #postselalg = makevelotracks(spmumu_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^mu+ mu-]CC" : 'P2CVMu09_1', 
+                                                            "[Sigma+ -> p+ mu+ ^mu-]CC" : 'P2CVMu09_2',
+                                                            "[Sigma+ -> ^p+ mu+ mu-]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^mu+ mu-]CC" : 'P2CVMu10_1', 
+                                                            "[Sigma+ -> p+ mu+ ^mu-]CC" : 'P2CVMu10_2',
+                                                            "[Sigma+ -> ^p+ mu+ mu-]CC" : 'P2CVProton10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^mu+ mu-]CC" : 'P2CVMu11_1', 
+                                                            "[Sigma+ -> p+ mu+ ^mu-]CC" : 'P2CVMu11_2',
+                                                            "[Sigma+ -> ^p+ mu+ mu-]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+spmumu_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+        self.SigmaPMuMuDownLine = StrippingLine(spmumudown_name+"Line",
+                                            prescale = config['SigmaPMuMuDownPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [self.selSigmaPMuMuDown],
+                                            postselalg = makevelotracks(spmumudown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^mu+ mu-]CC" : 'P2CVMu09_1', 
+                                                            "[Sigma+ -> p+ mu+ ^mu-]CC" : 'P2CVMu09_2',
+                                                            "[Sigma+ -> ^p+ mu+ mu-]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^mu+ mu-]CC" : 'P2CVMu10_1', 
+                                                            "[Sigma+ -> p+ mu+ ^mu-]CC" : 'P2CVMu10_2',
+                                                            "[Sigma+ -> ^p+ mu+ mu-]CC" : 'P2CVProton10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^mu+ mu-]CC" : 'P2CVMu11_1', 
+                                                            "[Sigma+ -> p+ mu+ ^mu-]CC" : 'P2CVMu11_2',
+                                                            "[Sigma+ -> ^p+ mu+ mu-]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                            {
+                                                'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+spmumudown_name,#'InputTracks':'/Event/Rec/Track/Best',# 
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                     )
+
+        self.SigmaPMuMuDetLine = StrippingLine(spmumudet_name+"Line",
+                                            prescale = config['SigmaPMuMuDetPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selSigmaPMuMuDet ],
+                                            #postselalg = makevelotracks(spmumudet_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ (KS0 -> ^mu+ mu-)]CC" : 'P2CVMu09_1', 
+                                                            "[Sigma+ -> p+ (KS0 -> mu+ ^mu-)]CC" : 'P2CVMu09_2',
+                                                            "[Sigma+ -> ^p+ (KS0 -> mu+ mu-)]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ (KS0 -> ^mu+ mu-)]CC" : 'P2CVMu10_1',  
+                                                            "[Sigma+ -> p+ (KS0 -> mu+ ^mu-)]CC" : 'P2CVMu10_2',
+                                                            "[Sigma+ -> ^p+ (KS0 -> mu+ mu-)]CC" : 'P2CVProton10'
+
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                          "[Sigma+ -> p+ (KS0 -> ^mu+ mu-)]CC" : 'P2CVMu11_1',  
+                                                            "[Sigma+ -> p+ (KS0 -> mu+ ^mu-)]CC" : 'P2CVMu11_2',
+                                                            "[Sigma+ -> ^p+ (KS0 -> mu+ mu-)]CC" : 'P2CVProton11'
+
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+spmumudet_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+        self.SigmaPEMuLine = StrippingLine(spemu_name+"Line",
+                                            prescale = config['SigmaPEMuPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selSigmaPEMu ],
+                                            #postselalg = makevelotracks(spemu_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[[Sigma+ -> p+ ^e+ mu-]CC, [Sigma+ -> p+ ^e- mu+]CC] " : 'P2CVE09', 
+                                                            "[[Sigma+ -> p+ e+ ^mu-]CC, [Sigma+ -> p+ e- ^mu+]CC]" : 'P2CVMu09',
+                                                            "[[Sigma+ -> ^p+ e+ mu-]CC, [Sigma+ -> ^p+ e- mu+]CC]" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : { "[[Sigma+ -> p+ ^e+ mu-]CC, [Sigma+ -> p+ ^e- mu+]CC] " : 'P2CVE10', 
+                                                                        "[[Sigma+ -> p+ e+ ^mu-]CC, [Sigma+ -> p+ e- ^mu+]CC]" : 'P2CVMu10',
+                                                                        "[[Sigma+ -> ^p+ e+ mu-]CC, [Sigma+ -> ^p+ e- mu+]CC]" : 'P2CVProton10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : { "[[Sigma+ -> p+ ^e+ mu-]CC, [Sigma+ -> p+ ^e- mu+]CC] " : 'P2CVE10',
+                                                                        "[[Sigma+ -> p+ e+ ^mu-]CC, [Sigma+ -> p+ e- ^mu+]CC]" : 'P2CVMu10',
+                                                                        "[[Sigma+ -> ^p+ e+ mu-]CC, [Sigma+ -> ^p+ e- mu+]CC]" : 'P2CVProton10'
+
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+spemu_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+
+        self.SigmaPEELine = StrippingLine(spee_name+"Line",
+                                            prescale = config['SigmaPEEPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selSigmaPEE ],
+                                            #postselalg = makevelotracks(spee_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^e+ e-]CC" : 'P2CVE09_1', 
+                                                            "[Sigma+ -> p+ e+ ^e-]CC" : 'P2CVE09_2',
+                                                            "[Sigma+ -> ^p+ e+ e-]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^e+ e-]CC" : 'P2CVE10_1', 
+                                                            "[Sigma+ -> p+ e+ ^e-]CC" : 'P2CVE10_2',
+                                                            "[Sigma+ -> ^p+ e+ e-]CC" : 'P2CVProton10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^e+ e-]CC" : 'P2CVE11_1', 
+                                                            "[Sigma+ -> p+ e+ ^e-]CC" : 'P2CVE11_2',
+                                                            "[Sigma+ -> ^p+ e+ e-]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+spee_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                          )
+
+        self.SigmaPEEDetLine = StrippingLine(speedet_name+"Line",
+                                            prescale = config['SigmaPEEDetPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selSigmaPEEDet ],
+                                            #postselalg = makevelotracks(speedet_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ (KS0 -> ^e+ e-)]CC" : 'P2CVE09_1', 
+                                                            "[Sigma+ -> p+ (KS0 -> e+ ^e-)]CC" : 'P2CVE09_2',
+                                                            "[Sigma+ -> ^p+ (KS0 -> e+ e-)]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                           "[Sigma+ -> p+ (KS0 -> ^e+ e-)]CC" : 'P2CVE10_1', 
+                                                           "[Sigma+ -> p+ (KS0 -> e+ ^e-)]CC" : 'P2CVE10_2',
+                                                           "[Sigma+ -> ^p+ (KS0 -> e+ e-)]CC" : 'P2CVProton10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                           "[Sigma+ -> p+ (KS0 -> ^e+ e-)]CC" : 'P2CVE11_1', 
+                                                           "[Sigma+ -> p+ (KS0 -> e+ ^e-)]CC" : 'P2CVE11_2',
+                                                           "[Sigma+ -> ^p+ (KS0 -> e+ e-)]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+speedet_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                          )
+        self.SigmaPPi0Line = StrippingLine(sppi0_name+"Line",
+                                           prescale = config['SigmaPPi0Prescale'],
+                                           postscale = config['Postscale'],
+                                           algos = [ self.selSigmaPPi0 ],
+                                           #postselalg = makevelotracks(sppi0_name),
+                                           RequiredRawEvents = [],
+                                           MDSTFlag=False,
+                                           RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^pi0]CC" : 'P2CVPi009', 
+                                                            "[Sigma+ -> ^p+ pi0]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^pi0]CC" : 'P2CVPi010', 
+                                                            "[Sigma+ -> ^p+ pi0]CC" : 'P2CVProton10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^pi0]CC" : 'P2CVPi011', 
+                                                            "[Sigma+ -> ^p+ pi0]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+sppi0_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+        self.SigmaPPi0CalLine = StrippingLine(sppi0cal_name+"Line",
+                                           prescale = config['SigmaPPi0CalPrescale'],
+                                           postscale = config['Postscale'],
+                                           algos = [ self.selSigmaPPi0Cal ],
+                                           #postselalg = makevelotracks(sppi0cal_name),
+                                           RequiredRawEvents = [],
+                                           MDSTFlag=False,
+                                           RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^pi0]CC" : 'P2CVPi009', 
+                                                            "[Sigma+ -> ^p+ pi0]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^pi0]CC" : 'P2CVPi010', 
+                                                            "[Sigma+ -> ^p+ pi0]CC" : 'P2CVProton10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^pi0]CC" : 'P2CVPi011', 
+                                                            "[Sigma+ -> ^p+ pi0]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+sppi0cal_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+
+
+        self.SigmaPEEDownLine = StrippingLine(speedown_name+"Line",
+                                            prescale = config['SigmaPEEDownPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selSigmaPEEDown ],
+                                            postselalg = makevelotracks(speedown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                             RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^e+ e-]CC" : 'P2CVE09_1', 
+                                                            "[Sigma+ -> p+ e+ ^e-]CC" : 'P2CVE09_2',
+                                                            "[Sigma+ -> ^p+ e+ e-]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^e+ e-]CC" : 'P2CVE10_1', 
+                                                            "[Sigma+ -> p+ e+ ^e-]CC" : 'P2CVE10_2',
+                                                            "[Sigma+ -> ^p+ e+ e-]CC" : 'P2CVProton10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p+ ^e+ e-]CC" : 'P2CVE11_1', 
+                                                            "[Sigma+ -> p+ e+ ^e-]CC" : 'P2CVE11_2',
+                                                            "[Sigma+ -> ^p+ e+ e-]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+speedown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                     )
+        self.SigmaPMuMuLFVLine = StrippingLine(spmumulfv_name+"Line",
+                                               prescale = config['SigmaPMuMuLFVPrescale'],
+                                               postscale = config['Postscale'],
+                                               algos = [ self.selSigmaPMuMuLFV ],
+                                               #postselalg = makevelotracks(spmumulfv_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p~- ^mu+ mu+]CC" : 'P2CVMu09_1', 
+                                                            "[Sigma+ -> p~- mu+ ^mu+]CC" : 'P2CVMu09_2',
+                                                            "[Sigma+ -> ^p~- mu+ mu+]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p~- ^mu+ mu+]CC" : 'P2CVMu10_1', 
+                                                            "[Sigma+ -> p~- mu+ ^mu+]CC" : 'P2CVMu10_2',
+                                                            "[Sigma+ -> ^p~- mu+ mu+]CC" : 'P2CVProton10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p~- ^mu+ mu+]CC" : 'P2CVMu11_1', 
+                                                            "[Sigma+ -> p~- mu+ ^mu+]CC" : 'P2CVMu11_2',
+                                                            "[Sigma+ -> ^p~- mu+ mu+]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+spmumulfv_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+
+        self.SigmaPMuMuLFVDownLine = StrippingLine(spmumulfvdown_name+"Line",
+                                               prescale = config['SigmaPMuMuLFVDownPrescale'],
+                                               postscale = config['Postscale'],
+                                               algos = [ self.selSigmaPMuMuLFVDown ],
+                                               postselalg = makevelotracks(spmumulfvdown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p~- ^mu+ mu+]CC" : 'P2CVMu09_1', 
+                                                            "[Sigma+ -> p~- mu+ ^mu+]CC" : 'P2CVMu09_2',
+                                                            "[Sigma+ -> ^p~- mu+ mu+]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p~- ^mu+ mu+]CC" : 'P2CVMu10_1', 
+                                                            "[Sigma+ -> p~- mu+ ^mu+]CC" : 'P2CVMu10_2',
+                                                            "[Sigma+ -> ^p~- mu+ mu+]CC" : 'P2CVProton10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                            "[Sigma+ -> p~- ^mu+ mu+]CC" : 'P2CVMu11_1', 
+                                                            "[Sigma+ -> p~- mu+ ^mu+]CC" : 'P2CVMu11_2',
+                                                            "[Sigma+ -> ^p~- mu+ mu+]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+spmumulfvdown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                     )
+
+
+        self.SigmaMuMuMuLine = StrippingLine(smumumu_name+"Line",
+                                             prescale = config['SigmaMuMuMuPrescale'],
+                                             postscale = config['Postscale'],
+                                             algos = [ self.selSigmaMuMuMu ],
+                                             #postselalg = makevelotracks(smumumu_name),
+                                             RequiredRawEvents = [],
+                                             MDSTFlag=False,
+                                             RelatedInfoTools =
+                                             [{'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                               'Location' : 'P2CVSigma09',
+                                               'DaughterLocations' : {"[Sigma+ -> ^mu+ mu+ mu-]CC":'P2CVMu09_1',
+                                                                      "[Sigma+ -> mu+ ^mu+ mu-]CC":'P2CVMu09_2',
+                                                                      "[Sigma+ -> mu+ mu+ ^mu-]CC":'P2CVMu09_3'}},
+                                              {'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                               'Location' : 'P2CVSigma10',
+                                               'DaughterLocations' :{"[Sigma+ -> ^mu+ mu+ mu-]CC":'P2CVMu10_1',
+                                                                     "[Sigma+ -> mu+ ^mu+ mu-]CC":'P2CVMu10_2',
+                                                                     "[Sigma+ -> mu+ mu+ ^mu-]CC":'P2CVMu10_3'}},
+                                              {'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                               'Location' : 'P2CVSigma11',
+                                               'DaughterLocations' :{"[Sigma+ -> ^mu+ mu+ mu-]CC":'P2CVMu11_1',
+                                                                     "[Sigma+ -> mu+ ^mu+ mu-]CC":'P2CVMu11_2',
+                                                                     "[Sigma+ -> mu+ mu+ ^mu-]CC":'P2CVMu11_3'}},
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+smumumu_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                              ])
+                                              
+        self.SigmaMuMuMuDownLine = StrippingLine(smumumudown_name+"Line",
+                                                 prescale = config['SigmaMuMuMuDownPrescale'],
+                                                 postscale = config['Postscale'],
+                                                 algos = [ self.selSigmaMuMuMuDown ],
+                                                 postselalg = makevelotracks(smumumudown_name),
+                                                 RequiredRawEvents = [],
+                                                 MDSTFlag=False,
+                                                 RelatedInfoTools =
+                                                 [{'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                   'Location' : 'P2CVSigma09',
+                                                   'DaughterLocations' : {"[Sigma+ -> ^mu+ mu+ mu-]CC":'P2CVMu09_1',
+                                                                          "[Sigma+ -> mu+ ^mu+ mu-]CC":'P2CVMu09_2',
+                                                                          "[Sigma+ -> mu+ mu+ ^mu-]CC":'P2CVMu09_3'}},
+                                                  {'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                   'Location' : 'P2CVSigma10',
+                                                   'DaughterLocations' :{"[Sigma+ -> ^mu+ mu+ mu-]CC":'P2CVMu10_1',
+                                                                         "[Sigma+ -> mu+ ^mu+ mu-]CC":'P2CVMu10_2',
+                                                                         "[Sigma+ -> mu+ mu+ ^mu-]CC":'P2CVMu10_3'}},
+                                                  {'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'],
+                                                   'Location' : 'P2CVSigma11',
+                                                   'DaughterLocations' :{"[Sigma+ -> ^mu+ mu+ mu-]CC":'P2CVMu11_1',
+                                                                         "[Sigma+ -> mu+ ^mu+ mu-]CC":'P2CVMu11_2',
+                                                                         "[Sigma+ -> mu+ mu+ ^mu-]CC":'P2CVMu11_3'}},
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+smumumudown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }])
+        
+        self.KPiEELine = StrippingLine(kpiee_name+"Line",
+                                             prescale = config['KPiEEPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selKPiEE ],
+                                            #postselalg = makevelotracks(kpiee_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False, 
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ e-]CC" : 'P2CVE09_1', 
+                                                            "[K+ -> pi+ e+ ^e-]CC" : 'P2CVE09_2',
+                                                            "[K+ -> ^pi+ e+ e-]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ e-]CC" : 'P2CVE10_1', 
+                                                            "[K+ -> pi+ e+ ^e-]CC" : 'P2CVE10_2',
+                                                            "[K+ -> ^pi+ e+ e-]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ e-]CC" : 'P2CVE11_1', 
+                                                            "[K+ -> pi+ e+ ^e-]CC" : 'P2CVE11_2',
+                                                            "[K+ -> ^pi+ e+ e-]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpiee_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+
+        self.KPiMuMuLine = StrippingLine(kpimumu_name+"Line",
+                                             prescale = config['KPiMuMuPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selKPiMuMu ],
+                                            #postselalg = makevelotracks(kpimumu_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False, 
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^mu+ mu-]CC" : 'P2CVMu09_1', 
+                                                            "[K+ -> pi+ mu+ ^mu-]CC" : 'P2CVMu09_2',
+                                                            "[K+ -> ^pi+ mu+ mu-]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^mu+ mu-]CC" : 'P2CVMu10_1', 
+                                                            "[K+ -> pi+ mu+ ^mu-]CC" : 'P2CVMu10_2',
+                                                            "[K+ -> ^pi+ mu+ mu-]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^mu+ mu-]CC" : 'P2CVMu11_1', 
+                                                            "[K+ -> pi+ mu+ ^mu-]CC" : 'P2CVMu11_2',
+                                                            "[K+ -> ^pi+ mu+ mu-]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpimumu_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+        self.KPiMuMuLFVLine = StrippingLine(kpimumulfv_name+"Line",
+                                         prescale = config['KPiMuMuLFVPrescale'],
+                                         postscale = config['Postscale'],
+                                         algos = [ self.selKPiMuMuLFV ],
+                                         #postselalg = makevelotracks(kpimumulfv_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^mu+ mu+]CC" : 'P2CVMu09_1', 
+                                                            "[K+ -> pi- mu+ ^mu+]CC" : 'P2CVMu09_2',
+                                                            "[K+ -> ^pi- mu+ mu+]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^mu+ mu+]CC" : 'P2CVMu10_1', 
+                                                            "[K+ -> pi- mu+ ^mu+]CC" : 'P2CVMu10_2',
+                                                            "[K+ -> ^pi- mu+ mu+]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^mu+ mu+]CC" : 'P2CVMu11_1', 
+                                                            "[K+ -> pi- mu+ ^mu+]CC" : 'P2CVMu11_2',
+                                                            "[K+ -> ^pi- mu+ mu+]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpimumulfv_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                         )
+
+        self.KPiEELFVLine = StrippingLine(kpieelfv_name+"Line",
+                                         prescale = config['KPiEELFVPrescale'],
+                                         postscale = config['Postscale'],
+                                         algos = [ self.selKPiEELFV ],
+                                         #postselalg = makevelotracks(kpieelfv_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ e+]CC" : 'P2CVE09_1', 
+                                                            "[K+ -> pi- e+ ^e+]CC" : 'P2CVE09_2',
+                                                            "[K+ -> ^pi- e+ e+]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ e+]CC" : 'P2CVE10_1', 
+                                                            "[K+ -> pi- e+ ^e+]CC" : 'P2CVE10_2',
+                                                            "[K+ -> ^pi- e+ e+]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ e+]CC" : 'P2CVE11_1', 
+                                                            "[K+ -> pi- e+ ^e+]CC" : 'P2CVE11_2',
+                                                            "[K+ -> ^pi- e+ e+]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpieelfv_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                         )
+        self.KPiEMuLFVLine = StrippingLine(kpiemulfv_name+"Line",
+                                         prescale = config['KPiEMuLFVPrescale'],
+                                         postscale = config['Postscale'],
+                                         algos = [ self.selKPiEMuLFV ],
+                                         #postselalg = makevelotracks(kpiemulfv_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ mu-]CC" : 'P2CVE09', 
+                                                            "[K+ -> pi+ e+ ^mu-]CC" : 'P2CVMu09',
+                                                            "[K+ -> ^pi+ e+ mu-]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ mu-]CC" : 'P2CVE10', 
+                                                            "[K+ -> pi+ e+ ^mu-]CC" : 'P2CVMu10',
+                                                            "[K+ -> ^pi+ e+ mu-]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ mu-]CC" : 'P2CVE11', 
+                                                            "[K+ -> pi+ e+ ^mu-]CC" : 'P2CVMu11',
+                                                            "[K+ -> ^pi+ e+ mu-]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpiemulfv_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                         )
+        self.KPiEMuLFVSSLine = StrippingLine(kpiemulfvss_name+"Line",
+                                         prescale = config['KPiEMuLFVSSPrescale'],
+                                         postscale = config['Postscale'],
+                                         algos = [ self.selKPiEMuLFVSS ],
+                                         #postselalg = makevelotracks(kpiemulfvss_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ mu+]CC" : 'P2CVEMu09', 
+                                                            "[K+ -> pi- e+ ^mu+]CC" : 'P2CVMu09',
+                                                            "[K+ -> ^pi- e+ mu+]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ mu+]CC" : 'P2CVE10', 
+                                                            "[K+ -> pi- e+ ^mu+]CC" : 'P2CVMu10',
+                                                            "[K+ -> ^pi- e+ mu+]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ mu+]CC" : 'P2CVE11', 
+                                                            "[K+ -> pi- e+ ^mu+]CC" : 'P2CVMu11',
+                                                            "[K+ -> ^pi- e+ mu+]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpiemulfv_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                         )
+        
+        self.KPiPiPiLine = StrippingLine(kpipipi_name+"Line",
+                                             prescale = config['KPiPiPiPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selKPiPiPi ],
+                                            #postselalg = makevelotracks(kpipipi_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi09_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi09_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi10_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi10_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi11_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi11_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpipipi_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+        self.KPiPiPiMassMeasLine = StrippingLine(kpipipimassmeas_name+"Line",
+                                             prescale = config['KPiPiPiMassMeasPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selKPiPiPiMassMeas ],
+                                            #postselalg = makevelotracks(kpipipimassmeas_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi09_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi09_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi10_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi10_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi11_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi11_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpipipimassmeas_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+        self.KPiMuMuDownLine = StrippingLine(kpimumudown_name+"Line",
+                                             prescale = config['KPiMuMuDownPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selKPiMuMuDown ],
+                                            postselalg = makevelotracks(kpimumudown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^mu+ mu-]CC" : 'P2CVMu09_1', 
+                                                            "[K+ -> pi+ mu+ ^mu-]CC" : 'P2CVMu09_2',
+                                                            "[K+ -> ^pi+ mu+ mu-]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^mu+ mu-]CC" : 'P2CVMu10_1', 
+                                                            "[K+ -> pi+ mu+ ^mu-]CC" : 'P2CVMu10_2',
+                                                            "[K+ -> ^pi+ mu+ mu-]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^mu+ mu-]CC" : 'P2CVMu11_1', 
+                                                            "[K+ -> pi+ mu+ ^mu-]CC" : 'P2CVMu11_2',
+                                                            "[K+ -> ^pi+ mu+ mu-]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpimumudown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                     )
+        self.KPiEEDownLine = StrippingLine(kpieedown_name+"Line",
+                                             prescale = config['KPiEEDownPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selKPiEEDown ],
+                                            postselalg = makevelotracks(kpieedown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ e-]CC" : 'P2CVE09_1', 
+                                                            "[K+ -> pi+ e+ ^e-]CC" : 'P2CVE09_2',
+                                                            "[K+ -> ^pi+ e+ e-]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ e-]CC" : 'P2CVE10_1', 
+                                                            "[K+ -> pi+ e+ ^e-]CC" : 'P2CVE10_2',
+                                                            "[K+ -> ^pi+ e+ e-]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ e-]CC" : 'P2CVE11_1', 
+                                                            "[K+ -> pi+ e+ ^e-]CC" : 'P2CVE11_2',
+                                                            "[K+ -> ^pi+ e+ e-]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpieedown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                     )
+        self.KPiPiPiDownLine = StrippingLine(kpipipidown_name+"Line",
+                                             prescale = config['KPiPiPiDownPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selKPiPiPiDown ],
+                                            postselalg = makevelotracks(kpipipidown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi09_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi09_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi10_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi10_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi11_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi11_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpipipidown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                     )
+        self.KPiPiPiMassMeasDownLine = StrippingLine(kpipipimassmeasdown_name+"Line",
+                                             prescale = config['KPiPiPiMassMeasDownPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selKPiPiPiMassMeasDown ],
+                                            postselalg = makevelotracks(kpipipimassmeasdown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi09_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi09_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi10_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi10_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> ^pi+ pi+ pi-]CC" : 'P2CVPi11_1', 
+                                                            "[K+ -> pi+ ^pi+ pi-]CC" : 'P2CVPi11_2',
+                                                            "[K+ -> pi+ pi+ ^pi-]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpipipimassmeasdown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                     )
+     
+        self.KPiMuMuLFVDownLine = StrippingLine(kpimumulfvdown_name+"Line",
+                                         prescale = config['KPiMuMuLFVDownPrescale'],
+                                         postscale = config['Postscale'],
+                                         algos = [ self.selKPiMuMuLFVDown ],
+                                         postselalg = makevelotracks(kpimumulfvdown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^mu+ mu+]CC" : 'P2CVMu09_1', 
+                                                            "[K+ -> pi- mu+ ^mu+]CC" : 'P2CVMu09_2',
+                                                            "[K+ -> ^pi- mu+ mu+]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^mu+ mu+]CC" : 'P2CVMu10_1', 
+                                                            "[K+ -> pi- mu+ ^mu+]CC" : 'P2CVMu10_2',
+                                                            "[K+ -> ^pi- mu+ mu+]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^mu+ mu+]CC" : 'P2CVMu11_1', 
+                                                            "[K+ -> pi- mu+ ^mu+]CC" : 'P2CVMu11_2',
+                                                            "[K+ -> ^pi- mu+ mu+]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpimumulfvdown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                         )
+
+        self.KPiEMuLFVDownLine = StrippingLine(kpiemulfvdown_name+"Line",
+                                         prescale = config['KPiEMuLFVDownPrescale'],
+                                         postscale = config['Postscale'],
+                                         algos = [ self.selKPiEMuLFVDown ],
+                                         postselalg = makevelotracks(kpiemulfvdown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ mu-]CC" : 'P2CVE09', 
+                                                            "[K+ -> pi+ e+ ^mu-]CC" : 'P2CVMu09',
+                                                            "[K+ -> ^pi+ e+ mu-]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ mu-]CC" : 'P2CVE10', 
+                                                            "[K+ -> pi+ e+ ^mu-]CC" : 'P2CVMu10',
+                                                            "[K+ -> ^pi+ e+ mu-]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi+ ^e+ mu-]CC" : 'P2CVE11', 
+                                                            "[K+ -> pi+ e+ ^mu-]CC" : 'P2CVMu11',
+                                                            "[K+ -> ^pi+ e+ mu-]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpiemulfvdown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                         )
+        self.KPiEMuLFVSSDownLine = StrippingLine(kpiemulfvssdown_name+"Line",
+                                         prescale = config['KPiEMuLFVSSDownPrescale'],
+                                         postscale = config['Postscale'],
+                                         algos = [ self.selKPiEMuLFVSSDown ],
+                                         postselalg = makevelotracks(kpiemulfvssdown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ mu+]CC" : 'P2CVE09', 
+                                                            "[K+ -> pi- e+ ^mu+]CC" : 'P2CVMu09',
+                                                            "[K+ -> ^pi- e+ mu+]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ mu+]CC" : 'P2CVE10', 
+                                                            "[K+ -> pi- e+ ^mu+]CC" : 'P2CVMu10',
+                                                            "[K+ -> ^pi- e+ mu+]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ mu+]CC" : 'P2CVE11', 
+                                                            "[K+ -> pi- e+ ^mu+]CC" : 'P2CVMu11',
+                                                            "[K+ -> ^pi- e+ mu+]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpiemulfvssdown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                         )
+        self.KPiEELFVDownLine = StrippingLine(kpieelfvdown_name+"Line",
+                                         prescale = config['KPiEELFVDownPrescale'],
+                                         postscale = config['Postscale'],
+                                         algos = [ self.selKPiEELFVDown ],
+                                         postselalg = makevelotracks(kpieelfvdown_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK09',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ e+]CC" : 'P2CVE09_1', 
+                                                            "[K+ -> pi- e+ ^e+]CC" : 'P2CVE09_2',
+                                                            "[K+ -> ^pi- e+ e+]CC" : 'P2CVPi09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK10',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ e+]CC" : 'P2CVE10_1', 
+                                                            "[K+ -> pi- e+ ^e+]CC" : 'P2CVE10_2',
+                                                            "[K+ -> ^pi- e+ e+]CC" : 'P2CVPi10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVK11',
+                                                'DaughterLocations' : {
+                                                            "[K+ -> pi- ^e+ e+]CC" : 'P2CVE11_1', 
+                                                            "[K+ -> pi- e+ ^e+]CC" : 'P2CVE11_2',
+                                                            "[K+ -> ^pi- e+ e+]CC" : 'P2CVPi11'
+                                                }
+                                              },
+                                              {
+                                               'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+kpieelfvdown_name,
+                                                'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              }
+                                            ]
+                                         )
+        self.PhiKMuLine = StrippingLine(phikmu_name+"Line",
+                                        prescale = config['PhiKMuPrescale'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.selPhiKMu ],
+                                        #postselalg = makevelotracks(phikmu_name),
+                                        RequiredRawEvents = [],
+                                        MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVPhi09',
+                                                'DaughterLocations' : {
+                                                            "[phi(1020) -> K+ ^mu-]CC" : 'P2CVMu09', 
+                                                            "[phi(1020) -> ^K+ mu-]CC" : 'P2CVK09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVPhi10',
+                                                'DaughterLocations' : {
+                                                            "[phi(1020) -> K+ ^mu-]CC" : 'P2CVMu10', 
+                                                            "[phi(1020) -> ^K+ mu-]CC" : 'P2CVK10'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVPhi11',
+                                                'DaughterLocations' : {
+                                                            "[phi(1020) -> K+ ^mu-]CC" : 'P2CVMu11', 
+                                                            "[phi(1020) -> ^K+ mu-]CC" : 'P2CVK11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+phikmu_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                         )
+
+        self.LambdaPPiLine = StrippingLine(lambdappi_name+"Line",
+                                            prescale = config['LambdaPPiPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selLambdaPPi ],
+                                            #postselalg = makevelotracks(lambdappi_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Lambda0 -> p+ ^pi-]CC" : 'P2CVPi09', 
+                                                            "[Lambda0 -> ^p+ pi-]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Lambda0 -> p+ ^pi-]CC" : 'P2CVPi10', 
+                                                            "[Lambda0 -> ^p+ pi-]CC" : 'P2CVProton10'
+                                                }
+                                                
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                            "[Lambda0 -> p+ ^pi-]CC" : 'P2CVPi11', 
+                                                            "[Lambda0 -> ^p+ pi-]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+lambdappi_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+
+        self.LambdaPPiEELine = StrippingLine(lambdappiee_name+"Line",
+                                            prescale = config['LambdaPPiEEPrescale'],
+                                            postscale = config['Postscale'],
+                                            algos = [ self.selLambdaPPiEE ],
+                                            #postselalg = makevelotracks(lambdappiee_name),
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False,
+                                            RelatedInfoTools = [
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 0.9, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma09',
+                                                'DaughterLocations' : {
+                                                            "[Lambda0 -> p+ ^pi- KS0]CC" : 'P2CVPi09', 
+                                                            "[Lambda0 -> ^p+ pi- KS0]CC" : 'P2CVProton09'
+                                                }
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.0, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma10',
+                                                'DaughterLocations' : {
+                                                            "[Lambda0 -> p+ ^pi- KS0]CC" : 'P2CVPi10', 
+                                                            "[Lambda0 -> ^p+ pi- KS0]CC" : 'P2CVProton10'
+                                                }
+                                                
+                                              },
+                                              {
+                                                'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.1, 'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPTASYM'], 
+                                                'Location' : 'P2CVSigma11',
+                                                'DaughterLocations' : {
+                                                            "[Lambda0 -> p+ ^pi- KS0]CC" : 'P2CVPi11', 
+                                                            "[Lambda0 -> ^p+ pi- KS0]CC" : 'P2CVProton11'
+                                                }
+                                              },
+                                              #{
+                                               #'Type' : 'RelInfoVeloTrackMatch', 'InputTracks' : "Rec/Track/Velo"+lambdappiee_name,
+                                                #'Location' : 'P2VELOTRACKMATCH'
+                                                
+                                              #}
+                                            ]
+                                     )
+
+
+
+        self.registerLine(self.SigmaPMuMuLine)
+        self.registerLine(self.SigmaPEELine)
+        self.registerLine(self.SigmaPEEDetLine)
+        self.registerLine(self.SigmaPEMuLine)
+        self.registerLine(self.SigmaPMuMuDetLine)
+        self.registerLine(self.SigmaPPi0Line)
+        self.registerLine(self.SigmaPPi0CalLine)
+        self.registerLine(self.SigmaPEEDownLine)
+        self.registerLine(self.SigmaPMuMuLFVLine)
+        self.registerLine(self.SigmaPMuMuLFVDownLine)
+        self.registerLine(self.SigmaPMuMuDownLine)
+        self.registerLine(self.SigmaMuMuMuLine)
+        self.registerLine(self.SigmaMuMuMuDownLine)
+        self.registerLine(self.KPiMuMuLine)
+        self.registerLine(self.KPiMuMuLFVLine)
+        self.registerLine(self.KPiMuMuLFVDownLine)
+        self.registerLine(self.KPiEELine)
+        self.registerLine(self.KPiEEDownLine)
+        self.registerLine(self.KPiEELFVLine)
+        self.registerLine(self.KPiEELFVDownLine)
+        self.registerLine(self.KPiEMuLFVLine)
+        self.registerLine(self.KPiEMuLFVDownLine)
+        self.registerLine(self.KPiEMuLFVSSLine)
+        self.registerLine(self.KPiEMuLFVSSDownLine)
+        self.registerLine(self.KPiPiPiLine)
+        self.registerLine(self.KPiPiPiMassMeasLine) 
+        self.registerLine(self.KPiMuMuDownLine)
+        self.registerLine(self.KPiPiPiDownLine)
+        self.registerLine(self.KPiPiPiMassMeasDownLine)
+        self.registerLine(self.PhiKMuLine)
+        self.registerLine(self.LambdaPPiLine)
+        self.registerLine(self.LambdaPPiEELine)
+
+
+
+#============================================================
+# Sigma+ -> p mu mu 
+def makeSigmaPMuMu(name, config):
+    """
+    Line for the selection of Sigma+ -> p+ mu+ mu-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    SigmaPMuMu = Combine3Particles(  DecayDescriptor = "[Sigma+ -> p+ mu+ mu-]cc",
+                                    DaughtersCuts = { "mu+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(muonMinIpChi2)s)"%config, 
+                                                     "p+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PROBNNp> %(protonProbNNp)s)"%config},
+                                    Combination12Cut = "( AM < 1500 * MeV  )",
+                                    CombinationCut = "(ADAMASS('Sigma+')<%(SigmaMassWin)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCA)s *mm)"%config,
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2)s)  & (PT> %(SigmaMinPt)s *MeV)"\
+                              "& (ADMASS('Sigma+') < %(SigmaMassWin)s *MeV )"\
+                              "& (BPVDIRA > %(SigmaMinDIRA)s) "\
+                              "& (BPVIPCHI2()< %(SigmaMaxIpChi2)s)"\
+                              "& (BPVLTIME()> %(SigmaMinTauPs)s * ps)" %config  
+                                )
+    # AllLooseMuons are needed in order to avoid the pt and ip cuts used in StdLooseMuons: do not change this!
+    _stdAllLooseMuons   = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+    _stdLooseProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+    
+    return Selection (name,
+                      Algorithm = SigmaPMuMu,
+                      RequiredSelections = [ _stdAllLooseMuons,
+                                             _stdLooseProtons ])
+
+#============================================================
+# Sigma+ > p- mu+ mu+ 
+def makeSigmaPMuMuLFV(name, config):
+    """
+    Line for the selection of Sigma+ -> p- mu+ mu+ 
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    SigmaPMuMu = Combine3Particles(  DecayDescriptor = "[Sigma+ -> p~- mu+ mu+]cc",
+                                    DaughtersCuts = { "mu+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(muonMinIpChi2)s)"%config,
+                                                        "p+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PROBNNp> %(protonProbNNp)s)"%config},
+                                     Combination12Cut = "( AM < 1500 * MeV  )",
+                                    CombinationCut = "(ADAMASS('Sigma+')<%(SigmaMassWin)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCA)s *mm)"%config,
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2)s)  & (PT> %(SigmaMinPt)s *MeV)"\
+                                                "& (ADMASS('Sigma+') < %(SigmaMassWin)s *MeV )"\
+                                                "& (BPVDIRA > %(SigmaMinDIRA)s) "\
+                                                "& (BPVIPCHI2()< %(SigmaMaxIpChi2)s)"\
+                                                "& (BPVLTIME()> %(SigmaMinTauPs)s * ps)" %config  
+
+                                )
+    # AllLooseMuons are needed in order to avoid the pt and ip cuts used in StdLooseMuons: do not change this!
+    _stdAllLooseMuons   = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+    
+    _stdLooseProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+    
+    return Selection (name,
+                      Algorithm = SigmaPMuMu,
+                      RequiredSelections = [ _stdAllLooseMuons,
+                                             _stdLooseProtons ])
+#============================================================
+#  Sigma+ -> p mu mu  with detached dimuon
+def makeDiMuonDetached(name, config):
+    """
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+
+    myDiMuon = CombineParticles(  DecayDescriptor = "KS0 -> mu+ mu-",
+                                  DaughtersCuts = { "mu+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(muonMinIpChi2)s)"%config },
+                                  CombinationCut = "(AM <%(DiMuonMaxMass)s *MeV) & (AMAXDOCA('')< %(DiMuonMaxDOCA)s *mm)"%config,
+                                  MotherCut = "(VFASPF(VCHI2/VDOF)< %(DiMuonVtxChi2)s)  & (PT> %(DiMuonMinPt)s *MeV)" %config  
+                                )
+    # AllLooseMuons are needed in order to avoid the pt and ip cuts used in StdLooseMuons: do not change this!
+    _stdAllLooseMuons   = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+    
+    return Selection (name,
+                      Algorithm = myDiMuon,
+                      RequiredSelections = [ _stdAllLooseMuons ])
+
+
+
+def makeSigmaPMuMuDet(name, config, inputs):
+    """
+    Line for the selection of Sigma+ -> p+ mu+ mu-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+
+    #from Configurables import OfflineVertexFitter
+    SigmaPMuMuDet = CombineParticles(  DecayDescriptor = "[Sigma+ -> p+ KS0 ]cc",
+                                       DaughtersCuts = { "KS0" : "(MIPCHI2DV(PRIMARY)>%(DiMuonMinIpChi2)s)"%config, 
+                                                         "p+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PROBNNp> %(protonProbNNp)s)"%config},
+                                       CombinationCut = "(ADAMASS('Sigma+')<%(SigmaMassWin)s *MeV)"%config,
+                                       MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaDetVtxChi2)s)  & (PT> %(SigmaMinPt)s *MeV)"\
+                                       "& (ADMASS('Sigma+') < %(SigmaMassWin)s *MeV )"\
+                                       "& (BPVDIRA > %(SigmaMinDIRA)s) "\
+                                       "& (BPVIPCHI2()< %(SigmaMaxIpChi2)s)"\
+                                       "& (BPVLTIME()> %(SigmaMinTauPs)s * ps)" %config  
+                                       )
+    
+    return Selection (name,
+                      Algorithm = SigmaPMuMuDet,
+                      RequiredSelections = inputs )
+
+#============================================================
+#  Very soft Dielectron for Sigma-> p ee  and Lambda-> p pi e e 
+
+def makeDiElectronDetached(name, config):
+    from CommonParticles.Utils import trackSelector 
+    from Configurables import DiElectronMaker,ProtoParticleCALOFilter
+    from GaudiKernel.SystemOfUnits import MeV
+    dieLL = DiElectronMaker('MyDiElectron')
+    dieLL.Particle = "KS0"
+    selector = trackSelector ( dieLL , trackTypes = [ "Long"]) 
+    dieLL.addTool( ProtoParticleCALOFilter('Electron'))
+#    dieLL.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'%(DiElectronPIDe)s'"%config ]
+    dieLL.Electron.Selection = ["RequiresDet='CALO' PROBNNe>'0.2'" ]
+    
+    dieLL.DiElectronMassMax = 2000.*MeV
+    dieLL.DiElectronMassMin = 0.*MeV
+    dieLL.DiElectronPtMin =   0.*MeV
+
+    return Selection (name,
+                      Algorithm = dieLL
+                      )
+
+#============================================================
+#  Sigma+ -> p e e 
+def makeSigmaPEEDetached(name, config, inputs):
+    """
+    Line for the selection of Sigma+ -> p+ e+ e-, 
+    for normalisation purposes
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    SigmaPEE = CombineParticles(    DecayDescriptor = "[Sigma+ -> p+ KS0]cc",
+                                    DaughtersCuts = {  "KS0" : "(MIPCHI2DV(PRIMARY)>%(DiElectronMinIpChi2)s)"%config, 
+                                                       "p+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PROBNNp> %(protonProbNNp)s)"%config},
+                                    CombinationCut = "(ADAMASS('Sigma+')<%(SigmaMassWin)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCA)s *mm)"%config,
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2)s)  & (PT> %(SigmaMinPt)s *MeV)"\
+                                                "& (ADMASS('Sigma+') < %(SigmaMassWin)s *MeV )"\
+                                                "& (BPVDIRA > %(SigmaMinDIRA)s) "\
+                                                "& (BPVIPCHI2()< %(SigmaMaxIpChi2)s)"\
+                                                "& (BPVLTIME()> %(SigmaMinTauPs)s * ps)" %config  
+                                )
+
+    return Selection (name,
+                      Algorithm = SigmaPEE,
+                      RequiredSelections = inputs )
+
+#============================================================
+#  Sigma+ -> p e e 
+def makeSigmaPEE(name, config):
+    """
+    Line for the selection of Sigma+ -> p+ e+ e- 
+    for normalisation purposes
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    SigmaPEE = Combine3Particles(    DecayDescriptor = "[Sigma+ -> p+ e+ e-]cc",
+                                    DaughtersCuts = { "e+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PIDe > %(electronPIDe)s ) &  (MIPCHI2DV(PRIMARY)>%(electronMinIpChi2)s)"%config,
+                                                    "p+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PROBNNp> %(protonProbNNp)s)"%config},
+                                    Combination12Cut = "( AM < 1500 * MeV  )",
+                                    CombinationCut = "(ADAMASS('Sigma+')<%(SigmaMassWin)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCA)s *mm)"%config,
+                                   MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2)s)  & (PT> %(SigmaMinPt)s *MeV)"\
+                                                "& (ADMASS('Sigma+') < %(SigmaMassWin)s *MeV )"\
+                                                "& (BPVDIRA > %(SigmaMinDIRA)s) "\
+                                                "& (BPVIPCHI2()< %(SigmaMaxIpChi2)s)"\
+                                                "& (BPVLTIME()> %(SigmaMinTauPs)s * ps)" %config  
+                                )
+    # AllLooseElectrons are needed in order to avoid the pt and ip cuts used in StdLooseMuons: do not change this!
+    _stdAllLooseElectrons   = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+    
+    _stdLooseProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+
+    
+    return Selection (name,
+                      Algorithm = SigmaPEE,
+                      RequiredSelections = [ _stdAllLooseElectrons,
+                                             _stdLooseProtons ])
+
+#============================================================
+# Sigma+ -> p e mu 
+def makeSigmaPEMu(name, config):
+    """
+    Line for the selection of Sigma+ -> p+ e+ mu-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    SigmaPEMu = Combine3Particles(  DecayDescriptors = [ "[Sigma+ -> p+ e+ mu-]cc","[Sigma+ -> p+ mu+ e-]cc"],
+                                    DaughtersCuts = { "mu+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(muonMinIpChi2)s)"%config,
+                                                      "e+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(muonMinIpChi2)s)"%config, 
+                                                     "p+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PROBNNp> %(protonProbNNp)s)"%config},
+                                   Combination12Cut = "( AM < 1500 * MeV  )",
+                                    CombinationCut = "(ADAMASS('Sigma+')<%(SigmaMassWin)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCA)s *mm)"%config,
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2)s)  & (PT> %(SigmaMinPt)s *MeV)"\
+                              "& (ADMASS('Sigma+') < %(SigmaMassWin)s *MeV )"\
+                              "& (BPVDIRA > %(SigmaMinDIRA)s) "\
+                              "& (BPVIPCHI2()< %(SigmaMaxIpChi2)s)"\
+                              "& (BPVLTIME()> %(SigmaMinTauPs)s * ps)" %config  
+                                )
+    # AllLooseMuons are needed in order to avoid the pt and ip cuts used in StdLooseMuons: do not change this!
+    _stdAllLooseMuons   = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+    _stdLooseProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+    _stdAllLooseElectrons   = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+    return Selection (name,
+                      Algorithm = SigmaPEMu,
+                      RequiredSelections = [ _stdAllLooseMuons,
+                                             _stdAllLooseElectrons,
+                                             _stdLooseProtons ])
+
+
+
+#============================================================
+#  Sigma+ -> p pi0 with Dalitz 
+def makeSigmaPPi0(name, config):
+    """
+    Line for the selection of Sigma+ -> p+ pi0
+    for normalisation purposes
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    pi0sel = MergedSelection("Pi0For" + name, RequiredSelections = [  StdLooseDalitzPi0,
+                                                                      #StdLoosePi024e, StdLoosePi02gee
+                                                                      ] ) 
+
+    
+    SigmaPPi0 = CombineParticles(   DecayDescriptor = "[Sigma+ -> p+ pi0]cc",
+                                    DaughtersCuts = { "pi0" : "(PT > %(pi0MinPt)s)"%config,
+                                    "p+" : "(PT > %(pMinPt)s) & (TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PROBNNp > %(protonProbNNpTight)s )"%config},
+                                    CombinationCut = "(ADAMASS('Sigma+')<%(SigmaPPi0MassWin)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCA)s *mm)"%config,
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2)s)  & (PT> %(SigmaMinPt)s *MeV)"\
+                                                "& (ADMASS('Sigma+') < %(SigmaPPi0MassWin)s *MeV )"\
+                                                "& (BPVDIRA > %(SigmaMinDIRA)s) "\
+                                                "& (BPVIPCHI2()< %(SigmaMaxIpChi2)s)"\
+                                                "& (BPVLTIME()> %(SigmaMinTauPs)s * ps)" %config  
+                                )
+
+#    _stdPizeros   =  DataOnDemand(Location = "Phys/StdLooseMergedPi0/Particles")
+    _stdLooseProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+    
+    return Selection (name,
+                      Algorithm = SigmaPPi0,
+                      RequiredSelections = [ pi0sel,
+                                             _stdLooseProtons ])
+
+#============================================================
+#  Sigma+ -> p pi0 with Merged and Resolved pi0
+def makeSigmaPPi0Cal(name, config):
+    """
+    Line for the selection of Sigma+ -> p+ pi0
+    for normalisation purposes
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    pi0sel = MergedSelection("Pi0For" + name, RequiredSelections = [ StdLooseMergedPi0, StdLooseResolvedPi0 ] ) 
+
+    
+    SigmaPPi0 = CombineParticles(   DecayDescriptor = "[Sigma+ -> p+ pi0]cc",
+                                    DaughtersCuts = { "pi0" : "(PT > %(pi0MinPt)s) & (CL > %(pi0CL)s)"%config,
+                                    "p+" : "(PT > %(pMinPt)s) & (TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PROBNNp > %(protonProbNNpTight)s )"%config},
+                                    CombinationCut = "(ADAMASS('Sigma+')<%(SigmaPPi0MassWin)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCA)s *mm)"%config,
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2)s)  & (PT> %(SigmaMinPt)s *MeV)"\
+                                    "& (ADMASS('Sigma+') < %(SigmaPPi0MassWin)s *MeV )"\
+                                    "& (BPVDIRA > %(SigmaMinDIRA)s) "\
+                                    "& (BPVIPCHI2()< %(SigmaMaxIpChi2)s)"\
+                                    "& (BPVLTIME()> %(SigmaMinTauPs)s * ps)" %config  
+                                )
+
+#    _stdPizeros   =  DataOnDemand(Location = "Phys/StdLooseMergedPi0/Particles")
+    _stdLooseProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+    
+    return Selection (name,
+                      Algorithm = SigmaPPi0,
+                      RequiredSelections = [ pi0sel,
+                                             _stdLooseProtons ])
+
+
+
+
+#============================================================
+# Sigma+ -> mu mu mu
+# Contact: Xabier Cid Vidal
+def makeSigmaMuMuMu(name, config):
+    """
+    Line for the selection of Sigma+ -> mu+ mu+ mu-,
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    SigmaMuMuMu = Combine3Particles(  DecayDescriptor = "[Sigma+ -> mu+ mu+ mu-]cc",
+                                     DaughtersCuts = { "mu+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(muon3MinIpChi2)s)"%config },
+                                      Combination12Cut = "( AM < 1500 * MeV  )",
+                                     CombinationCut = "(ADAMASS('Sigma+')<%(Sigma3MassWin)s *MeV) & (AMAXDOCA('')< %(Sigma3MaxDOCA)s *mm)"%config,
+                                     MotherCut = "(VFASPF(VCHI2/VDOF)< %(Sigma3VtxChi2)s)  & (PT> %(Sigma3MinPt)s *MeV)"\
+                                     "& (ADMASS('Sigma+') < %(Sigma3MassWin)s *MeV )"\
+                                     "& (BPVDIRA > %(Sigma3MinDIRA)s) "\
+                                     "& (BPVIPCHI2()< %(Sigma3MaxIpChi2)s)"\
+                                     "& (BPVLTIME()> %(Sigma3MinTauPs)s * ps)" %config
+                                     )
+    
+    
+    # AllLooseMuons are needed in order to avoid the pt and ip cuts used in StdLooseMuons: do not change this!
+    _stdAllLooseMuons   = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+    
+    return Selection (name,
+                      Algorithm = SigmaMuMuMu,
+                      RequiredSelections = [ _stdAllLooseMuons])
+
+
+# ============================================================
+# Sigma+ -> mu mu mu down
+# Contact: Xabier Cid Vidal
+def makeSigmaMuMuMuDown(name, config):
+    """
+    Line for the selection of Sigma+ -> mu+ mu+ mu-,
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts
+    """
+    
+    #from Configurables import OfflineVertexFitter
+    SigmaMuMuMu = Combine3Particles(  DecayDescriptor = "[Sigma+ -> mu+ mu+ mu-]cc",
+                                     DaughtersCuts = { "mu+" : "(TRCHI2DOF< %(Sigma3DauTrChi2Down)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(muon3MinIpChi2Down)s)"%config},
+                                     Combination12Cut ="( AM < 1500 * MeV  )",
+                                     CombinationCut = "(ADAMASS('Sigma+')<%(Sigma3MassWinDown)s *MeV) & (AMAXDOCA('')< %(Sigma3MaxDOCADown)s *mm)"%config,
+                                     MotherCut = "(VFASPF(VCHI2/VDOF)< %(Sigma3VtxChi2Down)s)  & (PT> %(Sigma3MinPtDown)s *MeV)"\
+                                     "& (ADMASS('Sigma+') < %(Sigma3MassWinDown)s *MeV )"\
+                                     "& (BPVDIRA > %(Sigma3MinDIRADown)s) "\
+                                     "& (BPVIPCHI2()< %(Sigma3MaxIpChi2Down)s)"\
+                                     "& (BPVLTIME()> %(Sigma3MinTauPsDown)s * ps)" %config
+                                     )
+                                     
+    
+    # AllLooseMuons are needed in order to avoid the pt and ip cuts used in StdLooseMuons: do not change this!
+    _Muons   = DataOnDemand(Location = "Phys/StdLooseDownMuons/Particles")
+    
+    return Selection (name,
+                      Algorithm = SigmaMuMuMu,
+                      RequiredSelections = [ _Muons])
+        
+
+# ============================================================
+# K -> pi e e
+# Contact: Kristian Zarebski
+def makeKPiEE(name, config):
+    """
+    Line for the selection of K+ -> pi+ e+ e-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiEE = Combine3Particles( DecayDescriptor = "[K+ -> pi+ e+ e-]cc",
+                                DaughtersCuts = { "e+" : "(P>3000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config,
+                                                    "pi+":"(P>1000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config},
+                                 Combination12Cut = "( AM < 1500 * MeV  )",
+                                CombinationCut = "(ADAMASS('K+') < %(KMassWin)s *MeV) & (AMAXDOCA('')< %(KMaxDOCA)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPT)s) & (ADMASS('K+') < %(KMassWin)s *MeV) & (BPVDIRA > %(KMinDIRA)s)"\
+                                    "& (VFASPF(VCHI2) < %(KVtxChi2)s) & (BPVVDCHI2 > %(KMinVDChi2)s) & (BPVIPCHI2()< %(KMaxIpChi2)s )"%config
+                                )
+    _stdAllLoosePions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+    _stdAllLooseElectrons   = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")    
+    return Selection (name,
+                      Algorithm = KPiEE,
+                      RequiredSelections = [ _stdAllLooseElectrons,
+                                             _stdAllLoosePions ])
+
+# ============================================================
+# K -> pi mu mu 
+def makeKPiMuMu(name, config):
+    """
+    Line for the selection of K+ -> pi+ mu+ mu-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiMuMu = Combine3Particles( DecayDescriptor = "[K+ -> pi+ mu+ mu-]cc",
+                                DaughtersCuts = { "mu+" : "(P>3000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config,
+                                                    "pi+":"(P>1000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config},
+                                 Combination12Cut = "( AM < 1500 * MeV  )",
+                                CombinationCut = "(ADAMASS('K+') < %(KMassWin)s *MeV) & (AMAXDOCA('')< %(KMaxDOCA)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPT)s) & (ADMASS('K+') < %(KMassWin)s *MeV) & (BPVDIRA > %(KMinDIRA)s)"\
+                                    "& (VFASPF(VCHI2) < %(KVtxChi2)s) & (BPVVDCHI2 > %(KMinVDChi2)s) & (BPVIPCHI2()< %(KMaxIpChi2)s )"%config
+                                )
+    _stdAllLoosePions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+    _stdAllLooseMuons   = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")    
+    return Selection (name,
+                      Algorithm = KPiMuMu,
+                      RequiredSelections = [ _stdAllLooseMuons,
+                                             _stdAllLoosePions ])
+
+# ============================================================
+# K -> pi e mu LFV
+# Contact: Kristian Zarebski
+def makeKPiEMuLFV(name, config):
+    """
+    Line for the selection of K+ -> pi+ e+ mu-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiEMuLFV = Combine3Particles( DecayDescriptor = "[K+ -> pi+ e+ mu-]cc",
+                                DaughtersCuts = { "mu-" : "(P>3000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config,
+                                                  "e+" : "(P>3000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config,  
+                                                  "pi+":"(P>1000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config},
+                                 Combination12Cut = "( AM < 1500 * MeV  )",
+                                CombinationCut = "(ADAMASS('K+') < %(KMassWin)s *MeV) & (AMAXDOCA('')< %(KMaxDOCA)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPT)s) & (ADMASS('K+') < %(KMassWin)s *MeV) & (BPVDIRA > %(KMinDIRA)s)"\
+                                    "& (VFASPF(VCHI2) < %(KVtxChi2)s) & (BPVVDCHI2 > %(KMinVDChi2)s) & (BPVIPCHI2()< %(KMaxIpChi2)s )"%config
+                                )
+    _stdAllLoosePions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+    _stdAllLooseElectrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+    _stdAllLooseMuons   = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")    
+    return Selection (name,
+                      Algorithm = KPiEMuLFV,
+                      RequiredSelections = [ _stdAllLooseMuons,
+                                             _stdAllLooseElectrons,
+                                             _stdAllLoosePions ])
+# ============================================================
+# K -> pi e mu LFV Same Sign
+# Contact: Kristian Zarebski
+def makeKPiEMuLFVSS(name, config):
+    """
+    Line for the selection of K+ -> pi- e+ mu+,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiEMuLFVSS = Combine3Particles( DecayDescriptor = "[K+ -> pi- e+ mu+]cc",
+                                DaughtersCuts = { "mu+" : "(P>3000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config,
+                                                  "e+" : "(P>3000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config,  
+                                                  "pi-":"(P>1000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config},
+                                 Combination12Cut = "( AM < 1500 * MeV  )",
+                                CombinationCut = "(ADAMASS('K+') < %(KMassWin)s *MeV) & (AMAXDOCA('')< %(KMaxDOCA)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPT)s) & (ADMASS('K+') < %(KMassWin)s *MeV) & (BPVDIRA > %(KMinDIRA)s)"\
+                                    "& (VFASPF(VCHI2) < %(KVtxChi2)s) & (BPVVDCHI2 > %(KMinVDChi2)s) & (BPVIPCHI2()< %(KMaxIpChi2)s )"%config
+                                )
+    _stdAllLoosePions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+    _stdAllLooseElectrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+    _stdAllLooseMuons   = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")    
+    return Selection (name,
+                      Algorithm = KPiEMuLFVSS,
+                      RequiredSelections = [ _stdAllLooseMuons,
+                                             _stdAllLooseElectrons,
+                                             _stdAllLoosePions ])
+# ============================================================
+# K -> pi mu mu LFV
+def makeKPiMuMuLFV(name, config):
+    """
+    Line for the selection of K+ -> pi- mu+ mu+,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiMuMuLFV = Combine3Particles(  DecayDescriptor = "[K+ -> pi- mu+ mu+]cc",
+                                    DaughtersCuts = { "mu+" : "(P>3000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config,
+                                        "pi+":"(P>1000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config},
+                                     Combination12Cut = "( AM < 1500 * MeV  )",                                     
+                                    CombinationCut = "(ADAMASS('K+') < %(KMassWin)s *MeV) & (AMAXDOCA('')< %(KMaxDOCA)s *mm)"%config,
+                                    MotherCut ="(PT> %(KMinPT)s) & (ADMASS('K+') < %(KMassWin)s *MeV) & ((BPVDIRA > %(KMinDIRA)s))"\
+                                        "& (VFASPF(VCHI2) < %(KVtxChi2)s) & (BPVVDCHI2 > %(KMinVDChi2)s) & (BPVIPCHI2()< %(KMaxIpChi2)s )"%config
+                                )
+    _stdAllLoosePions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+    _stdAllLooseMuons   = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")    
+    return Selection (name,
+                      Algorithm = KPiMuMuLFV,
+                      RequiredSelections = [ _stdAllLooseMuons,
+                                             _stdAllLoosePions ])
+
+
+# ============================================================
+# K -> pi e e LFV
+# Contact: Kristian Zarebski
+def makeKPiEELFV(name, config):
+    """
+    Line for the selection of K+ -> pi- e+ e+,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiEELFV = Combine3Particles(  DecayDescriptor = "[K+ -> pi- e+ e+]cc",
+                                    DaughtersCuts = { "e+" : "(P>3000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config,
+                                        "pi+":"(P>1000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config},
+                                     Combination12Cut = "( AM < 1500 * MeV  )",                                     
+                                    CombinationCut = "(ADAMASS('K+') < %(KMassWin)s *MeV) & (AMAXDOCA('')< %(KMaxDOCA)s *mm)"%config,
+                                    MotherCut ="(PT> %(KMinPT)s) & (ADMASS('K+') < %(KMassWin)s *MeV) & ((BPVDIRA > %(KMinDIRA)s))"\
+                                        "& (VFASPF(VCHI2) < %(KVtxChi2)s) & (BPVVDCHI2 > %(KMinVDChi2)s) & (BPVIPCHI2()< %(KMaxIpChi2)s )"%config
+                                )
+    _stdAllLoosePions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+    _stdAllLooseElectrons   = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")    
+    return Selection (name,
+                      Algorithm = KPiEELFV,
+                      RequiredSelections = [ _stdAllLooseElectrons,
+                                             _stdAllLoosePions ])
+
+# ============================================================
+# K-> pi pi pi loose selection
+def makeKPiPiPi(name, config):
+    """
+    Line for the selection of K+ -> pi+ pi+ pi-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiPiPi = Combine3Particles( DecayDescriptor = "[K+ -> pi+ pi+ pi-]cc",
+                                DaughtersCuts = { "pi+":"(P>1000) & (TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2)s)"%config},
+                                 CombinationCut = "(ADAMASS('K+') < %(KMassWin)s *MeV) & (AMAXDOCA('')< %(KMaxDOCA)s *mm)"%config,
+                                 Combination12Cut = "( AM < 1500 * MeV  )",
+                                MotherCut ="(PT> %(KMinPT)s) & (ADMASS('K+') < %(KMassWin)s *MeV) & (BPVDIRA > %(KMinDIRA)s)"\
+                                "& (VFASPF(VCHI2) < %(KVtxChi2)s) & (BPVVDCHI2 > %(KMinVDChi2)s) & (BPVIPCHI2()< %(KMaxIpChi2)s )"%config
+                            )
+
+    _stdAllLoosePions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+
+    return Selection (name,
+                      Algorithm = KPiPiPi,
+                      RequiredSelections = [     _stdAllLoosePions ])
+
+# ============================================================
+# K-> pi pi pi tight selection for mass measurement
+def makeKPiPiPiMassMeas(name, config):
+    """
+    Line for the selection of K+ -> pi+ pi+ pi-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiPiPi = Combine3Particles( DecayDescriptor = "[K+ -> pi+ pi+ pi-]cc",
+                                DaughtersCuts = {   "pi+":"(P>1000) & (MIPCHI2DV(PRIMARY) > 25.0) & (TRCHI2DOF<5) & (TRGHOSTPROB < 0.4)"},
+                                Combination12Cut = "( AM < 1500 * MeV  )",
+                                CombinationCut = "(ADAMASS('K+') < %(KMassWinMassMeas)s *MeV) & (AMAXDOCA('')< %(KMaxDOCAMassMeas)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPTMassMeas)s) & (ADMASS('K+') < %(KMassWinMassMeas)s *MeV) & (BPVDIRA > %(KMinDIRAMassMeas)s)"\
+                                "& (VFASPF(VCHI2) < %(KVtxChi2MassMeas)s) & (BPVVDCHI2 > %(KMinVDChi2MassMeas)s) & (BPVIPCHI2()< %(KMaxIpChi2MassMeas)s )"%config
+                                )
+
+    _stdAllLoosePions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+
+    return Selection (name,
+                      Algorithm = KPiPiPi,
+                      RequiredSelections = [     _stdAllLoosePions ])
+
+
+
+#============================================================
+# Downstream lines 
+#============================================================
+# Sigma+ -> p mu mu 
+def makeSigmaPMuMuDown(name, config):
+    """
+    Line for the selection of Sigma+ -> p+ mu+ mu-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    SigmaPMuMu = Combine3Particles(  DecayDescriptor = "[Sigma+ -> p+ mu+ mu-]cc",
+                                    DaughtersCuts = { "mu+" : "(TRCHI2DOF< %(SigmaDauTrChi2Down)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(muonMinIpChi2Down)s)"%config,
+                                                "p+" : "(TRCHI2DOF<%(SigmaDauTrChi2Down)s) & (TRGHOSTPROB<0.3)"%config},
+                                     Combination12Cut = "( AM < 1500 * MeV  )",
+                                     CombinationCut = "(ADAMASS('Sigma+')<%(SigmaMassWinDown)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCADown)s *mm)"%config,
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2Down)s)  & (PT> %(SigmaMinPtDown)s *MeV)"\
+                                        "& (ADMASS('Sigma+') < %(SigmaMassWinDown)s *MeV )"\
+                                        "& (BPVDIRA > %(SigmaMinDIRADown)s) "\
+                                        "& (BPVIPCHI2()< %(SigmaMaxIpChi2Down)s)"\
+                                        "& (BPVLTIME()> %(SigmaMinTauPsDown)s * ps)" %config  
+                                    )
+    # AllLooseMuons are needed in order to avoid the pt and ip cuts used in StdLooseMuons: do not change this!
+    _Muons   = DataOnDemand(Location = "Phys/StdLooseDownMuons/Particles")
+    _Protons = DataOnDemand(Location = "Phys/StdNoPIDsDownProtons/Particles")
+    
+    return Selection (name,
+                      Algorithm = SigmaPMuMu,
+                      RequiredSelections = [ _Muons,
+                                             _Protons ])
+                                             
+def makeSigmaPMuMuLFVDown(name, config):
+    """
+    Line for the selection of Sigma+ -> p- mu+ mu+,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    SigmaPMuMu = Combine3Particles(  DecayDescriptor = "[Sigma+ -> p~- mu+ mu+]cc",
+                                    DaughtersCuts = { "mu+" : "(TRCHI2DOF<%(SigmaDauTrChi2Down)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(muonMinIpChi2)s)"%config,
+                                    "p~-" : "(TRCHI2DOF<%(SigmaDauTrChi2Down)s) & (TRGHOSTPROB<0.3)"%config},
+                                     Combination12Cut = "( AM < 1500 * MeV  )",
+                                     CombinationCut = "(ADAMASS('Sigma+')<%(SigmaMassWinDown)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCADown)s *mm)"%config,
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2Down)s)  & (PT> %(SigmaMinPtDown)s *MeV)"\
+                                        "& (ADMASS('Sigma+') < %(SigmaMassWinDown)s *MeV )"\
+                                        "& (BPVDIRA > %(SigmaMinDIRADown)s) "\
+                                        "& (BPVIPCHI2()< %(SigmaMaxIpChi2Down)s)"\
+                                        "& (BPVLTIME()> %(SigmaMinTauPsDown)s * ps)" %config  
+                                    )
+
+    # AllLooseMuons are needed in order to avoid the pt and ip cuts used in StdLooseMuons: do not change this!
+    _Muons   = DataOnDemand(Location = "Phys/StdLooseDownMuons/Particles")
+    _Protons = DataOnDemand(Location = "Phys/StdNoPIDsDownProtons/Particles")
+    
+    return Selection (name,
+                      Algorithm = SigmaPMuMu,
+                      RequiredSelections = [ _Muons,
+                                             _Protons ])
+
+
+def makeSigmaPEEDown(name, config):
+    """
+    Line for the selection of Sigma+ -> p+ e+ e- gamma,  (with photon undetected)
+    for normalisation purposes
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    SigmaPEE = Combine3Particles(    DecayDescriptor = "[Sigma+ -> p+ e+ e-]cc",
+                                    DaughtersCuts = { "e+" : "(TRCHI2DOF<%(SigmaDauTrChi2Down)s) & (TRGHOSTPROB<0.3)  &  (PIDe > %(electronPIDe)s ) & (MIPCHI2DV(PRIMARY)>%(electronMinIpChi2Down)s)"%config,
+                                    "p+" : "(TRCHI2DOF<%(SigmaDauTrChi2Down)s) & (TRGHOSTPROB<0.3) "%config},
+                                     Combination12Cut = "( AM < 1500 * MeV  )",
+                                     CombinationCut = "(ADAMASS('Sigma+')<%(SigmaPEEMassWinDown)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCADown)s *mm)"%config,
+                                    MotherCut = "(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2Down)s)  & (PT> %(SigmaMinPtDown)s *MeV)"\
+                                    "& (ADMASS('Sigma+') < %(SigmaPEEMassWinDown)s *MeV )"\
+                                    "& (BPVDIRA > %(SigmaMinDIRADown)s) "\
+                                    "& (BPVIPCHI2()< %(SigmaMaxIpChi2Down)s)"\
+                                    "& (BPVLTIME()> %(SigmaMinTauPsDown)s * ps)" %config
+                                )
+    _stdAllLooseElectrons   = DataOnDemand(Location = "Phys/StdNoPIDsDownElectrons/Particles")
+    
+    _stdLooseProtons = DataOnDemand(Location = "Phys/StdNoPIDsDownProtons/Particles")
+
+    
+    return Selection (name,
+                      Algorithm = SigmaPEE,
+                      RequiredSelections = [ _stdAllLooseElectrons,
+                                             _stdLooseProtons ])
+
+
+
+# Kaon lines 
+def makeKPiMuMuDown(name, config):
+    """
+    Line for the selection of K+ -> pi+ mu+ mu-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiMuMu = Combine3Particles( DecayDescriptor = "[K+ -> pi+ mu+ mu-]cc",
+                                DaughtersCuts = {  "mu+" : "(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config,
+                                                    "pi+":"(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config},
+                                 Combination12Cut = "( AM < 1500 * MeV  )",
+                                 CombinationCut = "(ADAMASS('K+') < %(KMassWinDown)s *MeV) & (AMAXDOCA('')< %(KMaxDOCADown)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPTDown)s) & (ADMASS('K+') < %(KMassWinDown)s *MeV) & (BPVDIRA > %(KMinDIRADown)s)"\
+                                "& (VFASPF(VCHI2) < %(KVtxChi2Down)s) & (BPVVDCHI2 > %(KMinVDChi2Down)s) & (BPVVDZ > %(KVDPVMinDown)s*mm) & (BPVVDZ < %(KVDPVMaxDown)s*mm)"%config
+                                )
+    
+    _Muons   = DataOnDemand(Location = "Phys/StdLooseDownMuons/Particles")
+    _Pions = DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")
+    
+    return Selection (name,
+                      Algorithm = KPiMuMu,
+                      RequiredSelections = [ _Muons,
+                                             _Pions ])
+                                            
+
+# Contact: Kristian Zarebski 
+def makeKPiEEDown(name, config):
+    """
+    Line for the selection of K+ -> pi+ e+ e-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiEEDown = Combine3Particles( DecayDescriptor = "[K+ -> pi+ e+ e-]cc",
+                                DaughtersCuts = {  "e+" : "(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (PIDe > %(electronPIDe)s ) &(MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config,
+                                                    "pi+":"(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config},
+                                 Combination12Cut = "( AM < 500 * MeV  )",
+                                 CombinationCut = "(ADAMASS('K+') < %(KMassWinDown)s *MeV) & (AMAXDOCA('')< %(KMaxDOCADown)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPTDown)s) & (ADMASS('K+') < %(KMassWinDown)s *MeV) & (BPVDIRA > %(KMinDIRADown)s)"\
+                                "& (VFASPF(VCHI2) < %(KVtxChi2Down)s) & (BPVVDCHI2 > %(KMinVDChi2Down)s) & (BPVVDZ > %(KVDPVMinDown)s*mm) & (BPVVDZ < %(KVDPVMaxDown)s*mm)"%config
+                                )
+    
+    _Electrons   = DataOnDemand(Location = "Phys/StdNoPIDsDownElectrons/Particles")
+    _Pions = DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")
+    
+    return Selection (name,
+                      Algorithm = KPiEEDown,
+                      RequiredSelections = [ _Electrons,
+                                             _Pions ])
+# Contact: Kristian Zarebski 
+def makeKPiEMuLFVDown(name, config):
+    """
+    Line for the selection of K+ -> pi+ e+ mu-,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiEMuLFVDown = Combine3Particles( DecayDescriptor = "[K+ -> pi+ e+ mu-]cc",
+                                DaughtersCuts = {   "mu-" : "(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config,
+                                                    "e+" : "(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (PIDe > %(electronPIDe)s ) &(MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config,
+                                                    "pi+":"(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config},
+                                 Combination12Cut = "( AM < 500 * MeV  )",
+                                 CombinationCut = "(ADAMASS('K+') < %(KMassWinDown)s *MeV) & (AMAXDOCA('')< %(KMaxDOCADown)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPTDown)s) & (ADMASS('K+') < %(KMassWinDown)s *MeV) & (BPVDIRA > %(KMinDIRADown)s)"\
+                                "& (VFASPF(VCHI2) < %(KVtxChi2Down)s) & (BPVVDCHI2 > %(KMinVDChi2Down)s) & (BPVVDZ > %(KVDPVMinDown)s*mm) & (BPVVDZ < %(KVDPVMaxDown)s*mm)"%config
+                                )
+    
+    _Electrons   = DataOnDemand(Location = "Phys/StdNoPIDsDownElectrons/Particles")
+    _Muons   = DataOnDemand(Location = "Phys/StdLooseDownMuons/Particles")
+    _Pions = DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")
+    
+    return Selection (name,
+                      Algorithm = KPiEMuLFVDown,
+                      RequiredSelections = [ _Electrons,
+                                             _Muons,
+                                             _Pions ])
+# Contact: Kristian Zarebski 
+def makeKPiEMuLFVSSDown(name, config):
+    """
+    Line for the selection of K+ -> pi- e+ mu+,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiEMuLFVSSDown = Combine3Particles( DecayDescriptor = "[K+ -> pi- e+ mu+]cc",
+                                DaughtersCuts = {   "mu+" : "(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config,
+                                                    "e+" : "(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (PIDe > %(electronPIDe)s ) &(MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config,
+                                                    "pi-":"(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config},
+                                 Combination12Cut = "( AM < 500 * MeV  )",
+                                 CombinationCut = "(ADAMASS('K+') < %(KMassWinDown)s *MeV) & (AMAXDOCA('')< %(KMaxDOCADown)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPTDown)s) & (ADMASS('K+') < %(KMassWinDown)s *MeV) & (BPVDIRA > %(KMinDIRADown)s)"\
+                                "& (VFASPF(VCHI2) < %(KVtxChi2Down)s) & (BPVVDCHI2 > %(KMinVDChi2Down)s) & (BPVVDZ > %(KVDPVMinDown)s*mm) & (BPVVDZ < %(KVDPVMaxDown)s*mm)"%config
+                                )
+    
+    _Electrons   = DataOnDemand(Location = "Phys/StdNoPIDsDownElectrons/Particles")
+    _Muons   = DataOnDemand(Location = "Phys/StdLooseDownMuons/Particles")
+    _Pions = DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")
+    
+    return Selection (name,
+                      Algorithm = KPiEMuLFVSSDown,
+                      RequiredSelections = [ _Electrons,
+                                             _Muons,
+                                             _Pions ])
+def makeKPiMuMuLFVDown(name, config):
+    """
+    Line for the selection of K+ -> pi- mu+ mu+,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiMuMu = Combine3Particles( DecayDescriptor = "[K+ -> pi- mu+ mu+]cc",
+                                DaughtersCuts = { "mu+" : "(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config,
+                                "pi-":"(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config},
+                                 Combination12Cut = "( AM < 500 * MeV  )",
+                                 CombinationCut = "(ADAMASS('K+') < %(KMassWin)s *MeV) & (AMAXDOCA('')< %(KMaxDOCA)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPTDown)s) & (ADMASS('K+') < %(KMassWinDown)s *MeV) & (BPVDIRA > %(KMinDIRADown)s)"\
+                                "& (VFASPF(VCHI2) < %(KVtxChi2Down)s) & (BPVVDCHI2 > %(KMinVDChi2Down)s) & (BPVVDZ > %(KVDPVMinDown)s*mm) & (BPVVDZ < %(KVDPVMaxDown)s*mm)"%config
+                                )
+    
+    _Muons   = DataOnDemand(Location = "Phys/StdLooseDownMuons/Particles")
+    _Pions = DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")
+    
+    return Selection (name,
+                      Algorithm = KPiMuMu,
+                      RequiredSelections = [ _Muons,
+                                             _Pions ])
+
+# Contact: Kristian Zarebski
+def makeKPiEELFVDown(name, config):
+    """
+    Line for the selection of K+ -> pi- e+ e+,  
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiEE = Combine3Particles( DecayDescriptor = "[K+ -> pi- e+ e+]cc",
+                                DaughtersCuts = { "e+" : "(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB<0.3) & (PIDe > %(electronPIDe)s ) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config,
+                                "pi-":"(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config},
+                                 Combination12Cut = "( AM < 500 * MeV  )",
+                                 CombinationCut = "(ADAMASS('K+') < %(KMassWin)s *MeV) & (AMAXDOCA('')< %(KMaxDOCA)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPTDown)s) & (ADMASS('K+') < %(KMassWinDown)s *MeV) & (BPVDIRA > %(KMinDIRADown)s)"\
+                                "& (VFASPF(VCHI2) < %(KVtxChi2Down)s) & (BPVVDCHI2 > %(KMinVDChi2Down)s) & (BPVVDZ > %(KVDPVMinDown)s*mm) & (BPVVDZ < %(KVDPVMaxDown)s*mm)"%config
+                                )
+    
+    _Electrons   = DataOnDemand(Location = "Phys/StdNoPIDsDownElectrons/Particles")
+    _Pions = DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")
+    
+    return Selection (name,
+                      Algorithm = KPiEE,
+                      RequiredSelections = [ _Electrons,
+                                             _Pions ])
+def makeKPiPiPiDown(name, config):
+    """
+    Line for the selection of K+ -> pi+ pi+ pi-
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiPiPi = Combine3Particles( DecayDescriptor = "[K+ -> pi+ pi+ pi-]cc",
+                                 DaughtersCuts = {  "pi+":"(TRCHI2DOF<%(KDauTrChi2)s) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2Down)s)"%config},
+                                 Combination12Cut = "( AM < 500 * MeV  )",
+                                 CombinationCut = "(ADAMASS('K+') < %(KMassWinDown)s *MeV) & (AMAXDOCA('')< %(KMaxDOCADown)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPTDown)s) & (ADMASS('K+') < %(KMassWinDown)s *MeV) & (BPVDIRA > %(KMinDIRADown)s)"\
+                                    "& (VFASPF(VCHI2) < %(KVtxChi2Down)s) & (BPVVDCHI2 > %(KMinVDChi2Down)s) & (BPVVDZ > %(KVDPVMinDown)s*mm) & (BPVVDZ < %(KVDPVMaxDown)s*mm)"%config
+                                )
+    
+    _Pions = DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")
+    
+    return Selection (name,
+                      Algorithm = KPiPiPi,
+                      RequiredSelections = [  _Pions ])
+
+
+def makeKPiPiPiMassMeasDown(name, config):
+    """
+    Line for the selection of K+ -> pi+ pi+ pi-
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    KPiPiPi = Combine3Particles( DecayDescriptor = "[K+ -> pi+ pi+ pi-]cc",
+                                DaughtersCuts = {  "pi+":"(TRCHI2DOF<5) & (TRGHOSTPROB < 0.3) & (MIPCHI2DV(PRIMARY)>%(KDauMinIpChi2MassMeasDown)s)"%config},
+                                 Combination12Cut = "( AM < 1500 * MeV  )",
+                                 CombinationCut = "(ADAMASS('K+') < %(KMassWinMassMeasDown)s *MeV) & (AMAXDOCA('')< %(KMaxDOCAMassMeasDown)s *mm)"%config,
+                                MotherCut ="(PT> %(KMinPTMassMeasDown)s) & (ADMASS('K+') < %(KMassWinMassMeasDown)s *MeV) & (BPVDIRA > %(KMinDIRAMassMeasDown)s)"\
+                                "& (VFASPF(VCHI2) < %(KVtxChi2MassMeasDown)s) & (BPVVDCHI2 > %(KMinVDChi2MassMeasDown)s)  & (BPVVDZ > %(KVDPVMinMassMeasDown)s*mm) & (BPVVDZ < %(KVDPVMaxMassMeasDown)s*mm)"%config
+                                )
+    
+    _Pions = DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")
+    
+    return Selection (name,
+                      Algorithm = KPiPiPi,
+                      RequiredSelections = [  _Pions ])
+
+
+#============================================================
+# Phi-> K K with K-> mu
+# Contact: Vava Gligorov
+def makePhiKMu(name, config):
+    """
+    Line for the selection of phi-> K K with K-> mu 
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    PhiKMu = CombineParticles( DecayDescriptor = "[phi(1020) -> K+ mu-]cc",
+                               DaughtersCuts = {  "K+":"(TRCHI2DOF<5) & (TRGHOSTPROB < 0.3) & (PT>%(PhiDauMinPT)s) & (PROBNNk > %(PhiProbNNk)s)"%config,
+                                                   "mu+":"(TRCHI2DOF<5) & (TRGHOSTPROB < 0.3) & (PT>%(PhiDauMinPT)s)"%config,
+                                                   },
+                               CombinationCut = "(AWM ('K+','mu+') > %(PhiMassMin)s *MeV) & (AWM ('K+','mu+') < %(PhiMassMax)s *MeV) & (AMAXDOCA('')< %(PhiMaxDOCA)s *mm)"%config,
+                               MotherCut ="(PT> %(PhiMinPT)s *  MeV) &  (BPVDIRA > %(PhiMinDIRA)s)"\
+                               "& (VFASPF(VCHI2/VDOF) < %(PhiVtxChi2)s)"%config
+                                )
+    
+    _stdAllLooseMuons   = DataOnDemand(Location = "Phys/StdAllLooseMuons/Particles")
+    _stdAllLooseKaons   = DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")
+    return Selection (name,
+                      Algorithm = PhiKMu,
+                      RequiredSelections = [  _stdAllLooseMuons, _stdAllLooseKaons ])
+
+
+#============================================================
+# Lambda-> p pi control channel for other searches
+def makeLambdaPPi(name, config):
+    """
+    Line for the selection of Lambda-> p pi as control channel
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    LambdaPPi = CombineParticles( DecayDescriptor = "[Lambda0 -> p+ pi-]cc",
+                                  DaughtersCuts = { "pi+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(pionMinIpChi2)s)"%config, 
+                                                     "p+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PROBNNp> %(protonProbNNp)s) & (MIPCHI2DV(PRIMARY)>%(protonMinIpChi2)s)"%config
+                                                    },
+                                  CombinationCut = "(ADAMASS('Lambda0')<%(LambdaMassWinTight)s *MeV) & (AMAXDOCA('')< %(LambdaMaxDOCA)s *mm)"%config,
+                                  MotherCut = "(VFASPF(VCHI2/VDOF)< %(LambdaVtxChi2)s)  & (PT> %(LambdaMinPt)s *MeV)"\
+                                  "& (ADMASS('Lambda0') < %(LambdaMassWinTight)s *MeV )"\
+                                  "& (BPVDIRA > %(LambdaMinDIRA)s) "\
+                                  "& (BPVIPCHI2()< %(LambdaMaxIpChi2)s)"\
+                                  "& (BPVLTIME()> %(LambdaMinTauPs)s * ps)" %config  
+                                  )
+    if _monitor : 
+        LambdaPPi.Preambulo       = [
+            ## define historam type (shortcut)
+            "Histo  = Gaudi.Histo1DDef"  ,
+            ## monitor LL-case
+            "massLam     = monitor ( M / GeV ,             Histo ( 'Lambda' , 1.015, 1.215, 100 ) , 'M_Lambda'    ) " ,
+            ]
+        LambdaPPi.Monitor         = True ,
+        LambdaPPi.HistoProduce    = True ,
+        LambdaPPi.MotherMonitor = """ process ( massLam )
+        >> EMPTY
+        """
+
+
+    _stdAllLoosePions   = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+    _stdLooseProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+    return Selection (name,
+                      Algorithm = LambdaPPi,
+                      RequiredSelections = [  _stdAllLoosePions, _stdLooseProtons ])
+
+#============================================================
+# Lambda-> p pi e e FCNC 
+def makeLambdaPPiEE(name, config, inputs):
+    """
+    Line for the selection of Lambda-> p pi e e  FCNC
+    Before prescaling this line, please contact the authors listed above
+    
+    Arguments:
+    name        : name of the Selection.
+    config      : dictionary of tunable cuts 
+    """
+    
+    LambdaPPi = Combine3Particles( DecayDescriptor = "[Lambda0 -> p+ pi- KS0]cc",
+                                  DaughtersCuts = { "pi+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (MIPCHI2DV(PRIMARY)>%(pionMinIpChi2)s)"%config, 
+                                                     "p+" : "(TRCHI2DOF<3) & (TRGHOSTPROB<0.3) & (PROBNNp> %(protonProbNNp)s) & (MIPCHI2DV(PRIMARY)>%(protonMinIpChi2)s)"%config,
+                                                    "KS0" : "(MIPCHI2DV(PRIMARY)>%(DiElectronMinIpChi2)s)"%config, 
+                                                    },
+                                   Combination12Cut = "( AM < 1500 * MeV  )",
+                                   CombinationCut = "(ADAMASS('Lambda0')<%(LambdaMassWin)s *MeV) & (AMAXDOCA('')< %(LambdaMaxDOCA)s *mm)"%config,
+                                  MotherCut = "(VFASPF(VCHI2/VDOF)< %(LambdaVtxChi2)s)  & (PT> %(LambdaMinPt)s *MeV)"\
+                                  "& (ADMASS('Lambda0') < %(LambdaMassWin)s *MeV )"\
+                                  "& (BPVDIRA > %(LambdaMinDIRA)s) "\
+                                  "& (BPVIPCHI2()< %(LambdaMaxIpChi2)s)"\
+                                  "& (BPVLTIME()> %(LambdaMinTauPs)s * ps)" %config  
+                                  )
+
+    return Selection (name,
+                      Algorithm = LambdaPPi,
+                      RequiredSelections = inputs ) 
+
+
+
+def makevelotracks(name):
+    from Configurables import  FastVeloTracking, TrackPrepareVelo, DecodeVeloRawBuffer, TrackEventFitter, TrackStateInitAlg,  TrackContainerCopy
+    from TrackFitter.ConfiguredFitters import ConfiguredEventFitter
+    
+    MyFastVeloTracking = FastVeloTracking("For%sFastVelo"%name,OutputTracksName="Rec/Track/MyVeloFor%s"%name)
+    MyFastVeloTracking.OnlyForward = True
+    MyFastVeloTracking.ResetUsedFlags = True
+    ### prepare for fitting
+    preve = TrackStateInitAlg("For%sInitSeedFit"%name,TrackLocation = "Rec/Track/MyVeloFor%s"%name)
+    preve.StateInitTool.VeloFitterName = "FastVeloFitLHCbIDs"
+    copyVelo = TrackContainerCopy( "For%sCopyVelo"%name )
+    copyVelo.inputLocations = ["Rec/Track/MyVeloFor%s"%name]
+    copyVelo.outputLocation = "Rec/Track/Velo"+name
+    MyVeloFit = ConfiguredEventFitter(Name="For%sVeloRefitterAlg"%name,
+                                             TracksInContainer="Rec/Track/Velo"+name,
+                                             SimplifiedGeometry = True)
+    maketracks = GaudiSequencer('For%sMakeVeloTracksGS'+name)
+    maketracks.Members += [ MyFastVeloTracking ] 
+    maketracks.Members += [ preve ] 
+    maketracks.Members += [ copyVelo ] 
+    maketracks.Members += [ MyVeloFit ] 
+    
+    return maketracks
+
+    #storeExp = StoreExplorerAlg()
+    #storeExp.Load = 1
+    #storeExp.PrintFreq = 1.0
+    #storeExp.OutputLevel = 3
+
+    ##name=""
+    #preve = TrackPrepareVelo("preve"+name)
+    #preve.inputLocation = "Rec/Track/Velo"+name
+    #preve.outputLocation = "Rec/Track/UnFittedVelo"+name
+    ##preve.bestLocation = ""
+
+    ##TODO: apparently FastVelo is now (april 2012) run with fixes in the production which don't neccessarily apply to the stripping...
+    #alg = GaudiSequencer("VeloMuonTrackingFor"+name,
+                            #Members = [ DecodeVeloRawBuffer(name+"VeloDecoding",DecodeToVeloLiteClusters=True,DecodeToVeloClusters=True),
+                                    #FastVeloTracking(name+"FastVelo",OutputTracksName="Rec/Track/Velo"+name),
+                                    #preve])
+    #return alg
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingS2Hyperons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingS2Hyperons.py
new file mode 100644
index 000000000..6fbfd67b6
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingS2Hyperons.py
@@ -0,0 +1,495 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+'''
+Stripping line for Omega- --> Lambda pi-, Xi0 --> p pi-, Xi0 --> p K- and Xi-/Omega- --> p pi- pi- (Delta S >= 2 forbidden modes, dubbed in the PDG as "S2 modes").
+Adapted from the ChargedHyperons module (Mike Sokoloff, Laurence Carson).
+'''
+__author__ = ['Vitalii Lisovskyi']
+__date__ = '01/09/2021'
+__version__ = '$Revision: 1.0 $'
+__all__ = ('StrippingS2HyperonsConf'
+           ,'default_config')
+
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from StandardParticles import StdLoosePions, StdNoPIDsDownPions, StdLooseKaons, StdLooseDownKaons
+from StandardParticles import  StdAllLoosePions, StdAllLooseKaons
+
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from PhysSelPython.Wrappers import MultiSelectionSequence
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.SystemOfUnits import MeV, mm, picosecond
+
+
+default_name='S2Hyperons'
+    #### This is the dictionary of all tunable cuts ########
+default_config={
+      'NAME'        :   'S2Hyperons',
+      'WGs'         :   ['RD'],
+      'BUILDERTYPE' : 'StrippingS2HyperonsConf',
+      'STREAMS'     : ['Charm'],
+      'CONFIG'      : {
+                     'TRCHI2DOFMax'           : 3.0
+                   #, 'PionPIDK'               :  5.0
+                   , 'ProtonProbNNp'          :  0.3
+                   , 'XiMassWindow'           :  25 * MeV
+                   , 'OmegaMassWindow'        :  30 * MeV
+                   , 'LambdaLLMinDecayTime'   :  2.0 * picosecond
+                   , 'LambdaLLVtxChi2Max'     :   5.0
+                   , 'LambdaDDVtxChi2Max'     :   5.0
+                   , 'LambdaLLMassWin'        : 8 * MeV
+                   , 'LambdaDDMassWin'        : 8 * MeV
+                   , 'LambdaLLMinVZ'          : -100. * mm
+                   , 'LambdaLLMaxVZ'          :  400. * mm
+                   , 'LambdaDDMinVZ'          :  400. * mm
+                   , 'LambdaDDMaxVZ'          : 2275. * mm
+                   , 'TrGhostProbMax'         :  0.25
+                   , 'KaonPIDK'               :  0
+                   , 'ProbNNpMinLL'           :  0.20
+                   , 'ProbNNpMinDD'           :  0.05
+                   , 'Bachelor_PT_MIN'        : 100 * MeV
+                   , 'Proton_PT_MIN'          : 1000 * MeV
+                   , 'Proton_P_MIN'           : 3000 * MeV
+                   , 'Bachelor_BPVIPCHI2_MIN' : 40.
+                   , 'XiDaughter_BPVIPCHI2_MIN' : 50.
+                   , 'LooseDaughter_BPVIPCHI2_MIN' : 20.
+                   , 'LambdaDeltaZ_MIN'       :  5.0 * mm
+                   , 'Hyperon_BPVLTIME_MIN'   :  5.0 * picosecond
+                   , 'PostVertexChi2_MIN'     :  5.0
+                   , 'LambdaPr_PT_MIN'        : 500. * MeV
+                   , 'LambdaPi_PT_MIN'        : 100. * MeV
+      } ## end of 'CONFIG'
+}  ## end of default_config
+#-------------------------------------------------------------------------------------------------------------
+class StrippingS2HyperonsConf(LineBuilder) :
+
+       __configuration_keys__ = default_config['CONFIG'].keys()
+
+       def __init__(self, name, config) :
+           LineBuilder.__init__(self, name, config)
+           self.name = name
+           self.config = config
+
+
+
+           self.LongPionsList = MergedSelection("LongPionsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")])
+
+           self.DownstreamPionsList = MergedSelection("DownstreamPionsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdNoPIDsDownPions/Particles")])
+
+           self.LongProtonsList = MergedSelection("LongProtonsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLooseProtons/Particles")])
+
+           self.DownstreamProtonsList = MergedSelection("DownstreamProtonsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdNoPIDsDownProtons/Particles")])
+
+           self.LongKaonsList = MergedSelection("LongKaonsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdAllLooseKaons/Particles")])
+
+           self.DownstreamKaonsList = MergedSelection("DownstreamKaonsFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdNoPIDsDownKaons/Particles")])
+
+           self.GoodLongPionsList = self.createSubSel( OutputList = "GoodLongPionsFor" + self.name,
+                                               InputList = self.LongPionsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                               " & (TRGHOSTPROB <%(TrGhostProbMax)s )"  % self.config ) #\
+                                              # " & (PIDK < %(PionPIDK)s )" % self.config )
+
+           self.GoodDownstreamPionsList = self.createSubSel( OutputList = "GoodDownstreamPionsFor" + self.name,
+                                               InputList = self.DownstreamPionsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s)"  % self.config ) #\
+                                               #" & (PIDK < %(PionPIDK)s )" % self.config )
+
+           self.GoodLongProtonsList = self.createSubSel( OutputList = "GoodLongProtonsFor" + self.name,
+                                               InputList = self.LongProtonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                               " & (TRGHOSTPROB <%(TrGhostProbMax)s )"  % self.config ) #\
+                                              # " & (PIDK < %(PionPIDK)s )" % self.config )
+
+           self.GoodDownstreamProtonsList = self.createSubSel( OutputList = "GoodDownstreamProtonsFor" + self.name,
+                                               InputList = self.DownstreamProtonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s)"  % self.config ) #\
+                                               #" & (PIDK < %(PionPIDK)s )" % self.config )
+
+           self.GoodLongKaonsList = self.createSubSel( OutputList = "GoodLongKaonsFor" + self.name,
+                                               InputList = self.LongKaonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"\
+                                               " & (TRGHOSTPROB < %(TrGhostProbMax)s )" % self.config ) #\
+                                               #" & (PIDK > %(KaonPIDK)s )" % self.config )
+
+
+           self.GoodDownstreamKaonsList = self.createSubSel( OutputList = "GoodDownstreamKaonsFor" + self.name,
+                                               InputList = self.DownstreamKaonsList,
+                                               Cuts = "(TRCHI2DOF < %(TRCHI2DOFMax)s )"% self.config )#\
+                                              # " & (PIDK > %(KaonPIDK)s )" % self.config )
+
+
+
+
+
+           self.LambdaListLooseDD = MergedSelection("StdLooseDDLambdaFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")])
+
+           self.LambdaListLooseLL = MergedSelection("StdLooseLLLambdaFor" + self.name,
+                                                  RequiredSelections =  [DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")])
+
+           self.LambdaListLL =  self.createSubSel(OutputList = "LambdaLLFor" + self.name,
+                                                InputList = self.LambdaListLooseLL ,
+                                                Cuts = "(MAXTREE('p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                                                "& (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                                                "& (MAXTREE('p+'==ABSID,PROBNNp) > %(ProbNNpMinLL)s ) "\
+                                                "& (MINTREE('pi-'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                                                "& (MINTREE('p+'==ABSID, TRGHOSTPROB) < %(TrGhostProbMax)s )"\
+                                                "& (ADMASS('Lambda0') < %(LambdaLLMassWin)s ) "
+                                                "& (VFASPF(VCHI2/VDOF) < %(LambdaLLVtxChi2Max)s ) "\
+                                                "& (VFASPF(VZ) > %(LambdaLLMinVZ)s ) " \
+                                                "& (VFASPF(VZ) < %(LambdaLLMaxVZ)s ) " \
+                                                "& (BPVLTIME() > %(LambdaLLMinDecayTime)s )" % self.config \
+                                                )
+
+           self.LambdaListDD =  self.createSubSel(OutputList = "LambdaDDFor" + self.name,
+                                                InputList = self.LambdaListLooseDD ,
+                                                Cuts = "(MAXTREE('p+'==ABSID, PT) > %(LambdaPr_PT_MIN)s ) "\
+                                                "& (MAXTREE('pi-'==ABSID, PT) > %(LambdaPi_PT_MIN)s ) " \
+                                                "& (MAXTREE('p+'==ABSID, PROBNNp) > %(ProbNNpMinDD)s ) "\
+                                                "& (ADMASS('Lambda0') < %(LambdaDDMassWin)s ) " \
+                                                "& (VFASPF(VCHI2/VDOF) <  %(LambdaDDVtxChi2Max)s ) "\
+                                                "& (VFASPF(VZ) < %(LambdaDDMaxVZ)s ) " \
+                                                "& (VFASPF(VZ) > %(LambdaDDMinVZ)s )" % self.config \
+                                                )
+
+           self.LambdaList = MergedSelection("LambdaFor" + self.name,
+                                             RequiredSelections = [self.LambdaListLL, self.LambdaListDD]
+                                             )
+
+           self.XizeroList = self.makeXizero()
+           self.XiminusList = self.makeXiminus()
+           self.OmegaminusList = self.makeOmegaminus()
+           self.XizeroS3List = self.makeXizeroS3()
+           self.OmegaS3List = self.makeOmegaS3()
+
+       def createSubSel( self, OutputList, InputList, Cuts ) :
+           '''create a selection using a FilterDesktop'''
+           filter = FilterDesktop(Code = Cuts)
+           return Selection( OutputList,
+                             Algorithm = filter,
+                             RequiredSelections = [ InputList ] )
+       def createCombinationSel( self, OutputList,
+                                 DecayDescriptor,
+                                 DaughterLists,
+                                 DaughterCuts = {} ,
+                                 PreVertexCuts = "AALL",
+                                 PostVertexCuts = "ALL" ) :
+           '''create a selection using a ParticleCombiner with a single decay descriptor'''
+           combiner = CombineParticles( DecayDescriptor = DecayDescriptor,
+                                        DaughtersCuts = DaughterCuts,
+                                        MotherCut = PostVertexCuts,
+                                        CombinationCut = PreVertexCuts,
+                                        ReFitPVs = True)
+           return Selection ( OutputList,
+                              Algorithm = combiner,
+                              RequiredSelections = DaughterLists)
+
+
+
+#------------------------------------------------------------------------------------------
+
+       def makeXizero( self ):
+
+              ''' Make a Xi0 candidate from long tracks '''
+              Xi02PPiLL = self.createCombinationSel(OutputList = "Xi02PPiLL"+ self.name,
+                                                           DecayDescriptor = "[Xi0 -> p+ pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.GoodLongProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 1.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(XiDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s) & "\
+                                                                             " (BPVIPCHI2() > %(XiDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi0') < 2*%(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(PostVertexChi2_MIN)s ) & "\
+                                                                             " (BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s)  & "\
+                                                                             "(ADMASS('Xi0') < %(XiMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+                                                           )
+
+
+              ''' Make a Xi0 candidate  from downstream tracks'''
+              Xi02PPiDD = self.createCombinationSel(OutputList = "Xi02PPiDD"+ self.name,
+                                                           DecayDescriptor = "[Xi0 -> p+ pi-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamPionsList, self.GoodDownstreamProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 2.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(XiDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s ) & "\
+                                                                             " (BPVIPCHI2() > %(XiDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi0') < 2*%(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s ) &"\
+                                                                             "(BPVLTIME() >  %(Hyperon_BPVLTIME_MIN)s ) & "\
+                                                                             "(ADMASS('Xi0') < %(XiMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+
+                                                           )
+## Xi02PPi is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+              Xi02PPi = MergedSelection("Xi02PPi"+self.name,
+                                                 RequiredSelections = [Xi02PPiDD,Xi02PPiLL] )
+
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## this is *also* a Selection, but it is "more selective"
+## than  Xi02PPi in the sense that it passes only events when something
+## is in the output list
+              Xi02PPiSelection = Selection( "Xi02PPiSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Xi02PPi])
+              Xi02PPiLine = StrippingLine (self.name + "Xi02PPi",
+                                                         algos = [Xi02PPiSelection])
+              self.registerLine (Xi02PPiLine)
+
+##  --------------------  end of makeXizero  ------------
+#------------------------------------------------------------------------------------------
+
+       def makeOmegaminus( self ):
+
+              ''' Make an Omega minus candidate '''
+              Omegaminus2LambdaPiLLL = self.createCombinationSel(OutputList = "Omegaminus2LambdaPiLLL"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.LambdaListLL],
+                                                           DaughterCuts    = {"pi-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s) &"\
+                                                                             "(BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+                                                           )
+
+
+              ''' Make an Omega minus candidate '''
+              Omegaminus2LambdaPiDDL = self.createCombinationSel(OutputList = "Omegaminus2LambdaPiDDL"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.LambdaListDD],
+                                                           DaughterCuts    = {"pi-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s) &"\
+                                                                             "(BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+                                                           )
+
+              ''' Make an Omega minus candidate '''
+              Omegaminus2LambdaPiDDD = self.createCombinationSel(OutputList = "Omegaminus2LambdaPiDDD"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> Lambda0 pi-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamPionsList, self.LambdaListDD],
+                                                           DaughterCuts    = {"pi-"      : "(PT> %(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(Bachelor_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < %(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s) &"\
+                                                                             "(BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s) & "\
+                                                                             "(BPVVDZ>0) & "\
+                                                                             "(CHILD(VFASPF(VZ),1)-VFASPF(VZ) > %(LambdaDeltaZ_MIN)s )"% self.config
+                                                           )
+
+
+## Omegaminus2LambdaPi is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+
+
+              Omegaminus2LambdaPi = MergedSelection("Omegaminus2LambdaPi"+self.name,
+                                                 #RequiredSelections = [Omegaminus2LambdaPiLLL,Omegaminus2LambdaPiDDL,Omegaminus2LambdaPiDDD] )
+                                                 RequiredSelections = [Omegaminus2LambdaPiDDL,Omegaminus2LambdaPiDDD,Omegaminus2LambdaPiLLL] )
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## this is *also* a Selection, but it is "more selective"
+## than  Omegaminus2LambdaPi in the sense that it passes only events when something
+## is in the output list
+              Omegaminus2LambdaPiSelection = Selection( "Omegaminus2LambdaPiSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Omegaminus2LambdaPi])
+              Omegaminus2LambdaPiLine = StrippingLine (self.name + "Omegaminus2LambdaPi",
+                                                         algos = [Omegaminus2LambdaPiSelection])
+              self.registerLine (Omegaminus2LambdaPiLine)
+
+##  --------------------  end of makeOmegaminus  ------------
+#------------------------------------------------------------------------------------------
+
+       def makeXiminus( self ):
+
+              ''' Make a Xi minus candidate from long tracks '''
+              Xim2PPiPiLLL = self.createCombinationSel(OutputList = "Xim2PPiPiLLL"+ self.name,
+                                                           DecayDescriptor = "[Xi- -> p+ pi- pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.GoodLongProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 1.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi-') < 2*%(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(PostVertexChi2_MIN)s ) & "\
+                                                                             " (BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s)  & "\
+                                                                             "(ADMASS('Xi-') < %(XiMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+                                                           )
+
+
+              ''' Make a Xi minus candidate  from downstream tracks'''
+              Xim2PPiPiDDD = self.createCombinationSel(OutputList = "Xim2PPiPiDDD"+ self.name,
+                                                           DecayDescriptor = "[Xi- -> p+ pi- pi-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamPionsList, self.GoodDownstreamProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 2.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s ) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi-') < 2*%(XiMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s ) &"\
+                                                                             "(BPVLTIME() >  %(Hyperon_BPVLTIME_MIN)s ) & "\
+                                                                             "(ADMASS('Xi-') < %(XiMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+
+                                                           )
+## Xim2PPiPi is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+              Xim2PPiPi = MergedSelection("Xim2PPiPi"+self.name,
+                                                 RequiredSelections = [Xim2PPiPiDDD,Xim2PPiPiLLL] )
+
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## this is *also* a Selection, but it is "more selective"
+## than  Xim2PPiPi in the sense that it passes only events when something
+## is in the output list
+              Xim2PPiPiSelection = Selection( "Xim2PPiPiSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Xim2PPiPi])
+              Xim2PPiPiLine = StrippingLine (self.name + "Xim2PPiPi",
+                                                         algos = [Xim2PPiPiSelection])
+              self.registerLine (Xim2PPiPiLine)
+
+##  --------------------  end of makeXiminus  ------------
+#------------------------------------------------------------------------------------------
+
+       def makeOmegaS3( self ):
+
+              ''' Make an Omega minus candidate from long tracks '''
+              Om2PPiPiLLL = self.createCombinationSel(OutputList = "Om2PPiPiLLL"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> p+ pi- pi-]cc",
+                                                           DaughterLists   = [self.GoodLongPionsList, self.GoodLongProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 1.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < 2*%(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(PostVertexChi2_MIN)s ) & "\
+                                                                             " (BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s)  & "\
+                                                                             "(ADMASS('Omega-') < %(OmegaMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+                                                           )
+
+
+              ''' Make an Omega minus candidate  from downstream tracks'''
+              Om2PPiPiDDD = self.createCombinationSel(OutputList = "Om2PPiPiDDD"+ self.name,
+                                                           DecayDescriptor = "[Omega- -> p+ pi- pi-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamPionsList, self.GoodDownstreamProtonsList],
+                                                           DaughterCuts    = {"pi-"      : "(PT> 2.5*%(Bachelor_PT_MIN)s ) &"\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s ) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Omega-') < 2*%(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s ) &"\
+                                                                             "(BPVLTIME() >  %(Hyperon_BPVLTIME_MIN)s ) & "\
+                                                                             "(ADMASS('Omega-') < %(OmegaMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+
+                                                           )
+## Om2PPiPi is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+              Om2PPiPi = MergedSelection("Om2PPiPi"+self.name,
+                                                 RequiredSelections = [Om2PPiPiDDD,Om2PPiPiLLL] )
+
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## Ximinus2Lambda2PiSelection is *also* a Selection, but it is "more selective"
+## than  Om2PPiPi in the sense that it passes only events when something
+## is in the output list
+              Om2PPiPiSelection = Selection( "Om2PPiPiSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Om2PPiPi])
+              Om2PPiPiLine = StrippingLine (self.name + "Om2PPiPi",
+                                                         algos = [Om2PPiPiSelection])
+              self.registerLine (Om2PPiPiLine)
+
+##  --------------------  end of makeOmegaS3  ------------
+#------------------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------------------
+
+       def makeXizeroS3( self ):
+
+              ''' Make a Xi0 candidate from long tracks '''
+              Xi02PKLL = self.createCombinationSel(OutputList = "Xi02PKLL"+ self.name,
+                                                           DecayDescriptor = "[Xi0 -> p+ K-]cc",
+                                                           DaughterLists   = [self.GoodLongKaonsList, self.GoodLongProtonsList],
+                                                           DaughterCuts    = {"K-"      : "(PT> %(Bachelor_PT_MIN)s ) & (PIDK > %(KaonPIDK)s ) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi0') < 2*%(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)<%(PostVertexChi2_MIN)s ) & "\
+                                                                             " (BPVLTIME() > %(Hyperon_BPVLTIME_MIN)s)  & "\
+                                                                             "(ADMASS('Xi0') < 1.5*%(OmegaMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+                                                           )
+
+
+              ''' Make a Xi0 candidate  from downstream tracks'''
+              Xi02PKDD = self.createCombinationSel(OutputList = "Xi02PKDD"+ self.name,
+                                                           DecayDescriptor = "[Xi0 -> p+ K-]cc",
+                                                           DaughterLists   = [self.GoodDownstreamKaonsList, self.GoodDownstreamProtonsList],
+                                                           DaughterCuts    = {"K-"      : "(PT> %(Bachelor_PT_MIN)s ) & (PIDK > %(KaonPIDK)s ) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config,
+                                                                             "p+"        : "(PT> %(Proton_PT_MIN)s ) & (P> %(Proton_P_MIN)s ) & (PROBNNp > %(ProtonProbNNp)s ) & "\
+                                                                             " (BPVIPCHI2() > %(LooseDaughter_BPVIPCHI2_MIN)s )"% self.config},
+                                                           PreVertexCuts   = "(ADAMASS('Xi0') < 3*%(OmegaMassWindow)s*MeV)"% self.config,
+                                                           PostVertexCuts  = "(VFASPF(VCHI2/VDOF)< %(PostVertexChi2_MIN)s ) &"\
+                                                                             "(BPVLTIME() >  %(Hyperon_BPVLTIME_MIN)s ) & "\
+                                                                             "(ADMASS('Xi0') < 1.5*%(OmegaMassWindow)s*MeV) & "\
+                                                                             "(BPVVDZ>0) "% self.config
+
+                                                           )
+## Xi02PK is a "Selection" object; MergedSelection passes everything which gets to it
+## even when the output list is empty
+              Xi02PK = MergedSelection("Xi02PK"+self.name,
+                                                 RequiredSelections = [Xi02PKDD,Xi02PKLL] )
+
+## NullFilter is a "FilterDesktop" object which is a type of "Algorithm"
+## This one will pass all candidates
+              NullFilter= FilterDesktop(Code = "ALL")
+
+## this is *also* a Selection, but it is "more selective"
+## than  Xi02PK in the sense that it passes only events when something
+## is in the output list
+              Xi02PKSelection = Selection( "Xi02PKSelection"+self.name,
+                                                    Algorithm = NullFilter,
+                                                    RequiredSelections = [Xi02PK])
+              Xi02PKLine = StrippingLine (self.name + "Xi02PK",
+                                                         algos = [Xi02PKSelection])
+              self.registerLine (Xi02PKLine)
+
+##  --------------------  end of makeXizeroS3  ------------
+#------------------------------------------------------------------------------------------
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingSb2PKMuXPi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingSb2PKMuXPi.py
new file mode 100644
index 000000000..1457d9832
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingSb2PKMuXPi.py
@@ -0,0 +1,451 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+
+__author__ = "Dan Thompson; based on combination of Bu2LLK lines and Bs2st2KKMuXLine"
+__date__ = "14/06/2021"
+__version__ = "$Revision: 1$"
+
+__all__= ('Sb2PKMuXPiConf','default_config')
+
+"""
+Stripping Line for studies involving missing mass with beauty baryons.
+Pion from primary vertex allows reconstruction of Lb momentum.
+
+Selections for:
+    Sb2PKMuXPiLine:    Sigmab+- --> (Lb --> (Lambda(*) --> p+ K-) mu X) pi+- [4 Permutations (Sb+-, mu+-) + CC]
+    Sb2PKMuXPiSSLine:    Sigmab+- --> (Lb --> (Lambda(*) --> p+ K+) mu X) pi+- [4 Permutations + CC]
+    Sb2PKJpsiPiLine:  Sigmab+- --> (Lb --> (Lambda(*) --> p+ K-) (J/psi --> mu+ mu-))) pi+- [CC + SS Hadrons]
+
+Updated for S34r0p2 Restripping: Altered RelInfoTools so they are functional (not required however as line is DST )
+"""
+
+daughter_locations = {
+   #OS Hadrons
+   "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l-) pi+]CC": "{0}_p", #Sb+, mu-
+   "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l+) pi+]CC": "{0}_p", #Sb+, mu+
+   "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l-) pi-]CC": "{0}_p", #Sb-, mu-
+   "[Beauty -> (Beauty -> (X0 -> ^X+ Xs) l+) pi-]CC": "{0}_p", #Sb-, mu+
+
+   "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l-) pi+]CC": "{0}_K",
+   "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l+) pi+]CC": "{0}_K",
+   "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l-) pi-]CC": "{0}_K",
+   "[Beauty -> (Beauty -> (X0 -> X+ ^Xs) l+) pi-]CC": "{0}_K",
+
+   "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l-) pi+]CC": "{0}_mu",
+   "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l+) pi+]CC": "{0}_mu",
+   "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l-) pi-]CC": "{0}_mu",
+   "[Beauty -> (Beauty -> (X0 -> X+ Xs) ^l+) pi-]CC": "{0}_mu",
+
+   "[Beauty -> (Beauty -> (X0 -> X+ Xs) l-) ^pi+]CC": "{0}_Pi",
+   "[Beauty -> (Beauty -> (X0 -> X+ Xs) l+) ^pi+]CC": "{0}_Pi",
+   "[Beauty -> (Beauty -> (X0 -> X+ Xs) l-) ^pi-]CC": "{0}_Pi",
+   "[Beauty -> (Beauty -> (X0 -> X+ Xs) l+) ^pi-]CC": "{0}_Pi",
+
+   "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l-) pi+]CC": "{0}_LStar",
+   "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l+) pi+]CC": "{0}_LStar",
+   "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l-) pi-]CC": "{0}_LStar",
+   "[Beauty -> (Beauty -> ^(X0 -> X+ Xs) l+) pi-]CC": "{0}_LStar",
+
+   #SS Hadrons
+   "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l-) pi+]CC": "{0}_p",
+   "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l+) pi+]CC": "{0}_p",
+   "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l-) pi-]CC": "{0}_p",
+   "[Beauty -> (Beauty -> (X0 -> ^X- Xs) l+) pi-]CC": "{0}_p",
+
+   "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l-) pi+]CC": "{0}_K",
+   "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l+) pi+]CC": "{0}_K",
+   "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l-) pi-]CC": "{0}_K",
+   "[Beauty -> (Beauty -> (X0 -> X- ^Xs) l+) pi-]CC": "{0}_K",
+
+   "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l-) pi+]CC": "{0}_mu",
+   "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l+) pi+]CC": "{0}_mu",
+   "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l-) pi-]CC": "{0}_mu",
+   "[Beauty -> (Beauty -> (X0 -> X- Xs) ^l+) pi-]CC": "{0}_mu",
+
+   "[Beauty -> (Beauty -> (X0 -> X- Xs) l-) ^pi+]CC": "{0}_Pi",
+   "[Beauty -> (Beauty -> (X0 -> X- Xs) l+) ^pi+]CC": "{0}_Pi",
+   "[Beauty -> (Beauty -> (X0 -> X- Xs) l-) ^pi-]CC": "{0}_Pi",
+   "[Beauty -> (Beauty -> (X0 -> X- Xs) l+) ^pi-]CC": "{0}_Pi",
+
+   "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l-) pi+]CC": "{0}_LStar",
+   "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l+) pi+]CC": "{0}_LStar",
+   "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l-) pi-]CC": "{0}_LStar",
+   "[Beauty -> (Beauty -> ^(X0 -> X- Xs) l+) pi-]CC": "{0}_LStar"
+}
+
+default_config = {
+    'NAME' : "Sb2PKMuXPi",
+    'BUILDERTYPE' : "Sb2PKMuXPiConf",
+    'WGs' : ['RD'],
+    'STREAMS' : ['Semileptonic'],
+    'CONFIG' : {
+        #prescales
+        "Sb2PKMuXPiLinePrescale" : 1,
+        "Sb2PKJpsiPiLinePrescale" : 1,
+        'Sb2PKMuXPiSSLinePrescale' : 1,
+
+        #track
+        'Trk_GhostProb' : 0.2,
+
+        #PIDNN for pK
+        'ProbNNCut'     : 0.25,
+
+        #Pion from Sb
+        'PiPT'          : 500., #MeV
+        'PiPTLoose'     : 250., #MeV
+        'PiMinIPChi2'   : 9.,
+        'PiPIDK'        : 16.,
+        'PiPIDp'        : 16., 
+        'PiPIDmu'       : 0., 
+
+        #muon
+        'MuP'           : 3000. ,# MeV
+        'MuPT'          : 1000. , #MeV
+        'MuMinIPChi2'   : 9.,
+        'MuPIDmu'       : 0.,
+
+        #kaon
+        'KaonIPCHI2'    : 9. , 
+        'KaonPT'        : 400. , #MeV
+        'KaonPTLoose'   : 250. , #MeV
+
+        #proton
+        'ProtonP' : 2000. , #MeV
+
+        #pK
+        'DiHadronVtxCHI2'      : 20,         
+        'DiHadronADOCACHI2'    : 30, #mm
+
+        #Lb limit for Lambda(1520)
+        'UpperLbMass' : 5620. , #MeV
+
+        # J/psi from Lb -> Lambda(*) J/psi
+        'JpsiMassWindow': 80. ,# MeV
+
+        # Lb --> p K mu X Vertex
+        'pKMuVChi2Dof'  : 4.    ,
+        'pKMuFdChi2'    : 100.    , 
+        'pKMuMassMin'   : 2300. ,# MeV 
+        'pKMuMassMax'   : 6000. ,# MeV
+
+        # Lb --> p K jpsi Vertex
+        'pKJpsiVChi2Dof'  : 3.    ,
+        'pKJpsiFdChi2'    : 25.    , 
+        'pKJpsiMassMin'   : 5400. ,# MeV 
+        'pKJpsiMassMax'   : 5850. ,# MeV
+
+        # Sb --> Lb pi Vertex
+        'SbPT'  : 50.0    , #MeV
+        'DMpKMuPi'    : 359.57    , #difference between inv mass and inv mass of daughter 1 for Sb -> Lb pi
+        # 139.57 + 220 or 600
+        'DMpKJpsiPi'    : 739.57    , #same but for jpsi
+        'DZBPV' : 1.0, #mm #best primary vertex displacment
+
+        #track isolation tools
+        'RelatedInfoTools' : [{'Type' : 'RelInfoBs2MuMuTrackIsolations',
+                               'IgnoreUnmatchedDescriptors': True,
+                               'Variables' : [
+                                   'BSMUMUTRACKPLUSISO',
+                                   'BSMUMUTRACKPLUSISOTWO',
+                                   'ISOTWOBODYMASSISOPLUS',
+                                   'ISOTWOBODYCHI2ISOPLUS',
+                                   'ISOTWOBODYISO5PLUS',
+                                   'BSMUMUTRACKID'
+                                   ],
+                               #'Location' : 'TrackIsoBs2MMInfo',
+                               'DaughterLocations' : {key: val.format('TrackIsoBs2MMInfo') for key, val in daughter_locations.items()},
+                              
+                               'tracktype'  : 3,
+                               'angle'      : 0.27,
+                               'fc'         : 0.60,
+                               'doca_iso'   : 0.13,
+                               'ips'        : 3.0,
+                               'svdis'      : -0.15,
+                               'svdis_h'    : 30.,
+                               'pvdis'      : 0.5,
+                               'pvdis_h'    : 40.,
+                               'makeTrackCuts' : False,
+                               'IsoTwoBody' : True
+                              },
+                              {'Type'              : 'RelInfoTrackIsolationBDT',
+                               'IgnoreUnmatchedDescriptors': True,
+                               # Use the BDT with 9 input variables
+                               # This requires that the "Variables" value is set to 2
+                               'Variables' : 2,
+                               'WeightsFile'  :  'BsMuMu_TrackIsolationBDT9vars_v1r4.xml',
+                               #'Location' : 'TrackIsoBDTInfo',
+                               'DaughterLocations' : {key: val.format('TrackIsoBDTInfo') for key, val in daughter_locations.items()}
+                               }
+                              ]
+        }
+
+}
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, MergedSelection, AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+class Sb2PKMuXPiConf(LineBuilder):
+    '''
+    Builder for missing mass measurments with baryons
+    '''
+
+    # __configuration_keys__ = (
+    #     'Sb2PKMuXPiLinePrescale',
+    #     'Sb2PKJpsiPiLinePrescale',
+    #     'Sb2PKMuXPiSSLinePrescale',
+    #     'Trk_GhostProb',
+    #     'ProbNNCut',
+    #     'KaonIPCHI2',
+    #     'KaonPT',
+    #     'KaonPTLoose',
+    #     'ProtonP',
+    #     'DiHadronVtxCHI2',    
+    #     'DiHadronADOCACHI2',
+    #     'UpperLbMass',
+    #     'PiPT',
+    #     'PiPTLoose',
+    #     'PiMinIPChi2',
+    #     'PiPIDK',
+    #     'PiPIDp',
+    #     'PiPIDmu',
+    #     'MuP',
+    #     'MuPT',
+    #     'MuMinIPChi2',
+    #     'MuPIDmu',
+    #     'JpsiMassWindow',
+    #     'pKMuVChi2Dof',
+    #     'pKMuFdChi2',
+    #     'pKMuMassMin',
+    #     'pKMuMassMax',
+    #     'pKJpsiVChi2Dof',
+    #     'pKJpsiFdChi2',
+    #     'pKJpsiMassMin',
+    #     'pKJpsiMassMax',
+    #     'SbPT',
+    #     'DMpKMuPi','DMpKJpsiPi',
+    #     'DZBPV',
+    #     'RelatedInfoTools'
+    #     )
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        LineBuilder.__init__(self, name, config)
+
+        self._name=name
+
+        from StandardParticles import StdLooseMuons as Muons 
+        from StandardParticles import StdAllLooseKaons as AllKaons
+        from StandardParticles import StdAllLooseProtons as AllProtons
+        from StandardParticles import StdAllLoosePions as AllPions
+        from StandardParticles import StdMassConstrainedJpsi2MuMu as Jpsi
+
+        self.SelpKs = self._makepK( name   = "pKsFor" + self._name,
+                                        protons = AllProtons,
+                                        kaons  = AllKaons,
+                                        params = config )
+
+        self.SelpKsSS = self._makepKSS( name   = "pKsSSFor" + self._name,
+                                        protons = AllProtons,
+                                        kaons  = AllKaons,
+                                        params = config )
+
+
+        self.PionCuts = "(TRCHI2DOF < 3) & (TRGHOSTPROB < 0.5) & (PT > %(PiPT)s *MeV) &"\
+                         "(MIPCHI2DV(PRIMARY) < %(PiMinIPChi2)s) & "\
+                         "(PIDpi-PIDK > %(PiPIDK)s) & (PIDpi-PIDp > %(PiPIDp)s) & (PIDpi-PIDmu > %(PiPIDmu)s)" %config
+
+
+        self.MuonCuts  = "(TRCHI2DOF < 3) & (TRGHOSTPROB < 0.5) & "\
+                         "(P > %(MuP)s *MeV) & (PT > %(MuPT)s *MeV) & "\
+                         "(MIPCHI2DV(PRIMARY) > %(MuMinIPChi2)s) & "\
+                         "(PIDmu-PIDK > 0) & (PIDmu-PIDp > 0) & (PIDmu-PIDpi > %(MuPIDmu)s)" %config
+
+        self.JpsiCuts  = "(PFUNA(ADAMASS('J/psi(1S)')) < %(JpsiMassWindow)s * MeV)" %config
+
+        self.SelPion = Selection("Pion_for"+name,
+                                Algorithm = FilterDesktop(Code=self.PionCuts),
+                                RequiredSelections = [AllPions])
+
+        self.SelMuon  = Selection("Mu_for" + name,
+                                  Algorithm = FilterDesktop(Code=self.MuonCuts),
+                                  RequiredSelections = [Muons])
+
+        self.SelJpsi  = Selection("Jpsi_for" + name,
+                                  Algorithm = FilterDesktop(Code=self.JpsiCuts),
+                                  RequiredSelections = [Jpsi])
+
+        # Lb -> Lambda(1520) mu
+        self.Lb2pKMu = CombineParticles(DecayDescriptors=["[Lambda_b0 -> Lambda(1520)0 mu+]cc","[Lambda_b0 -> Lambda(1520)0 mu-]cc"])
+        self.Lb2pKMu.CombinationCut = "(AM > %(pKMuMassMin)s*MeV) & (AM < %(pKMuMassMax)s*MeV)" % config
+        self.Lb2pKMu.MotherCut = "(VFASPF(VCHI2/VDOF) < %(pKMuVChi2Dof)s) & (BPVDIRA > 0.99) & "\
+                                     "(BPVVDCHI2 > %(pKMuFdChi2)s)" % config
+        self.Lb2pKMu.ReFitPVs = True
+
+        self.pKMerged=MergedSelection("pKSSCombfor" + name, RequiredSelections = [self.SelpKs, self.SelpKsSS])
+        #merged pK/pKSS for jpsi line
+
+
+        self.SelLb2pKMu = Selection("Lb2pKMu_for" + name,
+                                   Algorithm          = self.Lb2pKMu,
+                                   RequiredSelections = [self.SelpKs, self.SelMuon])
+
+        self.SelLb2pKMuSS = Selection("Lb2pKMuSS_for" + name,
+                                   Algorithm          = self.Lb2pKMu,
+                                   RequiredSelections = [self.SelpKsSS, self.SelMuon])
+        
+
+        # Lb -> Lambda(1520) J/psi
+        self.Lb2pKJpsi = CombineParticles(DecayDescriptors = ["[Lambda_b0 -> J/psi(1S) Lambda(1520)0]cc"])
+        self.Lb2pKJpsi.CombinationCut = "(AM > %(pKJpsiMassMin)s*MeV) & (AM < %(pKJpsiMassMax)s*MeV)" % config
+        self.Lb2pKJpsi.MotherCut      = "(VFASPF(VCHI2/VDOF) < %(pKJpsiVChi2Dof)s) & (BPVDIRA > 0.99) & "\
+                                       "(BPVVDCHI2 > %(pKJpsiFdChi2)s)" % config
+        self.Lb2pKJpsi.ReFitPVs       = True
+
+        self.SelLb2pKJpsi = Selection("Lb2pKJpsi_for" + name,
+                                     Algorithm          = self.Lb2pKJpsi,
+                                     RequiredSelections = [self.pKMerged, self.SelJpsi])
+
+        self.Sb2pKMuXPi = CombineParticles( DecayDescriptors = ["[Sigma_b+ -> Lambda_b0 pi+]cc","[Sigma_b- -> Lambda_b0 pi-]cc"])
+        self.Sb2pKMuXPi.CombinationCut = "(AM-AM1 < %(DMpKMuPi)s*MeV) & "\
+                                      "(abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),2))<%(DZBPV)s*mm)" % config
+        self.Sb2pKMuXPi.MotherCut      = "(PT > %(SbPT)s*MeV)" % config
+        self.Sb2pKMuXPi.ReFitPVs       = False
+
+        self.SelSb2pKMuXPi = Selection("Sb2pKMuXPi_for" + name,
+                                    Algorithm          = self.Sb2pKMuXPi,
+                                    RequiredSelections = [self.SelLb2pKMu, self.SelPion])
+
+        self.SelSb2pKMuXPiSS = Selection("Sb2pKMuXPiSS_for" + name,
+                                    Algorithm          = self.Sb2pKMuXPi,
+                                    RequiredSelections = [self.SelLb2pKMuSS, self.SelPion])
+
+        self.Sb2pKJpsiPi = CombineParticles( DecayDescriptors = ["[Sigma_b+ -> Lambda_b0 pi+]cc","[Sigma_b- -> Lambda_b0 pi-]cc"])
+        self.Sb2pKJpsiPi.CombinationCut = "(AM-AM1 < %(DMpKJpsiPi)s*MeV) & "\
+                                      "(abs(ACHILD(BPV(VZ),1)-ACHILD(BPV(VZ),2))<%(DZBPV)s*mm)" % config
+        self.Sb2pKJpsiPi.MotherCut      = "(PT > %(SbPT)s*MeV)" % config
+        self.Sb2pKJpsiPi.ReFitPVs       = False
+
+        self.SelSb2pKJpsiPi = Selection("Sb2pKJpsiPi_for" + name,
+                                    Algorithm          = self.Sb2pKJpsiPi,
+                                    RequiredSelections = [self.SelLb2pKJpsi, self.SelPion])
+
+        self.SPDFilter = {
+            'Code'      : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 450 )" ,
+            'Preambulo' : [ "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb", "from LoKiTracks.decorators import *" ]
+            }
+
+        self.Sb2PKMuXPiLine = StrippingLine("Sb2PKMuXPiLine",
+                                       prescale          = config['Sb2PKMuXPiLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = self.SelSb2pKMuXPi,
+                                       RelatedInfoTools  = config['RelatedInfoTools'],
+                                       FILTER            = self.SPDFilter,
+                                       RequiredRawEvents = [], 
+                                       MDSTFlag          = False
+                                       #, MaxCandidates = 400,
+                                       )
+
+        self.Sb2PKMuXPiSSLine = StrippingLine("Sb2PKMuXPiSSLine",
+                                       prescale          = config['Sb2PKMuXPiSSLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = self.SelSb2pKMuXPiSS,
+                                       RelatedInfoTools  = config['RelatedInfoTools'],
+                                       FILTER            = self.SPDFilter,
+                                       RequiredRawEvents = [], 
+                                       MDSTFlag          = False
+                                       #, MaxCandidates = 400,
+                                       )
+
+        self.Sb2PKJpsiPiLine = StrippingLine("Sb2PKJpsiPiLine",
+                                       prescale          = config['Sb2PKJpsiPiLinePrescale'],
+                                       postscale         = 1,
+                                       selection         = self.SelSb2pKJpsiPi,
+                                       FILTER            = self.SPDFilter, 
+                                       RequiredRawEvents = [],
+                                       MDSTFlag          = False
+                                       #, MaxCandidates = 400
+                                       )
+
+
+        self.registerLine(self.Sb2PKMuXPiLine)
+        self.registerLine(self.Sb2PKMuXPiSSLine)
+        self.registerLine(self.Sb2PKJpsiPiLine)
+
+
+
+
+    def _makepK( self, name, protons, kaons, params):
+        """
+        Make a Lambda* -> p K- in entire range. 
+        """
+
+        _Decays = "[Lambda(1520)0 -> p+ K-]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(UpperLbMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_p = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNp > %(ProbNNCut)s)" % params
+        _DaughterCut_K = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNk > %(ProbNNCut)s)" % params
+
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _DaughterCut_p,
+            "K-" : _DaughterCut_K
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protons, kaons ] ) 
+
+
+    #same variables as correct sign comb
+    #####################################################
+    def _makepKSS( self, name, protons, kaons, params):
+        """
+        Make a same-sign Lambda* -> p K+ in entire range. 
+        """
+
+        _Decays = "[Lambda(1520)0 -> p+ K+]cc"
+
+        _CombinationCut = "(APT > %(KaonPT)s *MeV) & " \
+                          "(AM < %(UpperLbMass)s *MeV) & " \
+                          "(ADOCACHI2CUT( %(DiHadronADOCACHI2)s  , ''))" % params
+
+        _MotherCut = "(VFASPF(VCHI2) < %(DiHadronVtxCHI2)s)" % params
+
+        _DaughterCut_p = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNp > %(ProbNNCut)s)" % params
+        _DaughterCut_K = "(PT > %(KaonPTLoose)s *MeV) & (P > %(ProtonP)s *MeV) & " \
+                   "(ISBASIC & (MIPCHI2DV(PRIMARY) > %(KaonIPCHI2)s) & (TRGHOSTPROB < %(Trk_GhostProb)s)) & (PROBNNk > %(ProbNNCut)s)" % params
+
+        _Combine = CombineParticles( DecayDescriptor = _Decays,
+                                     CombinationCut  = _CombinationCut,
+                                     MotherCut       = _MotherCut)
+
+        _Combine.DaughtersCuts = {
+            "p+"  : _DaughterCut_p,
+            "K+" : _DaughterCut_K
+            }
+
+        return Selection(name, Algorithm = _Combine, RequiredSelections = [ protons, kaons ] )  
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingStrangeHadrons.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingStrangeHadrons.py
new file mode 100644
index 000000000..f9dc71cbc
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingStrangeHadrons.py
@@ -0,0 +1,358 @@
+#!/usr/bin/env python # ============================================================================= 
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# @file   StrippintrangeHadrons.py 
+# @author Alexandre Brea (alexandre.brea.rodriguez@cern.ch) 
+# @date   29.11.2018 # =============================================================================
+
+
+# Some extra Strange Hadron decays 
+#
+#Xi-2Sigma0munu
+#Xi-2ppipi-
+#Xi02p+pi-
+#Omega-2Lambda0pi-
+
+
+'''
+Module for construction of stripping selections for some rare strange decays
+Exported symbols (use python help!):
+'''
+
+__author__ = ['Alexandre Brea']
+__date__ = '29/11/2018'
+__version__ = '1.0'
+
+__all__ = ('default_config',
+           'StrangeHadronsConf',
+           )
+
+import os
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays as Combine3Particles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays as Combine4Particles
+from CommonParticles import StdNoPIDsDownElectrons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.PhysicalConstants import c_light
+from GaudiKernel.SystemOfUnits import MeV
+
+from StandardParticles import StdAllNoPIDsPions, StdLoosePions, StdLooseProtons, StdAllLoosePions, StdAllLooseMuons
+from StandardParticles import StdLooseAllPhotons
+##
+from PhysConf.Selections import CombineSelection
+                                
+default_config = {
+  'NAME': 'StrangeHadrons',
+  'WGs' : ['RD'],
+  'BUILDERTYPE' : 'StrangeHadronsConf',
+  'STREAMS' : [ 'Leptonic' ],
+  'CONFIG' : {
+        'Postscale'           :1,
+ 
+        'Xi-2Sigma0munuPrescale' : 1,
+        'Xi-2ppipiPrescale' :1,
+        'Xi02ppiPrescale' :1,
+        'Omega-2Lambda0piPrescale' :1,
+        
+        #General
+        'trchi2dof' : 3,
+        'trghostprob' : 0.2,
+
+        #Muons
+        'muonProbNNmu' : 0.3,
+        'muonMinIpChi2' : 60.,
+        'muonMinIp' : 1,
+        
+        #Protons
+        'protonProbNNp' : 0.3,
+        'protonMinIpChi2' : 16.,
+
+        #Pions
+        'pionProbNNpi' : 0.4,
+        'pionMinIpChi2' : 60.,
+        'pi0MinPt' : 500 * MeV,
+
+        #Electrons
+        'electronProbNNe' : 0.3,
+        'electronMinIpChi2' : 60.,
+        'electronMinIp' : 1,
+        
+
+        #GAMMAS
+        
+
+        #Lambda
+        'LambdaMassMax': (1116+400.) *MeV,
+        'LambdaMinTauPs' : 9.,
+        'LambdaMinPt' : 500.,
+        'LambdaMaxDOCA' : 1.,  #That's a lot!
+        'LambdaMassWin' : 500.,
+        'LambdaMassWinTight' : 30.,
+        'LambdaMinDIRA' : 0.9,
+        'LambdaMaxIpChi2' : 36.,
+        'LambdaMinIpChi2' : 16.,
+        'LambdaVtxChi2' : 9.,
+        'LambdaSecMinVDChi2' : 100,
+        'LambdaPrimMinVDChi2' : 50,
+        'LambdaMinPt' : 500,
+        'LambdaIPMin' : 0.2,
+
+        #Sigma     #
+        'SigmaMinTauPs' : 6.,
+        'SigmaMinPt' : 500.,
+        'SigmaMaxDOCA' : 2.,
+        'SigmaMassWin' : 150.,
+        'SigmaMinDIRA' : 0.9,
+        'SigmaMaxIpChi2' : 36.,
+        'SigmaVtxChi2' : 36.,
+        'SigmaIPMin' : 0.05,
+        #Xi
+        'XiMassMax': (1320.+300.) *MeV,  #1315-1320
+        'XiMassMin' : 0.,
+        'XiMassWin': 300.,
+        'XiMassWinTight': 50., #from Heavy B&Q 
+        'XiMinTauPs' :6.,  #lifetime Xi+:1.6e-10, Xi0:2.9e-10
+        'XiVtxChi2' : 25.,
+        'XiMinPt' : 500 * MeV,
+        'XiMinVDChi2' : 30,
+        'XiIPMin' : 0.05,
+        'XiIpChi2' : 36.,
+        'XiMaxDOCA' : 1,
+
+
+
+        #Omega
+        'OmegaMassMax' : (1672.+300) * MeV,
+        'OmegaMassMin' : 0 * MeV,
+        'OmegaMassWin' : 300 * MeV,
+        'OmegaMinTauPs' : 4.,
+        'OmegaVtxChi2' : 25.,
+        'OmegaMinPt' : 500 * MeV,
+        #Combination
+        'DiDOCA' : 2, #0.5
+        'TriDOCA': 3,
+        }
+  }
+  
+#============================================================
+# Line builder 
+class StrangeHadronsConf(LineBuilder) :
+    """
+    Builder 
+ 
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys() 
+    
+    #### This is the dictionary of all tunable cuts ########
+    
+    
+    def __init__(self, name, config):         
+        self.name = name    
+        LineBuilder.__init__(self, name, config)
+
+        Xi2Sigma0munu_name=name+'Xi-2Sigma0munu'
+        Xi2ppipi_name=name+'Xi-2ppipi'
+        Xi02ppi_name=name+'Xi02ppi'
+        Omega2Lambda0pi_name=name+'Omega-2Lambda0pi'
+        
+
+        Muons = DataOnDemand(Location='Phys/StdAllLooseMuons/Particles')
+        Protons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")         
+        Pions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+        Gammas = DataOnDemand(Location = "Phys/StdLooseAllPhotons/Particles")       # StdLooseAllPhotons is used in Bs->Phi Gamma
+        Electrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+       
+        track_cuts = ''' (TRCHI2DOF< %(trchi2dof)s) & (TRGHOSTPROB<%(trghostprob)s)'''
+        pion_cuts = '''(PROBNNpi> %(pionProbNNpi)s) & (MIPCHI2DV(PRIMARY)>%(pionMinIpChi2)s)  &  (~ISMUON) & (PROBNNmu<0.7)  & (PROBNNk<0.7) '''
+        proton_cuts = ''' (PROBNNp> %(protonProbNNp)s) & (MIPCHI2DV(PRIMARY)>%(protonMinIpChi2)s) &  (PROBNNmu<0.7) & (PROBNNk<0.7) '''
+        muon_cuts = ''' (PROBNNmu> %(muonProbNNmu)s) & (MIPCHI2DV(PRIMARY)> %(muonMinIpChi2)s) & (MIPDV(PRIMARY) > %(muonMinIp)s) &  (ISMUON)  & (PROBNNpi<0.7) & (PROBNNk<0.7)'''
+        electron_cuts = ''' (PROBNNe> %(electronProbNNe)s) & (MIPCHI2DV(PRIMARY)> %(electronMinIpChi2)s) & (PROBNNmu<0.7) & (PROBNNk<0.7) & (PROBNNpi<0.7)'''   # (HASRICH) 
+        
+
+        
+        
+##################### build L02PPi ###############################
+        L02PPi = CombineSelection(
+            'L02PPi_sel_for_StrangeHadrons',
+            [Protons, Pions],
+            DecayDescriptor="[Lambda0 -> p+ pi-]cc",
+            DaughtersCuts={ "pi-" : (track_cuts + "&" + pion_cuts ) %config,
+                            "p+" : (track_cuts + "&" + proton_cuts ) %config},
+            CombinationCut= "(ADAMASS('Lambda0')<%(LambdaMassWinTight)s *MeV) & (AMAXDOCA('')< %(LambdaMaxDOCA)s *mm)"%config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(LambdaVtxChi2)s)  & (PT> %(LambdaMinPt)s *MeV) & (ADMASS('Lambda0') < %(LambdaMassWinTight)s *MeV )  & (BPVIPCHI2()> %(LambdaMinIpChi2)s) & (BPVLTIME()> %(LambdaMinTauPs)s * ps) &(BPVVDCHI2 > %(LambdaSecMinVDChi2)s) & (MIPDV(PRIMARY)>%(LambdaIPMin)s*mm)" %config
+            )
+        
+
+
+###################build Sigma02LambdaGamma#######################
+        S02L0Gamma = CombineSelection(
+            'Sigma2LambdaGamma_sel',
+            [L02PPi, Gammas], #?
+            DecayDescriptor='[Sigma0 -> Lambda0 gamma]cc', #?
+            DaughtersCuts={ "gamma" : 'ALL',
+                            "Lambda0" : 'ALL'}, #
+            CombinationCut= "(ADAMASS('Sigma0')<%(SigmaMassWin)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCA)s *mm)"%config,
+            MotherCut="(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2)s)  & (PT> %(SigmaMinPt)s *MeV) & (ADMASS('Sigma+') < %(SigmaMassWin)s *MeV ) & (MIPDV(PRIMARY)>%(SigmaIPMin)s*mm) & (BPVLTIME()> %(SigmaMinTauPs)s * ps)"%config
+                                    )  #
+
+                
+
+
+#################### build Xi-2Sigma0munu ##############################  
+        
+        Xi2Sigma0munu = CombineSelection(
+            'Xi-2Sigma0munu_sel',
+            [S02L0Gamma,Muons],
+            DecayDescriptor='[Xi- -> Sigma0 mu- ]cc', #nu_mu~
+            DaughtersCuts={"Sigma0": 'ALL',#(track_cuts + "&" + pion_cuts) %config,
+                           "mu-": (track_cuts + "&" + muon_cuts) %config,
+                },
+            
+            CombinationCut= "(AM< %(XiMassMax)s) & (AMAXDOCA('')< %(XiMaxDOCA)s *mm)"%config,
+            MotherCut="(M< %(XiMassMax)s) & (BPVLTIME()> %(XiMinTauPs)s * ps) &  (VFASPF(VCHI2/VDOF)< %(XiVtxChi2)s)  & (BPVVDCHI2 > %(XiMinVDChi2)s) & (MIPDV(PRIMARY)>%(XiIPMin)s*mm) "%config
+
+            #CombinationCut= "(ADAMASS('Xi-') < %(XiMassWin)s*MeV) & (AMAXDOCA('')< %(XiMaxDOCA)s *mm)"%config,
+            #MotherCut="(ADMASS('Xi-') < %(XiMassWin)s*MeV) & (VFASPF(VCHI2/VDOF)<%(XiVtxChi2)s) & (BPVLTIME()> %(XiMinTauPs)s * ps) & (PT>%(XiMinPt)s) &  (BPVVDCHI2 > %(XiMinVDChi2)s) "%config
+            #Xi2LambdaPiControl = Selection('Xi2LambdaPiControl_sel', Algorithm = FilterDesktop('Xi2LambdaPiControlFD', Code='( (MIPCHI2DV(PRIMARY)<%(XiIpChi2)s))'%config) ,RequiredSelections=[Xi2LambdaPi])
+             )
+                                
+#################### build Xi-2PPiPi ##############################
+        Xi2ppipi = CombineSelection(
+            'Xi-2ppipi_sel',
+            [Protons, Pions],
+            DecayDescriptor='[Xi- -> p~-  pi+ pi-]cc',
+            DaughtersCuts={ "p~-" : (track_cuts + "&" + proton_cuts + " & (TRGHOSTPROB<0.1)" ) %config,  # Should I introduce " & (TRGHOSTPROB<0.1)"  ????
+                            "pi+" : (track_cuts + "&" + pion_cuts + " & (TRGHOSTPROB<0.1)" ) %config,
+                            "pi-" : (track_cuts + "&" + pion_cuts + " & (TRGHOSTPROB<0.1)" ) %config},
+            #CombinationCut= "(AM< %(XiMassMax)s) & (AMAXDOCA('')< %(XiMaxDOCA)s *mm)"%config,
+            #MotherCut="(M< %(XiMassMax)s) & (BPVLTIME()> %(XiMinTauPs)s * ps) &  (VFASPF(VCHI2/VDOF)< %(XiVtxChi2)s)  & (BPVVDCHI2 > %(XiMinVDChi2)s) & (MIPDV(PRIMARY)>%(XiIPMin)s*mm) "%config
+
+            CombinationCut= "(ADAMASS('Xi-') < %(XiMassWin)s*MeV) & (AMAXDOCA('')< %(XiMaxDOCA)s *mm)"%config,
+            MotherCut="(ADMASS('Xi-') < %(XiMassWin)s*MeV) & (VFASPF(VCHI2/VDOF)<%(XiVtxChi2)s) & (BPVLTIME()> %(XiMinTauPs)s * ps) & (PT>%(XiMinPt)s) &  (BPVVDCHI2 > %(XiMinVDChi2)s) "%config          
+                                            )   
+                                
+
+
+#################### build Xi02ppi ##############################  
+        Xi02ppi = CombineSelection(
+            'Xi02ppi_sel',
+            [Protons, Pions],
+            DecayDescriptor='[Xi0 -> p+ pi-]cc',
+            DaughtersCuts={ "pi-" : (track_cuts + "&" + pion_cuts ) %config,
+                            "p+" : (track_cuts + "&" + proton_cuts ) %config},
+           # CombinationCut= "(AM< %(XiMassMax)s) & (AMAXDOCA('')< %(XiMaxDOCA)s *mm)"%config,
+           # MotherCut="(M< %(XiMassMax)s) & (BPVLTIME()> %(XiMinTauPs)s * ps) &  (VFASPF(VCHI2/VDOF)< %(XiVtxChi2)s) & (MIPDV(PRIMARY)>%(XiIPMin)s*mm)"%config
+            
+            CombinationCut= "(ADAMASS('Xi0') < %(XiMassWin)s*MeV) & (AMAXDOCA('')< %(XiMaxDOCA)s *mm)"%config,
+            MotherCut="(ADMASS('Xi0') < %(XiMassWinTight)s*MeV) & (BPVLTIME()> %(XiMinTauPs)s * ps) &  (VFASPF(VCHI2/VDOF)< %(XiVtxChi2)s) & (PT>%(XiMinPt)s) & (BPVIPCHI2()< %(XiIpChi2)s)"%config
+            # Is this solution correct??
+            
+            )
+
+
+###################build Omega2Lambda0pi################################ 
+
+        Omega2Lambdapi = CombineSelection(
+            'Omega2Lambdapi_sel',
+            [L02PPi, Pions],
+            DecayDescriptor='[Omega- -> Lambda0  pi-]cc',
+            DaughtersCuts={ "Lambda0" : "ALL",
+                            "pi-" : (track_cuts + "&" + pion_cuts) %config},
+            CombinationCut= "(AM< %(OmegaMassMax)s)"%config,
+            MotherCut="(M< %(OmegaMassMax)s) & (BPVLTIME()> %(OmegaMinTauPs)s * ps) &  (VFASPF(VCHI2/VDOF)< %(OmegaVtxChi2)s)"%config
+            )
+
+
+
+#################### build L02penu ##############################
+        #L02penu = CombineSelection(
+         #               'L02penu_sel',
+          #              [Protons, Electrons],
+           #             DecayDescriptor='[Lambda0 -> p+ e-]cc',
+            #            DaughtersCuts={ "e+" : (track_cuts + "&" + electron_cuts ) %config,
+             #                           "p+" : (track_cuts + "&" + proton_cuts ) %config},
+              #          CombinationCut= "(AM< %(LambdaMassMax)s) & (AMAXDOCA('')< %(LambdaMaxDOCA)s *mm)"%config,
+               #         MotherCut="(M< %(LambdaMassMax)s )  & (BPVLTIME()> %(LambdaMinTauPs)s * ps) & (VFASPF(VCHI2/VDOF)< %(LambdaVtxChi2)s) &  (BPVVDCHI2 > %(LambdaPrimMinVDChi2)s) & (MIPDV(PRIMARY)>%(LambdaIPMin)s*mm)"%config
+#                        )
+
+        
+
+
+
+
+
+#################### build Lines ############################## 
+
+        self.Xi2Sigma0MuNuLine = StrippingLine(Xi2Sigma0munu_name+"Line",
+                                            prescale = config['Xi-2Sigma0munuPrescale'],
+                                            postscale = config['Postscale'],
+                                            selection=Xi2Sigma0munu,
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False
+                                           )
+
+
+        self.Xi2ppipiLine = StrippingLine(Xi2ppipi_name+"Line",
+                                            prescale = config['Xi-2ppipiPrescale'],
+                                            postscale = config['Postscale'],
+                                            selection=Xi2ppipi,
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False
+                                           )
+
+
+        self.Xi02ppiLine = StrippingLine(Xi02ppi_name+"Line",
+                                            prescale = config['Xi02ppiPrescale'],
+                                            postscale = config['Postscale'],
+                                            selection=Xi02ppi,
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False
+                                           )
+
+
+        self.Omega2Lambda0piLine = StrippingLine(Omega2Lambda0pi_name+"Line",
+                                            prescale = config['Omega-2Lambda0piPrescale'],
+                                            postscale = config['Postscale'],
+                                            selection=Omega2Lambdapi,
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False
+                                           )
+
+
+    
+ #       self.L02penuLine = StrippingLine(L02penu_name+"Line",
+  #                                        prescale = config['L02penuPrescale'],
+ #                                         postscale = config['Postscale'],
+  #                                        selection=L02penu,
+   #                                       RequiredRawEvents = [],
+    #                                      MDSTFlag=False
+     #                                     )
+
+
+        
+
+        
+        self.registerLine(self.Xi2Sigma0MuNuLine)
+        self.registerLine(self.Xi2ppipiLine)
+        self.registerLine(self.Xi02ppiLine)
+        self.registerLine(self.Omega2Lambda0piLine)
+      #  self.registerLine(self.L02penuLine)
+        
+
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingStrangeSL.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingStrangeSL.py
new file mode 100644
index 000000000..195c70e48
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingStrangeSL.py
@@ -0,0 +1,543 @@
+#!/usr/bin/env python # ============================================================================= 
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+# @file   StrippingStrange.py 
+# @author Jessica Prisciandaro, Alexandre Brea Rodriguez (jessica.prisciandaro@cern.ch, alexandre.brea.rodriguez@usc.es) 
+# @date   08.05.2017 # =============================================================================
+
+#Ks2pimunu
+#K+2pipimunu
+#Ks2pipi  C.C
+#L->penu
+#L->pmunu 
+#L->p pi C.C.
+#Xi2Lmunu
+#Xi0 2 Sigma+munu  2 p pi0 mu nu 
+#Omega- 2 Xi*munu 2 Xi-pimunu 2 Lambdapipimunu 
+
+'''
+Module for construction of stripping selections for some rare strange decays
+Exported symbols (use python help!):
+'''
+
+__author__ = ['Jessica Prisciandaro']
+__date__ = '08/05/2017'
+__version__ = '1.0'
+
+__all__ = ('default_config',
+           'StrangeSLConf',
+           )
+
+import os
+
+from Gaudi.Configuration import *
+
+from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays as Combine3Particles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N4BodyDecays as Combine4Particles
+from CommonParticles import StdNoPIDsDownElectrons
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.PhysicalConstants import c_light
+from GaudiKernel.SystemOfUnits import MeV
+
+from StandardParticles import StdAllNoPIDsPions, StdLoosePions, StdLooseProtons, StdAllLoosePions, StdAllLooseMuons, StdAllLooseElectrons
+from StandardParticles import StdLooseMergedPi0,StdLooseResolvedPi0, StdLooseDalitzPi0
+from PhysConf.Selections import CombineSelection
+                                
+default_config = {
+  'NAME': 'StrangeSL',
+  'WGs' : ['RD'],
+  'BUILDERTYPE' : 'StrangeSLConf',
+  'STREAMS' : [ 'Leptonic' ],
+  'CONFIG' : {
+        'Postscale'           :1,
+        'L02penuPrescale' :1,
+        'Ks2PiMuNuHighMassPrescale' : 1,
+        'Ks2PiMuNuLowMassPrescale' : 1,
+        'Ks2PiMuNuPrescale' : 1,
+        'L02PMuNuPrescale' :1,
+        'Xi2L0MuNuPrescale' : 1,
+        'K2PiPiMuNuPrescale' : 1,
+        'Xi02SigmamunuPrescale' : 1,
+        'Omega2XiStarmunuPrescale' : 1,
+        'Xi02Lambdapi0Prescale' :1 ,
+        'Xi2LambdaPiPrescale' :1,
+        'Omega2Xi0PiPrescale' :1,
+        'L02ppiPrescale':1,
+        #General
+        'trchi2dof' : 3,
+        'trghostprob' : 0.2,
+        #Muons
+        'muonProbNNmu' : 0.3,
+        'muonMinIpChi2' : 60.,
+        'muonMinIp' : 1,
+        #Electrons
+        'electronProbNNe' : 0.3,
+        'electronMinIpChi2' : 60.,
+        'electronMinIp' : 1,
+        #Protons
+        'protonProbNNp' : 0.3,
+        'protonMinIpChi2' : 16.,
+        #Pions
+        'pionProbNNpi' : 0.4,
+        'pionMinIpChi2' : 60.,
+        'pi0MinPt' : 500 * MeV,
+        #Kaons
+        'KaonMassMax' : 600 *MeV,
+        'KaonMassMin' : 200 *MeV,
+        'KaonMassSeparation' : 420 *MeV,
+        'KsLifetime'    : 0.06*89.53 *2.9979e-01,  #From Rare Strange
+        'KaonPlusLifetime'    : 0.06*89.53 *2.9979e-01, #O(2) * Ks
+        'KaonMinDIRA' : 0.98, #From Rare Strange
+        'KaonVtxChi2' : 25.,
+        'KsP' : 3000,
+        'KsVtxChi2' : 6.,
+        'KsMinVDChi2' : 100.,
+        'KsIPMin' : 0.2,
+        'KsIPChi2Min' : 4,
+        'KaonPlusMinVDChi2' : 100.,
+        'KaonSVZ' : 650,
+        'KaonRho' : 4,
+        'KsDiDOCA': 0.2,
+        'KsMinTauPs' : 6.,
+        'KsMaxIpDistRatio' : 0.02,
+        #Lambda
+        'LambdaPLeptonNuMassMax' : (1116+25.) *MeV,
+        #Here I am changing the values while seeing the signal L0pmunu generated by me. But this is also applied to Lppi... so maybe i should duplicate Lambda properties with old values for L ppi
+        'LambdaMassMax': (1116+400.) *MeV, #(1116+400.) *MeV
+        'LambdaMinTauPs' : 9.,
+        #'LambdaMinPt' : 500.,
+        'LambdaMaxDOCA' : 1.0,
+        'LambdaPLeptonNuMaxDOCA' : 0.3,  #Before 1. That's a lot! 
+        'LambdaMassWin' : 500.,
+        'LambdaMassWinTight' : 30.,
+        'LambdaMinDIRA' : 0.9, 
+        'LambdaMaxIpChi2' : 36.,
+        'LambdaMinIpChi2' : 16.,
+        'LambdaVtxChi2' : 9.,
+        'LambdaSecMinVDChi2' : 100,
+        'LambdaPrimMinVDChi2' : 50,
+        'LambdaMinPt' : 0., #500 We don't need cut in PT
+        'LambdaIPMin' : 0.2,
+        #Sigma
+        'SigmaMinTauPs' : 6.,
+        'SigmaMinPt' : 500.,
+        'SigmaMaxDOCA' : 2.,
+        'SigmaMassWin' : 150.,
+        'SigmaMinDIRA' : 0.9,
+        'SigmaMaxIpChi2' : 36.,
+        'SigmaVtxChi2' : 36.,
+        'SigmaIPMin' : 0.05,
+        #Xi
+        'XiMassMax': (1320.+300.) *MeV,  #1315-1320
+        'XiMassMin' : 0.,
+        'XiMassWin': 300.,
+        'XiMassWinTight': 50., #from Heavy B&Q 
+        'XiMinTauPs' :6.,  #lifetime Xi+:1.6e-10, Xi0:2.9e-10
+        'XiVtxChi2' : 25.,
+        'XiMinPt' : 500 * MeV,
+        'XiMinVDChi2' : 30,
+        'XiIPMin' : 0.05,
+        'XiIpChi2' : 36.,
+        'XiMaxDOCA' : 1,
+        #XiStar
+        'XiStarMassWin' : 50., #Xi(1530)
+        'XiStarMinTauPs' :0.,
+        'XiStarMassMax' : (1530+50.)*MeV,
+        'XiStarMassMin' : (1530-50.)*MeV,
+        'XiStarVtxChi2' : (1530-50.)*MeV,
+        #Omega
+        'OmegaMassMax' : (1672.+300) * MeV,
+        'OmegaMassMin' : 0 * MeV,
+        'OmegaMassWin' : 300 * MeV,
+        'OmegaMinTauPs' : 4.,
+        'OmegaVtxChi2' : 25.,
+        'OmegaMinPt' : 500 * MeV,
+        #Combination
+        'DiDOCA' : 2, #0.5
+        'TriDOCA': 3,
+        }
+  }
+  
+#============================================================
+# Line builder 
+class StrangeSLConf(LineBuilder) :
+    """
+    Builder 
+ 
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys() 
+    
+    #### This is the dictionary of all tunable cuts ########
+    
+    
+    def __init__(self, name, config):         
+        self.name = name    
+        LineBuilder.__init__(self, name, config)
+
+        ks2PiMuNu_name=name+'Ks2PiMuNu'
+        ks2PiMuNuHighMass_name=name+'Ks2PiMuNuHighMass'
+        ks2PiMuNuLowMass_name=name+'Ks2PiMuNuLowMass'
+        k2pipimunu_name=name+'Ks2PiPiMuNu'
+        l02pmunu_name=name+'L02PMuNu'
+        xi2l0munu_name=name+'Xi2L0MuNu'
+        xi02Sigmamunu_name=name+'Xi02Sigmamunu'
+        omega2XiStarmunu_name=name+'Omega2XiStarmunu'
+        xi02Lambdapi0_name = name+'Xi02Lambdapi0' 
+        xi2LambdaPi_name = name+'Xi2LambdaPi'
+        omega2Xi0Pi_name = name+'Omega2Xi0Pi'
+        L02penu_name=name+'L02penu'
+        L02ppi_name=name+'L02ppi'
+        
+        Muons = DataOnDemand(Location='Phys/StdAllLooseMuons/Particles')
+        Protons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")         
+        Pions = DataOnDemand(Location = "Phys/StdAllLoosePions/Particles")
+        Pi0 = DataOnDemand(Location = "Phys/StdLooseResolvedPi0/Particles")
+        Electrons = DataOnDemand(Location = "Phys/StdAllLooseElectrons/Particles")
+        
+        track_cuts = ''' (TRCHI2DOF< %(trchi2dof)s) & (TRGHOSTPROB<%(trghostprob)s)'''
+        pion_cuts = '''(PROBNNpi> %(pionProbNNpi)s) & (MIPCHI2DV(PRIMARY)>%(pionMinIpChi2)s)  &  (~ISMUON) & (PROBNNmu<0.7)  & (PROBNNk<0.7) '''
+        proton_cuts = ''' (PROBNNp> %(protonProbNNp)s) & (MIPCHI2DV(PRIMARY)>%(protonMinIpChi2)s) &  (PROBNNmu<0.7) & (PROBNNk<0.7) '''
+        muon_cuts = ''' (PROBNNmu> %(muonProbNNmu)s) & (MIPCHI2DV(PRIMARY)>%(muonMinIpChi2)s) & (MIPDV(PRIMARY) > %(muonMinIp)s) &  (ISMUON)  & (PROBNNpi<0.7) & (PROBNNk<0.7)'''
+        electron_cuts = ''' (PROBNNe> %(electronProbNNe)s) & (MIPCHI2DV(PRIMARY)>%(electronMinIpChi2)s) & (PROBNNmu<0.7) & (PROBNNk<0.7) & (PROBNNpi<0.7)'''   #??  & (HASRICH) ??
+
+
+
+##################### build L02PPi (Normalization)###############################
+        L02PPiNorm = CombineSelection(
+            'L02PPiNorm_sel',
+            [Protons, Pions],
+            DecayDescriptor="[Lambda0 -> p+ pi-]cc",
+            DaughtersCuts={ "pi-" : (track_cuts + "&" + pion_cuts ) %config,
+                            "p+" : (track_cuts + "&" + proton_cuts ) %config},
+            CombinationCut= "(AM< %(LambdaPLeptonNuMassMax)s) & (AMAXDOCA('')< %(LambdaPLeptonNuMaxDOCA)s *mm)"%config,
+            MotherCut="(M< %(LambdaPLeptonNuMassMax)s )  & (BPVLTIME()> %(LambdaMinTauPs)s * ps) & (VFASPF(VCHI2/VDOF)< %(LambdaVtxChi2)s) &  (BPVVDCHI2 > %(LambdaPrimMinVDChi2)s) & (MIPDV(PRIMARY)>%(LambdaIPMin)s*mm)"%config
+            )
+        
+##################### build L02PPi ###############################
+        L02PPi = CombineSelection(
+            'L02PPi_sel',
+            [Protons, Pions],
+            DecayDescriptor="[Lambda0 -> p+ pi-]cc",
+            DaughtersCuts={ "pi-" : (track_cuts + "&" + pion_cuts ) %config,
+                            "p+" : (track_cuts + "&" + proton_cuts ) %config},
+            CombinationCut= "(ADAMASS('Lambda0')<%(LambdaMassWinTight)s *MeV) & (AMAXDOCA('')< %(LambdaMaxDOCA)s *mm)"%config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(LambdaVtxChi2)s)  & (PT> %(LambdaMinPt)s *MeV) & (ADMASS('Lambda0') < %(LambdaMassWinTight)s *MeV )  & (BPVIPCHI2()> %(LambdaMinIpChi2)s) & (BPVLTIME()> %(LambdaMinTauPs)s * ps) &(BPVVDCHI2 > %(LambdaSecMinVDChi2)s) & (MIPDV(PRIMARY)>%(LambdaIPMin)s*mm)" %config
+            )
+        
+
+
+
+#################### build K+2PiPiMuNu ##############################  
+        
+        K2PiPiMuNu = CombineSelection(
+            'K2PiPiMuNu_sel',
+            [Pions,Muons],
+            DecayDescriptor='[K+ -> pi+ pi- mu+]cc',
+            DaughtersCuts={"pi+": (track_cuts + "&" + pion_cuts) %config,
+                           "mu+": (track_cuts + "&" + muon_cuts) %config,
+                },
+            CombinationCut= "(AM< %(KaonMassMax)s) & (AMAXDOCA('')<%(TriDOCA)s*mm)"%config,
+            MotherCut="(M< %(KaonMassMax)s) & ((BPVVDSIGN*M/P) > %(KaonPlusLifetime)s) &  (VFASPF(VCHI2/VDOF)< %(KaonVtxChi2)s) & (BPVVDCHI2 > %(KaonPlusMinVDChi2)s)"%config
+            )
+
+
+#################### build Ks2PiMuNu ##############################
+        Ks2PiMuNuCommon = CombineSelection(
+            'Ks2PiMuNuCommon_sel',
+            [Pions, Muons],
+            DecayDescriptor='[KS0 -> pi+ mu-]cc',
+            DaughtersCuts={ "pi+" : (track_cuts + "&" + pion_cuts + " & (TRGHOSTPROB<0.1)" ) %config,
+                            "mu+" : (track_cuts + "&" + muon_cuts + "& (TRGHOSTPROB<0.1)" ) %config},
+            CombinationCut= "(AM< %(KaonMassMax)s) & (AMAXDOCA('')<%(KsDiDOCA)s*mm)"%config,
+            MotherCut="(M< %(KaonMassMax)s) & (M> %(KaonMassMin)s) & (P> %(KsP)s)  &  (VFASPF(VCHI2/VDOF)< %(KsVtxChi2)s) & (VFASPF(sqrt(VX*VX+VY*VY)) > %(KaonRho)s) & ( VFASPF(VZ)<%(KaonSVZ)s) & (BPVVDCHI2 > %(KsMinVDChi2)s) & (BPVLTIME()> %(KsMinTauPs)s * ps) & ((MIPDV(PRIMARY)/BPVVDZ)< %(KsMaxIpDistRatio)s) & (MIPDV(PRIMARY)>%(KsIPMin)s*mm) & (MIPCHI2DV(PRIMARY)>%(KsIPChi2Min)s)"%config
+            )
+
+
+        from Configurables import FilterDesktop
+        Ks2PiMuNuHighMass = Selection('Ks2PiMuNuHighMass_sel', Algorithm = FilterDesktop('Ks2PiMuNuHighMassFD', Code='(M> %(KaonMassSeparation)s)'%config) ,RequiredSelections=[Ks2PiMuNuCommon])
+        Ks2PiMuNuLowMass = Selection('Ks2PiMuNuLowMass_sel', Algorithm = FilterDesktop('Ks2PiMuNuLowMassFD', Code='(M< %(KaonMassSeparation)s)'%config) ,RequiredSelections=[Ks2PiMuNuCommon])
+
+        
+#################### build L02PMuNu ##############################  
+        L02PMuNu = CombineSelection(
+            'L02PMuNu_sel',
+            [Protons, Muons],
+            DecayDescriptor='[Lambda0 -> p+ mu-]cc',
+            DaughtersCuts={ "mu+" : (track_cuts + "&" + muon_cuts ) %config,
+                            "p+" : (track_cuts + "&" + proton_cuts ) %config},
+            CombinationCut= "(AM< %(LambdaPLeptonNuMassMax)s) & (AMAXDOCA('')< %(LambdaPLeptonNuMaxDOCA)s *mm)"%config,
+            MotherCut="(M< %(LambdaPLeptonNuMassMax)s )  & (BPVLTIME()> %(LambdaMinTauPs)s * ps) & (VFASPF(VCHI2/VDOF)< %(LambdaVtxChi2)s) &  (BPVVDCHI2 > %(LambdaPrimMinVDChi2)s) & (MIPDV(PRIMARY)>%(LambdaIPMin)s*mm)"%config
+            )
+        
+#################### build L02penu ##############################
+        L02penu = CombineSelection(
+            'L02penu_sel',
+            [Protons, Electrons],
+            DecayDescriptor='[Lambda0 -> p+ e-]cc',
+            DaughtersCuts={ "e+" : (track_cuts + "&" + electron_cuts ) %config,
+                            "p+" : (track_cuts + "&" + proton_cuts ) %config},
+            CombinationCut= "(AM< %(LambdaPLeptonNuMassMax)s) & (AMAXDOCA('')< %(LambdaPLeptonNuMaxDOCA)s *mm)"%config,
+            MotherCut="(M< %(LambdaPLeptonNuMassMax)s )  & (BPVLTIME()> %(LambdaMinTauPs)s * ps) & (VFASPF(VCHI2/VDOF)< %(LambdaVtxChi2)s) &  (BPVVDCHI2 > %(LambdaPrimMinVDChi2)s) & (MIPDV(PRIMARY)>%(LambdaIPMin)s*mm)"%config
+            )
+                
+
+#################### build Xi2L0MuNu ##############################  
+        Xi2L0MuNu = CombineSelection(
+            'Xi2L0MuNu_sel',
+            [L02PPi, Muons],
+            DecayDescriptor='[Xi- -> Lambda0  mu+]cc',
+            DaughtersCuts={ "Lambda0" : "ALL",
+                            "mu+" : (track_cuts + "&" + muon_cuts) %config},
+            CombinationCut= "(AM< %(XiMassMax)s) & (AMAXDOCA('')< %(XiMaxDOCA)s *mm)"%config,
+            MotherCut="(M< %(XiMassMax)s) & (BPVLTIME()> %(XiMinTauPs)s * ps) &  (VFASPF(VCHI2/VDOF)< %(XiVtxChi2)s)  & (BPVVDCHI2 > %(XiMinVDChi2)s) & (MIPDV(PRIMARY)>%(XiIPMin)s*mm) "%config
+            )
+
+
+
+###################build Sigma2ppi################################
+        Sigma2ppi = CombineSelection(
+            'Sigma2ppi_sel',
+            [Protons, Pi0],
+            DecayDescriptor='[Sigma+ -> p+ pi0]cc',
+            DaughtersCuts={ "p+" : (track_cuts + "&" + proton_cuts) %config,
+                            "pi0" : "(PT > %(pi0MinPt)s)" %config},
+            CombinationCut= "(ADAMASS('Sigma+')<%(SigmaMassWin)s *MeV) & (AMAXDOCA('')< %(SigmaMaxDOCA)s *mm)"%config,
+            MotherCut="(VFASPF(VCHI2/VDOF)< %(SigmaVtxChi2)s)  & (PT> %(SigmaMinPt)s *MeV) & (ADMASS('Sigma+') < %(SigmaMassWin)s *MeV ) & (MIPDV(PRIMARY)>%(SigmaIPMin)s*mm) & (BPVLTIME()> %(SigmaMinTauPs)s * ps)"%config
+            )
+
+
+###################build Xi02Sigmamunu################################ 
+
+        Xi02Sigmamunu = CombineSelection(
+            'Xi02Sigmamunu_sel',
+            [Sigma2ppi, Muons],
+            DecayDescriptor='[Xi0 -> Sigma+ mu+]cc',
+            DaughtersCuts={ "Sigma+" : "ALL",
+                            "mu+" : (track_cuts + "&" + muon_cuts) %config},
+            CombinationCut= "(AM< %(XiMassMax)s) & (AMAXDOCA('')< %(XiMaxDOCA)s *mm)"%config,
+            MotherCut="(M< %(XiMassMax)s) & (BPVLTIME()> %(XiMinTauPs)s * ps) &  (VFASPF(VCHI2/VDOF)< %(XiVtxChi2)s) & (MIPDV(PRIMARY)>%(XiIPMin)s*mm)"%config
+            )
+
+
+###################build Xi2LambdaPi################################ 
+####This is Xi-########
+        Xi2LambdaPi = CombineSelection(
+            'Xi2LambdaPi_sel',
+            [L02PPi, Pions],
+            DecayDescriptor='[Xi- -> Lambda0 pi-]cc',
+            DaughtersCuts={ "Lambda0" : "ALL",
+                            "pi-" : (track_cuts + "&" + pion_cuts) %config},
+            CombinationCut= "(ADAMASS('Xi-') < %(XiMassWin)s*MeV) & (AMAXDOCA('')< %(XiMaxDOCA)s *mm)"%config,
+            MotherCut="(ADMASS('Xi-') < %(XiMassWin)s*MeV) & (VFASPF(VCHI2/VDOF)<%(XiVtxChi2)s) & (BPVLTIME()> %(XiMinTauPs)s * ps) & (PT>%(XiMinPt)s) &  (BPVVDCHI2 > %(XiMinVDChi2)s) "%config
+            )
+
+        Xi2LambdaPiControl = Selection('Xi2LambdaPiControl_sel', Algorithm = FilterDesktop('Xi2LambdaPiControlFD', Code='( (MIPCHI2DV(PRIMARY)<%(XiIpChi2)s))'%config) ,RequiredSelections=[Xi2LambdaPi])
+
+###################build XiStar2XiPi################################ 
+
+        XiStar2XiPi = CombineSelection(
+            'XiStar2XiPi_sel',
+            [Xi2LambdaPi, Pions],
+            DecayDescriptor='[Xi*0 -> Xi- pi+]cc',
+            DaughtersCuts={ "Xi-" : "ALL",
+                            "pi+" : (track_cuts + "&" + pion_cuts) %config},
+            CombinationCut= "(AM> %(XiStarMassMin)s) & (AM< %(XiStarMassMax)s)"%config,
+            MotherCut="(M> %(XiStarMassMin)s) & (M< %(XiStarMassMax)s) &  (VFASPF(VCHI2/VDOF)< %(XiStarVtxChi2)s)"%config
+            )
+
+###################build Omega2XiStarmunu################################ 
+
+        Omega2XiStarmunu = CombineSelection(
+            'Omega2XiStarmunu_sel',
+            [XiStar2XiPi, Muons],
+            DecayDescriptor='[Omega- -> Xi*0  mu-]cc',
+            DaughtersCuts={ "Xi*0" : "ALL",
+                            "mu-" : (track_cuts + "&" + muon_cuts) %config},
+            CombinationCut= "(AM< %(OmegaMassMax)s)"%config,
+            MotherCut="(M< %(OmegaMassMax)s) & (BPVLTIME()> %(OmegaMinTauPs)s * ps) &  (VFASPF(VCHI2/VDOF)< %(OmegaVtxChi2)s)"%config
+            )
+
+
+###################build Xi02LambdaPi0################################ 
+
+        Xi02Lambdapi0 = CombineSelection(
+            'Xi02Lambdapi0_sel',
+            [L02PPi, Pi0],
+            DecayDescriptor='[Xi0 -> Lambda0 pi0]cc',
+            DaughtersCuts={ "Lambda0" : "ALL",
+                            "pi0" : "(PT > %(pi0MinPt)s)" %config},
+            CombinationCut= "(ADAMASS('Xi0') < %(XiMassWin)s*MeV) & (AMAXDOCA('')< %(XiMaxDOCA)s *mm)"%config,
+            MotherCut="(ADMASS('Xi0') < %(XiMassWin)s*MeV) & (BPVLTIME()> %(XiMinTauPs)s * ps) &  (VFASPF(VCHI2/VDOF)< %(XiVtxChi2)s) & (PT>%(XiMinPt)s) & (BPVIPCHI2()< %(XiIpChi2)s)"%config
+            )
+
+
+
+###################build Xi-2LambdaPi-################################ 
+
+        #XiL0Pi = CombineSelection(
+        #    'Xi2L0Pi_sel',
+        #    [L02PPi, Pions],
+        #    DecayDescriptor='[Xi- -> Lambda0  pi-]cc',
+        #    DaughtersCuts={ "Lambda0" : "ALL",
+        #                    "pi-" : (track_cuts + "&" + pion_cuts) %config},
+        #    CombinationCut= "(AM< %(XiMassMax)s)"%config,
+        #    MotherCut="M< %(XiMassMax)s) & (VFASPF(VCHI2/VDOF)<%(XiVtxChi2)s) & (BPVLTIME()> %(XiMinTauPs)s * ps)"%config
+        #    )
+
+
+
+
+
+###################build Omega-2Xi0Pi-################################ 
+
+
+        Omega2Xi0Pi = CombineSelection(
+            'Omega2Xi0Pi_sel',
+            [Xi02Lambdapi0, Pions],
+            DecayDescriptor='[Omega- -> Xi0  pi-]cc',
+            DaughtersCuts={ "Xi0" : "(ADMASS('Xi0') < %(XiMassWinTight)s*MeV)"%config,
+                            "pi-" : (track_cuts + "&" + pion_cuts + "& (PROBNNmu<0.7) & (PROBNNp<0.7) & (PROBNNk<0.7)") %config},
+            CombinationCut= "(ADAMASS('Omega-') < %(OmegaMassWin)s*MeV) "%config,
+            MotherCut="(ADMASS('Omega-') < %(OmegaMassWin)s*MeV) & (BPVLTIME()> %(OmegaMinTauPs)s * ps) &  (VFASPF(VCHI2/VDOF)< %(OmegaVtxChi2)s) & (PT>%(OmegaMinPt)s)"%config
+            )
+
+
+
+#################### build Lines ############################## 
+    #           Ks2PiMuNuCommon
+
+
+
+        self.L02PPiNormLine = StrippingLine(L02ppi_name+"Line",
+                                           prescale = config['L02ppiPrescale'],
+                                           postscale = config['Postscale'],
+                                           selection=L02PPiNorm,
+                                           RequiredRawEvents = [],
+                                           MDSTFlag=False
+                                           )
+
+        self.Ks2PiMuNuLine = StrippingLine(ks2PiMuNu_name+"Line",
+                                            prescale = config['Ks2PiMuNuPrescale'],
+                                            postscale = config['Postscale'],
+                                            selection=Ks2PiMuNuCommon,
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False
+                                           )
+
+        self.Ks2PiMuNuHighMassLine = StrippingLine(ks2PiMuNuHighMass_name+"Line",
+                                            prescale = config['Ks2PiMuNuHighMassPrescale'],
+                                            postscale = config['Postscale'],
+                                            selection=Ks2PiMuNuHighMass,
+                                            RequiredRawEvents = [],
+                                            MDSTFlag=False
+                                           )
+
+        self.Ks2PiMuNuLowMassLine = StrippingLine(ks2PiMuNuLowMass_name+"Line",
+                                            prescale = config['Ks2PiMuNuLowMassPrescale'],
+                                              postscale = config['Postscale'],
+                                              selection=Ks2PiMuNuLowMass,
+                                              RequiredRawEvents = [],
+                                              MDSTFlag=False
+                                              )
+
+        self.K2PiPiMuNuLine = StrippingLine(k2pipimunu_name+"Line",
+                                           prescale = config['K2PiPiMuNuPrescale'],
+                                           postscale = config['Postscale'],
+                                           selection=K2PiPiMuNu,
+                                           RequiredRawEvents = [],
+                                           MDSTFlag=False
+                                           )
+
+        self.L02PMuNuLine = StrippingLine(l02pmunu_name+"Line",
+                                           prescale = config['L02PMuNuPrescale'],
+                                           postscale = config['Postscale'],
+                                           selection=L02PMuNu,
+                                           RequiredRawEvents = [],
+                                           MDSTFlag=False
+                                           )
+        self.L02penuLine = StrippingLine(L02penu_name+"Line",
+                                         prescale = config['L02penuPrescale'],
+                                         postscale = config['Postscale'],
+                                         selection=L02penu,
+                                         RequiredRawEvents = [],
+                                         MDSTFlag=False
+                                         )
+
+
+        self.Xi2L0MuNuLine = StrippingLine(xi2l0munu_name+"Line",
+                                           prescale = config['Xi2L0MuNuPrescale'],
+                                           postscale = config['Postscale'],
+                                           selection=Xi2L0MuNu,
+                                           RequiredRawEvents = [],
+                                           MDSTFlag=False
+                                           )
+
+        self.Xi02SigmamunuLine = StrippingLine(xi02Sigmamunu_name+"Line",
+                                           prescale = config['Xi02SigmamunuPrescale'],
+                                           postscale = config['Postscale'],
+                                           selection=Xi2L0MuNu,
+                                           RequiredRawEvents = [],
+                                           MDSTFlag=False
+                                           )
+        
+        self.Omega2XiStarmunuLine = StrippingLine(omega2XiStarmunu_name+"Line",
+                                              prescale = config['Omega2XiStarmunuPrescale'],
+                                              postscale = config['Postscale'],
+                                              selection= Omega2XiStarmunu,
+                                              RequiredRawEvents = [],
+                                              MDSTFlag=False
+                                              )
+    
+        self.Xi02Lambdapi0Line = StrippingLine(xi02Lambdapi0_name+"Line",
+                                              prescale = config['Xi02Lambdapi0Prescale'],
+                                              postscale = config['Postscale'],
+                                              selection= Xi02Lambdapi0,
+                                              RequiredRawEvents = [],
+                                              MDSTFlag=False
+                                              )
+        
+        self.Xi2LambdaPiLine = StrippingLine(xi2LambdaPi_name+"Line",
+                                                  prescale = config['Xi2LambdaPiPrescale'],
+                                                  postscale = config['Postscale'],
+                                                  selection= Xi2LambdaPiControl,
+                                                  RequiredRawEvents = [],
+                                                  MDSTFlag=False
+                                                  )
+
+        self.Omega2Xi0PiLine = StrippingLine(omega2Xi0Pi_name+"Line",
+                                             prescale = config['Omega2Xi0PiPrescale'],
+                                             postscale = config['Postscale'],
+                                             selection= Omega2Xi0Pi,
+                                             RequiredRawEvents = [],
+                                             MDSTFlag=False
+                                             )
+
+
+        self.registerLine(self.L02PPiNormLine)
+        self.registerLine(self.Ks2PiMuNuLine)
+        #self.registerLine(self.Ks2PiMuNuHighMassLine)
+        #self.registerLine(self.Ks2PiMuNuLowMassLine)
+        self.registerLine(self.K2PiPiMuNuLine)
+        self.registerLine(self.L02PMuNuLine)
+        self.registerLine(self.Xi2L0MuNuLine)
+        self.registerLine(self.Xi02SigmamunuLine)
+        self.registerLine(self.Omega2XiStarmunuLine)
+        self.registerLine(self.Xi02Lambdapi0Line)
+        self.registerLine(self.Xi2LambdaPiLine)
+        self.registerLine(self.Omega2Xi0PiLine)
+        self.registerLine(self.L02penuLine)
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingTau23MuLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingTau23MuLines.py
new file mode 100644
index 000000000..4e5617125
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingTau23MuLines.py
@@ -0,0 +1,570 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+'''
+Module for construction of tau -->MuMuMu stripping selections and lines
+
+Exported symbols (use python help!):
+   -
+'''
+
+__author__ = ['Jon Harrison', 'Paul Seyfert', 'Marcin Chrzaszcz', 'Giulia Frau', 'Vitalii Lisovskyi']
+__date__ = '12/03/2021'
+__version__ = '$Revision: 3.1$'
+
+__all__ = ('Tau23MuLinesConf',
+           'default_config',
+           'makeTau23Mu',
+           'makeDs23PiTIS',
+           'makeDs23Pi',
+           'makeDsPhiPi',
+           'makeTau25Mu',
+           'makeTau2PMuMu'
+           )
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays as Combine3Particles
+from GaudiConfUtils.ConfigurableGenerators import DaVinci__N5BodyDecays as Combine5Particles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from GaudiKernel.PhysicalConstants import c_light
+
+default_config = {
+    'NAME'        : 'Tau23Mu',
+    'WGs'         : ['RD'],
+    'BUILDERTYPE' : 'Tau23MuLinesConf',
+    'CONFIG'      : {
+       'TauPrescale'         :1.,
+       'TauPostscale'        :1.,
+       'Ds23PiTISPrescale'   :0.0,
+       'Ds23PiPrescale'      :0.0,
+       'Ds2PhiPiPrescale'    :1.,
+       'Tau25Prescale'       :1.,
+       'Tau2PMuMuPrescale'   :1.,
+       'TrackGhostProb'      :0.45
+       },
+    'STREAMS'     : { 'Leptonic' : ['StrippingTau23MuTau23MuLine','StrippingTau23MuDs2PhiPiLine','StrippingTau23MuTau2PMuMuLine','StrippingTau23MuDs23PiLine','StrippingTau23MuTau25MuLine'],
+                      'Dimuon' : ['StrippingTau23MuTau23Mu_DSTLine', 'StrippingTau23MuTau23Mu_DST_3muLine', 'StrippingTau23MuDs2PhiPi_DSTLine']}
+    }
+
+
+
+class Tau23MuLinesConf(LineBuilder) :
+    """
+    Builder
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config):
+        self.name = name
+        self.__confdict__ = config
+
+
+        LineBuilder.__init__(self, name, config)
+        #checkConfig(Bs2MuMuLinesConf.__configuration_keys__,config)
+
+        tau_name=name+'Tau23Mu'
+        tau_name_DST=name+'Tau23Mu_DST'
+        tau_name_DST_3mu=name+'Tau23Mu_DST_3mu'
+        ds23PiTIS_name = name+'Ds23PiTIS'
+        ds23Pi_name=name+'Ds23Pi'
+        ds2PhiPi_name=name+'Ds2PhiPi'
+        ds2PhiPi_name_DST=name+'Ds2PhiPi_DST'
+        tau25_name=name+'Tau25Mu'
+        tau2pmm_name=name+'Tau2PMuMu'
+
+
+
+        self.selTau23Mu = makeTau23Mu(tau_name,config)
+        self.selTau23MuDST = makeTau23MufullDST(tau_name_DST,config)
+        self.selTau23MuDST3mu = makeTau23MufullDST3mu(tau_name_DST_3mu,config)
+        #self.selDs23PiTIS = makeDs23PiTIS(self,ds23PiTIS_name)
+        self.selDs23Pi = makeDs23Pi(ds23Pi_name,config)
+        self.selDs2PhiPi = makeDs2PhiPi(ds2PhiPi_name,config)
+        self.selDs2PhiPi_DST = makeDs2PhiPifullDST(ds2PhiPi_name_DST,config)
+        self.selTau25Mu = makeTau25Mu(tau25_name,config)
+        self.selTau2PMuMu = makeTau2pmm(tau2pmm_name,config)
+
+
+        self.tau23MuLine = StrippingLine(tau_name+"Line",
+                                     prescale = config['TauPrescale'],
+                                     postscale = config['TauPostscale'],
+                                     MDSTFlag = False,
+                                     RequiredRawEvents = ["Muon"],
+                                     algos = [ self.selTau23Mu ],
+                                     RelatedInfoTools = [{ 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.,
+                                     'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                                     'Location':'ConeIsoInfo',
+                                     'DaughterLocations':{'[tau+ -> ^mu+ mu+ mu-]CC' : 'MuonConeVarInfo1', '[tau+ -> mu+ ^mu+ mu-]CC' : 'MuonConeVarInfo2', '[tau+ -> mu+ mu+ ^mu-]CC' : 'MuonConeVarInfo3'}
+                                     },
+                                     {'Type': 'RelInfoVertexIsolation',
+                                     'Location':'VtxIsoInfo' },
+                                     { 'Type': 'RelInfoTrackIsolationBDT',
+                                     'Variables' : 0,
+                                     'Location':'TrackIsoInfo',
+                                     'DaughterLocations':{'[tau+ -> ^mu+ mu+ mu-]CC' : 'MuonTrackIsoBDTInfo1', '[tau+ -> mu+ ^mu+ mu-]CC' : 'MuonTrackIsoBDTInfo2', '[tau+ -> mu+ mu+ ^mu-]CC' : 'MuonTrackIsoBDTInfo3'}
+                                     },
+                                     { "Type" : "RelInfoTrackIsolationBDT2",
+                                     "Location" : "TrackIsolationBDT2_01",
+                                     "Particles" : [0,1]
+                                     },
+                                     { "Type" : "RelInfoTrackIsolationBDT2",
+                                     "Location" : "TrackIsolationBDT2_02",
+                                     "Particles" : [0,2]
+                                     },
+                                     { "Type" : "RelInfoTrackIsolationBDT2",
+                                     "Location" : "TrackIsolationBDT2_12",
+                                     "Particles" : [1,2]
+                                     },
+                                     { "Type" : "RelInfoMuonIDPlus",
+                                     "Variables" : ["MU_BDT"],
+                                     'DaughterLocations':{'[tau+ -> ^mu+ mu+ mu-]CC' : 'Muon1BDT', '[tau+ -> mu+ ^mu+ mu-]CC' : 'Muon2BDT', '[tau+ -> mu+ mu+ ^mu-]CC' : 'Muon3BDT'}
+                                     }
+                                     ]
+                                     )
+
+        self.tau23MuLineDST = StrippingLine(tau_name_DST+"Line",
+                                     prescale = config['TauPrescale'],
+                                     postscale = config['TauPostscale'],
+                                     MDSTFlag = False,
+                                     RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ X+ ->  ^mu+ mu+ mu- ]CC" : "Muon1BDT",
+                                         "[ X+ ->  mu+ ^mu+ mu- ]CC" : "Muon2BDT",
+                                         "[ X+ ->  mu+ mu+ ^mu- ]CC" : "Muon3BDT",
+                                         }
+                                         },
+                                     ],
+                                     algos = [ self.selTau23MuDST ],
+                                     )
+
+        self.tau23MuLineDST3mu = StrippingLine(tau_name_DST_3mu+"Line",
+                                     prescale = config['TauPrescale'],
+                                     postscale = config['TauPostscale'],
+                                     MDSTFlag = False,
+                                     RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                     RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ X+ ->  ^mu+ mu+ mu- ]CC" : "Muon1BDT",
+                                         "[ X+ ->  mu+ ^mu+ mu- ]CC" : "Muon2BDT",
+                                         "[ X+ ->  mu+ mu+ ^mu- ]CC" : "Muon3BDT",
+                                         }
+                                         },
+                                     ],
+                                     algos = [ self.selTau23MuDST3mu ],
+                                     )
+
+        #self.ds23PiTISLine = StrippingLine(ds23PiTIS_name+"Line",
+        #                              prescale = config['Ds23PiTISPrescale'],
+        #                              postscale = config['TauPostscale'],
+        #                              algos = [ self.selDs23PiTIS ]
+        #                              )
+
+        self.ds23PiLine = StrippingLine(ds23Pi_name+"Line",
+                                      prescale = config['Ds23PiPrescale'],
+                                      postscale = config['TauPostscale'],
+                                      MDSTFlag = False,
+                                      #RequiredRawEvents = [ ],
+                                      algos = [ self.selDs23Pi ]
+                                      )
+
+        self.ds2PhiPiLine = StrippingLine(ds2PhiPi_name+"Line",
+                                          prescale = config['Ds2PhiPiPrescale'],
+                                          postscale = config['TauPostscale'],
+                                          MDSTFlag = False,
+                                          #RequiredRawEvents = ["Calo"],
+                                          algos = [ self.selDs2PhiPi ],
+                                          RelatedInfoTools = [{ 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.,
+                                          'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                                          'Location':'ConeIsoInfo',
+                                          'DaughterLocations':{'[D_s+  -> ^pi+  mu+ mu-]CC' : 'PionConeVarInfo', '[D_s+  -> pi+  ^mu+ mu-]CC' : 'MuonConeVarInfo1', '[D_s+  -> pi+  mu+ ^mu-]CC' : 'MuonConeVarInfo2'}
+                                          },
+                                          {'Type': 'RelInfoVertexIsolation',
+                                          'Location':'VtxIsoInfo' },
+                                          { 'Type': 'RelInfoTrackIsolationBDT',
+                                          'Variables' : 0,
+                                          'Location':'TrackIsoInfo',
+                                          'DaughterLocations':{'[D_s+  -> ^pi+  mu+ mu-]CC' : 'PionTrackIsoBDTInfo', '[D_s+  -> pi+  ^mu+ mu-]CC' : 'MuonTrackIsoBDTInfo1', '[D_s+  -> pi+  mu+ ^mu-]CC' : 'MuonTrackIsoBDTInfo2'}
+                                          },
+                                          { "Type" : "RelInfoTrackIsolationBDT2",
+                                          "Location" : "TrackIsolationBDT2_01",
+                                          "Particles" : [0,1]
+                                          },
+                                          { "Type" : "RelInfoTrackIsolationBDT2",
+                                          "Location" : "TrackIsolationBDT2_02",
+                                          "Particles" : [0,2]
+                                          },
+                                          { "Type" : "RelInfoTrackIsolationBDT2",
+                                          "Location" : "TrackIsolationBDT2_12",
+                                          "Particles" : [1,2]
+                                          },
+                                          { "Type" : "RelInfoMuonIDPlus",
+                                          "Variables" : ["MU_BDT"],
+                                          "DaughterLocations"  : {
+                                          "[ X ->  ^mu+ mu- X ]CC" : "Muon1BDT",
+                                          "[ X ->  mu+ ^mu- X ]CC" : "Muon2BDT",
+                                          }
+                                          },
+                                          ]
+                                      )
+
+        self.ds2PhiPiLineDST = StrippingLine(ds2PhiPi_name_DST+"Line",
+                                          prescale = config['Ds2PhiPiPrescale'],
+                                          postscale = config['TauPostscale'],
+                                          MDSTFlag = False,
+                                          RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
+                                          #RequiredRawEvents = ["Calo"],
+                                          RelatedInfoTools = [
+                                             { "Type" : "RelInfoMuonIDPlus",
+                                             "Variables" : ["MU_BDT"],
+                                             "DaughterLocations"  : {
+                                             "[ X ->  ^mu+ mu- X ]CC" : "Muon1BDT",
+                                             "[ X ->  mu+ ^mu- X ]CC" : "Muon2BDT",
+                                             }
+                                             },
+                                          ],
+                                          algos = [ self.selDs2PhiPi_DST ],
+                                          )
+
+        self.tau25MuLine = StrippingLine(tau25_name+"Line",
+                                         prescale = config['Tau25Prescale'],
+                                         postscale = config['TauPostscale'],
+                                         MDSTFlag = False,
+                                         #RequiredRawEvents = [ ],
+                                         RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ X ->  ^mu+ mu+ mu+ mu- mu- ]CC" : "Muon1BDT",
+                                         "[ X ->  mu+ ^mu+ mu+ mu- mu- ]CC" : "Muon2BDT",
+                                         "[ X ->  mu+ mu+ ^mu+ mu- mu- ]CC" : "Muon3BDT",
+                                         "[ X ->  mu+ mu+ mu+ ^mu- mu- ]CC" : "Muon4BDT",
+                                         "[ X ->  mu+ mu+ mu+ mu- ^mu- ]CC" : "Muon5BDT",
+                                         }
+                                         },
+                                         ],
+                                         algos = [ self.selTau25Mu ]
+                                         )
+
+        self.tau2PMuMuLine = StrippingLine(tau2pmm_name+"Line",
+                                           prescale = config['Tau2PMuMuPrescale'],
+                                           postscale = config['TauPostscale'],
+                                           MDSTFlag = False,
+                                           #RequiredRawEvents = ["Calo"],
+                                           algos = [ self.selTau2PMuMu ] ,
+                                           RelatedInfoTools = [{ 'Type' : 'RelInfoConeVariables', 'ConeAngle' : 1.,
+                                           'Variables' : ['CONEANGLE', 'CONEMULT', 'CONEPT', 'CONEPTASYM'],
+                                           'Location':'ConeIsoInfo',
+                                           'DaughterLocations':{"[[ tau+ -> ^p+ mu+ mu- ]CC, [ tau+ -> ^p~- mu+ mu+ ]CC, [ Lambda_c+ -> ^p+ mu+ mu- ]CC, [ Lambda_c+ -> ^p~- mu+ mu+ ]CC]" : 'ProtonConeVarInfo', "[[ tau+ -> p+ ^mu+ mu- ]CC, [ tau+ -> p~- ^mu+ mu+ ]CC, [ Lambda_c+ -> p+ ^mu+ mu- ]CC, [ Lambda_c+ -> p~- ^mu+ mu+ ]CC]" : 'MuonConeVarInfo1', "[[ tau+ -> p+ mu+ ^mu- ]CC, [ tau+ -> p~- mu+ ^mu+ ]CC, [ Lambda_c+ -> p+ mu+ ^mu- ]CC, [ Lambda_c+ -> p~- mu+ ^mu+ ]CC]" : 'MuonConeVarInfo2'}
+                                           },
+
+                                           {'Type': 'RelInfoVertexIsolation',
+                                           'Location':'VtxIsoInfo' },
+                                           { 'Type': 'RelInfoTrackIsolationBDT',
+                                           'Variables' : 0,
+                                           'Location':'TrackIsoInfo',
+                                           'DaughterLocations':{"[[ tau+ -> ^p+ mu+ mu- ]CC, [ tau+ -> ^p~- mu+ mu+ ]CC, [ Lambda_c+ -> ^p+ mu+ mu- ]CC, [ Lambda_c+ -> ^p~- mu+ mu+ ]CC]" : 'ProtonTrackIsoBDTInfo', "[[ tau+ -> p+ ^mu+ mu- ]CC, [ tau+ -> p~- ^mu+ mu+ ]CC, [ Lambda_c+ -> p+ ^mu+ mu- ]CC, [ Lambda_c+ -> p~- ^mu+ mu+ ]CC]" : 'MuonTrackIsoBDTInfo1', "[[ tau+ -> p+ mu+ ^mu- ]CC, [ tau+ -> p~- mu+ ^mu+ ]CC, [ Lambda_c+ -> p+ mu+ ^mu- ]CC, [ Lambda_c+ -> p~- mu+ ^mu+ ]CC]" : 'MuonTrackIsoBDTInfo2'}
+                                           },
+                                           { "Type" : "RelInfoTrackIsolationBDT2",
+                                           "Location" : "TrackIsolationBDT2",
+                                           "Particles" : [1,2]
+                                           }
+                                           ]
+                                           )
+
+        self.registerLine(self.tau23MuLine)
+        self.registerLine(self.tau23MuLineDST)
+        self.registerLine(self.tau23MuLineDST3mu)
+        #self.registerLine(self.ds23PiTISLine)
+        self.registerLine(self.ds23PiLine)
+        self.registerLine(self.ds2PhiPiLine)
+        self.registerLine(self.ds2PhiPiLineDST)
+        self.registerLine(self.tau25MuLine)
+        self.registerLine(self.tau2PMuMuLine)
+
+
+def makeTau23Mu(name, config):
+    """
+    Please contact Marcin Chrzaszcz if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    Tau2MuMuMu = Combine3Particles(\
+               DecayDescriptor = " [ tau+ -> mu+ mu+ mu- ]cc",
+               DaughtersCuts = { "mu+" : " ( PT > 300 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) "\
+                                 "& ( BPVIPCHI2 () >  9 ) " % config},
+               Combination12Cut = "(AM< 2000*MeV) & (AM >240*MeV) ", #"(ADAMASS('tau+')<400*MeV)" -> 1778+400  and then -100 for muon rest mass
+               CombinationCut = "(ADAMASS('tau+')<200*MeV) & ( ANUM ( ( 'mu-' == ABSID ) & ISMUON )> 1.5  )", # requiring 2 IsMuon
+               MotherCut = """
+            ( VFASPF(VCHI2) < 15 ) &
+            ( (BPVLTIME () * c_light)   > 100 * micrometer ) &
+            ( BPVIPCHI2() < 225 )
+            """
+            )
+
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Tau2MuMuMu,
+                      RequiredSelections = [ _stdNoPIDLooseMuons ])
+
+
+def makeTau23MufullDST(name, config):
+    """
+    Tightened by Vitalii Lisovskyi to squeeze it to the DST limits. This is a clone of the MDST line, not a replacement.
+    """
+
+    Tau2MuMuMuDST = Combine3Particles(\
+               DecayDescriptor = " [ tau+ -> mu+ mu+ mu- ]cc",
+               DaughtersCuts = { "mu+" : " ( PT > 300 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) "\
+                                 "& ( BPVIPCHI2 () >  10 ) " % config},
+               Combination12Cut = "(AM< 2000*MeV) & (AM >240*MeV) & (ACUTDOCACHI2(9,''))", #"(ADAMASS('tau+')<400*MeV)" -> 1778+400  and then -100 for muon rest mass
+               #CombinationCut = "(ADAMASS('tau+')<200*MeV) & ( ANUM ( ( 'mu-' == ABSID ) & ISMUON )> 1.5  ) & ( ANUM ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 1.5  )", # requiring at least 2 IsMuon and 1 ProbNNmu>0.1
+               CombinationCut = "(ADAMASS('tau+')<200*MeV) & ( ANUM ( ( 'mu-' == ABSID ) & ISMUON )> 1.5  ) & ( ANUM ( ( 'mu-' == ABSID )  & (PROBNNmu*(1-PROBNNpi)*(1-PROBNNk)>0.11) )> 1.5  )", # requiring at least 2 IsMuon and 1 ProbNNmu>0.1 #& ( TrMATCHCHI2<20 )
+
+               #CombinationCut = "( ANUM (( 'mu-' == ABSID ) & (MUONCHI2CORRELATED<500))> 1.5 )", # (ADAMASS('tau+')<200*MeV) & ( ANUM ( ( 'mu-' == ABSID ) & ISMUON )> 1.5  ) &
+               MotherCut = """
+            ( VFASPF(VCHI2) < 9 ) &
+            ( (BPVLTIME () * c_light)   > 100 * micrometer ) &
+            ( BPVIPCHI2() < 225 ) &
+            ( BPVDIRA > 0.9995 )
+            """
+            )
+
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Tau2MuMuMuDST,
+                      RequiredSelections = [ _stdNoPIDLooseMuons ])
+
+def makeTau23MufullDST3mu(name, config):
+    """
+    Changed by Vitalii Lisovskyi to squeeze it to the DST limits. This is a clone of the MDST line, not a replacement.
+    """
+
+    Tau2MuMuMuDST = Combine3Particles(\
+               DecayDescriptor = " [ tau+ -> mu+ mu+ mu- ]cc",
+               DaughtersCuts = { "mu+" : " ( PT > 290 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ISMUON "\
+                                 "& ( BPVIPCHI2 () >  9 ) " % config},
+               Combination12Cut = "(AM< 2000*MeV) & (AM >240*MeV) & ( ANUM ( PT>350*MeV )> 0.5  )  ", #"(ADAMASS('tau+')<400*MeV)" -> 1778+400  and then -100 for muon rest mass
+               #CombinationCut = "(ADAMASS('tau+')<200*MeV) & ( ANUM ( ( 'mu-' == ABSID ) & ISMUON )> 1.5  ) & ( ANUM ( ( 'mu-' == ABSID ) & (PROBNNmu>0.1) )> 1.5  )", # requiring at least 2 IsMuon and 1 ProbNNmu>0.1
+               CombinationCut = "(ADAMASS('tau+')<200*MeV) & ( ANUM ( ( 'mu-' == ABSID ) & ISMUON )==3  )  ", # requiring at least 2 IsMuon and 1 ProbNNmu>0.1 #& ( TrMATCHCHI2<20 )
+
+               #CombinationCut = "( ANUM (( 'mu-' == ABSID ) & (MUONCHI2CORRELATED<500))> 1.5 )", # (ADAMASS('tau+')<200*MeV) & ( ANUM ( ( 'mu-' == ABSID ) & ISMUON )> 1.5  ) &
+               MotherCut = """
+            ( VFASPF(VCHI2) < 12 ) &
+            ( (BPVLTIME () * c_light)   > 100 * micrometer ) &
+            ( BPVIPCHI2() < 500 ) &
+            ( BPVDIRA > 0.995 )
+            """
+            )
+
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Tau2MuMuMuDST,
+                      RequiredSelections = [ _stdNoPIDLooseMuons ])
+
+def makeDs23Pi(name, config):
+    """
+    Please contact Marcin Chrzaszcz if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    Ds2PiPiPi = Combine3Particles(\
+              DecayDescriptor = " [ D_s+  -> pi+ pi+ pi- ]cc " ,
+              DaughtersCuts = { "pi+" : " ( PT > 300 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) " % config},
+              Combination12Cut = "AM('D_s+')<1920*MeV)", #"(ADAMASS('D_s+')<80*MeV)" -> 1970+80 = 2050 and then minus 130 for pion rest mass
+              CombinationCut = "(ADAMASS('D_s+')<80*MeV)",
+              MotherCut = """
+            ( VFASPF(VCHI2) < 15 ) &
+            ( (BPVLTIME () * c_light)   > 100 * micrometer ) &
+            ( BPVIPCHI2() < 225 )
+            """
+              )
+
+    _stdLoosePions = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+
+    return Selection (name,
+                      Algorithm = Ds2PiPiPi,
+                      RequiredSelections = [ _stdLoosePions ])
+
+def makeDs23PiTIS(self, name, config):
+    """
+    Please contact Marcin Chrzaszcz if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+    def makeTISTOS( name, _input, _trigger ) :
+            from Configurables import TisTosParticleTagger
+            _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+            _tisTosFilter.TisTosSpecs = { _trigger : 0 }
+            #_tisTosFilter.ProjectTracksToCalo = False
+            #_tisTosFilter.CaloClustForCharged = False
+            #_tisTosFilter.CaloClustForNeutral = False
+            #_tisTosFilter.TOSFrac = { 4:0.0, 5:0.0 }
+            return Selection( name
+                              , Algorithm = _tisTosFilter
+                              , RequiredSelections = [ _input ]
+                              )
+
+    self.combDs2pipipi=makeDs23Pi(name, config)
+
+    self.selDs23PiHlt1TIS = makeTISTOS( self.name() + "Ds23PiHlt1TIS"
+                                        , self.combDs2pipipi#makeDs23Pi#self.combPiPiPi
+                                        , "Hlt1.*Decision%TIS"
+                                        )
+    self.selDs23PiHlt2TIS = makeTISTOS( self.name() + "Ds23PiHlt2TIS"
+                                        , self.selDs23PiHlt1TIS
+                                        , "Hlt2.*Decision%TIS"
+                                        )
+
+    return self.selDs23PiHlt2TIS
+
+#    return Selection (name,
+#                      Algorithm = Ds2PiPiPiTIS,
+#                      RequiredSelections = [ Ds2PiPiPi ])
+
+
+def makeDs2PhiPi(name, config):
+    """
+    Please contact Marcin Chrzaszcz if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    Ds2PhiPi = Combine3Particles(\
+             DecayDescriptor =   " [ D_s+  -> mu+  mu- pi+ ]cc ",
+             DaughtersCuts = { "pi+" : " ( PT > 300 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) " % config,
+                               "mu+" : " ( PT > 300 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) " % config},
+             Combination12Cut = " in_range ( 970 * MeV , AM , 1070 * MeV ) &  (0.5 < ANUM ( ( 'mu-' == ABSID ) & ISMUON )) ",
+             CombinationCut = "(ADAMASS('D_s+')<250*MeV)", # & in_range ( 970 * MeV , AM12 , 1070 * MeV )"
+             MotherCut = """
+            ( VFASPF(VCHI2) < 15 ) &
+            ( (BPVLTIME () * c_light)   >100 * micrometer ) &
+            ( BPVIPCHI2() < 225 )
+            """
+            )
+
+    _stdLoosePions = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+
+
+    return Selection (name,
+                      Algorithm = Ds2PhiPi,
+                      RequiredSelections = [ _stdLooseMuons, _stdLoosePions ])
+
+def makeDs2PhiPifullDST(name, config):
+    """
+    Clone of the MDST line which will go to the DST. Changed a bit to improve consistency with the tau->3mu DST line.
+    """
+
+    Ds2PhiPi = Combine3Particles(\
+             DecayDescriptor =   " [ D_s+  -> mu+  mu- pi+ ]cc ",
+             DaughtersCuts = { "pi+" : " ( PT > 300 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) " % config,
+                               "mu+" : " ( PT > 300 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) " % config},
+             Combination12Cut = " in_range ( 970 * MeV , AM , 1070 * MeV ) &  (0.5 < ANUM ( ( 'mu-' == ABSID ) & ISMUON & (PROBNNmu > 0.1) )) ",
+             CombinationCut = "(ADAMASS('D_s+')<250*MeV)", # & in_range ( 970 * MeV , AM12 , 1070 * MeV )"
+             MotherCut = """
+            ( VFASPF(VCHI2) < 16 ) &
+            ( (BPVLTIME () * c_light)   >100 * micrometer ) &
+            ( BPVIPCHI2() < 225 ) &
+            ( BPVDIRA > 0.995 )
+            """
+            )
+
+    _stdLoosePions = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+
+
+
+    return Selection (name,
+                      Algorithm = Ds2PhiPi,
+                      RequiredSelections = [ _stdLooseMuons, _stdLoosePions ])
+
+
+def makeTau25Mu(name, config):
+    """
+    Edited by Vitalii Lisovskyi to loosen the cuts. The original version survives in the old stripping campaigns.
+
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    Tau2MuMuMuMuMu = Combine5Particles(\
+                   DecayDescriptor = " [ tau+ -> mu+ mu+ mu+ mu- mu-]cc",
+                   DaughtersCuts = { "mu+" : " ( PT > 150 * MeV ) & ( TRGHOSTPROB < %(TrackGhostProb)s ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  4 ) " % config }, # was 300 MeV, ipchi2 > 9
+                   Combination12Cut = "AM<1878*MeV",   # 1778 + 400 - 3*100
+                   Combination123Cut = "(AM<1978*MeV) & ( ANUM ( ( 'mu-' == ABSID ) & ISMUON )> 0.5)",   # 1778 + 400 - 2*100
+                   Combination1234Cut = "(AM<2078*MeV) & ( ANUM ( ( 'mu-' == ABSID ) & ISMUON )> 1.5)",   # 1778 + 400 - 1*100  
+                   CombinationCut = "(ADAMASS('tau+')<400*MeV) & ( ANUM ( ( 'mu-' == ABSID ) & (ISMUON) & (PROBNNmu>0.1) )> 2.5  )",
+                   MotherCut = "( VFASPF(VCHI2/VDOF) < 30 ) & ( (BPVLTIME() * c_light)  > 36 * micrometer ) & (BPVDIRA > 0.99)"
+            #        """
+            # ( VFASPF(VCHI2) < 30 ) &
+            # ( (BPVLTIME () * c_light)   > 100 * micrometer ) &
+            # ( BPVIPCHI2() < 225 )
+            # """
+                   )
+
+    #_stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+
+    return Selection (name,
+                      Algorithm = Tau2MuMuMuMuMu,
+                      RequiredSelections = [ _stdNoPIDLooseMuons ])
+
+
+def makeTau2pmm(name, config):
+    """
+    Please contact Marcin Chrzaszcz if you think of prescaling this line!
+
+    Arguments:
+    name        : name of the Selection.
+    """
+
+    Tau2PMuMu = Combine3Particles(\
+              DecayDescriptors = [" [ tau+ -> p+ mu+ mu- ]cc"," [ tau+ -> p~- mu+ mu+ ]cc",
+                                  " [ Lambda_c+ -> p+ mu+ mu- ]cc"," [ Lambda_c+ -> p~- mu+ mu+ ]cc" ],
+              DaughtersCuts = { "mu+" : " ( PT > 300 * MeV ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) "\
+                                  "& ( PIDmu > -5 ) & ( (PIDmu - PIDK) > 0 ) & ( TRGHOSTPROB < %(TrackGhostProb)s )"% config,
+                                  "p+" :  " ( PT > 300 * MeV ) & ( TRCHI2DOF < 3  ) & ( BPVIPCHI2 () >  9 ) "\
+                                  "& (PIDp>10) & ( TRGHOSTPROB < %(TrackGhostProb)s )" % config},
+              Combination12Cut = "AM<2340*MeV", # lambda_c mass + 150 - muon mass = 2290 + 150 -100 =
+              CombinationCut = "( (ADAMASS('tau+')<150*MeV) | (ADAMASS('Lambda_c+')<150*MeV) )",
+              MotherCut = """
+            ( VFASPF(VCHI2) < 15 ) &
+            ( (BPVLTIME () * c_light)   > 100 * micrometer ) &
+            ( BPVIPCHI2() < 225 )
+            """
+              )
+
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    _stdLooseProtons = DataOnDemand(Location = "Phys/StdLooseProtons/Particles")
+
+    return Selection (name,
+                      Algorithm = Tau2PMuMu,
+                      RequiredSelections = [ _stdLooseMuons, _stdLooseProtons ])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingTau2LambdaMuLines.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingTau2LambdaMuLines.py
new file mode 100644
index 000000000..db26276c0
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingTau2LambdaMuLines.py
@@ -0,0 +1,130 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Module for construction of tau -->KKMu stripping selections and lines same sing kaons + opposite kaons
+
+
+Exported symbols (use python help!):
+   - 
+'''
+
+__author__ = ['Marcin Chrzaszcz']
+__date__ = '14/12/2012'
+__version__ = '$Revision: 1.0 $'
+
+__all__ = ('Tau2LambdaMuLinesConf',
+           'default_config',
+           'makeTau2LambdaMu'
+         #  'makeTau2KKMuSS',
+           )
+
+default_config={
+    'NAME' : 'Tau2LambdaMu',
+    'WGs'     : [ 'RD' ],
+    'BUILDERTYPE' : 'Tau2LambdaMuLinesConf',
+    'CONFIG' : {
+        'TauPrescale'         :1.,
+        'TauPostscale'        :1.,
+        'Tau2LambdaMuPrescale'  :1.
+        },
+    'STREAMS' : ['Leptonic']
+    }
+    
+
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+#from StrippingSelections.Utils import checkConfig
+from GaudiKernel.PhysicalConstants import c_light
+
+class Tau2LambdaMuLinesConf(LineBuilder) :
+    """
+    Builder  
+    """
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, 
+                 name,
+                 config) :
+
+        LineBuilder.__init__(self, name, config)
+
+        tau2LambdaMu_name = 'Tau2LambdaMu'
+      
+        
+        self.selTau2LambdaMu = makeTau2LambdaMu(tau2LambdaMu_name)
+     #   self.selTau2KKMuSS = makeTau2KKMuSS(tau2KKMuSS_name)
+
+
+
+        self.tau2LambdaMuLine = StrippingLine(tau2LambdaMu_name+"Line",
+                                     prescale = config['TauPrescale'],
+                                     postscale = config['TauPostscale'],
+                                     algos = [ self.selTau2LambdaMu ]
+                                     )
+        self.registerLine(self.tau2LambdaMuLine)
+
+
+def makeTau2LambdaMu(name):
+   
+
+
+    makeLambda = CombineParticles("Lambda")
+    makeLambda.DecayDescriptor =  "[Lambda0 -> p+ pi-]cc"
+    makeLambda.DaughtersCuts = {"pi+": "(ISLONG) & (TRCHI2DOF < 4 ) & (TRGHOSTPROB<0.5) & ( BPVIPCHI2 () >  5 ) "\
+                                 "& (PT>250*MeV) & (PIDpi - PIDK  > -5)",
+                              "p+" :  " ( PT > 250 * MeV ) & ( TRCHI2DOF < 4  ) & ( BPVIPCHI2 () >  5 ) "\
+                                  "& (PIDp>3) & ( TRGHOSTPROB < 0.5 )"
+                             }
+    
+    _pions = DataOnDemand(Location='Phys/StdLoosePions/Particles')
+    _protons = DataOnDemand(Location='Phys/StdLooseProtons/Particles')   
+    
+    makeLambda.CombinationCut =  "(ADAMASS('Lambda0')<100*MeV)"
+    makeLambda.MotherCut = " ( VFASPF(VCHI2) < 10 ) & (MIPCHI2DV(PRIMARY)> 16.) & (ADMASS('Lambda0')<90*MeV)"
+    
+    SelLambda = Selection( name+"SelLambda",    Algorithm= makeLambda,
+                        RequiredSelections=[_pions, _protons] )
+
+
+
+
+
+
+    
+    Tau2LambdaMu = CombineParticles("Comine"+name)
+    Tau2LambdaMu.DecayDescriptors = [" [ tau+ -> Lambda0 mu+ ]cc" ]
+    Tau2LambdaMu.DaughtersCuts = { "mu+" : " ( PT > 300 * MeV ) & ( TRCHI2DOF < 3.  ) & ( BPVIPCHI2 () >  9 ) "\
+                                  "& ( PIDmu > -5 ) & ( (PIDmu - PIDK) > 0 ) & ( TRGHOSTPROB < 0.3 )"
+                                 }
+
+    Tau2LambdaMu.CombinationCut = "( (ADAMASS('tau+')<150*MeV) )"
+
+    Tau2LambdaMu.MotherCut = """
+            ( VFASPF(VCHI2) < 16 ) &
+            ( (BPVLTIME () * c_light)   > 100 * micrometer ) &
+            ( BPVIPCHI2() < 250 )
+            """ 
+                             
+    _stdLooseMuons = DataOnDemand(Location = "Phys/StdLooseMuons/Particles")
+    # _stdLooseLambda1 = DataOnDemand(Location = "Phys/StdLooseLambdaLL/Particles")
+   # _stdLooseLambda2 = DataOnDemand(Location = "Phys/StdLooseLambdaDD/Particles")
+    
+    return Selection (name,
+                      Algorithm = Tau2LambdaMu,
+                      RequiredSelections = [ _stdLooseMuons, SelLambda ])
+ 
+
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingZVTOP.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingZVTOP.py
new file mode 100644
index 000000000..e7267eb2b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/StrippingZVTOP.py
@@ -0,0 +1,419 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Giampi Mancinelli', 'Julien Cogan', 'Justine Serrano']
+
+__date__ = '14/01/2014'
+__version__ = '$Revision: 1.2 $'
+# Stripping lines by G. Mancinelli, J. Cogan using zvtop
+
+"""
+  B->TauTau & High Masses
+  """
+
+config_params =  {
+  'B2TauTau_LinePrescale'      : 1,
+  'B2TauTau_LinePostscale'     : 1,
+  'B2TauTauSS_LinePrescale'      : 1,
+  'B2TauTauSS_LinePostscale'     : 1,
+  'High_LinePrescale'          : 1,
+  'High_LinePostscale'         : 1,
+  'PT_HAD_ALL_FINAL_STATE'        : '1200',  # MeV
+  'PTMAX_HAD_ALL_FINAL_STATE'     : '500',#MeV
+  'P_HAD_ALL_FINAL_STATE'         : '6000', # MeV
+  'IPCHI2_HAD_ALL_FINAL_STATE'    : '40',    # dimensionless
+  'TRACKCHI2_HAD_ALL_FINAL_STATE' : '4',    # dimensionless
+  'PID_HAD_ALL_FINAL_STATE'       : '5',    # dimensionless
+  'TRGHOPROB_HAD_ALL_FINAL_STATE' : '0.4',    # dimensionless
+  #
+  'PT_B_TT'                       : '1900', # MeV
+  'PT_B_TT_HIGH'                  : '2000',# MeV
+  'PT_B_TM'                       : '1900', # MeV
+  'PT_B_TM_HIGH'                  : '2000', # MeV
+  'VCHI2_B'                       :   '90', # dimensionless
+  'FDCHI2_B'                      : '225',  # dimensionless
+  'FD_B'                          : '90',   # mm
+  'DIRA_B'                        : '0.99', # dimensionless
+  'MASS_LOW_B'                    : '2000', # MeV
+  'MASS_HIGH_B'                   : '7000', # MeV (old value: 5750)
+  'MCOR_LOW_B'                    :    '0', # MeV
+  'MCOR_HIGH_B'                   :'10000', # MeV (old value: 7000)
+  'MIPCHI2_B'                     : '16',  # dimensionless
+  'MIPCHI2_B_HIGH'                : '16',   # dimensionless
+  #
+  'PT_TAU'                        : '1250', # MeV
+  'VCHI2_TAU'                     : '12',   # dimensionless
+  'IPCHI2_TAU'                    : '9',    # dimensionless
+  'FDCHI2_TAU'                    : '16',   # dimensionless
+  'FDRHO_TAU'                     : '0.1',  # mm
+  'FDZ_TAU'                       : '2.0',  # mm
+  'DOCA_TAU'                      : '0.4',  # mm
+  'DIRA_TAU'                      : '0.98', # dimensionless
+  'MASS_LOW_TAU'                  : '500',  # MeV
+  'MASS_HIGH_TAU'                 : '1800', # MeV
+#
+  'PT_B_CHILD_BEST'               : '2000', # MeV
+  'P_B_CHILD_BEST'                :'10000', # MeV
+  'IPCHI2_B_CHILD_BEST'           : '16',   # dimensionless
+  'PT_B_TAU_CHILD_BEST'           : '4000', # MeV
+  'IPCHI2_B_TAU_CHILD_BEST'       : '150',   # dimensionless
+  'IPCHI2_B_TAU_CHILD_WORSE'       : '16',   # dimensionless
+  'PT_B_PIONS_TOTAL'              :  '7000',# MeV
+  'B_TAUPI_2NDMINIPS'             :  '20'  # dimensionless
+  #
+#  'RelatedInfoTools'      : [
+#  #1
+#  { "Type" : "RelInfoBstautauMuonIsolationBDT"
+#    , "Variables" : ['BSTAUTAUMUONISOBDTFIRSTVALUE', 'BSTAUTAUMUONISOBDTSECONDVALUE','BSTAUTAUMUONISOBDTTHIRDVALUE']
+#     , "Location"  : "MuonIsolationBDT"
+#    },
+#  #2
+#  { "Type" : "RelInfoBstautauMuonIsolation"
+#    , "Variables" : ['BSTAUTAUMUONISOFIRSTVALUE', 'BSTAUTAUMUONISOSECONDVALUE']
+#     , "Location"  : "MuonIsolation"
+#    },
+#  #3
+#  { "Type" : "RelInfoBstautauTauIsolationBDT"
+#    , "Variables" : ['BSTAUTAUTAUISOBDTFIRSTVALUETAUP', 'BSTAUTAUTAUISOBDTSECONDVALUETAUP','BSTAUTAUTAUISOBDTTHIRDVALUETAUP','BSTAUTAUTAUISOBDTFIRSTVALUETAUM', 'BSTAUTAUTAUISOBDTSECONDVALUETAUM','BSTAUTAUTAUISOBDTTHIRDVALUETAUM']
+#     , "Location"  : "TauIsolationBDT"
+#    },
+#  #4
+#  { "Type" : "RelInfoBstautauTauIsolation"
+#    , "Variables" : ['BSTAUTAUTAUISOFIRSTVALUETAUP', 'BSTAUTAUTAUISOSECONDVALUETAUP','BSTAUTAUTAUISOFIRSTVALUETAUM', 'BSTAUTAUTAUISOSECONDVALUETAUM']
+#     , "Location"  : "TauIsolation"
+#    },
+#  #5
+#
+# { "Type" : "RelInfoBstautauTrackIsolationBDT"
+#    , "Variables" : ['BSTAUTAUTRACKISOBDTFIRSTVALUETAUPPIM', 'BSTAUTAUTRACKISOBDTSECONDVALUETAUPPIM','BSTAUTAUTRACKISOBDTTHIRDVALUETAUPPIM','BSTAUTAUTRACKISOBDTFIRSTVALUETAUPPIP1', 'BSTAUTAUTRACKISOBDTSECONDVALUETAUPPIP1','BSTAUTAUTRACKISOBDTTHIRDVALUETAUPPIP1','BSTAUTAUTRACKISOBDTFIRSTVALUETAUPPIP2', 'BSTAUTAUTRACKISOBDTSECONDVALUETAUPPIP2','BSTAUTAUTRACKISOBDTTHIRDVALUETAUPPIP2','BSTAUTAUTRACKISOBDTFIRSTVALUETAUMPIP','BSTAUTAUTRACKISOBDTSECONDVALUETAUMPIP','BSTAUTAUTRACKISOBDTTHIRDVALUETAUMPIP','BSTAUTAUTRACKISOBDTFIRSTVALUETAUMPIM1','BSTAUTAUTRACKISOBDTSECONDVALUETAUMPIM1','BSTAUTAUTRACKISOBDTTHIRDVALUETAUMPIM1','BSTAUTAUTRACKISOBDTFIRSTVALUETAUMPIM2', 'BSTAUTAUTRACKISOBDTSECONDVALUETAUMPIM2','BSTAUTAUTRACKISOBDTTHIRDVALUETAUMPIM2']
+#     , "Location"  : "TrackIsolationBDT"
+#    },
+#
+#  #6
+#  { "Type" : "RelInfoBstautauTrackIsolation"
+#    , "Variables" : ['BSTAUTAUTRACKISOFIRSTVALUETAUPPIM', 'BSTAUTAUTRACKISOFIRSTVALUETAUPPIP1','BSTAUTAUTRACKISOFIRSTVALUETAUPPIP2', 'BSTAUTAUTRACKISOFIRSTVALUETAUMPIP','BSTAUTAUTRACKISOFIRSTVALUETAUMPIM1', 'BSTAUTAUTRACKISOFIRSTVALUETAUMPIM2']
+#     , "Location"  : "TrackIsolation"
+#    },
+#  #7
+#  { "Type" : "RelInfoBstautauCDFIso"
+#    #, "Variables" : ['BSTAUTAUCDFISO']
+#     , "Location"  : "CDFIso"
+#    },
+#  #8
+#  { "Type" : "RelInfoBstautauZVisoBDT"
+#    , "Variables" : ['ZVISOTAUP','ZVISOTAUM']
+#    , "Location"  : "ZVisoBDT"
+#    }
+#  ]
+}
+
+__all__ = ('ZVTOP_Conf',
+           'default_config')
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles, OfflineVertexFitter
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdNoPIDsKaons, StdNoPIDsPions
+from StandardParticles import StdLoosePions, StdTightPions
+from StandardParticles import StdLooseKaons
+from Configurables import TopoTauAlg,TopoVertexTool
+
+default_name = "ZVTOP"
+
+default_config = {'NAME'       : 'ZVTOP',
+                  'BUILDERTYPE': 'ZVTOP_Conf',
+                  'CONFIG'     : config_params,
+                  'WGs'    : [ 'RD' ],
+                  'STREAMS'     : ['BhadronCompleteEvent']
+                  }
+
+class ZVTOP_Conf(LineBuilder) :
+  """
+  Builder for ZVTOP
+  """
+
+  TauTau_Line    = None
+  High_Line    = None
+
+  __configuration_keys__ = default_config['CONFIG'].keys()
+
+  def __init__(self, name, config):
+    LineBuilder.__init__(self, name, config)
+
+
+    self.selPions        = self._makePions(      name    = "PionsFor"+name,
+                                            config  = config)
+
+    self.selPions_high        = self._makePions_high(      name    = "PionsHighFor"+name,
+                                            config  = config)
+
+    self.rawPions =     DataOnDemand("Phys/StdLoosePions/Particles")
+
+    #
+    self.incTauVertices = self._makeTauVertices(name=name+"_IncTopoVtxFor",
+                                           pionInput   = self.selPions,
+                                           config = config)
+
+    self.incTauVertices_high = self._makeTauVertices(name=name+"_IncTopoVtxHighFor",
+                                           pionInput   = self.selPions_high,
+                                           config = config)
+
+    #
+    self.selTau          = self._filterTau(name       = name+"_TauFilter",
+                                      tauInput   = self.incTauVertices,
+                                      config     = config)
+
+    #
+    self.selHigh          = self._filterHigh(name       = name+"_HighFilter",
+                                        tauInput   = self.incTauVertices_high,
+                                        config     = config)
+
+    #
+    self.selB2TauTau,self.selB2TauTauSS     = self._makeB2TauTau(   name    = name,
+                                                          tauSel  = self.selTau,
+                                                          config  = config)
+    #
+    self.TauTau_Line    = StrippingLine(name+"_TauTau_Line",
+                                        #    self.TauTau_Line    = StrippingLine(name+"_TauTau_Line",
+                                        prescale    = config['B2TauTau_LinePrescale'],
+                                        postscale   = config['B2TauTau_LinePostscale'],
+                                        #                                           selection   = self._makeTOS(name+"_TOSForTauTau",selB2TauTau)
+                                        MDSTFlag = False,
+                                        #RelatedInfoTools = [
+                                        #     { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                        #     { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                        #     { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                        #     { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                        #     { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                        #     { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                        #     { "Type" : "RelInfoVertexIsolation", "Location" : "BVars_VertexIsoInfo",
+                                        #         "DaughterLocations" : {
+                                        #         "[B0 -> ^tau+ tau-]CC" : "TauVars_VertexIsoInfo_0",
+                                        #         "[B0 -> tau+ ^tau-]CC" : "TauVars_VertexIsoInfo_1"
+                                        #       }
+                                        #     }
+                                        #    ],
+                                        selection   = self.selB2TauTau
+                                        )
+
+    self.TauTauSS_Line  = StrippingLine(name+"_TauTauSS_Line",
+                                        #    self.TauTau_Line    = StrippingLine(name+"_TauTau_Line",
+                                        prescale    = config['B2TauTauSS_LinePrescale'],
+                                        postscale   = config['B2TauTauSS_LinePostscale'],
+                                        #                                           selection   = self._makeTOS(name+"_TOSForTauTau",selB2TauTau)
+                                        MDSTFlag = False,
+                                        #RelatedInfoTools = [
+                                        #     { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                        #     { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                        #     { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                        #     { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                        #     { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                        #     { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                        #     { "Type" : "RelInfoVertexIsolation", "Location" : "BVars_VertexIsoInfo",
+                                        #         "DaughterLocations" : {
+                                        #         "[B0 -> ^tau+ tau+]CC" : "TauVars_VertexIsoInfo_0",
+                                        #         "[B0 -> tau+ ^tau+]CC" : "TauVars_VertexIsoInfo_1"
+                                        #       }
+                                        #     }
+                                        #    ],
+                                        selection   = self.selB2TauTauSS
+                                        )
+
+    self.High_Line    = StrippingLine(name+"_High_Line",
+                                      prescale    = config['High_LinePrescale'],
+                                      postscale   = config['High_LinePostscale'],
+                                      #                                           selection   = self._makeTOS(name+"_TOSForTauTau",selB2TauTau)
+                                      MDSTFlag = False,
+                                        #RelatedInfoTools = [
+                                        #     { "Type" : "RelInfoBstautauTauIsolationBDT", "Location"  : "TauIsolationBDT" },
+                                        #     { "Type" : "RelInfoBstautauTauIsolation",  "Location"  : "TauIsolation"  },
+                                        #     { "Type" : "RelInfoBstautauTrackIsolationBDT" ,  "Location"  : "TrackIsolationBDT" },
+                                        #     { "Type" : "RelInfoBstautauTrackIsolation" , "Location"  : "TrackIsolation"},
+                                        #     { "Type" : "RelInfoBstautauCDFIso" , "Location"  : "CDFIso"  },
+                                        #     { "Type" : "RelInfoBstautauZVisoBDT" , "Location"  : "ZVisoBDT"},
+                                        #     { "Type" : "RelInfoVertexIsolation", "Location" :  "Vars_VertexIsoInfo"}
+                                        #    ],
+                                      selection   = self.selHigh
+                                      )
+
+    #
+    self.registerLine( self.TauTau_Line )
+    self.registerLine( self.TauTauSS_Line )
+    self.registerLine( self.High_Line )
+
+  #####################################################
+  def _makePions(self, name, config) :
+    """
+    Pion selection
+    """
+    _code = "(MIPCHI2DV(PRIMARY) >25) & (TRGHOSTPROB < 0.3) "
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdLoosePions ] )
+
+  #####################################################
+  def _makePions_high(self, name, config) :
+    """
+    Pion selection
+    """
+    _code = "(MIPCHI2DV(PRIMARY) >25) & (TRGHOSTPROB < 0.3) "
+
+    _Filter = FilterDesktop(Code = _code)
+
+    return Selection(name,
+                     Algorithm          = _Filter,
+                     RequiredSelections = [ StdNoPIDsPions ] )
+
+  #####################################################
+  def _filterHigh(self, name, tauInput, config) :
+    """
+    Tau filter
+    """
+
+#    _cut = "(M > 10000.*MeV) & (BPVVDZ > 3*mm) & (PT > 2000*MeV) & (VFASPF(VCHI2PDOF) < 12)"
+    _cut = "(M > 10000.*MeV) & (BPVVDZ > 3*mm) & (PT > 3000*MeV) "
+
+
+    #    _filter   = FilterDesktop( Code = _cut, Preambulo = _preambulo)
+    _filter   = FilterDesktop( Code = _cut)
+
+    return Selection(name,
+                     Algorithm = _filter,
+                     RequiredSelections = [tauInput]
+                     )
+
+  #####################################################
+  def _filterTau(self, name, tauInput, config) :
+    """
+    Tau filter
+    """
+    #    _cut =       "(PT>1000.*MeV) & (M>500.*MeV) & (M<2000.*MeV) & (BPVDIRA>0.99) & (VFASPF(VCHI2) < 16) & (BPVVDCHI2>16) & (BPVVDRHO>0.1*mm) & (BPVVDRHO<7.0*mm) & (BPVVDZ>5.0*mm)"#" & (AMAXDOCA('')<0.2*mm) & (ANUM(PT > 800*MeV))
+
+    _cut = " (BPVVDZ>5.0*mm) &  (BPVDIRA>0.99)"
+
+    _preambulo = [ "c1c2c3 = ('pi+') == ABSID" ,
+                   "ipsm    = MINTREE( c1c2c3 , MIPCHI2DV(PRIMARY) )"]
+
+    _filter   = FilterDesktop( Code = _cut, Preambulo = _preambulo)
+    #    _filter   = FilterDesktop( Code = _cut)
+
+    return Selection(name,
+                     Algorithm = _filter,
+                     RequiredSelections = [tauInput]
+                     )
+
+  #####################################################
+  def _makeTauVertices(self, name, pionInput, config) :
+    """
+    Run IncTopovertices search
+    """
+    _localTopoTauAlg = TopoTauAlg('TopoTauFor'+name)
+    _localTopoTauAlg.addTool(TopoVertexTool)
+    _localTopoTauAlg.TopoVertexTool.VertexFunctionToolName = "VertexFunctionToolRootMini"
+    _localTopoTauAlg.TopoVertexTool.VertexFunctionToolType = "VertexFunctionToolRootMini"
+    _localTopoTauAlg.TopoVertexTool.TwoTracksVtxChi2Max        = 10.
+    _localTopoTauAlg.TopoVertexTool.TwoTracksVtxVfMin =  0.1
+    _localTopoTauAlg.TopoVertexTool.TwoTracksVtxVfRatioMin =  0.8
+    _localTopoTauAlg.TopoVertexTool.TrackVtxChi2Max            = 20.
+    _localTopoTauAlg.TopoVertexTool.MaxFinderStep              = 0.01
+    _localTopoTauAlg.TopoVertexTool.MaxFinderMinGradientMag    = 0.1
+    _localTopoTauAlg.TopoVertexTool.MaxFinderMaxIteration      = 8000
+    _localTopoTauAlg.TopoVertexTool.MaxFinderMinStep           = 0.01
+    _localTopoTauAlg.TopoVertexTool.MaxFinderMaxjump           = 5
+    _localTopoTauAlg.TopoVertexTool.ResolverCut                = 0.35
+    _localTopoTauAlg.TopoVertexTool.ResolverMinStep            = 0.001
+    _localTopoTauAlg.TopoVertexTool.ResolverMaxIteration       = 8
+##     _localTopoTauAlg.TopoVertexTool.VertexFunctionToolName = "VertexFunctionToolStarMax"
+##     _localTopoTauAlg.TopoVertexTool.VertexFunctionToolType = "VertexFunctionToolStarMax"
+##     _localTopoTauAlg.TopoVertexTool.TwoTracksVtxChi2Max        = 1.5
+##     _localTopoTauAlg.TopoVertexTool.TwoTracksVtxVfMin =  0.4
+##     _localTopoTauAlg.TopoVertexTool.TwoTracksVtxVfRatioMin =  0.7
+##     _localTopoTauAlg.TopoVertexTool.TrackVtxChi2Max            = 12.
+##     _localTopoTauAlg.TopoVertexTool.MaxFinderStep              = 0.01
+##     _localTopoTauAlg.TopoVertexTool.MaxFinderMinGradientMag    = 0.1
+##     _localTopoTauAlg.TopoVertexTool.MaxFinderMaxIteration      = 8000
+##     _localTopoTauAlg.TopoVertexTool.MaxFinderMinStep           = 0.01
+##     _localTopoTauAlg.TopoVertexTool.MaxFinderMaxjump           = 5
+##     _localTopoTauAlg.TopoVertexTool.ResolverCut                = 0.4
+##     _localTopoTauAlg.TopoVertexTool.ResolverMinStep            = 0.001
+##     _localTopoTauAlg.TopoVertexTool.ResolverMaxIteration       = 8
+
+    _localTopoTauAlg.VFParticlesInputLocation = "Phys/StdAllNoPIDsPions/Particles"
+    _localTopoTauAlg.TopoVertexTool.DistanceCalculatorToolType = "LoKi::DistanceCalculator"
+    _localTopoTauAlg.TopoVertexTool.DistanceCalculatorToolName = "DistanceCalculatorTool"
+    _localTopoTauAlg.TopoVertexTool.TrackVertexerToolType      = "TrackVertexer"
+    _localTopoTauAlg.TopoVertexTool.TrackVertexerToolName      = "TrackVertexerTool"
+#    _localTopoTauAlg.cut_ips = 40.
+#    _localTopoTauAlg.cut_ips_VF = 20.
+#    _localTopoTauAlg.cut_ghost = 0.3
+    _localTopoTauAlg.cut_ntrk = 100
+    _localTopoTauAlg.cut_mass = 10000
+
+    return Selection(name,
+                     Algorithm          = _localTopoTauAlg,
+                     RequiredSelections = [ pionInput ] )
+
+
+  #####################################################
+  def _makeB2TauTau(self, name, tauSel, config):
+
+    preambulo = ["PTRANS = P*sqrt( 1-BPVDIRA**2 )",
+                 "MCOR = sqrt(M**2 + PTRANS**2) + PTRANS",
+                 "allpi = ('pi+') == ABSID ",
+                 "sumpt    = SUMTREE( allpi , PT )"]
+
+    _combcut = "(APT > " + config['PT_B_TT']       + "*MeV) & "\
+               "(AM  > " + config['MASS_LOW_B']    + "*MeV) & "\
+               "(AM  < " + config['MASS_HIGH_B']   + "*MeV)"
+    #    _bcut    = "(PT  > 0)  "
+
+    _bcut    = "(VFASPF(VCHI2PDOF)  <   "   + config['VCHI2_B']       + ") & "\
+               "(BPVVDCHI2          >   "   + config['FDCHI2_B']      + ") & "\
+               "(BPVVD          <   "   + config['FD_B']      + ") & "\
+               "(PT                >   "   + config['PT_B_TT_HIGH']  + "*MeV) & "\
+               "(in_range("+config['MCOR_LOW_B']+"*MeV,MCOR,"+config['MCOR_HIGH_B']+"*MeV))"
+
+    """
+    _bcut    = "(VFASPF(VCHI2PDOF)  <   "   + config['VCHI2_B']       + ") & "\
+    "(BPVDIRA            >   "   + config['DIRA_B']        + ") & "\
+    "(BPVVDCHI2          >   "   + config['FDCHI2_B']      + ") & "\
+    "(BPVVD          <   "   + config['FD_B']      + ") & "\
+    "(PT                >   "   + config['PT_B_TT_HIGH']  + "*MeV) & "\
+    "(INGENERATION((PT   >   "   + config['PT_B_TAU_CHILD_BEST']+ "*MeV),1)) & "\
+    "(INGENERATION((PT   >   "   + config['PT_B_CHILD_BEST']+ "*MeV),2)) & "\
+    "(sumpt >" + config['PT_B_PIONS_TOTAL']+ "*MeV) & "\
+    "(max(CHILD(ipsm,1),CHILD(ipsm,2)) > "   + config['B_TAUPI_2NDMINIPS']+") & "\
+    "(max(CHILD(MIPCHI2DV(PRIMARY),1),CHILD(MIPCHI2DV(PRIMARY),2)) > "   + config['IPCHI2_B_TAU_CHILD_BEST']+") &  "\
+    "(min(CHILD(MIPCHI2DV(PRIMARY),1),CHILD(MIPCHI2DV(PRIMARY),2)) > "   + config['IPCHI2_B_TAU_CHILD_WORSE']+") & "\
+    "(in_range("+config['MCOR_LOW_B']+"*MeV,MCOR,"+config['MCOR_HIGH_B']+"*MeV))"
+    """
+    _CombineTauOS = CombineParticles( DecayDescriptors = ["B0 -> tau+ tau-"],
+                                      CombinationCut   = _combcut,
+                                      MotherCut        = _bcut,
+                                      Preambulo        = preambulo)
+    _CombineTauSS = CombineParticles( DecayDescriptors = ["[B0 -> tau+ tau+]cc"],
+                                      CombinationCut   = _combcut,
+                                      MotherCut        = _bcut,
+                                      Preambulo        = preambulo)
+
+    selTauTauOS = Selection(name+"_TauTau",
+                            Algorithm          = _CombineTauOS,
+                            RequiredSelections = [ tauSel ] )
+
+    selTauTauSS = Selection(name+"_TauTauSS",
+                            Algorithm          = _CombineTauSS,
+                            RequiredSelections = [ tauSel ] )
+
+    return selTauTauOS,selTauTauSS
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/__init__.py
new file mode 100644
index 000000000..b96468676
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingRD/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ('StrippingB2DibaryonMuMu', 'StrippingB2KSKSMuMu', 'StrippingB2KstTauTau', 'StrippingB2LLXBDTSS', 'StrippingB2LLXBDT_Calib', 'StrippingB2MuMuMuMuLines', 'StrippingB2OCMuMu', 'StrippingB2XMuMu', 'StrippingB2XMuTauMuonic', 'StrippingB2XTauTauMuonic', 'StrippingBaryonicLFV', 'StrippingBeauty2MajoLep', 'StrippingBeauty2XGammaExclTDCPV', 'StrippingBu2LLK', 'StrippingKshort2Leptons', 'StrippingLFVLines', 'StrippingMultiLepton', 'StrippingRareBaryonicMuMu', 'StrippingS2Hyperons', 'StrippingSb2PKMuXPi', 'StrippingTau23MuLines')
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB23MuNu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB23MuNu.py
new file mode 100644
index 000000000..ef9def7e0
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB23MuNu.py
@@ -0,0 +1,631 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = 'P. Owen, T.Mombacher'
+__date__ = '11/03/2021'
+__version__ = '$Revision: 2.0 $'
+
+__all__ = ( 'B23MuNuConf', 'default_config' )
+
+"""
+Stripping selection for B to three muons and a neutrino.
+"""
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import  CombineParticles, FilterDesktop
+
+from PhysSelPython.Wrappers import Selection, AutomaticData, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from LHCbKernel.Configuration import *  #check if needed
+from Configurables import SubstitutePID
+from Configurables import SubPIDMMFilter
+
+
+#################
+#
+#  Define Cuts here
+#
+#################
+
+default_config = {
+    'NAME'        : 'B23MuNu',
+    'WGs'         : ['Semileptonic'],
+    'BUILDERTYPE' : 'B23MuNuConf',
+    'CONFIG'      : {
+      #  (dimu) cuts
+      'FlightChi2'      :    30.0,
+      'DIRA'            :   0.99,
+      'BPT'             :  2000.0,
+      'VertexCHI2'      :     4.0,
+      'LOWERMASS'       :     0.0, # MeV
+      'UPPERMASS'       :  7500.0, # MeV
+      'CORRM_MIN'       :  2500.0, # MeV
+      'CORRM_MAX'       : 10000.0, # MeV
+      # Track cuts
+      'Track_CHI2nDOF'      :    3.0,
+      'Track_GhostProb'     :    0.35,  
+
+      # Muon cuts
+      'Muon_MinIPCHI2'   :    9.0,
+      'Muon_PIDmu'       :    0.0,
+      'Muon_PIDmuK'      :    0.0,
+      'Muon_PT'          :    0.0,
+
+      # Electron cuts
+      'Electron_PIDe'       :    2.0,
+      'Electron_PIDeK'      :    0.0,
+      'Electron_MinIPCHI2'  :    25.0,
+      'Electron_PT'         :    200.0,
+
+      # GEC
+      'SpdMult'             :  900,
+
+      'MisIDPrescale'       : 0.01,
+    },
+   'STREAMS'     : ['Semileptonic']   
+}
+
+defaultName = "B23MuNu"
+
+
+class B23MuNuConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    def __init__(self, name, config) :
+
+
+        LineBuilder.__init__(self, name, config)
+
+        self.name = name
+        
+
+        self.TriMuCut = "(BPVCORRM > %(CORRM_MIN)s *MeV) & " \
+                           "(BPVCORRM < %(CORRM_MAX)s *MeV) & " \
+                                "(BPVDIRA > %(DIRA)s) & " \
+                                "(PT > %(BPT)s) & " \
+                                "(BPVVDCHI2 > %(FlightChi2)s) & " \
+                                "(VFASPF(VCHI2/VDOF) < %(VertexCHI2)s) & " \
+                                "(M > %(LOWERMASS)s) & " \
+                                "(M < %(UPPERMASS)s) " %config
+
+        self.TrackCuts = "(TRCHI2DOF < %(Track_CHI2nDOF)s) & (TRGHP < %(Track_GhostProb)s)" \
+                         " & (MIPCHI2DV(PRIMARY) > %(Muon_MinIPCHI2)s) " \
+                         " & (PT > %(Muon_PT)s)" %config
+
+        self.TrackCutsElectron = "(TRCHI2DOF < %(Track_CHI2nDOF)s) & (TRGHP < %(Track_GhostProb)s)" \
+                         " & (MIPCHI2DV(PRIMARY) > %(Electron_MinIPCHI2)s) " \
+                         " & (PT > %(Electron_PT)s)" %config
+
+        
+        self.MuonCut = self.TrackCuts + "& (PIDmu> %(Muon_PIDmu)s) & " \
+                                        " (PIDmu-PIDK> %(Muon_PIDmuK)s)" %config
+
+
+        self.ElectronCut = self.TrackCutsElectron + "& (PIDe> %(Electron_PIDe)s) & " \
+                                        " (PIDe-PIDK> %(Electron_PIDeK)s)" %config
+
+
+        self.Muons = self.__Muons__(config)
+        self.Electrons = self.__Electrons__(config)
+        self.FakeMuons = self.__FakeMuons__(config)
+        self.FakeElectrons = self.__FakeElectrons__(config)
+        self.Jpsi = self.__Jpsi__(config)
+        self.Jpsiee = self.__Jpsiee__(config)
+        self.Trimu = self.__Trimu__(config)
+        self.Trie = self.__Trie__(config)
+        self.MuMue = self.__MuMue__(config)
+        self.Muee = self.__Muee__(config)
+        self.FakeTrimu = self.__FakeTrimu__(config)
+        self.FakeTrie = self.__FakeTrie__(config)
+        self.FakeMuMue = self.__FakeMuMue__(config)
+        self.FakeMuee = self.__FakeMuee__(config)
+
+        RelInfoTools=[
+                { "Type" : "RelInfoMuonIDPlus",
+                    "Variables" : ["MU_BDT"],
+                    "DaughterLocations"  : {
+                    "[B+ -> ^l+ l+ [l-]CC ]CC" : "Muon1BDT",
+                    "[B+ -> l+ ^l+ [l-]CC ]CC" : "Muon2BDT",
+                    "[B+ -> l+ l+ ^[l-]CC ]CC" : "Muon3BDT",
+                    }
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_first',
+                    'Particles' : [0,1]
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_second',
+                    'Particles' : [1,2]
+                }
+        ]        
+
+
+        self.TriMu_line =  StrippingLine(
+            self.name+"_TriMuLine",
+            prescale = 1,
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+            algos=[self.Trimu],
+            RelatedInfoTools = RelInfoTools
+            )
+
+        self.Trie_line =  StrippingLine(
+            self.name+"_TrieLine",
+            prescale = 1,
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+            algos=[self.Trie],
+            RelatedInfoTools = RelInfoTools
+            )
+
+        # specify leptons to identify the muon candidate
+        RelInfoTools=[
+                { "Type" : "RelInfoMuonIDPlus",
+                    "Variables" : ["MU_BDT"],
+                    "DaughterLocations"  : {
+                    "[B+ -> ^[e+]CC mu+ [mu-]CC ]CC" : "Muon1BDT",
+                    "[B+ -> [e+]CC ^mu+ [mu-]CC ]CC" : "Muon2BDT",
+                    "[B+ -> [e+]CC mu+ ^[mu-]CC ]CC" : "Muon3BDT"
+                    }
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_first',
+                    'Particles' : [0,1]
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_second',
+                    'Particles' : [1,2]
+                }
+        ]        
+
+        self.MuMue_line =  StrippingLine(
+            self.name+"_MuMueLine",
+            prescale = 1,
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+            algos=[self.MuMue],
+            RelatedInfoTools = RelInfoTools
+            )
+
+        # specify leptons to identify the muon candidate
+        RelInfoTools=[
+                { "Type" : "RelInfoMuonIDPlus",
+                    "Variables" : ["MU_BDT"],
+                    "DaughterLocations"  : {
+                    "[B+ -> ^[mu+]CC e+ [e-]CC ]CC" : "Muon1BDT",
+                    "[B+ -> [mu+]CC ^e+ [e-]CC ]CC" : "Muon2BDT",
+                    "[B+ -> [mu+]CC e+ ^[e-]CC ]CC" : "Muon3BDT"
+                    }
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_first',
+                    'Particles' : [0,1]
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_second',
+                    'Particles' : [1,2]
+                }
+        ]        
+
+
+        self.Muee_line =  StrippingLine(
+            self.name+"_MueeLine",
+            prescale = 1,
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+            algos=[self.Muee],
+            RelatedInfoTools = RelInfoTools
+            )
+
+
+        RelInfoTools_fake=[
+                { "Type" : "RelInfoMuonIDPlus",
+                    "Variables" : ["MU_BDT"],
+                    "DaughterLocations"  : {
+                    "[B+ -> [J/psi(1S) -> ^l+ [l-]CC ]CC l+]CC" : "Muon1BDT",
+                    "[B+ -> [J/psi(1S) -> l+ ^[l-]CC ]CC l+]CC" : "Muon2BDT",
+                    "[B+ -> [J/psi(1S) -> l+ [l-]CC ]CC ^l+]CC" : "Muon3BDT",
+                    }
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_first',
+                    'Particles' : [1,2]
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_second',
+                    'Particles' : [2,3]
+                }
+        ]        
+
+
+        self.FakeTriMu_line =  StrippingLine(
+            self.name+"_TriFakeMuLine",
+            prescale = config['MisIDPrescale'],
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+            algos=[self.FakeTrimu],
+            RelatedInfoTools = RelInfoTools_fake
+            )
+
+        self.FakeTrie_line =  StrippingLine(
+            self.name+"_TrieFakeLine",
+            prescale = config['MisIDPrescale'],
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+            algos=[self.FakeTrie],
+            RelatedInfoTools = RelInfoTools_fake
+            )
+
+        # specify leptons to identify the muon candidate
+        RelInfoTools_fake_mumue = RelInfoTools_fake
+        # RelInfoTools_fake_mumue[0] = { "Type" : "RelInfoMuonIDPlus",
+        #                     "Variables" : ["MU_BDT"],
+        #                     "DaughterLocations"  : {
+        #                     "[B+ -> [J/psi(1S) -> ^mu+ [mu-]CC ]CC e+]CC" : "Muon1BDT",
+        #                     "[B+ -> [J/psi(1S) -> mu+ ^[mu-]CC ]CC e+]CC" : "Muon2BDT",
+        #                     "[B+ -> [J/psi(1S) -> mu+ [mu-]CC ]CC ^e+]CC" : "Muon3BDT"}
+        #                     }
+        RelInfoTools_fake=[
+                { "Type" : "RelInfoMuonIDPlus",
+                    "Variables" : ["MU_BDT"],
+                    "DaughterLocations"  : {
+                    "[B+ -> [J/psi(1S) -> ^mu+ [mu-]CC ]CC e+]CC" : "Muon1BDT",
+                    "[B+ -> [J/psi(1S) -> mu+ ^[mu-]CC ]CC e+]CC" : "Muon2BDT",
+                    "[B+ -> [J/psi(1S) -> mu+ [mu-]CC ]CC ^e+]CC" : "Muon3BDT"
+                    }
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_first',
+                    'Particles' : [1,2]
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_second',
+                    'Particles' : [2,3]
+                }
+        ]        
+
+
+        self.FakeMuMue_line =  StrippingLine(
+            self.name+"_MuMueFakeLine",
+            prescale = config['MisIDPrescale'],
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+            algos=[self.FakeMuMue],
+            RelatedInfoTools = RelInfoTools_fake
+            )
+
+        # specify leptons to identify the muon candidate
+        RelInfoTools_fake=[
+                { "Type" : "RelInfoMuonIDPlus",
+                    "Variables" : ["MU_BDT"],
+                    "DaughterLocations"  : {
+                    "[B+ -> [J/psi(1S) -> ^e+ [e-]CC ]CC mu+]CC" : "Muon1BDT",
+                    "[B+ -> [J/psi(1S) -> e+ ^[e-]CC ]CC mu+]CC" : "Muon2BDT",
+                    "[B+ -> [J/psi(1S) -> e+ [e-]CC ]CC ^mu+]CC" : "Muon3BDT"
+                    }
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_first',
+                    'Particles' : [1,2]
+                },
+                {'Type' : 'RelInfoTrackIsolationBDT2',
+                    'Location' : 'TrackIsolationBDT2_second',
+                    'Particles' : [2,3]
+                }
+        ]        
+
+
+        self.FakeMuee_line =  StrippingLine(
+            self.name+"_MueeFakeLine",
+            prescale = config['MisIDPrescale'],
+            FILTER = {
+            'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SpdMult)s )" %config ,
+            'Preambulo' : [
+            "from LoKiNumbers.decorators import *", "from LoKiCore.basic import LHCb"
+            ]
+            },
+            algos=[self.FakeMuee],
+            RelatedInfoTools = RelInfoTools_fake
+            )
+
+
+        self.registerLine( self.TriMu_line )
+        self.registerLine( self.Trie_line )
+        self.registerLine( self.Muee_line )
+        self.registerLine( self.MuMue_line )
+        self.registerLine( self.FakeTriMu_line )
+        self.registerLine( self.FakeTrie_line )
+        self.registerLine( self.FakeMuMue_line )
+        self.registerLine( self.FakeMuee_line )
+
+
+
+    def __Muons__(self, conf):
+        """
+        Filter muons from StdAllLooseMuons
+        """  
+        from StandardParticles import StdAllLooseMuons
+        _muons = StdAllLooseMuons
+        _filter = FilterDesktop(Code = self.MuonCut)
+        _sel = Selection("Selection_"+self.name+"_Muons",
+                         RequiredSelections = [ _muons ] ,
+                         Algorithm = _filter)
+        return _sel
+
+    def __Electrons__(self, conf):
+        """
+        Filter Electrons from StdLooseElectrons
+        """  
+        from StandardParticles import StdAllLooseElectrons
+        _electrons = StdAllLooseElectrons
+        _filter = FilterDesktop(Code = self.ElectronCut)
+        _sel = Selection("Selection_"+self.name+"_Electrons",
+                         RequiredSelections = [ _electrons ] ,
+                         Algorithm = _filter)
+        return _sel
+ 
+        
+    def __FakeMuons__(self, conf):
+        """
+        Filter muons from StdAllNoPIDsMuons
+        """  
+        from StandardParticles import StdAllNoPIDsMuons
+        _fakemuons = StdAllNoPIDsMuons
+        _filter = FilterDesktop(Code = self.TrackCuts)
+        _sel = Selection("Selection_"+self.name+"_FakeMuons",
+                         RequiredSelections = [ _fakemuons ] ,
+                         Algorithm = _filter)
+        return _sel
+
+    def __FakeElectrons__(self, conf):
+        """
+        Filter electrons from StdAllNoPIDsElectrons
+        """  
+        from StandardParticles import StdAllNoPIDsElectrons
+        _fakeelectrons = StdAllNoPIDsElectrons
+        _filter = FilterDesktop(Code = self.TrackCutsElectron)
+        _sel = Selection("Selection_"+self.name+"_FakeElectrons",
+                         RequiredSelections = [ _fakeelectrons ] ,
+                         Algorithm = _filter)
+        return _sel
+
+
+    def __Jpsi__(self, conf):
+        """
+        Creates Jpsi as proxy for dimuon
+        """
+        from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand, MergedSelection
+        from  GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        #from Configurables import CombineParticles 
+
+        CombineJpsi= CombineParticles(DecayDescriptors = ["J/psi(1S) -> mu+ mu-","[J/psi(1S) -> mu+ mu+]cc"],                       
+                     MotherCut = "ALL")
+        
+        sel_name = "Jpsi"
+        
+        from PhysSelPython.Wrappers import Selection
+        SelJpsi = Selection("Sel_" + self.name + "_Jpsi", Algorithm = CombineJpsi,
+                              RequiredSelections = [ self.Muons ] )
+        return SelJpsi
+
+    def __Jpsiee__(self, conf):
+        """
+        Creates Jpsi as proxy for dielectron
+        """
+        from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand, MergedSelection
+        from  GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        #from Configurables import CombineParticles 
+
+        CombineJpsi= CombineParticles(DecayDescriptors = ["J/psi(1S) -> e+ e-","[J/psi(1S) -> e+ e+]cc"],                       
+                     MotherCut = "ALL")
+        
+        sel_name = "Jpsi"
+        
+        from PhysSelPython.Wrappers import Selection
+        SelJpsi = Selection("Sel_" + self.name + "_Jpsiee", Algorithm = CombineJpsi,
+                              RequiredSelections = [ self.Electrons ] )
+        return SelJpsi
+
+
+
+    def __Trimu__(self, conf):
+        '''
+        Create trimuon
+        '''
+        from  GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        CombineTriMuon = CombineParticles()
+        CombineTriMuon.DecayDescriptors = ["[B+ -> mu+ mu+ mu-]cc", "[B+ -> mu+ mu+ mu+]cc"]
+        sel_name="TriMu"
+        CombineTriMuon.MotherCut     = self.TriMuCut
+        # choose
+
+        from PhysSelPython.Wrappers import Selection
+        SelTriMuon = Selection("Sel_" + self.name + "_"+sel_name, 
+                              Algorithm = CombineTriMuon,
+                              RequiredSelections = [ self.Muons ] )
+        return SelTriMuon
+   
+    def __Trie__(self, conf):
+        '''
+        Create trielectron
+        '''
+        from  GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        CombineTriMuon = CombineParticles()
+        CombineTriMuon.DecayDescriptors = ["[B+ -> e+ e+ e-]cc", "[B+ -> e+ e+ e+]cc"]
+        sel_name="Trie"
+        CombineTriMuon.MotherCut     = self.TriMuCut
+        # choose
+
+        from PhysSelPython.Wrappers import Selection
+        SelTriMuon = Selection("Sel_" + self.name + "_"+sel_name, 
+                              Algorithm = CombineTriMuon,
+                              RequiredSelections = [ self.Electrons ] )
+        return SelTriMuon
+
+
+    def __MuMue__(self, conf):
+        '''
+        Create MuMue combination
+        '''
+        from  GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        CombineTriMuon = CombineParticles()
+        CombineTriMuon.DecayDescriptors = ["[B+ -> e+ mu+ mu-]cc","[B+ -> mu+ mu+ e-]cc", "[B+ -> mu+ mu+ e+]cc"]
+        sel_name="MuMue"
+        CombineTriMuon.MotherCut     = self.TriMuCut
+        # choose
+
+        from PhysSelPython.Wrappers import Selection
+        SelTriMuon = Selection("Sel_" + self.name + "_"+sel_name, 
+                              Algorithm = CombineTriMuon,
+                              RequiredSelections = [ self.Muons, self.Electrons ] )
+        return SelTriMuon
+
+
+    def __Muee__(self, conf):
+        '''
+        Create Muee combination
+        '''
+        from  GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        CombineTriMuon = CombineParticles()
+        CombineTriMuon.DecayDescriptors = ["[B+ -> mu+ e+ e-]cc", "[B+ -> e+ e+ mu-]cc", "[B+ -> mu+ e+ e+]cc"]
+        sel_name="Muee"
+        CombineTriMuon.MotherCut     = self.TriMuCut
+        # choose
+
+        from PhysSelPython.Wrappers import Selection
+        SelTriMuon = Selection("Sel_" + self.name + "_"+sel_name, 
+                              Algorithm = CombineTriMuon,
+                              RequiredSelections = [ self.Muons, self.Electrons ] )
+        return SelTriMuon
+
+
+    def __FakeTrimu__(self, conf):
+        """
+        Create fake trimuon
+        """
+
+        CombineTriMuon = CombineParticles()
+        CombineTriMuon.DecayDescriptor = "[B+ -> J/psi(1S) mu+]cc"
+        sel_name="FakeTriMu"
+        #CombineTriMuon.CombinationCut = self.TriMuLowQ2CombCut
+        #["[B+ ->mu+ mu+ mu-]cc", "[B+ ->mu+ mu+ mu+]cc"]
+        CombineTriMuon.MotherCut     = self.TriMuCut
+        # choose
+
+        from PhysSelPython.Wrappers import Selection
+        #SelTriMuon = Selection("Sel_" + self.name + "_"+sel_name, Algorithm = CombineTriMuon,
+        #                      RequiredSelections = [self.Jpsi, self.FakeMuon ])
+        SelTriMuon = Selection(sel_name,
+                 Algorithm = CombineTriMuon,
+                 RequiredSelections = [ self.FakeMuons, self.Jpsi ])
+
+
+        return SelTriMuon
+
+    def __FakeTrie__(self, conf):
+        """
+        Create fake trielectron
+        """
+
+        CombineTriMuon = CombineParticles()
+        CombineTriMuon.DecayDescriptor = "[B+ -> J/psi(1S) e+]cc"
+        sel_name="FakeTrie"
+        #CombineTriMuon.CombinationCut = self.TriMuLowQ2CombCut
+        #["[B+ ->mu+ mu+ mu-]cc", "[B+ ->mu+ mu+ mu+]cc"]
+        CombineTriMuon.MotherCut     = self.TriMuCut
+        # choose
+
+        from PhysSelPython.Wrappers import Selection
+        #SelTriMuon = Selection("Sel_" + self.name + "_"+sel_name, Algorithm = CombineTriMuon,
+        #                      RequiredSelections = [self.Jpsi, self.FakeMuon ])
+        SelTriMuon = Selection(sel_name,
+                 Algorithm = CombineTriMuon,
+                 RequiredSelections = [ self.FakeElectrons, self.Jpsiee ])
+
+
+        return SelTriMuon
+
+ 
+    def __FakeMuMue__(self, conf):
+        """
+        Create fake MuMue
+        """
+
+        CombineTriMuon = CombineParticles()
+        CombineTriMuon.DecayDescriptor = "[B+ -> J/psi(1S) e+]cc"
+        sel_name="FakeMuMue"
+        #CombineTriMuon.CombinationCut = self.TriMuLowQ2CombCut
+        #["[B+ ->mu+ mu+ mu-]cc", "[B+ ->mu+ mu+ mu+]cc"]
+        CombineTriMuon.MotherCut     = self.TriMuCut
+        # choose
+
+        from PhysSelPython.Wrappers import Selection
+        #SelTriMuon = Selection("Sel_" + self.name + "_"+sel_name, Algorithm = CombineTriMuon,
+        #                      RequiredSelections = [self.Jpsi, self.FakeMuon ])
+        SelTriMuon = Selection(sel_name,
+                 Algorithm = CombineTriMuon,
+                 RequiredSelections = [ self.FakeElectrons, self.Jpsi ])
+
+
+        return SelTriMuon
+
+    def __FakeMuee__(self, conf):
+        """
+        Create fake Muee
+        """
+
+        CombineTriMuon = CombineParticles()
+        CombineTriMuon.DecayDescriptor = "[B+ -> J/psi(1S) mu+]cc"
+        sel_name="FakeMuee"
+        #CombineTriMuon.CombinationCut = self.TriMuLowQ2CombCut
+        #["[B+ ->mu+ mu+ mu-]cc", "[B+ ->mu+ mu+ mu+]cc"]
+        CombineTriMuon.MotherCut     = self.TriMuCut
+        # choose
+
+        from PhysSelPython.Wrappers import Selection
+        #SelTriMuon = Selection("Sel_" + self.name + "_"+sel_name, Algorithm = CombineTriMuon,
+        #                      RequiredSelections = [self.Jpsi, self.FakeMuon ])
+        SelTriMuon = Selection(sel_name,
+                 Algorithm = CombineTriMuon,
+                 RequiredSelections = [ self.FakeMuons, self.Jpsiee ])
+
+
+        return SelTriMuon
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuForTauMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuForTauMu.py
new file mode 100644
index 000000000..cf555ce39
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuForTauMu.py
@@ -0,0 +1,362 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Selection for B-> D tau nu, tau-> mu analyses
+Author is a strong term - code ripped off shamelessly from the B2DMuX line
+"""
+__author__ = ['Greg Ciezarek']
+__date__ = '05/11/2015'
+__version__ = '$Revision: 2.0 $'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdAllLooseMuons, StdLooseKaons, StdLooseProtons, StdAllLoosePions, StdLooseMergedPi0,StdLooseResolvedPi0,StdAllNoPIDsMuons, StdLooseANNUpPions
+from Configurables import ConjugateNeutralPID
+from PhysSelPython.Wrappers import MergedSelection
+
+__all__ = ('B2DMuForTauMuconf',
+           #'makeb2DMuX',
+           'confdict')
+default_config = {
+    'NAME'        : 'B2DMuForTauMu',
+    'WGs'         : ['Semileptonic'],
+    'BUILDERTYPE' : 'B2DMuForTauMuconf',
+    'CONFIG'      : { 
+         "MINIPCHI2"     : 9.0    # adimensional 
+        ,"GhostProb"     : 0.5    # adimensional  
+        ,"KaonPIDK"      : 4.0    # adimensional
+        ,"ProtonPIDp"    : 0.0    # adimensional
+        ,"PionPIDKTight" : 2.0    # adimensional
+        ,"MuonIPCHI2"    : 16.00  # adimensional
+        ,"KPiPT"         : 300.0  # MeV
+        ,"DSumPT"        : 2500.0 # MeV
+        ,"DsDIRA"        : 0.999  # adimensional
+        ,"DsFDCHI2"      : 25.0   # adimensional
+        ,"DsMassWin"     : 80.0   # MeV
+        ,"DsAMassWin"    : 100.0  # MeV
+        ,"M_MIN"         : 1920.0 # MeV
+        ,"M_MAX"         : 2010.0 # MeV
+        ,"DsVCHI2DOF"    : 4.0    # adimensional
+        ,"PIDmu"         : -200.0 # adimensional
+        ,"BDIRA"         : 0.999  # adimensional
+        ,"BVCHI2DOF"     : 6.0    # adimensional
+        ,"SPDmax"        : 600    # adimensional
+        ,"FakePrescale"  : 1.     # adimensional
+        ,"Hlt2Line"      : "HLT_PASS_RE('Hlt2XcMuXForTauB2XcMuDecision')"    # adimensiional
+        ,"Hlt2LineFake"  : "HLT_PASS_RE('Hlt2XcMuXForTauB2XcFakeMuDecision')"    # adimensiional
+    },
+    'STREAMS'     : ['Semileptonic']    
+}
+
+class B2DMuForTauMuconf(LineBuilder) :
+    """
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.config=config
+
+        
+
+        ############### MUON SELECTIONS ###################
+        self.selmuon = Selection( "Mufor" + name,
+                                  Algorithm = self._muonFilter(),
+                                  RequiredSelections = [StdAllLooseMuons])
+                                  
+                                  
+        self.selFakemuon = Selection( "FakeMufor" + name,
+                                  Algorithm = self._FakemuonFilter(),
+                                  RequiredSelections = [StdAllNoPIDsMuons])                                  
+
+
+        ############### KAON AND PION SELECTIONS ################
+        
+        self.selKaon = Selection( "Kfor" + name,
+                                  Algorithm = self._kaonFilter(),
+                                  RequiredSelections = [StdLooseKaons])
+        
+        self.selPion = Selection( "Pifor" + name,
+                                  Algorithm = self._pionFilter(),
+                                  RequiredSelections = [StdLoosePions])
+                                  
+        
+        self.selProton = Selection( "Pfor" + name,
+                                  Algorithm = self._protonFilter(),
+                                  RequiredSelections = [StdLooseProtons])
+                                                                          
+
+        ################ D0 -> HH SELECTION ##########################
+        
+        self.seld02kpi = Selection( "D02KPifor" + name,
+                                    Algorithm = self._D02KPiFilter(),
+                                    RequiredSelections = [self.selKaon, self.selPion] )
+
+        self.seld02k3pi = Selection( "D02K3Pifor" + name,
+                                    Algorithm = self._D02K3PiFilter(),
+                                    RequiredSelections = [self.selKaon, self.selPion] )
+                                    
+        self.seldp2k2pi = Selection( "Dp2K2Pifor" + name,
+                                    Algorithm = self._Dp2K2PiFilter(),
+                                    RequiredSelections = [self.selKaon, self.selPion] )                                    
+                                    
+        self.selds2kkpi = Selection( "Ds2KKPifor" + name,
+                                    Algorithm = self._Dsp2KKPiFilter(),
+                                    RequiredSelections = [self.selKaon, self.selPion] )
+                                    
+        self.sellc2pkpi = Selection( "Lc2pKPifor" + name,
+                                    Algorithm = self._LcpKPiFilter(),
+                                    RequiredSelections = [self.selKaon, self.selPion, self.selProton] )                                    
+
+        self.selb2D0MuX = makeb2DMuX('b2D0MuX' + name,
+                                     DecayDescriptors = [ '[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+                                     MuSel = self.selmuon, 
+                                     DSel = self.seld02kpi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )
+
+
+        self.selb2D03MuX = makeb2DMuX('b2D0K3piMuX' + name,
+                                     DecayDescriptors = [ '[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+                                     MuSel = self.selmuon, 
+                                     DSel = self.seld02k3pi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )
+
+        self.selb2DpMuX = makeb2DMuX('b2DpMuX' + name,
+                                     DecayDescriptors = [ '[B- -> D+ mu-]cc','[B+ -> D+ mu+]cc'],
+                                     MuSel = self.selmuon, 
+                                     DSel = self.seldp2k2pi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )                
+
+        self.selb2DsMuX = makeb2DMuX('b2DsMuX' + name,
+                                     DecayDescriptors = [ '[B- -> D_s+ mu-]cc','[B+ -> D_s+ mu+]cc'],
+                                     MuSel = self.selmuon, 
+                                     DSel = self.selds2kkpi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )                                     
+                                     
+        self.selb2LcMuX = makeb2DMuX('b2LcMuX' + name,
+                                     DecayDescriptors = [ '[B- -> Lambda_c+ mu-]cc','[B+ -> Lambda_c+ mu+]cc'],
+                                     MuSel = self.selmuon, 
+                                     DSel = self.sellc2pkpi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )                                     
+                                                                          
+        self.selFakeb2D0MuX = makeFakeb2DMuX('b2D0MuXFake' + name,
+                                     DecayDescriptors = [ '[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+                                     FakeMuSel = self.selFakemuon, 
+                                     DSel = self.seld02kpi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )        
+
+
+        self.selFakeb2D03MuX = makeFakeb2DMuX('b2D0K3piMuXFake' + name,
+                                     DecayDescriptors = [ '[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+                                     FakeMuSel = self.selFakemuon, 
+                                     DSel = self.seld02k3pi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )
+
+        self.selFakeb2DpMuX = makeFakeb2DMuX('b2DpMuXFake' + name,
+                                     DecayDescriptors = [ '[B- -> D+ mu-]cc','[B+ -> D+ mu+]cc'],
+                                     FakeMuSel = self.selFakemuon, 
+                                     DSel = self.seldp2k2pi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )                
+
+        self.selFakeb2DsMuX = makeFakeb2DMuX('b2DsMuXFake' + name,
+                                     DecayDescriptors = [ '[B- -> D_s+ mu-]cc','[B+ -> D_s+ mu+]cc'],
+                                     FakeMuSel = self.selFakemuon, 
+                                     DSel = self.selds2kkpi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )                                     
+                                     
+        self.selFakeb2LcMuX = makeFakeb2DMuX('b2LcMuXFake' + name,
+                                     DecayDescriptors = [ '[B- -> Lambda_c+ mu-]cc','[B+ -> Lambda_c+ mu+]cc'],
+                                     FakeMuSel = self.selFakemuon, 
+                                     DSel = self.sellc2pkpi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )                                     
+
+        
+        ################# DECLARE THE STRIPPING LINES #################################
+
+        GECs = { "Code":" ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SPDmax)s )" % config,
+                 "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        ########## D0 -> HH ###########
+        self.B2DMuForTauMu = StrippingLine('b2D0MuX' + name+ 'Line', prescale = 1, selection = self.selb2D0MuX, FILTER  = GECs,HLT2 = config["Hlt2Line"])
+        self.registerLine(self.B2DMuForTauMu)
+        
+        self.B2DK3piMuForTauMu = StrippingLine('b2D0K3piMuX' + name+ 'Line', prescale = 1, selection = self.selb2D03MuX, FILTER  = GECs,HLT2 = config["Hlt2Line"])
+        self.registerLine(self.B2DK3piMuForTauMu)
+        
+        self.B2DpMuForTauMu = StrippingLine('b2DpMuX' + name+ 'Line', prescale = 1, selection = self.selb2DpMuX, FILTER  = GECs,HLT2 = config["Hlt2Line"])
+        self.registerLine(self.B2DpMuForTauMu)        
+
+        self.B2DsMuForTauMu = StrippingLine('b2DsMuX' + name+ 'Line', prescale = 1, selection = self.selb2DsMuX, FILTER  = GECs,HLT2 = config["Hlt2Line"])
+        self.registerLine(self.B2DsMuForTauMu) 
+        
+        self.B2LcMuForTauMu = StrippingLine('b2LcMuX' + name+ 'Line', prescale = 1, selection = self.selb2LcMuX, FILTER  = GECs,HLT2 = config["Hlt2Line"])
+        self.registerLine(self.B2LcMuForTauMu)     
+
+
+        self.FakeB2DMuForTauMu = StrippingLine('b2D0MuXFake' + name+ 'Line', prescale = config["FakePrescale"], selection = self.selFakeb2D0MuX, FILTER  = GECs,HLT2 = config["Hlt2LineFake"])
+        self.registerLine(self.FakeB2DMuForTauMu)   
+
+        self.FakeB2DK3piMuForTauMu = StrippingLine('b2D0K3piMuXFake' + name+ 'Line', prescale = config["FakePrescale"], selection = self.selFakeb2D03MuX, FILTER  = GECs,HLT2 = config["Hlt2LineFake"])
+        self.registerLine(self.FakeB2DK3piMuForTauMu)
+        
+        self.FakeB2DpMuForTauMu = StrippingLine('b2DpMuXFake' + name+ 'Line', prescale = config["FakePrescale"], selection = self.selFakeb2DpMuX, FILTER  = GECs,HLT2 = config["Hlt2LineFake"])
+        self.registerLine(self.FakeB2DpMuForTauMu)        
+
+        self.FakeB2DsMuForTauMu = StrippingLine('b2DsMuXFake' + name+ 'Line', prescale = config["FakePrescale"], selection = self.selFakeb2DsMuX, FILTER  = GECs,HLT2 = config["Hlt2LineFake"])
+        self.registerLine(self.FakeB2DsMuForTauMu) 
+        
+        self.FakeB2LcMuForTauMu = StrippingLine('b2LcMuXFake' + name+ 'Line', prescale = config["FakePrescale"], selection = self.selFakeb2LcMuX, FILTER  = GECs,HLT2 = config["Hlt2LineFake"])
+        self.registerLine(self.FakeB2LcMuForTauMu)     
+
+    def _muonFilter( self ):
+        _code = "(MIPCHI2DV(PRIMARY)> %(MuonIPCHI2)s) &(TRGHOSTPROB < %(GhostProb)s) & (PIDmu > %(PIDmu)s) & (P> 3.0*GeV)" % self.config
+        _mu = FilterDesktop( Code = _code )
+        return _mu 
+        
+    def _FakemuonFilter( self ):
+        _code = "(MIPCHI2DV(PRIMARY)> %(MuonIPCHI2)s) &(TRGHOSTPROB < %(GhostProb)s) & (P> 3.0*GeV) & (~ISMUON) & (INMUON)" % self.config
+        _Fakemu = FilterDesktop( Code = _code )
+        return _Fakemu               
+
+    def _pionFilter( self ):
+        _code = "(P>2.0*GeV) & (PT > %(KPiPT)s *MeV)"\
+                   "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s) & (PIDK< %(PionPIDKTight)s) &(TRGHOSTPROB < %(GhostProb)s) " % self.config
+        _pi = FilterDesktop( Code = _code )
+        return _pi
+
+    def _kaonFilter( self ):
+        _code = "(PIDK>%(KaonPIDK)s) & (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s) & (P>2.0*GeV) & (PT > %(KPiPT)s *MeV)"\
+                   "    & (TRGHOSTPROB < %(GhostProb)s)" % self.config
+        _ka = FilterDesktop( Code = _code )
+        return _ka     
+
+    def _protonFilter( self ):
+        _code = "(PIDp> %(ProtonPIDp)s) & (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s) & (P>2.0*GeV) & (PT > %(KPiPT)s *MeV)"\
+                   "    & (TRGHOSTPROB < %(GhostProb)s)" % self.config
+        _pr = FilterDesktop( Code = _code )
+        return _pr 
+           
+    def _D02KPiFilter( self ):
+        _decayDescriptors = [ '[D0 -> K- pi+]cc' ]
+        _combinationCut = "(ADAMASS('D0') < %(DsAMassWin)s *MeV) & (ACHILD(PT,1)+ACHILD(PT,2) > %(DSumPT)s *MeV) " % self.config
+        _motherCut = "(SUMTREE( PT,  ISBASIC )> %(DSumPT)s * MeV) &(ADMASS('D0') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                            "& (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.config
+        _d02kpi = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                    CombinationCut = _combinationCut,
+                                    MotherCut = _motherCut)                            
+        return _d02kpi
+  
+    
+    def _D02K3PiFilter( self ):
+        _decayDescriptors = [ '[D0 -> K- pi+ pi- pi+]cc' ]
+        _combinationCut = "(ADAMASS('D0') < %(DsAMassWin)s *MeV) & (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3)+ACHILD(PT,4) > %(DSumPT)s *MeV) " % self.config
+        _motherCut = "(SUMTREE( PT,  ISBASIC )> %(DSumPT)s * MeV) &(ADMASS('D0') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                            "& (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.config
+        _d02k3pi = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                    CombinationCut = _combinationCut,
+                                    MotherCut = _motherCut)                            
+        return _d02k3pi
+
+    def _Dp2K2PiFilter( self ):
+        _decayDescriptors = [ '[D+ -> K- pi+ pi+]cc' ]
+        _combinationCut = "(ADAMASS('D+') < %(DsAMassWin)s *MeV) & (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > %(DSumPT)s *MeV) " % self.config
+        _motherCut = "(SUMTREE( PT,  ISBASIC )> %(DSumPT)s * MeV) &(ADMASS('D+') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                            "& (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.config
+        _dp2k2pi = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                    CombinationCut = _combinationCut,
+                                    MotherCut = _motherCut)                            
+        return _dp2k2pi
+
+
+    def _Dsp2KKPiFilter( self ):
+        _decayDescriptors = [ '[D_s+ -> K- K+ pi+]cc' ]
+        _combinationCut = "(ADAMASS('D_s+') < %(DsAMassWin)s *MeV) & (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > %(DSumPT)s *MeV) " % self.config
+        _motherCut = "(MM < %(M_MAX)s * MeV) & (MM > %(M_MIN)s * MeV) & (SUMTREE( PT,  ISBASIC )> %(DSumPT)s * MeV) &(ADMASS('D_s+') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) & (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.config
+        _dsp2kkpi = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                    CombinationCut = _combinationCut,
+                                    MotherCut = _motherCut)                            
+        return _dsp2kkpi
+
+    def _LcpKPiFilter( self ):
+        _decayDescriptors = [ '[Lambda_c+ -> p+ K- pi+]cc' ]
+        _combinationCut = "(ADAMASS('Lambda_c+') < %(DsAMassWin)s *MeV) & (ACHILD(PT,1)+ACHILD(PT,2)+ACHILD(PT,3) > %(DSumPT)s *MeV) " % self.config
+        _motherCut = "(SUMTREE( PT,  ISBASIC )> %(DSumPT)s * MeV) &(ADMASS('Lambda_c+') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                            "& (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.config
+        _lcpkpi = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                    CombinationCut = _combinationCut,
+                                    MotherCut = _motherCut)                            
+        return _lcpkpi
+
+
+def makeb2DMuX(name,
+               DecayDescriptors,
+               MuSel,
+               DSel,
+               BVCHI2DOF,
+               BDIRA):
+               #due to tight cuts, B sideband adds virtually zero events, free
+    _combinationCut = "(AM<10.2*GeV)"
+    _motherCut = "  (MM<10.0*GeV) & (MM>0.0*GeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)  " \
+                   " "  % locals()
+    _B = CombineParticles(DecayDescriptors = DecayDescriptors,
+                          CombinationCut = _combinationCut,
+                          MotherCut = _motherCut)                          
+    return Selection (name,
+                      Algorithm = _B,
+                      RequiredSelections = [MuSel, DSel])
+
+
+
+
+def makeFakeb2DMuX(name,
+               DecayDescriptors,
+               FakeMuSel,
+               DSel,
+               BVCHI2DOF,
+               BDIRA):
+               #due to tight cuts, B sideband adds virtually zero events, free
+    _combinationCut = "(AM<10.2*GeV)"
+    _motherCut = "  (MM<10.0*GeV) & (MM>0.0*GeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)  " \
+                   " "  % locals()
+    _FakeB = CombineParticles(DecayDescriptors = DecayDescriptors,
+                          CombinationCut = _combinationCut,
+                          MotherCut = _motherCut)
+                          
+    return Selection (name,
+                      Algorithm = _FakeB,
+                      RequiredSelections = [FakeMuSel, DSel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuNuX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuNuX.py
new file mode 100644
index 000000000..88a63789d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuNuX.py
@@ -0,0 +1,343 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Mika Vesterinen','Liming Zhang, Alessandra Borgia']
+__date__ = '23/07/2010'
+__version__ = '$Revision: 5.0 $'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseKaons, StdLooseProtons, StdLooseElectrons
+from StandardParticles import StdNoPIDsPions, StdNoPIDsKaons,StdNoPIDsProtons,StdNoPIDsMuons
+from StrippingB2DMuNuXUtils import *
+from GaudiKernel.SystemOfUnits import MeV, GeV, cm, mm
+
+__all__ = ('B2DMuNuXAllLinesConf',
+           'default_config')
+
+default_config = {
+    'B2DMuNuX' : {
+        'WGs'         : ['Semileptonic'],
+        'BUILDERTYPE' : 'B2DMuNuXAllLinesConf',
+        'CONFIG'      : {
+            "prescaleFakes": 0.02
+            ,"prescales":{'StrippingB2DMuNuX_D0_Electron':1.0}
+            ,"GEC_nLongTrk" : 250 
+            ,"TTSpecs"      : {}
+            ,"HLT1"   : "HLT_PASS_RE('Hlt1.*Decision')"
+            ,"HLT2"   : "HLT_PASS_RE('Hlt2.*Decision')"
+            ,"Monitor"      : False
+            ,"UseNoPIDsInputs":False
+            ,"TRGHOSTPROB"   : 0.35 
+            ,"TRCHI2"        : 3.0  
+            ,"MuonPIDmu"     : 0.0  
+            ,"MuonPT"        : 1000*MeV
+            ,"MuonIPCHI2"    : 9.00
+            ,"MuonP"         : 6.0*GeV 
+            ,"HadronPT"      : 250.0*MeV
+            ,"HadronP"       : 2.0*GeV
+            ,"HadronIPCHI2"  : 4.0 
+            ,"ProtonPIDp"    : 0.0 
+            ,"ProtonPIDpK"   : 0.0
+            ,"ProtonP"       : 8.0*GeV
+            ,"KaonPIDK"      : -2.0
+            ,"KaonP"         : 2.0*GeV
+            ,"PionPIDK"      : 10.0 
+            ,"ElectronPIDe"  : 3.0  
+            ,"ElectronPT"    : 300*MeV
+            ,"D_BPVDIRA"     : 0.99 
+            ,"D_FDCHI2"      : 25.0 
+            ,"D_MassMax"     : 1700. * MeV
+            ,"D_MassMin"     : 700. * MeV 
+            ,"D_AMassWin"    : 90.*MeV ## this should be 10 MeV wider than the widest D_MassWin
+            ,"D_MassWin"     : {"default":80*MeV,
+                                "Xic0": 60*MeV,
+                                "Omegac": 60*MeV}
+            ,"D_VCHI2DOF"    : 6.0 
+            ,"D_DocaChi2Max" : 20  
+            ,"B_DIRA"         : 0.999 
+            ,"B_VCHI2DOF"      : 9.0  
+            ,"B_D_DZ"         : -2.0*mm
+            ,"B_MassMin"       : 2.2*GeV
+            ,"B_MassMax"       : 8.0*GeV
+            ,"B_DocaChi2Max"  : 10
+            },
+        'STREAMS'     : {
+            'Semileptonic' : [
+                'StrippingB2DMuNuX_D0_Electron',
+                'StrippingB2DMuNuX_D0',
+                'StrippingB2DMuNuX_D0_K3Pi',
+                'StrippingB2DMuNuX_D0_KMuNu',
+                'StrippingB2DMuNuX_Dp_Electron',
+                'StrippingB2DMuNuX_Dp',
+                'StrippingB2DMuNuX_Ds_Electron', 
+                'StrippingB2DMuNuX_Ds',
+                'StrippingB2DMuNuX_Lc_Electron',
+                'StrippingB2DMuNuX_Lc',
+                'StrippingB2DMuNuX_Omegac',
+                'StrippingB2DMuNuX_Xic',
+                'StrippingB2DMuNuX_Xic0',
+                'StrippingB2DMuNuX_D0_FakeMuon',
+                'StrippingB2DMuNuX_D0_K3Pi_FakeMuon',
+                'StrippingB2DMuNuX_D0_KMuNu_FakeMuon',
+                'StrippingB2DMuNuX_D0_KFakeMuNu',
+                'StrippingB2DMuNuX_D0_KFakeMuNu_FakeMuon',
+                'StrippingB2DMuNuX_Dp_FakeMuon',
+                'StrippingB2DMuNuX_Ds_FakeMuon',
+                'StrippingB2DMuNuX_Lc_FakeMuon',
+                'StrippingB2DMuNuX_Omegac_FakeMuon',
+                'StrippingB2DMuNuX_Xic_FakeMuon',
+                'StrippingB2DMuNuX_Xic0_FakeMuon'],
+            'Charm' : ['StrippingB2DMuNuX_D0_KK',
+                       'StrippingB2DMuNuX_D0_PiPi'],
+        }
+    }
+}
+
+class B2DMuNuXAllLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['B2DMuNuX']['CONFIG'].keys()
+    
+    __confdict__={}
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+
+        ####################### BASIC FINAL STATE PARTICLE SELECTIONS ##########################
+        
+        self.HadronCuts = "(P>%(HadronP)s) & (PT > %(HadronPT)s )"\
+            "& (TRCHI2DOF < %(TRCHI2)s)"\
+            "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+            "& (MIPCHI2DV(PRIMARY)> %(HadronIPCHI2)s)" % config
+      
+        self.MuonTrackCuts = "(PT > %(MuonPT)s ) & (P> %(MuonP)s)"\
+            "& (TRCHI2DOF < %(TRCHI2)s)"\
+            "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+            "& (MIPCHI2DV(PRIMARY)> %(MuonIPCHI2)s)" %config
+        
+        inputs = {"muons":StdLooseMuons,
+                  "pions":StdLoosePions,
+                  "kaons":StdLooseKaons,
+                  "protons":StdLooseProtons,
+                  "electrons":StdLooseElectrons,
+                  "fakemuons":StdNoPIDsMuons}
+                          
+        if config["UseNoPIDsInputs"] == True:
+            inputs["muons"] = StdNoPIDsMuons
+            inputs["pions"] = StdNoPIDsPions
+            inputs["kaons"] = StdNoPIDsKaons
+            inputs["protons"] = StdNoPIDsProtons
+
+        self.cuts = {"muons":self.MuonTrackCuts + " & (PIDmu > %(MuonPIDmu)s)" % config,
+                     "fakemuons":self.MuonTrackCuts + " & (INMUON) & (PIDmu < %(MuonPIDmu)s)" % config,  
+                     "kaons":self.HadronCuts + " & (P>%(KaonP)s) & (PIDK> %(KaonPIDK)s)" % config,
+                     "pions":self.HadronCuts + " & (PIDK< %(PionPIDK)s)" % config,
+                     "protons":self.HadronCuts + "& (P>%(ProtonP)s)"\
+                         "& (PIDp > %(ProtonPIDp)s) & (PIDp-PIDK > %(ProtonPIDpK)s)" % config,
+                     "electrons":self.MuonTrackCuts + " & (PT> %(ElectronPT)s) & (PIDe > %(ElectronPIDe)s)" % config
+                     }
+                
+        self.selMuon = Selection("Mufor"+name,
+                                 Algorithm=FilterDesktop(Code=self.cuts["muons"]),
+                                 RequiredSelections = [inputs["muons"]])
+        
+        self.selKaon = Selection( "Kfor" + name,
+                                  Algorithm = FilterDesktop(Code=self.cuts["kaons"]),
+                                  RequiredSelections = [inputs["kaons"]])
+        
+        self.selPion = Selection( "Pifor" + name,
+                                  Algorithm = FilterDesktop(Code=self.cuts["pions"]),
+                                  RequiredSelections = [inputs["pions"]])
+        
+        self.selProton = Selection( "ProtonsFor" + name,
+                                    Algorithm = FilterDesktop(Code=self.cuts["protons"]),
+                                    RequiredSelections = [inputs["protons"]])
+        
+        self.selElectron = Selection("efor"+name,
+                                     Algorithm=FilterDesktop(Code=self.cuts["electrons"]),
+                                     RequiredSelections = [inputs["electrons"]])
+        
+                                     
+        self.selMuonFakes = Selection( "FakeMuonsFor" + name,
+                                       Algorithm = FilterDesktop(Code = self.cuts["fakemuons"]),
+                                       RequiredSelections = [inputs["fakemuons"]])
+        
+        ### Dictionary containing special cuts for each charm mode
+        ### at this stage they are just the mass windows.
+        ### All other cuts are the same for all charm species
+        ### and will be specified later in the line building function
+        CharmCuts = {}
+        for mode in ["D0","D0_partreco","Dp","Ds","Lc","Xic","Xic0","Omegac"]:
+            CharmCuts[mode] = config.copy()
+        
+        # the Dp (->Kpipi) and Ds (->KKpi) are special
+        # in that they each cover both the Ds and D+ mass peaks with the default sideband on either side.   
+        CharmCuts["Dp"]["CharmComboCuts"] = "(DAMASS('D_s+') < %s )"\
+            "& (DAMASS('D+')> -%s )" %(config["D_AMassWin"],config["D_AMassWin"])
+        CharmCuts["Dp"]["CharmMotherCuts"] = "(DMASS('D_s+') < %s )"\
+            "& (DMASS('D+')> -%s )" %(config["D_MassWin"]["default"],config["D_MassWin"]["default"])
+        # and Ds and Dp are the same in this regard
+        CharmCuts["Ds"] = CharmCuts["Dp"].copy()
+        
+        CharmCuts['D0']["CharmComboCuts"]  = "(ADAMASS('D0') < %s)" % config["D_AMassWin"]
+        CharmCuts['D0']["CharmMotherCuts"] = "(ADMASS('D0')  < %s)" % config["D_MassWin"]["default"]
+        
+        CharmCuts['D0_partreco']["CharmComboCuts"] = "((AM < %s) & (AM > %s))" % (config["D_MassMax"], config["D_MassMin"])
+        CharmCuts['D0_partreco']["CharmMotherCuts"] = "((MM < %s) & (MM > %s))" % (config["D_MassMax"], config["D_MassMin"])
+ 
+        CharmCuts["Lc"]["CharmComboCuts"] = "(ADAMASS('Lambda_c+') < %s )" %config["D_AMassWin"]
+        CharmCuts["Lc"]["CharmMotherCuts"] = "(ADMASS('Lambda_c+') < %s )" %config["D_MassWin"]["default"]
+        
+        CharmCuts["Xic"]["CharmComboCuts"] = "(ADAMASS('Xi_c+') < %s )"  %config["D_AMassWin"]
+        CharmCuts["Xic"]["CharmMotherCuts"] = "(ADMASS('Xi_c+') < %s )"  %config["D_MassWin"]["default"]
+        
+        CharmCuts["Xic0"]["CharmComboCuts"] = "(ADAMASS('Xi_c0') < %s )" %config["D_AMassWin"]
+        CharmCuts["Xic0"]["CharmMotherCuts"] = "(ADMASS('Xi_c0') < %s )" %config["D_MassWin"]["Xic0"]
+        
+        CharmCuts["Omegac"]["CharmComboCuts"] = "(ADAMASS('Omega_c0') < %s )" %config["D_AMassWin"]
+        CharmCuts["Omegac"]["CharmMotherCuts"] = "(ADMASS('Omega_c0') < %s )" %config["D_MassWin"]["Omegac"]
+
+        self.b2D0MuXLine = BtoDlnuLine(name,
+                                       'D0',
+                                       ['[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+                                       ['[D0 -> K- pi+]cc'],
+                                       CharmCuts["D0"],
+                                       [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.b2D0MuXK3PiLine = BtoDlnuLine(name,
+                                       'D0_K3Pi',
+                                       ['[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+                                       ['[D0 -> K- pi+ pi- pi+]cc'],
+                                       CharmCuts["D0"],
+                                       [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+        
+        self.b2D0MuXKMuLine = BtoDlnuLine(name, 
+                                       'D0_KMuNu',
+                                       ['[B- -> D0 mu-]cc', '[B+ -> D0 mu+]cc'],
+                                       ['[D0 -> K- mu+]cc'], 
+                                       CharmCuts["D0_partreco"],
+                                       [self.selKaon, self.selMuon], self.selMuon, self.selMuonFakes)
+
+        self.b2D0MuXKFakeMuLine = BtoDlnuLine(name,
+                                        'D0_KFakeMuNu', 
+                                        ['[B- -> D0 mu-]cc', '[B+ -> D0 mu+]cc'],
+                                        ['[D0 -> K- mu+]cc'],
+                                        CharmCuts["D0_partreco"],
+                                        [self.selKaon, self.selMuonFakes], self.selMuon, self.selMuonFakes)
+
+        self.b2D0eXLine = BtoDlnuLine(name,
+                                      'D0_Electron',
+                                      ['[B- -> D0 e-]cc', '[B+ -> D0 e+]cc'],
+                                      ['[D0 -> K- pi+]cc'],
+                                      CharmCuts["D0"],
+                                      [self.selKaon, self.selPion],self.selElectron)
+        
+        self.b2D0MuXKKLine = BtoDlnuLine(name,
+                                         'D0_KK',
+                                         ['[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+                                         ['D0 -> K- K+'],
+                                         CharmCuts["D0"],
+                                         [self.selKaon],self.selMuon)
+        
+        self.b2D0MuXPiPiLine = BtoDlnuLine(name,
+                                           'D0_PiPi',
+                                           ['[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+                                           ['D0 -> pi- pi+'],
+                                           CharmCuts["D0"],
+                                           [self.selPion],self.selMuon)
+        
+        self.b2DpMuXLine = BtoDlnuLine(name,
+                                       'Dp',
+                                       [ '[B0 -> D- mu+]cc', '[B0 -> D- mu-]cc' ],
+                                       [ '[D+ -> K- pi+ pi+]cc' ],
+                                       CharmCuts["Dp"],
+                                       [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+       
+        self.b2DpeXLine = BtoDlnuLine(name,
+                                       'Dp_Electron',
+                                       [ '[B0 -> D- e+]cc', '[B0 -> D- e-]cc' ],
+                                       [ '[D+ -> K- pi+ pi+]cc' ],
+                                       CharmCuts["Dp"],
+                                       [self.selKaon, self.selPion],self.selElectron)
+ 
+        self.b2DsMuXLine = BtoDlnuLine(name,
+                                       'Ds',
+                                       [ '[B0 -> D- mu+]cc', '[B0 -> D- mu-]cc' ],
+                                       [ '[D+ -> K+ K- pi+]cc' ],
+                                       CharmCuts["Ds"],
+                                       [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+        
+        self.b2DseXLine = BtoDlnuLine(name,
+                                       'Ds_Electron',
+                                       [ '[B0 -> D- e+]cc', '[B0 -> D- e-]cc' ],
+                                       [ '[D+ -> K+ K- pi+]cc' ],
+                                       CharmCuts["Ds"],
+                                       [self.selKaon, self.selPion],self.selElectron)
+        
+        self.lb2LcMuXLine = BtoDlnuLine(name,
+                                        "Lc",
+                                        [ '[Lambda_b0 -> Lambda_c+ mu-]cc', '[Lambda_b0 -> Lambda_c+ mu+]cc'],
+                                        [ '[Lambda_c+ -> K- p+ pi+]cc' ],
+                                        CharmCuts["Lc"],
+                                        [self.selProton,self.selKaon,self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.lb2LceXLine = BtoDlnuLine(name,
+                                        "Lc_Electron",
+                                        [ '[Lambda_b0 -> Lambda_c+ e-]cc', '[Lambda_b0 -> Lambda_c+ e+]cc'],
+                                        [ '[Lambda_c+ -> K- p+ pi+]cc' ],
+                                        CharmCuts["Lc"],
+                                        [self.selProton,self.selKaon,self.selPion],self.selElectron)
+
+        self.Xic_Line = BtoDlnuLine(name,
+                                    "Xic",
+                                    [ '[Xi_b0 -> Xi_c+ mu-]cc', '[Xi_b0 -> Xi_c+ mu+]cc'],
+                                    [ '[Xi_c+ -> K- p+ pi+]cc' ],
+                                    CharmCuts["Xic"],
+                                    [self.selProton,self.selKaon,self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.Xic0_Line = BtoDlnuLine(name,
+                                     "Xic0",
+                                     [ '[Xi_b- -> Xi_c0 mu-]cc', '[Xi_b- -> Xi_c0 mu+]cc'],
+                                     [ '[Xi_c0 -> p+ K- K- pi+]cc'],
+                                     CharmCuts["Xic0"],
+                                     [self.selProton,self.selKaon,self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.Omegac_Line = BtoDlnuLine(name,
+                                       "Omegac",
+                                       [ '[Omega_b- -> Omega_c0 mu-]cc', '[Omega_b- -> Omega_c0 mu+]cc'],
+                                       [ '[Omega_c0 -> p+ K- K- pi+]cc' ],
+                                       CharmCuts["Omegac"],
+                                       [self.selProton,self.selKaon,self.selPion],self.selMuon,self.selMuonFakes)
+
+        ##### line registration
+        self.registerLine(self.b2D0eXLine)  
+        self.registerLine(self.b2DpeXLine)
+        self.registerLine(self.b2DseXLine)
+        self.registerLine(self.lb2LceXLine)      
+        self.registerLine(self.b2D0MuXKKLine)        
+        self.registerLine(self.b2D0MuXPiPiLine)        
+        for Mu in ["RealMuon","FakeMuon"]:
+            self.registerLine(self.b2D0MuXLine[Mu])        
+            self.registerLine(self.b2D0MuXK3PiLine[Mu])        
+            self.registerLine(self.b2D0MuXKMuLine[Mu])
+            self.registerLine(self.b2D0MuXKFakeMuLine[Mu])
+            self.registerLine(self.b2DpMuXLine[Mu])        
+            self.registerLine(self.b2DsMuXLine[Mu])        
+            self.registerLine(self.lb2LcMuXLine[Mu])        
+            self.registerLine(self.Omegac_Line[Mu])        
+            self.registerLine(self.Xic_Line[Mu])        
+            self.registerLine(self.Xic0_Line[Mu])        
+        
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuNuXUtils.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuNuXUtils.py
new file mode 100644
index 000000000..72da1731b
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DMuNuXUtils.py
@@ -0,0 +1,163 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Mika Vesterinen']
+__date__ = '06/03/2015'
+__version__ = '$Revision: 0.0 $'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseKaons, StdLooseProtons, StdNoPIDsPions, StdLooseElectrons, StdNoPIDsMuons
+
+def BtoDlnuLine(module_name,
+                name,
+                BDecays,
+                DDecays,
+                CONFIG,
+                CHARM_DAUGHTERS,
+                MUON,
+                FAKE_MUON = None):
+    
+    DEFAULT_GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" %CONFIG,
+                     "Preambulo": ["from LoKiTracks.decorators import *"]}
+    
+    CHARM_DaugCuts = {}
+    CHARM_ComboCuts = CONFIG["CharmComboCuts"]
+    CHARM_MotherCuts = CONFIG["CharmMotherCuts"]
+    CHARM_ComboCuts += " & (ADOCACHI2CUT( %(D_DocaChi2Max)s, ''))" % CONFIG
+    CHARM_MotherCuts += "& (VFASPF(VCHI2/VDOF) < %(D_VCHI2DOF)s) " \
+        "& (BPVVDCHI2 > %(D_FDCHI2)s) &  (BPVDIRA> %(D_BPVDIRA)s)"  % CONFIG
+    
+    if "CharmDaugCuts" in CONFIG.keys():
+        CHARM_DaugCuts = CONFIG["CharmDaugCuts"]
+    if "CharmExtraComboCuts" in CONFIG.keys():
+        CHARM_ComboCuts += CONFIG["CharmExtraComboCuts"]
+    if "CharmExtraMotherCuts" in CONFIG.keys():
+        CHARM_MotherCuts += CONFIG["CharmExtraMotherCuts"]
+    
+    CHARM = Selection("CharmSelFor"+name+module_name,
+                      Algorithm=CombineParticles(DecayDescriptors = DDecays,
+                                                 DaughtersCuts = CHARM_DaugCuts,
+                                                 CombinationCut = CHARM_ComboCuts,
+                                                 MotherCut = CHARM_MotherCuts),
+                      RequiredSelections = CHARM_DAUGHTERS)
+
+    USED_CHARM = CHARM
+    if "D*" in BDecays:
+        DST = makeDstar("CharmSelDstFor"+name+module_name,CHARM,CONFIG)
+        USED_CHARM = DST
+
+    B_combinationCut = "(AM > %(B_MassMin)s) & (AM < %(B_MassMax)s) & (ADOCACHI2CUT( %(B_DocaChi2Max)s, ''))" %CONFIG
+    B_motherCut = " (MM>%(B_MassMin)s) & (MM<%(B_MassMax)s)"\
+        "&(VFASPF(VCHI2/VDOF)< %(B_VCHI2DOF)s) & (BPVDIRA> %(B_DIRA)s)"\
+        "&(MINTREE(((ABSID=='D+')|(ABSID=='D0')|(ABSID=='Lambda_c+')|(ABSID=='Omega_c0')|(ABSID=='Xi_c+')|(ABSID=='Xi_c0'))"\
+        ", VFASPF(VZ))-VFASPF(VZ) > %(B_D_DZ)s  ) " %CONFIG
+    if "ExtraComboCuts" in CONFIG.keys():
+        B_combinationCut += CONFIG["ExtraComboCuts"]
+    if "ExtraMotherCuts" in CONFIG.keys():
+        B_motherCut += CONFIG["ExtraMotherCuts"]
+        
+    B_DaugCuts = {}
+    if "ExtraMuonCuts" in CONFIG.keys():
+        B_DaugCuts = {"mu+":CONFIG["ExtraMuonCuts"]}
+    if "ExtraElectronCuts" in CONFIG.keys():
+        B_DaugCuts = {"e+":CONFIG["ExtraElectronCuts"]}
+    _B = CombineParticles(DecayDescriptors = BDecays,
+                          DaughtersCuts = B_DaugCuts,
+                          CombinationCut = B_combinationCut,
+                          MotherCut = B_motherCut)
+    
+    if CONFIG["Monitor"] == True :
+        _B.Preambulo    = [
+            "hdm1 = Gaudi.Histo1DDef ( 'D_M' , 1700 , 2800  , 200 )"
+            ]
+        _B.Monitor      = True  
+        _B.MotherMonitor  = "process ( monitor ( CHILD(M,1) , hdm1 , 'D_M' ) )  >> ~EMPTY """                                                                   
+    
+    BSel = Selection ("BSelFor"+name+module_name,
+                      Algorithm = _B,
+                      RequiredSelections = [MUON,USED_CHARM])
+    
+    
+    BSelTOS = TOSFilter( "BSelFor"+name+module_name+"TOS"
+                         ,BSel
+                         ,CONFIG["TTSpecs"])
+    
+    LINE_NAME = module_name + "_"+name
+    _prescale = 1.0
+    if LINE_NAME in CONFIG["prescales"].keys():
+        _prescale = CONFIG["prescales"][LINE_NAME]
+    
+    if "Fake" in LINE_NAME:
+        main_line = StrippingLine(LINE_NAME,
+                    selection=BSelTOS,
+                    HLT1=CONFIG["HLT1"],
+                    HLT2=CONFIG["HLT2"],
+                    FILTER=DEFAULT_GECs,
+                    prescale=CONFIG["prescaleFakes"])
+
+    else:
+        main_line = StrippingLine(LINE_NAME, 
+                                  selection = BSelTOS,
+                                  HLT1 = CONFIG["HLT1"],
+                                  HLT2 = CONFIG["HLT2"],
+                                  FILTER=DEFAULT_GECs,
+                                  prescale = _prescale)
+
+    if FAKE_MUON == None:
+        return main_line
+    else:
+        BSelFake = Selection ("BSelFakeFor"+name+module_name,
+                              Algorithm = _B,
+                              RequiredSelections = [FAKE_MUON,USED_CHARM])
+        
+        BSelFakeTOS = TOSFilter( "BSelFakeFor"+name+module_name+"TOS"
+                                 ,BSelFake
+                                 ,CONFIG["TTSpecs"])
+        return {"RealMuon":main_line,
+                "FakeMuon":StrippingLine(LINE_NAME + '_FakeMuon',
+                                         selection = BSelFakeTOS,
+                                         HLT1 = CONFIG["HLT1"],
+                                         HLT2 = CONFIG["HLT2"],
+                                         FILTER=DEFAULT_GECs,
+                                         prescale = CONFIG["prescaleFakes"])
+                }
+
+
+########### HELP WITH MAKING A DSTAR ########################
+def makeDstar(_name, inputD0,CONFIG) : 
+    _softPi = DataOnDemand(Location = 'Phys/StdAllLoosePions/Particles')
+    _inputD0_conj = Selection("SelConjugateD0For"+_name,
+                             Algorithm = ConjugateNeutralPID('ConjugateD0For'+_name),
+                             RequiredSelections = [inputD0])
+    _cutsSoftPi = '( PT > %(Dstar_SoftPion_PT)s  )' % CONFIG
+    _cutsDstarComb = '(AM - ACHILD(M,1) + 5 > %(Dstar_wideDMCutLower)s ) & (AM - ACHILD(M,1) - 5 < %(Dstar_wideDMCutUpper)s )' % CONFIG
+    _cutsDstarMoth_base = '(VFASPF(VCHI2/VDOF) < %(Dstar_Chi2)s )' % CONFIG
+    _cutsDstarMoth_DM = '(M - CHILD(M,1) > %(Dstar_wideDMCutLower)s ) & (M - CHILD(M,1) < %(Dstar_wideDMCutUpper)s )' % CONFIG
+    _cutsDstarMoth = '(' + _cutsDstarMoth_base + ' & ' + _cutsDstarMoth_DM + ')'
+    _Dstar = CombineParticles( DecayDescriptor = "[D*(2010)+ -> D0 pi+]cc",
+                               DaughtersCuts = { "pi+" : _cutsSoftPi },
+                               CombinationCut = _cutsDstarComb,
+                               MotherCut = _cutsDstarMoth)
+    return Selection (name = "Sel"+_name,Algorithm = _Dstar,RequiredSelections = [inputD0,_inputD0_conj] + [_softPi])
+
+########## TISTOS FILTERING ##################################
+def TOSFilter( name = None, sel = None, trigger = None ):
+    if len(trigger) == 0:
+        return sel
+    from Configurables import TisTosParticleTagger
+    _filter = TisTosParticleTagger(name+"_TriggerTos")
+    _filter.TisTosSpecs = trigger
+    _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = [ sel ], Algorithm = _filter )
+    return _sel
+
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Dlnu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Dlnu.py
new file mode 100644
index 000000000..62dba0257
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Dlnu.py
@@ -0,0 +1,222 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Selection for B -> D l nu electron/muon universality measurements
+"""
+__author__ = ['Greg Ciezarek']
+__date__ = '30/11/2016'
+__version__ = '$Revision: 1.0 $'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseKaons, StdLooseProtons, StdAllLoosePions, StdLooseMergedPi0,StdLooseResolvedPi0,StdAllNoPIDsMuons, StdLooseANNUpPions, StdLooseElectrons
+from Configurables import ConjugateNeutralPID
+from PhysSelPython.Wrappers import MergedSelection
+
+__all__ = ('B2DMuForLNuconf',
+           #'makeb2DMuX',
+           'confdict')
+default_config = {
+    'NAME'        : 'B2DMuForLNu',
+    'WGs'         : ['Semileptonic'],
+    'BUILDERTYPE' : 'B2DMuForLNuconf',
+    'CONFIG'      : {
+             "MINIPCHI2"     : 16.0    # adimensional 
+            ,"GhostProb"     : 0.5    # adimensional  
+            ,"KaonPIDK"      : 4.0    # adimensional
+            ,"PionPIDKTight" : 2.0    # adimensional
+            ,"LeptonIPCHI2"  : 9.00  # adimensional
+            ,"LeptonPT"      : 300    # MeV
+            ,"KPiPT"         : 500.0  # MeV
+            ,"DSumPT"        : 2500.0 # MeV
+            ,"DsDIRA"        : 0.999  # adimensional
+            ,"DsFDCHI2"      : 50.0   # adimensional
+            ,"DsMassWin"     : 80.0   # MeV
+            ,"DsAMassWin"    : 100.0  # MeV
+            ,"M_MIN"         : 1920.0 # MeV
+            ,"M_MAX"         : 2010.0 # MeV
+            ,"DsVCHI2DOF"    : 4.0    # adimensional
+            ,"PIDmu"         : 3. # adimensional
+            ,"PIDmuK"        : 0. # adimensional
+            ,"PIDmuP"        : 0. # adimensional
+            ,"PIDe"          : 0.  # adimensional
+            ,"BDIRA"         : 0.999  # adimensional
+            ,"BVCHI2DOF"     : 6.0    # adimensional
+            ,"SPDmax"        : 600    # adimensional
+            ,"FakePrescale"  : 0.1     # adimensional
+            ,"Hlt2Line"      : "HLT_PASS_RE('Hlt2Topo.*Decision')"    # adimensiional
+    },
+    'STREAMS'     : ['Semileptonic']    
+}
+
+class B2DMuForLNuconf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    __confdict__={}
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.config=config
+
+        
+
+        ############### MUON SELECTIONS ###################
+        self.selmuon = Selection( "Mufor" + name,
+                                  Algorithm = self._muonFilter(),
+                                  RequiredSelections = [StdLooseMuons])
+                                  
+                                  
+        self.selelectron = Selection( "Efor" + name,
+                                  Algorithm = self._electronFilter(),
+                                  RequiredSelections = [StdLooseElectrons])
+                                  
+                                  
+        self.selFakemuon = Selection( "FakeMufor" + name,
+                                  Algorithm = self._FakemuonFilter(),
+                                  RequiredSelections = [StdAllNoPIDsMuons])                                  
+
+
+        ############### KAON AND PION SELECTIONS ################
+        
+        self.selKaon = Selection( "Kfor" + name,
+                                  Algorithm = self._kaonFilter(),
+                                  RequiredSelections = [StdLooseKaons])
+        
+        self.selPion = Selection( "Pifor" + name,
+                                  Algorithm = self._pionFilter(),
+                                  RequiredSelections = [StdLoosePions])
+                                  
+                                                                          
+        ################ D0 -> HH SELECTION ##########################
+        
+        self.seld02kpi = Selection( "D02KPifor" + name,
+                                    Algorithm = self._D02KPiFilter(),
+                                    RequiredSelections = [self.selKaon, self.selPion] )
+
+        self.selb2D0MuX = makeb2DMuX('b2D0MuX' + name,
+                                     DecayDescriptors = [ '[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+                                     MuSel = self.selmuon, 
+                                     DSel = self.seld02kpi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )
+                                     
+        self.selb2D0EX = makeb2DMuX('b2D0EX' + name,
+                                     DecayDescriptors = [ '[B- -> D0 e-]cc','[B+ -> D0 e+]cc'],
+                                     MuSel = self.selelectron, 
+                                     DSel = self.seld02kpi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )
+                                                                          
+        self.selFakeb2D0MuX = makeFakeb2DMuX('b2D0MuXFake' + name,
+                                     DecayDescriptors = [ '[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+                                     FakeMuSel = self.selFakemuon, 
+                                     DSel = self.seld02kpi,
+                                     BVCHI2DOF = config['BVCHI2DOF'],
+                                     BDIRA = config['BDIRA']
+                                     )        
+        
+        ################# DECLARE THE STRIPPING LINES #################################
+
+        GECs = { "Code":" ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(SPDmax)s )" % config,
+                 "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        ########## D0 -> HH ###########
+        self.B2DMuForLNu = StrippingLine('b2D0MuX' + name+ 'Line', prescale = 1, selection = self.selb2D0MuX, FILTER  = GECs,HLT2 = config["Hlt2Line"])
+        self.registerLine(self.B2DMuForLNu)
+        
+        self.B2DEForLNu = StrippingLine('b2D0EX' + name+ 'Line', prescale = 1, selection = self.selb2D0EX, FILTER  = GECs,HLT2 = config["Hlt2Line"])
+        self.registerLine(self.B2DEForLNu)
+
+        self.FakeB2DLForLNu = StrippingLine('b2D0LXFake' + name+ 'Line', prescale = config["FakePrescale"], selection = self.selFakeb2D0MuX, FILTER  = GECs,HLT2 = config["Hlt2Line"])
+        self.registerLine(self.FakeB2DLForLNu)   
+
+    def _muonFilter( self ):
+        _code = "(MIPCHI2DV(PRIMARY)> %(LeptonIPCHI2)s) &(TRGHOSTPROB < %(GhostProb)s) & (PIDmu> %(PIDmu)s )& (PIDmu-PIDp>  %(PIDmuP)s  )& (PIDmu-PIDK>  %(PIDmuK)s  ) & (P> 3.0*GeV) & (PT > %(LeptonPT)s *MeV)" % self.config
+        _mu = FilterDesktop( Code = _code )
+        return _mu 
+        
+    def _electronFilter( self ):
+        _code = "(MIPCHI2DV(PRIMARY)> %(LeptonIPCHI2)s) &(TRGHOSTPROB < %(GhostProb)s) & (PIDe > %(PIDe)s) & (P> 3.0*GeV) & (PT > %(LeptonPT)s *MeV)" % self.config
+        _e = FilterDesktop( Code = _code )
+        return _e 
+        
+    def _FakemuonFilter( self ):
+        _code = "(MIPCHI2DV(PRIMARY)> %(LeptonIPCHI2)s) &(TRGHOSTPROB < %(GhostProb)s) & (P> 3.0*GeV) & (~ISMUON) & (PIDe < %(PIDe)s)" % self.config
+        _Fakemu = FilterDesktop( Code = _code )
+        return _Fakemu               
+
+    def _pionFilter( self ):
+        _code = "(P>2.0*GeV) & (PT > %(KPiPT)s *MeV)"\
+                   "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s) & (PIDK< %(PionPIDKTight)s) &(TRGHOSTPROB < %(GhostProb)s) " % self.config
+        _pi = FilterDesktop( Code = _code )
+        return _pi
+
+    def _kaonFilter( self ):
+        _code = "(PIDK>%(KaonPIDK)s) & (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s) & (P>2.0*GeV) & (PT > %(KPiPT)s *MeV)"\
+                   "    & (TRGHOSTPROB < %(GhostProb)s)" % self.config
+        _ka = FilterDesktop( Code = _code )
+        return _ka     
+
+    def _D02KPiFilter( self ):
+        _decayDescriptors = [ '[D0 -> K- pi+]cc' ]
+        _combinationCut = "(ADAMASS('D0') < %(DsAMassWin)s *MeV) & (ACHILD(PT,1)+ACHILD(PT,2) > %(DSumPT)s *MeV) " % self.config
+        _motherCut = "(SUMTREE( PT,  ISBASIC )> %(DSumPT)s * MeV) &(ADMASS('D0') < %(DsMassWin)s *MeV) & (VFASPF(VCHI2/VDOF) < %(DsVCHI2DOF)s) " \
+                            "& (BPVVDCHI2 > %(DsFDCHI2)s) &  (BPVDIRA> %(DsDIRA)s)"  % self.config
+        _d02kpi = CombineParticles( DecayDescriptors = _decayDescriptors,
+                                    CombinationCut = _combinationCut,
+                                    MotherCut = _motherCut)                            
+        return _d02kpi
+  
+   
+def makeb2DMuX(name,
+               DecayDescriptors,
+               MuSel,
+               DSel,
+               BVCHI2DOF,
+               BDIRA):
+               #due to tight cuts, B sideband adds virtually zero events, free
+    _combinationCut = "(AM<10.2*GeV)"
+    _motherCut = "  (MM<10.0*GeV) & (MM>0.0*GeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)  " \
+                   " "  % locals()
+    _B = CombineParticles(DecayDescriptors = DecayDescriptors,
+                          CombinationCut = _combinationCut,
+                          MotherCut = _motherCut)                          
+    return Selection (name,
+                      Algorithm = _B,
+                      RequiredSelections = [MuSel, DSel])
+
+
+
+
+def makeFakeb2DMuX(name,
+               DecayDescriptors,
+               FakeMuSel,
+               DSel,
+               BVCHI2DOF,
+               BDIRA):
+               #due to tight cuts, B sideband adds virtually zero events, free
+    _combinationCut = "(AM<10.2*GeV)"
+    _motherCut = "  (MM<10.0*GeV) & (MM>0.0*GeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)  " \
+                   " "  % locals()
+    _FakeB = CombineParticles(DecayDescriptors = DecayDescriptors,
+                          CombinationCut = _combinationCut,
+                          MotherCut = _motherCut)
+                          
+    return Selection (name,
+                      Algorithm = _FakeB,
+                      RequiredSelections = [FakeMuSel, DSel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Dst0MuNu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Dst0MuNu.py
new file mode 100644
index 000000000..7a387b611
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Dst0MuNu.py
@@ -0,0 +1,240 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Michel De Cian']
+__date__ = '12/12/2018'
+__version__ = '$Revision: 0.0 $'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseKaons, StdAllLoosePions, StdAllLooseElectrons, StdLooseResolvedPi0, StdLooseMergedPi0, StdLooseDalitzPi0
+
+__all__ = ('B2Dst0MuNuAllLinesConf',
+           'TOSFilter',
+           'default_config')
+
+default_config = {
+    'NAME'        : 'B2Dst0MuNu',
+    'WGs'         : ['Semileptonic'],
+    'BUILDERTYPE' : 'B2Dst0MuNuAllLinesConf',
+    'CONFIG'      : {
+            "TTSpecs"      : {}#{'Hlt1.*Track.*Decision%TOS':0,'Hlt2TopoMu(2|3|4)Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0} 
+            ,"HLT_FILTER"   : ""#"HLT_PASS_RE('Hlt2.*SingleMuon.*Decision') | HLT_PASS_RE('Hlt2TopoMu(2|3|4)Body.*Decision')"
+            },
+    'STREAMS'     : ['Semileptonic'],
+}
+
+class B2Dst0MuNuAllLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+        
+        # The D0
+        self.D0 = Selection("D0For"+name,
+                            Algorithm=CombineParticles(DecayDescriptors = ["[D0 -> K- pi+]cc"],
+                                                       DaughtersCuts = {"K-":"(PIDK > 0) & (PT > 250*MeV)",
+                                                                        "pi+":"(PIDK < 2) & (PT > 250*MeV)"},
+                                                       CombinationCut = "(AM > 1700*MeV) & (AM < 2000*MeV) & (ADOCACHI2CUT(10, ''))",
+                                                       MotherCut =    "(VFASPF(VCHI2/VDOF) < 4) & (BPVVDCHI2 > 100.) & (BPVDIRA> 0.99) & (ADMASS('D0') < 100*MeV)"),
+                            RequiredSelections = [StdLooseKaons,StdLoosePions])
+        
+        # The Dielectron, detached (called gamma)
+        self.gamma = Selection("GammaFor"+name,
+                               Algorithm=CombineParticles(DecayDescriptor = "gamma -> e+ e-",
+                                                       DaughtersCuts = {"e+":"(PIDe > -2) & (PT > 70*MeV) & (TRGHP < 0.3)",
+                                                                        "e-":"(PIDe > -2) & (PT > 70*MeV) & (TRGHP < 0.3)"},
+                                                       CombinationCut = "(AM < 300*MeV)",
+                                                       MotherCut =    "(VFASPF(VCHI2/VDOF) < 5) & (M < 250)"),
+                               RequiredSelections = [StdAllLooseElectrons])
+
+        # The Dielectron, detached and same-sign
+        self.gammaSS = Selection("GammaSSFor"+name,
+                                 Algorithm=CombineParticles(DecayDescriptor = "[gamma -> e+ e+]cc",
+                                                            DaughtersCuts = {"e+":"(PIDe > -2) & (PT > 70*MeV) & (TRGHP < 0.3)"},
+                                                            CombinationCut = "(AM < 350*MeV)",
+                                                            MotherCut =    "(VFASPF(VCHI2/VDOF) < 5) & (M < 300)"),
+                                 RequiredSelections = [StdAllLooseElectrons])
+
+        # The Dielectron, prompt (called Aprime, for a potential short-lived dark photon)
+        self.Aprime = Selection("AprimeFor"+name,
+                                Algorithm=CombineParticles(DecayDescriptor = "J/psi(1S) -> e+ e-",
+                                                       DaughtersCuts = {"e+":"(PIDe > -2) & (PT > 70*MeV) & (TRGHP < 0.3)",
+                                                                        "e-":"(PIDe > -2) & (PT > 70*MeV) & (TRGHP < 0.3)",},
+                                                       CombinationCut = "(AM < 350*MeV)",
+                                                       MotherCut =    "(VFASPF(VCHI2/VDOF) < 5) & (M < 300)"),
+                               RequiredSelections = [StdAllLooseElectrons])
+
+        # The Dielectron, prompt and same-sign
+        self.AprimeSS = Selection("AprimeSSFor"+name,
+                                  Algorithm=CombineParticles(DecayDescriptor = "[J/psi(1S) -> e+ e+]cc",
+                                                             DaughtersCuts = {"e+":"(PIDe > -2) & (PT > 70*MeV) & (TRGHP < 0.3)" },
+                                                             CombinationCut = "(AM < 350*MeV)",
+                                                             MotherCut =    "(VFASPF(VCHI2/VDOF) < 5) & (M < 300)"),
+                                  RequiredSelections = [StdAllLooseElectrons])
+        
+        # The Dst with detached dielectron
+        self.DstD0Gamma = Selection("DstD0GammaFor"+name,
+                                    Algorithm=CombineParticles(DecayDescriptors = ["[D*(2007)0 -> D0 gamma]cc"],
+                                                        DaughtersCuts = {"D0"    :"ALL",
+                                                                         "gamma" : "ALL"},
+                                                        CombinationCut = "(AM - ACHILD(1,M) < 350*MeV)",
+                                                        MotherCut =    "(VFASPF(VCHI2/VDOF) < 6)"),
+                             RequiredSelections = [self.D0,self.gamma])
+
+        # The Dst with detached dielectron, same-sign
+        self.DstD0GammaSS = Selection("DstD0GammaSSFor"+name,
+                                      Algorithm=CombineParticles(DecayDescriptors = ["[D*(2007)0 -> D0 gamma]cc"],
+                                                                 DaughtersCuts = {"D0"    :"ALL",
+                                                                                  "gamma" : "ALL"},
+                                                                 CombinationCut = "(AM - ACHILD(1,M) < 350*MeV)",
+                                                                 MotherCut =    "(VFASPF(VCHI2/VDOF) < 6)"),
+                                      RequiredSelections = [self.D0,self.gammaSS])
+        
+        # The Dst with prompt dielectron
+        self.DstD0Aprime = Selection("DstD0AprimeFor"+name,
+                                     Algorithm=CombineParticles(DecayDescriptors = ["[D*(2007)0 -> D0 J/psi(1S)]cc"],
+                                                               DaughtersCuts = {"D0"    :"ALL",
+                                                                                "J/psi(1S)" : "ALL"},
+                                                               CombinationCut = "(AM - ACHILD(1,M) < 350*MeV)",
+                                                               MotherCut =    "(VFASPF(VCHI2/VDOF) < 6)"),
+                                     RequiredSelections = [self.D0,self.Aprime])
+        
+        # The Dst with prompt dielectron, same-sign
+        self.DstD0AprimeSS = Selection("DstD0AprimeSSFor"+name,
+                                       Algorithm=CombineParticles(DecayDescriptors = ["[D*(2007)0 -> D0 J/psi(1S)]cc"],
+                                                                  DaughtersCuts = {"D0"    :"ALL",
+                                                                                   "J/psi(1S)" : "ALL"},
+                                                                  CombinationCut = "(AM - ACHILD(1,M) < 350*MeV)",
+                                                                  MotherCut =    "(VFASPF(VCHI2/VDOF) < 6)"),
+                                       RequiredSelections = [self.D0,self.AprimeSS])
+        
+        # The Dst with pi0
+        self.DstD0Pi0 = Selection("DstD0Pi0For"+name,
+                                  Algorithm=CombineParticles(DecayDescriptors = ["[D*(2007)0 -> D0 pi0]cc"],
+                                                               DaughtersCuts = {"D0"    :"ALL",
+                                                                                "pi0" : "(PT > 300*MeV)"},
+                                                               CombinationCut = "(AM - ACHILD(1,M) < 350*MeV)",
+                                                               MotherCut =    "(VFASPF(VCHI2/VDOF) < 6)"),
+                                     RequiredSelections = [self.D0,StdLooseResolvedPi0, StdLooseMergedPi0])
+
+        # The Dst with pi0 (Dalitz)
+        self.DstD0Pi0Dalitz = Selection("DstD0Pi0DalitzFor"+name,
+                                        Algorithm=CombineParticles(DecayDescriptors = ["[D*(2007)0 -> D0 pi0]cc"],
+                                                                   DaughtersCuts = {"D0"    :"ALL",
+                                                                                    "pi0" : "(PT > 300*MeV)"},
+                                                                   CombinationCut = "(AM - ACHILD(1,M) < 350*MeV)",
+                                                                   MotherCut =    "(VFASPF(VCHI2/VDOF) < 6)"),
+                                        RequiredSelections = [self.D0,StdLooseDalitzPi0])
+
+        # The B- with detached dielectron
+        self.BDstD0Gamma = Selection("BDstD0GammaFor"+name,
+                                     Algorithm=CombineParticles(DecayDescriptors = ["[B- -> D*(2007)0 mu-]cc"],
+                                                                DaughtersCuts = {"mu-":"(PT > 1200*MeV) & (MIPCHI2DV(PRIMARY) > 16) & (PIDmu > 0)"},
+                                                                CombinationCut = "(AM > 2200*MeV) & (AM < 6000*MeV)",
+                                                                MotherCut =    "(VFASPF(VCHI2/VDOF) < 6) & (BPVVDCHI2 > 25.) & (BPVDIRA> 0.99)"),
+                                     RequiredSelections = [self.DstD0Gamma,StdLooseMuons])
+
+        # The B- with detached dielectron, same-sign
+        self.BDstD0GammaSS = Selection("BDstD0GammaSSFor"+name,
+                                     Algorithm=CombineParticles(DecayDescriptors = ["[B- -> D*(2007)0 mu-]cc"],
+                                                                DaughtersCuts = {"mu-":"(PT > 1200*MeV) & (MIPCHI2DV(PRIMARY) > 16) & (PIDmu > 0)"},
+                                                                CombinationCut = "(AM > 2200*MeV) & (AM < 6000*MeV)",
+                                                                MotherCut =    "(VFASPF(VCHI2/VDOF) < 6) & (BPVVDCHI2 > 25.) & (BPVDIRA> 0.99)"),
+                                     RequiredSelections = [self.DstD0GammaSS,StdLooseMuons])
+
+        # The B- with prompt dielectron
+        self.BDstD0Aprime = Selection("BDstD0AprimeFor"+name,
+                                      Algorithm=CombineParticles(DecayDescriptors = ["[B- -> D*(2007)0 mu-]cc"],
+                                                                 DaughtersCuts = {"mu-":"(PT > 1200*MeV) & (MIPCHI2DV(PRIMARY) > 16) & (PIDmu > 0)"},
+                                                                 CombinationCut = "(AM > 2200*MeV) & (AM < 6000*MeV)",
+                                                                 MotherCut =    "(VFASPF(VCHI2/VDOF) < 6) & (BPVVDCHI2 > 25.) & (BPVDIRA> 0.99)"),
+                                      RequiredSelections = [self.DstD0Aprime,StdLooseMuons])
+
+        # The B- with prompt dielectron, same-sign
+        self.BDstD0AprimeSS = Selection("BDstD0AprimeSSFor"+name,
+                                        Algorithm=CombineParticles(DecayDescriptors = ["[B- -> D*(2007)0 mu-]cc"],
+                                                                   DaughtersCuts = {"mu-":"(PT > 1200*MeV) & (MIPCHI2DV(PRIMARY) > 16) & (PIDmu > 0)"},
+                                                                   CombinationCut = "(AM > 2200*MeV) & (AM < 6000*MeV)",
+                                                                   MotherCut =    "(VFASPF(VCHI2/VDOF) < 6) & (BPVVDCHI2 > 25.) & (BPVDIRA> 0.99)"),
+                                        RequiredSelections = [self.DstD0AprimeSS,StdLooseMuons])
+
+        # The B- with pi0
+        self.BDstD0Pi0 = Selection("BDstD0Pi0For"+name,
+                                   Algorithm=CombineParticles(DecayDescriptors = ["[B- -> D*(2007)0 mu-]cc"],
+                                                              DaughtersCuts = {"mu-":"(PT > 1200*MeV) & (MIPCHI2DV(PRIMARY) > 16) & (PIDmu > 0)"},
+                                                              CombinationCut = "(AM > 2200*MeV) & (AM < 6000*MeV)",
+                                                              MotherCut =    "(VFASPF(VCHI2/VDOF) < 6) & (BPVVDCHI2 > 25.) & (BPVDIRA> 0.99)"),
+                                   RequiredSelections = [self.DstD0Pi0,StdLooseMuons])
+        
+        # The B- with pi0 (Dalitz)
+        self.BDstD0Pi0Dalitz = Selection("BDstD0Pi0DalitzFor"+name,
+                                         Algorithm=CombineParticles(DecayDescriptors = ["[B- -> D*(2007)0 mu-]cc"],
+                                                                    DaughtersCuts = {"mu-":"(PT > 1200*MeV) & (MIPCHI2DV(PRIMARY) > 16) & (PIDmu > 0)"},
+                                                                    CombinationCut = "(AM > 2200*MeV) & (AM < 6000*MeV)",
+                                                                    MotherCut =    "(VFASPF(VCHI2/VDOF) < 6) & (BPVVDCHI2 > 25.) & (BPVDIRA> 0.99)"),
+                                         RequiredSelections = [self.DstD0Pi0Dalitz,StdLooseMuons])
+
+        
+        # Registering the lines
+        self.lineDstD0Gamma    =  StrippingLine(name+'Dst0D0GammaLine', 
+                                                #HLT = config["HLT_FILTER"],
+                                                prescale = 1.0,
+                                                selection = self.BDstD0Gamma)
+        
+        self.lineDstD0GammaSS  =  StrippingLine(name+'Dst0D0GammaSSLine', 
+                                                #HLT = config["HLT_FILTER"],
+                                                prescale = 1.0,
+                                                selection = self.BDstD0GammaSS)
+        
+        self.lineDstD0Aprime   =  StrippingLine(name+'Dst0D0AprimeLine', 
+                                                #HLT = config["HLT_FILTER"],
+                                                prescale = 1.0,
+                                                selection = self.BDstD0Aprime)
+        
+        self.lineDstD0AprimeSS =  StrippingLine(name+'Dst0D0AprimeSSLine', 
+                                                #HLT = config["HLT_FILTER"],
+                                                prescale = 1.0,
+                                                selection = self.BDstD0AprimeSS)
+
+        self.lineDstD0Pi0      =  StrippingLine(name+'Dst0D0Pi0Line', 
+                                             #HLT = config["HLT_FILTER"],
+                                             prescale = 1.0,
+                                             selection = self.BDstD0Pi0)
+
+        self.lineDstD0Pi0Dalitz   =  StrippingLine(name+'Dst0D0Pi0DalitzLine', 
+                                                   #HLT = config["HLT_FILTER"],
+                                                   prescale = 1.0,
+                                                   selection = self.BDstD0Pi0Dalitz)
+        
+        self.registerLine(self.lineDstD0Gamma)
+        self.registerLine(self.lineDstD0GammaSS)
+        self.registerLine(self.lineDstD0Aprime)
+        self.registerLine(self.lineDstD0AprimeSS)
+        self.registerLine(self.lineDstD0Pi0)
+        self.registerLine(self.lineDstD0Pi0Dalitz)
+        
+
+def TOSFilter( name = None, sel = None, trigger = None ):
+    if len(trigger) == 0:
+        return sel
+    from Configurables import TisTosParticleTagger
+    _filter = TisTosParticleTagger(name+"_TriggerTos")
+    _filter.TisTosSpecs = trigger
+    _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = [ sel ], Algorithm = _filter )
+    return _sel
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DstMuNuIncl.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DstMuNuIncl.py
new file mode 100644
index 000000000..913d9fd85
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2DstMuNuIncl.py
@@ -0,0 +1,106 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Mika Vesterinen']
+__date__ = '04/04/2015'
+__version__ = '$Revision: 0.0 $'
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseKaons, StdAllLoosePions
+
+__all__ = ('B2DstMuNuInclAllLinesConf',
+           'TOSFilter',
+           'default_config')
+
+default_config = {
+    'NAME'        : 'B2DstMuNuIncl',
+    'WGs'         : ['Semileptonic'],
+    'BUILDERTYPE' : 'B2DstMuNuInclAllLinesConf',
+    'CONFIG'      : {
+            "TTSpecs"      : {}#{'Hlt1.*Track.*Decision%TOS':0,'Hlt2TopoMu(2|3|4)Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0} 
+            ,"HLT_FILTER"   : ""#"HLT_PASS_RE('Hlt2.*SingleMuon.*Decision') | HLT_PASS_RE('Hlt2TopoMu(2|3|4)Body.*Decision')"
+            },
+    'STREAMS'     : ['Semileptonic'],
+}
+
+class B2DstMuNuInclAllLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+        
+        
+        self.D0 = Selection("D0For"+name,
+                            Algorithm=CombineParticles(DecayDescriptors = ["[D0 -> K- pi+]cc"],
+                                                       DaughtersCuts = {"K-":"(PIDK > 10) & (PT > 800*MeV)",
+                                                                        "pi+":"(PIDK < 4) & (PT > 500*MeV)"},
+                                                       CombinationCut = "(AM > 900*MeV) & (AM < 1900*MeV) & (ADOCACHI2CUT(10, ''))",
+                                                       MotherCut =    "(VFASPF(VCHI2/VDOF) < 3) & (BPVVDCHI2 > 100.) & (BPVDIRA> 0.99)"),
+                            RequiredSelections = [StdLooseKaons,StdLoosePions])
+        
+        self.Dst = Selection("DstFor"+name,
+                             Algorithm=CombineParticles(DecayDescriptors = ["[D*(2010)+ -> D0 pi+]cc"],
+                                                        DaughtersCuts = {"pi+":"(PIDe < 5) & (PT > 120*MeV)"},
+                                                        CombinationCut = "(AM - ACHILD(1,M) < 220*MeV)",
+                                                        MotherCut =    "(VFASPF(VCHI2/VDOF) < 3)"),
+                             RequiredSelections = [self.D0,StdAllLoosePions])
+        
+        self.DstWS = Selection("DstWSFor"+name,
+                               Algorithm=CombineParticles(DecayDescriptors = ["[D*(2010)- -> D0 pi-]cc"],
+                                                          DaughtersCuts = {"pi+":"(PIDe < 5) & (PT > 120*MeV)"},
+                                                          CombinationCut = "(AM - ACHILD(1,M) < 220*MeV)",
+                                                          MotherCut =    "(VFASPF(VCHI2/VDOF) < 3)"),
+                               RequiredSelections = [self.D0,StdAllLoosePions])
+        
+        self.B = Selection("BFor"+name,
+                           Algorithm=CombineParticles(DecayDescriptors = ["[B~0 -> D*(2010)+ mu-]cc"],
+                                                      DaughtersCuts = {"mu-":"(PT > 1200*MeV)"},
+                                                      CombinationCut = "(AM > 2500*MeV) & (AM < 5000*MeV)",
+                                                      MotherCut =    "(VFASPF(VCHI2/VDOF) < 3) & (BPVVDCHI2 > 25.) & (BPVDIRA> 0.99)"),
+                           RequiredSelections = [self.Dst,StdLooseMuons])
+        
+        self.BWS = Selection("BWSFor"+name,
+                             Algorithm=CombineParticles(DecayDescriptors = ["[B~0 -> D*(2010)+ mu-]cc"],
+                                                        DaughtersCuts = {"mu-":"(PT > 1200*MeV)"},
+                                                        CombinationCut = "(AM > 2500*MeV) & (AM < 5000*MeV)",
+                                                        MotherCut =    "(VFASPF(VCHI2/VDOF) < 3) & (BPVVDCHI2 > 25.) & (BPVDIRA> 0.99)"),
+                             RequiredSelections = [self.DstWS,StdLooseMuons])
+        
+        
+        self.line =  StrippingLine(name+'Line', 
+                                   #HLT = config["HLT_FILTER"],
+                                   prescale = 1.0,
+                                   selection = self.B) #TOSFilter("TOSB"+name,B,config["TTSpecs"]))
+
+        self.lineWS =  StrippingLine(name+'WSLine', 
+                                   prescale = 1.0,
+                                   selection = self.BWS) 
+        
+        self.registerLine(self.line)
+        self.registerLine(self.lineWS)
+
+
+def TOSFilter( name = None, sel = None, trigger = None ):
+    if len(trigger) == 0:
+        return sel
+    from Configurables import TisTosParticleTagger
+    _filter = TisTosParticleTagger(name+"_TriggerTos")
+    _filter.TisTosSpecs = trigger
+    _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = [ sel ], Algorithm = _filter )
+    return _sel
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Invis.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Invis.py
new file mode 100644
index 000000000..cc8f3e69d
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2Invis.py
@@ -0,0 +1,340 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Mark Smith']
+__date__ = '13/03/2021'
+__version__ = '$Revision: 0.0 $'
+"""
+These are some lines for measuring the BF of Lc->pKpi and Ds->KKpi
+"""
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseKaons, StdAllLoosePions
+
+__all__ = ('B2InvisAllLinesConf',
+           'default_config')
+
+default_config = {
+    'NAME'        : 'B2Invis',
+    'WGs'         : ['Semileptonic'],
+    'BUILDERTYPE' : 'B2InvisAllLinesConf',
+    'CONFIG'      : {
+          "GEC_nSPDHits"        : 600.   ,#adimensional
+          #Proton Cuts
+          "TRGHOSTPROB"         : 0.3,
+          "ProtonTRCHI2"        : 3.     ,#adimensional
+          "ProtonP"             : 15000. ,#MeV
+          "ProtonPT"            : 800.  , 
+          "ProtonPIDK"          : 4.     ,#adimensional 
+          "ProtonPIDp"          : 4.     ,#adimensional
+          "ProtonMINIPCHI2"     : 16.    ,#adminensional
+          #Pion Cuts 
+          "PionTRCHI2"        : 3.     ,#adimensional
+          "PionP"             : 3000. ,#MeV
+          "PionPT"            : 500.  , 
+          "PionPIDK"          : 0.     ,#adimensional 
+          "PionMINIPCHI2"     : 16.    ,#adminensional
+          #Xu Cuts
+          "XuPT"                : 1800. ,#MeV
+          "XuVCHI2DOF"           : 3.     ,#adminensional
+          "XuDIRA"               : 0.9995  ,#adminensional
+          "XuFDCHI2HIGH"         : 150.   ,#adimensional
+          "XuMassLower"        : 1230.  ,#MeV
+          "XuMassUpper"         : 2800, #MeV
+          #B Cuts
+          "BVCHI2DOF"           : 4.     ,#adminensional
+          "BDIRA"               : 0.9995  ,#adminensional
+          "BFDCHI2HIGH"         : 150.   ,#adimensional
+          "XuPiPT"               : 2500.,  #MeV
+          "XuPiP"               : 40000.,   #MeV
+          "XuPiMassLower"        : 1800.  ,#MeV
+          "XuPiMassUpper"       : 2900  ,#MeV
+          "massDiff"            : 400,
+          "XuPiConstrainMLower" : 2300, #MeV
+          "XuPiConstrainMUpper" : 2700, #MeV
+            },
+    'STREAMS'     : ['Semileptonic'],
+}
+
+class B2InvisAllLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+
+        self.GECs = { "Code":"( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(GEC_nSPDHits)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}      
+
+        self._protonSel=None
+        self._protonFilter()
+
+        self._fakeProtonSel=None
+        self._fakeProtonFilter()
+
+
+        self._pionSel=None
+        self._pionFilter()
+
+        self._picSel=None
+        self._picFilter()
+
+        self._XuSel = None
+        self._XuFilter()
+
+        self._fakeP_XuSel = None
+        self._fakeP_XuFilter()
+
+
+        self._Definitions()
+
+        self.registerLine(self._Bplus_line())
+        self.registerLine(self._Bplus_SS_line())
+        self.registerLine(self._Bplus_fakeP_line())
+
+
+    def _Definitions(self):
+        return [ 
+            "from LoKiPhys.decorators import *",
+                           ]
+
+    #Define selection strings for the decay products
+    def _NominalPSelection( self ):
+        return "(TRCHI2DOF < %(ProtonTRCHI2)s ) &  (P> %(ProtonP)s *MeV) &  (PT> %(ProtonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDp-PIDpi > %(ProtonPIDp)s )& (PIDp-PIDK > %(ProtonPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(ProtonMINIPCHI2)s )"\
+               "& (switch(ISMUON,1,0) < 1)"
+
+    #Define selection strings for the decay products
+    def _FakePSelection( self ):
+        return "(TRCHI2DOF < %(ProtonTRCHI2)s ) &  (P> %(ProtonP)s *MeV) &  (PT> %(ProtonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDp-PIDpi < %(ProtonPIDp)s )& (PIDp-PIDK < %(ProtonPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(ProtonMINIPCHI2)s )"\
+               "& (switch(ISMUON,1,0) < 1)"
+
+
+    def _NominalPiSelection( self ):
+        return "(TRCHI2DOF < %(ProtonTRCHI2)s ) &  (P> %(PionP)s *MeV) &  (PT> %(PionPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK < %(PionPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"\
+               "& (switch(ISMUON,1,0) < 1)"
+
+    def _PicSelection( self ):
+        return "(TRCHI2DOF < %(ProtonTRCHI2)s ) &  (P> %(PionP)s *MeV) &  (PT> %(ProtonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK < %(PionPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"\
+               "& (switch(ISMUON,1,0) < 1)"
+
+    #Define selection string for the decay products of the B+ that are not from the sigma++
+    def _XuSelection( self ):
+        return "(VFASPF(VCHI2/VDOF)< %(XuVCHI2DOF)s) & (BPVDIRA> %(XuDIRA)s)"\
+                     " & (BPVVDCHI2 >%(XuFDCHI2HIGH)s)"\
+                     " & (PT > %(XuPT)s)"\
+                     " & (M < %(XuMassUpper)s) & (M > %(XuMassLower)s)"
+    #Define the selection for the Bplus candidate
+    def _BPlusSelection( self ):
+        return "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+                     "& (PT > %(XuPiPT)s) & (P > %(XuPiP)s)"\
+                     "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)"\
+                     " & (abs(M-MAXTREE('Delta++'==ABSID,M)-169.) < %(massDiff)s )" \
+                     " & (BPVMASSMOMCONSTR('Lambda_c+', 2, True) < %(XuPiConstrainMUpper)s) & (BPVMASSMOMCONSTR('Lambda_c+', 2, True) > %(XuPiConstrainMLower)s) "
+
+    ###### Pion Filter ######
+    def _pionFilter( self ):
+        if self._pionSel is not None:
+            return self._pionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _pi = FilterDesktop( Code = self._NominalPiSelection() % self._config )
+        _piSel=Selection("pi_for"+self._name,
+                         Algorithm=_pi,
+                         RequiredSelections = [StdLoosePions])
+        
+        self._pionSel=_piSel
+        return _piSel
+
+    ###### Pion from Sigma_c Filter ######
+    def _picFilter( self ):
+        if self._picSel is not None:
+            return self._picSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _pic = FilterDesktop( Code = self._PicSelection() % self._config )
+        _picSel=Selection("pic_for"+self._name,
+                         Algorithm=_pic,
+                         RequiredSelections = [StdLoosePions])
+        
+        self._picSel=_picSel
+        return _picSel
+
+    ###### Proton Filter ######
+    def _protonFilter( self ):
+        if self._protonSel is not None:
+            return self._protonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseProtons
+        
+        _pr = FilterDesktop( Code = self._NominalPSelection() % self._config )
+        _prSel=Selection("p_for"+self._name,
+                         Algorithm=_pr,
+                         RequiredSelections = [StdLooseProtons])
+        
+        self._protonSel=_prSel
+        
+        return _prSel
+
+    ###### Proton Filter ######
+    def _fakeProtonFilter( self ):
+        if self._fakeProtonSel is not None:
+            return self._fakeProtonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsProtons
+        
+        _pr = FilterDesktop( Code = self._FakePSelection() % self._config )
+        _prSel=Selection("fake_p_for"+self._name,
+                         Algorithm=_pr,
+                         RequiredSelections = [StdNoPIDsProtons])
+        
+        self._fakeProtonSel=_prSel
+        
+        return _prSel
+
+    ##### Xu Filter #####
+    def _XuFilter( self ):
+        if self._XuSel  is not None:
+            return self._XuSel
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        Xu = CombineParticles(DecayDescriptors = ["[Delta++ -> p+ pi+ pi+]cc"], ReFitPVs = True)
+        Xu.Preambulo = self._Definitions()
+        Xu.MotherCut = self._XuSelection() % self._config
+        Xu.ReFitPVs = True
+            
+        XuSel=Selection("Xu_B_for"+self._name,
+                         Algorithm=Xu,
+                         RequiredSelections = [self._protonFilter(), self._pionFilter()])
+        self._XuSel = XuSel 
+        return XuSel
+
+    ##### Xu Filter #####
+    def _fakeP_XuFilter( self ):
+        if self._fakeP_XuSel  is not None:
+            return self._fakeP_XuSel
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        Xu = CombineParticles(DecayDescriptors = ["[Delta++ -> p+ pi+ pi+]cc"], ReFitPVs = True)
+        Xu.Preambulo = self._Definitions()
+        Xu.MotherCut = self._XuSelection() % self._config
+        Xu.ReFitPVs = True
+            
+        XuSel=Selection("fakeP_Xu_B_for"+self._name,
+                         Algorithm=Xu,
+                         RequiredSelections = [self._fakeProtonFilter(), self._pionFilter()])
+        self._fakeP_XuSel = XuSel 
+        return XuSel
+
+    ##### B+ Filter #####
+    def _BpFilter( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection,MergedSelection
+        
+        _XuPi = CombineParticles(DecayDescriptors = ["[B+ -> Delta++ pi-]cc"], ReFitPVs = True)
+        _XuPi.Preambulo = self._Definitions()
+        _XuPi.CombinationCut = "(AM>%(XuPiMassLower)s*MeV) & (AM<%(XuPiMassUpper)s)" % self._config
+        _XuPi.MotherCut = self._BPlusSelection() % self._config
+        _XuPi.ReFitPVs = True
+            
+        _XuPiSel=Selection("XuPi_B_for"+self._name,
+                         Algorithm=_XuPi,
+                         RequiredSelections = [self._picFilter(), self._XuFilter()])
+        return _XuPiSel
+
+    ##### B+ same-sign Filter #####
+    def _Bp_SSFilter( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection,MergedSelection
+        
+        _XuPi = CombineParticles(DecayDescriptors = ["[B+ -> Delta++ pi+]cc"], ReFitPVs = True)
+        _XuPi.Preambulo = self._Definitions()
+        _XuPi.CombinationCut = "(AM>%(XuPiMassLower)s*MeV) & (AM<%(XuPiMassUpper)s)" % self._config
+        _XuPi.MotherCut = self._BPlusSelection() % self._config
+        _XuPi.ReFitPVs = True
+            
+        _XuPiSel=Selection("XuPiSS_B_for"+self._name,
+                         Algorithm=_XuPi,
+                         RequiredSelections = [self._picFilter(), self._XuFilter()])
+        return _XuPiSel
+
+    ##### B+ fake proton Filter #####
+    def _Bp_fakeP_Filter( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection,MergedSelection
+        
+        _XuPi = CombineParticles(DecayDescriptors = ["[B+ -> Delta++ pi-]cc"], ReFitPVs = True)
+        _XuPi.Preambulo = self._Definitions()
+        _XuPi.CombinationCut = "(AM>%(XuPiMassLower)s*MeV) & (AM<%(XuPiMassUpper)s)" % self._config
+        _XuPi.MotherCut = self._BPlusSelection() % self._config
+        _XuPi.ReFitPVs = True
+            
+        _XuPiSel=Selection("XuPi_fakeP_B_for"+self._name,
+                         Algorithm=_XuPi,
+                         RequiredSelections = [self._picFilter(), self._fakeP_XuFilter()])
+        return _XuPiSel
+
+    ##### Signal line #####
+    def _Bplus_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = ""
+        ldu = ''
+        return StrippingLine(self._name+'Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._BpFilter()], HLT2 = hlt, L0DU = ldu)
+
+    ##### same-sign line #####
+    def _Bplus_SS_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = ""
+        ldu = ''
+        return StrippingLine(self._name+'SSLine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bp_SSFilter()], HLT2 = hlt, L0DU = ldu)
+
+    ##### fake proton line #####
+    def _Bplus_fakeP_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = ""
+        ldu = ''
+        return StrippingLine(self._name+'fakePLine', prescale = 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bp_fakeP_Filter()], HLT2 = hlt, L0DU = ldu)        
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2PPbarMuForTauMu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2PPbarMuForTauMu.py
new file mode 100644
index 000000000..7d4ab2b6e
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2PPbarMuForTauMu.py
@@ -0,0 +1,568 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = ['Mark Smith']
+__date__ = '17/10/2016'
+__version__ = '$Revision: 1.0 $'
+
+'''
+B+->p p~ tau nu exclusive reconstruction. A mash up of the Strippingbhad2PMuX and
+StrippingB2DMuForTauMu lines.
+'''
+# =============================================================================
+##
+#  B+ -> p p~ tau nu exclusive reconstruction. 
+#
+#  Stripping lines for the charmless semileptonic decay B+ -> p p~ tau nu.
+#
+#  The lines will lead to a  measurement of the ratio of branching fractions
+#  of B+ -> p p~ tau nu and B+ -> p p~ mu nu
+#
+#  This together with form factor predictions from either light cone
+#  sum rules or lattice QCD will allow a measurement of R(ppbar).
+# 
+#  Three lines are included:
+#  Two of which strip the opposite sign (right sign) proton and muon and combinations.
+#  One of which has no prescale and strips protons and muons with a corrected mass >
+#  4 GeV.  The other line is prescaled by a factor of 0.5 and strips < 4 GeV in corrected
+#  mass.  This exploits the fact that the corrected mass for Lb->pmunu peaks at the Lambda_b
+#  mass.  The final line strips same sign proton and muon cominations over the whole corrected 
+#  mass region.  This will be ussed to extract shapes for the combinatorial background.
+#
+#  Stripping XX, with requirements that the
+#  rate <0.05% and timing <0.5ms/evt.
+## 
+
+"""
+  b->p p mu nu X reconstruction. 
+
+  Stripping lines for the charmless semileptonic decay B+ -> p p~ mu nu.
+
+  The lines will lead to a  measurement of the ratio of branching frations
+  B+->p p~ tau nu and B+-> p p~ mu nu. 
+
+  This together with form factor predictions from either light cone
+  sum rules or lattice QCD will allow a measurement of R(ppbar).
+ 
+  Last modification $Date: 2016-October-17 $
+               by $Author: Mark Smith $
+"""
+
+default_config = {
+  'NAME'        : 'B2PPbarMuForTauMu',
+  'WGs'         : ['Semileptonic'],
+  'BUILDERTYPE' : 'B2PPbarMuForTauMuBuilder',
+  'CONFIG'      : {
+      "GEC_nSPDHits"        : 600.   ,#adimensional
+      "TRGHOSTPROB"         : 0.35   ,#adimensional
+      #Muon Cuts
+      "MuonGHOSTPROB"       : 0.35   ,#adimensional
+      "MuonTRCHI2"          : 4.     ,#adimensional
+      "MuonP"               : 3000.  ,#MeV
+      "MuonMINIPCHI2"       : 16.    ,#adminensional
+      #Proton Cuts 
+      "ProtonTRCHI2"        : 3.     ,#adimensional
+      "ProtonP"             : 15000. ,#MeV
+      "ProtonPT"            : 800.  , 
+      "ProtonPIDK"          : 2.     ,#adimensional 
+      "ProtonPIDp"          : 2.     ,#adimensional
+      "ProtonMINIPCHI2"     : 9.    ,#adminensional
+      #B Mother Cuts
+      "BVCHI2DOF"           : 15.     ,#adminensional
+      "BDIRA"               : 0.999  ,#adminensional
+      "BFDCHI2HIGH"         : 50.   ,#adimensional
+      "PPbarVCHI2DOF"           : 8.     ,#adminensional
+      "PPbarDIRA"               : 0.999  ,#adminensional
+      "PPbarFDCHI2HIGH"         : 25.   ,#adimensional
+      "pMuMassLower"        : 1000.  ,#MeV
+      "ppMuPT"               : 1500.,  #MeV
+      "DECAYS"               : ["[B- -> J/psi(1S) mu-]cc"],
+      "FAKEPDECAYS"          :["[B- -> N(1440)0 mu-]cc", "[B+ -> N(1440)0 mu+]cc"]
+  },
+  'STREAMS'     : ['Semileptonic'],
+}
+
+from Gaudi.Configuration import *
+from StrippingUtils.Utils import LineBuilder
+
+import logging
+
+default_name="B2PPbarMuForTauMu"
+
+class B2PPbarMuForTauMuBuilder(LineBuilder):
+    """
+    Definition of B+->p p~ mu nu stripping
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+        self.GECs = { "Code":"( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < %(GEC_nSPDHits)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        self._muonSel=None
+        self._muonFilter()
+
+        self._protonSel=None
+        self._protonFilter()
+
+        self._daughtersSel=None
+        self._daughters()
+
+        self._daughters_SSSel=None
+        self._daughters_SS()
+
+
+        self._fakeprotonSel=None
+        self._fakeprotonFilter()
+
+        self._fakedaughtersSel=None
+        self._fakedaughters()
+
+        self._fakedaughters_SSSel=None
+        self._fakedaughters_SS()
+
+        self._fakemuonSel=None
+        self._fakemuonFilter()
+
+        self._Definitions()
+
+        self.registerLine(self._Bplus_line())
+        self.registerLine(self._BplusTopo_line())
+        self.registerLine(self._SS_Bplus_line())
+        self.registerLine(self._Bplus_fakeP_line())
+        self.registerLine(self._SS_Bplus_fakeP_line())
+        self.registerLine(self._Bplus_fakeMu_line())
+        self.registerLine(self._SS_Bplus_fakeMu_line())
+        
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (ISMUON)"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+
+    def _FakeMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+         "& (~ISMUON) & (INMUON)"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+    
+    def _NominalPSelection( self ):
+        return "(TRCHI2DOF < %(ProtonTRCHI2)s )&  (P> %(ProtonP)s *MeV) &  (PT> %(ProtonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDp-PIDpi> %(ProtonPIDp)s )& (PIDp-PIDK> %(ProtonPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(ProtonMINIPCHI2)s )"\
+               "& (switch(ISMUON,1,0) < 1)"
+
+    def _FakePSelection( self ):
+        return "(TRCHI2DOF < %(ProtonTRCHI2)s )&  (P> %(ProtonP)s *MeV) &  (PT> %(ProtonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(ProtonMINIPCHI2)s )"\
+               "& (switch(ISMUON,1,0) < 1)"
+
+    def _PPbarSelection( self ):
+        return "(VFASPF(VCHI2/VDOF)< %(PPbarVCHI2DOF)s) & (BPVDIRA> %(PPbarDIRA)s)"\
+                     "& (BPVVDCHI2 >%(PPbarFDCHI2HIGH)s)"
+
+    def _fakePPbarSelection( self ):
+        return "(VFASPF(VCHI2/VDOF)< %(PPbarVCHI2DOF)s) & (BPVDIRA> %(PPbarDIRA)s)"\
+                     "& (INTREE((ABSID == 'p+')& (PIDp-PIDpi> %(ProtonPIDp)s )&(PIDp-PIDK> %(ProtonPIDK)s ))) "\
+                     "& (BPVVDCHI2 >%(PPbarFDCHI2HIGH)s)"
+
+    def _BMotherSelection( self ):
+        return "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+                     "& (PT > %(ppMuPT)s)"\
+                     "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)"
+
+
+
+
+    ###### Signal Line  ######
+
+    def _Bplus_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2XcMuXForTauB2XcMuDecision')"
+        ldu = ''
+        return StrippingLine(self._name+'Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuX_B()], HLT2 = hlt, L0DU = ldu)
+
+
+    ###### Signal Line from TOPO  ######
+
+    def _BplusTopo_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2TopoMu.*Body.*Decision')"
+        ldu = ''
+        return StrippingLine(self._name+'TopoLine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuX_BTopo()], HLT2 = hlt, L0DU = ldu)
+
+
+
+    ##### Same-sign protons line #####
+
+    def _SS_Bplus_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = ''
+        ldu = ''
+        return StrippingLine(self._name+'SSLine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuX_B_SS()], HLT2 = hlt, L0DU = ldu)
+
+    ##### Fake muon line #####
+
+    def _Bplus_fakeMu_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = ''
+        ldu = ''
+        return StrippingLine(self._name+'fakeMuLine', prescale = 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuX_B_fakeMu()], HLT2 = hlt, L0DU = ldu)
+
+    ##### Fake proton line #####
+
+    def _Bplus_fakeP_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = ''
+        ldu = ''
+        return StrippingLine(self._name+'fakePLine', prescale = 0.06,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuX_B_fakeP()], HLT2 = hlt, L0DU = ldu)
+
+    ##### Same-sign protons with one a fake #####
+
+    def _SS_Bplus_fakeP_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = ''
+        ldu = ''
+        return StrippingLine(self._name+'SSfakePLine', prescale = 0.06,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuX_B_SSfakeP()], HLT2 = hlt, L0DU = ldu)
+
+    ##### Same-sign protons with a fake muon #####
+
+    def _SS_Bplus_fakeMu_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = ''
+        ldu = ''
+        return StrippingLine(self._name+'SSfakeMuLine', prescale = 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuX_B_SSfakeMu()], HLT2 = hlt, L0DU = ldu)
+
+
+    ##### Muon Filter ######
+    def _muonFilter( self ):
+        if self._muonSel is not None:
+            return self._muonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseMuons
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+
+        _muSel=Selection("Mu_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseMuons])
+        
+        self._muonSel=_muSel
+        
+        return _muSel
+
+    ##### Fake Muon Filter ######
+    def _fakemuonFilter( self ):
+        if self._fakemuonSel is not None:
+            return self._fakemuonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllNoPIDsMuons
+        _mu = FilterDesktop( Code = self._FakeMuSelection() % self._config )
+
+        _muSel=Selection("fakeMu_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdAllNoPIDsMuons])
+        
+        self._fakemuonSel=_muSel
+        
+        return _muSel
+
+    ###### Proton Filter ######
+    def _protonFilter( self ):
+        if self._protonSel is not None:
+            return self._protonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseProtons
+        
+        _pr = FilterDesktop( Code = self._NominalPSelection() % self._config )
+        _prSel=Selection("p_for"+self._name,
+                         Algorithm=_pr,
+                         RequiredSelections = [StdLooseProtons])
+        
+        self._protonSel=_prSel
+        
+        return _prSel
+
+    ##### Fake Proton Filter ######
+    def _fakeprotonFilter( self ):
+        if self._fakeprotonSel is not None:
+            return self._fakeprotonSel
+  
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllNoPIDsPions
+        
+        _pr = FilterDesktop( Code = self._FakePSelection() % self._config )
+        _prSel=Selection("fakep_for"+self._name,
+                         Algorithm=_pr,
+                         RequiredSelections = [StdAllNoPIDsPions])
+        
+        self._fakeprotonSel=_prSel
+        
+        return _prSel
+
+
+    def _Definitions(self):
+        return [ 
+            "from LoKiPhys.decorators import *",
+                           ]
+
+    ###### Signal ppbar selection ######
+    def _PPbar( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        PPbar = CombineParticles(DecayDescriptors = ["J/psi(1S) -> p+ p~-"], ReFitPVs = True)
+        PPbar.Preambulo = self._Definitions()
+        PPbar.MotherCut = self._PPbarSelection() % self._config
+        PPbar.ReFitPVs = True
+            
+        PPbarSel=Selection("PPbar_B_for"+self._name,
+                         Algorithm=PPbar,
+                         RequiredSelections = [self._protonFilter()])
+         
+        return PPbarSel
+
+    ###### Same-sign ppbar selection ######
+    def _PPbar_SS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        PPbar_SS = CombineParticles(DecayDescriptors = ["[J/psi(1S) -> p+ p+]cc"], ReFitPVs = True)
+        PPbar_SS.Preambulo = self._Definitions()
+        PPbar_SS.MotherCut = self._PPbarSelection() % self._config
+        PPbar_SS.ReFitPVs = True
+            
+        PPbar_SSSel=Selection("PPbar_SS_B_for"+self._name,
+                         Algorithm=PPbar_SS,
+                         RequiredSelections = [self._protonFilter()])
+         
+        return PPbar_SSSel
+
+    ##### Fake proton selection #####
+
+    def _fakePPbar( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        PPbar = CombineParticles(DecayDescriptors = ["[N(1440)0 -> p+ pi-]cc"], ReFitPVs = True)
+        PPbar.Preambulo = self._Definitions()
+        PPbar.MotherCut = self._fakePPbarSelection() % self._config
+        PPbar.ReFitPVs = True
+            
+        PPbarSel=Selection("fakePPbar_B_for"+self._name,
+                         Algorithm=PPbar,
+                         RequiredSelections = [self._fakeprotonFilter(), self._protonFilter()])
+         
+        return PPbarSel
+
+    ##### Fake proton SS selection #####
+	
+    def _fakePPbar_SS( self ):
+	
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+	
+        PPbar = CombineParticles(DecayDescriptors = ["[N(1440)0 -> p+ pi+]cc"], ReFitPVs = True)
+        PPbar.Preambulo = self._Definitions()
+        PPbar.MotherCut = self._fakePPbarSelection() % self._config
+        PPbar.ReFitPVs = True
+        PPbarSel=Selection("fakePPbar_SS_B_for"+self._name,
+                         Algorithm=PPbar,
+                         RequiredSelections = [self._fakeprotonFilter(), self._protonFilter()])
+        return PPbarSel
+
+    ###### Hadron daughters selection ######
+
+    def _daughters( self ):
+        if self._daughtersSel is not None:
+            return self._daughtersSel
+        from PhysSelPython.Wrappers import MergedSelection
+        _sel_Daughters = MergedSelection("Selection_mergeddaughters"+self._name,
+                                         RequiredSelections = [self._PPbar()])
+        self._daughtersSel=_sel_Daughters
+        return _sel_Daughters
+
+    ###### Same-sign Hadron daughters selection ######
+
+    def _daughters_SS( self ):
+        if self._daughters_SSSel is not None:
+            return self._daughters_SSSel
+        from PhysSelPython.Wrappers import MergedSelection
+        _sel_Daughters = MergedSelection("Selection_same-sign_mergeddaughters"+self._name,
+                                         RequiredSelections = [self._PPbar_SS()])
+        self._daughters_SSSel=_sel_Daughters
+        return _sel_Daughters
+
+    ##### Daughters, PID on only one #####
+
+    def _fakedaughters( self ):
+        if self._fakedaughtersSel is not None:
+            return self._fakedaughtersSel
+        from PhysSelPython.Wrappers import MergedSelection
+        _sel_Daughters = MergedSelection("Selection_fakemergeddaughters"+self._name,
+                                         RequiredSelections = [self._fakePPbar()])
+        self._fakedaughtersSel=_sel_Daughters
+        return _sel_Daughters
+
+
+    ##### SS Daughters, PID on only one #####
+	
+    def _fakedaughters_SS( self ):
+        if self._fakedaughters_SSSel is not None:
+            return self._fakedaughters_SSSel
+        from PhysSelPython.Wrappers import MergedSelection
+        _sel_Daughters = MergedSelection("Selection_fakemergeddaughters_SS"+self._name,
+                                         RequiredSelections = [self._fakePPbar_SS()])
+        self._fakedaughters_SSSel=_sel_Daughters
+        return _sel_Daughters
+
+    ###### B->ppMuNu Signal ######
+    def _bhad2PMuX_B( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection,MergedSelection
+        
+        _pMu = CombineParticles(DecayDescriptors = self._config["DECAYS"], ReFitPVs = True)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = self._BMotherSelection() % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("ppMu_B_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._muonFilter(), self._daughters()])
+        return _pMuSel
+
+
+    ###### B->ppMuNu Signal for Topo Line ######
+    def _bhad2PMuX_BTopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection,MergedSelection
+        
+        _pMu = CombineParticles(DecayDescriptors = self._config["DECAYS"], ReFitPVs = True)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = self._BMotherSelection() % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("ppMu_BTopo_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._muonFilter(), self._daughters()])
+        return _pMuSel
+
+
+    ###### B->ppMuNu Same-Sign protons ######
+    def _bhad2PMuX_B_SS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection,MergedSelection
+        
+        _pMu = CombineParticles(DecayDescriptors = self._config["DECAYS"], ReFitPVs = True)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = self._BMotherSelection() % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("ppMu_SS_B_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._muonFilter(), self._daughters_SS()])
+        return _pMuSel
+
+
+
+    ###### Lb->pMuNu Fake Muon ######
+    def _bhad2PMuX_B_fakeMu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMu = CombineParticles(DecayDescriptors = self._config["DECAYS"], ReFitPVs = True)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = self._BMotherSelection() % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("ppMu_fakeMu_B_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._fakemuonFilter(), self._daughters()])
+        return _pMuSel
+
+    ###### Lb->pMuNu Fake Proton ######
+    def _bhad2PMuX_B_fakeP( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMu = CombineParticles(DecayDescriptors = self._config["FAKEPDECAYS"], ReFitPVs = True)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV) & (AM<8000*MeV)" % self._config
+        _pMu.MotherCut = self._BMotherSelection() % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("ppMu_fakeP_B_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._muonFilter(), self._fakedaughters()])
+        return _pMuSel
+
+    ###### Lb->pMuNu same-sign protons with a Fake Proton ######
+    def _bhad2PMuX_B_SSfakeP( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMu = CombineParticles(DecayDescriptors = self._config["FAKEPDECAYS"], ReFitPVs = True)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV) & (AM<8000*MeV)" % self._config
+        _pMu.MotherCut = self._BMotherSelection() % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("ppMu_SSfakeP_B_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._muonFilter(), self._fakedaughters()])
+        return _pMuSel
+
+    ###### Lb->pMuNu same-sign protons with a Fake Muon ######
+    def _bhad2PMuX_B_SSfakeMu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMu = CombineParticles(DecayDescriptors = self._config["DECAYS"], ReFitPVs = True)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = self._BMotherSelection() % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("ppMu_SSfakeMu_B_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._fakemuonFilter(), self._daughters_SS()])
+        return _pMuSel
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XTauNu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XTauNu.py
new file mode 100644
index 000000000..89d4c0822
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XTauNu.py
@@ -0,0 +1,3128 @@
+###############################################################################
+# (c) Copyright 2000-2021 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.                                       #
+###############################################################################
+# $Id: StrippingB2XTauNu.py,v 1.1 2014-8-15 14:28:54 guwormse Exp $
+'''
+Module for constuction of:
+
+B0d->DTauNu
+B0d->D*TauNu
+B0d->D*-(->D0(->K3pi)pi-)TauNu
+Bu->D0(->K3pi)TauNu
+B0d->D**(->pi D*0 (->pi0 D0))TauNu
+B0d->D**(->pi D*0 (->gamma D0))TauNu
+Bu->D0TauNu
+Bu->D*0(->pi0 D0)TauNu
+Bu->D*0(->gamma D0)TauNu
+Bu->D**0TauNu
+Bs->DsTauNu
+Bc->J/psiTauNu
+Lb->LcTauNu
+Lb-pTauNu
+
+==== Description of the lines ====
+
+B0d->DTauNu, with D -> K pi pi
+B0d->D*TauNu, with D* -> pi (D0 -> K pi)
+B0d->D*TauNu with D* -> pi- D0 (-> K 3pi)
+B0d->D**TauNu, with D** -> pi (D*0 -> pi0 (D0 -> K pi))
+B0d->D**TauNu, with D** -> pi (D*0 -> gamma (D0 -> K pi))
+Bu->D0TauNu, with D0 -> K pi
+Bu->D0TauNu, with D0 -> K 3pi
+Bu->D*0TauNu, with D*0 -> pi0 (D0 -> K pi)
+Bu->D*0TauNu, with D*0 -> gamma (D0 -> K pi)
+Bu->D**0TauNu, with D**0 -> pi- (D*+ -> pi (D0 -> K pi))
+Bs->DsTauNu, with Ds -> K K pi
+Bc->JpsiTauNu, with Jpsi -> Mu Mu
+Lb->LcTauNu, with Lc -> p K pi
+Lb->p Tau NU to serach for tauonic Vbu
+Tau -> 3pi in all cases
+New selection using inverted vertex cut only
+
+==== Description of the configuration ====
+
+The selecton cuts are stored in the dictionary confdict.
+
+The configuration class makes all the selections and the lines, when passed the cut dictionary.
+
+The lines look like this:
+
+1) Filter charm mesons (D*, D+, D0, Ds, J/psi)
+2) Filter taus from StdLooseDetachedTau3pi common particle
+5) Create B from charm meson and Tau
+
+To look at all the configurable cuts, see StrippingB2XTauNu.confdict
+
+==== How to use ====
+
+To configure all lines, just instantiate the class:
+
+all=B2XTauNuAllLinesConf("B2XTauNu",confdict)
+
+Then to print all cuts do:
+
+all.printCuts()
+
+'''
+__author__ = [ 'Donal Hill','Conor Fitzpatrick','Guy Wormser', 'Antonio Romero' ]
+__date__ = '2015-11-13'
+__version = '$Revision: 1.5 $'
+
+#### Next is the dictionary of all tunable cuts ########
+
+default_config = {
+    'NAME'        : 'B2XTauNuAllLines',
+    'WGs'         : ['Semileptonic'],
+    'BUILDERTYPE' : 'B2XTauNuAllLinesConf',
+    'CONFIG'      : {
+        'Prescale_B0d2DstarTauNu'        : 1.0,
+        'Prescale_B0d2DstarWSSlowTauNu'  : 1.0,
+        'Prescale_B0d2DstarSlowWSTauNu'  : 1.0,
+        'Prescale_B0d2DstarD02K3piTauNu' : 1.0,
+        'Prescale_B0d2DstarD02K3piWSSlowTauNu'  : 1.0,
+        'Prescale_B0d2DstarD02K3piSlowWSTauNu'  : 1.0,
+        'Prescale_B0d2DstarD02K3piTauNuWS'      : 1.0,
+        'Prescale_Bu2D02K3piTauNu'       : 1.0,
+        'Prescale_Bu2D02K3piTauNuWS'     : 1.0,
+        'Prescale_B0d2DTauNu'            : 1.0,
+        'Prescale_Bu2D0TauNu'            : 1.0,
+        'Prescale_B0s2DsTauNu'           : 1.0,
+        'Prescale_Bc2JpsiTauNu'          : 1.0,
+        'Prescale_Lb2LcTauNu'            : 1.0,       
+        'Prescale_Lb2pTauNu'             : 1.0,
+        'Prescale_Bu2DdoubleStar0TauNu'  : 1.0,
+        'Prescale_Bu2Dstar02Pi0D0TauNu'        : 1.0,
+        'Prescale_Bu2Dstar02GammaD0TauNu'        : 1.0,
+        'Prescale_B0d2DdoubleStar2PiDstar02Pi0D0TauNu'  : 1.0,
+        'Prescale_B0d2DdoubleStar2PiDstar02GammaD0TauNu'  : 1.0,
+        'Prescale_NonPhys'               : 1.0,
+        'Postscale'   : 1.0 ,
+        #B cuts
+        'B_BPVDIRA'       : 0.995 ,
+        #B combination cuts
+        #'B_DeltaM_low'       : -2579.0, #MeV
+        'B_DeltaM_low'       : -2979.0, #MeV
+        'B_DeltaM_high'      : 300.0,   #MeV
+        'B_DOCAMAX'          : 0.15 , #mm
+        'B_upperDeltaM_low'  : 720.0,   #MeV
+        'B_upperDeltaM_high' : 1721.0,  #MeV
+        #D kaon cuts
+        'D_K_PT'          : 150.0,  #MeV
+        'Dplus_K_PT'      : 1500.0, #MeV
+        'Ds_K_PT'         : 1500.0, #MeV
+        'D_K_TRCHI2DOF'   : 30.0,
+        'D_K_IPCHI2'      : 10.0,
+        'D_K_PIDK'        : -3 ,
+        'Dplus_K_PIDK'    : 3,
+        'Dplus_K_TRPCHI2' : 0.00000001,
+        #D pion cuts
+        'D_Pi_PT'         : 150.0, # MeV
+        'D_Pi_TRCHI2'     : 3.0,
+        'D_Pi_IPCHI2'     : 10.,
+        'D_Pi_PIDK'       : 50.0,
+        'Dplus_Pi_TRPCHI2' : 0.00000001,
+        #Lc kaon cuts
+        'Lc_K_PT'          : 150.0,  #MeV
+        'Lc_K_TRCHI2DOF'   : 3.0,
+        'Lc_K_IPCHI2'      : 10.0,
+        'Lc_K_PIDK'        : 3.0,    
+        'Lc_K_TRPCHI2' : 0.00000001,
+        #Lc pion cuts
+        'Lc_Pi_PT'         : 150.0, # MeV
+        'Lc_Pi_TRCHI2'     : 3.0,
+        'Lc_Pi_IPCHI2'     : 10.0,
+        'Lc_Pi_PIDK'       : 50.0,
+        'Lc_Pi_TRPCHI2' : 0.00000001,
+        #Lc proton cuts
+        'Lc_p_PT'          : 150.0,  #MeV
+        'Lc_p_TRCHI2DOF'   : 3.0,
+        'Lc_p_IPCHI2'      : 10.0,
+        'Lc_p_PIDp'        : 5.0,
+        'Lc_p_TRPCHI2' :0.00000001,
+        #p cuts for Lb->p TauNu
+        'p_PT'          : 1750.0,  #MeV
+        'p_TRCHI2DOF'   : 3.0,
+        'p_IPCHI2'      : 35.0,
+        'p_PIDp'        : 0.6,
+        'p_PE'          : 15000,  #MeV
+        #D0-resonance parameters
+        'D0_MassW'        : 40.0,      #MeV, 100 in StdLooseD0 
+        'D0_BPVVDCHI2'    : 36.0,      #36 in StdLooseD0
+        'D0_DIRA'         : 0.995,
+        'D0_PT'           : 1200.0,    #MeV, 1.2 GeV in StdLooseD02KPi
+        'D0_VCHI2'        : 10.0,      #10 in StdLooseD0
+        #D0 combination cut
+        'D0_DOCAMAX'      : 0.5,     #mm, 0.5 mm in StdLooseD0
+        #D-resonance parameters
+        'D_MassW'         : 40.0,      #MeV, 100 in StdLooseDplus
+        'D_BPVVDCHI2'     : 50.0,      #36 in StdLooseDplus
+        'Ds_BPVVDCHI2'    : 36.0,      #shorter lifetime than Dplus 
+        'D_DIRA'          : 0.995,   #0.98 in StdLooseDplus
+        'D_PT'            : 1600.0,    #MeV, 1.2 in StdLooseDplus
+        'D_VCHI2'         : 10.0,      #30 in StdLooseDplus
+        'D_MIPCHI2'       : 10.0,
+        #Dstar-resonance parameters
+        'slowPi_TRCHI2DOF' : 30.0,
+        'slowPi_PT'        : 50.0,    #MeV
+        'Dstar_PT'         : 1250.0,   #MeV, 1250 in StdLooseD*
+        'Dstar_VCHI2'      : 25.0,     #MeV, 25 in StdLooseD*WithD02KPi 
+        'Dstar_MassW'      : 50.0,     #MeV, 50 MeV in StdLooseD*WithD02KPi
+        'Dstar_DeltaM_low'  : 135.0,  #MeV
+        'Dstar_DeltaM_high' : 160.0,   #MeV, 165.5 in StdLooseD*
+        #Lc-resonance parameters
+        'Lc_MassW'         : 30.0,      #MeV, 100 in StdLooseDplus
+        'Lc_BPVVDCHI2'     : 50.0,      #36 in StdLooseDplus
+        'Lc_DIRA'          : 0.995,   #0.98 in StdLooseDplus
+        'Lc_PT'            : 1200.0,    #MeV, 1.2 in StdLooseDplus
+        'Lc_VCHI2'         : 10.0,      #30 in StdLooseDplus
+        'Lc_MIPCHI2'       : 10.0,
+        # Lb Inverted vertex Cuts
+        'LbInvVertD'       : 1. ,         #mm
+        #Dstar Inverted cut
+        'DInvVertD'        : 1. ,         #mm
+        #Muon and J/psi cuts
+        'Muon_TRCHI2DOF'    : 3.0,
+        'Muon_PT'           : 1000.0,  #MeV
+        'Jpsi_MassW'        : 80.0,    #MeV, 100 in StdLooseJpsi
+        'Jpsi_VCHI2'        : 9.0,   #25 in StdLooseJpsi
+        'Jpsi_PT'           : 2000.0,  #MeV
+        #Cuts on single pions which are used to form the D_1(2420)0 from D* and pion
+        'DdoubleStar0_Pi_IPCHI2' : 4.0,
+        'DdoubleStar0_Pi_TRCHI2' : 3.0,
+        'DdoubleStar0_Pi_PIDK'   : 8.0,
+        #DdoubleStar0(2420) 
+        'DdoubleStar0_VCHI2'         : 25.0,
+        'DdoubleStar0_PT'            : 500.0,  #MeV
+        'DdoubleStar0_DeltaM_low'    : 350.0,  #MeV
+        'DdoubleStar0_DeltaM_high'   : 450.0,  #MeV
+        'DdoubleStar0_MassW'         : 300.0,  #MeV
+        #Dstar0-resonance parameters for pi0 mode
+        'Dstar02Pi0D0_PT'          : 1250.0,  #MeV
+        'Dstar02Pi0D0_VCHI2'       :  25.0,   #MeV
+        'Dstar02Pi0D0_MassW'       :  50.0,   #MeV   
+        'Dstar02Pi0D0_DeltaM_low'  : 120.0,   #MeV   
+        'Dstar02Pi0D0_DeltaM_high' : 200.0,   #MeV   
+        #Cuts on single pions which are used to form the D*0 from D0 and pi0
+        'Dstar02Pi0D0_Pi_PT'      : 200.0,    #MeV  
+        #Dstar0-resonance parameters for gamma mode
+        'Dstar02GammaD0_PT'          : 1250.0,  #MeV
+        'Dstar02GammaD0_VCHI2'       :  25.0,   #MeV
+        'Dstar02GammaD0_MassW'       :  50.0,   #MeV
+        'Dstar02GammaD0_DeltaM_low'  : 0.0,   #MeV
+        'Dstar02GammaD0_DeltaM_high' : 250.0,   #MeV
+        #Cuts on singlegamma which are used to form the D*0 from D0 and gamma
+        'Dstar02GammaD0_Pi_PT'      : 400.0,    #MeV
+        #Cuts on single pions which are used to form the D_1(2420)0 from D*(pi0 mode) and pion
+        'DdoubleStar2PiDstar02Pi0D0_Pi_IPCHI2' : 4.0,
+        'DdoubleStar2PiDstar02Pi0D0_Pi_TRCHI2' : 3.0,
+        'DdoubleStar2PiDstar02Pi0D0_Pi_PIDK'   : 8.0,
+        #DdoubleStar(2420) cuts
+        'DdoubleStar2PiDstar02Pi0D0_VCHI2'         : 25.0,
+        'DdoubleStar2PiDstar02Pi0D0_PT'            : 500.0,  #MeV
+        'DdoubleStar2PiDstar02Pi0D0_DeltaM_low'    : 350.0,  #MeV
+        'DdoubleStar2PiDstar02Pi0D0_DeltaM_high'   : 450.0,  #MeV
+        'DdoubleStar2PiDstar02Pi0D0_MassW'         : 300.0,  #MeV
+        #Cuts on single pions which are used to form the D_1(2420)0 from D*(gamma mode) and pion
+        'DdoubleStar2PiDstar02GammaD0_Pi_IPCHI2' : 4.0,
+        'DdoubleStar2PiDstar02GammaD0_Pi_TRCHI2' : 3.0,
+        'DdoubleStar2PiDstar02GammaD0_Pi_PIDK'   : 8.0,
+        #DdoubleStar(2420) cuts
+        'DdoubleStar2PiDstar02GammaD0_VCHI2'         : 25.0,
+        'DdoubleStar2PiDstar02GammaD0_PT'            : 500.0,  #MeV
+        'DdoubleStar2PiDstar02GammaD0_DeltaM_low'    : 350.0,  #MeV
+        'DdoubleStar2PiDstar02GammaD0_DeltaM_high'   : 450.0,  #MeV
+        'DdoubleStar2PiDstar02GammaD0_MassW'         : 300.0,  #MeV
+        #Ghost Prob cut on all tracks apart from slow pion
+        'TRGHP'             : 0.4,
+        #Slow pion ghost prob
+        'TRGHP_slowPi'      : 0.6,
+        # D02K3pi cuts
+        'D02K3pi_PT'           : 2000.0,  # MeV
+        'D02K3pi_P'            : 20.0,    # GeV
+        'D02K3pi_MassW'        : 40.0,    # MeV
+        'D02K3pi_AMassW'       : 60.0,    # MeV
+        'D02K3pi_DOCAMAX'      : 0.20,    # mm
+        'D02K3pi_DIRA'         : 0.997,
+        'D02K3pi_BPVVDCHI2'    : 36.0,
+        'D02K3pi_VCHI2'        : 6.0,
+        'D02K3pi_K_PT'         : 800.0,  # MeV
+        'D02K3pi_K_P'          : 4.0,  # GeV
+        'D02K3pi_K_TRCHI2DOF'  : 3.0,
+        'D02K3pi_K_IPCHI2'     : 15.0,
+        'D02K3pi_K_PIDK'       : 1 ,
+        'D02K3pi_Pis_PT'       : 400.0, # MeV
+        'D02K3pi_Pis_P'        : 2.0, # GeV
+        'D02K3pi_Pis_TRCHI2'   : 3.0,
+        'D02K3pi_Pis_IPCHI2'   : 25.,
+        'D02K3pi_Pis_PIDK'     : 8.0,
+        'D02K3pi_MIPCHI2'      : 10.0,
+        'D02K3pi_pi_MAXPT'     : 800.0,  # MeV
+        'D02K3pi_pi_SUMPT'     : 2000.0, # MeV
+        'D02K3pi_tauR_high'    : 6.0, #mm
+        # DstD02Kpi cuts
+        'D02K3pi_slowPi_TRCHI2DOF' : 30.0,
+        'D02K3pi_slowPi_PT'    : 50.0,
+        'DstD02K3pi_PT'        : 1250.0, # MeV
+        'DstD02K3pi_MassW'     : 50.0,   # MeV
+        'DstD02K3pi_DeltaM'    : 160.0,  # MeV
+        'DstD02K3pi_VCHI2'     : 25.0,
+        'DstD02K3pi_D0_VCHI2'  : 10.0,
+        'DstD02K3pi_D0_K_PIDK' : -3,
+        'DstD02K3pi_D0_MIPCHI2': 0,
+        'DstD02K3pi_D0_Pis_IPCHI2'   : 15,
+        'DstD02K3pi_D0_Pis_PT' : 250.0,  # MeV
+        'DstD02K3pi_D0_K_PT'   : 400.0,  # MeV
+        'DstD02K3pi_D0_pi_MAXPT'  : 250 , # MeV
+        'DstD02K3pi_D0_pi_SUMPT'  : 250 , # MeV
+        # tau cuts
+        'tau_pions_IPCHI2PV'   : 15.0,
+        'tau_BPVVDR'           : 0.2, # mm
+        #HLT1 trigger
+        'TisTosSpecs'       : { 'Hlt1.*Decision%TOS' : 0 }
+    },
+    'STREAMS' : ['BhadronCompleteEvent']
+}
+
+
+from StrippingUtils.Utils import LineBuilder
+
+default_name="B2XTauNu"
+
+class B2XTauNuAllLinesConf(LineBuilder):
+    """
+    Configuration object for B2XTauNu lines
+
+    usage: config={...}
+    B2XTauNuConf(name+LineSuffix, config)
+    Will make lines ending in LineSuffix with the config configurations
+    
+    The cuts are configuration parameter only if they are different between the lines,
+    common cuts are hardcoded.
+    
+    Use conf.printCuts to check the cuts in python
+    The selections are available individually as PionSel, PiPiSel, TauSel, DstarSel, DstD02K3piSel and B0Sel
+    The Line object, a member of this class, holds the configured line
+    """
+    
+    Line=None
+    Selections=[]
+    TopSelectionSeq=None
+   
+    Dstar_KCut=''
+    Dstar_PiCut=''
+    Dstar_slowPiCut=''
+    Dstar_D0Cut=''
+    DstarCut=''
+    totalDstarCut=''
+    totalDstarD02K3piCut=''
+    D_KCut=''
+    D_Pi1Cut=''
+    D_Pi2Cut=''
+    DplusCut=''
+    totalDplusCut=''
+    Ds_K1Cut=''
+    Ds_K2Cut=''
+    Ds_PiCut=''
+    DsCut=''
+    totalDsCut=''
+    Lc_KCut=''
+    Lc_PiCut=''
+    Lc_pCut=''
+    LcCut=''
+    pCut=''
+    LcLightCut=''
+    Lc_pLightCut=''
+    Lc_KLightCut=''
+    DLightCut=''
+    DLight_partCut=''
+    totalLcCut=''
+    LcInvVertCut=''
+    totalLcInvVertCut=''
+    DInvVertCut=''
+    totalDInvVertCut=''
+    D0Cut=''
+    totalD0Cut=''
+    totalD02K3piCut = ''
+    MuonCut=''
+    JpsiCut=''
+    totalJpsiCut=''
+    DdoubleStar0_PionCut=''
+    DdoubleStar0Cut=''
+    B0CombCut=''
+    BplusCombCut=''
+    BsCombCut=''
+    BcCombCut=''
+    LbCombCut=''
+    BCut=''
+    LbCombInvVertCut=''
+    LbCombpInvVertCut=''
+    B0dCombInvVertCut=''
+    BInvVertCut=''
+    Dstar02Pi0D0_PionCut=''
+    Dstar02Pi0D0Cut=''
+    Dstar02GammaD0_PionCut=''
+    Dstar02GammaD0Cut=''
+    DdoubleStar2PiDstar02Pi0D0_PionCut=''
+    DdoubleStar2PiDstar02Pi0D0Cut=''
+    DdoubleStar2PiDstar02GammaD0_PionCut=''
+    DdoubleStar2PiDstar02GammaD0Cut=''
+   
+
+    JpsiSel=None
+    DstarSel=None
+    DplusSel=None
+    D0Sel=None
+    DsSel=None
+    LcSel=None
+    pSel=None
+    DstarD02K3piSel=None
+    D02K3piSel=None
+    
+    B0d2DstarTauNuSel=None
+    B0d2DstarWSSlowTauNuSel=None
+    B0d2DstarSlowWSTauNuSel=None
+    B0d2DstarD02K3piTauNuSel=None
+    B0d2DstarD02K3piWSSlowTauNuSel=None
+    B0d2DstarD02K3piSlowWSTauNuSel=None
+    B0d2DstarD02K3piTauNuSelWS=None
+    B0d2DstarD02K3piTauNuSelNonPhysTau=None
+    Bu2D02K3piTauNuSel=None
+    Bu2D02K3piTauNuSelWS=None
+    Bu2D02K3piTauNuSelNonPhysTau=None
+
+    B0d2DTauNuSel=None
+    B0s2DsTauNuSel=None
+    Bu2D0TauNuSel=None
+    Bc2JpsiTauNuSel=None
+    Lb2LcTauNuSel=None
+    Lb2pTauNuSel=None
+    DdoubleStar02DstarPiSel=None
+    Bu2DdoubleStar0TauNuSel=None
+    Bu2DdoubleStar0TauNuSelWS=None
+    Bu2DdoubleStar0TauNuSelNonPhysTau=None
+    Dstar02Pi0D0Sel=None
+    Bu2Dstar02Pi0D0TauNuSel=None
+    Bu2Dstar02Pi0D0TauNuSelWS=None
+    Bu2Dstar02Pi0D0TauNuSelNonPhysTau=None
+    Dstar02GammaD0Sel=None
+    Bu2Dstar02GammaD0TauNuSel=None
+    Bu2Dstar02GammaD0TauNuSelWS=None
+    Bu2Dstar02GammaD0TauNuSelNonPhysTau=None
+    DdoubleStar2PiDstar02Pi0D0Sel=None
+    B0d2DdoubleStar2PiDstar02Pi0D0TauNuSel=None
+    B0d2DdoubleStar2PiDstar02Pi0D0TauNuSelWS=None
+    B0d2DdoubleStar2PiDstar02Pi0D0TauNuSelNonPhysTau=None
+    DdoubleStar2PiDstar02GammaD0Sel=None
+    B0d2DdoubleStar2PiDstar02GammaD0TauNuSel=None
+    B0d2DdoubleStar2PiDstar02GammaD0TauNuSelWS=None
+    B0d2DdoubleStar2PiDstar02GammaD0TauNuSelNonPhysTau=None
+
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+        
+    __confdict__={}
+    
+    def __init__(self, name, config):
+        '''The constructor of the configuration class.
+        Requires a name which is added to the end of each algorithm name
+        and a configuration dictionary, config, which must provide all the settings
+        which differ between the lines'''
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__ = config
+
+        #/\/\/\/\/\/ SELECTION CUTS /\/\/\/\/\/\/\/\/\/
+
+        # tau cuts
+        self.tau_DaughtersCuts =  "(BPVVDR > %(tau_BPVVDR)s *mm) & (CHILDCUT((MIPCHI2DV(PRIMARY)> %(tau_pions_IPCHI2PV)s),1)) & "\
+                                  "(CHILDCUT((MIPCHI2DV(PRIMARY)> %(tau_pions_IPCHI2PV)s),2)) & " \
+                                  "(CHILDCUT((MIPCHI2DV(PRIMARY)> %(tau_pions_IPCHI2PV)s),3))"  % config
+
+        self.tau_forD02K3pi = "(BPVVDR < %(D02K3pi_tauR_high)s * mm)" % config
+
+        # StdLoose D* has the following decay chain:  D*+ -> pi ( D0 -> K pi )
+
+        # Cuts for kaon from D0
+        self.Dstar_KCut  = "CHILDCUT(CHILDCUT( (PT > %(D_K_PT)s*MeV) & "\
+                     " (TRCHI2DOF < %(D_K_TRCHI2DOF)s ) & "\
+                     " (MIPCHI2DV(PRIMARY)> %(D_K_IPCHI2)s ) & (TRGHP < %(TRGHP)s) & "\
+                     " (PIDK >  %(D_K_PIDK)s),1),2) " % config
+        
+        #Cuts for pion from D0
+        self.Dstar_PiCut = "CHILDCUT(CHILDCUT( (PT> %(D_Pi_PT)s*MeV) & "\
+                     " (TRCHI2DOF < %(D_Pi_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                     " (MIPCHI2DV(PRIMARY)> %(D_Pi_IPCHI2)s) & (PIDK < %(D_Pi_PIDK)s),2),2)" % config
+
+        #Cuts for D0 from D*
+        self.Dstar_D0Cut = "CHILDCUT( (PT>%(D0_PT)s*MeV) & (ADMASS('D0') < %(D0_MassW)s *MeV ) & (BPVDIRA > %(D0_DIRA)s) & " \
+                     " (BPVVDCHI2 > %(D0_BPVVDCHI2)s) & (VFASPF(VCHI2/VDOF)<%(D0_VCHI2)s),2)" % config
+
+        # Cuts for Dstar        
+        self.Dstar_slowPiCut = "CHILDCUT( (PT>%(slowPi_PT)s*MeV) & "\
+                        " (TRCHI2DOF < %(slowPi_TRCHI2DOF)s) & (TRGHP < %(TRGHP_slowPi)s),1)" % config       
+
+
+        self.DstarCut = " (VFASPF(VCHI2/VDOF) < %(Dstar_VCHI2)s ) & (M-MAXTREE('D0'==ABSID,M)>%(Dstar_DeltaM_low)s*MeV) & (M-MAXTREE('D0'==ABSID,M)<%(Dstar_DeltaM_high)s*MeV) &"\
+                        " (PT>%(Dstar_PT)s *MeV) & ((ADMASS('D*(2010)+')< %(Dstar_MassW)s*MeV))" % config
+        
+        
+        self.totalDstarCut = self.DstarCut + " & " + self.Dstar_KCut +" & "+ self.Dstar_PiCut +" & "+ self.Dstar_D0Cut + " & " + self.Dstar_slowPiCut
+
+
+        #cuts for D*+  with wrong pion = idem as normal Dstar
+        
+
+        
+        #StdLooseDPlus has the following decay chain: D+ -> K pi pi
+
+        #Cuts for kaon from D+ (also used as cuts for D0 -> K pi kaon)
+        self.D_KCut  = "& CHILDCUT( ('K+'==ABSID) & (PT > %(Dplus_K_PT)s*MeV) & "\
+                           " (TRCHI2DOF < %(D_K_TRCHI2DOF)s ) & (TRPCHI2 > %(Dplus_K_TRPCHI2)s) &"\
+                           " (MIPCHI2DV(PRIMARY)> %(D_K_IPCHI2)s ) & (TRGHP < %(TRGHP)s) & "\
+                           " (PIDK > %(Dplus_K_PIDK)s),1) " % config 
+        
+        #First daughter pion (also used as cuts for D0 -> K pi pion)
+        self.D_Pi1Cut = "& CHILDCUT( ('pi+'==ABSID) & (PT> %(D_Pi_PT)s*MeV) & (TRPCHI2 > %(Dplus_Pi_TRPCHI2)s) &"\
+                            " (TRCHI2DOF < %(D_Pi_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                            " (MIPCHI2DV(PRIMARY)> %(D_Pi_IPCHI2)s ) & (PIDK < %(D_Pi_PIDK)s),2)" % config
+
+        #Second daughter pion
+        self.D_Pi2Cut = "& CHILDCUT( ('pi+'==ABSID) & (PT> %(D_Pi_PT)s*MeV) & (TRPCHI2 > %(Dplus_Pi_TRPCHI2)s) & "\
+                            " (TRCHI2DOF < %(D_Pi_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                            " (MIPCHI2DV(PRIMARY)> %(D_Pi_IPCHI2)s) & (PIDK < %(D_Pi_PIDK)s),3)" % config
+   
+        #D+ cuts
+        self.DplusCut = "(PT>%(D_PT)s*MeV) & (ADMASS('D+') < %(D_MassW)s *MeV ) & (BPVDIRA > %(D_DIRA)s) & " \
+                     " (BPVVDCHI2 > %(D_BPVVDCHI2)s) & (VFASPF(VCHI2/VDOF)<%(D_VCHI2)s) & (MIPCHI2DV(PRIMARY)> %(D_MIPCHI2)s)"% config
+
+        self.totalDplusCut = self.DplusCut + self.D_KCut + self.D_Pi1Cut + self.D_Pi2Cut
+
+
+        #Cuts for Ds 
+
+        #First daughter kaon
+        self.Ds_K1Cut  = "& CHILDCUT( ('K+'==ABSID) & (PT > %(Ds_K_PT)s*MeV) & "\
+                           " (TRCHI2DOF < %(D_K_TRCHI2DOF)s ) &"\
+                           " (MIPCHI2DV(PRIMARY)> %(D_K_IPCHI2)s ) & (TRGHP < %(TRGHP)s) & "\
+                           " (PIDK > %(Dplus_K_PIDK)s),1) " % config 
+
+        #Second daughter kaon
+        self.Ds_K2Cut  = "& CHILDCUT( ('K+'==ABSID) & (PT > %(Ds_K_PT)s*MeV) & "\
+                           " (TRCHI2DOF < %(D_K_TRCHI2DOF)s ) &"\
+                           " (MIPCHI2DV(PRIMARY)> %(D_K_IPCHI2)s ) & (TRGHP < %(TRGHP)s) & "\
+                           " (PIDK > %(Dplus_K_PIDK)s),2) " % config
+        
+        #Daughter pion
+        self.Ds_PiCut = "& CHILDCUT( ('pi+'==ABSID) & (PT> %(D_Pi_PT)s*MeV) &"\
+                            " (TRCHI2DOF < %(D_Pi_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                            " (MIPCHI2DV(PRIMARY)> %(D_Pi_IPCHI2)s ) & (PIDK < %(D_Pi_PIDK)s),3)" % config
+        
+        #Ds cuts
+        self.DsCut = "(PT>%(D_PT)s*MeV) & (ADMASS('D_s+') < %(D_MassW)s *MeV ) & (BPVDIRA > %(D_DIRA)s) & " \
+                     " (BPVVDCHI2 > %(Ds_BPVVDCHI2)s) & (VFASPF(VCHI2/VDOF)<%(D_VCHI2)s) & (MIPCHI2DV(PRIMARY)> %(D_MIPCHI2)s)"% config
+
+        self.totalDsCut = self.DsCut + self.Ds_K1Cut + self.Ds_K2Cut + self.Ds_PiCut
+        
+
+
+        #StdLooseD02HH contains the decay : D0 -> K pi 
+
+        
+        #Cuts on D0
+        self.D0Cut = "(PT>%(D0_PT)s*MeV) & (ADMASS('D0') < %(D0_MassW)s *MeV ) & (BPVDIRA > %(D0_DIRA)s) & " \
+                     " (BPVVDCHI2 > %(D0_BPVVDCHI2)s) & (VFASPF(VCHI2/VDOF)<%(D0_VCHI2)s) & (MIPCHI2DV(PRIMARY)> %(D_MIPCHI2)s)"% config
+
+        #Use cuts listed above for K and pi
+        self.totalD0Cut = self.D0Cut + self.D_KCut + self.D_Pi1Cut
+
+        #D02K3pi cuts
+        self.D02K3piCut = "(P > %(D02K3pi_P)s*GeV) & (PT>%(D02K3pi_PT)s*MeV) & (ADMASS('D0') < %(D02K3pi_MassW)s *MeV ) & (BPVDIRA > %(D02K3pi_DIRA)s) & " \
+                     " (BPVVDCHI2 > %(D02K3pi_BPVVDCHI2)s) & (VFASPF(VCHI2/VDOF)<%(D02K3pi_VCHI2)s) & (MIPCHI2DV(PRIMARY)> %(D02K3pi_MIPCHI2)s) &" \
+                     " (CHILDCUT(PT > %(D02K3pi_pi_MAXPT)s*MeV,2) | CHILDCUT(PT > %(D02K3pi_pi_MAXPT)s*MeV,3) | CHILDCUT(PT > %(D02K3pi_pi_MAXPT)s*MeV,4) ) & " \
+                     " (CHILD(PT,2)+CHILD(PT,3)+CHILD(PT,4) > %(D02K3pi_pi_SUMPT)s * MeV)" % config
+        self.D02K3pi_KCut  = "CHILDCUT( (PT > %(D02K3pi_K_PT)s*MeV) & "\
+                     " (TRCHI2DOF < %(D02K3pi_K_TRCHI2DOF)s ) & "\
+                     " (MIPCHI2DV(PRIMARY)> %(D02K3pi_K_IPCHI2)s ) & (TRGHP < %(TRGHP)s) & "\
+                     " (PIDK >  %(D02K3pi_K_PIDK)s),1)" % config
+        self.D02K3pi_Pi1Cut = "CHILDCUT( (PT> %(D02K3pi_Pis_PT)s*MeV) & "\
+                     " (TRCHI2DOF < %(D02K3pi_Pis_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                     " (MIPCHI2DV(PRIMARY)> %(D02K3pi_Pis_IPCHI2)s) & (PIDK < %(D02K3pi_Pis_PIDK)s),2)" % config
+        self.D02K3pi_Pi2Cut = "CHILDCUT( (PT> %(D02K3pi_Pis_PT)s*MeV) & "\
+                     " (TRCHI2DOF < %(D02K3pi_Pis_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                     " (MIPCHI2DV(PRIMARY)> %(D02K3pi_Pis_IPCHI2)s) & (PIDK < %(D02K3pi_Pis_PIDK)s),3)" % config
+        self.D02K3pi_Pi3Cut = "CHILDCUT( (PT> %(D02K3pi_Pis_PT)s*MeV) & "\
+                     " (TRCHI2DOF < %(D02K3pi_Pis_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                     " (MIPCHI2DV(PRIMARY)> %(D02K3pi_Pis_IPCHI2)s) & (PIDK < %(D02K3pi_Pis_PIDK)s),4)" % config
+
+
+        self.totalD02K3piCut = self.D02K3piCut +" & "+ self.D02K3pi_KCut +" & "+ self.D02K3pi_Pi1Cut +" & "+ self.D02K3pi_Pi2Cut +" & "+ self.D02K3pi_Pi3Cut
+
+        self.DstarD02K3pi_slowPiCut = "CHILDCUT( (PT>%(D02K3pi_slowPi_PT)s*MeV) & "\
+                        "(TRCHI2DOF < %(D02K3pi_slowPi_TRCHI2DOF)s) & (TRGHP < %(TRGHP_slowPi)s),1)" % config
+
+        self.DstarD02K3piCut = " (VFASPF(VCHI2/VDOF) < %(Dstar_VCHI2)s ) & (M-MAXTREE('D0'==ABSID,M)>%(Dstar_DeltaM_low)s*MeV) & (M-MAXTREE('D0'==ABSID,M)<%(Dstar_DeltaM_high)s*MeV) &"\
+                        " (PT>%(Dstar_PT)s *MeV) & ((ADMASS('D*(2010)+')< %(Dstar_MassW)s*MeV))" % config
+
+        self.totalDstarD02K3piCut = self.DstarD02K3piCut + " & " + self.DstarD02K3pi_slowPiCut
+
+        # Cuts for the D02K3pi from a D*-
+
+        self.D02K3piForDstCut = "(P > %(D02K3pi_P)s*GeV) & (PT>%(D02K3pi_PT)s*MeV) & (ADMASS('D0') < %(D02K3pi_MassW)s *MeV ) & (BPVDIRA > %(D02K3pi_DIRA)s) & " \
+                     " (BPVVDCHI2 > %(D02K3pi_BPVVDCHI2)s) & (VFASPF(VCHI2/VDOF)<%(DstD02K3pi_D0_VCHI2)s) & (MIPCHI2DV(PRIMARY)> %(DstD02K3pi_D0_MIPCHI2)s) &" \
+                     " (CHILDCUT(PT > %(DstD02K3pi_D0_pi_MAXPT)s*MeV,2) | CHILDCUT(PT > %(DstD02K3pi_D0_pi_MAXPT)s*MeV,3) | CHILDCUT(PT > %(DstD02K3pi_D0_pi_MAXPT)s*MeV,4) ) & " \
+                     " (CHILD(PT,2)+CHILD(PT,3)+CHILD(PT,4) > %(DstD02K3pi_D0_pi_SUMPT)s * MeV)" % config
+        self.D02K3pi_KForDstCut  = "CHILDCUT( (PT > %(DstD02K3pi_D0_K_PT)s*MeV) & "\
+                     " (TRCHI2DOF < %(D02K3pi_K_TRCHI2DOF)s ) & "\
+                     " (MIPCHI2DV(PRIMARY)> %(D02K3pi_K_IPCHI2)s ) & (TRGHP < %(TRGHP)s) & "\
+                     " (PIDK >  %(DstD02K3pi_D0_K_PIDK)s),1)" % config
+        self.D02K3pi_Pi1ForDstCut = "CHILDCUT( (PT> %(DstD02K3pi_D0_Pis_PT)s*MeV) & "\
+                     " (TRCHI2DOF < %(D02K3pi_Pis_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                     " (MIPCHI2DV(PRIMARY)> %(DstD02K3pi_D0_Pis_IPCHI2)s) & (PIDK < %(D02K3pi_Pis_PIDK)s),2)" % config
+        self.D02K3pi_Pi2ForDstCut = "CHILDCUT( (PT> %(DstD02K3pi_D0_Pis_PT)s*MeV) & "\
+                     " (TRCHI2DOF < %(D02K3pi_Pis_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                     " (MIPCHI2DV(PRIMARY)> %(DstD02K3pi_D0_Pis_IPCHI2)s) & (PIDK < %(D02K3pi_Pis_PIDK)s),3)" % config
+        self.D02K3pi_Pi3ForDstCut = "CHILDCUT( (PT> %(DstD02K3pi_D0_Pis_PT)s*MeV) & "\
+                     " (TRCHI2DOF < %(D02K3pi_Pis_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                     " (MIPCHI2DV(PRIMARY)> %(DstD02K3pi_D0_Pis_IPCHI2)s) & (PIDK < %(D02K3pi_Pis_PIDK)s),4)" % config
+
+        self.totalD02K3piForDstCut = self.D02K3piForDstCut +" & "+self.D02K3pi_KForDstCut +" & "+ self.D02K3pi_Pi1ForDstCut +" & "+ self.D02K3pi_Pi2ForDstCut +" & "+ self.D02K3pi_Pi3ForDstCut
+
+
+        #StdLooseLc has the following decay chain: Lc+ -> p K pi
+
+        #Cuts for kaon from Lc (also used as cuts for D0 -> K pi kaon)
+        self.Lc_KCut  = "& INTREE( ('K-'==ABSID) & (PT > %(Lc_K_PT)s*MeV) & "\
+                           " (TRCHI2DOF < %(Lc_K_TRCHI2DOF)s ) & (TRPCHI2 > %(Lc_K_TRPCHI2)s) &"\
+                           " (MIPCHI2DV(PRIMARY)> %(Lc_K_IPCHI2)s ) & (TRGHP < %(TRGHP)s) & "\
+                           " (PIDK > %(Lc_K_PIDK)s)) " % config 
+        
+        # pion (also used as cuts for D0 -> K pi pion)
+        self.Lc_PiCut = "& INTREE ( ('pi+'==ABSID) & (PT> %(Lc_Pi_PT)s*MeV) & (TRPCHI2 > %(Lc_Pi_TRPCHI2)s) &"\
+                            " (TRCHI2DOF < %(Lc_Pi_TRCHI2)s) & (TRGHP < %(TRGHP)s) & "\
+                            " (MIPCHI2DV(PRIMARY)> %(Lc_Pi_IPCHI2)s ) & (PIDK < %(Lc_Pi_PIDK)s))" % config
+
+        #proton
+        self.Lc_pCut = "& INTREE( ('p+'==ABSID) & (PT> %(Lc_p_PT)s*MeV)  & "\
+                            " (TRCHI2DOF < %(Lc_p_TRCHI2DOF)s) & (TRGHP < %(TRGHP)s) & "\
+                            " (MIPCHI2DV(PRIMARY)> %(Lc_p_IPCHI2)s) & (PIDp > %(Lc_p_PIDp)s))" % config
+   
+        #Lc cuts
+        self.LcCut = "(PT>%(Lc_PT)s*MeV) & (ADMASS('Lambda_c+') < %(Lc_MassW)s *MeV )& (BPVDIRA > %(Lc_DIRA)s) & (BPVVDCHI2 > %(Lc_BPVVDCHI2)s) & (VFASPF(VCHI2/VDOF)<%(Lc_VCHI2)s) & (MIPCHI2DV(PRIMARY)> %(Lc_MIPCHI2)s)"% config
+         
+        self.totalLcCut = self.LcCut  + self.Lc_pCut + self.Lc_PiCut + self.Lc_KCut
+
+        #P cuts for pTaunu
+        self.pCut =  " ('p+'==ABSID) & (PT> %(p_PT)s*MeV)  & "\
+                            " (TRCHI2DOF < %(p_TRCHI2DOF)s) & (TRGHP < %(TRGHP)s) & "\
+                            " (MIPCHI2DV(PRIMARY)> %(p_IPCHI2)s) & (PROBNNp > %(p_PIDp)s) & (PROBNNk < .1) & (PROBNNpi < .1) " % config
+
+        #Lc cuts for Invertex vertex selection
+ 
+       
+        self.LcLightCut = " (ADMASS('Lambda_c+') < %(Lc_MassW)s *MeV )&  (BPVVDCHI2 > %(Lc_BPVVDCHI2)s) & (VFASPF(VCHI2/VDOF)<%(Lc_VCHI2)s)& (MIPCHI2DV(PRIMARY)> %(Lc_MIPCHI2)s) "% config
+        self.Lc_pLightcut="& INTREE( ('p+'==ABSID)& (TRCHI2DOF < %(Lc_p_TRCHI2DOF)s) & (TRGHP < %(TRGHP)s) & (PIDp > %(Lc_p_PIDp)s))" % config
+        self.Lc_KLightcut = "& INTREE( ('K-'==ABSID) & (TRCHI2DOF < %(Lc_K_TRCHI2DOF)s ) & (TRGHP < %(TRGHP)s) & (PIDK > %(Lc_K_PIDK)s)) " % config
+        
+
+        self.totalLcInvVertCut=  self.LcLightCut + self.Lc_pCut+self.Lc_KCut
+
+        #Dstar cuts for Invertex vertex selection
+ 
+       
+        self.DLightCut = "  (M-MAXTREE('D0'==ABSID,M)>%(Dstar_DeltaM_low)s*MeV) & (M-MAXTREE('D0'==ABSID,M)<%(Dstar_DeltaM_high)s*MeV) & (VFASPF(VCHI2/VDOF)<%(D0_VCHI2)s) & CHILDCUT(  (ADMASS('D0') < %(D0_MassW)s *MeV ),2)  "% config
+       
+        self.DLight_partCut="& INTREE( ('K-'==ABSID)& (TRCHI2DOF < %(D_K_TRCHI2DOF)s) & (TRGHP < %(TRGHP)s)) &INTREE( ('pi+'==ABSID)& (TRCHI2DOF < %(D_Pi_TRCHI2)s) & (TRGHP < %(TRGHP)s)) " % config
+        self.totalDInvVertCut=  self.DLightCut +self.DLight_partCut
+        
+        #J/psi cuts for Bc mode
+        self.MuonCut = " & (MINTREE('mu+'==ABSID,PT) > %(Muon_PT)s *MeV) & (MAXTREE('mu+'==ABSID,TRCHI2DOF) < %(Muon_TRCHI2DOF)s)" %config
+        self.JpsiCut = "(ADMASS('J/psi(1S)') < %(Jpsi_MassW)s *MeV) & (VFASPF(VCHI2PDOF)< %(Jpsi_VCHI2)s) & (PT > %(Jpsi_PT)s *MeV)" %config
+
+        self.totalJpsiCut = self.JpsiCut + self.MuonCut
+
+
+        #Cuts for pion in D_1(2420)0 -> D*(2010)+ pi- and D*_2(2460)0 -> D*(2010)+ pi-
+        self.DdoubleStar0_PionCut = "(MIPCHI2DV(PRIMARY)> %(DdoubleStar0_Pi_IPCHI2)s ) & (TRCHI2DOF < %(DdoubleStar0_Pi_TRCHI2)s) & (PIDK < %(DdoubleStar0_Pi_PIDK)s) & (TRGHP < %(TRGHP_slowPi)s)" %config
+
+        #Cuts for D_1(2420)0 -> D*(2010)+ pi- and D*_2(2460)0 -> D*(2010)+ pi-
+        self.DdoubleStar0Cut = " (VFASPF(VCHI2/VDOF) < %(DdoubleStar0_VCHI2)s ) & (M-MAXTREE('D*(2010)+'==ABSID,M)>%(DdoubleStar0_DeltaM_low)s*MeV) & (M-MAXTREE('D*(2010)+'==ABSID,M)<%(DdoubleStar0_DeltaM_high)s*MeV) &"\
+                        " (PT>%(DdoubleStar0_PT)s *MeV) & ((ADMASS('D_1(2420)0')< %(DdoubleStar0_MassW)s*MeV))" % config
+                        
+        # Cuts for D*0 (pi0 mode)
+        self.Dstar02Pi0D0Cut = " (VFASPF(VCHI2/VDOF) < %(Dstar02Pi0D0_VCHI2)s ) & (M-MAXTREE('D0'==ABSID,M)>%(Dstar02Pi0D0_DeltaM_low)s*MeV) & (M-MAXTREE('D0'==ABSID,M)<%(Dstar02Pi0D0_DeltaM_high)s*MeV) &"\
+                        " (PT>%(Dstar02Pi0D0_PT)s *MeV) & ((ADMASS('D*(2007)0')< %(Dstar02Pi0D0_MassW)s*MeV))" % config
+        # Cuts for pi0 from D*0 -> pi0 D0
+        self.Dstar02Pi0D0_PionCut = "(PT>%(Dstar02Pi0D0_Pi_PT)s *MeV)" %config
+        
+        # Cuts for D*0 (Gamma mode)
+        self.Dstar02GammaD0Cut = " (VFASPF(VCHI2/VDOF) < %(Dstar02GammaD0_VCHI2)s ) & (M-MAXTREE('D0'==ABSID,M)>%(Dstar02GammaD0_DeltaM_low)s*MeV) & (M-MAXTREE('D0'==ABSID,M)<%(Dstar02GammaD0_DeltaM_high)s*MeV) &"\
+                        " (PT>%(Dstar02GammaD0_PT)s *MeV) & ((ADMASS('D*(2007)0')< %(Dstar02GammaD0_MassW)s*MeV))" % config
+        # Cuts for Gamma from D*0 -> Gamma D0
+        self.Dstar02GammaD0_PionCut = "(PT>%(Dstar02GammaD0_Pi_PT)s *MeV)" %config
+
+        #Cuts for pion in D_1(2420)- -> D*(2007)0 (pi0 mode) pi- 
+        self.DdoubleStar2PiDstar02Pi0D0_PionCut = "(MIPCHI2DV(PRIMARY)> %(DdoubleStar2PiDstar02Pi0D0_Pi_IPCHI2)s ) & (TRCHI2DOF < %(DdoubleStar2PiDstar02Pi0D0_Pi_TRCHI2)s) & (PIDK < %(DdoubleStar2PiDstar02Pi0D0_Pi_PIDK)s) & (TRGHP < %(TRGHP_slowPi)s)" %config
+        # Cuts for pi from  D_1(2420)- -> D*(2007)0 (pi0 mode) pi- 
+        self.DdoubleStar2PiDstar02Pi0D0Cut = " (VFASPF(VCHI2/VDOF) < %(DdoubleStar2PiDstar02Pi0D0_VCHI2)s ) & (M-MAXTREE('D*(2007)0'==ABSID,M)>%(DdoubleStar2PiDstar02Pi0D0_DeltaM_low)s*MeV) & (M-MAXTREE('D*(2007)0'==ABSID,M)<%(DdoubleStar2PiDstar02Pi0D0_DeltaM_high)s*MeV) &"\
+                        " (PT>%(DdoubleStar2PiDstar02Pi0D0_PT)s *MeV) & ((ADMASS('D_1(2420)-')< %(DdoubleStar2PiDstar02Pi0D0_MassW)s*MeV))" % config
+
+        #Cuts for pion in D_1(2420)- -> D*(2007)0 (Gamma mode) pi- 
+        self.DdoubleStar2PiDstar02GammaD0_PionCut = "(MIPCHI2DV(PRIMARY)> %(DdoubleStar2PiDstar02GammaD0_Pi_IPCHI2)s ) & (TRCHI2DOF < %(DdoubleStar2PiDstar02GammaD0_Pi_TRCHI2)s) & (PIDK < %(DdoubleStar2PiDstar02GammaD0_Pi_PIDK)s) & (TRGHP < %(TRGHP_slowPi)s)" %config
+        # Cuts for pi from  D_1(2420)- -> D*(2007)0 (Gamma mode) pi- 
+        self.DdoubleStar2PiDstar02GammaD0Cut = " (VFASPF(VCHI2/VDOF) < %(DdoubleStar2PiDstar02GammaD0_VCHI2)s ) & (M-MAXTREE('D*(2007)0'==ABSID,M)>%(DdoubleStar2PiDstar02GammaD0_DeltaM_low)s*MeV) & (M-MAXTREE('D*(2007)0'==ABSID,M)<%(DdoubleStar2PiDstar02GammaD0_DeltaM_high)s*MeV) &"\
+                        " (PT>%(DdoubleStar2PiDstar02GammaD0_PT)s *MeV) & ((ADMASS('D_1(2420)-')< %(DdoubleStar2PiDstar02GammaD0_MassW)s*MeV))" % config
+
+       
+        #B combination cuts
+        self.B0CombCut="(((DAMASS('B0') > %(B_DeltaM_low)s*MeV) & (DAMASS('B0') < %(B_DeltaM_high)s*MeV)) | ((DAMASS('B0') > %(B_upperDeltaM_low)s*MeV) & (DAMASS('B0') < %(B_upperDeltaM_high)s*MeV))) & (AMAXDOCA('',0) < %(B_DOCAMAX)s*mm)" %config
+
+        self.BplusCombCut="(((DAMASS('B+') > %(B_DeltaM_low)s*MeV) & (DAMASS('B+') < %(B_DeltaM_high)s*MeV)) | ((DAMASS('B+') > %(B_upperDeltaM_low)s*MeV) & (DAMASS('B+') < %(B_upperDeltaM_high)s*MeV))) & (AMAXDOCA('',0) < %(B_DOCAMAX)s*mm)" %config
+
+        self.BcCombCut="(((DAMASS('B_c+') > %(B_DeltaM_low)s*MeV) & (DAMASS('B_c+') < %(B_DeltaM_high)s*MeV)) | ((DAMASS('B_c+') > %(B_upperDeltaM_low)s*MeV) & (DAMASS('B_c+') < %(B_upperDeltaM_high)s*MeV))) & (AMAXDOCA('',0) < %(B_DOCAMAX)s*mm)" %config
+
+        self.BsCombCut="(((DAMASS('B_s0') > %(B_DeltaM_low)s*MeV) & (DAMASS('B_s0') < %(B_DeltaM_high)s*MeV)) | ((DAMASS('B_s0') > %(B_upperDeltaM_low)s*MeV) & (DAMASS('B_s0') < %(B_upperDeltaM_high)s*MeV))) & (AMAXDOCA('',0) < %(B_DOCAMAX)s*mm)" %config
+
+        self.LbCombCut="(DAMASS('Lambda_b0') < %(B_DeltaM_high)s*MeV)  & (AMAXDOCA('') < %(B_DOCAMAX)s*mm)" %config
+        self.LbCombpInvVertCut="(CHILD(BPVVDZ,2) -BPVVDZ > 3*  %(LbInvVertD)s *mm) & (CHILD(BPVVDZ,2) -BPVVDZ <50.) & (CHILD(MIPCHI2DV(PRIMARY),2)>15) & (CHILD(BPVVDR,2)<5) & (CHILD(BPVVDR,2)>.2)& (CHILD(BPVVDCHI2,2)>100) & (MM<5000) "%config
+        self.LbCombInvVertCut= "(ACHILD(VFASPF(VZ),2) - ACHILD(VFASPF(VZ),1) >  %(LbInvVertD)s *mm)& (ACHILD(VFASPF(VZ),2) - ACHILD(VFASPF(VZ),1) <50. ) & (DAMASS('Lambda_b0') < %(B_DeltaM_high)s*MeV)" %config
+        self.B0dCombInvVertCut="(ACHILD(VFASPF(VZ),2) - ACHILD(VFASPF(VZ),1) >  %(DInvVertD)s *mm)&(ACHILD(VFASPF(VZ),2) - ACHILD(VFASPF(VZ),1) <50.) & (DAMASS('B0') < %(B_DeltaM_high)s*MeV)" %config
+        #B cuts
+        self.BCut = " (BPVDIRA > %(B_BPVDIRA)s)" %config
+       
+        self.BInvVertCut = " (BPVDIRA >%(B_BPVDIRA)s)" %config
+     
+
+        # Tau particle location
+        #self.tau_path = 'Phys/StdLooseDetachedTau3pi/Particles'
+        self.tau_path = 'Phys/StdLooseDetachedTau3piNoPID/Particles'
+
+        ### Now make all the selections ###
+
+        self.__MakeTau23pi__()
+
+        #self.filterTisTos()
+        self.__FilterDstars__()
+        self.__FilterDstarWS__()
+        self.__FilterD02K3pi__()
+        self.__FilterD02K3piForDst__()
+        self.__FilterDstarD02K3pi__()
+        self.__FilterDstarD02K3piWS__()
+        self.__FilterDplus__()
+        self.__FilterD0__()
+        self.__FilterDs__()
+        self.__FilterLc__()
+        self.__Filterp__()
+        self.__FilterLcInvVert__()
+        self.__FilterDInvVert__()
+        self.__FilterJpsi2MuMu__()
+        
+        self.__MakeB0d2DstarTauNu__()
+        self.__MakeB0d2DstarWSSlowTauNu__()
+        self.__MakeB0d2DstarTauNuWS__()
+        self.__MakeB0d2DstarTauNuNonPhysTau__()
+        self.__MakeB0d2DstarSlowWSTauNu__()
+        self.__MakeB0d2DstarD02K3piTauNu__()
+        self.__MakeB0d2DstarD02K3piWSSlowTauNu__()
+        self.__MakeB0d2DstarD02K3piSlowWSTauNu__()
+        self.__MakeB0d2DstarD02K3piTauNuWS__()
+        self.__MakeB0d2DstarD02K3piTauNuNonPhysTau__()
+        self.__MakeBu2D02K3piTauNu__()
+        self.__MakeBu2D02K3piTauNuWS__()
+        self.__MakeBu2D02K3piTauNuNonPhysTau__()
+        self.__MakeB0d2DTauNu__()
+        self.__MakeB0d2DTauNuWS__()
+        self.__MakeB0d2DTauNuNonPhysTau__()
+        self.__MakeBu2D0TauNu__()
+        self.__MakeBu2D0TauNuWS__()
+        self.__MakeBu2D0TauNuNonPhysTau__()
+        self.__MakeBc2JpsiTauNu__()
+        self.__MakeBc2JpsiTauNuNonPhysTau__()
+        self.__MakeB0s2DsTauNu__()
+        self.__MakeB0s2DsTauNuWS__()
+        self.__MakeB0s2DsTauNuNonPhysTau__()
+        self.__MakeLb2LcTauNu__()
+        self.__MakeLb2LcTauNuWS__()
+        self.__MakeLb2pTauNu__()
+        self.__MakeLb2pTauNuWS__()
+        self.__MakeLb2LcTauNuNonPhysTau__()
+        self.__MakeLb2LcTauNuInvVert__()
+        self.__MakeB0d2DstarTauNuInvVert__()
+        self.__MakeDdoubleStar02DstarPi__()
+        self.__MakeBu2DdoubleStar0TauNu__()
+        self.__MakeBu2DdoubleStar0TauNuWS__()
+        self.__MakeBu2DdoubleStar0TauNuNonPhysTau__()
+        self.__MakeDStar02Pi0D0__()
+        self.__MakeBu2Dstar02Pi0D0TauNu__()
+        self.__MakeBu2Dstar02Pi0D0TauNuWS__()
+        self.__MakeBu2Dstar02Pi0D0TauNuNonPhysTau__()
+        self.__MakeDStar02GammaD0__()
+        self.__MakeBu2Dstar02GammaD0TauNu__()
+        self.__MakeBu2Dstar02GammaD0TauNuWS__()
+        self.__MakeBu2Dstar02GammaD0TauNuNonPhysTau__()
+        self.__MakeDdoubleStar2PiDstar02Pi0D0__()
+        self.__MakeB0d2DdoubleStar2PiDstar02Pi0D0TauNu__()
+        self.__MakeB0d2DdoubleStar2PiDstar02Pi0D0TauNuWS__()
+        self.__MakeB0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTau__()
+        self.__MakeDdoubleStar2PiDstar02GammaD0__()
+        self.__MakeB0d2DdoubleStar2PiDstar02GammaD0TauNu__()
+        self.__MakeB0d2DdoubleStar2PiDstar02GammaD0TauNuWS__()
+        self.__MakeB0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTau__()
+
+              
+        from StrippingConf.StrippingLine import StrippingLine
+        from PhysSelPython.Wrappers import SelectionSequence
+
+        
+        #TisTos filter
+        def filterTisTos(name,Input,myTisTosSpecs):
+            
+            from Configurables import TisTosParticleTagger
+            from PhysSelPython.Wrappers import Selection
+            myTagger = TisTosParticleTagger(name + "_TisTosTagger")
+            myTagger.TisTosSpecs = myTisTosSpecs
+            
+            # To speed it up, TisTos only with tracking system
+            myTagger.ProjectTracksToCalo = False
+            myTagger.CaloClustForCharged = False
+            myTagger.CaloClustForNeutral = False
+            myTagger.TOSFrac = { 4:0.0, 5:0.0 }
+            
+            return Selection(name + "_SelTisTos",
+                             Algorithm = myTagger,
+                             RequiredSelections = [ Input ] )
+
+
+        # (1) B0d2DstarTauNuLine
+
+        ##TisTos definition
+        self.TOSB0d2DstarTauNu = filterTisTos("TOSB0d2DstarTauNu",
+                                             Input = self.B0d2DstarTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        ### Now make B stripping line ###
+        B0d2DstarTauNuLine = StrippingLine("B0d2DstarTauNuFor"+self._name,
+                                        prescale = config['Prescale_B0d2DstarTauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DstarTauNu ]
+                                        )
+        self.registerLine(B0d2DstarTauNuLine)
+
+        # (2) B0d2DstarWSSlowTauNuLine
+        
+        self.TOSB0d2DstarWSSlowTauNu = filterTisTos("TOSB0d2DstarWSSlowTauNu",
+                                             Input = self.B0d2DstarWSSlowTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        ### Now make B stripping line with wrong sign slow pion ###
+        B0d2DstarWSSlowTauNuLine = StrippingLine("B0d2DstarWSSlowTauNuFor"+self._name,
+                                        prescale = config['Prescale_B0d2DstarWSSlowTauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DstarWSSlowTauNu ]
+                                        )
+        self.registerLine(B0d2DstarWSSlowTauNuLine)
+
+        # (3) B0d2DstarTauNuWSLine
+
+        self.TOSB0d2DstarTauNuWS = filterTisTos("TOSB0d2DstarTauNuWS",
+                                             Input = self.B0d2DstarTauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        B0d2DstarTauNuWSLine = StrippingLine("B0d2DstarTauNuWSFor"+self._name,
+                                          prescale = config['Prescale_B0d2DstarTauNu'],
+                                          postscale = config['Postscale'],
+                                          algos = [ self.TOSB0d2DstarTauNuWS ]
+                                          )
+        self.registerLine(B0d2DstarTauNuWSLine)
+
+        # (4) B0d2DstarTauNuNonPhysTauLine
+
+        self.TOSB0d2DstarTauNuNonPhys = filterTisTos("TOSB0d2DstarTauNuNonPhys",
+                                             Input = self.B0d2DstarTauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DstarTauNuNonPhysTauLine = StrippingLine("B0d2DstarTauNuNonPhysTauFor"+self._name,
+                                          prescale = config['Prescale_NonPhys'],
+                                          postscale = config['Postscale'],
+                                          algos = [ self.TOSB0d2DstarTauNuNonPhys ]
+                                          )
+        self.registerLine(B0d2DstarTauNuNonPhysTauLine)
+
+
+        # (5) B0d2DstarSlowWSTauNuLine
+        
+        self.TOSB0d2DstarSlowWSTauNu = filterTisTos("TOSB0d2DstarSlowWSTauNu",
+                                             Input = self.B0d2DstarSlowWSTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DstarSlowWSTauNuLine = StrippingLine("B0d2DstarSlowWSTauNuFor"+self._name,
+                                        prescale = config['Prescale_B0d2DstarSlowWSTauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DstarSlowWSTauNu ]
+                                        )
+        self.registerLine(B0d2DstarSlowWSTauNuLine)
+
+        # (6) B0d2DstarD02K3piTauNuLine
+
+        self.TOSB0d2DstarD02K3piTauNu = filterTisTos("TOSB0d2DstarD02K3piTauNu",
+                                             Input = self.B0d2DstarD02K3piTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        self.B0d2DstarD02K3piTauNuLine = StrippingLine("B0d2DstarD02K3piTauNuFor"+self._name,
+                                        prescale = config['Prescale_B0d2DstarD02K3piTauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DstarD02K3piTauNu ]
+                                        )
+        self.registerLine(self.B0d2DstarD02K3piTauNuLine)
+
+        # (7) B0d2DstarD02K3piWSSlowTauNuLine
+        
+        self.TOSB0d2DstarD02K3piWSSlowTauNu = filterTisTos("TOSB0d2DstarD02K3piWSSlowTauNu",
+                                             Input = self.B0d2DstarD02K3piWSSlowTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DstarD02K3piWSSlowTauNuLine = StrippingLine("B0d2DstarD02K3piWSSlowTauNuFor"+self._name,
+                                        prescale = config['Prescale_B0d2DstarD02K3piWSSlowTauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DstarD02K3piWSSlowTauNu ]
+                                        )
+
+        self.registerLine(B0d2DstarD02K3piWSSlowTauNuLine)
+
+        # (8) B0d2DstarD02K3piWSSlowTauNuLine
+        
+        self.TOSB0d2DstarD02K3piSlowWSTauNu = filterTisTos("TOSB0d2DstarD02K3piSlowWSTauNu",
+                                             Input = self.B0d2DstarD02K3piSlowWSTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DstarD02K3piSlowWSTauNuLine = StrippingLine("B0d2DstarD02K3piSlowWSTauNuFor"+self._name,
+                                        prescale = config['Prescale_B0d2DstarD02K3piSlowWSTauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DstarD02K3piSlowWSTauNu ]
+                                        )
+
+        self.registerLine(B0d2DstarD02K3piSlowWSTauNuLine)
+
+        # (9) B0d2DstarD02K3piTauNuWSLine
+
+        self.TOSB0d2DstarD02K3piTauNuWS = filterTisTos("TOSB0d2DstarD02K3piTauNuWS",
+                                             Input = self.B0d2DstarD02K3piTauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        B0d2DstarD02K3piTauNuWSLine = StrippingLine("B0d2DstarD02K3piTauNuWSFor"+self._name,
+                                          prescale = config['Prescale_B0d2DstarD02K3piTauNuWS'],
+                                          postscale = config['Postscale'],
+                                          algos = [ self.TOSB0d2DstarD02K3piTauNuWS ]
+                                          )
+
+        self.registerLine(B0d2DstarD02K3piTauNuWSLine)
+
+        # (10) B0d2DstarD02K3piTauNuNonPhysTauLine
+
+        self.TOSB0d2DstarD02K3piTauNuNonPhys = filterTisTos("TOSB0d2DstarD02K3piTauNuNonPhys",
+                                             Input = self.B0d2DstarD02K3piTauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DstarD02K3piTauNuNonPhysTauLine = StrippingLine("B0d2DstarD02K3piTauNuNonPhysTauFor"+self._name,
+                                          prescale = config['Prescale_NonPhys'],
+                                          postscale = config['Postscale'],
+                                          algos = [ self.TOSB0d2DstarD02K3piTauNuNonPhys ]
+                                          )
+
+        self.registerLine(B0d2DstarD02K3piTauNuNonPhysTauLine)
+
+        # (11) Bu2D02K3piTauNuLine
+
+        self.TOSBu2D02K3piTauNu = filterTisTos("TOSBu2D02K3piTauNu",
+                                             Input = self.Bu2D02K3piTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        self.Bu2D02K3piTauNuLine = StrippingLine("Bu2D02K3piTauNuFor"+self._name,
+                                          prescale = config['Prescale_Bu2D02K3piTauNu'],
+                                          postscale = config['Postscale'],
+                                          algos = [ self.TOSBu2D02K3piTauNu ]
+                                          )
+
+        self.registerLine(self.Bu2D02K3piTauNuLine)
+
+        # (12) B0d2D02K3piTauNuWSLine
+
+        self.TOSBu2D02K3piTauNuWS = filterTisTos("TOSBu2D02K3piTauNuWS",
+                                             Input = self.Bu2D02K3piTauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bu2D02K3piTauNuWSLine = StrippingLine("Bu2D02K3piTauNuWSFor"+self._name,
+                                          prescale = config['Prescale_Bu2D02K3piTauNuWS'],
+                                          postscale = config['Postscale'],
+                                          algos = [ self.TOSBu2D02K3piTauNuWS ]
+                                          )
+
+        self.registerLine(Bu2D02K3piTauNuWSLine)
+
+        # (13) Bu2D02K3piTauNuNonPhysTauLine
+
+        self.TOSBu2D02K3piTauNuNonPhys = filterTisTos("TOSBu2D02K3piTauNuNonPhys",
+                                             Input = self.Bu2D02K3piTauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        Bu2D02K3piTauNuNonPhysTauLine = StrippingLine("Bu2D02K3piTauNuNonPhysTauFor"+self._name,
+                                          prescale = config['Prescale_NonPhys'],
+                                          postscale = config['Postscale'],
+                                          algos = [ self.TOSBu2D02K3piTauNuNonPhys ]
+                                          )
+
+        self.registerLine(Bu2D02K3piTauNuNonPhysTauLine)
+
+        # (14) B0d2DTauNuLine 
+
+        self.TOSB0d2DTauNu = filterTisTos("TOSB0d2DTauNu",
+                                             Input = self.B0d2DTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        B0d2DTauNuLine = StrippingLine("B0d2DTauNuFor"+self._name,
+                                    prescale = config['Prescale_B0d2DTauNu'],
+                                    postscale = config['Postscale'],
+                                    algos = [ self.TOSB0d2DTauNu ]
+                                    )
+        self.registerLine(B0d2DTauNuLine)
+
+        # (15) B0d2DTauNuWSLine
+
+        self.TOSB0d2DTauNuWS = filterTisTos("TOSB0d2DTauNuWS",
+                                             Input = self.B0d2DTauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        B0d2DTauNuWSLine = StrippingLine("B0d2DTauNuWSFor"+self._name,
+                                      prescale = config['Prescale_B0d2DTauNu'],
+                                      postscale = config['Postscale'],
+                                      algos = [ self.TOSB0d2DTauNuWS ]
+                                      )
+        self.registerLine(B0d2DTauNuWSLine)
+
+        # (16) B0d2DTauNuNonPhysTauLine
+
+        self.TOSB0d2DTauNuNonPhys = filterTisTos("TOSB0d2DTauNuNonPhys",
+                                             Input = self.B0d2DTauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DTauNuNonPhysTauLine = StrippingLine("B0d2DTauNuNonPhysTauFor"+self._name,
+                                      prescale = config['Prescale_NonPhys'],
+                                      postscale = config['Postscale'],
+                                      algos = [ self.TOSB0d2DTauNuNonPhys ]
+                                      )
+        self.registerLine(B0d2DTauNuNonPhysTauLine)
+
+        # (17) Bu2D0TauNuLine
+
+        self.TOSBu2D0TauNu = filterTisTos("TOSBu2D0TauNu",
+                                             Input = self.Bu2D0TauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        self.Bu2D0TauNuLine = StrippingLine("Bu2D0TauNuFor"+self._name,
+                                     prescale = config['Prescale_Bu2D0TauNu'],
+                                     postscale = config['Postscale'],
+                                     algos = [ self.TOSBu2D0TauNu ]
+                                     )
+        self.registerLine(self.Bu2D0TauNuLine)
+
+        # (18) Bu2D0TauNuWSLine
+
+        self.TOSBu2D0TauNuWS = filterTisTos("TOSBu2D0TauNuWS",
+                                             Input = self.Bu2D0TauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bu2D0TauNuWSLine = StrippingLine("Bu2D0TauNuWSFor"+self._name,
+                                       prescale = config['Prescale_Bu2D0TauNu'],
+                                       postscale = config['Postscale'],
+                                       algos = [ self.TOSBu2D0TauNuWS ]
+                                       )
+        self.registerLine(Bu2D0TauNuWSLine)
+
+        # (19) Bu2D0TauNuNonPhysTauLine
+
+        self.TOSBu2D0TauNuNonPhys = filterTisTos("TOSBu2D0TauNuNonPhys",
+                                             Input = self.Bu2D0TauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        Bu2D0TauNuNonPhysTauLine = StrippingLine("Bu2D0TauNuNonPhysTauFor"+self._name,
+                                       prescale = config['Prescale_NonPhys'],
+                                       postscale = config['Postscale'],
+                                       algos = [ self.TOSBu2D0TauNuNonPhys ]
+                                       )
+        self.registerLine(Bu2D0TauNuNonPhysTauLine)
+
+        # (20) Bc2JpsiTauNuLine
+
+        self.TOSBc2JpsiTauNu = filterTisTos("TOSBc2JpsiTauNu",
+                                             Input = self.Bc2JpsiTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bc2JpsiTauNuLine = StrippingLine("Bc2JpsiTauNuFor"+self._name,
+                                       prescale = config['Prescale_Bc2JpsiTauNu'],
+                                       postscale = config['Postscale'],
+                                       algos = [ self.TOSBc2JpsiTauNu ]
+                                       )
+        self.registerLine(Bc2JpsiTauNuLine)
+
+        # (21) Bc2JpsiTauNuNonPhysTauLine
+
+        self.TOSBc2JpsiTauNuNonPhys = filterTisTos("TOSBc2JpsiTauNuNonPhys",
+                                             Input = self.Bc2JpsiTauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        Bc2JpsiTauNuNonPhysTauLine = StrippingLine("Bc2JpsiTauNuNonPhysTauFor"+self._name,
+                                       prescale = config['Prescale_NonPhys'],
+                                       postscale = config['Postscale'],
+                                       algos = [ self.TOSBc2JpsiTauNuNonPhys ]
+                                       )
+        self.registerLine(Bc2JpsiTauNuNonPhysTauLine)
+
+        # (22) Lb2LcTauNuLine
+
+        self.TOSLb2LcTauNu = filterTisTos("TOSLb2LcTauNu",
+                                             Input = self.Lb2LcTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Lb2LcTauNuLine = StrippingLine("Lb2LcTauNuFor"+self._name,
+                                     prescale = config['Prescale_Lb2LcTauNu'],
+                                     postscale = config['Postscale'],
+                                     algos = [ self.TOSLb2LcTauNu ]
+                                     )
+        self.registerLine(Lb2LcTauNuLine)
+
+        # (23) Lb2LcTauNuWSLine
+
+        self.TOSLb2LcTauNuWS = filterTisTos("TOSLb2LcTauNuWS",
+                                             Input = self.Lb2LcTauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Lb2LcTauNuWSLine = StrippingLine("Lb2LcTauNuWSFor"+self._name,
+                                       prescale = config['Prescale_Lb2LcTauNu'],
+                                       postscale = config['Postscale'],
+                                       algos = [ self.TOSLb2LcTauNuWS ]
+                                       )
+        self.registerLine(Lb2LcTauNuWSLine)
+
+        # (24) Lb2pTauNuLine
+
+        self.TOSLb2pTauNu = filterTisTos("TOSLb2pTauNu",
+                                          Input = self.Lb2pTauNuSel,
+                                          myTisTosSpecs = config['TisTosSpecs']
+                                          )
+        
+        Lb2pTauNuLine = StrippingLine("Lb2pTauNuFor"+self._name,
+                                     prescale = config['Prescale_Lb2pTauNu'],
+                                     postscale = config['Postscale'],
+                                     algos = [ self.TOSLb2pTauNu ]
+                                     )
+        self.registerLine(Lb2pTauNuLine)
+
+        # (25) Lb2pTauNuWSLine
+
+        self.TOSLb2pTauNuWS = filterTisTos("TOSLb2pTauNuWS",
+                                             Input = self.Lb2pTauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Lb2pTauNuWSLine = StrippingLine("Lb2pTauNuWSFor"+self._name,
+                                       prescale = config['Prescale_Lb2pTauNu'],
+                                       postscale = config['Postscale'],
+                                       algos = [ self.TOSLb2pTauNuWS ]
+                                       )
+        self.registerLine(Lb2pTauNuWSLine)
+
+        # (26) Lb2LcTauNuNonPhysTauLine
+
+        self.TOSLb2LcTauNuNonPhys = filterTisTos("TOSLb2LcTauNuNonPhys",
+                                             Input = self.Lb2LcTauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        Lb2LcTauNuNonPhysTauLine = StrippingLine("Lb2LcTauNuNonPhysTauFor"+self._name,
+                                       prescale = config['Prescale_NonPhys'],
+                                       postscale = config['Postscale'],
+                                       algos = [ self.TOSLb2LcTauNuNonPhys ]
+                                       )
+        self.registerLine(Lb2LcTauNuNonPhysTauLine)
+
+        # (27) Lb2LcTauNuInvVertLine
+        
+        self.TOSLb2LcTauNuInvVert = filterTisTos("TOSLb2LcTauNuInvVert",
+                                             Input = self.Lb2LcTauNuSelInvVert,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Lb2LcTauNuInvVertLine = StrippingLine("Lb2LcTauNuInvVertFor"+self._name,
+                                     prescale = config['Prescale_Lb2LcTauNu'],
+                                     postscale = config['Postscale'],
+                                     algos = [ self.TOSLb2LcTauNuInvVert ]
+                                     )
+        self.registerLine(Lb2LcTauNuInvVertLine)
+
+        # (28) B0d2DstarTauNuInvVertLine
+
+        self.TOSB0d2DstarTauNuInvVert = filterTisTos("TOSB0d2DstarTauNuInvVert",
+                                             Input = self.B0d2DstarTauNuSelInvVert,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        B0d2DstarTauNuInvVertLine = StrippingLine("B0d2DstarTauNuInvVertFor"+self._name,
+                                     prescale = config['Prescale_B0d2DstarTauNu'],
+                                     postscale = config['Postscale'],
+                                     algos = [ self.TOSB0d2DstarTauNuInvVert ]
+                                     )
+        self.registerLine(B0d2DstarTauNuInvVertLine)
+
+        # (29) Bs2DsTauNuLine
+        
+        self.TOSBs2DsTauNu = filterTisTos("TOSBs2DsTauNu",
+                                             Input = self.B0s2DsTauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bs2DsTauNuLine = StrippingLine("Bs2DsTauNuFor"+self._name,
+                                     prescale = config['Prescale_B0s2DsTauNu'],
+                                     postscale = config['Postscale'],
+                                     algos = [ self.TOSBs2DsTauNu ]
+                                     )
+        self.registerLine(Bs2DsTauNuLine)
+
+        # (30) Bs2DsTauNuWSLine
+
+        self.TOSBs2DsTauNuWS = filterTisTos("TOSBs2DsTauNuWS",
+                                             Input = self.B0s2DsTauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bs2DsTauNuWSLine = StrippingLine("Bs2DsTauNuWSFor"+self._name,
+                                       prescale = config['Prescale_B0s2DsTauNu'],
+                                       postscale = config['Postscale'],
+                                       algos = [ self.TOSBs2DsTauNuWS ]
+                                       )
+        self.registerLine(Bs2DsTauNuWSLine)
+
+        # (31) Bs2DsTauNuNonPhysTauLine
+
+        self.TOSBs2DsTauNuNonPhys = filterTisTos("TOSBs2DsTauNuNonPhys",
+                                             Input = self.B0s2DsTauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        Bs2DsTauNuNonPhysTauLine = StrippingLine("Bs2DsTauNuNonPhysTauFor"+self._name,
+                                       prescale = config['Prescale_NonPhys'],
+                                       postscale = config['Postscale'],
+                                       algos = [ self.TOSBs2DsTauNuNonPhys ]
+                                       )
+        self.registerLine(Bs2DsTauNuNonPhysTauLine)
+
+        # (32) Bu2DdoubleStar0TauNuLine
+        
+
+        self.TOSBu2DdoubleStar0TauNu = filterTisTos("TOSBu2DdoubleStar0TauNu",
+                                             Input = self.Bu2DdoubleStar0TauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        Bu2DdoubleStar0TauNuLine = StrippingLine("Bu2DdoubleStar0TauNuFor"+self._name,
+                                        prescale = config['Prescale_Bu2DdoubleStar0TauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSBu2DdoubleStar0TauNu ]
+                                        )
+        self.registerLine(Bu2DdoubleStar0TauNuLine)
+
+        # (33) Bu2DdoubleStar0TauNuWSLine
+        
+        self.TOSBu2DdoubleStar0TauNuWS = filterTisTos("TOSBu2DdoubleStar0TauNuWS",
+                                             Input = self.Bu2DdoubleStar0TauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bu2DdoubleStar0TauNuWSLine = StrippingLine("Bu2DdoubleStar0TauNuWSFor"+self._name,
+                                          prescale = config['Prescale_Bu2DdoubleStar0TauNu'],
+                                          postscale = config['Postscale'],
+                                          algos = [ self.TOSBu2DdoubleStar0TauNuWS ]
+                                          )
+        self.registerLine(Bu2DdoubleStar0TauNuWSLine)
+
+        # (34) Bu2DdoubleStar0TauNuNonPhysTauLine
+
+        self.TOSBu2DdoubleStar0TauNuNonPhys = filterTisTos("TOSBu2DdoubleStar0TauNuNonPhys",
+                                             Input = self.Bu2DdoubleStar0TauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        Bu2DdoubleStar0TauNuNonPhysTauLine = StrippingLine("Bu2DdoubleStar0TauNuNonPhysTauFor"+self._name,
+                                          prescale = config['Prescale_NonPhys'],
+                                          postscale = config['Postscale'],
+                                          algos = [ self.TOSBu2DdoubleStar0TauNuNonPhys ]
+                                          )
+        self.registerLine(Bu2DdoubleStar0TauNuNonPhysTauLine)
+
+        # (35) Bu2Dstar02Pi0D0TauNuLine
+
+        self.TOSBu2Dstar02Pi0D0TauNu = filterTisTos("TOSBu2Dstar02Pi0D0TauNu",
+                                             Input = self.Bu2Dstar02Pi0D0TauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bu2Dstar02Pi0D0TauNuLine = StrippingLine("Bu2Dstar02Pi0D0TauNuFor"+self._name,
+                                        prescale = config['Prescale_Bu2Dstar02Pi0D0TauNu'],
+                                        postscale = config['Postscale'],
+                                        
+                                        algos = [ self.TOSBu2Dstar02Pi0D0TauNu ]
+                                        )
+        self.registerLine(Bu2Dstar02Pi0D0TauNuLine)
+
+        # (36) Bu2Dstar02Pi0D0TauNuWSLine
+        
+        self.TOSBu2Dstar02Pi0D0TauNuWS = filterTisTos("TOSBu2Dstar02Pi0D0TauNuWS",
+                                             Input = self.Bu2Dstar02Pi0D0TauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bu2Dstar02Pi0D0TauNuWSLine = StrippingLine("Bu2Dstar02Pi0D0TauNuWSFor"+self._name,
+                                        prescale = config['Prescale_Bu2Dstar02Pi0D0TauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSBu2Dstar02Pi0D0TauNuWS ]
+                                        )
+        self.registerLine(Bu2Dstar02Pi0D0TauNuWSLine)
+
+        # (37) Bu2Dstar02Pi0D0TauNuNonPhysTauLine
+        
+        self.TOSBu2Dstar02Pi0D0TauNuNonPhys = filterTisTos("TOSBu2Dstar02Pi0D0TauNuNonPhys",
+                                             Input = self.Bu2Dstar02Pi0D0TauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bu2Dstar02Pi0D0TauNuNonPhysTauLine = StrippingLine("Bu2Dstar02Pi0D0TauNuNonPhysFor"+self._name,
+                                        prescale = config['Prescale_NonPhys'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSBu2Dstar02Pi0D0TauNuNonPhys ]
+                                        )
+        self.registerLine(Bu2Dstar02Pi0D0TauNuNonPhysTauLine)
+
+        # (38) Bu2Dstar02GammaD0TauNuLine
+        
+        self.TOSBu2Dstar02GammaD0TauNu = filterTisTos("TOSBu2Dstar02GammaD0TauNu",
+                                             Input = self.Bu2Dstar02GammaD0TauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bu2Dstar02GammaD0TauNuLine = StrippingLine("Bu2Dstar02GammaD0TauNuFor"+self._name,
+                                        prescale = config['Prescale_Bu2Dstar02GammaD0TauNu'],
+                                        postscale = config['Postscale'],
+                                        
+                                        algos = [ self.TOSBu2Dstar02GammaD0TauNu ]
+                                        )
+        self.registerLine(Bu2Dstar02GammaD0TauNuLine)
+
+        # (39) Bu2Dstar02GammaD0TauNuWSLine
+        
+        self.TOSBu2Dstar02GammaD0TauNuWS = filterTisTos("TOSBu2Dstar02GammaD0TauNuWS",
+                                             Input = self.Bu2Dstar02GammaD0TauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bu2Dstar02GammaD0TauNuWSLine = StrippingLine("Bu2Dstar02GammaD0TauNuWSFor"+self._name,
+                                        prescale = config['Prescale_Bu2Dstar02GammaD0TauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSBu2Dstar02GammaD0TauNuWS ]
+                                        )
+        self.registerLine(Bu2Dstar02GammaD0TauNuWSLine)
+
+        # (40) Bu2Dstar02GammaD0TauNuNonPhysTauLine
+
+        self.TOSBu2Dstar02GammaD0TauNuNonPhys = filterTisTos("TOSBu2Dstar02GammaD0TauNuNonPhys",
+                                             Input = self.Bu2Dstar02GammaD0TauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+        
+        Bu2Dstar02GammaD0TauNuNonPhysTauLine = StrippingLine("Bu2Dstar02GammaD0TauNuNonPhysFor"+self._name,
+                                        prescale = config['Prescale_NonPhys'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSBu2Dstar02GammaD0TauNuNonPhys ]
+                                        )
+        self.registerLine(Bu2Dstar02GammaD0TauNuNonPhysTauLine)
+
+        # (41) B0d2DdoubleStar2PiDstar02Pi0D0TauNuLine
+        
+        self.TOSB0d2DdoubleStar2PiDstar02Pi0D0TauNu = filterTisTos("TOSB0d2DdoubleStar2PiDstar02Pi0D0TauNu",
+                                             Input = self.B0d2DdoubleStar2PiDstar02Pi0D0TauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DdoubleStar2PiDstar02Pi0D0TauNuLine = StrippingLine("B0d2DdoubleStar2PiDstar02Pi0D0TauNuFor"+self._name,
+                                        prescale = config['Prescale_B0d2DdoubleStar2PiDstar02Pi0D0TauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DdoubleStar2PiDstar02Pi0D0TauNu ]
+                                        )
+        self.registerLine(B0d2DdoubleStar2PiDstar02Pi0D0TauNuLine)
+
+        # (42) B0d2DdoubleStar2PiDstar02Pi0D0TauNuWSLine
+        
+        self.TOSB0d2DdoubleStar2PiDstar02Pi0D0TauNuWS = filterTisTos("TOSB0d2DdoubleStar2PiDstar02Pi0D0TauNuWS",
+                                             Input = self.B0d2DdoubleStar2PiDstar02Pi0D0TauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DdoubleStar2PiDstar02Pi0D0TauNuWSLine = StrippingLine("B0d2DdoubleStar2PiDstar02Pi0D0TauNuWSFor"+self._name,
+                                        prescale = config['Prescale_B0d2DdoubleStar2PiDstar02Pi0D0TauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DdoubleStar2PiDstar02Pi0D0TauNuWS ]
+                                        )
+        self.registerLine(B0d2DdoubleStar2PiDstar02Pi0D0TauNuWSLine)
+
+        # (43) B0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTauLine
+        
+        self.TOSB0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhys = filterTisTos("TOSB0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhys",
+                                             Input = self.B0d2DdoubleStar2PiDstar02Pi0D0TauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTauLine=StrippingLine("B0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysFor"+self._name,
+                                        prescale = config['Prescale_NonPhys'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhys ]
+                                        )
+        self.registerLine(B0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTauLine)
+
+        # (44) B0d2DdoubleStar2PiDstar02GammaD0TauNuLine
+        
+        self.TOSB0d2DdoubleStar2PiDstar02GammaD0TauNu = filterTisTos("TOSB0d2DdoubleStar2PiDstar02GammaD0TauNu",
+                                             Input = self.B0d2DdoubleStar2PiDstar02GammaD0TauNuSel,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DdoubleStar2PiDstar02GammaD0TauNuLine = StrippingLine("B0d2DdoubleStar2PiDstar02GammaD0TauNuFor"+self._name,
+                                        prescale = config['Prescale_B0d2DdoubleStar2PiDstar02GammaD0TauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DdoubleStar2PiDstar02GammaD0TauNu ]
+                                        )
+        self.registerLine(B0d2DdoubleStar2PiDstar02GammaD0TauNuLine)
+
+        # (45) B0d2DdoubleStar2PiDstar02GammaD0TauNuWSLine
+        
+        self.TOSB0d2DdoubleStar2PiDstar02GammaD0TauNuWS = filterTisTos("TOSB0d2DdoubleStar2PiDstar02GammaD0TauNuWS",
+                                             Input = self.B0d2DdoubleStar2PiDstar02GammaD0TauNuSelWS,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DdoubleStar2PiDstar02GammaD0TauNuWSLine = StrippingLine("B0d2DdoubleStar2PiDstar02GammaD0TauNuWSFor"+self._name,
+                                        prescale = config['Prescale_B0d2DdoubleStar2PiDstar02GammaD0TauNu'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DdoubleStar2PiDstar02GammaD0TauNuWS ]
+                                        )
+        self.registerLine(B0d2DdoubleStar2PiDstar02GammaD0TauNuWSLine)
+
+        # (46) B0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTauLine
+        
+        self.TOSB0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhys = filterTisTos("TOSB0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhys",
+                                             Input = self.B0d2DdoubleStar2PiDstar02GammaD0TauNuSelNonPhysTau,
+                                             myTisTosSpecs = config['TisTosSpecs']
+                                             )
+
+        B0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTauLine = StrippingLine("B0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysFor"+self._name,
+                                        prescale = config['Prescale_NonPhys'],
+                                        postscale = config['Postscale'],
+                                        algos = [ self.TOSB0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhys ]
+                                        )
+        self.registerLine(B0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTauLine)
+        
+        
+        ### Collect them all together in a nice way ###
+
+        self.Line=B0d2DstarTauNuLine
+        self.Selections=[self.DstarSel, self.B0d2DstarTauNuSel]
+
+        self.Line=B0d2DstarWSSlowTauNuLine
+        self.Selections=[self.DstarWSSel, self.B0d2DstarWSSlowTauNuSel]
+
+        self.Line=B0d2DstarTauNuWSLine
+        self.Selections=[self.DstarSel, self.B0d2DstarTauNuSelWS]
+
+        self.Line=B0d2DstarTauNuNonPhysTauLine
+        self.Selections=[self.DstarSel, self.B0d2DstarTauNuSelNonPhysTau]
+
+        self.Line = B0d2DstarSlowWSTauNuLine
+        self.Selections = [self.DstarWSSel, self.B0d2DstarSlowWSTauNuSel]
+
+        self.Line = self.B0d2DstarD02K3piTauNuLine
+        self.Selections = [self.DstarD02K3piSel, self.B0d2DstarD02K3piTauNuSel]
+
+        self.Line = B0d2DstarD02K3piWSSlowTauNuLine
+        self.Selections = [self.DstarD02K3piWSSel, self.B0d2DstarD02K3piWSSlowTauNuSel]
+
+        self.Line = B0d2DstarD02K3piSlowWSTauNuLine
+        self.Selections = [self.DstarD02K3piWSSel, self.B0d2DstarD02K3piSlowWSTauNuSel]
+
+        self.Line = B0d2DstarD02K3piTauNuWSLine
+        self.Selections= [ self.DstarD02K3piSel, self.B0d2DstarD02K3piTauNuSelWS]
+
+        self.Line = B0d2DstarD02K3piTauNuNonPhysTauLine
+        self.Selections = [self.DstarD02K3piSel, self.B0d2DstarD02K3piTauNuSelNonPhysTau]
+
+        self.Line = self.Bu2D02K3piTauNuLine
+        self.Selections = [self.D02K3piSel, self.Bu2D02K3piTauNuSel]
+
+        self.Line = Bu2D02K3piTauNuWSLine
+        self.Selections= [ self.D02K3piSel, self.Bu2D02K3piTauNuSelWS]
+
+        self.Line = Bu2D02K3piTauNuNonPhysTauLine
+        self.Selections = [self.D02K3piSel, self.Bu2D02K3piTauNuSelNonPhysTau]
+        
+        self.Line=B0d2DTauNuLine
+        self.Selections=[self.DplusSel, self.B0d2DTauNuSel]
+
+        self.Line=B0d2DTauNuWSLine
+        self.Selections=[self.DplusSel, self.B0d2DTauNuSelWS]
+
+        self.Line=B0d2DTauNuNonPhysTauLine
+        self.Selections=[self.DplusSel, self.B0d2DTauNuSelNonPhysTau]
+
+        self.Line=self.Bu2D0TauNuLine
+        self.Selections=[self.D0Sel, self.Bu2D0TauNuSel]
+
+        self.Line=Bu2D0TauNuWSLine
+        self.Selections=[self.D0Sel, self.Bu2D0TauNuSelWS]
+
+        self.Line=Bu2D0TauNuNonPhysTauLine
+        self.Selections=[self.D0Sel, self.Bu2D0TauNuSelNonPhysTau]
+        
+        self.Line=Bc2JpsiTauNuLine
+        self.Selections=[self.JpsiSel, self.Bc2JpsiTauNuSel]
+
+        self.Line=Bc2JpsiTauNuNonPhysTauLine
+        self.Selections=[self.JpsiSel, self.Bc2JpsiTauNuSelNonPhysTau]
+        
+        self.Line=Bs2DsTauNuLine
+        self.Selections=[self.DsSel, self.B0s2DsTauNuSel]
+
+        self.Line=Bs2DsTauNuWSLine
+        self.Selections=[self.DsSel, self.B0s2DsTauNuSelWS]
+
+        self.Line=Bs2DsTauNuNonPhysTauLine
+        self.Selections=[self.DsSel, self.B0s2DsTauNuSelNonPhysTau]
+
+        self.Line=Lb2LcTauNuLine
+        self.Selections=[self.LcSel, self.Lb2LcTauNuSel]
+
+        self.Line=Lb2LcTauNuWSLine
+        self.Selections=[self.LcSel, self.Lb2LcTauNuSelWS]
+        
+        self.Line=Lb2pTauNuLine
+        self.Selections=[self.pSel, self.Lb2pTauNuSel]
+
+        self.Line=Lb2pTauNuWSLine
+        self.Selections=[self.pSel, self.Lb2pTauNuSelWS]
+
+        self.Line=Lb2LcTauNuNonPhysTauLine
+        self.Selections=[self.LcSel, self.Lb2LcTauNuSelNonPhysTau]
+
+        self.Line=Lb2LcTauNuInvVertLine
+        self.Selections=[self.LcSelInvVert, self.Lb2LcTauNuSelInvVert]
+
+        self.Line=B0d2DstarTauNuInvVertLine
+        self.Selections=[self.LcSelInvVert, self.B0d2DstarTauNuSelInvVert]
+        
+        self.Line=Bu2DdoubleStar0TauNuLine
+        self.Selections=[self.DdoubleStar02DstarPiSel, self.Bu2DdoubleStar0TauNuSel]
+
+        self.Line=Bu2DdoubleStar0TauNuWSLine
+        self.Selections=[self.DdoubleStar02DstarPiSel, self.Bu2DdoubleStar0TauNuSelWS]
+
+        self.Line=Bu2DdoubleStar0TauNuNonPhysTauLine
+        self.Selections=[self.DdoubleStar02DstarPiSel, self.Bu2DdoubleStar0TauNuSelNonPhysTau]
+        
+        self.Line=Bu2Dstar02Pi0D0TauNuLine
+        self.Selections=[self.Dstar02Pi0D0Sel, self.Bu2Dstar02Pi0D0TauNuSel]
+        
+        self.Line=Bu2Dstar02Pi0D0TauNuWSLine
+        self.Selections=[self.Dstar02Pi0D0Sel, self.Bu2Dstar02Pi0D0TauNuSelWS]
+        
+        self.Line=Bu2Dstar02Pi0D0TauNuNonPhysTauLine
+        self.Selections=[self.Dstar02Pi0D0Sel, self.Bu2Dstar02Pi0D0TauNuSelNonPhysTau]
+        
+        self.Line=Bu2Dstar02GammaD0TauNuLine
+        self.Selections=[self.Dstar02GammaD0Sel, self.Bu2Dstar02GammaD0TauNuSel]
+        
+        self.Line=Bu2Dstar02GammaD0TauNuWSLine
+        self.Selections=[self.Dstar02GammaD0Sel, self.Bu2Dstar02GammaD0TauNuSelWS]
+        
+        self.Line=Bu2Dstar02GammaD0TauNuNonPhysTauLine
+        self.Selections=[self.Dstar02GammaD0Sel, self.Bu2Dstar02GammaD0TauNuSelNonPhysTau]
+        
+        self.Line=B0d2DdoubleStar2PiDstar02Pi0D0TauNuLine
+        self.Selections=[self.DdoubleStar2PiDstar02Pi0D0Sel, self.B0d2DdoubleStar2PiDstar02Pi0D0TauNuSel]
+        
+        self.Line=B0d2DdoubleStar2PiDstar02Pi0D0TauNuWSLine
+        self.Selections=[self.DdoubleStar2PiDstar02Pi0D0Sel, self.B0d2DdoubleStar2PiDstar02Pi0D0TauNuSelWS]
+        
+        self.Line=B0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTauLine
+        self.Selections=[self.DdoubleStar2PiDstar02Pi0D0Sel, self.B0d2DdoubleStar2PiDstar02Pi0D0TauNuSelNonPhysTau]
+        
+        self.Line=B0d2DdoubleStar2PiDstar02GammaD0TauNuLine
+        self.Selections=[self.DdoubleStar2PiDstar02GammaD0Sel, self.B0d2DdoubleStar2PiDstar02GammaD0TauNuSel]
+        
+        self.Line=B0d2DdoubleStar2PiDstar02GammaD0TauNuWSLine
+        self.Selections=[self.DdoubleStar2PiDstar02GammaD0Sel, self.B0d2DdoubleStar2PiDstar02GammaD0TauNuSelWS]
+        
+        self.Line=B0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTauLine
+        self.Selections=[self.DdoubleStar2PiDstar02GammaD0Sel, self.B0d2DdoubleStar2PiDstar02GammaD0TauNuSelNonPhysTau]
+        
+    ############ Functions to make Selections #######################
+
+    # Get the tau from container and save in self.tau23piSel
+    def __MakeTau23pi__(self):
+
+        from PhysSelPython.Wrappers import DataOnDemand
+        from CommonParticles import StdLooseDetachedTauNoPID
+
+        self.tau23piSel = DataOnDemand(Location = self.tau_path)
+
+    def __FilterDstars__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        
+        DstarsForB0d = FilterDesktop(
+            Code = self.totalDstarCut
+            )
+        MyStdDstars = DataOnDemand(Location = 'Phys/StdLooseDstarWithD02KPi/Particles')
+        SelDstarsForB0d = Selection("SelDstarsFor"+self._name,
+                                    Algorithm=DstarsForB0d, RequiredSelections = [MyStdDstars])
+        
+        self.DstarSel = SelDstarsForB0d
+
+    def __FilterDstarWS__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        
+        DstarWSForB0d = FilterDesktop(
+            Code = self.totalDstarCut
+            )
+        MyStdDstarWS = DataOnDemand(Location = 'Phys/StdLooseDstarWithD02KPiDCS/Particles')
+        SelDstarWSForB0d = Selection("SelDstarWSFor"+self._name,
+                                    Algorithm=DstarWSForB0d, RequiredSelections = [MyStdDstarWS])
+        
+        self.DstarWSSel = SelDstarWSForB0d
+        
+    def __FilterDplus__(self):
+            
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        
+        DplusForB0d = FilterDesktop(
+            Code = self.totalDplusCut
+            )
+        MyStdDplus = DataOnDemand(Location = 'Phys/StdLooseDplus2KPiPi/Particles')
+        SelDplusForB0d = Selection("SelDplusFor"+self._name,
+                                   Algorithm=DplusForB0d, RequiredSelections = [MyStdDplus])
+        
+        self.DplusSel = SelDplusForB0d
+            
+    def __FilterD0__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        
+        D0ForBu = FilterDesktop(
+            Code = self.totalD0Cut
+            )
+        MyStdD0 = DataOnDemand(Location = 'Phys/StdLooseD02KPi/Particles')
+        SelD0ForBu = Selection("SelD0For"+self._name,
+                               Algorithm=D0ForBu, RequiredSelections = [MyStdD0])
+        
+        self.D0Sel = SelD0ForBu
+
+    def __FilterD02K3pi__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from StandardParticles import StdLoosePions, StdLooseKaons
+        
+        CombD02K3pi = CombineParticles(
+            DecayDescriptors = ["[D0 -> K- pi+ pi- pi+]cc"],
+            DaughtersCuts = {
+                              "K-" : "(P > %(D02K3pi_K_P)s *GeV)" % self.__confdict__,
+                              "pi+" : "(P > %(D02K3pi_Pis_P)s *GeV)" % self.__confdict__
+                            },
+            CombinationCut = "((ADAMASS('D0')< %(D02K3pi_AMassW)s *MeV) & (AMAXDOCA('',0) < %(D02K3pi_DOCAMAX)s *mm))" % self.__confdict__,
+            MotherCut      = self.totalD02K3piCut
+            )
+
+        SelD02K3pi = Selection("SelD02K3piFor"+self._name, Algorithm = CombD02K3pi,
+                                           RequiredSelections = [StdLoosePions, StdLooseKaons])
+        
+        self.D02K3piSel = SelD02K3pi
+
+    def __FilterD02K3piForDst__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from StandardParticles import StdLoosePions, StdLooseKaons
+        
+        CombD02K3piForDst = CombineParticles(
+            DecayDescriptors = ["[D0 -> K- pi+ pi- pi+]cc"],
+            DaughtersCuts = {
+                              "K-" : "(P > %(D02K3pi_K_P)s *GeV)" % self.__confdict__,
+                              "pi+" : "(P > %(D02K3pi_Pis_P)s *GeV)" % self.__confdict__
+                            },
+            CombinationCut = "((ADAMASS('D0')< %(D02K3pi_AMassW)s *MeV) & (AMAXDOCA('',0) < %(D02K3pi_DOCAMAX)s *mm))" % self.__confdict__,
+            MotherCut      = self.totalD02K3piForDstCut
+            )
+
+        SelD02K3piForDst = Selection("SelD02K3piForDstFor"+self._name, Algorithm = CombD02K3piForDst,
+                                           RequiredSelections = [StdLoosePions, StdLooseKaons])
+        
+        self.D02K3piSelForDst = SelD02K3piForDst
+
+
+    def __FilterDstarD02K3pi__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from StandardParticles import StdAllLoosePions
+        
+        CombDstar2piD02K3pi = CombineParticles(
+            DecayDescriptors = ["[D*(2010)+ -> pi+ D0]cc"],
+            CombinationCut = "(ADAMASS('D*(2010)+')<%(DstD02K3pi_MassW)s * MeV) & (APT>%(DstD02K3pi_PT)s * MeV)" % self.__confdict__,
+            MotherCut      = "(VFASPF(VCHI2/VDOF)< %(DstD02K3pi_VCHI2)s) & (M-MAXTREE('D0'==ABSID,M)<%(DstD02K3pi_DeltaM)s * MeV)" % self.__confdict__ +" & "+ self.totalDstarD02K3piCut
+            )
+
+        SelDstar2piD02K3pi = Selection("SelDstar2piD02K3piFor"+self._name, Algorithm = CombDstar2piD02K3pi,
+                                           RequiredSelections = [StdAllLoosePions, self.D02K3piSelForDst])
+        
+        self.DstarD02K3piSel = SelDstar2piD02K3pi
+
+    def __FilterDstarD02K3piWS__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from StandardParticles import StdAllLoosePions
+        
+        CombDstar2piD02K3piWS = CombineParticles(
+            DecayDescriptors = ["[D*(2010)- -> pi- D0]cc"],
+            CombinationCut = "(ADAMASS('D*(2010)+')<%(DstD02K3pi_MassW)s * MeV) & (APT>%(DstD02K3pi_PT)s * MeV)" % self.__confdict__,
+            MotherCut      = "(VFASPF(VCHI2/VDOF)< %(DstD02K3pi_VCHI2)s) & (M-MAXTREE('D0'==ABSID,M)<%(DstD02K3pi_DeltaM)s * MeV)" % self.__confdict__ +" & "+ self.totalDstarD02K3piCut
+            )
+        
+        SelDstar2piD02K3piWS = Selection("SelDstar2piD02K3piWSFor"+self._name, Algorithm = CombDstar2piD02K3piWS,
+                                           RequiredSelections = [StdAllLoosePions, self.D02K3piSelForDst])
+        
+        self.DstarD02K3piWSSel = SelDstar2piD02K3piWS
+        
+    def __FilterDs__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        
+        DsForB0s = FilterDesktop(
+            Code = self.totalDsCut
+            )
+        MyStdDs = DataOnDemand(Location = 'Phys/StdLooseDsplus2KKPi/Particles')
+        SelDsForB0s = Selection("SelDsFor"+self._name,
+                                Algorithm=DsForB0s, RequiredSelections = [MyStdDs])
+        
+        self.DsSel=SelDsForB0s
+        
+    def __FilterLc__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+         
+        LcForLb = FilterDesktop(
+            Code = self.totalLcCut
+            )
+        MyStdLc = DataOnDemand(Location = 'Phys/StdLooseLambdac2PKPi/Particles')
+        SelLcForLb = Selection("SelLcFor"+self._name,
+                                Algorithm=LcForLb, RequiredSelections = [MyStdLc])
+        
+        self.LcSel=SelLcForLb
+
+    def __Filterp__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+         
+        pForLb = FilterDesktop(
+            Code = self.pCut
+            )
+        MyStdp = DataOnDemand(Location = 'Phys/StdLooseProtons/Particles')
+        SelpForLb = Selection("SelpFor"+self._name,
+                                Algorithm=pForLb, RequiredSelections = [MyStdp])
+        
+        self.pSel=SelpForLb
+        
+        
+    def __FilterLcInvVert__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+         
+        LcForLbInvVert = FilterDesktop(
+            Code = self.totalLcInvVertCut
+            )
+        MyStdLcInvVert = DataOnDemand(Location = 'Phys/StdLooseLambdac2PKPi/Particles')
+        SelLcForLbInvVert = Selection("SelLcForLbInvVert"+self._name,
+                                Algorithm=LcForLbInvVert, RequiredSelections = [MyStdLcInvVert])
+        
+        self.LcSelInvVert=SelLcForLbInvVert
+
+    def __FilterDInvVert__(self):
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+         
+        DstarForB0dInvVert = FilterDesktop(
+            Code = self.totalDInvVertCut
+            )
+        MyStdDstarInvVert = DataOnDemand(Location = 'Phys/StdLooseDstarWithD02KPi/Particles')
+        SelDstarForB0dInvVert = Selection("SelDstarForB0dInvVert"+self._name,
+                                Algorithm=DstarForB0dInvVert, RequiredSelections = [MyStdDstarInvVert])
+        
+        self.DstarSelInvVert=SelDstarForB0dInvVert  
+        
+    def __FilterJpsi2MuMu__(self):
+        
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseJpsi2MuMu
+            
+        JpsiForBc = FilterDesktop(
+            Code = self.totalJpsiCut
+            )
+        MyStdLooseJpsi2MuMu = DataOnDemand(Location = 'Phys/StdLooseJpsi2MuMu/Particles')
+        SelJpsiForBc = Selection("SelJpsiFor"+self._name,
+                                 Algorithm=JpsiForBc, RequiredSelections = [MyStdLooseJpsi2MuMu])
+        
+        self.JpsiSel=SelJpsiForBc
+        
+        
+    def __MakeDdoubleStar02DstarPi__(self):
+        """
+        [D_1(2420)0 -> D*(2010)+ pi-]cc, [D*_2(2460)0 -> D*(2010)+ pi-]cc
+        useful for understanding background in B0 -> D* tau
+        """
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from StandardParticles import StdLoosePions
+        
+        
+        CombDdoubleStar02DstarPi = CombineParticles(        
+            DecayDescriptors = ["[D_1(2420)0 -> D*(2010)+ pi-]cc"],
+            DaughtersCuts = { "pi-" : self.DdoubleStar0_PionCut },
+            MotherCut      = self.DdoubleStar0Cut,
+            )
+        
+        SelDdoubleStar02DstarPi = Selection("SelDdoubleStar02DstarPi", Algorithm = CombDdoubleStar02DstarPi,
+                                           RequiredSelections = [self.DstarSel,StdLoosePions])
+        
+        self.DdoubleStar02DstarPiSel = SelDdoubleStar02DstarPi
+        
+ 
+    def __MakeB0d2DstarTauNu__(self):
+        """
+        B0d selection:
+        [B0 -> D*- tau+]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DstarTauNu = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D*(2010)- tau+]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DstarTauNu = Selection("SelB0d2DstarTauNu", Algorithm=CombB0d2DstarTauNu,
+                                    RequiredSelections = [self.DstarSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarTauNuSel=SelB0d2DstarTauNu
+
+    def __MakeB0d2DstarWSSlowTauNu__(self):
+        """
+        B0d selection:
+        [B0 -> D*- tau+ with wrong sign pion in the D*]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DstarWSSTauNu = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D*(2010)- tau+]cc"],
+            #DaughtersCuts = { "tau+" : "(BPVVDR >.2) & (BPVVDR <6.)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DstarWSSlowTauNu = Selection("SelB0d2DstarWSSlowTauNu", Algorithm=CombB0d2DstarWSSTauNu,
+                                    RequiredSelections = [self.DstarWSSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarWSSlowTauNuSel=SelB0d2DstarWSSlowTauNu
+        
+    def __MakeB0d2DstarTauNuWS__(self):
+        """
+        B0d selection:
+        [B0 -> D*+ tau+]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DstarTauNuWS = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D*(2010)- tau-]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DstarTauNuWS = Selection("SelB0d2DstarTauNuWS", Algorithm=CombB0d2DstarTauNuWS,
+                                    RequiredSelections = [self.DstarSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarTauNuSelWS = SelB0d2DstarTauNuWS
+
+
+
+    def __MakeB0d2DstarTauNuNonPhysTau__(self):
+        """
+        B0d selection:
+        [B0 -> D*- tau+++]cc, [B0 -> D*- tau---]cc
+        non-physical tau+ -> pi+ pi+ pi+ which serves as an independent background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTauNonPhys
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombB0d2DstarTauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D*(2010)- tau+]cc"],#, "[B0 -> D*(2010)+ tau+]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DstarTauNuNonPhysTau = Selection("SelB0d2DstarTauNuNonPhysTau", Algorithm=CombB0d2DstarTauNuNonPhysTau,
+                                    RequiredSelections = [self.DstarSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarTauNuSelNonPhysTau = SelB0d2DstarTauNuNonPhysTau
+
+    def __MakeB0d2DstarSlowWSTauNu__(self):
+        """
+        B0d selection:
+        [B0 -> D*- tau+ with wrong sign pion in the D*]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DstarWSSTauNu = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D*(2010)+ tau+]cc"],
+            #DaughtersCuts = { "tau+" : "(BPVVDR >.2) & (BPVVDR <6.)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DstarSlowWSTauNu = Selection("SelB0d2DstarSlowWSTauNu", Algorithm=CombB0d2DstarWSSTauNu,
+                                    RequiredSelections = [self.DstarWSSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarSlowWSTauNuSel = SelB0d2DstarSlowWSTauNu
+        
+
+    def __MakeB0d2DstarD02K3piTauNu__(self):
+        """
+        B0d selection:
+        [B0 -> D*-(->D0(->K3pi) pi-) tau+]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DstarD02K3piTauNu = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D*(2010)- tau+]cc"],
+            #DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & "+self.tau_forD02K3pi },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DstarD02K3piTauNu = Selection("SelB0d2DstarD02K3piTauNu", Algorithm = CombB0d2DstarD02K3piTauNu,
+                                    RequiredSelections = [self.DstarD02K3piSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarD02K3piTauNuSel = SelB0d2DstarD02K3piTauNu
+
+    def __MakeB0d2DstarD02K3piWSSlowTauNu__(self):
+        """
+        B0d selection:
+        [B0 -> D*-(->D0(->K3pi) pi-) tau+ with wrong sign pion in the D*]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DstarD02K3piWSSTauNu = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D*(2010)- tau+]cc"],
+            #DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & "+self.tau_forD02K3pi },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DstarD02K3piWSSlowTauNu = Selection("SelB0d2DstarD02K3piWSSlowTauNu", Algorithm = CombB0d2DstarD02K3piWSSTauNu,
+                                    RequiredSelections = [self.DstarD02K3piWSSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarD02K3piWSSlowTauNuSel = SelB0d2DstarD02K3piWSSlowTauNu
+
+    def __MakeB0d2DstarD02K3piSlowWSTauNu__(self):
+        """
+        B0d selection:
+        [B0 -> D*-(->D0(->K3pi) pi-) tau+ with wrong sign pion in the D*]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DstarD02K3piWSSTauNu = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D*(2010)+ tau+]cc"],
+            #DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & "+self.tau_forD02K3pi },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DstarD02K3piSlowWSTauNu = Selection("SelB0d2DstarD02K3piSlowWSTauNu", Algorithm = CombB0d2DstarD02K3piWSSTauNu,
+                                    RequiredSelections = [self.DstarD02K3piWSSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarD02K3piSlowWSTauNuSel = SelB0d2DstarD02K3piSlowWSTauNu
+
+
+    def __MakeB0d2DstarD02K3piTauNuWS__(self):
+        """
+        B0d selection:
+        [B0 -> D*+(->D0(->K3pi) pi-) tau+]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DstarD02K3piTauNuWS = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D*(2010)- tau-]cc"],
+            #DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & "+self.tau_forD02K3pi },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DstarD02K3piTauNuWS = Selection("SelB0d2DstarD02K3piTauNuWS", Algorithm = CombB0d2DstarD02K3piTauNuWS,
+                                    RequiredSelections = [self.DstarD02K3piSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarD02K3piTauNuSelWS = SelB0d2DstarD02K3piTauNuWS
+
+    def __MakeB0d2DstarD02K3piTauNuNonPhysTau__(self):
+        """
+        B0d selection:
+        [B0 -> D*-(->D0(->K3pi)pi-) tau+++]cc, [B0 -> D*- tau---]cc
+        non-physical tau+ -> pi+ pi+ pi+ which serves as an independent background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTauNonPhys
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombB0d2DstarD02K3piTauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D*(2010)- tau+]cc"],#, "[B0 -> D*(2010)+ tau+]cc"],
+            #DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & "+self.tau_forD02K3pi },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DstarD02K3piTauNuNonPhysTau = Selection("SelB0d2DstarD02K3piTauNuNonPhysTau", Algorithm = CombB0d2DstarD02K3piTauNuNonPhysTau,
+                                    RequiredSelections = [self.DstarD02K3piSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarD02K3piTauNuSelNonPhysTau = SelB0d2DstarD02K3piTauNuNonPhysTau
+
+
+
+
+    def __MakeBu2D02K3piTauNu__(self):
+        """
+        Bu selection:
+        [B- -> D0(->K3pi) tau-]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBu2D02K3piTauNu = CombineParticles(        
+            DecayDescriptors = ["[B- -> D0 tau-]cc"],
+            #DaughtersCuts = { "tau-" : self.tau_DaughtersCuts },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & "+self.tau_forD02K3pi },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2D02K3piTauNu = Selection("SelBu2D02K3piTauNu", Algorithm = CombBu2D02K3piTauNu,
+                                    RequiredSelections = [self.D02K3piSel,MyStdLooseDetachedTau])
+        
+        self.Bu2D02K3piTauNuSel = SelBu2D02K3piTauNu
+
+    def __MakeBu2D02K3piTauNuWS__(self):
+        """
+        Bu selection:
+        [B- -> D0(->K3pi) tau-]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBu2D02K3piTauNuWS = CombineParticles(        
+            #DecayDescriptors = ["[B- -> D0 tau+]cc"],
+            DecayDescriptors = ["[B+ -> D0 tau+]cc"],
+            #DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & "+self.tau_forD02K3pi },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2D02K3piTauNuWS = Selection("SelBu2D02K3piTauNuWS", Algorithm = CombBu2D02K3piTauNuWS,
+                                    RequiredSelections = [self.D02K3piSel,MyStdLooseDetachedTau])
+        
+        self.Bu2D02K3piTauNuSelWS = SelBu2D02K3piTauNuWS
+
+    def __MakeBu2D02K3piTauNuNonPhysTau__(self):
+        """
+        Bu selection:
+        [B- -> D0(->K3pi) tau+++]cc
+        non-physical tau+ -> pi+ pi+ pi+ which serves as an independent background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTauNonPhys
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombBu2D02K3piTauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B- -> D0 tau-]cc"],#, "[B- -> D~0 tau-]cc" ],
+            #DaughtersCuts = { "tau-" : self.tau_DaughtersCuts },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & "+self.tau_forD02K3pi },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2D02K3piTauNuNonPhysTau = Selection("SelBu2D02K3piTauNuNonPhysTau", Algorithm = CombBu2D02K3piTauNuNonPhysTau,
+                                    RequiredSelections = [self.D02K3piSel,MyStdLooseDetachedTau])
+        
+        self.Bu2D02K3piTauNuSelNonPhysTau = SelBu2D02K3piTauNuNonPhysTau
+
+    ##############################
+
+    def __MakeB0d2DTauNu__(self):
+        """
+        B0d selection:
+        [B0 -> D- tau+]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DTauNu = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D- tau+]cc"],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.98)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DTauNu = Selection("SelB0d2DTauNu", Algorithm=CombB0d2DTauNu,
+                                    RequiredSelections = [self.DplusSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DTauNuSel=SelB0d2DTauNu
+            
+    def __MakeB0d2DTauNuWS__(self):
+        """
+        B0d selection:
+        [B0 -> D- tau-]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DTauNuWS = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D- tau-]cc" ],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.98)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DTauNuWS = Selection("SelB0d2DTauNuWS", Algorithm=CombB0d2DTauNuWS,
+                                    RequiredSelections = [self.DplusSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DTauNuSelWS=SelB0d2DTauNuWS
+
+    def __MakeB0d2DTauNuNonPhysTau__(self):
+        """
+        B0d selection:
+        [B0 -> D- tau+++]cc 
+        use of non-physical tau+++ is useful as an independent background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTauNonPhys
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombB0d2DTauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D- tau+]cc"],#, "[B0 -> D+ tau+]cc"],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.98)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DTauNuNonPhysTau = Selection("SelB0d2DTauNuNonPhysTau", Algorithm=CombB0d2DTauNuNonPhysTau,
+                                    RequiredSelections = [self.DplusSel,MyStdLooseDetachedTau])
+        
+        self.B0d2DTauNuSelNonPhysTau=SelB0d2DTauNuNonPhysTau
+
+    def __MakeBu2D0TauNu__(self):
+        """
+        Bu selection:
+        [B- -> D0 tau-]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBu2D0TauNu = CombineParticles(        
+            DecayDescriptors = ["[B- -> D0 tau-]cc"],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.98)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2D0TauNu = Selection("SelBu2D0TauNu", Algorithm=CombBu2D0TauNu,
+                                    RequiredSelections = [self.D0Sel,MyStdLooseDetachedTau])
+        
+        self.Bu2D0TauNuSel=SelBu2D0TauNu
+
+
+
+    def __MakeBu2D0TauNuWS__(self):
+        """
+        Bu selection:
+        [B- -> D0 tau+]cc,
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBu2D0TauNuWS = CombineParticles(        
+            #DecayDescriptors = ["[B- -> D0 tau+]cc"],
+            DecayDescriptors = ["[B+ -> D0 tau+]cc"],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.98)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2D0TauNuWS = Selection("SelBu2D0TauNuWS", Algorithm=CombBu2D0TauNuWS,
+                                    RequiredSelections = [self.D0Sel,MyStdLooseDetachedTau])
+        
+        self.Bu2D0TauNuSelWS=SelBu2D0TauNuWS
+
+
+    def __MakeBu2D0TauNuNonPhysTau__(self):
+        """
+        Bu selection:
+        [B- -> D0 tau---]cc, [B- -> D0 tau---]cc 
+        use of non-physical tau+++ is useful as an independent background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTauNonPhys
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombBu2D0TauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B- -> D0 tau-]cc"],#, "[B- -> D~0 tau-]cc" ],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.98)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2D0TauNuNonPhysTau = Selection("SelBu2D0TauNuNonPhysTau", Algorithm=CombBu2D0TauNuNonPhysTau,
+                                    RequiredSelections = [self.D0Sel,MyStdLooseDetachedTau])
+        
+        self.Bu2D0TauNuSelNonPhysTau=SelBu2D0TauNuNonPhysTau
+
+        
+    def __MakeBc2JpsiTauNu__(self):
+        """
+        Bc selection:
+        [B_c+ -> J/psi(1S) tau+]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBc2JpsiTauNu = CombineParticles(        
+            DecayDescriptors = ["B_c+ -> J/psi(1S) tau+", "B_c- -> J/psi(1S) tau-" ],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BcCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBc2JpsiTauNu = Selection("SelBc2JpsiTauNu", Algorithm=CombBc2JpsiTauNu,
+                                    RequiredSelections = [self.JpsiSel,MyStdLooseDetachedTau])
+        
+        self.Bc2JpsiTauNuSel=SelBc2JpsiTauNu
+
+
+    def __MakeBc2JpsiTauNuNonPhysTau__(self):
+        """
+        Bc selection:
+        [B_c+ -> J/psi(1S) tau+++]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTauNonPhys
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombBc2JpsiTauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["B_c+ -> J/psi(1S) tau+", "B_c- -> J/psi(1S) tau-" ],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BcCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBc2JpsiTauNuNonPhysTau = Selection("SelBc2JpsiTauNuNonPhysTau", Algorithm=CombBc2JpsiTauNuNonPhysTau,
+                                    RequiredSelections = [self.JpsiSel,MyStdLooseDetachedTau])
+        
+        self.Bc2JpsiTauNuSelNonPhysTau=SelBc2JpsiTauNuNonPhysTau
+
+
+    def __MakeB0s2DsTauNu__(self):
+        """
+        B0s selection:
+        [B_s0 -> D_s- tau+]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBs2DsTauNu = CombineParticles(        
+            DecayDescriptors = ["[B_s0 -> D_s- tau+]cc"],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.98)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BsCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBs2DsTauNu = Selection("SelBs2DsTauNu", Algorithm=CombBs2DsTauNu,
+                                    RequiredSelections = [self.DsSel,MyStdLooseDetachedTau])
+        
+        self.B0s2DsTauNuSel=SelBs2DsTauNu
+
+
+            
+    def __MakeB0s2DsTauNuWS__(self):
+        """
+        B0s selection:
+        [B_s0 -> D_s+ tau+]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBs2DsTauNuWS = CombineParticles(        
+            DecayDescriptors = ["[B_s0 -> D_s+ tau+]cc" ],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.98)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BsCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBs2DsTauNuWS = Selection("SelBs2DsTauNuWS", Algorithm=CombBs2DsTauNuWS,
+                                    RequiredSelections = [self.DsSel,MyStdLooseDetachedTau])
+        
+        self.B0s2DsTauNuSelWS=SelBs2DsTauNuWS
+
+
+    def __MakeB0s2DsTauNuNonPhysTau__(self):
+        """
+        B0s selection:
+        [B_s0 -> D_s+ tau+++]cc,  [B_s0 -> D_s+ tau---]cc
+        use of non-physical tau+++ is useful as a background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTauNonPhys
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombBs2DsTauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B_s0 -> D_s+ tau-]cc"],#, "[B_s0 -> D_s+ tau-]cc" ],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.98)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BsCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBs2DsTauNuNonPhysTau = Selection("SelBs2DsTauNuNonPhysTau", Algorithm=CombBs2DsTauNuNonPhysTau,
+                                    RequiredSelections = [self.DsSel,MyStdLooseDetachedTau])
+        
+        self.B0s2DsTauNuSelNonPhysTau=SelBs2DsTauNuNonPhysTau
+
+    def __MakeLb2LcTauNu__(self):
+        """
+        Lb selection:
+        [Lambda_b0 -> Lambda_c+ tau-]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombLb2LcTauNu = CombineParticles(        
+            DecayDescriptors = ["[Lambda_b0 -> Lambda_c+ tau-]cc"],
+            #DaughtersCuts = { "tau-" : "(BPVDIRA > 0.995)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & (BPVVDR <6.*mm)"  },
+            CombinationCut = self.LbCombCut,
+            MotherCut      = self.BCut,
+           
+            )
+    
+        SelLb2LcTauNu = Selection("SelLb2LcTauNu", Algorithm=CombLb2LcTauNu,
+                                    RequiredSelections = [self.LcSel,MyStdLooseDetachedTau])
+        
+        self.Lb2LcTauNuSel=SelLb2LcTauNu
+
+    def __MakeLb2LcTauNuWS__(self):
+        """
+        Lb selection:
+        [Lambda_b0 -> Lambda_c+ tau+]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombLb2LcTauNuWS = CombineParticles(        
+            DecayDescriptors = ["[Lambda_b0 -> Lambda_c+ tau+]cc" ],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.995)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & (BPVVDR <6.*mm)"  },
+            CombinationCut = self.LbCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelLb2LcTauNuWS = Selection("SelLb2LcTauNuWS", Algorithm=CombLb2LcTauNuWS,
+                                    RequiredSelections = [self.LcSel,MyStdLooseDetachedTau])
+        
+        self.Lb2LcTauNuSelWS=SelLb2LcTauNuWS
+
+    def __MakeLb2pTauNu__(self):
+        """
+        Lb selection:
+        [Lambda_b0 -> p+ tau-]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombLb2pTauNu = CombineParticles(        
+            DecayDescriptors = ["[Lambda_b0 -> p+ tau-]cc"],
+            #DaughtersCuts = { "tau-" : "(BPVDIRA > 0.995)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            MotherCut      = self.LbCombpInvVertCut,
+            )
+    
+        SelLb2pTauNu = Selection("SelLb2pTauNu", Algorithm=CombLb2pTauNu,
+                                    RequiredSelections = [self.pSel,MyStdLooseDetachedTau])
+        
+        self.Lb2pTauNuSel=SelLb2pTauNu
+            
+    def __MakeLb2pTauNuWS__(self):
+        """
+        Lb selection:
+        [Lambda_b0 -> p+ tau+]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombLb2pTauNuWS = CombineParticles(        
+            DecayDescriptors = ["[Lambda_b0 -> p+ tau+]cc" ],
+            #DaughtersCuts = { "tau+" : "(BPVDIRA > 0.995)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            MotherCut      = self.LbCombpInvVertCut,
+            )
+        
+        SelLb2pTauNuWS = Selection("SelLb2pTauNuWS", Algorithm=CombLb2pTauNuWS,
+                                    RequiredSelections = [self.pSel,MyStdLooseDetachedTau])
+        
+        self.Lb2pTauNuSelWS=SelLb2pTauNuWS
+
+    def __MakeLb2LcTauNuNonPhysTau__(self):
+        """
+        Lb selection:
+        [Lambda_b0 -> Lambda_c+ tau+++]cc,  [Lambda_b0 -> Lambda_c+ tau---]cc
+        use of non-physical tau+++ is useful as a background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTauNonPhys
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombLb2LcTauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[Lambda_b0 -> Lambda_c+ tau-]cc"],#, "[Lb -> Lc+ tau-]cc" ],
+            #DaughtersCuts = { "tau-" : "(BPVDIRA > 0.995)" },
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & (BPVVDR <6.*mm)"  },
+            CombinationCut = self.LbCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelLb2LcTauNuNonPhysTau = Selection("SelLb2LcTauNuNonPhysTau", Algorithm=CombLb2LcTauNuNonPhysTau,
+                                    RequiredSelections = [self.LcSel,MyStdLooseDetachedTau])
+        
+        self.Lb2LcTauNuSelNonPhysTau=SelLb2LcTauNuNonPhysTau
+
+    def __MakeLb2LcTauNuInvVert__(self):
+        """
+        Lb selection:
+        [Lambda_b0 -> Lambda_c+ tau-]cc, 
+        use of inverted vertex cut only first, should boost the overall efficiency
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombLb2LcTauNuInvVert = CombineParticles(        
+            DecayDescriptors = ["[Lambda_b0 -> Lambda_c+ tau-]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts+" & (BPVVDR <6.*mm)"  },
+            CombinationCut = self.LbCombInvVertCut,
+            MotherCut      = self.BInvVertCut,
+            )
+        
+        SelLb2LcTauNuInvVert = Selection("SelLb2LcTauNuInvVert", Algorithm=CombLb2LcTauNuInvVert,
+                                    RequiredSelections = [self.LcSelInvVert,MyStdLooseDetachedTau])
+        
+        self.Lb2LcTauNuSelInvVert=SelLb2LcTauNuInvVert
+
+    def __MakeB0d2DstarTauNuInvVert__(self):
+        """
+        Dstar  selection:
+        [B0 -> Dstar*- tau+]cc, 
+        use of inverted vertex cut only first, should boost the overall efficiency
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DstarTauNuInvVert = CombineParticles(                    
+            DecayDescriptors = ["[B0 -> D*(2010)- tau+]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0dCombInvVertCut,
+            MotherCut      = self.BInvVertCut,
+            )
+        
+        SelB0d2DstarTauNuInvVert = Selection("SelB0d2DstarTauNuInvVert", Algorithm=CombB0d2DstarTauNuInvVert,
+                                    RequiredSelections = [self.DstarSelInvVert,MyStdLooseDetachedTau])
+        
+        self.B0d2DstarTauNuSelInvVert=SelB0d2DstarTauNuInvVert
+        
+    def __MakeBu2DdoubleStar0TauNu__(self):
+        """
+        [B- -> (D_1(2420)0 -> D*+ pi-) tau-]cc
+        Also useful for studying background in B0 -> D* tau nu when pi- from D** decay is missed
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBu2DdoubleStar0TauNu = CombineParticles(        
+            DecayDescriptors = ["[B- -> D_1(2420)0 tau-]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2DdoubleStar0TauNu = Selection("SelBu2DdoubleStar0TauNu", Algorithm=CombBu2DdoubleStar0TauNu,
+                                    RequiredSelections = [self.DdoubleStar02DstarPiSel,MyStdLooseDetachedTau])
+        
+        self.Bu2DdoubleStar0TauNuSel=SelBu2DdoubleStar0TauNu
+
+   
+
+
+    def __MakeBu2DdoubleStar0TauNuWS__(self):
+        """
+        [B- -> (D_1(2420)0 -> D*+ pi-) tau+]cc
+        use of wrong charge combination is useful for background subtraction
+        Also useful for studying WS background in B0 -> D* tau nu when pi+ from D** decay is missed
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBu2DdoubleStar0TauNuWS = CombineParticles(        
+            DecayDescriptors = ["[B- -> D_1(2420)0 tau+]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2DdoubleStar0TauNuWS = Selection("SelBu2DdoubleStar0TauNuWS", Algorithm=CombBu2DdoubleStar0TauNuWS,
+                                    RequiredSelections = [self.DdoubleStar02DstarPiSel,MyStdLooseDetachedTau])
+        
+        self.Bu2DdoubleStar0TauNuSelWS=SelBu2DdoubleStar0TauNuWS
+
+
+    def __MakeBu2DdoubleStar0TauNuNonPhysTau__(self):
+        """
+        [B- -> (D_1(2420)0 -> D*+ pi-) tau---]cc
+        use of non-physical tau--- is useful as an independent background source
+        Also  useful for studying background in B0 -> D* tau nu when pi+ from D** decay is missed
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTauNonPhys
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombBu2DdoubleStar0TauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B- -> D_1(2420)0 tau-]cc"],#, "[B~0 -> D_1(2420)~0 tau+]cc", "[B~0 -> D*_2(2460)~0 tau+]cc" ],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2DdoubleStar0TauNuNonPhysTau = Selection("SelBu2DdoubleStar0TauNuNonPhysTau", Algorithm=CombBu2DdoubleStar0TauNuNonPhysTau,
+                                    RequiredSelections = [self.DdoubleStar02DstarPiSel,MyStdLooseDetachedTau])
+        
+        self.Bu2DdoubleStar0TauNuSelNonPhysTau=SelBu2DdoubleStar0TauNuNonPhysTau
+
+    def __MakeDStar02Pi0D0__(self):
+        """
+        make D*0 -> D0 pi0
+        [D(2007)0 -> D0 pi0]cc
+        """
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from StandardParticles import StdLooseResolvedPi0
+        
+        
+        CombDStar02Pi0D0 = CombineParticles(        
+            DecayDescriptors = ["[D*(2007)0 -> D0 pi0]cc"],
+            DaughtersCuts = { "pi0" : self.Dstar02Pi0D0_PionCut },
+            MotherCut      = self.Dstar02Pi0D0Cut,
+            )
+        
+        SelDStar02Pi0D0 = Selection("SelDStar02Pi0D0", Algorithm=CombDStar02Pi0D0,
+                                           RequiredSelections = [self.D0Sel,StdLooseResolvedPi0])
+        
+        self.Dstar02Pi0D0Sel=SelDStar02Pi0D0
+
+    def __MakeBu2Dstar02Pi0D0TauNu__(self):
+        """
+        [B- -> D*0 tau-]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBu2Dstar02Pi0D0TauNu = CombineParticles(        
+            DecayDescriptors = ["[B- -> D*(2007)0 tau-]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2Dstar02Pi0D0TauNu = Selection("SelBu2Dstar02Pi0D0TauNu", Algorithm=CombBu2Dstar02Pi0D0TauNu,
+                                    RequiredSelections = [self.Dstar02Pi0D0Sel,MyStdLooseDetachedTau])
+        
+        self.Bu2Dstar02Pi0D0TauNuSel=SelBu2Dstar02Pi0D0TauNu
+
+
+    def __MakeBu2Dstar02Pi0D0TauNuWS__(self):
+        """
+        [B- -> D*0 tau+]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBu2Dstar02Pi0D0TauNuWS = CombineParticles(        
+            DecayDescriptors = ["[B- -> D*(2007)0 tau+]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2Dstar02Pi0D0TauNuWS = Selection("SelBu2Dstar02Pi0D0TauNuWS", Algorithm=CombBu2Dstar02Pi0D0TauNuWS,
+                                    RequiredSelections = [self.Dstar02Pi0D0Sel,MyStdLooseDetachedTau])
+        
+        self.Bu2Dstar02Pi0D0TauNuSelWS=SelBu2Dstar02Pi0D0TauNuWS
+
+
+    def __MakeBu2Dstar02Pi0D0TauNuNonPhysTau__(self):
+        """
+        [B- -> D*0 tau---]cc
+        use of non-physical tau+++ is useful as an independent background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombBu2Dstar02Pi0D0TauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B- -> D*(2007)0 tau-]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2Dstar02Pi0D0TauNuNonPhysTau = Selection("SelBu2Dstar02Pi0D0TauNuNonPhysTau", Algorithm=CombBu2Dstar02Pi0D0TauNuNonPhysTau,
+                                    RequiredSelections = [self.Dstar02Pi0D0Sel,MyStdLooseDetachedTau])
+        
+        self.Bu2Dstar02Pi0D0TauNuSelNonPhysTau=SelBu2Dstar02Pi0D0TauNuNonPhysTau
+        
+    def __MakeDStar02GammaD0__(self):
+        """
+        make D*0 -> D0 Gamma
+        [D(2007)0 -> D0 Gamma]cc
+        """
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from StandardParticles import StdLooseAllPhotons
+        
+        
+        CombDStar02GammaD0 = CombineParticles(        
+            DecayDescriptors = ["[D*(2007)0 -> D0 gamma]cc"],
+            DaughtersCuts = { "gamma" : self.Dstar02GammaD0_PionCut },
+            MotherCut      = self.Dstar02GammaD0Cut,
+            )
+        
+        SelDStar02GammaD0 = Selection("SelDStar02GammaD0", Algorithm=CombDStar02GammaD0,
+                                           RequiredSelections = [self.D0Sel,StdLooseAllPhotons])
+        
+        self.Dstar02GammaD0Sel=SelDStar02GammaD0
+        
+    def __MakeBu2Dstar02GammaD0TauNu__(self):
+        """
+        [B- -> D*0 tau-]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBu2Dstar02GammaD0TauNu = CombineParticles(        
+            DecayDescriptors = ["[B- -> D*(2007)0 tau-]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2Dstar02GammaD0TauNu = Selection("SelBu2Dstar02GammaD0TauNu", Algorithm=CombBu2Dstar02GammaD0TauNu,
+                                    RequiredSelections = [self.Dstar02GammaD0Sel,MyStdLooseDetachedTau])
+        
+        self.Bu2Dstar02GammaD0TauNuSel=SelBu2Dstar02GammaD0TauNu
+
+
+    def __MakeBu2Dstar02GammaD0TauNuWS__(self):
+        """
+        [B- -> D*0 tau+]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombBu2Dstar02GammaD0TauNuWS = CombineParticles(        
+            DecayDescriptors = ["[B- -> D*(2007)0 tau+]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2Dstar02GammaD0TauNuWS = Selection("SelBu2Dstar02GammaD0TauNuWS", Algorithm=CombBu2Dstar02GammaD0TauNuWS,
+                                    RequiredSelections = [self.Dstar02GammaD0Sel,MyStdLooseDetachedTau])
+        
+        self.Bu2Dstar02GammaD0TauNuSelWS=SelBu2Dstar02GammaD0TauNuWS
+
+
+    def __MakeBu2Dstar02GammaD0TauNuNonPhysTau__(self):
+        """
+        [B- -> D*0 tau---]cc
+        use of non-physical tau+++ is useful as an independent background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombBu2Dstar02GammaD0TauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B- -> D*(2007)0 tau-]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.BplusCombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelBu2Dstar02GammaD0TauNuNonPhysTau = Selection("SelBu2Dstar02GammaD0TauNuNonPhysTau", Algorithm=CombBu2Dstar02GammaD0TauNuNonPhysTau,
+                                    RequiredSelections = [self.Dstar02GammaD0Sel,MyStdLooseDetachedTau])
+        
+        self.Bu2Dstar02GammaD0TauNuSelNonPhysTau=SelBu2Dstar02GammaD0TauNuNonPhysTau
+        
+    def __MakeDdoubleStar2PiDstar02Pi0D0__(self):
+        """
+        [D_1(2420)- -> D*(2007)0 pi-]cc
+        """
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from StandardParticles import StdLoosePions
+        
+        
+        CombDdoubleStar2PiDstar02Pi0D0 = CombineParticles(        
+            DecayDescriptors = ["[D_1(2420)- -> D*(2007)0 pi-]cc"],
+            DaughtersCuts = { "pi-" : self.DdoubleStar2PiDstar02Pi0D0_PionCut },
+            MotherCut      = self.DdoubleStar2PiDstar02Pi0D0Cut,
+            )
+        
+        SelDdoubleStar2PiDstar02Pi0D0 = Selection("SelDdoubleStar2PiDstar02Pi0D0", Algorithm=CombDdoubleStar2PiDstar02Pi0D0,
+                                           RequiredSelections = [self.Dstar02Pi0D0Sel,StdLoosePions])
+        
+        self.DdoubleStar2PiDstar02Pi0D0Sel=SelDdoubleStar2PiDstar02Pi0D0
+        
+    def __MakeB0d2DdoubleStar2PiDstar02Pi0D0TauNu__(self):
+        """
+        [B0 -> (D_1(2420)- -> D*0 pi-) tau+]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DdoubleStar2PiDstar02Pi0D0TauNu = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D_1(2420)- tau+]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DdoubleStar2PiDstar02Pi0D0TauNu = Selection("SelB0d2DdoubleStar2PiDstar02Pi0D0TauNu", Algorithm=CombB0d2DdoubleStar2PiDstar02Pi0D0TauNu,
+                                    RequiredSelections = [self.DdoubleStar2PiDstar02Pi0D0Sel,MyStdLooseDetachedTau])
+        
+        self.B0d2DdoubleStar2PiDstar02Pi0D0TauNuSel=SelB0d2DdoubleStar2PiDstar02Pi0D0TauNu
+        
+    def __MakeB0d2DdoubleStar2PiDstar02Pi0D0TauNuWS__(self):
+        """
+        [B0 -> (D_1(2420)- -> D*0 pi-) tau-]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DdoubleStar2PiDstar02Pi0D0TauNuWS = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D_1(2420)- tau-]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DdoubleStar2PiDstar02Pi0D0TauNuWS = Selection("SelB0d2DdoubleStar2PiDstar02Pi0D0TauNuWS", Algorithm=CombB0d2DdoubleStar2PiDstar02Pi0D0TauNuWS,
+                                    RequiredSelections = [self.DdoubleStar2PiDstar02Pi0D0Sel,MyStdLooseDetachedTau])
+        
+        self.B0d2DdoubleStar2PiDstar02Pi0D0TauNuSelWS=SelB0d2DdoubleStar2PiDstar02Pi0D0TauNuWS
+        
+    def __MakeB0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTau__(self):
+        """
+        [B0 -> (D_1(2420)- -> D*0 pi-) tau+++]cc
+        use of non-physical tau+++ is useful as an independent background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombB0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D_1(2420)- tau+]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTau = Selection("SelB0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTau", Algorithm=CombB0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTau,
+                                    RequiredSelections = [self.DdoubleStar2PiDstar02Pi0D0Sel,MyStdLooseDetachedTau])
+        
+        self.B0d2DdoubleStar2PiDstar02Pi0D0TauNuSelNonPhysTau=SelB0d2DdoubleStar2PiDstar02Pi0D0TauNuNonPhysTau
+        
+    def __MakeDdoubleStar2PiDstar02GammaD0__(self):
+        """
+        [D_1(2420)- -> D*(2007)0 pi-]cc
+        """
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from StandardParticles import StdLoosePions
+        
+        
+        CombDdoubleStar2PiDstar02GammaD0 = CombineParticles(        
+            DecayDescriptors = ["[D_1(2420)- -> D*(2007)0 pi-]cc"],
+            DaughtersCuts = { "pi-" : self.DdoubleStar2PiDstar02GammaD0_PionCut },
+            MotherCut      = self.DdoubleStar2PiDstar02GammaD0Cut,
+            )
+        
+        SelDdoubleStar2PiDstar02GammaD0 = Selection("SelDdoubleStar2PiDstar02GammaD0", Algorithm=CombDdoubleStar2PiDstar02GammaD0,
+                                           RequiredSelections = [self.Dstar02GammaD0Sel,StdLoosePions])
+        
+        self.DdoubleStar2PiDstar02GammaD0Sel=SelDdoubleStar2PiDstar02GammaD0
+        
+    def __MakeB0d2DdoubleStar2PiDstar02GammaD0TauNu__(self):
+        """
+        [B0 -> (D_1(2420)- -> D*0 pi-) tau+]cc
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DdoubleStar2PiDstar02GammaD0TauNu = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D_1(2420)- tau+]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DdoubleStar2PiDstar02GammaD0TauNu = Selection("SelB0d2DdoubleStar2PiDstar02GammaD0TauNu", Algorithm=CombB0d2DdoubleStar2PiDstar02GammaD0TauNu,
+                                    RequiredSelections = [self.DdoubleStar2PiDstar02GammaD0Sel,MyStdLooseDetachedTau])
+        
+        self.B0d2DdoubleStar2PiDstar02GammaD0TauNuSel=SelB0d2DdoubleStar2PiDstar02GammaD0TauNu
+        
+    def __MakeB0d2DdoubleStar2PiDstar02GammaD0TauNuWS__(self):
+        """
+        [B0 -> (D_1(2420)- -> D*0 pi-) tau-]cc
+        use of wrong charge combination is useful for background subtraction
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        #MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3pi/Particles')
+        #MyStdLooseDetachedTau = DataOnDemand(Location = self.tau_path)
+        MyStdLooseDetachedTau = self.tau23piSel
+        
+        CombB0d2DdoubleStar2PiDstar02GammaD0TauNuWS = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D_1(2420)- tau-]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DdoubleStar2PiDstar02GammaD0TauNuWS = Selection("SelB0d2DdoubleStar2PiDstar02GammaD0TauNuWS", Algorithm=CombB0d2DdoubleStar2PiDstar02GammaD0TauNuWS,
+                                    RequiredSelections = [self.DdoubleStar2PiDstar02GammaD0Sel,MyStdLooseDetachedTau])
+        
+        self.B0d2DdoubleStar2PiDstar02GammaD0TauNuSelWS=SelB0d2DdoubleStar2PiDstar02GammaD0TauNuWS
+        
+    def __MakeB0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTau__(self):
+        """
+        [B0 -> (D_1(2420)- -> D*0 pi-) tau+++]cc
+        use of non-physical tau+++ is useful as an independent background source
+        """
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        from CommonParticles import StdLooseDetachedTau
+
+        MyStdLooseDetachedTau = DataOnDemand(Location = 'Phys/StdLooseDetachedTau3piNonPhys/Particles')
+        
+        CombB0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTau = CombineParticles(        
+            DecayDescriptors = ["[B0 -> D_1(2420)- tau+]cc"],
+            DaughtersCuts = { "tau+" : self.tau_DaughtersCuts },
+            CombinationCut = self.B0CombCut,
+            MotherCut      = self.BCut,
+            )
+        
+        SelB0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTau = Selection("SelB0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTau", Algorithm=CombB0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTau,
+                                    RequiredSelections = [self.DdoubleStar2PiDstar02GammaD0Sel,MyStdLooseDetachedTau])
+        
+        self.B0d2DdoubleStar2PiDstar02GammaD0TauNuSelNonPhysTau=SelB0d2DdoubleStar2PiDstar02GammaD0TauNuNonPhysTau
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XuENu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XuENu.py
new file mode 100644
index 000000000..5f84c6712
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XuENu.py
@@ -0,0 +1,2211 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = ['Phillip Urquijo, Alessandra Borgia', 'Michel De Cian']
+__date__ = '11/01/2019'
+__version__ = '$Revision: 1.6 $'
+
+'''
+B->Xu e nu exclusive reconstruction in Xu=pi/rho/omega/phi/K/K*+ channels
+'''
+# =============================================================================
+##
+#  B->Xu mu nu exclusive reconstruction in Xu=pi/rho/omega/phi/K/K*+ channels
+#
+#  Essentially a copy of the B2XuMuNu module with electrons instead of muons
+#
+#  Stripping lines for charmless semileptonic B+/B0/Bs decays
+#  to final states with hadron+electron, where the hadron is
+#  either a charged track or a resonance
+#  The charmless hadronic signal modes are:
+#
+#  B0 -> pi+ e- nu
+#  B+ -> rho e+ nu
+#  B+ -> omega e+ nu
+#  Bs0 -> K+  e- nu, 
+#  B+ -> phi e+ nu
+#  Bs0 -> K*+ e- nu, (with K*+->KS0 Pi)
+#
+############
+#  Also added are 2 new lines for Majorana Neutrino decays.
+#  B- -> KS0 e- nu, with KS0 ->pi+ e- (SS = Same Sign)
+#  B- -> KS0 e- nu, with KS0 ->pi- e+ (OS = Opposite Sign)
+############
+#
+#  Stripping XX, with requirements that the
+#  rate <0.05% and timing <1ms/evt.
+## 
+
+"""
+# =============================================================================
+##
+#  B->Xu mu nu exclusive reconstruction in Xu=pi/rho/omega/phi/K/K*+ channels
+#
+#  Essentially a copy of the B2XuMuNu module with electrons instead of muons
+#
+#  Stripping lines for charmless semileptonic B+/B0/Bs decays
+#  to final states with hadron+electron, where the hadron is
+#  either a charged track or a resonance
+#  The charmless hadronic signal modes are:
+#
+#  B0 -> pi+ e- nu
+#  B+ -> rho e+ nu
+#  B+ -> omega e+ nu
+#  Bs0 -> K+  e- nu, 
+#  B+ -> phi e+ nu
+#  Bs0 -> K*+ e- nu, (with K*+->KS0 Pi)
+#
+############
+#  Also added are 2 new lines for Majorana Neutrino decays.
+#  B- -> KS0 e- nu, with KS0 ->pi+ e- (SS = Same Sign)
+#  B- -> KS0 e- nu, with KS0 ->pi- e+ (OS = Opposite Sign)
+############
+#
+#  Stripping XX, with requirements that the
+#  rate <0.05% and timing <1ms/evt.
+## 
+Last modification $Date: 2018-January-10 $
+               by $Author: decianm $
+"""
+
+
+default_config = {
+  'NAME'        : 'B2XuENu',
+  'WGs'         : ['Semileptonic'],
+  'BUILDERTYPE' : 'B2XuENuBuilder',
+  'CONFIG'      :  {
+      "GEC_nLongTrk"        : 250.  , #adimensional
+      "TRGHOSTPROB"         : 0.5    ,#adimensional
+      #Electrons
+      "ElectronGHOSTPROB"       : 0.35  ,#adimensional
+      "ElectronTRCHI2"          : 4.    ,#adimensional
+      "ElectronP"               : 3000. ,#MeV
+      "ElectronPTight"          : 6000. ,#MeV
+      "ElectronPT"              : 1000. ,#MeV
+      "ElectronPTTight"         : 1500. ,#MeV
+      "ElectronPIDK"            : 0.    ,#adimensional
+      "ElectronPIDe"           : 3.    ,#adimensional
+      "ElectronPIDp"            : 0.    ,#adimensional
+      "ElectronMINIPCHI2"       : 25    ,#adminensional
+      #Xu
+      #K channel
+      "KaonTRCHI2"          : 4.     ,#adimensional
+      "KaonP"               : 3000.  ,#MeV
+      "KaonPTight"          : 10000. ,#MeV
+      "KaonPT"              : 400.   ,#MeV
+      "KaonPTTight"         : 1000.   ,#MeV
+      "KaonPIDK"            : 5.     ,#adimensional 
+      "KaonPIDmu"           : 5.     ,#adimensional
+      "KaonPIDp"            : 5.     ,#adimensional
+      "KaonPIDK_phi"        : 2.     ,#adimensional 
+      "KaonPIDmu_phi"       : -2.    ,#adimensional
+      "KaonPIDp_phi"        : -2.    ,#adimensional
+      "KaonMINIPCHI2"       : 36     ,#adminensional
+      #Pion channel
+      "PionTRCHI2"          : 4.     ,#adimensional
+      "PionP"               : 3000.  ,#MeV
+      "PionPTight"          : 10000. ,#MeV
+      "PionPT"              : 300.   ,#MeV
+      "PionPTTight"         : 800.   ,#MeV
+      "PionPIDK"            : -2.    ,#adimensional 
+      "PionMINIPCHI2"       : 36      ,#adminensional
+      
+      #phi channel
+      "PhiUpperMass"        : 2200. ,#MeV
+      "PhiVCHI2DOF"         : 6     ,#adimensional
+      "PhiPT"               : 600.  ,#MeV
+      "PhiMINIPCHI2"        : 9     ,#adimensional
+      "PhiDIRA"             : 0.9   ,#adimensional
+
+      #Rho channel
+      "RhoMassWindow"       : 1500. ,#MeV
+      "RhoMassWindowMin1SB" : 300.  ,#MeV
+      "RhoMassWindowMax1SB" : 620.  ,#MeV
+      "RhoMassWindowMin2SB" : 920.  ,#MeV
+      "RhoMassWindowMax2SB" : 1200. ,#MeV
+      "RhoVCHI2DOF"         : 4     ,#adimensional
+      "RhoPT"               : 1000.  ,#MeV
+      "RhoLeadingPionPT"    : 900.  ,#MeV
+      "RhoLeadingPionP"     : 5000.  ,#MeV
+      "RhoMINIPCHI2"        : 50    ,#adimensional
+      "RhoChPionPT"         : 400.  ,#MeV
+      "RhoChPionTRCHI2"     : 4.   ,#MeV
+      "RhoChPionPIDK"       : -2.  ,#adminensional
+                   #    "RhoFDCHI2"           : 100.  ,#adimensional
+                   #    "RhoFD"               : 6     ,#mm
+                   #    "RhoIPMin"            : 0.3   ,#mm    
+      "RhoDIRA"             : 0.98   ,#adimensional
+      "RhoChPionMINIPCHI2"  : 36.    ,#adimensional
+      # Omega cuts
+      "OmegaChPionPT"       : 300, #MeV
+      "OmegaPi0PT"          : 500, #MeV
+      "OmegaChPionMINIPCHI2": 25, #adimensional
+      "OmegaChPionPIDK"     : 0, #adimensional
+      "OmegaMassWindow"     : 150, #MeV
+      "OmegaVCHI2DOF"       : 6, #MeV
+      #Kshort Daughter Cuts
+      "KS0DaugP"            : 2000. ,#MeV
+      "KS0DaugPT"           : 100.  ,#MeV
+      "KS0DaugTrackChi2"    : 4.    ,#adimensional
+      "KS0DaugMIPChi2"      : 50.   ,#adimensional
+      #Kshort cuts
+      "KSMajoranaCutFDChi2" : 100.  ,#adimensional
+      "KS0VertexChi2"       : 4.    ,#adimensional
+      "KS0PT"               : 250.  ,#adimensional
+      "KsLLMaxDz"           : 650.  ,#mm
+      "KsLLCutFD"           : 20.   ,#mm
+      "KSLLMassLow"         : 456.  ,#MeV
+      "KSLLMassHigh"        : 536.  ,#MeV
+      "KSLLCutFDChi2"       : 0.    ,#adimensional
+      "KS0MIPChi2"          : 0.    ,#adimensional
+      'KS0Z'                : 0.    ,#mm
+      #Kstar Cuts
+      "KstarMassWindow"     : 1200  ,#MeV
+      "KstarPT"             : 800   ,#MeV
+      #Kstar Daughter cuts
+      "KstarChPionPT"       : 250.  ,#MeV
+      "KstarChPionP"        : 3000. ,#MeV
+      "KstarChPionTRCHI2"   : 4.    ,#adimensional
+      "KstarChPionMINIPCHI2": 25.   ,#adimensional
+      "KstarChPionPIDK"     : 2.    ,#adminensional
+      #B Mother Cuts
+      "BVCHI2DOF"           : 6.    ,#adminensional, for 3- or more-track vertices
+      "BVCHI2DOFTight"      : 4.    ,#adminensional, ideally for 2-track vertices
+      "BDIRA"               : 0.99  ,#adminensional
+      "BDIRAMed"            : 0.994 ,#adminensional
+      "BDIRATight"          : 0.999 ,#adminensional
+      "BFDCHI2HIGH"         : 100.  ,#adimensional
+      "BFDCHI2Tight"        : 120.  ,#adimensional
+      "BFDCHI2ForPhi"       : 50.   ,#adimensional
+      #B Mass Minima
+      "KEMassLowTight"     : 1500. ,#MeV
+      "PhiE_MCORR"         : 2500. ,#MeV
+      "RhoEMassLowTight"   : 2000. ,#MeV
+      "KS0EMassLowTight"   : 3000. ,#MeV
+      "KstarEMassLowTight" : 2500. ,#MeV
+      #B corrected mass limits
+      "BCorrMLow"           : 2500. ,#MeV
+      "BCorrMHigh"          : 7000. ,#MeV
+      #
+      "XEMassUpper"        : 5500. ,#MeV
+      "XEMassUpperHigh"    : 6500. ,#MeV
+      "Enu"                 : 1850. ,#MeV
+      "EnuK"                : 2000. ,#MeV      
+      # Prescales
+      'NoPrescales'         : False,
+      'PiENu_prescale'     : 0.2
+      },
+  'STREAMS'     : ['Semileptonic']    
+}
+
+from Gaudi.Configuration import *
+from StrippingUtils.Utils import LineBuilder
+
+import logging
+def makeTOSFilter(name,specs, useCalo):
+    from Configurables import TisTosParticleTagger
+    tosFilter = TisTosParticleTagger(name+'TOSFilter')
+    tosFilter.TisTosSpecs = specs
+    tosFilter.ProjectTracksToCalo = useCalo
+    tosFilter.CaloClustForCharged = useCalo
+    tosFilter.CaloClustForNeutral = False
+    tosFilter.TOSFrac = {4:0.0, 5:0.0}
+    #tosFilter.PassOnAll = True
+    return tosFilter
+
+def tosSelection(sel,specs,useCalo=False):
+    from PhysSelPython.Wrappers import Selection 
+    '''Filters Selection sel to be TOS.'''
+    tosFilter = makeTOSFilter(sel.name(),specs, useCalo)
+    return Selection(sel.name()+'TOS', Algorithm=tosFilter,
+                     RequiredSelections=[sel])
+
+default_name="B2XuENu"
+
+class B2XuENuBuilder(LineBuilder):
+    """
+    Definition of B->Xu e nu stripping module
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+        self.config=config
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        self._stdVeryLooseKsLL = DataOnDemand("Phys/StdVeryLooseKsLL/Particles")
+        self._stdLooseKsLD = DataOnDemand("Phys/StdLooseKsLD/Particles")
+        self._stdLooseKsDD = DataOnDemand("Phys/StdLooseKsDD/Particles")
+
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        ## Electrons
+        self._electronSel=None
+        self._electronFilter()
+        
+        self._electronSelNoPID=None
+        self._electronFilterNoPID()
+
+        self._electronSelTOS=None
+        self._electronFilterTOS()
+
+        self._electronSelTOSNoPID=None
+        self._electronFilterTOSNoPID()
+        
+        self._electronSelTight=None
+        self._electronFilterTight()
+
+        self._electronSelTightNoPID=None
+        self._electronFilterTightNoPID()
+
+        self._MajoranaLineElectronSel=None
+        self._MajoranaLineElectronFilter()
+
+        ## Pions
+        self._pionSel=None
+        self._pionFilter()
+
+        self._pionSelNoPID=None
+        self._pionFilterNoPID()
+        
+        self._pionSelTight=None
+        self._pionFilterTight()
+
+        self._pionSelTightNoPID=None
+        self._pionFilterTightNoPID()
+
+        ## Kaons
+        self._kaonSel=None
+        self._kaonFilter()
+        
+        self._kaonForPhiSel=None
+        self._kaonForPhiFilter()
+
+        self._kaonSelNoPID=None
+        self._kaonFilterNoPID()
+
+        self._kaonForPhiSelNoPID=None
+        self._kaonForPhiFilterNoPID()
+
+        ## Rhos
+        self._rho770Sel=None
+        self._Rho02PiPiFilter()
+
+        self._rho770WSSel=None
+        self._Rho02PiPiWSFilter()
+
+        self._rho770SBSel=None
+        self._Rho02PiPiSBFilter()
+
+        self._rho770SelNoPID=None
+        self._Rho02PiPiFilterNoPID()
+
+        ## Omega
+        self._omega782Sel=None
+        self._Omega2PiPiPi0Filter()
+        
+        self._omega782WSSel=None
+        self._Omega2PiPiPi0WSFilter()
+        
+        self._omega782SelNoPID=None
+        self._Omega2PiPiPi0FilterNoPID()
+
+        ## Phi
+        self._phi1020Sel=None
+        self._Phi2KKFilter()
+        
+        self._phi1020SelWS=None
+        self._Phi2KKFilterWS()
+
+        self._phi1020SelNoPID=None
+        self._Phi2KKFilterNoPID()
+        
+        ## KS for Majorana
+        self._KshMajoranaSSESel=None
+        self._KshMajoranaSSEFilter()
+
+        self._KshMajoranaOSESel=None
+        self._KshMajoranaOSEFilter()
+
+        ## KS for other stuff
+        self._KSSel=None
+        self._KsFilter()
+
+        self._KstarSel=None
+        self._Kstar2KPiFilter()
+
+        self._KstarSelNoPID=None
+        self._Kstar2KPiFilterNoPID()
+
+        ###########################################
+        ##
+        ## Register the stripping lines
+        ##
+        ###########################################
+        # pi lines
+        self.registerLine(self._Pi_line())
+        self.registerLine(self._Pi_NoETopo_line())
+        self.registerLine(self._Pi_NoPIDe_line())
+        self.registerLine(self._Pi_NoPIDhad_line())
+        self.registerLine(self._PiSS_line())
+        # K lines
+        self.registerLine(self._K_line())
+        self.registerLine(self._K_NoETopo_line())
+        self.registerLine(self._KSS_line())
+        self.registerLine(self._K_NoPIDe_line())
+        self.registerLine(self._KSS_NoPIDe_line())
+        self.registerLine(self._K_NoPIDK_line())
+        self.registerLine(self._KSS_NoPIDK_line())
+        self.registerLine(self._K_NoPIDKe_line())
+        self.registerLine(self._KSS_NoPIDKe_line())
+        # phi lines
+        self.registerLine(self._Phi_line())
+        self.registerLine(self._Phi_NoETopo_line())
+        self.registerLine(self._PhiWS_line())
+        self.registerLine(self._Phi_NoPIDe_line())
+        self.registerLine(self._Phi_NoPIDhad_line())
+        self.registerLine(self._PhiBadVtx_line())
+        # rho lines
+        self.registerLine(self._Rho_line())
+        self.registerLine(self._Rho_NoETopo_line())
+        self.registerLine(self._Rho_NoPIDe_line())
+        self.registerLine(self._Rho_NoPIDhad_line())
+        self.registerLine(self._RhoWS_line())
+        self.registerLine(self._RhoBadVtx_line())
+        #self.registerLine(self._RhoSB_line()) With a large rho mass window, this is not needed anymore
+        # omega lines
+        self.registerLine(self._Omega_line())
+        self.registerLine(self._Omega_NoETopo_line())
+        self.registerLine(self._Omega_NoPIDe_line())
+        self.registerLine(self._Omega_NoPIDhad_line())
+        self.registerLine(self._OmegaWS_line())
+        self.registerLine(self._OmegaBadVtx_line())
+        # majorana lines
+        self.registerLine(self._KshMajoranaSSE_line())
+        self.registerLine(self._KshMajoranaOSE_line())
+        # Kstar lines
+        self.registerLine(self._Kstar_line())
+        self.registerLine(self._Kstar_NoETopo_line())
+        self.registerLine(self._Kstar_NoPIDe_line())
+        self.registerLine(self._Kstar_NoPIDhad_line())
+        self.registerLine(self._KstarSS_line())
+        self.registerLine(self._KstarBadVtx_line())
+
+    ### Electrons
+    def _NominalElectronSelection( self ):
+        return "(TRCHI2DOF < %(ElectronTRCHI2)s ) &  (P> %(ElectronP)s *MeV) &  (PT> %(ElectronPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(ElectronGHOSTPROB)s)"\
+               "& (PIDe > %(ElectronPIDe)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(ElectronMINIPCHI2)s )"
+
+    def _NominalElectronSelectionNoPID( self ):
+        return "(TRCHI2DOF < %(ElectronTRCHI2)s ) &  (P> %(ElectronP)s *MeV) &  (PT> %(ElectronPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(ElectronGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(ElectronMINIPCHI2)s )"
+
+    def _NominalElectronSelectionTight( self ):
+        return "(TRCHI2DOF < %(ElectronTRCHI2)s ) &  (P> %(ElectronPTight)s *MeV) &  (PT> %(ElectronPTTight)s* MeV)"\
+               "& (TRGHOSTPROB < %(ElectronGHOSTPROB)s)"\
+               "& (PIDe > %(ElectronPIDe)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(ElectronMINIPCHI2)s )"
+   
+    def _NominalElectronSelectionTightNoPID( self ):
+        return "(TRCHI2DOF < %(ElectronTRCHI2)s ) &  (P> %(ElectronPTight)s *MeV) &  (PT> %(ElectronPTTight)s* MeV)"\
+               "& (TRGHOSTPROB < %(ElectronGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(ElectronMINIPCHI2)s )"
+
+
+    def _MajoranaLineElectronSelection( self ):
+        return "(P > %(KS0DaugP)s) & (PT > %(KS0DaugPT)s)"\
+               "& (TRGHOSTPROB < %(ElectronGHOSTPROB)s)"\
+               "&(TRCHI2DOF < %(KS0DaugTrackChi2)s ) & (PIDe-PIDpi> %(ElectronPIDe)s )& (PIDe-PIDp> %(ElectronPIDp)s )"\
+               "&(PIDe-PIDK> %(ElectronPIDK)s )&(MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s)"\
+
+    ### Kaons
+    def _NominalKSelection( self ):
+        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonPTight)s *MeV) &  (PT> %(KaonPTTight)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK > %(KaonPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    def _NominalKSelectionNoPID( self ):
+        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonPTight)s *MeV) &  (PT> %(KaonPTTight)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    def _KforPhiSelection( self ):
+        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK> %(KaonPIDK_phi)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    def _KforPhiSelectionNoPID( self ):
+        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    ### Pions
+    def _NominalPiSelection( self ):
+        return "(TRCHI2DOF < %(PionTRCHI2)s )&  (P> %(PionP)s *MeV) &  (PT> %(PionPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK < %(PionPIDK)s )"\
+               "& (PIDmu < 2 ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"
+
+    def _NominalPiSelectionNoPID( self ):
+        return "(TRCHI2DOF < %(PionTRCHI2)s )&  (P> %(PionP)s *MeV) &  (PT> %(PionPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK < %(PionPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"
+
+    def _NominalPiSelectionTight( self ):
+        return "(TRCHI2DOF < %(PionTRCHI2)s )&  (P> %(PionPTight)s *MeV) &  (PT> %(PionPTTight)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK < %(PionPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"
+
+    def _NominalPiSelectionTightNoPID( self ):
+        return "(TRCHI2DOF < %(PionTRCHI2)s )&  (P> %(PionPTight)s *MeV) &  (PT> %(PionPTTight)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"
+    
+    ### K shorts
+    def _NominalKsSelection( self ):
+        return " (BPVVD >%(KsLLCutFD)s*mm)& (MM>%(KSLLMassLow)s*MeV)&(MM<%(KSLLMassHigh)s*MeV)  & (BPVVDCHI2> %(KSLLCutFDChi2)s ) & (PT > %(KS0PT)s*MeV) & (VFASPF(VCHI2PDOF) < %(KS0VertexChi2)s) & CHILDCUT((TRCHI2DOF < %(KS0DaugTrackChi2)s),1) & CHILDCUT((TRCHI2DOF < %(KS0DaugTrackChi2)s),2) & CHILDCUT((MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s),1) & CHILDCUT((MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s),2) & (MIPCHI2DV(PRIMARY) > %(KS0MIPChi2)s)"
+
+    #####################################
+
+    ##### B -> pi e nu lines
+    def _Pi_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Pi_Line', prescale = 1.0 if NoPS else self.config["PiENu_prescale"],
+                             FILTER=self.GECs,
+                             algos = [ self._B2PiENu()])
+    def _Pi_NoETopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Pi_NoETopoLine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PiENuNoETopo()])
+
+    def _PiSS_line( self ):
+        NoPS =  self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Pi_SSLine', prescale =  1.0 if NoPS else self.config["PiENu_prescale"],
+                             FILTER=self.GECs,
+                             algos = [ self._B2PiENuSS()])
+    
+    def _Pi_NoPIDe_line( self ):
+        NoPS =  self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Pi_NoPIDELine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PiENuNoPIDe()])
+    
+    def _Pi_NoPIDhad_line( self ):
+        NoPS =  self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Pi_NoPIDPiLine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PiENuNoPIDhad()])
+
+    ###### Bs -> K e nu lines
+    def _K_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KENu()])
+
+    def _K_NoETopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_NoETopoLine', prescale = 1.0  if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KENuNoETopo()])
+
+    def _KSS_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_SSLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KENuSS()])
+   
+    def _K_NoPIDe_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_NoPIDELine', prescale = 1.0 if NoPS else .02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KENu_NoPIDe()])
+    
+    def _KSS_NoPIDe_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_SSNoPIDELine', prescale = 1.0 if NoPS else .02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KENuSS_NoPIDe()])
+    
+    def _K_NoPIDK_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_NoPIDKLine', prescale = 1.0 if NoPS else .02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KENu_NoPIDK()])
+    
+    def _KSS_NoPIDK_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_SSNoPIDKLine', prescale = 1.0 if NoPS else .02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KENuSS_NoPIDK()])
+    
+    def _K_NoPIDKe_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_NoPIDKELine', prescale = 1.0 if NoPS else .01,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KENu_NoPIDKe()])
+    
+    def _KSS_NoPIDKe_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_SSNoPIDKELine', prescale = 1.0 if NoPS else .01,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KENuSS_NoPIDKe()])
+
+    ##### Bs -> phi/KK e nu lines
+    def _Phi_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiENu()])
+
+    def _Phi_NoETopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_NoETopoLine', prescale =  1.0 if NoPS else 0.2,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiENuNoETopo()])
+    
+    def _PhiWS_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_WSLine', prescale = 1.0 if NoPS else 0.2,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiENuWS()])
+    
+    def _Phi_NoPIDe_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_NoPIDELine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiENu_NoPIDe()])
+
+    def _Phi_NoPIDhad_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_NoPIDKLine', prescale = 1.0 if NoPS else 0.01,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiENu_NoPIDhad()])
+    
+    def _PhiBadVtx_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_BadVtxLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiENuBadVtx()])
+
+
+    ##### B -> rho/pipi e nu lines
+    def _Rho_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoENu()])
+
+    def _Rho_NoETopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_NoETopoLine', prescale =  1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoENuNoETopo()])
+    
+    def _Rho_NoPIDe_line(self):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_NoPIDELine', prescale = 1.0 if NoPS else 0.05,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoENu_NoPIDe()])
+
+    def _Rho_NoPIDhad_line(self):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_NoPIDPiLine', prescale = 1.0 if NoPS else 0.05,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoENu_NoPIDhad()])
+    
+    def _RhoWS_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_WSLine', prescale = 1.0 if NoPS else 0.2,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoENuWS()])
+    
+    def _RhoBadVtx_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_BadVtxLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoENuBadVtx()])
+    
+    def _RhoSB_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_SBLine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoENuSB()])
+    
+    ##### B -> omega e nu lines
+    def _Omega_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaENu()])
+
+    def _Omega_NoETopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_NoETopoLine', prescale =  1.0 if NoPS else 0.2,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaENuNoETopo()])
+    
+    def _Omega_NoPIDe_line(self):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_NoPIDELine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaENu_NoPIDe()])
+    
+    def _Omega_NoPIDhad_line(self):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_NoPIDPiLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaENu_NoPIDhad()])
+
+    def _OmegaWS_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_WSLine', prescale = 1.0 if NoPS else 0.3,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaENuWS()])
+    
+    def _OmegaBadVtx_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_BadVtxLine', prescale = 1.0 if NoPS else 0.2,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaENuBadVtx()])
+
+    ##### Ks majorana lines
+    def _KshMajoranaSSE_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2KshSSE_SSEminusLine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2KshSSENu_SSEminus()])
+    
+    def _KshMajoranaOSE_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2KshOSE_SSEplusLine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2KshOSENu_SSEplus()])
+
+    ##### Bs -> K*/Kspi e nu lines
+    def _Kstar_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarENu()])
+    
+    def _Kstar_NoETopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_NoETopoLine', prescale =  1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarENuNoETopo()])
+
+    def _Kstar_NoPIDe_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_NoPIDELine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarENu_NoPIDe()])
+
+    def _Kstar_NoPIDhad_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_NoPIDPiLine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarENu_NoPIDhad()])
+    
+    def _KstarSS_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_SSLine', prescale = 1.0 if NoPS else 0.3,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarENuSS()])
+
+    def _KstarBadVtx_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_BadVtxLine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarENuBadVtx()])
+
+    ###############################
+    ##
+    ## Filters for particles
+    ##
+    ##############################
+
+    ### Electrons
+    def _electronFilter( self ):
+        if self._electronSel is not None:
+            return self._electronSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseElectrons
+        _e = FilterDesktop( Code = self._NominalElectronSelection() % self._config )
+        _eSel=Selection("E_for"+self._name,
+                         Algorithm=_e,
+                         RequiredSelections = [StdLooseElectrons])
+        
+        self._electronSel=_eSel
+        
+        return _eSel
+
+    ######--######
+    def _electronFilterNoPID( self ):
+        if self._electronSelNoPID is not None:
+            return self._electronSelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsElectrons
+        _eNoPID = FilterDesktop( Code = self._NominalElectronSelectionNoPID() % self._config )
+        _eSelNoPID=Selection("ENoPID_for"+self._name,
+                         Algorithm=_eNoPID,
+                         RequiredSelections = [StdNoPIDsElectrons])
+        
+        self._electronSelNoPID=_eSelNoPID
+        
+        return _eSelNoPID
+
+    
+    ######--######
+    def _electronFilterTight( self ):
+        if self._electronSelTight is not None:
+            return self._electronSelTight
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseElectrons
+        _eTight = FilterDesktop( Code = self._NominalElectronSelectionTight() % self._config )
+        _eTightSel=Selection("ETightCuts_for"+self._name,
+                         Algorithm=_eTight,
+                         RequiredSelections = [StdLooseElectrons])
+        
+        self._electronSelTight=_eTightSel
+        
+        return _eTightSel
+
+    ######--######
+    def _electronFilterTightNoPID( self ):
+        if self._electronSelTightNoPID is not None:
+            return self._electronSelTightNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsElectrons
+        _eTightNoPID = FilterDesktop( Code = self._NominalElectronSelectionTightNoPID() % self._config )
+        _eTightSelNoPID=Selection("ETightNoPIDCuts_for"+self._name,
+                         Algorithm=_eTightNoPID,
+                         RequiredSelections = [StdNoPIDsElectrons])
+        
+        self._electronSelTightNoPID=_eTightSelNoPID
+        
+        return _eTightSelNoPID
+
+    ######--######
+    def _electronFilterTOS( self ):
+        if self._electronSelTOS is not None:
+            return self._electronSelTOS
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseElectrons
+        _eTOS = FilterDesktop( Code = self._NominalElectronSelectionTight() % self._config )
+        _eSelTOS=Selection("EL0TOS_for"+self._name,
+                            Algorithm=_eTOS,
+                            RequiredSelections = [StdLooseElectrons])
+        eSelTOS = tosSelection(_eSelTOS,{'L0.*Electron.*Decision%TOS':0}, True)
+
+        self._electronSelTOS=_eSelTOS
+        
+        return _eSelTOS
+
+    ######--######
+    def _electronFilterTOSNoPID( self ):
+        if self._electronSelTOSNoPID is not None:
+            return self._electronSelTOSNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsElectrons
+        _eTOSNoPID = FilterDesktop( Code = self._NominalElectronSelectionTightNoPID() % self._config )
+        _eSelTOSNoPID = Selection("EL0TOSNoPID_for"+self._name,
+                                   Algorithm=_eTOSNoPID,
+                                   RequiredSelections = [StdNoPIDsElectrons])
+        _eSelTOSNoPID = tosSelection(_eSelTOSNoPID,{'L0.*Electron.*Decision%TOS':0}, True)
+
+        self._electronSelTOSNoPID=_eSelTOSNoPID
+        
+        return _eSelTOSNoPID
+
+    ## Pions
+    ######--######
+    def _pionFilter( self ):
+        if self._pionSel is not None:
+            return self._pionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _pi = FilterDesktop( Code = self._NominalPiSelection() % self._config )
+        _piSel=Selection("Pi_for"+self._name,
+                         Algorithm=_pi,
+                         RequiredSelections = [StdLoosePions])
+        self._pionSel=_piSel
+        return _piSel
+
+    ######--######
+    def _pionFilterNoPID( self ):
+        if self._pionSelNoPID is not None:
+            return self._pionSelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsPions
+        
+        _piNoPID = FilterDesktop( Code = self._NominalPiSelectionNoPID() % self._config )
+        _piSelNoPID=Selection("PiNoPID_for"+self._name,
+                         Algorithm=_piNoPID,
+                         RequiredSelections = [StdNoPIDsPions])
+        self._pionSelNoPID = _piSelNoPID
+        return _piSelNoPID
+
+    ######--######
+    def _pionFilterTight( self ):
+        if self._pionSelTight is not None:
+            return self._pionSelTight
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _piTight = FilterDesktop( Code = self._NominalPiSelectionTight() % self._config )
+        _piSelTight=Selection("PiTight_for"+self._name,
+                         Algorithm=_piTight,
+                         RequiredSelections = [StdLoosePions])
+        self._pionSelTight=_piSelTight
+        return _piSelTight
+    
+    ######--######
+    def _pionFilterTightNoPID( self ):
+        if self._pionSelTightNoPID is not None:
+            return self._pionSelTightNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsPions
+        
+        _piNoPIDTight = FilterDesktop( Code = self._NominalPiSelectionTightNoPID() % self._config )
+        _piSelNoPIDTight=Selection("PiTightNoPID_for"+self._name,
+                         Algorithm=_piNoPIDTight,
+                         RequiredSelections = [StdNoPIDsPions])
+        self._pionSelTightNoPID=_piSelNoPIDTight
+        return _piSelNoPIDTight
+
+    ## Kaons
+    
+    ######Kaon Filter######
+    def _kaonFilter( self ):
+        if self._kaonSel is not None:
+            return self._kaonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseKaons
+        
+        _ka = FilterDesktop( Code = self._NominalKSelection() % self._config )
+        _kaSel=Selection("K_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdLooseKaons])
+        self._kaonSel=_kaSel
+        return _kaSel
+
+    ######--######
+    def _kaonFilterNoPID( self ):
+        if self._kaonSelNoPID is not None:
+            return self._kaonSelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseKaons
+        
+        _ka = FilterDesktop( Code = self._NominalKSelectionNoPID() % self._config )
+        _kaSelNoPID=Selection("KNoPID_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdLooseKaons])
+        self._kaonSelNoPID=_kaSelNoPID
+        return _kaSelNoPID
+
+    ######--######
+    def _kaonForPhiFilter( self ):
+        if self._kaonForPhiSel is not None:
+            return self._kaonForPhiSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseKaons
+        
+        _ka = FilterDesktop( Code = self._KforPhiSelection() % self._config )
+        _kaSel=Selection("K_Phi"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdLooseKaons])
+        self._kaonForPhiSel=_kaSel
+        return _kaSel
+
+    ######--######
+    def _kaonForPhiFilterNoPID( self ):
+        if self._kaonForPhiSelNoPID is not None:
+            return self._kaonForPhiSelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsKaons
+        
+        _kaNoPID = FilterDesktop( Code = self._KforPhiSelectionNoPID() % self._config )
+        _kaSelNoPID=Selection("KNoPID_Phi"+self._name,
+                         Algorithm=_kaNoPID,
+                         RequiredSelections = [StdNoPIDsKaons])
+        self._kaonForPhiSelNoPID = _kaSelNoPID
+        return _kaSelNoPID
+
+    ######Majorana Electron Filter######
+    def _MajoranaLineElectronFilter( self ):
+        if self._MajoranaLineElectronSel is not None:
+            return self._MajoranaLineElectronSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseElectrons
+        _emajorana = FilterDesktop( Code = self._MajoranaLineElectronSelection() % self._config )
+        _emajoranaSel=Selection("EMajorana_for"+self._name,
+                                 Algorithm=_emajorana,
+                                 RequiredSelections = [StdLooseElectrons])
+        
+        self._MajoranaLineElectronSel=_emajoranaSel
+        
+        return _emajoranaSel
+    
+    #####
+    ## Composites
+    #####
+    
+    ######--######
+    def _KsFilter( self ):
+        if self._KSSel is not None:
+           return self._KSSel
+       
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        
+        _code =  FilterDesktop( Code = self._NominalKsSelection() % self._config )
+      
+        _KsSel=Selection("KS02PiPi_for"+self._name,
+                         Algorithm= _code,
+                         RequiredSelections = [self._stdVeryLooseKsLL,self._stdLooseKsLD,self._stdLooseKsDD])
+      
+        self._KSSel = _KsSel
+      
+        return _KsSel
+    
+    ##### phi -> KK filter (generall di-kaon filter) #####
+    def _Phi2KKFilter( self ):
+        if self._phi1020Sel is not None:
+            return self._phi1020Sel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _phi1020 = CombineParticles(
+            DecayDescriptors = ["phi(1020) -> K- K+"] ,
+            CombinationCut = "(AM< %(PhiUpperMass)s)" % self._config,
+            MotherCut       = "(VFASPF(VCHI2/VDOF) < %(PhiVCHI2DOF)s ) & (PT > %(PhiPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(PhiMINIPCHI2)s ) & (BPVDIRA> %(PhiDIRA)s)" %self._config
+            )
+        _phi1020Sel=Selection("PhiKK_for"+self._name,
+                             Algorithm=_phi1020,
+                             RequiredSelections = [self._kaonForPhiFilter()])
+        
+        self._phi1020Sel=_phi1020Sel
+        
+        return _phi1020Sel
+
+    ######--######
+    def _Phi2KKFilterNoPID( self ):
+        if self._phi1020SelNoPID is not None:
+            return self._phi1020SelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _phi1020NoPID = CombineParticles(
+            DecayDescriptors = ["phi(1020) -> K- K+"] ,
+            CombinationCut = "(AM< %(PhiUpperMass)s)" % self._config,
+            MotherCut       = "(VFASPF(VCHI2/VDOF) < %(PhiVCHI2DOF)s ) & (PT > %(PhiPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(PhiMINIPCHI2)s ) & (BPVDIRA> %(PhiDIRA)s)" %self._config
+            )
+        _phi1020SelNoPID=Selection("PhiKKNoPID_for"+self._name,
+                             Algorithm=_phi1020NoPID,
+                             RequiredSelections = [self._kaonForPhiFilterNoPID()])
+        
+        self._phi1020SelNoPID=_phi1020SelNoPID
+        
+        return _phi1020SelNoPID
+
+    ######--######
+    def _Phi2KKFilterWS( self ):
+        if self._phi1020SelWS is not None:
+            return self._phi1020SelWS
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _phi1020WS = CombineParticles(
+            DecayDescriptors = ["[phi(1020) -> K+ K+]cc"] ,
+            CombinationCut = "(AM< %(PhiUpperMass)s)" % self._config,
+            MotherCut       = "(VFASPF(VCHI2/VDOF) < %(PhiVCHI2DOF)s ) & (PT > %(PhiPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(PhiMINIPCHI2)s ) & (BPVDIRA> %(PhiDIRA)s)" %self._config
+            )
+        _phi1020SelWS=Selection("PhiKKWS_for"+self._name,
+                                Algorithm=_phi1020WS,
+                                RequiredSelections = [self._kaonForPhiFilter()])
+        
+        self._phi1020SelWS=_phi1020SelWS
+        
+        return _phi1020SelWS
+
+    
+    #####Make the Rho######
+    def _Rho02PiPiFilter( self ):
+        if self._rho770Sel is not None:
+            return self._rho770Sel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _rho770 = CombineParticles(
+            DecayDescriptors = ["rho(770)0 -> pi- pi+"] ,
+            DaughtersCuts   = {"pi+":"(PT> %(RhoChPionPT)s *MeV) & (TRCHI2DOF < %(RhoChPionTRCHI2)s )"\
+                               "& (MIPCHI2DV(PRIMARY)> %(RhoChPionMINIPCHI2)s )"\
+                               "& (PIDK < %(RhoChPionPIDK)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config
+                               },
+            CombinationCut = "(ADAMASS('rho(770)0')< %(RhoMassWindow)s)" % self._config,
+            MotherCut       = "(MAXTREE('pi+'==ABSID,PT )>%(RhoLeadingPionPT)s *MeV )"\
+            "& (MAXTREE('pi+'==ABSID,P )>%(RhoLeadingPionP)s *MeV )"\
+            "& (VFASPF(VCHI2/VDOF) < %(RhoVCHI2DOF)s ) & (PT > %(RhoPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(RhoMINIPCHI2)s ) & (BPVDIRA> %(RhoDIRA)s)"\
+            "& (DMASS('rho(770)0')< %(RhoMassWindow)s) " %self._config
+            )
+        _rho770Sel=Selection("Rho02PiPi_for"+self._name,
+                             Algorithm=_rho770,
+                             RequiredSelections = [self._pionFilter()])
+        
+        self._rho770Sel=_rho770Sel
+        
+        return _rho770Sel
+
+    ######--######
+    def _Rho02PiPiFilterNoPID( self ):
+        if self._rho770SelNoPID is not None:
+            return self._rho770SelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _rho770NoPID = CombineParticles(
+            DecayDescriptors = ["rho(770)0 -> pi- pi+"] ,
+            DaughtersCuts   = {"pi+":"(PT> %(RhoChPionPT)s *MeV) & (TRCHI2DOF < %(RhoChPionTRCHI2)s )"\
+                               "& (MIPCHI2DV(PRIMARY)> %(RhoChPionMINIPCHI2)s )"\
+                               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config
+                               },
+            CombinationCut = "(ADAMASS('rho(770)0')< %(RhoMassWindow)s)" % self._config,
+            MotherCut       = "(MAXTREE('pi+'==ABSID,PT )>%(RhoLeadingPionPT)s *MeV )"\
+            "& (MAXTREE('pi+'==ABSID,P )>%(RhoLeadingPionP)s *MeV )"\
+            "& (VFASPF(VCHI2/VDOF) < %(RhoVCHI2DOF)s ) & (PT > %(RhoPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(RhoMINIPCHI2)s ) & (BPVDIRA> %(RhoDIRA)s)"\
+            "& (DMASS('rho(770)0')< %(RhoMassWindow)s) " %self._config
+            )
+        _rho770SelNoPID=Selection("Rho02PiPiNoPID_for"+self._name,
+                                  Algorithm=_rho770NoPID,
+                                  RequiredSelections = [self._pionFilterNoPID()])
+        
+        self._rho770SelNoPID=_rho770SelNoPID
+        
+        return _rho770SelNoPID
+
+    ######--######
+    def _Rho02PiPiWSFilter( self ):
+        if self._rho770WSSel is not None:
+            return self._rho770WSSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _rho770WS = CombineParticles(
+            DecayDescriptors = ["[rho(770)0 -> pi+ pi+]cc"] ,
+            DaughtersCuts   = {"pi+":"(PT> %(RhoChPionPT)s *MeV) & (TRCHI2DOF < %(RhoChPionTRCHI2)s )"\
+                               "& (MIPCHI2DV(PRIMARY)> %(RhoChPionMINIPCHI2)s )"\
+                               "& (PIDK < %(RhoChPionPIDK)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config
+                               },
+            CombinationCut = "(ADAMASS('rho(770)0')< %(RhoMassWindow)s)" % self._config,
+            MotherCut      = "(MAXTREE('pi+'==ABSID,PT )>%(RhoLeadingPionPT)s *MeV )"\
+            "& (VFASPF(VCHI2/VDOF) < %(RhoVCHI2DOF)s ) & (PT > %(RhoPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(RhoMINIPCHI2)s ) & (BPVDIRA> %(RhoDIRA)s)"\
+            "& (DMASS('rho(770)0')< %(RhoMassWindow)s) " %self._config
+            )
+        _rho770SelWS=Selection("Rho02PiPiWS_for"+self._name,
+                             Algorithm=_rho770WS,
+                             RequiredSelections = [self._pionFilter()])
+        
+        self._rho770WSSel=_rho770SelWS
+        return _rho770SelWS
+    
+    ######--######
+    def _Rho02PiPiSBFilter( self ):
+        if self._rho770SBSel is not None:
+            return self._rho770SBSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _rho770SB = CombineParticles(
+            DecayDescriptors = ["rho(770)0 -> pi+ pi-"] ,
+            DaughtersCuts   = {"pi+":"(PT> %(RhoChPionPT)s *MeV) & (TRCHI2DOF < %(RhoChPionTRCHI2)s )"\
+                               "& (MIPCHI2DV(PRIMARY)> %(RhoChPionMINIPCHI2)s ) & (PIDpi-PIDK> %(RhoChPionPIDK)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config
+                               },
+            CombinationCut = "((AM > %(RhoMassWindowMin1SB)s) & (AM < %(RhoMassWindowMax1SB)s))"\
+            " | ((AM > %(RhoMassWindowMin2SB)s) & (AM < %(RhoMassWindowMax2SB)s))" % self._config,
+            
+            MotherCut       = "(MAXTREE('pi+'==ABSID,PT )>%(RhoLeadingPionPT)s *MeV )"\
+            "& (VFASPF(VCHI2/VDOF) < %(RhoVCHI2DOF)s ) & (PT > %(RhoPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(RhoMINIPCHI2)s ) & (BPVDIRA> %(RhoDIRA)s)"%self._config
+            )
+        _rho770SelSB=Selection("Rho02PiPiSB_for"+self._name,
+                               Algorithm=_rho770SB,
+                               RequiredSelections = [self._pionFilter()])
+        
+        self._rho770SBSel=_rho770SelSB
+        return _rho770SelSB
+
+    ### Make the omega(782) ###
+    def _Omega2PiPiPi0Filter( self ):
+        if self._omega782Sel is not None:
+            return self._omega782Sel
+        
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions, StdLooseResolvedPi0, StdLooseMergedPi0
+        
+        _omega782 = DaVinci__N3BodyDecays(
+            DecayDescriptor  = "omega(782) -> pi+ pi- pi0" ,
+            DaughtersCuts    = {"pi+":"(PT> %(OmegaChPionPT)s *MeV)"\
+                                "& (MIPCHI2DV(PRIMARY)> %(OmegaChPionMINIPCHI2)s )"\
+                                "& (PIDK < %(OmegaChPionPIDK)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config,
+                                "pi0":"(PT > %(OmegaPi0PT)s *MeV)" % self._config
+                                },
+            CombinationCut   = "(ADAMASS('omega(782)')< %(OmegaMassWindow)s)" % self._config,
+            Combination12Cut = "(AM < 800*MeV)&(ACHI2DOCA(1,2) < 8)",
+            MotherCut        = "(VFASPF(VCHI2/VDOF) < %(OmegaVCHI2DOF)s) & (DMASS('omega(782)')< %(OmegaMassWindow)s) " %self._config
+            )
+        _omega782Sel=Selection("Omega2PiPiPi0_for"+self._name,
+                               Algorithm=_omega782,
+                               RequiredSelections = [StdLoosePions, StdLooseResolvedPi0, StdLooseMergedPi0])
+        
+        self._omega782Sel=_omega782Sel
+        
+        return _omega782Sel
+
+    ######--######
+    def _Omega2PiPiPi0FilterNoPID( self ):
+        if self._omega782SelNoPID is not None:
+            return self._omega782SelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsPions, StdLooseResolvedPi0, StdLooseMergedPi0
+        
+        _omega782NoPID = DaVinci__N3BodyDecays(
+            DecayDescriptor  = "omega(782) -> pi+ pi- pi0" ,
+            DaughtersCuts    = {"pi+":"(PT> %(OmegaChPionPT)s *MeV)"\
+                                "& (MIPCHI2DV(PRIMARY)> %(OmegaChPionMINIPCHI2)s )"\
+                                "& (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config,
+                                "pi0":"(PT > %(OmegaPi0PT)s *MeV)" % self._config
+                                },
+            CombinationCut   = "(ADAMASS('omega(782)')< %(OmegaMassWindow)s)" % self._config,
+            Combination12Cut = "(AM < 800*MeV)&(ACHI2DOCA(1,2) < 8)",
+            MotherCut        = "(VFASPF(VCHI2/VDOF) < %(OmegaVCHI2DOF)s) & (DMASS('omega(782)')< %(OmegaMassWindow)s) " %self._config
+            )
+        _omega782SelNoPID=Selection("Omega2PiPiPi0NoPID_for"+self._name,
+                                    Algorithm=_omega782NoPID,
+                                    RequiredSelections = [StdNoPIDsPions, StdLooseResolvedPi0, StdLooseMergedPi0])
+        
+        self._omega782SelNoPID=_omega782SelNoPID
+        
+        return _omega782SelNoPID
+
+    ######--######
+    def _Omega2PiPiPi0WSFilter( self ):
+        if self._omega782WSSel is not None:
+            return self._omega782WSSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions, StdLooseResolvedPi0, StdLooseMergedPi0
+        
+        _omega782WS = DaVinci__N3BodyDecays(
+            DecayDescriptor   = "[omega(782) -> pi+ pi+ pi0]cc" ,
+            DaughtersCuts     = {"pi+":"(PT> %(OmegaChPionPT)s *MeV)"\
+                                 "& (MIPCHI2DV(PRIMARY)> %(OmegaChPionMINIPCHI2)s )"\
+                                 "& (PIDK < %(OmegaChPionPIDK)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config,
+                                 "pi0":"(PT > %(OmegaPi0PT)s *MeV)" % self._config
+                                 },
+            CombinationCut    = "(ADAMASS('omega(782)')< %(OmegaMassWindow)s)" % self._config,
+            Combination12Cut  = "(AM < 800*MeV)&(ACHI2DOCA(1,2) < 8)",
+            MotherCut         = "(VFASPF(VCHI2/VDOF) < %(OmegaVCHI2DOF)s) & (DMASS('omega(782)')< %(OmegaMassWindow)s) " %self._config
+            )
+        _omega782WSSel=Selection("Omega2PiPiPi0WS_for"+self._name,
+                               Algorithm=_omega782WS,
+                               RequiredSelections = [StdLoosePions, StdLooseResolvedPi0, StdLooseMergedPi0])
+        
+        self._omega782WSSel=_omega782WSSel
+        
+        return _omega782WSSel
+    
+    ######Make the Kshort->EPi Same Sign for Majorana####
+    def _KshMajoranaSSEFilter( self ):
+        if self._KshMajoranaSSESel is not None:
+            return self._KshMajoranaSSESel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions, StdLooseElectrons
+     
+        _Ksh = CombineParticles(
+            DecayDescriptor = "KS0 -> e- pi+",
+            DaughtersCuts   = {"pi+":"(P > %(KS0DaugP)s)& (PT > %(KS0DaugPT)s)"\
+                               "& (TRCHI2DOF < %(KS0DaugTrackChi2)s)" \
+                               "& (MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s)"   % self._config
+                               },
+            CombinationCut  = "(ADOCACHI2CUT(25, ''))"% self._config,
+            
+            MotherCut       = "(BPVVDCHI2> %(KSMajoranaCutFDChi2)s )& (VFASPF(VCHI2/VDOF) < %(KS0VertexChi2)s)&(PT > %(KS0PT)s*MeV)" % self._config 
+            )
+        
+        #_Ksh.ReFitPVs = True        
+        _KshMajoranaSSESel=Selection("KshMajoranaSSE_for"+self._name,
+                                      Algorithm=_Ksh,
+                                      RequiredSelections = [StdLoosePions, self._MajoranaLineElectronFilter()])
+        self._KshMajoranaSSESel=_KshMajoranaSSESel
+        
+        return _KshMajoranaSSESel
+    
+    ######Make the Kshort->EPi Opposite Sign for Majorana####
+    def _KshMajoranaOSEFilter( self ):
+        if self._KshMajoranaOSESel is not None:
+            return self._KshMajoranaOSESel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions, StdLooseElectrons
+        
+        _Ksh = CombineParticles(
+            DecayDescriptor = "KS0 -> e+ pi-",
+            DaughtersCuts   = {"pi-":"(P > %(KS0DaugP)s)& (PT > %(KS0DaugPT)s)"\
+                               "&(TRCHI2DOF < %(KS0DaugTrackChi2)s)"\
+                               "&(MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s)"   % self._config
+                               },
+            CombinationCut  = "(ADOCACHI2CUT(25, ''))"% self._config,
+            
+            MotherCut       = "(BPVVDCHI2> %(KSMajoranaCutFDChi2)s )& (VFASPF(VCHI2/VDOF) < %(KS0VertexChi2)s)&(PT > %(KS0PT)s*MeV)" % self._config 
+            )
+        # _Ksh.ReFitPVs = True
+        _KshMajoranaOSESel=Selection("KshMajoranaOSE_for"+self._name,
+                                      Algorithm=_Ksh,
+                                      RequiredSelections = [StdLoosePions, self._MajoranaLineElectronFilter()])
+        self._KshMajoranaOSESel=_KshMajoranaOSESel
+        
+        return _KshMajoranaOSESel
+
+    ## Kstars
+    
+    # Make the K*+ out of KS and pi+
+    def _Kstar2KPiFilter( self ):
+        if self._KstarSel is not None:
+            return self._KstarSel
+
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+
+        _Kstar2KsPi = CombineParticles(
+            DecayDescriptors = ["[K*(892)+ -> KS0 pi+]cc"],
+            CombinationCut = "(ADAMASS('K*(892)+')< %(KstarMassWindow)s )" % self._config,
+            DaughtersCuts   = {"pi+":"(PT> %(KstarChPionPT)s*MeV) &(P> %(KstarChPionP)s*MeV)"\
+                               "&  (TRCHI2DOF < %(KstarChPionTRCHI2)s )& (MIPCHI2DV(PRIMARY)>%(KstarChPionMINIPCHI2)s)"\
+                               "& (PIDK < %(KstarChPionPIDK)s)" % self._config
+                               },
+            MotherCut = "(PT > %(KstarPT)s)" % self._config,
+            ReFitPVs = True
+            )
+        _KstarSel = Selection("Kstar_for"+self._name,
+                              Algorithm = _Kstar2KsPi,
+                              RequiredSelections = [StdLoosePions, self._KsFilter()])
+        self._KstarSel = _KstarSel
+
+        return _KstarSel
+
+    ######--######
+    def _Kstar2KPiFilterNoPID( self ):
+        if self._KstarSelNoPID is not None:
+            return self._KstarSelNoPID
+
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsPions
+
+        _Kstar2KsPiNoPID = CombineParticles(
+            DecayDescriptors = ["[K*(892)+ -> KS0 pi+]cc"],
+            CombinationCut = "(ADAMASS('K*(892)+')< %(KstarMassWindow)s )" % self._config,
+            DaughtersCuts   = {"pi+":"(PT> %(KstarChPionPT)s*MeV) &(P> %(KstarChPionP)s*MeV)"\
+                               "&  (TRCHI2DOF < %(KstarChPionTRCHI2)s )& (MIPCHI2DV(PRIMARY)>%(KstarChPionMINIPCHI2)s)" % self._config
+                               },
+            MotherCut = "(PT > %(KstarPT)s)" % self._config,
+            ReFitPVs = True
+            )
+        _KstarSelNoPID = Selection("KstarNoPID_for"+self._name,
+                                   Algorithm = _Kstar2KsPiNoPID,
+                                   RequiredSelections = [StdNoPIDsPions, self._KsFilter()])
+        self._KstarSelNoPID = _KstarSelNoPID
+
+        return _KstarSelNoPID
+
+    ################################
+    ##
+    ## B -> X e nu definitions
+    ##
+    ################################
+
+    ### B+ -> pi+ e- nu
+    def _B2PiENu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KE = CombineParticles(
+            DecayDescriptors = ["[B0 -> pi+ e-]cc"],
+            CombinationCut = "(AM>%(KEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _KESel=Selection("PiE_for"+self._name,
+                         Algorithm=_KE,
+                         RequiredSelections = [self._electronFilterTOS(), self._pionFilterTight()])
+        _KESel = tosSelection(_KESel,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESel
+
+    def _B2PiENuNoETopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KENoETopo = CombineParticles(
+            DecayDescriptors = ["[B0 -> pi+ e-]cc"],
+            CombinationCut = "(AM>%(KEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _KESelNoETopo=Selection("PiENoETopo_for"+self._name,
+                         Algorithm=_KENoETopo,
+                         RequiredSelections = [self._electronFilterTOS(), self._pionFilterTight()])
+        _KESelNoETopo = tosSelection(_KESelNoETopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESelNoETopo
+
+
+    def _B2PiENuNoPIDe( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KENoPIDe = CombineParticles(
+            DecayDescriptors = ["[B0 -> pi+ e-]cc"],
+            CombinationCut = "(AM>%(KEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _KESelNoPIDe=Selection("PiENoPIDe_for"+self._name,
+                                 Algorithm=_KENoPIDe,
+                                 RequiredSelections = [self._electronFilterNoPID(), self._pionFilterTight()])
+        _KESelNoPIDe = tosSelection(_KESelNoPIDe,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESelNoPIDe
+
+    def _B2PiENuNoPIDhad( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KENoPIDhad = CombineParticles(
+            DecayDescriptors = ["[B0 -> pi+ e-]cc"],
+            CombinationCut = "(AM>%(KEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _KESelNoPIDhad=Selection("PiENoPIDhad_for"+self._name,
+                                  Algorithm=_KENoPIDhad,
+                                  RequiredSelections = [self._electronFilterTOS(), self._pionFilterTightNoPID()])
+        _KESelNoPIDhad = tosSelection(_KESelNoPIDhad,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESelNoPIDhad
+    
+    def _B2PiENuSS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KESS = CombineParticles(
+            DecayDescriptors = ["[B0 -> pi- e-]cc"],
+            CombinationCut = "(AM>%(KEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = " (VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRATight)s) "\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+      
+        _KESelSS=Selection("PiESS_for"+self._name,
+                          Algorithm=_KESS,
+                          RequiredSelections = [self._electronFilterTOS(), self._pionFilterTight()])
+        _KESelSS = tosSelection(_KESelSS,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESelSS
+
+
+    ######Bs->KENu######
+    def _Bs2KENu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KE = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K+ e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+        
+        _KESel=Selection("KE_for"+self._name,
+                         Algorithm=_KE,
+                         RequiredSelections = [self._electronFilterTOS(), self._kaonFilter()])
+        _KESel = tosSelection(_KESel,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESel
+
+    def _Bs2KENuNoETopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KENoETopo = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K+ e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+        
+        _KESelNoETopo=Selection("KENoETopo_for"+self._name,
+                         Algorithm=_KENoETopo,
+                         RequiredSelections = [self._electronFilter(), self._kaonFilter()])
+        _KESelNoETopo = tosSelection(_KESelNoETopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESelNoETopo
+    
+    def _Bs2KENuSS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KESS = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K- e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+
+        _KESelSS=Selection("KESS_for"+self._name,
+                          Algorithm=_KESS,
+                          RequiredSelections = [self._electronFilterTOS(), self._kaonFilter()])
+        _KESelSS = tosSelection(_KESelSS,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESelSS
+
+    ######Bs->KENu misid, no PID on e######
+    def _Bs2KENu_NoPIDe( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KE = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K+ e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+        
+        _KESel=Selection("KE_NoPIDe_for"+self._name,
+                         Algorithm=_KE,
+                         RequiredSelections = [self._electronFilterNoPID(), self._kaonFilter()])
+        _KESel = tosSelection(_KESel,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESel
+    
+    def _Bs2KENuSS_NoPIDe( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KESS = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K- e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+
+        _KESelSS=Selection("KESS_NoPIDe_for"+self._name,
+                          Algorithm=_KESS,
+                          RequiredSelections = [self._electronFilterTightNoPID(), self._kaonFilter()])
+        #_KESelSS = tosSelection(_KESelSS,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESelSS
+
+    ######Bs->KENu misid, no PID on K######
+    def _Bs2KENu_NoPIDK( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KE = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K+ e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+        
+        _KESel=Selection("KE_NoPIDK_for"+self._name,
+                         Algorithm=_KE,
+                         RequiredSelections = [self._electronFilterTOS(), self._kaonFilterNoPID()])
+        _KESel = tosSelection(_KESel,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESel
+    
+    def _Bs2KENuSS_NoPIDK( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KESS = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K- e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+
+        _KESelSS=Selection("KESS_NoPIDK_for"+self._name,
+                          Algorithm=_KESS,
+                          RequiredSelections = [self._electronFilterTOS(), self._kaonFilterNoPID()])
+        _KESelSS = tosSelection(_KESelSS,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESelSS
+
+    ######Bs->KENu misid, no PID on e or K######
+    def _Bs2KENu_NoPIDKe( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KE = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K+ e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+        
+        _KESel=Selection("KE_NoPIDKe_for"+self._name,
+                         Algorithm=_KE,
+                         RequiredSelections = [self._electronFilterNoPID(), self._kaonFilterNoPID()])
+        _KESel = tosSelection(_KESel,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESel
+    
+    def _Bs2KENuSS_NoPIDKe( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KESS = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K- e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+
+        _KESelSS=Selection("KESS_NoPIDKe_for"+self._name,
+                          Algorithm=_KESS,
+                          RequiredSelections = [self._electronFilterNoPID(), self._kaonFilterNoPID()])
+        _KESelSS = tosSelection(_KESelSS,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KESelSS
+
+   ######Bu->PhiENu ######
+    def _B2PhiENu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiE = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) e+]cc"],
+            CombinationCut = "(AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiE_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiESel=Selection("PhiE_for"+self._name,
+                         Algorithm=_PhiE,
+                         RequiredSelections = [self._electronFilterTOS(), self._Phi2KKFilter()])
+            # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleElectron.*Decision%TOS':0})
+        _PhiESel = tosSelection(_PhiESel,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _PhiESel
+
+    def _B2PhiENuNoETopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiENoETopo = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) e+]cc"],
+            CombinationCut = "(AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiE_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiESelNoETopo=Selection("PhiENoETopo_for"+self._name,
+                         Algorithm=_PhiENoETopo,
+                         RequiredSelections = [self._electronFilter(), self._Phi2KKFilter()])
+            # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleElectron.*Decision%TOS':0})
+        _PhiESelNoETopo = tosSelection(_PhiESelNoETopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _PhiESelNoETopo
+
+
+    def _B2PhiENuWS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiEWS = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) e+]cc"],
+            CombinationCut = "(AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiE_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiESelWS=Selection("PhiEWS_for"+self._name,
+                         Algorithm=_PhiEWS,
+                         RequiredSelections = [self._electronFilterTOS(), self._Phi2KKFilterWS()])
+            # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleElectron.*Decision%TOS':0})
+        _PhiESelWS = tosSelection(_PhiESelWS,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _PhiESelWS
+   
+   ######Bu->PhiENu Fake E ######
+   
+    def _B2PhiENu_NoPIDe( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiE = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) e+]cc"],
+            CombinationCut = "(AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiE_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiENoPIDeSel=Selection("PhiE_NoPIDme_for"+self._name,
+                         Algorithm=_PhiE,
+                         RequiredSelections = [self._electronFilterNoPID(), self._Phi2KKFilter()])
+        _PhiENoPIDeSel = tosSelection(_PhiENoPIDeSel,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _PhiENoPIDeSel
+    
+    def _B2PhiENu_NoPIDhad( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiENoPIDHad = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) e+]cc"],
+            CombinationCut = "(AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiE_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiENoPIDhadSel=Selection("PhiE_NoPIDHad_for"+self._name,
+                                    Algorithm=_PhiENoPIDHad,
+                                    RequiredSelections = [self._electronFilterTightNoPID(), self._Phi2KKFilterNoPID()])
+        # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleElectron.*Decision%TOS':0})
+        _PhiENoPIDhadSel = tosSelection(_PhiENoPIDhadSel,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _PhiENoPIDhadSel
+
+    def _B2PhiENuBadVtx( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiEBadVtx = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) e+]cc"],
+            CombinationCut = "(AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiE_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)> %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiESelBadVtx=Selection("PhiEBadVtx_for"+self._name,
+                         Algorithm=_PhiEBadVtx,
+                         RequiredSelections = [self._electronFilterTOS(), self._Phi2KKFilter()])
+            # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleElectron.*Decision%TOS':0})
+        _PhiESelBadVtx = tosSelection(_PhiESelBadVtx,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _PhiESelBadVtx
+
+
+      
+    ######Bu->RhoENu ######
+    def _Bu2RhoENu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoE = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _RhoESel=Selection("RhoE_for"+self._name,
+                            Algorithm=_RhoE,
+                            RequiredSelections = [self._electronFilterTight(), self._Rho02PiPiFilter()])
+        _RhoESel = tosSelection(_RhoESel,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _RhoESel
+
+    def _Bu2RhoENuNoETopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoENoETopo = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _RhoESelNoETopo=Selection("RhoENoETopo_for"+self._name,
+                            Algorithm=_RhoENoETopo,
+                            RequiredSelections = [self._electronFilterTight(), self._Rho02PiPiFilter()])
+        _RhoESelNoETopo = tosSelection(_RhoESelNoETopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _RhoESelNoETopo
+
+    def _Bu2RhoENu_NoPIDe( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoE_NoPIDe = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _RhoESel_NoPIDe=Selection("RhoE_NoPIDe_for"+self._name,
+                            Algorithm=_RhoE_NoPIDe,
+                            RequiredSelections = [self._electronFilterTightNoPID(), self._Rho02PiPiFilter()])
+        _RhoESel_NoPIDe = tosSelection(_RhoESel_NoPIDe,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _RhoESel_NoPIDe
+
+    def _Bu2RhoENu_NoPIDhad( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoE_NoPIDhad = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _RhoESel_NoPIDhad=Selection("RhoE_NoPIDHad_for"+self._name,
+                            Algorithm=_RhoE_NoPIDhad,
+                            RequiredSelections = [self._electronFilterTight(), self._Rho02PiPiFilterNoPID()])
+        _RhoESel_NoPIDhad = tosSelection(_RhoESel_NoPIDhad,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _RhoESel_NoPIDhad
+
+
+    def _Bu2RhoENuWS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoEWS = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _RhoESelWS=Selection("RhoEWS_for"+self._name,
+                         Algorithm=_RhoEWS,
+                         RequiredSelections = [self._electronFilterTight(), self._Rho02PiPiWSFilter()])
+        _RhoESelWS = tosSelection(_RhoESelWS,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _RhoESelWS
+
+    def _Bu2RhoENuBadVtx( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoEBadVtx = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)> %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _RhoESelBadVtx=Selection("RhoEBadVtx_for"+self._name,
+                                  Algorithm=_RhoEBadVtx,
+                                  RequiredSelections = [self._electronFilterTight(), self._Rho02PiPiFilter()])
+        _RhoESelBadVtx = tosSelection(_RhoESelBadVtx,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _RhoESelBadVtx
+    
+    ### This is not needed anymore, as long as the pi+pi- mass window is large enough.    
+    def _Bu2RhoMuNuSB( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoMu = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut ="(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s) & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (ratio >0.4)"% self._config,
+            #" ( ((((5279.17*5279.17) -(MASS(1,2))*(MASS(1,2))))/(2*5279.17)) < %(Enu)s*MeV)"\
+
+            ReFitPVs = True
+            )
+        
+        _RhoMu.Preambulo = [ "from LoKiPhys.decorators import *",
+                           "dx = (VFASPF(VX)-BPV(VX))",
+                           "dy = (VFASPF(VY)-BPV(VY))",
+                           "dz = (VFASPF(VZ)-BPV(VZ))",
+                           "norm = (max(sqrt(dx*dx+dy*dy+dz*dz),0))",
+                           "B_xdir  = ((dx)/norm)",
+                           "B_ydir  = ((dy)/norm)",
+                           "B_zdir  = ((dz)/norm)",
+                           "Pxrhomu   = (CHILD(PX,1)+CHILD(PX,2))",
+                           "Pyrhomu   = (CHILD(PY,1)+CHILD(PY,2))",
+                           "Pzrhomu   = (CHILD(PZ,1)+CHILD(PZ,2))",
+                           "Bflight = (B_xdir*Pxrhomu + B_ydir*Pyrhomu+ B_zdir*Pzrhomu)",
+                           "mB  = 5279.25",
+                           "M_2 = (mB*mB + M12*M12)",
+                           "rhomu_E  = (CHILD(E,1)+CHILD(E,2))",
+                           "quada = (Bflight*Bflight - rhomu_E*rhomu_E)",
+                           "quadb = (M_2*Bflight)",
+                           "quadc = (((M_2*M_2)/4) - (rhomu_E*rhomu_E*mB*mB))",
+                           "Discriminant = ((quadb*quadb)-(4*quada*quadc))",
+                           "solution_a = ((-quadb + sqrt(max(Discriminant,0)))/(2*quada))",
+                           "solution_b = ((-quadb - sqrt(max(Discriminant,0)))/(2*quada))",
+                           "ratio = (solution_a/solution_b)"
+                           ]
+        
+        _RhoMuSel=Selection("RhoMuSB_for"+self._name,
+                         Algorithm=_RhoMu,
+                         RequiredSelections = [self._electronFilterTight(), self._Rho02PiPiSBFilter()])
+        _RhoMuSel = tosSelection(_RhoMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleElectron.*Decision%TOS':0})
+        return _RhoMuSel
+    
+    ######Bu->OmegaENu ######
+    def _Bu2OmegaENu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaE = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _OmegaESel=Selection("OmegaE_for"+self._name,
+                              Algorithm=_OmegaE,
+                              RequiredSelections = [self._electronFilterTight(), self._Omega2PiPiPi0Filter()])
+        _OmegaESel = tosSelection(_OmegaESel,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _OmegaESel
+    
+    def _Bu2OmegaENuNoETopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaENoETopo = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _OmegaESelNoETopo=Selection("OmegaENoETopo_for"+self._name,
+                              Algorithm=_OmegaENoETopo,
+                              RequiredSelections = [self._electronFilterTight(), self._Omega2PiPiPi0Filter()])
+        _OmegaESelNoETopo = tosSelection(_OmegaESelNoETopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _OmegaESelNoETopo
+
+    def _Bu2OmegaENu_NoPIDe( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaE_NoPIDe = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _OmegaESel_NoPIDe=Selection("OmegaE_NoPIDe_for"+self._name,
+                                      Algorithm=_OmegaE_NoPIDe,
+                                      RequiredSelections = [self._electronFilterTightNoPID(), self._Omega2PiPiPi0Filter()])
+        _OmegaESel_NoPIDe = tosSelection(_OmegaESel_NoPIDe,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _OmegaESel_NoPIDe
+
+    def _Bu2OmegaENu_NoPIDhad( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaE_NoPIDhad = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _OmegaESel_NoPIDhad=Selection("OmegaE_NoPIDhad_for"+self._name,
+                                      Algorithm=_OmegaE_NoPIDhad,
+                                      RequiredSelections = [self._electronFilterTight(), self._Omega2PiPiPi0FilterNoPID()])
+        _OmegaESel_NoPIDhad = tosSelection(_OmegaESel_NoPIDhad,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _OmegaESel_NoPIDhad
+
+
+    def _Bu2OmegaENuWS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaEWS = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _OmegaESelWS=Selection("OmegaEWS_for"+self._name,
+                                Algorithm=_OmegaEWS,
+                                RequiredSelections = [self._electronFilterTight(), self._Omega2PiPiPi0WSFilter()])
+        _OmegaESelWS = tosSelection(_OmegaESelWS,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _OmegaESelWS
+
+    def _Bu2OmegaENuBadVtx( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaEBadVtx = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) e+]cc"],
+            CombinationCut = "(AM>%(RhoEMassLowTight)s*MeV) & (AM<%(XEMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)> %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _OmegaESelBadVtx=Selection("OmegaEBadVtx_for"+self._name,
+                                    Algorithm=_OmegaEBadVtx,
+                                    RequiredSelections = [self._electronFilterTight(), self._Omega2PiPiPi0Filter()])
+        _OmegaESelBadVtx = tosSelection(_OmegaESelBadVtx,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single:*Electron.*Decision%TOS':0})
+        return _OmegaESelBadVtx
+    
+
+    ######Bu->KshENu SS & OS######
+    def _Bu2KshSSENu_SSEminus( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KshSSE_SSEminus = CombineParticles(
+            DecayDescriptors = ["[B- -> KS0 e-]cc"],
+            CombinationCut = "(AM>%(KS0EMassLowTight)s*MeV) & (AM<%(XEMassUpperHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+            "& (MINTREE( (ABSID=='KS0') , VFASPF(VZ))-VFASPF(VZ) > %(KS0Z)s *mm )" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KshSSE_SSEminusSel=Selection("KshSSE_SSEminus_for"+self._name,
+                              Algorithm=_KshSSE_SSEminus,
+                              RequiredSelections = [self._electronFilter(), self._KshMajoranaSSEFilter()])
+        return _KshSSE_SSEminusSel
+    
+    
+    def _Bu2KshOSENu_SSEplus( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KshOSE_SSEplus = CombineParticles(
+            DecayDescriptors = ["[B- -> KS0 e-]cc"],
+            CombinationCut = "(AM>%(KS0EMassLowTight)s*MeV) & (AM<%(XEMassUpperHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+            "& (MINTREE( (ABSID=='KS0') , VFASPF(VZ))-VFASPF(VZ) > %(KS0Z)s *mm )" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KshOSE_SSEplusSel=Selection("KshOSE_SSEplus_for"+self._name,
+                              Algorithm=_KshOSE_SSEplus,
+                              RequiredSelections = [self._electronFilter(), self._KshMajoranaOSEFilter()])
+        return _KshOSE_SSEplusSel
+
+#    ###Combine Bs->K*(892)+eNu, K*->KS0Pi###
+    def _Bs2KstarENu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+
+        _KstarE = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)+ e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarESel=Selection("KstarE_for"+self._name,
+                                Algorithm=_KstarE,
+                                RequiredSelections = [self._electronFilter(), self._Kstar2KPiFilter()])
+        _KstarESel = tosSelection(_KstarESel,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KstarESel
+
+    def _Bs2KstarENuNoETopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+
+        _KstarENoETopo = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)+ e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarESelNoETopo=Selection("KstarENoETopo_for"+self._name,
+                                Algorithm=_KstarENoETopo,
+                                RequiredSelections = [self._electronFilter(), self._Kstar2KPiFilter()])
+        _KstarESelNoETopo = tosSelection(_KstarESelNoETopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KstarESelNoETopo
+
+    def _Bs2KstarENu_NoPIDe( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+
+        _KstarENoPIDe = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)+ e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarESelNoPIDe=Selection("KstarENoPIDe_for"+self._name,
+                                   Algorithm=_KstarENoPIDe,
+                                   RequiredSelections = [self._electronFilterNoPID(), self._Kstar2KPiFilter()])
+        _KstarESelNoPIDe = tosSelection(_KstarESelNoPIDe,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KstarESelNoPIDe
+
+    def _Bs2KstarENu_NoPIDhad( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+
+        _KstarENoPIDhad = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)+ e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarESelNoPIDhad=Selection("KstarENoPIDHad_for"+self._name,
+                                      Algorithm=_KstarENoPIDhad,
+                                      RequiredSelections = [self._electronFilter(), self._Kstar2KPiFilterNoPID()])
+        _KstarESelNoPIDhad = tosSelection(_KstarESelNoPIDhad,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KstarESelNoPIDhad
+
+    
+    def _Bs2KstarENuSS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KstarESS = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)- e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarESSSel=Selection("KstarESS_for"+self._name,
+                                  Algorithm=_KstarESS,
+                                  RequiredSelections = [self._electronFilter(), self._Kstar2KPiFilter()])
+        _KstarESSSel = tosSelection(_KstarESSSel,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KstarESSSel
+
+    def _Bs2KstarENuBadVtx( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KstarEBadVtx = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)+ e-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)> %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarESelBadVtx=Selection("KstarEBadVtx_for"+self._name,
+                                Algorithm=_KstarEBadVtx,
+                                RequiredSelections = [self._electronFilter(), self._Kstar2KPiFilter()])
+        _KstarESelBadVtx = tosSelection(_KstarESelBadVtx,{'Hlt2.*TopoE2Body.*Decision%TOS':0,'Hlt2.*TopoE3Body.*Decision%TOS':0,'Hlt2.*Single.*Electron.*Decision%TOS':0})
+        return _KstarESelBadVtx
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XuMuNu.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XuMuNu.py
new file mode 100644
index 000000000..3bbb84cac
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingB2XuMuNu.py
@@ -0,0 +1,2214 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = ['Phillip Urquijo, Alessandra Borgia', 'Michel De Cian']
+__date__ = '11/01/2019'
+__version__ = '$Revision: 1.6 $'
+
+'''
+B->Xu mu nu exclusive reconstruction in Xu=pi/rho/omega/phi/K/K*+ channels
+'''
+# =============================================================================
+##
+#  B->Xu mu nu exclusive reconstruction in Xu=pi/rho/omega/phi/K/K*+ channels
+#
+#  Stripping lines for charmless semileptonic B+/B0/Bs decays
+#  to final states with hadron+muon, where the hadron is
+#  either a charged track or a resonance
+#  The charmless hadronic signal modes are:
+#
+#  B0 -> pi+ mu nu
+#  B+ -> rho mu nu
+#  B+ -> omega mu nu
+#  Bs0 -> K+  mu- nu, 
+#  B -> phi mu nu
+#  Bs0 -> K*+ mu- nu, (with K*+->KS0 Pi)
+#
+############
+#  Also added are 2 new lines for Majorana Neutrino decays.
+#  B- -> KS0 mu- nu, with KS0 ->pi+ mu- (SS = Same Sign)
+#  B- -> KS0 mu- nu, with KS0 ->pi- mu+ (OS = Opposite Sign)
+############
+#
+#  Stripping XX, with requirements that the
+#  rate <0.05% and timing <1ms/evt.
+## 
+
+"""
+##
+#  B->Xu mu nu exclusive reconstruction in Xu=pi/rho/omega/phi/K/K*+ channels
+#
+#  Stripping lines for charmless semileptonic B+/B0/Bs decays
+#  to final states with hadron+muon, where the hadron is
+#  either a charged track or a resonance
+#  The charmless hadronic signal modes are:
+#
+#  B0 -> pi+ mu nu
+#  B+ -> rho mu nu
+#  B+ -> omega mu nu
+#  Bs0 -> K+  mu- nu, 
+#  B -> phi mu nu
+#  Bs0 -> K*+ mu- nu, (with K*+->KS0 Pi)
+#
+############
+#  Also added are 2 new lines for Majorana Neutrino decays.
+#  B- -> KS0 mu- nu, with KS0 ->pi+ mu- (SS = Same Sign)
+#  B- -> KS0 mu- nu, with KS0 ->pi- mu+ (OS = Opposite Sign)
+############
+#
+#  Stripping XX, with requirements that the
+#  rate <0.05% and timing <1ms/evt.
+
+Last modification $Date: 2018-January-10 $
+               by $Author: decianm $
+"""
+
+
+default_config = {
+  'NAME'        : 'B2XuMuNu',
+  'WGs'         : ['Semileptonic'],
+  'BUILDERTYPE' : 'B2XuMuNuBuilder',
+  'CONFIG'      :  {
+      "GEC_nLongTrk"        : 250.  , #adimensional
+      "TRGHOSTPROB"         : 0.5    ,#adimensional
+      #Muons
+      "MuonGHOSTPROB"       : 0.35  ,#adimensional
+      "MuonTRCHI2"          : 4.    ,#adimensional
+      "MuonP"               : 3000. ,#MeV
+      "MuonPTight"          : 6000. ,#MeV
+      "MuonPT"              : 1000. ,#MeV
+      "MuonPTTight"         : 1500. ,#MeV
+      "MuonPIDK"            : 0.    ,#adimensional
+      "MuonPIDmu"           : 3.    ,#adimensional
+      "MuonPIDp"            : 0.    ,#adimensional
+      "MuonMINIPCHI2"       : 25    ,#adminensional
+      #Xu
+      #K channel
+      "KaonTRCHI2"          : 4.     ,#adimensional
+      "KaonP"               : 3000.  ,#MeV
+      "KaonPTight"          : 10000. ,#MeV
+      "KaonPT"              : 400.   ,#MeV
+      "KaonPTTight"         : 1000.   ,#MeV
+      "KaonPIDK"            : 5.     ,#adimensional 
+      "KaonPIDmu"           : 5.     ,#adimensional
+      "KaonPIDp"            : 5.     ,#adimensional
+      "KaonPIDK_phi"        : 2.     ,#adimensional 
+      "KaonPIDmu_phi"       : -2.    ,#adimensional
+      "KaonPIDp_phi"        : -2.    ,#adimensional
+      "KaonMINIPCHI2"       : 36     ,#adminensional
+      #Pion channel
+      "PionTRCHI2"          : 4.     ,#adimensional
+      "PionP"               : 3000.  ,#MeV
+      "PionPTight"          : 10000. ,#MeV
+      "PionPT"              : 300.   ,#MeV
+      "PionPTTight"         : 800.   ,#MeV
+      "PionPIDK"            : -2.    ,#adimensional 
+      "PionMINIPCHI2"       : 36      ,#adminensional
+      
+      #phi channel
+      "PhiUpperMass"        : 2200. ,#MeV
+      "PhiVCHI2DOF"         : 6     ,#adimensional
+      "PhiPT"               : 600.  ,#MeV
+      "PhiMINIPCHI2"        : 9     ,#adimensional
+      "PhiDIRA"             : 0.9   ,#adimensional
+
+      #Rho channel
+      "RhoMassWindow"       : 1500. ,#MeV
+      "RhoMassWindowMin1SB" : 300.  ,#MeV
+      "RhoMassWindowMax1SB" : 620.  ,#MeV
+      "RhoMassWindowMin2SB" : 920.  ,#MeV
+      "RhoMassWindowMax2SB" : 1200. ,#MeV
+      "RhoVCHI2DOF"         : 4     ,#adimensional
+      "RhoPT"               : 1000.  ,#MeV
+      "RhoLeadingPionPT"    : 900.  ,#MeV
+      "RhoLeadingPionP"     : 5000.  ,#MeV
+      "RhoMINIPCHI2"        : 50    ,#adimensional
+      "RhoChPionPT"         : 400.  ,#MeV
+      "RhoChPionTRCHI2"     : 4.   ,#MeV
+      "RhoChPionPIDK"       : -2.  ,#adminensional
+                   #    "RhoFDCHI2"           : 100.  ,#adimensional
+                   #    "RhoFD"               : 6     ,#mm
+                   #    "RhoIPMin"            : 0.3   ,#mm    
+      "RhoDIRA"             : 0.98   ,#adimensional
+      "RhoChPionMINIPCHI2"  : 36.    ,#adimensional
+      # Omega cuts
+      "OmegaChPionPT"       : 300, #MeV
+      "OmegaPi0PT"          : 500, #MeV
+      "OmegaChPionMINIPCHI2": 25, #adimensional
+      "OmegaChPionPIDK"     : 0, #adimensional
+      "OmegaMassWindow"     : 150, #MeV
+      "OmegaVCHI2DOF"       : 6, #MeV
+      #Kshort Daughter Cuts
+      "KS0DaugP"            : 2000. ,#MeV
+      "KS0DaugPT"           : 100.  ,#MeV
+      "KS0DaugTrackChi2"    : 4.    ,#adimensional
+      "KS0DaugMIPChi2"      : 50.   ,#adimensional
+      #Kshort cuts
+      "KSMajoranaCutFDChi2" : 100.  ,#adimensional
+      "KS0VertexChi2"       : 4.    ,#adimensional
+      "KS0PT"               : 250.  ,#adimensional
+      "KsLLMaxDz"           : 650.  ,#mm
+      "KsLLCutFD"           : 20.   ,#mm
+      "KSLLMassLow"         : 456.  ,#MeV
+      "KSLLMassHigh"        : 536.  ,#MeV
+      "KSLLCutFDChi2"       : 0.    ,#adimensional
+      "KS0MIPChi2"          : 0.    ,#adimensional
+      'KS0Z'                : 0.    ,#mm
+      #Kstar Cuts
+      "KstarMassWindow"     : 1200  ,#MeV
+      "KstarPT"             : 800   ,#MeV
+      #Kstar Daughter cuts
+      "KstarChPionPT"       : 250.  ,#MeV
+      "KstarChPionP"        : 3000. ,#MeV
+      "KstarChPionTRCHI2"   : 4.    ,#adimensional
+      "KstarChPionMINIPCHI2": 25.   ,#adimensional
+      "KstarChPionPIDK"     : 2.    ,#adminensional
+      #B Mother Cuts
+      "BVCHI2DOF"           : 6.    ,#adminensional, for 3- or more-track vertices
+      "BVCHI2DOFTight"      : 4.    ,#adminensional, ideally for 2-track vertices
+      "BDIRA"               : 0.99  ,#adminensional
+      "BDIRAMed"            : 0.994 ,#adminensional
+      "BDIRATight"          : 0.999 ,#adminensional
+      "BFDCHI2HIGH"         : 100.  ,#adimensional
+      "BFDCHI2Tight"        : 120.  ,#adimensional
+      "BFDCHI2ForPhi"       : 50.   ,#adimensional
+      #B Mass Minima
+      "KMuMassLowTight"     : 1500. ,#MeV
+      "PhiMu_MCORR"         : 2500. ,#MeV
+      "RhoMuMassLowTight"   : 2000. ,#MeV
+      "KS0MuMassLowTight"   : 3000. ,#MeV
+      "KstarMuMassLowTight" : 2500. ,#MeV
+      #B corrected mass limits
+      "BCorrMLow"           : 2500. ,#MeV
+      "BCorrMHigh"          : 7000. ,#MeV
+      #
+      "XMuMassUpper"        : 5500. ,#MeV
+      "XMuMassUpperHigh"    : 6500. ,#MeV
+      "Enu"                 : 1850. ,#MeV
+      "EnuK"                : 2000. ,#MeV      
+      # Prescales
+      'NoPrescales'         : False,
+      'PiMuNu_prescale'     : 0.2
+      },
+  'STREAMS'     : ['Semileptonic']    
+}
+
+from Gaudi.Configuration import *
+from StrippingUtils.Utils import LineBuilder
+
+import logging
+def makeTOSFilter(name,specs):
+    from Configurables import TisTosParticleTagger
+    tosFilter = TisTosParticleTagger(name+'TOSFilter')
+    tosFilter.TisTosSpecs = specs
+    tosFilter.ProjectTracksToCalo = False
+    tosFilter.CaloClustForCharged = False
+    tosFilter.CaloClustForNeutral = False
+    tosFilter.TOSFrac = {4:0.0, 5:0.0}
+    #tosFilter.PassOnAll = True
+    return tosFilter
+
+def tosSelection(sel,specs):
+    from PhysSelPython.Wrappers import Selection 
+    '''Filters Selection sel to be TOS.'''
+    tosFilter = makeTOSFilter(sel.name(),specs)
+    return Selection(sel.name()+'TOS', Algorithm=tosFilter,
+                     RequiredSelections=[sel])
+
+default_name="B2XuMuNu"
+
+class B2XuMuNuBuilder(LineBuilder):
+    """
+    Definition of B->Xu mu nu stripping module
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+        self.config=config
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        self._stdVeryLooseKsLL = DataOnDemand("Phys/StdVeryLooseKsLL/Particles")
+        self._stdLooseKsLD = DataOnDemand("Phys/StdLooseKsLD/Particles")
+        self._stdLooseKsDD = DataOnDemand("Phys/StdLooseKsDD/Particles")
+
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        ## Muons
+        self._muonSel=None
+        self._muonFilter()
+        
+        self._muonSelNoPID=None
+        self._muonFilterNoPID()
+
+        self._muonSelTOS=None
+        self._muonFilterTOS()
+
+        self._muonSelTOSNoPID=None
+        self._muonFilterTOSNoPID()
+        
+        self._muonSelTight=None
+        self._muonFilterTight()
+
+        self._muonSelTightNoPID=None
+        self._muonFilterTightNoPID()
+
+        self._MajoranaLineMuSel=None
+        self._MajoranaLineMuFilter()
+
+        ## Pions
+        self._pionSel=None
+        self._pionFilter()
+
+        self._pionSelNoPID=None
+        self._pionFilterNoPID()
+        
+        self._pionSelTight=None
+        self._pionFilterTight()
+
+        self._pionSelTightNoPID=None
+        self._pionFilterTightNoPID()
+
+        ## Kaons
+        self._kaonSel=None
+        self._kaonFilter()
+        
+        self._kaonForPhiSel=None
+        self._kaonForPhiFilter()
+
+        self._kaonSelNoPID=None
+        self._kaonFilterNoPID()
+
+        self._kaonForPhiSelNoPID=None
+        self._kaonForPhiFilterNoPID()
+
+        ## Rhos
+        self._rho770Sel=None
+        self._Rho02PiPiFilter()
+
+        self._rho770WSSel=None
+        self._Rho02PiPiWSFilter()
+
+        self._rho770SBSel=None
+        self._Rho02PiPiSBFilter()
+
+        self._rho770SelNoPID=None
+        self._Rho02PiPiFilterNoPID()
+
+        ## Omega
+        self._omega782Sel=None
+        self._Omega2PiPiPi0Filter()
+        
+        self._omega782WSSel=None
+        self._Omega2PiPiPi0WSFilter()
+        
+        self._omega782SelNoPID=None
+        self._Omega2PiPiPi0FilterNoPID()
+
+        ## Phi
+        self._phi1020Sel=None
+        self._Phi2KKFilter()
+        
+        self._phi1020SelWS=None
+        self._Phi2KKFilterWS()
+
+        self._phi1020SelNoPID=None
+        self._Phi2KKFilterNoPID()
+        
+        ## KS for Majorana
+        self._KshMajoranaSSMuSel=None
+        self._KshMajoranaSSMuFilter()
+
+        self._KshMajoranaOSMuSel=None
+        self._KshMajoranaOSMuFilter()
+
+        ## KS for other stuff
+        self._KSSel=None
+        self._KsFilter()
+
+        self._KstarSel=None
+        self._Kstar2KPiFilter()
+
+        self._KstarSelNoPID=None
+        self._Kstar2KPiFilterNoPID()
+
+        ###########################################
+        ##
+        ## Register the stripping lines
+        ##
+        ###########################################
+        # pi lines
+        self.registerLine(self._Pi_line())
+        self.registerLine(self._Pi_NoMuTopo_line())
+        self.registerLine(self._Pi_NoPIDmu_line())
+        self.registerLine(self._Pi_NoPIDhad_line())
+        self.registerLine(self._PiSS_line())
+        # K lines
+        self.registerLine(self._K_line())
+        self.registerLine(self._K_NoMuTopo_line())
+        self.registerLine(self._KSS_line())
+        self.registerLine(self._K_NoPIDmu_line())
+        self.registerLine(self._KSS_NoPIDmu_line())
+        self.registerLine(self._K_NoPIDK_line())
+        self.registerLine(self._KSS_NoPIDK_line())
+        self.registerLine(self._K_NoPIDKmu_line())
+        self.registerLine(self._KSS_NoPIDKmu_line())
+        # phi lines
+        self.registerLine(self._Phi_line())
+        self.registerLine(self._Phi_NoMuTopo_line())
+        self.registerLine(self._PhiWS_line())
+        self.registerLine(self._Phi_NoPIDmu_line())
+        self.registerLine(self._Phi_NoPIDhad_line())
+        self.registerLine(self._PhiBadVtx_line())
+        # rho lines
+        self.registerLine(self._Rho_line())
+        self.registerLine(self._Rho_NoMuTopo_line())
+        self.registerLine(self._Rho_NoPIDmu_line())
+        self.registerLine(self._Rho_NoPIDhad_line())
+        self.registerLine(self._RhoWS_line())
+        self.registerLine(self._RhoBadVtx_line())
+        #self.registerLine(self._RhoSB_line()) With a large rho mass window, this is not needed anymore
+        # omega lines
+        self.registerLine(self._Omega_line())
+        self.registerLine(self._Omega_NoMuTopo_line())
+        self.registerLine(self._Omega_NoPIDmu_line())
+        self.registerLine(self._Omega_NoPIDhad_line())
+        self.registerLine(self._OmegaWS_line())
+        self.registerLine(self._OmegaBadVtx_line())
+        # majorana lines
+        self.registerLine(self._KshMajoranaSSMu_line())
+        self.registerLine(self._KshMajoranaOSMu_line())
+        # Kstar lines
+        self.registerLine(self._Kstar_line())
+        self.registerLine(self._Kstar_NoMuTopo_line())
+        self.registerLine(self._Kstar_NoPIDmu_line())
+        self.registerLine(self._Kstar_NoPIDhad_line())
+        self.registerLine(self._KstarSS_line())
+        self.registerLine(self._KstarBadVtx_line())
+
+    ### Muons
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (PIDmu > %(MuonPIDmu)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+
+    def _NominalMuSelectionNoPID( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+
+    def _NominalMuSelectionTight( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonPTight)s *MeV) &  (PT> %(MuonPTTight)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (PIDmu > %(MuonPIDmu)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+   
+    def _NominalMuSelectionTightNoPID( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonPTight)s *MeV) &  (PT> %(MuonPTTight)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+
+
+    def _MajoranaLineMuSelection( self ):
+        return "(P > %(KS0DaugP)s) & (PT > %(KS0DaugPT)s)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "&(TRCHI2DOF < %(KS0DaugTrackChi2)s ) & (PIDmu-PIDpi> %(MuonPIDmu)s )& (PIDmu-PIDp> %(MuonPIDp)s )"\
+               "&(PIDmu-PIDK> %(MuonPIDK)s )&(MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s)"\
+
+    ### Kaons
+    def _NominalKSelection( self ):
+        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonPTight)s *MeV) &  (PT> %(KaonPTTight)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK > %(KaonPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    def _NominalKSelectionNoPID( self ):
+        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonPTight)s *MeV) &  (PT> %(KaonPTTight)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    def _KforPhiSelection( self ):
+        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK> %(KaonPIDK_phi)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    def _KforPhiSelectionNoPID( self ):
+        return "(TRCHI2DOF < %(KaonTRCHI2)s )&  (P> %(KaonP)s *MeV) &  (PT> %(KaonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(KaonMINIPCHI2)s )"
+
+    ### Pions
+    def _NominalPiSelection( self ):
+        return "(TRCHI2DOF < %(PionTRCHI2)s )&  (P> %(PionP)s *MeV) &  (PT> %(PionPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK < %(PionPIDK)s )"\
+               "& (PIDmu < 2 ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"
+
+    def _NominalPiSelectionNoPID( self ):
+        return "(TRCHI2DOF < %(PionTRCHI2)s )&  (P> %(PionP)s *MeV) &  (PT> %(PionPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK < %(PionPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"
+
+    def _NominalPiSelectionTight( self ):
+        return "(TRCHI2DOF < %(PionTRCHI2)s )&  (P> %(PionPTight)s *MeV) &  (PT> %(PionPTTight)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDK < %(PionPIDK)s )"\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"
+
+    def _NominalPiSelectionTightNoPID( self ):
+        return "(TRCHI2DOF < %(PionTRCHI2)s )&  (P> %(PionPTight)s *MeV) &  (PT> %(PionPTTight)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(PionMINIPCHI2)s )"
+    
+    ### K shorts
+    def _NominalKsSelection( self ):
+        return " (BPVVD >%(KsLLCutFD)s*mm)& (MM>%(KSLLMassLow)s*MeV)&(MM<%(KSLLMassHigh)s*MeV)  & (BPVVDCHI2> %(KSLLCutFDChi2)s ) & (PT > %(KS0PT)s*MeV) & (VFASPF(VCHI2PDOF) < %(KS0VertexChi2)s) & CHILDCUT((TRCHI2DOF < %(KS0DaugTrackChi2)s),1) & CHILDCUT((TRCHI2DOF < %(KS0DaugTrackChi2)s),2) & CHILDCUT((MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s),1) & CHILDCUT((MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s),2) & (MIPCHI2DV(PRIMARY) > %(KS0MIPChi2)s)"
+
+    #####################################
+
+    ## Nomenclature
+    ## SS = Same-sign, the same charge for the muon and the hadron (pi+ mu+, K+, mu+, etc.)
+    ## WS = wrong-sign, the same chargef for the decay products of the resonance ( rho -> pi+ pi+, omega -> pi+ pi+ pi0, phi -> K+ K+)
+
+    ##### B -> pi mu nu lines
+    def _Pi_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Pi_Line', prescale = 1.0 if NoPS else self.config["PiMuNu_prescale"],
+                             FILTER=self.GECs,
+                             algos = [ self._B2PiMuNu()])
+    
+    def _Pi_NoMuTopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Pi_NoMuTopoLine', prescale = 1.0 if NoPS else 0.05,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PiMuNuNoMuTopo()])
+
+    def _PiSS_line( self ):
+        NoPS =  self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Pi_SSLine', prescale =  1.0 if NoPS else self.config["PiMuNu_prescale"],
+                             FILTER=self.GECs,
+                             algos = [ self._B2PiMuNuSS()])
+    
+    def _Pi_NoPIDmu_line( self ):
+        NoPS =  self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Pi_NoPIDMuLine', prescale = 1.0 if NoPS else 0.005,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PiMuNuNoPIDmu()])
+    
+    def _Pi_NoPIDhad_line( self ):
+        NoPS =  self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Pi_NoPIDPiLine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PiMuNuNoPIDhad()])
+
+    ###### Bs -> K mu nu lines
+    def _K_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KMuNu()])
+    
+    def _K_NoMuTopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_NoMuTopoLine', prescale =  1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KMuNuNoMuTopo()])
+
+    def _KSS_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_SSLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KMuNuSS()])
+   
+    def _K_NoPIDmu_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_NoPIDMuLine', prescale = 1.0 if NoPS else .02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KMuNu_NoPIDmu()])
+    
+    def _KSS_NoPIDmu_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_SSNoPIDMuLine', prescale = 1.0 if NoPS else .02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KMuNuSS_NoPIDmu()])
+    
+    def _K_NoPIDK_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_NoPIDKLine', prescale = 1.0 if NoPS else .02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KMuNu_NoPIDK()])
+    
+    def _KSS_NoPIDK_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_SSNoPIDKLine', prescale = 1.0 if NoPS else .02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KMuNuSS_NoPIDK()])
+    
+    def _K_NoPIDKmu_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_NoPIDKMuLine', prescale = 1.0 if NoPS else .02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KMuNu_NoPIDKmu()])
+    
+    def _KSS_NoPIDKmu_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2K_SSNoPIDKMuLine', prescale = 1.0 if NoPS else .02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KMuNuSS_NoPIDKmu()])
+
+    ##### Bs -> phi/KK mu nu lines
+    def _Phi_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiMuNu()])
+
+    def _Phi_NoMuTopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_NoMuTopoLine', prescale = 1.0 if NoPS else 0.2,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiMuNuNoMuTopo()])
+    
+    def _PhiWS_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_WSLine', prescale = 1.0 if NoPS else 0.2,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiMuNuWS()])
+    
+    def _Phi_NoPIDmu_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_NoPIDMuLine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiMuNu_NoPIDmu()])
+
+    def _Phi_NoPIDhad_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_NoPIDKLine', prescale = 1.0 if NoPS else 0.01,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiMuNu_NoPIDhad()])
+    
+    def _PhiBadVtx_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'B2Phi_BadVtxLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._B2PhiMuNuBadVtx()])
+
+
+    ##### B -> rho/pipi mu nu lines
+    def _Rho_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoMuNu()])
+    
+    def _Rho_NoMuTopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_NoMuTopoLine', prescale =  1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoMuNuNoMuTopo()])
+
+    def _Rho_NoPIDmu_line(self):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_NoPIDMuLine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoMuNu_NoPIDmu()])
+
+    def _Rho_NoPIDhad_line(self):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_NoPIDPiLine', prescale = 1.0 if NoPS else 0.05,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoMuNu_NoPIDhad()])
+    
+    def _RhoWS_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_WSLine', prescale = 1.0 if NoPS else 0.2,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoMuNuWS()])
+    
+    def _RhoBadVtx_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_BadVtxLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoMuNuBadVtx()])
+    
+    def _RhoSB_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Rho_SBLine', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2RhoMuNuSB()])
+    
+    ##### B -> omega mu nu lines
+    def _Omega_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaMuNu()])
+
+    def _Omega_NoMuTopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_NoMuTopoLine', prescale =  1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaMuNuNoMuTopo()])
+    
+    def _Omega_NoPIDmu_line(self):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_NoPIDMuLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaMuNu_NoPIDmu()])
+    
+    def _Omega_NoPIDhad_line(self):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_NoPIDPiLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaMuNu_NoPIDhad()])
+
+    def _OmegaWS_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_WSLine', prescale = 1.0 if NoPS else 0.3,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaMuNuWS()])
+    
+    def _OmegaBadVtx_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2Omega_BadVtxLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2OmegaMuNuBadVtx()])
+
+    ##### Ks majorana lines
+    def _KshMajoranaSSMu_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2KshSSMu_SSMuminus_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2KshSSMuNu_SSMuminus()])
+    
+    def _KshMajoranaOSMu_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bu2KshOSMu_SSMuplus_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bu2KshOSMuNu_SSMuplus()])
+
+    ##### Bs -> K*/Kspi mu nu lines
+    def _Kstar_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarMuNu()])
+
+    def _Kstar_NoMuTopo_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_NoMuTopoLine', prescale = 1.0 if NoPS else 0.1,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarMuNuNoMuTopo()])
+
+    def _Kstar_NoPIDmu_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_NoPIDMuLine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarMuNu_NoPIDmu()])
+
+    def _Kstar_NoPIDhad_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_NoPIDPiLine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarMuNu_NoPIDhad()])
+    
+    def _KstarSS_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_SSLine', prescale = 1.0 if NoPS else 0.3,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarMuNuSS()])
+
+    def _KstarBadVtx_line( self ):
+        NoPS = self.config['NoPrescales']
+        from StrippingConf.StrippingLine import StrippingLine
+        return StrippingLine(self._name+'Bs2Kstar_BadVtxLine', prescale = 1.0 if NoPS else 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._Bs2KstarMuNuBadVtx()])
+
+    ###############################
+    ##
+    ## Filters for particles
+    ##
+    ##############################
+
+    ### Muons
+    def _muonFilter( self ):
+        if self._muonSel is not None:
+            return self._muonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseMuons
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+        _muSel=Selection("Mu_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseMuons])
+        
+        self._muonSel=_muSel
+        
+        return _muSel
+
+    ######--######
+    def _muonFilterNoPID( self ):
+        if self._muonSelNoPID is not None:
+            return self._muonSelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsMuons
+        _muNoPID = FilterDesktop( Code = self._NominalMuSelectionNoPID() % self._config )
+        _muSelNoPID=Selection("MuNoPID_for"+self._name,
+                         Algorithm=_muNoPID,
+                         RequiredSelections = [StdNoPIDsMuons])
+        
+        self._muonSelNoPID=_muSelNoPID
+        
+        return _muSelNoPID
+
+    
+    ######--######
+    def _muonFilterTight( self ):
+        if self._muonSelTight is not None:
+            return self._muonSelTight
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseMuons
+        _muTight = FilterDesktop( Code = self._NominalMuSelectionTight() % self._config )
+        _muTightSel=Selection("MuTightCuts_for"+self._name,
+                         Algorithm=_muTight,
+                         RequiredSelections = [StdLooseMuons])
+        
+        self._muonSelTight=_muTightSel
+        
+        return _muTightSel
+
+    ######--######
+    def _muonFilterTightNoPID( self ):
+        if self._muonSelTightNoPID is not None:
+            return self._muonSelTightNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsMuons
+        _muTightNoPID = FilterDesktop( Code = self._NominalMuSelectionTightNoPID() % self._config )
+        _muTightSelNoPID=Selection("MuTightNoPIDCuts_for"+self._name,
+                         Algorithm=_muTightNoPID,
+                         RequiredSelections = [StdNoPIDsMuons])
+        
+        self._muonSelTightNoPID=_muTightSelNoPID
+        
+        return _muTightSelNoPID
+
+    ######--######
+    def _muonFilterTOS( self ):
+        if self._muonSelTOS is not None:
+            return self._muonSelTOS
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseMuons
+        _muTOS = FilterDesktop( Code = self._NominalMuSelectionTight() % self._config )
+        _muSelTOS=Selection("MuL0TOS_for"+self._name,
+                            Algorithm=_muTOS,
+                            RequiredSelections = [StdLooseMuons])
+        _muSelTOS = tosSelection(_muSelTOS,{'L0.*Muon.*Decision%TOS':0})
+
+        self._muonSelTOS=_muSelTOS
+        
+        return _muSelTOS
+
+    ######--######
+    def _muonFilterTOSNoPID( self ):
+        if self._muonSelTOSNoPID is not None:
+            return self._muonSelTOSNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsMuons
+        _muTOSNoPID = FilterDesktop( Code = self._NominalMuSelectionTightNoPID() % self._config )
+        _muSelTOSNoPID = Selection("MuL0TOSNoPID_for"+self._name,
+                                   Algorithm=_muTOSNoPID,
+                                   RequiredSelections = [StdNoPIDsMuons])
+        _muSelTOSNoPID = tosSelection(_muSelTOSNoPID,{'L0.*Muon.*Decision%TOS':0})
+
+        self._muonSelTOSNoPID=_muSelTOSNoPID
+        
+        return _muSelTOSNoPID
+
+    ## Pions
+    ######--######
+    def _pionFilter( self ):
+        if self._pionSel is not None:
+            return self._pionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _pi = FilterDesktop( Code = self._NominalPiSelection() % self._config )
+        _piSel=Selection("Pi_for"+self._name,
+                         Algorithm=_pi,
+                         RequiredSelections = [StdLoosePions])
+        self._pionSel=_piSel
+        return _piSel
+
+    ######--######
+    def _pionFilterNoPID( self ):
+        if self._pionSelNoPID is not None:
+            return self._pionSelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsPions
+        
+        _piNoPID = FilterDesktop( Code = self._NominalPiSelectionNoPID() % self._config )
+        _piSelNoPID=Selection("PiNoPID_for"+self._name,
+                         Algorithm=_piNoPID,
+                         RequiredSelections = [StdNoPIDsPions])
+        self._pionSelNoPID = _piSelNoPID
+        return _piSelNoPID
+
+    ######--######
+    def _pionFilterTight( self ):
+        if self._pionSelTight is not None:
+            return self._pionSelTight
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _piTight = FilterDesktop( Code = self._NominalPiSelectionTight() % self._config )
+        _piSelTight=Selection("PiTight_for"+self._name,
+                         Algorithm=_piTight,
+                         RequiredSelections = [StdLoosePions])
+        self._pionSelTight=_piSelTight
+        return _piSelTight
+    
+    ######--######
+    def _pionFilterTightNoPID( self ):
+        if self._pionSelTightNoPID is not None:
+            return self._pionSelTightNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsPions
+        
+        _piNoPIDTight = FilterDesktop( Code = self._NominalPiSelectionTightNoPID() % self._config )
+        _piSelNoPIDTight=Selection("PiTightNoPID_for"+self._name,
+                         Algorithm=_piNoPIDTight,
+                         RequiredSelections = [StdNoPIDsPions])
+        self._pionSelTightNoPID=_piSelNoPIDTight
+        return _piSelNoPIDTight
+
+    ## Kaons
+    
+    ######Kaon Filter######
+    def _kaonFilter( self ):
+        if self._kaonSel is not None:
+            return self._kaonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseKaons
+        
+        _ka = FilterDesktop( Code = self._NominalKSelection() % self._config )
+        _kaSel=Selection("K_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdLooseKaons])
+        self._kaonSel=_kaSel
+        return _kaSel
+
+    ######--######
+    def _kaonFilterNoPID( self ):
+        if self._kaonSelNoPID is not None:
+            return self._kaonSelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseKaons
+        
+        _ka = FilterDesktop( Code = self._NominalKSelectionNoPID() % self._config )
+        _kaSelNoPID=Selection("KNoPID_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdLooseKaons])
+        self._kaonSelNoPID=_kaSelNoPID
+        return _kaSelNoPID
+
+    ######--######
+    def _kaonForPhiFilter( self ):
+        if self._kaonForPhiSel is not None:
+            return self._kaonForPhiSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseKaons
+        
+        _ka = FilterDesktop( Code = self._KforPhiSelection() % self._config )
+        _kaSel=Selection("K_Phi"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdLooseKaons])
+        self._kaonForPhiSel=_kaSel
+        return _kaSel
+
+    ######--######
+    def _kaonForPhiFilterNoPID( self ):
+        if self._kaonForPhiSelNoPID is not None:
+            return self._kaonForPhiSelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsKaons
+        
+        _kaNoPID = FilterDesktop( Code = self._KforPhiSelectionNoPID() % self._config )
+        _kaSelNoPID=Selection("KNoPID_Phi"+self._name,
+                         Algorithm=_kaNoPID,
+                         RequiredSelections = [StdNoPIDsKaons])
+        self._kaonForPhiSelNoPID = _kaSelNoPID
+        return _kaSelNoPID
+
+    ######Majorana Muon Filter######
+    def _MajoranaLineMuFilter( self ):
+        if self._MajoranaLineMuSel is not None:
+            return self._MajoranaLineMuSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseMuons
+        _mumajorana = FilterDesktop( Code = self._MajoranaLineMuSelection() % self._config )
+        _mumajoranaSel=Selection("MuMajorana_for"+self._name,
+                                 Algorithm=_mumajorana,
+                                 RequiredSelections = [StdLooseMuons])
+        
+        self._MajoranaLineMuSel=_mumajoranaSel
+        
+        return _mumajoranaSel
+    
+    #####
+    ## Composites
+    #####
+    
+    ######--######
+    def _KsFilter( self ):
+        if self._KSSel is not None:
+           return self._KSSel
+       
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles, FilterDesktop
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        
+        _code =  FilterDesktop( Code = self._NominalKsSelection() % self._config )
+      
+        _KsSel=Selection("KS02PiPi_for"+self._name,
+                         Algorithm= _code,
+                         RequiredSelections = [self._stdVeryLooseKsLL,self._stdLooseKsLD,self._stdLooseKsDD])
+      
+        self._KSSel = _KsSel
+      
+        return _KsSel
+    
+    ##### phi -> KK filter (generall di-kaon filter) #####
+    def _Phi2KKFilter( self ):
+        if self._phi1020Sel is not None:
+            return self._phi1020Sel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _phi1020 = CombineParticles(
+            DecayDescriptors = ["phi(1020) -> K- K+"] ,
+            CombinationCut = "(AM< %(PhiUpperMass)s)" % self._config,
+            MotherCut       = "(VFASPF(VCHI2/VDOF) < %(PhiVCHI2DOF)s ) & (PT > %(PhiPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(PhiMINIPCHI2)s ) & (BPVDIRA> %(PhiDIRA)s)" %self._config
+            )
+        _phi1020Sel=Selection("PhiKK_for"+self._name,
+                             Algorithm=_phi1020,
+                             RequiredSelections = [self._kaonForPhiFilter()])
+        
+        self._phi1020Sel=_phi1020Sel
+        
+        return _phi1020Sel
+
+    ######--######
+    def _Phi2KKFilterNoPID( self ):
+        if self._phi1020SelNoPID is not None:
+            return self._phi1020SelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _phi1020NoPID = CombineParticles(
+            DecayDescriptors = ["phi(1020) -> K- K+"] ,
+            CombinationCut = "(AM< %(PhiUpperMass)s)" % self._config,
+            MotherCut       = "(VFASPF(VCHI2/VDOF) < %(PhiVCHI2DOF)s ) & (PT > %(PhiPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(PhiMINIPCHI2)s ) & (BPVDIRA> %(PhiDIRA)s)" %self._config
+            )
+        _phi1020SelNoPID=Selection("PhiKKNoPID_for"+self._name,
+                             Algorithm=_phi1020NoPID,
+                             RequiredSelections = [self._kaonForPhiFilterNoPID()])
+        
+        self._phi1020SelNoPID=_phi1020SelNoPID
+        
+        return _phi1020SelNoPID
+
+    ######--######
+    def _Phi2KKFilterWS( self ):
+        if self._phi1020SelWS is not None:
+            return self._phi1020SelWS
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _phi1020WS = CombineParticles(
+            DecayDescriptors = ["[phi(1020) -> K+ K+]cc"] ,
+            CombinationCut = "(AM< %(PhiUpperMass)s)" % self._config,
+            MotherCut       = "(VFASPF(VCHI2/VDOF) < %(PhiVCHI2DOF)s ) & (PT > %(PhiPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(PhiMINIPCHI2)s ) & (BPVDIRA> %(PhiDIRA)s)" %self._config
+            )
+        _phi1020SelWS=Selection("PhiKKWS_for"+self._name,
+                                Algorithm=_phi1020WS,
+                                RequiredSelections = [self._kaonForPhiFilter()])
+        
+        self._phi1020SelWS=_phi1020SelWS
+        
+        return _phi1020SelWS
+
+    
+    #####Make the Rho######
+    def _Rho02PiPiFilter( self ):
+        if self._rho770Sel is not None:
+            return self._rho770Sel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _rho770 = CombineParticles(
+            DecayDescriptors = ["rho(770)0 -> pi- pi+"] ,
+            DaughtersCuts   = {"pi+":"(PT> %(RhoChPionPT)s *MeV) & (TRCHI2DOF < %(RhoChPionTRCHI2)s )"\
+                               "& (MIPCHI2DV(PRIMARY)> %(RhoChPionMINIPCHI2)s )"\
+                               "& (PIDK < %(RhoChPionPIDK)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config
+                               },
+            CombinationCut = "(ADAMASS('rho(770)0')< %(RhoMassWindow)s)" % self._config,
+            MotherCut       = "(MAXTREE('pi+'==ABSID,PT )>%(RhoLeadingPionPT)s *MeV )"\
+            "& (MAXTREE('pi+'==ABSID,P )>%(RhoLeadingPionP)s *MeV )"\
+            "& (VFASPF(VCHI2/VDOF) < %(RhoVCHI2DOF)s ) & (PT > %(RhoPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(RhoMINIPCHI2)s ) & (BPVDIRA> %(RhoDIRA)s)"\
+            "& (DMASS('rho(770)0')< %(RhoMassWindow)s) " %self._config
+            )
+        _rho770Sel=Selection("Rho02PiPi_for"+self._name,
+                             Algorithm=_rho770,
+                             RequiredSelections = [self._pionFilter()])
+        
+        self._rho770Sel=_rho770Sel
+        
+        return _rho770Sel
+
+    ######--######
+    def _Rho02PiPiFilterNoPID( self ):
+        if self._rho770SelNoPID is not None:
+            return self._rho770SelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _rho770NoPID = CombineParticles(
+            DecayDescriptors = ["rho(770)0 -> pi- pi+"] ,
+            DaughtersCuts   = {"pi+":"(PT> %(RhoChPionPT)s *MeV) & (TRCHI2DOF < %(RhoChPionTRCHI2)s )"\
+                               "& (MIPCHI2DV(PRIMARY)> %(RhoChPionMINIPCHI2)s )"\
+                               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config
+                               },
+            CombinationCut = "(ADAMASS('rho(770)0')< %(RhoMassWindow)s)" % self._config,
+            MotherCut       = "(MAXTREE('pi+'==ABSID,PT )>%(RhoLeadingPionPT)s *MeV )"\
+            "& (MAXTREE('pi+'==ABSID,P )>%(RhoLeadingPionP)s *MeV )"\
+            "& (VFASPF(VCHI2/VDOF) < %(RhoVCHI2DOF)s ) & (PT > %(RhoPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(RhoMINIPCHI2)s ) & (BPVDIRA> %(RhoDIRA)s)"\
+            "& (DMASS('rho(770)0')< %(RhoMassWindow)s) " %self._config
+            )
+        _rho770SelNoPID=Selection("Rho02PiPiNoPID_for"+self._name,
+                                  Algorithm=_rho770NoPID,
+                                  RequiredSelections = [self._pionFilterNoPID()])
+        
+        self._rho770SelNoPID=_rho770SelNoPID
+        
+        return _rho770SelNoPID
+
+    ######--######
+    def _Rho02PiPiWSFilter( self ):
+        if self._rho770WSSel is not None:
+            return self._rho770WSSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _rho770WS = CombineParticles(
+            DecayDescriptors = ["[rho(770)0 -> pi+ pi+]cc"] ,
+            DaughtersCuts   = {"pi+":"(PT> %(RhoChPionPT)s *MeV) & (TRCHI2DOF < %(RhoChPionTRCHI2)s )"\
+                               "& (MIPCHI2DV(PRIMARY)> %(RhoChPionMINIPCHI2)s )"\
+                               "& (PIDK < %(RhoChPionPIDK)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config
+                               },
+            CombinationCut = "(ADAMASS('rho(770)0')< %(RhoMassWindow)s)" % self._config,
+            MotherCut      = "(MAXTREE('pi+'==ABSID,PT )>%(RhoLeadingPionPT)s *MeV )"\
+            "& (VFASPF(VCHI2/VDOF) < %(RhoVCHI2DOF)s ) & (PT > %(RhoPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(RhoMINIPCHI2)s ) & (BPVDIRA> %(RhoDIRA)s)"\
+            "& (DMASS('rho(770)0')< %(RhoMassWindow)s) " %self._config
+            )
+        _rho770SelWS=Selection("Rho02PiPiWS_for"+self._name,
+                             Algorithm=_rho770WS,
+                             RequiredSelections = [self._pionFilter()])
+        
+        self._rho770WSSel=_rho770SelWS
+        return _rho770SelWS
+    
+    ######--######
+    def _Rho02PiPiSBFilter( self ):
+        if self._rho770SBSel is not None:
+            return self._rho770SBSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _rho770SB = CombineParticles(
+            DecayDescriptors = ["rho(770)0 -> pi+ pi-"] ,
+            DaughtersCuts   = {"pi+":"(PT> %(RhoChPionPT)s *MeV) & (TRCHI2DOF < %(RhoChPionTRCHI2)s )"\
+                               "& (MIPCHI2DV(PRIMARY)> %(RhoChPionMINIPCHI2)s ) & (PIDpi-PIDK> %(RhoChPionPIDK)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config
+                               },
+            CombinationCut = "((AM > %(RhoMassWindowMin1SB)s) & (AM < %(RhoMassWindowMax1SB)s))"\
+            " | ((AM > %(RhoMassWindowMin2SB)s) & (AM < %(RhoMassWindowMax2SB)s))" % self._config,
+            
+            MotherCut       = "(MAXTREE('pi+'==ABSID,PT )>%(RhoLeadingPionPT)s *MeV )"\
+            "& (VFASPF(VCHI2/VDOF) < %(RhoVCHI2DOF)s ) & (PT > %(RhoPT)s *MeV) "\
+            "& (MIPCHI2DV(PRIMARY)> %(RhoMINIPCHI2)s ) & (BPVDIRA> %(RhoDIRA)s)"%self._config
+            )
+        _rho770SelSB=Selection("Rho02PiPiSB_for"+self._name,
+                               Algorithm=_rho770SB,
+                               RequiredSelections = [self._pionFilter()])
+        
+        self._rho770SBSel=_rho770SelSB
+        return _rho770SelSB
+
+    ### Make the omega(782) ###
+    def _Omega2PiPiPi0Filter( self ):
+        if self._omega782Sel is not None:
+            return self._omega782Sel
+        
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions, StdLooseResolvedPi0, StdLooseMergedPi0
+        
+        _omega782 = DaVinci__N3BodyDecays(
+            DecayDescriptor  = "omega(782) -> pi+ pi- pi0" ,
+            DaughtersCuts    = {"pi+":"(PT> %(OmegaChPionPT)s *MeV)"\
+                                "& (MIPCHI2DV(PRIMARY)> %(OmegaChPionMINIPCHI2)s )"\
+                                "& (PIDK < %(OmegaChPionPIDK)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config,
+                                "pi0":"(PT > %(OmegaPi0PT)s *MeV)" % self._config
+                                },
+            CombinationCut   = "(ADAMASS('omega(782)')< %(OmegaMassWindow)s)" % self._config,
+            Combination12Cut = "(AM < 800*MeV)&(ACHI2DOCA(1,2) < 8)",
+            MotherCut        = "(VFASPF(VCHI2/VDOF) < %(OmegaVCHI2DOF)s) & (DMASS('omega(782)')< %(OmegaMassWindow)s) " %self._config
+            )
+        _omega782Sel=Selection("Omega2PiPiPi0_for"+self._name,
+                               Algorithm=_omega782,
+                               RequiredSelections = [StdLoosePions, StdLooseResolvedPi0, StdLooseMergedPi0])
+        
+        self._omega782Sel=_omega782Sel
+        
+        return _omega782Sel
+
+    ######--######
+    def _Omega2PiPiPi0FilterNoPID( self ):
+        if self._omega782SelNoPID is not None:
+            return self._omega782SelNoPID
+        
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsPions, StdLooseResolvedPi0, StdLooseMergedPi0
+        
+        _omega782NoPID = DaVinci__N3BodyDecays(
+            DecayDescriptor  = "omega(782) -> pi+ pi- pi0" ,
+            DaughtersCuts    = {"pi+":"(PT> %(OmegaChPionPT)s *MeV)"\
+                                "& (MIPCHI2DV(PRIMARY)> %(OmegaChPionMINIPCHI2)s )"\
+                                "& (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config,
+                                "pi0":"(PT > %(OmegaPi0PT)s *MeV)" % self._config
+                                },
+            CombinationCut   = "(ADAMASS('omega(782)')< %(OmegaMassWindow)s)" % self._config,
+            Combination12Cut = "(AM < 800*MeV)&(ACHI2DOCA(1,2) < 8)",
+            MotherCut        = "(VFASPF(VCHI2/VDOF) < %(OmegaVCHI2DOF)s) & (DMASS('omega(782)')< %(OmegaMassWindow)s) " %self._config
+            )
+        _omega782SelNoPID=Selection("Omega2PiPiPi0NoPID_for"+self._name,
+                                    Algorithm=_omega782NoPID,
+                                    RequiredSelections = [StdNoPIDsPions, StdLooseResolvedPi0, StdLooseMergedPi0])
+        
+        self._omega782SelNoPID=_omega782SelNoPID
+        
+        return _omega782SelNoPID
+
+    ######--######
+    def _Omega2PiPiPi0WSFilter( self ):
+        if self._omega782WSSel is not None:
+            return self._omega782WSSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import DaVinci__N3BodyDecays
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions, StdLooseResolvedPi0, StdLooseMergedPi0
+        
+        _omega782WS = DaVinci__N3BodyDecays(
+            DecayDescriptor   = "[omega(782) -> pi+ pi+ pi0]cc" ,
+            DaughtersCuts     = {"pi+":"(PT> %(OmegaChPionPT)s *MeV)"\
+                                 "& (MIPCHI2DV(PRIMARY)> %(OmegaChPionMINIPCHI2)s )"\
+                                 "& (PIDK < %(OmegaChPionPIDK)s ) & (TRGHOSTPROB < %(TRGHOSTPROB)s)" % self._config,
+                                 "pi0":"(PT > %(OmegaPi0PT)s *MeV)" % self._config
+                                 },
+            CombinationCut    = "(ADAMASS('omega(782)')< %(OmegaMassWindow)s)" % self._config,
+            Combination12Cut  = "(AM < 800*MeV)&(ACHI2DOCA(1,2) < 8)",
+            MotherCut         = "(VFASPF(VCHI2/VDOF) < %(OmegaVCHI2DOF)s) & (DMASS('omega(782)')< %(OmegaMassWindow)s) " %self._config
+            )
+        _omega782WSSel=Selection("Omega2PiPiPi0WS_for"+self._name,
+                               Algorithm=_omega782WS,
+                               RequiredSelections = [StdLoosePions, StdLooseResolvedPi0, StdLooseMergedPi0])
+        
+        self._omega782WSSel=_omega782WSSel
+        
+        return _omega782WSSel
+    
+    ######Make the Kshort->MuPi Same Sign for Majorana####
+    def _KshMajoranaSSMuFilter( self ):
+        if self._KshMajoranaSSMuSel is not None:
+            return self._KshMajoranaSSMuSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions, StdLooseMuons
+     
+        _Ksh = CombineParticles(
+            DecayDescriptor = "KS0 -> mu- pi+",
+            DaughtersCuts   = {"pi+":"(P > %(KS0DaugP)s)& (PT > %(KS0DaugPT)s)"\
+                               "& (TRCHI2DOF < %(KS0DaugTrackChi2)s)" \
+                               "& (MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s)"   % self._config
+                               },
+            CombinationCut  = "(ADOCACHI2CUT(25, ''))"% self._config,
+            
+            MotherCut       = "(BPVVDCHI2> %(KSMajoranaCutFDChi2)s )& (VFASPF(VCHI2/VDOF) < %(KS0VertexChi2)s)&(PT > %(KS0PT)s*MeV)" % self._config 
+            )
+        
+        #_Ksh.ReFitPVs = True        
+        _KshMajoranaSSMuSel=Selection("KshMajoranaSSMu_for"+self._name,
+                                      Algorithm=_Ksh,
+                                      RequiredSelections = [StdLoosePions, self._MajoranaLineMuFilter()])
+        self._KshMajoranaSSMuSel=_KshMajoranaSSMuSel
+        
+        return _KshMajoranaSSMuSel
+    
+    ######Make the Kshort->MuPi Opposite Sign for Majorana####
+    def _KshMajoranaOSMuFilter( self ):
+        if self._KshMajoranaOSMuSel is not None:
+            return self._KshMajoranaOSMuSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions, StdLooseMuons
+        
+        _Ksh = CombineParticles(
+            DecayDescriptor = "KS0 -> mu+ pi-",
+            DaughtersCuts   = {"pi-":"(P > %(KS0DaugP)s)& (PT > %(KS0DaugPT)s)"\
+                               "&(TRCHI2DOF < %(KS0DaugTrackChi2)s)"\
+                               "&(MIPCHI2DV(PRIMARY) > %(KS0DaugMIPChi2)s)"   % self._config
+                               },
+            CombinationCut  = "(ADOCACHI2CUT(25, ''))"% self._config,
+            
+            MotherCut       = "(BPVVDCHI2> %(KSMajoranaCutFDChi2)s )& (VFASPF(VCHI2/VDOF) < %(KS0VertexChi2)s)&(PT > %(KS0PT)s*MeV)" % self._config 
+            )
+        # _Ksh.ReFitPVs = True
+        _KshMajoranaOSMuSel=Selection("KshMajoranaOSMu_for"+self._name,
+                                      Algorithm=_Ksh,
+                                      RequiredSelections = [StdLoosePions, self._MajoranaLineMuFilter()])
+        self._KshMajoranaOSMuSel=_KshMajoranaOSMuSel
+        
+        return _KshMajoranaOSMuSel
+
+    ## Kstars
+    
+    # Make the K*+ out of KS and pi+
+    def _Kstar2KPiFilter( self ):
+        if self._KstarSel is not None:
+            return self._KstarSel
+
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+
+        _Kstar2KsPi = CombineParticles(
+            DecayDescriptors = ["[K*(892)+ -> KS0 pi+]cc"],
+            CombinationCut = "(ADAMASS('K*(892)+')< %(KstarMassWindow)s )" % self._config,
+            DaughtersCuts   = {"pi+":"(PT> %(KstarChPionPT)s*MeV) &(P> %(KstarChPionP)s*MeV)"\
+                               "&  (TRCHI2DOF < %(KstarChPionTRCHI2)s )& (MIPCHI2DV(PRIMARY)>%(KstarChPionMINIPCHI2)s)"\
+                               "& (PIDK < %(KstarChPionPIDK)s)" % self._config
+                               },
+            MotherCut = "(PT > %(KstarPT)s)" % self._config,
+            ReFitPVs = True
+            )
+        _KstarSel = Selection("Kstar_for"+self._name,
+                              Algorithm = _Kstar2KsPi,
+                              RequiredSelections = [StdLoosePions, self._KsFilter()])
+        self._KstarSel = _KstarSel
+
+        return _KstarSel
+
+    ######--######
+    def _Kstar2KPiFilterNoPID( self ):
+        if self._KstarSelNoPID is not None:
+            return self._KstarSelNoPID
+
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdNoPIDsPions
+
+        _Kstar2KsPiNoPID = CombineParticles(
+            DecayDescriptors = ["[K*(892)+ -> KS0 pi+]cc"],
+            CombinationCut = "(ADAMASS('K*(892)+')< %(KstarMassWindow)s )" % self._config,
+            DaughtersCuts   = {"pi+":"(PT> %(KstarChPionPT)s*MeV) &(P> %(KstarChPionP)s*MeV)"\
+                               "&  (TRCHI2DOF < %(KstarChPionTRCHI2)s )& (MIPCHI2DV(PRIMARY)>%(KstarChPionMINIPCHI2)s)" % self._config
+                               },
+            MotherCut = "(PT > %(KstarPT)s)" % self._config,
+            ReFitPVs = True
+            )
+        _KstarSelNoPID = Selection("KstarNoPID_for"+self._name,
+                                   Algorithm = _Kstar2KsPiNoPID,
+                                   RequiredSelections = [StdNoPIDsPions, self._KsFilter()])
+        self._KstarSelNoPID = _KstarSelNoPID
+
+        return _KstarSelNoPID
+
+    ################################
+    ##
+    ## B -> X mu nu definitions
+    ##
+    ################################
+
+    ### B+ -> pi+ mu- nu
+    def _B2PiMuNu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMu = CombineParticles(
+            DecayDescriptors = ["[B0 -> pi+ mu-]cc"],
+            CombinationCut = "(AM>%(KMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _KMuSel=Selection("PiMu_for"+self._name,
+                         Algorithm=_KMu,
+                         RequiredSelections = [self._muonFilterTOS(), self._pionFilterTight()])
+        _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSel
+
+    def _B2PiMuNuNoMuTopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMuNoMuTopo = CombineParticles(
+            DecayDescriptors = ["[B0 -> pi+ mu-]cc"],
+            CombinationCut = "(AM>%(KMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _KMuSelNoMuTopo=Selection("PiMuNoMuTopo_for"+self._name,
+                         Algorithm=_KMuNoMuTopo,
+                         RequiredSelections = [self._muonFilter(), self._pionFilterTight()])
+        _KMuSelNoMuTopo = tosSelection(_KMuSelNoMuTopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSelNoMuTopo
+
+    def _B2PiMuNuNoPIDmu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMuNoPIDmu = CombineParticles(
+            DecayDescriptors = ["[B0 -> pi+ mu-]cc"],
+            CombinationCut = "(AM>%(KMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _KMuSelNoPIDmu=Selection("PiMuNoPIDmu_for"+self._name,
+                                 Algorithm=_KMuNoPIDmu,
+                                 RequiredSelections = [self._muonFilterNoPID(), self._pionFilterTight()])
+        _KMuSelNoPIDmu = tosSelection(_KMuSelNoPIDmu,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSelNoPIDmu
+
+    def _B2PiMuNuNoPIDhad( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMuNoPIDhad = CombineParticles(
+            DecayDescriptors = ["[B0 -> pi+ mu-]cc"],
+            CombinationCut = "(AM>%(KMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _KMuSelNoPIDhad=Selection("PiMuNoPIDhad_for"+self._name,
+                                  Algorithm=_KMuNoPIDhad,
+                                  RequiredSelections = [self._muonFilterTOS(), self._pionFilterTightNoPID()])
+        _KMuSelNoPIDhad = tosSelection(_KMuSelNoPIDhad,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSelNoPIDhad
+    
+    def _B2PiMuNuSS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMuSS = CombineParticles(
+            DecayDescriptors = ["[B0 -> pi- mu-]cc"],
+            CombinationCut = "(AM>%(KMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = " (VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRATight)s) "\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+      
+        _KMuSelSS=Selection("PiMuSS_for"+self._name,
+                          Algorithm=_KMuSS,
+                          RequiredSelections = [self._muonFilterTOS(), self._pionFilterTight()])
+        _KMuSelSS = tosSelection(_KMuSelSS,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSelSS
+
+
+    ######Bs->KMuNu######
+    def _Bs2KMuNu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMu = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K+ mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+        
+        _KMuSel=Selection("KMu_for"+self._name,
+                         Algorithm=_KMu,
+                         RequiredSelections = [self._muonFilterTOS(), self._kaonFilter()])
+        _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSel
+
+    def _Bs2KMuNuNoMuTopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMuNoMuTopo = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K+ mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+        
+        _KMuSelNoMuTopo=Selection("KMuNoMuTopo_for"+self._name,
+                         Algorithm=_KMuNoMuTopo,
+                         RequiredSelections = [self._muonFilter(), self._kaonFilter()])
+        _KMuSelNoMuTopo = tosSelection(_KMuSelNoMuTopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSelNoMuTopo
+    
+    def _Bs2KMuNuSS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMuSS = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K- mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+
+        _KMuSelSS=Selection("KMuSS_for"+self._name,
+                          Algorithm=_KMuSS,
+                          RequiredSelections = [self._muonFilterTOS(), self._kaonFilter()])
+        _KMuSelSS = tosSelection(_KMuSelSS,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSelSS
+
+    ######Bs->KMuNu misid, no PID on mu######
+    def _Bs2KMuNu_NoPIDmu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMu = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K+ mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+        
+        _KMuSel=Selection("KMu_NoPIDmu_for"+self._name,
+                         Algorithm=_KMu,
+                         RequiredSelections = [self._muonFilterNoPID(), self._kaonFilter()])
+        _KMuSel = tosSelection(_KMuSel,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSel
+    
+    def _Bs2KMuNuSS_NoPIDmu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMuSS = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K- mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+
+        _KMuSelSS=Selection("KMuSS_NoPIDmu_for"+self._name,
+                          Algorithm=_KMuSS,
+                          RequiredSelections = [self._muonFilterTightNoPID(), self._kaonFilter()])
+        _KMuSelSS = tosSelection(_KMuSelSS,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSelSS
+
+    ######Bs->KMuNu misid, no PID on K######
+    def _Bs2KMuNu_NoPIDK( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMu = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K+ mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+        
+        _KMuSel=Selection("KMu_NoPIDK_for"+self._name,
+                         Algorithm=_KMu,
+                         RequiredSelections = [self._muonFilterTOS(), self._kaonFilterNoPID()])
+        _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSel
+    
+    def _Bs2KMuNuSS_NoPIDK( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMuSS = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K- mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+
+        _KMuSelSS=Selection("KMuSS_NoPIDK_for"+self._name,
+                          Algorithm=_KMuSS,
+                          RequiredSelections = [self._muonFilterTOS(), self._kaonFilterNoPID()])
+        _KMuSelSS = tosSelection(_KMuSelSS,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSelSS
+
+    ######Bs->KMuNu misid, no PID on mu or K######
+    def _Bs2KMuNu_NoPIDKmu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMu = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K+ mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+        
+        _KMuSel=Selection("KMu_NoPIDKmu_for"+self._name,
+                         Algorithm=_KMu,
+                         RequiredSelections = [self._muonFilterNoPID(), self._kaonFilterNoPID()])
+        _KMuSel = tosSelection(_KMuSel,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSel
+    
+    def _Bs2KMuNuSS_NoPIDKmu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KMuSS = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K- mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOFTight)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"
+            % self._config,
+            ReFitPVs = True
+            )
+
+        _KMuSelSS=Selection("KMuSS_NoPIDKmu_for"+self._name,
+                          Algorithm=_KMuSS,
+                          RequiredSelections = [self._muonFilterNoPID(), self._kaonFilterNoPID()])
+        _KMuSelSS = tosSelection(_KMuSelSS,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KMuSelSS
+
+   ######Bu->PhiMuNu ######
+    def _B2PhiMuNu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiMu = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) mu+]cc"],
+            CombinationCut = "(AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiMu_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiMuSel=Selection("PhiMu_for"+self._name,
+                         Algorithm=_PhiMu,
+                         RequiredSelections = [self._muonFilterTOS(), self._Phi2KKFilter()])
+            # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        _PhiMuSel = tosSelection(_PhiMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _PhiMuSel
+
+    def _B2PhiMuNuNoMuTopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiMuNoMuTopo = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) mu+]cc"],
+            CombinationCut = "(AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiMu_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiMuSelNoMuTopo=Selection("PhiMuNoMuTopo_for"+self._name,
+                         Algorithm=_PhiMuNoMuTopo,
+                         RequiredSelections = [self._muonFilter(), self._Phi2KKFilter()])
+            # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        _PhiMuSelNoMuTopo = tosSelection(_PhiMuSelNoMuTopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _PhiMuSelNoMuTopo
+
+
+    def _B2PhiMuNuWS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiMuWS = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) mu+]cc"],
+            CombinationCut = "(AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiMu_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiMuSelWS=Selection("PhiMuWS_for"+self._name,
+                         Algorithm=_PhiMuWS,
+                         RequiredSelections = [self._muonFilterTOS(), self._Phi2KKFilterWS()])
+            # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        _PhiMuSelWS = tosSelection(_PhiMuSelWS,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _PhiMuSelWS
+   
+   ######Bu->PhiMuNu Fake Mu ######
+   
+    def _B2PhiMuNu_NoPIDmu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiMu = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) mu+]cc"],
+            CombinationCut = "(AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiMu_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiMuNoPIDmuSel=Selection("PhiMu_NoPIDmu_for"+self._name,
+                         Algorithm=_PhiMu,
+                         RequiredSelections = [self._muonFilterNoPID(), self._Phi2KKFilter()])
+            # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        _PhiMuNoPIDmuSel = tosSelection(_PhiMuNoPIDmuSel,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _PhiMuNoPIDmuSel
+    
+    def _B2PhiMuNu_NoPIDhad( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiMuNoPIDHad = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) mu+]cc"],
+            CombinationCut = "(AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiMu_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiMuNoPIDhadSel=Selection("PhiMu_NoPIDHad_for"+self._name,
+                                    Algorithm=_PhiMuNoPIDHad,
+                                    RequiredSelections = [self._muonFilterTightNoPID(), self._Phi2KKFilterNoPID()])
+        # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        _PhiMuNoPIDhadSel = tosSelection(_PhiMuNoPIDhadSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _PhiMuNoPIDhadSel
+
+    def _B2PhiMuNuBadVtx( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _PhiMuBadVtx = CombineParticles(
+            DecayDescriptors = ["[B+ -> phi(1020) mu+]cc"],
+            CombinationCut = "(AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(BPVCORRM>%(PhiMu_MCORR)s*MeV) & (VFASPF(VCHI2/VDOF)> %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRAMed)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2ForPhi)s)"
+            % self._config,
+            ReFitPVs = True
+            )
+        _PhiMuSelBadVtx=Selection("PhiMuBadVtx_for"+self._name,
+                         Algorithm=_PhiMuBadVtx,
+                         RequiredSelections = [self._muonFilterTOS(), self._Phi2KKFilter()])
+            # _KMuSel = tosSelection(_KMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        _PhiMuSelBadVtx = tosSelection(_PhiMuSelBadVtx,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _PhiMuSelBadVtx
+
+
+      
+    ######Bu->RhoMuNu ######
+    def _Bu2RhoMuNu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoMu = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _RhoMuSel=Selection("RhoMu_for"+self._name,
+                            Algorithm=_RhoMu,
+                            RequiredSelections = [self._muonFilterTight(), self._Rho02PiPiFilter()])
+        _RhoMuSel = tosSelection(_RhoMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _RhoMuSel
+
+    def _Bu2RhoMuNuNoMuTopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoMuNoMuTopo = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _RhoMuSelNoMuTopo=Selection("RhoMuNoMuTopo_for"+self._name,
+                            Algorithm=_RhoMuNoMuTopo,
+                            RequiredSelections = [self._muonFilterTight(), self._Rho02PiPiFilter()])
+        _RhoMuSelNoMuTopo = tosSelection(_RhoMuSelNoMuTopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _RhoMuSelNoMuTopo
+    
+
+    def _Bu2RhoMuNu_NoPIDmu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoMu_NoPIDmu = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _RhoMuSel_NoPIDmu=Selection("RhoMu_NoPIDmu_for"+self._name,
+                            Algorithm=_RhoMu_NoPIDmu,
+                            RequiredSelections = [self._muonFilterTightNoPID(), self._Rho02PiPiFilter()])
+        _RhoMuSel_NoPIDmu = tosSelection(_RhoMuSel_NoPIDmu,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _RhoMuSel_NoPIDmu
+
+    def _Bu2RhoMuNu_NoPIDhad( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoMu_NoPIDhad = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _RhoMuSel_NoPIDhad=Selection("RhoMu_NoPIDHad_for"+self._name,
+                            Algorithm=_RhoMu_NoPIDhad,
+                            RequiredSelections = [self._muonFilterTight(), self._Rho02PiPiFilterNoPID()])
+        _RhoMuSel_NoPIDhad = tosSelection(_RhoMuSel_NoPIDhad,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _RhoMuSel_NoPIDhad
+
+
+    def _Bu2RhoMuNuWS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoMuWS = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _RhoMuSelWS=Selection("RhoMuWS_for"+self._name,
+                         Algorithm=_RhoMuWS,
+                         RequiredSelections = [self._muonFilterTight(), self._Rho02PiPiWSFilter()])
+        _RhoMuSelWS = tosSelection(_RhoMuSelWS,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _RhoMuSelWS
+
+    def _Bu2RhoMuNuBadVtx( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoMuBadVtx = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)> %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _RhoMuSelBadVtx=Selection("RhoMuBadVtx_for"+self._name,
+                                  Algorithm=_RhoMuBadVtx,
+                                  RequiredSelections = [self._muonFilterTight(), self._Rho02PiPiFilter()])
+        _RhoMuSelBadVtx = tosSelection(_RhoMuSelBadVtx,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _RhoMuSelBadVtx
+    
+    ### This is not needed anymore, as long as the pi+pi- mass window is large enough.    
+    def _Bu2RhoMuNuSB( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _RhoMu = CombineParticles(
+            DecayDescriptors = ["[B+ -> rho(770)0 mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut ="(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s) & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (ratio >0.4)"% self._config,
+            #" ( ((((5279.17*5279.17) -(MASS(1,2))*(MASS(1,2))))/(2*5279.17)) < %(Enu)s*MeV)"\
+
+            ReFitPVs = True
+            )
+        
+        _RhoMu.Preambulo = [ "from LoKiPhys.decorators import *",
+                           "dx = (VFASPF(VX)-BPV(VX))",
+                           "dy = (VFASPF(VY)-BPV(VY))",
+                           "dz = (VFASPF(VZ)-BPV(VZ))",
+                           "norm = (max(sqrt(dx*dx+dy*dy+dz*dz),0))",
+                           "B_xdir  = ((dx)/norm)",
+                           "B_ydir  = ((dy)/norm)",
+                           "B_zdir  = ((dz)/norm)",
+                           "Pxrhomu   = (CHILD(PX,1)+CHILD(PX,2))",
+                           "Pyrhomu   = (CHILD(PY,1)+CHILD(PY,2))",
+                           "Pzrhomu   = (CHILD(PZ,1)+CHILD(PZ,2))",
+                           "Bflight = (B_xdir*Pxrhomu + B_ydir*Pyrhomu+ B_zdir*Pzrhomu)",
+                           "mB  = 5279.25",
+                           "M_2 = (mB*mB + M12*M12)",
+                           "rhomu_E  = (CHILD(E,1)+CHILD(E,2))",
+                           "quada = (Bflight*Bflight - rhomu_E*rhomu_E)",
+                           "quadb = (M_2*Bflight)",
+                           "quadc = (((M_2*M_2)/4) - (rhomu_E*rhomu_E*mB*mB))",
+                           "Discriminant = ((quadb*quadb)-(4*quada*quadc))",
+                           "solution_a = ((-quadb + sqrt(max(Discriminant,0)))/(2*quada))",
+                           "solution_b = ((-quadb - sqrt(max(Discriminant,0)))/(2*quada))",
+                           "ratio = (solution_a/solution_b)"
+                           ]
+        
+        _RhoMuSel=Selection("RhoMuSB_for"+self._name,
+                         Algorithm=_RhoMu,
+                         RequiredSelections = [self._muonFilterTight(), self._Rho02PiPiSBFilter()])
+        _RhoMuSel = tosSelection(_RhoMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _RhoMuSel
+    
+    ######Bu->OmegaMuNu ######
+    def _Bu2OmegaMuNu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaMu = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _OmegaMuSel=Selection("OmegaMu_for"+self._name,
+                              Algorithm=_OmegaMu,
+                              RequiredSelections = [self._muonFilterTight(), self._Omega2PiPiPi0Filter()])
+        _OmegaMuSel = tosSelection(_OmegaMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _OmegaMuSel
+
+    def _Bu2OmegaMuNuNoMuTopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaMuNoMuTopo = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _OmegaMuSelNoMuTopo=Selection("OmegaMuNoMuTopo_for"+self._name,
+                              Algorithm=_OmegaMuNoMuTopo,
+                              RequiredSelections = [self._muonFilterTight(), self._Omega2PiPiPi0Filter()])
+        _OmegaMuSelNoMuTopo = tosSelection(_OmegaMuSelNoMuTopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _OmegaMuSelNoMuTopo
+
+
+    def _Bu2OmegaMuNu_NoPIDmu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaMu_NoPIDmu = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _OmegaMuSel_NoPIDmu=Selection("OmegaMu_NoPIDmu_for"+self._name,
+                                      Algorithm=_OmegaMu_NoPIDmu,
+                                      RequiredSelections = [self._muonFilterTightNoPID(), self._Omega2PiPiPi0Filter()])
+        _OmegaMuSel_NoPIDmu = tosSelection(_OmegaMuSel_NoPIDmu,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _OmegaMuSel_NoPIDmu
+
+    def _Bu2OmegaMuNu_NoPIDhad( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaMu_NoPIDhad = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+
+        _OmegaMuSel_NoPIDhad=Selection("OmegaMu_NoPIDhad_for"+self._name,
+                                      Algorithm=_OmegaMu_NoPIDhad,
+                                      RequiredSelections = [self._muonFilterTight(), self._Omega2PiPiPi0FilterNoPID()])
+        _OmegaMuSel_NoPIDhad = tosSelection(_OmegaMuSel_NoPIDhad,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _OmegaMuSel_NoPIDhad
+
+
+    def _Bu2OmegaMuNuWS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaMuWS = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            "& (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _OmegaMuSelWS=Selection("OmegaMuWS_for"+self._name,
+                                Algorithm=_OmegaMuWS,
+                                RequiredSelections = [self._muonFilterTight(), self._Omega2PiPiPi0WSFilter()])
+        _OmegaMuSelWS = tosSelection(_OmegaMuSelWS,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _OmegaMuSelWS
+
+    def _Bu2OmegaMuNuBadVtx( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _OmegaMuBadVtx = CombineParticles(
+            DecayDescriptors = ["[B+ -> omega(782) mu+]cc"],
+            CombinationCut = "(AM>%(RhoMuMassLowTight)s*MeV) & (AM<%(XMuMassUpper)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)> %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRATight)s)"\
+            " & (BPVVDCHI2 >%(BFDCHI2Tight)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)"% self._config,
+            ReFitPVs = True
+            )
+        
+        _OmegaMuSelBadVtx=Selection("OmegaMuBadVtx_for"+self._name,
+                                    Algorithm=_OmegaMuBadVtx,
+                                    RequiredSelections = [self._muonFilterTight(), self._Omega2PiPiPi0Filter()])
+        _OmegaMuSelBadVtx = tosSelection(_OmegaMuSelBadVtx,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _OmegaMuSelBadVtx
+    
+
+    ######Bu->KshMuNu SS & OS######
+    def _Bu2KshSSMuNu_SSMuminus( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KshSSMu_SSMuminus = CombineParticles(
+            DecayDescriptors = ["[B- -> KS0 mu-]cc"],
+            CombinationCut = "(AM>%(KS0MuMassLowTight)s*MeV) & (AM<%(XMuMassUpperHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+            "& (MINTREE( (ABSID=='KS0') , VFASPF(VZ))-VFASPF(VZ) > %(KS0Z)s *mm )" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KshSSMu_SSMuminusSel=Selection("KshSSMu_SSMuminus_for"+self._name,
+                              Algorithm=_KshSSMu_SSMuminus,
+                              RequiredSelections = [self._muonFilter(), self._KshMajoranaSSMuFilter()])
+        return _KshSSMu_SSMuminusSel
+    
+    
+    def _Bu2KshOSMuNu_SSMuplus( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KshOSMu_SSMuplus = CombineParticles(
+            DecayDescriptors = ["[B- -> KS0 mu-]cc"],
+            CombinationCut = "(AM>%(KS0MuMassLowTight)s*MeV) & (AM<%(XMuMassUpperHigh)s*MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+            "& (MINTREE( (ABSID=='KS0') , VFASPF(VZ))-VFASPF(VZ) > %(KS0Z)s *mm )" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KshOSMu_SSMuplusSel=Selection("KshOSMu_SSMuplus_for"+self._name,
+                              Algorithm=_KshOSMu_SSMuplus,
+                              RequiredSelections = [self._muonFilter(), self._KshMajoranaOSMuFilter()])
+        return _KshOSMu_SSMuplusSel
+
+#    ###Combine Bs->K*(892)+MuNu, K*->KS0Pi###
+    def _Bs2KstarMuNu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+
+        _KstarMu = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)+ mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarMuSel=Selection("KstarMu_for"+self._name,
+                                Algorithm=_KstarMu,
+                                RequiredSelections = [self._muonFilter(), self._Kstar2KPiFilter()])
+        _KstarMuSel = tosSelection(_KstarMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KstarMuSel
+
+    def _Bs2KstarMuNuNoMuTopo( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+
+        _KstarMuNoMuTopo = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)+ mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarMuSelNoMuTopo=Selection("KstarMuNoMuTopo_for"+self._name,
+                                Algorithm=_KstarMuNoMuTopo,
+                                RequiredSelections = [self._muonFilter(), self._Kstar2KPiFilter()])
+        _KstarMuSelNoMuTopo = tosSelection(_KstarMuSelNoMuTopo,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KstarMuSelNoMuTopo
+
+
+    def _Bs2KstarMuNu_NoPIDmu( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+
+        _KstarMuNoPIDmu = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)+ mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarMuSelNoPIDmu=Selection("KstarMuNoPIDmu_for"+self._name,
+                                Algorithm=_KstarMuNoPIDmu,
+                                RequiredSelections = [self._muonFilterNoPID(), self._Kstar2KPiFilter()])
+        _KstarMuSelNoPIDmu = tosSelection(_KstarMuSelNoPIDmu,{'Hlt2.*Topo2Body.*Decision%TOS':0,'Hlt2.*Topo3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KstarMuSelNoPIDmu
+
+    def _Bs2KstarMuNu_NoPIDhad( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+
+        _KstarMuNoPIDhad = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)+ mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarMuSelNoPIDhad=Selection("KstarMuNoPIDHad_for"+self._name,
+                                      Algorithm=_KstarMuNoPIDhad,
+                                      RequiredSelections = [self._muonFilter(), self._Kstar2KPiFilterNoPID()])
+        _KstarMuSelNoPIDhad = tosSelection(_KstarMuSelNoPIDhad,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KstarMuSelNoPIDhad
+
+    
+    def _Bs2KstarMuNuSS( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KstarMuSS = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)- mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarMuSSSel=Selection("KstarMuSS_for"+self._name,
+                                  Algorithm=_KstarMuSS,
+                                  RequiredSelections = [self._muonFilter(), self._Kstar2KPiFilter()])
+        _KstarMuSSSel = tosSelection(_KstarMuSSSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KstarMuSSSel
+
+    def _Bs2KstarMuNuBadVtx( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _KstarMuBadVtx = CombineParticles(
+            DecayDescriptors = ["[B_s~0 -> K*(892)+ mu-]cc"],
+            MotherCut = "(VFASPF(VCHI2/VDOF)> %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s) & (BPVCORRM > %(BCorrMLow)s *MeV) & (BPVCORRM < %(BCorrMHigh)s *MeV)" % self._config,
+            ReFitPVs = True
+            )
+        
+        _KstarMuSelBadVtx=Selection("KstarMuBadVtx_for"+self._name,
+                                Algorithm=_KstarMuBadVtx,
+                                RequiredSelections = [self._muonFilter(), self._Kstar2KPiFilter()])
+        _KstarMuSelBadVtx = tosSelection(_KstarMuSelBadVtx,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*TopoMu3Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _KstarMuSelBadVtx
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingBXX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingBXX.py
new file mode 100644
index 000000000..f89c4f502
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingBXX.py
@@ -0,0 +1,214 @@
+"""Define BXX stripping lines.
+
+Revival of StrippingDstRSwD02K2PiD0forBXXLine and StrippingDstWSwD02K2PiD0forBXXLine,
+previously used in Stripping21r1.
+"""
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ["Michael Wilkinson"]
+__date__ = "03/02/2021"
+__version__ = "$Revision: 1.0 $"
+
+from string import Template
+
+from GaudiKernel.SystemOfUnits import GeV, MeV, mm
+from PhysConf.Selections import (
+    Combine3BodySelection,
+    CombineSelection,
+    Hlt2TOSSelection,
+)
+from PhysSelPython.Wrappers import AutomaticData
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+
+__all__ = ("BXXLinesBuilderConf", "default_config")
+
+default_config = {
+    "BXX": {
+        "BUILDERTYPE": "BXXLinesBuilderConf",
+        "CONFIG": {
+            "InputPionsForDstarLocation": "Phys/StdAllLoosePions/Particles",
+            "InputPionsForDzeroLocation": "Phys/StdLoosePions/Particles",
+            "InputKaonsForDzeroLocation": "Phys/StdLooseKaons/Particles",
+            "prescaleRS": 1.0,
+            "prescaleWS": 0.2,
+            "DzeroDaughterTRCHI2DOFMax": 3.0,
+            "DzeroDaughterPTMin": 400 * MeV,
+            "DzeroDaughterPMin": 2 * GeV,
+            "DzeroDaughterMIPCHI2DVMin": 4.0,
+            "DzeroDaughterKaonPIDKMin": 4.0,
+            "DzeroDaughterPionPIDKMax": 10.0,
+            "DzeroDaughterPionPIDmuMax": 10.0,
+            "DzeroMassMin": 1.4 * GeV,
+            "DzeroMassMax": 1.7 * GeV,
+            "DzeroPTMin": 3 * GeV,
+            "DzeroADOCACHI2CUT": 20.0,
+            "DzeroPionPairMassMin": 575.5 * MeV,
+            "DzeroPionPairMassMax": 975.5 * MeV,
+            "DzeroVCHI2DOFMax": 6.0,
+            "DzeroBPVVDMin": 4 * mm,
+            "DzeroBPVVDCHI2Min": 120.0,
+            "DzeroBPVDIRAMin": 0.9997,
+            "DzeroBPVIPCHI2Max": 0.9997,
+            "DstarPionPTMin": 250 * MeV,
+            "DstarPionTRCHI2DOFMax": 3.0,
+            "DstarPionMIPDVMax": 0.3 * mm,
+            "DstarPionMIPCHI2DVMax": 4.0,
+            "DstarPionPIDKMax": 10.0,
+            "DstarMassDiffDzeroPlusPionMax": 40 * MeV,
+            "DstarPTMin": 3 * GeV,
+            "DstarVCHI2DOFMax": 5.0,
+            "DstarBPVVDCHI2Max": 25.0,
+            "DstarBPVIPCHI2Max": 25.0,
+            "DstarHLT2TOSSelection": "Hlt2Global",
+        },
+        "STREAMS": {
+            "Semileptonic": [
+                "StrippingDstRSwD02K2PiD0forBXXLine",
+                "StrippingDstWSwD02K2PiD0forBXXLine",
+            ],
+        },
+        "WGs": ["Charm", "Semileptonic"],
+    }
+}
+
+
+class BXXLinesBuilderConf(LineBuilder):
+    """BXX Stripping lines."""
+
+    __configuration_keys__ = default_config["BXX"]["CONFIG"].keys()
+
+    __confdict__ = {}
+
+    def __init__(self, name, config):
+        """Create Stripping lines Dst{RS,WS}wD02K2PiD0for{name}Line."""
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__ = config
+
+        # -- get input particles
+        inputs = {
+            "InputPionsForDstar": AutomaticData(
+                Location=config["InputPionsForDstarLocation"]
+            ),
+            "InputPionsForDzero": AutomaticData(
+                Location=config["InputPionsForDzeroLocation"]
+            ),
+            "InputKaonsForDzero": AutomaticData(
+                Location=config["InputKaonsForDzeroLocation"]
+            ),
+        }
+
+        # -- create D0
+        DzeroDaughterCuts = Template(
+            "(TRCHI2DOF < ${DzeroDaughterTRCHI2DOFMax})"
+            " & (PT > ${DzeroDaughterPTMin}) & (P > ${DzeroDaughterPMin})"
+            " & (MIPCHI2DV(PRIMARY) > ${DzeroDaughterMIPCHI2DVMin})"
+        ).substitute(config)
+        DzeroDaughterKaonCuts = Template(
+            "(PIDK > ${DzeroDaughterKaonPIDKMin})"
+        ).substitute(config)
+        DzeroDaughterPionCuts = Template(
+            "(PIDK < ${DzeroDaughterPionPIDKMax})"
+            " & (PIDmu < ${DzeroDaughterPionPIDmuMax})"
+        ).substitute(config)
+        Dzero = Combine3BodySelection(
+            "D02K2PiforK0for{}".format(name),
+            [inputs["InputPionsForDzero"], inputs["InputKaonsForDzero"]],
+            DecayDescriptor="[D0 -> pi+ pi- K-]cc",
+            DaughtersCuts={
+                "": "ALL",
+                "K+": "{} & {}".format(DzeroDaughterCuts, DzeroDaughterKaonCuts),
+                "K-": "{} & {}".format(DzeroDaughterCuts, DzeroDaughterKaonCuts),
+                "pi+": "{} & {}".format(DzeroDaughterCuts, DzeroDaughterPionCuts),
+                "pi-": "{} & {}".format(DzeroDaughterCuts, DzeroDaughterPionCuts),
+            },
+            Combination12Cut=Template(
+                "(AM12 > ${DzeroPionPairMassMin}) & (AM12 < ${DzeroPionPairMassMax})"
+            ).substitute(config),
+            CombinationCut=Template(
+                "(AM > ${DzeroMassMin}) & (AM < ${DzeroMassMax})"
+                " & (APT > ${DzeroPTMin}) & (ADOCACHI2CUT(${DzeroADOCACHI2CUT}, ''))"
+            ).substitute(config),
+            MotherCut=Template(
+                "(VFASPF(VCHI2/VDOF) < ${DzeroVCHI2DOFMax})"
+                " & (BPVVD > ${DzeroBPVVDMin})"
+                " & (BPVVDCHI2 > ${DzeroBPVVDCHI2Min})"
+                " & (BPVDIRA > ${DzeroBPVDIRAMin})"
+                " & (BPVIPCHI2() < ${DzeroBPVIPCHI2Max})"
+            ).substitute(config),
+        )
+
+        # -- define how to create D*(2010)
+        def makeDstar(_name, descriptor):
+            # check descriptor
+            allowedDescriptors = ["[D*(2010)+ -> D0 pi+]cc", "[D*(2010)- -> D0 pi-]cc"]
+            if descriptor not in allowedDescriptors:
+                raise ValueError(
+                    "descriptor '{}' does not match any of {}".format(
+                        descriptor, allowedDescriptors
+                    )
+                )
+            # define added pion cuts
+            DstarPionCuts = Template(
+                "(PT > ${DstarPionPTMin})"
+                " & (TRCHI2DOF < ${DstarPionTRCHI2DOFMax})"
+                " & (MIPDV(PRIMARY) < ${DstarPionMIPDVMax})"
+                " & (MIPCHI2DV(PRIMARY) < ${DstarPionMIPCHI2DVMax})"
+                " & (PIDK < ${DstarPionPIDKMax})"
+            ).substitute(config)
+            # create D*(2010)
+            return CombineSelection(
+                "Dst{}wD0K2PiD0for{}".format(_name, name),
+                [inputs["InputPionsForDstar"], Dzero],
+                DecayDescriptor=descriptor,
+                DaughtersCuts={
+                    "": "ALL",
+                    "D0": "ALL",
+                    "D~0": "ALL",
+                    "pi+": DstarPionCuts,
+                    "pi-": DstarPionCuts,
+                },
+                CombinationCut=Template(
+                    "(AM - AM1 - 139.57 * MeV < ${DstarMassDiffDzeroPlusPionMax})"
+                    " & (APT > ${DstarPTMin})"
+                ).substitute(config),
+                MotherCut=Template(
+                    "(VFASPF(VCHI2/VDOF) < ${DstarVCHI2DOFMax})"
+                    " & (BPVVDCHI2 < ${DstarBPVVDCHI2Max})"
+                    " & (BPVIPCHI2() < ${DstarBPVIPCHI2Max})"
+                ).substitute(config),
+            )
+
+        # -- declare lines
+        self.RSLine = StrippingLine(
+            "DstRSwD02K2PiD0for{}Line".format(name),
+            prescale=config["prescaleRS"],
+            algos=[
+                Hlt2TOSSelection(
+                    makeDstar("RS", "[D*(2010)+ -> D0 pi+]cc"),
+                    config["DstarHLT2TOSSelection"],
+                )
+            ],
+        )
+        self.WSLine = StrippingLine(
+            "DstWSwD02K2PiD0for{}Line".format(name),
+            prescale=config["prescaleWS"],
+            algos=[
+                Hlt2TOSSelection(
+                    makeDstar("WS", "[D*(2010)- -> D0 pi-]cc"),
+                    config["DstarHLT2TOSSelection"],
+                )
+            ],
+        )
+
+        # -- register lines
+        self.registerLine(self.RSLine)
+        self.registerLine(self.WSLine)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingBc2Bs.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingBc2Bs.py
new file mode 100644
index 000000000..a89e07b9f
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingBc2Bs.py
@@ -0,0 +1,714 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+__author__ = ['Adam Davis']
+__date__ = '12/03/2021'
+__version__ = '$Revision: 1.0 $'
+from Gaudi.Configuration import *
+from StrippingUtils.Utils import LineBuilder
+import logging
+
+"""
+Selections for Bc -> Bs X
+"""
+
+
+default_config = {
+  'NAME'        : 'Bc2Bs',
+  'WGs'         : ['Semileptonic'],
+  'BUILDERTYPE' : 'Bc2BsBuilder',
+  'CONFIG'      :  {
+      "GEC_nLongTrk"        : 250.  , #adimensional
+      "TRGHOSTPROB"         : 0.5    ,#adimensional
+      #Kaons
+      "KaonTRCHI2"          : 4.     ,#adimensional
+      "KaonP"               : 3000.  ,#MeV
+      "KaonPT"              : 400.   ,#MeV
+      "KaonPIDK"            : 5.     ,#adimensional 
+      "KaonPIDmu"           : 5.     ,#adimensional
+      "KaonPIDp"            : 5.     ,#adimensional
+      "KaonMINIP"           : 0.05   ,#mm
+
+      "KaonP_phi"           : 3000.  ,#MeV
+      "KaonPT_phi"          : 200.   ,#MeV
+      "KaonPIDK_phi"        : 0.     ,#adimensional 
+      "KaonPIDmu_phi"       : -2.    ,#adimensional
+      "KaonPIDp_phi"        : -2.    ,#adimensional
+      "KaonMINIP_phi"       : 0.025  ,#mm
+
+      #k from bc
+
+      "K_from_bc_TRCHI2"      : 4.     ,#adminensional
+      "K_from_bc_P"           : 1000.  ,#MeV
+      "K_from_bc_PT"          : 150.   ,#MeV
+      "K_from_bc_PIDK"        : 0.     ,#adimensional
+      "K_from_bc_MINIP"       : 0.05   ,#mm
+
+      #k from bs
+      "K_from_bs_TRCHI2"      : 4.     ,#adminensional
+      "K_from_bs_P"           : 1000.  ,#MeV
+      "K_from_bs_PT"          : 150.   ,#MeV
+      "K_from_bs_PIDK"        : 0.     ,#adimensional
+      "K_from_bs_MINIP"       : 0.05   ,#mm
+      #Pions 
+      "PionTRCHI2"          : 4.     ,#adimensional
+      "PionP"               : 3000.  ,#MeV
+      "PionPT"              : 400.   ,#MeV
+      "PionPIDK"            : -2.    ,#adimensional 
+      "PionMINIP"           : 0.05   ,#mm
+
+      "BachPionTRCHI2"      : 4.     ,#adminensional
+      "BachPionP"           : 1000.  ,#MeV
+      "BachPionPT"          : 350.   ,#MeV
+      "BachPionPIDK"        : 2      ,#adimensional
+      "BachPionMINIP"       : 0.02   ,#mm
+
+      "PionFromBsTRCHI2"    : 4.     ,#adminensional
+      "PionFromBsP"         : 1000.  ,#MeV
+      "PionFromBsPT"        : 500.   ,#MeV
+      "PionFromBsPIDK"      : 2      ,#adimensional
+      "PionFromBsMINIP"     : 0.05   ,#mm
+      #muons
+      "MuonGHOSTPROB"       : 0.35   ,#adimensional
+      "MuonTRCHI2"          : 4.     ,#adimensional
+      "MuonP"               : 3000.  ,#MeV
+      "MuonPT"              : 750.  ,#MeV
+      "MuonPIDK"            : -2.    ,#adimensional
+      "MuonPIDmu"           : 0.     ,#adimensional      
+      "MuonMINIP"           : 0.025  ,#mm
+      "BachMuonTRCHI2"      : 4.     ,#adminensional
+      "BachMuonP"           : 1000.  ,#MeV
+      "BachMuonPT"          : 150.   ,#MeV
+      "BachMuonPIDmu"       : 0      ,#adimensional
+      "BachMuonMINIP"       : 0.02   ,#mm
+      #electron
+      "ElectronTRCHI2"      : 10     ,#adimensional
+      "ElectronP"           : 3000.  ,#MeV
+      "ElectronPT"          : 1000.  ,#MeV
+      "ElectronGHOSTPROB"   : 0.6    ,#adimensional
+      "ElectronPIDe"        : -0.2   ,#adimensional
+      "ElectronMINIP"       : 0.05   ,#mm
+      #phi 
+      "PhiVCHI2DOF"         : 6     ,#adimensional
+      "PhiPT"               : 600.  ,#MeV
+      "PhiMINIP"            : 0.05  ,#adimensional
+      "PhiDIRA"             : 0.9   ,#adimensional
+      "PhiMassWindow"       : 200.  ,#MeV
+      "Phi_CHI2DOF"         : 35.   ,#MeV
+
+      #jpsi
+      "JpsiMassWindow"      : 200.  ,#MeV
+      "JpsiPT"              : 1000. ,#MeV
+      "Jpsi_CHI2DOF"        : 15.   ,#adimensional
+      "Jpsi_DIRA"           : 0.9   ,#adimensional  
+      "Jpsi_BPVVDZcut"      : 1.5     ,#mm
+      #ds
+      "DsMassWindow"       : 400.  ,#MeV
+      "Ds_CHI2DOF"         : 10.   ,#adimensional
+      "Ds_FDCHI2HIGH"      : 100.  ,#adimensional
+      "Ds_DIRA"            : 0.99 ,#adimensional
+      "Ds_BPVVDZcut"       : 0.0   ,#mm
+      #bs
+      "BsMassWindowHigh"   : 6000. ,#MeV
+      "BsMassWindowLow"    : 5000. ,#MeV,
+      "BsFDCHI2HIGH"       : 35.   ,#adimensional
+      "BsDIRA"             : 0.9   ,#adimensional
+      "BsPVVDZcut"         : 2.    ,#mm
+      "Bs_JpsiPhi_CHI2DOF" : 35.   ,#adimensional
+      "Bs_DsPi_CHI2DOF"    : 25.   ,#adimensional
+      #bc
+      "BcPVVDZcut"         : 0.080  ,#mm
+      "Bc_CHI2DOF"         : 20.   ,#adimensional
+      "BcPT"               : 3000. ,#MeV
+      "BcP"                : 30000.,#MeV
+      "BcDIRA_Tight"       : 0.99  ,#adimensional
+      "BcDIRA_Loose"       : 0.9   ,#adimensional
+      },
+  'STREAMS'     : ['Leptonic']    
+}
+
+
+
+class Bc2BsBuilder(LineBuilder):
+    """
+    definition of the Bc->BsX stripping module
+    """
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    def __init__(self,name,config):
+        LineBuilder.__init__(self,name,config)
+        self.config = config
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+        ## GECs for # long tracks
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        ## Pions
+        self._pionSel=None
+        self._pionFilter()
+        self._pionFromBsSel = None
+        self._pionFromBsFilter()
+        self._bachPionSel = None
+        self._bachPionFilter()
+        ## Kaons
+        self._kaonSel=None
+        self._kaonFilter()
+        self._kaonSelForPhi = None
+        self._kaonFilter_forPhi()
+
+        self._kaonFromBcSel = None
+        self._kaonFromBcFilter()
+
+        self._kaonFromBsSel = None
+        self._kaonFromBsFilter()
+        #muons
+        self._muonSel=None
+        self._muonFilter()
+        self._bachMuSel = None
+        self._bachMuFilter()
+
+        #electrons
+        self._electronSel = None
+        self._electronFilter()
+        #ds
+        self._Ds2KKpiSel = None
+        self._Ds2KKpiMaker()
+        #jpsi
+        self._Jpsi2mumuSel = None
+        self._Jpsi2mumuMaker()
+        #phi
+        self._Phi2KKSel = None
+        self._Phi2KKMaker()
+        
+        #jpsi/phi
+        self._Bs2JpsiPhiSel = None
+        self._Bs2JpsiPhiMaker()
+        #dspi
+        self._Bs2DsPiSel = None
+        self._Bs2DsPiMaker()
+        #dsk
+        self._Bs2DsKSel = None
+        self._Bs2DsKMaker()
+        #register lines
+        for line in self.Bc2BsMu():
+            self.registerLine(line)
+        for line in self.Bc2BsE():
+            self.registerLine(line)
+        for line in self.Bc2BsPi():
+            self.registerLine(line)
+        for line in self.Bc2BsK():
+            self.registerLine(line)
+
+
+    #selections for the muons
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s )  &"\
+               "(P> %(MuonP)s *MeV)  &"\
+               "(PT> %(MuonPT)s* MeV)  &"\
+               "(TRGHOSTPROB < %(MuonGHOSTPROB)s) &"\
+               "(PIDmu > %(MuonPIDmu)s )  &"\
+               "(MIPDV(PRIMARY)> %(MuonMINIP)s )"
+
+    def _BachMuSelection( self ):
+      return "(TRCHI2DOF < %(BachMuonTRCHI2)s )&"\
+             "(P> %(BachMuonP)s *MeV)&"\
+             "(PT> %(BachMuonPT)s* MeV)&"\
+             "(TRGHOSTPROB < %(MuonGHOSTPROB)s)&"\
+             "(PIDmu > %(BachMuonPIDmu)s )&"\
+             "(MIPDV(PRIMARY)> %(BachMuonMINIP)s)"
+
+    def _NominalPiSelection( self ):
+        return "(TRCHI2DOF < %(PionTRCHI2)s )&"\
+               "(P> %(PionP)s *MeV)&"\
+               "(PT> %(PionPT)s *MeV)&"\
+               "(TRGHOSTPROB < %(TRGHOSTPROB)s)&"\
+               "(PIDK < %(PionPIDK)s )&"\
+               "(MIPDV(PRIMARY)> %(PionMINIP)s ) "
+
+    def _NominalPiFromBsSelection( self ):
+        return "(TRCHI2DOF < %(PionFromBsTRCHI2)s )&"\
+               "(P> %(PionFromBsP)s *MeV)& "\
+               "(PT> %(PionFromBsPT)s *MeV)& "\
+               "(TRGHOSTPROB < %(TRGHOSTPROB)s)& "\
+               "(PIDK < %(PionFromBsPIDK)s )& "\
+               "(MIPDV(PRIMARY)> %(PionFromBsMINIP)s )"
+
+    def _NominalKSelection( self ):
+        return " (TRCHI2DOF < %(KaonTRCHI2)s )& "\
+               " (P> %(KaonP)s *MeV)& "\
+               " (PT> %(KaonPT)s *MeV)&"\
+               " (TRGHOSTPROB < %(TRGHOSTPROB)s)&"\
+               " (PIDK > %(KaonPIDK)s )&"\
+               " (MIPDV(PRIMARY)> %(KaonMINIP)s )"
+
+    def _NominalKSelectionForPhi( self ):
+        return "(TRCHI2DOF < %(KaonTRCHI2)s )& "\
+               "(P> %(KaonP_phi)s *MeV)& "\
+               "(PT> %(KaonPT_phi)s *MeV)&"\
+               "(TRGHOSTPROB < %(TRGHOSTPROB)s)&"\
+               "(PIDK > %(KaonPIDK_phi)s )&"\
+               "(MIPDV(PRIMARY)> %(KaonMINIP_phi)s )"
+
+    def _NominalKFromBsSelection( self ):
+        return "(TRCHI2DOF < %(K_from_bs_TRCHI2)s )&"\
+               "(P> %(K_from_bs_P)s *MeV)& "\
+               "(PT> %(K_from_bs_PT)s *MeV)& "\
+               "(TRGHOSTPROB < %(TRGHOSTPROB)s)& "\
+               "(PIDK > %(K_from_bs_PIDK)s )& "\
+               "(MIPDV(PRIMARY)> %(K_from_bs_MINIP)s )"
+
+    def _NominalElectronSelection( self ):
+        return "(TRCHI2DOF < %(ElectronTRCHI2)s ) &"\
+               "( P> %(ElectronP)s * MeV) &"\
+               "( PT > %(ElectronPT)s * MeV) &"\
+               "( TRGHOSTPROB < %(ElectronGHOSTPROB)s ) &"\
+               "( PIDe > %(ElectronPIDe)s ) &"\
+               "(MIPDV(PRIMARY) > %(ElectronMINIP)s ) "
+    
+    def _NominalBachPiSelection( self ):
+        return "(TRCHI2DOF < %(BachPionTRCHI2)s ) & "\
+               "(P> %(BachPionP)s *MeV) & "\
+               "(PT> %(BachPionPT)s *MeV) &"\
+               "(TRGHOSTPROB < %(TRGHOSTPROB)s) &"\
+               "(PIDK < %(BachPionPIDK)s ) &"\
+               "(MIPDV(PRIMARY)> %(BachPionMINIP)s ) "
+    
+    def _NominalKfromBcSelection( self ):
+      return "(TRCHI2DOF < %(K_from_bc_TRCHI2)s ) & "\
+             "(P> %(K_from_bc_P)s *MeV) & "\
+             "(PT> %(K_from_bc_PT)s *MeV) &"\
+             "(TRGHOSTPROB < %(TRGHOSTPROB)s) &"\
+             "(PIDK > %(K_from_bc_PIDK)s ) &"\
+             "(MIPDV(PRIMARY)> %(K_from_bc_MINIP)s ) "
+    
+    def _kaonFromBcFilter( self ):
+      if self._kaonFromBcSel  is not None:
+        return self._kaonFromBcSel
+
+      from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+      from PhysSelPython.Wrappers import Selection
+      from StandardParticles import StdAllLooseKaons
+      _k_from_bc =  FilterDesktop( Code = self._NominalKfromBcSelection() % self._config )
+      _k_from_bc_sel = Selection("K_from_bc_for"+self._name,
+                                Algorithm = _k_from_bc,
+                                RequiredSelections = [StdAllLooseKaons]
+                                )
+      self._kaonFromBcSel = _k_from_bc_sel
+      return _k_from_bc_sel
+
+    def _electronFilter( self ):
+        if self._electronSel is not None:
+            return self._electronSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLooseElectrons
+
+        _el = FilterDesktop( Code = self._NominalElectronSelection() % self._config )
+        _electronSel=Selection("Electron_for"+self._name,
+                               Algorithm=_el,
+                               RequiredSelections = [StdAllLooseElectrons]
+                               )
+        
+        self._electronSel=_electronSel
+        
+        return _electronSel
+    
+    def _muonFilter( self ):
+        if self._muonSel is not None:
+            return self._muonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLooseMuons
+        
+        _mu = FilterDesktop( Code = self._NominalMuSelection()%self._config )
+        _muSel=Selection("Mu_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdAllLooseMuons]
+                         )
+        
+        self._muonSel=_muSel
+
+        return _muSel
+
+    def _pionFilter( self ):
+        if self._pionSel is not None:
+            return self._pionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLoosePions
+        _pia = FilterDesktop( Code = self._NominalPiSelection() % self._config )
+        _piaSel=Selection("Pi_for"+self._name,
+                          Algorithm=_pia,
+                          RequiredSelections = [StdAllLoosePions]
+                          )
+        self._pionSel=_piaSel
+        return _piaSel
+
+    def _pionFromBsFilter( self ):
+        if self._pionFromBsSel is not None:
+            return self._pionFromBsSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLoosePions
+        _pib = FilterDesktop( Code = self._NominalPiFromBsSelection() % self._config )
+        _pibSel=Selection("PiFromBs_for"+self._name,
+                          Algorithm=_pib,
+                          RequiredSelections = [StdAllLoosePions]
+                          )
+        self._pionFromBsSel=_pibSel
+        return _pibSel
+
+    def _kaonFilter( self ):
+        if self._kaonSel is not None:
+            return self._kaonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllNoPIDsKaons
+        _ka = FilterDesktop( Code = self._NominalKSelection() % self._config )
+        _kaSel=Selection("K_for"+self._name,
+                         Algorithm=_ka,
+                         RequiredSelections = [StdAllNoPIDsKaons]
+                         )
+        self._kaonSel=_kaSel
+        return _kaSel
+    
+    def _kaonFilter_forPhi( self ):
+        if self._kaonSelForPhi is not None:
+            return self._kaonSelForPhi
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLooseKaons
+
+        _kap = FilterDesktop(Code = self._NominalKSelectionForPhi() % self._config )
+        _kapSel=Selection("K_for_phi_for"+self._name,
+                         Algorithm=_kap,
+                         RequiredSelections = [StdAllLooseKaons]
+                         )
+        self._kaonSelForPhi=_kapSel
+        return _kapSel
+    def _kaonFromBsFilter( self ):
+        if self._kaonFromBsSel is not None:
+            return self._kaonFromBsSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLooseKaons
+        _kib = FilterDesktop( Code = self._NominalKFromBsSelection() % self._config )
+        _kibSel=Selection("KFromBs_for"+self._name,
+                          Algorithm=_kib,
+                          RequiredSelections = [StdAllLooseKaons]
+                          )
+        self._kaonFromBsSel=_kibSel
+        return _kibSel
+
+    def _bachPionFilter( self ):
+        if self._bachPionSel is not None:
+            return self._bachPionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLoosePions
+        _bachpi = FilterDesktop( Code = self._NominalBachPiSelection() % self._config )
+        _bachpiSel=Selection("pis_for"+self._name,
+                         Algorithm=_bachpi,
+                         RequiredSelections = [StdAllLoosePions]
+                         )
+        self._bachPionSel=_bachpiSel
+        return _bachpiSel
+
+    def _bachMuFilter( self ):
+        if self._bachMuSel is not None:
+            return self._bachMuSel
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLooseMuons
+        _bachmu = FilterDesktop( Code = self._BachMuSelection() % self.config )
+        _bachmusel = Selection("bach_mu_for"+self._name,
+                               Algorithm = _bachmu,
+                               RequiredSelections = [StdAllLooseMuons]
+                               )
+        self._bachMuSel = _bachmusel
+        return _bachmusel
+    
+    def _Bc2BsXMothCuts( self, points_to_PV=False ):
+      the_string = "( VFASPF(VCHI2/VDOF)< %(Bc_CHI2DOF)s )&"\
+             "( PT > %(BcPT)s * MeV )&"\
+             "( P  > %(BcP)s * MeV )&"\
+             "(BPVVDZ > %(BcPVVDZcut)s)"
+      if True==points_to_PV:
+          the_string += " & ( BPVDIRA > %(BcDIRA_Tight)s )"
+      else:
+          the_string += " & ( BPVDIRA > %(BcDIRA_Loose)s )"
+      return the_string
+
+    #### composites
+    def _Ds2KKpiMaker( self ):
+        if self._Ds2KKpiSel is not None:
+            return self._Ds2KKpiSel
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLoosePions, StdAllLooseKaons
+
+        _Ds2KKpi = CombineParticles(
+            DecayDescriptors = ["[D_s+ -> K+ K- pi+]cc"],
+            DaughtersCuts = {"K+":self._NominalKSelection() % self._config,
+                             "pi+":self._NominalPiSelection() % self._config },
+            CombinationCut =  "( ADAMASS('D_s+') < %(DsMassWindow)s * MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(Ds_CHI2DOF)s )&"\
+                        "(BPVVDCHI2 >%(Ds_FDCHI2HIGH)s)&"\
+                        "(BPVDIRA > %(Ds_DIRA)s)&"\
+                        "(BPVVDZ > %(Ds_BPVVDZcut)s)" % self._config)
+        _Ds2KKpiSel = Selection("Ds2KKpi_for"+self._name,
+                                Algorithm = _Ds2KKpi,
+                                RequiredSelections = [self._pionFilter(), self._kaonFilter()])
+        self._Ds2KKpiSel = _Ds2KKpiSel
+        return _Ds2KKpiSel
+
+    def _Phi2KKMaker( self ):
+        if self._Phi2KKSel is not None:
+            return self._Phi2KKSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLoosePions, StdAllLooseKaons
+
+        _Phi2KK = CombineParticles(
+            DecayDescriptors = ["phi(1020) -> K+ K-"],
+            DaughtersCuts = {"K+":self._NominalKSelection() % self._config,
+                             "K-":self._NominalKSelection() % self._config},
+            CombinationCut =  "( ADAMASS('phi(1020)') < %(PhiMassWindow)s * MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(Phi_CHI2DOF)s ) &"\
+                        "(PT > %(PhiPT)s * MeV) &"\
+                        "(BPVDIRA > %(PhiDIRA)s) "%self._config)
+        _Phi2KKSel = Selection("Phi2KK_for"+self._name,
+                                Algorithm = _Phi2KK,
+                                RequiredSelections = [ self._kaonFilter_forPhi()])
+        self._Phi2KKSel = _Phi2KKSel
+        return _Phi2KKSel
+
+    def _Jpsi2mumuMaker( self ):
+        if self._Jpsi2mumuSel is not None:
+            return self._Jpsi2mumuSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLooseMuons
+
+        _Jpsi2mumu = CombineParticles(
+            DecayDescriptors = ["J/psi(1S) -> mu+ mu-"],
+            DaughtersCuts = {"mu+":'ALL',#self._NominalMuSelection() % self._config,
+                             "mu-":'ALL',#self._NominalMuSelection() % self._config
+                             },
+            CombinationCut =  "( ADAMASS('J/psi(1S)') < %(JpsiMassWindow)s * MeV)" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(Jpsi_CHI2DOF)s )&"\
+                        "(PT > %(JpsiPT)s )&"\
+                        "(BPVDIRA > %(Jpsi_DIRA)s)&"\
+                        "(BPVVDZ > %(Jpsi_BPVVDZcut)s)" % self._config)
+        _Jpsi2mumuSel = Selection("Jpsi2mumu_for"+self._name,
+                                Algorithm = _Jpsi2mumu,
+                                RequiredSelections = [self._muonFilter()])
+        self._Jpsi2mumuSel = _Jpsi2mumuSel
+        return _Jpsi2mumuSel
+
+    def _Bs2JpsiPhiMaker( self ):
+        if self._Bs2JpsiPhiSel is not None:
+            return self._Bs2JpsiPhiSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+
+
+        _Bs2JpsiPhi = CombineParticles(
+            DecayDescriptors = ["[ B_s0 -> J/psi(1S)  phi(1020) ]cc"],
+            DaughtersCuts = {'J/psi(1S)':"ALL",'phi(1020)':"ALL"},
+            CombinationCut =  "( AM < %(BsMassWindowHigh)s * MeV) & ( AM > %(BsMassWindowLow)s )" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(Bs_JpsiPhi_CHI2DOF)s ) &"\
+                        "(BPVVDCHI2 >%(BsFDCHI2HIGH)s) &"\
+                        "(BPVDIRA > %(BsDIRA)s) &"\
+                        "(BPVVDZ > %(BsPVVDZcut)s) " % self._config)
+        _Bs2JpsiPhiSel = Selection("Bs2JpsiPhi_for"+self._name,
+                                Algorithm = _Bs2JpsiPhi,
+                                RequiredSelections = [ self._Jpsi2mumuMaker(), self._Phi2KKMaker() ])
+        self._Bs2JpsiPhiSel = _Bs2JpsiPhiSel
+        return _Bs2JpsiPhiSel
+
+    def _Bs2DsPiMaker( self ):
+        if self._Bs2DsPiSel is not None:
+            return self._Bs2DsPiSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLoosePions
+
+        _Bs2DsPi = CombineParticles(
+            DecayDescriptors = ["[ B_s0 -> D_s- pi+ ]cc", "[B_s0 -> D_s+ pi+]cc"],
+            DaughtersCuts = {'D_s-':"ALL",'pi+':"ALL"},
+            CombinationCut =  "( AM < %(BsMassWindowHigh)s * MeV) & ( AM > %(BsMassWindowLow)s )" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(Bs_DsPi_CHI2DOF)s )  &"\
+                        "(BPVVDCHI2 >%(BsFDCHI2HIGH)s)  &"\
+                        "(BPVDIRA > %(BsDIRA)s)  &"\
+                        "(BPVVDZ > %(BsPVVDZcut)s) " % self._config)
+        _Bs2DsPiSel = Selection("Bs2DsPi_for"+self._name,
+                                Algorithm = _Bs2DsPi,
+                                RequiredSelections = [self._Ds2KKpiMaker(), self._pionFromBsFilter() ])
+        self._Bs2DsPiSel = _Bs2DsPiSel
+        return _Bs2DsPiSel
+
+
+    def _Bs2DsKMaker( self ):
+        if self._Bs2DsKSel is not None:
+            return self._Bs2DsKSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllLooseKaons
+
+        _Bs2DsK = CombineParticles(
+            DecayDescriptors = ["[ B_s0 -> D_s- K+ ]cc", "[B_s0 -> D_s+ K+]cc"],
+            DaughtersCuts = {'D_s-':"ALL",'pi+':"ALL"},
+            CombinationCut =  "( AM < %(BsMassWindowHigh)s * MeV) & ( AM > %(BsMassWindowLow)s )" % self._config,
+            MotherCut = "(VFASPF(VCHI2/VDOF)< %(Bs_DsPi_CHI2DOF)s )  &"\
+                        "(BPVVDCHI2 >%(BsFDCHI2HIGH)s)  &"\
+                        "(BPVDIRA > %(BsDIRA)s)  &"\
+                        "(BPVVDZ > %(BsPVVDZcut)s) " % self._config)
+        _Bs2DsKSel = Selection("Bs2DsK_for"+self._name,
+                                Algorithm = _Bs2DsK,
+                                RequiredSelections = [self._Ds2KKpiMaker(), self._kaonFromBsFilter() ])
+        self._Bs2DsKSel = _Bs2DsKSel
+        return _Bs2DsKSel
+    # finally Bc
+    def Bc2BsXmaker( self, _name, _descriptors,_mothCuts, _bachPart, _BsSel ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+
+        _cparts = CombineParticles(
+            DecayDescriptors = _descriptors,
+            MotherCut = _mothCuts
+            )
+        _sel = Selection(_name,
+                         Algorithm = _cparts,
+                         RequiredSelections = [_bachPart,_BsSel])
+        return _sel
+        
+
+    def Bc2BsMu(self):
+        from StrippingConf.StrippingLine import StrippingLine
+        return [ StrippingLine(self._name+"Bc2BsMu_Jpsiphi", prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsMuNuJpsiPhiSel",
+                                                   ['[B_c+ -> B_s0 mu+]cc', '[B_c+ -> B_s~0 mu+]cc'],
+                                                   self._Bc2BsXMothCuts(points_to_PV=False)%self._config,
+                                                   self._bachMuFilter(),
+                                                   self._Bs2JpsiPhiMaker())],
+                               RequiredRawEvents=[ "Calo"]),
+                 StrippingLine(self._name+"Bc2BsMu_Dspi",prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsMuNuDsPiSel",
+                                                        ['[B_c+ -> B_s0 mu+]cc','[B_c+ -> B_s~0 mu+]cc'],
+                                                        self._Bc2BsXMothCuts(points_to_PV=False)%self._config,
+                                                        self._bachMuFilter(),
+                                                        self._Bs2DsPiMaker())],
+                               RequiredRawEvents=[ "Calo"]),
+                 StrippingLine(self._name+"Bc2BsMu_DsK",prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsMuNuDsKSel",
+                                                        ['[B_c+ -> B_s0 mu+]cc','[B_c+ -> B_s~0 mu+]cc'],
+                                                        self._Bc2BsXMothCuts(points_to_PV=False)%self._config,
+                                                        self._bachMuFilter(),
+                                                        self._Bs2DsKMaker())],
+                               RequiredRawEvents=[ "Calo"]),
+                 ]
+    
+                                                        
+                                                        
+    def Bc2BsE(self):
+        from StrippingConf.StrippingLine import StrippingLine
+        return [ StrippingLine(self._name+"Bc2BsE_Jpsiphi", prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsENuJpsiPhiSel",
+                                                   ['[B_c+ -> B_s0 e+]cc', '[B_c+ -> B_s~0 e+]cc'],
+                                                   self._Bc2BsXMothCuts(points_to_PV=False)%self._config,
+                                                   self._electronFilter(),
+                                                   self._Bs2JpsiPhiMaker())],
+                               RequiredRawEvents=[ "Calo"]),
+                 StrippingLine(self._name+"Bc2BsE_Dspi",prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsENuDsPiSel",
+                                                        ['[B_c+ -> B_s0 e+]cc','[B_c+ -> B_s~0 e+]cc'],
+                                                        self._Bc2BsXMothCuts(points_to_PV=False)%self._config,
+                                                        self._electronFilter(),
+                                                        self._Bs2DsPiMaker())],
+                               RequiredRawEvents=[ "Calo"]),
+                 StrippingLine(self._name+"Bc2BsE_DsK",prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsENuDsKSel",
+                                                        ['[B_c+ -> B_s0 e+]cc','[B_c+ -> B_s~0 e+]cc'],
+                                                        self._Bc2BsXMothCuts(points_to_PV=False)%self._config,
+                                                        self._electronFilter(),
+                                                        self._Bs2DsKMaker())],
+                               RequiredRawEvents=[ "Calo"])
+                 ]
+    def Bc2BsPi(self):
+        from StrippingConf.StrippingLine import StrippingLine
+        return [ StrippingLine(self._name+"Bc2BsPi_Jpsiphi", prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsPiJpsiPhiSel",
+                                                   ['[B_c+ -> B_s0 pi+]cc', '[B_c+ -> B_s~0 pi+]cc'],
+                                                   self._Bc2BsXMothCuts(points_to_PV=True)%self._config,
+                                                   self._bachPionFilter(),
+                                                   self._Bs2JpsiPhiMaker())],
+                               RequiredRawEvents=[ "Calo"]),
+                 StrippingLine(self._name+"Bc2BsPi_Dspi",prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsPiDsPiSel",
+                                                        ['[B_c+ -> B_s0 pi+]cc','[B_c+ -> B_s~0 pi+]cc'],
+                                                        self._Bc2BsXMothCuts(points_to_PV=True)%self._config,
+                                                        self._bachPionFilter(),
+                                                        self._Bs2DsPiMaker())],
+                               RequiredRawEvents=[ "Calo"]),
+                 StrippingLine(self._name+"Bc2BsPi_DsK",prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsPiDsKSel",
+                                                        ['[B_c+ -> B_s0 pi+]cc','[B_c+ -> B_s~0 pi+]cc'],
+                                                        self._Bc2BsXMothCuts(points_to_PV=True)%self._config,
+                                                        self._bachPionFilter(),
+                                                        self._Bs2DsKMaker())],
+                               RequiredRawEvents=[ "Calo"])
+                 ]
+    def Bc2BsK(self):
+        from StrippingConf.StrippingLine import StrippingLine
+        return [ StrippingLine(self._name+"Bc2BsK_Jpsiphi", prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsKJpsiPhiSel",
+                                                   ['[B_c+ -> B_s0 K+]cc', '[B_c+ -> B_s~0 K+]cc'],
+                                                   self._Bc2BsXMothCuts(points_to_PV=True)%self._config,
+                                                   self._kaonFromBcFilter(),
+                                                   self._Bs2JpsiPhiMaker())],
+                               RequiredRawEvents=[ "Calo"]),
+                 StrippingLine(self._name+"Bc2BsK_Dspi",prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsKDsPiSel",
+                                                        ['[B_c+ -> B_s0 K+]cc','[B_c+ -> B_s~0 K+]cc'],
+                                                        self._Bc2BsXMothCuts(points_to_PV=True)%self._config,
+                                                        self._kaonFromBcFilter(),
+                                                        self._Bs2DsPiMaker())],
+                               RequiredRawEvents=[ "Calo"]),
+                 StrippingLine(self._name+"Bc2BsK_DsK",prescale = 1.0,
+                               FILTER = self.GECs,
+                               algos = [self.Bc2BsXmaker("Bc2BsKDsKSel",
+                                                        ['[B_c+ -> B_s0 K+]cc','[B_c+ -> B_s~0 K+]cc'],
+                                                        self._Bc2BsXMothCuts(points_to_PV=True)%self._config,
+                                                        self._kaonFromBcFilter(),
+                                                        self._Bs2DsKMaker())],
+                               RequiredRawEvents=[ "Calo"])
+                 ]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingCharmFromBSemiForHadronAsy.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingCharmFromBSemiForHadronAsy.py
new file mode 100644
index 000000000..132b51eba
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingCharmFromBSemiForHadronAsy.py
@@ -0,0 +1,423 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+"""
+Partially reconstructed charm from B,
+with muon and slow pion(s) tags.
+Includes
+- D0 -> K3pi with muon and D* tag
+- Lambda_c+ -> pKpi with muon and Lambda_c* tags
+"""
+__author__ = ['Mika Vesterinen']
+__date__ = '10/03/2013'
+__version__ = '$Revision: 0.0 $'
+
+from Gaudi.Configuration import *
+
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdAllLoosePions, StdLoosePions, StdLooseMuons, StdLooseKaons, StdLooseProtons
+from Configurables import TisTosParticleTagger
+
+__all__ = ('CharmFromBSemiForHadronAsyAllLinesConf',
+           'TOSFilter',
+           'confdict')
+           
+default_config = {
+  'NAME'        : 'CharmFromBSemiForHadronAsy',
+  'WGs'         : ['Semileptonic'],
+  'BUILDERTYPE' : 'CharmFromBSemiForHadronAsyAllLinesConf',
+  'CONFIG'      : {
+    "prescale_LbRS" : 1.0
+    ,"prescale_LbWS" : 0.2 
+    ,"prescale_D0to3piRS" : 1.0
+    ,"prescale_D0to3piWS" : 0.2
+    ,"prescale_D0toK2piRS" : 1.0
+    ,"prescale_D0toK2piWS" : 0.2 
+    #### common to all modes
+    ,"GEC_nLongTrk" : 250. # adimensional
+    ,"GHOSTPROB_MAX" : 0.35 #adimensional
+    ,"Mu_PT" : 800. # MeV
+    ,"H_PT"  : 250. # MeV
+    ,"Pi_PIDKMax" : 6. # adimensional
+    ,"K_PIDKMin"  : 6. # adimensional
+    ,"Slowpi_PIDKMax" : 10. # adimensional
+    ,"Slowpi_PIDeMax" : 99. # adimensional
+    ,"Slowpi_PTMin"   : 200. # MeV
+    ##### specific to D0 modes
+    ,"MuPi_SUMPT_MIN" : 1300. # MeV
+    ,"MuPi_DOCACHI2_MAX" : 8.0 # adimensional
+    ,"MuPi_CHI2NDOF_MAX" : 3.0 # adimensional
+    ,"MuPi_DIRA_MIN" : -99. # adimensional
+    ,"MuPi_FDCHI2_MIN" : 20. # adimensional
+    ,"D0to3H_REQUIRE_TOS" : True # bool
+    ,"D0to3H_DOCACHI2_MAX" : 10. # adimensional
+    ,"D0to3H_VCHI2NDF_MAX" : 3.0 # adimensional
+    ,"D0to3H_SUMPT_MIN" : 1800. # MeV
+    ,"D0to3H_DZ" : 2.0 # mm
+    ,"D0to3H_3pi_DeltaMass_MAX" : 350. # MeV
+    ,"D0to3H_K2pi_DeltaMass_MAX" : 250. # MeV
+    ,"D0to3H_3pi_MASS_MIN" : 900. # MeV
+    ,"D0to3H_3pi_MASS_MAX" : 1400. # MeV
+    ,"D0to3H_K2pi_MASS_MIN" : 1300. # MeV
+    ,"D0to3H_K2pi_MASS_MAX" : 1800. # MeV
+    ,"D0to3H_B_MASS_MIN" : 1800. # MeV
+    ,"D0to3H_B_MASS_MAX" : 4900. # MeV
+    ,"D0to3H_B_DIRA_MIN" : 0.99 # adimensional
+    ,"D0to3H_B_VCHI2NDF_MAX" : 15. # adimensional
+    ,"D0to3H_B_DOCACHI2_MAX" : 50. # adimensional
+    #### specific to Lambda_c+ modes
+    ,"PiPi_MASS_MAX" : 500.  # MeV
+    ,"PiPi_DOCACHI2_MAX" : 15. # adimensional
+    ,"PiPi_CHI2NDF" : 3. # adimensional
+    ,"PiPi_SUMPT_MIN" : 600.  # MeV
+    ,"MuPiPi_DOCACHI2_MAX" : 15. 
+    ,"MuPiPi_CHI2NDF": 3.
+    ,"MuPiPi_FDCHI2_MIN" : 20. # adimensional
+    ,"Lc2Kpi_REQUIRE_TOS" : True # bool
+    ,"Lc2Kpi_DOCACHI2_MAX" : 10. # adimensional
+    ,"Lc2Kpi_VCHI2NDF_MAX" : 3.0 # adimensional
+    ,"Lc2Kpi_SUMPT_MIN" : 1500.  # MeV
+    ,"Lc2Kpi_FDCHI2_MIN" : 20. # adimensional
+    ,"Lc2Kpi_MASS_MIN" : 800.  # MeV
+    ,"Lc2Kpi_MASS_MAX" : 1350. # MeV
+    ,"Lc2Kpi_DeltaMass_MAX" : 700. # MeV
+    ,"Lc2Kpi_DZ" : 1.0 # mm
+    ,"Lc2Kpi_B_MASS_MIN" : 2200. # MeV
+    ,"Lc2Kpi_B_MASS_MAX" : 4300. # MeV
+    ,"Lc2Kpi_B_FDCHI2_MIN" : 20. # adimensional
+    ,"Lc2Kpi_B_DIRA_MIN" : 0.99 # adimensional
+    ,"Lc2Kpi_B_DOCACHI2_MAX" : 50. # adimensional
+    ,"Lc2Kpi_B_VCHI2NDF_MAX" : 15. # adimensional
+  },
+  'STREAMS' : ['BhadronCompleteEvent'],
+}   
+
+class CharmFromBSemiForHadronAsyAllLinesConf(LineBuilder) :
+    """
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+    
+    def __init__(self, _name, config) :
+
+        LineBuilder.__init__(self, _name, config)
+        self.__confdict__=config
+        
+        ### define the global event cuts
+        ### max number of long tracks
+        GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" %config ,
+                 "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        ### define the muon cuts
+        self.MuonCuts = "(PT > %(Mu_PT)s *MeV) & (TRGHOSTPROB < %(GHOSTPROB_MAX)s) & (PIDmu > 0)" %config
+        self.PionCuts = "(PT > %(H_PT)s *MeV) & (TRGHOSTPROB < %(GHOSTPROB_MAX)s) & (PIDK < %(Pi_PIDKMax)s)" %config 
+        self.KaonCuts = "(PT > %(H_PT)s *MeV) & (TRGHOSTPROB < %(GHOSTPROB_MAX)s) & (PIDK > %(K_PIDKMin)s)" %config 
+        self.SlowpionCuts = "(PT > %(Slowpi_PTMin)s*MeV) & (TRGHOSTPROB < %(GHOSTPROB_MAX)s) & (PIDe < %(Slowpi_PIDeMax)s)"\
+                          "& (PIDK < %(Slowpi_PIDKMax)s)" %config
+        
+        self.Muons = Selection( "Mufor" + _name,
+                                Algorithm = FilterDesktop(name = "MuFilterFor"+_name, Code = self.MuonCuts ),
+                                RequiredSelections = [StdLooseMuons])
+        
+        self.Pions = Selection( "Pifor" + _name,
+                                Algorithm = FilterDesktop(name = "PiFilterFor"+_name, Code = self.PionCuts),
+                                RequiredSelections = [StdLoosePions])
+
+        self.Kaons = Selection( "Kfor" + _name,
+                                Algorithm = FilterDesktop(name = "KFilterFor"+_name, Code = self.KaonCuts),
+                                RequiredSelections = [StdLooseKaons])
+
+        self.Slowpions = Selection( "Slowpifor" + _name,
+                                    Algorithm = FilterDesktop(name = "SlowpiFilterFor"+_name, Code = self.SlowpionCuts),
+                                    RequiredSelections = [StdLoosePions])
+        #### D0 -> K3pi lines
+        
+        self.D0to3pi_RS = D0To3HMaker("D0To3piRSFor"+_name
+                                      ,config["D0to3H_3pi_MASS_MIN"],config["D0to3H_3pi_MASS_MAX"]
+                                      ,config
+                                      ,[self.Pions]
+                                      ,['[D0 -> pi+ pi- pi+]cc'])
+
+        self.D0to3pi_WS = D0To3HMaker("D0To3piWSFor"+_name
+                                      ,config["D0to3H_3pi_MASS_MIN"],config["D0to3H_3pi_MASS_MAX"]
+                                      ,config
+                                      ,[self.Pions]
+                                      ,['[D0 -> pi+ pi- pi+]cc','[D0 -> pi+ pi+ pi+]cc'])
+        
+        self.D0toK2pi_RS = D0To3HMaker("D0ToK2piRSFor"+_name
+                                       ,config["D0to3H_K2pi_MASS_MIN"],config["D0to3H_K2pi_MASS_MAX"]
+                                       ,config,[self.Kaons,self.Pions]
+                                       ,['[D0 -> K- pi+ pi-]cc','[D0 -> K- pi+ pi+]cc'])
+
+        self.D0toK2pi_WS = D0To3HMaker("D0ToK2piWSFor"+_name
+                                       ,config["D0to3H_K2pi_MASS_MIN"],config["D0to3H_K2pi_MASS_MAX"]
+                                       ,config,[self.Kaons,self.Pions]
+                                       ,['[D0 -> K- pi+ pi-]cc',
+                                         '[D0 -> K- pi+ pi+]cc',
+                                         '[D0 -> K- pi- pi-]cc',
+                                         '[D0 -> K+ pi+ pi-]cc',
+                                         '[D0 -> K+ pi+ pi+]cc',
+                                         '[D0 -> K+ pi- pi-]cc'])
+
+        self.MuPi_RS = MuPiMaker("MuPiRSFor"+_name
+                                 ,config
+                                 ,[self.Muons,self.Slowpions]
+                                 ,['[K*(892)+ -> mu+ pi-]cc'])
+
+        self.MuPi_WS = MuPiMaker("MuPiWSFor"+_name
+                                 ,config
+                                 ,[self.Muons,self.Slowpions]
+                                 ,['[K*(892)+ -> mu+ pi-]cc',
+                                   '[K*(892)+ -> mu- pi+]cc',
+                                   '[K*(892)+ -> mu+ pi+]cc',
+                                   '[K*(892)+ -> mu- pi-]cc'])
+
+        self.BtoDstarMuD0to3pi_RS = BtoDstarMuMaker("BtoDstarMuD0to3pi_RSFor"+_name
+                                                    ,config["D0to3H_3pi_DeltaMass_MAX"]
+                                                    ,config
+                                                    ,[self.MuPi_RS,self.D0to3pi_RS]
+                                                    ,['[B0 -> D~0 K*(892)+]cc'])
+
+        self.BtoDstarMuD0to3pi_WS = BtoDstarMuMaker("BtoDstarMuD0to3pi_WSFor"+_name
+                                                    ,config["D0to3H_3pi_DeltaMass_MAX"]
+                                                    ,config
+                                                    ,[self.MuPi_WS,self.D0to3pi_WS]
+                                                    ,['[B0 -> D~0 K*(892)+]cc'])
+        
+        self.BtoDstarMuD0toK2pi_RS = BtoDstarMuMaker("BtoDstarMuD0toK2pi_RSFor"+_name
+                                                     ,config["D0to3H_K2pi_DeltaMass_MAX"]
+                                                     ,config
+                                                     ,[self.MuPi_RS,self.D0toK2pi_RS]
+                                                     ,['[B0 -> D~0 K*(892)+]cc'])
+
+        self.BtoDstarMuD0toK2pi_WS = BtoDstarMuMaker("BtoDstarMuD0toK2pi_WSFor"+_name
+                                                     ,config["D0to3H_K2pi_DeltaMass_MAX"]
+                                                     ,config
+                                                     ,[self.MuPi_WS,self.D0toK2pi_WS]
+                                                     ,['[B0 -> D~0 K*(892)+]cc'])
+        
+        self.B2DstarMuD0to3piRSLine = StrippingLine(_name+'_B2DstarMuD0to3piRS',
+                                                    prescale = config["prescale_D0to3piRS"],
+                                                    FILTER=GECs,
+                                                    selection = self.BtoDstarMuD0to3pi_RS)
+
+        self.B2DstarMuD0to3piWSLine = StrippingLine(_name+'_B2DstarMuD0to3piWS',
+                                                    prescale = config["prescale_D0to3piWS"],
+                                                    FILTER=GECs,
+                                                    selection = self.BtoDstarMuD0to3pi_WS)
+        
+        self.B2DstarMuD0toK2piRSLine = StrippingLine(_name+'_B2DstarMuD0toK2piRS',
+                                                    prescale = config["prescale_D0toK2piRS"],
+                                                    FILTER=GECs,
+                                                    selection = self.BtoDstarMuD0toK2pi_RS)
+
+        self.B2DstarMuD0toK2piWSLine = StrippingLine(_name+'_B2DstarMuD0toK2piWS',
+                                                    prescale = config["prescale_D0toK2piWS"],
+                                                    FILTER=GECs,
+                                                    selection = self.BtoDstarMuD0toK2pi_WS)
+        
+        
+        ###################### Lambda_c lines ##########################
+        
+        self.LcToKpi_RS = LcToKpiMaker("LcToKpiRSFor"+_name,config,[self.Kaons,self.Pions],['[Lambda_c+ -> K- pi+]cc'])
+        self.LcToKpi_WS = LcToKpiMaker("LcToKpiWSFor"+_name,config,[self.Kaons,self.Pions],
+                                        ['[Lambda_c+ -> K- pi+]cc','[Lambda_c+ -> K+ pi-]cc','[Lambda_c+ -> K+ pi+]cc','[Lambda_c+ -> K- pi-]cc'])
+        
+        self.PiPi_RS = PiPiMaker("PiPiRSFor"+_name,config,[self.Slowpions],['rho(770)0 -> pi+ pi-'])
+        self.PiPi_WS = PiPiMaker("PiPiWSFor"+_name,config,[self.Slowpions],['rho(770)0 -> pi+ pi-','rho(770)0 -> pi+ pi+','rho(770)0 -> pi- pi-'])
+
+        self.MuPiPi_RS = MuPiPiMaker("MuPiPiRSFor"+_name,config,[self.Muons,self.PiPi_RS],['[K*(892)+ -> mu+ rho(770)0]cc'])
+        self.MuPiPi_WS = MuPiPiMaker("MuPiPiWSFor"+_name,config,[self.Muons,self.PiPi_WS],['[K*(892)+ -> mu+ rho(770)0]cc',
+                                                                                           '[K*(892)+ -> mu- rho(770)0]cc'])
+
+        self.Lb_RS = LbMaker("LbRSFor"+_name,config,[self.MuPiPi_RS,self.LcToKpi_RS],['[Lambda_b0 -> Lambda_c+ K*(892)-]cc'])
+        self.Lb_WS = LbMaker("LbWSFor"+_name,config,[self.MuPiPi_WS,self.LcToKpi_WS],['[Lambda_b0 -> Lambda_c+ K*(892)-]cc'])
+
+        self.LbRSLine = StrippingLine(_name+'_LbToLcStarMuLcToKpiRS',
+                                      prescale = config["prescale_LbRS"],
+                                      FILTER=GECs,
+                                      selection = self.Lb_RS)
+        
+        self.LbWSLine = StrippingLine(_name+'_LbToLcStarMuLcToKpiWS',
+                                      prescale = config["prescale_LbWS"],
+                                      FILTER=GECs,
+                                       selection = self.Lb_WS)
+
+        ######## register lines 
+        
+        self.registerLine(self.B2DstarMuD0to3piRSLine)        
+        self.registerLine(self.B2DstarMuD0to3piWSLine)        
+        self.registerLine(self.B2DstarMuD0toK2piRSLine)        
+        self.registerLine(self.B2DstarMuD0toK2piWSLine)        
+        self.registerLine(self.LbRSLine)        
+        self.registerLine(self.LbWSLine)        
+        
+def MuPiMaker(_combName,config,_RequiredSelections,_decayDescriptors):
+    _CombinationCut = "(ACHILD(PT,1)+ACHILD(PT,2) > %(MuPi_SUMPT_MIN)s *MeV)"\
+                      "& (ADOCACHI2CUT(%(MuPi_DOCACHI2_MAX)s, ''))" %config
+    _MotherCut = "(VFASPF(VCHI2/VDOF) < %(MuPi_CHI2NDOF_MAX)s)"\
+                 "& (BPVDIRA> %(MuPi_DIRA_MIN)s)"\
+                 "& (BPVVDCHI2 > %(MuPi_FDCHI2_MIN)s)" %config
+    _comb = CombineParticles( name = "Comb"+_combName,
+                              DecayDescriptors = _decayDescriptors,
+                              CombinationCut = _CombinationCut,
+                              MotherCut = _MotherCut)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = _comb,
+                    RequiredSelections = _RequiredSelections)
+    return sel
+
+def BtoDstarMuMaker(_combName,DeltaMass_MAX,config,_RequiredSelections,_decayDescriptors):
+    preambulo = ['PXD0 = ACHILD(PX,1)',
+                 'PYD0 = ACHILD(PY,1)',
+                 'PZD0 = ACHILD(PZ,1)',
+                 'ED0  = ACHILD(E,1)',
+                 'PXPI = ACHILD(CHILD(PX,2),2)',
+                 'PYPI = ACHILD(CHILD(PY,2),2)',
+                 'PZPI = ACHILD(CHILD(PZ,2),2)',
+                 'EPI  = ACHILD(CHILD(E,2),2)',
+                 'MD0PI = sqrt((EPI+ED0)**2 - (PXPI+PXD0)**2 - (PYPI+PYD0)**2 - (PZPI+PZD0)**2)',
+                 'DELTA_MASS = MD0PI - ACHILD(M,1)']
+    _CombinationCut = "(DELTA_MASS < %s *MeV)" %DeltaMass_MAX
+    _CombinationCut += "& (ADOCACHI2CUT(%(D0to3H_B_DOCACHI2_MAX)s, ''))" %config 
+    _MotherCut = "(M > %(D0to3H_B_MASS_MIN)s *MeV) & (M < %(D0to3H_B_MASS_MAX)s *MeV)"\
+                 "& (MINTREE((ABSID=='D0'),VFASPF(VZ)) - MINTREE((ABSID=='K*(892)+'),VFASPF(VZ)) > %(D0to3H_DZ)s *mm )"\
+                 "& (VFASPF(VCHI2/VDOF) < %(D0to3H_B_VCHI2NDF_MAX)s)"\
+                 "& (BPVDIRA> %(D0to3H_B_DIRA_MIN)s)" %config
+    _comb = CombineParticles( name = "Comb"+_combName,
+                              Preambulo = preambulo,
+                              DecayDescriptors = _decayDescriptors,
+                              CombinationCut = _CombinationCut,
+                              MotherCut = _MotherCut)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = _comb,
+                    RequiredSelections = _RequiredSelections)
+    if config["D0to3H_REQUIRE_TOS"] == True:
+        sel_Hlt1TOS = TOSFilter( "Sel"+_combName+"_Hlt1TOS"
+                                 ,sel
+                                 ,"Hlt1.*Decision%TOS")
+        sel_Hlt2TOS = TOSFilter( "Sel"+_combName+"_Hlt2TOS"
+                                 ,sel_Hlt1TOS
+                                 ,"Hlt2.*Decision%TOS")
+        return sel_Hlt2TOS
+    else:
+        return sel
+
+def D0To3HMaker(_combName,MASS_MIN,MASS_MAX,config,_RequiredSelections,_decayDescriptors):
+    _CombinationCut = "(AM+10 > %s *MeV) & (AM-10 < %s *MeV)" %(MASS_MIN,MASS_MAX)
+    _CombinationCut = _CombinationCut + "& (ADOCACHI2CUT(%(D0to3H_DOCACHI2_MAX)s, ''))"\
+                      "& (ACHILD(PT,1) + ACHILD(PT,2) + ACHILD(PT,3) > %(D0to3H_SUMPT_MIN)s)" %config
+    ### different mass cut depending on whether we miss a pion or a kaon
+    _MotherCut = "(M > %s *MeV) & (M < %s *MeV)" %(MASS_MIN,MASS_MAX)
+    _MotherCut = _MotherCut + "& (VFASPF(VCHI2/VDOF)< %(D0to3H_VCHI2NDF_MAX)s)" %config 
+    _comb = CombineParticles( name = "Comb"+_combName,
+                              DecayDescriptors = _decayDescriptors,
+                              CombinationCut = _CombinationCut,
+                              MotherCut = _MotherCut)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = _comb,
+                    RequiredSelections = _RequiredSelections)
+    return sel
+
+
+
+def PiPiMaker(_combName,config,_RequiredSelections,_decayDescriptors):
+    comb = CombineParticles(name="Comb"+_combName,
+                            DecayDescriptors = _decayDescriptors, 
+                            CombinationCut = "(AM < %(PiPi_MASS_MAX)s*MeV)"\
+                            "& (ACUTDOCACHI2(%(PiPi_DOCACHI2_MAX)s,''))"\
+                            "& (ACHILD(PT,1) + ACHILD(PT,2) > %(PiPi_SUMPT_MIN)s *MeV)" % config, 
+                            MotherCut = "(VFASPF(VCHI2/VDOF)< %(PiPi_CHI2NDF)s)" % config)        
+    sel = Selection("Sel"+_combName,
+                    Algorithm = comb,
+                    RequiredSelections = _RequiredSelections)
+    return sel
+
+def MuPiPiMaker(_combName,config,_RequiredSelections,_decayDescriptors):
+    comb = CombineParticles(name="Comb"+_combName,
+                            DecayDescriptors = _decayDescriptors, 
+                            CombinationCut = "(ACUTDOCACHI2(%(MuPiPi_DOCACHI2_MAX)s,''))" % config,
+                            MotherCut = "(VFASPF(VCHI2/VDOF)< %(MuPiPi_CHI2NDF)s)"\
+                            "& (BPVVDCHI2 > %(MuPiPi_FDCHI2_MIN)s)" %config)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = comb,
+                    RequiredSelections = _RequiredSelections)
+    return sel
+
+def LcToKpiMaker(_combName,config,_RequiredSelections,_decayDescriptors):
+    ### Cuts on the Kpi combination
+    ### sumpt, mass and docachi2 cuts
+    _CombinationCut = "(ACHILD(PT,1)+ACHILD(PT,2) > %(Lc2Kpi_SUMPT_MIN)s *MeV)"\
+                      "& (AM+10 > %(Lc2Kpi_MASS_MIN)s *MeV)"\
+                      "& (AM-10 < %(Lc2Kpi_MASS_MAX)s *MeV)"\
+                      "& (ADOCACHI2CUT(%(Lc2Kpi_DOCACHI2_MAX)s, ''))" % config
+    ### mass, vertex quality and FD cuts
+    _MotherCut = "(M > %(Lc2Kpi_MASS_MIN)s *MeV)"\
+                 "& (M < %(Lc2Kpi_MASS_MAX)s *MeV)"\
+                 "& (VFASPF(VCHI2/VDOF)< %(Lc2Kpi_VCHI2NDF_MAX)s)"\
+                 "& (BPVVDCHI2 > %(Lc2Kpi_FDCHI2_MIN)s)" % config
+    _comb = CombineParticles( name = "Comb"+_combName,
+                              DecayDescriptors = _decayDescriptors,
+                              CombinationCut = _CombinationCut,
+                              MotherCut = _MotherCut)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = _comb,
+                    RequiredSelections = _RequiredSelections)
+    return sel
+
+def LbMaker(_combName,config,_RequiredSelections,_decayDescriptors):
+    preambulo = ['PXLC = ACHILD(PX,1)',
+                 'PYLC = ACHILD(PY,1)',
+                 'PZLC = ACHILD(PZ,1)',
+                 'ELC  = ACHILD(E,1)',
+                 'PXPIPI = ACHILD(CHILD(PX,2),2)',
+                 'PYPIPI = ACHILD(CHILD(PY,2),2)',
+                 'PZPIPI = ACHILD(CHILD(PZ,2),2)',
+                 'EPIPI = ACHILD(CHILD(E,2),2)',
+                 'MLCPIPI = sqrt((EPIPI+ELC)**2 - (PXPIPI+PXLC)**2 - (PYPIPI+PYLC)**2 - (PZPIPI+PZLC)**2)',
+                 'DELTA_MASS_LC = MLCPIPI - ACHILD(M,1)']
+    comb = CombineParticles(name="Comb"+_combName,
+                            DecayDescriptors = _decayDescriptors,
+                            Preambulo = preambulo,
+                            CombinationCut = "(DELTA_MASS_LC < %(Lc2Kpi_DeltaMass_MAX)s *MeV)"\
+                            "& (AM > %(Lc2Kpi_B_MASS_MIN)s *MeV)  & (AM < %(Lc2Kpi_B_MASS_MAX)s *MeV)"\
+                            "& (ACUTDOCACHI2(%(Lc2Kpi_B_DOCACHI2_MAX)s,''))" % config,
+                            MotherCut = "(M > %(Lc2Kpi_B_MASS_MIN)s  *MeV) & (M < %(Lc2Kpi_B_MASS_MAX)s  *MeV)"\
+                            "& (MINTREE((ABSID=='Lambda_c+'),VFASPF(VZ)) - MINTREE((ABSID=='K*(892)-'),VFASPF(VZ)) > %(Lc2Kpi_DZ)s *mm )"\
+                            "& (VFASPF(VCHI2/VDOF) < %(Lc2Kpi_B_VCHI2NDF_MAX)s)"
+                            "& (BPVDIRA> %(Lc2Kpi_B_DIRA_MIN)s)"\
+                            "& (BPVVDCHI2 > %(Lc2Kpi_B_FDCHI2_MIN)s)" %config)
+    sel = Selection("Sel"+_combName,
+                    Algorithm = comb,
+                    RequiredSelections = _RequiredSelections)
+    if config["Lc2Kpi_REQUIRE_TOS"] == True:
+        sel_Hlt1TOS = TOSFilter( "Sel"+_combName+"_Hlt1TOS"
+                                 ,sel
+                                 ,"Hlt1.*Decision%TOS")
+        sel_Hlt2TOS = TOSFilter( "Sel"+_combName+"_Hlt2TOS"
+                                 ,sel_Hlt1TOS
+                                 ,"Hlt2.*Decision%TOS")
+        return sel_Hlt2TOS
+    else:
+        return sel
+        
+def TOSFilter( name, _input, _trigger ) :
+    from Configurables import TisTosParticleTagger
+    _tisTosFilter = TisTosParticleTagger( name + "Tagger" )
+    _tisTosFilter.TisTosSpecs = { _trigger : 0 }
+    return Selection( name
+                      , Algorithm = _tisTosFilter
+                      , RequiredSelections = [ _input ]
+                      )
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingLb2LcMuNuX_Lc2L0Pi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingLb2LcMuNuX_Lc2L0Pi.py
new file mode 100644
index 000000000..c80894021
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingLb2LcMuNuX_Lc2L0Pi.py
@@ -0,0 +1,206 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+"""
+Selection for [Lambda_b0 -> (Lambda_c+ -> Lambda0 pi+) mu+ nu_mu X]cc using StdVeryLooseLambdaLL
+"""
+__author__ = ['Scott Ely']
+__date__ = '23/01/2019'
+__version__ = '$Revision: 1.0 $'
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseKaons, StdLooseProtons, StdLooseElectrons, StdVeryLooseLambdaLL, StdLooseLambdaLL, StdLooseLambdaDD
+from StandardParticles import StdNoPIDsPions, StdNoPIDsKaons,StdNoPIDsProtons,StdNoPIDsMuons
+from GaudiKernel.SystemOfUnits import MeV, GeV, cm, mm
+
+__all__ = ('Lb2LcMuNuX_Lc2L0PiConf'
+           , 'default_config')
+
+default_config = {
+    'NAME'        : 'Lb2LcMuNuX_Lc2L0Pi',
+    'WGs'         : ['Semileptonic'],
+    'BUILDERTYPE' : 'Lb2LcMuNuX_Lc2L0PiConf',
+    'CONFIG'      : {"GEC_nLongTrk"        : 250
+                     ,"TTSpecs"            : {}
+                     ,"HLT1"               : "HLT_PASS_RE('Hlt1.*Decision')"
+                     ,"HLT2"               : "HLT_PASS_RE('Hlt2.*Decision')"
+                     ,"Monitor"            : False
+                     ,"UseNoPIDsInputs"    : False
+                     ,"GhostProb"          : 0.35
+                     ,"TRCHI2"             : 3.0
+                     ,"MuonPIDmu"          : 0.0
+                     ,"MuonPT"             : 1000*MeV
+                     ,"MuonP"              : 6.0*GeV
+                     ,"MuonIPCHI2"         : 9.0
+                     ,"PionPT"             : 250.0*MeV
+                     ,"PionP"              : 2.0*GeV
+                     ,"PionIPCHI2"         : 4.0
+                     ,"PionPIDK"           : 10.0
+                     ,"LambdaLL_P"         : 2.0*GeV
+                     ,"LambdaLL_PT"        : 500.0*MeV
+                     ,"LambdaLL_ADMASS"    : 30.0*MeV
+                     ,"LambdaLL_BPVVDCHI2" : 100.0
+                     ,"LambdaLL_VCHI2DOF"  : 6.0
+                     ,"Lc_VCHI2DOF"        : 6.0
+                     ,"Lc_BPVDIRA"         : 0.99
+                     ,"Lc_FDCHI2"          : 25.0
+                     ,"Lc_AMassWin"        : 90.0*MeV
+                     ,"Lc_MassWin"         : 80.0*MeV
+                     ,"Lc_DocaChi2Max"     : 20
+                     ,"Lb_DIRA"            : 0.999
+                     ,"Lb_VCHI2DOF"        : 9.0
+                     ,"Lb_Lc_DZ"           : -2.0*mm
+                     ,"Lb_MassMin"         : 2.2*GeV
+                     ,"Lb_MassMax"         : 8.0*GeV
+                     ,"Lb_DocaChi2Max"     : 10
+                     ,"FakePrescale"       : 0.1
+                     },
+    'STREAMS' : ['Semileptonic']
+}
+
+class Lb2LcMuNuX_Lc2L0PiConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.config=config
+
+
+
+        ############### MUON, PION, Lambda0 SELECTIONS ###################
+
+        self.selmuon = Selection( "Mufor" + name,
+                                  Algorithm = self._muonFilter(name),
+                                  RequiredSelections = [StdLooseMuons])
+
+
+        self.selFakeMuon = Selection( "FakeMufor" + name,
+                                      Algorithm = self._FakeMuonFilter(name),
+                                      RequiredSelections = [StdNoPIDsMuons])
+
+        self.selPion = Selection( "Pifor" + name,
+                                  Algorithm = self._pionFilter(name),
+                                  RequiredSelections = [StdLoosePions])
+
+        self.selLambdaLL = Selection( "LambdaLLfor" + name,
+                                      Algorithm = self._LambdaLLFilter(name),
+                                      RequiredSelections = [StdVeryLooseLambdaLL, StdLooseLambdaDD])
+
+        ############### Lambda_c -> Lambda0 Pi SELECTION ###############
+
+        ### Lb Combination and mother cuts:
+        _LbComboCuts = "(AM > %(Lb_MassMin)s ) & (AM < %(Lb_MassMax)s) & (ADOCACHI2CUT( %(Lb_DocaChi2Max)s, ''))" % self.config
+        _LbMotherCut = "(MM > %(Lb_MassMin)s ) & (MM < %(Lb_MassMax)s )"\
+            "& (VFASPF(VCHI2/VDOF) < %(Lb_VCHI2DOF)s ) & (BPVDIRA > %(Lb_DIRA)s )"\
+            "& ((MINTREE((ABSID=='Lambda_c+'), VFASPF(VZ)) - VFASPF(VZ)) > %(Lb_Lc_DZ)s )" % self.config
+
+        self.selLc2L0Pi = Selection( "Lc2L0Pifor" + name,
+                                     Algorithm = self._Lc2L0PiFilter(name),
+                                     RequiredSelections = [self.selPion, self.selLambdaLL])
+
+        self.selb2LcMuX = makeb2LcMuX('b2LcMuX' + name,
+                                      decayDescriptors = [ '[Lambda_b0 -> Lambda_c+ mu-]cc' , '[Lambda_b0 -> Lambda_c+ mu+]cc'],
+                                      MuSel = self.selmuon,
+                                      DSel = self.selLc2L0Pi,
+                                      LbCombinationCuts = _LbComboCuts,
+                                      LbMotherCut = _LbMotherCut
+                                     )
+
+        self.selFakeb2LcMuX = makeFakeb2LcMuX('b2LcMuXFake' + name,
+                                              decayDescriptors = [ '[Lambda_b0 -> Lambda_c+ mu-]cc' , '[Lambda_b0 -> Lambda_c+ mu+]cc'],
+                                              FakeMuSel = self.selFakeMuon,
+                                              DSel = self.selLc2L0Pi,
+                                              LbCombinationCuts = _LbComboCuts,
+                                              LbMotherCut = _LbMotherCut
+                                              )
+
+        ############### DECLARE THE STRIPPING LINES ###############
+
+
+        GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % self.config,
+                 "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+        ####### Lambda_c -> Lambda0 Pi #######
+
+        self.Lb2LcMuNuX_Lc2L0Pi = StrippingLine('b2LcMuX' + name + 'Line',
+                                                prescale = 1,
+                                                selection = self.selb2LcMuX,
+                                                FILTER = GECs,
+                                                HLT1 = config["HLT1"],
+                                                HLT2 = config["HLT2"])
+
+        self.registerLine(self.Lb2LcMuNuX_Lc2L0Pi)
+
+        self.FakeLb2LcMuNuX_Lc2L0Pi = StrippingLine('b2LcMuXFake' + name + 'Line',
+                                                    prescale = config["FakePrescale"],
+                                                    selection = self.selFakeb2LcMuX,
+                                                    FILTER = GECs,
+                                                    HLT1 = config["HLT1"],
+                                                    HLT2 = config["HLT2"])
+
+        self.registerLine(self.FakeLb2LcMuNuX_Lc2L0Pi)
+
+    def _muonFilter(self,name):
+        _code = "(MIPCHI2DV(PRIMARY) > %(MuonIPCHI2)s ) & (TRGHOSTPROB < %(GhostProb)s ) & (PIDmu > %(MuonPIDmu)s ) & (P > %(MuonP)s ) & (PT > %(MuonPT)s ) & (TRCHI2DOF < %(TRCHI2)s)" % self.config
+        _mu = FilterDesktop( '_mu'+name, Code = _code)
+        return _mu
+
+    def _FakeMuonFilter(self,name):
+        _code = "(MIPCHI2DV(PRIMARY) > %(MuonIPCHI2)s ) & (TRGHOSTPROB < %(GhostProb)s ) & (PIDmu < %(MuonPIDmu)s ) & (P > %(MuonP)s ) & (PT > %(MuonPT)s ) & (TRCHI2DOF < %(TRCHI2)s)" % self.config
+        _FakeMu = FilterDesktop( '_fakeMu'+name, Code = _code)
+        return _FakeMu
+
+    def _pionFilter(self,name):
+        _code = "(MIPCHI2DV(PRIMARY) > %(PionIPCHI2)s ) & (TRGHOSTPROB < %(GhostProb)s ) & (P > %(PionP)s ) & (PT > %(PionPT)s ) & (TRCHI2DOF < %(TRCHI2)s ) & (PIDK < %(PionPIDK)s )" % self.config
+        _pi = FilterDesktop( '_pi'+name, Code = _code)
+        return _pi
+
+    def _LambdaLLFilter(self,name):
+        _code = "(P > %(LambdaLL_P)s ) & (PT > %(LambdaLL_PT)s ) & (BPVVDCHI2 > %(LambdaLL_BPVVDCHI2)s) & (VFASPF(VCHI2/VDOF) < %(LambdaLL_VCHI2DOF)s)"\
+            "& (CHILDCUT((TRGHOSTPROB < %(GhostProb)s),1)) & (CHILDCUT((TRGHOSTPROB < %(GhostProb)s),2))"\
+            "& (CHILDCUT((TRCHI2DOF < %(TRCHI2)s),1)) & (CHILDCUT((TRCHI2DOF < %(TRCHI2)s),2))"\
+            "& (ADMASS('Lambda0') < %(LambdaLL_ADMASS)s )" % self.config
+        _LambdaLL = FilterDesktop( '_LambdaLL'+name, Code = _code)
+        return _LambdaLL
+
+    def _Lc2L0PiFilter(self,name):
+        _decayDescriptors = [ '[Lambda_c+ -> Lambda0 pi+]cc']
+        _combinationCut = "(ADAMASS('Lambda_c+') < %(Lc_AMassWin)s )" % self.config
+        _motherCut = "(ADMASS('Lambda_c+') < %(Lc_MassWin)s ) & (VFASPF(VCHI2/VDOF) < %(Lc_VCHI2DOF)s)" % self.config
+        _Lc2L0Pi = CombineParticles( '_Lc2L0Pi'+name,
+                                     DecayDescriptors = _decayDescriptors,
+                                     CombinationCut = _combinationCut,
+                                     MotherCut = _motherCut)
+        return _Lc2L0Pi
+
+def makeb2LcMuX(name,decayDescriptors,MuSel,DSel,LbCombinationCuts,LbMotherCut):
+    _Lb = CombineParticles('_Lb'+name,
+                           DecayDescriptors = decayDescriptors,
+                           CombinationCut = LbCombinationCuts,
+                           MotherCut = LbMotherCut)
+    return Selection(name,
+                     Algorithm = _Lb,
+                     RequiredSelections = [MuSel,DSel])
+
+def makeFakeb2LcMuX(name,decayDescriptors,FakeMuSel,DSel,LbCombinationCuts,LbMotherCut):
+    _FakeLb = CombineParticles('_FakeLb'+name,
+                               DecayDescriptors = decayDescriptors,
+                               CombinationCut = LbCombinationCuts,
+                               MotherCut = LbMotherCut)
+    return Selection(name,
+                     Algorithm = _FakeLb,
+                     RequiredSelections = [FakeMuSel,DSel])
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingLb2pMuNuVub.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingLb2pMuNuVub.py
new file mode 100644
index 000000000..0c841416c
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingLb2pMuNuVub.py
@@ -0,0 +1,464 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = ['William Sutcliffe']
+__date__ = '19/01/2014'
+__version__ = '$Revision: 1.0 $'
+
+'''
+Lb->p mu nu exclusive reconstruction
+'''
+# =============================================================================
+##
+#  Lb->p mu nu exclusive reconstruction. 
+#
+#  Stripping lines for the charmless semileptonic decay Lambda_b -> p mu nu.
+#
+#  The lines will lead to a  measurement of the differential branching
+#  of Lb -> p mu nu as a function of q^2. 
+#
+#  This together with form factor predictions from either light cone
+#  sum rules or lattice QCD will allow an exclusive determination of |Vub|.
+# 
+#  Three lines are included:
+#  Two of which strip the opposite sign (right sign) proton and muon and combinations.
+#  One of which has no prescale and strips protons and muons with a corrected mass >
+#  4 GeV.  The other line is prescaled by a factor of 0.5 and strips < 4 GeV in corrected
+#  mass.  This exploits the fact that the corrected mass for Lb->pmunu peaks at the Lambda_b
+#  mass.  The final line strips same sign proton and muon cominations over the whole corrected 
+#  mass region.  This will be ussed to extract shapes for the combinatorial background.
+#
+#  Stripping XX, with requirements that the
+#  rate <0.05% and timing <0.5ms/evt.
+## 
+
+"""
+  Lb->p mu nu exclusive reconstruction. 
+
+  Stripping lines for the charmless semileptonic decay Lambda_b -> p mu nu.
+
+  The lines will lead to a  measurement of the differential branching
+  of Lb -> p mu nu as a function of q^2. 
+
+  This together with form factor predictions from either light cone
+  sum rules or lattice QCD will allow an exclusive determination of |Vub|.
+ 
+  Three lines are included:
+  Two of which strip the opposite sign (right sign) proton and muon and combinations.
+  One of which has no prescale and strips protons and muons with a corrected mass >
+  4 GeV.  The other line is prescaled by a factor of 0.5 and strips < 4 GeV in corrected
+  mass.  This exploits the fact that the corrected mass for Lb->pmunu peaks at the Lambda_b
+  mass.  The final line strips same sign proton and muon cominations over the whole corrected 
+  mass region.  This will be ussed to extract shapes for the combinatorial background.
+
+  Stripping XX, with requirements that the
+  rate <0.05% and timing <0.5ms/evt.
+
+  Last modification $Date: 2014-January-19 $
+               by $Author: William $
+"""
+
+default_config = {
+  'Lb2pMuNuVub' : {
+        'WGs'         : ['Semileptonic'],
+	'BUILDERTYPE' : 'Lb2pMuNuVubBuilder',
+        'CONFIG'      :{
+	  "GEC_nLongTrk"        : 250.   ,#adimensional
+	  "TRGHOSTPROB"         : 0.35   ,#adimensional
+	  #Muon Cuts
+	  "MuonGHOSTPROB"       : 0.35   ,#adimensional
+	  "MuonTRCHI2"          : 4.     ,#adimensional
+	  "MuonP"               : 3000.  ,#MeV
+	  "MuonPT"              : 1500.  ,#MeV
+	  "MuonMINIPCHI2"       : 16.    ,#adminensional
+	  #Proton Cuts 
+	  "ProtonTRCHI2"        : 6.     ,#adimensional
+	  "ProtonP"             : 15000. ,#MeV
+	  "ProtonPT"            : 1000.  ,#MeV
+	  "ProtonPIDK"          : 10.     ,#adimensional 
+	  "ProtonPIDp"          : 10.     ,#adimensional
+	  "ProtonMINIPCHI2"     : 16.    ,#adminensional
+	  #B Mother Cuts
+	  "BVCHI2DOF"           : 4.     ,#adminensional
+	  "BDIRA"               : 0.9994  ,#adminensional
+	  "BFDCHI2HIGH"         : 150.   ,#adimensional
+	  "pMuMassLower"        : 1000.  ,#MeV
+	  "pMuPT"               : 1500.  #MeV
+	},
+       'STREAMS'     : ['Semileptonic']	  
+      }
+    }
+
+from Gaudi.Configuration import *
+from StrippingUtils.Utils import LineBuilder
+
+import logging
+
+# Define a make TOS filter function
+def makeTOSFilter(name,specs):
+    from Configurables import TisTosParticleTagger
+    tosFilter = TisTosParticleTagger(name+'TOSFilter')
+    tosFilter.TisTosSpecs = specs
+    tosFilter.ProjectTracksToCalo = False
+    tosFilter.CaloClustForCharged = False
+    tosFilter.CaloClustForNeutral = False
+    tosFilter.TOSFrac = {4:0.0, 5:0.0}
+    return tosFilter
+# Define a tosSelection function
+def tosSelection(sel,specs):
+    from PhysSelPython.Wrappers import Selection
+    '''Filters Selection sel to be TOS.'''
+    tosFilter = makeTOSFilter(sel.name(),specs)
+    return Selection(sel.name()+'TOS', Algorithm=tosFilter,
+                     RequiredSelections=[sel])
+
+default_name="LbpMuNu"
+
+class Lb2pMuNuVubBuilder(LineBuilder):
+    """
+    Definition of Lb->p mu nu stripping
+    """
+    
+    __configuration_keys__ = [
+        "GEC_nLongTrk"
+        ,"TRGHOSTPROB"          
+        ,"MuonGHOSTPROB"
+        ,"MuonTRCHI2"          
+        ,"MuonP"               
+        ,"MuonPT"              
+        ,"MuonMINIPCHI2"       
+        ,"ProtonTRCHI2"          
+        ,"ProtonP"               
+        ,"ProtonPT"              
+        ,"ProtonPIDK"             
+        ,"ProtonPIDp"            
+        ,"ProtonMINIPCHI2"
+        ,"BVCHI2DOF"
+        ,"BDIRA"               
+        ,"BFDCHI2HIGH"         
+        ,"pMuMassLower"     
+	,"pMuPT"     
+        ]
+
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        self._muonSel=None
+        self._muonFilter()
+
+        self._protonSel=None
+        self._protonFilter()
+
+        self._fakeprotonSel=None
+        self._fakeprotonFilter()
+
+        self._fakemuonSel=None
+        self._fakemuonFilter()
+
+        self._Definitions()
+
+        self.registerLine(self._Lb_line())
+        self.registerLine(self._SS_Lb_line())
+        self.registerLine(self._fakep_Lb_line())
+        self.registerLine(self._fakep_SS_Lb_line())
+        self.registerLine(self._fakemu_Lb_line())
+        self.registerLine(self._fakemu_SS_Lb_line())
+        
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+
+    def _FakeMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+	       "& (~ISMUON) & (INMUON)"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+    
+    def _NominalPSelection( self ):
+        return "(TRCHI2DOF < %(ProtonTRCHI2)s )&  (P> %(ProtonP)s *MeV) &  (PT> %(ProtonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDp-PIDpi> %(ProtonPIDp)s )& (PIDp-PIDK> %(ProtonPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(ProtonMINIPCHI2)s )"\
+               "& (switch(ISMUON,1,0) < 1)"
+
+    def _FakePSelection( self ):
+        return "(TRCHI2DOF < %(ProtonTRCHI2)s )&  (P> %(ProtonP)s *MeV) &  (PT> %(ProtonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(ProtonMINIPCHI2)s )"\
+               "& ( (PIDp-PIDpi< %(ProtonPIDp)s ) |  (PIDp-PIDK< %(ProtonPIDK)s ) ) "\
+               "& (switch(ISMUON,1,0) < 1)"
+
+
+    ###### High Corrected Mass Line  ######
+    def _Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2.*SingleMuon.*Decision')"\
+              "| HLT_PASS_RE('Hlt2TopoMu2Body.*Decision')"
+        ldu = "L0_CHANNEL_RE('Muon')" 
+        return StrippingLine(self._name+'Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._Lb2pMuNuVub_Lb()], HLT2 = hlt, L0DU = ldu)
+
+    ###### Low q^2 Line Same Sign ######
+    def _SS_Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2.*SingleMuon.*Decision')"\
+              "| HLT_PASS_RE('Hlt2TopoMu2Body.*Decision')"
+        ldu = "L0_CHANNEL_RE('Muon')" 
+        return StrippingLine(self._name+'SSLine', prescale = 1.0,
+                             FILTER=self.GECs, 
+                             algos = [ self._Lb2pMuNuVubSS_Lb()], HLT2 = hlt, L0DU = ldu)
+
+    def _fakep_Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2.*SingleMuon.*Decision')"\
+              "| HLT_PASS_RE('Hlt2TopoMu2Body.*Decision')"
+        ldu = "L0_CHANNEL_RE('Muon')" 
+        return StrippingLine(self._name+ 'FakepLine', prescale = 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._Lb2pMuNuVub_fakep_Lb()], HLT2 = hlt, L0DU = ldu)
+    def _fakep_SS_Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2.*SingleMuon.*Decision')"\
+              "| HLT_PASS_RE('Hlt2TopoMu2Body.*Decision')"
+        ldu = "L0_CHANNEL_RE('Muon')" 
+        return StrippingLine(self._name+ 'FakeSSpLine', prescale = 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._Lb2pMuNuVubSS_fakep_Lb()], HLT2 = hlt, L0DU = ldu)
+
+    def _fakemu_Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2Topo2Body.*Decision')"
+        return StrippingLine(self._name+ 'FakemuLine', prescale = 0.05,
+                             FILTER=self.GECs,
+                             algos = [ self._Lb2pMuNuVub_fakemu_Lb()], HLT2 = hlt)
+    def _fakemu_SS_Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2Topo2Body.*Decision')"
+        return StrippingLine(self._name+ 'FakeSSmuLine', prescale = 0.05,
+                             FILTER=self.GECs,
+                             algos = [ self._Lb2pMuNuVubSS_fakemu_Lb()], HLT2 = hlt)
+    ##### Muon Filter ######
+    def _muonFilter( self ):
+        if self._muonSel is not None:
+            return self._muonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseMuons
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+
+        _muSel=Selection("Mu_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseMuons])
+        _muSel = tosSelection(_muSel,{'L0.*Muon.*Decision%TOS':0})
+        
+        self._muonSel=_muSel
+        
+        return _muSel
+
+    ##### Fake Muon Filter ######
+    def _fakemuonFilter( self ):
+        if self._fakemuonSel is not None:
+            return self._fakemuonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllNoPIDsMuons
+        _mu = FilterDesktop( Code = self._FakeMuSelection() % self._config )
+
+        _muSel=Selection("fakeMu_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdAllNoPIDsMuons])
+        
+        self._fakemuonSel=_muSel
+        
+        return _muSel
+
+    ###### Proton Filter ######
+    def _protonFilter( self ):
+        if self._protonSel is not None:
+            return self._protonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseProtons
+        
+        _pr = FilterDesktop( Code = self._NominalPSelection() % self._config )
+        _prSel=Selection("p_for"+self._name,
+                         Algorithm=_pr,
+                         RequiredSelections = [StdLooseProtons])
+        
+        self._protonSel=_prSel
+        
+        return _prSel
+
+    ##### Fake Proton Filter ######
+    def _fakeprotonFilter( self ):
+        if self._fakeprotonSel is not None:
+            return self._fakeprotonSel
+	
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllNoPIDsProtons
+        
+        _pr = FilterDesktop( Code = self._FakePSelection() % self._config )
+        _prSel=Selection("fakep_for"+self._name,
+                         Algorithm=_pr,
+                         RequiredSelections = [StdAllNoPIDsProtons])
+        
+        self._fakeprotonSel=_prSel
+        
+        return _prSel
+
+    def _Definitions(self):
+        return [ 
+            "from LoKiPhys.decorators import *",
+            "Lb_PT = PT"
+                           ]
+
+
+    ###### Lb->pMuNu High M_corr Opposite Sign ######
+    def _Lb2pMuNuVub_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMu = CombineParticles(DecayDescriptors = ["[Lambda_b0 -> p+ mu-]cc"], ReFitPVs = True
+)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+                    "& (Lb_PT > %(pMuPT)s)"\
+                    "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)" % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("pMu_Lb_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._muonFilter(), self._protonFilter()])
+         
+        _LbSel = tosSelection(_pMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _LbSel
+
+
+
+    ###### Lb->pMuNu Low q^2 SS Sign ######
+    def _Lb2pMuNuVubSS_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMuSS = CombineParticles(DecayDescriptors = ["[Lambda_b0 -> p+ mu+]cc"], ReFitPVs = True
+)
+        _pMuSS.Preambulo = self._Definitions() 
+        _pMuSS.CombinationCut = "(AM>%(pMuMassLower)s*MeV)"  % self._config
+        _pMuSS.MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+                    "& (Lb_PT > %(pMuPT)s)"\
+		    "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)" % self._config
+        _pMuSS.ReFitPVs = True
+            
+        _pMuSSSel=Selection("pMuSS_Lb_for"+self._name,
+                         Algorithm=_pMuSS,
+                         RequiredSelections = [self._muonFilter(), self._protonFilter()])
+        _pMuSSSel = tosSelection(_pMuSSSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _pMuSSSel
+	    
+
+    
+    ###### Lb->pMuNu Fake Proton ######
+    def _Lb2pMuNuVub_fakep_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMu = CombineParticles(DecayDescriptors = ["[Lambda_b0 -> p+ mu-]cc"], ReFitPVs = True
+)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+                    "& (Lb_PT > %(pMuPT)s)"\
+                    "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)" % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("pMu_fakep_Lb_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._muonFilter(), self._fakeprotonFilter()])
+         
+        _LbSel = tosSelection(_pMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _LbSel
+
+    ###### Lb->pMuNuSS Fake Proton ######
+    def _Lb2pMuNuVubSS_fakep_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMuSS = CombineParticles(DecayDescriptors = ["[Lambda_b0 -> p+ mu+]cc"], ReFitPVs = True
+)
+        _pMuSS.Preambulo = self._Definitions()
+        _pMuSS.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMuSS.MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+                    "& (Lb_PT > %(pMuPT)s)"\
+                    "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)" % self._config
+        _pMuSS.ReFitPVs = True
+            
+        _pMuSSSel=Selection("pMuSS_fakep_Lb_for"+self._name,
+                         Algorithm=_pMuSS,
+                         RequiredSelections = [self._muonFilter(), self._fakeprotonFilter()])
+         
+        _LbSSSel = tosSelection(_pMuSSSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _LbSSSel
+
+
+
+    ###### Lb->pMuNu Fake Muon ######
+    def _Lb2pMuNuVub_fakemu_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMu = CombineParticles(DecayDescriptors = ["[Lambda_b0 -> p+ mu-]cc"], ReFitPVs = True
+)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+                    "& (Lb_PT > %(pMuPT)s)"\
+                    "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)" % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("pMu_fakemu_Lb_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._fakemuonFilter(), self._protonFilter()])
+         
+        _LbSel = tosSelection(_pMuSel,{'Hlt2.*Topo2Body.*Decision%TOS':0})
+        return _LbSel
+
+    ###### Lb->pMuNuSS Fake Muon ######
+    def _Lb2pMuNuVubSS_fakemu_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMuSS = CombineParticles(DecayDescriptors = ["[Lambda_b0 -> p+ mu+]cc"], ReFitPVs = True
+)
+        _pMuSS.Preambulo = self._Definitions()
+        _pMuSS.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMuSS.MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+                    "& (Lb_PT > %(pMuPT)s)"\
+                    "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)" % self._config
+        _pMuSS.ReFitPVs = True
+            
+        _pMuSSSel=Selection("pMuSS_fakemu_Lb_for"+self._name,
+                         Algorithm=_pMuSS,
+                         RequiredSelections = [self._fakemuonFilter(), self._protonFilter()])
+         
+        _LbSSSel = tosSelection(_pMuSSSel,{'Hlt2.*Topo2Body.*Decision%TOS':0})
+        return _LbSSSel
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingSemilepISR.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingSemilepISR.py
new file mode 100644
index 000000000..3853b7906
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingSemilepISR.py
@@ -0,0 +1,571 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Vitalii Lisovskyi; heavily based on B2DMuNuX lines by their corresponding authors']
+__date__ = '07/03/2021'
+__version__ = '$Revision: 0.0 $'
+
+'''
+Stripping lines for semileptonic decays with emission of a dilepton via initial-state-radiation.
+'''
+
+from Gaudi.Configuration import *
+from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection
+from PhysSelPython.Wrappers import Selection, DataOnDemand
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLoosePions, StdLooseMuons, StdLooseKaons, StdLooseProtons, StdLooseElectrons
+from StandardParticles import StdNoPIDsPions, StdNoPIDsKaons,StdNoPIDsProtons,StdNoPIDsMuons
+#from StrippingSemilepISRUtils import *
+from GaudiKernel.SystemOfUnits import MeV, GeV, cm, mm
+from CommonParticles.Utils import *
+
+__all__ = ('SemilepISRAllLinesConf',
+           'default_config')
+
+default_config = {
+    'SemilepISR' : {
+        'WGs'         : ['Semileptonic'],
+        'BUILDERTYPE' : 'SemilepISRAllLinesConf',
+        'STREAMS'     : ['Semileptonic'],
+        'CONFIG'      : {
+            "prescaleFakes": 0.05 #0.02
+            ,"prescales": 1 #{'StrippingSemilepISR_D0_Electron':1.0}
+            ,"GEC_nLongTrk" : 250
+            ,"TTSpecs"      : {}
+            ,"HLT1"   : "HLT_PASS_RE('Hlt1.*Decision')"
+            ,"HLT2"   : "HLT_PASS_RE('Hlt2.*Decision')"
+            ,"Monitor"      : False
+            ,"UseNoPIDsInputs":False
+            ,"TRGHOSTPROB"   : 0.35
+            ,"TRCHI2"        : 3.0
+            ,"MuonPIDmu"     : 0.0
+            ,"MuonPT"        : 1000*MeV
+            ,"MuonIPCHI2"    : 9.00
+            ,"MuonP"         : 6.0*GeV
+            ,"HadronPT"      : 250.0*MeV
+            ,"HadronP"       : 2.0*GeV
+            ,"HadronIPCHI2"  : 4.0
+            ,"ProtonPIDp"    : 0.0
+            ,"ProtonPIDpK"   : 0.0
+            ,"ProtonP"       : 8.0*GeV
+            ,"KaonPIDK"      : -2.0
+            ,"KaonP"         : 2.0*GeV
+            ,"PionPIDK"      : 10.0
+            ,"ElectronPIDe"  : 3.0
+            ,"ElectronPT"    : 300*MeV
+            ,"D_BPVDIRA"     : 0.99
+            ,"D_FDCHI2"      : 25.0
+            ,"D_MassMax"     : 1700. * MeV
+            ,"D_MassMin"     : 700. * MeV
+            ,"D_AMassWin"    : 90.*MeV ## this should be 10 MeV wider than the widest D_MassWin
+            ,"D_MassWin"     : {"default":80*MeV,
+                                "Xic0": 60*MeV,
+                                "Omegac": 60*MeV}
+            ,"D_VCHI2DOF"    : 6.0
+            ,"D_DocaChi2Max" : 20
+            ,"B_DIRA"         : 0.99 # was 0.999
+            ,"B_VCHI2DOF"      : 9.0
+            ,"B_D_DZ"         : -2.0*mm
+            ,"B_MassMin"       : 2.2*GeV
+            ,"B_MassMax"       : 8.0*GeV
+            ,"B_DocaChi2Max"  : 10
+            },
+
+    }
+}
+
+class SemilepISRAllLinesConf(LineBuilder) :
+
+    __configuration_keys__ = default_config['SemilepISR']['CONFIG'].keys()
+
+    __confdict__={}
+
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+
+        ####################### BASIC FINAL STATE PARTICLE SELECTIONS ##########################
+
+        self.HadronCuts = "(P>%(HadronP)s) & (PT > %(HadronPT)s )"\
+            "& (TRCHI2DOF < %(TRCHI2)s)"\
+            "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+            "& (MIPCHI2DV(PRIMARY)> %(HadronIPCHI2)s)" % config
+
+        self.MuonTrackCuts = "(PT > %(MuonPT)s ) & (P> %(MuonP)s)"\
+            "& (TRCHI2DOF < %(TRCHI2)s)"\
+            "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+            "& (MIPCHI2DV(PRIMARY)> %(MuonIPCHI2)s)" %config
+
+        inputs = {"muons":StdLooseMuons,
+                  "pions":StdLoosePions,
+                  "kaons":StdLooseKaons,
+                  "protons":StdLooseProtons,
+                  "electrons":StdLooseElectrons,
+                  "fakemuons":StdNoPIDsMuons}
+
+        if config["UseNoPIDsInputs"] == True:
+            inputs["muons"] = StdNoPIDsMuons
+            inputs["pions"] = StdNoPIDsPions
+            inputs["kaons"] = StdNoPIDsKaons
+            inputs["protons"] = StdNoPIDsProtons
+
+        self.cuts = {"muons":self.MuonTrackCuts + " & (PIDmu > %(MuonPIDmu)s)" % config,
+                     "fakemuons":self.MuonTrackCuts + " & (INMUON) & (PIDmu < %(MuonPIDmu)s)" % config,
+                     "kaons":self.HadronCuts + " & (P>%(KaonP)s) & (PIDK> %(KaonPIDK)s)" % config,
+                     "pions":self.HadronCuts + " & (PIDK< %(PionPIDK)s)" % config,
+                     "protons":self.HadronCuts + "& (P>%(ProtonP)s)"\
+                         "& (PIDp > %(ProtonPIDp)s) & (PIDp-PIDK > %(ProtonPIDpK)s)" % config,
+                     "electrons":self.MuonTrackCuts + " & (PT> %(ElectronPT)s) & (PIDe > %(ElectronPIDe)s)" % config
+                     }
+
+        self.selMuon = Selection("Mufor"+name,
+                                 Algorithm=FilterDesktop(Code=self.cuts["muons"]),
+                                 RequiredSelections = [inputs["muons"]])
+
+        self.selKaon = Selection( "Kfor" + name,
+                                  Algorithm = FilterDesktop(Code=self.cuts["kaons"]),
+                                  RequiredSelections = [inputs["kaons"]])
+
+        self.selPion = Selection( "Pifor" + name,
+                                  Algorithm = FilterDesktop(Code=self.cuts["pions"]),
+                                  RequiredSelections = [inputs["pions"]])
+
+        self.selProton = Selection( "ProtonsFor" + name,
+                                    Algorithm = FilterDesktop(Code=self.cuts["protons"]),
+                                    RequiredSelections = [inputs["protons"]])
+
+        self.selElectron = Selection("efor"+name,
+                                     Algorithm=FilterDesktop(Code=self.cuts["electrons"]),
+                                     RequiredSelections = [inputs["electrons"]])
+
+
+        self.selMuonFakes = Selection( "FakeMuonsFor" + name,
+                                       Algorithm = FilterDesktop(Code = self.cuts["fakemuons"]),
+                                       RequiredSelections = [inputs["fakemuons"]])
+
+        ### Dictionary containing special cuts for each charm mode
+        ### at this stage they are just the mass windows.
+        ### All other cuts are the same for all charm species
+        ### and will be specified later in the line building function
+        CharmCuts = {}
+        for mode in ["D0","D0_partreco","Dp","Ds","Lc","Xic","Xic0","Omegac"]:
+            CharmCuts[mode] = config.copy()
+
+        # the Dp (->Kpipi) and Ds (->KKpi) are special
+        # in that they each cover both the Ds and D+ mass peaks with the default sideband on either side.
+        CharmCuts["Dp"]["CharmComboCuts"] = "(DAMASS('D_s+') < %s )"\
+            "& (DAMASS('D+')> -%s )" %(config["D_AMassWin"],config["D_AMassWin"])
+        CharmCuts["Dp"]["CharmMotherCuts"] = "(DMASS('D_s+') < %s )"\
+            "& (DMASS('D+')> -%s )" %(config["D_MassWin"]["default"],config["D_MassWin"]["default"])
+        # and Ds and Dp are the same in this regard
+        CharmCuts["Ds"] = CharmCuts["Dp"].copy()
+
+        CharmCuts['D0']["CharmComboCuts"]  = "(ADAMASS('D0') < %s)" % config["D_AMassWin"]
+        CharmCuts['D0']["CharmMotherCuts"] = "(ADMASS('D0')  < %s)" % config["D_MassWin"]["default"]
+
+        CharmCuts['D0_partreco']["CharmComboCuts"] = "((AM < %s) & (AM > %s))" % (config["D_MassMax"], config["D_MassMin"])
+        CharmCuts['D0_partreco']["CharmMotherCuts"] = "((MM < %s) & (MM > %s))" % (config["D_MassMax"], config["D_MassMin"])
+
+        CharmCuts["Lc"]["CharmComboCuts"] = "(ADAMASS('Lambda_c+') < %s )" %config["D_AMassWin"]
+        CharmCuts["Lc"]["CharmMotherCuts"] = "(ADMASS('Lambda_c+') < %s )" %config["D_MassWin"]["default"]
+
+        CharmCuts["Xic"]["CharmComboCuts"] = "(ADAMASS('Xi_c+') < %s )"  %config["D_AMassWin"]
+        CharmCuts["Xic"]["CharmMotherCuts"] = "(ADMASS('Xi_c+') < %s )"  %config["D_MassWin"]["default"]
+
+        CharmCuts["Xic0"]["CharmComboCuts"] = "(ADAMASS('Xi_c0') < %s )" %config["D_AMassWin"]
+        CharmCuts["Xic0"]["CharmMotherCuts"] = "(ADMASS('Xi_c0') < %s )" %config["D_MassWin"]["Xic0"]
+
+        CharmCuts["Omegac"]["CharmComboCuts"] = "(ADAMASS('Omega_c0') < %s )" %config["D_AMassWin"]
+        CharmCuts["Omegac"]["CharmMotherCuts"] = "(ADMASS('Omega_c0') < %s )" %config["D_MassWin"]["Omegac"]
+
+        self.b2D0MuXLine = BtoDlnuLine(name,
+                                       'D0',
+                                       ['[B- -> D0 mu- rho(770)0]cc','[B+ -> D0 mu+ rho(770)0]cc'],
+                                       ['[D0 -> K- pi+]cc'],
+                                       CharmCuts["D0"],
+                                       [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.b2D0Mu2eXLine = BtoDlnuLine(name,
+                                       'D02e',
+                                       ['[B- -> D0 mu- omega(782)]cc','[B+ -> D0 mu+ omega(782)]cc'],
+                                       ['[D0 -> K- pi+]cc'],
+                                       CharmCuts["D0"],
+                                       [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+
+
+        # self.b2D0MuXK3PiLine = BtoDlnuLine(name,
+        #                                'D0_K3Pi',
+        #                                ['[B- -> D0 mu-]cc','[B+ -> D0 mu+]cc'],
+        #                                ['[D0 -> K- pi+ pi- pi+]cc'],
+        #                                CharmCuts["D0"],
+        #                                [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+
+        # self.b2D0MuXKMuLine = BtoDlnuLine(name,
+        #                                'D0_KMuNu',
+        #                                ['[B- -> D0 mu-]cc', '[B+ -> D0 mu+]cc'],
+        #                                ['[D0 -> K- mu+]cc'],
+        #                                CharmCuts["D0_partreco"],
+        #                                [self.selKaon, self.selMuon], self.selMuon, self.selMuonFakes)
+
+        # self.b2D0MuXKFakeMuLine = BtoDlnuLine(name,
+        #                                 'D0_KFakeMuNu',
+        #                                 ['[B- -> D0 mu-]cc', '[B+ -> D0 mu+]cc'],
+        #                                 ['[D0 -> K- mu+]cc'],
+        #                                 CharmCuts["D0_partreco"],
+        #                                 [self.selKaon, self.selMuonFakes], self.selMuon, self.selMuonFakes)
+
+        self.b2D0eXLine = BtoDlnuLine(name,
+                                      'D0_Electron',
+                                      ['[B- -> D0 e- rho(770)0]cc', '[B+ -> D0 e+ rho(770)0]cc'],
+                                      ['[D0 -> K- pi+]cc'],
+                                      CharmCuts["D0"],
+                                      [self.selKaon, self.selPion],self.selElectron)
+
+
+        self.b2DpMuXLine = BtoDlnuLine(name,
+                                       'Dp',
+                                       [ '[B0 -> D- mu+ rho(770)0]cc', '[B0 -> D- mu- rho(770)0]cc' ],
+                                       [ '[D+ -> K- pi+ pi+]cc' ],
+                                       CharmCuts["Dp"],
+                                       [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.b2DpMu2eXLine = BtoDlnuLine(name,
+                                       'Dp2e',
+                                       [ '[B0 -> D- mu+ omega(782)]cc', '[B0 -> D- mu- omega(782)]cc' ],
+                                       [ '[D+ -> K- pi+ pi+]cc' ],
+                                       CharmCuts["Dp"],
+                                       [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.b2DpeXLine = BtoDlnuLine(name,
+                                       'Dp_Electron',
+                                       [ '[B0 -> D- e+ rho(770)0]cc', '[B0 -> D- e- rho(770)0]cc' ],
+                                       [ '[D+ -> K- pi+ pi+]cc' ],
+                                       CharmCuts["Dp"],
+                                       [self.selKaon, self.selPion],self.selElectron)
+
+        self.b2DsMuXLine = BtoDlnuLine(name,
+                                       'Ds',
+                                       [ '[B0 -> D- mu+ rho(770)0]cc', '[B0 -> D- mu- rho(770)0]cc' ],
+                                       [ '[D+ -> K+ K- pi+]cc' ],
+                                       CharmCuts["Ds"],
+                                       [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.b2DsMu2eXLine = BtoDlnuLine(name,
+                                       'Ds2e',
+                                       [ '[B0 -> D- mu+ omega(782)]cc', '[B0 -> D- mu- omega(782)]cc' ],
+                                       [ '[D+ -> K+ K- pi+]cc' ],
+                                       CharmCuts["Ds"],
+                                       [self.selKaon, self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.b2DseXLine = BtoDlnuLine(name,
+                                       'Ds_Electron',
+                                       [ '[B0 -> D- e+ rho(770)0]cc', '[B0 -> D- e- rho(770)0]cc' ],
+                                       [ '[D+ -> K+ K- pi+]cc' ],
+                                       CharmCuts["Ds"],
+                                       [self.selKaon, self.selPion],self.selElectron)
+
+        self.lb2LcMuXLine = BtoDlnuLine(name,
+                                        "Lc",
+                                        [ '[Lambda_b0 -> Lambda_c+ mu- rho(770)0]cc', '[Lambda_b0 -> Lambda_c+ mu+ rho(770)0]cc'],
+                                        [ '[Lambda_c+ -> K- p+ pi+]cc' ],
+                                        CharmCuts["Lc"],
+                                        [self.selProton,self.selKaon,self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.lb2LcMu2eXLine = BtoDlnuLine(name,
+                                        "Lc2e",
+                                        [ '[Lambda_b0 -> Lambda_c+ mu- omega(782)]cc', '[Lambda_b0 -> Lambda_c+ mu+ omega(782)]cc'],
+                                        [ '[Lambda_c+ -> K- p+ pi+]cc' ],
+                                        CharmCuts["Lc"],
+                                        [self.selProton,self.selKaon,self.selPion],self.selMuon,self.selMuonFakes)
+
+        self.lb2LceXLine = BtoDlnuLine(name,
+                                        "Lc_Electron",
+                                        [ '[Lambda_b0 -> Lambda_c+ e- rho(770)0]cc', '[Lambda_b0 -> Lambda_c+ e+ rho(770)0]cc'],
+                                        [ '[Lambda_c+ -> K- p+ pi+]cc' ],
+                                        CharmCuts["Lc"],
+                                        [self.selProton,self.selKaon,self.selPion],self.selElectron)
+
+        # self.Xic_Line = BtoDlnuLine(name,
+        #                             "Xic",
+        #                             [ '[Xi_b0 -> Xi_c+ mu-]cc', '[Xi_b0 -> Xi_c+ mu+]cc'],
+        #                             [ '[Xi_c+ -> K- p+ pi+]cc' ],
+        #                             CharmCuts["Xic"],
+        #                             [self.selProton,self.selKaon,self.selPion],self.selMuon,self.selMuonFakes)
+        #
+        # self.Xic0_Line = BtoDlnuLine(name,
+        #                              "Xic0",
+        #                              [ '[Xi_b- -> Xi_c0 mu-]cc', '[Xi_b- -> Xi_c0 mu+]cc'],
+        #                              [ '[Xi_c0 -> p+ K- K- pi+]cc'],
+        #                              CharmCuts["Xic0"],
+        #                              [self.selProton,self.selKaon,self.selPion],self.selMuon,self.selMuonFakes)
+        #
+        # self.Omegac_Line = BtoDlnuLine(name,
+        #                                "Omegac",
+        #                                [ '[Omega_b- -> Omega_c0 mu-]cc', '[Omega_b- -> Omega_c0 mu+]cc'],
+        #                                [ '[Omega_c0 -> p+ K- K- pi+]cc' ],
+        #                                CharmCuts["Omegac"],
+        #                                [self.selProton,self.selKaon,self.selPion],self.selMuon,self.selMuonFakes)
+
+        ##### line registration
+        self.registerLine(self.b2D0eXLine)
+        self.registerLine(self.b2DpeXLine)
+        self.registerLine(self.b2DseXLine)
+        self.registerLine(self.lb2LceXLine)
+        #self.registerLine(self.b2D0MuXKKLine)
+        #self.registerLine(self.b2D0MuXPiPiLine)
+        for Mu in ["RealMuon","FakeMuon"]:
+            self.registerLine(self.b2D0MuXLine[Mu])
+            self.registerLine(self.b2D0Mu2eXLine[Mu])
+            #self.registerLine(self.b2D0MuXK3PiLine[Mu])
+            #self.registerLine(self.b2D0MuXKMuLine[Mu])
+            #self.registerLine(self.b2D0MuXKFakeMuLine[Mu])
+            self.registerLine(self.b2DpMuXLine[Mu])
+            self.registerLine(self.b2DsMuXLine[Mu])
+            self.registerLine(self.lb2LcMuXLine[Mu])
+            self.registerLine(self.b2DpMu2eXLine[Mu])
+            self.registerLine(self.b2DsMu2eXLine[Mu])
+            self.registerLine(self.lb2LcMu2eXLine[Mu])
+            #self.registerLine(self.Omegac_Line[Mu])
+            #self.registerLine(self.Xic_Line[Mu])
+            #self.registerLine(self.Xic0_Line[Mu])
+
+######################################
+def BtoDlnuLine(module_name,
+                name,
+                BDecays,
+                DDecays,
+                CONFIG,
+                CHARM_DAUGHTERS,
+                MUON,
+                FAKE_MUON = None):
+
+    #DEFAULT_GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" %CONFIG,
+    #                 "Preambulo": ["from LoKiTracks.decorators import *"]}
+
+    CHARM_DaugCuts = {}
+    CHARM_ComboCuts = CONFIG["CharmComboCuts"]
+    CHARM_MotherCuts = CONFIG["CharmMotherCuts"]
+    CHARM_ComboCuts += " & (ADOCACHI2CUT( %(D_DocaChi2Max)s, ''))" % CONFIG
+    CHARM_MotherCuts += "& (VFASPF(VCHI2/VDOF) < %(D_VCHI2DOF)s) " \
+        "& (BPVVDCHI2 > %(D_FDCHI2)s) &  (BPVDIRA> %(D_BPVDIRA)s)"  % CONFIG
+
+    if "CharmDaugCuts" in CONFIG.keys():
+        CHARM_DaugCuts = CONFIG["CharmDaugCuts"]
+    if "CharmExtraComboCuts" in CONFIG.keys():
+        CHARM_ComboCuts += CONFIG["CharmExtraComboCuts"]
+    if "CharmExtraMotherCuts" in CONFIG.keys():
+        CHARM_MotherCuts += CONFIG["CharmExtraMotherCuts"]
+
+    CHARM = Selection("CharmSelFor"+name+module_name,
+                      Algorithm=CombineParticles(DecayDescriptors = DDecays,
+                                                 DaughtersCuts = CHARM_DaugCuts,
+                                                 CombinationCut = CHARM_ComboCuts,
+                                                 MotherCut = CHARM_MotherCuts),
+                      RequiredSelections = CHARM_DAUGHTERS)
+
+    USED_CHARM = CHARM
+    if "D*" in BDecays:
+        DST = makeDstar("CharmSelDstFor"+name+module_name,CHARM,CONFIG)
+        USED_CHARM = DST
+
+    if "2e" in name:
+        SOFTDILEPTON = _makeDiElectron("SoftDiElectronFor"+name+module_name,CONFIG)
+    else:
+        SOFTDILEPTON = _makeDiMuonDetached("SoftDimuonFor"+name+module_name,CONFIG)
+
+    B_combinationCut = "(AM > %(B_MassMin)s) & (AM < %(B_MassMax)s) & (ADOCACHI2CUT( %(B_DocaChi2Max)s, ''))" %CONFIG
+    B_motherCut = " (MM>%(B_MassMin)s) & (MM<%(B_MassMax)s)"\
+        "&(VFASPF(VCHI2/VDOF)< %(B_VCHI2DOF)s) & (BPVDIRA> %(B_DIRA)s)"\
+        "&(MINTREE(((ABSID=='D+')|(ABSID=='D0')|(ABSID=='Lambda_c+')|(ABSID=='Omega_c0')|(ABSID=='Xi_c+')|(ABSID=='Xi_c0'))"\
+        ", VFASPF(VZ))-VFASPF(VZ) > %(B_D_DZ)s  ) " %CONFIG
+    if "ExtraComboCuts" in CONFIG.keys():
+        B_combinationCut += CONFIG["ExtraComboCuts"]
+    if "ExtraMotherCuts" in CONFIG.keys():
+        B_motherCut += CONFIG["ExtraMotherCuts"]
+
+    B_DaugCuts = {}
+    if "ExtraMuonCuts" in CONFIG.keys():
+        B_DaugCuts = {"mu+":CONFIG["ExtraMuonCuts"]}
+    if "ExtraElectronCuts" in CONFIG.keys():
+        B_DaugCuts = {"e+":CONFIG["ExtraElectronCuts"]}
+    _B = CombineParticles(DecayDescriptors = BDecays,
+                          DaughtersCuts = B_DaugCuts,
+                          CombinationCut = B_combinationCut,
+                          MotherCut = B_motherCut)
+
+    if CONFIG["Monitor"] == True :
+        _B.Preambulo    = [
+            "hdm1 = Gaudi.Histo1DDef ( 'D_M' , 1700 , 2800  , 200 )"
+            ]
+        _B.Monitor      = True
+        _B.MotherMonitor  = "process ( monitor ( CHILD(M,1) , hdm1 , 'D_M' ) )  >> ~EMPTY """
+
+    BSel = Selection ("BSelFor"+name+module_name,
+                      Algorithm = _B,
+                      RequiredSelections = [MUON,USED_CHARM,SOFTDILEPTON])
+
+
+    BSelTOS = TOSFilter( "BSelFor"+name+module_name+"TOS"
+                         ,BSel
+                         ,CONFIG["TTSpecs"])
+
+    LINE_NAME = module_name + "_"+name
+    _prescale = 1.0
+    #if LINE_NAME in CONFIG["prescales"].keys():
+    #    _prescale = CONFIG["prescales"][LINE_NAME]
+
+    if "Fake" in LINE_NAME:
+        main_line = StrippingLine(LINE_NAME,
+                    selection=BSelTOS,
+                    HLT1=CONFIG["HLT1"],
+                    HLT2=CONFIG["HLT2"],
+                    RelatedInfoTools = [
+                    { "Type" : "RelInfoMuonIDPlus",
+                    "Variables" : ["MU_BDT"],
+                    "DaughterLocations"  : {
+                    "[ Beauty -> X ^l+ (X -> l+ l-) ]CC" : "Muon0BDT",
+                    "[ Beauty -> X l+ (X -> ^l+ l-) ]CC" : "Muon1BDT",
+                    "[ Beauty -> X l+ (X -> l+ ^l-) ]CC" : "Muon2BDT",}
+                    },
+                    ],
+                    #FILTER=DEFAULT_GECs,
+                    prescale=CONFIG["prescaleFakes"])
+
+    else:
+        main_line = StrippingLine(LINE_NAME,
+                                  selection = BSelTOS,
+                                  HLT1 = CONFIG["HLT1"],
+                                  HLT2 = CONFIG["HLT2"],
+                                  RelatedInfoTools = [
+                                  { "Type" : "RelInfoMuonIDPlus",
+                                  "Variables" : ["MU_BDT"],
+                                  "DaughterLocations"  : {
+                                  "[ Beauty -> X ^l+ (X -> l+ l-) ]CC" : "Muon0BDT",
+                                  "[ Beauty -> X l+ (X -> ^l+ l-) ]CC" : "Muon1BDT",
+                                  "[ Beauty -> X l+ (X -> l+ ^l-) ]CC" : "Muon2BDT",}
+                                  },
+                                  ],
+
+                                  #FILTER=DEFAULT_GECs,
+                                  prescale = _prescale)
+
+    if FAKE_MUON == None:
+        return main_line
+    else:
+        BSelFake = Selection ("BSelFakeFor"+name+module_name,
+                              Algorithm = _B,
+                              RequiredSelections = [FAKE_MUON,USED_CHARM,SOFTDILEPTON])
+
+        BSelFakeTOS = TOSFilter( "BSelFakeFor"+name+module_name+"TOS"
+                                 ,BSelFake
+                                 ,CONFIG["TTSpecs"])
+        return {"RealMuon":main_line,
+                "FakeMuon":StrippingLine(LINE_NAME + '_FakeMuon',
+                                         selection = BSelFakeTOS,
+                                         HLT1 = CONFIG["HLT1"],
+                                         HLT2 = CONFIG["HLT2"],
+                                         RelatedInfoTools = [
+                                         { "Type" : "RelInfoMuonIDPlus",
+                                         "Variables" : ["MU_BDT"],
+                                         "DaughterLocations"  : {
+                                         "[ Beauty -> X ^l+ (X -> l+ l-) ]CC" : "Muon0BDT",
+                                         "[ Beauty -> X l+ (X -> ^l+ l-) ]CC" : "Muon1BDT",
+                                         "[ Beauty -> X l+ (X -> l+ ^l-) ]CC" : "Muon2BDT",}
+                                         },
+                                         ],
+                                         #FILTER=DEFAULT_GECs,
+                                         prescale = CONFIG["prescaleFakes"])
+                }
+
+
+########### HELP WITH MAKING A DSTAR ########################
+def makeDstar(_name, inputD0,CONFIG) :
+    _softPi = DataOnDemand(Location = 'Phys/StdAllLoosePions/Particles')
+    _inputD0_conj = Selection("SelConjugateD0For"+_name,
+                             Algorithm = ConjugateNeutralPID('ConjugateD0For'+_name),
+                             RequiredSelections = [inputD0])
+    _cutsSoftPi = '( PT > %(Dstar_SoftPion_PT)s  )' % CONFIG
+    _cutsDstarComb = '(AM - ACHILD(M,1) + 5 > %(Dstar_wideDMCutLower)s ) & (AM - ACHILD(M,1) - 5 < %(Dstar_wideDMCutUpper)s )' % CONFIG
+    _cutsDstarMoth_base = '(VFASPF(VCHI2/VDOF) < %(Dstar_Chi2)s )' % CONFIG
+    _cutsDstarMoth_DM = '(M - CHILD(M,1) > %(Dstar_wideDMCutLower)s ) & (M - CHILD(M,1) < %(Dstar_wideDMCutUpper)s )' % CONFIG
+    _cutsDstarMoth = '(' + _cutsDstarMoth_base + ' & ' + _cutsDstarMoth_DM + ')'
+    _Dstar = CombineParticles( DecayDescriptor = "[D*(2010)+ -> D0 pi+]cc",
+                               DaughtersCuts = { "pi+" : _cutsSoftPi },
+                               CombinationCut = _cutsDstarComb,
+                               MotherCut = _cutsDstarMoth)
+    return Selection (name = "Sel"+_name,Algorithm = _Dstar,RequiredSelections = [inputD0,_inputD0_conj] + [_softPi])
+
+########## TISTOS FILTERING ##################################
+def TOSFilter( name = None, sel = None, trigger = None ):
+    if len(trigger) == 0:
+        return sel
+    from Configurables import TisTosParticleTagger
+    _filter = TisTosParticleTagger(name+"_TriggerTos")
+    _filter.TisTosSpecs = trigger
+    _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = [ sel ], Algorithm = _filter )
+    return _sel
+
+#####################################################
+def _makeDiMuonDetached(  name, params ) :
+    """
+    Make a dimuon
+    rho(770)0 is just a proxy to get the two-body combination
+    """
+
+    _Decays = "rho(770)0 -> mu+ mu-"
+
+     # define all the cuts
+    _CombCuts    = "(AM > 0*MeV) & (ADOCA(1,2)<0.75*mm)" % params
+
+    _MotherCuts  = "(VFASPF(VCHI2PDOF) < 10) & (BPVVDCHI2 > 9) " % params
+    _daughtersCutsmu = "(ISMUON) & (TRCHI2DOF < %(TRCHI2)s) & (TRGHOSTPROB < %(TRGHOSTPROB)s) " % params
+
+    _Combine = CombineParticles()
+
+    _Combine.DecayDescriptor = _Decays
+
+    _Combine.DaughtersCuts = {
+        "mu+"  : _daughtersCutsmu }
+
+    _Combine.CombinationCut   = _CombCuts
+    _Combine.MotherCut        = _MotherCuts
+
+    _stdNoPIDLooseMuons = DataOnDemand(Location = "Phys/StdAllNoPIDsMuons/Particles")
+    # make and store the Selection object
+    return Selection( name, Algorithm = _Combine, RequiredSelections = [ _stdNoPIDLooseMuons ] )
+
+#####################################################
+def _makeDiElectron( name, params ) :
+    """
+    Make a dielectron
+    omega(782) is just a proxy to get the two-body combination
+    """
+
+    from Configurables import DiElectronMaker, ProtoParticleCALOFilter
+
+    dieLL = DiElectronMaker('MyDiElectronFromTracks')
+    dieLL.Particle = "omega(782)"
+    selector = trackSelector ( dieLL , trackTypes = ["Long"] )
+    dieLL.addTool( ProtoParticleCALOFilter, name='Electron' )
+    dieLL.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'2.0'"]
+    dieLL.DiElectronMassMax = 5000.*MeV
+    dieLL.DiElectronMassMin = 0.*MeV
+    dieLL.DiElectronPtMin = 200.*MeV
+
+    _sele = Selection( name+"_singleele", Algorithm = dieLL )
+
+    _Filter = FilterDesktop( Code = "(VFASPF(VCHI2/VDOF) < 9) & (BPVVDCHI2 > 9)" )
+
+    return Selection(name, Algorithm = _Filter, RequiredSelections = [ _sele ] )
+
+#
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingTrackEffD0ToK3Pi.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingTrackEffD0ToK3Pi.py
new file mode 100644
index 000000000..cba1ab3d6
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/StrippingTrackEffD0ToK3Pi.py
@@ -0,0 +1,393 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+__author__ = ['Mika Vesterinen']
+__date__ = '23/07/2014'
+__version__ = '$Revision: 5.0 $'
+
+from Gaudi.Configuration import *
+from Configurables import FilterDesktop, CombineParticles
+from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
+from StrippingConf.StrippingLine import StrippingLine
+from StrippingUtils.Utils import LineBuilder
+from StandardParticles import StdLooseKaons, StdLoosePions, StdLooseProtons,StdAllLoosePions,StdAllNoPIDsPions
+from GaudiKernel.SystemOfUnits import MeV, GeV, mm
+from SelPy.utils import ( UniquelyNamedObject,
+                          ClonableObject,
+                          SelectionBase )
+from Configurables import (DecodeVeloRawBuffer, FastVeloTracking, TrackPrepareVelo, 
+                           NoPIDsParticleMaker, DataOnDemandSvc, ChargedProtoParticleMaker, 
+                           PrTrackAssociator, DelegatingTrackSelector, TrackContainerCopy, TrackAssociator,
+                          TrackStateInitAlg, TrackStateInitTool) 
+from TrackFitter.ConfiguredFitters import (ConfiguredEventFitter,
+                                           ConfiguredForwardStraightLineEventFitter)
+    
+
+__all__ = ('TrackEffD0ToK3PiAllLinesConf',
+           'TOSFilter',
+           'default_config')
+
+default_config = {
+  'NAME'        : 'TrackEffD0ToK3Pi',
+  "WGs"         : ["Semileptonic"],
+  "BUILDERTYPE" : "TrackEffD0ToK3PiAllLinesConf",
+  "CONFIG"      : {
+      "HLT"               : "HLT_PASS_RE('Hlt2.*CharmHadD02HHXDst.*Decision')",
+      "TTSpecs"           : {'Hlt2.*CharmHadD02HHXDst.*Decision%TOS':0},
+      "VeloLineForTiming" : False,
+      "VeloFitter"        : "SimplifiedGeometry",
+      "DoVeloDecoding"    : False,
+      "RequireDstFirst"   : False,
+      "Dst_MAX_M"         : 2.035*GeV,
+      "Dst_MAX_DTFCHI2"   : 3.0,
+      "Sc_MAX_M"          : 2.5*GeV,
+      "Sc_MAX_DTFCHI2"    : 3.0,
+      "D0_MIN_FD"         : 5.0*mm,
+      "LC_MIN_FD"         : 2.0*mm,
+      "D0_MAX_DOCA"       : 0.05*mm,
+      "VeloMINIP"         : 0.05*mm,
+      "Kaon_MIN_PIDK"     : 7,
+      "Pion_MAX_PIDK"     : 4
+  },
+  'STREAMS'     : ['Semileptonic']   
+}
+
+class TrackEffD0ToK3PiAllLinesConf(LineBuilder) :
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+    
+    __confdict__={}
+        
+    def __init__(self, name, config) :
+
+        LineBuilder.__init__(self, name, config)
+        self.__confdict__=config
+        self.name = name
+        
+
+        ##### long track kaons and pions
+        self.PionCuts = "(PIDK < %(Pion_MAX_PIDK)s) & (TRGHOSTPROB < 0.35)" %config
+        self.KaonCuts = "(PIDK > %(Kaon_MIN_PIDK)s) & (TRGHOSTPROB < 0.35)" %config
+        
+        SelLongPions = Selection("SelLongPionsFor"+name,
+                                 Algorithm = FilterDesktop(name="LongPionFilterFor"+name,
+                                                           Code=self.PionCuts),
+                                 RequiredSelections = [StdLoosePions])
+        
+        SelLongKaons = Selection("SelLongKaonsFor"+name,
+                                 Algorithm = FilterDesktop(name="LongKaonFilterFor"+name,
+                                                           Code=self.KaonCuts),
+                                 RequiredSelections = [StdLooseKaons])
+        
+        ###### the velo tracking
+        self.VeloProtoOutputLocation = 'Rec/ProtoP/VeloProtosFor%s'%self.name
+        self.VeloTrackOutputLocation="Rec/Track/MyVeloFor%s"%self.name
+        self.FittedVeloTrackOutputLocation = "Rec/Track/PreparedVeloFor%s"%self.name
+        
+        self.VeloTracks = self.MakeVeloTracks([]) 
+        self.VeloPions = self.MakeVeloParticles("VeloPions","pion",self.VeloTracks)
+        self.VeloKaons = self.MakeVeloParticles("VeloKaons","kaon",self.VeloTracks)
+        self.VeloProtons = self.MakeVeloParticles("VeloProtons","proton",self.VeloTracks)
+        
+        ##################### MAKE THE LINES #############
+        
+        self.MissingPion4BodyLine = self.MakeLine("%sMissingPion4Body"%self.name,
+                                                  ['[K*(892)+ -> K- pi+ pi+]cc','[K*(892)+ -> K- pi+ pi-]cc','[K*(892)+ -> K- pi- pi-]cc'],## RS-A, RS-B , SS
+                                                  [SelLongKaons,SelLongPions],
+                                                  ['[D0 -> K*(892)+ pi+]cc','[D0 -> K*(892)+ pi-]cc'], ## allow both probe charges
+                                                  ["[D*(2010)+ -> D0 pi+]cc","[D*(2010)+ -> D~0 pi+]cc"], ## add also wrong sign
+                                                  ['[K*_0(1430)0 -> K*(892)+ pi-]cc','[K*_0(1430)0 -> K*(892)+ pi+]cc'], ## allow also wrong sign StdAllNoPIDs "pions"
+                                                  self.VeloPions)
+
+        self.MissingKaon4BodyLine = self.MakeLine("%sMissingKaon4Body"%self.name,
+                                                  ['[K*(892)+ -> pi+ pi+ pi-]cc','[K*(892)+ -> pi+ pi+ pi+]cc'],## RS, SS
+                                                  [SelLongPions],
+                                                  ['[D0 -> K*(892)+ K+]cc','[D0 -> K*(892)+ K-]cc'], ## allow both probe charges
+                                                  ["[D*(2010)+ -> D0 pi+]cc","[D*(2010)+ -> D~0 pi+]cc"], ## add also wrong sign
+                                                  ['[K*_0(1430)0 -> K*(892)+ pi-]cc','[K*_0(1430)0 -> K*(892)+ pi+]cc'], ## allow also wrong sign StdAllNoPIDs "pions"
+                                                  self.VeloKaons)
+        
+        self.MissingProtonLine = self.MakeLine("%sMissingProton"%self.name,
+                                               ['[K*(892)+ -> K- pi+]cc','[K*(892)+ -> K- pi-]cc'], ## RS, SS
+                                               [SelLongKaons, SelLongPions],
+                                               ['[Lambda_c+ -> K*(892)+ p+]cc','[Lambda_c+ -> K*(892)+ p~-]cc'],## both probe charges
+                                               ['[Sigma_c0 -> Lambda_c+ pi+]cc','[Sigma_c0 -> Lambda_c+ pi-]cc'], ## Allows Sigma_c0 and Sigma_c++
+                                               ['[K*_0(1430)0 -> K*(892)+ pi-]cc','[K*_0(1430)0 -> K*(892)+ pi+]cc'], ## allow also wrong sign StdAllNoPIDs "pions"
+                                               self.VeloProtons)
+
+        if config["VeloLineForTiming"] == True:
+            self.registerLine(StrippingLine("VeloLine"+name,selection=self.VeloPions))
+            
+        ### these are the partially reconstructed signals
+        self.registerLine(self.MissingKaon4BodyLine[0])
+        self.registerLine(self.MissingPion4BodyLine[0])
+        self.registerLine(self.MissingProtonLine[0])
+        
+        ### and these contain the candidate matching long tracks
+        self.registerLine(self.MissingPion4BodyLine[1])
+        self.registerLine(self.MissingKaon4BodyLine[1])
+        self.registerLine(self.MissingProtonLine[1])
+
+    
+    #### function to make the stripping line
+    def MakeLine(self,
+                 name,
+                 KstDecayDescriptors,
+                 KstRequirements,
+                 D0DecayDescriptor,
+                 DstDecayDescriptors,
+                 MatchDecayDescriptor,
+                 Probes):
+        
+        #########################################################
+        ## DEFINE ALL OF THE CUTS
+        #########################################################
+        
+        MatchingLongTrackCuts = "(ISLONG) & (TRGHOSTPROB < 0.35)"
+        D0CombinationCut = "(AMAXDOCA('') < %(D0_MAX_DOCA)s )" %self.__confdict__
+        SlowpionCuts = "(MIPCHI2DV(PRIMARY) < 9) & (PIDe < 5) & (PT > 300*MeV)"
+        #DstPrelimComboCuts = "(AM - ACHILD(M,1) < 225*MeV) & (AALLSAMEBPV)"
+        DstPrelimComboCuts = "(APT > 3500*MeV) & (AALLSAMEBPV)"
+        if '4Body' in name:
+            D0Preambulo = ["mfit = DTF_FUN(M,True,'D0')"]
+            KstCombinationCut = "(APT > 2000*MeV) & (AM < 1800*MeV)"\
+                "& (AM - ACHILD(M,1) - ACHILD(M,2) - ACHILD(M,3) > 100*MeV)"\
+                "& (ANUM(PT > 500*MeV)>=2)"\
+                "& (AMAXCHILD(MIPCHI2DV(PRIMARY)) > 30)"\
+                "& (ADOCACHI2CUT(10,''))"
+            if "MissingKaon" in name:
+                KstCombinationCut += '& (AM < 1400*MeV)'
+            KstMotherCut = '(VFASPF(VZ) > %(D0_MIN_FD)s) & (BPVDIRA > 0.99) & (VFASPF(VCHI2/VDOF)< 3.0)' %self.__confdict__
+            D0MotherCut ='(abs(DTF_FUN(M,True) - 1865) < 250*MeV)'
+            DstMotherCut = "(in_range ( 2 * GeV , mfit , %(Dst_MAX_M)s )) & (DTF_CHI2NDOF(True,'D0') < %(Dst_MAX_DTFCHI2)s)" %self.__confdict__
+        elif 'Proton' in name:
+            D0Preambulo = ["mfit = DTF_FUN(M,True,'Lambda_c+')"]
+            KstCombinationCut = '(APT > 1500*MeV) & (AM < 1500*MeV)'\
+                '& (AM - ACHILD(M,1) - ACHILD(M,2) > 100*MeV)'\
+                '& (ANUM(PT > 500*MeV)>=2)'\
+                "& (AMAXCHILD(MIPCHI2DV(PRIMARY)) > 30)"\
+                "& (ADOCACHI2CUT(15,''))"
+            KstMotherCut = '(VFASPF(VZ) > %(LC_MIN_FD)s) & (BPVDIRA > 0.99) & (VFASPF(VCHI2/VDOF)< 3.0)' %self.__confdict__
+            D0MotherCut ='(abs(DTF_FUN(M,True) - 2286) < 250*MeV)'
+            DstMotherCut = "(in_range ( 2.4 * GeV , mfit , %(Sc_MAX_M)s )) & (DTF_CHI2NDOF(True,'Lambda_c+') < %(Sc_MAX_DTFCHI2)s)" %self.__confdict__
+        else:
+            print name + ' = Bad line name'
+        
+        #########################################################
+        ## STEP 1: 
+        ## make the partially reconstructed D0/Lamda_c candidate
+        #########################################################
+            
+        CombKst = CombineParticles(name="For%sCombKst"%name,
+                                   DecayDescriptors = KstDecayDescriptors,
+                                   CombinationCut = KstCombinationCut,
+                                   MotherCut = KstMotherCut)
+        
+        SelKst = Selection('For%sSelKst'%name,
+                           Algorithm = CombKst,
+                           RequiredSelections = KstRequirements)
+    
+        #########################################################
+        ## STEP 2 (OPTIONAL): 
+        ## Does this make an "inclusive D*" candidate?
+        #########################################################
+        if self.__confdict__["RequireDstFirst"]:
+
+            CombDstarPrelim = CombineParticles(name = "For%sCombDstarPrelimFor"%name,
+                                               DecayDescriptors = ["[D*(2010)+ -> K*(892)+ pi+]cc"],
+                                               DaughtersCuts = {"pi+": SlowpionCuts},
+                                               CombinationCut = DstPrelimComboCuts,
+                                               MotherCut = "ALL")
+            SelDstarPrelim = Selection("For%sSelDstarPrelimfor"%name,
+                                       Algorithm = CombDstarPrelim,
+                                       RequiredSelections = [SelKst,StdAllLoosePions])
+        
+            SelDstarPrelimTOS = TOSFilter( "For%sSelDstarPrelimTOS"%name
+                                           ,SelDstarPrelim
+                                           ,self.__confdict__["TTSpecs"])
+
+        #########################################################
+        ## STEP 3: 
+        ## Add the probe velo track to the D0
+        #########################################################
+    
+        CombD0 = CombineParticles(name="For%sCombD0"%name,
+                                  Preambulo = D0Preambulo,
+                                  DecayDescriptors = D0DecayDescriptor,
+                                  CombinationCut = D0CombinationCut,
+                                  MotherCut = D0MotherCut)
+    
+        if self.__confdict__["RequireDstFirst"]:
+            SelD0 = Selection('For%sSelD0'%name,
+                              Algorithm = CombD0,
+                              RequiredSelections = [SelDstarPrelimTOS,SelKst,Probes])
+        else:
+            SelD0 = Selection('For%sSelD0'%name,
+                              Algorithm = CombD0,
+                              RequiredSelections = [SelKst,Probes])
+            
+        #########################################################
+        ## STEP 4: 
+        ## Build a D* candidate
+        #########################################################
+            
+        
+
+        CombDstar = CombineParticles(name = "For%sCombDstar"%name,
+                                     DecayDescriptors = DstDecayDescriptors,
+                                     DaughtersCuts = {"pi+": SlowpionCuts},
+                                     CombinationCut = DstPrelimComboCuts,
+                                     MotherCut = DstMotherCut)
+        
+        SelDstar = Selection("For%sSelDstarf"%name,
+                             Algorithm = CombDstar,
+                             RequiredSelections = [SelD0,StdAllLoosePions])
+        
+        SelDstarTOS = TOSFilter( "For%sSelDstarTOS"%name
+                                 ,SelDstar
+                                 ,self.__confdict__["TTSpecs"])
+        
+        
+        #########################################################
+        ## STEP 5: 
+        ## Find any interesting matching long tracks
+        #########################################################
+
+        CombD0MatchLong = CombineParticles(name="For%sCombD0MatchLong"%name,
+                                           DaughtersCuts = {"pi+":MatchingLongTrackCuts},
+                                           DecayDescriptors = MatchDecayDescriptor,
+                                           CombinationCut = "(AMAXDOCA('') < 0.10 * mm )",
+                                           MotherCut = "ALL")
+        
+        SelD0MatchLong = Selection('For%sSelD0MatchLong'%name,
+                                   Algorithm = CombD0MatchLong,
+                                   RequiredSelections = [SelDstarTOS,SelKst,StdAllNoPIDsPions])
+
+        #########################################################
+        ## STEP 6: 
+        ## Make the stripping lines
+        #########################################################
+        
+        LineDstar = StrippingLine(name, 
+                                  FILTER = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 180 )",
+                                             "Preambulo": ["from LoKiTracks.decorators import *"]},
+                                  HLT2 = self.__confdict__["HLT"],
+                                  selection = SelDstarTOS) 
+        
+        LineMatchLong = StrippingLine(name+'MatchLong', 
+                                      FILTER = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < 180 )",
+                                                 "Preambulo": ["from LoKiTracks.decorators import *"]},
+                                      HLT2 = self.__confdict__["HLT"],
+                                      selection = SelD0MatchLong)
+        return [LineDstar,LineMatchLong]
+
+
+    def MakeVeloTracks(self,prefilter):
+        
+        if self.__confdict__["DoVeloDecoding"]:
+            from DAQSys.Decoders import DecoderDB
+            from DAQSys.DecoderClass import decodersForBank
+            decs=[]
+            vdec=DecoderDB["DecodeVeloRawBuffer/createBothVeloClusters"]
+            vdec.Active=True
+            DecoderDB["DecodeVeloRawBuffer/createVeloClusters"].Active=False
+            DecoderDB["DecodeVeloRawBuffer/createVeloLiteClusters"].Active=False
+            decs=decs+[vdec]
+            VeloDecoding = GaudiSequencer("RecoDecodingSeq")
+            VeloDecoding.Members += [d.setup() for d in decs ]
+        
+        MyFastVeloTracking = FastVeloTracking("For%sFastVelo"%self.name,OutputTracksName=self.VeloTrackOutputLocation)
+        MyFastVeloTracking.OnlyForward = True
+        MyFastVeloTracking.ResetUsedFlags = True
+        ### prepare for fitting
+        preve = TrackStateInitAlg("For%sInitSeedFit"%self.name,TrackLocation = self.VeloTrackOutputLocation)
+        preve.StateInitTool.VeloFitterName = "FastVeloFitLHCbIDs"
+        copyVelo = TrackContainerCopy( "For%sCopyVelo"%self.name )
+        copyVelo.inputLocations = [self.VeloTrackOutputLocation]
+        copyVelo.outputLocation = self.FittedVeloTrackOutputLocation
+        
+        ### fitting
+        if self.__confdict__["VeloFitter"] == "ForwardStraightLine":
+            MyVeloFit = ConfiguredForwardStraightLineEventFitter(Name="For%sVeloRefitterAlg"%self.name,
+                                                                 TracksInContainer=self.FittedVeloTrackOutputLocation)
+        elif self.__confdict__["VeloFitter"] == "SimplifiedGeometry":
+            MyVeloFit = ConfiguredEventFitter(Name="For%sVeloRefitterAlg"%self.name,
+                                              TracksInContainer=self.FittedVeloTrackOutputLocation,
+                                              SimplifiedGeometry = True)
+        else:
+            MyVeloFit = ConfiguredEventFitter(Name="For%sVeloRefitterAlg"%self.name,
+                                              TracksInContainer=self.FittedVeloTrackOutputLocation)
+            
+        #### making the proto particles
+        MakeVeloProtos = ChargedProtoParticleMaker('For%sVeloProtoMaker'%self.name)
+        MakeVeloProtos.Inputs=[self.FittedVeloTrackOutputLocation]
+        MakeVeloProtos.Output = self.VeloProtoOutputLocation
+        MakeVeloProtos.addTool( DelegatingTrackSelector, name="TrackSelector" )
+        MakeVeloProtos.TrackSelector.TrackTypes = [ "Velo" ]
+    
+        #### the full sequence
+        makeparts = GaudiSequencer('For%sMakeVeloTracksGS'%self.name)
+        if self.__confdict__["DoVeloDecoding"]:
+            makeparts.Members += [ VeloDecoding ] 
+        makeparts.Members += [ MyFastVeloTracking ] 
+        makeparts.Members += [ preve ] 
+        makeparts.Members += [ copyVelo ] 
+        makeparts.Members += [ MyVeloFit ] 
+        makeparts.Members += [ MakeVeloProtos ] 
+    
+        #### some python magic to maek this appear like a "Selection"
+        return GSWrapper(name="For%sWrappedVeloTrackingFor"%self.name,
+                         sequencer=makeparts,
+                         output=self.VeloProtoOutputLocation,
+                         requiredSelections =  prefilter)
+
+    def MakeVeloParticles(self,name,
+                          particle, 
+                          protoParticlesMaker):
+        
+        particleMaker =  NoPIDsParticleMaker("For%sParticleMaker%s"%(self.name,name) , Particle = particle)
+        particleMaker.Input = self.VeloProtoOutputLocation
+        
+        DataOnDemandSvc().AlgMap.update( {
+                "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(),
+                "/Event/Phys/" + particleMaker.name() + '/Vertices'  : particleMaker.getFullName()
+                } )
+        
+        AllVeloParticles = Selection("For%sSelAllVeloParts%s"%(self.name,name), 
+                                     Algorithm = particleMaker, 
+                                     RequiredSelections = [protoParticlesMaker], InputDataSetter=None)
+        
+        ### filter on the IP of the velo tracks
+        return Selection("For%sSelVeloParts%s"%(self.name,name), 
+                         Algorithm = FilterDesktop(name+"For%sFilterVeloTrackIP%s"%(self.name,name), 
+                                                   Code="(MIPDV(PRIMARY) > %(VeloMINIP)s)" %self.__confdict__),
+                         RequiredSelections = [AllVeloParticles])
+    
+###### OTHER FUNCTIONS ###############
+class GSWrapper(UniquelyNamedObject,
+                ClonableObject,
+                SelectionBase) :
+    
+    def __init__(self, name, sequencer, output, requiredSelections) :
+        UniquelyNamedObject.__init__(self, name)
+        ClonableObject.__init__(self, locals())
+        SelectionBase.__init__(self,
+                               algorithm = sequencer,
+                               outputLocation = output,
+                               requiredSelections = requiredSelections )
+def TOSFilter( name = None, sel = None, trigger = None ):
+    if len(trigger) == 0:
+        return sel
+    from Configurables import TisTosParticleTagger
+    _filter = TisTosParticleTagger(name+"_TriggerTos")
+    _filter.TisTosSpecs = trigger
+    _sel = Selection("Sel" + name + "_TriggerTos", RequiredSelections = [ sel ], Algorithm = _filter )
+    return _sel
+###### OTHER FUNCTIONS ###############
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/Strippingbhad2PMuX.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/Strippingbhad2PMuX.py
new file mode 100644
index 000000000..0ab932ad7
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/Strippingbhad2PMuX.py
@@ -0,0 +1,561 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+
+__author__ = ['William Sutcliffe','Patrick Owen']
+__date__ = '02/12/2015'
+__version__ = '$Revision: 2.0 $'
+
+'''
+Lb->p mu nu exclusive reconstruction
+'''
+# =============================================================================
+##
+#  Lb->p mu nu exclusive reconstruction. 
+#
+#  Stripping lines for the charmless semileptonic decay Lambda_b -> p mu nu.
+#
+#  The lines will lead to a  measurement of the differential branching
+#  of Lb -> p mu nu as a function of q^2. 
+#
+#  This together with form factor predictions from either light cone
+#  sum rules or lattice QCD will allow an exclusive determination of |Vub|.
+# 
+#  Three lines are included:
+#  Two of which strip the opposite sign (right sign) proton and muon and combinations.
+#  One of which has no prescale and strips protons and muons with a corrected mass >
+#  4 GeV.  The other line is prescaled by a factor of 0.5 and strips < 4 GeV in corrected
+#  mass.  This exploits the fact that the corrected mass for Lb->pmunu peaks at the Lambda_b
+#  mass.  The final line strips same sign proton and muon cominations over the whole corrected 
+#  mass region.  This will be ussed to extract shapes for the combinatorial background.
+#
+#  Stripping XX, with requirements that the
+#  rate <0.05% and timing <0.5ms/evt.
+## 
+
+"""
+  b->p mu nu X inclusive reconstruction. 
+
+  Stripping lines for the charmless semileptonic decay Lambda_b -> p mu nu.
+
+  The lines will lead to a  measurement of the differential branching
+  of Lb -> p mu nu as a function of q^2. 
+
+  This together with form factor predictions from either light cone
+  sum rules or lattice QCD will allow an exclusive determination of |Vub|.
+ 
+  Last modification $Date: 2014-January-19 $
+               by $Author: William $
+"""
+
+default_config = {
+  'NAME'        : 'bhad2PMuX',
+  'WGs'         : ['Semileptonic'],
+  'BUILDERTYPE' : 'bhad2PMuXBuilder',
+  'CONFIG'      : {
+    "GEC_nLongTrk"        : 250.   ,#adimensional
+    "TRGHOSTPROB"         : 0.35   ,#adimensional
+    #Muon Cuts
+    "MuonGHOSTPROB"       : 0.35   ,#adimensional
+    "MuonTRCHI2"          : 4.     ,#adimensional
+    "MuonP"               : 3000.  ,#MeV
+    "MuonPT"              : 1500.  ,#MeV
+    "MuonMINIPCHI2"       : 16.    ,#adminensional
+    #Proton Cuts 
+    "ProtonTRCHI2"        : 6.     ,#adimensional
+    "ProtonP"             : 15000. ,#MeV
+    "ProtonPT"            : 1000.  ,#MeV
+    "ProtonPIDK"          : 10.     ,#adimensional 
+    "ProtonPIDp"          : 10.     ,#adimensional
+    "ProtonMINIPCHI2"     : 16.    ,#adminensional
+    #B Mother Cuts
+    "BCORRM"           : 2500.     ,#adminensional
+    "BVCHI2DOF"           : 2.     ,#adminensional
+    "BDIRA"               : 0.9994  ,#adminensional
+    "BFDCHI2HIGH"         : 150.   ,#adimensional
+    "PPbarVCHI2DOF"           : 4.     ,#adminensional
+    "PPbarDIRA"               : 0.994  ,#adminensional
+    "PPbarFDCHI2HIGH"         : 150.   ,#adimensional
+    "NstarVCHI2DOF"           : 2.     ,#adminensional
+    "NstarMass"         : 3000.   ,#adimensional
+    "pMuMassLower"        : 1000.  ,#MeV
+    "pMuPT"               : 1500.,  #MeV
+    "PPbarPT"               : 1500.,  #MeV
+    "DECAYS"               : ["[Lambda_b0 -> p+ mu-]cc"],
+    "SSDECAYS"               : ["[Lambda_b0 -> p+ mu+]cc"]
+  },
+  'STREAMS'     : ['Semileptonic']   
+}
+
+from Gaudi.Configuration import *
+from StrippingUtils.Utils import LineBuilder
+
+import logging
+
+# Define a make TOS filter function
+def makeTOSFilter(name,specs):
+    from Configurables import TisTosParticleTagger
+    tosFilter = TisTosParticleTagger(name+'TOSFilter')
+    tosFilter.TisTosSpecs = specs
+    tosFilter.ProjectTracksToCalo = False
+    tosFilter.CaloClustForCharged = False
+    tosFilter.CaloClustForNeutral = False
+    tosFilter.TOSFrac = {4:0.0, 5:0.0}
+    return tosFilter
+# Define a tosSelection function
+def tosSelection(sel,specs):
+    from PhysSelPython.Wrappers import Selection
+    '''Filters Selection sel to be TOS.'''
+    tosFilter = makeTOSFilter(sel.name(),specs)
+    return Selection(sel.name()+'TOS', Algorithm=tosFilter,
+                     RequiredSelections=[sel])
+
+default_name="LbpMuNu"
+
+class bhad2PMuXBuilder(LineBuilder):
+    """
+    Definition of Lb->p mu nu stripping
+    """
+    
+    __configuration_keys__ = default_config['CONFIG'].keys()
+
+    def __init__(self,name,config):
+        LineBuilder.__init__(self, name, config)
+
+        from PhysSelPython.Wrappers import Selection, DataOnDemand
+
+        self.GECs = { "Code":"( recSummaryTrack(LHCb.RecSummary.nLongTracks, TrLONG) < %(GEC_nLongTrk)s )" % config,
+                      "Preambulo": ["from LoKiTracks.decorators import *"]}
+        
+        self._muonSel=None
+        self._muonFilter()
+
+        self._protonSel=None
+        self._protonFilter()
+
+        self._pionSel=None
+        self._pionFilter()
+
+        self._daughtersSel=None
+        self._daughters()
+
+
+        self._fakeprotonSel=None
+        self._fakeprotonFilter()
+
+        self._fakedaughtersSel=None
+        self._fakedaughters()
+
+        self._fakemuonSel=None
+        self._fakemuonFilter()
+
+        self._Definitions()
+
+        self.registerLine(self._Lb_line())
+        self.registerLine(self._SS_Lb_line())
+        self.registerLine(self._fakep_Lb_line())
+        self.registerLine(self._fakep_SS_Lb_line())
+        self.registerLine(self._fakemu_Lb_line())
+        self.registerLine(self._fakemu_SS_Lb_line())
+        
+    def _NominalMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+
+    def _FakeMuSelection( self ):
+        return "(TRCHI2DOF < %(MuonTRCHI2)s ) &  (P> %(MuonP)s *MeV) &  (PT> %(MuonPT)s* MeV)"\
+               "& (TRGHOSTPROB < %(MuonGHOSTPROB)s)"\
+         "& (~ISMUON) & (INMUON)"\
+               "& (MIPCHI2DV(PRIMARY)> %(MuonMINIPCHI2)s )"
+    
+    def _NominalPSelection( self ):
+        return "(TRCHI2DOF < %(ProtonTRCHI2)s )&  (P> %(ProtonP)s *MeV) &  (PT> %(ProtonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (PIDp-PIDpi> %(ProtonPIDp)s )& (PIDp-PIDK> %(ProtonPIDK)s ) "\
+               "& (MIPCHI2DV(PRIMARY)> %(ProtonMINIPCHI2)s )"\
+               "& (switch(ISMUON,1,0) < 1)"
+
+    def _PiSelection( self ):
+        return "(MIPCHI2DV(PRIMARY)> %(ProtonMINIPCHI2)s )"\
+               "& (switch(ISMUON,1,0) < 1)"
+
+    def _FakePSelection( self ):
+        return "(TRCHI2DOF < %(ProtonTRCHI2)s )&  (P> %(ProtonP)s *MeV) &  (PT> %(ProtonPT)s *MeV)"\
+               "& (TRGHOSTPROB < %(TRGHOSTPROB)s)"\
+               "& (MIPCHI2DV(PRIMARY)> %(ProtonMINIPCHI2)s )"\
+               "& (switch(ISMUON,1,0) < 1)"
+
+    def _PPbarSelection( self ):
+        return "(VFASPF(VCHI2/VDOF)< %(PPbarVCHI2DOF)s) & (BPVDIRA> %(PPbarDIRA)s)"\
+                     "& (PT > %(PPbarPT)s)"\
+                     "& (BPVVDCHI2 >%(PPbarFDCHI2HIGH)s)"
+
+    def _NstarSelection( self ):
+        return "(VFASPF(VCHI2/VDOF)< %(NstarVCHI2DOF)s) & (BPVDIRA> %(PPbarDIRA)s)"\
+                     "& (PT > %(PPbarPT)s)"\
+                     "& (MM < %(NstarMass)s)"\
+                     "& (BPVVDCHI2 >%(PPbarFDCHI2HIGH)s)"
+
+    def _fakePPbarSelection( self ):
+        return "(VFASPF(VCHI2/VDOF)< %(PPbarVCHI2DOF)s) & (BPVDIRA> %(PPbarDIRA)s)"\
+                     "& (PT > %(PPbarPT)s)"\
+                     "& (INTREE((ABSID == 'p+')& (PIDp-PIDpi> %(ProtonPIDp)s )&(PIDp-PIDK> %(ProtonPIDK)s ))) "\
+                     "& (BPVVDCHI2 >%(PPbarFDCHI2HIGH)s)"
+
+    def _LbMotherSelection( self ):
+        return "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\
+                     "& (BPVCORRM > %(BCORRM)s)"\
+                     "& (PT > %(pMuPT)s)"\
+                     "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)"
+
+
+
+
+    ###### High Corrected Mass Line  ######
+
+    def _Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2.*SingleMuon.*Decision')"\
+              "| HLT_PASS_RE('Hlt2TopoMu2Body.*Decision')"
+        ldu = "L0_CHANNEL_RE('Muon')" 
+        return StrippingLine(self._name+'Line', prescale = 1.0,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuX_Lb()], HLT2 = hlt, L0DU = ldu)
+
+    def _SS_Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2.*SingleMuon.*Decision')"\
+              "| HLT_PASS_RE('Hlt2TopoMu2Body.*Decision')"
+        ldu = "L0_CHANNEL_RE('Muon')" 
+        return StrippingLine(self._name+'SSLine', prescale = 0.20,
+                             FILTER=self.GECs, 
+                             algos = [ self._bhad2PMuXSS_Lb()], HLT2 = hlt, L0DU = ldu)
+
+    def _fakep_Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2.*SingleMuon.*Decision')"\
+              "| HLT_PASS_RE('Hlt2TopoMu2Body.*Decision')"
+        ldu = "L0_CHANNEL_RE('Muon')" 
+        return StrippingLine(self._name+ 'FakepLine', prescale = 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuX_fakep_Lb()], HLT2 = hlt, L0DU = ldu)
+    def _fakep_SS_Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2.*SingleMuon.*Decision')"\
+              "| HLT_PASS_RE('Hlt2TopoMu2Body.*Decision')"
+        ldu = "L0_CHANNEL_RE('Muon')" 
+        return StrippingLine(self._name+ 'FakeSSpLine', prescale = 0.005,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuXSS_fakep_Lb()], HLT2 = hlt, L0DU = ldu)
+
+    def _fakemu_Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2Topo2Body.*Decision')"
+        return StrippingLine(self._name+ 'FakemuLine', prescale = 0.02,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuX_fakemu_Lb()], HLT2 = hlt)
+    def _fakemu_SS_Lb_line( self ):
+        from StrippingConf.StrippingLine import StrippingLine
+        hlt = "HLT_PASS_RE('Hlt2Topo2Body.*Decision')"
+        return StrippingLine(self._name+ 'FakeSSmuLine', prescale = 0.005,
+                             FILTER=self.GECs,
+                             algos = [ self._bhad2PMuXSS_fakemu_Lb()], HLT2 = hlt)
+    ##### Muon Filter ######
+    def _muonFilter( self ):
+        if self._muonSel is not None:
+            return self._muonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseMuons
+        _mu = FilterDesktop( Code = self._NominalMuSelection() % self._config )
+
+        _muSel=Selection("Mu_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdLooseMuons])
+        _muSel = tosSelection(_muSel,{'L0.*Muon.*Decision%TOS':0})
+        
+        self._muonSel=_muSel
+        
+        return _muSel
+
+    ##### Fake Muon Filter ######
+    def _fakemuonFilter( self ):
+        if self._fakemuonSel is not None:
+            return self._fakemuonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllNoPIDsMuons
+        _mu = FilterDesktop( Code = self._FakeMuSelection() % self._config )
+
+        _muSel=Selection("fakeMu_for"+self._name,
+                         Algorithm=_mu,
+                         RequiredSelections = [StdAllNoPIDsMuons])
+        
+        self._fakemuonSel=_muSel
+        
+        return _muSel
+
+    ###### Proton Filter ######
+    def _protonFilter( self ):
+        if self._protonSel is not None:
+            return self._protonSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLooseProtons
+        
+        _pr = FilterDesktop( Code = self._NominalPSelection() % self._config )
+        _prSel=Selection("p_for"+self._name,
+                         Algorithm=_pr,
+                         RequiredSelections = [StdLooseProtons])
+        
+        self._protonSel=_prSel
+        
+        return _prSel
+
+    ##### Pion Filter ######
+    def _pionFilter( self ):
+        if self._pionSel is not None:
+            return self._pionSel
+        
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdLoosePions
+        
+        _pr = FilterDesktop( Code = self._PiSelection() % self._config )
+        _prSel=Selection("pi_for"+self._name,
+                         Algorithm=_pr,
+                         RequiredSelections = [StdLoosePions])
+        
+        self._pionSel=_prSel
+        
+        return _prSel
+
+    ##### Fake Proton Filter ######
+    def _fakeprotonFilter( self ):
+        if self._fakeprotonSel is not None:
+            return self._fakeprotonSel
+  
+        from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
+        from PhysSelPython.Wrappers import Selection
+        from StandardParticles import StdAllNoPIDsProtons
+        
+        _pr = FilterDesktop( Code = self._FakePSelection() % self._config )
+        _prSel=Selection("fakep_for"+self._name,
+                         Algorithm=_pr,
+                         RequiredSelections = [StdAllNoPIDsProtons])
+        
+        self._fakeprotonSel=_prSel
+        
+        return _prSel
+
+
+    def _Definitions(self):
+        return [ 
+            "from LoKiPhys.decorators import *",
+            "Lb_PT = PT"
+                           ]
+
+    ###### Lb->pMuNu High M_corr Opposite Sign ######
+    def _PPbar( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        PPbar = CombineParticles(DecayDescriptors = ["J/psi(1S) -> p+ p~-","[J/psi(1S) -> p+ p+]cc"], ReFitPVs = True)
+        PPbar.Preambulo = self._Definitions()
+        PPbar.MotherCut = self._PPbarSelection() % self._config
+        PPbar.ReFitPVs = True
+            
+        PPbarSel=Selection("PPbar_Lb_for"+self._name,
+                         Algorithm=PPbar,
+                         RequiredSelections = [self._protonFilter()])
+         
+        return PPbarSel
+
+    ###### Lb->pMuNu High M_corr Opposite Sign ######
+    def _fakePPbar( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        PPbar = CombineParticles(DecayDescriptors = ["J/psi(1S) -> p+ p~-","[J/psi(1S) -> p+ p+]cc"], ReFitPVs = True)
+        PPbar.Preambulo = self._Definitions()
+        PPbar.MotherCut = self._fakePPbarSelection() % self._config
+        PPbar.ReFitPVs = True
+            
+        PPbarSel=Selection("fakePPbar_Lb_for"+self._name,
+                         Algorithm=PPbar,
+                         RequiredSelections = [self._fakeprotonFilter()])
+         
+        return PPbarSel
+
+    ###### Lb->pMuNu High M_corr Opposite Sign ######
+    def _Ppipi( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        Ppipi = CombineParticles(DecayDescriptors = ["[N(1440)+ -> p+ pi+ pi-]cc"], ReFitPVs = True)
+        Ppipi.Preambulo = self._Definitions()
+        Ppipi.MotherCut = self._NstarSelection() % self._config
+        Ppipi.ReFitPVs = True
+            
+        PpipiSel=Selection("Ppipi_Lb_for"+self._name,
+                         Algorithm=Ppipi,
+                         RequiredSelections = [self._protonFilter(),self._pionFilter()])
+         
+        return PpipiSel
+
+    def _fakePpipi( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        Ppipi = CombineParticles(DecayDescriptors = ["[N(1440)+ -> p+ pi+ pi-]cc"], ReFitPVs = True)
+        Ppipi.Preambulo = self._Definitions()
+        Ppipi.MotherCut = self._NstarSelection() % self._config
+        Ppipi.ReFitPVs = True
+            
+        PpipiSel=Selection("fakePpipi_Lb_for"+self._name,
+                         Algorithm=Ppipi,
+                         RequiredSelections = [self._fakeprotonFilter(),self._pionFilter()])
+         
+        return PpipiSel
+
+    def _daughters( self ):
+        if self._daughtersSel is not None:
+            return self._daughtersSel
+        from PhysSelPython.Wrappers import MergedSelection
+        _sel_Daughters = MergedSelection("Selection_mergeddaughters"+self._name,
+                                         RequiredSelections = [self._protonFilter(),self._PPbar(),self._Ppipi()])
+        self._daughtersSel=_sel_Daughters
+        return _sel_Daughters
+
+    def _fakedaughters( self ):
+        if self._fakedaughtersSel is not None:
+            return self._fakedaughtersSel
+        from PhysSelPython.Wrappers import MergedSelection
+        _sel_Daughters = MergedSelection("Selection_fakemergeddaughters"+self._name,
+                                         RequiredSelections = [self._fakeprotonFilter(),self._fakePPbar(),self._fakePpipi()])
+        self._fakedaughtersSel=_sel_Daughters
+        return _sel_Daughters
+
+    ###### Lb->pMuNu High M_corr Opposite Sign ######
+    def _bhad2PMuX_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection,MergedSelection
+        
+        _pMu = CombineParticles(DecayDescriptors = self._config["DECAYS"], ReFitPVs = True)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = self._LbMotherSelection() % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("pMu_Lb_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._muonFilter(), self._daughters()])
+         
+        _LbSel = tosSelection(_pMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _LbSel
+
+
+
+    ###### Lb->pMuNu Low q^2 SS Sign ######
+    def _bhad2PMuXSS_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMuSS = CombineParticles(DecayDescriptors = self._config["SSDECAYS"], ReFitPVs = True)
+        _pMuSS.Preambulo = self._Definitions() 
+        _pMuSS.CombinationCut = "(AM>%(pMuMassLower)s*MeV)"  % self._config
+        _pMuSS.MotherCut = self._LbMotherSelection() % self._config
+        _pMuSS.ReFitPVs = True
+            
+        _pMuSSSel=Selection("pMuSS_Lb_for"+self._name,
+                         Algorithm=_pMuSS,
+                         RequiredSelections = [self._muonFilter(), self._daughters()])
+        _pMuSSSel = tosSelection(_pMuSSSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _pMuSSSel
+      
+
+    
+    ###### Lb->pMuNu Fake Proton ######
+    def _bhad2PMuX_fakep_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMu = CombineParticles(DecayDescriptors = self._config["DECAYS"], ReFitPVs = True)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = self._LbMotherSelection() % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("pMu_fakep_Lb_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._muonFilter(), self._fakedaughters()])
+         
+        _LbSel = tosSelection(_pMuSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _LbSel
+
+    ###### Lb->pMuNuSS Fake Proton ######
+    def _bhad2PMuXSS_fakep_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMuSS = CombineParticles(DecayDescriptors = self._config["SSDECAYS"], ReFitPVs = True)
+        _pMuSS.Preambulo = self._Definitions()
+        _pMuSS.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMuSS.MotherCut = self._LbMotherSelection() % self._config
+        _pMuSS.ReFitPVs = True
+            
+        _pMuSSSel=Selection("pMuSS_fakep_Lb_for"+self._name,
+                         Algorithm=_pMuSS,
+                         RequiredSelections = [self._muonFilter(), self._fakedaughters()])
+         
+        _LbSSSel = tosSelection(_pMuSSSel,{'Hlt2.*TopoMu2Body.*Decision%TOS':0,'Hlt2.*SingleMuon.*Decision%TOS':0})
+        return _LbSSSel
+
+
+
+    ###### Lb->pMuNu Fake Muon ######
+    def _bhad2PMuX_fakemu_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMu = CombineParticles(DecayDescriptors = self._config["DECAYS"], ReFitPVs = True)
+        _pMu.Preambulo = self._Definitions()
+        _pMu.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMu.MotherCut = self._LbMotherSelection() % self._config
+        _pMu.ReFitPVs = True
+            
+        _pMuSel=Selection("pMu_fakemu_Lb_for"+self._name,
+                         Algorithm=_pMu,
+                         RequiredSelections = [self._fakemuonFilter(), self._daughters()])
+         
+        _LbSel = tosSelection(_pMuSel,{'Hlt2.*Topo2Body.*Decision%TOS':0})
+        return _LbSel
+
+    ###### Lb->pMuNuSS Fake Muon ######
+    def _bhad2PMuXSS_fakemu_Lb( self ):
+        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
+        from PhysSelPython.Wrappers import Selection
+        
+        _pMuSS = CombineParticles(DecayDescriptors = self._config["SSDECAYS"], ReFitPVs = True)
+        _pMuSS.Preambulo = self._Definitions()
+        _pMuSS.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config
+        _pMuSS.MotherCut = self._LbMotherSelection() % self._config
+        _pMuSS.ReFitPVs = True
+            
+        _pMuSSSel=Selection("pMuSS_fakemu_Lb_for"+self._name,
+                         Algorithm=_pMuSS,
+                         RequiredSelections = [self._fakemuonFilter(), self._daughters()])
+         
+        _LbSSSel = tosSelection(_pMuSSSel,{'Hlt2.*Topo2Body.*Decision%TOS':0})
+        return _LbSSSel
\ No newline at end of file
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/__init__.py
new file mode 100644
index 000000000..869de0054
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/StrippingSL/__init__.py
@@ -0,0 +1,26 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+_selections = ('StrippingB23MuNu', 'StrippingB2Invis', 'StrippingB2XTauNu', 'StrippingBXX', 'StrippingBc2Bs', 'StrippingSemilepISR')
+
+for _sel in _selections :
+    try :
+        __import__( '%s.%s'  % ( __name__, _sel ) )
+    except Exception, x:
+        print '[WARNING] Submodule %s.%s raises the exception "%s" and will be skipped !' % ( __name__,_sel,x )
+
+from sys import modules as _modules
+_this = _modules[__name__]
+
+_strippingKeys = filter ( lambda x : x[:9]=='Stripping',
+                          locals().keys())
+
+_strippingModules = [getattr(_this, _k) for _k in _strippingKeys]
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/Utils.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/Utils.py
new file mode 100644
index 000000000..07b4e71d5
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/Utils.py
@@ -0,0 +1,412 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+'''
+Helpers for construction of Stripping Selections
+'''
+__author__ = "Juan Palacios juan.palacios@cern.ch"
+__date__ = "30/06/2010"
+
+__all__ = ('lineBuilder')
+
+import inspect
+from os import environ
+from pprint import *
+from Gaudi.Configuration import *
+
+from StrippingSettings.Utils import lineBuilderConfiguration
+from StrippingSettings.Utils import strippingConfiguration
+import StrippingSelections
+from StrippingSelections import buildersConf
+
+def checkConfig(reference_keys, configuration) :
+    # IMPORTANT: don't remove this function
+    # as it is needed to check the correctness of
+    # LineBuilder configurations
+    pass
+
+
+def lineBuilder(stripping, lineBuilderName, WGs = None) :
+    """
+    Create a line builder from a stripping version and a line builder
+    instance name.  The instance name must be registered in the database.
+    Usage:
+    lb = lineBuilder('Stripping13', 'B2XGamma')
+    print lb.lines()
+    """
+    from StrippingSelections import lineBuilders
+    if isinstance(stripping, basestring) :
+        _config = lineBuilderConfiguration(stripping, lineBuilderName)
+    else :
+        _config = stripping[lineBuilderName]
+
+    try:
+        _lb = lineBuilders(WGs)[_config['BUILDERTYPE']](lineBuilderName,_config['CONFIG'])
+    except Exception, x:
+        log.error("Unable to configure %s because of %s" %(_config['BUILDERTYPE'],str(x)))
+    else:
+        return _lb
+
+
+def streamNames(stripping) :
+    from SelPy.utils import flattenList, removeDuplicates
+    from StrippingSettings.Utils import strippingConfiguration
+    if isinstance(stripping, basestring) :
+        _db = strippingConfiguration( stripping )
+    else :
+        _db = stripping
+
+    streams =  [v['STREAMS'] for v in _db.values()]
+    return list(set(flattenList(streams)))
+
+def cloneLinesFromStream(stream, prefix = 'Clone' , prescale = 1.0):
+    """
+    Clone the lines belonging to a StrippingStream with a
+    global prescale and return them as a flat list
+    >>> stream = StrippingStream('Test')
+    >>> lines  = cloneLinesFromStream(stream,prefix='Clone',prescale=1.0)
+    """
+
+    clonedLines = []
+
+    for _line in stream.lines:
+        clonedLine = _line.clone( prefix + _line.name().lstrip('Stripping'),
+                                  prescale = _line.prescale()*prescale )
+        clonedLines.append( clonedLine )
+    return clonedLines
+
+
+def cloneStream( stream, newStreamName = 'Full', linePrefix = 'Full', prescale = 1.0 ):
+	"""
+	Clone the stream
+	"""
+	from StrippingConf.StrippingStream import StrippingStream
+	lines = cloneLinesFromStream( stream, linePrefix, prescale )
+	stream = StrippingStream( newStreamName )
+	stream.appendLines( lines )
+	return stream
+
+
+
+def addBuilderToStreamGrouping( streams, config, lb ):
+    """
+    Append lines from a line builder to a dictionary
+    mapping lines to stream names.
+    """
+    from StrippingUtils.Utils import lineFromName
+
+    for stream in config['STREAMS']:
+        if stream in streams:
+            if isinstance(config['STREAMS'],dict):
+                for linename in config['STREAMS'][stream]:
+                    line = lineFromName( lb,   linename )
+                    if line:
+                        streams[stream] += [ line ]
+                    else:
+                        raise Exception('The line you have requested does not exist '+linename + \
+                                        ", stream " + stream + ", builder " + config['BUILDERTYPE'])
+            elif isinstance(config['STREAMS'],list):
+                streams[stream] += [ line for line in lb.lines() ]
+            else:
+                raise Exception( 'Unsupported type, expected list' +
+                                 'or dict for line-to-STREAM mapping' )
+        else:
+            if isinstance(config['STREAMS'],dict):
+                for linename in config['STREAMS'][stream]:
+                    line = lineFromName( lb,   linename )
+                    if line:
+                        if stream not in streams:
+                            streams[stream] = [ line ]
+                        else:
+                            streams[stream] += [ line ]
+                    else:
+                        raise Exception('The line you have requested does not exist '+linename + \
+                                        ", stream " + stream + ", builder " + config['BUILDERTYPE'])
+            elif isinstance(config['STREAMS'],list):
+                streams[stream] = [ line for line in lb.lines() ]
+            else:
+                raise Exception( 'Unsupported type, expected list' +
+                                 'or dict for line-to-STREAM mapping' )
+    return
+
+
+def buildStream( stripping, streamName = '', WGs = None ):
+    """
+    Create a StrippingStream from the lineBuilder database
+    Usage:
+    >>> streamDimuon = strippingStream('Stripping13','Dimuon')
+    or:
+    >>> conf = strippingConfiguration('Stripping13')
+    >>> streamDimuon = strippingStream(conf,'Dimuon')
+
+    """
+
+    from StrippingConf.StrippingStream import StrippingStream
+    from StrippingSettings.Utils import strippingConfiguration
+    from StrippingSelections import lineBuilders
+    from StrippingUtils.Utils import lineFromName
+
+    stream = StrippingStream( streamName )
+
+    if isinstance(stripping, basestring) :
+        _db = strippingConfiguration( stripping )
+    else :
+        _db = stripping
+
+
+    for key in _db.keys():
+        _conf = _db[key]
+        if stream.name() in _conf['STREAMS']:
+            if WGs and not any( WG for WG in _conf['WGs'] if WG in WGs): continue
+            try:
+                _lb = lineBuilders()[_conf['BUILDERTYPE']](key,_conf['CONFIG'])
+            except Exception, x:
+                log.error("Unable to configure %s because of %s" %(_conf['BUILDERTYPE'], str(x)))
+            else:
+                if isinstance(_conf['STREAMS'],dict):
+                    for linename in _conf['STREAMS'][stream.name()]:
+                        line = lineFromName( _lb, linename )
+                        if line:
+                            stream.appendLines( [ line ] )
+                        else:
+                            raise Exception('The line you have requested does not exist '+linename)
+                elif isinstance(_conf['STREAMS'],list):
+                    stream.appendLines( _lb.lines() )
+                else:
+                    raise Exception( 'Unsupported type, expected list ' +
+                                     'or dict for line-to-STREAM mapping' )
+    return stream
+
+
+def buildStreams( stripping, WGs = None ):
+    """
+    Build and return a set of StrippingStreams for a given
+    stripping configuration.
+    Usage:
+
+    >>> streams = buildStreams('Stripping13')
+    >>> for s in streams :
+    ...   print s.name(), s.lines
+
+
+    It is also possible to use a configuration dictionary
+    directly:
+
+    >>> conf = strippingConfiguration('Stripping13')
+    >>> streams = buildStreams(conf)
+
+    To select only streams belonging to the RD or the
+    Gamma from trees WGs:
+
+    >>> streams = buildStreams('stripping13', WGs = ['RD','GammaFromTrees'] )
+    >>>
+
+    """
+    from StrippingConf.StrippingStream import StrippingStream
+    from StrippingSettings.Utils import strippingConfiguration
+    from StrippingSelections import lineBuilders
+
+    streams = {}
+
+    if isinstance(stripping, basestring) :
+        scdb = strippingConfiguration(stripping)
+    else :
+        scdb = stripping
+
+    builders = lineBuilders()
+    for k, v in scdb.iteritems() :
+        if 'STREAMS' in v.keys() and not WGs or 'WGs' in v.keys():
+            if not WGs or any( WG for WG in v['WGs'] if WG in WGs ):
+                try:
+                    lb = builders[v['BUILDERTYPE']](k,v['CONFIG'])
+                except Exception, x:
+                    log.error("Unable to configure %s because of %s" %(v['BUILDERTYPE'],str(x)))
+                else:
+                    addBuilderToStreamGrouping( streams, v, lb )
+        else:
+            raise Exception('Config',k,'missing either STREAM or WG data data.')
+
+    strippingStreams=[]
+    for stream in streams:
+        lines = [ line for line in streams[stream] ]
+        print ( 'Creating ' + stream + ' stream with '
+                + str( len(lines) ) + ' lines' )
+        strippingStreams.append( StrippingStream( stream, Lines = lines ) )
+    return strippingStreams
+
+def buildStreamsFromBuilder(conf, names ):
+    """
+    Build and return a set of StrippingStreams for a given line builder configuration
+    Usage:
+
+    >>> streams = buildStreamsFromBuilder(somelinebuilder, 'B2ppipiSigmacmm_Lcpi')
+    """
+    
+    from StrippingConf.StrippingStream import StrippingStream
+    from StrippingSettings.Utils import strippingConfiguration
+    from StrippingSelections import lineBuilders
+
+    streams = {}
+
+    if not isinstance(names, list):
+      names = [names]
+    
+    for name in names:
+      _conf = {}
+      if conf.has_key(name) :
+        _conf[name] = conf[name]
+      else:
+        log.error("The requested name %s is not present in the default_config of any LineBuilder" %name) 
+    
+      #_conf=lb.default_config
+      #if isinstance(stripping, basestring) :
+          #scdb = strippingConfiguration(stripping)
+      #else :
+          #scdb = stripping
+
+      for k, v in _conf.iteritems() :
+          if 'STREAMS' in v.keys():
+            
+              try:
+                  lb = lineBuilders()[v['BUILDERTYPE']](k,v['CONFIG'])
+              except Exception, x:
+                  log.error("Unable to configure %s because of %s" %(v['BUILDERTYPE'],str(x)))
+              else:
+                  addBuilderToStreamGrouping( streams, v, lb )
+          else:
+              raise Exception('Config',k,'missing either STREAM.')
+    ##
+
+    strippingStreams=[]
+    for stream in streams:
+        lines = [ line for line in streams[stream] ]
+        print ( 'Creating ' + stream + ' stream with '
+                + str( len(lines) ) + ' lines' )
+        strippingStreams.append( StrippingStream( stream, Lines = lines ) )
+    return strippingStreams
+
+## def buildStream(stripping, streamName = ''):
+##     """
+##     Create a StrippingStream from the lineBuilder database
+##     Usage:
+##     >>> streamDimuon = strippingStream('Stripping13','Dimuon')
+##     or:
+##     >>> conf = strippingConfiguration('Stripping13')
+##     >>> streamDimuon = strippingStream(conf,'Dimuon')
+
+##     """
+
+##     from StrippingConf.StrippingStream import StrippingStream
+##     from StrippingSettings.Utils import strippingConfiguration
+##     from StrippingSelections import lineBuilders
+
+##     stream = StrippingStream( streamName )
+
+##     if isinstance(stripping, basestring) :
+##         _db = strippingConfiguration( stripping )
+##     else :
+##         _db = stripping
+
+##     for key in _db.keys():
+##         _conf = _db[key]
+##         if stream.name() in _conf['STREAMS']:
+##             _lb = lineBuilders()[_conf['BUILDERTYPE']](key,_conf['CONFIG'])
+##             stream.appendLines( _lb.lines() )
+##     return stream
+
+## def buildStreams(stripping) :
+##     """
+##     Build and return a set of StrippingStreams for a given stripping
+##     configuration.
+##     Usage:
+
+##     >>> streams = buildStreams('Stripping13')
+##     >>> for s in streams :
+##     ...   print s.name(), s.lines
+
+
+##     It is also possible to use a configuration dictionary directly:
+
+##     >>> conf = strippingConfiguration('Stripping13')
+##     >>> streams = buildStreams(conf)
+
+##     """
+##     from StrippingConf.StrippingStream import StrippingStream
+##     streams = {}
+##     if isinstance(stripping, basestring) :
+##         scdb = strippingConfiguration(stripping)
+##     else :
+##         scdb = stripping
+
+##     for k, v in scdb.iteritems() :
+##         if 'STREAMS' in v.keys() :
+##             for stream in v['STREAMS'] :
+##                 if stream in streams.keys() :
+##                     streams[stream] += [k]
+##                 else :
+##                     streams[stream] = [k]
+##         else :
+##             print 'ERROR: config',k,'had no STREAMS data. Ignore!!!'
+##     builderMap = {}
+##     for builder in scdb.keys() :
+##         builderMap[builder] = lineBuilder(scdb, builder)
+
+##     strippingStreams=[]
+##     for stream, builderNames in streams.iteritems() :
+##         lines=[]
+##         for b in builderNames :
+##             lines +=  [line for line in builderMap[b].lines()]
+##         print 'Creating steam', stream, 'with lines', lines
+##         strippingStreams.append(StrippingStream(stream, Lines = lines))
+##     return strippingStreams
+
+def create_settings_archive(version) :
+    destdir = os.path.join(os.environ['STRIPPINGSETTINGSROOT'], 'python', 'StrippingSettings', version)
+    if os.path.exists(destdir) :
+        subprocess.call(['rm', '-r', destdir])
+    os.makedirs(destdir)
+    builders = []
+    for wg in StrippingSelections.WGs :
+        wgmodule = __import__('StrippingSelections.Stripping' + wg, fromlist = 'activeBuilders')
+        if not version in wgmodule.activeBuilders :
+            continue
+        builders += wgmodule.activeBuilders[version]
+    config = dict((name, conf) for name, conf in buildersConf().iteritems() if name in builders)
+    diff = set(builders).difference(set(config.keys()))
+    if diff :
+        raise Exception('Requested builders not found: {0!r}'.format(diff))
+    wgs = set()
+    for name, conf in config.iteritems() :
+        for wg in conf['WGs'] :
+            wgs.add(wg)
+    fullconfig = dict(config)
+    fnames = []
+    for wg in wgs :
+        wgconfs = dict((name, conf) for name, conf in config.iteritems() if wg in conf['WGs'])
+        if not wgconfs :
+            continue
+        fname = os.path.join(destdir, 'LineConfigDictionaries_' + wg + '.py')
+        fnames.append(fname[:-3])
+        with open(fname, 'w') as fwg :
+            for name, conf in wgconfs.iteritems() :
+                fwg.write(format_config(name, conf))
+                # In case a builder belongs to more than one WG it's only written to the first one.
+                del config[name]
+    with open(os.path.join(destdir, '__init__.py'), 'w') as finit :
+        finit.write('__all__ = ' + pformat(fnames).replace('\n', (' ' * len('__all__ = (')) + '\n'))
+    dbname = dbase(version)
+    if os.path.exists(dbname) :
+        subprocess.call(['rm', dbname])
+    db = shelve.open(dbname)
+    for key, conf in fullconfig.iteritems() :
+        conf = deepcopy(conf)
+        conf.pop('NAME', None)
+        db[key] = conf
+    db.close()
diff --git a/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/__init__.py
new file mode 100644
index 000000000..1c1088d90
--- /dev/null
+++ b/Phys/StrippingArchive/python/StrippingArchive/Stripping28r2p1/__init__.py
@@ -0,0 +1,86 @@
+###############################################################################
+# (c) Copyright 2021 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.                                       #
+###############################################################################
+
+"""
+Module with stripping selection line builder modules.
+All line builders available via function lineBuilders().
+"""
+
+import os
+
+## Define the version of the archive
+strippingVersion = 'Stripping28r2p1'
+_strippingModules = {}
+WGs = []
+## Note that with the new structure you have to import the single WG modules
+wgDirs = os.listdir(os.environ['STRIPPINGARCHIVEROOT']+'/python/StrippingArchive/'+strippingVersion)
+for dirs in [ dir for dir in wgDirs if 'Stripping' in dir ]:
+  WGs.append(dirs[9:])
+
+for WG in WGs:
+  _tmpModule = __import__('StrippingArchive.'+strippingVersion+'.Stripping'+WG,fromlist=['_strippingModules'])
+  _strippingModules[WG] = _tmpModule._strippingModules
+
+from StrippingUtils.Utils import getLineBuildersFromModule as _getter
+from StrippingUtils.Utils import getBuilderConfFromModule as _getcon
+
+def lineBuilders(WGs = None) :
+    """
+    Return all the line builders in the module for a
+    requested list of WG.
+    """
+    _lineBuilders = {}
+    if not WGs:
+      for wg in _strippingModules.keys():
+        for _sm in _strippingModules[wg]:
+          _lineBuilders.update(_getter(_sm))
+    elif any( WG for WG in _strippingModules.keys() if WG in WGs ):
+      for wg in WGs:
+        for _sm in _strippingModules[wg]:
+          _lineBuilders.update(_getter(_sm))
+    else:
+      raise Exception( 'The requested WG does not exists' )
+
+    return dict(_lineBuilders)
+
+
+def buildersConf(WGs = None) :
+    """
+    Return all the line builders in the module for a
+    requested list of WG.
+    """
+    _buildersConf = {}
+    if not WGs:
+      for wg in _strippingModules.keys():
+        for _sm in _strippingModules[wg]:
+          duplicates=list(set(_buildersConf.keys()) & set(_getcon(_sm).keys()) )
+          if not duplicates:
+            _buildersConf.update(_getcon(_sm))
+          else:
+            print "The following names have already been used:"
+            print ', '.join(duplicates)
+            print "Please change the name of your configuration"
+            sys.exit(1)
+    elif any( WG for WG in _strippingModules.keys() if WG in WGs ):
+      for wg in WGs:
+        for _sm in _strippingModules[wg]:
+          duplicates=list(set(_buildersConf.keys()) & set(_getcon(_sm).keys()) )
+          if not duplicates:
+            _buildersConf.update(_getcon(_sm))
+          else:
+            print "The following names have already been used:"
+            print ', '.join(duplicates)
+            print "Please change the name of your configuration"
+            sys.exit(1)
+    else:
+      raise Exception( 'The requested WG does not exists' )
+
+    return dict(_buildersConf)
diff --git a/Phys/StrippingArchive/python/StrippingArchive/__init__.py b/Phys/StrippingArchive/python/StrippingArchive/__init__.py
index 4b6596b90..82f8e7717 100644
--- a/Phys/StrippingArchive/python/StrippingArchive/__init__.py
+++ b/Phys/StrippingArchive/python/StrippingArchive/__init__.py
@@ -21,6 +21,7 @@ _known_strippings = ['Stripping24r2',
                      'Stripping25',
                      'Stripping27',
                      'Stripping28r2',
+                     'Stripping28r2p1',
                      'Stripping30r2',
                      'Stripping30r3',
                      'Stripping31r1',
@@ -46,6 +47,7 @@ _stripping_help = {'Stripping24r2': 'Full restripping of 2015 pp data',
                    'Stripping25': 'Stripping of 2015 pAr modified to run on 2018-patches',
                    'Stripping27': 'Stripping of 2016 pHe modified to run on 2018-patches',
                    'Stripping28r2': 'Full restripping of 2016 pp data',
+                   'Stripping28r2p1': 'Incremental re-stripping of 2016 pp',
                    'Stripping30r2': 'Full restripping of 2016 Pbp data',
                    'Stripping30r3': 'Full restripping of 2016 pPb data',
                    'Stripping31r1': 'Stripping of 2015 PbAr data',
diff --git a/Phys/StrippingArchive/tests/refs/instantiate-all-strip.ref b/Phys/StrippingArchive/tests/refs/instantiate-all-strip.ref
index 89f75ab35..acc680d9a 100644
--- a/Phys/StrippingArchive/tests/refs/instantiate-all-strip.ref
+++ b/Phys/StrippingArchive/tests/refs/instantiate-all-strip.ref
@@ -6,6 +6,7 @@ Hello Im S25 and Im now using PatLongLivedTracking instead of PatDownStream
 Trying to import module StrippingArchive.Stripping27
 I am now using PatLongLivedTracking instead of PatDownStream
 Trying to import module StrippingArchive.Stripping28r2
+Trying to import module StrippingArchive.Stripping28r2p1
 Trying to import module StrippingArchive.Stripping30r2
 Trying to import module StrippingArchive.Stripping30r3
 Trying to import module StrippingArchive.Stripping31r1
@@ -17,7 +18,7 @@ Trying to import module StrippingArchive.Stripping34r0p2
 Trying to import module StrippingArchive.Stripping35r2
 Trying to import module StrippingArchive.Stripping35r3
 looping over:
-['Stripping24r2', 'Stripping25', 'Stripping27', 'Stripping28r2', 'Stripping30r2', 'Stripping30r3', 'Stripping31r1', 'Stripping31r2', 'Stripping33r2', 'Stripping34', 'Stripping34r0p1', 'Stripping34r0p2', 'Stripping35r2', 'Stripping35r3']
+['Stripping24r2', 'Stripping25', 'Stripping27', 'Stripping28r2', 'Stripping28r2p1', 'Stripping30r2', 'Stripping30r3', 'Stripping31r1', 'Stripping31r2', 'Stripping33r2', 'Stripping34', 'Stripping34r0p1', 'Stripping34r0p2', 'Stripping35r2', 'Stripping35r3']
 =============================================
 Stripping24r2 :
 =============================================
@@ -151,6 +152,68 @@ Creating LowMult stream with 37 lines
 # WARNING: Line StrippingLowMultTMP1Line has prescale <= 0, it will be removed from stream LowMult
 # WARNING: Line StrippingLowMultTMP2Line has prescale <= 0, it will be removed from stream LowMult
 =============================================
+Stripping28r2p1 :
+=============================================
+Requested Stripping28r2p1
+Trying to import module StrippingArchive.Stripping28r2p1
+Creating Bhadron stream with 139 lines
+# WARNING: Line StrippingB2KstTauTau_TauTau_Line has prescale <= 0, it will be removed from stream Bhadron
+# WARNING: Line StrippingB2KstTauTau_TauMu_Line has prescale <= 0, it will be removed from stream Bhadron
+# WARNING: Line StrippingB2KstTauTau_MuMu_Line has prescale <= 0, it will be removed from stream Bhadron
+# WARNING: Line StrippingB2KstTauTau_TauTau_SameSign_Line has prescale <= 0, it will be removed from stream Bhadron
+# WARNING: Line StrippingB2KstTauTau_TauMu_SameSign_Line has prescale <= 0, it will be removed from stream Bhadron
+# WARNING: Line StrippingB2KstTauTau_MuMu_SameSign_Line has prescale <= 0, it will be removed from stream Bhadron
+# WARNING: Line StrippingB2KstTauTau_DDSL_Line has prescale <= 0, it will be removed from stream Bhadron
+Creating Semileptonic stream with 36 lines
+Creating BhadronCompleteEvent stream with 117 lines
+# WARNING: Line StrippingLLPV02mumuSingleLine has prescale <= 0, it will be removed from stream BhadronCompleteEvent
+# WARNING: Line StrippingBeauty2XGammaExclTDCPVBs2PhiGammaLine has prescale <= 0, it will be removed from stream BhadronCompleteEvent
+# WARNING: Line StrippingBeauty2XGammaExclTDCPVBd2KstGammaLine has prescale <= 0, it will be removed from stream BhadronCompleteEvent
+# WARNING: Line StrippingBeauty2XGammaExclTDCPVBd2KspipiGammaLine has prescale <= 0, it will be removed from stream BhadronCompleteEvent
+# WARNING: Line StrippingBeauty2XGammaExclTDCPVBs2KsKpiGammaLine has prescale <= 0, it will be removed from stream BhadronCompleteEvent
+Creating Leptonic stream with 193 lines
+# WARNING: Line StrippingLFVB2eMuLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVJPsi2eMuLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVPromptJPsi2eMuLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVJPsi2MuMuControlLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVJPsi2eeControlLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVPromptJPsi2MuMuControlLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVPromptJPsi2eeControlLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVPhi2eMuLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVPromptPhi2eMuLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVPhi2MuMuControlLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVPhi2eeControlLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVPromptPhi2MuMuControlLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVPromptPhi2eeControlLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVB2eeLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVB2heMuLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVBu2KJPsieeLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVB2hTauMuLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVD2piphi2eeLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVD2piphi2eMuLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVD2piphi2MuMuLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVD2piphi2eePromptLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVD2piphi2eMuPromptLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingLFVD2piphi2MuMuPromptLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingBu2LLK_eeLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingBu2LLK_eeLine_extra has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingBu2LLK_eeLine2 has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingBu2LLK_eeLine2_extra has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingBu2LLK_mmLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingBu2LLK_mmLine_extra has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingBu2LLK_meLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingBu2LLK_mtLine has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingBu2LLK_eeLine3 has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingBu2LLK_eeLine4 has prescale <= 0, it will be removed from stream Leptonic
+# WARNING: Line StrippingTau23MuDs23PiLine has prescale <= 0, it will be removed from stream Leptonic
+Creating CharmCompleteEvent stream with 67 lines
+Creating Charm stream with 109 lines
+Creating Dimuon stream with 83 lines
+# WARNING: Line StrippingB2MuMuMuMuB24MuLine has prescale <= 0, it will be removed from stream Dimuon
+# WARNING: Line StrippingB2MuMuMuMuB23MuPiLine has prescale <= 0, it will be removed from stream Dimuon
+# WARNING: Line StrippingB2MuMuMuMuD24MuLine has prescale <= 0, it will be removed from stream Dimuon
+# WARNING: Line StrippingB2MuMuMuMuB2DetachedDimuonsLine has prescale <= 0, it will be removed from stream Dimuon
+=============================================
 Stripping30r2 :
 =============================================
 Requested Stripping30r2
diff --git a/Phys/StrippingSettings/dbase/stripping28r2p1 b/Phys/StrippingSettings/dbase/stripping28r2p1
new file mode 100644
index 0000000000000000000000000000000000000000..ab8407e887993c063be9891cb1c8d966c8c25d00
GIT binary patch
literal 307200
zcmeFa3wUJLRVJ#Y+ji4-;y?lpk71fX(rPEIRGlhyOCOG7RhQIKRO+sDsoRPjT&|YN
zr5fu|s3bo!@ZlLAG0De_FL1dqz+m3yIi3qMn8%$l_uhfrnR_o8KEgGG0cUuHw;5h0
z5a#~>T5IpK&#7}tQg_F8GE&lQ^*MX5z4qE`uf1M-osp4|kwf^ypVnvHIP&TI<u&+o
zl)sFOyhHz!`1{}eqxU^}5>Gz-=fCpjKlM6&brb%>KZo_7^7nuK`qldgn}1%5KjZTB
z;I9J;98lnZ0tXa0puhnI4k&OyfddL0P~d<92NXD<zySqb4hlFM-HrX(BVTZ2<W+xp
z>+j$Cky}4>>(Af%!JB{X=5ILqPmexybnWP0-SDe7{Np2QNA5rJ?j!Xh)gu!}Za?w`
zN49TRy<z2sr5kED+;zkF4d3}`4${GY4=8X=6gV`x(kmWooM<dwoSs@}oH*8tj*YJM
zN_cd3wY9a52jyd}KK^y#{LI`r{B!&mx}3)Qh0Trb_U0BIojEpFC>%qhYJa=6b$R=d
zv#Z_c{L1D7csFruu2|x``euK-zua1D<Kg77nIfMx);1rmckA1DR4m}xxI!uDlOmp+
zHo%3MDuJ?LbZo9XDWetU>h59b*j!0Fx7W5?3(bY@2HTbaLZ8>S+HUmXxD8)z?Q|Bm
z9&|8H1F)ZkqHyNeOcWUkXj~`E2|O#<GaIb+2w!kk<KywXV$e~+fj--4-o3TC(OGEq
z`{+Y&-Yovy`PuN|EnQjMthLs!thDCWm-wcPKfiGU-ssci=yG9}&u_z@-<sp|nalk5
z=i|?h62g3cb#rSws<nIDn;U(%wtnfbv@5c-y+w=-+6cwMg>jTwSXh@iojx{Gii&4A
zr+|Q<N@1)ZD|oT>@bp9Njcrb5f}Ar+&e+)$>KBf+z&Ne7O;V@Ge_ZS?uks%e|8cpk
zZ%X{f;#O<<!8W-Gi-v#Cp5?FO!h66*mlNnjlV^YqdB<}s@Wa4Z7cgLV-Nv4jo_C)k
zVjw>nMC9{IYh&e|d;|;tq;hGlR-L}M_^$diACm1aY;;@o)y?hA`qt*k&hmD5bHh!2
z<?QALc{&1{j2(JMuiwpU=tv(U>9<v7wY35cIJ>#tTWfE(g?fOQx68mp&4pIDqd<M#
zP+LH9gPaabube;M0~GLPVXO%541Z*yX4^Hw@jC|08VRq~F+l->?zRbqEv&-=A7dwu
z10vbLJ#Ln-Y_2@Yml0mt9<i6z3umX?rYdo_1RayoK{lwowt1dgg_z)c2pQa17%PWU
z!S9g=*4?Ofw_0onz9@`MPEHa@|8rWnHjp~t6BRpxW_KeNDIgn&ChY?;;iMGMafHTT
zn9WQHgRr$A-QDm+1&hsyX!1nWmFcn{=!9L9KoMZDl-Ya;B%>aFx&hNQP8dT&2!o+1
zh396tm!mUa=dnY+52ZqcKmYt@NCgq(?UhPv>(R}PMr{ahO3S@+W+*otW#`w)Wc6Nq
z%eb+GMdbX*VV9i<Ct;N-D)Z9*a`hfABaZ;KCKPZrCkED=voj!zLxiT8974zr26#|U
z7NF63#5j<^Ap&hH4IU1*wj%PuU))r|lG~Q!!ji3WHl32gvj;?!o-jJ?s_ZQg<BWn9
zA{k4Q%Y>zkdaXx-O+_{{`f-vAelL>8B9OzAyuKK}lbsk$A|X^D(q`oF6C@ft>tRpq
zL(<rz5)8-#!d}^`3CBMOx_~D!1s;{*Pq@IwCK0yZnUJ`iU=cY*_OV+HFX?cqXHy;g
zqno5u<R&Ra*d$JsDdDIY*lndU&xL-}-;R3oy)OS}TdoA&9XphKHDvefQ?geJ&E84}
zgyQB=>V{j2GKmz&Vct}Ntji$?lBnRW@bT<i^zhbp{WAHG+ee5s1^ow_6`z4qbln23
z2a}*JK(pOyw<9MqxZ{jT@%cUxYgVfS0KU+@!xb2m&a%4~TK{OXSzlEAD2zQrS6a)f
zcw?}1qB68}vA5O_6NYe9Cgb=(Ls8(2^@a4BayWC3U?l5Ot%>%^qskc7rp8TidP19B
zY=7BKcdNY;sx3J6DNM-)i(B1JN0bnd7)ppKG7z-*hbb}?wO)|{>*61#$beh%k64ib
ziwd_j+iUIRZJhbG-e62WQ>Bkm0IcdL=QNHYmH<o(PR}|xVx^3VG59!pN5suaY$m5_
z=C(BQD(jT6jz)IK1bc=REE_4wmu}5VSUZRT(w$n7n<sZ~uy8R8mdUE|QUj|pXkriq
zi|Xcb%T$Omg_^9XGA3JtBnBDJ5=>SG6$C@zqH>@thh>?E<wde|nP+8M^(#|*th8G@
z+mA*>0JAe8KwASsAn}UF>lfh9gRjQ%T8Wkxb{2N{>@)G_7w`hlYPF?Gb+OUF6N%3|
zlYIvNe%;6q93FYq-`x7gxBkwpUvbNq-SR&jegDy~Jo;rv+ehy{`dv5v&o_SEjqkZ}
z<Hq}Lym({f#veHRmK%@X__`a9-uUqw{_KX|zoB&aiw@s*_@={aBi}yq#7G?fmvR2b
zH0I_+PQLucoE*!_sPhRcPmX1IQ7u&Jm)#LB`x;v7<iPm|o4A{V0It?Oz-h+k<2bBq
z5&6|ZQn7}}n$sP|4r0vmJdT`&P5bk1IZt@{irn=Z26BuCX8}6`GOtTj93pFQ&&bhw
zezQJT6}$iL?)GZ65M6A{1Nkdk?R9sGLd6<8wBg&yJMNa#`17OOK}*X$Z}~Q6dznY9
z8m`{HD-*?WVA$B+>Ox80=q$E&qSC^S{ij)NEY`XkbT)|a9@4B?THo1KDW=>I5_n_!
zQ^F5&uyx=w_!QbYhyUsEBNc3``*0GO*QnZFZavzsE*$>Vj~#wHUR^@+*`Zpk9?gm$
z!h4A_TowB=2dCk7gHVBig}nlgpfi}fl}+PErDGv(I2kuw*ioZueFp%j%;p#m=e%KP
z>f*e@Qx_4ugQ8e0ESzgn060yGFySPWqXHv|ZCO4x=RrW1VG{~eQz_kqoa@Qp?s(}7
z!*5Q6uOBOPHqh}Yw!La0@D5VT423Gri$S4^vmy{`z#*b?ajvz#-g1rrk*A3_hrj8z
zBSoz358a5h6=7VBmZT5mEYk*`Jc2is_I9grb<$Ox2i;|O9GALRA|M4pn<-$^EvMs#
zqB(m>oN727f)uqnuO+0sjVuaxUbAuE49o<@Jg*(*GHvkGNtxBK*IVCN-)S^lLvdhc
zH7xaToW$+Kx0%(hO4o6sskl9}n$jXov=rMUuVtz&PCp#%>JjcPlf`3iX%+~sE(yH3
z*>Aha(w7P#{^$c2L(>HNnza*}h17NOoOU8`)My1Fu)F5OSw=<xUxmgm-4U`?>x*Z1
zw%HgP)07vL5_r4_(^cNVQps_^IMA_Ik6MuGi(M6fltnUIj)F}KZ<7d+s=c2Q#|!Li
zzK6KdaDscw-VP7EnTyO>r9MMCkDxkH$|PV?S5t`4p)jvNPQcou@<nS@tQDARgF*tf
z8LSoY=gF3Inif3cFjeB`nR{KMJB{{wcTM61!WDVS&C(8ZQOtsdAJtTvc<Y#RwflfY
zcg)>n6P~NiqcsdaaV9NZJU4rxu~@%&p@OF-)2Z=>KLp8PbRizr7y!({q8Xa>rK)fS
zYni;3X9Niy+WDUd1BB>rZ?)hPt8E%22>Hk?%Vdj7J@}spgREs9i>00F+{GzA6rKW_
zTsr?F(tc^@G8eCUVTSEM7;zy2wj3aI+Zf`Nu$?2x(hd$pbf29&H;exCVOZG9Q;@Dx
z+7d#-r5)16;fmcg7dg6!TYB-LaT2zZVsdW!Y;&Vgug-QQD#NX0Ov(8Rmf$#=0<xNw
zBtDq8;iDrvI?BEQA-P(HDd$V;A%V}r-1&Hi(*Ynf<9c~a0mR&{Tv_E9`b0w508MuY
zP%$iRUDO$pxh@<d9G(6U9i8(Isfax_7s2WZx7}&kc4v-tbSESOL-224zeRH!4|V%f
zYipE?eYfY-J)rNXV^wk5zE@7$XnOX14gV7Rp9e92@CN_>-CIX)$}-l~$}vYGXfSBz
zR0>hGFh5_7W@pVOAzGS=>ZGm1wv5Qm<8SnWSyqka8})8scD7c#*zRwxJ%q4;dNx8R
zsdL&vxx2AXIH^<I;MBYO1d}@DJ(zvtlhy;=#Io>NXm52giIdh59FS~m^1-Au2tTX+
zA(PTCJe2)nlTtq1qy~|xR);VSL}^0Na$vHs84f6$k+WE5IGk)&u6Os3Q8qJYY^`cF
zf6=p9c|IGPTrfB^vdElGoqQ+~k&ku2p}aF>QaF>cuvyqSzca`_L*)*Rusldv6dDdI
zo1^ov%BNB`OA}5uPWh0sc{&@Tp<JyYh=G;M!)Z9IY`)IJDt~s_teuZjE+nW22`=Dy
zM~5hnyxCdk3mGRC{ga`EC#T)6ody}VP{m%%f<MTa(iHyA`BJ@`)g#G&wJTAzs%bpc
z%n2mfjLi$xf^{fh<`@ZoWp+*SRc2QrncX=lAk&?tpUyG6dy;$Dy}vzlo=G-IbwKCV
zRz6J;HVRkSI`_AS&=ql|p<Q+xG07qWBZl3>-!m8jF{?BtMyOgXtN9@RWH3Z_*FEqO
z7dE@|aBd11BD?z_KY518?l6RdYPH>Hn#oO$Au`8903^K(KrrsI%ZTGc`6-F;ZlDHv
ztJ)LAK1axn4{%UzdA>1UtJRjHIz(g!7mW{ak#vD5%I}io9@r4I<wm!&-dgVU=G`xN
z2L8#1kz^u7LzkDj=z+fk(;+>R{DatPce!_^wH5cxnq`uQfU@s3ykC-i;(j2eLp5W#
z(@7Shl|>Yt6q0i)t6P$FlHI^LJl?XpCE0}C`rC=|%(%<yo8*{uUtw1{Dzo|~Sts4M
z%AlY0&6n4w2UsbAdOZ9P5NS@T77}ykshEX)nvKG47&ot5ijgqC)M%7{S>vTRDeg#{
zpZWi^`{@HfI<MLP$nzCUazG*@Dil<tzaTU3`7CD=X9oE!?3h3MGlQHKcEpP3YCC5J
z87=HObe>5*qyHIu4`<yxhs&h)nIvCXm#WInjMX`lWTLoz{?0*?aY%i15uq{^t0eQJ
zx@7asnIzv_SZ{Y)I)71lNeBqcY${A78AQf&DkD{2C3+?SCz33Z(={9Ai6oZ{^i?*=
z9yZA(IbCyx9b^+6We}P9XURk+o6v|DBHSmEyh4qyfKxe_^Cyyw!uIGO!hA@lB&#Gk
zWec>4B%`2*KY`~nIDRt88$ok&MplO;M_7lu8$#X85t3|>=#V!?a`~-`uqxGp%u$l7
zp6Ze}PIBFYPQ&Iiu<j%<|EHbu#u{9HW0!ulnt3!$4z9iHQLAP57+8C780<OlWZoc5
zjtk`%Xb|_w8K#IE9TIBFzMxP<<~<@)Max+C!N6hxPHJ2tDli+zMcaAnqF8`WoiENX
zmUZcTv+}NHb$Vv%QcVIS1;pCy4hh~}<o%0cL4xE(_-Pv_#%|{mdRrNLgsfO@E-g3b
zr!JhA=W>^&i1-f%MF^n@&%Zo})BluY88G%#Z!SzN$>aR11R9n=G{?6^2t-0J=xsnb
z1EvMszR;FTTO@J=rv(jkR4@B>jCV+YWYIm6fIp%bt|#I;@pP^<>vK9C_|QlyIKVnZ
zI8pN=s5(=fl7vVR!axT_7{4HVQ6z5oTjNa~=Giw+ApYeM&|o7JYtjX2Vlpl#Sc%S7
zkh178M`R~2?UYGuh?DuI7%Wa!uU}TWIC@H0RF=fW!~7eBMzPi)B{PwAT9Q=8tX_vO
zB0gx)xU_&YVp|W1jxsXj+X#4IRa=}}nD)&WB}Ed+?LA?~l3ZirNV=*L)G42d*QSI}
z4u(Sf>^zd4HIbzVpMy&hSwK!1!Xz6T?KJ@i-vT!T@>9|4a&5j*Xx3_^DolM+6{)CT
z5<ec2Um7RMr_YQztdWw6j%=V)M`CK@#CQ}m5H`cKaB~77Lx(srQs)o>#wyF=dMYrt
z4*)C6QAHLPwkpvWkH8g-)15-tY-}P7y$Y)^$=+74!^?6KkH&9)ajN$e-Ow;W8z)W`
z$Hs48=heU>>`S1bYldWDH#6RX!{f4NM+sPyn`|w{1$|io#@l^Az1mef+nl*@vAHx?
z(Mw>sSjKtqYMDgiizP=gm||RFht6s2F3c75QLbX>K8hQY5NzVWlsy>kyWmZE+`r)*
zf;Xl3&3N)n6u&v0d{c_Y;RaP`3sVhT1)Muyy>K@Pd72T%m=#Zh6+1<@&<<a4fN~0K
z0|#d+u`{6iLsB6i>nIAH-c2|1Xh2)n?z+mtWlC5-hcj;8=<Q^$6IM{axgOA}A!qW0
z6_$bV*P#MRSBpys;p#C~9uVgVDRV|wADS{!^`>i!Q>0w&!i5I*xl#j)aN`8R*$x7<
z+mH*Y3rGg7&pH-{{@OS(5jTc-Nie%>ZLmoP0t^QC<8ng>To2U|pkyV%)E*nmCtk`<
z(XSmq&N2m{IH5CyiifvF5>-~D=g%K#b3jq{l<~F#WOUnbcSCbwCdmZz4LM~eW%CRE
z_1QU&Hp#{3F@!^T_JTa&9PMDLPF*@TyEuKZAun{HCuN~2oOo-%&1+KT1qlSCxn#+i
zU8-w7p@7l(O>%z05#_rEr<EOLzztHYN-4%G2$)n<AYravih)dAciscB2}Ha}h{v3~
z(iTFhQw${2c-R<hLW;H5THEcFxs3-l7dJQM7>KC<FtbmH6+!92VbI#@wyvzTaZJG6
z7yF-fKYakm&@=lVT_hDNf+i%%Rnt@F&(-7}D)b;|Z&0zO7gSq{G<3};^~I^iyLfXf
z65R+XSdaFY<{aT7rXWb<ketvCkibhhMQgZK!3(X@oTpPgvX;DP5@9oAj(jq;(UFVV
z5f=pF{#d`oMd0c=tih!C9f)=WIs8pk4gUeh$#D2PF@z*gK`&t&feNk>sAL2O6>PXa
zs3jr}^~pg6Ow0j_5|WM<MY)QgRS|i}BYDv?Nf0p$=9EdOd@*J$nPA;eyE68tm|R|7
zVD4(9T2+KF-CkHWaU$b%7Ovzm%mfwN-ujzLu9$<d9h8HiSHwFrf{fr})qV<k;!5TY
z9+K6VFy%G@PI>Y*(naOSt?Hh`ULnPxdO@DKvj%g~gB8!*Ns3?Nv*ffpGw{?Mj`-D`
zhWOPTfA|&LBXUC}8C91+fZ$hdcOG8&J05{LiOe}Xo`5@vj*Toh%g8SU&Z>fWaXt)Z
zWwH?IDbW-oz!0QKm_RfRJ5`;)&6Juvs)ZOLawBN8*T#XuNRH?tL3vrlF%NWO<-c4B
z3MJh)R!)PKOa!4cbK=mH!2nz`D#Q4jguq=a{u*kzdIp10RTsJ9?7#>*w!k3>-c_XS
zhu^McJ6k#?Z7nr6Bj6^3$SQG=>nAiYijYIs3v<TFeL_aVmXImU$!M7RA~FVXGK;`d
z)joo150Pf=K}w1=s=jFLpm0xuFdj;sN<ah!oioB=2mZiYPKdo6EX-73rN)+1Vq9?*
zb==xhMhuP(Mc0iD=p8qx2#;`3o0yyr5GO<oqQoOZSt7u(wDH75tZ-t)Jci9B8i36i
zL*NKtQrNKO*40@iAgc;SlJT(z4Plf7-KbBWotvsDK_R3F9$P#H@9=g+v?Wo!*)K^v
zfX5wTk25v85PMaEBT<44duY8GG>59HG*6HPI&X-(A98}*kL1D;>_^lIP3Xpg57kcy
z`mNDR*v0c0T%c~9lcQ3`hl^np<Ak8>l3vhkJ$R_CS<4|BEEhVl8mh(GQ=;yT6o2eb
z>I^1r8LnP5KyYCm#1yBj6K7D0Ic(x0F;rq|g7EO+O@~)DI8~hJm?~3{p<AH{hj<@K
z1tz?XQP!Y_L*x8~Md!9CK`#|kop0dtxLlj6(@ZGA@diVwJZ>12pm!=>oyd@()}s!k
zl4_$RXrow~d})Z)kxBw+w2Ko7#~Zc$#)+A=)<c^+TZ^qu2e<A7F`0G=YAiAC7UY>u
z8jONT&!Wi6*_v}Al%Od3soOi}+bFS`h?2!f9-km3>aajmxJ|~Ixp-lrS!p^usRS<R
z6ls^(-r>!2BR6OO;)TF;{SXWwx&X>GqE1VNhdzaJL46!0s;sa_=!Ln*ffH_s##|E`
zPrz3lDQ7|t%cL@c^oF_R`%`e^&VmgA4Hf+<7-cm4ij8Rl*B3Dbxd)EL!XV%nyay3n
zQxR+>JcpY=+fnl?1#^WWiW$u7ORDYE5V2IsSNI2-#};b|J|MnT%0T7P_IT6_t;3Qk
zi6v1IWl_W;q(Fs>h{C)Cm5gNJL1rc*4|Q-Fo>KVQ4Af~68}KDH$Ef#N3)B0^T}c$=
zU@pP4XMABsDWz~x_z((j3I*!!GQs&IC}mivGzm~-slj<fP*KP)@Bn%-En>5zdQAy>
z4Um<Cxdas@OKg@z?V(`P^T7$_60{8v4bOqPh?waqxHWP1^JYZ}8j_4mMcxenEl<y}
zgj@y(a4rCZW$@=%395sF*E63ZXhd1)1&xB>;pc+}CVQqZaoTw-OX}_uKP3PM&xI+6
zYi!;gD?#g!F|cYx`|1UA%wF6Tm<XK))Tc_Sqm-bdV6OXdeS$MmCKt@n-5dohiQuF%
zq=&4U)ga*=XR-fj_tOW!pF<<(a4S#ClVH;W@8|+Ooh5Ahtjj)R=P+jHt{y-$>W{6A
zjQpxAE&$lyY8MTT;Q6lw&;Ld6{KLWXZwsFPdhq<)gXjMxc>W#1^WO-b|I6U{ZwAl5
zGkE@d@chZ(`A351-xWOnufg;04xay3@cet+^UlZ!iX9F7kPc@Cp5lS5%-{>Q|Lp+&
z_XY5o$C3VF`?sVY^4~+?pW0{pv7kLFN660+%r_68w+8L~uX*^~Gcxij-zfg&NLT$;
z?#U0iaWUWD3Fz~~!SgJ9a_Ip0|Ih))e}5!^^Sc539}S-WUhv#^&6^kS{E+~m9}D1o
zbf0j3KWP820yuvVJl_jG@AHjDMxGAf{NX;~d?bMLuLC%Lv`;v{9nj~04dDFoKH>aH
z(Ei5*IDZ;E_b3lpuNQ*$KM}zBv*7t&;QY6s{l5v|{CV(vFL2%-wEwpOoWBU3?*-0Z
z2JL?`fb&<u^S!|N>!AHJ0h||u=X-(kaM1pz0yuvYJl`*zpAO)BY@cwx#1A$y@-qRP
zzuhOCa9%$f!1=p<!nr+Y|Gx!rJ{~;xC=cQ19|_w3y8zDL2haBcC*;F_AHezV`-Jnc
zV81^bz)5^m$RRXjULimKTma{g{q8`>e}}*c_v!y0!1=U&!U^g8e*|z2?-NeAzy8kv
z&XIk>3D1lF5Wu-%pKu-y*6Zg3I5+MS&P_r4UkKnF4W9co8?s)%=^KrVd?0}H>HCB;
z8Nm6!0yxL^3FqdZ{eKGJ+!8$hzk}zm3ZDNz!Sh!K&;Q@x`K`h8UkskVCV2iq_Z<2d
zb^P=X^~28y+WYrI=se>ajg0(~gAX`w3ZDC4hroHWZxsA8r2S_Gc>b~*cZi;OEqd&S
z_5gpsdMs*54g93_*yr51pyz9Y`TlC~JlJ+Iyga%=k7b=^_w#E3oKU~|aPa(f!MLtp
zuAU4$LpZ-4!1=6w!U^U7e+l4x_CDc!G$7D#1aNNKC!F{C$&ZZuW&r2)`-Jm3LHp+e
zIG-Cl_e15aBj_B;+m8frK5w6JLc4?Gl3X`=1o&^1;~8@Qe@K-xDdAJuiCAWFzKVK2
z%d72`?92Zw_ETBWmU6Ey**clHs&M<#y1v>?K~AQuN?Rg;$~nHqPBKST!MVXx(BOC)
zmS?J2b##lwH(X^decXJ3128!aIE4u;EN}zAKhpB(yh;HuvbiKxM>jYm!(7=EDF#|+
z5zfsN*B1xcXAsXX%Ru8{WUN(FbBAX&5Ak`f_}$$VSHlM$>Vc-}_PZi$uD@T}xYBL)
zJwx$kH{EJJ*Vi&B=#P?I&bk&sf%nbwI9Y6Pb-TT#RYs%+A+s3ZszfvuC3}z%qjiDp
z8A|QiLuQ-up(jm1N_K+R7EX4&_dM!oN5>hfs3dxaFA;8#m$Nk%6Cw(XWWNFbY}T2D
zcX4|3#OxX_Gj&<-^&Ry-cx<`bXP(T-H=wbk&Qup?nr9cMF0nU)Cd_4=OnLeRffSFi
zIb57FzTYw-atONsmekfkWZnHpd!Lz1AgDD4Z=cpzWi1mFZ(NZQzwmI+Ar{DWGM^(n
z*=s#GvgubmOTQv7!IE@|V)yV=vjLG>dSG*lT;Fs>P2j%nk4;}Zh{!ru`9VaM{AB^`
zgNW=wL{{!W97JRfBC-b&*@KAe;FTjpU0<;g+3OT{4eYstUtf9({OeaAl|j?~9hTtd
z5B+Z8&ui@;d>*(j;wE{10r+?Ly)F0iI{SriLihV;1<%v&0*<HHj*NUde$TJ}r?olv
z{UH$)A?kIT^SDkZ<u_S<nYKc8Wpf9&5E?M0BFJf)ga!Okz?Vl*3(y+F@Y2LBtC8BQ
z6jrospxj^X;r=T>(}pU(=b7B@?Xad)uw7{Cmmy%&&z!=yxiqmT21T3Qb!Fa{;N|Qe
z9m>CEy+=V?5taJIKvk?Aj0{U3<v*nXZ)0P^yx!&R&e4qG^_1|(L9>Y%#so!^jF}ps
zQEzRhACnHgfH}4I@LdUa@s2%M=M#xbuw?z@c5tUw5b-krEoICK`?^Y^niYmLM0DP6
z?I_rbfC=+G59vyCht)}q#O^~Tq~96ln!#{OG|)AGxz2C6$gGS)$Pi+kUHe)P&0DQ=
z&AdNX=h{yQmxOz6D$L7~foLCEADF77u)t3chqXa%WwJQVEo6dWn3cl}CCsI^+{C9u
z=Bhm+3u+0a`j``#G+_g?Zm13)4^wE0CjwoOBxc`8@G}xtj@!nYz)*6tg+Cz8nONMo
zW5G8BEtRX{mjh5e$I?+?rDu~Uk-?33xVP?Zc=(R&j%EGiKzw1p0IPUl-P67;mV?JH
zm^-<XlI#S>LHs=k-B5O;nZ)EiAEdQk5j25^LCd&SQ5W@cduv-huHyDM7B!YJ@HOm(
zLEHr3esB}u&g4ZlB+<FLw3w8m4y1#755id`V&fd`2C_MskziRUZ3Fw6axZIHg}QEq
zkojjE5ToHF6cXU#(cD7}56t{(cy>h|o=p;@3PlZ4@C=I5(3jIiQeM`Y_<>?>lXdrO
zh-80{mag-Z??bjy<Uq-IBv8jzKRh(t`XIY5Sf6l<BH_-qsAqU7zu>5cvC<oDSzJ)Q
zf#V;MJ8nQE$?13X^isdBFt`Hwa*&|o$%I?YxCQM@0OKwJ8ljT2tbr4Z-M+~df&qa<
z=%Z5)kL9ykd=Baq+ov?K8NB8If;ut4T#ix3#k~U%Ur6jpl0IQ&@^?2lBDbC38SEaU
z%DVN-8Z0GV?XW;n?Mzu&KOPrCEg=yc)p56BK&)Z9`gK!1T#$|H<aKfb;vB{qEV~W2
zA6$`kqa?4btB)9$hD}<;hb?YG%$?HH)|MsQ2S^#VE$X(r<67K?uq`E@M#C5&9aIk>
z==WJ6a&(~>q6mSL)QO1vZSE#*RK#@(N5$l<9cSWZh3yo~I2NC{Sm8EMd_dt!Mcg*n
zZMb7$&*PPHI#}{}zzqy9d}3WLu}-**;XbYy%u*CSzrAtcSSwrvE#ku@pqp-O(vHMc
zzH~Fk)eS#Il`1BRagW251W(eejy>mbfD>^JYM49z<L5EuhB145w&0qFDzI1px766{
z{<Lr#o-BZS5`hX6FBj6r<COuBSOh?rgd)ICl)yj}WFQY!vmM8>9*a{2faiQduVLX8
zqpl&_>o(<DKSp8M6_2y$kMk&;zWOLb8AV(RQJ$!zc$bA)+?dI2?;7gPX5|)*z3j#g
zevw$(#pdo$8P<6T4?1UQ#3T?&NP>xMkDr5%3}7S(35J#X>$EFOe1dL{_gEIjF&_n*
zn~?3=B5#qHe!tl5FK+f5z4o$D3q}NT&zTjE+xKhR#j)F6tmlo37bt;wTgI-?Ws*Zx
zt;Cj-yECTC3ZWhDvK76K%SCr53$OTR@l{M=UQ^Kh5ug#;ZM;{JXSpR!Hs0-57V-Rp
z2(k&)`0Odte$c}wJoMe3VsRQWA{Q$BR0pprShuVV>&;CsOXwQ%$F1iA+?h7b!AX0H
z3)(M5nimMbI731Bg64yLryy(}(~pLPD#5TVq>BUzQSL<`T?uqnmO8N+IAOt|wG(J!
zdZn`zgH=RmFj&QS`u^-(h4(=H4Yd2658%+qhi(|T$-cV@>e)FBM5PK6PBDl^XKBT1
zrfR!t;`4g9ot^Qbx<kVq>qSHj{fas=(V~vY#OR^!Jqpj@IoU6Mp~RrZ?}(mY5g`?#
zj5v9ezPb&PyM#u7R9e7BH#(=}Aoc!)IsiH7bPHC~amUKwj18clIIgbP#GQGsDDwO?
zaRPA}xDP-mT*oS>G)ZGRJJ@(J+0UQkidmYPe*$x7{DT~#E6NQl>XxxaRHOwUov`p~
z{jydMnrAAs%6>Acmm*>jcm-A57&1@X)A92R#7D*%ugyU%qYAh~*BX~}s7ELZB$P(i
zAdqf@=ez*{!9tFRl`=2MX)&0wYD}@++PT<tlAH#E*u6a61zFrGjuEpip~=T<bi>qT
zFOXtprx~Fqd1AAH`}`>kBf_b+j(Kg+#FC07AvD7*nmwctIF&~~(JK~((|Qsdgd2Uz
z3}WI??9p<_`I1sVZzBq~Ym(B5gUXSUri3l3ID-<%(_|2SjQ5u}7zCQ%Ua`Fp3QUts
zv=qdnNQ)`nVlWQK+T2nB`koJH9~d9lLc==XAuiMuoyi=Qyi1sYr}xpYVvucqXR#G&
z9GJ<5@$HLjP&$|>1RWolLdnk|6<OsHEt4q|MX2@6nOG7+q&@^wgnHi}8=3gGbAS8|
zUy1u2+g~gHeenmr;0VuvXTDIM^Y??Fd<wkg>y&Pfz3nf=P5;b)oE19e^(egi>*f7N
zzy0^6{j(qV>Y?rP;JjSVC%#?rfBZZCK=42Qjh|e6a@Y5MjnMnqxBrgdzxrCm|Ndot
z{>(S(y1eiw!`JcUqW>rRxb?4AIzK+Ibbe|~>Ho|Z>+_}WQ~C4QFJ521dj6j%{HMNE
z`F7$@b>Hrno=ab@{R%(!c_JsDJ^J2Hs{MPv$)AbGl@1^LUd8`4k<#a*Kl6vOFD8EF
zQ-l8>f3?ZyU)8MiXa3;o)_uQxvfuWr|BIaqKdk)!{PV9&Joh`VPk8$a%D2z`l=AI!
zzcie0A6wD(Py8FD^S3;!?Vr70pTGWR70#1Csn4G%>AF1fBiep-m-Ft~uT(h4O&@sv
zT~{Z^M&G0B|1D=eNA<DWuMW=D(4PW83IST@LnF5x%g+DT_<xYhj{4V7Lwy3alx<>p
z4}R=$W@~f3()UIvv|=%0D!3EC*FL^KC(e`Pw>U)~7G<2yI5i?@-J92eFlZo%|AhvZ
zJ)dtrfI*w6#f+jPbLyR;W?i7WBK#3M!nHO(4xJ@vLkmD)t4WTSwfYRiE9mWJ(bq$W
z_+929pSP@S;)Cy74~m)OO-uq1f09d$X3##cb_8A62CRQaBr5$TFBCKbliVAlmA+x3
zL3&m_3x5O?^cUi-h9Kx`(=Y_CQ3RmrT+`?CEm@m&*oUiK%z%EiQvy&ZAR&-@mi4Q*
zwByxgifQQ=oPIP}af~E(lx5??GbAQ+rJww?C(R~Vat8}0HOHs9gvq&eiQ$790zYW4
zHXdDR(mrNG#}D+S<?#dX^v%T4u`AoyaG;PMPI#4(b#u!JE6r8qtKpcQHjFX$vw_3R
z8TlG+H5$`LCctf7dbTVKkL$9;le8^`;JEIo3O;x4Qt@k&jZYU@?7C|v7C;<iN@s#}
zq@Z6ck78A@sD6-^zA;#^gT*3|mQ99QG_>g^GoH5z&AT^_I2_!Q1=VIeS>lbr@VL7F
zgeQX+WR^4&aU;_MX1+lzvmtHXuW;w!cj0wG4*kRlX53d<4mJ#3VVcZBe95TvcDcPf
zz1Cjd-r~IZg4@Kw2$p0PABg5_Oq^Aw$>2s4;TF2MWGYT#dZLVD`fg|G2$;6HA{=Y=
zy$GZWD{lb<-XW%RXPKwX&A<-|$CllqAxk^%pf?M^;oC|4n4dmoKLQ7RY*W}YdwdGw
z=z^)-VHF{|sdVOjDQl(DhR!J!Z0-bMQ{e;?nC`hu1thVchm0oAC^59Hn_l<<XnLP=
zyqlF}vP{!`h?}k`aC>6P#y9~*fu4Ax+}hgVWWIa)p^PI1LE8rOLpd(ub0M^Q$1RdW
zY<DEOg`s<jZRI3!$0dnC_mqumvWX<8Q%c2&<2DaS*+&35s=0TJS?95qL&!6b1giy|
z<zQ7Ap#}()C`$Y!@izGh|CUArJYj%2!`68?P@;PY$hIJ$NgrEL_i=QFu5;v<>~EFy
zj9wd+mSy8HRP9!a)C}2)LFvL+Ddn^m*Q28&#Rdb_4n$>Hp74w&HApPqbgs%W%7{zP
zoXSZhBvm}MQGt*$0ua=l$Z~^gJw%=doQa4!5Bd@ja)t(iQvLnPPIqlZzC_N<l`#Me
zT=qVabdZH1s};D8;a+y$<AW@WFs3FO=O7CsPLL51g}n_OK{h_O{XrInXm&AaAWRRk
zFiME|1({j$8J%m(!l21d`#-ErcWC5S5dUW$3J;6Li_=pJOg+)ki-YHf94v|J?2v*N
z8xJ!O$&hY=*LRneGOGZf<=uHLagm+Jmv=5mO-uRA2IIYQDlaZ{`LO_I;e^pecVgQ&
za&VkluE2ZRTbpDldx5hQg+5hq^Oe}P22zht$SuBb_r~>fg&pg@zJvYB-P*IHdr6YS
zg5cbTnvwX4Ggq7~Y%rXbKey4_*(T=wnawTG1z+rpKZgKU0h}sGsd{T;dxep`&CPyW
z8o#yP+S=|e%f}oLEF?D4nbWLxA9z6Uuj3K{TicML21`quHI-YPxA_w$C;5#d|09!3
zP{K&OzM~)|g~y$Mx;U1_QN3&}Ky0yD1UpoXm6fA&!6`op_@WX+>9S_f@w77$ma$vi
zEm=tgLxbVWxDVed2C3DO6dph8<SH<SNAuT>A{u=+)S=`tI-5b0<f5@}uxL`b)-77j
zirIw$_H;~Uq@CBnCHW_2QP(J@t`LAX1Y!ckgpmv&mmriF#1<g%R0#cjhN}{u9t&o2
zk*gBj?KMp@aEX8K)|Flhzpmuv7;ftk>{w0imu`HES_cvG+Zt_}&EQkE;7(`RgL7+}
zS6XX$Vp-}$Bf$Xzkj{(A1P5Tma1rUou!Jkytnv{V`Ym*860Uq@h~9*=muM=fvw~R4
zI+G`5bFyi$&QgdrvCh&mu`~Jo0Na^F9?R!827MV27pc@9TvS4PRoz+57Znpo5PaWj
zi(j^a=c3h7=W8+t0R9T-?J8}Z>TdN|;j!qC9e63}9}bf154@CQ%mXi_95@GFN|oiI
z<M_Z!33+?qr8M8P^F$taDXAPEcqvW!d!>0PU4kXTrxp}DxTR*furv<%O;5e0=IsAl
z_>27<8hI+G{-4JGQ^}~gIRIOm+Y(A<n1@O(6%A)8&$J%o=LdUYT4l#s>)IcU#P_2o
z)57LPcYAXS4`I^JndQNNsfG0P<1LwSNa{FoQZ>v0DF$$<-#)(y9_fpUFPCr_We{W+
z7yZQ?`B;y+TI5cV8bJIkjq@PrW3fgU*>|1=+BQTNU&I)!=@#Gbky>v0Ef@5VFIk~P
z+CY!sMv(N->-M4g#z?*zWKF$C>kVy08n6OJR%G-u?!((L@>oF7=%GUFqLt1R<zviL
zy(rE!=R?d>;~`abc3X%at19-6k4Esii#QP~0r427k1QPH1qe}~%?s<1*jDudmoswV
zl!8gyII+@xptZBM&9<0;ItKB9!vY@wf4wt&VZGgH@q2TOt@Ba9e_Uu5trOc1cP*OL
zd-w#1TYM*2O<p!<eCinb&$d<&*7a<}c)Hl#$@CRkqdB3Uss-IKT5OUkRB?>!<#HJd
zXu$(?b`^yz)y74Vzb-*4$pi+d%l`Lt)Nm2Q=R$W`UXF<sbHQdzItd?_ZPeD6C1z{P
z+}ZcQMnnA;HO~t5S3)je=v=m#%?|K1XiiFklxo}}Y7XNTA@Xc<Hi%cvH7=%d+7Tf~
zO8Y1D=jg9#zV-{>rumbPd|-IK*(Vg4s{sC*=M?|@->dlFe@XMo?tho&tv&N=nkV`E
z556+<4`2T)ivQz<Ka)JwXa31cmlt;x<R0j9{FfE~kA9WXzxQ35fBW>J{`bi@YQEpo
zhhLfV8vP~3|FLiT<h;L7ShM`k@6-J47r*C~N#_B^`4o9@m&wo3H+_cWwLbQ>CV&1$
z*X6ml|5w@9E-(F+HtkuHpC7P$QXlwv!+%rpfBpxRudX)l_Y*zey2;O@cj<kl4=#Rk
z@&A&^&&R(-<>xbh@Y0;WFMO@8@9OO;pI3kD>c+jlr*K~QJIym6{W7KhYc}-x==UoB
ze8BEsJYjtG#1HH9Cw}Rbc`jcszJ2x%r9;o?@X=qmIy&d!(_2;ekAJuF&+F~}(dt*}
z`8)eQeZKU2I__iZ+WxU0QTo@vPTS?d|3p83#N_7_->>%(?%E!XPrak~k36S(-Q!=n
z`+lbY4!^N>Xyko2Wyk-os{S9ofJ&ndh6l4mX+*8hOJd$5&241B(ujlE6-{cIJu1Vy
zv?&@Nng%KXO|`6Ha4|G3wipUzEY39$IAm@CqTS1c1rGpI7g#==6*NW{AKpCq_QkE%
z@`DSPr$!|Vd-Cn+sv4SD2-Hx&eZD{6>q?awTr_Shx7L_<hl(6#RkP4~O);0OIEMR+
zh^r-jSe8jpU)-9jFT;ZKQ>DiMC<+xgkeYUK6~Ij13X)#66UPN<&;`vonbd5XAS2tz
zw?SdK*^Ke@<lE;qmhs=%zhL!4;4febB|ai)sgwj;iO^JL+^j8LI$udq2Ob40IZ}xu
z%Z%J3u<RBh%0><D1uO<uQBaF6wpO~W?e0VELA-D)AcnQs+Z>I)y!7Sela<YtM+Y0j
zaQBTzhfY`PN9e-3Ne0VGzl1=lteABxcL%bwH)^PVP!RW-x+7rUn)d>bgXeI-sHX_7
zmMiDa_x##38jnz~FowPB#xKcX_^fa8M?B2uRyX_G>;R{PM9;x;If=@PTl5!zDg1o`
zmQ9>bv$L<fQR!b^Tq1+Ai{~{(?!g#0l4*=yq3}n2Cxw7pr2>a=E4Fb=k>F+l+-9;D
zRVJth#1;S>Z(H%iY~8-|@p*iB!M~5UB_s6GeZH^W6Hvx&BX;O@-Bu1^atqp)O7ktq
z02c{(7D4w8+*`6);QO)-(AZhO+_q8=bdH!n6XfEtV*JEc!l9hV1AO{L+|CIWCqR&H
z5+@=ERac$&3%oO?5HFitFA$<bczGTV!BIjH2`7w*1ZW`6nWVrAd(nr<Uh$H#A9%zi
zcHjjV1wLN6r^9OoZd&p+iW-{pLIGr<daWwWDOn_z$jE@fLxR@{Z2d43cM$OAK)7po
zu}aJ4<$8{}@7PLqN_MN>s`#g6SWqKAoccXSa^5b8?EaVAu!IUCWT%{iT<X?Br98N`
z5Olyd*jacIHwFfitZ_R4Cr-Pyv;AnaB&<LE$nx4^^=$pJ<!s=RKz|JNT>#;ro)?H~
z?qHDPpq>}^rX<r@K@tf%SQ@0I5Bo|y2lc!_ED%M`By!KEYCW&lyg@CJ-fQ%~_uGG+
zog&T_{KI|g_rKfET|f8i$N4MkfbnPc>uwW&%@^uF{ok&=`!8P*=0W{1>M{rQ!{V!$
z2lc}!XI|;`!`%K2zfE~)<o!1ev;Twd|7G9)N0PD&7D9o_xmKrUfR7NvP?JC<lzbG-
z#Fc?&g$h4@KfAe3!>8Z3Of=}3MbpV}#hsPC+mDd#L@B^K^&|MWJ|mwJ)~DrbwgSLr
z!-m^nE^=21y6fng8USXqhDcTOMdAR5g%zSk9q!bNiVOR1&Rxhw)-bB^@h>q4-MrWj
zYG+|Aef3e|$pd822g%vOJQ2NLzmAtlEFS#4n@eSZnF!69x!U6NMGiiB>^u*}*7}u|
zmh_!jqdUgzN6Zp2W$7j%?<TZ;ANH1Xe;GQM7+^~7K~^ra3|@=}hxdSkS8zuzTtBP(
z&rxev1{NOZuoy$Uh9R3Meaz<6PtVb8<DDu%gE27(jt0(za!aGPvY`0{C^z6&Zh#eK
zZQ(PJ`j><|uuSnNdf}e#gfm*(n>Zv$EUEozDhBMqr2f6KM+!0wCff(PSufS=(-#-;
zH9;(rr2M;Y8^o)hSO_Fh=yt5E#51z}C)pIv@OArK$`tU9gir-6kDU=tg>1-I0lWEq
zZIt4^h5^Y|e)DST0Jkq(3$}f+>3vs2i4F$m6$Im$D~Bht+}lVEteyhwWROUPQ&Hr-
zEF4XoF&Rnuw&c3*EFWl+M^i9l@@cNowmK+lU+9=XGeL1FX`sv~xf&u^SkY72T`5Y;
zXl8R9wn}VD`Wlq{X$+Dh!T+FZONLC~0KdbW-Xc-a=Mp~Xw&IYw8fxt$7sc7|wL<k$
zytPrz;CztYaaz(lczsFiVE7LP?O+^|kOfk=5Ty$_vF@@Nz)ag=ipN1cFP_vRBM0@o
zUYYT*gL+=dpZos%pq|&hNw${`fA$UG7rpn=V{dJqaP>5A*L;o-{`T;A?P^iul^^^r
zji)|$arb!S-Y~hot$G%Z@16Tyagn_6JFiSRbA4z1(nEXd?<^kw6INgE$6uNJkVl!P
zU#I;1!WU^?Nd4)ThEHC2r_!zP)aQy{?#VM(N4KS#;`{j1x*s`DGW@N<gb$7Ua?bt#
zJ=g!cT+nZki}?@plO|~RBY~w#tbDq{N<IU*VwMu`;<88<Y%bUx&_SzR)k10M;W=*s
zI6YMIz3Ug73(eVXa~WO(zGu}c%g~1fTdmcY_0A7)po)%KB<&tTSl+Z{U|h85YFFzV
zYK=5@^6A$B;(X5UAxNB72VmTZmc1LGLN&Ts7n@t%A!;R|Kw#61ZCL55lB;>7ZfYqL
zh^Y`9P0pg-6*mI-yUGe$>~%HR2Z7W!0feFdBEP0WP5x1QzEA1_xD;?U096!%o4eY(
zE>+;ddOQ=kH{k5Oic-%Iq3I|~W#&S{aR9oAg>i}B541I8nDw-oVy+J_sVD&ycMwQS
z5M2{*hnuU$oH3XKXf#J=3t8pzw(}3c;x?xSGu-`}!_d|>*Gr%TLqCsNV}lsUlE8|d
zJ8hxLnDJ_xj`3(g;{z9h$mN0{465iPDu$5~jMot0b5e|Telccl-j414suM|W3K;+-
zR_Br{XT?B#PQc!`1q8jPU={CZHP#aj6d2IlT*OQ=KXgUdkH)hZvSi~y(^;m2&$z6w
zGdBkr7kx{lp`k3hU(DiqECL7?1X9*n>dHQj$qDnAz8u9RmJRF#66s3GM&lEh$lmTx
z5DqVCB^Sm}&Of$ixf+@QLDN`Q!dRLe=n@P!4V@335)8^KFgH+QZ4sM?zfiEYEf@EM
zH%srS*kog&h2T7Rhm!)5c1;3F3AiSKOGIWzPiENB0EgGDt#+lg^(c+#1sK!LkOt8|
z!FMHsBV^>UGkRX#^+S4IxxBlu%}e?F===2Co3%X5=iaa9=g~JRo-h8m>LXA7^-FV}
zU$42pW?btPKULKG5wG7Eo*#I<#(lZqJXX>5xxb?M%un5Lb$U=P{`OsfCtt1K3;5tq
z42OUGD~!+Y)b>yRxZ+oMNS}YuzMHW6=fmx!Tzp=p7x!CU?$ZCKd8AK#+bff=3a?WB
zfATx^e#-IE@b!9`$oVNd>|NiX^dEW3?1@iP`af^qcX-z7uD|%>pJe=hm+oJ8Kd$$Y
zS0?`T1;ul8O6B4G|MHc&PxCgwlAXWLTfY4#+x?Wg{;|sY(H~R&;RAoAeDcIuU6*Iy
zq<(^tpV4+tn7`BAD=EDA^79q#|1eGH&`AGicKjc=uc2WE@qg;1c+%M3>LO`!qr)Jo
z+0BUlmDhKc#3IS8{g-STt?xwbL~GRl%YlsC_O)tz8{iEvf=a`i61r~<)p>a9)4nO(
z3%j%(kJ}=}a|m1*XzRW005m?~HKh4O47apf!}1km$r~x)r5FYlWCIGNu)}z62bSQB
z$_qP+dbpDCZ{&?4ouY-EXc}Xo@N|2{VV1w3+Gl#OOa8*f!!#P{frc+ID60g+M;dCl
zi{S8s2PJP##&Di;>7JV08+;c7t`uwyWI5!lu<i{b416hh18ciWJ=b!VwGy)HYPlY}
zEL3S>C%sN^$K;_SL}!=e7`v>}!cJ*mjQk~%G1w(B2K*d(NCnbh^I`fgZ0d0K?754l
zFkC@-odhwz8{8oIo72`f#Vha|<qc4Yz+g-Kc1XyUa3o<)K^;_hNLU7gA$8|w<;@Kw
zr04iq;Sa?Bo3Wci97pC&O*xz-&4Rv>^mBMdvfZL|5?OwK(k}xakvenci=jhP{CUW)
zP*)h<;Z8+;5neWWZr~h3IuyrOSDg1}!6Rb1A%WYJP9dvqK`8K=!Hr{(KoNDyraV_c
z@=n@wrLLjOq>n657M(@v$x6&myn}QaIqzV?nF@cA^8tp5PxKS%H81DH;#VQ^omi4M
zrhcc;lZp>R%#E8THSl1;L#7@qP&?)VWL>z&p)(Xtq?9w1Uw&|T<>D+CZzis4sB_T!
zsBldKLJt=+%twXG7lXMT_=*E_SG=0w+*9}h?MvvM%2P)_Wu8B4-xsTYuiC}C-5Y(m
zCjR(8Q@!};_uBpL_r1LK`(tKLJvFI%`%@oM{EmOC+PTktwc<JZezminctG|1k!iKR
zp6|Xi_SXwv|9<%n;R}Xm?}x5#+;4f4;_vQXKlfpqPYy#owq^E?-N%3K-j{d1p1f1>
zb#)|O|9y&2@B3|D6S|JBZbQzrMxOi<ZNF5qIx{a(oq;@j4xYa>6nN&FbzhI#cQBv%
zjF*?6_dDxnP5!w0LQB7(^?Htfm-6$AA4}Gq$bwJ%|1*LYhenPKt^XI;|JnKfmB?9S
z+H`7Tg~~Hk<{%Qth@ONNBUlu5eT)02E>H-i#a^@T{Q8a>#Py&FbvcEAOa93rWvrkn
z^8~CdgJS&OKoh6WRifmGaqyDY0|syoUVG(EARxciV;wZ2sy7VlpefX0jd;Sa3y=<4
z_>giyawgD9ZiHN9Ms5MZw^|^P-voo2jdTJ{=#}rs+e4VYjT5|IeEUNCG8$=RL0`As
zwE_h++RAM5=EBqxn?mu!Eq^M0l@s`j1?C(SL{6a~`eN*^2P2$ffw(&S?gh9)o-24k
z7b*D!FG<1#Uj}>w&+xavA0T+J_Kf-q#bXw6B!am|TZ(r26z0N&ZbJliTH^##L~dVa
zy>%F2eYp-!q&qB#px94^6oj?YIKd#bLk>DE=3Y%MUWl0E@l=y|eQBu~2gJy)V|~Ld
z6+oo<hN*g$907i)<S@}pB}d?XP$h>kh80R+**CQu23dcM-;00j`_;ei{FRTt?VRWz
zy&ur$_y48&J^yA#p4aVr!%zITm)F1f%pWSAvsVA>1ONT{;`70e>3m15zTU`}T;KEK
zuJ=DK^qjTtmmjw{%Kd+><2wCsx475Suhn_Gc;sEbtpD!)t-|S<p0wH+j{j@^&eqrL
z3a4)c$4BDV**{YHJN>x#4u${3yY$?B-uT4jvpr$$S3j=j)-z@gJpILr@A043=a2pS
zuNAr^1`Gc2;*InA-r`cv{73CSV&i_m;{8j%FnqrC6~(`9-{tMS@4W)|#XI!*V?U^R
z|LRrdF+OYfJY)KY`wnq1m23L-xto*@OSZmueZ}zkK4$#<+&8P8vzPio*M#6MouB{d
z58d#MkUt~et#ZbFC%*oo@}aBKH2b%<zB%xoT-Nn^>PfYS3(si#XN~`lo=`jCk*Ace
zCjO`<>wNTUlnzh+q|wdz)74{o;Xe$g=c>{Fev5-TJG{4~{Qr#E8&CWv)!TB=-}mF^
z%c}pmxY`G9RXm@yeevuMYP{<8pQX?1_b5J2Uv&0u&*W#}JCtsZd{pW4l<kX;TAsx9
z&X+!VN$LN>+jW1<{^9WbUNF9W(bjR|D{Y_Jy5D8rS$BCq`z7epMxXlAO1DRz8II3>
z;qTV|=PaH7Th<ykazD8LKKaxaYCf?2mvErb41BrkAahsMs6@WuLFVp3<}ONvr&3M-
zhsxZgyrBL6nfwJmuf?B3BfooVcKm<OQUq0{X!^neM$x^q^09cvtB?|3n1DGYpQ)1s
zV7#NL3ft}tqnBr<8ugh`u?XLK8KvY;-cdY#^7xyMk4{x-4vwCfzkPIKGCEl}aq^Di
zNKB@kb@C0cXJv0|+IzKXAd&eGn69V3M91UoIVL>`+1s~wM&klX68T*fbq9*};V6n%
z-3jYXx&mbc+F@q7mNY2qt~pX7-tg{?cW?85$N4ilJJq;6eQ|MmNv0D{)X#BY;g0dK
z!tLiUr9@vKId>i(VVoYtFV(lb?L_+&W`U<b2j;q;iT@(pX#L{c!qmlgoxHO+CJlqy
z^mo9b)y}97f9I*_<nfccjJCe>=4%};H3Sz-OnhCFTFsFS9J0>^BN-CJ#Og-lW3rIK
zV<^l<J``5-oCx;^O?#{%d>&ZC+LeXPbwdJP4=i<eqq)`E=(I=6x*~5meth9A$4`$<
z$np%Vp)#wDZCu5x5_cY#2%fa32d37zv*7-rDgL7;??71dBvDB)9@%NZp#<*xM6%O0
zuP=FV@9cEV+&jol@H}xDrIrEMDPBx&M2G;mb|^i(47g)F-ZuV11wQ#VS}MHd_=yuI
z$v-F_0hr*Qc00*ENRQ|!-ykTA>qJZIYcpM`5eh$5<HQ#)g3s=ro;x?Y*tmG%!s1(3
zTHCF+qAB1sE7is3L&dGa*dy!wq9I&b!hSKv@MneWR~kD*j(f}TDX`y}v7)jcdcvhe
z>|(x!BP;Bf;@k009N)rsMogGqg?;At7~E$@C8TlSewFbu&Q_pVzj&d7`h46T1rtY$
zcRG2_{gaefW$q76C1AOca?J@^$$@atx&#M-rjpSK>MUq{mLV-C$7CEko4i<p3oZ~#
z^Nn535CYE;NpQ}|ato=H89lw=sFUNdIF7l(Ux$YC{g9X8xeIyO;V~YZWeHY}#yu;;
zzZZ{NkJkv!Jw1}oa7^X*K3E#3cFfesvB+iWKA4(CBvNdR8#!c&74D9H0EuEZXM5;2
zO9N6zv+Y4oD&$>s6kFzq7-J#f!ZX%`$H@vs#|pbJ7BVuFI+#mL8zf{XZAzdGaxu`P
z+6|>L?&we|%kiH5*S-(^Y%uZ^OqEmu)_1Op9L*mRA`samjxs53m3v4~=8F7I5%Ng5
z+#=!pA|Z>!NlAAE$M5_CR=ZAra$6c%B`+sg+xtBX{lSM7N=hvVHl9>NDU6I6lFs%~
zOd!X6r$Jt1(XdT?Mo0!ttfC~&2(O~Bqgy`g=-`w>@zT6)h-$Rl1nF&vTBg7N8{PIA
ztC|jF{XKF%s%GoKlp~O%v7z)E*c0>Fi<exM@@~sA2sV4C?Gr5a6KcSMj=Gh2*)m>I
zDFiz@wEz`zeC)Iw)>uFme?{D;z1G@pugq;cu(`OoxkhX0jC^t(>0j{loMF((eHGe$
zlvo-`^bcQoYn-@OYs?-$b?5Q>Mwbfw@A0KK<Iky+uubg28Xl~@`Q(?LJ<Aa&tJPOB
z*WcvWv$J@tAKD7Q5sU|!fH1)WEdim%g1{4Uw1p7d_zs~QaHV4%_60%aIvbl??MoZ$
zt!-u(S8=rz+2{Bu9A`bj#6qF-BCa^|0S`IQkaO_pfTH@9=?OJN;t#D)@VN8s*oiQ3
zptV5jiOFM~GeTB;O0AQm5zatQrb!^sNfN+b3k@bQkIn=p#9#26q1+jQD!K!YNiakw
ziJ`&eOPumV62-<Gl4Ol6Qunaby{;@iZGPJSwELY8;LylNUOjS?vc-LgMV%ydq*|77
zMU4l*q@4E|1Kro_#v^6187{&n;mr~rbT=}72EgM>{p0uLb8QhTpMs}V0dtuSlmL>s
z+n`v$Di!s9bOt*20i7Y6s91m!oG}@4y5o9~7bLb_$IJOi{A-H8aA^htSVc$R>}|s;
z$tj53g~dX8$$a<SrZli(lnW>;khfyQa43o4r^z6($0wd)NV8Z{6_JzC$shl|fY-A)
z5LFd2*T}6;7CC|igA)kIV|lpU@mrd#9%l!~&nvO7itt1a>zz%65RcP_NA9*s@M&^a
z7g0I7le>wJdkW^^j!OB1Grupz<>87A@DN!@ZR$)WcRcQ?ncOw-+2|r9Cm$e?nlF4U
z!{+Pvlp8PIouWIv(w;b;T&_1}9-OR2I4hK2b0j}9FWQ$|Tiw=`HTgnnk*V7%^+U;9
zprObz){vC!GPTjs50$__fy8n2;bBmOPr^=vBD@V95#Ved%5Nzw(h*r4yi!q2M+1mU
zxf;F`u>_w3-*E%kubi6opd<@=s34=W06i#^!gnH);4$Dk@<#AZ)D9`D45D$JbtKvJ
zl9ZzxSO=BeC}YTOREV;*>{sp*#epoZ^DZJm3ct$e;u#D_CynWO=oE#?v@hAm`Xckm
z|0<IQ-G{6zsP0t{6bAuZIn9F+by;zr!<MzteUE&82409@RpCi+s|v?~uBu}WSQ85i
zR7K=$F4C8vYdg?jRt{S@7D)H-<n$nBWu56iuywXyIaTWyo>;!0t~Qg0Y_$i*7DcE?
zGv3yGpoOkH+z)6WE3aeA%G*;CU(t}2m+@rf6|Stj{mPYBd}QT?D!TI4Ae2dd9&)zP
zonh;*5M=!of~>#&DntRgIqOfLNaAzzR6d}}T135))CTtm@HM?4vX|-jfQ|@UG9^Nh
zU%$mCY6M%>wsqY=reWPgkig%;NwS-l9dLUL>lo>Hx;xMj11p-?S~6ZHgBzAYQ!=&3
z64Gf%FF}&!Qn20F%Oi=)DMR`xj&LeiKjMg;<-87b=)_i75#~63Y(bodmTAJR7I=t@
zxak5|fjy_OtRgIS_@c6$fLtJ$@8~t(j{{XO)c50Il=z7Vh}eDNVg*Im>cegG{l}v6
zJs6};(k->`*wnT8Pf*#5#H3f)d=o_&+1?S@OZtRyhsj6F($+gy239!N^9uZyx~Q@5
zvItvzsMkb0q&+7^Sn2?&o<ry2Lh<sKb&al5L@%E$$e?gbVB+QjhOZ+eC6E81eqgj8
zq$D^V5Vaao5w<t-T8r>USYm4ta(^(hwFs91u)u;Y!BB2AaL_)$m4@-1zHN4zmhj-u
zk(H5=E)8V+`I;N_7e4<q$-HrI?7u_cJP^S7+5pbseZpx6aNZlhIkHbUR<T3u|JMc6
zI5e_#^RW2;+11t-lcI5x6)SS~!ugrGbNHvYqv&#&Z_pnl2c6Z`LQ=PE1nl<p9W=$|
z%u~8^7m+}X2Ndac@e}g+irnJee7LDP0CJk8vBcQv2Z1`kkC>Cg<{Q}f_smphaJybg
z@uP;F8l$Oiq_eJ{U1F?mZ<bfxl~jU5v2PwNf_b&Rhze<ZisXAM-Bs@v>h=(M>&%gt
zU0sM~@e|x=fNG(M=18;G_^zvK$TIvY3JNRj<<_J9u$Q~W;J<|cQ^;EPr>r0w5P}AZ
zsmaiFlFh+}I^qkbSBVqQm8yP{b^#4#M)smgC^>ad(opN2!4`29@-e^5)w3wKs6>Z~
z!NFuS*VAagvigXr$SXfl;s+f-JjMLZ0RIiw;~VgMv(B3W7pF)03BzdY_6F)ithKqA
z@rV78V({h12ih*;JAh#u2o?>Q&Nn1HN7`T@1Wo5?3*aCiT`&PqfX_)V<Em<ZfbOs)
z>{>wI*LZ}2?`T|G=JE#X1QS8q*X6@uXKA%ySg7T8xmJ<##D(49h%2x{P>xZsUh@sX
z7vGHt))WSSFLx&_Zl&1O449liq5bfObH5VF$DkH=mV$xoJ^*gqwjPnZn)67j(G_Ox
zKiw(Se#~UhWoOjOTXmHo_3Lxcv+c_l0nSw|YzWQVV~f_1vJcf)Yc*RQD9w%z+(_HH
zlc09{K62N4t~$TAx!I?+!+YJQWI<)CPNgsbZ6vg@xaI2(8jj9La#~r)B~YWmwxpEu
zGom7j3Dj!8r#<%AC-QAgUgQ?0=49}p0;Qe5#a->Y`zt^jI<#&z$A<DrH@@Iza`)Q7
zC2rtAm{dYI*huLuYqUh*%_bp>-F&#a(ymhZlUv{%ijq{dqErhYFW)PLq|?hkN(S^b
z-r{HZkgt-(TgvhN+PC{|LbdO@@(TgkUESIOH-55Dgy4L=tFS;9cd^`(H=Oi^mdrYy
zTrQo5Ni2SmPjz2PIw5e(ya;X0Mat8Qi;Z4;nbLt@;zO8(ngYLdI(EApOtDz852HeF
z)Ki8+>fGAqmDbuD@l8_zfLa*8$rfJ@hP(eo7)jyfTF}=oij2GG4`q;~vkzx9s#RkS
zC{Ug&tNrvzgD8Z_E))2{If0N5>WM1p<fIGVfju;!XhJ=8P-E-c7a-&t5{=CVw)G1y
zJa(aCnQZXe1RG4Y3G^)6CJ^hsdMVT_U2rZDKh>eThXD`hYl5MNRIM6|!w7WZqIwTU
z1tGL)cSCA9@EN8L#?d(zw%k``1Hp%ojS|QoUUsY_hT}_2fZAYxFR&5R@go~qW8Okc
z$MIGy0E5>cK&0Y@hm&JtL~OW<WMc>$Cm4nK5wCHGRQq#v%nFg4nKS7x!0Lu+Xh_O7
z!6Zl`0s`W3snc3tZ>2;e+<cgcjM{p{5e+WOIrsS-rAiVg2op#h5uKhi)H@t)oPriF
zD7{BmQRBJzNaOLq)|eZEC<I_j7TKv6uqGXebCK#{qQ=PPPBZ|;jIlj2v0p?ZMC8O#
z6Y3|I)!2#NdD9M5ki<NVoHfBreHUs*LPM1T(eUKk=}7+PQ&)<FE=qDWmeh<9P@2XF
zom8q4S1!%fs?!%2-&LRH0B~7BO{UUJEw$2UuXm@`)_DEYU9+PTvp?o;J}#VV4%|&u
zc8<ps`v(LE;MQ7~6oz^@XaGSs3@Q*!Z@0t;C6qN=2>M}v>`>y(Av%uP4_T*E3lxER
zOA?QQtG}2s{T#mZm#aBjo4LHyy%J#{e9MLNK>uVBqIApYxM8yNP^#f{2r^l7DAls0
zw|g;ivd&Pd*|=|pB@C<bq}pLF(>4<<a!$iuj~Q?c`4%|_#-ismEcHrZyJP{OVB~6h
zZM&6dnk*d@H04Kv6D^Z<qEanWZLv7utDtxl%os7Qhpa9MOl8ec1!U%i@U|d06HEk_
zwBVyx)W}RwF>^k2t+lrO`2pV4Q-u=%UxjzSVY=w&i6LUt(4oDi8DmH}ymJ0L9=kmY
zlLbRk{DePnJ;FI)pyNBY;sh1NBPccRjV)|MUT+THdj}yW2Pvw@fU5^hIppx5r2-Kr
zy)`eAavyfeu$tvOS)dI2y$>4&%L8k~TpzGO1~<OkMGn^8b~|0NV~2w0H2djJ_$;&k
zOZe|+j$9rYdDWlY`Z=#U_Nu?X<zu(}$t}Nk%ZG3I#ar&YdE(|@zv(~U^tL0Xj&w(^
zpw-gh+Tptn|EojaedwDH{qsX#<^2+ezv;FkX8`Ftjsf~ocX_!{%M>blpI|qC!Ztrk
z$FJuhj}(%)M*$6)EmRz^0U)=XL8gaXouA~h+v`-0J@vsN52^)#-Ji!E>9H|1M1a~K
z27fDtk4^7B37+oQlRExTh{UdOS_#yj%T#jcf{5^?X|h%PPHN!uEfj<CF@E4I_)%x2
zsm)f^3E<cq+%AxkB%^oY6r??Q9*Hw+_{5?o4E+<jcl_w^2MA_7?UZKjRbnvgbUzp<
z+5<(abi~kGk^PPA#tEg3Sq4HF$^?h9L6Ha%y%#wfH=Z0vgK7{EkG7{0mVS%``f8S<
z3Ojp|P?>a9R}5@rr6@&$P%f}$;NF-~Bh~0aaea>~lK`sed`x@5XxRLwQY7Y2Zl<R~
z*jYgVN25M`6f^jGdiq_JKBUF&I?q<RELi)EUp)waAl+h-Aqis;6qyQ&$O?aspKtGM
zZ?)FWs*rFRiVBX@yCHizP!zJAgtY?XGwm}8exUY(TyZ(kd-I96y=|(}n5(|!czy9C
zGI@(ZhI8Dkdumv_tXn@}ru1NJ<~Vcy#jvbhi6cS`3XU=_@6O{SZ+vY?QuR(lv)4yV
z99Mmtl|$nG5ETI6Z<9nQC*jliEk*yN^p(xL6sPk;AIu0Lfe|D}9nu0z8(2FO5OSI=
z1!L0{Ysi;?sSkZ<nxUVLj4%Ea7e;BariYXbK}suKg4hShOa#J~Qk_~AOXu%O+O=lj
zA0N!GKYpj=@gu|z+)1W*wxY-81<W8w&>?Y02l01%N*zQ<uDk?sfk+yhlFCesbU1EO
zX2L3t6^?sSEO2E}@bC24q}?>b6I>8022XfJj5l|%cyv<QKkqoje+xabhoh&P?2GY`
zWQjo8AkWD?B}lG#pF&#UXopy$jNVvzC)NR?XYh2Fn<flY6_!d9XCgb?=^Gt86h9ua
zJu9p7QCDzFZ>_!Eo_?skv5mp<Jo+o$)!A9~+oF~8JuJhtGm8|mP@SN1w?SJ5{0V6&
zA`EaAx{tJ3>Ji&zPPkrROF=+B#n~!G=n6{bK*IBk=3`MAMWCX2@LXk|a0q*N;5ZKS
zA^aPCwGg>Q!1QFM_08?o_ExR?KzmzdC{IkvQ0ybTCYEqxP&o0-lrC_<49tp$CVJUN
zzgM~s28eOSV=ToO{>Zk~!AZA=cv$oN)a!5n;0EC_!*?{RiBTjI3kWJcf0+u&8IP;y
zCCqVlnw=H0hTWXfEX3j*{i0&|LXvTGo{mN_kYu&BMiv1-I!C|?iOY$sJj53<4}{YQ
zM;D?L%H_~?J*k;gK(@NMgOn#ZVPj=n4ozJY#}E=h@+YQHE$#|L=+}3grIgVg<dtBr
zL4l?kO&j)|)3noZ3=ZxzoO=*Hwff~k(;tO6Ca}%;Y{(AV^#GKQ2AKm%zgJ8pLzvA=
zU0?;O3flyl2gs<3he%PF7yg?vRAfzCSn4KVV`CX`8TZP1cVox7{dM#}cZIl{+1&Dl
zXn_UJqXB(}I;-p#nEUU+*QAo;QDxQLhSwRRfw>Sw3f3dAI-TspSuwaGa#+l^TMs>&
z)KGXLj2#MI9EJgM9Dly)EQ}DntH(z-<Ik@kYI>-$w8Vd(#GgLQpF=K8+!T+>kfjYw
z<vfAu3iHxT*?V1H*p^^IY+bF23p?1?v&EY0wJKLl)*Hzbq{20+ioF!2a@M*YKFEcY
zcEx5B6?+*X_2b8@*_4XCSZy69S+SQ<Qj2T^g?S;+v@kCk2Y{qBE=8&<jhn2^3wauR
zk~#TRDX;=4x#!xvU=o#PZt`*lP@W2@k{@t`Fm?2>c!r8mbIOMWcE!#xzK#p*Qg-U`
zmng6c0cs&LZeG7&l%TROvZd+0gy?jx3tdFTR$K|;7J+o2$f8myA5(^;8{8kT2bl6u
z?Ou_OKr!dc^aJKN!uU_T0`rUg|JnQnKj-l0mXX^IjlAkFZvFe4|MceHy7|L5KYDca
z=(~@;^XR=t&L6q$(0guv{n1Z9`th6o=%(jy`p`|kdH9zPf8g-X9)9}p_Z(gm2>E{v
z*;1yDfEIZ>3JM@3oqj4D1at?JJ6`B=tX-kvN+#kSTHG?-1Y{HmDiJoyGV+G70Xjhg
z3IKD@j8lMq5}}HzR#d|w8yjzm5fe@fTf01|@|Z>LNCt>+$R=#w#E)7c-78LM@*u%P
znq(|`k$l!0TN!3YOS19!H&j(*0g@$QHrE%SiT3#I#&BQ9h}oyxv9af9NO8$3`q4<L
zL@G6tiUQ&z3R(rD120;Vpbe{8U&Y+Oy)COBIEsLhZg6*cInLnj)_q*jTnM(LUZm&&
zDtXWl=k9ih`++@9U{SFq@x}<zBq_Mlofc}~l%?r695*s3tJ^Tx^K++T1RTG*w_sQ&
zOl2sWxeO)=4vKn!Mh|E}Mi?5TdLmjOeno>Kv!RQZOAbv5jWy(fQ-Xqsx>03glNZL2
zu+V~V2|EtiL%VtWg2hq?jGUvoH0mM=y?RiQj6n7-aBSh&uq^>q5dOnv-8?i@m0T8!
zd*$4ORF>Q-nR5rxN%Pdf6dB^FgPx>bgiObr)0pgAfK8Z|wZ*xGX@?V(CNe&STlgdL
zEW>FB9V#(##892r4g@o|S6UJDYPy?Q!kx!+Ru)<{=h&U6doqogIK{*_?yewmPI}Zi
zR~U$i9Sz=zL8@<0j5_dq;z#DH3u5iLZN$#YJpGrt`6H9uGO|u}A6`LO!$A#Q{D3N|
zoC|eex>VSuiPz%IhX~51eTdxL0fG|oaV|t!IJy$3?-@sGjjD7E%3D7*=P?AScJmmj
z<ma`vct?xp0sGpi7FliwZ1N!B*NBXby<sH&hxjqIYkpT4UlSfVl>RK`HAsiX+UCPO
z_*I(-2G9dab%6X8<n-bx)}b&~%Ca@*p=8C%1O=}ON$O)^LK_tYQPf<zxSomB5$wFG
zU%p(uXIa8e;-VlHF?K+LDz%d&{zVc`J%=+9jT0VYYijXA1La1xC6xziHbb=(!^}7l
zsfrNV*zL2kO9KfmJcYq)z%a};;_<7yGnFsNLl~cU<%}G?+`$I|aM$vcV5lK;x+LV8
z%WO#~(SGu(+Tx%U>kq&|bgZM8=n(MA)b@}^m3SdIR7LHVSyWcxW2zqUvN1r<r&x4h
zg`IvIgyIv-Pu(Ha>DnTT`}(TI+<Yb@IgN9(7aEInWuljO7qXehW-O<uo3TCfZiaZ9
zQ@h8BinJM}Bqz&9n5a8^JaZ{CV++!iiwWCNE5TUoylmG!J=E1`794$kr?S&sTM@>f
z02(`l=L<XMceo9i-ixH(kweKegv?E-ANdM3a-8+aP=6t+7Ut)XrBO#sjPp5Be&1+5
zXp;)?vkj8Lx@l0U=zh>F1eOZ!`vDcJyL~7=72Nmj1XkQE71|F5O#@8D_JfuwkSw>1
zrSx%eY<BKgQZtUdiJ2(;feg_2F~piv=Os7F3R8<VZTu869#3vzy!u*eqwUIR>#;4`
z@$9U7hz(pa2o(xK_Z+&i(?KbtpeniY-VmkODv2L~iPO)rh9Nk)-MF#Eg^?B~;CK@!
zmQbTR9^5W7KfCF%5M56+|6n}X)izzX)1{*X-yNbL0h|OuH~y*`g*!K~>D|urF$(t%
zC$88EhGAllhjNM`H$f<nQ{3g@GYRWCd1e6RnVWGaNH}H6IF|%!^U*9|mDx!po!cIU
z{E}_)<j!}ZBPjk|i7rq}M-nf!^q?o?g4qAJ@fZBO9)I%d|EXwDA4PYW0BHv#WCPMP
zkj@ja@?W-Gum(r~_YIOl0Szh<UR!QSQWW6jJL>o<UHm>N1n?eeBR;g3YK5~rOviCx
z%saBZwJG^nm=SdUtcLA2?BB3iQUoN2&48NB@<}!yfSt_qVPp6K;~7JIq)^l;r&=YG
zt_(^BY6H|4IO+KgEJHkI2F#pA$$|_;BQ+bWzDq2EZ9njGHKqh~j=|TSbD)5v-|j^7
zWQ-X80I4g{D)={sF+gi_H}b)@TlI)(SNK+&q_{y(Nez~2*pn|@P(}_Ad<W6cwatxS
ziJ{1(p!qhQGy^oQ5+QPmYXS`?1;sb<6NIXh(}v4xlcS?C(EPzm9uU6h!R_W64v^e8
z#5X<?Ee9y?T5{ZEQzkftrzqVI_6593B&+4zfFLi0rU=uRLHz~`oAIom%++OD*a<&P
z;;&7F8D|iu=2Lcbc6bJ0d4D1pU8GR3Kf;!@X^B9(zz;s03J#}m73qrW6PPTnOCWC9
zda$k6sx;iqdlITxh6Mu<CxB4KrD7ZrjfG1Km(Esa<{B3O5XLZ;Q6FAdoSnW{S(uWW
zTfzh3^QrUaYK)2D`a`Nm<pR`X>n4jGc9WOBudHzRdhz1a*?DT^xDY`vp_S-iDK%H3
z$8Jei{7refo~#gAT%||qk16EKQy1r^Dz#|=E7lsaSC${#*6KenU>JyKfr7Z+&^Xb5
zXr)VtxDkvSXk)l~o&4c?IDbM|Oo^Yi0|@5a-CJq)rG(Ob?KdC47j@Xaba`2eCds{D
zr_MK(<a*oJ_d%EYl6`2rQ5A6Q;d$tH;)Q*Hr!1~8K(853qRO~wCxdjtAPMs6b&wU1
zui5Rho)PXk03K{p%vLBO?n2yiun-|ipGqwWTzaKGm6dqb?U9VQ-b$Ubqb$dJt;Sul
z()HS<hEf5S89W<>uNLnnTjDYU-l8S`S-DVs*E`vf&qWBv&uP2iU+%5QzxXW^RpPg}
z$dG`EH{;gPZi@EE3NmqAUND!9Jj2MmxF9t&fL4DK9~Y|N1G{|AAQ<$?PQX{Zv>q;l
zFCOJ9J+R1BM_3lFHo$XLrI2((#>7>H1OPhP!~KjK3)Y=);{Ld<ApLPOA<;jDfR&Dd
zx}L_t-q`-YeT0s(IV(sddD-!l_27JXX<ZpN^%AoZhM*8m;N{vWT?`bMm^8rkm*H)-
z4w8VR6KVjKzQ@u~t}Nr4Z@1ID<c?K3iFg440~K-0pmD+u(<WRuWMdX;%1F0DMQA4O
zcn{wwi$_noXKMH037QEE(f*ke6N80ddxOvZV%o4)az(i!6#WJ4DHNS$IA#={Dtu_@
zEvP-q%hLr($7;uLIAzp(mb@#Mb4Jwac)|cqoS5dFj!a|H^3U{=v8Q4QW&(u<&Ybi?
z#Th|o#zDe+4I~^KTwX5OhL_qaJXAWkLx;a`SafhT4u3)PcSOi@RXdd5WWEkdMTUE)
z2z$7bFN=*ISse*-_Z@G=dX5$wC#8-Za=Vh!w+L@o$HZ--DO)Cmt`t1NWwAigc81E>
z4n=4u7MmR>D?7O&vXhjJQfq`_kab(|7epHi$hA5YR4g9VLJ1I)L#z#_;wP>R7YLjp
zEPY2AD9@;l!t>LgJ8o<62L0)WT3f>4OpZXqfjygSM29e!mTHbHoaW}--DU!I->MuJ
zp;kl8_o>x1-C%xC%ZL>gIWAj~V-`G;J<hTv9&grT$;W%r<4w-V!8>lGD+#<s$N{vR
zjl&U@-bp;coRmc@?c*3+V(swWOgp89^@nh<@X^Ah8r^#=C}dC6KMYTR|MyhmUA*4T
z6frC?_d+bqA*I@O6iAIB9UH|{q?w%=ED&T^=`kTi17$O@8ld)3;fX>zCLi&eNy4N~
zjY^3vEfPfq7mXVyX!A2|pLRce0G}iOX8r%P5EYfQNS^{o1T`0fu;L9aUSWlB$tsX^
zXK)W=Z<5Z62w`fxRt0?4cf8bt`g?6sZ+(aPmm>C9xChW3IZ)+PY>_}6XDy;ob2no;
z(SqtWksOeo2A3<Xst{}XkWLVe145H!e6C4oLeB0%XhIM}Xo|m=0`uPcMqwL{;uyrq
zgMXta*}ZG0pt!R3pwtmmCAKJ)kI~c=(jvq-rW^nogmYguAd026btam5SaPuC!eX7Z
z9He*xuJzUeP{J;`ppuZJ5T(rzlC*K6=cfm=AUFngsV-W?S)~df_vp1B3edMYyBrGn
z=h9w}3s@~q>_V&S#0%_%cj6G>35qts+GRHr!7NIxE=zVR+9-7U3dOUVU>)N_CrMy0
z#!;Ed9U>sQn+?w6oZ0xJfhB$NXA?K05mU^WP237NWX~pULOCNxs0^H7mvA=jsKMg9
zqXv2bYFkl-k`o1gQ;EtrIq(c?B$6L$M9yge-9k@rITF!KPK!_k(s>ad2)y_$vQ3;1
zi8pY2$eRp_$ZOy7&JGJUSzBv9u(>6*SfIyH2*PTj@8XfBeTji$5>}H>v4DtZq9-E}
z@`@2K2uL8yH&DMVE3e3F-})TDEN!8>In#u+l8%V}VIj2}1pJlr=lQBBk%l4;UMN+W
zQ4B*sa@QReu&!q8MzdjIfesrCR+m;g;lxbq=4VrjDC(=Zk1}KXsHnV9YdU4c>#0Wy
z#0ZPM0(*?c_wLQ%?-TH#D3V7qGc<?_D4d)i$!yoDIm0*_;%11bgkmQ%4CA9k@bXaP
zm?>U_QKvb+;fmk|)0}d9E2g#z5%d@&k1#-uWsU8*fIsn;z%ra8l5pZ90nVSD=*kr#
z!?<8U;w5c;zBJyB&-e&B5BNHw(!-O4R%Ej$3Wdy$TDE+hCsA)KzDOfCNnpJNc>s6V
zmn*Oc)ywe*e6XHog!<L-FU1y>@gQVDVY$=bl&1*VRLY|DAE_zntrcE<fvT%_dgR(m
zgw1hM4PNdzr#x9j4Vx%Oghe=fhGuytCRm~(7Qu>y3{9$w#6s0Y!GMOX`xx&iEMiPl
ztYi5qi#n}>$p(anF_|}KM{>FFv-_;g?7v(k4aN*}(Sy8wAC3zl9uYAt19w@rzc*sy
zbI4H6%^M-2OLn4Jr*e@Sgi9LkN)nGb8JYx_5J~ci8-?!x!bKCg>%H?r8eywwo80}|
zq5Kk`UJ)lo_AUi#x?!^Rlw^Gn`vE06*+=jZ2RG5?{1HJ(>&i&9yEa`pLLg;#T{%LQ
zNZP?5p4xWo++}f(4t)mchT;ZJG=y40Eed*o`R6~;&V>kS!)|)y9<{{?)~xAQ5fqS)
zOdH1p7%PG?EOk%=eT`~xsMna57Qx>2P`EotJk}!iP@q1>dQuvSX-5$fOieqAm;kd+
z?I=RAtZeNFVkS#FA``;Cl|C7^blOE09u_|AGr;wTC$=@!0k$sOX%VA390(Nh{Gmo;
z1QYa{EW-!@_rUEK4NQD*<;{p(z}y%6pLRce0G})Wru{Eowx#3uw%IJ{YKtVeq{SM{
zw6n?!29<q%*QD<)qWNq4NKw$n_hk+wrtV9-mtZ$vue}6Q+U){Z(VYa@vW%e!8v#3n
z6tXSH`Lp!&9=05utbQ<TmfXRdtrCed)&`TEse|olXTqd&JCg-?_q#J;7v=0sTErp_
z5_StWj0E56t*!0uvKB^<V9jzvLDs@y*@E-WTx=P8H)C6h)*K;>Au#j^hOs@cDQR$C
zi@PSGnYycwJA$Q(P3dBb1E-JFpLIUo$Za|;FY9{^97Ph5bG?eb*Gs#hXxQ%J<k;)s
zlxy!s&fazI)sBmfMX+phI0{~Ow_|`nCrZ$`=zZH7sfu9CVs9oW8V$6;`KQMk6gV9f
zJBy}zWMM++zVeF4nRC((FlS1Mq^g7%BKZ`$od84k^x=V-UmKr-Vte3I*uCIWn250}
zaWKFVL5XxiKGF2Pfv`;kHS?ubml*22P8=z*QgL%csLIxniJR=^#P%q=QLoK$BD5(7
zMTD|K*^^La5LGn^7*zWf$|bO4woop?#LnJAC4T&Y;yQz?srV#(OeMq%)BqxXXXfO<
zu+|pd)K5VWQJ-a8FpCFZB}h?1{1ls|R1l$Ff+=joEg_-_=G|@~A_xs7@Q9zfbN<c8
z=kXmN@TdBTOJd~0_Lmq9K+BgIO0-`C5V0@ZLm-Pg5Ol#i5DPm70Wu;7!hM5CF!Jdj
z%+vpEKp?_%fB?pQshQ9r;eo((^iaTIBCbd+F+ca>e~e*)=!y;<Gzf};Sne|<B`7U)
z%c%4#!GLgU00XfzNZbhsxe}ecc$cD@zM^Scl0dMZiI79zQg13rc+<btdFpGoeK=2A
zgnQCglJitRuuM8OHOAe;A2WSQVke43DA8aVn5ujLp#(w?PSsxVpvjo3y;T|wE~&i+
zo&1u*Pka?qH9(-5PL-iV96BYMV45IOqGdHWG3H>Dc=Z79l51GhSAdi`F@38P$(WeF
zrhmnWH`q{DGcg4uoJ964j$ufd8VxU#oH$mIhrPIjgrW177VwKqN-~l3sT9dZ_*e3n
z<fSAc1uvPW6gHst=wM23<T?4?Q1+8A**np|>$NVA$j5|Bv{h_LXlp3hnN8-b3+OHu
zVlFX`XVe!#lGP;MM)R_Lvf9XAauz$YZBSall4=8sxP)Me343vjW_VajFhI1)fC3bQ
zB!OXUaO1+zARE$lusP#D5P}sG=82>aD9~+)^LZzV#d=`93{!$jFdo29oQGtm*y_WU
z*iDJ@dRJCLO9}SG?n+b%_OC~LGz)K>1a^kNB*7&qiaLim!;bmA?@LUZwnyZw1ff%M
zxcgx4i~Uc#pFV)klYi6xPg4*E3P8Q2rb7uD`E^p%N+3dxb_11O-%z-7QJv{fVstLk
z7%kDJF(#x<QW82N&V?N&bfU44Z3vWTshH`COE|lmt~g}FeFdXMvycZijoV_}GO%a3
zWi$X+0%B=%p(OUmHKcBpAdU9G=`dKpt7#Tbx`ay1fXsERh8eac8aXemZ?#0T==vB7
zC1z?G*U&(cd8@G?6Wg1yP!fYl6$~0O28G6gL2=s7U^*1+5%aB<Xt<crqv5hAjR>u<
z|K-G_#lo#IcqY++$=)=U<e6nGKx<>hre@^?jLiF)5c*}<CWwb1p3$f?vRsBmf}+k;
zHHu&!i&tn&GStcNJ9UmC*3buYH7MfiJCtF<Fw7}|4+d`WOJ3k3jAJ&T?ead5U?ZX0
z)2Yy_SPH~Bj#Nuy#Ay+Zq6}vgCl32cbXHn06DccF4b*(l7QegjYA52|Tg*X8<U@r5
z%Lj2Wma7*fFF-8>lt@C0$7U$Bc*VGq1YkjF3{J~(0CRyS;q?p{ic~l>tT5zTV=9@M
zsNVErRJ+XNQ(R_%*+n*hTA3DPWu}l`i+`>RqhfbKR+ePNdks0Cg^EM+-XQi<h6$pF
zB!ph7ZQ7+*M%Yi!W*ihRQJ|<yBk%eMvocdpGbKP7y0yMZAE;%Tftj+QOsh~uV;NRp
zM+qq|H>DHL*6ahdjPRiV&G11CoROZn#8FU2$dTNIC?mOxmZ4t>m5pV{%WLB<F$b|d
zvu~TYIZK{tnqvkon3Ngk<MEfnUExt#mO!2w_%9WAF<^L|xQhYAZ0@2_D{lt4i{Zj-
z?ut#<GEG;ZBjpc%1K;5+%i}E<D9qq3-ck${vof!TiEJETI&pU?!y!&chGQrY3`a9I
z&2WqhUXwVZExT*Dp^Ra{M7_|BD*`IPLf8XNFH5u>WK0AEUt+zi3?f}GW|NSlE(v2`
zWzJjmGSsT%uX_o=m1ASPOk>=jP%kqmp3Ug#5Ju%orm4qzS($-ClRa#*Pra<nD4^^P
zayN|`DBz;8mBm~IL};F7=0Mq@E?0&fE`2hXoNiUU?7D?YsUf?=C|5hgRJUYH9^GoM
zm%)qTNuz$pTeAeDH)r|b5^1QU7ZY8+X5zA#%5n=yFTOzW@MU|?)+8@SZnTtD9=5kz
zy|^2hTf0Fg^WDM<ygnQ1H0tvT5?BjnbBW(0h9qfJi2}z(NuQF-I0$-s;6bhv5|)@W
z#3Z8RbsWpJ((*__o)=~_DTSTOYTM%)FYSH1om8fA8NbndGomaZ!_g^CEW;(D;#;DV
zcc6~3yu;!)P6$=jS>fT~?uM56EW;3%uZ<$bs?ivQxi9uV?SA?I_;YAv{@BP(>@3Mw
z6E;cIKDGqTQNBY06pQCFJ<D3)>QWiTG_^Wois^8@rO<mB=L2~T1~jQ%h$k7}adKpp
zc~Hui=~XGyLd4&c-y{?Mc67n7WU>KD5CBYUHWf*$xNW!m9fLBgX>f{9k{UgE2kMRM
zG7WOe9jEm|6`D)cuF;dXFE`hCHwFvH^5W~=WjMP~PkBogKcgM0X!EvKsv$l&8}ey2
zs-mjKC@N_SX@kZxA+aksiPXYETM8ET1X{fL1o**tl#4?p3hMYyg1g`d014(AwF~FZ
z4f5=9Ene+yia7o7&f{cSxrN4yY2p4H+zW!ZD*WLc44;2ohM3aR)7`%hWeq>(lzp@g
zN*#Czc*4TsBb(XX$U!r;OapvSSpa#|2IZNZoyS*(d6<JuCBipgI91r?f`ne(rhT10
z=EZ)#2KP&uX7=vKJZwZ9^De7kDRmDHOy>`H*XBOt?Sx9eI4nS<q=5X~MwmJGQ~sp{
zl2mplHYbc&W<~D*vfMZWj@L(#9Cs1Q0Y}9+uP@0_nN}pn5r)j*4e--A5?4)SA4iZ8
ziW&$=^%1{Ol2}Sq;5G+0j3W-2qhF3QHc1>Zj^1oF(xqGyuHMfa*ZY~{8TT{CX)j-k
zGC97d`<df<KXXt;3@qdE;C5!BVcIMnrwL6_{}QqrE%EEbZt>krR8j)*Ic?D&@hc`K
zS|w(dx?|~-K*(omWaG4;)fyfblUbn%pD7g2QA1S8aVnOoN{-W}-lr-#?(FKpox@Ds
zLD?yYb5msVGlXLzm_H74TQx{`B2eC%^o?((j7tSKo?E6<1m3}M7}p$?an>?6t@_pA
z4ugY<o=W)0^6n`lJX>Y#Q0ELQ$KELbf)LZFbl`1^J&y4u7L4RvjQABkH%qhDyC8w<
z3~%%9b>LO*6%M>(z!C-{ClxpW?cBr&dDmOeKF^=&JbxLNOsK?Z0lING9dMY9!%{|4
zH@&apyqSde$-=SYFxgQmf95hv!MKu;<6MR@`$jc&%iCVXzeh&+{p^qL^Ly2A^WT?J
z81na!?`<Cq#{HaN+<y^t_rDH-vmA{3xdEJS_nm`ZhQPV!)8clYAHcacc>WK9=U*B;
z|AOH8yMyQd&^_;frZIT`8|nN#{$If_d3bh5Mgp>pyurZ-oKFv4d{OXxI-rjqVF>&X
z&o2((91GyTF?jyhVFx!r9(>?=a{%W}0i3_tC!AXXI41%)f4fgOuL|Id25>&n{Qv4;
z+}ne3uZ92L9Kg92{y!DK3Hg64cpmcqTZ88z{}<fz>&X8snCX5>4nFwmO0e(B!Snsn
z^R8gOj0bS`OV8y1pECiRmEieA@Vp&7pS0(kC(-$QoA5u7e>47%gOw_6;v=94DO1L`
zd#I#s_5XMf`0|!w@9<U}96S-@H{w{QWnbgnNWBx!9K67~gZip!z`TA17kaFI%WA$~
z?aJq6&=ZO*zmOnC;6m$>dHHk+pW`sKvi9?Ri?i`D@(AG#25MmeFKAJ2q~Ka64r{vi
zfTG@6rA8sSaKHl&15}@oUL6hvHC<4c?*|_bqP9^Oo0x>A68z9vK{Qmex1l@G-WaUp
zXqSK|^b3qe70-|2M)ebxfe}~R1>R*67#bhpQQ31?D>b3~IRXkip_$+Z6$*$dWduD;
zB^5$t=mobg1!29aMGY?)K**FFV0VP|D}k2J40vwh4z4FRw3MqM@FgLLupDDBA-)n5
zCcd(qN?@dM*n-g<3<+Y~Q3HLUXo9|s!epVVbG{mELEh5(4mS+6ERKK`RLo(CW@0XT
zA;lU{zy>jgW+)JImW+nIfKk>S!m|A28d0Ma<JQQn+5XlZ*TDo5z3c%bzbct?+Z&t0
zQz4+~wGTjF1%o0qOGpd=WkK2x-DD+su`C2Me72b@soW=}S2E`2G1_hGf!UC1AmZ7@
zp^V!Yd&<I5%Mhmoha`HY_la>EV^CQ;#F*@AwurGGTu=!V-O2_i?lym8KMC>#baV?6
zK-#yIH1?CAQ2_d?kQDaAqF#SO3O_RDmATegGEuGB;E<q9L^3INh~63-JS(qB8ZOQ?
zP`|y}U1lKx1lBkXZ+ElIJ-;M?ua%-mVH@YL=pubKZZCKH_$t5~weUOQX!O#8*~^rx
za7qvcxJPHdyX*-BB2|h1pS^d1uJp>v16BRBJ9J~#4A9U?BO1C(<#x%sSM_pY3QKiM
zmReHPrKBpW8}PNNB&+VSRMJSQrp(L=owWk(kToj?GKnVxvpO(<n{>c1KszBT<4iKs
zCNRM?FNXx^1r0Pb%s2}&%i)pC_kDYx^PlrSuB5UX%o-K6>(>9Df1iE!*=L{qI{Q?%
z1ZQ;y&ptP-&NFuD3<WMSJ!ro|TeQ;|y@VkHuh)W75y)(~^(uigJM(d0Ihx{jxV&C{
zT57&o11Ci?5}@GrWWFJvYUbP6T_tqFz86UP%5)X*C|DHiiBKl;#O){JV}8E{yrDC^
z(gRp698GUhcQ-sAr}tLC|Bj0d_*4bS;EDH@01XbkFhLa{r;d*^3(bA`HTO@@j}P?~
zO$dS83m`&ACJ0Q_{z1?amw<pGMG%+~8`$1BH~_owfk?323nGmKgPlfT=oyRjFx2zU
z@ZAYTXApYihmZhb4d&z4u|~2F6g$cw6^jQAQ$W66S<8k*EbNE9l`MoM>p=N^00LFu
z1kND%L^{*L@Li4v8&jkL<0nWJkoIW{_`*lLF#{dsQ!VHwBsCYzPfn4%J<4e|nbw?w
z8aQ5<c{$<GI&5q3dS`%Ya4HB_KRR%n7!E#KFdTxIVR6G(tHrIia2)Ge_PrKjX%*R8
zW_(ish@P?k!B#TOe%k-E`-2bQ$j~R=H1uW$NN*Fgt#IZkmjDpURI2EDCW;j*q{<Iq
z<P_y#F^if`hED6IGugNjC2hbq&3J1H$fq-1Q6^#cUYv}))`3cJ+KV%MaWWw~g%p@I
zfs~A{yvhge%H+rlb{KF1dv7eoxICv^3o2RY`=FiXlT~;#SaHb3Mto+lDeh`#i-Fyg
zcwvAER(lN)j5lt@IatdQe8*~*#&|4Il!1?k7Sg-`KWJNEHQx+UKs1?&eUMMOb_;>3
zy<inskq2`5mTU~Hx0!(&Jis!f!ORD(A%k5r<h{`}=ED^41!^DEGv<Syp1~SCWFejG
zs%RZH2Ngc9W4>fg_ZlFWPZEzckjZ)qqMPz(m2v$}D^|bNxrBp>ciSISc32QNnu9?w
zRZrE1_Y0x4N7+8mf;tVdV-y7r{H2Ycq@#f-7IkFI98pKc%RTDIJjrU*k%b{~K5pmw
z=JsyejX|8ucoYgE>kaRWa)Yb+^YVwE`2BDHrlFx{$Nz(Q<A35?^zWLc10OB@?J0dX
zGVzCkbH{(09th_{Z+TGfUq1aMiXy%I(}UX&?EF=D`M_T@I!ynQ&kFyiW@d!nlYe4(
zzWCy&^?d33?fI+F<*N#!`+(uUb=K(r$mn1^pZLE&tnt10cYjCY8hhI2{n@{2<DLG&
zcW7RoS+{ntDzY`ew*J`qz4dK|&+|X?HwW_1Q-5H1J^e|WmuHU*9&b&Tuj->)uXq0a
z*gHkH7yqX}8@j!!gQx-az-Mh7ca8j(t&5-h^IfMSA22@u$cV{}mwxcicivz6J(GJM
zddm3riBI1ieV+V^dGY(wFBw0-@S`@at+(2Er@#6)MgN!nkJ}sXi*Gi(#=hrw1?R=v
zl=C$#qDN2tSBB?{-)(YZ_%Gico=xx%{CwQx$qPSg^c?=q!RzrOfBe6{@jI{&zWCL@
zF8VBe!tj6TvcY-zJB@Bne)9JA#{=X47yN^}9yfk?>Z7(Fb$@cOJb%XJ=g4>4I=cQH
zHeb`%jQ&slBjc-2ed=>Ze@^^66S^N6dhBhlF#g}^qmVx?QtBaCZ^s?zv3tuD)ID9W
z)bo<gbVH7f!pP13D8qerXLotKH?J$*akUS=XNDWUpTyZ)+_J(N!G0wzbM{Wl+`%b;
zmfqO4>d?{c8;6#B0v~R;zTI9{fFf-!v~ZxIJNSE9NLqv8NT+lP;2d(ssdpla4~`|`
z>CX*)c<83!hsFzCEUiIs3=j2h@GI!YJnf9v-Tv6r=C<8FJ#)b>l>nh+P*B$eU6{fD
z(9DI-#fSK5I0(#_@hO9Bbm$>yg1fM`akcUCtq$&hax9tJNIy5G<NUda_w&9b=-N=Z
zp=JYh-EdVL+m9)`Y^M7yzP8+C_U@50_qC6Wp;{yx>E66@o9*kHBd1S~9UEf{-3jH@
zJBpq{6IPvME8PuMhVy8zJ%VgWo!mhhDGI2RTg)z~50z%ApxXKCjwR@WZ!0*U_=Y-%
z$G`6NRzJMgT_DxZjS``et_P_!>V(%$O%>-T$k4fa1ZS_uj)hht=hxb0-@U7)*|EoA
zOh(s%O-EYDP7YIr=vEB@aW)6!$HB=u3M}_pBdzwS0zId5X%Mq&hWYkUASh7>ZI-i1
zwg}Bc_R5R~V8jbS@OntV3#%wX676dtv6Ubh{g?W^tH)UsteAqOKCAz-Gb6sO+HxyB
z4Gl&5a(9mk@iV$53gPP-T5oQwt}Tz8KGW9GEs&gxc5boVo0^$hJb#HO-1n9Xe7L-V
zg`5dR#AQsXnh-0?T!eY;HQ==hcnI1O-ek`&mNyB7K<gCJV33@&ym579If@d5UR{(>
z4ki*AK~}plcXq3PWr+vTAd;qlFT$+`X<=(+{^q)(xDar-0!tDHGIR6BLzFo<mFV|#
zPo@GLQPnA4JIB@~>1=`>!BH3Nt+u9MHp)|PfS8rbQv;C6Xr7#bJO*^`RGT+0cf02=
z@jx6<LKHG?CX<y-3=-U=yItD1!@u|u!_DvzY5&Q)V$}q71>(g$#*xI9XcWO#nN0<w
zYj9Tqp3%kIgDg1wrcZzxinOC^_)(C5#?-TP6BRC#y<+oa{<zS%yt8^?6V9a_<0js@
zfRLbLKeu^fZLa^p)fEdJGIQJqRb<y8bZ3)`0hRd;Q918MhhTbXxDv5CAPT1p<}}V)
z0v5zD?i=e|E?5=bV6tlQMY8WBb~l6a^u{I;B#E3fVv!xo^r{vm$Jh~T!>-4IIf&74
z@5}Dq(?KpBk(<BVTbP?;5vE>?pJ}Zp54rUt(!;gu_gX6AgJV3bz%?l*<Ov5WCyEdd
z8ip$-@hKuD805m@#3f$YncixN7>`bcFd&0S8IVO}1#Kfb(-X{GMC1gbr8`r8tedCm
zQ2_(+LvRHHHFe!f?Lt_Er&1XA@ctRU%5KHN6rl6;RxB(Af6`qHw_w5fAD^LPy70rl
z^-qm}K)Ue@iC#YHoS$2qIKN1Sr*GcB)6?$sjGmJCYw1Yg2+VF$r2E{5%2&lzin@G?
zW8|H8K1kks7pk_!N^rad4_zn4-jYIZ^a|%MOO@d0>dhM@h2H1@&R>=)!O<&R8er+F
zM^XWLqz@4*D;Xiu05yy9=cYs|!7%ou&o%>76q3_vCecd1*|Z`vU9@uAqR=O%-zqYv
zeT9Q@@wzza%gQbi12((|gK}9(&QpD5%^Z#u${~vQrBV;STdT(r#X)mQW{5d8RJwx;
zvM7UtHjfiVQz&O5DWX2K6S-Or6*251CNH&ZwV)dM)w|jU(oK=)tkNx+qR7NIFZMBc
z3Kbt28}YulsM|*wmVU%!X2UK@XPkTGxUjFV$Wv7DIW*vHC%s!x?50@ej(bQPbif1@
zIpN!}+Xu;qAPDn4jE1&Z^gv3*tD#?M5P0jZdfo{KS3PvH;HpPnVU4REr<Z_Ad&$q$
z%0~~~YG+hQKag_DQm&8R9Y*RuH}QCy{j~qTEVKWA_|1dte^Z&je~@P20!Zhn8C@gI
zEtDxtw)I=>12nVv74|09=k4*nQ)-HM0o_mApsTKUfrsEdoEuJD0GVC{`E0i<&0P)F
zwOid-kfz`GPOFXp51^=ZB&qrQDMiEjjY}iQ11wTh%M|~cB20@LnCFN<#tBGNrzi-h
zOfl=<ma8O??uf)XRoqxaC>CSr5epSnF4ZGs8xB{v+`=L?bxFPu6Bkf<cz-NcXNFyQ
z7_|S<rvb$+So#`P|4i^BEW?uMB4IL=Ae(H99vA@xJ4l9h*&n$sFo!waA@coBngW~3
z0O2x-xa5WnWIwgL<l9VnhLZs2J|y9)rVqux_$L_!u?N)}F3!r0Ajti^Z|6?HfYcvA
z0kkVq8~Z_=!pX6mRk$BGJ6)}Q2>P8qZLd?#^(BIn05j6sN%)Kbk#jJkDJe`WZU@dr
zCDt~n&kf-;a%(_vd!Nx7wtl#GEg>jwqYrF>(n$k|64slxhx(h<O#o!0VAUj3g=KPz
z&+`T_O*G7eMG_H$oyK01KIwDNO`lD!R7j3JXX;dm<awW@W292eY{QI?A|l#hNGJz+
zAY1rlf^B3Kn*^BhILK@3GRls^6ay!?^hiK(VBks`^9`5QPwrHP2^)WkH?a~Oyw2tt
zmVPQNQ_8{Ej}q1`Oq%&|WEFjfw!X%UPBJng+uBk#L5|F%gV8VV!%7J$T65w~2=@#U
zt$mkylBv?_kksrh07x<um^ACl%p$o5n|=oQ09C1(una7Fljv2;6<QPske%=1CPK;@
zPx}NRffwy+1*gq$uZw9!H5)2)KnCBN4h3@`DircFT!Vs5Usa%xL+knz)IZXpf6Y@J
zV845&!_tj~H!+?Q{(j`{FIQYP{0;J!(`12%uC^w14s-FOhJuZPI+|qk9OmLd!Qu%@
zofE|0F&*kK7mr)K8!!pSNYxscQL5t^hq-vQ>#d+(eSW1K$T-Z!<5m>^(8HBx)`f!`
zuZ3JZy0~EDV~0jQAoFYC58+QH$TC!kpUiLd268eMZn|mgoT@(!Zvk^c?OT{C;agZD
z@h1-ykZIr##I8=q{F<D&?u~WtpShs~mtHe?Z(+?AJ?d_g7Sv*F(|o+p|3)4qYndJl
z=<<R=-(9mKB`u!uM54JHz;M1z?zHFU>HeLg%a|S#IMq0=;OL4CrmcbK0d(tH$X8|+
zU?gw-Cx;3x7{r6ytLD2o`%cmcsmP@k!Tuk1`~S=F_mQDjeExrN`?1{hPraz-WC9)5
z9TJscAnDCI&(~dCWLZ5thf3&%GwhJ@tv+s-wk%HzY`{}@i<E`Zj2Xn(mTz9MdWeid
zDMQy4;G6A@)rAGtrb%lLz_<W!FbZV)8QpIDkO!J$uqy44FUe8-$W3)Vf-M$84CU6?
zGEF<ikz2<A4$N5jj&XlS!M>c*6(Ix)nwUoe*I{g|mQe>~0v1;<TsU`=)S}JbbO-dL
z8vy2dp(7v$PJ+J^e#73}CgCt1#37>RRrNfcpp1nU-)`)d@PeuDFT;GzQaz^^1iC$o
zIHdHRNc3;o`ji47Y=6u?C_;vpX3kBMReG1V2nnP)4vr=>Kh_Hw4WJ0t0g&b_nm5z@
zr1aqiR|uX6wj8)@J!|<Q*1k8*qh&DIXM#gm#&5TP$k!OZJ7gnMcKSAZ1{*Z+fyM@t
zQ*KN_EMbl)uT$@eSRg^1-B8&I%nuIOt*|fbdE=eSTgdR33`H>@v1U+sNehC+k1;?9
zF6YHI0=E1=o7`k>A<Yb=&Dz}N<_?!9&GaxLpt4b#bO<(^bfZ>gyU{{7t1dEA%KwmJ
zC4K>=d`4lYlLDNjjJ`Nt?%(7+fgHBf0_$N>$HCJ)KjG2Gz>%=UgL9v2Y@<S9bZ+D*
zSK|XsV2#6OgOv@hC+un9xO@{rYjrzB^(aYTP4hJ+^Vd$UF5ldJ+-@FQQmO?0JFNfV
zs+y4{Wpxa%<JtQ0V|M)uY->cDR=0OoLoA2eAaAV6;1S5f^#FA0ECnzJO<)W0^&A4e
zE-*p?)R86P2}BZPV1<{FAvUnXE3j-RVQ3K=hxT3{8qW<^K8;iep8_vKB>NOQePsl=
za5nAd;Sms$*U*y07{$_ikA;pIhRA42iddi|nIqhzhVSq>{##F5So>8pGD52F24X_#
zsm^1V!^-fpd4Q5s8GhPt2}%P3IR8^YAPzJj5J{RM0R6H$b$cLC!`$#^)M60lt#KSF
zGw?WbWgO1U*}Cu{HLNrpX)bfJe_ve+JiT0*0^`79pkP6z6p8&Z7UY#f6^7db=Ncry
zf0Y%KPD7Z)x;4Zbj4EWSoBm=vQ7ZB5bfx2rR@nrR(aQ3sZlTxo#52{EZ%d*oBArQ2
z9-*#$nGq+Eaw)nzF<lv4^}{-3A(kp%R*|jBGoF90;M(+Ix)6EVx$<Eu2+_Ei3wgx(
z_P8*k7Z{17#vU-Uc4KpU_4194<=t!7S64bva<}`a6}HWt5P1NeV-(V3<n6Tdm?(~;
zNrrp?Knz<czDF8NNo?~WEGp%ua7WNqi!>NkAWfQj>H@ba#y(gTzxr0YqB3FfT`qjA
zuW2N5+fv0}7OSuivi-zA;FiK5BX33UW}uV$hp*S4U}5M9<*8s&BH9!7LS!kH>=nkP
z?kGD1nWYcxRe-FT21JrI4b+(H$9@np6Me|u`ijT*?MHx2Zn8FnOypq^s||kn?5*kS
zx|`9ZS;NpdYAp4&e6pM-cqx-ZW;2XjpD~^Z&b1kr`wwq{&$jx|jiR*3mN@f=3Uiib
z_Oz^MoaN0G5{f3@$Q~Aipo8Qlb780>!6=9DZ~?&-v;snEQVRzSQ%-|Kn@EIv7>r;p
z9Y5BvA<-#V8l5b8*t$7x0p9S^4pp6F)K;o8#?qOB-$6qqj|TgncK<N`_b&X;?0=>@
z?a`6blv?7$adV(QF2~zE5HOo_a842@t;y5Dd$jqFD$_gSsprxgptcP^jO67es=}hq
zu|wNwBW#^k9f)gu6V!6^Q&qSmG>$V72?X^#D!zWAwoDFQ{u>p}p!wwd4)Y#fp7Mt^
ztR;qb)*>sExL*D<Vo&jsQ)8Nfj;C&G=gJpSWv&9dC4-bVZs42`(oT4+w`Qo3z^P=Y
z>l~7d$#(f5im&@+!BU!D7Pw}XVg2`Duk!b~)yBlM{bC>Wh-3x9y)g*=K)5&_a*6Aj
zvR0&UMtg^M{^gTA*A~N@vn3Hy5g^EmL7LzV<Si^WCcgo{J>?L<)i9r`CpOYHaBh&-
zBCMNo{%#l&BiM5E0++`&P7bCIIoni{RT2cR<Chz`bQ=#C+`~c0#*ab!Vrj!?Q#0{V
zL*3(Ja!qCF6_XOVF2c*j1N=U~yu5Vd_etksx)RUxVytGK$37f*zJ7b58@$?iD&qs&
z*2^~f&a1L5j<o2$p78KM)zEIQogvkw=|sl}Dw{w+HzA*Kb^fvBRas)x58qZ){yCYh
zBH4?n1MRu9r(;hR#lxiqukwq{t2>M&PGpV>xv;`T$?{3DLeJ7)YJ>#*ZTZTa*209#
z4ciW>Rq3Oc?7(WVtDMo{m8+X<Fc^JS<g=hbI?vU6Kw4G<u`I_T8i7uc>KUD^?qTC<
zEALPc?};m|1&3kHYOC;TMUhE%SlBx`fzjAhEw~$V;TPyZ#e`E<Fj9^brB_w18$rVq
zrx=J;Dw4LWj@1kzDpI_atTh1NGUEeZ-|39$@$Y0efGwPpWUeiX05)AtkaS_j1#W#6
zyn=rhk{u>)%?hndSdHo#O$C~cmY+}4twz$Pgw9lI6-FGO&j8bWyUxGXYAa7u<cY|s
z_3{87g1WVutTOG<h5k>AS0^p<{Ws+b>bk%<Rnjv?MC>A;N3=ED4#smnlf^LN1{K$9
zrgbB^3gc*`f=h~QWh6S4=~ac^L6g0zWYnqfrEQib{(x<E4>Zb>p3YATom&~hvN%e_
zcB1t}owEouwCHH4S^GhdMkYy!o2(8A^a1-<A$Dr}u2s1b+$qx~w}NGxaf?<H_m!OC
z@C{8LQnYc2=WuGZ_5_WDgh3jnG?4mLmNezQ3uF?ly-t>CLYo9vy2%CN6oM-omC909
zs1wkFxv%_x+Wqtae1-na_<vQ?&B4~oLnC?_Jt{9LdWo%L1uDzSGVZ}uzRR&7*H%>K
zOe)vN8VdHf1JU`~8X#5@*;=PI(`nYco>L;$alWcdHm{pF`bdvl5u$&tsz-&nmChdR
zxZ3V(SvDhIMN*d(8TkWKw-U7wZMx>cP0Y(Uh)kKU!;57tZ*N-TX3OI;)oC3(G^%I`
zYqEf4RX0iGK_oO~Ov2(N6451HWsyDL)bScT!Zm=h#RmRJM<9i+ytpFT_4AN^U#sB7
zc}x`K+F2xbRTgK_dstb3S0hg0M>gKpHMUhQk9#eJXAtn&^5BuaT#cAM0p9@cv@dNH
zscurk@RS#UvD&I&S>f%P*$lfyA^37Q12^2%g&1jD%uE|HV~{oj!4Vg}(KZ#EZI-#L
zZuXI)C4#2i)-qINh$ycxA=N2us}g2~AyU#|A^AQZ2VIEjwyIw?Ze>}xpl;A|a5OH4
zifNS17ObKgiUqy{tphXHj~tn3Sh>x8<7+p|ig7n<pKX}VHQJ{O0uCKhmh5qDxa4aD
zM?K+d<_%giats?3tW5kQf-nvwVISpxR&;Ri9oI0vEiqo)q}$3Cty-pG*{AFt`%M@}
z8K%vj2RRn`I2R*IO09S+!rbS(Y#sF^$jW-5EjG%C#zD*7Um<(!*J)i?EMOvc3c2V>
zZDZbLhz+rfM#=+$ngGm2NV!!<Of29UZitO5OTi4FC_fb#sQ7<{aS$3A?^+}vL?f&F
z$>1$Lx4zm)M8kcEWg--~msW8Zby>D>@-@UmnIxQ6k7y$f;IYtDLsDLG8%}=gLi}Xn
z#@afQ?Akntt^yg1khbB#^9X5M4tGU6+1^j}%OGyUogPwulXud<+Lj`%q~GKnBRp-(
zu~vvNeZ{yy+p_Id{vdg$2zeV0Zl-C|>z=-|?>Jh;=o~A>+LC6p;;kj8Q$aMxkr!^Y
zk<N&x<a+;}ENcxEr%E6xOx1?Vnjb*8g>NCK!nc^|@D$VL{V*^S8bCV<4d^yXpj&*T
z4VN~+llD#$hAteC;tts-^lrA{#pWmKo8fyVtcMOUJp2^O^wc{k>2`ORbfNoGdcz%0
zdba&DdZ^pXN5}fpNR{@DEXmlGy&2lPC?^1;CpN)Vj@Y)6(P_7PD>_xZANoao$n<iC
zr|Ml@%JrB)q|UF2wM2B}U&QZ)h9;J-zP2~05S$i6+cMheY4fquV`c-UjqiBS8Riqm
zYdykGQ9;~E2b43o97#E%)7F({hdv?yo(>(KKDuapO6XrPg3=s!O3_u~<T3hb2{JDu
zJk>PV(}Llcoe>%kn2na^xy?n3DN8<ZTE&hS^E7<qG*#QIn1H)y)SD)QHe~p$m~<p;
z;HkAOQ9D>@ZNv#+?#uqC-A^CDSL)xi|IrD}Fz=e?ly^<D$mfxkjZ=!YN%$#*H0MY#
z!BhJwgv9<-?Twb=3CR>w)|06+T^($Ut1PH<6I=d_#Fq|iz@^aIXxrFYyi4huhQCxt
zBXb)<4-GgwC>_L~BvP9iT6n77xRRwf*{Ir7f*b<X81I;hNr0fS8ZeDj_?l$XQ%N>0
zJ8j0s0Bvrk4%Z|ZC$-I8&v=+Nz7K-Cmy>}JY9TgYE5bez)2Z4B$M{y1(Aah&Q!)71
zPq;ACJK2aR4lKE<t)NGib`uh$w5kx*0Ndo}P&$h-uci$se4l!E!}nbOj050x>ckJP
zC0!s_@Ln5J*iZevZBEQ*^v$XK-oCeOhg397so6PFnkTR$0BD}9fp#Eaon=Y{thALf
z0nc|K|DJQ_->WZ!${8~PXczJZ!oV8TjN5l2s%^d#84a`(8L%t@9>~$wZp5@a-;Mk;
z;h;&<Ze*xyH!|93H!`@|jqIs*Bg0p_k$t8u$lDeqW$Y10XV|f}Acv3!0|WI8M=nH(
zQERDf$U4wAWQc1U@~0F4)-C>9*!K=KZbjH8fCD~9Yw-=><EKb1vEvPDsV;72u}-MW
z6bu@Cn`VRq(<WrVv<dl7(Lr3OO~@EJi)IvPPFpA9d2K`nLmQFJoHimGsx~5#RU47f
zN*j?4&M2rMYa{Zfnv7y2vN_a7<P9hbZJgSOu;F6J+K8;JHX=hz8<EX{HX^2u`bK0p
zY9sQ`L@5zM8<F*v`3eg{n6e6j0i3oR>qJ|Qb)qfD=1W_S^`|Yze`=aFx7u<HW8^Sm
zzKShJRKqJgv~4Bz4+XB2i-?D3eA^LTw(V#Xw(Y0`+jjhE#K5*4b!*#>h-%x8^AWcl
z`%K%8KjlWCiMMS>BeQMCAZXjMj<xLwf)pd`%%qtxH)*B~NYcyzNSbN3ZP)RqaY5Ox
zBc|1^V_>!G7!|bZ5HDCRnV|#!ISWx0X`)I1EeT<YcrZFzam{%SX=oEmg0U6W0D5?6
zm4^U#rut?bVKuOj1*=E(Dqr3A!R76p-UnOTCq{2=tP2M4ksZZV0-R}5ah2p*qxk{M
zHr5W9FyFwkGn{SEn=P^}EVR&efW&$>$izx)plt~24=wU-EVQtV3~QV%(%hzqs43c5
zt!zPgV>oN_4LMD|HPGZ+15Lgf<Xc(j*-R=deZZ9>;t;r*IRy6RPs#1pn>I6Vz@_C4
zYRB)}8H5Ttkzr-D&~|3v^6e}jH)k6fL=ZpJs6|AXSJt^UG(%q-n$b`jnnBivW>2-D
z*=O3&>@#g>-nJmDHZ;Rn8=6DNHnf1ISyqsazNJ}PZE4npwlo{Fwlsgr6=)rUQIjn#
zz>S+4)P4{E3m@%mC!?S>l1s38g9hqr$AOpz3~g&7fo*FBPTQJ+)3)Y6MGf(!wl!n%
zd|OLUowjbY4z#fu6m4uagWA|^z}nbEUJwhTQZL%r3?pr9HdXj<7&gAeu(dz)Ad537
zzK9J7%tngdLtBtLwAIFDh-qW9nb5`t*#`p2!ZIASu^A4Mi-x2&HbXMs*b-9M)`pe<
zsIASq(bi_&Xlt`s)7EA^YHRbK8mgANwl>3ATbl!mbQ1>%xjgg{Wrx{Rz&31d!pt@|
zjl?!Lbzz&EKaDup=BAEqbJHZ)=H}c)a@%Lx-25pwH%-26ZW^0yZU#Z3%sSTQCJ1PS
zugntD+zNBaH|s(2%>YQgX~u1H^QUoX+2$tJ)g&5NZEi*dZEnOX*~ZeHid4kjlW#pc
z+-m4hv?CAUWu&-XV*uKTIPHK4>y8|jZIQH*TC7Li21C&PW0k1z8AR})&ra$yN(TFk
zhg_{ckZ-_;ZS)6oU-m!ke)<6T=g82Xyng7-z=T)|WY|i{bplvxO*;OXBU+G-KaWZe
z`ikg}t3-qB&Q?HwoK}BxZ^RzoiCXN9I6`TN2d-Je%uZt??h=j>$0Numk~7ca*zZec
zkV}X7$Kg~+PFj1FfN^L6Gbj`&WkpA@=TvuCc<~H2ZV#Xy6HzKok^4DwXbCf?!V&Lq
zXnC?Ii98Mm1r8`@K+<#OSYUBv;q&EdD2TX%LjObqQ42p)k7MpBTpY@_h(<(ia;6*3
zU5~@p0l4Zm6aYx+g;!3mc)EHVi#8nd4w!^9+iAZ%v99sh^jx~mas%T~US`HIi69nh
zyQ-W)r~omJ<ql^AP7Y;%z+5`Jzi@M-yNGk%1OswoR5l->q60g(k_Y3E5RRgqmk-kj
z56sL-ZK9ehI~iX&<30|h$ao-<EDSInSRZHg1Bet(dN}Tnf7*F}Rv?IfAZEM>UpK9R
zFb*N)6PC_1<VBzl<`F{%-7(8y*gV;eEd~&+n%Fp`2acwXBZA=d#Kxg)RSSxZL+=8n
zH`{Y_vvB{gAnQ0|2I-|~r%Wc4|NDmi(9r9Whd=UG`^OtrhK8;tFaFo$`9Db7$Dd8`
z0q21uvDMIzCUCy9cwGEyf>Xlt#}hd3Pw@PB^8BE9UQ6(NHi7d>@cgF<oF95aG0dMx
zo*xv?PJ-t@OW+(7&({~|4E^%}r$p!fEj-6OKAYhGT=M*j-k1OiKbz(ea6X>E`4<VC
zFFqiguS)0;x*ZzO?>$Ms|1#<KKy(BCpC3CL8v0iWobO4V$Dd93l<53_CUE)*KYt>5
zeo#JnEP?ZU0_Q;ET^kyDa~w?ZgYx0+2b{0ZD?T6ksRW-dc?EEOI)U@0uK>>fmB4w&
zD}eKF5;%YPfN(yP%-7E(aQ@0c;DE30Na*}R0_U9xoS#jee_8T8e%i#hnD=+bMnglN
zOyCS35YESv@%~%_=gSWWr<1JfpHJYt>ws|5as5I9=PM2f=VOUn`o#p!R~`_~yOZ|6
zl)!mU@;pw(fcZ-4{9*#<=mFu39Hc$?@J$i9p`l++`aPDw`FF|lyOZbf(*fg3;r#mq
z&U+6C=bohfuOx7eC(rkT&uG&AR}(n*CeQZ+XDn&|YYCiI@_avV+DZFQC2+=*=lg+k
z;vnrY?_U&w4h{W!((kt>&wnF%{z~M}rxQ2_l|Ltwas6fj=T!1MqC9{PPbckvD}i$+
zdA=Vw_a*IrJAw08ljnorQ0%<h8@va9?^XYAVRZv8dDQhl0b-a8O}7Aa``yJ*KMa+i
zy?hv-;v<+WZugc;1<Klk5tscjYfojn0!WyV5oWL%0T?DR%q_FQwr1yVPOW$`F_^od
zhBR=P>9CF*JnVj3QMYebc=%-k;gTmppqYr5Yz|WnX<4#UYYKwF1m-;$c5gZT!#f{b
z>C-_(3l`TLB84*lLmRNJXc+8RMk^TaNYdv=iuz%mn8&2a9n^b3ax%|<S;;V1vo#*%
zp6>2|35zZV!$d-&VB(Y@Qu!Pvg8=*Z*6=~vrm~Oy+uEv>y)Fyw!P?ymA7zFDAp$MN
zSQ~!naY`+%u6~FiztibvWD7&Ab(#0(7I60iz*bJv*35=c&PVTH73A1^l)wl_MKH>A
zCS{#hJc_+pqO*_5$R^U618INzoJd0_B|5_{`{-9Gt>p<*oCYq6y_hd!pg=-8_y>@%
zJgX_=G7>as>f*OPcNzKNsU7rfz6d#UOanKjSFC9O&i-wrmHG|eGDxuxS}{wvOlL;3
z2F+0%uM;{QFS82=jW>Rq(kkE#z8dsxpjC!*_;wGzD)*btFN1UY={FOUp<nXVKGsqA
zHtUzsh<$upkc!7KoHrN&*qb+)8II|7;qEvql(=`lQD~-orP$*E_$vE$555ZXn~AZ2
zGx_QOIHz<*ICP(DAxO_+4I+<WKXi_3FzZ)=r#<CWPG_HA<r(dZ&SCi$yrBr*0N#je
zp%9djuaK>AptYd!I?l)}+7~~E`AuoXNb<hsw^$4jXJnx4YkmuHRnSVY>H)M0JejSd
zFy1}(!ANJvIinTjm2|**Eu-kSx}`IGPFi6j+*p2WRhv6XH&aPOINdLP8CXV-nKpKS
z&CBQ^!XA@p8bg$pP{XKDufM~P3nK6gs%TkCP3>LhQ|QPxv}He&fJi*mY2L+}{6Va3
z;b?!0Xd^y9B`9e=5MsX2gb_<cbYX$_SuS3hI5*p!yS#wwGx?ESgIjrp>k#=?mky&P
z{yBNE^M2lgh=1{OzSUjB#al*qinoX$;}XT<Eq<N!4-xRis{|k2B7-~t21XvGC4=}h
z23vbo*cMfJ(Fk#6T>ec0=ovp#ghx>yq}(ok!{+4X%Hw>_GR3l7cDI+WJ+_N$xcQW^
z91GAYgFw2zMQKyT-O^@FZC8Am8Nv1=Q>eY2)M-SN5wOj4V}DJ}7}00E&D30f8<bpy
zo~f}4P_BM@Q!1axQ^3t10UfG^_5{4GKA4GP5U@)cOo%4^pkAa`%)n7&YApJk>W8%<
zWKd|02OI1aA?pbtgZ66(cli%O=CHXl>J_&+L1u!DK1X_;{~%;ifm?%p6>z4|wpWBK
zfB|R9MnR^a6F^EWHKqtsV<yX38$u?kT<L6#Odys$=M!JKyniRI*r490>2FB>0C(lt
zZ>Y-%-raBV8zcAR>aE%LZSC}<35@W)-_=ID_6iMSn*Fr@Y4-;oz>%R}e%;WUJDZFL
zB30jRRLbMqtm8Np;@k69QN0CTr-iMx(fPn+_X@seaYrTs@G40d-FAZ{g7$WE6P~FJ
zWr%-hC?_^Ig7Z@+{l2WuyuB8;^GNm7>GAtUPo~mIv`c{a{Qz)4oIK+ZW?KK`V-_iK
z^B-2euC;daA8~oR(keue(-<ue&U%bCxdDKF2YM|y)P<|<E(pBT?U(AL^Axkikc%dj
zn&Zs-vqqu!B8JTZCb((9I*}uVIe>n<9H|3}(y-?B8n~ehv^kZ!9Qa*U5uW8}!X0{X
zdJv7b=^^tJIST>{!Z1n4z!(BR2Le$KjqYMBV;^4CVcSFWq}YVOOEHBD77B8)uPVKu
zW0Mr<&+i(A6r_&@{vD5O;~M&!$TlnRrSss??H28-G`c<XsgKV8{<q`4tUG?-or(rL
z@(bUhf4}_ZC-nCdWB);3`Okb}TK~R2Vb5><-QUskJHBK_&$*83{w#gJ!GGk34F1a>
z8{EDQ2A@6iiw~-wPaXXd;rYa$8lFw<5BhxiuNnNU@BLkkYxrLpo{xOBJwNl6*6;Jb
zW&OVNE8hO^86DpKt45zE&f4>5f7Hf1^24_`-h<*lcE<XB`3b}Sj(=--UjMi~zvG{N
zR^xj5fBx{m`Fi4p&F_oTzoquiea7HC@W=MuGw=NZ(f{o~`0CQXX}nv%X86DKPYnM@
z{<G2fGpFtO6F=~!!sq4RFnpfcG5m+$ZFqj><9{~vZ^Hl8dj8BWpVz!S_ie^+-Dd{V
z|5NWVI*k3`J4B!9Pa540iqD6B+vq%UkJ0l}Ge*w`{;{p=k@p#&y!gq%_&oCtgY)u7
z4WBdL^y<#b$S;3b^m$;`=ri(`R~P<4>Go>1fAX8YS>t-?#ZPNJKJ}c<<5O3So-h1E
zqvyyU4W8epUT5#8|HRhOhrZ9~_2P%81pmn&ae38xZPM+TUp4-J;rng8FMQg@v-EjS
z2>-2#KNNkQx##xqANwy(&!<d&e(1{#&PSX+U6-q8zRBqJ((6B}es6t`(d~twAI$$v
z{P6sF!~ZT{U)O*7ZwhWx`@5bsJfHtxtltNI-{{cP{%PO8?)qWJ^G^r2Z-Vn`J-_Qe
z8T~%x_&@RsgYkLhi*3AP-(~B1=xc9peqSy8o8WZ6(bm!Q_Zojba>4L?_VaCgFCR5I
zIlTVb#J_1=&$;}$%k`P*&l;b9<ZU*tJKp-6T6dp$=(Rbn=Y9YB$h%E{d-hum&#gt{
ztLuMi^6=T;weej4f+w{8-u@nIKlZXce`dv=4}1G3zuWk@iEf|k=Pw^Me4hRvO<tY(
z@!OL>O?bZi#SZ^xY~OkMKN=mH+BZFa(e=+Qmp@O=zV`Tp41ClFFoM7LivLeu*In$e
z2b)6wQ=J}e0_&~zX6NV8jJDYLQCf|<oUb?8!x27v#V|R1255w11BhGGPe_kmkFGKp
z+6zZ<9y5C}f0=I>8@D&e#@^Y*t#0RgGPXB&c6Y8V>%?F*w&_6ZP0u_yO|1Ae57xnq
zXSY_3$S&RMb@+g$W$P4w$+<i~bHTFQ<8WXzht3OprzbkSiMhGn)Xas6x!%I!#Nv5^
z;P`SpG4!%m0H*+C2s33|IKZS{ILb@n00I^?#;;N8=wo@5%w9JKOGLCg<J5)u9J=>0
z)T2q?qK&q@Xb8Zm5L`K;-rU89dL8<EVQx>g?qd;>6sd(}+^*PPyHOq*6W2Agf{L>N
zw}dpka~Bshcw-7VDRoC4Iy8TDF@?ecPD)?_e-^NCW{WH(zooHT;0>@xg*)JeH@e|_
zFy!*B-s~co6^_k?qo>IlEDRA?mYl&Lwo%DG2|NscXW;K-m<x+OP|zyAj*K`NUc#Y5
zLW@Ws{`_Ts0Z-||QQUxwe&H(x9tj0DHg~VDGAjYjQ#hTBLSd|dzmkOj*QyOQv^n3)
zCoFBtqaW&T`Ia*S{IGEP6d1B&x+94<f5X|B@<NHb;i@$j@HIBcPv`+X!;jr1x2W|_
z*R4S-<OJI=qXqW>@+VxYX<v=QK;W=4yNd+C)qO&sw7LUDK(%IAVB%sCf|tlndF$dn
zPekx+xM2uE2r@h;8JA2X5Q29ZoNUzPWtj65OTF31J8(Hu5VUwkil?=G>_DJ`aDf86
z(uP79TzR^artrL~;#A6CoFSaMFZgo8838`+zzBs<h|Gup)>O;+WU}4qEX<Xqfjr>p
zAY5iA_&^kj)K@wmkRU?fiWh5R8FnsBU)<>5u%}r54M&3P{E*lQ(JT^AMNSaMA`opY
zlRb)N9xOF>GRD04(1q@mg!FLRgX?t4jE4f{v0vU@UExW+#m&ui3PZ%P80R{}bS=cC
z(82O{fBEYADqq4+ikFBwVbU<8ixZde|MQnGUO-F=#RjHkE-frxnV7qL9*?_hk4RK~
z(}nZrE?($lZO5D1E>6!}%9~=7t_Pc8K+%UlRzuSq1GR<QwH|DSftn)P2l|C;zbFp<
z@c$(C<6T^eNp{9PrJ-I8s6%YDTGAW9C=vrta}Cyf#Apo9J|aA`W)pyDOo}In-9Udt
zYqAl=migd0Rfy2kH_gVbmL)PppcUdHW>XI{@16w3zE|Hg>s~DtEG^itrhBj^Kth%`
zz)ZRiO)Zcbc{&0ux(_WGTxC&+ni<CgmL{B)8E`DNJj-<r5m@6avr>akGowM-JYSlv
zo9FHf$-?>#IR!)OWV9GoH#9F3JTxyxoVG3#J+#i|9I(4QD9>=xK5_B(W%38`Wn{d0
zNvte}<`ryMoPxop{bFP7%c~}UuV7=%%PS`|&#;*XZG=pD^@P^>G{xpkvzp-&TQ^N=
z8I^gPrlwh~;9~8e!`BnCjEpyLn$-$6q9e5adgxVbtbNn8R<N<=O|x2HgC(vYDnfC4
zViMan&1Zo{Y}z!J83x@MvI(Mk`$54QH_c;)gSCZb-7LSD(@~aSuuJMBSZ!0NbCO{&
zL~;?igZ&Wyf37nH@Eo6tbynnJ@*WxzcUY)t!LDH8$rz6|-3b<s>|2;CQ&QQxz3B;>
z{j~pS_Xi)qk)f9u|F1J=Wy>(kEwr>jFKn&M-(2721KBKy>gu=DIKxPGRg1<-i1MfU
zVPbsn4yHtHmj#WgEWvzA_x_TV(SnhZE4|n@N=kaxQ8>`=Dxpwj4hS_pU>&sf7BfxU
z0E_l@G}2fUIT+YcBX%DHEF0R9A_fc_fTeCv72l=-Rt+<&X!|99)KKPS!~jZaAb{JQ
zL{^1j%*wSPgl?s_(q3Sh7#mEz(cePO%fe9{%TQaH(mq{M2w<<o>55~cX}}`Fk+q69
zZnv_q%v89xKE4&>!GM8*V7XK1$q{A_jTwE5mmZwH*u8Xd5`0<9eaNz*LVrR?faftf
zPYZx$!n6RDq`73BK_=k+<mH*U&iPA=@9&D4lzJ1`Xend`FgtGaEz7(%b(!h}{sU=@
zj2)1mHXn?)s459;%~Qs(>X8?wY_BztCnR{am=}ZrQdQACI-0eu>-|{3ss~;76l+&$
zOqeiL_gOf)4pZmmPD3-+<!HgsM6<2+##We7xGTtoTTT6e+m%bjHHWtFB&iMu>kHAh
zVuhf17o$lkR`BuBu!4{AV0kpE#KqCT{34oE%W6hbG^5hjG@7CnbIxi<Q#2t*Ff&Zq
zR?VZqpe1)%Tn4SlH>@Glg5PKv|HVd$|6>1Bp($_ysX<%B?je9&_0J&~^oo<lyj|Aw
zF~G3&MM4sQZ<r89X6&?4TLLLYtH{zRY+l&RQFN8xpkjsjU24AKY;l2KL*<74TCa;H
z>+8KoH@C(AU`%oyxRR-+w|WyDh@XW8P7L!EgL97-HNNyx7%ikMa`6%@-yny}%UHCS
zwrI}*%qx0yHm7<Rk6<EaNG7%b>O2--S^i=R<ikQjl2G<X{tQQ;y>W9xC#?t!Tiw(d
z%W`rou5@I%duK56ENO`YTfD?q9VMH=>f_S$5xck*L`!2$bD{V<jMJS4M0i!r<rZo0
z-MqbO?LkpG8nWSy(VQ_<x|o}6fFyIf7~#BmXFFE{IbjT@BZORBSfpeWa!k(}ZAMO8
zG4uBPq*^f}_!|37^VgszFm+zwH5m}|L=vO8jP$Ja%^MhR!nv%=TQ4A0$7N${_kG<R
zu=^?m?e6yGdiH6^0kkIBieMG0jJJK^2!Es&<80i|o}=c1+7fFEZ~6}8Z$0^Q?^2$J
zJ<b2ib%0f{uz2bG#5`9(n~R>is?}H-c#5%nJP{K!HacE9$!DAAOoz-6{C}Z-OQ>T5
z&sMq8k2P`6JUr0&nz@Bi&Y-?%U+-L;;^U;y&&@V`?F(i7Cqw~4&R|&4P^eIjRVz1?
ztFaCVHIO;UV`Q=_*qEG~qQ}-ynY3b5M9DB{CsT^Bi0N*jAM>m6OVGp|=lFDEwTyZQ
zf7mKSIy^oB+cmDJ$*FY~hUBtmOOnPAMs1uTU9mSu-I>u54JKB88c$GWdSQ6Gv0K6m
z+n&D+1&x?GshmgHJSg+yL`4;z?ado$hA3hrAwjf1W*>kyJ`0y-&P^lLa<zAPi}-;w
z$K~K8qxn%)#6L`oO%}reKcG1b5^|Ax#uLGY&0%=v!=I*H#-28Ff@>br34LpMyIVly
zYmDEe1eBujtv)u8Fnb0YH1L7O29r~vw2`D9g=8xCq`@YLvl}Ygf%(A!yA}3@O=7%b
zm6>*&dtq+OoE(Q%NAyAb$hj!%=)BmTwR%mfWwwHzX&`OZ!m(lK@^M5!Wur9dFjAbD
zqL$ro@0>>C#10lmW=i=VhDwQFKq;S5S|`4*X7oiI#lOjW0y%7{g;@cU#lb^qnL5EL
zX-O6?3=tFxi@dy1p)k1B$We1}8RiKDA`B8pN?99qhmxVX@-@wi<lGAm%IKOsT}JX=
zyT!&2z~C@zatDp{KpP~iS~}5LEtPe6GkClOCLF#g0ieE{0Z^?})~L-OWEkm&$?9D|
z(uy-!s(uR7r2@-tK+*7U2naWYRBw3Uae&IF@lKKODe$WK6vj_w1j9>NKM(t*E(R#Q
z(?#}BHjFvYlqHihilp~Cm1)bJlJ@^G-!kvkzghqP744ey^AzT*Z9m&YL-XryeBCbp
zZy1Baf|~1`ySz9uJmTux#i{#Gj2^qEJ&bE--jg<%S(v+c;lY|0Bi*y(qhohJxO&At
zOW<b!M!Jh<Ap!564-IqpBT@Gn>0X+dpSbk?V`p2ANdXdM)gCVy>Vtym|E`fMQxgl_
zsS$0}_g=wfeeC|$DGgzwLw$SXsNXF%cJ$c&!;rPY<6YPjwN~fnClSkafJ$m8`WzmC
z2EL7hSgRxLGxwdsSTTfqhUf1YMwvPP=doi&d*Em#{hau%0G66g(JUoyiTbT3>Q`T+
z)aTm-elzuJz%)=l2g#Aa{zHs%{@mt97#1Z_(rrSm(*?CANUrgMT%7y~84Pg5jI{1)
z9~-`Z_+)}U`;y;eetvOzEikZBKGMz#4xYg&wu=|`!Js9+16#I6+xy_(+g~AasF>k!
zKP-kl)=AA&+*h{{pv_?_&Y#a#I7(dPvr!OeuLW3I$0ah=U{zh7`8UlXqe{wRPBHOj
zkexq|i4TiMML3E^+2YX*p0pXPVQngTXHSBHb??q{0ZVq}te%ggPB^t2K&F#T3f1(Q
z4}Va{PQttiDI}X6>JN|W(4w84zcPUZ$yXFJW25|~wK};{G@>q5G(^nKo2c^S(#Coy
z@lIdSS1zLEL+6pLwYYHU;>E>#SC)5|@0G?iOK%yAypP2q?_@<PcrFy6PA?pVAip?y
z;lg9XXNQp_AYqKD3bL0JPH6?d#4#dm`c@%dplSnD6v5-8r#WBu3{#?<8a<=Q<A-$l
z!_PP$1(WiRiVsiNMBg(^$$e_n_(e!n_YTM+PA^e(*9(UL1v@^PTR01y#@?GkICAWM
zD1O33{syP}>Z<mtNOhjqG^$Im1^z~kQ`5S2!B)dZ$%?Ien+Ud?flAC>Wyich!i4#Y
z()>ZN4eX~zgix^M-*6@+_iOZHSSNHCD9r<wM}5&A*c(upU|wXpSDhMIbEzK8jymNQ
z76*7MQMa4bV-~NkG>_U|P(mX*nQjj2q}03AVHhWL{R}*g4$pml9393<4E9IWG+skw
zR}CdO9WYBuU1K5`E}<utCwPsluu9f)8bK1!h%g&~&S4S&HVS@Zqw#hc5R4akh#h4*
zf16OnSHwfE-3&tq$CvKzrGwXzBx{r=D-b-thfwxMIQpw$FvL8-hS)L7D$Zv%eXu`@
zicgU!aMT-7_#?+F7--?%%LXJFyC_>kq3Is?)4~QRp+r{=qBJE;$d>^djH$RP6gEGP
zQ0LA4lE|9%gUqtLKN^<^-{jwiu27f3=oud5mL|d+C19K#L_F%DkrccyGaE^9`KYqc
z(z(_Zh?b9*FiV`;J#eExKZC}Rvc`S`W5e~D-ATz@HXfGGp;(TbjB$PtZlpwJ8~wYs
z8WA0HMn}McQLgM#LEUtqn)+f#LUB7^OB4Y!<3{~pSj^gzPtvwz6I~NP2CyHT+N24`
ztJ?mWrt}48NjE8o<mnqh<-n2jmje?tjC%m}VvL{Q85I-t67V9PWvlV2U!uk!Mx-4g
z7EU`Rre(`NUKJn;TJ3;zK^O07+^hZoMV%EQ;190zY`qm<aNMjWutsXyk947+A<cf;
z|Frvq58%kqfB(jzH_y)pCk<*3fO09z#2%(ebKMh=v3c=c7?5b9d|=$-J?YOlOauMd
zu=dUcd3<v|jz9sDwFoR2$4dkt=-2A`URM@a-Whp4egwJ>_(;)pq@H0^{3t9Crl1Y@
zOsS;IJhRWRAQUY`5dwWw%UX^f2*kX&h##B>1HKV@a3=US5j}VZn!hsaSP(`%5j%)G
z*Yu%GMn#e(2wamqe?IeGa4n~%Qq-N>t->IuJ$^F$GxZyA*39yD(=w>2tWl5yZm=!u
zbkV{`RP(k*F$|VdG7c!)MTdiQQnYHr10+XQMY-f{w;<^G^M!@csu;}$#l`}O%-|S5
z75;7hv9b%Jb><j7YX#P%W@64pKgNFT*{UOMB-*oe?+SaCZwow1ihB*kWzW`tOl`Da
z@t2_G2E?F_6PG}Nn`mSP?Fz3zpp{w}qr3#G(HdPrP*d&87O9dYFwdb}g$g0DMg=rY
z#pQ7#rY0{%cIzaNSb~DtJGZ>vzlyDd1z1`%Oh>7?W;$HMz1_S;p7(as)12P{-@=B0
zYstzg)gEx9YUR3X3;Re7pzIp>OqIjp#|P%XOB9}{du11fN8PSa1zXr(YQEp6!qh?{
z3-VYr&9%Kl14TJ96xyrv&*O{{`^MLn{b3H)1Wxp=vlLvS$rkz_qi?ygWw$VKhsvka
zJ;jQr04~r{_`*nHlMruF=eAb8$h>AYr86g7VXAHc2Zj|hkaJYxNa~c)VrFz()S#J#
zMlaerM}jCxL`WA*Rr`(<EfF;Bww9qHLu`d9josn_>T`NMTI|3z43Ux!R*4k)hWR8z
znIW4nLLk}0)!y?#lcA8`&`j`POH`vpy05rOv7+n#;E_Wo7}z(yuGldnm@^0yywLx^
zPR9ZvsZS_3HDhBJ1XT&7i@yd-pn~vqgQozi&^?{EFkkNNpdhS~CvBYYtdS?+JFa1T
zTVgyE^mWdGdNOFSVCEyc$9@w*06k{V=V7fyKF*B%HuML4-7Lp2_p$dn>Pe857rHGr
zmB4HgU(h0I$R0`Sw9X=y9<X%L1HLJE2KtB6_;U7dm_)9GY!VY<LZS~sE8A3z7c(J%
z&Anz56UJd5$d)Z!r)W<@hL^`x_mh!*2=B;8NFt~a-jSqb2~raMP$mrZhI{I0gQn-u
z8g84jyT74$U@G`Yu=#c2TQpoz?p$s)c;njebfaTxMQk6U__P51`gxc{**m-a5J@IT
z-GtQ5-qG;03(oDX)D$F*M!&mWG126m-H%F7Efzxw6}uS~&RV`>kO7`}{-pAifWWpY
z7fc%tUB1S;@{8-CkK?DlC)fM;WLawfr%eXQu1tkT7+}ay;aeI=);DK5JjJwmKhObV
z1NClQ(tViV>6fL#w+Qg0y^{ox10ayL^a(P;5r3iWXV;|i3^RVJZ&3ro!`DI?<Hs#M
zX8*sJKm5;;p{HU0H^=|?KL0=2o9cYS_O2=b@>D2!Y<8iC<MG8^aI~Byj=D)+KC%|o
zczSNJ)mddtPPAD#I=#Nz8bM*rV_z)~0&G#d?C;=)Keh<qJDpw^$&P%4yhNNt75K>>
zp2tKS@Qhc>n`Dv;&wV2m-A)@R>9anG^TG4y*i^kMRl7(4OY*kBX_f?=q?keI+mI%c
zv4iKPq>1C;`E}&75oHcN<Vb~afD3uYfeoabi3q+l2NTS6jRoZGF7Dji05nKP*5q>n
z%&%{L10QPadS;W6<$^)N0RhgGC}zQ>Fp1z}pRJnk2m}(sBVcL@3Hp~Z>0?*X$y<2w
z!ug2{56&?YAN-6XJ2=*Qe*W?teeK|Cf6!f=Sa?5A=`j@>==ix&oy+%gqg*9vCw5Xl
z2`hl%ZDF8Q>oj3uiP@7N=fM4N-QY33Fjx>Qjf!DlxvdeoH6p}Xy~qG(>`V(O14}oH
zR+>Qq=?Do?iU0``VSkW#0s}rhbVQsS4kd?SgvGlrIAdoBhq8ol#zwgU(m&`y7-HF{
z#H^3ftZA%RuF?GoQUX4lpXM1tqTn{~m_)D!eIZ6kK8=6G-B`tKTg5uUk5$}W+}zsy
zTFCvcXN}xs5!*@ZNnBpp>+aejMldI)se@nBRSa`DtYQk4xVjOrNuTFDjDU^vutCeX
zA5k3SOOr=zX%ry2E^Q&%XN3fV8`lBa`lI~u^@q4gTz~di7!|zZJ}R!X>~snOHS)O4
zE?ftL)A)y<9Ieck02eRV6EP9Axv_bUZ|O=HE%`)hJS@R`Qg}Y{ZxZK7{-Tr~lsi~}
zK;mEu&bs~jmukFm(Z5vpuJAAAp0yIfHKRYwmpIIqILw!bCrB(2?4XP2Fkgb!V=&<I
z3<HJ9XwDqwOVBLKGdd3QCENuSygSj#&wS)r{8lL(w1F!L5Y0~Z!+eR9u*Fi%!p?D}
z9_CB%`~^KXH2E3-zsGHV`}ZAhcxCqg($(I4|Hgdp#8tZq1Df|q#*N$ro4K)Ncb+Jt
zP6>7WovrodYpW|j2^K#TT{(X4J^#Vg8@u;*uRp$X@51iNg-z&)JG?nwHaHA40G!*r
zvBs}(-W6XlzoYck#QJ*aLsYC_Vq5BXpy@6@0#RSS#bf&6-asI4iY^Us49kwG@$eSS
z_@-l@2B$C<Xx|$cBM!U{fjYGEgXvGpRu(Ep2xS^$qAg!%%q;_9{BIN{stj2Y!(iir
z`0nBs&qWaktbY0sNPLZ8`PPHi;d0?H_*!0%+M~H;D;rJ#q9fBfG36Q2%uIRs0LrF3
zEZHi0=p80k9D3q3fw^n5acT9xx!K=dUAeUU4PpgS1%^4$FxS`eIuH55nnj0~`q$`4
zfuW9nTv@d@DmWsyjSA+$4Ir0-&m^1E<aY8T)Qgh?&j2n`F!I@)7Hkb)!PKb}Oauv(
zcbgb)0kes#C*yny$Xpjzbj1cd26n}UbssHHWOKSPYyHBS#YaFHt^&Wd!a1^dLpKdJ
zVc?USma5mcbhW*8{km*RoGYP6$m%YbeTjS*kQMQjXkTI{hkbci&%<hlO0PMr=K(J+
zOM!xUSYhF?o(Gl-%LatZw!?ZJ%xpcZ=b`O(vQp_I9Mxt)h;pruaPs)tVLgw-dLBt_
z5+1H%9@1ew54Ta8Ba?^qJgk}kbbH*+-X-H4*7FGE;9=>M>N6bH^XQwsKQweav;TkN
zO|Q)UpBxL(K^V^p4$?%LTi&?3vYZ9%Xh8E7KA7tu49^tm5OZeW&EnBxJ&$0+H86D=
z=TP*8#qU>FU`eZ12|NZ<Cm5bIJ2y3QnGc|pme5l)vX~EGaX-f{Ng{xm#h7M-I$mZ`
zL*VB|eev~_>Bdo9PmT%EBsj>FfLLS4Xo9x|N+602BM_|ID_seJGDV^V-3WDlf`VA+
zWdptq+yd*CBvS}zFX|Xvxwtj_4m9^wM+|GH6xM&mzJL(cXJ$ZCSYIBQG_22qG47VI
zus)Q{QdpnHaSZD-h%QW(0R!Wow+-VzbVu+KUk29kBL&N_zH)%zRRAQ=SqTEn(=kX)
z71$Rfh4sNcjJC(HKJ$14M~MRafn#BPYSn~OJHra=Gf5#KW=&WhW3jPT!}^R}$eR||
zXvXMp6gZ=EX_r?jTn7b1rtx@q6T-SHcv%Ys3?B5E;!WW#V^V=JrZ1l)Psa*p*5~OY
zJ|tumm=CF(yMw%fPywju+7pK?u^?OXS<(^{3{vrfm-&ifl0jIS$#Cdo(mJD{n=1)A
zR@#i~xw~lD4@fRRS*t>v`HE#?fq35O0;!oJK%-m;q~1+r78osxuVSVGcq&wg0&*c8
z2>}UQO91(R<yBBA$|yu8av24lD29t*M4(a+cL(@@NCOwA0gWPIiKRAiLO*N<sXWBV
zGh-qOvMgZ&M>6rKZTM|%ZLyZq4#WdfCs=(lq)xyjg(Oobz*8p>0Dx;t$tzmkhbN6o
zVXFEhWF74ct`3E%RB(v0iDwcIPa30e^W#ds_RRCclg8YUQjR%1X<T1`fLcvVwS)Ys
zJr4R8`K0mTdE&-H$cN{NVP9akK0Hrc95gQFUgil~bnGDbERwyl^TfgaPcKD3GPE)<
z{(tWJ^7aP0-CAGWT~$~X_#gxebdb<JHS-|;2@_{!i;?0E?g3nxnD60cG(4tacyjav
z4zd-0q!*vxU8cbSH6N`|_4AZzzWn-%xdnPC=Ztru@F(81J7cT6%YJEma)<z40xv|%
zujx|g;#jtS4=;h0))Z*3D{Y|RCGaw}+OQbvXJ$HF1ffW39E?ywvH^5t4rh!-Q2h^Q
z<-z5Rjpg`#;)3gp;pr9hYLQ&n1T&W7YcF<hc~qV*0%R808BrT5j;+)Tm6dhbW0@RD
zd2vuoO}hQDg2ZqZu+A?(4TFtQWN7_PhjPyaR5%A>$GsIyuPDM?gVxD9iiA$|canN=
zA2Y|(KPOj@vqS<$L{fRBSy)FP2b&da6NrOB-6~KAL1mvA=2e2haxbXi6AYICD+r4i
zfe&?z1a5*E_b34#yiCr;Ftb@~RUhyL$1nC)-okj@_%nP8GQ#s<=oo$S)C{CJVAQpR
zzC|3Jk$^FaviL$JOt5fA8pI4NClHcD@{z&|5)1JH#PThH07<wY*>+*`(Ou@(q%=i_
zgxCSEEmHs~5zG|Okq(|z#~MMx1DAhpo~dBd!tQn-sVFzr0tMVYW38%DjT%}{EZw1l
zS-N^4OWZ2nGtcs{UI=TG)GCOF^+LEa9@Yz~)C>8xzx76W_`T%mVZD&S#ZZ$YF~zAF
z>H^sJDCb_Y^+Ja4vp~+)UH11Q{<r<hay|L`2aO$u{)_*4`{)1kpYkW`KyjSU|Fa?8
zr|`P)q5mD)hrjvwuznOBV2AaiD0)c=R;t1>kwS1&MPLu>M}>OlhxMcCioBzmc&vw<
zpEBI%`M$&YQ5Fd~aQ&ztzwdSVZvXy+hV%b8D2;xyEE`w?tojhu{PXLp*KpU*jhT+B
zSa|`t+1`!K-Q~5J4ns89Uyzo~ZS=aXPAR(*RBe~%$oB&3z!=O0wCH=_0Rmk4!{E^B
zYPA2gdxyAG6iWor^8(Ur!SSW87u8x;p>HeKO@1uOAM0N;o!PS|%QczL-p7i}R`iNR
z^1?M$cAF2(Sql>8csPxENfeVF0$J~?t2EazP=bYbAja(KL9jlz)#Zkt2t#5yY1EEZ
zscRfX0J&&{uflFs&IN!neIR)u*9Y?hJomk*1SpaPRB@&o#k+TvTo2vo0sy0WdXHy$
z2@@8q4U{A>kZ_s|23gDo%zo5(A+mx=XADjs#B}`<N|QIu6~<Py0Aew{6QeDa?ndSA
zQ}&Z{1FIi^K~@}8F|xwkpTebFW=o4Y%%Fm?A0v~z$!g<j@dfSuU^<tuN#-yb`J5C|
z&n8AE7*rg8RK>)}Og>E~QTU5p7h~tYz%{V+g<h$%FdGR8bbLROV0`pcAi){yjR56m
zDS?{2X_d_Ro}3dwoUqFZ?ok!<Vlkve%;{!3cE32E6-E}0h5@Hs0>44vl7jhoU_xJ%
zuqg%>v7%SuT_oE$rb^4M4h0Z1!CXbx@4=nxy{XF=M&|EX+`hSb&(ZhYi}@I7EgU;~
z42)qz!p$63MO%wDK@e<f2#S+I9UKCUd=bW(Oga)OEZfX^CN5s4Qk)2vF6E0iBhwj?
zsYDNUWZZ+)3e*tNQ4jOVoYb)?Bu+pQx>p8K?W$Ks7yKkr+QQ|moISeMf>R-snL$BY
z%dGK2Kkz?VJs+luplcPR0Rs5Rk{2Kcf3gY=35cJnf@42b1;>7>5)ErqsH~sY#$k;<
zFG|CLdu=eU72LC5T$33tRzXjtE_eqWy5t9K)FyK5RhiC!tIV90&S|qiYj_&#;IvtR
zwGFl+1of_;*hK;`Y$f<<Pt_YF@|wz-SwWvRgj9fll(5hRWOsz1-bf<V@$z9|{z3yt
z-v9wZ7e6r{Yi&r>_*7#f4ciEo;4?O0Eh?j1o3hf$zyeW1Y(RmiG}PFJI|*95IHxG=
zWc8t}-Wr3GUe=hmfmu2RlaAWpH&$KOPatdMp`u&QYP3(QL=-E0;60Uv(tBeoa-f%q
zD!r%AugwaWcul4(zgD>@)oO2P(=WZZl2I(z?j@tj@9ldl21P0wrr0;}Q%Gr^P$2{W
zG*8w*^P~o<3sr(@wV`;olh=mw?>Tq=z4|h!oH6SQTUTr#46H%TxV=6U5{1wOb|QSH
zl?g@-z_i7b5Swd{lb)>X?lq$PGvS~~!o~myLLGYmeu{Rgkz+`*NRB^+<i<~Zri?cG
zjM*SQAP9!ofL$2ASi2Ddx0w=>(}p9L92~)+C0GwXg%|nG$IINE@RW<hP{e;LP$|MR
z*-TW?)wB_Y&=ILw&%f;rYN;-6X4D3S?Bd|t(8&TYe2kw0#zN=er|2L`B6|u?#n4EV
zszY<yI<Y2{5(W+qec+~<;|07vRHQmNSy`gp=LI~8pJE83poWaRr}$KpK?>{oTc1OC
zF=7J(vvIQEdmG6=Xp6G#XdqxH<&K{kCn~k$r)CDV+0j;*qZm7$ic+{(Hhxx2y|x=e
zQrk_53*wf;gYeie)U`U%mSdf0%dz>=mSg>~NUe9x^0SU6E6IkR8mIw_RMXsx+ilA!
z;bYqlrVK(@+m7(EZAYW9ZAT=rZO5NR4B9L{YJ{?FM?|%4M?_VLPn);4wjF<}DK54h
z4brw9gP?84I@Y$Mj(NkecV^N|n42`yhAC-g03^*c+qUcY)3~5)*Adfd*U@C#u47ct
zu0y<__ocPD+PIrRH!@?g?RshLG$qnXByl#x2c8cc+Sv6Wb|**Mf?5x)@(R$MaB+}j
z0`9O@d_0O5ztRoSyf)}Wyfz4|tnG`d1UPg1;wmX^Uno95ubKf`jVu~a-oQc&+rm_1
z-YOji)QiX!M~Hi-2_h3K0ff~g#QH;vd>acbY$Id(dwC;^EhOErTG@gtz;M>&8*-X_
zYoN&w_WxLB|KED`;{OY%J-3C3VlW92Yy=%qW~<xp_Ay^Dz2;P%4%~r)WqhU6`m>-H
z!mn<P0RT)&KI0JpwPITD4Ici-A!t5_1;P8l@jU~WXsr|aO#J7w&ctPeXrr;Km_DB`
zENtFbf1KYlD>(Uj<0c<6?#zcmX{#^en~FVFB5tF*seY^_w0a0d01V?z>X#D|vR@nS
z4NfRA9cux`OL%og#fFXvGi$mtW&?po0HA54Q(;c}HcOkaWqgAd4n&wno7^9gOwcIZ
zPDh3>@+GEm`xYO|#36uSFBo7@AQ&)RBr|;Anq2_KoCP*^Vi5qByq-m}(4=NuJp|lu
z?yN3eT);yH)vayk{M_OMG71(JJgorAO-NQC&0{Siex;Kgwf8Y=dQ@5vUI@q6r;KA(
zGCk2n_tAv`8ym7fwlk~MDbod4ua4e5J-sw~cc@qQZpWAx3E5%$<f>+c%Qa^2j9kkq
z0(zEn1q%o?a7CmzzNU2?lcPN)0?HOXMMeaNpq|*!Myj4Ty;dNfFEGJkPfa=>B-X3u
zOS~bYRbR*M&5;9j%~prLCsCR6FQTG*FCd__0O)8i)tDiKM$pn~3{al7=(L^fFWj8G
z*<W9g1BrXxC}o#aI$aRc!ZV05?f($eiLMl6UR3II^-BvIAKIHH$Gz5Moi=uFP%C}s
z+LG~5Q_#KCI*CqG>kORKIs+%Q&VNeGN+wIKGZCMwbqT7|){Uuw)H@7{6gypa(~@Fm
z1D0Z^3v;B{ndFyZXBbJbGZByfhGFAdfR)w-WWpYRFJc4rtC6Dj&{m3_0h3~9h)J=t
znUG?Ky&nXUVrMu?vGdQ=n@AzW&XCL%yMz?BXQCwlO0~0Yq}o|GQtfQkq}o}JQtkYw
zh6;vtZ-U`0Z-N8kP(?R!fPR%!yMU1?cfd9%cf!n+JB`GYJ9S~ooj;8@m~y9%O}Wz~
zm~tlynQ~{JNxAc<RPHqS=2OtvOt~`%+RCkCDR+W^R`|+PLd~r(*ZyujXn!{VQtrgt
zrri0{xU@{U6YEO3Gq7?g7!{=45w8Z90@a+_dwSXk2D)#dq7p$sv@!9fiE-LNe0Vp=
zVVR0Z6-<dOZQXUG0@d*|Xl;W&V`^=im4^TrGB}>+YSSth@S(25Y3pVqeHau*@|HfU
z^_e)9nhE+z981c{L0{>}8FdP1>-;JnI-`-%+?#M5httcyBaV>9@uGI=LD~Ru-$1y2
z91cahD*Z&_tQ?11rgS#ef;>@S8i(u50uj2Q-96^xFlS~?x;tMl=B~z9*!xeOGW{c>
z#Fr2CZ>(&7L(lG~hc3)qPwhFe)nsv$Xq?HM*e26)8ER5R#<7gz$iiLeC?eZ$ui%s;
z=6;+>olq_C{cI~aqBKqo5bsjBlQZ3rm^n^$5X+9Q1Hn>y;g!>?pb$efSTZTZaMyb}
z9#9NpLMxk|OV?Gw2>Rg+$_(i_LJt=%z{|Tx6Gvm9_Ar{}%rXrU{Gvgr+7px%wgkDU
z^9fF;kB5lFv2*BjdQC-2C~C4M!(1_&^Q5*Su@5UpZS^-c7^_G}4b{<jAkI`6U_2Ox
ztEod5ldh?ZQ;lq>5Ue|Nx)Un56>yYx$+4yL%)Cvf59Sd=2Hi2sVc1YcxFGS7rzm2v
zBQiOTnfHr##-T)3b&+xCkD6j!|Ko{?<8Yeoj1K)JH;5jwzxT?g`7zI@`N+5biBe;p
z`<<UsKFyaqn2=9%r~f<r74m4p-+az|8h$s7|Gf+UJ2J%k*azJGkkl5mn;(uRHz`_~
z{2+XFXp6j1y|%?KVemT;>;j9rn>32zda^OAmzh-VLcqNg$xSxdwH8*LKgAAhWePKm
z5A&H`u|jOZ!KxAzh~?_lBB615S!K8y1D7iJwH~~N3+6HurmVMzn=Yb>WkBT&t{Fbi
z)Qu?xwyN8hT*8yz=+NT!EbP}ZPqJJOw8Ltyo7lS#Ui6a;5^J|+kRxC(@mq^O{Lhi0
z9~gN4|6uw5tg;_3>T-jQi<#tx0h_LUoe<S?<SSoi35#>O^N`}h#1=xYp0YnZ%}^|f
z!yQus571<XT|gL89F7-~@Zm-8+=VMRy)24)p19(<=7Z?TWsiNqEH&DHi<`3e<sgE{
z*F^+v)b5$NaSi`1nS+%7!XvdD(Q=)c&)t4!tPLX)POS20AV%f0_z8lwJWEiqJ-J`t
zE6{LDgwk#ZMvjFAl7V5o*cad(31pJX#fD4gLF_%6!5+y6wc%Vbn;&GMa)J)SjsP5&
zw>ubFw=W#o4R=kO*qt4BW>ETv82RFMT9tvZe6PyT1d}u7Zm$SA$@ZrWs_hIUZxz_z
zr_d>%*#u%2pjFQR7axw^EqPO+DfR-V=^%8(KiDIDpb0~Q0CXz&?(RwcPNmsd(I}3G
z>G`76;<ld!fzx3|GN{zKe@Wm}9gMol1Q9!nI`BF0Y;{U`n_l`I!YT4H++y0GUj@Ly
z8%LKz>y-J^j16qV1sd=?#MMg$qF7aQKR6m1c5h<7(|`0)U-a}rv}natSSTTms0-(W
z;S-pctYia%hhnPb&K&C_>jEyQ7GnVrEj;p&pk@?O?<rJ{hpPrKow5=k1!=+acA^9T
zk)5$PaT%Y$uK~`54hGFN`(xANr!C;ch|4jEAj&2i2^<^1wT>D-F~mXSfZxN&K{B`-
z6pr|r<6`|{pkf91KR5?A8lmiJ7%LOl8JZMnAq)p>086Fa$wxA2?Zee?GNOTlh^YDo
zyBMN2Gos{`;^-CJDyry$*)c5*F$O4Un6JWP1kXxUOH*}ZUr0+@N7PIyni+Z+HT@_(
zY8|woL{))Fi#@iy$v0d)m0qI=7^yZz-$;$J5N;YP-`&KoQ!Ka(L%M<liDHu}Ow>E_
ztN(IU2evyrR8V#^5K+}h5s(gNx<)8nF4s-7rj!z~<_fbGy**VbRy(gRAJC$6VSpaX
zOS|G7X0_c@%`^GhM7|33O4ne*oGzS*)UZO3v3i?g97J}RSRGz;U)|ocMkSQ~kLt8$
zoKYDXd8@b<QOP$reOKa)eXw|mM29zpri-(dxq}r^Tq}8aQ)u<_$bvTyZwj4Ut<(ld
zMRj$@lHYiMtcB5kcvC1AXLTvcb$)nLXlWlP<XF1P(&VSVsqMDE{rm6yr9t)o4rKp(
zDN4Gbp@6!l*B&w@V2l6jv#dTEKu6c^b#3zoju5N|b@NJpdG6ZW*xX#Ve}VU2Q5_wv
ztyn*Itp^=F9O}2L0A=}-7FH&z+b_;>D`&t|<(>Z8jpek*rM|kHzj;B40E)KOT&U);
zR}PP!10SDtHP`7b+Q8sk;(dg~qHb(m+Rz#roD4K9PNpZ~@mtzn2=c;ch|%D=F(kaO
zx`K_B=8s$Hj=~%bj}H(#5EnEf3eg*bcYFhS%4EWj1<SGuKsV&5HQ;=4V|8u$+L&;r
z3qfXtKdejv^j)uSme2dFqs@#2^<y}9I`Dl*hcZ(W+@=h#yEa-n7HG<FNNH{d-3rq4
zGhc(OpW3tZF-(GNg)o6U9C6{oR^KSZ$PrAZ6Zx#jcJmm&qUSInZ5$P5BKvka&P(t^
z09q|Cg%M(anlxrN_@sfg%`!EV;D7)V6l^_5q6K$8NM>;td?f!Gsx$Cb3rsc-5xCE#
zf~8o#KoewaKvRs;nNWtt^z!<ni0BYBxzDn*mXO&~u%)~cNO>o=RrUw4rNI7jSFl-N
zrHM)}OquXroW(oN4{4T!%^&lEEKj0VTKFWh5jn6?q@aYIbE;ez&T@5`6p4S!$W3=e
z@Lf8(bHzmQD1c3rc#w#I1w*DsXdi|LCJgNEnA<wQ8f71uA0kADkOM*~JDW;bIxiZ<
zY!_)6TGe!3KoXtFd7c5$AW5}Oo#p7vu#sF$WC$D=Q^>{8#Fx^w=)Z7DRpCRQe2_!V
z4E9)QGsnAO>C!L<M%pPzh#dc9ZGhmx2Vx7kJSdInT2FOaTbqxLhf`6VD?aaVY?w%~
zIq7Z}dkCExF7?F`mZ}BM2Ba3@qV`3)7U1lF*T;lboM7K2;QI)>1SZ%EII|FA;E0%f
z1Gh)$l$@iDw9k1C_)^*>GX)>KT%PV~g!jOPvo)LH2I|0m)Q2?$$1dd(48(2XILgBq
z5=APDp+SMcqfIlHkk=()fz%d&$jZ5Zf#n!+vShme;v!)eFyT{@J;;Q?&L_-+=qU9k
zxi_Fc$UWaFk>-G7U`)+u5LcAtzDkfXfnn6j@_@$)uvI3yk)45aT*>T2H38`<fdPyN
zR>Re24eO|R-6lA})76Ai;J9>yg+nWl_Tom$4#-G>q_x%S6PRgMa6}c`x^_z}No4Dw
zbJ0$lPidauKf(w(_6mcc3w|G#v?QV}CZwSFVhZ?&{SnTbspGC41bR<&N`3M;y7NZu
z?vrYkB3<ofVX9@q!Eo5rb1(*H?oDK?z`Y4?O5xr_CQ8-4iBy#2tgE!^)s@NR?Z-E7
zEGYg3p*yN-3`0ZDKeq6u@A#(T@1fuS3VRd&h60aR2SXhTi<iz%%rmvpE=&q&z^}Wn
z%3VdursV)4`k;AD@>LHrcS8>IVdgFu^<m~Nh!9g}vGP)#G~~m)rZRWU-X9to$B!@M
zKk(;GLo;t3dg~v2{;$04=ic^-xBbZ5X5NYu_G=K^_z#n4*0^ObCu@ycgrxl%HUm4{
z!59#%N!3iJTO0}xW3O~?k3*1~n;buxa{<c{35C#k88upC<}NK=JXe$iHk?7hzXBA*
zJ{$@gIuwXUg97!T0tLBv1_cSS=!r=|O#N%Yv|7f0ad{s8i=dOv!eMO00?66%(-!mU
z?Q=vf^a>Bwm`lnGReOVf2zB+2e=teW-e8P;qYX+QwV1TU4FDU_qkSBc--aySeP4G+
zw*iq~pc#T(C(v%;=*IG`-a?n@3MZf$S^ATX=+azA#w)hPTD>2yu;raGb%;QsPeh<F
zXB;1o?Q*8@L$g?G8*ktcwHX_|bLNy02<-f0qfFaN|44abcb@Im*<=<5ug9Ben?{g8
z!<|{}jhmKqj?_YctJ!sd8eSo=LS8Gbz|px_JB`im{E&9%ih6_ofYE_?z?`S0-9R~k
zL%x2vA7{6uzt(7Ncm)jrXS>uPl@$*)=a{P_nG!WHY~IqYVF+NkU?@!2z|p4cqJ`dN
zAi2JI16i2_3zrmF^hE1#obrUSAD{aDZ|8phmfxhCZs?J}KBIpR&CKiXmwxP>+W(*W
z)U-Wkqu0=%JN|*;`QrEdj_^P8|GYNwY$DlRH@;bP9sAfjkL;mWar&g)#X=;p2<k2~
zIk}K%)Xj9ZcqAm4XceD<Eo)PubsIzKvZRS-)}t-U$L6D#vmryY+&8*r(rjYLr{*jY
zrh;Wz{!q7x%E_79F7v^^NNd2YCR5XCQ7PM(Jwgba9L4R4>7Ufvn{%N7aBPm1Cj#Uo
zLq_1tafmErY$C@OH+&{`IQ^Suy2jq!iAMh><tjc4ud>dt*kfljV?a@*T_`mQzStCH
z{8s-)8#nmvnpF~xeb~GZiX|>dxMI$-Kk`}>gTs)SI+e`%Ty)&h&6%OkSAnkdb=K3h
z<m5&EY;pj|>?-;@Er-PEvbw&z`~fdzN}s2Vr#O2@2d8;8vhnMHQ!w=n6mU#jn88F#
z-XRHY`SHd628AAdnarjsQ<~aAu%)m?bL-|NUSmP&z*ejlbYb=8?)LKfIWwWcg%GTE
zGJ2%+Zor!E^f%zk0D4V}dTtD6G?P$pg!^41aIwPPIzMuB>%B+6>Z>Lu7iK#540jig
z4WAuujg8(tzj{TrN{VLv<Ad6n6+7Y_J9hNg@cqLl6F6zj6TWMo96pBHB?=VGU4@C~
zxG~#dWMpC<Xpp=GB6xKFFw*n=k*XDGji|&({2rnL0AeW>Y~-pVGmKg~!za9EioVri
zUa~4JN}5z9r81gW2ctz{q!8c%4JjbBD3%J`Aq67xEcOzKDBO$T2%zK{odz6uZ;2pP
z_$aOe3>OG{J*U#FbT3_;q`M!Fp;4*La8xTsx|e3=Coa7oQ<;=c(gq*N1Q`NU%cE_d
z)L^ORLiSuOh=Yg-3W4b9=H||-NN&6Y)tAgPbHSKt<7UB4#!MLY=-6;1#XM&gs@tj2
z`&y@r!#J_y(469vP*n(%cWn5-3q^+RKhA&KC$-(pbT)31ebL{sVHPK<8y<KLlB-y!
zkXBfy5KENNH&(s|^8nFP^?5+{kR<K7v8C}dr`u32d1(uT4%TS#c);>(s2$d{SXcVj
zr>7TChIpM4CnQo{LyBAQu3`I<ypvjLEffBvw#WGbocaE(RUWp0B(yV;f*nwen?IZ`
zRxWLe!9i-w{64*vC$K#Byy;8lCOV95^6-OgWApP+ZiVaA_!+3k{J1C_4bd(BNiW9M
zkq2O9F-c+wYYo09yCfSsdvQrNw(;VUY(yvV4>^c+3=?Y+|DGl~Sc058;1UCj<0qMP
zhlhoK2`degj(rv$fFL!oBKW0w!ocg~3Z1nGTmcO5KCc)JRzmFOMt@n^-`F2lZeH8v
zns)ZU1dSe{wX{%b@cMuIN3VY$bhs~sGEDxtGPbpK{d)79@Z#(n7eBbV{V0xWQ(R&9
z)y7_T;ka0u9PN|@KSPhV+s1X(xnDL8D>);hQ6QN#%m-&Jr=6U0m=Dn6dTlv8PEVvH
z=7yvuHZxO-I@hf(iN5L83vq-_Kui$`n7*LiOU3*IfB2sxL%-Tk{|`Gb$>67Zo7NhY
zv)*|f;ieph=Anh9$6ZebCjUw!O8MIKgKO=r*#)@R@hP=kH9*i_(G9D+4>crefxU_K
z^&%QW3ZG8Zz-v8(9r`<4*cHgm<Uoo;b7XTDK;bX#9|9QWDn&$E90T~m1eo!rKAcr@
zJqZ)Sv+Tr@dH*p99aF?IXV}fICg_0{9JURb)<DRCK;%Xh<f+DLD;2dkHehQ3mC%Cf
zECCP|kW-&ghh+qi&mH;R^0m#K7zDBM{8Z9LTO~_d<FbzufKX=xK#ie@BgabrrQH2M
zGzT?n>Te)i6nvpsoMbAv!XZ!MH~Iypu~CA20jYp+Imwtxt?8%*8`{U9n<!h0iIA0k
zTb&!`rw9Zi_oipKAP!@3WN^rXT+67vv8^{lXhS@0oj}{Qx8cf){B<B0r?)&fM(=HK
zniG83UB9`57{A5hA2KXq6Y$h+v0qfsG(^aZY&PqQ%f1Hvv|Iy$Gj2zKK5%<^t$6!c
zkw8&;!gk(C@uN@F@Dm4zOBLuAg>oaj%ak#gk#Hrl+S@?4%Jjy`(WqJYASZu?ItC9^
zRJ%Zjc>4pR_GLs%FpT#Z%uhgg0!NY%&yxo>olQs^H6hRl2;{Ww6cK!E0xXhXA~@ef
z5sOd4NddDfV>mD+B@0pcol#CZvW~ceFv46)8VY$!*y(3{sFu<n0>~hNObs1sQbvAZ
zld9g24Qp|6VQcjo_gCES2XzR6<H1L85HT(eLp`{@d3AaH-HS5|0DypT@n-aHQ_vV~
zt{me*thi{oxVg1iZ9!+X=ox(Si1tD<BG*CdVFB@7*stsr1PBtRvx5U%)6;?P`8Md0
zB15-7Hc?OkQQjFjE};|cZl1V~beL$hGtSH6RY6uW@gR-Q!_{s_fsE+kQV#4R=#=4I
z3!y@9#FT!pdwp&W^TJo4kw%b3;pwE;hCu|1lQi_$qnei%T!dsk8-gmfwGPwA;0raP
zf-d3MFkIlw;Shw**!J>De|fk6!Suv19R7A7#JCV-^;8FV*h96SSx_6hb4>VxXb2)E
zkhP#3A_}~#grvjE*#%68-D+bgNOWnpEzxLp0r`U78ywuReoUXrq-Z8;B03uo>Fms~
zI1NIyQ>V+`Xy0(Ncsv}sGg8Yjze{U8r8g0-)&)HYiR=;R8;Az4{R}h|JvOT3KzSa%
z;0(-cLK^BBfi@JZ`GhjKfEk4<kWr`C8S5^xH85&1jt~@(f`AEYw&35IQH?%PczRlk
zJ8J-nIb(wtjF_BQfd|*XB~Ao<T8X0GfLPeQh#8L!_6nZ1;4-Ub`Sx7+n_6_*8wEo;
zz@ndtXAv!OH2|7S<gpNH#?Sz3r6P}=xavBEsLSNS>P8>xl@1cQU{v+`^dhXF5D)nK
znS}@CAHL(G?~ot<*7M(@e{X$_J^#@6+4C3P;C}l7u>L$=J-ccC`A42MJkNa5YZK2V
z+C29g79V-`CqAqA!t`g2{vY`<dp`8^mug;~{B?WY1n1A|`Sb6vc*xkC#YdJ-|HY#J
z3r^=}-unfj^E1C^<9YeFpRjn;_gQ@E>HqxNr2mWOE(y=iyv^ckpZWM}lm6d!r^f?-
zZ%+8W@bjM*zd!v($M-$9j<^1yt>dS*_CF2+I+-khBSW9vyZ#@9dXxQ+Ejg%9g}sKo
zBAg|MP<MTk%0xI*3wh2U05&nmbZnq$VF1W>-v?$Fupx3&@pJr8hTL6NI{Z%?Oy*v4
zXck@;S7KZf;?4xSq5gO}UD9sis#oQH$%cS!Pi?U-jWizTW~@qDL(muf{OT;!?lCGS
z>^rDO$~=vpYIl*qSz|sa(sLK2!WXpj!~UIVJ`7gb{wiEen=%@~?G}^<0Qms!A15Fv
zg&{0cj82vhGwvHkhiM7lgE+3ma5gLvjM1o;-`rRpHjg-jakH3<rn%h6Xk%Ce+7ySA
z;T^W=ONXe@K;=t@2tJF4)nT&RGz5LgFqMh!_-Aeh#G>f7F(oBCzOJMFxn1p3%Apm5
z!z|Pf&KqfTJnSzDWIiK=sMvW@`huzRA%9%Nx395QLabG^(1H*pXm}eRV6Hi4DP}ae
zO%d(iFnb;>z;pcI@i^M-AU$nu%b^y}s9O~gH0=%#-L*tO!FbBDA<Wm}rh1uD1}_l7
zs9kn;(9Sme!rXb19qnpp`4|vzH|-CWG%aG3*{ZdO8N_lF+-3*|$YDgI*w5|%dEnpt
zt2Z(q^RB=3yOPI2|9hlu^7y%Lwdarg4<EMuu%WAG#;yH_K5F{P1H1c|-wh!5^>}*8
z`hCgukGFr}?e*LJ*Z*8}SbFdeMTe0;y3IU~pS1n$<#N7D!)Ur!4F4C8n*Q<PPZ<7N
z@3!Z|f8Xf;7fr8f7;fX^XMG;K4;cNQeBEGvYXsErV(gdBi+`X0A=58j{+QAEk)O8t
zdiz&fzt8`_w>j?({cioYmVfh<_q(Tk;`j`Gm+8}6|Khc&cQy?7z>l|n(dK3N-Nye<
z{29rO10#CC4<2!S_KeT_hraCg<kA7VJ#h06`MP`ZN6gN->+c($&p997`W}1!{Pzv!
z!;gI2?4{r@c=lWWY{vV<DU*{!|H$ozM{ZAUZ2f}q;T?b5<?SyG9`At(-SEMaCk+4V
zcYlfO&*z>u`SW%k*Va>p&lA7$>dK`CbPgXo1-5?5_Jyqne@ps6@XH($=+&jbGymHC
z0pDwKX5?=ieEo8QP9<m^8T!X>t3Us52`xqZpE`FMY+AauwYX_sZRpusJ-dG$CIZq(
zl9*Jv*(|kjv|=g)RQi}ggS3(r<Nz!jT~{7#Z^hGY@Dy&|g`<y#o9F1;eb-1OXYT%X
zku%mk+iJ&a)_9>`{0D;hbDf#)NbA`B?YlQNEF-EWo3DH9?0x>x*WDPd`BR$%h^(!%
zu#1X>tq8fFrFNZdowP>CsDhsYWY|@OEBGg95k9_i@51iN9J9qjEal$r^7d~3+PXD^
zA%|~nUEAudtb>$rQIJZ!UFI575UyGNgHqz;S;0ln<HzoAjh+ZYwx?}AMM?Vjl&KCZ
z&+6?h$7~`#Rr{8u%uOs@p2x*($IiCxsyI=yNF5wItpVPnSnvq00YyDRkwy6zidzxY
zR@;$<uLH>%0oiskJ4N@cd-&Y4`V6i;IbnSfvgO%r;M%s;?EqP6Al<X=6OjpY#iMc?
zg*C@_W$8j^>V6*^tX*7maCR)vr5F~D7IGB07Z2CA_<)!#SI1W28IZ<-2ZL45OOd@I
z9L-B)P=`c3$+({Tmp(-wtrKA|WN@_wlrws0aAQv22QVMUhK~=29KR17J9btGl7e7I
z@YYqP^*n|X<$UB<e(?|wXQ_Mkgk^>bHZSK(S>F2YT#1>KXIs`zX_t?kh2QU_rV5cS
zUierrJR&r@onVKl);k%;!-+(!R#tbeZTGi!kqf?s$PsZ<HX58oD3G?)?_E<hR$DY<
z!$>(makck;{WTsoh1-akRa`XdTr_YNVbQ=hgi|&t?-}V&hPmJ0O7S&8sweBGyiy_q
z77R6ToxnfE`t-ss0nN#F(B4_fV#7!P#%&t9`~CiQvNqt;VqtVb`<$+Z{qi_Cncl8I
zXlLh<d@SMV;00mS@V2BBp*W4wr@kQe!mzqrz{2@*ITO&XwgobI+px6gs>_+!7Z@Cb
z*j(WdY+~Zsz{AKu42#nj0FrdT#_$Bj#hLGXzR^%fRg;|0qWXNYIJf$7b;60*v^p7`
z%~vO!i(x-n=dO(k8^npV3#&`3*lonTwx{66Qs0bIagXT=jLu0-+WXE_>_Np2zt6P=
zKW1E8#VU#-H$?-y)HdPTu(Iqz%Fq4E%J!Ltwd3U7i^Y9aj0|2^)h&hV%7|aHu7*dd
ztD%17kV#CWKelsyb9>jcJs#Nv-{`bxs^dY9AH^J;jCvLJ9ON~|f08+D1NV6fql1Wv
z>=vG31o2sNK%-GVW5g-nr=*z8?sPiY7KJ=5E&|tHwZ*{SjPdYNo7>P?Q$5lZk|=ca
zZ;l%G;$r>QPxeT`);PZz))yc0OWPm9F@mV4=43$al1Su&R!N&<XHQ2}paF}z@2ZmM
z*x3pyWtF)Wm!wexP^j2Ug3G56X*iE3`t{sgK9we@oi%MLrDCH7O=&9YSTj|JNa~C=
zeJZ0SUQA`aUs2IRu@RfL2GS-h9h(kk(;hjdn1#J4W_xLEd#d{gNQxy$R-NBYHMmID
z*_|>;q4INiSOf>>#<Ah?=B2s_4(jPF94(oRp0$Ic;YkGN4J$)Ke<iVHUwE7SgU@-F
zLgi0t_$Dve{u3T@=i{GE;5?r^kDu%l&L<N%KY2hn|4yD1>+$CjIR8F*z8`#kEjF?r
z{QPwC?8wk}y`|p%PxAi}liODn5#%Uur8&w)y)cINJj57o=F|GaMt}gHV&|2!u}Tua
zQmm;Tqxvu3h>w{pfSpjM3yS|J+G;go%C(4iXrQ4M5wNecMrJ`nYt)G8hJ^lD)DXtJ
zB~*vb(Q1V!EqhmR*3ypEAmZ-DywmbYN<iRP(?WKZdr*7f9RQ~#;$ZxT5^=ywCn&bk
zB2heQprEh@DWe8U-0Q^g(5xc3OeMwH3%fdylqEu8D6#S&(+@%_D8P*sB?o+nFf#mn
zm3^xgNi`kjBQ#Le(2F(Ln4S<)a)lf-4|RsX&p(6?DutJrp5TR-s&yiHKo+#c;M8Bc
zT(ybk3gX8_MK~Ul4G9^BD2g#!r9BV}83v*kW=1I<aS%L7fI+Z3yerY3$qAl#B9K*v
z;fYye7&WMjl(`Cq?6sOwnqB4!!}35U16RohR<}1xWxHUOBs?=-CK5{kTED`pG-ihF
zEm<e>PeBm!n^S92Tx^$kFrUFPS__CtqKqib?1p-oFn8@C=8jv%6*U2rGV59KzuMAZ
z;x7UaJ#D^(M|GJq2_p26h=EX%O@#nC-8e~N?ht|nxg_U`vEe|EM1pc0oE~^95emH^
zSus33(2%C1L54#ig}?>vgTz&bcJ71q2tol?D6BS!D%;?TZxrKrVL-BW`bRFyFt1UA
z@zJn6;BiS{@N%SGpbg6eCSqj_>!DP_3)KQW&8t#2%nAWA@rcx|ye8V9bW$mh88?gl
z9o!7Uvk81B69bnV*a@!e)B%{;QjYkQ{NA{6YK~s+?$+!^x4%_6TL2A)Uo_yti$_%(
zkjO?pHi5y?fTE%%CyG{91+;7z$qKEh`XYrOlDJ6{r9?qi478GVfF8IhE9ZtQD_uf|
z7L{pW-9WFTX1H@SU_)VzUTwYmoU=$^SkXZwm-&JP0`1goXi?=_Rtj`IA+T3PII}!p
zA|+}zI~E8OkBPW7l1(Q-I4dF39Ajf8KubRlgNsw<LZ0>i!m6*~TbBAWiKlKW!w2nb
zSyb1Xjn$SMj(cFKSL!2VORlts@RW%5??5y1lcXh!H=XpoM_6grqNU`s$3r7=#pZ&C
zb^jU!56Dy%Dl7>I8iBN?>EkE~G<_T%@pOC;8s|i+hk<cMB#jwC6SHb~n8wjWTRr@F
zNP$BN98%zr0=G*6+W%*gkB<!foxSaUNbRQlf83bLl6JFGo7?Aim$w+)kLO#ttGY^s
z^OShqW?D4w4puWy7v`4W3DN*YAbGQJJ{avnPB<G;T~GCE?A=yVsk5V99nER$`{p-!
z6N&Z<3wCH4-q?^q9v}s)m!}5I*y5=C^glu2Ae{F8&Q33?^sw0hhk68thdTntEd|0!
zk&*$%rm2?bFGWO$1_c41r!RDHkdTRB91pDkJ``>d4Jbo~8`~Dx!A!Tu1RWE>c|bq|
z5e)bM=n%#LVUt^uItGZRBo?3Y{2yYJ(v<*43Fc7Z0{LpkUCb+ta2s|Vmn6*smpD#g
zo?wRK_@q<8+#O~p@^FBufW&s@f@7<b0jCRW6VsAM1Hx3<C}4Qwu3(J}%#k()CG5O&
z4bLXb2)o;J|21`iknu=>W+T#_hX6DbbS5god=C9<*eM2F55g?YKK&jnnD6*{F*4P>
z$LuE@8;$^k86t$}IgxEldiok6R9eKQmV=fNT^PZUUSz*?rNR1*{8q3Vjo!AEe$>bf
zk%GY^BJ2~YvPNQJp?Sf>?ll_Y>jF92wnbM)PFS-zz0R?Lz;S87esx9>PK5}7ky<p5
zqlR%hgNYJ>QkGx=dpn&_uIPxtpz0@6qfRT<!+7W7<6BH{l97q_ym!ow{m$%cq8_9r
zF1ULM7gvV|te=VjEF)wj4>(oz>$|JlbKZtWYppaYtVBeLJG~ucJB$o3+1+obA2qyj
z^Egu;@W123$Moy#&#BZ9Q@6+mEnG@UKpJHQMim6EXnXIl!=M)5?T<SIt&v&?4>w{#
zEuUDl4Tde%S{MYOzRM$l8A&XB955I$Ta6HiJfP&X(7n6ee!u}{G(cQg-tI47wfri`
z9Ly*TLLhs&=cqDYZ7rQsj$@|Ng})p0gz=}D!)gDlQEB207EkoAG5WzDoNpL#*;j~m
ztfmOTjME3IC`x|H8uVJDV?Y5`9LB*n6JGg>#v42(>H)>{fIO@D4u-_*>0z{?+%G@o
zde-Nxh`aaaZ9{}{A%2d&^l^zMs(ujHf{}!0twa+3;72(8k7-Vl-f-L>lfu*eD0GEd
zT&3Bl0Oh^cIPmXK@k3CJ43UnLIG=tK|9`GC1%&toht8?t51OgmJfk?_A^)%+X;)6g
zA`kn=m)t{rXGNU}lVOuLCAQHEoXDUKJZdJd_&9~6!~MQl)F?#7#;GIz0z&y%blK9u
zev@N+00^6y<YTf2;UZa}oggTA&dVgNOfE>{XYp~E9}~ml`$ZWzp4hJ%`8>9tSo!R-
zt;^?88yI}cqHsLYzcY$*ii$OQ@(N>(z$6dh9!B9q<w@kK9!B9S2_mnJDEtwKGD@<d
zexAhGek!ZEZxV|Fen&0Dueq|kesgu9zqYY_O*K{Vj;f-m!uDLtG}uY5CQ9PC?-CJ*
zxoe?N2bE$kHw%B^+%@i2tombGw#+2y33zGpwR;V32@YadNxYV7c?~9yimfVqNW*90
z+Omo-^2D{A_2^e1OpMTbZPG71pNXKMC<}BF4`z=f!f0*Xat+Dgf*LG%M#)!;+4gEg
z49c_+y9V(O_@E)+GrE`lG1QlD8Etd&(7v)DqG;zdrG15pDMA5=X%ZE*1jUMj@PSx*
z0}_cCQKUj0heU<(RGS`w;AQ>jT!g}EVqHyT(dQFGv!C|=eTn`5Uk{DHZs@K5@$<js
zt$+Qk-+bpc-g)EB>vw+Lo#*eo@6O|Qe)*kmzw`6%eB+&qZ#wa&pMS$oz5y-&fA#0N
zzh~!-{=fFVJvP$ox{qtCl5J>BrAcZxabQ-6OVZk<W`@fZ=}K#pJEX{PxXW<3Yg)E7
zo+U@aiTIdsNbgFC8?|s#J4OLFc51b;3#4^w`JX^Z;likcLjJ361Eg*XBu1Y`UvL^U
zanlFfqHX&7opbK%n{S5XYW4KcUM=_g?sp&Oo^$Sb-E&;Nj%UC5+PYWtjnAg{y*5sN
zPwPeSua*7179zDlTU76bAmm!M<>S7xwa){e{7VGa*j(ahlT~S8GCCyvgFbO<LS!0b
zNZ=D#cU*O?asfJ=u_h28)J70fxd6c}@GDIfRc17Xuc1ipq|aS;0(K1UB!o{54EY6I
zA7D)4a+6i)6zE1XVrOHflwzcX6Ybn!;)`LFg;i|Ub%m~J!O^ZSS8MM-*xze9ZsL7r
z%ggBtA7W81&|}j&sAFsktUzkBE+$6HTiOE!bP+N+a}Oyo?g-N_7t)=gF-HYLSt_@H
zaTLbX$^}kYGjlO~f+B8k1HoVejs{3WL8<Swn4St2nQjRYMw#lUTmldvzrS_3jm%YR
zRpg2=?#7t-i8FiqFxW{GhoJr*k;Gi`d~K7tVv&L~F?PA_bxC(2(kjG=G!Y)?i6bD2
zGw;fc1E<Jh2*3pQom}Ew$--;-VsU`tjU|i)mZuqGVNrF7cePNIPrS<siD?S+34#Mo
zK+4$^vwh-S;1q$Vk~px4#|Fg>pN^S&68?D&x1Q$L)<3X1&s`&QauV;lrEj@|1SmOi
z#!6OXa`5`Lz2Ps%eH_iiy~yTTvnp^mJo$>HMYgPRLy;0!Juqn?pJJ;&QK^e5Taia-
zLtbK!DmNs0g4zXM&~WAw{#9-mTH`sHitKMiQ)hssL_PT7r4LF&%6~#Ce<s7HD5PZJ
zV4@SI<l~d3x>^w0leZ>CU+5d`yl@^reGVXa$kL2mL~TNuV^AbJC0!)NM?BA-@FNI=
z$TDq^(yA1s4DuWgEYhxej2Ya;(hb5uT{qHR)-TUxSPp7DoNPyVxUXbL!!h?li4P_(
z(Cf0Skqib;6VwK4A?8xB>5&&1EG0tpz)dtSa&KOO^w3*vq?s4xQhA3ydLtwmdX~3v
zllTlcNeP+rT6|c*pIh><1g@iH5c&Kp{`|r{XspG(OB<3bZ~oTi&U*Rs>UB1G3;w(f
z|2Z?aS(@wc$q(=;JDV%f?ZN*!f(eA}H3C~ZHm8@jWwEke#A^WRe*9Wng_XXxhB^dH
zYcug~*%z9npd7S1v@`lL0cb4-k(>`pOq;oKRGQo0dMbSQvm@C7q}}nYR_Z^se^B46
z&#45ua#Sw&?REavJ}x%a*A}lFg?79bDX8N*S#4FTkJYx2+*vL>^5_@B<!Tet39uBD
z3hd&W$g88rfSVlhO5xPJe06ONGCFAt#OfmZbjZhQZK>D9mpCviJVJ!(m81D+Dj->X
zDFc#HNU(M)YF`Dl0(Oz9y_MrsJ_MgiK3q9kZC#DlO(jLwovE-&sx@au&JsoZU{EHj
zIC<D$rb4(zq&6ARqZoGSc!MpO90KW-TuMezF~zZHj|xrz0x^35Xag9J53jY`jRQ;Q
zLz%(NBLaZuDV!D<nTSKtTKoZFL6~kCk1k%VuCt^AzJq+>SZ>raqg_-AWFV%Z75B<V
zH8BKJhV#YTG)*M~FTvLQ`3i>*g&11We{!A&DO?5Jr>k7!BDpVKskp>L$n1oZ)E@R>
z0RCL>MgIawLKLI({IeaHTi9W$OkOs?3mk*$#HciIRWej)#X%r)@p2K-K_aVd?cc0b
zX!ZnD)KRxw4X^kd2cpWy@Zjz4X56-7AmB#K0mM2sPeVPYb#PV7=~l5Lr4>KdqX79s
zi>{6s$K+8jh&5+)V_jpxdb}asD2mInDG;ScAaT0LMM?q8v4(5N+O_pSit?gC*(T>#
zLls||FL#zZ(G;oVD~PWb)@QGwZ<V}3O4yO)M~-vJ2MgI4@Mc>(8woi#q<2B_c;qTQ
z)<tLI8WWD&NthAoD38vSmaEu5oH6da!`z8>?lBG{(f{AWU+m|tL(^}e{{MT!|6=&J
zhyTIwZw!B7_+4lJ^x3m#-*EPS-unml;_cvP0D%Dn1`rrPU;u#u1O^ZoK;Zif0=XKC
zriY3&7U)JveyH{OQE77J$o{I8tLs!BAi<{jp}L#ZCU+%36iuc2map|_O*QBc=Iqd=
zT8C7%Xz`wpScst2MBxVMKsFaBIIzO@8o@OZJ8rfS`&*^7?OKU}H`@x6wXjgk3TB3!
z(b&;c=!V8%NdMlT4Q+r<WE#h`GiNnqhg5*5N1%`Rv2&m}P(|;=h9Ihk%nSur;+N2n
zU4Nyi_yu%iQDrz#6a-1V$30hQ#2?YBBC|WFZ$25Df@wa0EjXhrq3vy`Jp>={jJx2=
ze~RK`FKCCm7k{3k9gdYCb{g%a>KY&4hd-S+;ql7R&Y>xPxyT;fg$C4nY3BoveZ0qN
zw;p)xp|an$$DT;a%m1IcTWrW1KxzD+)~nX$8~@)s?s_NQ{kj;XOE9&CSATKju35Z#
zBVWx{R!jOFo{0Yc=lF~Lyme^f?xC~a8-C{O&9h&5^OxWJg*Sip&0o6vb9aC0?vLI5
z(|2#(jkklJ0R#pR7(ieEfdK?^A@D{VH;>@Wzxg4YFOs-t1CG=7V*8DsecN5UY=$dl
zLuZn3Umk1^;?I9WTAVY^@3K^u;E+BNSR~>162c;<fy*!h$ALK%HnWZr^;N)GP(9jJ
zKN0Tyi~g{HODd2?bwuwGprgd16Q8Ul(heo({P@JwI}^nbtm{}BLE!u&cm~hC-0*fj
z6>*<%G7Km@*uQb*igUx!HQ6I-5z$38=W&EbMf~&rd#Vl+R^Z|<VvmqIOW;L9ic?Vr
z=DOd)mE!J|=Xr(zZi{(OTsZWnsCU-YVx(8n`(NfZy9R=OvBbjlqOi0g*kA?pQWhrk
zf>`iC(Sf47n(?|Ye98P}W$THNAnII#h-Oh7jG6V@4QGq_%<xoQqgc84XuYNa{}|nZ
z47(8r4cv)2UO~p(%$2TQj@>g7U*jH<B1ZA&cm5<O0zRA0p$cue)NriwJy&9#`NhS#
zj{NdO!Iacg_wH)N#aqi%_3mnUvt#W}qI!3I?UckV>m;LwXW9c6^#j*3)x}*)1a)x1
z?M2s&700nfL5r3owxAaTWO2_|EykHxA=tICyMubpv`>ht{p0H^*Js~9zx3$hdUfsU
z)%6Fr>WB3QJvezQsP@s~L2=^Nu0$jVvtW?R6Z;3$1KAI?aOoReA>x22ON+#LP%M8J
z)tIj9D_3}tPf4N6fvABsjGjTy+#fcD){TNrBntgrBWr{ndUp_gPqq<#%`V}!@0E4}
z%WBKIB)o@>!8>exLOpRAlVr4Hsn4ImFUT-tMD#@vxvs=#&ld<c0gUL_CMk7=x0K4b
zIK02dtCC5W2&fGom)93+m(>$XuRRws^AJO(!VjDI?Q{6Y(FAHaYAV`mTpc|ABye5_
zn=8p}I{5f=NL((!7~MG!EY1pgV3iniNm)$`W|x4wUd&g$4mWpFGI57zQW9>$<@vYR
zFd{OHLjs*^tE=;Cc1IRC=_-;+$VH9BuxG>oXSkr7zUe;Rax;<Hk?NywEf1Ll*YHjf
zCV~@A!fOQQDp%j{XCpy!oI3ZG+0-QUn4D_isf5N5J^iD2^*qNk+&75{$g9_8Q<Box
zBu?;g>2ppwJ67)kcLO9jIHPOq3|eV*aOW@Fz%rs0QcjOLELnm|s_iXWm)H%?am4WX
zRmgG~LMYZSJ`TfT1Lch_+oK`~52y$d%fA_*Q2;Q8UCD+3$TOTSqW?e4U+m|HhVHp{
z=<I(V{?7344*%Bh*N49{{M_*8hkt4KlfzFB?+rJGzjF3h&R)FtfqUP1?+@OKmaprd
z`}VB<kkuD?_63diZ~xe%QV(hMi&}T#TfhAB)N45{u-|U?6<l4JXK%B<%W22GQ|(9G
zeFdxM<mwwezpC*6rq#We{=--H9!A0D<LZchYfkZD>=*UE#dF2~%4;@5&-|U!*XOuX
zu<X}Q!Ri&i{m*J0ow1_Mzwi!)v#aCc>WjSTGrF#CS>3Pg$yX=-_gnL8;hn25`0Rq#
z(fP>Ve0Ac_OASj`UocyL?j;}B_~+0cYklcY->-Q7)xWCv@9NUMTI<Yh82_C9yH+3Q
z@4q_fwD38Fr>o=r&3~=+!#-mC^ZCzf9j|Zw*2m@Cz3*9V|DC_3>-zL>++MvgS6{Hb
ztn~t4c>A4&&-SN{PtGV`9eKx{?Y|fPx8JFJ`+euMF5vcOZjW!YjsH)NS{<)Xy*%^p
zwXR;z3qPXk9l5M^D4%<c@yWuE+Wf7KqpNrL%+p%m>%L!8JiqTt3V&Dke#GkSjs42)
z?XSU;R@rm-{Y`X;Z`>%gx3{-z2lbnDD838NU!Vo5dZV<uymGX$+HzW}H>I57hF$&E
z;@aievSgrv4N~t<xqEj|+$Kv<-=N(@8kK}}cU`&*@f_3?sZvVdhP!nqMj?0WPU0}!
ztviXh5Pi16tEf;d{jEEV-uJies7B8q$0yB3;c^ZlETC~gTa0eq!HN@IMnWASsARmj
z=x^Q8_=JC^x9*s<C+F6kSqf;foH#=}LFT4iZ}2w`dFK=63xSrbQLV#b4HC<6coQr0
zV(KYg2(}UVjr*|J*l8W@iaHE~sKxB3n<J{OwZrgg4i%;L%F!;Nei<2YaQlpw99qlO
z-m4$1G`3oG+r5P%_5wq$HGcZ2b<o&~uUO(60$s8s)OX~9g6yN)VcA5t!(!5mc9^yq
z^qaedy>6HF*igM)25Vc7?Obf=ijqBa4{6Yy!k^!l%VacRmP=NUniTi|UOh+e2khs|
z)or%spZ^7~h`VAYIf(gi9)G^hI2BwhgBu08QTY@PhQ9X0d|F~)z?CBu(4zUXLqa}}
zm;YX)2J|jWyWPek(f{eI;m;-fIWzR1hV%3PNA>@@^Z#Rel3=gc>x2CB75wA{du5uH
z%dS~!ZSHDTw%%ZDj-s`aX3JqrT#D`4Dhvta?AOc<Nk)@el7;^Xa^BiREip0w2J3QM
zfsZD`G31X&oux@%{L5F)E5dgXo?5jQDabSFt764<h*%EEs^3XtSH3T&vAmk;SsI1~
z=f-9iXR9#&Rmx*a)w$W~(q+_$!lU)I*~`l;7nLdOwt6Wn!6y(7Mczu|<Kv`wVdqI{
zKe@4-6eXJ~hO#o^=+a^|aG&|IDDk?rmKQr0J6~Gej|O$tGb?yV3b+GcB@Z)-`9-D1
z^btx4`U-zEf@+x-0_{X~jEYt(D!(?1Kv<xw#U^3$_uJ$iV_le)E6n4b3IbfnHs%Cb
z5=N(IZRH_)$t}oq%<fyIrqa39jq!I&e`AyU{Q><Q&p!}7|3LKovFJG}2R;~jie8L!
zZFay+6EW!R09W1xE!A$do>Yg0l*|eRyO2tOwPmEb;sr$!?gqaWv-D0>85G7;L`CA%
zj4Fe|hw-vj29<hTae1G7T)1PULSg*{2(?rwY`{!Tc3i1Y_+1G0TP<T$bXJ0~Bf%NM
zN(ES2?o)8l*Tu?GU#8qzD7I!9+{aKy<2*7jU5x13;ZZlQKxtLpOQz>WsvCx4uG-6F
z=mmvb6T-&LbYGB4sF);xT3|x7@_?0Jt&|+!SzS*qAb)eD_NJn+r&M1oOV)tLN~yk>
zl09bsq)Dx@89zk(X;~uB7SOLJSPzF2SXRJ#<S-Ge*Wz+0%{eu#i!|Ja`w4x-1v%l0
z;wB;|A2I&L7vwCGKzT>CnP63)dYni_8d0-lSwQ)YWMN2Z)PtN^T`;NU={N!sltQvV
zO47IzBCuj)nJF!;3L<ioQXa$MyCvmsk&hJMK>ks|>AnZ<v_B=>xx+)%mD$3X$UO}w
zv6bY~wszcl&K%lm4a44**j~EhmPPbjkwrTAtm<cv0~YBV9c_fkOATEt6ez%m7pph=
z>OWDVYQ{!-My76w?x`NAnWx-msimvs&aACGeT^Kb%yE<@BJ3elY|7@0MnOT`^CRak
zjo4jy=7iN!xX6l20&;B0$QLPb6Y`xrhA*+IUWSNWPvS5~Ufe7dYi3#_V`R(~GHw|e
z`_e4kN0Vpi8MJj}Ib9vl;>4XfnwW?81V>X4G9h!u^%{vs(aDq4?L^|@3@$3(s?3jb
z5!pxO$R>MZC>oLhgS{d1@A2%-l`ID%3rsBcR43cBQ$6SsMK`ekW@T;tkI$DzlR%Q=
zQ?RyP7=lF-gg8Q9GmOnI#h8+zhua(Xv_D(Zy|uPPNA^OUpN>iD{muq(X6So&4c%i0
zUEH1+a?FtyB>$I3hhWlbupAME+LlIJ(r%+xkr#zZ{)nd{7|DweMB}RDh!OJm-Yugh
zMa#7=@}yuAxNZ+AiBVr^U1X-WCX3v^x##MYBYQQ78Ck1)%-1sBivBH;VbR#gTb&tO
z%cYmmf6m~b9}J#nUW@Wun-L9WPtS|VbCAxO(?sItE;S*SodCI{5-k`{;KgAl^3??J
zI?061pt$}zz{Pk^Ps(WhL><LolCt9*S9z={lw!g`W^61ONwj5W!hG!XWPaJ8dq6J<
ztIIHdGdOr{A?PUvB9dcN6E<HjNy@l-g@n9Xs9B{prE<hrt*^}^3sgI*%!^X3FK6{$
zwM&GV98+ah6hNd1&)_p6sQQ%UMQy35hU}>-OU0H#GuATE_@J~DkA%U`00ILD3?MLo
zzyJaR2n--FfWYe*0@VNCYwLR-{!aY=-61|me29Y4l?rr1ak$anRzZGp8dXF^#J?r>
z!tU<SD+SN-$fXhIszFQW%*gSGN^SeQ)(pOPsC?HKW~-|UWBxwY_{hT}GZW62qxW0J
z#?e=JSguqrO-TzaSUfhmTrG_9!^y&gxQ3wJ!DWvD5wvi_4M#_#_qd>367|V*BeN^#
zMv5i4VDT?1_wecCyJ(j5)O3HQUj@HZ*D@YX=W9-TsEMTsugF3xbPJ4{SJszS=Euen
zFEI7)c58FL)7aeK+mgA77YIN^CUm_frJ6aC-<t9V51gwAGvaQA5qQY6A^?k&v#90z
zn$Mt0C>ACrwQ+8@-FA{_cY4fZolS7j#&3=|F_&vC+8H!9!0y0}*kt)!PzEV}q?O#7
zL#P37%C%demH3pgV=h36Ax8+rf*KEhF)_|EP9sE0Frr*$0|Z9Nzi_J%|K}6LL&+0_
z)-dBUA0ZeFkD#84Z%N!@G_&v(Leb!SE5I}&?(5l=OOuLF+$MNdtxnNccy7@Y$k0qg
z<G;F4Cc%6nxo(4N_t-ch93)zSW9XH)fTy_f78y{=4+uTruB#Hn@#8r}1Z07^ARxFX
z0oHOvL6Y^hn-oYvle#QU4EDLEaezy1%lRBzj;dM$H(2V>S2J!J;RhSj!UoVbdxFvd
zg@zDb<BZq_O@0B&pfTka=oZe&PBRx!)3*bs3j!zlG0pv!;Bbkk0AD8XN8?js)YX^t
z4CA!`1rE)oq7_`3idM6;%5w=(T#^G*?XzlKC&4&A67P1v8pA;2Kb)LWVdpSl5xjr>
zd9vUBk=62}E8x8E9-E#ijg$SJ2Okv*A2~O&f<Iji9`FsuiC|iw1LPN>7(7>k#p(x-
zdVd&kh>m-}u|*VXMkobumV45~8k+38iO!nRmY4+B@M)lU9KTjt1rXselkIPkU2&_M
z%8{D9rnl9GgUq%S^&`QhT7}xCvTkvW=`rbybnH&{1WYIf3KyhgC2N*~uwl<wk1&`j
z84yZhfYtk0(#Ix<m+Q3fvD4RKV~S!c57WD4r>Xd{l<MKaYPvOhvm{mwrxvzKIL7P>
zjI-`b8U}5XrR?A-XWDhr2B{%Bb_2@|(<YsuN$+FWd6I0W?U1R-$pZHTcKss5GUSY)
zS3=GR91+TuxMX2(C!=V>x;H&{Ed{;P<6tKHJ8;~i24BRRfidu2p!?%wx2$9qA4Kt_
zy<B%f$$_;#{qYism-LI+@$wKz4p0{upLUu~fHWNFIuw~`LJlU1iOQ5cNAx1)v9e*n
zI)EbJWf#i&;bW0F;AKWSM6J?0xbJsD%wr%ukH#!-6uEp?LioLt$vsOH2{||;=@jvV
zDia|PH96uvqy(Qp1mfI*{1PI-y>ACW`P-6T1uV9`(>QF*f3&ej84$h*giXN15Cslb
zkT^{<j&y1&EFxL{Uekplr>Qj3#;P<W&C>|y?&jrk(maiHj+>X;<=v!d8t$BF`gGhB
zK94x$In%VAG))s@CQY9%r@f{rIkHV})DM!5<$8uslNq-*`8#PXasRokZA&PY+m_78
zy?`E#xg~&c+`RV=3XJ2Xy>|~ypH6!1yL0WNX`h`VjH3y#Y(dYhLt6qlX`Z)zRQsv_
zzYl+$4dBes{?O1pOgYr4Irt|XF;)n~<chsc%FT=d4=^o)!9ub09jCWlSSS{jf<Qs$
zbt@LY7bZl#*lKh(4_c^Dae#o}LFAAshQT*%;W>CvDQjfvAadwrcMt}VLk?*W@qknF
z4nz(O;)6(-arjVC>^ROQh3h4SL41$|rFe7;L4^8TBW(xqL6G~emmj+{h!1*XcCLy_
z?>X9rUJ!Z3<AVwf2uk>AGfy~vK4O3Czf_ju?>~<;%l!H7TmH`<^XI<b{2%hSi?Lk%
z<lArubZ7{7HIpA{6#a)UDWAFT2KO@~Z7dGqsx70apb7nh`<W^^o=i3x+|QH?UwOB_
z^274GqOmpZI@_4y!Qg)8;C?0);aBhdOn1J_@)!F#!y*Cqz;4YOL&0Ju_weXM?O`v|
zD|kL$K)j^X_>qHib*Tn}E|MG49&K40@wm3SURzkCsVyX4<l_})WwbnzQBFp@ny;yN
zU7KHFiAC6*k=Rq*;PP@wsvAq%<w8#SPMJ$>sd|;4N|xc=j2Gz2CT!D#b=TEC#k-Yj
zt_w*MI+K@H63wtU4nx;6t3T3vx~Pu{3%;U{87@(I#W%KWeMxV#C7AS|Y2r)(OFnbo
z0VeECGRtNLD$ibf)ZhqLRLJtFi{NMQPBAqqjQE@$>qy`~^EDo%&V|laETQXHz*~hi
zr0nDiW>)13g^Tn^*ScFVm$kGCzXRJ!`Vp)t`H^nX467i#=y+#oYCo8Ktyn@2e2>i5
z*{R3nXpnq1%zb`+wiZLh<)HNw)uAK>?Sw2NnyrV@q>iUxipGL}TE{|nhC)~qobx`5
zD92e_yvj|nk%(IcL4C7y#oh>d^_T;?Vc@^D6v*bb45>yXSuI?P1<pv^ihhzpHn{BT
zF#&HJrLi?oi@6dwOD<eiKe?Di61dYNKrfVa*WnM>NDA}`%2Dz~r*MU%Q(W9ge#8nW
z_|A>89+)=O6S<>Ic43%i(7SwfWln&?R|1jzyvN*v2!-KF^(d^*7m?waeUJp<Q%aWI
zMH+A~`z`1Ch{SL=r${WrS+{UQD}A`0Z7cB|ywiXQ?noy;657!P_Xz9Y?al&T@dD21
z?v1k*#NV^{tgaGsapVdIH9t<KQV5J9A%T$m7B1bWFWE%lXK-XM*+MV|_`VXMz60h(
zd~n{_D;(LFKrVar7!vgYhwuVoq~P~+mT7pK;lP2T+1aJxTkbYX!!%eO4Fz$`C{3sC
zgt&#gqbD+f54;M_zfuH7^m0OU`woVNM&6-9#(f17Ha@=~`TVxO{G*}|f8sw_9@oF7
z&u<O?N2<R=&;RBto8Q%D`?~w<zGoHA-}!aTFE{<pmnXm9cR!|i?Y{9j&FlDT&5Qd=
zZTRzl!|?xaD||M7_veL9Ua9%?8h7m7pOksI{Fy@^e0lJv*L-?CA6Z$Gd4BpAERX0f
zYre$7Z;$-nU;MeDp=T|>_qV_O>V$Kzbxq%^c+xIweomL4wpaT*_59m^Ug`IlFaL<}
z?XmxTd;Ix*#($oFjpprKtSDY>JgRv|zxB1-!~f?mC><^Ss-A<>Klh^Yd7f&UdBD!u
z7nkvO6950=^?x6HQC`uD)9d@oNC&9703|At(SFgZTC2nSjw1d|WinD~0VXjjNjJ4}
z{iq3<)s;1Z4gyUVB4AvR6!u`%LE=GHP*~^|hJhhqY0AX>_`P*p+tpSOr4i$m&U1nG
z420rp8I$<qMEB2rCOvBl=pImklKIvU-hX(oFDV46fn>kF?v@J0L)4{6PZuLV_JgI>
zt=30ns<Z+0P@r8W(dcR#$ki(2rN&uAwe&@<&JcehSJt&S2n+~IqKwAx7s|Fqmd9X}
zb_#aC+fYeSzbX4VN_a|ZLJuV~9uKI{k~n@=e8PgWJpxh6`<u+Hil~1oMH!?-Y+*V>
zk2~6}VDhnm)OoYShgu(UbYl#YLrrB*O|U=kA_6rYw?4cidB7IUjsa~Y4@5pia6)i@
zKAf7KblR;l`q|W7L%6>6vuxcox1msS1c7+&S`lakiv`<=9Vb`KMR!!7X^Swrh}R*v
zg7_L%8({=)bk<4&o?s0qrjq=K&KdWi3OX19BFJT<2?<f!VUUn98J?(QSFSlGf%Ibw
zMJd$6C|``zmoE|K{!4(?u@~u2P=fY};<TbRAsg+5*dy`{BjuWd0BjRWi0`b9hL7D2
zz#u^sO`u?UyEJwN3c#No#ISLxBmhlVDU>cTH-16W1pCZ>qQ+EMAWjGqSv~C%j?T(8
zP`hF$g5#GkZqB4Q0X0YDQJ%+T2Lc!&Fr6GEY_c*?!cn<ZVFHriSS$!RWX5|yc53;&
zQ~`c`8*d}c5y!9|`NZ)a7%RGXkM>FM!-ye9qZl~yR`@#X8tD-vuOcoB8%N4zwE>S#
z*<DyWvh*e`Jf}q*dxq26=*FlK;Vz6i@C%1m($1Y(2!GczD|wq9;fRJe-jXzO^n`Hs
zuH#z9h|eJerRUQ?Hv-7FDZfTgc|Q7Nb~_xb2sh9FBJh%AF)H97G96##a1!G&IS8DY
zK{%KYiOv=0kw-GJU#Unnh!Lk$)8klKb~2g>X$Z{@qnDS>NQZnt`D?&6i0HsTQXkpW
z<_S(3d?!eWm~EEhLd<y2LxuNWFnrEY(#$(TmOcMO^fynCrXCtOCvCFSh%X`;kbamw
zEt<xXPjo&2dhSR@M2pp?bo&I@dX9wXbEI4+)e|aG=hHDcB)j2`ck}sXI9!_H+=_aj
zh%qgIyO_ZjIZ~o|IOa5sGsQ9N=(U~a(~1KzZ^9a64-s8%#|E!n`CpCE^8ygokb~#l
zbc!Aw3z$JqdZgwdZfR;}$`E%(E`H9?XQ{L1y8zr7PJ>qx&|h>YNF#U9!qTf83x~{(
zs2%d!OF}cU0`}4qN!{QE5uQNi;PQQLX7+YQ&hQ+#@W7Afk)p)Rae`)8JNkBqZCfWs
zORmzJpRnz35fxzxAfYLxNTnMAo(fC-&>jN_=C*-%#e%TPNN87hs!tX%<h{5_w1EyQ
z8D@?d1KqvIAe{;3G1}Y%T0iy(#EA2S(j<1wf9N?wv5=lo(xV52F4hCc&xDTXQb{|^
z>=2LdqM(?`o0+{XnkTxOklipc1&91aI-^S$x#&P7en=pajt4-xlC-$jqL*t}U4dSG
z-Vz_(+-__>xq6*yKlOj={muq(X6V)%hVGGR<5=gc^XROIV!uXbMOMUM$1I7Vu;yFS
z<Kf2Uu1;r)OGKKyH1-RGfDKtg>xD+0d02}x`hwp7ODR|Sak55{s%0ep>mXi}D{86W
zTpEi;mGe?zO8>PGZh(8#Fcv?Gs(1D|jb$=kx+=o6Er);;7mgPIqyw)f7onFf#dILA
zZQ8`yL~_@cLXtcRimGl#R1`H3nuS`)4a{IDj1R%rR)o?CXIqiisogCQob}!AwxV1c
zSHPiaYyGKCdBt4>A^l9?I_o_7MWg7F8bD~Tj(%wGLx=ny!n8EU<mGGYV^Wa-N1$8<
zK35zWmk4aA6P2>P_80N<-gbwX;!@_gw2X$s{m;<jQnhmR%A<Lm`O>xz<05#b51}PN
z`1yH|qhA>5B^oKp0A856hztVEd@m^}CNH{w>k`vI>XC<w)8hn9=!+w&rawQwUT>D%
zkRYyf$gnh4cVLnU-nczi%7G;ckY1X?+Vb9A;&lC&VII6W84ZyG@lua2<9mMGm7Gyi
zkh4Lrfo<E;CITbj5OZ6lN(Gn4>IYHDXGs{*qvrEgsnL-3uIO{Y6@3O<iKqfRgH!>2
zV3oj0>N!Lq*(ByLi47K!mXi05D44E)0@^Ql@CWA_^`pb5n80~#;{pCPg1_*4!T-K-
z9tbkF!GAx#bADuG=luAGr9N>H(hlzF%8_^Sex&2acQ8oQ5fc)0b(G8mA7FGpGSjfb
zOq#C1Pn#K_nTQ$}o83w>-{bmp_xF#x#v2`gA@g-SUAb~C+Z?Ui57l;qqd$S7EcO9E
zcji0A2`zWh^|xdnkc58YJlFm>{&F));05-C&6j(uOP&3ty(jh;F97pO8cGpOY0Q!*
z$i|{yzyw7MT%WoLZeAsbWH>BDGl;wB#)`*@ArV%LB<m|d9K))z{rFMyU>kO}1bHoI
zXZ+WI?c;7^6}B-(mLR_6jO`(s0cbpIE<$;P@LP(BbZ==1!XNHzXAvSMDBaEg`^<h4
zp)^}X1bVmV$Gb;Q7fpl$+<FiL01iwNQplM)HYx{VVd$8W@;+yck3M57rX*xIG6pUp
zj0UT~jsTs;jW$Xki)K;t!o+|e!sT(G5+v6g#*q*Byx9}ky5Jsv?r0@KdF71QzzBUH
z2IpWc@QyT$Z!?JJ8CeN}b06@J#OUtF4V;K|?fQN0XwBnsigt2wo}4J*KW^{AEV_sd
z`>^8~24wS`!Ijv^BYG|xQbZ2e{kR5ex8=fK#xQdpK>Ch{l*bv!A4o=#<u^Sxk(AJj
z3PHgArj;BjG8uuU2L}%K99)zcJEoD4Esk}xr^yJGlRWlu0_N=w#1f=}9Omson&luF
z)(>Gqr;fQm?B_Ysgb9Xuy?1!LKyYYWuOGDPH+CAD{)%}QU^Gcjp~4hTAqXBoD1I`#
z*W78yBe5bt;HX2VD?vGE!Z0tt3j3gd&-U&xEAkuWpTeY=D<OJU(RY#?16((G#|X<3
znFl`O<fG3P>8dJ0PoQar(~jOr3M5gq@h&r!ihjq{Qq^tRtVG?7y1=n&BXB#ZyP~Dc
zku*|bY%DgInR|3qL|JVBGjB4PMO}oX79m2pZ-FcBTbYLTh;6fRAOrdaGP*X%fT2>7
z_0UNKHY<}5kYHA>Bhj{^rBzCk1fAxfVooiCA`~k(AeM(;Wy&y-Hl6-o<}dbhX6P>?
z|34LaEVsA+A0zb&`B(LB<!A+Y0xJ7A*IUi)Lo|;}U)rKT^_oHBuy>{2C3&OCKh)(2
zq?AK*rT$a<2lc%=6dK%`<V6AX-O>W%)Z7gn`C7Z(I9SBk7=Q+ti)MD4-)U^Z!@h?w
zd~b#YW3{rB?k%T9TZ{7(E>_lw&dj`ZKYp*RG75eTDb^Qv4w1^I+9Lh9kFV^bvOr_A
z)nQ2jX17u|HNNAX5+l3%D6Q|e_vcG<`&&<?UjjLx6Wg3|heC9A08GLWSo$<s2fQbG
zNbn6>?;c@5vB0n!1^fK`W3{bTr_C4xVE4j#v3|NCRIB1EnEeFibLFKqI&OjEumj{q
z<Z8!{)!GNhqQbqVc}4rRF;`pFYBVfOcXAB)*H`1$Fy85FH!Cq_@CJaGwcJVy`WVp2
z>@8N_maKii8wFIr8*etD;e&?I6uvZh(Bk3Y>$4&9h4_X<8xsK2+6F4j%nC{C4;#14
zH%6BSb{vDuiB%ct>G%-<pidP5N(#~)*B<*p<rOt&bH0;|WYUk$U#{&j|IGRUJ>YbC
zSbf$UDiMbdL-`#UaQ=R;Y0y>rBHExc#_c=QcY6>6LgV)Z5biZ#&I5!#2fz;N)dV33
z(}xZW>y$GL!Nc9H0>ga*0F~w!uSoq*9$fHbcP7aE%n8CQRtzo|`&+&}%91l;nPBYJ
z7(1qXlQuT)Hsl8H>POdt0ZHGSy(Me|TylF7zZCmXo+ESY)sbZW0z8wBWF53n=1ob@
zzG$^*4fDH1cL4B7M{aF?Mi#`-b7k0=((X~owhC;XxdwHPluIJ8xjCx8Lcpdm5Zn<x
zm$GwIOE7krX|WXUuEPK<VMi0wGgFC$R8Hfbv!+Rua}^o7duO959=CoRf6^1xI5#)U
zweMo-gG*4PFZw}ANxF7hbgD^ezCfbiod%@rHQaH@9R2deRIDTdm#<PE1lDx<5k4~4
zV%`*W8*XQ-fuQS4)%B~@a%+=E3BpCN^AJLD{b=W~v{pZ8AUvbK*MteK(m=MLy$&1O
zar-X(&X0ge*fjKYftU_YBl`gM=<0iHengECVXH`(kLtLklDmBS{C3uFs17YD*&&BT
z`E%^Wd<1p~E=js_o1NPg*nVcW`yx9NImUE!d(#wbmx5+53AQ5uCYhuMK*08BzbSbn
z)E=QbLS^psegj8=qCihX*;Gfb>#sZx?LcMJ%z2$&bu{)fAykI$Qi>L_49E}}a%Xfv
zc>=*OMhUnwi&0o<3SBOopX8@a?PRjsJJ)1C6f~ObfyWDaM8qq*fU<M)E+G5FT_ABd
zyTFd<!j7MVb)d2uCqc=M6|2w<P8#Wknxuz^PCfk$-(3)47-<OkAvl1r0;y=#{~QP>
zO8&vDhaNnZ362>dm=jt!YJ_9G=v7WRgudi;1-Ixa<QJiQ1iB<WImFNH>2!q8x>$LH
zpWAh><;q?l1}3kkQ$kL569F?xSAEwDeZME2BfKW*C}%eVTI8<|7$*n^ixChGwi-v=
zVy$ty8I1T#=OJ+(M~E3JQd)*przsuWE+tdtr~iN6bbtN#*Wc7n|G&IlKiJJ?%j{(e
zSg1eQpr&CCNU}9c+rE2*OtOgn5ua`B?Q_}by?YM{QZ>PUxBC!XXgx=WD$pM`FGz-W
zUS#)fR+?3OR@TDAL*n5?PHN<3eaPIM@KX8~K5wftFGxXv{M7yrUeD$l*W|bbCi_+$
zZMp8(4r1|(e^S<d(X#nUbp+71__66SeG%ZeAY+T2nBf^Nu%8oxVg`B$V1k*%Ly2~c
z0H#T;fRKSw45kaNV#13C6HpiGJf|AnNrtND=33cD%>$sDuiQW!^4k?Ql!@ovhH|xn
z5x9f88GoA~Luuk6`mD{xj;wf=Y?|jkp(J*z=xeAT(a0V~nSs@{1Qd+FgyrylKWFT;
zB;(eBOW+<MH}|aI0$7X3g|XR{VhN>LA9Ahs4^UHar8F5m6B?RD%mX8p#*ol~sl?8W
zj!I^Ax}+f?1R{hu?-4Pf!rQ<@KpF;V^uOFO5{Ho{N<f~i#X;-_%EW1om1g{UaqIv1
z@)gDpa+^lPqxCEL7rQ`s0_uB9$$%-E>eM8T5ELjDZb?KNS8YNl7n$oM54S+fC2T(#
z<pN?nXoU<{+sM+Ia4RVJ5sn4ye#zJsjXY!-G<Gv1y<fB#m))YZ#0L2l_U|^(grDVd
zZ(&#JM7(?%;O0z-o}-*ilD%T#f*QrZ<OOUo_kxBNLCsTU0yIp)Q{ao{ULI<m%LG;m
z>r*rt&ty26Nn<huhs&2w{EH6~KtQGU1TSDeiaG_x83#e9w456Q@w)?_5;#aal2pc!
zT?7?gm#Y_-^aN#b3PpemWL{d90LHw4`Q1nW1=7=PM0Q9qsx)`1BOG?9$Z9B&GcY89
zPU?GGKS`+Mh0ef8NJ=V^(N`<*g*?HQjG3{h7&w08=oOK@;%E%GgTznO9ZlgKv57M=
z$Fp0c7?u-K5c>ol?~3S19Fj%EDnsQIY>J%e{bNG7vf$S)BG4IjNI6d9F5rb7L<%Vg
zUKNo-XP^v_n0=-!iBcz>wW+SdOe&{CEDh0DK;p!GkHxjiv*pWZ2XmBYgLt~4cU0jQ
zKs>)#G(g88Cku3a`FgE>Q*ztWwhm<pacPW9qFjIn5KfWD1CeLEdJB6V{;}5D6xW$#
zXSb@*5EJo6=%;bOmXcq6krRT*MzcO<BbU5*)oMoE5oF{z(Pvj^m!qzXk;x*<tz8`(
z@)o~TcLD9ZJM=vT!iT}O+hG8yraF3cuT@{&#z~Fidh2NOkf)cj0Gcc(&RlDET03xP
zq)lGT4j8N<o=#3{5L^UlEE%#_V%6pi3vOKud;tL=;9xI_+#T#?BOL5yBOL5yBO=(#
zUMTD};kt)Cr#EG_(IePH5e4kYF+J?D6A|nS0()YoW4hRg9M}_Eb71d4vE?=a9DU-<
zYNu7IX12h$d@*~GQUlV435^75m}JNeVDAP4`hgbAVis@6%R>#N8CJk}1*zdDKn<CF
zP<?-BXaT>x!E69;82XuehtB?&Vf=T9&P$WKaE)W01Pt*^3{e8@a_6vIC@oLo212<|
z!>u3lPb1<$tQrCMwYkDp3C%^`y+W^a5mK9SrnDE66Qu<MT)2g}{S@6}F4B*w`n9|e
zJ7*D66HP|aoZ}QqsIP=s*;_a?i;!3R>sq<7b68)g?d;#=P;_W=Z5+&2v|RJ@i?mS3
zW_XW9Ls_xz0VpvD<*nE{gjl5uhcna`-rhMvf+;seD!s<kHI<oWKr2G>0ovv!E39mW
z&&lX*fdrR#?lNjl-Pvws=Fn$rbUZU7WYSKT%L`lL1INZMmFX47y#OJf%&jpITFSB#
z8P#2FE6P3J#(9QK0cc^JaOL=Qmbdng5U5neeqp-=KMJKs>$|&kzjM6$YfuT#2r7ow
zO3$*{nU9EDVY~gpfetNHOyo(6OD5jao*CF(|0*&G8IO{%>4){Bwc55tmGG9YXusG7
z?Gvt+FfqfU4p0n`u?BQ-=)CimZYUcgJKQ4bn@`CE*jK%_Vx7t@LhUsjG{Ior^Htpw
ztEjbcT6XLv;wsz@IKc%0xmvC##vokqRb-%)FQGBC|L0!4<W_s8VACVHhRq11X(Z^t
z36BHgfH(mjjVV6zQm^2nW9PNGBV{N?=$^cIfmb9Rx9hUy#+i6mR}r!x2?>nE>@u$5
zll#!)0q@ru9@swe?kpl1WwJ_yZU6_WWS)gEJCdo4Q*&gfw`gZ@*)S+TMfelswB~7C
zZS1yo#MRl_<VL})-+d|<VUfqdUD}YLW_NaIRO{GLjBEoqi-)HFp5~`{{!sHAeeX+}
z_v@>F=JxW|*pcyl^VfZ!RJc9!i01qG>ObzE_o(opzan|3zVrFtlRS1WeB<M<$~<1Z
zHgNj$I{#06;Xlj#M?Uk~!jt!X@h=IyUwE(P5#0Vko&QHR_4!vnqx<sRKj^=Yz2Gx=
z-X8+1A6GbkVp-w*+=Rmat3R&KH-1(5&olqz&f?X#|AO}a++SC`o&Lky%j>rBv-(}(
z*EBEJ3vYV)@^bZu?8)AK#Q4wjCln6f{G!hPzLLV{J74>Kq3h}2dD-#bX?{UJ^%=&+
z!-#XPms4^5z=uJ=B!Y$_AB&i#c6*UnDYZgE7i$F0TzPH5mbLjS<?Hin>+>75zM=z$
z&FWDum;4Jg_+fa^!Z~ZX!Dt!RXO!^t+?Qu;27$xHFUvE%@6Ip<I^A+p9QY7c<RR;H
z-rw5W+P_(;A2b=Q1S`uD&wt86^;>+;hg2FM2g_rfO|>D?03;C;uIO^Yg54JYOUb66
z$bk+T3M~Bh2C8Ut2*_zYvWUb1CJbs4pOSsQuJd3hvCSjQfkDKjhg9H|+4=P_nz%S+
zkX&E$q1cQZmfro8b&nx_sr;vVs7@r6-r#|<oH0~!!{*i=!=fZ;*q|m(9oa>Ad6HdJ
z;SHB9O|P`2;d=<oVRNMehh0cXA;`sOVc8WK9TW3wVYsl0jXLQ#02slaVj0pmf&?55
zTTc-kTd(#osH6}Bp-%^!4D{x1=?~Gru-|RMpH$Kw^}i<mL1Bg^ru#Ly2pPbm`17au
z5B%IU^hePD|K0H6TR;5PKf2dj?mTr`{(nri7k%222J!!c_<zUd<_GcrgZO_f4?2kd
zSNjBRbq(VGgDnw8nZDO32J!z83JD`xPelxDQV>IM_9-t?NTB2({y&ag6}YC<Xdsr$
zM=+0f$AfFs?;!p^6JZQBE6dm-P>Q&pz%sgQHHiO*2tSDbcSiyb1i6Ed2J*wdK*joY
z<Nux6VGw>X2*0q<m+#~73+nsS{}=fSewOg3cm99m7N;3vTM8qI{twdxqcwfH<c%Ba
z`>Opf?{3sKS~p6S<+95YhybB}O$%&mDFtES=-IR)op!9{G;AR-mUwa&=|&=(Zq&9U
z!5k)vvz}2`3@XB$WFS73D>4%KUY1n;a-|4yOx4k?MrZS&g}a3ZVtNaKGauY&)ow@(
zVEKWO<?|!D*usZ5#S*8%G@G!()ix!T6%rcaCub!ryLb+TLVfX2eO5}J!J&)j+Hs^=
zD@iaq<2h$pJ#386G(bIi_V7h(hsD791~BaIA8t1e+~8bqNGdlqaY4e}SI%9WC`$Jl
z&3kF`q8|)7;4}jqN1<)>`o@*=!oybVT|!15LuK=#D<JQUU1Q@2M@N4j+6&cGbAHog
za7(K!jG9x2UaHf35NTr{DEk=F>Wz<_A93NVkByJB$U3LO^^0$qpf8r(`WYhTfiHcB
zQse?vDMPLcW*1^2-a<}_?Zbv_JPeD#a7MI`ZqYyrt0D06MtyU;_9QNL@CmlOI=T~;
zIfeC3Fj7*L=$&n*>_8|I?RbpQB$iNik0vK2WG_0XMz|3H$=6B04eVfqbyI@sUJ`up
zTh@gSmi{lZ<0r+E6d!<(l`?wLdb<u-C&v=vba(5?EKU_2N--L!33D{F3g8#P1xcj>
zENCVhzr$1-VwNQ@a%_*!Br~eyBM|0-7$w653FsDXA_=z2g)VM_h@?C`@vx4tBs@Dk
z2N9+~3PP-RUmQ{P^LpYLj5yD3uq3M3dYbUSc_rK2RFZZH7?^@Uh#9fx%^sUnn7H%A
z95xEZ{C>pzA~(t-)9Z?u>4M7cHH{$AF4L_-`ZWOqD1d-B$PI{Nqh*S}@usTmJ%ZAZ
zh)qv_ClJ&+-68=J58OTxUznKoC$kp=vQHoc=xNUR(o)gI=H>M{9Q(ZweH2*r{l2D-
zeZ=r}Z!2S~w<x$FJ}-}iB_D!pBeNIu*rJn@@Ts>6hK`qVn_iy;j2sSKJI!ni(H<)S
zgMzo7xKX>=VA`=xtzAFlH3mtpke|-C`~<RA%{}-tA4A9^^0Hp6J&G*66ZX9&_C)|B
z%0);P5kx*36F|ZNFaaFhxL^Za0QZDc4}jIei2nXDFSQj_{Fd``wyflgP~%Yu&ZTgR
z%Bc!LTE&$_ggz?1pgYu6hB}}hPKWPSFBOBzAeo%QKYJ7O1r?(Dh+`)a*u7AFeYSE9
z8PO{H%dPjkXYr{U2d%C5yoXs_uGe>t8V@3R7l0idzjPi(YhJZPpeFMgA<$8BN>oRm
zXzf7q#%>`TGrB}-N)|vBL8@!TF#{7h5jut^1q2G%t<ncZA9-YUuDVn{w>o}lMn2+H
zMD{<FjEM;CL=^Y-Q=JE^hg)*}SSL^}Ke$>yIBacdVnvJQC$2r&5_W^65?qN~Zjme(
zh~Z$#1}2U}P6tg#kNj;~BDvjS<OxfW&<4r~WByaqHc)ek8uA6g?g=i2*Ycl&icCf+
zHA1NSEmK2bN=VTJmv{Lu7Sq8;cq>Xv8$m31jFbVGCvUA$=coQpz2DgY&J1nbJ#-Iu
z0C!$51vDa7Mfd%>uXA3~OMhD9yWOI4Hc7z}ciUjei-C&Z)GPal&*?CZrISDvx7e6{
zOVoJgtakHI>4zdb=7BI1fA8>^c{~}WK`B0e8oZ^SnFfrG$jP99@)92kbCBS9(39ll
zxc5|#i#{i%dUVi(?nSrp1Qm(+rU(L6)rKzjpHk)4BfByeQErj<TS0|=V2O_|KB80U
z%SnRW;m&aqKUb&J^-=XaIF92loxopaB<mv5WD}W$EQ^xsT26f?LFPW{E(+rg%$sRU
zPr8pUY8PqNKItx^R-7Qb?4lF$qSJsA>AQ!4jE~*JjLL31b&@mUPV8aV7DB+o8G(I+
z0S~ESg&~BMpXg}7apMmMvtg-{Pj(^?2$V~cxYggofHh_oJXztCGd=JjzZ_Fiqx}ol
z-1AQwmztvI2zlRi^EMn=nNeEdK+A7Vmcii0l=mS=<x|nwR;eUhn2C4e@*Xgq!g{4C
zciq)M=H%~=Lu2Y)m_TAXu)Bf)%W7xhSfgOcgEwIfCaMJF6i%6CBf1+DsRT;agFMC7
z<vc|%(>-_H&o#$v)Mbif$_*K`+r)&)q-IN53}~4aCY;T|+U(4VFf-9wNW&v-M4Q5?
z4A)1HQv+v@ikdJmaS!6t9o8n$iddS&0DQVL93?<x74a!PCFUU>9%3waqEVkyoXG?*
zty`Pz+Rhdh3fmIrMD>|Rs6V%Q9(TpafWqwy7IfRhPy$74=wf_^vE13eN~RQ(B7NEi
z<o*{ndd`&TbES*m1E{hxE(;VZUt*R8&Ug$90}8d5RM?4*+R_E>UHTH{?!ceOF0RH3
zXU3J~TG$;fg{hm805!feb<rkmT{vMEp}TpsW5;J722MQpf_{Ix(p6{aN;zNr)aWYD
z;F?c4L=qfqK$<5z+xrKHwJpILIl3jGCV&~(zND3T7|Z465eyItQ3lZeGXU21$>v7C
zgBK^<GwiZ|7PxT4SLu>*qA$3qn357o5JtM($tVagFL6CP>KqUoab!?R)^nm`EY1pK
z$Czh2r$5EKf%4?17{Czcx(TofM-X(XJ9g3;O^0E!TM}(}Zlk>O5S?-hX-r7Au>X0;
zv>E|5bt^>!V@gr_75k$m@*wm^P1{O;z=f?$&nxwr*^cK^vnOJaQ#^9S!i#@+a){|!
zn%iC|!xl%dN)R7~Yj;L?up(D$Dq<jVDv~g$Y3;OWn9CC?V5WmivDx;{<?3SFqzc;7
zCaA{B&s|$XLqF#Jfxo}`*6{rP=(+#(qW>-Vh5h`)KM@}N)2N?sM9+PT6ZZ4ZqJI9-
zDf{`Ca#Ke~{O3_W|0;TZlKK2w-$;Mq=RXlWJ2UjdA^*SktBWO^?*Gb-?OLURTd;ch
z0nvzdIa_%c-}wydxU!+wSdgK-=I`u))#J)akITcA8%Yni!lK!b;(RFX25ser)aS$f
zkkxfuWJbSofu+D(GVu>k1i6Eez#mD1(MX~Ln6`gx{pSAodnKdB%Jo^7L6|MTxw%s5
zUKZOqqCJHdeRu~)-`1`lN|N_0Tl>s9#H&7NfDiR{4j-|^sBgaF?l}W2c5_%-vLUkz
z`<A+@#uiqkSB?M$OD+KL;A+yYrdR<S?7|HmFO+W{9O^x8-eQp{>dAuzggZtUjA5hr
zBP+xJ+F5ja$L_u?mD{W}0C$4sU|{tE1t5Iwnv0n=3qFW49v@E17T_DO*BE}gT6fVh
z*z+b26%wXOV3sw#kP{NxFt0uKRQ83oF8JS>Cq4QAQ){>Q2G%ZcW(?(5YJ0+$1cSUy
zF7t%s6+}vxRNq}LSM)2l4(jMZv;E7xY(H0jS&C`@Vd2WfHFx!!eK1^Crg)>aqPZp@
z^&`~;!T>OF&LO1s2Mpw?&O)ydxm|@aAiIW-!j(Dtm!T)n;%H$xxMbDdX&g2r)epu8
z^>iy~;(Ugi>w2Nx-rhD&N}1i=I-<Oer2XXNOAC^gh(?hKN?K{2FH;s+8}K~NiKGOd
zWXM~(B6io2v8D1Ok02rH`B5jY;l`Xl6uVDqmSW5uE;9s99m6(3feLbfxdMy8GdY*d
z)*fW6$a*LiHcE>u7&%!uH{y~eLVyQMeW5?_2hC0gWMu3HUmme)V5k@fWUP+ndl=9Z
z1p~9i0)e3Drg9_97^ZM2M_%Zkj1yEo<brmHRDw}+QO-FYkl{n0-);o?;VznQPr&Jd
zXSigab&fR{32R6mOi94BtO&yNk1Ewms6?ml6(<qx18JLz4yZsuv3s<8wCte-tT!kr
z?O8fGU_On?YggxR;gG`=Tt>l5v51tS*aaC!_Ji#5LS@zUM)lbB)?#-msnAdz;a0Xc
zt|SNFW+r4DNH9!h2|Usac%-e2aEE-flP=?)Ld6p4m2@>RjG1qb;02oMIR>gDs1zAJ
zyo4a(7Aa1VWQ7oA4jz}8h>z1STy|+Sr=oczs9c)zsLUt_qM3}l8umyc9WZ9$A&#l|
z-T_LlZnpwbLnrHr)Eyu-8fVd(bvuM~SW`3ViA<^oc_^7>J5rW!H0VJEt%{B~?o!CD
z3%$ytg67uMyuv_*V-O3@eT5Fz5?~|M1_+x;z(#ZGm0Qe7vSMffr*ZZEd?DPdMq`V!
zRlQ@}MR*n~2Q*xHc*+W=_U#K;_LA^XZ{X_sg~B}4alxBLBZI9F^Q)u8RywvQ#|twA
zhx3~Rao%ysEy26xPI%`xu-x*sV+^bm^j|@+Heg35d!UOc;vhNP!cHgnu=L==M=75H
zE8t1h1z7(85T@<|&>0;C0P)x*@?8XY;o@eSa7KtDJFxoXjJRlqZgMhutY!N^(a|Xd
z?{zOS1dAXMWXTX-Zgd1fw>^S)yZ;`Y5c82~I|QBNfVec#7k*tdv7Eno>9)Xr)qh*M
zyUmwaPT4JXn_hfuh=?i7PZqWmesFNF*%c-_huzcCP$N?j+M}vp{jjmc%6{wn`#Y3}
z;Sz;#<}X0NBWxk7mHo{+b0A71@tD9P4GVIp8|-tMMs*vbjHa$WqPVcNij}ML$69x)
z%SGKu<y%*FGf8L)cQ@{`NF6NeLE>TI?Z%qo9^BV%LVkv6cL>4axA=Iexwn7NxVE=j
zKSUAxt#T5njVwn}5fOs*Q*EYFfOp(iM)cDGMAZ=vFFLoxz{ci0?tD7}oey!K)nUGd
zH@&IVBj7-9rZ7TagVgpVnBZ7PNyY>K_F7;d?r>I5;4f%sQ>G)o*HjrcfqsDytUnpe
Z(E8;|obsF`l1RBp(&L^7>Zriv{|BSSGL--T

literal 0
HcmV?d00001

-- 
GitLab


From ccd5587a4cf9429d62568115b2d4f43ee7c7f6f1 Mon Sep 17 00:00:00 2001
From: Michael Kent Wilkinson <miwilkin@syr.edu>
Date: Fri, 1 Oct 2021 19:55:53 +0200
Subject: [PATCH 20/22] StrippingBXX: Correct DzeroBPVIPCHI2Max (loosen)

---
 .../python/StrippingSelections/StrippingSL/StrippingBXX.py      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingSL/StrippingBXX.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingSL/StrippingBXX.py
index f89c4f502..1a0515d27 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingSL/StrippingBXX.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingSL/StrippingBXX.py
@@ -57,7 +57,7 @@ default_config = {
             "DzeroBPVVDMin": 4 * mm,
             "DzeroBPVVDCHI2Min": 120.0,
             "DzeroBPVDIRAMin": 0.9997,
-            "DzeroBPVIPCHI2Max": 0.9997,
+            "DzeroBPVIPCHI2Max": 25,
             "DstarPionPTMin": 250 * MeV,
             "DstarPionTRCHI2DOFMax": 3.0,
             "DstarPionMIPDVMax": 0.3 * mm,
-- 
GitLab


From e0937d2f27b6df9177425e5a4d895915d9f6ceeb Mon Sep 17 00:00:00 2001
From: Anna Lupato <alupato@lxplus766.cern.ch>
Date: Wed, 6 Oct 2021 10:53:30 +0200
Subject: [PATCH 21/22] SL dictionaries 2016

---
 .../LineConfigDictionaries_Semileptonic.py    | 21 +------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py
index 22c814282..8456bc927 100644
--- a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py
@@ -1,21 +1,3 @@
-###############################################################################
-# (c) Copyright 2000-2019 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.                                       #
-###############################################################################
- 
-################################################################################
-##                          S T R I P P I N G  34r0p2                         ##
-##                                                                            ##
-##  Configuration for SL WG                                                   ##
-##  Contact person: Lupato Anna (anna.lupato@cern.ch)                         ##
-################################################################################
-
 B23MuNu = {
     "BUILDERTYPE": "B23MuNuConf", 
     "CONFIG": {
@@ -278,7 +260,7 @@ BXX = {
         "DstarVCHI2DOFMax": 5.0, 
         "DzeroADOCACHI2CUT": 20.0, 
         "DzeroBPVDIRAMin": 0.9997, 
-        "DzeroBPVIPCHI2Max": 0.9997, 
+        "DzeroBPVIPCHI2Max": 25, 
         "DzeroBPVVDCHI2Min": 120.0, 
         "DzeroBPVVDMin": 4.0, 
         "DzeroDaughterKaonPIDKMin": 4.0, 
@@ -407,7 +389,6 @@ Bc2Bs = {
     "WGs": [ "Semileptonic" ]
 }
 
-
 SemilepISR = {
     "BUILDERTYPE": "SemilepISRAllLinesConf", 
     "CONFIG": {
-- 
GitLab


From 1bad28c09c7a735942e99b2c59775b2976501b01 Mon Sep 17 00:00:00 2001
From: Anna Lupato <anna.lupato@cern.ch>
Date: Wed, 6 Oct 2021 11:05:04 +0200
Subject: [PATCH 22/22] Update LineConfigDictionaries_Semileptonic.py

---
 .../LineConfigDictionaries_Semileptonic.py    | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py
index 8456bc927..203bd2451 100644
--- a/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py
+++ b/Phys/StrippingSettings/python/StrippingSettings/Stripping28r2p1/LineConfigDictionaries_Semileptonic.py
@@ -1,3 +1,23 @@
+###############################################################################
+# (c) Copyright 2000-2019 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.                                       #
+###############################################################################
+ 
+################################################################################
+##                          S T R I P P I N G  28r2p1                         ##
+##                                                                            ##
+##  Configuration for SL WG                                                   ##
+##  Contact person: Lupato Anna (anna.lupato@cern.ch)                         ##
+################################################################################
+
+
+
 B23MuNu = {
     "BUILDERTYPE": "B23MuNuConf", 
     "CONFIG": {
-- 
GitLab